summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/export/chartexport.cxx3
-rw-r--r--oox/source/export/drawingml.cxx2
-rw-r--r--oox/source/vml/vmlformatting.cxx6
-rw-r--r--sal/rtl/cipher.cxx7
-rw-r--r--sc/qa/unit/parallelism.cxx4
-rw-r--r--sc/source/core/data/attarray.cxx3
6 files changed, 8 insertions, 17 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index aad1c41ad8fe..bd91390d5f3c 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2979,7 +2979,6 @@ void writeCustomLabel( const FSHelperPtr& pFS, ChartExport* pChartExport,
pFS->singleElement(FSNS(XML_a, XML_bodyPr), FSEND);
OUString sFieldType;
- bool bNewParagraph;
pFS->startElement(FSNS(XML_a, XML_p), FSEND);
for (auto& rField : rCustomLabelFields)
@@ -2987,7 +2986,7 @@ void writeCustomLabel( const FSHelperPtr& pFS, ChartExport* pChartExport,
Reference<XPropertySet> xPropertySet(rField, UNO_QUERY);
chart2::DataPointCustomLabelFieldType aType = rField->getFieldType();
sFieldType.clear();
- bNewParagraph = false;
+ bool bNewParagraph = false;
if (aType == chart2::DataPointCustomLabelFieldType_NEWLINE)
bNewParagraph = true;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index e18c0ce93fd2..1c0be28fdaf9 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1205,10 +1205,10 @@ void DrawingML::WritePattFill(const Reference<XPropertySet>& rXPropSet, const cs
::Color nColor = COL_WHITE;
sal_Int32 nAlpha = 0;
- bool isBackgroundFilled = false;
if ( GetProperty( rXPropSet, "FillBackground" ) )
{
+ bool isBackgroundFilled = false;
mAny >>= isBackgroundFilled;
if( isBackgroundFilled )
{
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 1e8c1318f832..17a730a2f8d8 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -960,7 +960,6 @@ void TextpathModel::pushToPropMap(ShapePropertyMap& rPropMap, const uno::Referen
if (!moTrim.has() || !moTrim.get())
{
OUString sText = moString.get();
- double fRatio = 0;
VclPtr<VirtualDevice> pDevice = VclPtr<VirtualDevice>::Create();
vcl::Font aFont = pDevice->GetFont();
aFont.SetFamilyName(sFont);
@@ -970,10 +969,7 @@ void TextpathModel::pushToPropMap(ShapePropertyMap& rPropMap, const uno::Referen
auto nTextWidth = pDevice->GetTextWidth(sText);
if (nTextWidth)
{
- fRatio = pDevice->GetTextHeight();
- fRatio /= nTextWidth;
-
- sal_Int32 nNewHeight = fRatio * xShape->getSize().Width;
+ sal_Int32 nNewHeight = (static_cast<double>(pDevice->GetTextHeight()) / nTextWidth) * xShape->getSize().Width;
xShape->setSize(awt::Size(xShape->getSize().Width, nNewHeight));
}
}
diff --git a/sal/rtl/cipher.cxx b/sal/rtl/cipher.cxx
index 62f3104be3ed..bd913c38faf1 100644
--- a/sal/rtl/cipher.cxx
+++ b/sal/rtl/cipher.cxx
@@ -1069,7 +1069,7 @@ static rtlCipherError rtl_cipherARCFOUR_init_Impl(
{
unsigned int K[CIPHER_CBLOCK_ARCFOUR];
unsigned int *L, *S;
- unsigned int x, y, t;
+ unsigned int x, y;
sal_Size n, k;
S = &(ctx->m_S[0]);
@@ -1099,7 +1099,7 @@ static rtlCipherError rtl_cipherARCFOUR_init_Impl(
{
y = (y + S[x] + K[x]) % CIPHER_CBLOCK_ARCFOUR;
/* swap S[x] and S[y] */
- t = S[x];
+ unsigned int t = S[x];
S[x] = S[y];
S[y] = t;
}
@@ -1117,7 +1117,6 @@ static rtlCipherError rtl_cipherARCFOUR_update_Impl(
sal_uInt8 *pBuffer, sal_Size nBufLen)
{
unsigned int *S;
- unsigned int t;
sal_Size k;
/* Check arguments. */
@@ -1140,7 +1139,7 @@ static rtlCipherError rtl_cipherARCFOUR_update_Impl(
ctx->m_Y = y;
/* Swap S[x] and S[y]. */
- t = S[x];
+ unsigned int t = S[x];
S[x] = S[y];
S[y] = t;
diff --git a/sc/qa/unit/parallelism.cxx b/sc/qa/unit/parallelism.cxx
index 896b7c1d8382..ca6dce5c9f2f 100644
--- a/sc/qa/unit/parallelism.cxx
+++ b/sc/qa/unit/parallelism.cxx
@@ -288,12 +288,10 @@ void ScParallelismTest::testVLOOKUPSUM()
m_xDocShell->DoHardRecalc();
- size_t nArg;
for (size_t i = 0; i < nNumRows; ++i)
{
OString aMsg = "At row " + OString::number(i);
- nArg = nNumRows - i - 1;
- CPPUNIT_ASSERT_EQUAL_MESSAGE(aMsg.getStr(), 6*nArg + 101, static_cast<size_t>(m_pDoc->GetValue(3, i, 0)));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(aMsg.getStr(), 6 * (nNumRows - i - 1) + 101, static_cast<size_t>(m_pDoc->GetValue(3, i, 0)));
}
m_pDoc->DeleteTab(0);
}
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index c66fa7e8aa5e..071c7ae30066 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -57,7 +57,6 @@ ScAttrArray::ScAttrArray( SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc, ScAttr
{
if ( nCol != -1 && pDefaultColAttrArray && !pDefaultColAttrArray->mvData.empty())
{
- bool bNumFormatChanged;
ScAddress aAdrStart( nCol, 0, nTab );
ScAddress aAdrEnd( nCol, 0, nTab );
mvData.resize( pDefaultColAttrArray->mvData.size() );
@@ -66,7 +65,7 @@ ScAttrArray::ScAttrArray( SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc, ScAttr
mvData[nIdx].nEndRow = pDefaultColAttrArray->mvData[nIdx].nEndRow;
ScPatternAttr aNewPattern( *(pDefaultColAttrArray->mvData[nIdx].pPattern) );
mvData[nIdx].pPattern = static_cast<const ScPatternAttr*>( &pDocument->GetPool()->Put( aNewPattern ) );
- bNumFormatChanged = false;
+ bool bNumFormatChanged = false;
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
mvData[nIdx].pPattern->GetItemSet(), pDocument->GetDefPattern()->GetItemSet() ) )
{