Kaydet (Commit) bf6b30ba authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)

Change-Id: Id5b78aa78fc585a67712fa44329479a86230d194
üst 201c98c6
......@@ -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 );
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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()))
{
......
......@@ -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 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment