diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 13:27:05 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 14:12:28 +0100 |
commit | ed609b5119bea695de24a78892e817132082060d (patch) | |
tree | 25edce90a7b196b8ebd3309a70a44d317d003429 /lotuswordpro | |
parent | 6fbf6f2ad1ac2d9254ade029599b46c7a4327a5b (diff) |
lotuswordpro: Use appropriate OUString functions on string constants
Change-Id: I8cccb8e558aba949d64cf9e7b85316d8e2e15865
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/LotusWordProImportFilter.cxx | 10 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpfrib.cxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpmarker.cxx | 8 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpnotes.cxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwppara.cxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfdocfield.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfdropcap.hxx | 2 |
8 files changed, 14 insertions, 20 deletions
diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx index 8a1aca42edbd..d3ee02a45adc 100644 --- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx +++ b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx @@ -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 ) { diff --git a/lotuswordpro/source/filter/lwpfrib.cxx b/lotuswordpro/source/filter/lwpfrib.cxx index bc404aacc40f..3ecc266fa9da 100644 --- a/lotuswordpro/source/filter/lwpfrib.cxx +++ b/lotuswordpro/source/filter/lwpfrib.cxx @@ -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) { diff --git a/lotuswordpro/source/filter/lwpmarker.cxx b/lotuswordpro/source/filter/lwpmarker.cxx index f94410f3a851..282e3354c23f 100644 --- a/lotuswordpro/source/filter/lwpmarker.cxx +++ b/lotuswordpro/source/filter/lwpmarker.cxx @@ -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() diff --git a/lotuswordpro/source/filter/lwpnotes.cxx b/lotuswordpro/source/filter/lwpnotes.cxx index c78fb4f10b3c..02a4de55b9f5 100644 --- a/lotuswordpro/source/filter/lwpnotes.cxx +++ b/lotuswordpro/source/filter/lwpnotes.cxx @@ -208,7 +208,7 @@ OUString LwpNoteLayout::GetAuthor() { if(m_UserName.HasValue()) { - if(m_UserName.str() != OUString(" ")) + if(m_UserName.str() != " ") { return m_UserName.str(); } diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx index 0f6f8bcec396..02ca8d4ff6e6 100644 --- a/lotuswordpro/source/filter/lwppara.cxx +++ b/lotuswordpro/source/filter/lwppara.cxx @@ -813,7 +813,7 @@ XFSection* LwpPara::CreateXFSection() { XFSection* pXFSection = new XFSection(); pXFSection->SetStyleName(m_SectionStyleName); - m_SectionStyleName = ""; + m_SectionStyleName.clear(); return pXFSection; } diff --git a/lotuswordpro/source/filter/xfilter/xfdocfield.cxx b/lotuswordpro/source/filter/xfilter/xfdocfield.cxx index ac3e01211516..0f20aa19bfb5 100644 --- a/lotuswordpro/source/filter/xfilter/xfdocfield.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdocfield.cxx @@ -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" ); diff --git a/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx b/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx index b23251d50766..e7ffd4ca0176 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx @@ -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! diff --git a/lotuswordpro/source/filter/xfilter/xfdropcap.hxx b/lotuswordpro/source/filter/xfilter/xfdropcap.hxx index a96042bcad1e..8d7641b0cd60 100644 --- a/lotuswordpro/source/filter/xfilter/xfdropcap.hxx +++ b/lotuswordpro/source/filter/xfilter/xfdropcap.hxx @@ -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) |