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/2617 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
This commit is contained in:
committed by
Thomas Arnhold
parent
1e67ecc656
commit
c2f2999ac6
@@ -86,10 +86,8 @@ bool DocxExportFilter::exportDocument()
|
||||
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"
|
||||
|
||||
OUString DocxExport_getImplementationName()
|
||||
|
@@ -309,19 +309,18 @@ xub_StrLen SwWW8AttrIter::SearchNext( xub_StrLen nStartPos )
|
||||
if(const SwpHints* pTxtAttrs = rNd.GetpSwpHints())
|
||||
{
|
||||
|
||||
// kann noch optimiert werden, wenn ausgenutzt wird, dass die TxtAttrs
|
||||
// nach der Anfangsposition geordnet sind. Dann muessten
|
||||
// allerdings noch 2 Indices gemerkt werden
|
||||
// can be optimized if we consider that the TxtAttrs are sorted by start position.
|
||||
// but then we'd have to save 2 indices
|
||||
for( i = 0; i < pTxtAttrs->Count(); i++ )
|
||||
{
|
||||
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
|
||||
nPos = *pHt->GetStart(); // gibt erstes Attr-Zeichen
|
||||
nPos = *pHt->GetStart(); // first Attr characters
|
||||
if( nPos >= nStartPos && nPos <= nMinPos )
|
||||
nMinPos = nPos;
|
||||
|
||||
if( pHt->GetEnd() ) // Attr mit Ende
|
||||
if( pHt->GetEnd() ) // Attr with end
|
||||
{
|
||||
nPos = *pHt->GetEnd(); // gibt letztes Attr-Zeichen + 1
|
||||
nPos = *pHt->GetEnd(); // last Attr character + 1
|
||||
if( nPos >= nStartPos && nPos <= nMinPos )
|
||||
nMinPos = nPos;
|
||||
}
|
||||
@@ -345,7 +344,7 @@ xub_StrLen SwWW8AttrIter::SearchNext( xub_StrLen nStartPos )
|
||||
/*
|
||||
#i2916#
|
||||
Check to see if there are any graphics anchored to characters in this
|
||||
paragraph's text. Set nMinPos to 1 past the placement for anchored to
|
||||
paragraph's text. Set nMinPos to 1 past the placement for anchored to
|
||||
character because anchors in Word appear after the character they are
|
||||
anchored to.
|
||||
*/
|
||||
@@ -482,7 +481,7 @@ void SwWW8AttrIter::OutAttr( xub_StrLen nSwPos, bool bRuby )
|
||||
|
||||
m_rExport.ExportPoolItemsToCHP( aExportItems, GetScript() );
|
||||
|
||||
// HasTextItem nur in dem obigen Bereich erlaubt
|
||||
// HasTextItem only allowed in the above range
|
||||
m_rExport.m_aCurrentCharPropStarts.pop();
|
||||
m_rExport.pOutFmtNode = pOldMod;
|
||||
}
|
||||
@@ -580,12 +579,10 @@ bool SwWW8AttrIter::RequiresImplicitBookmark()
|
||||
return false;
|
||||
}
|
||||
|
||||
// HasItem ist fuer die Zusammenfassung des Doppel-Attributes Underline
|
||||
// und WordLineMode als TextItems. OutAttr() ruft die Ausgabefunktion,
|
||||
// die dann ueber HasItem() nach anderen Items an der
|
||||
// Attribut-Anfangposition fragen kann.
|
||||
// Es koennen nur Attribute mit Ende abgefragt werden.
|
||||
// Es wird mit bDeep gesucht
|
||||
//HasItem is for the summary of the double attributes: Underline and WordlineMode as TextItems.
|
||||
// OutAttr () calls the output function, which can call HasItem() for other items at the attribute's start position.
|
||||
// Only attributes with end can be queried.
|
||||
// It searches with bDeep
|
||||
const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const
|
||||
{
|
||||
const SfxPoolItem* pRet = 0;
|
||||
@@ -599,15 +596,15 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const
|
||||
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
|
||||
const SfxPoolItem* pItem = &pHt->GetAttr();
|
||||
const xub_StrLen* pAtrEnd = 0;
|
||||
if( 0 != ( pAtrEnd = pHt->GetEnd() ) && // nur Attr mit Ende
|
||||
nWhich == pItem->Which() && //
|
||||
if( 0 != ( pAtrEnd = pHt->GetEnd() ) && // only Attr with an end
|
||||
nWhich == pItem->Which() &&
|
||||
nTmpSwPos >= *pHt->GetStart() && nTmpSwPos < *pAtrEnd )
|
||||
{
|
||||
pRet = pItem; // gefunden
|
||||
pRet = pItem; // found it
|
||||
break;
|
||||
}
|
||||
else if (nTmpSwPos < *pHt->GetStart())
|
||||
break; // dann kommt da nichts mehr
|
||||
break; // nothing more to come
|
||||
}
|
||||
}
|
||||
return pRet;
|
||||
@@ -856,7 +853,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
|
||||
sal_uLong nDataStt = m_rWW8Export.pDataStrm->Tell();
|
||||
m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell() );
|
||||
|
||||
// WinWord 2000 doesn't write this - so its a temp solution by W97 ?
|
||||
// WinWord 2000 doesn't write this - so its a temp solution by W97 ?
|
||||
m_rWW8Export.WriteChar( 0x01 );
|
||||
|
||||
static sal_uInt8 aArr1[] = {
|
||||
@@ -974,7 +971,6 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
|
||||
// an write some data to the data stream, but dont ask
|
||||
// what the data mean, except for the URL.
|
||||
// The First piece is the WW8_PIC structure.
|
||||
//
|
||||
static sal_uInt8 MAGIC_B[] = {
|
||||
0xE0,0xC9,0xEA,0x79,0xF9,0xBA,0xCE,0x11,
|
||||
0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B
|
||||
@@ -1177,7 +1173,7 @@ int SwWW8AttrIter::OutAttrWithRange(xub_StrLen nPos)
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_rExport.m_aCurrentCharPropStarts.pop(); // HasTextItem nur in dem obigen Bereich erlaubt
|
||||
m_rExport.m_aCurrentCharPropStarts.pop(); // HasTextItem only allowed in the above range
|
||||
}
|
||||
return nRet;
|
||||
}
|
||||
@@ -1811,8 +1807,8 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
|
||||
nNextAttr = nEnd;
|
||||
|
||||
aAttrIter.OutFlys( nAktPos );
|
||||
//Append bookmarks in this range after flys, exclusive of final
|
||||
//position of this range
|
||||
// Append bookmarks in this range after flys, exclusive of final
|
||||
// position of this range
|
||||
AppendBookmarks( rNode, nAktPos, nNextAttr - nAktPos );
|
||||
bool bTxtAtr = aAttrIter.IsTxtAttr( nAktPos );
|
||||
nOpenAttrWithRange += aAttrIter.OutAttrWithRange(nAktPos);
|
||||
@@ -2376,9 +2372,8 @@ void WW8AttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeIn
|
||||
++aIt;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// Tabellen
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// Tables
|
||||
|
||||
void WW8AttributeOutput::EmptyParagraph()
|
||||
{
|
||||
@@ -2430,9 +2425,9 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode )
|
||||
const SwNode& rNd = aIdx.GetNode();
|
||||
if ( !rNd.IsSectionNode() && !IsInTable() ) //No sections in table
|
||||
{
|
||||
// Bug 74245 - if the first Node inside the section has an own
|
||||
// PageDesc or PageBreak attribut, then dont write
|
||||
// here the section break
|
||||
// if the first Node inside the section has an own
|
||||
// PageDesc or PageBreak attribut, then dont write
|
||||
// here the section break
|
||||
sal_uLong nRstLnNum = 0;
|
||||
const SfxItemSet* pSet;
|
||||
if ( rNd.IsTableNode() )
|
||||
@@ -2456,7 +2451,7 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode )
|
||||
const SwSectionFmt& rFmt = *rSection.GetFmt();
|
||||
ReplaceCr( msword::PageBreak ); // Indikator fuer Page/Section-Break
|
||||
|
||||
//Get the page in use at the top of this section
|
||||
// Get the page in use at the top of this section
|
||||
SwNodeIndex aIdxTmp(rSectionNode, 1);
|
||||
const SwPageDesc *pCurrent =
|
||||
SwPageDesc::GetPageDescOfNode(aIdxTmp.GetNode());
|
||||
@@ -2476,10 +2471,7 @@ void WW8Export::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt*
|
||||
pSepx->AppendSep(Fc2Cp(Strm().Tell()), pPageDesc, pFmt, nLnNum);
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Flys
|
||||
//---------------------------------------------------------------------------
|
||||
// Flys
|
||||
|
||||
void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd )
|
||||
{
|
||||
@@ -2494,7 +2486,7 @@ void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd )
|
||||
const SwTxtAttr* pAttr = (*pTxtAttrs)[ n ];
|
||||
if( RES_TXTATR_FLYCNT == pAttr->Which() )
|
||||
{
|
||||
// zeichengebundenes Attribut
|
||||
// attribute bound to a character
|
||||
const SwFmtFlyCnt& rFlyCntnt = pAttr->GetFlyCnt();
|
||||
const SwFlyFrmFmt& rFlyFrmFmt = *(SwFlyFrmFmt*)rFlyCntnt.GetFrmFmt();
|
||||
const SwNodeIndex* pNodeIndex = rFlyFrmFmt.GetCntnt().GetCntntIdx();
|
||||
@@ -2507,21 +2499,21 @@ void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd )
|
||||
if( (nStt < nEnd) && !pDoc->GetNodes()[ nStt ]->IsNoTxtNode() )
|
||||
{
|
||||
Point aOffset;
|
||||
// Rechtecke des Flys und des Absatzes besorgen
|
||||
// get rectangle (bounding box?) of Fly and paragraph
|
||||
SwRect aParentRect(rNd.FindLayoutRect(false, &aOffset)),
|
||||
aFlyRect(rFlyFrmFmt.FindLayoutRect(false, &aOffset ) );
|
||||
|
||||
aOffset = aFlyRect.Pos() - aParentRect.Pos();
|
||||
|
||||
// PaM umsetzen: auf Inhalt des Fly-Frameformats
|
||||
// let PaM point to content of Fly-frame format
|
||||
SaveData( nStt, nEnd );
|
||||
|
||||
// wird in OutputFormat() ausgewertet
|
||||
// is analysed in OutputFormat()
|
||||
pFlyOffset = &aOffset;
|
||||
eNewAnchorType = rFlyFrmFmt.GetAnchor().GetAnchorId();
|
||||
sw::Frame aFrm(rFlyFrmFmt, SwPosition(rNd));
|
||||
mpParentFrame = &aFrm;
|
||||
// Ok, rausschreiben:
|
||||
// Ok, write it out:
|
||||
WriteText();
|
||||
|
||||
RestoreData();
|
||||
@@ -2574,7 +2566,7 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
|
||||
sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
|
||||
sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
|
||||
|
||||
if( nStt >= nEnd ) // kein Bereich, also kein gueltiger Node
|
||||
if( nStt >= nEnd ) // no range, hence no valid node
|
||||
return;
|
||||
|
||||
if ( !m_rWW8Export.IsInTable() && rFmt.IsInline() )
|
||||
@@ -2610,10 +2602,9 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
|
||||
!m_rWW8Export.pDoc->GetNodes()[ nStt ]->IsNoTxtNode()
|
||||
)
|
||||
{
|
||||
// Beachten: Flag bOutTable wieder setzen,
|
||||
// denn wir geben ja ganz normalen Content der
|
||||
// Tabelenzelle aus und keinen Rahmen
|
||||
// (Flag wurde oben in aSaveData() geloescht)
|
||||
// note: set Flag bOutTable again,
|
||||
// because we deliver the normal content of the table cell, and no border
|
||||
// ( Flag was deleted above in aSaveData() )
|
||||
m_rWW8Export.bOutTable = true;
|
||||
const String& rName = rFrmFmt.GetName();
|
||||
m_rWW8Export.StartCommentOutput(rName);
|
||||
|
@@ -64,7 +64,7 @@ sal_uInt16 MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, sal_uInt8
|
||||
|
||||
nNumId = GetId( *pMyNumRule );
|
||||
|
||||
//Map the old list to our new list
|
||||
// Map the old list to our new list
|
||||
aRuleDuplicates[GetId( *pRule )] = nNumId;
|
||||
|
||||
return nNumId;
|
||||
@@ -94,7 +94,7 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule )
|
||||
|
||||
if ( !bOutlineRuleAdded )
|
||||
{
|
||||
// jetzt noch die OutlineRule einfuegen
|
||||
// still need to paste the OutlineRule
|
||||
SwNumRule* pR = (SwNumRule*)pDoc->GetOutlineNumRule();
|
||||
pUsedNumTbl->push_back( pR );
|
||||
}
|
||||
@@ -102,7 +102,7 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule )
|
||||
SwNumRule* p = (SwNumRule*)&rNumRule;
|
||||
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
|
||||
::std::map<sal_uInt16,sal_uInt16>::const_iterator aResult = aRuleDuplicates.end();
|
||||
do {
|
||||
@@ -116,8 +116,8 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule )
|
||||
return nRet;
|
||||
}
|
||||
|
||||
//GetFirstLineOffset should problem never appear unadorned apart from
|
||||
//here in the ww export filter
|
||||
// GetFirstLineOffset should problem never appear unadorned apart from
|
||||
// here in the ww export filter
|
||||
sal_Int16 GetWordFirstLineOffset(const SwNumFmt &rFmt)
|
||||
{
|
||||
OSL_ENSURE( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION,
|
||||
@@ -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 );
|
||||
|
||||
// mit keinen Styles verbunden
|
||||
// not associated with a Style
|
||||
for ( int i = 0; i < WW8ListManager::nMaxLevel; ++i )
|
||||
SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 0xFFF );
|
||||
|
||||
@@ -594,7 +594,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
|
||||
{
|
||||
ByteToSVBT8(11, rAnlv.nfc);
|
||||
|
||||
sal_uInt8 nb = 0; // Zahlentyp
|
||||
sal_uInt8 nb = 0; // type of number
|
||||
switch (rFmt.GetNumAdjust())
|
||||
{
|
||||
case SVX_ADJUST_RIGHT:
|
||||
@@ -793,7 +793,7 @@ void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
|
||||
sal_uInt8 aSprmAnld[54];
|
||||
|
||||
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_uInt16 nCharLen = 31;
|
||||
@@ -803,12 +803,12 @@ void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
|
||||
else
|
||||
BuildAnlvBase( pA->eAnlv, pChars, nCharLen, rRul, rFmt, nSwLevel );
|
||||
|
||||
// ... und raus damit
|
||||
// ... spit it out
|
||||
OutSprmBytes( (sal_uInt8*)&aSprmAnld, sizeof( aSprmAnld ) );
|
||||
}
|
||||
|
||||
|
||||
// Return: ist es eine Gliederung ?
|
||||
// Return: is it an outline?
|
||||
bool WW8Export::Out_SwNum(const SwTxtNode* pNd)
|
||||
{
|
||||
int nLevel = pNd->GetActualListLevel();
|
||||
|
@@ -254,9 +254,8 @@ public:
|
||||
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
|
||||
{
|
||||
boost::ptr_vector<WW8_WrPc > aPcts;
|
||||
@@ -324,11 +323,11 @@ public:
|
||||
class DrawObj
|
||||
{
|
||||
public:
|
||||
WW8_CP mnCp; // CP-Pos der Verweise
|
||||
sal_uInt32 mnShapeId; // ShapeId for the SwFrmFmts
|
||||
WW8_CP mnCp; // CP-Pos of references
|
||||
sal_uInt32 mnShapeId; // ShapeId for the SwFrmFmts
|
||||
sw::Frame maCntnt; // the frame itself
|
||||
Point maParentPos; // Points
|
||||
sal_Int32 mnThick; // Border Thicknesses
|
||||
sal_Int32 mnThick; // Border Thicknesses
|
||||
short mnDirection; // If BiDi or not
|
||||
unsigned int mnHdFtIndex; // 0 for main text, +1 for each subsequent
|
||||
// msword hd/ft
|
||||
@@ -484,18 +483,18 @@ public:
|
||||
WW8_WrPlcAnnotations* pAtn;
|
||||
WW8_WrPlcTxtBoxes *pTxtBxs, *pHFTxtBxs;
|
||||
|
||||
const sw::Frame *mpParentFrame; //If set we are exporting content inside
|
||||
//a frame, e.g. a graphic node
|
||||
const sw::Frame *mpParentFrame; // If set we are exporting content inside
|
||||
// a frame, e.g. a graphic node
|
||||
|
||||
Point* pFlyOffset; // zur Justierung eines im Writer als
|
||||
RndStdIds eNewAnchorType; // Zeichen gebundenen Flys, der im WW
|
||||
// Absatzgebunden wird.
|
||||
|
||||
WW8_WrPlcFld* pFldMain; // Felder im Haupttext
|
||||
WW8_WrPlcFld* pFldHdFt; // Felder in Header/Footer
|
||||
WW8_WrPlcFld* pFldFtn; // Felder in FootNotes
|
||||
WW8_WrPlcFld* pFldEdn; // Felder in EndNotes
|
||||
WW8_WrPlcFld* pFldAtn; // Felder in Annotations
|
||||
WW8_WrPlcFld* pFldMain; // fields in MainText
|
||||
WW8_WrPlcFld* pFldHdFt; // fields in Header/Footer
|
||||
WW8_WrPlcFld* pFldFtn; // fields in FootNotes
|
||||
WW8_WrPlcFld* pFldEdn; // fields in EndNotes
|
||||
WW8_WrPlcFld* pFldAtn; // fields in Annotations
|
||||
WW8_WrPlcFld* pFldTxtBxs; // fields in textboxes
|
||||
WW8_WrPlcFld* pFldHFTxtBxs; // fields in header/footer textboxes
|
||||
WW8_WrMagicTable *pMagicTable; // keeps track of table cell positions, and
|
||||
@@ -503,7 +502,7 @@ public:
|
||||
// which is required to make word display
|
||||
// graphics inside tables
|
||||
SwWW8WrGrf* pGrf;
|
||||
const SwAttrSet* pStyAttr; // StyleAttr fuer Tabulatoren
|
||||
const SwAttrSet* pStyAttr; // StyleAttr for Tabs
|
||||
const SwModify* pOutFmtNode; // write Format or Node
|
||||
const SwFmt *pCurrentStyle; // iff bStyDef=true, then this store the current style
|
||||
|
||||
@@ -516,15 +515,15 @@ public:
|
||||
|
||||
sal_uInt8 nTxtTyp;
|
||||
|
||||
sal_uInt8 bStyDef : 1; // wird Style geschrieben ?
|
||||
sal_uInt8 bBreakBefore : 1; // Breaks werden 2mal ausgegeben
|
||||
sal_uInt8 bOutKF : 1; // Kopf/Fusstexte werden ausgegeben
|
||||
sal_uInt8 bOutFlyFrmAttrs : 1; // Rahmen-Attr von Flys werden ausgegeben
|
||||
sal_uInt8 bStyDef : 1; // should Style be written?
|
||||
sal_uInt8 bBreakBefore : 1; // Breaks are being written 2 times
|
||||
sal_uInt8 bOutKF : 1; // Header/Footer texts are being written
|
||||
sal_uInt8 bOutFlyFrmAttrs : 1; // Frame-attr of Flys are being written
|
||||
sal_uInt8 bOutPageDescs : 1; ///< PageDescs (section properties) are being written
|
||||
sal_uInt8 bOutFirstPage : 1; // write Attrset of FirstPageDesc
|
||||
sal_uInt8 bOutTable : 1; // Tabelle wird ausgegeben
|
||||
// ( wird zB bei Flys in Tabelle zurueckgesetzt )
|
||||
sal_uInt8 bOutGrf : 1; // Grafik wird ausgegeben
|
||||
sal_uInt8 bOutTable : 1; // table is being written
|
||||
// ( wird zB bei Flys in Tabelle zurueckgesetzt )
|
||||
sal_uInt8 bOutGrf : 1; // graphics are being written
|
||||
sal_uInt8 bInWriteEscher : 1; // in write textboxes
|
||||
sal_uInt8 bStartTOX : 1; // true: a TOX is startet
|
||||
sal_uInt8 bInWriteTOX : 1; // true: all content are in a TOX
|
||||
@@ -1016,7 +1015,7 @@ public:
|
||||
|
||||
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 )
|
||||
{ pO->insert( pO->end(), pBytes, pBytes+nSiz ); }
|
||||
@@ -1125,16 +1124,16 @@ private:
|
||||
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:
|
||||
//No copying
|
||||
// No copying
|
||||
WW8_WrPlcSubDoc(const WW8_WrPlcSubDoc&);
|
||||
WW8_WrPlcSubDoc& operator=(const WW8_WrPlcSubDoc&);
|
||||
protected:
|
||||
std::vector<WW8_CP> aCps;
|
||||
std::vector<const void*> aCntnt; // PTRARR von SwFmtFtn/PostIts/..
|
||||
WW8_WrPlc0* pTxtPos; // Pos der einzelnen Texte
|
||||
std::vector<const void*> aCntnt; // PTRARR of SwFmtFtn/PostIts/..
|
||||
WW8_WrPlc0* pTxtPos; // positions of the individual texts
|
||||
|
||||
WW8_WrPlcSubDoc();
|
||||
virtual ~WW8_WrPlcSubDoc();
|
||||
@@ -1146,13 +1145,13 @@ protected:
|
||||
virtual const std::vector<sal_uInt32>* GetShapeIdArr() const;
|
||||
};
|
||||
|
||||
// Doppel-Plc fuer Footnotes/Endnotes
|
||||
// double Plc for Footnotes/Endnotes
|
||||
class WW8_WrPlcFtnEdn : public WW8_WrPlcSubDoc
|
||||
{
|
||||
private:
|
||||
sal_uInt8 nTyp;
|
||||
|
||||
//No copying
|
||||
// No copying
|
||||
WW8_WrPlcFtnEdn(const WW8_WrPlcFtnEdn&);
|
||||
WW8_WrPlcFtnEdn& operator=(WW8_WrPlcFtnEdn &);
|
||||
public:
|
||||
@@ -1174,7 +1173,7 @@ struct WW8_Annotation
|
||||
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:
|
||||
//No copying
|
||||
@@ -1192,8 +1191,8 @@ public:
|
||||
void WritePlc( WW8Export& rWrt ) const;
|
||||
};
|
||||
|
||||
class WW8_WrPlcTxtBoxes : public WW8_WrPlcSubDoc // Doppel-Plc fuer Textboxen
|
||||
{ // Rahmen/DrawTextboxes!
|
||||
class WW8_WrPlcTxtBoxes : public WW8_WrPlcSubDoc // double Plc for Textboxes
|
||||
{ // Frame/DrawTextboxes!
|
||||
private:
|
||||
sal_uInt8 nTyp;
|
||||
std::vector<sal_uInt32> aShapeIds; // VARARR of ShapeIds for the SwFrmFmts
|
||||
@@ -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;
|
||||
|
||||
class WW8_WrPlcPn // Plc fuer Page Numbers
|
||||
class WW8_WrPlcPn // Plc for Page Numbers
|
||||
{
|
||||
private:
|
||||
WW8Export& rWrt;
|
||||
WW8_WrFkpPtrs aFkps; // PTRARR
|
||||
sal_uInt16 nFkpStartPage;
|
||||
ePLCFT ePlc;
|
||||
bool bWrtWW8; // Fuer Writererkennung
|
||||
bool bWrtWW8; // for writer detection
|
||||
sal_uInt16 nMark;
|
||||
|
||||
//No copying
|
||||
@@ -1242,12 +1241,12 @@ public:
|
||||
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
|
||||
{
|
||||
private:
|
||||
std::vector<WW8_CP> aPos;
|
||||
sal_uInt8* pData; // Inhalte ( Strukturen )
|
||||
sal_uInt8* pData; // content ( structures )
|
||||
sal_uLong nDataLen;
|
||||
sal_uInt16 nStructSiz;
|
||||
|
||||
@@ -1265,7 +1264,7 @@ public:
|
||||
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
|
||||
{
|
||||
private:
|
||||
@@ -1299,10 +1298,10 @@ public:
|
||||
class GraphicDetails
|
||||
{
|
||||
public:
|
||||
sw::Frame maFly; // Umgebende FlyFrms dazu
|
||||
sal_uLong mnPos; // FilePos der Grafiken
|
||||
sal_uInt16 mnWid; // Breite der Grafiken
|
||||
sal_uInt16 mnHei; // Hoehe der Grafiken
|
||||
sw::Frame maFly; // surrounding FlyFrms
|
||||
sal_uLong mnPos; // FilePos of the graphics
|
||||
sal_uInt16 mnWid; // Width of the graphics
|
||||
sal_uInt16 mnHei; // Height of the graphics
|
||||
|
||||
GraphicDetails(const sw::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei)
|
||||
: maFly(rFly), mnPos(0), mnWid(nWid), mnHei(nHei)
|
||||
@@ -1318,7 +1317,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// class SwWW8WrGrf sammelt Grafiken und gibt sie aus
|
||||
// class SwWW8WrGrf collects graphics and issues them
|
||||
class SwWW8WrGrf
|
||||
{
|
||||
private:
|
||||
@@ -1410,9 +1409,8 @@ public:
|
||||
rtl_TextEncoding GetNodeCharSet() const { return eNdChrSet; }
|
||||
};
|
||||
|
||||
// Die Klasse SwWW8AttrIter ist eine Hilfe zum Aufbauen der Fkp.chpx.
|
||||
// Dabei werden nur Zeichen-Attribute beachtet; Absatz-Attribute brauchen
|
||||
// diese Behandlung nicht.
|
||||
// class SwWW8AttrIter is a helper for constructing the Fkp.chpx.
|
||||
// Only character attributes are considered; paragraph attributes do not need this treatment.
|
||||
// Die Absatz- und Textattribute des Writers kommen rein, und es wird
|
||||
// mit Where() die naechste Position geliefert, an der sich die Attribute
|
||||
// aendern. IsTxtAtr() sagt, ob sich an der mit Where() gelieferten Position
|
||||
@@ -1523,7 +1521,7 @@ public:
|
||||
};
|
||||
|
||||
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 BookmarkToWord(const String &rBookmark);
|
||||
|
||||
|
@@ -71,10 +71,10 @@
|
||||
using namespace ::com::sun::star;
|
||||
using namespace nsFieldFlags;
|
||||
|
||||
// ToDo:
|
||||
// 5. Die MapModes, die Win nicht kann, umrechnen
|
||||
// TODO:
|
||||
// 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
|
||||
// in der Graf-Klasse der GrfNode-Ptr gemerkt ( fuers spaetere Ausgeben der
|
||||
// Grafiken und Patchen der PicLocFc-Attribute )
|
||||
@@ -381,7 +381,7 @@ void WW8Export::OutputLinkedOLE( const rtl::OUString& rOleId )
|
||||
|
||||
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);
|
||||
|
||||
pChpPlc->AppendFkpEntry( Strm().Tell(), pO->size(), pO->data() );
|
||||
@@ -409,7 +409,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
|
||||
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* pArr = aArr;
|
||||
@@ -465,8 +465,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
|
||||
}
|
||||
Set_UInt32( pArr, GRF_MAGIC_321 );
|
||||
|
||||
// Magic variieren, damit verschiedene Grafik-Attribute nicht
|
||||
// gemerged werden
|
||||
// vary Magic, so that different graphic attributes will not be merged
|
||||
static sal_uInt8 nAttrMagicIdx = 0;
|
||||
--pArr;
|
||||
Set_UInt8( pArr, nAttrMagicIdx++ );
|
||||
@@ -480,7 +479,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
|
||||
( ((eAn == FLY_AT_PARA) && ( bWrtWW8 || !IsInTable() )) ||
|
||||
(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 };
|
||||
pO->insert( pO->end(), nSty, nSty+2 ); // Style #0
|
||||
@@ -524,7 +523,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
|
||||
sal_Int16 nXSizeAdd = 0, nYSizeAdd = 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;
|
||||
if (pAttrSet && (SFX_ITEM_ON
|
||||
== pAttrSet->GetItemState(RES_GRFATR_CROPGRF, false, &pItem)))
|
||||
@@ -544,7 +543,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
|
||||
|
||||
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();
|
||||
if (SFX_ITEM_ON == rAttrSet.GetItemState(RES_BOX, false, &pItem))
|
||||
@@ -573,8 +572,8 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
|
||||
pBox->GetDistance( aLnArr[ i ] ), bShadow );
|
||||
}
|
||||
|
||||
//use importer logic to determine how large the exported
|
||||
//border will really be in word and adjust accordingly
|
||||
// use importer logic to determine how large the exported
|
||||
// border will really be in word and adjust accordingly
|
||||
short nSpacing;
|
||||
short nThick = aBrc.DetermineBorderProperties(!bWrtWW8,
|
||||
&nSpacing);
|
||||
@@ -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, mm ); // set mm
|
||||
@@ -666,11 +665,11 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
|
||||
|
||||
WritePICFHeader(rStrm, rFly, mm, nWidth, nHeight,
|
||||
rGrfNd.GetpSwAttrSet());
|
||||
rStrm << (sal_uInt8)aFileN.Len(); // Pascal-String schreiben
|
||||
rStrm << (sal_uInt8)aFileN.Len(); // write Pascal-String
|
||||
SwWW8Writer::WriteString8(rStrm, aFileN, false,
|
||||
RTL_TEXTENCODING_MS_1252);
|
||||
}
|
||||
else // Embedded File oder DDE oder so was
|
||||
else // Embedded File or DDE or something like that
|
||||
{
|
||||
if (rWrt.bWrtWW8)
|
||||
{
|
||||
@@ -690,7 +689,7 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
|
||||
GDIMetaFile aMeta;
|
||||
switch (rGrf.GetType())
|
||||
{
|
||||
case GRAPHIC_BITMAP: // Bitmap -> in Metafile abspielen
|
||||
case GRAPHIC_BITMAP: // Bitmap -> play in Metafile
|
||||
{
|
||||
VirtualDevice aVirt;
|
||||
aMeta.Record(&aVirt);
|
||||
@@ -722,7 +721,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
|
||||
{
|
||||
sal_uInt16 nWidth = rItem.mnWid;
|
||||
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;
|
||||
switch (rFly.GetWriterType())
|
||||
@@ -836,28 +835,27 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
|
||||
break;
|
||||
}
|
||||
|
||||
sal_uInt32 nPos2 = rStrm.Tell(); // Ende merken
|
||||
sal_uInt32 nPos2 = rStrm.Tell(); // store the end
|
||||
rStrm.Seek( nPos );
|
||||
SVBT32 nLen;
|
||||
UInt32ToSVBT32( nPos2 - nPos, nLen ); // Grafik-Laenge ausrechnen
|
||||
rStrm.Write( nLen, 4 ); // im Header einpatchen
|
||||
rStrm.Seek( nPos2 ); // Pos wiederherstellen
|
||||
UInt32ToSVBT32( nPos2 - nPos, nLen ); // calculate graphic length
|
||||
rStrm.Write( nLen, 4 ); // patch it in the header
|
||||
rStrm.Seek( nPos2 ); // restore Pos
|
||||
}
|
||||
|
||||
// SwWW8WrGrf::Write() wird nach dem Text gerufen. Es schreibt die alle
|
||||
// Grafiken raus und merkt sich die File-Positionen der Grafiken, damit
|
||||
// beim Schreiben der Attribute die Positionen in die PicLocFc-Sprms
|
||||
// eingepatcht werden koennen.
|
||||
// Das Suchen in den Attributen nach dem Magic sal_uLong und das Patchen
|
||||
// passiert beim Schreiben der Attribute. Die SwWW8WrGrf-Klasse liefert
|
||||
// hierfuer nur mit GetFPos() sequentiell die Positionen.
|
||||
// SwWW8WrGrf::Write() is called after the text.
|
||||
// It writes out all the graphics and remembers the file locations of the graphics,
|
||||
// so when writing the attributes of the items it can be patched into PicLocFc-SPRMs.
|
||||
// The search in the attributes for the Magic sal_uLong and patching
|
||||
// happens when writing the attributes. Class SwWW8WrGrf-Klasse provides with
|
||||
// GetFPos() sequentially the positions
|
||||
void SwWW8WrGrf::Write()
|
||||
{
|
||||
SvStream& rStrm = *rWrt.pDataStrm;
|
||||
myiter aEnd = maDetails.end();
|
||||
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 )
|
||||
SwWW8Writer::FillCount( rStrm, 4 - ( nPos & 0x3 ) );
|
||||
|
||||
|
Reference in New Issue
Block a user