diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-10 14:38:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-11 09:55:04 +0100 |
commit | 69a6057b04d3b008623bf172abdb21a9ece4a3ee (patch) | |
tree | 0a9a6d501bea77443a8df62888a6d3add5232d60 /sw | |
parent | b9d6ea1dd7541c4bd866571f9e3f0aa894687c07 (diff) |
rename Prc->Percent in sw
Change-Id: I011eb59cf40abc6ff62dd541beb1ebbc50725a05
Reviewed-on: https://gerrit.libreoffice.org/84855
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/htmltbl.hxx | 22 | ||||
-rw-r--r-- | sw/source/core/doc/htmltbl.cxx | 18 | ||||
-rw-r--r-- | sw/source/filter/html/css1atr.cxx | 24 | ||||
-rw-r--r-- | sw/source/filter/html/htmlcss1.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/html/htmldrawreader.cxx | 16 | ||||
-rw-r--r-- | sw/source/filter/html/htmlflywriter.cxx | 40 | ||||
-rw-r--r-- | sw/source/filter/html/htmlgrin.cxx | 58 | ||||
-rw-r--r-- | sw/source/filter/html/htmlplug.cxx | 66 | ||||
-rw-r--r-- | sw/source/filter/html/htmlsect.cxx | 14 | ||||
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 64 | ||||
-rw-r--r-- | sw/source/filter/html/htmltabw.cxx | 30 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 20 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.hxx | 4 | ||||
-rw-r--r-- | sw/source/filter/inc/wrtswtbl.hxx | 12 | ||||
-rw-r--r-- | sw/source/filter/writer/wrtswtbl.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltble.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltbli.cxx | 6 |
17 files changed, 208 insertions, 208 deletions
diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx index cc0880d5bad0..88b9839bdee5 100644 --- a/sw/inc/htmltbl.hxx +++ b/sw/inc/htmltbl.hxx @@ -88,14 +88,14 @@ class SwHTMLTableLayoutCell sal_uInt16 nColSpan; ///< COLSPAN of cell. sal_uInt16 const nWidthOption; ///< Given width of cell in Twip or %. - bool const bPrcWidthOption : 1; ///< nWidth is %-value. + bool const bPercentWidthOption : 1; ///< nWidth is %-value. bool const bNoWrapOption : 1; ///< NOWRAP-option. public: SwHTMLTableLayoutCell(std::shared_ptr<SwHTMLTableLayoutCnts> const& rCnts, sal_uInt16 nRSpan, sal_uInt16 nCSpan, - sal_uInt16 nWidthOpt, bool bPrcWdthOpt, + sal_uInt16 nWidthOpt, bool bPercentWidthOpt, bool bNWrapOpt ); /// Set or get content of a cell. @@ -110,7 +110,7 @@ public: sal_uInt16 GetColSpan() const { return nColSpan; } sal_uInt16 GetWidthOption() const { return nWidthOption; } - bool IsPrcWidthOption() const { return bPrcWidthOption; } + bool IsPercentWidthOption() const { return bPercentWidthOption; } bool HasNoWrapOption() const { return bNoWrapOption; } }; @@ -138,7 +138,7 @@ public: SwHTMLTableLayoutColumn( sal_uInt16 nColWidthOpt, bool bRelColWidthOpt, bool bLBorder ); - inline void MergeCellWidthOption( sal_uInt16 nWidth, bool bPrc ); + inline void MergeCellWidthOption( sal_uInt16 nWidth, bool bPercent ); inline void SetWidthOption( sal_uInt16 nWidth ); sal_uInt16 GetWidthOption() const { return nWidthOption; } @@ -198,11 +198,11 @@ class SwHTMLTableLayout sal_uInt16 const m_nBorder; /** Line strength of outer border, or rather the space needed for it as calculated by Netscape. */ - sal_uInt16 const m_nLeftBorderWidth; - sal_uInt16 const m_nRightBorderWidth; + SwTwips const m_nLeftBorderWidth; + SwTwips const m_nRightBorderWidth; sal_uInt16 m_nInhLeftBorderWidth; sal_uInt16 m_nInhRightBorderWidth; - sal_uInt16 const m_nBorderWidth; + SwTwips const m_nBorderWidth; sal_uInt16 m_nDelayedResizeAbsAvail; ///< Param for delayed Resize. sal_uInt16 m_nLastResizeAbsAvail; @@ -214,7 +214,7 @@ class SwHTMLTableLayout bool const m_bColsOption : 1; ///< Table has a COLS-option. bool const m_bColTags : 1; ///< Table has COL/COLGRP tags. - bool const m_bPrcWidthOption : 1; ///< Width is given in percent. + bool const m_bPercentWidthOption : 1; ///< Width is given in percent. bool m_bUseRelWidth : 1; ///< SwTable gets relative width. bool m_bMustResize : 1; ///< Table width must be defined. @@ -244,7 +244,7 @@ public: SwHTMLTableLayout( const SwTable *pSwTable, sal_uInt16 nRows, sal_uInt16 nCols, bool bColsOpt, bool ColTgs, - sal_uInt16 nWidth, bool bPrcWidth, sal_uInt16 nBorderOpt, + sal_uInt16 nWidth, bool bPercentWidth, sal_uInt16 nBorderOpt, sal_uInt16 nCellPad, sal_uInt16 nCellSp, SvxAdjust eAdjust, sal_uInt16 nLMargin, sal_uInt16 nRMargin, sal_uInt16 nBWidth, sal_uInt16 nLeftBWidth, sal_uInt16 nRightBWidth ); @@ -320,7 +320,7 @@ public: /// For Export. sal_uInt16 GetWidthOption() const { return m_nWidthOption; } - bool HasPrcWidthOption() const { return m_bPrcWidthOption; } + bool HasPercentWidthOption() const { return m_bPercentWidthOption; } sal_uInt16 GetCellPadding() const { return m_nCellPadding; } sal_uInt16 GetCellSpacing() const { return m_nCellSpacing; } @@ -425,7 +425,7 @@ inline void SwHTMLTableLayout::SetCell( std::unique_ptr<SwHTMLTableLayoutCell> p inline long SwHTMLTableLayout::GetBrowseWidthMin() const { - return static_cast<long>( (!m_nWidthOption || m_bPrcWidthOption) ? m_nMin : m_nRelTabWidth ); + return static_cast<long>( (!m_nWidthOption || m_bPercentWidthOption) ? m_nMin : m_nRelTabWidth ); } void SwHTMLTableLayout::SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight ) diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx index 9b5defa3b695..692d600f9ec9 100644 --- a/sw/source/core/doc/htmltbl.cxx +++ b/sw/source/core/doc/htmltbl.cxx @@ -91,11 +91,11 @@ const SwStartNode *SwHTMLTableLayoutCnts::GetStartNode() const SwHTMLTableLayoutCell::SwHTMLTableLayoutCell(std::shared_ptr<SwHTMLTableLayoutCnts> const& rCnts, sal_uInt16 nRSpan, sal_uInt16 nCSpan, - sal_uInt16 nWidth, bool bPrcWidth, + sal_uInt16 nWidth, bool bPercentWidth, bool bNWrapOpt ) : xContents(rCnts), nRowSpan( nRSpan ), nColSpan( nCSpan ), - nWidthOption( nWidth ), bPrcWidthOption( bPrcWidth ), + nWidthOption( nWidth ), bPercentWidthOption( bPercentWidth ), bNoWrapOption( bNWrapOpt ) {} @@ -147,7 +147,7 @@ SwHTMLTableLayoutConstraints *SwHTMLTableLayoutConstraints::InsertNext( SwHTMLTableLayout::SwHTMLTableLayout( const SwTable * pTable, sal_uInt16 nRws, sal_uInt16 nCls, bool bColsOpt, bool bColTgs, - sal_uInt16 nWdth, bool bPrcWdth, + sal_uInt16 nWdth, bool bPercentWdth, sal_uInt16 nBorderOpt, sal_uInt16 nCellPad, sal_uInt16 nCellSp, SvxAdjust eAdjust, sal_uInt16 nLMargin, sal_uInt16 nRMargin, @@ -183,7 +183,7 @@ SwHTMLTableLayout::SwHTMLTableLayout( const SwTable * pTable, , m_eTableAdjust( eAdjust ) , m_bColsOption( bColsOpt ) , m_bColTags( bColTgs ) - , m_bPrcWidthOption( bPrcWdth ) + , m_bPercentWidthOption( bPercentWdth ) , m_bUseRelWidth( false ) , m_bMustResize( true ) , m_bExportable( true ) @@ -518,7 +518,7 @@ void SwHTMLTableLayout::AutoLayoutPass1() // A fixed table width is taken over as minimum and // maximum at the same time - if( !pChild->m_bPrcWidthOption && pChild->m_nWidthOption ) + if( !pChild->m_bPercentWidthOption && pChild->m_nWidthOption ) { sal_uLong nTabWidth = pChild->m_nWidthOption; if( nTabWidth >= nAbsMinTableCnts ) @@ -552,7 +552,7 @@ void SwHTMLTableLayout::AutoLayoutPass1() // A fixed table width is taken over as minimum and // maximum at the same time - if( !pChild->m_bPrcWidthOption && pChild->m_nWidthOption ) + if( !pChild->m_bPercentWidthOption && pChild->m_nWidthOption ) { sal_uLong nTabWidth = pChild->m_nWidthOption; if( nTabWidth >= nAbsMinTableCnts ) @@ -590,7 +590,7 @@ void SwHTMLTableLayout::AutoLayoutPass1() } // This code previously came after AddBorderWidth - bool bRelWidth = pCell->IsPrcWidthOption(); + bool bRelWidth = pCell->IsPercentWidthOption(); sal_uInt16 nWidth = pCell->GetWidthOption(); // A NOWRAP option applies to text and tables, but is @@ -1121,7 +1121,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv m_bUseRelWidth = false; if( m_nWidthOption ) { - if( m_bPrcWidthOption ) + if( m_bPercentWidthOption ) { OSL_ENSURE( m_nWidthOption<=100, "Percentage value too high" ); if( m_nWidthOption > 100 ) @@ -1734,7 +1734,7 @@ bool SwHTMLTableLayout::Resize( sal_uInt16 nAbsAvail, bool bRecalc, if( !bRecalc && ( !m_bMustResize || (m_nLastResizeAbsAvail==nAbsAvail) || (nAbsAvail<=m_nMin && m_nRelTabWidth==m_nMin) || - (!m_bPrcWidthOption && nAbsAvail>=m_nMax && m_nRelTabWidth==m_nMax) ) ) + (!m_bPercentWidthOption && nAbsAvail>=m_nMax && m_nRelTabWidth==m_nMax) ) ) return false; if( nDelay==HTMLTABLE_RESIZE_NOW ) diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 16edd9b97fee..98ef1e42d6e4 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -2687,7 +2687,7 @@ static Writer& OutCSS1_SvxLineSpacing( Writer& rWrt, const SfxPoolItem& rHt ) const SvxLineSpacingItem& rLSItem = static_cast<const SvxLineSpacingItem&>(rHt); sal_uInt16 nHeight = 0; - sal_uInt16 nPrcHeight = 0; + sal_uInt16 nPercentHeight = 0; SvxLineSpaceRule eLineSpace = rLSItem.GetLineSpaceRule(); switch( rLSItem.GetInterLineSpaceRule() ) { @@ -2701,7 +2701,7 @@ static Writer& OutCSS1_SvxLineSpacing( Writer& rWrt, const SfxPoolItem& rHt ) nHeight = rLSItem.GetLineHeight(); break; case SvxLineSpaceRule::Auto: - nPrcHeight = 100; + nPercentHeight = 100; break; default: ; @@ -2709,7 +2709,7 @@ static Writer& OutCSS1_SvxLineSpacing( Writer& rWrt, const SfxPoolItem& rHt ) } break; case SvxInterLineSpaceRule::Prop: - nPrcHeight = rLSItem.GetPropLineSpace(); + nPercentHeight = rLSItem.GetPropLineSpace(); break; default: @@ -2718,10 +2718,10 @@ static Writer& OutCSS1_SvxLineSpacing( Writer& rWrt, const SfxPoolItem& rHt ) if( nHeight ) rHTMLWrt.OutCSS1_UnitProperty( sCSS1_P_line_height, static_cast<long>(nHeight) ); - else if( nPrcHeight && - !(nPrcHeight < 115 && rHTMLWrt.m_bParaDotLeaders )) // avoid HTML scrollbars and missing descenders + else if( nPercentHeight && + !(nPercentHeight < 115 && rHTMLWrt.m_bParaDotLeaders )) // avoid HTML scrollbars and missing descenders { - OString sHeight(OString::number(nPrcHeight) + "%"); + OString sHeight(OString::number(nPercentHeight) + "%"); rHTMLWrt.OutCSS1_PropertyAscii(sCSS1_P_line_height, sHeight); } @@ -2858,10 +2858,10 @@ static Writer& OutCSS1_SwFormatFrameSize( Writer& rWrt, const SfxPoolItem& rHt, if( nMode & Css1FrameSize::Width ) { - sal_uInt8 nPrcWidth = rFSItem.GetWidthPercent(); - if( nPrcWidth ) + sal_uInt8 nPercentWidth = rFSItem.GetWidthPercent(); + if( nPercentWidth ) { - OString sOut(OString::number(nPrcWidth) + "%"); + OString sOut(OString::number(nPercentWidth) + "%"); rHTMLWrt.OutCSS1_PropertyAscii(sCSS1_P_width, sOut); } else if( nMode & Css1FrameSize::Pixel ) @@ -2894,10 +2894,10 @@ static Writer& OutCSS1_SwFormatFrameSize( Writer& rWrt, const SfxPoolItem& rHt, if( bOutHeight ) { - sal_uInt8 nPrcHeight = rFSItem.GetHeightPercent(); - if( nPrcHeight ) + sal_uInt8 nPercentHeight = rFSItem.GetHeightPercent(); + if( nPercentHeight ) { - OString sOut(OString::number(nPrcHeight) + "%"); + OString sOut(OString::number(nPercentHeight) + "%"); rHTMLWrt.OutCSS1_PropertyAscii(sCSS1_P_height, sOut); } else if( nMode & Css1FrameSize::Pixel ) diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index c0ace59b4801..67da1d78dece 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -2030,16 +2030,16 @@ void SwHTMLParser::SetVarSize( SvxCSS1PropertyInfo const &rPropInfo, SwTwips nDfltWidth, sal_uInt8 nDfltPrcWidth ) { SwTwips nWidth = nDfltWidth, nHeight = MINFLY; - sal_uInt8 nPrcWidth = nDfltPrcWidth, nPrcHeight = 0; + sal_uInt8 nPercentWidth = nDfltPrcWidth, nPercentHeight = 0; switch( rPropInfo.m_eWidthType ) { case SVX_CSS1_LTYPE_PERCENTAGE: - nPrcWidth = rPropInfo.m_nWidth > 0 ? static_cast<sal_uInt8>(rPropInfo.m_nWidth) : 1; + nPercentWidth = rPropInfo.m_nWidth > 0 ? static_cast<sal_uInt8>(rPropInfo.m_nWidth) : 1; nWidth = MINFLY; break; case SVX_CSS1_LTYPE_TWIP: nWidth = std::max<long>(rPropInfo.m_nWidth, MINFLY); - nPrcWidth = 0; + nPercentWidth = 0; break; default: ; @@ -2047,7 +2047,7 @@ void SwHTMLParser::SetVarSize( SvxCSS1PropertyInfo const &rPropInfo, switch( rPropInfo.m_eHeightType ) { case SVX_CSS1_LTYPE_PERCENTAGE: - nPrcHeight = rPropInfo.m_nHeight > 0 ? static_cast<sal_uInt8>(rPropInfo.m_nHeight) : 1; + nPercentHeight = rPropInfo.m_nHeight > 0 ? static_cast<sal_uInt8>(rPropInfo.m_nHeight) : 1; break; case SVX_CSS1_LTYPE_TWIP: // Netscape and MS-IE interpreting the height incorrectly as minimum height, @@ -2059,8 +2059,8 @@ void SwHTMLParser::SetVarSize( SvxCSS1PropertyInfo const &rPropInfo, } SwFormatFrameSize aFrameSize( SwFrameSize::Minimum, nWidth, nHeight ); - aFrameSize.SetWidthPercent( nPrcWidth ); - aFrameSize.SetHeightPercent( nPrcHeight ); + aFrameSize.SetWidthPercent( nPercentWidth ); + aFrameSize.SetHeightPercent( nPercentHeight ); rFrameItemSet.Put( aFrameSize ); } diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index 606247c48b2b..dabb479722c8 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -257,7 +257,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) OUString aId, aStyle, aClass; long nWidth=0, nHeight=0; - bool bPrcWidth = false, bDirection = false, bBGColor = false; + bool bPercentWidth = false, bDirection = false, bBGColor = false; Size aSpace( 0, 0 ); sal_Int16 eVertOri = text::VertOrientation::TOP; sal_Int16 eHoriOri = text::HoriOrientation::NONE; @@ -320,8 +320,8 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) case HtmlOptionId::WIDTH: // first only save as pixel value! nWidth = rOption.GetNumber(); - bPrcWidth = rOption.GetString().indexOf('%') != -1; - if( bPrcWidth && nWidth>100 ) + bPercentWidth = rOption.GetString().indexOf('%') != -1; + if( bPercentWidth && nWidth>100 ) nWidth = 100; break; @@ -461,7 +461,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) } // now set the size - Size aTwipSz( bPrcWidth ? 0 : nWidth, nHeight ); + Size aTwipSz( bPercentWidth ? 0 : nWidth, nHeight ); if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() ) { aTwipSz = Application::GetDefaultDevice() @@ -472,13 +472,13 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) { aTwipSz.setWidth( aPropInfo.m_nWidth ); nWidth = 1; // != 0; - bPrcWidth = false; + bPercentWidth = false; } if( SVX_CSS1_LTYPE_TWIP== aPropInfo.m_eHeightType ) aTwipSz.setHeight( aPropInfo.m_nHeight ); m_bFixMarqueeWidth = false; - if( !nWidth || bPrcWidth ) + if( !nWidth || bPercentWidth ) { if( m_xTable ) { @@ -495,7 +495,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) // adjust the width. No width specification is treated as // 100 percent. nWidth = 100; - bPrcWidth = true; + bPercentWidth = true; } aTwipSz.setWidth( MINLAY ); } @@ -527,7 +527,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) // otherwise the table would have to be public and that also isn't pretty. // The global pTable also can't be used, because the marquee can also be // in a sub-table. - if( pCurTable && bPrcWidth) + if( pCurTable && bPercentWidth) RegisterDrawObjectToTable( pCurTable, m_pMarquee, static_cast<sal_uInt8>(nWidth) ); } diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 8558fdab4b43..70fd94ea3360 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -679,13 +679,13 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, SwFrameSize::Fixed == static_cast<const SwFormatFrameSize *>(pItem)->GetHeightSizeType()) ) { const SwFormatFrameSize *pFSItem = static_cast<const SwFormatFrameSize *>(pItem); - sal_uInt8 nPrcWidth = pFSItem->GetWidthPercent(); - sal_uInt8 nPrcHeight = pFSItem->GetHeightPercent(); + sal_uInt8 nPercentWidth = pFSItem->GetWidthPercent(); + sal_uInt8 nPercentHeight = pFSItem->GetHeightPercent(); // Size of the object in Twips without margins - Size aTwipSz( (nPrcWidth ? 0 + Size aTwipSz( (nPercentWidth ? 0 : pFSItem->GetWidth()-aTwipSpc.Width()), - (nPrcHeight ? 0 + (nPercentHeight ? 0 : pFSItem->GetHeight()-aTwipSpc.Height()) ); OSL_ENSURE( aTwipSz.Width() >= 0 && aTwipSz.Height() >= 0, @@ -709,24 +709,24 @@ OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, } if( (nFrameOpts & HtmlFrmOpts::Width) && - ((nPrcWidth && nPrcWidth!=255) || aPixelSz.Width()) ) + ((nPercentWidth && nPercentWidth!=255) || aPixelSz.Width()) ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width). append("=\""); - if( nPrcWidth ) - sOut.append(static_cast<sal_Int32>(nPrcWidth)).append('%'); + if( nPercentWidth ) + sOut.append(static_cast<sal_Int32>(nPercentWidth)).append('%'); else sOut.append(static_cast<sal_Int32>(aPixelSz.Width())); sOut.append("\""); } if( (nFrameOpts & HtmlFrmOpts::Height) && - ((nPrcHeight && nPrcHeight!=255) || aPixelSz.Height()) ) + ((nPercentHeight && nPercentHeight!=255) || aPixelSz.Height()) ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_height). append("=\""); - if( nPrcHeight ) - sOut.append(static_cast<sal_Int32>(nPrcHeight)).append('%'); + if( nPercentHeight ) + sOut.append(static_cast<sal_Int32>(nPercentHeight)).append('%'); else sOut.append(static_cast<sal_Int32>(aPixelSz.Height())); sOut.append("\""); @@ -945,13 +945,13 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma SwFrameSize::Fixed == static_cast<const SwFormatFrameSize *>(pItem)->GetHeightSizeType()) ) { const SwFormatFrameSize *pFSItem = static_cast<const SwFormatFrameSize *>(pItem); - sal_uInt8 nPrcWidth = pFSItem->GetWidthPercent(); - sal_uInt8 nPrcHeight = pFSItem->GetHeightPercent(); + sal_uInt8 nPercentWidth = pFSItem->GetWidthPercent(); + sal_uInt8 nPercentHeight = pFSItem->GetHeightPercent(); // Size of the object in Twips without margins - Size aTwipSz( (nPrcWidth ? 0 + Size aTwipSz( (nPercentWidth ? 0 : pFSItem->GetWidth()-aTwipSpc.Width()), - (nPrcHeight ? 0 + (nPercentHeight ? 0 : pFSItem->GetHeight()-aTwipSpc.Height()) ); OSL_ENSURE( aTwipSz.Width() >= 0 && aTwipSz.Height() >= 0, @@ -975,22 +975,22 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma } if( (nFrameOptions & HtmlFrmOpts::Width) && - ((nPrcWidth && nPrcWidth!=255) || aPixelSz.Width()) ) + ((nPercentWidth && nPercentWidth!=255) || aPixelSz.Width()) ) { OString sWidth; - if (nPrcWidth) - sWidth = OString::number(static_cast<sal_Int32>(nPrcWidth)) + "%"; + if (nPercentWidth) + sWidth = OString::number(static_cast<sal_Int32>(nPercentWidth)) + "%"; else sWidth = OString::number(static_cast<sal_Int32>(aPixelSz.Width())); aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_width, sWidth); } if( (nFrameOptions & HtmlFrmOpts::Height) && - ((nPrcHeight && nPrcHeight!=255) || aPixelSz.Height()) ) + ((nPercentHeight && nPercentHeight!=255) || aPixelSz.Height()) ) { OString sHeight; - if (nPrcHeight) - sHeight = OString::number(static_cast<sal_Int32>(nPrcHeight)) + "%"; + if (nPercentHeight) + sHeight = OString::number(static_cast<sal_Int32>(nPercentHeight)) + "%"; else sHeight = OString::number(static_cast<sal_Int32>(aPixelSz.Height())); aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_height, sHeight); diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 3eb65061e849..b585055ae8aa 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -331,8 +331,8 @@ void SwHTMLParser::InsertImage() sal_uInt16 nBorder = (m_xAttrTab->pINetFormat ? 1 : 0); bool bIsMap = false; - bool bPrcWidth = false; - bool bPrcHeight = false; + bool bPercentWidth = false; + bool bPercentHeight = false; OUString sWidthAsString, sHeightAsString; SvxMacroItem aMacroItem(RES_FRMMACRO); @@ -379,8 +379,8 @@ void SwHTMLParser::InsertImage() // for now only store as pixel value! nWidth = rOption.GetNumber(); sWidthAsString = rOption.GetString(); - bPrcWidth = (sWidthAsString.indexOf('%') != -1); - if( bPrcWidth && nWidth>100 ) + bPercentWidth = (sWidthAsString.indexOf('%') != -1); + if( bPercentWidth && nWidth>100 ) nWidth = 100; // width|height = "auto" means viewing app decides the size // i.e. proceed as if no particular size was provided @@ -390,8 +390,8 @@ void SwHTMLParser::InsertImage() // for now only store as pixel value! nHeight = rOption.GetNumber(); sHeightAsString = rOption.GetString(); - bPrcHeight = (sHeightAsString.indexOf('%') != -1); - if( bPrcHeight && nHeight>100 ) + bPercentHeight = (sHeightAsString.indexOf('%') != -1); + if( bPercentHeight && nHeight>100 ) nHeight = 100; // the same as above w/ HtmlOptionId::WIDTH bHeightProvided = (sHeightAsString != "auto"); @@ -588,7 +588,7 @@ IMAGE_SETEVENT: // set other CSS1 attributes SetFrameFormatAttrs( aItemSet, HtmlFrameFormatFlags::Box, aFrameSet ); - Size aTwipSz( bPrcWidth ? 0 : nWidth, bPrcHeight ? 0 : nHeight ); + Size aTwipSz( bPercentWidth ? 0 : nWidth, bPercentHeight ? 0 : nHeight ); if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() ) { if (bWidthProvided || bHeightProvided || // attributes imply pixel! @@ -611,12 +611,12 @@ IMAGE_SETEVENT: case SVX_CSS1_LTYPE_TWIP: aTwipSz.setWidth( aPropInfo.m_nWidth ); nWidth = 1; // != 0 - bPrcWidth = false; + bPercentWidth = false; break; case SVX_CSS1_LTYPE_PERCENTAGE: aTwipSz.setWidth( 0 ); nWidth = aPropInfo.m_nWidth; - bPrcWidth = true; + bPercentWidth = true; break; default: ; @@ -626,12 +626,12 @@ IMAGE_SETEVENT: case SVX_CSS1_LTYPE_TWIP: aTwipSz.setHeight( aPropInfo.m_nHeight ); nHeight = 1; // != 0 - bPrcHeight = false; + bPercentHeight = false; break; case SVX_CSS1_LTYPE_PERCENTAGE: aTwipSz.setHeight( 0 ); nHeight = aPropInfo.m_nHeight; - bPrcHeight = true; + bPercentHeight = true; break; default: ; @@ -642,11 +642,11 @@ IMAGE_SETEVENT: bool bChangeFrameSize = false; // Change frame format later? bool bRequestGrfNow = false; bool bSetScaleImageMap = false; - sal_uInt8 nPrcWidth = 0, nPrcHeight = 0; + sal_uInt8 nPercentWidth = 0, nPercentHeight = 0; - // bPrcWidth / bPrcHeight means we have a percent size. If that's not the case and we have no + // bPercentWidth / bPercentHeight means we have a percent size. If that's not the case and we have no // size from nWidth / nHeight either, then inspect the image header. - if ((!bPrcWidth && !nWidth) && (!bPrcHeight && !nHeight) && allowAccessLink(*m_xDoc)) + if ((!bPercentWidth && !nWidth) && (!bPercentHeight && !nHeight) && allowAccessLink(*m_xDoc)) { GraphicDescriptor aDescriptor(aGraphicURL); if (aDescriptor.Detect(/*bExtendedInfo=*/true)) @@ -681,10 +681,10 @@ IMAGE_SETEVENT: else if( nWidth ) { // a percentage value - if( bPrcWidth ) + if( bPercentWidth ) { - nPrcWidth = static_cast<sal_uInt8>(nWidth); - nPrcHeight = 255; + nPercentWidth = static_cast<sal_uInt8>(nWidth); + nPercentHeight = 255; } else { @@ -693,10 +693,10 @@ IMAGE_SETEVENT: } else if( nHeight ) { - if( bPrcHeight ) + if( bPercentHeight ) { - nPrcHeight = static_cast<sal_uInt8>(nHeight); - nPrcWidth = 255; + nPercentHeight = static_cast<sal_uInt8>(nHeight); + nPercentWidth = 255; } else { @@ -709,11 +709,11 @@ IMAGE_SETEVENT: // Width and height were given and don't need to be set bSetTwipSize = false; - if( bPrcWidth ) - nPrcWidth = static_cast<sal_uInt8>(nWidth); + if( bPercentWidth ) + nPercentWidth = static_cast<sal_uInt8>(nWidth); - if( bPrcHeight ) - nPrcHeight = static_cast<sal_uInt8>(nHeight); + if( bPercentHeight ) + nPercentHeight = static_cast<sal_uInt8>(nHeight); } // set image map @@ -734,7 +734,7 @@ IMAGE_SETEVENT: { SwFormatURL aURL; aURL.SetMap( pImgMap );// is copied - bSetScaleImageMap = !nPrcWidth || !nPrcHeight; + bSetScaleImageMap = !nPercentWidth || !nPercentHeight; aFrameSet.Put( aURL ); } else @@ -751,7 +751,7 @@ IMAGE_SETEVENT: } // observe minimum values !! - if( nPrcWidth ) + if( nPercentWidth ) { OSL_ENSURE( !aTwipSz.Width(), "Why is a width set if we already have percentage value?" ); @@ -764,7 +764,7 @@ IMAGE_SETEVENT: if( aTwipSz.Width() < MINFLY ) aTwipSz.setWidth( MINFLY ); } - if( nPrcHeight ) + if( nPercentHeight ) { OSL_ENSURE( !aTwipSz.Height(), "Why is a height set if we already have percentage value?" ); @@ -779,8 +779,8 @@ IMAGE_SETEVENT: } SwFormatFrameSize aFrameSize( SwFrameSize::Fixed, aTwipSz.Width(), aTwipSz.Height() ); - aFrameSize.SetWidthPercent( nPrcWidth ); - aFrameSize.SetHeightPercent( nPrcHeight ); + aFrameSize.SetWidthPercent( nPercentWidth ); + aFrameSize.SetHeightPercent( nPercentHeight ); aFrameSet.Put( aFrameSize ); const SwNodeType eNodeType = m_pPam->GetNode().GetNodeType(); diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 30b12aafbdc3..fc224925153a 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -163,14 +163,14 @@ OUString lcl_CalculateFileName(const OUString* pOrigFileName, const Graphic& rGr void SwHTMLParser::SetFixSize( const Size& rPixSize, const Size& rTwipDfltSize, - bool bPrcWidth, bool bPrcHeight, + bool bPercentWidth, bool bPercentHeight, SvxCSS1PropertyInfo const & rCSS1PropInfo, SfxItemSet& rFlyItemSet ) { // convert absolute size values into Twip - sal_uInt8 nPrcWidth = 0, nPrcHeight = 0; - Size aTwipSz( bPrcWidth || USHRT_MAX==rPixSize.Width() ? 0 : rPixSize.Width(), - bPrcHeight || USHRT_MAX==rPixSize.Height() ? 0 : rPixSize.Height() ); + sal_uInt8 nPercentWidth = 0, nPercentHeight = 0; + Size aTwipSz( bPercentWidth || USHRT_MAX==rPixSize.Width() ? 0 : rPixSize.Width(), + bPercentHeight || USHRT_MAX==rPixSize.Height() ? 0 : rPixSize.Height() ); if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() ) { aTwipSz = @@ -181,18 +181,18 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize, // process width if( SVX_CSS1_LTYPE_PERCENTAGE == rCSS1PropInfo.m_eWidthType ) { - nPrcWidth = static_cast<sal_uInt8>(rCSS1PropInfo.m_nWidth); + nPercentWidth = static_cast<sal_uInt8>(rCSS1PropInfo.m_nWidth); aTwipSz.setWidth( rTwipDfltSize.Width() ); } else if( SVX_CSS1_LTYPE_TWIP== rCSS1PropInfo.m_eWidthType ) { aTwipSz.setWidth( rCSS1PropInfo.m_nWidth ); } - else if( bPrcWidth && rPixSize.Width() ) + else if( bPercentWidth && rPixSize.Width() ) { - nPrcWidth = static_cast<sal_uInt8>(rPixSize.Width()); - if( nPrcWidth > 100 ) - nPrcWidth = 100; + nPercentWidth = static_cast<sal_uInt8>(rPixSize.Width()); + if( nPercentWidth > 100 ) + nPercentWidth = 100; aTwipSz.setWidth( rTwipDfltSize.Width() ); } @@ -208,18 +208,18 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize, // process height if( SVX_CSS1_LTYPE_PERCENTAGE == rCSS1PropInfo.m_eHeightType ) { - nPrcHeight = static_cast<sal_uInt8>(rCSS1PropInfo.m_nHeight); + nPercentHeight = static_cast<sal_uInt8>(rCSS1PropInfo.m_nHeight); aTwipSz.setHeight( rTwipDfltSize.Height() ); } else if( SVX_CSS1_LTYPE_TWIP== rCSS1PropInfo.m_eHeightType ) { aTwipSz.setHeight( rCSS1PropInfo.m_nHeight ); } - else if( bPrcHeight && rPixSize.Height() ) + else if( bPercentHeight && rPixSize.Height() ) { - nPrcHeight = static_cast<sal_uInt8>(rPixSize.Height()); - if( nPrcHeight > 100 ) - nPrcHeight = 100; + nPercentHeight = static_cast<sal_uInt8>(rPixSize.Height()); + if( nPercentHeight > 100 ) + nPercentHeight = 100; aTwipSz.setHeight( rTwipDfltSize.Height() ); } @@ -234,8 +234,8 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize, // set size SwFormatFrameSize aFrameSize( SwFrameSize::Fixed, aTwipSz.Width(), aTwipSz.Height() ); - aFrameSize.SetWidthPercent( nPrcWidth ); - aFrameSize.SetHeightPercent( nPrcHeight ); + aFrameSize.SetWidthPercent( nPercentWidth ); + aFrameSize.SetHeightPercent( nPercentHeight ); rFlyItemSet.Put( aFrameSize ); } @@ -351,7 +351,7 @@ bool SwHTMLParser::InsertEmbed() OUString aData; Size aSize( USHRT_MAX, USHRT_MAX ); Size aSpace( USHRT_MAX, USHRT_MAX ); - bool bPrcWidth = false, bPrcHeight = false, bHidden = false; + bool bPercentWidth = false, bPercentHeight = false, bHidden = false; sal_Int16 eVertOri = text::VertOrientation::NONE; sal_Int16 eHoriOri = text::HoriOrientation::NONE; SvCommandList aCmdLst; @@ -396,14 +396,14 @@ bool SwHTMLParser::InsertEmbed() case HtmlOptionId::WIDTH: if( USHRT_MAX==aSize.Width() ) { - bPrcWidth = (rOption.GetString().indexOf('%') != -1); + bPercentWidth = (rOption.GetString().indexOf('%') != -1); aSize.setWidth( static_cast<long>(rOption.GetNumber()) ); } break; case HtmlOptionId::HEIGHT: if( USHRT_MAX==aSize.Height() ) { - bPrcHeight = (rOption.GetString().indexOf('%') != -1); + bPercentHeight = (rOption.GetString().indexOf('%') != -1); aSize.setHeight( static_cast<long>(rOption.GetNumber()) ); } break; @@ -455,7 +455,7 @@ bool SwHTMLParser::InsertEmbed() // Size (0,0) will be changed to (MINFLY, MINFLY) in SetFrameSize() aSize.setWidth( 0 ); aSize.setHeight( 0 ); aSpace.setWidth( 0 ); aSpace.setHeight( 0 ); - bPrcWidth = bPrcHeight = false; + bPercentWidth = bPercentHeight = false; } // prepare the URL @@ -630,7 +630,7 @@ bool SwHTMLParser::InsertEmbed() // and the size of the frame Size aDfltSz( HTML_DFLT_EMBED_WIDTH, HTML_DFLT_EMBED_HEIGHT ); - SetFixSize( aSize, aDfltSz, bPrcWidth, bPrcHeight, aPropInfo, aFrameSet ); + SetFixSize( aSize, aDfltSz, bPercentWidth, bPercentHeight, aPropInfo, aFrameSet ); SetSpace( aSpace, aItemSet, aPropInfo, aFrameSet ); // and insert into the document @@ -697,7 +697,7 @@ void SwHTMLParser::NewObject() sal_Int16 eVertOri = text::VertOrientation::TOP; sal_Int16 eHoriOri = text::HoriOrientation::NONE; - bool bPrcWidth = false, bPrcHeight = false, + bool bPercentWidth = false, bPercentHeight = false, bDeclare = false; // create a new Command list m_pAppletImpl.reset(new SwApplet_Impl( m_xDoc->GetAttrPool() )); @@ -738,11 +738,11 @@ void SwHTMLParser::NewObject() aStandBy = rOption.GetString(); break; case HtmlOptionId::WIDTH: - bPrcWidth = (rOption.GetString().indexOf('%') != -1); + bPercentWidth = (rOption.GetString().indexOf('%') != -1); aSize.setWidth( static_cast<long>(rOption.GetNumber()) ); break; case HtmlOptionId::HEIGHT: - bPrcHeight = (rOption.GetString().indexOf('%') != -1); + bPercentHeight = (rOption.GetString().indexOf('%') != -1); aSize.setHeight( static_cast<long>(rOption.GetNumber()) ); break; case HtmlOptionId::ALIGN: @@ -817,7 +817,7 @@ void SwHTMLParser::NewObject() // and still the size of the frame Size aDfltSz( HTML_DFLT_APPLET_WIDTH, HTML_DFLT_APPLET_HEIGHT ); - SetFixSize( aSize, aDfltSz, bPrcWidth, bPrcHeight, aPropInfo, rFrameSet ); + SetFixSize( aSize, aDfltSz, bPercentWidth, bPercentHeight, aPropInfo, rFrameSet ); SetSpace( aSpace, aItemSet, aPropInfo, rFrameSet ); } #endif @@ -859,7 +859,7 @@ void SwHTMLParser::InsertApplet() OUString aCodeBase, aCode, aName, aAlt, aId, aStyle, aClass; Size aSize( USHRT_MAX, USHRT_MAX ); Size aSpace( 0, 0 ); - bool bPrcWidth = false, bPrcHeight = false, bMayScript = false; + bool bPercentWidth = false, bPercentHeight = false, bMayScript = false; sal_Int16 eVertOri = text::VertOrientation::TOP; sal_Int16 eHoriOri = text::HoriOrientation::NONE; @@ -898,11 +898,11 @@ void SwHTMLParser::InsertApplet() eHoriOri = rOption.GetEnum( aHTMLImgHAlignTable, eHoriOri ); break; case HtmlOptionId::WIDTH: - bPrcWidth = (rOption.GetString().indexOf('%') != -1); + bPercentWidth = (rOption.GetString().indexOf('%') != -1); aSize.setWidth( static_cast<long>(rOption.GetNumber()) ); break; case HtmlOptionId::HEIGHT: - bPrcHeight = (rOption.GetString().indexOf('%') != -1); + bPercentHeight = (rOption.GetString().indexOf('%') != -1); aSize.setHeight( static_cast<long>(rOption.GetNumber()) ); break; case HtmlOptionId::HSPACE: @@ -947,7 +947,7 @@ void SwHTMLParser::InsertApplet() // and still the size or the frame Size aDfltSz( HTML_DFLT_APPLET_WIDTH, HTML_DFLT_APPLET_HEIGHT ); - SetFixSize( aSize, aDfltSz, bPrcWidth, bPrcHeight, aPropInfo, rFrameSet ); + SetFixSize( aSize, aDfltSz, bPercentWidth, bPercentHeight, aPropInfo, rFrameSet ); SetSpace( aSpace, aItemSet, aPropInfo, rFrameSet ); } #endif @@ -1019,7 +1019,7 @@ void SwHTMLParser::InsertFloatingFrame() OUString aAlt, aId, aStyle, aClass; Size aSize( USHRT_MAX, USHRT_MAX ); Size aSpace( 0, 0 ); - bool bPrcWidth = false, bPrcHeight = false; + bool bPercentWidth = false, bPercentHeight = false; sal_Int16 eVertOri = text::VertOrientation::TOP; sal_Int16 eHoriOri = text::HoriOrientation::NONE; @@ -1047,11 +1047,11 @@ void SwHTMLParser::InsertFloatingFrame() eHoriOri = rOption.GetEnum( aHTMLImgHAlignTable, eHoriOri ); break; case HtmlOptionId::WIDTH: - bPrcWidth = (rOption.GetString().indexOf('%') != -1); + bPercentWidth = (rOption.GetString().indexOf('%') != -1); aSize.setWidth( static_cast<long>(rOption.GetNumber()) ); break; case HtmlOptionId::HEIGHT: - bPrcHeight = (rOption.GetString().indexOf('%') != -1); + bPercentHeight = (rOption.GetString().indexOf('%') != -1); aSize.setHeight( static_cast<long>(rOption.GetNumber()) ); break; case HtmlOptionId::HSPACE: @@ -1128,7 +1128,7 @@ void SwHTMLParser::InsertFloatingFrame() // and still the size of the frame Size aDfltSz( HTML_DFLT_APPLET_WIDTH, HTML_DFLT_APPLET_HEIGHT ); - SetFixSize( aSize, aDfltSz, bPrcWidth, bPrcHeight, aPropInfo, aFrameSet ); + SetFixSize( aSize, aDfltSz, bPercentWidth, bPercentHeight, aPropInfo, aFrameSet ); SetSpace( aSpace, aItemSet, aPropInfo, aFrameSet ); // and insert into the document diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index 4370f81bc152..1a14cc25bf10 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -545,7 +545,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) OUString aStyle, aClass, aLang, aDir; long nWidth = 100; sal_uInt16 nCols = columnsFromCss, nGutter = 10; - bool bPrcWidth = true; + bool bPercentWidth = true; const HTMLOptions& rHTMLOptions = GetOptions(); for (size_t i = rHTMLOptions.size(); i; ) @@ -573,8 +573,8 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) break; case HtmlOptionId::WIDTH: nWidth = rOption.GetNumber(); - bPrcWidth = (rOption.GetString().indexOf('%') != -1); - if( bPrcWidth && nWidth>100 ) + bPercentWidth = (rOption.GetString().indexOf('%') != -1); + if( bPercentWidth && nWidth>100 ) nWidth = 100; break; case HtmlOptionId::GUTTER: @@ -602,16 +602,16 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) aItemSet, aPropInfo, &aLang, &aDir ); // Calculate width. - sal_uInt8 nPrcWidth = bPrcWidth ? static_cast<sal_uInt8>(nWidth) : 0; + sal_uInt8 nPercentWidth = bPercentWidth ? static_cast<sal_uInt8>(nWidth) : 0; SwTwips nTwipWidth = 0; - if( !bPrcWidth && nWidth && Application::GetDefaultDevice() ) + if( !bPercentWidth && nWidth && Application::GetDefaultDevice() ) { nTwipWidth = Application::GetDefaultDevice() ->PixelToLogic( Size(nWidth, 0), MapMode(MapUnit::MapTwip) ).Width(); } - if( !nPrcWidth && nTwipWidth < MINFLY ) + if( !nPercentWidth && nTwipWidth < MINFLY ) nTwipWidth = MINFLY; // Do positioning. @@ -628,7 +628,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) // The width is either the WIDTH attribute's value or contained // in some style option. - SetVarSize( aPropInfo, aFrameItemSet, nTwipWidth, nPrcWidth ); + SetVarSize( aPropInfo, aFrameItemSet, nTwipWidth, nPercentWidth ); SetSpace( Size(0,0), aItemSet, aPropInfo, aFrameItemSet ); diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 369bd413a521..3afb79aa47a6 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -100,7 +100,7 @@ struct HTMLTableOptions HTMLTableFrame eFrame; HTMLTableRules eRules; - bool bPrcWidth : 1; + bool bPercentWidth : 1; bool bTableAdjust : 1; bool bBGColor : 1; @@ -392,7 +392,7 @@ class HTMLTable OUString m_aDir; std::unique_ptr<SdrObjects> m_pResizeDrawObjects;// SDR objects - std::unique_ptr<std::vector<sal_uInt16>> m_pDrawObjectPrcWidths; // column of draw object and its rel. width + std::unique_ptr<std::vector<sal_uInt16>> m_pDrawObjectPercentWidths; // column of draw object and its rel. width HTMLTableRows m_aRows; ///< table rows HTMLTableColumns m_aColumns; ///< table columns @@ -450,7 +450,7 @@ private: bool const m_bHasToFly; bool const m_bFixedCols; bool m_bColSpec; // where there COL(GROUP)-elements? - bool const m_bPrcWidth; // width is declared in % + bool const m_bPercentWidth; // width is declared in % SwHTMLParser *m_pParser; // the current parser std::unique_ptr<HTMLTableCnts> m_xParentContents; @@ -624,7 +624,7 @@ public: sal_uInt16 IncGrfsThatResize() { return m_pSwTable ? const_cast<SwTable *>(m_pSwTable)->IncGrfsThatResize() : 0; } - void RegisterDrawObject( SdrObject *pObj, sal_uInt8 nPrcWidth ); + void RegisterDrawObject( SdrObject *pObj, sal_uInt8 nPercentWidth ); const SwTable *GetSwTable() const { return m_pSwTable; } @@ -1045,7 +1045,7 @@ HTMLTable::HTMLTable(SwHTMLParser* pPars, m_bHasParentSection( bHasParentSec ), m_bHasToFly( bHasToFlw ), m_bFixedCols( rOptions.nCols>0 ), - m_bPrcWidth( rOptions.bPrcWidth ), + m_bPercentWidth( rOptions.bPercentWidth ), m_pParser( pPars ), m_nWidth( rOptions.nWidth ), m_nHeight( rOptions.nHeight ), @@ -1082,7 +1082,7 @@ HTMLTable::~HTMLTable() m_pParser->DeregisterHTMLTable(this); m_pResizeDrawObjects.reset(); - m_pDrawObjectPrcWidths.reset(); + m_pDrawObjectPercentWidths.reset(); m_pContext.reset(); @@ -1091,7 +1091,7 @@ HTMLTable::~HTMLTable() const std::shared_ptr<SwHTMLTableLayout>& HTMLTable::CreateLayoutInfo() { - sal_uInt16 nW = m_bPrcWidth ? m_nWidth : SwHTMLParser::ToTwips( m_nWidth ); + sal_uInt16 nW = m_bPercentWidth ? m_nWidth : SwHTMLParser::ToTwips( m_nWidth ); sal_uInt16 nBorderWidth = GetBorderWidth( m_aBorderLine, true ); sal_uInt16 nLeftBorderWidth = @@ -1102,7 +1102,7 @@ const std::shared_ptr<SwHTMLTableLayout>& HTMLTable::CreateLayoutInfo() m_xLayoutInfo.reset(new SwHTMLTableLayout( m_pSwTable, m_nRows, m_nCols, m_bFixedCols, m_bColSpec, - nW, m_bPrcWidth, m_nBorder, m_nCellPadding, + nW, m_bPercentWidth, m_nBorder, m_nCellPadding, m_nCellSpacing, m_eTableAdjust, m_nLeftMargin, m_nRightMargin, nBorderWidth, nLeftBorderWidth, nRightBorderWidth)); @@ -2315,7 +2315,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, { // The table should go in a text frame and it's narrower than the // available space and not 100% wide. So it gets a border - eHoriOri = m_bPrcWidth ? text::HoriOrientation::FULL : text::HoriOrientation::LEFT; + eHoriOri = m_bPercentWidth ? text::HoriOrientation::FULL : text::HoriOrientation::LEFT; } else switch (m_eTableAdjust) { @@ -2358,7 +2358,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, pFrameFormat->SetFormatAttr( aLRItem ); } - if (m_bPrcWidth && text::HoriOrientation::FULL != eHoriOri) + if (m_bPercentWidth && text::HoriOrientation::FULL != eHoriOri) { pFrameFormat->LockModify(); SwFormatFrameSize aFrameSize( pFrameFormat->GetFrameSize() ); @@ -2443,7 +2443,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, m_xLayoutInfo->SetMayBeInFlyFrame( bIsInFlyFrame ); // Only tables with relative width or without width should be modified - m_xLayoutInfo->SetMustResize( m_bPrcWidth || !m_nWidth ); + m_xLayoutInfo->SetMustResize( m_bPercentWidth || !m_nWidth ); if (!pLine1->GetTabBoxes().empty()) m_xLayoutInfo->SetWidths(); @@ -2458,9 +2458,9 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, for( sal_uInt16 i=0; i<nCount; i++ ) { SdrObject *pObj = (*m_pResizeDrawObjects)[i]; - sal_uInt16 nRow = (*m_pDrawObjectPrcWidths)[3*i]; - sal_uInt16 nCol = (*m_pDrawObjectPrcWidths)[3*i+1]; - sal_uInt8 nPrcWidth = static_cast<sal_uInt8>((*m_pDrawObjectPrcWidths)[3*i+2]); + sal_uInt16 nRow = (*m_pDrawObjectPercentWidths)[3*i]; + sal_uInt16 nCol = (*m_pDrawObjectPercentWidths)[3*i+1]; + sal_uInt8 nPercentWidth = static_cast<sal_uInt8>((*m_pDrawObjectPercentWidths)[3*i+2]); SwHTMLTableLayoutCell *pLayoutCell = m_xLayoutInfo->GetCell( nRow, nCol ); @@ -2468,7 +2468,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, sal_uInt16 nWidth2, nDummy; m_xLayoutInfo->GetAvail( nCol, nColSpan, nWidth2, nDummy ); - nWidth2 = static_cast< sal_uInt16 >((static_cast<long>(m_nWidth) * nPrcWidth) / 100); + nWidth2 = static_cast< sal_uInt16 >((static_cast<long>(m_nWidth) * nPercentWidth) / 100); SwHTMLParser::ResizeDrawObject( pObj, nWidth2 ); } @@ -2490,17 +2490,17 @@ void HTMLTable::SetTable( const SwStartNode *pStNd, std::unique_ptr<HTMLTableCon m_bForceFrame = bFrcFrame; } -void HTMLTable::RegisterDrawObject( SdrObject *pObj, sal_uInt8 nPrcWidth ) +void HTMLTable::RegisterDrawObject( SdrObject *pObj, sal_uInt8 nPercentWidth ) { if( !m_pResizeDrawObjects ) m_pResizeDrawObjects.reset(new SdrObjects); m_pResizeDrawObjects->push_back( pObj ); - if( !m_pDrawObjectPrcWidths ) - m_pDrawObjectPrcWidths.reset(new std::vector<sal_uInt16>); - m_pDrawObjectPrcWidths->push_back( m_nCurrentRow ); - m_pDrawObjectPrcWidths->push_back( m_nCurrentColumn ); - m_pDrawObjectPrcWidths->push_back( static_cast<sal_uInt16>(nPrcWidth) ); + if( !m_pDrawObjectPercentWidths ) + m_pDrawObjectPercentWidths.reset(new std::vector<sal_uInt16>); + m_pDrawObjectPercentWidths->push_back( m_nCurrentRow ); + m_pDrawObjectPercentWidths->push_back( m_nCurrentColumn ); + m_pDrawObjectPercentWidths->push_back( static_cast<sal_uInt16>(nPercentWidth) ); } void HTMLTable::MakeParentContents() @@ -2848,7 +2848,7 @@ class CellSaveStruct : public SectionSaveStruct sal_Int16 m_eVertOri; bool const m_bHead : 1; - bool m_bPrcWidth : 1; + bool m_bPercentWidth : 1; bool m_bHasNumFormat : 1; bool m_bHasValue : 1; bool m_bBGColor : 1; @@ -2888,7 +2888,7 @@ CellSaveStruct::CellSaveStruct( SwHTMLParser& rParser, HTMLTable const *pCurTabl m_nNoBreakEndContentPos( 0 ), m_eVertOri( pCurTable->GetInheritedVertOri() ), m_bHead( bHd ), - m_bPrcWidth( false ), + m_bPercentWidth( false ), m_bHasNumFormat( false ), m_bHasValue( false ), m_bBGColor( false ), @@ -2933,8 +2933,8 @@ CellSaveStruct::CellSaveStruct( SwHTMLParser& rParser, HTMLTable const *pCurTabl break; case HtmlOptionId::WIDTH: m_nWidth = static_cast<sal_uInt16>(rOption.GetNumber()); // Just for Netscape - m_bPrcWidth = (rOption.GetString().indexOf('%') != -1); - if( m_bPrcWidth && m_nWidth>100 ) + m_bPercentWidth = (rOption.GetString().indexOf('%') != -1); + if( m_bPercentWidth && m_nWidth>100 ) m_nWidth = 100; break; case HtmlOptionId::HEIGHT: @@ -3080,7 +3080,7 @@ void CellSaveStruct::InsertCell( SwHTMLParser& rParser, rParser.CreateBrushItem(m_bBGColor ? &m_aBGColor : nullptr, m_aBGImage, m_aStyle, m_aId, m_aClass)); pCurTable->InsertCell( m_xCnts, m_nRowSpan, m_nColSpan, m_nWidth, - m_bPrcWidth, m_nHeight, m_eVertOri, xBrushItem, m_xBoxItem, + m_bPercentWidth, m_nHeight, m_eVertOri, xBrushItem, m_xBoxItem, m_bHasNumFormat, m_nNumFormat, m_bHasValue, m_nValue, m_bNoWrap ); Restore( rParser ); @@ -3188,9 +3188,9 @@ sal_uInt16 SwHTMLParser::IncGrfsThatResizeTable() } void SwHTMLParser::RegisterDrawObjectToTable( HTMLTable *pCurTable, - SdrObject *pObj, sal_uInt8 nPrcWidth ) + SdrObject *pObj, sal_uInt8 nPercentWidth ) { - pCurTable->RegisterDrawObject( pObj, nPrcWidth ); + pCurTable->RegisterDrawObject( pObj, nPercentWidth ); } void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, @@ -4756,7 +4756,7 @@ HTMLTableOptions::HTMLTableOptions( const HTMLOptions& rOptions, nHSpace( 0 ), nVSpace( 0 ), eAdjust( eParentAdjust ), eVertOri( text::VertOrientation::CENTER ), eFrame( HTMLTableFrame::Void ), eRules( HTMLTableRules::NONE ), - bPrcWidth( false ), + bPercentWidth( false ), bTableAdjust( false ), bBGColor( false ), aBorderColor( COL_GRAY ) @@ -4777,8 +4777,8 @@ HTMLTableOptions::HTMLTableOptions( const HTMLOptions& rOptions, break; case HtmlOptionId::WIDTH: nWidth = static_cast<sal_uInt16>(rOption.GetNumber()); - bPrcWidth = (rOption.GetString().indexOf('%') != -1); - if( bPrcWidth && nWidth>100 ) + bPercentWidth = (rOption.GetString().indexOf('%') != -1); + if( bPercentWidth && nWidth>100 ) nWidth = 100; break; case HtmlOptionId::HEIGHT: @@ -4869,7 +4869,7 @@ HTMLTableOptions::HTMLTableOptions( const HTMLOptions& rOptions, if( nCols && !nWidth ) { nWidth = 100; - bPrcWidth = true; + bPercentWidth = true; } // If BORDER=0 or no BORDER given, then there shouldn't be a border diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index b34ae8485d6e..34a56cf818b7 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -320,13 +320,13 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, long nWidth = 0; bool bOutWidth = true; - sal_uInt32 nPrcWidth = SAL_MAX_UINT32; + sal_uInt32 nPercentWidth = SAL_MAX_UINT32; if( m_bLayoutExport ) { - if( pCell->HasPrcWidthOpt() ) + if( pCell->HasPercentWidthOpt() ) { - nPrcWidth = pCell->GetWidthOpt(); + nPercentWidth = pCell->GetWidthOpt(); } else { @@ -338,7 +338,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, else { if( HasRelWidths() ) - nPrcWidth = GetPrcWidth(nCol, nColSpan); + nPercentWidth = GetPercentWidth(nCol, nColSpan); else nWidth = GetAbsWidth( nCol, nColSpan ); } @@ -369,9 +369,9 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width). append("=\""); - if( nPrcWidth != SAL_MAX_UINT32 ) + if( nPercentWidth != SAL_MAX_UINT32 ) { - sOut.append(static_cast<sal_Int32>(nPrcWidth)).append('%'); + sOut.append(static_cast<sal_Int32>(nPercentWidth)).append('%'); } else { @@ -875,7 +875,7 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode, // NONE means that no horizontal alignment was outputted. sal_Int16 eFlyHoriOri = text::HoriOrientation::NONE; css::text::WrapTextMode eSurround = css::text::WrapTextMode_NONE; - sal_uInt8 nFlyPrcWidth = 0; + sal_uInt8 nFlyPercentWidth = 0; long nFlyWidth = 0; sal_uInt16 nFlyHSpace = 0; sal_uInt16 nFlyVSpace = 0; @@ -883,7 +883,7 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode, { eSurround = pFlyFrameFormat->GetSurround().GetSurround(); const SwFormatFrameSize& rFrameSize = pFlyFrameFormat->GetFrameSize(); - nFlyPrcWidth = rFrameSize.GetWidthPercent(); + nFlyPercentWidth = rFrameSize.GetWidthPercent(); nFlyWidth = rFrameSize.GetSize().Width(); eFlyHoriOri = pFlyFrameFormat->GetHoriOrient().GetHoriOrient(); @@ -910,7 +910,7 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode, const SwFormatFrameSize& rFrameSize = pFormat->GetFrameSize(); long nWidth = rFrameSize.GetSize().Width(); - sal_uInt8 nPrcWidth = rFrameSize.GetWidthPercent(); + sal_uInt8 nPercentWidth = rFrameSize.GetWidthPercent(); sal_uInt16 nBaseWidth = static_cast<sal_uInt16>(nWidth); sal_Int16 eTabHoriOri = pFormat->GetHoriOrient().GetHoriOrient(); @@ -944,10 +944,10 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode, } } - else if( nPrcWidth ) + else if( nPercentWidth ) { // Without a right border the %-width is maintained. - nWidth = nPrcWidth; + nWidth = nPercentWidth; bRelWidths = true; } else @@ -968,10 +968,10 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode, default: // In all other case it's possible to use directly an absolute // or relative width. - if( nPrcWidth ) + if( nPercentWidth ) { bRelWidths = true; - nWidth = nPrcWidth; + nWidth = nPercentWidth; } break; } @@ -1020,8 +1020,8 @@ Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode, // relative width <100% into frames is to blame when the result looks bad. if( bRelWidths ) { - nWidth = nFlyPrcWidth ? nFlyPrcWidth : nFlyWidth; - bRelWidths = nFlyPrcWidth > 0; + nWidth = nFlyPercentWidth ? nFlyPercentWidth : nFlyWidth; + bRelWidths = nFlyPercentWidth > 0; } } diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 4a5003c0dd7c..a2c5fa1b9bfb 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -4826,8 +4826,8 @@ void SwHTMLParser::InsertSpacer() sal_Int16 eHoriOri = text::HoriOrientation::NONE; Size aSize( 0, 0); long nSize = 0; - bool bPrcWidth = false; - bool bPrcHeight = false; + bool bPercentWidth = false; + bool bPercentHeight = false; sal_uInt16 nType = HTML_SPTYPE_HORI; const HTMLOptions& rHTMLOptions = GetOptions(); @@ -4849,12 +4849,12 @@ void SwHTMLParser::InsertSpacer() break; case HtmlOptionId::WIDTH: // First only save as pixel value! - bPrcWidth = (rOption.GetString().indexOf('%') != -1); + bPercentWidth = (rOption.GetString().indexOf('%') != -1); aSize.setWidth( static_cast<long>(rOption.GetNumber()) ); break; case HtmlOptionId::HEIGHT: // First only save as pixel value! - bPrcHeight = (rOption.GetString().indexOf('%') != -1); + bPercentHeight = (rOption.GetString().indexOf('%') != -1); aSize.setHeight( static_cast<long>(rOption.GetNumber()) ); break; case HtmlOptionId::SIZE: @@ -4887,7 +4887,7 @@ void SwHTMLParser::InsertSpacer() m_pCSS1Parser->GetWhichMap() ); SvxCSS1PropertyInfo aDummyPropInfo; - SetFixSize( aSize, aDfltSz, bPrcWidth, bPrcHeight, + SetFixSize( aSize, aDfltSz, bPercentWidth, bPercentHeight, aDummyPropInfo, aFrameSet ); SetSpace( aSpace, aDummyItemSet, aDummyPropInfo, aFrameSet ); @@ -5203,7 +5203,7 @@ void SwHTMLParser::InsertHorzRule() SvxAdjust eAdjust = SvxAdjust::End; - bool bPrcWidth = false; + bool bPercentWidth = false; bool bNoShade = false; bool bColor = false; @@ -5224,13 +5224,13 @@ void SwHTMLParser::InsertHorzRule() nSize = static_cast<sal_uInt16>(rOption.GetNumber()); break; case HtmlOptionId::WIDTH: - bPrcWidth = (rOption.GetString().indexOf('%') != -1); + bPercentWidth = (rOption.GetString().indexOf('%') != -1); nWidth = static_cast<sal_uInt16>(rOption.GetNumber()); - if( bPrcWidth && nWidth>=100 ) + if( bPercentWidth && nWidth>=100 ) { // the default case are 100% lines (no attributes necessary) nWidth = 0; - bPrcWidth = false; + bPercentWidth = false; } break; case HtmlOptionId::ALIGN: @@ -5309,7 +5309,7 @@ void SwHTMLParser::InsertHorzRule() { // fake length and alignment of line above paragraph indents long nBrowseWidth = GetCurrentBrowseWidth(); - nWidth = bPrcWidth ? static_cast<sal_uInt16>((nWidth*nBrowseWidth) / 100) + nWidth = bPercentWidth ? static_cast<sal_uInt16>((nWidth*nBrowseWidth) / 100) : ToTwips( static_cast<sal_uInt16>(nBrowseWidth) ); if( nWidth < MINLAY ) nWidth = MINLAY; diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index b9173c6271ab..081a7e8fed69 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -676,12 +676,12 @@ private: // Adjust the size of the Fly-Frames to requirements and conditions // (not for graphics, therefore htmlplug.cxx) static void SetFixSize( const Size& rPixSize, const Size& rTwipDfltSize, - bool bPrcWidth, bool bPrcHeight, + bool bPercentWidth, bool bPercentHeight, SvxCSS1PropertyInfo const &rPropInfo, SfxItemSet& rFlyItemSet ); static void SetVarSize( SvxCSS1PropertyInfo const &rPropInfo, SfxItemSet& rFlyItemSet, SwTwips nDfltWidth=MINLAY, - sal_uInt8 nDltPrcWidth=0 ); + sal_uInt8 nDefaultPercentWidth=0 ); static void SetSpace( const Size& rPixSpace, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, SfxItemSet& rFlyItemSet ); diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx index 99c970d57b1c..1dc4cf1c5ba0 100644 --- a/sw/source/filter/inc/wrtswtbl.hxx +++ b/sw/source/filter/inc/wrtswtbl.hxx @@ -58,7 +58,7 @@ class SW_DLLPUBLIC SwWriteTableCell sal_uInt16 const nRowSpan; // spanned rows sal_uInt16 const nColSpan; // spanned columns - bool bPrcWidthOpt; + bool bPercentWidthOpt; public: @@ -66,7 +66,7 @@ public: sal_uInt16 nCSpan, long nHght, const SvxBrushItem *pBGround) : pBox( pB ), pBackground( pBGround ), nHeight( nHght ), nWidthOpt( 0 ), nRow( nR ), nCol( nC ), nRowSpan( nRSpan ), nColSpan( nCSpan ), - bPrcWidthOpt( false ) + bPercentWidthOpt( false ) {} const SwTableBox *GetBox() const { return pBox; } @@ -82,13 +82,13 @@ public: const SvxBrushItem *GetBackground() const { return pBackground; } - void SetWidthOpt( sal_uInt16 nWidth, bool bPrc ) + void SetWidthOpt( sal_uInt16 nWidth, bool bPercent ) { - nWidthOpt = nWidth; bPrcWidthOpt = bPrc; + nWidthOpt = nWidth; bPercentWidthOpt = bPercent; } sal_uInt32 GetWidthOpt() const { return nWidthOpt; } - bool HasPrcWidthOpt() const { return bPrcWidthOpt; } + bool HasPercentWidthOpt() const { return bPercentWidthOpt; } }; typedef std::vector<std::unique_ptr<SwWriteTableCell>> SwWriteTableCells; @@ -278,7 +278,7 @@ public: sal_uInt32 GetRawWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const; sal_uInt16 GetAbsWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const; sal_uInt16 GetRelWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const; - sal_uInt16 GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const; + sal_uInt16 GetPercentWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const; long GetAbsHeight(long nRawWidth, size_t nRow, sal_uInt16 nRowSpan) const; diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index 189e74ea2e66..08aec9208008 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -348,7 +348,7 @@ sal_uInt16 SwWriteTable::GetRelWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) con GetBaseWidth() ))); } -sal_uInt16 SwWriteTable::GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const +sal_uInt16 SwWriteTable::GetPercentWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const { long nWidth = GetRawWidth( nCol, nColSpan ); @@ -767,7 +767,7 @@ SwWriteTable::SwWriteTable(const SwTable* pTable, const SwHTMLTableLayout *pLayo : m_pTable(pTable), m_nBorderColor(sal_uInt32(-1)), m_nCellSpacing(0), m_nCellPadding(0), m_nBorder(0), m_nInnerBorder(0), m_nBaseWidth(pLayoutInfo->GetWidthOption()), m_nHeadEndRow(0), m_nLeftSub(0), m_nRightSub(0), m_nTabWidth(pLayoutInfo->GetWidthOption()), - m_bRelWidths(pLayoutInfo->HasPrcWidthOption()), m_bUseLayoutHeights(false), + m_bRelWidths(pLayoutInfo->HasPercentWidthOption()), m_bUseLayoutHeights(false), #ifdef DBG_UTIL m_bGetLineHeightCalled(false), #endif @@ -846,7 +846,7 @@ SwWriteTable::SwWriteTable(const SwTable* pTable, const SwHTMLTableLayout *pLayo pRow->AddCell( pBox, nRow, nCol, nRowSpan, nColSpan, nHeight, pBrushItem ); pCell->SetWidthOpt( pLayoutCell->GetWidthOption(), - pLayoutCell->IsPrcWidthOption() ); + pLayoutCell->IsPercentWidthOption() ); sal_uInt16 nTopBorder = USHRT_MAX, nBottomBorder = USHRT_MAX; sal_uInt16 nBorderMask = diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 13d004732c37..1778c4cb42db 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -731,9 +731,9 @@ void SwXMLExport::ExportTableAutoStyles( const SwTableNode& rTableNd ) sal_uInt32 nAbsWidth = rFrameSize.GetSize().Width(); sal_uInt32 nBaseWidth = 0; - sal_Int8 nPrcWidth = rFrameSize.GetWidthPercent(); + sal_Int8 nPercentWidth = rFrameSize.GetWidthPercent(); - bool bFixAbsWidth = nPrcWidth != 0 || /*text::*/HoriOrientation::NONE == eTabHoriOri + bool bFixAbsWidth = nPercentWidth != 0 || /*text::*/HoriOrientation::NONE == eTabHoriOri || /*text::*/HoriOrientation::FULL == eTabHoriOri; if( bFixAbsWidth ) { diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 044e2e427ad4..cf3932c63726 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -2627,7 +2627,7 @@ void SwXMLTableContext::MakeTable() sal_Int16 eHoriOrient = text::HoriOrientation::FULL; bool bSetHoriOrient = false; - sal_uInt8 nPrcWidth = 0U; + sal_uInt8 nPercentWidth = 0U; m_pTableNode->GetTable().SetRowsToRepeat( m_nHeaderRows ); m_pTableNode->GetTable().SetTableModel( !m_bHasSubTables ); @@ -2697,7 +2697,7 @@ void SwXMLTableContext::MakeTable() if( pSize->GetWidthPercent() ) { // The width will be set in MakeTable_ - nPrcWidth = pSize->GetWidthPercent(); + nPercentWidth = pSize->GetWidthPercent(); } else { @@ -2751,7 +2751,7 @@ void SwXMLTableContext::MakeTable() // changed there. pFrameFormat->LockModify(); SwFormatFrameSize aSize( SwFrameSize::Variable, m_nWidth ); - aSize.SetWidthPercent( nPrcWidth ); + aSize.SetWidthPercent( nPercentWidth ); pFrameFormat->SetFormatAttr( aSize ); pFrameFormat->UnlockModify(); |