diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-04 12:47:02 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-04 12:47:39 +0200 |
commit | f927cf4d23432341921c55e6983edf9c8ebe7ff7 (patch) | |
tree | 494c7f6547456c7e015c6a3e97f24e9925593668 /sw/source | |
parent | a66c83d90cdfb8714ef9096d60a60ae807812063 (diff) |
loplugin:stringconstant
Change-Id: Ic135382652966e80c288f3407508bdaf0c60316e
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/docxforms.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/edit/edlingu.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/txthyph.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/basflt/iodetect.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlbas.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/vba/vbaautotextentry.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/vba/vbarange.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/dialog/swabstdlg.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/sidebar/PagePropertyPanel.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/srcview.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view.cxx | 2 |
16 files changed, 23 insertions, 27 deletions
diff --git a/sw/source/core/doc/docxforms.cxx b/sw/source/core/doc/docxforms.cxx index db8d5c4428d0..f5254546acd0 100644 --- a/sw/source/core/doc/docxforms.cxx +++ b/sw/source/core/doc/docxforms.cxx @@ -66,7 +66,7 @@ void SwDoc::initXForms( bool bCreateDefaultModel ) xModule.set(pShell->GetModel(), css::uno::UNO_QUERY); OSL_ENSURE( xModule.is(), "SwDoc::initXForms: no XModule at the document!" ); if ( xModule.is() ) - xModule->setIdentifier( OUString( "com.sun.star.xforms.XMLFormDocument" ) ); + xModule->setIdentifier( "com.sun.star.xforms.XMLFormDocument" ); // create default model if( bCreateDefaultModel && mxXForms.is() ) @@ -75,7 +75,7 @@ void SwDoc::initXForms( bool bCreateDefaultModel ) Reference<XModel2> xModel = xforms::Model::create( comphelper::getProcessComponentContext() ); xModel->setID( sName ); Reference<XFormsUIHelper1>( xModel, uno::UNO_QUERY_THROW )->newInstance( - OUString("Instance 1"), + "Instance 1", OUString(), sal_True ); xModel->initialize(); mxXForms->insertByName( sName, makeAny( xModel ) ); diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index e91cdfe20d47..e7dfcf26b1ce 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -417,7 +417,7 @@ bool SwHyphIter::IsAuto() { uno::Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() ); return xProp.is() && *static_cast<sal_Bool const *>(xProp->getPropertyValue( - OUString(UPN_IS_HYPH_AUTO) ).getValue()); + UPN_IS_HYPH_AUTO ).getValue()); } void SwHyphIter::ShowSelection() diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx index 3841ea07321e..3e528f587c8c 100644 --- a/sw/source/core/text/txthyph.cxx +++ b/sw/source/core/text/txthyph.cxx @@ -45,7 +45,7 @@ Reference< XHyphenatedWord > SwTextFormatInfo::HyphWord( Reference< XHyphenatedWord > xHyphWord; if( xHyph.is() ) - xHyphWord = xHyph->hyphenate( OUString(rText), + xHyphWord = xHyph->hyphenate( rText, g_pBreakIt->GetLocale( m_pFnt->GetLanguage() ), rText.getLength() - nMinTrail, GetHyphValues() ); return xHyphWord; diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index b4d4fb1d789a..257f09cda84d 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -93,7 +93,7 @@ bool SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::s try { SotClipboardFormatId nStgFormatId = SotStorage::GetFormatID( rStg ); - bRet = rStg->isStreamElement( OUString("content.xml") ); + bRet = rStg->isStreamElement( "content.xml" ); if ( bRet ) bRet = ( nStgFormatId != SotClipboardFormatId::NONE && ( rFilter.GetFormat() == nStgFormatId ) ); } diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index ec4143e5d38e..d6b8de214630 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -144,7 +144,7 @@ void SwHTMLParser::EndScript() { aBasicModule = "Modul"; aBasicModule += OUString::number( (sal_Int32)(++nSBModuleCnt) ); - bFound = xModLib->hasByName( OUString( aBasicModule ) ); + bFound = xModLib->hasByName( aBasicModule ); } } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 3ddf5945e826..c4ea3b7fca30 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3554,7 +3554,7 @@ void WW8Export::RestoreMacroCmds() try { uno::Reference < io::XStream > xSrcStream = - xSrcRoot->openStreamElement( OUString(SL::aMSMacroCmds), embed::ElementModes::READ ); + xSrcRoot->openStreamElement( SL::aMSMacroCmds, embed::ElementModes::READ ); SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( xSrcStream ); if ( pStream && SVSTREAM_OK == pStream->GetError()) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 77409e519607..4d56d1d4bb9a 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4669,7 +4669,7 @@ void SwWW8ImplReader::StoreMacroCmds() try { uno::Reference < io::XStream > xStream = - xRoot->openStreamElement( OUString(SL::aMSMacroCmds), embed::ElementModes::READWRITE ); + xRoot->openStreamElement( SL::aMSMacroCmds, embed::ElementModes::READWRITE ); std::unique_ptr<SvStream> xOutStream(::utl::UcbStreamHelper::CreateStream(xStream)); sal_uInt32 lcbCmds = std::min<sal_uInt32>(m_pWwFib->lcbCmds, m_pTableStream->remainingSize()); diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 99d4c7a86937..3307cd560004 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1392,14 +1392,12 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC if ( !bUnixForceZeroExtLeading ) { - xProps->setPropertyValue( - OUString("UnxForceZeroExtLeading"), makeAny( true ) ); + xProps->setPropertyValue( "UnxForceZeroExtLeading", makeAny( true ) ); } if ( !bUseOldPrinterMetrics ) { - xProps->setPropertyValue( - OUString("UseOldPrinterMetrics"), makeAny( true ) ); + xProps->setPropertyValue( "UseOldPrinterMetrics", makeAny( true ) ); } // Old LO versions had 66 as the value for small caps percentage, later changed to 80. @@ -1408,14 +1406,12 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC // are considered to be old files, so set the compatibility option too. if ( !bSmallCapsPercentage66 ) { - xProps->setPropertyValue( - OUString("SmallCapsPercentage66"), makeAny( true ) ); + xProps->setPropertyValue( "SmallCapsPercentage66", makeAny( true ) ); } if ( !bTabOverflow ) { - xProps->setPropertyValue( - OUString("TabOverflow"), makeAny( false ) ); + xProps->setPropertyValue( "TabOverflow", makeAny( false ) ); } if ( !bUnbreakableNumberings ) diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx index 5d57e3008a6c..4bf5b59e4340 100644 --- a/sw/source/ui/vba/vbaautotextentry.cxx +++ b/sw/source/ui/vba/vbaautotextentry.cxx @@ -41,14 +41,14 @@ uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::R if( pWhere ) { uno::Reference< text::XTextRange > xTextRange = pWhere->getXTextRange(); - xTextRange->setString( OUString("x") ); // set marker + xTextRange->setString( "x" ); // set marker uno::Reference< text::XTextRange > xEndMarker = xTextRange->getEnd(); - xEndMarker->setString( OUString("x") ); // set marker + xEndMarker->setString( "x" ); // set marker uno::Reference< text::XText > xText = pWhere->getXText(); mxEntry->applyTo( xEndMarker->getStart() ); uno::Reference< text::XTextCursor > xTC = xText->createTextCursorByRange( xTextRange->getStart() ); xTC->goRight( 1, sal_True ); - xTC->setString( OUString("") ); // remove marker + xTC->setString( "" ); // remove marker // remove the blank paragraph if it is a rich text bool bRich = false; _richtext >>= bRich; @@ -68,7 +68,7 @@ uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::R xTVCursor->gotoRange( xEndMarker->getEnd(), sal_False ); } } - xEndMarker->setString( OUString("") ); // remove marker + xEndMarker->setString( "" ); // remove marker xTC = xText->createTextCursorByRange( xEndMarker->getEnd() ); pWhere->setXTextCursor( xTC ); } diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx index 368eb230b764..ae76f189ef27 100644 --- a/sw/source/ui/vba/vbarange.cxx +++ b/sw/source/ui/vba/vbarange.cxx @@ -224,7 +224,7 @@ SwVbaRange::Select() throw ( uno::RuntimeException, std::exception ) void SAL_CALL SwVbaRange::InsertParagraph() throw ( uno::RuntimeException, std::exception ) { - mxTextCursor->setString( OUString("") ); + mxTextCursor->setString( "" ); InsertParagraphBefore(); } diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index fd7d888a1d51..09c4b5fc55f1 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1004,7 +1004,7 @@ void SwDocShell::Execute(SfxRequest& rReq) xCtrlAcc->setValue( ExtendedFilePickerElementIds::LISTBOX_TEMPLATE, ListboxControlActions::SET_SELECT_ITEM, aSelectPos ); xCtrlAcc->setLabel( ExtendedFilePickerElementIds::LISTBOX_TEMPLATE, - OUString(SW_RES( STR_FDLG_TEMPLATE_NAME ))); + SW_RES( STR_FDLG_TEMPLATE_NAME )); } catch (const Exception&) { diff --git a/sw/source/uibase/dialog/swabstdlg.cxx b/sw/source/uibase/dialog/swabstdlg.cxx index 34c84c93d6e7..449e584f499e 100644 --- a/sw/source/uibase/dialog/swabstdlg.cxx +++ b/sw/source/uibase/dialog/swabstdlg.cxx @@ -45,7 +45,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create() if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName, SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) ) fp = reinterpret_cast<SwAbstractDialogFactory* (SAL_CALL*)()>( - aDialogLibrary.getFunctionSymbol( OUString("SwCreateDialogFactory"))); + aDialogLibrary.getFunctionSymbol( "SwCreateDialogFactory" )); #else fp = SwCreateDialogFactory(); #endif diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 5b46cd3f5ff2..39bd292393dc 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1829,7 +1829,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, embed::InsertedObjectInfo aInfo = xClipboardCreator->createInstanceInitFromClipboard( xTmpStor, - OUString( "DummyName" ), + "DummyName", uno::Sequence< beans::PropertyValue >() ); // TODO/LATER: in future InsertedObjectInfo will be used to get container related information diff --git a/sw/source/uibase/sidebar/PagePropertyPanel.cxx b/sw/source/uibase/sidebar/PagePropertyPanel.cxx index 025b006409f5..a869b44e3f49 100644 --- a/sw/source/uibase/sidebar/PagePropertyPanel.cxx +++ b/sw/source/uibase/sidebar/PagePropertyPanel.cxx @@ -753,7 +753,7 @@ void PagePropertyPanel::StartUndo() { if ( mxUndoManager.is() ) { - mxUndoManager->enterUndoContext( OUString("") ); + mxUndoManager->enterUndoContext( "" ); } } diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index 259d8ec9aabf..fe991822fab2 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -319,7 +319,7 @@ void SwSrcView::Execute(SfxRequest& rReq) { // filter not found OUString sHtml("HTML"); - xFltMgr->appendFilter( sHtml, OUString("*.html;*.htm") ); + xFltMgr->appendFilter( sHtml, "*.html;*.htm" ); xFltMgr->setCurrentFilter( sHtml ) ; } diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index d6f7783d39b5..4eb4d60596c3 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -984,7 +984,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame().GetFrameInterface(); uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame( - OUString("_beamer"), frame::FrameSearchFlag::CHILDREN); + "_beamer", frame::FrameSearchFlag::CHILDREN); if(xBeamerFrame.is()) { SwDBData aData = m_pWrtShell->GetDBData(); |