diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-11-03 12:03:52 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-11-03 12:03:52 +0000 |
commit | de0d4a6792df519c08f825db4971070d471a1993 (patch) | |
tree | 51d23533d72e4d629a16d18c87549e85dd14c870 | |
parent | 2de41c091cabf245f3759908418e82e27aca477f (diff) |
CWS-TOOLING: integrate CWS sw32bf06
2009-10-20 16:10:25 +0200 mst r277059 : #i106033#: SwTOXBaseSection::_UpdatePageNum(): force expansion of hyperlink
2009-10-20 14:44:10 +0200 od r277054 : #i106057# method <WW8Export::WriterFkpPlcUsw()>
- assure that external data for SttbfAssoc and Fib exist before accessing it.
-rw-r--r-- | sw/source/core/doc/doctxm.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 202 |
2 files changed, 109 insertions, 97 deletions
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 57ce88fec8..a117df7d1c 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -2220,7 +2220,9 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd, } } pNd->InsertText( aNumStr, aPos, - IDocumentContentOperations::INS_EMPTYEXPAND ); + static_cast<IDocumentContentOperations::InsertFlags>( + IDocumentContentOperations::INS_EMPTYEXPAND | + IDocumentContentOperations::INS_FORCEHINTEXPAND) ); if(pPageNoCharFmt) { SwFmtCharFmt aCharFmt( pPageNoCharFmt ); diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index f945c0ad62..2f96191513 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -1606,7 +1606,7 @@ void SwWW8Writer::WriteString_xstz(SvStream& rStrm, const String& rStr, bool bAd ww::bytes aBytes; SwWW8Writer::InsUInt16(aBytes, rStr.Len()); SwWW8Writer::InsAsString16(aBytes, rStr); - if (bAddZero) + if (bAddZero) SwWW8Writer::InsUInt16(aBytes, 0); rStrm.Write(&aBytes[0], aBytes.size()); } @@ -1694,7 +1694,7 @@ void WW8Export::OutSwString(const String& rStr, xub_StrLen nStt, if( nStt || nLen != rStr.Len() ) { String sOut( rStr.Copy( nStt, nLen ) ); - + #ifdef DEBUG ::std::clog << ::rtl::OUStringToOString(sOut, RTL_TEXTENCODING_ASCII_US).getStr() << ::std::endl; #endif @@ -1704,7 +1704,7 @@ void WW8Export::OutSwString(const String& rStr, xub_StrLen nStt, else SwWW8Writer::WriteString8(Strm(), sOut, false, eChrSet); } - else + else { #ifdef DEBUG ::std::clog << ::rtl::OUStringToOString(rStr, RTL_TEXTENCODING_ASCII_US).getStr() << ::std::endl; @@ -1716,9 +1716,9 @@ void WW8Export::OutSwString(const String& rStr, xub_StrLen nStt, SwWW8Writer::WriteString8(Strm(), rStr, false, eChrSet); } } - + #ifdef DEBUG - ::std::clog << "</OutSwString>" << ::std::endl; + ::std::clog << "</OutSwString>" << ::std::endl; #endif } @@ -1728,7 +1728,7 @@ void WW8Export::WriteCR(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo WriteChar('\007'); else WriteChar( '\015' ); - + pPiece->SetParaBreak(); } @@ -1860,12 +1860,12 @@ void WW8AttributeOutput::TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pT if ( nDepth > 0 ) { - /* Cell */ + /* Cell */ m_rWW8Export.InsUInt16( NS_sprm::LN_PFInTable ); m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() ); m_rWW8Export.InsUInt16( NS_sprm::LN_PTableDepth ); m_rWW8Export.InsUInt32( nDepth ); - + if ( nDepth > 1 && pTableTextNodeInfoInner->isEndOfCell() ) { m_rWW8Export.InsUInt16( NS_sprm::LN_PCell ); @@ -1945,15 +1945,15 @@ static sal_uInt16 lcl_TCFlags(const SwTableBox * pBox) void WW8AttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); - const SwTableLine * pTabLine = pTabBox->GetUpper(); + const SwTableLine * pTabLine = pTabBox->GetUpper(); const SwTableBoxes & rTblBoxes = pTabLine->GetTabBoxes(); - + sal_uInt8 nBoxes = rTblBoxes.Count(); for ( sal_uInt8 n = 0; n < nBoxes; n++ ) { const SwTableBox * pTabBox1 = rTblBoxes[n]; const SwFrmFmt * pFrmFmt = pTabBox1->GetFrmFmt(); - + if ( FRMDIR_VERT_TOP_RIGHT == m_rWW8Export.TrueFrameDirection( *pFrmFmt ) ) { m_rWW8Export.InsUInt16( NS_sprm::LN_TTextFlow ); @@ -1967,7 +1967,7 @@ void WW8AttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_ void WW8AttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); - const SwTableLine * pTabLine = pTabBox->GetUpper(); + const SwTableLine * pTabLine = pTabBox->GetUpper(); const SwFrmFmt * pLineFmt = pTabLine->GetFrmFmt(); /* @@ -1975,7 +1975,7 @@ void WW8AttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pT feature equivalent to this, Word stores 1 for fCantSplit if the row cannot be split, we set true if we can split it. An example is #i4569# */ - + const SwFmtRowSplit& rSplittable = pLineFmt->GetRowSplit(); BYTE nCantSplit = (!rSplittable.GetValue()) ? 1 : 0; if ( m_rWW8Export.bWrtWW8 ) @@ -1995,7 +1995,7 @@ void WW8AttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTable { const SwTable * pTable = pTableTextNodeInfoInner->getTable(); const SwFrmFmt * pFrmFmt = pTable->GetFrmFmt(); - + if ( m_rWW8Export.bWrtWW8 ) { if ( m_rWW8Export.TrueFrameDirection(*pFrmFmt) == FRMDIR_HORI_RIGHT_TOP ) @@ -2009,10 +2009,10 @@ void WW8AttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTable void WW8AttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); - const SwTableLine * pTabLine = pTabBox->GetUpper(); + const SwTableLine * pTabLine = pTabBox->GetUpper(); const SwFrmFmt * pLineFmt = pTabLine->GetFrmFmt(); -#if 0 +#if 0 const SwTable * pTable = pTableTextNodeInfo->getTable(); bool bNewTableModel = pTable->IsNewModel(); bool bFixRowHeight = false; @@ -2020,7 +2020,7 @@ void WW8AttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTab if (! bNewModel) { sal_uInt32 nBoxes = rTabBoxes.Count(); - + for (sal_uInt32 n = 0; n < nBoxes; n++) { SwTableBox * pBox1 = rTabBoxes[n]; @@ -2052,21 +2052,21 @@ void WW8AttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTab m_rWW8Export.pO->Insert( 189, m_rWW8Export.pO->Count() ); m_rWW8Export.InsUInt16( (USHORT)nHeight ); } - + } void WW8AttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { const SwTable * pTable = pTableTextNodeInfoInner->getTable(); - + const SwFrmFmt *pFmt = pTable->GetFrmFmt(); ASSERT(pFmt,"Impossible"); if (!pFmt) return; - + const SwFmtHoriOrient &rHori = pFmt->GetHoriOrient(); const SwFmtVertOrient &rVert = pFmt->GetVertOrient(); - + if ( (text::RelOrientation::PRINT_AREA == rHori.GetRelationOrient() || text::RelOrientation::FRAME == rHori.GetRelationOrient()) @@ -2098,7 +2098,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t const SwTableLine * pTabLine = pTabBox->GetUpper(); const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes(); const SwTable * pTable = pTableTextNodeInfoInner->getTable(); - + if ( pTable->GetRowsToRepeat() > pTableTextNodeInfoInner->getRow() ) { if( m_rWW8Export.bWrtWW8 ) @@ -2112,7 +2112,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t sal_uInt32 nBoxes = rTabBoxes.Count(); if ( nBoxes > 32 ) nBoxes = 32; - + // sprm header m_rWW8Export.InsUInt16( NS_sprm::LN_TDefTable ); sal_uInt16 nSprmSize = 2 + (nBoxes + 1) * 2 + nBoxes * 20; @@ -2121,7 +2121,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t // number of boxes m_rWW8Export.pO->Insert( static_cast<BYTE>(nBoxes), m_rWW8Export.pO->Count() ); - /* cellxs */ + /* cellxs */ /* ALWAYS relative when text::HoriOrientation::NONE (nPageSize + ( nPageSize / 10 )) < nTblSz, in that case the cell width's and table width's are not real. The table @@ -2136,9 +2136,9 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t const SwFmtHoriOrient &rHori = pFmt->GetHoriOrient(); const SwFmtVertOrient &rVert = pFmt->GetVertOrient(); - + sal_uInt16 nTblOffset = 0; - + if ( (text::RelOrientation::PRINT_AREA == rHori.GetRelationOrient() || text::RelOrientation::FRAME == rHori.GetRelationOrient()) @@ -2161,36 +2161,36 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t break; } } - + sal_uInt32 n = 0; - m_rWW8Export.InsUInt16( nTblOffset ); - + m_rWW8Export.InsUInt16( nTblOffset ); + std::vector<SwTwips> gridCols = GetGridCols( pTableTextNodeInfoInner ); for ( std::vector<SwTwips>::const_iterator it = gridCols.begin(), end = gridCols.end(); it != end; ++it ) { m_rWW8Export.InsUInt16( static_cast<USHORT>( *it ) + nTblOffset ); } - + /* TCs */ for ( n = 0; n < nBoxes; n++ ) { #ifdef DEBUG sal_uInt16 npOCount = m_rWW8Export.pO->Count(); #endif - + SwTableBox * pTabBox1 = rTabBoxes[n]; const SwFrmFmt & rBoxFmt = *(pTabBox1->GetFrmFmt()); if ( m_rWW8Export.bWrtWW8 ) { - sal_uInt16 nFlags = lcl_TCFlags(pTabBox1); + sal_uInt16 nFlags = lcl_TCFlags(pTabBox1); m_rWW8Export.InsUInt16( nFlags ); } - + static BYTE aNullBytes[] = { 0x0, 0x0 }; - + m_rWW8Export.pO->Insert( aNullBytes, 2, m_rWW8Export.pO->Count() ); // dummy m_rWW8Export.Out_SwFmtTableBox( *m_rWW8Export.pO, rBoxFmt.GetBox() ); // 8/16 Byte - + #ifdef DEBUG ::std::clog << "<tclength>" << m_rWW8Export.pO->Count() - npOCount << "</tclength>" << ::std::endl; @@ -2206,7 +2206,7 @@ std::vector<SwTwips> AttributeOutputBase::GetGridCols( ww8::WW8TableNodeInfoInne const SwTableLine * pTabLine = pTabBox->GetUpper(); const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes(); const SwTable *pTable = pTableTextNodeInfoInner->getTable( ); - + // number of cell written sal_uInt32 nBoxes = rTabBoxes.Count(); if ( nBoxes > 32 ) @@ -2294,9 +2294,9 @@ void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner::Pointer_ const SvxLRSpaceItem &rLR = pFmt->GetLRSpace(); nPageSize -= (rLR.GetLeft() + rLR.GetRight()); } - + } - + ASSERT(nWidthPercent, "Impossible"); if (nWidthPercent) { @@ -2321,7 +2321,7 @@ void WW8AttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT }; - + for ( int i = 0; i < 4; ++i ) { SwWW8Writer::InsUInt16( *m_rWW8Export.pO, 0xD634 ); @@ -2330,7 +2330,7 @@ void WW8AttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe m_rWW8Export.pO->Insert( BYTE(1), m_rWW8Export.pO->Count() ); m_rWW8Export.pO->Insert( BYTE(1 << i), m_rWW8Export.pO->Count() ); m_rWW8Export.pO->Insert( BYTE(3), m_rWW8Export.pO->Count() ); - + SwWW8Writer::InsUInt16( *m_rWW8Export.pO, pFrmFmt->GetBox().GetDistance( aBorders[i] ) ); } @@ -2348,17 +2348,17 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t else m_rWW8Export.pO->Insert( (BYTE)191, m_rWW8Export.pO->Count() ); m_rWW8Export.pO->Insert( (BYTE)(nBoxes * 2), m_rWW8Export.pO->Count() ); // Len - + for ( sal_uInt8 n = 0; n < nBoxes; n++ ) { const SwTableBox * pBox1 = rTabBoxes[n]; const SwFrmFmt * pFrmFmt = pBox1->GetFrmFmt(); const SfxPoolItem * pI = NULL; Color aColor; - + if ( SFX_ITEM_ON == pFrmFmt->GetAttrSet().GetItemState( RES_BACKGROUND, false, &pI ) ) { - aColor = dynamic_cast<const SvxBrushItem *>(pI)->GetColor(); + aColor = dynamic_cast<const SvxBrushItem *>(pI)->GetColor(); } else aColor = COL_AUTO; @@ -2373,27 +2373,27 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t sal_uInt8 nBoxes0 = rTabBoxes.Count(); if (nBoxes0 > 21) nBoxes0 = 21; - + m_rWW8Export.InsUInt16( NS_sprm::LN_TCellShd ); m_rWW8Export.pO->Insert( static_cast<BYTE>(nBoxes0 * 10), m_rWW8Export.pO->Count() ); - + for ( sal_uInt8 n = 0; n < nBoxes0; n++ ) { const SwTableBox * pBox1 = rTabBoxes[n]; const SwFrmFmt * pFrmFmt = pBox1->GetFrmFmt(); const SfxPoolItem * pI = NULL; Color aColor; - + if ( SFX_ITEM_ON == pFrmFmt->GetAttrSet().GetItemState( RES_BACKGROUND, false, &pI ) ) { - aColor = dynamic_cast<const SvxBrushItem *>(pI)->GetColor(); + aColor = dynamic_cast<const SvxBrushItem *>(pI)->GetColor(); } else aColor = COL_AUTO; - + WW8SHDLong aSHD; aSHD.setCvFore( 0xFF000000 ); - + sal_uInt32 nBgColor = aColor.GetColor(); if ( nBgColor == COL_AUTO ) aSHD.setCvBack( 0xFF000000 ); @@ -2401,7 +2401,7 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t aSHD.setCvBack( wwUtility::RGBToBGR( nBgColor ) ); aSHD.Write( m_rWW8Export ); - } + } } } @@ -2490,16 +2490,16 @@ void MSWordExportBase::WriteText() SwNode * pCurrentNode = &pCurPam->GetPoint()->nNode.GetNode(); const SwNode * pNextNode = mpTableInfo->getNextNode(pCurrentNode); - + if (pNextNode != NULL) pCurPam->GetPoint()->nNode = SwNodeIndex(*pNextNode); else pCurPam->GetPoint()->nNode++; - + ULONG nPos = pCurPam->GetPoint()->nNode.GetIndex(); ::SetProgressState( nPos, pCurPam->GetDoc()->GetDocShell() ); } - + #ifdef DEBUG ::std::clog << "</WriteText>" << ::std::endl; #endif @@ -2664,19 +2664,24 @@ void WW8Export::WriteFkpPlcUsw() // Write SttbfAssoc WW8SttbAssoc * pSttbfAssoc = dynamic_cast<WW8SttbAssoc *> (pDoc->getExternalData(::sw::STTBF_ASSOC).get()); - ::std::vector<String> aStrings; - - ::ww8::StringVector_t & aSttbStrings = pSttbfAssoc->getStrings(); - ::ww8::StringVector_t::const_iterator aItEnd = aSttbStrings.end(); - for (::ww8::StringVector_t::const_iterator aIt = aSttbStrings.begin(); - aIt != aItEnd; aIt++) + // --> OD 2009-10-19 #i106057# + if ( pSttbfAssoc ) + // <-- { - String aStr(aIt->getStr()); - aStrings.push_back(aStr); - } + ::std::vector<String> aStrings; - WriteAsStringTable(aStrings, pFib->fcSttbfAssoc, - pFib->lcbSttbfAssoc); + ::ww8::StringVector_t & aSttbStrings = pSttbfAssoc->getStrings(); + ::ww8::StringVector_t::const_iterator aItEnd = aSttbStrings.end(); + for (::ww8::StringVector_t::const_iterator aIt = aSttbStrings.begin(); + aIt != aItEnd; aIt++) + { + String aStr(aIt->getStr()); + aStrings.push_back(aStr); + } + + WriteAsStringTable(aStrings, pFib->fcSttbfAssoc, + pFib->lcbSttbfAssoc); + } } Strm().Seek( 0 ); @@ -2684,11 +2689,16 @@ void WW8Export::WriteFkpPlcUsw() // Reclaim stored FIB data from document. ::ww8::WW8FibData * pFibData = dynamic_cast<ww8::WW8FibData *> (pDoc->getExternalData(::sw::FIB).get()); - - pFib->fReadOnlyRecommended = - pFibData->getReadOnlyRecommended() ? 1 : 0; - pFib->fWriteReservation = - pFibData->getWriteReservation() ? 1 : 0; + + // --> OD 2009-10-19 #i106057# + if ( pFibData ) + // <-- + { + pFib->fReadOnlyRecommended = + pFibData->getReadOnlyRecommended() ? 1 : 0; + pFib->fWriteReservation = + pFibData->getWriteReservation() ? 1 : 0; + } pFib->Write( Strm() ); // FIB } @@ -2828,7 +2838,7 @@ namespace rCtx.Encode(in, nBS, in, nBS); rOut.Write(in, nBS); } - } + } } void MSWordExportBase::ExportDocument( bool bWriteAll ) @@ -3033,12 +3043,12 @@ void WW8Export::ExportDocument_Impl() StoreDoc1(); if ( bEncrypt ) - { + { // Generate random number with a seed of time as salt. TimeValue aTime; osl_getSystemTime( &aTime ); rtlRandomPool aRandomPool = rtl_random_createPool (); - rtl_random_addBytes ( aRandomPool, &aTime, 8 ); + rtl_random_addBytes ( aRandomPool, &aTime, 8 ); sal_uInt8 aDocId[ 16 ] = {0}; rtl_random_getBytes( aRandomPool, aDocId, 16 ); @@ -3058,11 +3068,11 @@ void WW8Export::ExportDocument_Impl() pDataStrmTemp = &xDataStrm; if ( pDataStrmTemp && pDataStrmTemp != pStrmTemp) - EncryptRC4(aCtx, *pDataStrm, *pDataStrmTemp); + EncryptRC4(aCtx, *pDataStrm, *pDataStrmTemp); EncryptRC4(aCtx, *pTableStrm, *pTableStrmTemp); - // Write Unencrypted Header 52 bytes to the start of the table stream + // Write Unencrypted Header 52 bytes to the start of the table stream // EncryptionVersionInfo (4 bytes): A Version structure where Version.vMajor MUST be 0x0001, and Version.vMinor MUST be 0x0001. pTableStrmTemp->Seek( 0 ); sal_uInt32 nEncType = 0x10001; @@ -3074,19 +3084,19 @@ void WW8Export::ExportDocument_Impl() pTableStrmTemp->Write( aDocId, 16 ); pTableStrmTemp->Write( pSaltData, 16 ); - pTableStrmTemp->Write( pSaltDigest, 16 ); + pTableStrmTemp->Write( pSaltDigest, 16 ); EncryptRC4(aCtx, GetWriter().Strm(), *pStrmTemp); - // Write Unencrypted Fib 68 bytes to the start of the workdocument stream + // Write Unencrypted Fib 68 bytes to the start of the workdocument stream pFib->fEncrypted = 1; // fEncrypted indicates the document is encrypted. pFib->fObfuscated = 0; // Must be 0 for RC4. pFib->nHash = 0x34; // encrypt header bytes count of table stream. pFib->nKey = 0; // lkey2 must be 0 for RC4. - pStrmTemp->Seek( 0 ); - pFib->WriteHeader( *pStrmTemp ); - } + pStrmTemp->Seek( 0 ); + pFib->WriteHeader( *pStrmTemp ); + } if (pUsedNumTbl) // all used NumRules { @@ -3280,7 +3290,7 @@ ULONG SwWW8Writer::Write( SwPaM& rPaM, SfxMedium& rMed, MSWordExportBase::MSWordExportBase( SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM *pOriginalPam ) : aMainStg(sMainStream), pISet(0), pUsedNumTbl(0), mpTopNodeOfHdFtPage(0), - pBmpPal(0), pKeyMap(0), pOLEExp(0), pOCXExp(0), pOleMap(0), + pBmpPal(0), pKeyMap(0), pOLEExp(0), pOCXExp(0), pOleMap(0), mpTableInfo(new ww8::WW8TableInfo()), nUniqueList(0), mnHdFtIndex(0), pAktPageDesc(0), pPapPlc(0), pChpPlc(0), pChpIter(0), pStyles( NULL ), @@ -3470,7 +3480,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) if ( pAsCheckbox ) type = 1; - const ::rtl::OUString ffname = rFieldmark.GetFieldname(); + const ::rtl::OUString ffname = rFieldmark.GetFieldname(); ULONG nDataStt = pDataStrm->Tell(); pChpPlc->AppendFkpEntry(Strm().Tell()); @@ -3489,7 +3499,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) pChpPlc->AppendFkpEntry( Strm().Tell(), sizeof( aArr1 ), aArr1 ); - sal_uInt8 aFldHeader[] = + sal_uInt8 aFldHeader[] = { 0xFF, 0xFF, 0xFF, 0xFF, // Unicode Marker... 0, 0, 0, 0//, 0, 0, 0, 0 @@ -3511,7 +3521,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) const sal_uInt8 aFldData[] = { 0,0,0,0, // len of struct - 0x44,0, // the start of "next" data + 0x44,0, // the start of "next" data 0,0,0,0,0,0,0,0,0,0, // PIC-Structure! /10 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // | /16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // | /16 @@ -3568,34 +3578,34 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer #endif m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren - + if (pNodeInfoInner->isEndOfCell()) { #ifdef DEBUG ::std::clog << "<endOfCell/>" << ::std::endl; #endif m_rWW8Export.WriteCR(pNodeInfoInner); - + m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style # TableInfoCell(pNodeInfoInner); m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(), m_rWW8Export.pO->GetData() ); - + m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren } - + if (pNodeInfoInner->isEndOfLine()) { #ifdef DEBUG ::std::clog << "<endOfLine/>" << ::std::endl; #endif TableRowEnd(pNodeInfoInner->getDepth()); - + m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style # TableInfoRow(pNodeInfoInner); m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(), m_rWW8Export.pO->GetData() ); - + m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren } #ifdef DEBUG @@ -3610,15 +3620,15 @@ void MSWordExportBase::OutputEndNode( const SwEndNode &rNode ) #endif ww8::WW8TableNodeInfo::Pointer_t pNodeInfo = mpTableInfo->getTableNodeInfo( &rNode ); - + if (pNodeInfo) - { + { if (pNodeInfo.get() != NULL) - { -#ifdef DEBUG + { +#ifdef DEBUG ::std::clog << pNodeInfo->toString() << ::std::endl; #endif - + const ww8::WW8TableNodeInfo::Inners_t aInners = pNodeInfo->getInners(); ww8::WW8TableNodeInfo::Inners_t::const_iterator aIt(aInners.begin()); ww8::WW8TableNodeInfo::Inners_t::const_iterator aEnd(aInners.end()); @@ -3628,7 +3638,7 @@ void MSWordExportBase::OutputEndNode( const SwEndNode &rNode ) AttrOutput().TableNodeInfoInner(pInner); aIt++; } - } + } } #ifdef DEBUG ::std::clog << "</OutWW8_SwEndNode>" << ::std::endl; |