summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-06-09 11:16:42 +0200
committerobo <obo@openoffice.org>2010-06-09 11:16:42 +0200
commit13498bde83070fbd4e149a27e6aca5a587f08feb (patch)
tree30ea2b06ad84775afeee641a031cf145a7f0afea /sw/source
parent1355ef7a63907ac69d663b6f07e41b844aa7307f (diff)
parentddf4754917cfb46d4b8f39fb7d7391358c19176b (diff)
CWS-TOOLING: integrate CWS hb33patches1
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/layout/tabfrm.cxx156
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx92
-rw-r--r--sw/source/filter/ww8/docxexport.cxx24
-rw-r--r--sw/source/filter/ww8/docxexportfilter.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx19
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx3
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx10
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.cxx31
-rw-r--r--sw/source/filter/ww8/ww8par.hxx4
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx17
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx7
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx2
14 files changed, 93 insertions, 280 deletions
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index f912be5cb9b1..b747c4e7aaff 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1680,62 +1680,6 @@ BOOL MA_FASTCALL lcl_InnerCalcLayout( SwFrm *pFrm,
return bRet;
}
-void MA_FASTCALL lcl_FirstTabCalc( SwTabFrm *pTab )
-{
- SWRECTFN( pTab )
- if ( !pTab->IsFollow() && !pTab->GetTable()->IsTblComplex() )
- {
- SwLayoutFrm* pRow = (SwLayoutFrm*)pTab->Lower();
- // --> FME 2006-07-17 #134526# TabFrm without a lower? Better we check
- // it before crashing. However, I still don't know how this can happen!
- while ( pRow )
- {
- SwLayoutFrm *pCell = (SwLayoutFrm*)pRow->Lower();
- SwFrm *pCnt = pCell->Lower();
- // --> OD 2006-11-08 #i70641# - make code robust
- if ( pCnt )
- {
- pCnt->Calc();
- const long nCellHeight = (pCell->Frm().*fnRect->fnGetHeight)();
- const long nCellY = (pCell->Frm().*fnRect->fnGetTop)()-1;
- const long nCntHeight = (pCnt->Frm().*fnRect->fnGetHeight)();
- const long nCntY = (pCnt->Frm().*fnRect->fnGetTop)()-1;
- if ( 0 != (pCell = (SwLayoutFrm*)pCell->GetNext()) )
- {
- do
- {
- (pCell->Frm().*fnRect->fnSetTopAndHeight)( nCellY, nCellHeight );
- (pCell->Prt().*fnRect->fnSetHeight)( nCellHeight );
- pCell->_InvalidateAll();
-
- pCnt = pCell->Lower();
- if ( pCnt )
- {
- (pCnt->Frm().*fnRect->fnSetTopAndHeight)(nCntY, nCntHeight);
- (pCnt->Prt().*fnRect->fnSetHeight)( nCntHeight );
- pCnt->_InvalidateAll();
- }
-
- pCell = (SwLayoutFrm*)pCell->GetNext();
- } while ( pCell );
- }
-
- SwTwips nRowTop = (pRow->Frm().*fnRect->fnGetTop)();
- SwTwips nUpBot = (pTab->GetUpper()->Frm().*fnRect->fnGetBottom)();
- if( (*fnRect->fnYDiff)( nUpBot, nRowTop ) < 0 )
- break;
- }
- // <--
- pRow = (SwLayoutFrm*)pRow->GetNext();
- }
- }
- SwFrm *pUp = pTab->GetUpper();
- long nBottom = (pUp->*fnRect->fnGetPrtBottom)();
- if ( pTab->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- nBottom += pUp->Grow( LONG_MAX, TRUE );
- lcl_CalcLowers( (SwLayoutFrm*)pTab->Lower(), pTab, LONG_MAX, false );
-}
-
void MA_FASTCALL lcl_RecalcRow( SwRowFrm& rRow, long nBottom )
{
// --> OD 2004-10-05 #i26945# - For correct appliance of the 'straightforward
@@ -2146,17 +2090,13 @@ void SwTabFrm::MakeAll()
if ( !bValidSize || !bValidPrtArea )
{
- // HB #i101593# no optimization as it leeds to not layouting certain nested tables
- // const BOOL bOptLower = (Frm().*fnRect->fnGetHeight)() == 0;
- const BOOL bOptLower = FALSE;
-
const long nOldPrtWidth = (Prt().*fnRect->fnGetWidth)();
const long nOldFrmWidth = (Frm().*fnRect->fnGetWidth)();
const Point aOldPrtPos = (Prt().*fnRect->fnGetPos)();
Format( pAttrs );
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
- if ( /*!bOptLower &&*/ pLayout &&
+ if ( pLayout &&
((Prt().*fnRect->fnGetWidth)() != nOldPrtWidth ||
(Frm().*fnRect->fnGetWidth)() != nOldFrmWidth) )
{
@@ -2167,100 +2107,8 @@ void SwTabFrm::MakeAll()
pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
}
- if ( !bOptLower && aOldPrtPos != (Prt().*fnRect->fnGetPos)() )
+ if ( aOldPrtPos != (Prt().*fnRect->fnGetPos)() )
aNotify.SetLowersComplete( FALSE );
-
- if ( bOptLower && Lower() )
- {
- //MA 24. May. 95: Optimierungsversuch!
- //Ganz nigel nagel neu das Teil. Damit wir nicht n-fach
- //MakeAll'en formatieren wir flugs den Inhalt.
- //Das erste Format mussten wir allerdings abwarten, damit
- //die Breiten Stimmen!
- //MA: Fix, Kein Calc wenn evtl. noch Seitengebunde Flys
- //an den Cntnt haengen (siehe frmtool.cxx, ~SwCntntNotify).
- SwDoc *pDoc = GetFmt()->GetDoc();
- if ( !pDoc->GetSpzFrmFmts()->Count() ||
- pDoc->IsLoaded() || pDoc->IsNewDoc() )
- {
- //MA 28. Nov. 95: Und wieder ein Trick, gleich mal sehen
- //ob ein Rueckfluss lohnt.
- if ( bMoveable && !GetPrev() )
- {
- GetLeaf( MAKEPAGE_NONE, FALSE ); //setzt das BackMoveJump
- if ( SwFlowFrm::IsMoveBwdJump() )
- {
- BOOL bDummy;
- SwFtnBossFrm *pOldBoss = bFtnsInDoc ?
- FindFtnBossFrm( TRUE ) : 0;
- const BOOL bOldPrev = GetPrev() != 0;
- if ( MoveBwd( bDummy ) )
- {
- SWREFRESHFN( this )
- bMovedBwd = TRUE;
- if ( bFtnsInDoc )
- MoveLowerFtns( 0, pOldBoss, 0, TRUE );
-
- long nOldTop = (Frm().*fnRect->fnGetTop)();
- MakePos();
- if( nOldTop != (Frm().*fnRect->fnGetTop)() )
- {
- SwHTMLTableLayout *pHTMLLayout =
- GetTable()->GetHTMLTableLayout();
- if( pHTMLLayout )
- {
- delete pAccess;
- bCalcLowers |= pHTMLLayout->Resize(
- pHTMLLayout->GetBrowseWidthByTabFrm(
- *this ), FALSE );
- pAccess= new SwBorderAttrAccess(
- SwFrm::GetCache(), this );
- pAttrs = pAccess->Get();
- }
- }
-
- if ( bOldPrev != (0 != GetPrev()) )
- {
- //Abstand nicht vergessen!
- bValidPrtArea = FALSE;
- Format( pAttrs );
- }
- if ( bKeep && KEEPTAB )
- {
- // --> OD 2005-09-28 #b6329202#
- // Consider case that table is inside another
- // table, because it has to be avoided, that
- // superior table is formatted.
- // Thus, find next content, table or section
- // and, if a section is found, get its first
- // content.
-// SwFrm *pNxt = FindNextCnt();
-// // FindNextCnt geht ggf. in einen Bereich
-// // hinein, in eine Tabelle allerdings auch
-// if( pNxt && pNxt->IsInTab() )
-// pNxt = pNxt->FindTabFrm();
-// if ( pNxt )
-// {
-// pNxt->Calc();
-// if ( !GetNext() )
-// bValidPos = FALSE;
-// }
- if ( 0 != lcl_FormatNextCntntForKeep( this ) &&
- !GetNext() )
- {
- bValidPos = FALSE;
- }
- // <--
- }
- }
- }
- }
- ::lcl_FirstTabCalc( this );
- bValidSize = bValidPrtArea = FALSE;
- Format( pAttrs );
- aNotify.SetLowersComplete( TRUE );
- }
- }
}
//Wenn ich der erste einer Kette bin koennte ich mal sehen ob
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index bb26e670928a..2e22e3518c90 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -731,9 +731,7 @@ void DocxAttributeOutput::RunText( const String& rText, rtl_TextEncoding /*eChar
if ( *pIt < 0x0020 ) // filter out the control codes
{
impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt );
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "Ignored control code %x in a text run.", *pIt );
-#endif
+ OSL_TRACE( "Ignored control code %x in a text run.", *pIt );
}
break;
}
@@ -744,23 +742,17 @@ void DocxAttributeOutput::RunText( const String& rText, rtl_TextEncoding /*eChar
void DocxAttributeOutput::RawText( const String& /*rText*/, bool /*bForceUnicode*/, rtl_TextEncoding /*eCharSet*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet )\n" );
-#endif
+ OSL_TRACE("TODO DocxAttributeOutput::RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet )\n" );
}
void DocxAttributeOutput::StartRuby( const SwTxtNode& /*rNode*/, const SwFmtRuby& /*rRuby*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby )\n" );
-#endif
+ OSL_TRACE("TODO DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby )\n" );
}
void DocxAttributeOutput::EndRuby()
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::EndRuby()\n" );
-#endif
+ OSL_TRACE( "TODO DocxAttributeOutput::EndRuby()\n" );
}
bool DocxAttributeOutput::AnalyzeURL( const String& rUrl, const String& rTarget, String* pLinkURL, String* pMark )
@@ -849,9 +841,7 @@ void DocxAttributeOutput::FieldVanish( const String& rTxt, ww::eField eType )
void DocxAttributeOutput::Redline( const SwRedlineData* /*pRedline*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::Redline( const SwRedlineData* pRedline )\n" );
-#endif
+ OSL_TRACE( "TODO DocxAttributeOutput::Redline( const SwRedlineData* pRedline )\n" );
}
/// Append the number as 2-digit when less than 10.
@@ -936,9 +926,7 @@ void DocxAttributeOutput::StartRedline( const SwRedlineData* pRedlineData )
break;
case nsRedlineType_t::REDLINE_FORMAT:
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::StartRedline()\n" );
-#endif
+ OSL_TRACE( "TODO DocxAttributeOutput::StartRedline()\n" );
default:
break;
}
@@ -960,9 +948,7 @@ void DocxAttributeOutput::EndRedline()
break;
case nsRedlineType_t::REDLINE_FORMAT:
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::EndRedline()\n" );
-#endif
+ OSL_TRACE( "TODO DocxAttributeOutput::EndRedline()\n" );
break;
default:
break;
@@ -973,9 +959,7 @@ void DocxAttributeOutput::EndRedline()
void DocxAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle )\n" );
-#endif
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle )\n" );
}
void DocxAttributeOutput::ParagraphStyle( USHORT nStyle )
@@ -990,7 +974,7 @@ void DocxAttributeOutput::ParagraphStyle( USHORT nStyle )
void DocxAttributeOutput::InTable()
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::InTable()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::InTable()\n" );
#endif
}
@@ -998,7 +982,7 @@ void DocxAttributeOutput::InTable()
void DocxAttributeOutput::TableRowProperties( bool /*bHeader*/, long /*nCellHeight*/, bool /*bCannotSplit*/, bool /*bRightToLeft*/ )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::TableRowProperties()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::TableRowProperties()\n" );
#endif
}
#endif
@@ -1439,9 +1423,7 @@ void DocxAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer
void DocxAttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t /*pNodeInfo*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO: DocxAttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo )\n" );
-#endif
+ OSL_TRACE( "TODO: DocxAttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo )\n" );
}
void DocxAttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner )
@@ -1455,16 +1437,12 @@ void DocxAttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointe
void DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO: DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" );
-#endif
+ OSL_TRACE( "TODO: DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" );
}
void DocxAttributeOutput::TableRowEnd( sal_uInt32 /*nDepth*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO: DocxAttributeOutput::TableRowEnd( sal_uInt32 nDepth = 1 )\n" );
-#endif
+ OSL_TRACE( "TODO: DocxAttributeOutput::TableRowEnd( sal_uInt32 nDepth = 1 )\n" );
}
void DocxAttributeOutput::StartStyles()
@@ -1483,7 +1461,7 @@ void DocxAttributeOutput::DefaultStyle( USHORT nStyle )
{
// are these the values of enum ww::sti (see ../inc/wwstyles.hxx)?
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::DefaultStyle( USHORT nStyle )- %d\n", nStyle );
+ OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( USHORT nStyle )- %d\n", nStyle );
#else
(void) nStyle; // to quiet the warning
#endif
@@ -1492,7 +1470,7 @@ void DocxAttributeOutput::DefaultStyle( USHORT nStyle )
void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ) - some stuff still missing\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize ) - some stuff still missing\n" );
#endif
// create the relation ID
OString aRelId;
@@ -1710,7 +1688,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po
break;
default:
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Point& rNdTopLeft ) - frame type '%s'\n",
+ OSL_TRACE( "TODO DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Point& rNdTopLeft ) - frame type '%s'\n",
rFrame.GetWriterType() == sw::Frame::eTxtBox? "eTxtBox":
( rFrame.GetWriterType() == sw::Frame::eOle? "eOle":
( rFrame.GetWriterType() == sw::Frame::eFormControl? "eFormControl": "???" ) ) );
@@ -1839,7 +1817,7 @@ void DocxAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo
break;
default:
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "Unknown section break to write: %d\n", nC );
+ OSL_TRACE( "Unknown section break to write: %d\n", nC );
#endif
break;
}
@@ -1879,7 +1857,7 @@ void DocxAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLi
{
// see 2.6.8 lnNumType (Line Numbering Settings)
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::SectionLineNumbering()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::SectionLineNumbering()\n" );
#endif
}
@@ -1965,7 +1943,7 @@ void DocxAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRes
// see 2.6.12 pgNumType (Page Numbering Settings)
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::SectionPageNumbering()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::SectionPageNumbering()\n" );
#endif
}
@@ -2073,7 +2051,7 @@ void DocxAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRul
#if OSL_DEBUG_LEVEL > 0
// TODO ww8 version writes this, anything to do about it here?
if ( rRule.IsContinusNum() )
- fprintf( stderr, "TODO DocxAttributeOutput::NumberingDefinition()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::NumberingDefinition()\n" );
#else
(void) rRule; // to quiet the warning...
#endif
@@ -2265,7 +2243,7 @@ void DocxAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut )
void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& /*rEscapement*/ )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::CharEscapement()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::CharEscapement()\n" );
#endif
}
@@ -2382,7 +2360,7 @@ void DocxAttributeOutput::CharWeight( const SvxWeightItem& rWeight )
void DocxAttributeOutput::CharAutoKern( const SvxAutoKernItem& )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::CharAutoKern()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::CharAutoKern()\n" );
#endif
}
@@ -2554,7 +2532,7 @@ void DocxAttributeOutput::TextINetFormat( const SwFmtINetFmt& rLink )
void DocxAttributeOutput::TextCharFormat( const SwFmtCharFmt& )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::TextCharFormat()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::TextCharFormat()\n" );
#endif
}
@@ -2577,14 +2555,14 @@ void DocxAttributeOutput::RefField( const SwField& rFld, const String& rRef )
void DocxAttributeOutput::HiddenField( const SwField& /*rFld*/ )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::HiddenField()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::HiddenField()\n" );
#endif
}
void DocxAttributeOutput::PostitField( const SwField* /* pFld*/ )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::PostitField()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::PostitField()\n" );
#endif
}
@@ -2970,7 +2948,7 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
if ( m_rExport.bOutFlyFrmAttrs )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatFrameSize() - Fly frames\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatFrameSize() - Fly frames\n" );
#endif
}
else if ( m_rExport.bOutPageDescs )
@@ -2993,7 +2971,7 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
void DocxAttributeOutput::FormatPaperBin( const SvxPaperBinItem& )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatPaperBin()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatPaperBin()\n" );
#endif
}
@@ -3002,7 +2980,7 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
if ( m_rExport.bOutFlyFrmAttrs )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "DocxAttributeOutput::FormatLRSpace() - Fly frames\n" );
+ OSL_TRACE( "DocxAttributeOutput::FormatLRSpace() - Fly frames\n" );
#endif
}
else if ( m_rExport.bOutPageDescs )
@@ -3093,28 +3071,28 @@ void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace )
void DocxAttributeOutput::FormatSurround( const SwFmtSurround& )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatSurround()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatSurround()\n" );
#endif
}
void DocxAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatVertOrientation()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatVertOrientation()\n" );
#endif
}
void DocxAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatHorizOrientation()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatHorizOrientation()\n" );
#endif
}
void DocxAttributeOutput::FormatAnchor( const SwFmtAnchor& )
{
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatAnchor()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatAnchor()\n" );
#endif
}
@@ -3129,7 +3107,7 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
}
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatBackground()\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatBackground()\n" );
#endif
}
@@ -3215,9 +3193,7 @@ void DocxAttributeOutput::FormatKeep( const SvxFmtKeepItem& )
void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxAttributeOutput::FormatTextGrid()\n" );
-#endif
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatTextGrid()\n" );
}
void DocxAttributeOutput::FormatLineNumbering( const SwFmtLineNumber& rNumbering )
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index e238fdfc738a..0962edd65085 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -342,9 +342,7 @@ void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const St
void DocxExport::WriteFormData( const ::sw::mark::IFieldmark& /*rFieldmark*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxExport::WriteFormData()\n" );
-#endif
+ OSL_TRACE( "TODO DocxExport::WriteFormData()\n" );
}
void DocxExport::DoComboBox(const rtl::OUString& rName,
@@ -404,9 +402,7 @@ void DocxExport::DoComboBox(const rtl::OUString& rName,
void DocxExport::DoFormText(const SwInputField* /*pFld*/)
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxExport::ForFormText()\n" );
-#endif
+ OSL_TRACE( "TODO DocxExport::ForFormText()\n" );
}
void DocxExport::ExportDocument_Impl()
@@ -430,9 +426,7 @@ void DocxExport::ExportDocument_Impl()
void DocxExport::OutputPageSectionBreaks( const SwTxtNode& )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxExport::OutputPageSectionBreaks( const SwTxtNode& )\n" );
-#endif
+ OSL_TRACE( "TODO DocxExport::OutputPageSectionBreaks( const SwTxtNode& )\n" );
}
@@ -480,23 +474,17 @@ void DocxExport::OutputEndNode( const SwEndNode& rEndNode )
void DocxExport::OutputTableNode( const SwTableNode& )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxExport::OutputTableNode( const SwTableNode& )\n" );
-#endif
+ OSL_TRACE( "TODO DocxExport::OutputTableNode( const SwTableNode& )\n" );
}
void DocxExport::OutputGrfNode( const SwGrfNode& )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxExport::OutputGrfNode( const SwGrfNode& )\n" );
-#endif
+ OSL_TRACE( "TODO DocxExport::OutputGrfNode( const SwGrfNode& )\n" );
}
void DocxExport::OutputOLENode( const SwOLENode& )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "TODO DocxExport::OutputOLENode( const SwOLENode& )\n" );
-#endif
+ OSL_TRACE( "TODO DocxExport::OutputOLENode( const SwOLENode& )\n" );
}
ULONG DocxExport::ReplaceCr( BYTE )
diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx
index 5f23f23a8dd5..13715fcd2bbe 100644
--- a/sw/source/filter/ww8/docxexportfilter.cxx
+++ b/sw/source/filter/ww8/docxexportfilter.cxx
@@ -47,7 +47,7 @@ DocxExportFilter::DocxExportFilter( const uno::Reference< lang::XMultiServiceFac
bool DocxExportFilter::exportDocument()
{
- fprintf( stderr, "DocxExportFilter::exportDocument()\n" ); // DEBUG remove me
+ OSL_TRACE(, "DocxExportFilter::exportDocument()\n" ); // DEBUG remove me
// get SwDoc*
uno::Reference< uno::XInterface > xIfc( getModel(), uno::UNO_QUERY );
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 004eef715822..7f1b6658800e 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -280,25 +280,10 @@ void WW8Export::DoCheckBox(uno::Reference<beans::XPropertySet> xPropSet)
sal_Int16 nTemp = 0;
xPropSet->getPropertyValue(C2U("DefaultState")) >>= nTemp;
- sal_uInt32 nIsDefaultChecked(nTemp);
+ aFFData.setDefaultResult(nTemp);
xPropSet->getPropertyValue(C2U("State")) >>= nTemp;
- sal_uInt32 nIsChecked(nTemp);
-
- if (nIsDefaultChecked != nIsChecked)
- {
- switch (nIsChecked)
- {
- case false:
- aFFData.setResult(0);
- break;
- case true:
- aFFData.setResult(1);
- break;
- default:
- ASSERT(!this, "how did that happen");
- }
- }
+ aFFData.setResult(nTemp);
::rtl::OUString aStr;
static ::rtl::OUString sName(C2U("Name"));
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 9e114aa11b0a..76ad1dc354ea 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2713,7 +2713,7 @@ void MSWordExportBase::OutputContentNode( const SwCntntNode& rNode )
break;
default:
#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "Unhandled node, type == %d\n", rNode.GetNodeType() );
+ OSL_TRACE("Unhandled node, type == %d\n", rNode.GetNodeType() );
#endif
break;
}
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index f6fb18aa0c63..7251d2737256 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -1023,7 +1023,8 @@ bool WW8_WrFkp::Combine()
return false;
if( nIMax )
memcpy( pFkp + ( nIMax + 1 ) * 4, pOfs, nIMax * nItemSize );
- DELETEZ( pOfs );
+ delete[] pOfs;
+ pOfs = 0;
((BYTE*)pFkp)[511] = nIMax;
bCombined = true;
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 3d200268731d..5d96a74b009d 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -99,9 +99,7 @@ using namespace nsFieldFlags;
void WW8Export::OutputGrfNode( const SwGrfNode& /*rNode*/ )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "WW8Export::OutputGrfNode( const SwGrfNode& )\n" );
-#endif
+ OSL_TRACE("WW8Export::OutputGrfNode( const SwGrfNode& )\n" );
ASSERT( mpParentFrame, "frame not set!" );
if ( mpParentFrame )
{
@@ -221,9 +219,7 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet,
void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
{
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "WW8Export::OutputOLENode( const SwOLENode& rOLENode )\n" );
-#endif
+ OSL_TRACE("WW8Export::OutputOLENode( const SwOLENode& rOLENode )\n" );
BYTE *pSpecOLE;
BYTE *pDataAdr;
short nSize;
@@ -607,7 +603,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
substitute the final size and loose on retaining the scaling factor but
still keep the correct display size anyway.
*/
- if ( (aGrTwipSz.Width() > USHRT_MAX) || (aGrTwipSz.Height() > USHRT_MAX)
+ if ( (aGrTwipSz.Width() > SHRT_MAX) || (aGrTwipSz.Height() > SHRT_MAX)
|| (aGrTwipSz.Width() < 0 ) || (aGrTwipSz.Height() < 0) )
{
aGrTwipSz.Width() = nWidth;
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 464c7f2d64e2..89aef162ec01 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -5261,9 +5261,7 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt )
break;
default:
-#if OSL_DEBUG_LEVEL > 0
- fprintf( stderr, "Unhandled SfxPoolItem with id %d.\n", rHt.Which() );
-#endif
+ OSL_TRACE("Unhandled SfxPoolItem with id %d.\n", rHt.Which() );
break;
}
}
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index f63a821b5e29..5808e3981223 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1711,6 +1711,13 @@ void SwWW8ImplReader::Read_HdFtText(long nStart, long nLen, SwFrmFmt* pHdFtFmt)
*pPaM->GetPoint() = aTmpPos;
}
+
+bool SwWW8ImplReader::isValid_HdFt_CP(WW8_CP nHeaderCP) const
+{
+ //each CP of Plcfhdd MUST be less than FibRgLw97.ccpHdd
+ return (nHeaderCP < pWwFib->ccpHdr) ? true : false;
+}
+
bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt,
int nSect)
{
@@ -1730,7 +1737,7 @@ bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt,
else
{
pHdFt->GetTextPosExact( static_cast< short >(nNumber + (nSect+1)*6), start, nLen);
- bOk = ( 2 <= nLen );
+ bOk = ( 2 <= nLen ) && isValid_HdFt_CP(start);
}
if (bOk)
@@ -1782,7 +1789,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
else
{
pHdFt->GetTextPosExact( static_cast< short >(nNumber + (nSect+1)*6), start, nLen);
- bOk = ( 2 <= nLen );
+ bOk = ( 2 <= nLen ) && isValid_HdFt_CP(start);
}
bool bUseLeft
@@ -2619,6 +2626,16 @@ bool SwWW8ImplReader::HandlePageBreakChar()
//itself ignores them in this case.
if (!nInTable)
{
+ //xushanchuan add for issue106569
+ BOOL IsTemp=TRUE;
+ SwTxtNode* pTemp = pPaM->GetNode()->GetTxtNode();
+ if ( pTemp && !( pTemp->GetTxt().Len() ) && ( bFirstPara || bFirstParaOfPage ) )
+ {
+ IsTemp = FALSE;
+ AppendTxtNode(*pPaM->GetPoint());
+ pTemp->SetAttr(*GetDfltAttr(RES_PARATR_NUMRULE));
+ }
+ //xushanchuan end
bPgSecBreak = true;
pCtrlStck->KillUnlockedAttrs(*pPaM->GetPoint());
/*
@@ -2627,7 +2644,9 @@ bool SwWW8ImplReader::HandlePageBreakChar()
paragraph end, but nevertheless, numbering (and perhaps other
similiar constructs) do not exist on the para.
*/
- if (!bWasParaEnd)
+ //xushanchuan add for issue106569
+ if (!bWasParaEnd && IsTemp)
+ //xushanchuan end
{
bParaEndAdded = true;
if (0 >= pPaM->GetPoint()->nContent.GetIndex())
@@ -2663,6 +2682,10 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
sal_Char cInsert = '\x0';
bool bRet = false;
+ //xushanchuan add for issue106569
+ if ( 0xc != nWCharVal )
+ bFirstParaOfPage = false;
+ //xushanchuan end
switch (nWCharVal)
{
case 0:
@@ -3179,6 +3202,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
// <--
rDoc.InsertPoolItem(*pPaM,
SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK), 0);
+ bFirstParaOfPage = true;//xushanchuan add for issue106569
bPgSecBreak = false;
}
}
@@ -3276,6 +3300,7 @@ SwWW8ImplReader::SwWW8ImplReader(BYTE nVersionPara, SvStorage* pStorage,
bWasParaEnd = false;
bDropCap = false;
bFirstPara = true;
+ bFirstParaOfPage = false;//xushanchuan add for issue106569
bParaAutoBefore = false;
bParaAutoAfter = false;
nProgress = 0;
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 2c3d8c67e3fc..025cf0f588f4 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1083,7 +1083,7 @@ private:
// the very 1st Line Numbering and ignore the rest)
bool bFirstPara; // first paragraph?
-
+ bool bFirstParaOfPage;//cs2c--xushanchuan add for bug11210
bool bParaAutoBefore;
bool bParaAutoAfter;
@@ -1109,6 +1109,8 @@ private:
void Read_HdFtTextAsHackedFrame(long nStart, long nLen,
SwFrmFmt &rHdFtFmt, sal_uInt16 nPageWidth);
+ bool isValid_HdFt_CP(WW8_CP nHeaderCP) const;
+
bool HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt, int nSect);
void HandleLineNumbering(const wwSection &rSection);
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 0b8616d54652..75454dddbc58 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2212,20 +2212,17 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
{
*pDataStream >> nDefaultChecked;
nChecked = nDefaultChecked;
- //Don't know the details yet
- switch (nHeaderByte)
+
+ sal_uInt8 iRes = (nHeaderByte >> 2) & 0x1F;
+ switch (iRes)
{
- case 0x65: //01100101
- //use defaults ?
+ case 1: //checked
+ nChecked = true;
break;
- case 0x1: //00000001
- //swap to unchecked from checked (#114841)?
+ case 25: //undefined, Undefined checkboxes are treated as unchecked
+ case 0: //unchecked
nChecked = false;
break;
- case 0x5: //00000101
- //change to checked
- nChecked = true;
- break;
default:
ASSERT(!this, "unknown option, please report to cmc");
break;
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index fdd3c96c4e18..d318522100cf 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2122,7 +2122,7 @@ xub_StrLen WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr,
// Bei nStartPos < 0 wird das erste Element des PLCFs genommen
WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
- long nStruct, long nStartPos, bool bNoEnd)
+ long nStruct, long nStartPos)
: nIdx(0), nStru(nStruct)
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
@@ -2138,8 +2138,6 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
pPLCF_PosArray[nIdx] = SWAPLONG( pPLCF_PosArray[nIdx] );
nIdx = 0;
#endif // OSL_BIGENDIAN
- if( bNoEnd )
- nIMax++;
if( nStruct ) // Pointer auf Inhalts-Array
pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
else
@@ -4005,8 +4003,7 @@ WW8PLCFx_Book::WW8PLCFx_Book(SvStream* pTblSt, const WW8Fib& rFib)
{
pBook[0] = new WW8PLCFspecial(pTblSt,rFib.fcPlcfbkf,rFib.lcbPlcfbkf,4);
- pBook[1] = new WW8PLCFspecial( pTblSt, rFib.fcPlcfbkl, rFib.lcbPlcfbkl,
- 0, -1, true);
+ pBook[1] = new WW8PLCFspecial(pTblSt,rFib.fcPlcfbkl,rFib.lcbPlcfbkl,0);
rtl_TextEncoding eStructChrSet = WW8Fib::GetFIBCharset(rFib.chseTables);
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index f63ae9321dea..33d40bcf4c0d 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -220,7 +220,7 @@ private:
long nStru;
public:
WW8PLCFspecial( SvStream* pSt, long nFilePos, long nPLCF,
- long nStruct, long nStartPos = -1, bool bNoEnd = false);
+ long nStruct, long nStartPos = -1 );
~WW8PLCFspecial() { delete[] pPLCF_PosArray; }
long GetIdx() const { return nIdx; }
void SetIdx( long nI ) { nIdx = nI; }