From 60bc26354763fa3461db49a3e827da552484150d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 16 Aug 2018 16:57:15 +0200 Subject: new loplugin:conststringfield Look for const string fields which can be static, and mostly convert them to OUStringLiteral And add a getLength() method to OUStringLiteral to make the transition easier. Remove dead code in XclExpRoot::GenerateDefaultEncryptionData, default password is never empty. Change-Id: Iae75514d9dbb87289fd5b016222f640abe755091 Reviewed-on: https://gerrit.libreoffice.org/59204 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/table/tablelayouter.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'svx/source/table/tablelayouter.cxx') diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index 49d0cf9dfa65..bbca0cc47d30 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -51,10 +51,10 @@ namespace sdr { namespace table { static SvxBorderLine gEmptyBorder; +static const OUStringLiteral gsSize( "Size" ); TableLayouter::TableLayouter( const TableModelRef& xTableModel ) : mxTable( xTableModel ) -, msSize( "Size" ) { } @@ -572,7 +572,7 @@ void TableLayouter::LayoutTableWidth( tools::Rectangle& rArea, bool bFit ) } else { - xColSet->getPropertyValue( msSize ) >>= nColWidth; + xColSet->getPropertyValue( gsSize ) >>= nColWidth; } maColumns[nCol].mnSize = nColWidth; @@ -650,7 +650,7 @@ void TableLayouter::LayoutTableWidth( tools::Rectangle& rArea, bool bFit ) if( bFit ) { Reference< XPropertySet > xColSet( xCols->getByIndex(nCol), UNO_QUERY_THROW ); - xColSet->setPropertyValue( msSize, Any( maColumns[nCol].mnSize ) ); + xColSet->setPropertyValue( gsSize, Any( maColumns[nCol].mnSize ) ); } } @@ -732,7 +732,7 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& rArea, bool bFit ) } else { - xRowSet->getPropertyValue( msSize ) >>= nRowHeight; + xRowSet->getPropertyValue( gsSize ) >>= nRowHeight; } maRows[nRow].mnSize = nRowHeight; @@ -807,7 +807,7 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& rArea, bool bFit ) if( bFit ) { Reference< XPropertySet > xRowSet( xRows->getByIndex(nRow), UNO_QUERY_THROW ); - xRowSet->setPropertyValue( msSize, Any( maRows[nRow].mnSize ) ); + xRowSet->setPropertyValue( gsSize, Any( maRows[nRow].mnSize ) ); } } @@ -1070,7 +1070,7 @@ void TableLayouter::DistributeColumns( ::tools::Rectangle& rArea, sal_Int32 nFir nWidth = nAllWidth; // last column get round errors Reference< XPropertySet > xColSet( xCols->getByIndex( nCol ), UNO_QUERY_THROW ); - xColSet->setPropertyValue( msSize, Any( nWidth ) ); + xColSet->setPropertyValue( gsSize, Any( nWidth ) ); nAllWidth -= nWidth; } @@ -1120,7 +1120,7 @@ void TableLayouter::DistributeRows( ::tools::Rectangle& rArea, sal_Int32 nFirstR nHeight = nAllHeight; // last row get round errors Reference< XPropertySet > xRowSet( xRows->getByIndex( nRow ), UNO_QUERY_THROW ); - xRowSet->setPropertyValue( msSize, Any( nHeight ) ); + xRowSet->setPropertyValue( gsSize, Any( nHeight ) ); nAllHeight -= nHeight; } -- cgit