diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:37:28 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:37:28 +0100 |
commit | bf6b30ba95bbb70d556b479ed91026156ed04d29 (patch) | |
tree | 975ae991095ba009ce645545395284a1e2cd3802 /starmath | |
parent | 201c98c60d52530de075326b269002f23c4c2775 (diff) |
loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: Id5b78aa78fc585a67712fa44329479a86230d194
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/document.cxx | 4 | ||||
-rw-r--r-- | starmath/source/edit.cxx | 2 | ||||
-rw-r--r-- | starmath/source/eqnolefilehdr.cxx | 2 | ||||
-rw-r--r-- | starmath/source/mathtype.cxx | 10 | ||||
-rw-r--r-- | starmath/source/smdll.cxx | 2 | ||||
-rw-r--r-- | starmath/source/smmod.cxx | 2 | ||||
-rw-r--r-- | starmath/source/symbol.cxx | 4 | ||||
-rw-r--r-- | starmath/source/unofilter.cxx | 2 | ||||
-rw-r--r-- | starmath/source/view.cxx | 2 |
9 files changed, 15 insertions, 15 deletions
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 72ca5a104a0a..fcc69d480f07 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -371,7 +371,7 @@ EditEngine& SmDocShell::GetEditEngine() pEditEngine->EnableUndo( true ); pEditEngine->SetDefTab( sal_uInt16( - Application::GetDefaultDevice()->GetTextWidth(OUString("XXXX"))) ); + Application::GetDefaultDevice()->GetTextWidth("XXXX")) ); pEditEngine->SetControlWord( (pEditEngine->GetControlWord() | EEControlBits::AUTOINDENTING) & @@ -713,7 +713,7 @@ bool SmDocShell::ConvertFrom(SfxMedium &rMedium) if ( SotStorage::IsStorageFile( pStream ) ) { tools::SvRef<SotStorage> aStorage = new SotStorage( pStream, false ); - if ( aStorage->IsStream(OUString("Equation Native")) ) + if ( aStorage->IsStream("Equation Native") ) { // is this a MathType Storage? MathType aEquation( aText ); diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index f5bf1046531c..70e976bdd9aa 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -238,7 +238,7 @@ void SmEditWindow::DataChanged( const DataChangedEvent& ) //! see also SmDocShell::GetEditEngine() ! //! - pEditEngine->SetDefTab(sal_uInt16(GetTextWidth(OUString("XXXX")))); + pEditEngine->SetDefTab(sal_uInt16(GetTextWidth("XXXX"))); SetEditEngineDefaultFonts(*pEditEngineItemPool); diff --git a/starmath/source/eqnolefilehdr.cxx b/starmath/source/eqnolefilehdr.cxx index 0853ebd1cac8..ed7c0044ce5c 100644 --- a/starmath/source/eqnolefilehdr.cxx +++ b/starmath/source/eqnolefilehdr.cxx @@ -33,7 +33,7 @@ bool GetMathTypeVersion( SotStorage* pStor, sal_uInt8 &nVersion ) // code snippet copied from MathType::Parse tools::SvRef<SotStorageStream> xSrc = pStor->OpenSotStream( - OUString("Equation Native"), + "Equation Native", STREAM_STD_READ | StreamMode::NOCREATE); if ( (!xSrc.Is()) || (SVSTREAM_OK != xSrc->GetError())) return bSuccess; diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index 4c9d08a340f2..791e698aa2a6 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -555,7 +555,7 @@ void MathType::TypeFaceToString(OUString &rTxt,sal_uInt8 nFace) int MathType::Parse(SotStorage *pStor) { tools::SvRef<SotStorageStream> xSrc = pStor->OpenSotStream( - OUString("Equation Native"), + "Equation Native", STREAM_STD_READ | StreamMode::NOCREATE); if ( (!xSrc.Is()) || (SVSTREAM_OK != xSrc->GetError())) return 0; @@ -1889,7 +1889,7 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium ) SvGlobalName aGName(0x0002ce02L, 0x0000, 0x0000,0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46 ); - pStor->SetClass( aGName, SotClipboardFormatId::NONE, OUString("Microsoft Equation 3.0")); + pStor->SetClass( aGName, SotClipboardFormatId::NONE, "Microsoft Equation 3.0"); static sal_uInt8 const aCompObj[] = { 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00, @@ -1906,7 +1906,7 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium ) 0xB2, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - tools::SvRef<SotStorageStream> xStor( pStor->OpenSotStream(OUString("\1CompObj"))); + tools::SvRef<SotStorageStream> xStor( pStor->OpenSotStream("\1CompObj")); xStor->Write(aCompObj,sizeof(aCompObj)); static sal_uInt8 const aOle[] = { @@ -1914,12 +1914,12 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium ) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - tools::SvRef<SotStorageStream> xStor2( pStor->OpenSotStream(OUString("\1Ole"))); + tools::SvRef<SotStorageStream> xStor2( pStor->OpenSotStream("\1Ole")); xStor2->Write(aOle,sizeof(aOle)); xStor.Clear(); xStor2.Clear(); - tools::SvRef<SotStorageStream> xSrc = pStor->OpenSotStream(OUString("Equation Native")); + tools::SvRef<SotStorageStream> xSrc = pStor->OpenSotStream("Equation Native"); if ( (!xSrc.Is()) || (SVSTREAM_OK != xSrc->GetError())) return 0; diff --git a/starmath/source/smdll.cxx b/starmath/source/smdll.cxx index d8335211daed..624b22f1b61e 100644 --- a/starmath/source/smdll.cxx +++ b/starmath/source/smdll.cxx @@ -58,7 +58,7 @@ namespace SmModule *pModule = new SmModule( &rFactory ); *ppShlPtr = pModule; - rFactory.SetDocumentServiceName( OUString("com.sun.star.formula.FormulaProperties") ); + rFactory.SetDocumentServiceName( "com.sun.star.formula.FormulaProperties" ); SmModule::RegisterInterface(pModule); SmDocShell::RegisterInterface(pModule); diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx index d6c7f7e09d63..7e9206e638df 100644 --- a/starmath/source/smmod.cxx +++ b/starmath/source/smmod.cxx @@ -165,7 +165,7 @@ void SmModule::InitInterface_Impl() SmModule::SmModule(SfxObjectFactory* pObjFact) : SfxModule(ResMgr::CreateResMgr("sm"), false, pObjFact, nullptr) { - SetName(OUString("StarMath")); + SetName("StarMath"); SvxModifyControl::RegisterControl(SID_DOC_MODIFIED, this); } diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index 58ae786d1d52..91ce716095da 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -256,7 +256,7 @@ void SmSymbolManager::Load() } // now add a %i... symbol to the 'iGreek' set for every symbol found in the 'Greek' set. - const OUString aGreekSymbolSetName(SmLocalizedSymbolData::GetUiSymbolSetName(OUString("Greek"))); + const OUString aGreekSymbolSetName(SmLocalizedSymbolData::GetUiSymbolSetName("Greek")); const SymbolPtrVec_t aGreekSymbols( GetSymbolSet( aGreekSymbolSetName ) ); OUString aSymbolSetName('i'); aSymbolSetName += aGreekSymbolSetName; @@ -285,7 +285,7 @@ void SmSymbolManager::Save() // prepare to skip symbols from iGreek on saving OUString aSymbolSetName('i'); - aSymbolSetName += SmLocalizedSymbolData::GetUiSymbolSetName(OUString("Greek")); + aSymbolSetName += SmLocalizedSymbolData::GetUiSymbolSetName("Greek"); SymbolPtrVec_t aTmp( GetSymbols() ); std::vector< SmSym > aSymbols; diff --git a/starmath/source/unofilter.cxx b/starmath/source/unofilter.cxx index 7c856b393c0a..903e9af99667 100644 --- a/starmath/source/unofilter.cxx +++ b/starmath/source/unofilter.cxx @@ -71,7 +71,7 @@ sal_Bool MathTypeFilter::filter(const uno::Sequence<beans::PropertyValue>& rDesc { tools::SvRef<SotStorage> aStorage(new SotStorage(pStream.get(), false)); // Is this a MathType Storage? - if (aStorage->IsStream(OUString("Equation Native"))) + if (aStorage->IsStream("Equation Native")) { if (SmModel* pModel = dynamic_cast<SmModel*>(m_xDstDoc.get())) { diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 29eeaff572c8..0004a1b61d98 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -2008,7 +2008,7 @@ SmViewShell::SmViewShell(SfxViewFrame *pFrame_, SfxViewShell *) { SetStatusText(OUString()); SetWindow(aGraphic.get()); - SfxShell::SetName(OUString("SmView")); + SfxShell::SetName("SmView"); SfxShell::SetUndoManager( &GetDoc()->GetEditEngine().GetUndoManager() ); SetHelpId( HID_SMA_VIEWSHELL_DOCUMENT ); } |