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

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

Change-Id: I7b5b2a21182d0b841a6104f2dddb16c13abb32f4
üst 69b81b64
...@@ -730,7 +730,7 @@ StgDirStrm::StgDirStrm( StgIo& r ) ...@@ -730,7 +730,7 @@ StgDirStrm::StgDirStrm( StgIo& r )
{ {
StgEntry aRoot; StgEntry aRoot;
aRoot.Init(); aRoot.Init();
aRoot.SetName( OUString("Root Entry") ); aRoot.SetName( "Root Entry" );
aRoot.SetType( STG_ROOT ); aRoot.SetType( STG_ROOT );
m_pRoot = new StgDirEntry( aRoot ); m_pRoot = new StgDirEntry( aRoot );
m_pRoot->SetDirty(); m_pRoot->SetDirty();
......
...@@ -1116,7 +1116,7 @@ sal_Int16 UCBStorageStream_Impl::Commit() ...@@ -1116,7 +1116,7 @@ sal_Int16 UCBStorageStream_Impl::Commit()
aArg.Data = xStream; aArg.Data = xStream;
aArg.ReplaceExisting = true; aArg.ReplaceExisting = true;
aAny <<= aArg; aAny <<= aArg;
m_pContent->executeCommand( OUString("insert"), aAny ); m_pContent->executeCommand( "insert", aAny );
// wrapper now controls lifetime of temporary file // wrapper now controls lifetime of temporary file
m_aTempURL.clear(); m_aTempURL.clear();
...@@ -1665,8 +1665,8 @@ void UCBStorage_Impl::Init() ...@@ -1665,8 +1665,8 @@ void UCBStorage_Impl::Init()
if ( m_nError == ERRCODE_NONE ) if ( m_nError == ERRCODE_NONE )
{ {
// read the manifest.xml file // read the manifest.xml file
aObj.Append( OUString( "META-INF" ) ); aObj.Append( "META-INF" );
aObj.Append( OUString( "manifest.xml" ) ); aObj.Append( "manifest.xml" );
// create input stream // create input stream
std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ )); std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ ));
...@@ -2132,7 +2132,7 @@ sal_Int16 UCBStorage_Impl::Commit() ...@@ -2132,7 +2132,7 @@ sal_Int16 UCBStorage_Impl::Commit()
// first remove all open stream handles // first remove all open stream handles
if (pContent && (!pElement->m_xStream.Is() || pElement->m_xStream->Clear())) if (pContent && (!pElement->m_xStream.Is() || pElement->m_xStream->Clear()))
{ {
pContent->executeCommand( OUString("delete"), makeAny( true ) ); pContent->executeCommand( "delete", makeAny( true ) );
nRet = COMMIT_RESULT_SUCCESS; nRet = COMMIT_RESULT_SUCCESS;
} }
else else
...@@ -2241,7 +2241,7 @@ sal_Int16 UCBStorage_Impl::Commit() ...@@ -2241,7 +2241,7 @@ sal_Int16 UCBStorage_Impl::Commit()
// write a manifest file // write a manifest file
// first create a subfolder "META-inf" // first create a subfolder "META-inf"
Content aNewSubFolder; Content aNewSubFolder;
bool bRet = ::utl::UCBContentHelper::MakeFolder( *m_pContent, OUString("META-INF"), aNewSubFolder ); bool bRet = ::utl::UCBContentHelper::MakeFolder( *m_pContent, "META-INF", aNewSubFolder );
if ( bRet ) if ( bRet )
{ {
// create a stream to write the manifest file - use a temp file // create a stream to write the manifest file - use a temp file
...@@ -2268,7 +2268,7 @@ sal_Int16 UCBStorage_Impl::Commit() ...@@ -2268,7 +2268,7 @@ sal_Int16 UCBStorage_Impl::Commit()
xWriter = NULL; xWriter = NULL;
xOutputStream = NULL; xOutputStream = NULL;
pTempFile.reset(); pTempFile.reset();
aNewSubFolder.transferContent( aSource, InsertOperation_MOVE, OUString("manifest.xml"), NameClash::OVERWRITE ); aNewSubFolder.transferContent( aSource, InsertOperation_MOVE, "manifest.xml", NameClash::OVERWRITE );
} }
} }
else else
...@@ -2279,7 +2279,7 @@ sal_Int16 UCBStorage_Impl::Commit() ...@@ -2279,7 +2279,7 @@ sal_Int16 UCBStorage_Impl::Commit()
#endif #endif
// force writing // force writing
Any aAny; Any aAny;
m_pContent->executeCommand( OUString("flush"), aAny ); m_pContent->executeCommand( "flush", aAny );
if ( m_pSource != 0 ) if ( m_pSource != 0 )
{ {
std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( m_pTempFile->GetURL(), STREAM_STD_READ )); std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( m_pTempFile->GetURL(), STREAM_STD_READ ));
......
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