diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-04 11:49:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-11 11:21:22 +0200 |
commit | 957f8e02c29bc4df2f37f2a933957490cdf831f6 (patch) | |
tree | a5963f03c701aa83eeca9b237fce0bf6ad2f54ff | |
parent | 373f352ef2f39965b4ef830acfc1554f8e2e3abf (diff) |
remove unnecessary use of OUString constructor in FILTER module
Change-Id: I75b5a0e6739991b234819bd11ce901b90f68ffba
-rw-r--r-- | filter/source/msfilter/mstoolbar.cxx | 22 | ||||
-rw-r--r-- | filter/source/placeware/exporter.cxx | 10 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 10 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertestdialog.cxx | 22 |
4 files changed, 32 insertions, 32 deletions
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx index a8b56a02bf53..c4a6c7f13fc7 100644 --- a/filter/source/msfilter/mstoolbar.cxx +++ b/filter/source/msfilter/mstoolbar.cxx @@ -141,13 +141,13 @@ CustomToolBarImportHelper::createMenu( const OUString& rName, const uno::Referen if ( xPopup.is() ) { uno::Sequence< beans::PropertyValue > aPopupMenu( 4 ); - aPopupMenu[0].Name = OUString("CommandURL"); + aPopupMenu[0].Name = "CommandURL"; aPopupMenu[0].Value = uno::makeAny( OUString("vnd.openoffice.org:") + rName ); - aPopupMenu[1].Name = OUString("Label"); + aPopupMenu[1].Name = "Label"; aPopupMenu[1].Value <<= rName; - aPopupMenu[2].Name = OUString("ItemDescriptorContainer"); + aPopupMenu[2].Name = "ItemDescriptorContainer"; aPopupMenu[2].Value = uno::makeAny( xMenuDesc ); - aPopupMenu[3].Name = OUString("Type" ); + aPopupMenu[3].Name = "Type"; aPopupMenu[3].Value <<= sal_Int32( 0 ); xPopup->insertByIndex( xPopup->getCount(), uno::makeAny( aPopupMenu ) ); @@ -276,7 +276,7 @@ bool TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vect bBeginGroup = rHeader.isBeginGroup(); controlGeneralInfo.ImportToolBarControlData( helper, props ); beans::PropertyValue aProp; - aProp.Name = OUString("Visible") ; + aProp.Name = "Visible"; aProp.Value = uno::makeAny( rHeader.isVisible() ); // where is the visible attribute stored props.push_back( aProp ); if ( rHeader.getTct() == 0x01 @@ -327,7 +327,7 @@ bool TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vect } else if ( rHeader.getTct() == 0x0a ) { - aProp.Name = OUString("CommandURL") ; + aProp.Name = "CommandURL"; OUString sMenuBar("private:resource/menubar/"); TBCMenuSpecific* pMenu = getMenuSpecific(); @@ -338,7 +338,7 @@ bool TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vect } short icontext = ( rHeader.getTbct() & 0x03 ); - aProp.Name = OUString("Style") ; + aProp.Name = "Style"; if ( bIsMenuBar ) { nStyle |= ui::ItemStyle::TEXT; @@ -474,7 +474,7 @@ TBCGeneralInfo::ImportToolBarControlData( CustomToolBarImportHelper& helper, std // if ( rHeader.getTct() == 0x01 && rHeader.getTcID() == 0x01 ) // not defined, probably this is a command if ( !extraInfo.getOnAction().isEmpty() ) { - aProp.Name = OUString("CommandURL"); + aProp.Name = "CommandURL"; ooo::vba::MacroResolvedInfo aMacroInf = ooo::vba::resolveVBAMacro( &helper.GetDocShell(), extraInfo.getOnAction(), true ); if ( aMacroInf.mbFound ) aProp.Value = helper.createCommandFromMacro( aMacroInf.msResolvedMacro ); @@ -483,15 +483,15 @@ TBCGeneralInfo::ImportToolBarControlData( CustomToolBarImportHelper& helper, std sControlData.push_back( aProp ); } - aProp.Name = OUString("Label"); + aProp.Name = "Label"; aProp.Value = uno::makeAny( customText.getString().replace('&','~') ); sControlData.push_back( aProp ); - aProp.Name = OUString("Type"); + aProp.Name = "Type"; aProp.Value = uno::makeAny( ui::ItemType::DEFAULT ); sControlData.push_back( aProp ); - aProp.Name = OUString("Tooltip"); + aProp.Name = "Tooltip"; aProp.Value = uno::makeAny( tooltip.getString() ); sControlData.push_back( aProp ); /* diff --git a/filter/source/placeware/exporter.cxx b/filter/source/placeware/exporter.cxx index ddf0c6399e48..c927bf5213d9 100644 --- a/filter/source/placeware/exporter.cxx +++ b/filter/source/placeware/exporter.cxx @@ -483,17 +483,17 @@ PageEntry* PlaceWareExporter::exportPage( Reference< XDrawPage >&xDrawPage ) // create the gif Sequence< PropertyValue > aFilterData( 2 ); - aFilterData[0].Name = OUString("Width"); + aFilterData[0].Name = "Width"; aFilterData[0].Value <<= (sal_Int32)704; - aFilterData[1].Name = OUString("Translucent"); + aFilterData[1].Name = "Translucent"; aFilterData[1].Value <<= (sal_Bool)sal_False; Sequence< PropertyValue > aDescriptor( 3 ); - aDescriptor[0].Name = OUString("FilterName"); + aDescriptor[0].Name = "FilterName"; aDescriptor[0].Value <<= OUString("GIF"); - aDescriptor[1].Name = OUString("URL"); + aDescriptor[1].Name = "URL"; aDescriptor[1].Value <<= OUString( pEntry->getTempURL() ); - aDescriptor[2].Name = OUString("FilterData"); + aDescriptor[2].Name = "FilterData"; aDescriptor[2].Value <<= aFilterData; mxGraphicExporter->setSourceDocument( xComp ); mxGraphicExporter->filter( aDescriptor ); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 22b8c61f3c23..3a26b52c4c05 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -281,7 +281,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie } } else - rGradientId = OUString(); + rGradientId = ""; } void SVGAttributeWriter::SetFontAttr( const Font& rFont ) @@ -1273,7 +1273,7 @@ void SVGTextWriter::implExportHyperlinkIds() mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "HyperlinkIdList" ); SvXMLElementExport aDescElem( mrExport, XML_NAMESPACE_NONE, "desc", sal_True, sal_False ); mrExport.GetDocHandler()->characters( msHyperlinkIdList.trim() ); - msHyperlinkIdList = OUString(); + msHyperlinkIdList = ""; } } @@ -1304,7 +1304,7 @@ void SVGTextWriter::implWriteBulletChars() const BulletListItemInfo& rInfo = it->second; // Add positioning attribute through a translation - sPosition = OUString("translate(") + + sPosition = "translate(" + OUString::number( rInfo.aPos.X() ) + "," + OUString::number( rInfo.aPos.Y() ) + ")"; mrExport.AddAttribute( XML_NAMESPACE_NONE, "transform", sPosition ); @@ -2049,8 +2049,8 @@ void SVGActionWriter::ImplWritePattern( const PolyPolygon& rPolyPoly, // The origin of a pattern is positioned at (aRect.Left(), aRect.Top()). // So we need to adjust the pattern coordinate. - OUString aTransform = OUString("translate") + - "(" + OUString::number( -aRect.Left() ) + + OUString aTransform = "translate(" + + OUString::number( -aRect.Left() ) + "," + OUString::number( -aRect.Top() ) + ")"; mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrTransform, aTransform ); diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index 568def0c97b0..c4ce50ef9b17 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -196,7 +196,7 @@ void XMLFilterTestDialog::test( const filter_info_impl& rFilterInfo ) delete m_pFilterInfo; m_pFilterInfo = new filter_info_impl( rFilterInfo ); - m_sImportRecentFile = OUString(); + m_sImportRecentFile = ""; initDialog(); @@ -400,7 +400,7 @@ void XMLFilterTestDialog::onExportBrowse() Reference< XInteractionHandler2 > xInter = InteractionHandler::createWithParent(mxContext, 0); OUString aFrame( "_default" ); Sequence< PropertyValue > aArguments(1); - aArguments[0].Name = OUString( "InteractionHandler" ); + aArguments[0].Name = "InteractionHandler"; aArguments[0].Value <<= xInter; Reference< XComponent > xComp( xLoader->loadComponentFromURL( m_sExportRecentFile, aFrame, 0, aArguments ) ); if( xComp.is() ) @@ -446,15 +446,15 @@ void XMLFilterTestDialog::doExport( Reference< XComponent > xComp ) int i = 0; - aSourceData[i ].Name = OUString( "OutputStream" ); + aSourceData[i ].Name = "OutputStream"; aSourceData[i++].Value <<= xIS; - aSourceData[i].Name = OUString( "Indent" ); + aSourceData[i].Name = "Indent"; aSourceData[i++].Value <<= (sal_Bool)sal_True; if( bUseDocType ) { - aSourceData[i ].Name = OUString("DocType_Public"); + aSourceData[i ].Name = "DocType_Public"; aSourceData[i++].Value <<= m_pFilterInfo->maDocType; } @@ -499,7 +499,7 @@ void XMLFilterTestDialog::doExport( Reference< XComponent > xComp ) xExporter2->setSourceDocument( xComp ); Sequence< PropertyValue > aDescriptor( 1 ); - aDescriptor[0].Name = OUString( "FileName" ); + aDescriptor[0].Name = "FileName"; aDescriptor[0].Value <<= aTempFileURL; if( xFilter->filter( aDescriptor ) ) @@ -583,9 +583,9 @@ void XMLFilterTestDialog::import( const OUString& rURL ) OUString aFrame( "_default" ); Sequence< PropertyValue > aArguments(2); - aArguments[0].Name = OUString( "FilterName" ); + aArguments[0].Name = "FilterName"; aArguments[0].Value <<= m_pFilterInfo->maFilterName; - aArguments[1].Name = OUString( "InteractionHandler" ); + aArguments[1].Name = "InteractionHandler"; aArguments[1].Value <<= xInter; xLoader->loadComponentFromURL( rURL, aFrame, 0, aArguments ); @@ -607,13 +607,13 @@ void XMLFilterTestDialog::import( const OUString& rURL ) Sequence< PropertyValue > aSourceData( 3 ); int i = 0; - aSourceData[i ].Name = OUString( "InputStream" ); + aSourceData[i ].Name = "InputStream"; aSourceData[i++].Value <<= xIS; - aSourceData[i ].Name = OUString( "FileName" ); + aSourceData[i ].Name = "FileName"; aSourceData[i++].Value <<= rURL; - aSourceData[i ].Name = OUString( "Indent" ); + aSourceData[i ].Name = "Indent"; aSourceData[i++].Value <<= (sal_Bool)sal_True; Reference< XWriter > xWriter = Writer::create( mxContext ); |