From c93b2a24d42b31043e2456b222bcb433175d6ce9 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Thu, 26 Mar 2020 09:45:56 +0300 Subject: NFC ww8/writerfilter: comment fixes and general code cleanup 1.) Confusing to set a default in the CTOR head, and then change it in the body. 2.) fix spelling 3.) clarify somewhat misleading comments. Change-Id: Icb19a8838f1f01310b2dacc8cef7d9f0c67f3e75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91275 Tested-by: Jenkins Reviewed-by: Justin Luth --- sw/source/filter/ww8/ww8par2.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'sw/source') diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 3f3ff253a44e..a18dd5185ccc 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -1767,7 +1767,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) : m_nPercentWidth(0), m_bOk(true), m_bClaimLineFormat(false), - m_eOri(text::HoriOrientation::NONE), + m_eOri(text::HoriOrientation::LEFT), m_bIsBiDi(false), m_nCurrentRow(0), m_nCurrentBandRow(0), @@ -1793,8 +1793,6 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) : WW8PLCFx_Cp_FKP* pPap = m_pIo->m_xPlcxMan->GetPapPLCF(); - m_eOri = text::HoriOrientation::LEFT; - WW8TabBandDesc* pNewBand = new WW8TabBandDesc; wwSprmParser aSprmParser(m_pIo->GetFib()); @@ -2499,7 +2497,7 @@ void WW8TabDesc::CreateSwTable() if( m_nMaxRight - m_nMinLeft > MINLAY * m_nDefaultSwCols ) { SwFormatFrameSize aFrameSize(SwFrameSize::Fixed, m_nSwWidth); - // Don't set relative width if the table has been converted into a floating frame + // Don't set relative width if the table is in a floating frame if ( m_nPercentWidth && (!m_pIo->m_xSFlyPara || !m_pIo->m_xSFlyPara->pFlyFormat) ) aFrameSize.SetWidthPercent(m_nPercentWidth); m_pTable->GetFrameFormat()->SetFormatAttr(aFrameSize); @@ -2530,9 +2528,9 @@ void WW8TabDesc::CreateSwTable() m_pIo->m_xSFlyPara->pFlyFormat->SetFormatAttr(aHori); } } - else + else // Not directly in a floating frame. { - //If bApo is set, then this table is being placed in a floating + //Historical note: If InLocalApo(), then this table is being placed in a floating //frame, and the frame matches the left and right *lines* of the //table, so the space to the left of the table isn't to be used //inside the frame, in word the dialog involved greys out the -- cgit v1.2.3