diff options
Diffstat (limited to 'oox')
-rw-r--r-- | oox/qa/unit/vba_encryption.cxx | 2 | ||||
-rw-r--r-- | oox/source/core/binarycodec.cxx | 4 | ||||
-rw-r--r-- | oox/source/crypto/Standard2007Engine.cxx | 3 | ||||
-rw-r--r-- | oox/source/drawingml/shape.cxx | 5 | ||||
-rw-r--r-- | oox/source/export/ColorPropertySet.cxx | 3 | ||||
-rw-r--r-- | oox/source/export/chartexport.cxx | 15 | ||||
-rw-r--r-- | oox/source/export/shapes.cxx | 3 | ||||
-rw-r--r-- | oox/source/ole/olehelper.cxx | 2 |
8 files changed, 12 insertions, 25 deletions
diff --git a/oox/qa/unit/vba_encryption.cxx b/oox/qa/unit/vba_encryption.cxx index 37dfeff636f4..60164cb4bc32 100644 --- a/oox/qa/unit/vba_encryption.cxx +++ b/oox/qa/unit/vba_encryption.cxx @@ -73,7 +73,7 @@ void TestVbaEncryption::testSimple2() void TestVbaEncryption::testProjKey1() { - OUString aProjectID("{917DED54-440B-4FD1-A5C1-74ACF261E600}"); + OUString const aProjectID("{917DED54-440B-4FD1-A5C1-74ACF261E600}"); sal_uInt8 nProjKey = VBAEncryption::calculateProjKey(aProjectID); CPPUNIT_ASSERT_EQUAL((int)0xdf, (int)nProjKey); } diff --git a/oox/source/core/binarycodec.cxx b/oox/source/core/binarycodec.cxx index 72ae862a0f14..84660d6abb54 100644 --- a/oox/source/core/binarycodec.cxx +++ b/oox/source/core/binarycodec.cxx @@ -146,8 +146,6 @@ void BinaryCodec_XOR::initKey( const sal_uInt8 pnPassData[ 16 ] ) for (sal_Int32 nIndex = nLen; nIndex < static_cast<sal_Int32>(sizeof(mpnKey)); ++nIndex, ++pnFillChar ) mpnKey[ nIndex ] = *pnFillChar; - size_t nRotateSize = 2; - // use little-endian base key to create key array sal_uInt8 pnBaseKeyLE[ 2 ]; pnBaseKeyLE[ 0 ] = static_cast< sal_uInt8 >( mnBaseKey ); @@ -156,7 +154,7 @@ void BinaryCodec_XOR::initKey( const sal_uInt8 pnPassData[ 16 ] ) for (sal_Int32 nIndex = 0; nIndex < static_cast<sal_Int32>(sizeof(mpnKey)); ++nIndex, ++pnKeyChar ) { *pnKeyChar ^= pnBaseKeyLE[ nIndex & 1 ]; - lclRotateLeft( *pnKeyChar, nRotateSize ); + lclRotateLeft( *pnKeyChar, 2/*nRotateSize*/ ); } } diff --git a/oox/source/crypto/Standard2007Engine.cxx b/oox/source/crypto/Standard2007Engine.cxx index b9c259fa02ac..a11780fddc52 100644 --- a/oox/source/crypto/Standard2007Engine.cxx +++ b/oox/source/crypto/Standard2007Engine.cxx @@ -203,8 +203,7 @@ void Standard2007Engine::writeEncryptionInfo(const OUString& password, BinaryXOu rStream.writeUnicodeArray(lclCspName); rStream.WriteUInt16(0); - sal_uInt32 encryptionVerifierSize = static_cast<sal_uInt32>(sizeof(msfilter::EncryptionVerifierAES)); - rStream.writeMemory(&mInfo.verifier, encryptionVerifierSize); + rStream.writeMemory(&mInfo.verifier, sizeof(msfilter::EncryptionVerifierAES)); } void Standard2007Engine::encrypt(BinaryXInputStream& aInputStream, diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 7d04518b5f25..a01fd47075d0 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1197,9 +1197,6 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase ) Reference < io::XStream > xStream( new utl::OStreamWrapper( aTempStream ) ); Reference < io::XOutputStream > xOutputStream( xStream->getOutputStream() ); - // Rendering format - OUString sFormat( "SVM" ); - // Size of the rendering awt::Size aActualSize = mxShape->getSize(); Size aResolution( Application::GetDefaultDevice()->LogicToPixel( Size( 100, 100 ), MapUnit::MapCM ) ); @@ -1221,7 +1218,7 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase ) aDescriptor[ 0 ].Name = "OutputStream"; aDescriptor[ 0 ].Value <<= xOutputStream; aDescriptor[ 1 ].Name = "FilterName"; - aDescriptor[ 1 ].Value <<= sFormat; + aDescriptor[ 1 ].Value <<= OUString("SVM"); // Rendering format aDescriptor[ 2 ].Name = "FilterData"; aDescriptor[ 2 ].Value <<= aFilterData; diff --git a/oox/source/export/ColorPropertySet.cxx b/oox/source/export/ColorPropertySet.cxx index 768763bf91d4..ec25b10c3c49 100644 --- a/oox/source/export/ColorPropertySet.cxx +++ b/oox/source/export/ColorPropertySet.cxx @@ -120,8 +120,7 @@ uno::Any SAL_CALL ColorPropertySet::getPropertyValue( const OUString& aPropertyN { if( aPropertyName == "FillStyle" && m_bIsFillColor ) { - css::drawing::FillStyle aFillStyle = css::drawing::FillStyle_SOLID; - return uno::makeAny(aFillStyle); + return uno::makeAny(css::drawing::FillStyle_SOLID); } else if (aPropertyName == m_aColorPropName) return uno::makeAny( m_nColor ); diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index d893cc678cb8..2d2d5fdd3536 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -781,8 +781,7 @@ void ChartExport::exportExternalData( const Reference< css::chart::XChartDocumen // Converting absolute path to relative path. if( externalDataPath[ 0 ] != '.' && externalDataPath[ 1 ] != '.') { - sal_Int32 nStartPos = 0; - sal_Int32 nSepPos = externalDataPath.indexOf( '/', nStartPos ); + sal_Int32 nSepPos = externalDataPath.indexOf( '/', 0 ); if( nSepPos > 0) { relationPath = relationPath.copy( nSepPos, ::std::max< sal_Int32 >( externalDataPath.getLength(), 0 ) - nSepPos ); @@ -1630,9 +1629,8 @@ void ChartExport::exportDoughnutChart( const Reference< chart2::XChartType >& xC // firstSliceAng exportFirstSliceAng( ); //FIXME: holeSize - sal_Int32 nHoleSize = 50; pFS->singleElement( FSNS( XML_c, XML_holeSize ), - XML_val, I32S( nHoleSize ), + XML_val, I32S( 50 ), FSEND ); pFS->endElement( FSNS( XML_c, XML_doughnutChart ) ); @@ -1876,9 +1874,8 @@ void ChartExport::exportUpDownBars( const Reference< chart2::XChartType >& xChar pFS->startElement( FSNS( XML_c, XML_upDownBars ), FSEND ); // TODO: gapWidth - sal_Int32 nGapWidth = 150; pFS->singleElement( FSNS( XML_c, XML_gapWidth ), - XML_val, I32S( nGapWidth ), + XML_val, I32S( 150 ), FSEND ); Reference< beans::XPropertySet > xChartPropSet = xChartPropProvider->getUpBar(); @@ -2626,9 +2623,8 @@ void ChartExport::_exportAxis( if( bLogarithmic ) { // default value is 10? - sal_Int32 nLogBase = 10; pFS->singleElement( FSNS( XML_c, XML_logBase ), - XML_val, I32S( nLogBase ), + XML_val, I32S( 10 ), FSEND ); } } @@ -2871,9 +2867,8 @@ void ChartExport::_exportAxis( } // FIXME: seems not support? lblOffset - sal_Int32 nLblOffset = 100; pFS->singleElement( FSNS( XML_c, XML_lblOffset ), - XML_val, I32S( nLblOffset ), + XML_val, I32S( 100 ), FSEND ); } diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 4775b1bfb901..ff909e7bc625 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -970,9 +970,8 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape ) WriteShapeTransformation( xShape, XML_a, bFlipH, bFlipV ); if( nAdjustmentValuesIndex != -1 ) { - sal_Int32 nAdjustmentsWhichNeedsToBeConverted = 0; WritePresetShape( sPresetShape, eShapeType, bPredefinedHandlesUsed, - nAdjustmentsWhichNeedsToBeConverted, aGeometrySeq[ nAdjustmentValuesIndex ] ); + 0/*nAdjustmentsWhichNeedsToBeConverted*/, aGeometrySeq[ nAdjustmentValuesIndex ] ); } else WritePresetShape( sPresetShape ); diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx index 285942923cc6..5c1fce46d5f9 100644 --- a/oox/source/ole/olehelper.cxx +++ b/oox/source/ole/olehelper.cxx @@ -172,7 +172,7 @@ classIdToGUIDCNamePairMap::classIdToGUIDCNamePairMap() { AX_GUID_SCROLLBAR, "ScrollBar"}, } }; - int length = SAL_N_ELEMENTS( initialCntrlData ); + int const length = SAL_N_ELEMENTS( initialCntrlData ); IdCntrlData* pData = initialCntrlData; for ( int index = 0; index < length; ++index, ++pData ) mnIdToGUIDCNamePairMap[ pData->nId ] = pData->aData; |