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

lotuswordpro: Use appropriate OUString functions on string constants

Change-Id: I8cccb8e558aba949d64cf9e7b85316d8e2e15865
üst 6fbf6f2a
...@@ -180,22 +180,16 @@ OUString LotusWordProImportFilter_getImplementationName () ...@@ -180,22 +180,16 @@ OUString LotusWordProImportFilter_getImplementationName ()
return OUString ( "com.sun.star.comp.Writer.LotusWordProImportFilter" ); 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( ) Sequence< OUString > SAL_CALL LotusWordProImportFilter_getSupportedServiceNames( )
throw (RuntimeException) throw (RuntimeException)
{ {
Sequence < OUString > aRet(2); Sequence < OUString > aRet(2);
OUString* pArray = aRet.getArray(); OUString* pArray = aRet.getArray();
pArray[0] = OUString ( SERVICE_NAME1 ); pArray[0] = "com.sun.star.document.ImportFilter";
pArray[1] = OUString ( SERVICE_NAME2 ); pArray[1] = "com.sun.star.document.ExtendedTypeDetection";
return aRet; return aRet;
} }
#undef SERVICE_NAME2
#undef SERVICE_NAME1
uno::Reference< XInterface > SAL_CALL LotusWordProImportFilter_createInstance( const uno::Reference< XMultiServiceFactory > & rSMgr) uno::Reference< XInterface > SAL_CALL LotusWordProImportFilter_createInstance( const uno::Reference< XMultiServiceFactory > & rSMgr)
throw( Exception ) throw( Exception )
{ {
......
...@@ -247,7 +247,7 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry) ...@@ -247,7 +247,7 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
//note by ,1-27 //note by ,1-27
rtl::Reference<XFFont> pFont; rtl::Reference<XFFont> pFont;
XFTextStyle* pStyle = NULL; XFTextStyle* pStyle = NULL;
m_StyleName = ""; m_StyleName.clear();
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
if (m_pModifiers->HasCharStyle) if (m_pModifiers->HasCharStyle)
{ {
......
...@@ -391,11 +391,11 @@ void LwpFieldMark::ParseIndex(OUString& sKey1,OUString& sKey2) ...@@ -391,11 +391,11 @@ void LwpFieldMark::ParseIndex(OUString& sKey1,OUString& sKey2)
if (index[0]>=0 && index[1]>=0) if (index[0]>=0 && index[1]>=0)
sKey1 = sFormula.copy(index[0]+1,index[1]-index[0]-1); sKey1 = sFormula.copy(index[0]+1,index[1]-index[0]-1);
else else
sKey1 = ""; sKey1.clear();
if (index[2]>=0 && index[3]>=0) if (index[2]>=0 && index[3]>=0)
sKey2 = sFormula.copy(index[2]+1,index[3]-index[2]-1); sKey2 = sFormula.copy(index[2]+1,index[3]-index[2]-1);
else else
sKey2 = ""; sKey2.clear();
} }
void LwpFieldMark::ParseTOC(OUString& sLevel,OUString& sText) void LwpFieldMark::ParseTOC(OUString& sLevel,OUString& sText)
...@@ -413,11 +413,11 @@ 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) if (index[0]>=0 && index[1]>=0)
sLevel = sFormula.copy(index[0]+1,index[1]-index[0]-1); sLevel = sFormula.copy(index[0]+1,index[1]-index[0]-1);
else else
sLevel = ""; sLevel.clear();
if (index[2]>=0 && index[3]>=0) if (index[2]>=0 && index[3]>=0)
sText = sFormula.copy(index[2]+1,index[3]-index[2]-1); sText = sFormula.copy(index[2]+1,index[3]-index[2]-1);
else else
sText = ""; sText.clear();
} }
bool LwpFieldMark::IsFormulaInsert() bool LwpFieldMark::IsFormulaInsert()
......
...@@ -208,7 +208,7 @@ OUString LwpNoteLayout::GetAuthor() ...@@ -208,7 +208,7 @@ OUString LwpNoteLayout::GetAuthor()
{ {
if(m_UserName.HasValue()) if(m_UserName.HasValue())
{ {
if(m_UserName.str() != OUString(" ")) if(m_UserName.str() != " ")
{ {
return m_UserName.str(); return m_UserName.str();
} }
......
...@@ -813,7 +813,7 @@ XFSection* LwpPara::CreateXFSection() ...@@ -813,7 +813,7 @@ XFSection* LwpPara::CreateXFSection()
{ {
XFSection* pXFSection = new XFSection(); XFSection* pXFSection = new XFSection();
pXFSection->SetStyleName(m_SectionStyleName); pXFSection->SetStyleName(m_SectionStyleName);
m_SectionStyleName = ""; m_SectionStyleName.clear();
return pXFSection; return pXFSection;
} }
......
...@@ -68,9 +68,9 @@ void XFFileName::ToXml(IXFStream *pStrm) ...@@ -68,9 +68,9 @@ void XFFileName::ToXml(IXFStream *pStrm)
{ {
IXFAttrList *pAttrList = pStrm->GetAttrList(); IXFAttrList *pAttrList = pStrm->GetAttrList();
pAttrList->Clear(); pAttrList->Clear();
if (m_strType.equals("FileName")) if (m_strType == "FileName")
pAttrList->AddAttribute( "text:display", "name-and-extension" ); pAttrList->AddAttribute( "text:display", "name-and-extension" );
else if (m_strType.equals("Path")) else if (m_strType == "Path")
pAttrList->AddAttribute( "text:display", "path" ); pAttrList->AddAttribute( "text:display", "path" );
pStrm->StartElement( "text:file-name" ); pStrm->StartElement( "text:file-name" );
pStrm->EndElement( "text:file-name" ); pStrm->EndElement( "text:file-name" );
......
...@@ -292,7 +292,7 @@ void XFDrawStyle::ToXml(IXFStream *pStrm) ...@@ -292,7 +292,7 @@ void XFDrawStyle::ToXml(IXFStream *pStrm)
} }
//adjust //adjust
aStr = ""; aStr.clear();
switch (m_pFontWorkStyle->GetAdjustType()) switch (m_pFontWorkStyle->GetAdjustType())
{ {
default: // fall througth default: // fall througth
...@@ -315,7 +315,7 @@ void XFDrawStyle::ToXml(IXFStream *pStrm) ...@@ -315,7 +315,7 @@ void XFDrawStyle::ToXml(IXFStream *pStrm)
} }
//form //form
aStr = ""; aStr.clear();
switch (m_pFontWorkStyle->GetButtonForm()) switch (m_pFontWorkStyle->GetButtonForm())
{ {
default: // fall through! default: // fall through!
......
...@@ -111,7 +111,7 @@ inline void XFDropcap::Reset() ...@@ -111,7 +111,7 @@ inline void XFDropcap::Reset()
m_nCharCount = 0; m_nCharCount = 0;
m_nLines = 0; m_nLines = 0;
m_fDistance = 0; m_fDistance = 0;
m_strStyleName = ""; m_strStyleName.clear();
} }
inline void XFDropcap::ToXml(IXFStream *pStrm) inline void XFDropcap::ToXml(IXFStream *pStrm)
......
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