lotuswordpro: Use appropriate OUString functions on string constants

Change-Id: I8cccb8e558aba949d64cf9e7b85316d8e2e15865
This commit is contained in:
Stephan Bergmann 2014-12-18 13:27:05 +01:00
parent 6fbf6f2ad1
commit ed609b5119
8 changed files with 14 additions and 20 deletions

View File

@ -180,22 +180,16 @@ OUString LotusWordProImportFilter_getImplementationName ()
return OUString ( "com.sun.star.comp.Writer.LotusWordProImportFilter" );
}
#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
Sequence< OUString > SAL_CALL LotusWordProImportFilter_getSupportedServiceNames( )
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
OUString* pArray = aRet.getArray();
pArray[0] = OUString ( SERVICE_NAME1 );
pArray[1] = OUString ( SERVICE_NAME2 );
pArray[0] = "com.sun.star.document.ImportFilter";
pArray[1] = "com.sun.star.document.ExtendedTypeDetection";
return aRet;
}
#undef SERVICE_NAME2
#undef SERVICE_NAME1
uno::Reference< XInterface > SAL_CALL LotusWordProImportFilter_createInstance( const uno::Reference< XMultiServiceFactory > & rSMgr)
throw( Exception )
{

View File

@ -247,7 +247,7 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
//note by ,1-27
rtl::Reference<XFFont> pFont;
XFTextStyle* pStyle = NULL;
m_StyleName = "";
m_StyleName.clear();
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
if (m_pModifiers->HasCharStyle)
{

View File

@ -391,11 +391,11 @@ void LwpFieldMark::ParseIndex(OUString& sKey1,OUString& sKey2)
if (index[0]>=0 && index[1]>=0)
sKey1 = sFormula.copy(index[0]+1,index[1]-index[0]-1);
else
sKey1 = "";
sKey1.clear();
if (index[2]>=0 && index[3]>=0)
sKey2 = sFormula.copy(index[2]+1,index[3]-index[2]-1);
else
sKey2 = "";
sKey2.clear();
}
void LwpFieldMark::ParseTOC(OUString& sLevel,OUString& sText)
@ -413,11 +413,11 @@ void LwpFieldMark::ParseTOC(OUString& sLevel,OUString& sText)
if (index[0]>=0 && index[1]>=0)
sLevel = sFormula.copy(index[0]+1,index[1]-index[0]-1);
else
sLevel = "";
sLevel.clear();
if (index[2]>=0 && index[3]>=0)
sText = sFormula.copy(index[2]+1,index[3]-index[2]-1);
else
sText = "";
sText.clear();
}
bool LwpFieldMark::IsFormulaInsert()

View File

@ -208,7 +208,7 @@ OUString LwpNoteLayout::GetAuthor()
{
if(m_UserName.HasValue())
{
if(m_UserName.str() != OUString(" "))
if(m_UserName.str() != " ")
{
return m_UserName.str();
}

View File

@ -813,7 +813,7 @@ XFSection* LwpPara::CreateXFSection()
{
XFSection* pXFSection = new XFSection();
pXFSection->SetStyleName(m_SectionStyleName);
m_SectionStyleName = "";
m_SectionStyleName.clear();
return pXFSection;
}

View File

@ -68,9 +68,9 @@ void XFFileName::ToXml(IXFStream *pStrm)
{
IXFAttrList *pAttrList = pStrm->GetAttrList();
pAttrList->Clear();
if (m_strType.equals("FileName"))
if (m_strType == "FileName")
pAttrList->AddAttribute( "text:display", "name-and-extension" );
else if (m_strType.equals("Path"))
else if (m_strType == "Path")
pAttrList->AddAttribute( "text:display", "path" );
pStrm->StartElement( "text:file-name" );
pStrm->EndElement( "text:file-name" );

View File

@ -292,7 +292,7 @@ void XFDrawStyle::ToXml(IXFStream *pStrm)
}
//adjust
aStr = "";
aStr.clear();
switch (m_pFontWorkStyle->GetAdjustType())
{
default: // fall througth
@ -315,7 +315,7 @@ void XFDrawStyle::ToXml(IXFStream *pStrm)
}
//form
aStr = "";
aStr.clear();
switch (m_pFontWorkStyle->GetButtonForm())
{
default: // fall through!

View File

@ -111,7 +111,7 @@ inline void XFDropcap::Reset()
m_nCharCount = 0;
m_nLines = 0;
m_fDistance = 0;
m_strStyleName = "";
m_strStyleName.clear();
}
inline void XFDropcap::ToXml(IXFStream *pStrm)