Kaydet (Commit) c2f2999a authored tarafından Joren De Cuyper's avatar Joren De Cuyper Kaydeden (comit) Thomas Arnhold

Translate german comments in sw/source/filter/ww8/

Please, only apply this patch if you are a native speaking German.
I'm not a native speaker, so a double check is really necessary
and appreciated.

Thanks in advance.

Change-Id: Ic2fb6e97007c6b47851ad8a7a51e987da5a70877
Reviewed-on: https://gerrit.libreoffice.org/2617Reviewed-by: 's avatarThomas Arnhold <thomas@arnhold.org>
Tested-by: 's avatarThomas Arnhold <thomas@arnhold.org>
üst 1e67ecc6
...@@ -86,10 +86,8 @@ bool DocxExportFilter::exportDocument() ...@@ -86,10 +86,8 @@ bool DocxExportFilter::exportDocument()
return true; return true;
} }
//////////////////////////////////////////////////////////////////////////
// UNO stuff so that the filter is registered
//////////////////////////////////////////////////////////////////////////
// UNO stuff so that the filter is registered
#define IMPL_NAME "com.sun.star.comp.Writer.DocxExport" #define IMPL_NAME "com.sun.star.comp.Writer.DocxExport"
OUString DocxExport_getImplementationName() OUString DocxExport_getImplementationName()
......
...@@ -64,7 +64,7 @@ sal_uInt16 MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, sal_uInt8 ...@@ -64,7 +64,7 @@ sal_uInt16 MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, sal_uInt8
nNumId = GetId( *pMyNumRule ); nNumId = GetId( *pMyNumRule );
//Map the old list to our new list // Map the old list to our new list
aRuleDuplicates[GetId( *pRule )] = nNumId; aRuleDuplicates[GetId( *pRule )] = nNumId;
return nNumId; return nNumId;
...@@ -94,7 +94,7 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule ) ...@@ -94,7 +94,7 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule )
if ( !bOutlineRuleAdded ) if ( !bOutlineRuleAdded )
{ {
// jetzt noch die OutlineRule einfuegen // still need to paste the OutlineRule
SwNumRule* pR = (SwNumRule*)pDoc->GetOutlineNumRule(); SwNumRule* pR = (SwNumRule*)pDoc->GetOutlineNumRule();
pUsedNumTbl->push_back( pR ); pUsedNumTbl->push_back( pR );
} }
...@@ -102,7 +102,7 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule ) ...@@ -102,7 +102,7 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule )
SwNumRule* p = (SwNumRule*)&rNumRule; SwNumRule* p = (SwNumRule*)&rNumRule;
sal_uInt16 nRet = pUsedNumTbl->GetPos(p); sal_uInt16 nRet = pUsedNumTbl->GetPos(p);
//Is this list now duplicated into a new list which we should use // Is this list now duplicated into a new list which we should use
// #i77812# - perform 'deep' search in duplication map // #i77812# - perform 'deep' search in duplication map
::std::map<sal_uInt16,sal_uInt16>::const_iterator aResult = aRuleDuplicates.end(); ::std::map<sal_uInt16,sal_uInt16>::const_iterator aResult = aRuleDuplicates.end();
do { do {
...@@ -116,8 +116,8 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule ) ...@@ -116,8 +116,8 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule )
return nRet; return nRet;
} }
//GetFirstLineOffset should problem never appear unadorned apart from // GetFirstLineOffset should problem never appear unadorned apart from
//here in the ww export filter // here in the ww export filter
sal_Int16 GetWordFirstLineOffset(const SwNumFmt &rFmt) sal_Int16 GetWordFirstLineOffset(const SwNumFmt &rFmt)
{ {
OSL_ENSURE( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION, OSL_ENSURE( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION,
...@@ -158,7 +158,7 @@ void WW8AttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &r ...@@ -158,7 +158,7 @@ void WW8AttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &r
SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId ); SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId );
SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId ); SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId );
// mit keinen Styles verbunden // not associated with a Style
for ( int i = 0; i < WW8ListManager::nMaxLevel; ++i ) for ( int i = 0; i < WW8ListManager::nMaxLevel; ++i )
SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 0xFFF ); SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 0xFFF );
...@@ -594,7 +594,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh, ...@@ -594,7 +594,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
{ {
ByteToSVBT8(11, rAnlv.nfc); ByteToSVBT8(11, rAnlv.nfc);
sal_uInt8 nb = 0; // Zahlentyp sal_uInt8 nb = 0; // type of number
switch (rFmt.GetNumAdjust()) switch (rFmt.GetNumAdjust())
{ {
case SVX_ADJUST_RIGHT: case SVX_ADJUST_RIGHT:
...@@ -793,7 +793,7 @@ void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt, ...@@ -793,7 +793,7 @@ void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
sal_uInt8 aSprmAnld[54]; sal_uInt8 aSprmAnld[54];
memcpy( aSprmAnld, aSprmAnldDefault, sizeof( aSprmAnld ) ); memcpy( aSprmAnld, aSprmAnldDefault, sizeof( aSprmAnld ) );
WW8_ANLD* pA = (WW8_ANLD*)(aSprmAnld + 2); // handlicher Pointer WW8_ANLD* pA = (WW8_ANLD*)(aSprmAnld + 2); // handy pointer
sal_uInt8* pChars = (sal_uInt8*)(pA->rgchAnld); sal_uInt8* pChars = (sal_uInt8*)(pA->rgchAnld);
sal_uInt16 nCharLen = 31; sal_uInt16 nCharLen = 31;
...@@ -803,12 +803,12 @@ void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt, ...@@ -803,12 +803,12 @@ void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
else else
BuildAnlvBase( pA->eAnlv, pChars, nCharLen, rRul, rFmt, nSwLevel ); BuildAnlvBase( pA->eAnlv, pChars, nCharLen, rRul, rFmt, nSwLevel );
// ... und raus damit // ... spit it out
OutSprmBytes( (sal_uInt8*)&aSprmAnld, sizeof( aSprmAnld ) ); OutSprmBytes( (sal_uInt8*)&aSprmAnld, sizeof( aSprmAnld ) );
} }
// Return: ist es eine Gliederung ? // Return: is it an outline?
bool WW8Export::Out_SwNum(const SwTxtNode* pNd) bool WW8Export::Out_SwNum(const SwTxtNode* pNd)
{ {
int nLevel = pNd->GetActualListLevel(); int nLevel = pNd->GetActualListLevel();
......
...@@ -254,9 +254,8 @@ public: ...@@ -254,9 +254,8 @@ public:
const SwFmt& rFmt, sal_uLong& rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode); const SwFmt& rFmt, sal_uLong& rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode);
}; };
//--------------------------------------------------------------------------
// class WW8_WrPct zum Aufbau der Piece-Table // class WW8_WrPct to construct the piece table
//--------------------------------------------------------------------------
class WW8_WrPct class WW8_WrPct
{ {
boost::ptr_vector<WW8_WrPc > aPcts; boost::ptr_vector<WW8_WrPc > aPcts;
...@@ -324,11 +323,11 @@ public: ...@@ -324,11 +323,11 @@ public:
class DrawObj class DrawObj
{ {
public: public:
WW8_CP mnCp; // CP-Pos der Verweise WW8_CP mnCp; // CP-Pos of references
sal_uInt32 mnShapeId; // ShapeId for the SwFrmFmts sal_uInt32 mnShapeId; // ShapeId for the SwFrmFmts
sw::Frame maCntnt; // the frame itself sw::Frame maCntnt; // the frame itself
Point maParentPos; // Points Point maParentPos; // Points
sal_Int32 mnThick; // Border Thicknesses sal_Int32 mnThick; // Border Thicknesses
short mnDirection; // If BiDi or not short mnDirection; // If BiDi or not
unsigned int mnHdFtIndex; // 0 for main text, +1 for each subsequent unsigned int mnHdFtIndex; // 0 for main text, +1 for each subsequent
// msword hd/ft // msword hd/ft
...@@ -484,18 +483,18 @@ public: ...@@ -484,18 +483,18 @@ public:
WW8_WrPlcAnnotations* pAtn; WW8_WrPlcAnnotations* pAtn;
WW8_WrPlcTxtBoxes *pTxtBxs, *pHFTxtBxs; WW8_WrPlcTxtBoxes *pTxtBxs, *pHFTxtBxs;
const sw::Frame *mpParentFrame; //If set we are exporting content inside const sw::Frame *mpParentFrame; // If set we are exporting content inside
//a frame, e.g. a graphic node // a frame, e.g. a graphic node
Point* pFlyOffset; // zur Justierung eines im Writer als Point* pFlyOffset; // zur Justierung eines im Writer als
RndStdIds eNewAnchorType; // Zeichen gebundenen Flys, der im WW RndStdIds eNewAnchorType; // Zeichen gebundenen Flys, der im WW
// Absatzgebunden wird. // Absatzgebunden wird.
WW8_WrPlcFld* pFldMain; // Felder im Haupttext WW8_WrPlcFld* pFldMain; // fields in MainText
WW8_WrPlcFld* pFldHdFt; // Felder in Header/Footer WW8_WrPlcFld* pFldHdFt; // fields in Header/Footer
WW8_WrPlcFld* pFldFtn; // Felder in FootNotes WW8_WrPlcFld* pFldFtn; // fields in FootNotes
WW8_WrPlcFld* pFldEdn; // Felder in EndNotes WW8_WrPlcFld* pFldEdn; // fields in EndNotes
WW8_WrPlcFld* pFldAtn; // Felder in Annotations WW8_WrPlcFld* pFldAtn; // fields in Annotations
WW8_WrPlcFld* pFldTxtBxs; // fields in textboxes WW8_WrPlcFld* pFldTxtBxs; // fields in textboxes
WW8_WrPlcFld* pFldHFTxtBxs; // fields in header/footer textboxes WW8_WrPlcFld* pFldHFTxtBxs; // fields in header/footer textboxes
WW8_WrMagicTable *pMagicTable; // keeps track of table cell positions, and WW8_WrMagicTable *pMagicTable; // keeps track of table cell positions, and
...@@ -503,7 +502,7 @@ public: ...@@ -503,7 +502,7 @@ public:
// which is required to make word display // which is required to make word display
// graphics inside tables // graphics inside tables
SwWW8WrGrf* pGrf; SwWW8WrGrf* pGrf;
const SwAttrSet* pStyAttr; // StyleAttr fuer Tabulatoren const SwAttrSet* pStyAttr; // StyleAttr for Tabs
const SwModify* pOutFmtNode; // write Format or Node const SwModify* pOutFmtNode; // write Format or Node
const SwFmt *pCurrentStyle; // iff bStyDef=true, then this store the current style const SwFmt *pCurrentStyle; // iff bStyDef=true, then this store the current style
...@@ -516,15 +515,15 @@ public: ...@@ -516,15 +515,15 @@ public:
sal_uInt8 nTxtTyp; sal_uInt8 nTxtTyp;
sal_uInt8 bStyDef : 1; // wird Style geschrieben ? sal_uInt8 bStyDef : 1; // should Style be written?
sal_uInt8 bBreakBefore : 1; // Breaks werden 2mal ausgegeben sal_uInt8 bBreakBefore : 1; // Breaks are being written 2 times
sal_uInt8 bOutKF : 1; // Kopf/Fusstexte werden ausgegeben sal_uInt8 bOutKF : 1; // Header/Footer texts are being written
sal_uInt8 bOutFlyFrmAttrs : 1; // Rahmen-Attr von Flys werden ausgegeben sal_uInt8 bOutFlyFrmAttrs : 1; // Frame-attr of Flys are being written
sal_uInt8 bOutPageDescs : 1; ///< PageDescs (section properties) are being written sal_uInt8 bOutPageDescs : 1; ///< PageDescs (section properties) are being written
sal_uInt8 bOutFirstPage : 1; // write Attrset of FirstPageDesc sal_uInt8 bOutFirstPage : 1; // write Attrset of FirstPageDesc
sal_uInt8 bOutTable : 1; // Tabelle wird ausgegeben sal_uInt8 bOutTable : 1; // table is being written
// ( wird zB bei Flys in Tabelle zurueckgesetzt ) // ( wird zB bei Flys in Tabelle zurueckgesetzt )
sal_uInt8 bOutGrf : 1; // Grafik wird ausgegeben sal_uInt8 bOutGrf : 1; // graphics are being written
sal_uInt8 bInWriteEscher : 1; // in write textboxes sal_uInt8 bInWriteEscher : 1; // in write textboxes
sal_uInt8 bStartTOX : 1; // true: a TOX is startet sal_uInt8 bStartTOX : 1; // true: a TOX is startet
sal_uInt8 bInWriteTOX : 1; // true: all content are in a TOX sal_uInt8 bInWriteTOX : 1; // true: all content are in a TOX
...@@ -1016,7 +1015,7 @@ public: ...@@ -1016,7 +1015,7 @@ public:
WW8_CP Fc2Cp( sal_uLong nFc ) const { return pPiece->Fc2Cp( nFc ); } WW8_CP Fc2Cp( sal_uLong nFc ) const { return pPiece->Fc2Cp( nFc ); }
// einige z.T. static halb-interne Funktions-Deklarationen // some partly static semi-internal function declarations
void OutSprmBytes( sal_uInt8* pBytes, sal_uInt16 nSiz ) void OutSprmBytes( sal_uInt8* pBytes, sal_uInt16 nSiz )
{ pO->insert( pO->end(), pBytes, pBytes+nSiz ); } { pO->insert( pO->end(), pBytes, pBytes+nSiz ); }
...@@ -1125,16 +1124,16 @@ private: ...@@ -1125,16 +1124,16 @@ private:
WW8Export& operator=(const WW8Export&); WW8Export& operator=(const WW8Export&);
}; };
class WW8_WrPlcSubDoc // Doppel-Plc fuer Foot-/Endnotes und Postits class WW8_WrPlcSubDoc // double Plc for Footnotes/Endnotes and Postits
{ {
private: private:
//No copying // No copying
WW8_WrPlcSubDoc(const WW8_WrPlcSubDoc&); WW8_WrPlcSubDoc(const WW8_WrPlcSubDoc&);
WW8_WrPlcSubDoc& operator=(const WW8_WrPlcSubDoc&); WW8_WrPlcSubDoc& operator=(const WW8_WrPlcSubDoc&);
protected: protected:
std::vector<WW8_CP> aCps; std::vector<WW8_CP> aCps;
std::vector<const void*> aCntnt; // PTRARR von SwFmtFtn/PostIts/.. std::vector<const void*> aCntnt; // PTRARR of SwFmtFtn/PostIts/..
WW8_WrPlc0* pTxtPos; // Pos der einzelnen Texte WW8_WrPlc0* pTxtPos; // positions of the individual texts
WW8_WrPlcSubDoc(); WW8_WrPlcSubDoc();
virtual ~WW8_WrPlcSubDoc(); virtual ~WW8_WrPlcSubDoc();
...@@ -1146,13 +1145,13 @@ protected: ...@@ -1146,13 +1145,13 @@ protected:
virtual const std::vector<sal_uInt32>* GetShapeIdArr() const; virtual const std::vector<sal_uInt32>* GetShapeIdArr() const;
}; };
// Doppel-Plc fuer Footnotes/Endnotes // double Plc for Footnotes/Endnotes
class WW8_WrPlcFtnEdn : public WW8_WrPlcSubDoc class WW8_WrPlcFtnEdn : public WW8_WrPlcSubDoc
{ {
private: private:
sal_uInt8 nTyp; sal_uInt8 nTyp;
//No copying // No copying
WW8_WrPlcFtnEdn(const WW8_WrPlcFtnEdn&); WW8_WrPlcFtnEdn(const WW8_WrPlcFtnEdn&);
WW8_WrPlcFtnEdn& operator=(WW8_WrPlcFtnEdn &); WW8_WrPlcFtnEdn& operator=(WW8_WrPlcFtnEdn &);
public: public:
...@@ -1174,7 +1173,7 @@ struct WW8_Annotation ...@@ -1174,7 +1173,7 @@ struct WW8_Annotation
WW8_Annotation(const SwRedlineData* pRedline); WW8_Annotation(const SwRedlineData* pRedline);
}; };
class WW8_WrPlcAnnotations : public WW8_WrPlcSubDoc // Doppel-Plc fuer PostIts class WW8_WrPlcAnnotations : public WW8_WrPlcSubDoc // double Plc for Postits
{ {
private: private:
//No copying //No copying
...@@ -1192,8 +1191,8 @@ public: ...@@ -1192,8 +1191,8 @@ public:
void WritePlc( WW8Export& rWrt ) const; void WritePlc( WW8Export& rWrt ) const;
}; };
class WW8_WrPlcTxtBoxes : public WW8_WrPlcSubDoc // Doppel-Plc fuer Textboxen class WW8_WrPlcTxtBoxes : public WW8_WrPlcSubDoc // double Plc for Textboxes
{ // Rahmen/DrawTextboxes! { // Frame/DrawTextboxes!
private: private:
sal_uInt8 nTyp; sal_uInt8 nTyp;
std::vector<sal_uInt32> aShapeIds; // VARARR of ShapeIds for the SwFrmFmts std::vector<sal_uInt32> aShapeIds; // VARARR of ShapeIds for the SwFrmFmts
...@@ -1217,17 +1216,17 @@ public: ...@@ -1217,17 +1216,17 @@ public:
} }
}; };
// Plc fuer Chpx und Papx ( incl PN-Plc ) // Plc for Chpx and Papx ( incl PN-Plc )
typedef boost::ptr_vector<WW8_WrFkp> WW8_WrFkpPtrs; typedef boost::ptr_vector<WW8_WrFkp> WW8_WrFkpPtrs;
class WW8_WrPlcPn // Plc fuer Page Numbers class WW8_WrPlcPn // Plc for Page Numbers
{ {
private: private:
WW8Export& rWrt; WW8Export& rWrt;
WW8_WrFkpPtrs aFkps; // PTRARR WW8_WrFkpPtrs aFkps; // PTRARR
sal_uInt16 nFkpStartPage; sal_uInt16 nFkpStartPage;
ePLCFT ePlc; ePLCFT ePlc;
bool bWrtWW8; // Fuer Writererkennung bool bWrtWW8; // for writer detection
sal_uInt16 nMark; sal_uInt16 nMark;
//No copying //No copying
...@@ -1242,12 +1241,12 @@ public: ...@@ -1242,12 +1241,12 @@ public:
sal_uInt8 *CopyLastSprms(sal_uInt8 &rLen); sal_uInt8 *CopyLastSprms(sal_uInt8 &rLen);
}; };
// class WW8_WrPlc1 ist erstmal nur fuer Felder // class WW8_WrPlc1 is only used for fields
class WW8_WrPlc1 class WW8_WrPlc1
{ {
private: private:
std::vector<WW8_CP> aPos; std::vector<WW8_CP> aPos;
sal_uInt8* pData; // Inhalte ( Strukturen ) sal_uInt8* pData; // content ( structures )
sal_uLong nDataLen; sal_uLong nDataLen;
sal_uInt16 nStructSiz; sal_uInt16 nStructSiz;
...@@ -1265,7 +1264,7 @@ public: ...@@ -1265,7 +1264,7 @@ public:
void Finish( sal_uLong nLastCp, sal_uLong nStartCp ); void Finish( sal_uLong nLastCp, sal_uLong nStartCp );
}; };
// class WW8_WrPlcFld ist fuer Felder // class WW8_WrPlcFld is for fields
class WW8_WrPlcFld : public WW8_WrPlc1 class WW8_WrPlcFld : public WW8_WrPlc1
{ {
private: private:
...@@ -1299,10 +1298,10 @@ public: ...@@ -1299,10 +1298,10 @@ public:
class GraphicDetails class GraphicDetails
{ {
public: public:
sw::Frame maFly; // Umgebende FlyFrms dazu sw::Frame maFly; // surrounding FlyFrms
sal_uLong mnPos; // FilePos der Grafiken sal_uLong mnPos; // FilePos of the graphics
sal_uInt16 mnWid; // Breite der Grafiken sal_uInt16 mnWid; // Width of the graphics
sal_uInt16 mnHei; // Hoehe der Grafiken sal_uInt16 mnHei; // Height of the graphics
GraphicDetails(const sw::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei) GraphicDetails(const sw::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei)
: maFly(rFly), mnPos(0), mnWid(nWid), mnHei(nHei) : maFly(rFly), mnPos(0), mnWid(nWid), mnHei(nHei)
...@@ -1318,7 +1317,7 @@ public: ...@@ -1318,7 +1317,7 @@ public:
} }
}; };
// class SwWW8WrGrf sammelt Grafiken und gibt sie aus // class SwWW8WrGrf collects graphics and issues them
class SwWW8WrGrf class SwWW8WrGrf
{ {
private: private:
...@@ -1410,9 +1409,8 @@ public: ...@@ -1410,9 +1409,8 @@ public:
rtl_TextEncoding GetNodeCharSet() const { return eNdChrSet; } rtl_TextEncoding GetNodeCharSet() const { return eNdChrSet; }
}; };
// Die Klasse SwWW8AttrIter ist eine Hilfe zum Aufbauen der Fkp.chpx. // class SwWW8AttrIter is a helper for constructing the Fkp.chpx.
// Dabei werden nur Zeichen-Attribute beachtet; Absatz-Attribute brauchen // Only character attributes are considered; paragraph attributes do not need this treatment.
// diese Behandlung nicht.
// Die Absatz- und Textattribute des Writers kommen rein, und es wird // Die Absatz- und Textattribute des Writers kommen rein, und es wird
// mit Where() die naechste Position geliefert, an der sich die Attribute // mit Where() die naechste Position geliefert, an der sich die Attribute
// aendern. IsTxtAtr() sagt, ob sich an der mit Where() gelieferten Position // aendern. IsTxtAtr() sagt, ob sich an der mit Where() gelieferten Position
...@@ -1523,7 +1521,7 @@ public: ...@@ -1523,7 +1521,7 @@ public:
}; };
sal_Int16 GetWordFirstLineOffset(const SwNumFmt &rFmt); sal_Int16 GetWordFirstLineOffset(const SwNumFmt &rFmt);
//A bit of a bag on the side for now // A bit of a bag on the side for now
String FieldString(ww::eField eIndex); String FieldString(ww::eField eIndex);
String BookmarkToWord(const String &rBookmark); String BookmarkToWord(const String &rBookmark);
......
...@@ -71,10 +71,10 @@ ...@@ -71,10 +71,10 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace nsFieldFlags; using namespace nsFieldFlags;
// ToDo: // TODO:
// 5. Die MapModes, die Win nicht kann, umrechnen // 5. convert the MapModes that Widows can't handle
// OutGrf() wird fuer jeden GrafNode im Doc gerufen. Es wird ein PicLocFc-Sprm // OutGrf () is called for every GrafNode in the document. Es wird ein PicLocFc-Sprm
// eingefuegt, der statt Adresse ein Magic sal_uLong enthaelt. Ausserdem wird // eingefuegt, der statt Adresse ein Magic sal_uLong enthaelt. Ausserdem wird
// in der Graf-Klasse der GrfNode-Ptr gemerkt ( fuers spaetere Ausgeben der // in der Graf-Klasse der GrfNode-Ptr gemerkt ( fuers spaetere Ausgeben der
// Grafiken und Patchen der PicLocFc-Attribute ) // Grafiken und Patchen der PicLocFc-Attribute )
...@@ -381,7 +381,7 @@ void WW8Export::OutputLinkedOLE( const rtl::OUString& rOleId ) ...@@ -381,7 +381,7 @@ void WW8Export::OutputLinkedOLE( const rtl::OUString& rOleId )
void WW8Export::OutGrf(const sw::Frame &rFrame) void WW8Export::OutGrf(const sw::Frame &rFrame)
{ {
// GrfNode fuer spaeteres rausschreiben der Grafik merken // Store the graphic settings in GrfNode so they may be written-out later
pGrf->Insert(rFrame); pGrf->Insert(rFrame);
pChpPlc->AppendFkpEntry( Strm().Tell(), pO->size(), pO->data() ); pChpPlc->AppendFkpEntry( Strm().Tell(), pO->size(), pO->data() );
...@@ -409,7 +409,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame) ...@@ -409,7 +409,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
WRITEFIELD_START | WRITEFIELD_CMD_START | WRITEFIELD_CMD_END ); WRITEFIELD_START | WRITEFIELD_CMD_START | WRITEFIELD_CMD_END );
} }
WriteChar( (char)1 ); // Grafik-Sonderzeichen in Haupttext einfuegen WriteChar( (char)1 ); // paste graphic symbols in the main text
sal_uInt8 aArr[ 18 ]; sal_uInt8 aArr[ 18 ];
sal_uInt8* pArr = aArr; sal_uInt8* pArr = aArr;
...@@ -465,8 +465,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame) ...@@ -465,8 +465,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
} }
Set_UInt32( pArr, GRF_MAGIC_321 ); Set_UInt32( pArr, GRF_MAGIC_321 );
// Magic variieren, damit verschiedene Grafik-Attribute nicht // vary Magic, so that different graphic attributes will not be merged
// gemerged werden
static sal_uInt8 nAttrMagicIdx = 0; static sal_uInt8 nAttrMagicIdx = 0;
--pArr; --pArr;
Set_UInt8( pArr, nAttrMagicIdx++ ); Set_UInt8( pArr, nAttrMagicIdx++ );
...@@ -480,7 +479,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame) ...@@ -480,7 +479,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
( ((eAn == FLY_AT_PARA) && ( bWrtWW8 || !IsInTable() )) || ( ((eAn == FLY_AT_PARA) && ( bWrtWW8 || !IsInTable() )) ||
(eAn == FLY_AT_PAGE)) ) (eAn == FLY_AT_PAGE)) )
{ {
WriteChar( (char)0x0d ); // umgebenden Rahmen mit CR abschliessen WriteChar( (char)0x0d ); // close the surrounding frame with CR
static sal_uInt8 nSty[2] = { 0, 0 }; static sal_uInt8 nSty[2] = { 0, 0 };
pO->insert( pO->end(), nSty, nSty+2 ); // Style #0 pO->insert( pO->end(), nSty, nSty+2 ); // Style #0
...@@ -524,7 +523,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly, ...@@ -524,7 +523,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
sal_Int16 nXSizeAdd = 0, nYSizeAdd = 0; sal_Int16 nXSizeAdd = 0, nYSizeAdd = 0;
sal_Int16 nCropL = 0, nCropR = 0, nCropT = 0, nCropB = 0; sal_Int16 nCropL = 0, nCropR = 0, nCropT = 0, nCropB = 0;
// Crop-AttributInhalt in Header schreiben ( falls vorhanden ) // write Crop-Attribut content in Header ( if available )
const SfxPoolItem* pItem; const SfxPoolItem* pItem;
if (pAttrSet && (SFX_ITEM_ON if (pAttrSet && (SFX_ITEM_ON
== pAttrSet->GetItemState(RES_GRFATR_CROPGRF, false, &pItem))) == pAttrSet->GetItemState(RES_GRFATR_CROPGRF, false, &pItem)))
...@@ -544,7 +543,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly, ...@@ -544,7 +543,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
sal_uInt8 aArr[ 0x44 ] = { 0 }; sal_uInt8 aArr[ 0x44 ] = { 0 };
sal_uInt8* pArr = aArr + 0x2E; //Do borders first sal_uInt8* pArr = aArr + 0x2E; // Do borders first
const SwAttrSet& rAttrSet = rFly.GetFrmFmt().GetAttrSet(); const SwAttrSet& rAttrSet = rFly.GetFrmFmt().GetAttrSet();
if (SFX_ITEM_ON == rAttrSet.GetItemState(RES_BOX, false, &pItem)) if (SFX_ITEM_ON == rAttrSet.GetItemState(RES_BOX, false, &pItem))
...@@ -573,8 +572,8 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly, ...@@ -573,8 +572,8 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
pBox->GetDistance( aLnArr[ i ] ), bShadow ); pBox->GetDistance( aLnArr[ i ] ), bShadow );
} }
//use importer logic to determine how large the exported // use importer logic to determine how large the exported
//border will really be in word and adjust accordingly // border will really be in word and adjust accordingly
short nSpacing; short nSpacing;
short nThick = aBrc.DetermineBorderProperties(!bWrtWW8, short nThick = aBrc.DetermineBorderProperties(!bWrtWW8,
&nSpacing); &nSpacing);
...@@ -604,7 +603,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly, ...@@ -604,7 +603,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
} }
} }
pArr = aArr + 4; //skip lcb pArr = aArr + 4; // skip lcb
Set_UInt16( pArr, nHdrLen ); // set cbHeader Set_UInt16( pArr, nHdrLen ); // set cbHeader
Set_UInt16( pArr, mm ); // set mm Set_UInt16( pArr, mm ); // set mm
...@@ -666,11 +665,11 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd, ...@@ -666,11 +665,11 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
WritePICFHeader(rStrm, rFly, mm, nWidth, nHeight, WritePICFHeader(rStrm, rFly, mm, nWidth, nHeight,
rGrfNd.GetpSwAttrSet()); rGrfNd.GetpSwAttrSet());
rStrm << (sal_uInt8)aFileN.Len(); // Pascal-String schreiben rStrm << (sal_uInt8)aFileN.Len(); // write Pascal-String
SwWW8Writer::WriteString8(rStrm, aFileN, false, SwWW8Writer::WriteString8(rStrm, aFileN, false,
RTL_TEXTENCODING_MS_1252); RTL_TEXTENCODING_MS_1252);
} }
else // Embedded File oder DDE oder so was else // Embedded File or DDE or something like that
{ {
if (rWrt.bWrtWW8) if (rWrt.bWrtWW8)
{ {
...@@ -690,7 +689,7 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd, ...@@ -690,7 +689,7 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
GDIMetaFile aMeta; GDIMetaFile aMeta;
switch (rGrf.GetType()) switch (rGrf.GetType())
{ {
case GRAPHIC_BITMAP: // Bitmap -> in Metafile abspielen case GRAPHIC_BITMAP: // Bitmap -> play in Metafile
{ {
VirtualDevice aVirt; VirtualDevice aVirt;
aMeta.Record(&aVirt); aMeta.Record(&aVirt);
...@@ -722,7 +721,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem) ...@@ -722,7 +721,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
{ {
sal_uInt16 nWidth = rItem.mnWid; sal_uInt16 nWidth = rItem.mnWid;
sal_uInt16 nHeight = rItem.mnHei; sal_uInt16 nHeight = rItem.mnHei;
sal_uInt32 nPos = rStrm.Tell(); // Grafik-Anfang merken sal_uInt32 nPos = rStrm.Tell(); // store start of graphic
const sw::Frame &rFly = rItem.maFly; const sw::Frame &rFly = rItem.maFly;
switch (rFly.GetWriterType()) switch (rFly.GetWriterType())
...@@ -836,28 +835,27 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem) ...@@ -836,28 +835,27 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
break; break;
} }
sal_uInt32 nPos2 = rStrm.Tell(); // Ende merken sal_uInt32 nPos2 = rStrm.Tell(); // store the end
rStrm.Seek( nPos ); rStrm.Seek( nPos );
SVBT32 nLen; SVBT32 nLen;
UInt32ToSVBT32( nPos2 - nPos, nLen ); // Grafik-Laenge ausrechnen UInt32ToSVBT32( nPos2 - nPos, nLen ); // calculate graphic length
rStrm.Write( nLen, 4 ); // im Header einpatchen rStrm.Write( nLen, 4 ); // patch it in the header
rStrm.Seek( nPos2 ); // Pos wiederherstellen rStrm.Seek( nPos2 ); // restore Pos
} }
// SwWW8WrGrf::Write() wird nach dem Text gerufen. Es schreibt die alle // SwWW8WrGrf::Write() is called after the text.
// Grafiken raus und merkt sich die File-Positionen der Grafiken, damit // It writes out all the graphics and remembers the file locations of the graphics,
// beim Schreiben der Attribute die Positionen in die PicLocFc-Sprms // so when writing the attributes of the items it can be patched into PicLocFc-SPRMs.
// eingepatcht werden koennen. // The search in the attributes for the Magic sal_uLong and patching
// Das Suchen in den Attributen nach dem Magic sal_uLong und das Patchen // happens when writing the attributes. Class SwWW8WrGrf-Klasse provides with
// passiert beim Schreiben der Attribute. Die SwWW8WrGrf-Klasse liefert // GetFPos() sequentially the positions
// hierfuer nur mit GetFPos() sequentiell die Positionen.
void SwWW8WrGrf::Write() void SwWW8WrGrf::Write()
{ {
SvStream& rStrm = *rWrt.pDataStrm; SvStream& rStrm = *rWrt.pDataStrm;
myiter aEnd = maDetails.end(); myiter aEnd = maDetails.end();
for (myiter aIter = maDetails.begin(); aIter != aEnd; ++aIter) for (myiter aIter = maDetails.begin(); aIter != aEnd; ++aIter)
{ {
sal_uInt32 nPos = rStrm.Tell(); // auf 4 Bytes alignen sal_uInt32 nPos = rStrm.Tell(); // align to 4 Bytes
if( nPos & 0x3 ) if( nPos & 0x3 )
SwWW8Writer::FillCount( rStrm, 4 - ( nPos & 0x3 ) ); SwWW8Writer::FillCount( rStrm, 4 - ( nPos & 0x3 ) );
......
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