diff options
Diffstat (limited to 'filter/source')
-rw-r--r-- | filter/source/flash/swfwriter2.cxx | 5 | ||||
-rw-r--r-- | filter/source/graphicfilter/ieps/ieps.cxx | 2 | ||||
-rw-r--r-- | filter/source/graphicfilter/itiff/itiff.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 14 | ||||
-rw-r--r-- | filter/source/msfilter/mscodec.cxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 26 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 3 | ||||
-rw-r--r-- | filter/source/msfilter/util.cxx | 6 | ||||
-rw-r--r-- | filter/source/pdf/pdfexport.cxx | 3 | ||||
-rw-r--r-- | filter/source/svg/svgexport.cxx | 3 | ||||
-rw-r--r-- | filter/source/svg/svgfilter.cxx | 4 | ||||
-rw-r--r-- | filter/source/svg/svgimport.cxx | 4 | ||||
-rw-r--r-- | filter/source/t602/t602filter.cxx | 4 | ||||
-rw-r--r-- | filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx | 6 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfilterjar.cxx | 9 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 9 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertestdialog.cxx | 6 |
17 files changed, 39 insertions, 71 deletions
diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx index 5d8acaed1150..dd8b3d158ac5 100644 --- a/filter/source/flash/swfwriter2.cxx +++ b/filter/source/flash/swfwriter2.cxx @@ -594,12 +594,9 @@ void FillStyle::Impl_addGradient( Tag* pTag ) const aGradientRecords.push_back( GradRecord( 0x00, maGradient.GetEndColor() ) ); aGradientRecords.push_back( GradRecord( 0x80, maGradient.GetStartColor() ) ); aGradientRecords.push_back( GradRecord( 0xff, maGradient.GetEndColor() ) ); - double tx = ( 32768.0 / 2.0 ); - double ty = ( 32768.0 / 2.0 ); double scalex = (double)maBoundRect.GetWidth() / 32768.0; double scaley = (double)maBoundRect.GetHeight() / 32768.0; - - m.translate( tx, ty ); + m.translate( 32768.0 / 2.0, 32768.0 / 2.0 ); m.scale( scalex, scaley ); } break; diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index 81841d8b0891..845b5ea854ff 100644 --- a/filter/source/graphicfilter/ieps/ieps.cxx +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -435,7 +435,7 @@ void CreateMtfReplacementAction( GDIMetaFile& rMtf, SvStream& rStrm, sal_uInt32 nSizeTIFF = aTIFFBuf.size(); SvMemoryStream aReplacement( nSizeWMF + nSizeTIFF + 28 ); - sal_uInt32 nMagic = 0xc6d3d0c5; + sal_uInt32 const nMagic = 0xc6d3d0c5; sal_uInt32 nPPos = 28 + nSizeWMF + nSizeTIFF; sal_uInt32 nWPos = nSizeWMF ? 28 : 0; sal_uInt32 nTPos = nSizeTIFF ? 28 + nSizeWMF : 0; diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index af1707379a44..f785ab5a7666 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -373,7 +373,7 @@ void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen) nNumStripOffsets = 0; sal_uInt32 nOldNumSO = nNumStripOffsets; nDataLen += nOldNumSO; - size_t nMaxAllocAllowed = SAL_MAX_UINT32 / sizeof(sal_uInt32); + size_t const nMaxAllocAllowed = SAL_MAX_UINT32 / sizeof(sal_uInt32); size_t nMaxRecordsAvailable = pTIFF->remainingSize() / DataTypeSize(); if (nDataLen > nOldNumSO && nDataLen < nMaxAllocAllowed && (nDataLen - nOldNumSO) <= nMaxRecordsAvailable) @@ -421,7 +421,7 @@ void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen) nNumStripByteCounts = 0; // to be on the safe side sal_uInt32 nOldNumSBC = nNumStripByteCounts; nDataLen += nOldNumSBC; - size_t nMaxAllocAllowed = SAL_MAX_UINT32 / sizeof(sal_uInt32); + size_t const nMaxAllocAllowed = SAL_MAX_UINT32 / sizeof(sal_uInt32); size_t nMaxRecordsAvailable = pTIFF->remainingSize() / DataTypeSize(); if (nDataLen > nOldNumSBC && nDataLen < nMaxAllocAllowed && (nDataLen - nOldNumSBC) <= nMaxRecordsAvailable) diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index bd42cd8cac1b..870e94373149 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1755,17 +1755,13 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const css::uno::Refe css::uno::Any aAny( rXShape->queryInterface( cppu::UnoType<css::beans::XPropertySet>::get())); - OUString sPolyPolygonBezier ( "PolyPolygonBezier" ); - OUString sPolyPolygon ( "PolyPolygon" ); - OUString sPolygon ( "Polygon" ); - if ( aAny >>= aXPropSet ) { - bool bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sPolyPolygonBezier, true ); + bool bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, "PolyPolygonBezier", true ); if ( !bHasProperty ) - bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sPolyPolygon, true ); + bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, "PolyPolygon", true ); if ( !bHasProperty ) - bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sPolygon, true ); + bHasProperty = EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, "Polygon", true ); if ( bHasProperty ) aRetPolyPoly = GetPolyPolygon( aAny ); } @@ -2231,8 +2227,8 @@ bool EscherPropertyContainer::CreateConnectorProperties( rGeoRect.Width = -rGeoRect.Width; } } - sal_uInt32 nAdjustValue1, nAdjustValue2, nAdjustValue3; - nAdjustValue1 = nAdjustValue2 = nAdjustValue3 = 0x2a30; + sal_uInt32 nAdjustValue1, nAdjustValue2; + nAdjustValue1 = nAdjustValue2 = 0x2a30; if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, "EdgeStartConnection" ) ) aAny >>= aShapeA; diff --git a/filter/source/msfilter/mscodec.cxx b/filter/source/msfilter/mscodec.cxx index 83dee6c37223..ede93598bfa5 100644 --- a/filter/source/msfilter/mscodec.cxx +++ b/filter/source/msfilter/mscodec.cxx @@ -360,7 +360,7 @@ void MSCodec_CryptoAPI::InitKey ( const sal_uInt16 pPassData[16], const sal_uInt8 pDocId[16]) { - sal_uInt32 saltSize = 16; + sal_uInt32 const saltSize = 16; // Prepare initial data -> salt + password (in 16-bit chars) std::vector<sal_uInt8> initialData(pDocId, pDocId + saltSize); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index f4dca1e4c2e7..06b9fc1dde61 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -941,7 +941,6 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh rSet.Put(XLineStyleItem( drawing::LineStyle_SOLID ) ); else { - css::drawing::DashStyle eDash = css::drawing::DashStyle_RECT; sal_uInt16 nDots = 1; sal_uInt32 nDotLen = nLineWidth / 360; sal_uInt16 nDashes = 0; @@ -997,7 +996,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh break; } - rSet.Put( XLineDashItem( OUString(), XDash( eDash, nDots, nDotLen, nDashes, nDashLen, nDistance ) ) ); + rSet.Put( XLineDashItem( OUString(), XDash( css::drawing::DashStyle_RECT, nDots, nDotLen, nDashes, nDashLen, nDistance ) ) ); rSet.Put( XLineStyleItem( drawing::LineStyle_DASH ) ); } rSet.Put( XLineColorItem( OUString(), rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_lineColor, 0 ) ) ) ); @@ -1974,26 +1973,23 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt if ( nFlags & SvxMSDffHandleFlags::MIRRORED_X ) { - bool bMirroredX = true; const OUString sHandleMirroredX( "MirroredX" ); aProp.Name = sHandleMirroredX; - aProp.Value <<= bMirroredX; + aProp.Value <<= true; aHandlePropVec.push_back( aProp ); } if ( nFlags & SvxMSDffHandleFlags::MIRRORED_Y ) { - bool bMirroredY = true; const OUString sHandleMirroredY( "MirroredY" ); aProp.Name = sHandleMirroredY; - aProp.Value <<= bMirroredY; + aProp.Value <<= true; aHandlePropVec.push_back( aProp ); } if ( nFlags & SvxMSDffHandleFlags::SWITCHED ) { - bool bSwitched = true; const OUString sHandleSwitched( "Switched" ); aProp.Name = sHandleSwitched; - aProp.Value <<= bSwitched; + aProp.Value <<= true; aHandlePropVec.push_back( aProp ); } if ( nFlags & SvxMSDffHandleFlags::POLAR ) @@ -3952,9 +3948,9 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons if( bGrfRead && !bLinkGrf && IsProperty( DFF_Prop_pictureId ) ) { // TODO/LATER: in future probably the correct aspect should be provided here - sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; // #i32596# - pass <nCalledByGroup> to method - pRet = ImportOLE( GetPropertyValue( DFF_Prop_pictureId, 0 ), aGraf, rObjData.aBoundRect, aVisArea, rObjData.nCalledByGroup, nAspect ); + pRet = ImportOLE( GetPropertyValue( DFF_Prop_pictureId, 0 ), aGraf, rObjData.aBoundRect, aVisArea, rObjData.nCalledByGroup, + embed::Aspects::MSOLE_CONTENT ); } if( !pRet ) { @@ -5269,7 +5265,6 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, SdrTextVertAdjust eTVA = SDRTEXTVERTADJUST_CENTER; bool bTVASet(false); - SdrTextHorzAdjust eTHA = SDRTEXTHORZADJUST_CENTER; bool bTHASet(false); switch( eTextAnchor ) @@ -5316,7 +5311,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, if ( bTVASet ) aSet.Put( SdrTextVertAdjustItem( eTVA ) ); if ( bTHASet ) - aSet.Put( SdrTextHorzAdjustItem( eTHA ) ); + aSet.Put( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_CENTER ) ); } pTextObj->SetMergedItemSet(aSet); @@ -6575,9 +6570,6 @@ bool SvxMSDffManager::MakeContentStream( SotStorage * pStor, const GDIMetaFile & xStm->SetVersion( pStor->GetVersion() ); xStm->SetBufferSize( 8192 ); - sal_uInt16 nAspect = ASPECT_CONTENT; - sal_uLong nAdviseModes = 2; - Impl_OlePres aEle; // Convert the size in 1/100 mm // If a not applicable MapUnit (device dependent) is used, @@ -6587,8 +6579,8 @@ bool SvxMSDffManager::MakeContentStream( SotStorage * pStor, const GDIMetaFile & MapMode aMMDst( MapUnit::Map100thMM ); aSize = OutputDevice::LogicToLogic( aSize, aMMSrc, aMMDst ); aEle.SetSize( aSize ); - aEle.SetAspect( nAspect ); - aEle.SetAdviseFlags( nAdviseModes ); + aEle.SetAspect( ASPECT_CONTENT ); + aEle.SetAdviseFlags( 2 ); aEle.SetMtf( rMtf ); aEle.Write( *xStm ); diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index ea909435fbc0..ad37201db3a9 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -5291,10 +5291,9 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHe PPTCharPropSet aCharPropSet(0); aCharPropSet.mnOriginalTextPos = 0; - sal_uInt32 nCharAnzRead = 0; sal_uInt32 nExtParaFlags = 0, nAnmScheme = 0; sal_uInt16 nBuBlip = 0xffff, nHasAnm = 0; - ReadCharProps( rIn, aCharPropSet, aString, nCharCount, nCharAnzRead, + ReadCharProps( rIn, aCharPropSet, aString, nCharCount, 0/*nCharAnzRead*/, bTextPropAtom, nExtParaPos, aStyleTextProp9, nExtParaFlags, nBuBlip, nHasAnm, nAnmScheme ); diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx index 047d6e486368..8ad5d92a4fdf 100644 --- a/filter/source/msfilter/util.cxx +++ b/filter/source/msfilter/util.cxx @@ -228,14 +228,13 @@ static const ApiPaperSize spPaperSizeTable[] = sal_Int32 PaperSizeConv::getMSPaperSizeIndex( const css::awt::Size& rSize ) { - sal_Int32 nElems = SAL_N_ELEMENTS( spPaperSizeTable ); // Need to find the best match for current size sal_Int32 nDeltaWidth = 0; sal_Int32 nDeltaHeight = 0; sal_Int32 nPaperSizeIndex = 0; // Undefined const ApiPaperSize* pItem = spPaperSizeTable; - const ApiPaperSize* pEnd = spPaperSizeTable + nElems; + const ApiPaperSize* pEnd = spPaperSizeTable + SAL_N_ELEMENTS( spPaperSizeTable ); for ( ; pItem != pEnd; ++pItem ) { sal_Int32 nCurDeltaHeight = std::abs( pItem->mnHeight - rSize.Height ); @@ -263,8 +262,7 @@ sal_Int32 PaperSizeConv::getMSPaperSizeIndex( const css::awt::Size& rSize ) const ApiPaperSize& PaperSizeConv::getApiSizeForMSPaperSizeIndex( sal_Int32 nMSOPaperIndex ) { - sal_Int32 nElems = SAL_N_ELEMENTS( spPaperSizeTable ); - if ( nMSOPaperIndex < 0 || nMSOPaperIndex > nElems - 1 ) + if ( nMSOPaperIndex < 0 || nMSOPaperIndex > sal_Int32(SAL_N_ELEMENTS( spPaperSizeTable )) - 1 ) return spPaperSizeTable[ 0 ]; return spPaperSizeTable[ nMSOPaperIndex ]; } diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 146566b9e97f..1d24b3e0bf5e 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -1011,7 +1011,6 @@ bool PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData& basegfx::B2DRange aRangePDF(aSizePDF.getB2DRange()); Point aOrigin; tools::Rectangle aPageRect( aOrigin, rMtf.GetPrefSize() ); - bool bRet = true; rWriter.NewPage( aRangePDF.getWidth(), aRangePDF.getHeight() ); rWriter.SetMapMode( rMtf.GetPrefMapMode() ); @@ -1043,7 +1042,7 @@ bool PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData& if (!msWatermark.isEmpty()) ImplWriteWatermark( rWriter, Size(aRangePDF.getWidth(), aRangePDF.getHeight()) ); - return bRet; + return true; } diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 2f3537539c6b..75fe00dce7f6 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -1236,8 +1236,7 @@ void SVGFilter::implEmbedBulletGlyph( sal_Unicode cBullet, const OUString & sPat OUString sId = "bullet-char-template-" + OUString::number( (sal_Int32)cBullet ); mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", sId ); - double fFactor = 1.0 / 2048; - OUString sFactor = OUString::number( fFactor ); + OUString sFactor = OUString::number( 1.0 / 2048 ); OUString sTransform = "scale(" + sFactor + ",-" + sFactor + ")"; mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "transform", sTransform ); diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index 88e0525cc4cc..794fbd8ba502 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -326,13 +326,13 @@ bool SVGFilter::isStreamSvg(const uno::Reference<io::XInputStream>& xInput) const sal_Int8* pBuffer = aBuffer.getConstArray(); sal_Int8 aMagic1[] = {'<', 's', 'v', 'g'}; - sal_Int32 aMagic1Size = SAL_N_ELEMENTS(aMagic1); + sal_Int32 const aMagic1Size = SAL_N_ELEMENTS(aMagic1); if (std::search(pBuffer, pBuffer + nBytes, aMagic1, aMagic1 + aMagic1Size) != pBuffer + nBytes ) return true; sal_Int8 aMagic2[] = {'D', 'O', 'C', 'T', 'Y', 'P', 'E', ' ', 's', 'v', 'g'}; - sal_Int32 aMagic2Size = SAL_N_ELEMENTS(aMagic2); + sal_Int32 const aMagic2Size = SAL_N_ELEMENTS(aMagic2); return std::search(pBuffer, pBuffer + nBytes, aMagic2, aMagic2 + aMagic2Size) != pBuffer + nBytes; } diff --git a/filter/source/svg/svgimport.cxx b/filter/source/svg/svgimport.cxx index 445d233fe6d5..6a9dc5c5f93b 100644 --- a/filter/source/svg/svgimport.cxx +++ b/filter/source/svg/svgimport.cxx @@ -89,8 +89,8 @@ bool SVGFilter::implImport(const Sequence< PropertyValue >& rDescriptor) if(!xInputStream.is()) return false; - OUString sXMLImportService ( "com.sun.star.comp.Draw.XMLOasisImporter" ); - Reference < XDocumentHandler > xInternalHandler( mxContext->getServiceManager()->createInstanceWithContext( sXMLImportService, mxContext ), UNO_QUERY ); + Reference < XDocumentHandler > xInternalHandler( + mxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.comp.Draw.XMLOasisImporter", mxContext ), UNO_QUERY ); // The XImporter sets up an empty target document for XDocumentHandler to write to.. uno::Reference < XImporter > xImporter(xInternalHandler, UNO_QUERY); diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx index d2df9c10b516..b5cebf5ec5fd 100644 --- a/filter/source/t602/t602filter.cxx +++ b/filter/source/t602/t602filter.cxx @@ -248,9 +248,7 @@ bool SAL_CALL T602ImportFilter::importImpl( const Sequence< css::beans::Property } // An XML import service: what we push sax messages to.. - OUString sXMLImportService ( "com.sun.star.comp.Writer.XMLImporter" ); - - mxHandler.set( mxMSF->createInstance( sXMLImportService ), UNO_QUERY ); + mxHandler.set( mxMSF->createInstance( "com.sun.star.comp.Writer.XMLImporter" ), UNO_QUERY ); // The XImporter sets up an empty target document for XDocumentHandler to write to.. Reference < XImporter > xImporter(mxHandler, UNO_QUERY); diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx index 6266e2f113fd..84277d3b95c0 100644 --- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx +++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx @@ -64,14 +64,13 @@ bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< css::beans::Property OUString udConvertClass = msUserData[0]; const OUString sXMLImportService = msUserData[2]; sal_Int32 nSteps= 0; - sal_Int32 nProgressRange = 4; utl::MediaDescriptor aMediaMap(aDescriptor); Reference< XStatusIndicator > xStatusIndicator(aMediaMap.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_STATUSINDICATOR(), Reference< XStatusIndicator >())); if (xStatusIndicator.is()){ - xStatusIndicator->start( "Loading :",nProgressRange); + xStatusIndicator->start( "Loading :", 4); } Sequence< Any > aAnys(1); @@ -182,13 +181,12 @@ bool SAL_CALL XmlFilterAdaptor::exportImpl( const Sequence< css::beans::Property // Status Bar sal_Int32 nSteps= 1; - sal_Int32 nProgressRange(3); utl::MediaDescriptor aMediaMap(aDescriptor); Reference< XStatusIndicator > xStatusIndicator(aMediaMap.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_STATUSINDICATOR(), Reference< XStatusIndicator >())); if (xStatusIndicator.is()) - xStatusIndicator->start( "Saving :",nProgressRange); + xStatusIndicator->start( "Saving :", 3); // Set up converter bridge. Reference< css::xml::XExportFilter > xConverter(mxContext->getServiceManager()->createInstanceWithContext( udConvertClass, mxContext ), UNO_QUERY); diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx index 599f3e9091d7..84ca45e96aef 100644 --- a/filter/source/xsltdialog/xmlfilterjar.cxx +++ b/filter/source/xsltdialog/xmlfilterjar.cxx @@ -165,8 +165,7 @@ bool XMLFilterJarHelper::savePackage( const OUString& rPackageURL, const XMLFilt // get root zip folder Reference< XInterface > xRootFolder; - OUString szRootFolder("/"); - xIfc->getByHierarchicalName( szRootFolder ) >>= xRootFolder; + xIfc->getByHierarchicalName( "/" ) >>= xRootFolder; // export filters files XMLFilterVector::const_iterator aIter( rFilters.begin() ); @@ -214,8 +213,7 @@ bool XMLFilterJarHelper::savePackage( const OUString& rPackageURL, const XMLFilt } Reference< XInputStream > XIS( new utl::OSeekableInputStreamWrapper( new SvFileStream(aTempFileURL, StreamMode::READ ), true ) ); - OUString szTypeDetection( "TypeDetection.xcu" ); - addFile_( xRootFolder, xFactory, XIS, szTypeDetection ); + addFile_( xRootFolder, xFactory, XIS, "TypeDetection.xcu" ); Reference< XChangesBatch > xBatch( xIfc, UNO_QUERY ); if( xBatch.is() ) @@ -259,8 +257,7 @@ void XMLFilterJarHelper::openPackage( const OUString& rPackageURL, XMLFilterVect { // get root zip folder Reference< XInterface > xRootFolder; - OUString szRootFolder("/"); - xIfc->getByHierarchicalName( szRootFolder ) >>= xRootFolder; + xIfc->getByHierarchicalName( "/" ) >>= xRootFolder; OUString szTypeDetection("TypeDetection.xcu"); if( xIfc->hasByHierarchicalName( szTypeDetection ) ) diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index dbf14e752ceb..f1da2804e979 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -352,13 +352,12 @@ static Sequence< OUString > createExtensionsSequence( const OUString& rExtension OUString XMLFilterSettingsDialog::createUniqueFilterName( const OUString& rFilterName ) { OUString aFilterName( rFilterName ); - OUString aSpace(" "); sal_Int32 nId = 2; while( mxFilterContainer->hasByName( aFilterName ) ) { - aFilterName = rFilterName + aSpace + OUString::number( nId++ ); + aFilterName = rFilterName + " " + OUString::number( nId++ ); } return aFilterName; @@ -369,13 +368,12 @@ OUString XMLFilterSettingsDialog::createUniqueFilterName( const OUString& rFilte OUString XMLFilterSettingsDialog::createUniqueTypeName( const OUString& rTypeName ) { OUString aTypeName( rTypeName ); - OUString aSpace(" "); sal_Int32 nId = 2; while( mxFilterContainer->hasByName( aTypeName ) ) { - aTypeName = rTypeName + aSpace + OUString::number( nId++ ); + aTypeName = rTypeName + " " + OUString::number( nId++ ); } return aTypeName; @@ -804,9 +802,8 @@ void XMLFilterSettingsDialog::onDelete() { filter_info_impl* pInfo = static_cast<filter_info_impl*>(pEntry->GetUserData()); - OUString aPlaceHolder( "%s" ); OUString aMessage(XsltResId(STR_WARN_DELETE)); - aMessage = aMessage.replaceFirst( aPlaceHolder, pInfo->maFilterName ); + aMessage = aMessage.replaceFirst( "%s", pInfo->maFilterName ); ScopedVclPtrInstance< WarningBox > aWarnBox(this, (WinBits)(WB_YES_NO | WB_DEF_YES), aMessage ); if( aWarnBox->Execute() == RET_YES ) diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index bc07a5ae176d..66daa63b3778 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -413,11 +413,10 @@ void XMLFilterTestDialog::onExportBrowse() Reference< XDesktop2 > xLoader = Desktop::create( mxContext ); Reference< XInteractionHandler2 > xInter = InteractionHandler::createWithParent(mxContext, nullptr); - OUString aFrame( "_default" ); Sequence< PropertyValue > aArguments(1); aArguments[0].Name = "InteractionHandler"; aArguments[0].Value <<= xInter; - Reference< XComponent > xComp( xLoader->loadComponentFromURL( m_sExportRecentFile, aFrame, 0, aArguments ) ); + Reference< XComponent > xComp( xLoader->loadComponentFromURL( m_sExportRecentFile, "_default", 0, aArguments ) ); if( xComp.is() ) { doExport( xComp ); @@ -591,14 +590,13 @@ void XMLFilterTestDialog::import( const OUString& rURL ) Reference< XDesktop2 > xLoader = Desktop::create( mxContext ); Reference< XInteractionHandler2 > xInter = InteractionHandler::createWithParent(mxContext, nullptr); - OUString aFrame( "_default" ); Sequence< PropertyValue > aArguments(2); aArguments[0].Name = "FilterName"; aArguments[0].Value <<= m_pFilterInfo->maFilterName; aArguments[1].Name = "InteractionHandler"; aArguments[1].Value <<= xInter; - xLoader->loadComponentFromURL( rURL, aFrame, 0, aArguments ); + xLoader->loadComponentFromURL( rURL, "_default", 0, aArguments ); if( m_pCBXDisplaySource->IsChecked() ) { |