lotuswordpro: Use appropriate OUString functions on string constants
Change-Id: I8cccb8e558aba949d64cf9e7b85316d8e2e15865
This commit is contained in:
parent
6fbf6f2ad1
commit
ed609b5119
@ -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 )
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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()
|
||||
|
@ -208,7 +208,7 @@ OUString LwpNoteLayout::GetAuthor()
|
||||
{
|
||||
if(m_UserName.HasValue())
|
||||
{
|
||||
if(m_UserName.str() != OUString(" "))
|
||||
if(m_UserName.str() != " ")
|
||||
{
|
||||
return m_UserName.str();
|
||||
}
|
||||
|
@ -813,7 +813,7 @@ XFSection* LwpPara::CreateXFSection()
|
||||
{
|
||||
XFSection* pXFSection = new XFSection();
|
||||
pXFSection->SetStyleName(m_SectionStyleName);
|
||||
m_SectionStyleName = "";
|
||||
m_SectionStyleName.clear();
|
||||
return pXFSection;
|
||||
}
|
||||
|
||||
|
@ -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" );
|
||||
|
@ -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!
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user