diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-03-08 00:05:32 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-03-08 01:21:25 -0600 |
commit | d634ce9edb6f1df409547715a391ad2eeca99f0c (patch) | |
tree | 62a7327a3346bf4a9b70d465315b7a466b03449e | |
parent | 0b83c8ffdcba92be56030b1e205a030d46168cfe (diff) |
use 'native' OUString api in lotuswordpro instead of macro and wrappers
Change-Id: Iccb78b59c3de9f29975d10fa4e34232cd3bf2cc3
109 files changed, 1667 insertions, 1714 deletions
diff --git a/lotuswordpro/source/filter/lwp9reader.cxx b/lotuswordpro/source/filter/lwp9reader.cxx index 43e8a3430253..b7d12f0502f1 100644 --- a/lotuswordpro/source/filter/lwp9reader.cxx +++ b/lotuswordpro/source/filter/lwp9reader.cxx @@ -201,7 +201,7 @@ void Lwp9Reader::ParseDocument() //Parse document content m_pStream->GetAttrList()->Clear(); - m_pStream->StartElement( A2OUSTR("office:body") ); + m_pStream->StartElement( "office:body" ); //Parse change list, add by LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance(); @@ -209,7 +209,7 @@ void Lwp9Reader::ParseDocument() pChangeMgr->ConvertAllChange(m_pStream); doc->Parse(m_pStream); - m_pStream->EndElement(OUString("office:body")); + m_pStream->EndElement("office:body"); WriteDocEnd(); } @@ -223,29 +223,29 @@ void Lwp9Reader::WriteDocHeader() IXFAttrList *pAttrList = m_pStream->GetAttrList(); - pAttrList->AddAttribute( A2OUSTR("xmlns:office"), A2OUSTR("http://openoffice.org/2000/office") ); - pAttrList->AddAttribute( A2OUSTR("xmlns:style"), A2OUSTR("http://openoffice.org/2000/style") ); - pAttrList->AddAttribute( A2OUSTR("xmlns:text"), A2OUSTR("http://openoffice.org/2000/text") ); - pAttrList->AddAttribute( A2OUSTR("xmlns:table"), A2OUSTR("http://openoffice.org/2000/table") ); - pAttrList->AddAttribute( A2OUSTR("xmlns:draw"), A2OUSTR("http://openoffice.org/2000/drawing") ); + pAttrList->AddAttribute( "xmlns:office", "http://openoffice.org/2000/office" ); + pAttrList->AddAttribute( "xmlns:style", "http://openoffice.org/2000/style" ); + pAttrList->AddAttribute( "xmlns:text", "http://openoffice.org/2000/text" ); + pAttrList->AddAttribute( "xmlns:table", "http://openoffice.org/2000/table" ); + pAttrList->AddAttribute( "xmlns:draw", "http://openoffice.org/2000/drawing" ); - pAttrList->AddAttribute( A2OUSTR("xmlns:fo"), A2OUSTR("http://www.w3.org/1999/XSL/Format") ); - pAttrList->AddAttribute( A2OUSTR("xmlns:xlink"), A2OUSTR("http://www.w3.org/1999/xlink") ); - pAttrList->AddAttribute( A2OUSTR("xmlns:number"), A2OUSTR("http://openoffice.org/2000/datastyle") ); - pAttrList->AddAttribute( A2OUSTR("xmlns:svg"), A2OUSTR("http://www.w3.org/2000/svg") ); - pAttrList->AddAttribute( A2OUSTR("xmlns:chart"), A2OUSTR("http://openoffice.org/2000/chart") ); + pAttrList->AddAttribute( "xmlns:fo", "http://www.w3.org/1999/XSL/Format" ); + pAttrList->AddAttribute( "xmlns:xlink", "http://www.w3.org/1999/xlink" ); + pAttrList->AddAttribute( "xmlns:number", "http://openoffice.org/2000/datastyle" ); + pAttrList->AddAttribute( "xmlns:svg", "http://www.w3.org/2000/svg" ); + pAttrList->AddAttribute( "xmlns:chart", "http://openoffice.org/2000/chart" ); - pAttrList->AddAttribute( A2OUSTR("xmlns:dr3d"), A2OUSTR("http://openoffice.org/2000/dr3d") ); - pAttrList->AddAttribute( A2OUSTR("xmlns:math"), A2OUSTR("http://www.w3.org/1998/Math/MathML") ); - pAttrList->AddAttribute( A2OUSTR("xmlns:form"), A2OUSTR("http://openoffice.org/2000/form") ); - pAttrList->AddAttribute( A2OUSTR("xmlns:script"), A2OUSTR("http://openoffice.org/2000/script") ); - pAttrList->AddAttribute( A2OUSTR("xmlns:dc"), A2OUSTR("http://purl.org/dc/elements/1.1/") ); + pAttrList->AddAttribute( "xmlns:dr3d", "http://openoffice.org/2000/dr3d" ); + pAttrList->AddAttribute( "xmlns:math", "http://www.w3.org/1998/Math/MathML" ); + pAttrList->AddAttribute( "xmlns:form", "http://openoffice.org/2000/form" ); + pAttrList->AddAttribute( "xmlns:script", "http://openoffice.org/2000/script" ); + pAttrList->AddAttribute( "xmlns:dc", "http://purl.org/dc/elements/1.1/" ); - pAttrList->AddAttribute( A2OUSTR("xmlns:meta"), A2OUSTR("http://openoffice.org/2000/meta") ); - pAttrList->AddAttribute( A2OUSTR("office:class"), A2OUSTR("text")); - pAttrList->AddAttribute( A2OUSTR("office:version"), A2OUSTR("1.0")); + pAttrList->AddAttribute( "xmlns:meta", "http://openoffice.org/2000/meta" ); + pAttrList->AddAttribute( "office:class", "text"); + pAttrList->AddAttribute( "office:version", "1.0"); - m_pStream->StartElement( OUString("office:document") ); + m_pStream->StartElement( "office:document" ); pAttrList->Clear(); } @@ -254,7 +254,7 @@ void Lwp9Reader::WriteDocHeader() */ void Lwp9Reader::WriteDocEnd() { - m_pStream->EndElement(OUString("office:document")); + m_pStream->EndElement("office:document"); m_pStream->EndDocument(); } diff --git a/lotuswordpro/source/filter/lwparrowstyles.hxx b/lotuswordpro/source/filter/lwparrowstyles.hxx index 4b34f00a378e..32440d055c34 100644 --- a/lotuswordpro/source/filter/lwparrowstyles.hxx +++ b/lotuswordpro/source/filter/lwparrowstyles.hxx @@ -72,30 +72,30 @@ void RegisteArrowStyles() return; //reversed arrow: XFArrowStyle *pArrowStyle100 = new XFArrowStyle(); - pArrowStyle100->SetArrowName( A2OUSTR("arrow100") ); - pArrowStyle100->SetViewbox(A2OUSTR("0 0 140 200")); - pArrowStyle100->SetSVGPath(A2OUSTR("M0 180 L70 0 L140 180 L120 180 L70 30 L20 180 L0 180")); + pArrowStyle100->SetArrowName( "arrow100" ); + pArrowStyle100->SetViewbox("0 0 140 200"); + pArrowStyle100->SetSVGPath("M0 180 L70 0 L140 180 L120 180 L70 30 L20 180 L0 180"); pXFStyleManager->AddStyle(pArrowStyle100); //reversed arrow: XFArrowStyle *pArrowStyle1 = new XFArrowStyle(); - pArrowStyle1->SetArrowName( A2OUSTR("reverse arrow") ); - pArrowStyle1->SetViewbox(A2OUSTR("0 0 140 200")); - pArrowStyle1->SetSVGPath(A2OUSTR("M0 0 L70 200 L140 0")); + pArrowStyle1->SetArrowName( "reverse arrow" ); + pArrowStyle1->SetViewbox("0 0 140 200"); + pArrowStyle1->SetSVGPath("M0 0 L70 200 L140 0"); pXFStyleManager->AddStyle(pArrowStyle1); //reversed concave arrow XFArrowStyle *pArrowStyle2 = new XFArrowStyle(); - pArrowStyle2->SetArrowName( A2OUSTR("reverse concave arrow") ); - pArrowStyle2->SetViewbox(A2OUSTR("0 0 140 200")); - pArrowStyle2->SetSVGPath(A2OUSTR("M0 0 L80 200 L160 0 L80 100")); + pArrowStyle2->SetArrowName( "reverse concave arrow" ); + pArrowStyle2->SetViewbox("0 0 140 200"); + pArrowStyle2->SetSVGPath("M0 0 L80 200 L160 0 L80 100"); pXFStyleManager->AddStyle(pArrowStyle2); //reversed line arrow XFArrowStyle *pArrowStyle3 = new XFArrowStyle(); - pArrowStyle3->SetArrowName( A2OUSTR("reverse line arrow") ); - pArrowStyle3->SetViewbox(A2OUSTR("0 0 140 200")); - pArrowStyle3->SetSVGPath(A2OUSTR("M0 0 L70 200 L140 0L110 0 L70 160 L20 0 L0 0")); + pArrowStyle3->SetArrowName( "reverse line arrow" ); + pArrowStyle3->SetViewbox("0 0 140 200"); + pArrowStyle3->SetSVGPath("M0 0 L70 200 L140 0L110 0 L70 160 L20 0 L0 0"); pXFStyleManager->AddStyle(pArrowStyle3); } diff --git a/lotuswordpro/source/filter/lwpbookmarkmgr.cxx b/lotuswordpro/source/filter/lwpbookmarkmgr.cxx index 58aa0fea4ebb..e2c1f00d52bf 100644 --- a/lotuswordpro/source/filter/lwpbookmarkmgr.cxx +++ b/lotuswordpro/source/filter/lwpbookmarkmgr.cxx @@ -66,7 +66,7 @@ void LwpBookmarkMgr::AddXFBookmarkStart(OUString sName,XFBookmarkStart* pMark) else //have exist the same bookmark name { XFBookmarkStart* pFind = iter->second; - OUString totalName = pFind->GetDivision() + A2OUSTR(":"); + OUString totalName = pFind->GetDivision() + ":"; totalName += pFind->GetName(); pFind->SetName(totalName); m_MapStart[totalName] = pFind; @@ -84,7 +84,7 @@ void LwpBookmarkMgr::AddXFBookmarkEnd(OUString sName,XFBookmarkEnd* pMark) else //have exist the same bookmark name { XFBookmarkEnd* pFind = iter->second; - OUString totalName = pFind->GetDivision() + A2OUSTR(":"); + OUString totalName = pFind->GetDivision() + ":"; totalName += pFind->GetName(); pFind->SetName(totalName); m_MapEnd[totalName] = pFind; diff --git a/lotuswordpro/source/filter/lwpchangemgr.cxx b/lotuswordpro/source/filter/lwpchangemgr.cxx index d9916f040559..a1685b146969 100644 --- a/lotuswordpro/source/filter/lwpchangemgr.cxx +++ b/lotuswordpro/source/filter/lwpchangemgr.cxx @@ -103,7 +103,7 @@ LwpChangeMgr::~LwpChangeMgr() void LwpChangeMgr::AddChangeFrib(LwpFrib* pFrib) { m_nCounter++; - OUString sID = A2OUSTR("ct")+ Int32ToOUString(m_nCounter); + OUString sID = "ct"+ OUString::number(m_nCounter); m_pFribMap->insert(std::pair<LwpFrib*,OUString>(pFrib,sID)); } @@ -112,7 +112,7 @@ OUString LwpChangeMgr::GetChangeID(LwpFrib* pFrib) std::map<LwpFrib*,OUString>::iterator iter; iter = m_pFribMap->find(pFrib); if (iter == m_pFribMap->end()) - return A2OUSTR(""); + return ""; else return iter->second; } @@ -143,12 +143,12 @@ void LwpChangeMgr::ConvertAllChange(IXFStream* pStream) if (m_ChangeList.empty()) return; // Add for disable change tracking - pStream->GetAttrList()->AddAttribute( A2OUSTR("text:track-changes"),A2OUSTR("false")); - pStream->StartElement( A2OUSTR("text:tracked-changes") ); + pStream->GetAttrList()->AddAttribute( "text:track-changes","false"); + pStream->StartElement( "text:tracked-changes" ); for (iter1=m_ChangeList.begin();iter1 !=m_ChangeList.end();++iter1) (*iter1)->ToXml(pStream); - pStream->EndElement(A2OUSTR("text:tracked-changes")); + pStream->EndElement("text:tracked-changes"); for (iter1=m_ChangeList.begin();iter1 !=m_ChangeList.end();++iter1) { diff --git a/lotuswordpro/source/filter/lwpdivinfo.hxx b/lotuswordpro/source/filter/lwpdivinfo.hxx index 43a497889072..4622e9f7eb24 100644 --- a/lotuswordpro/source/filter/lwpdivinfo.hxx +++ b/lotuswordpro/source/filter/lwpdivinfo.hxx @@ -144,7 +144,7 @@ inline sal_Bool LwpDivInfo::HasContents() inline sal_Bool LwpDivInfo::IsOleDivision() { OUString strClassName = GetClassName(); - if (strClassName.equals(A2OUSTR(STR_OleDivisionClassName))) + if (strClassName == STR_OleDivisionClassName) return sal_True; return sal_False; } diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx index e9a2f72b8cef..5572985babb6 100644 --- a/lotuswordpro/source/filter/lwpdoc.cxx +++ b/lotuswordpro/source/filter/lwpdoc.cxx @@ -177,9 +177,9 @@ sal_Bool LwpDocument::IsSkippedDivision() return sal_True; //skip endnote division OUString strClassName = pDiv->GetClassName(); - if (strClassName.equals(A2OUSTR(STR_DivisionEndnote)) - || strClassName.equals(A2OUSTR(STR_DivisionGroupEndnote)) - || strClassName.equals(A2OUSTR(STR_DocumentEndnote))) + if ((strClassName == STR_DivisionEndnote) + || (strClassName == STR_DivisionGroupEndnote) + || (strClassName == STR_DocumentEndnote)) { LwpPageLayout* pPageLayout = dynamic_cast<LwpPageLayout*>(pDiv->GetInitialLayoutID()->obj(VO_PAGELAYOUT)); if(pPageLayout) @@ -342,7 +342,7 @@ void LwpDocument::RegisterFootnoteStyles() LwpFootnoteOptions* pFootnoteOpts = dynamic_cast<LwpFootnoteOptions*>(m_FootnoteOpts.obj()); if (pFootnoteOpts) { - pFootnoteOpts->SetMasterPage(A2OUSTR("Endnote")); + pFootnoteOpts->SetMasterPage("Endnote"); pFootnoteOpts->RegisterStyle(); } } @@ -433,11 +433,11 @@ sal_uInt16 LwpDocument::GetEndnoteType() if (!pDivInfo) return FN_DONTCARE; OUString strClassName = pDivInfo->GetClassName(); - if (strClassName.equals(A2OUSTR(STR_DivisionEndnote))) + if (strClassName == STR_DivisionEndnote) return FN_DIVISION_SEPARATE; - if (strClassName.equals(A2OUSTR(STR_DivisionGroupEndnote))) + if (strClassName == STR_DivisionGroupEndnote) return FN_DIVISIONGROUP_SEPARATE; - if (strClassName.equals(A2OUSTR(STR_DocumentEndnote))) + if (strClassName == STR_DocumentEndnote) return FN_DOCUMENT_SEPARATE; return FN_DONTCARE; } @@ -755,10 +755,10 @@ void LwpDocument::XFConvertFrameInPage(XFContentContainer * pCont) void LwpDocument::ChangeStyleName() { XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); - XFTextStyle* pStyle = dynamic_cast<XFTextStyle*>(pXFStyleManager->FindStyle(A2OUSTR("ClickHere"))); + XFTextStyle* pStyle = dynamic_cast<XFTextStyle*>(pXFStyleManager->FindStyle("ClickHere")); if (pStyle) { - pStyle->SetStyleName(A2OUSTR("Placeholder")); + pStyle->SetStyleName("Placeholder"); } } LwpDocSock::LwpDocSock(LwpObjectHeader& objHdr, LwpSvStream* pStrm) diff --git a/lotuswordpro/source/filter/lwpdocdata.cxx b/lotuswordpro/source/filter/lwpdocdata.cxx index 27ad616c2acc..bf3c26d9ca8b 100644 --- a/lotuswordpro/source/filter/lwpdocdata.cxx +++ b/lotuswordpro/source/filter/lwpdocdata.cxx @@ -293,36 +293,17 @@ void LwpDocData::Read() } OUString LwpDocData::DateTimeToOUString(LtTm& dt) { - OUStringBuffer buf; - buf.append((sal_Int32)dt.tm_year); - buf.append( A2OUSTR("-") ); - buf.append((sal_Int32)dt.tm_mon); - buf.append( A2OUSTR("-") ); - buf.append((sal_Int32)dt.tm_mday); - buf.append( A2OUSTR("T") ); - buf.append((sal_Int32)dt.tm_hour); - buf.append( A2OUSTR(":") ); - buf.append((sal_Int32)dt.tm_min); - buf.append( A2OUSTR(":") ); - buf.append((sal_Int32)dt.tm_sec); - buf.append( A2OUSTR(".") ); - buf.append((sal_Int32)0); + OUString aResult = OUString::number(dt.tm_year) + "-" + OUString::number(dt.tm_mon) + "-" + OUString::number(dt.tm_mday) + + "T" + OUString::number(dt.tm_hour) + ":" + OUString::number(dt.tm_min) + ":" + OUString::number(dt.tm_sec) + ".0"; - return buf.makeStringAndClear(); + return aResult; } OUString LwpDocData::TimeToOUString(LtTm& dt) { //PT3H43M44S - OUStringBuffer buf; - buf.append( A2OUSTR("PT") ); - buf.append((sal_Int32)dt.tm_hour); - buf.append( A2OUSTR("H") ); - buf.append((sal_Int32)dt.tm_min); - buf.append( A2OUSTR("M") ); - buf.append((sal_Int32)dt.tm_sec); - buf.append( A2OUSTR("S") ); + OUString aResult = "PT" + OUString::number(dt.tm_hour) + "H" + OUString::number(dt.tm_min) + "M" + OUString::number(dt.tm_sec) + "S"; - return buf.makeStringAndClear(); + return aResult; } void LwpDocData::Parse(IXFStream *pOutputStream) { diff --git a/lotuswordpro/source/filter/lwpfootnote.cxx b/lotuswordpro/source/filter/lwpfootnote.cxx index 0cd32161bfcc..91e18aef27b9 100644 --- a/lotuswordpro/source/filter/lwpfootnote.cxx +++ b/lotuswordpro/source/filter/lwpfootnote.cxx @@ -332,22 +332,22 @@ OUString LwpFootnote::GetTableClass() { case FN_BASE_FOOTNOTE: { - strClassName = A2OUSTR(STR_DivisionFootnote); + strClassName = STR_DivisionFootnote; break; } case FN_BASE_DOCUMENT: { - strClassName = A2OUSTR(STR_DocumentEndnote); + strClassName = STR_DocumentEndnote; break; } case FN_BASE_DIVISION: { - strClassName = A2OUSTR(STR_DivisionEndnote); + strClassName = STR_DivisionEndnote; break; } case FN_BASE_DIVISIONGROUP: { - strClassName = A2OUSTR(STR_DivisionGroupEndnote); + strClassName = STR_DivisionGroupEndnote; break; } } @@ -514,13 +514,13 @@ void LwpFootnoteOptions::RegisterEndnoteStyle() OUString message = m_EndnoteDocNumbering.GetLeadingText(); if(message.isEmpty()) { - message = A2OUSTR("[");//default prefix + message = "[";//default prefix } pEndnoteConfig->SetNumPrefix(message); message = m_EndnoteDocNumbering.GetTrailingText(); if(message.isEmpty()) { - message = A2OUSTR("]");//default suffix + message = "]";//default suffix } pEndnoteConfig->SetNumSuffix(message); if(m_EndnoteDocNumbering.GetReset() == LwpFootnoteNumberOptions::RESET_PAGE) @@ -544,7 +544,7 @@ OUString LwpFootnoteOptions::GetContinuedOnMessage() return m_ContinuedOnMessage.str(); } // else reture defauls message - return A2OUSTR(STRID_FOOTCONTINUEDON); + return OUString(STRID_FOOTCONTINUEDON); } /** @@ -557,7 +557,7 @@ OUString LwpFootnoteOptions::GetContinuedFromMessage() return m_ContinuedFromMessage.str(); } // else reture defauls message - return A2OUSTR(STRID_FOOTCONTINUEDFROM); + return OUString(STRID_FOOTCONTINUEDFROM); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/lwpframelayout.cxx b/lotuswordpro/source/filter/lwpframelayout.cxx index 412f89fc8fbe..a97267e14b4a 100644 --- a/lotuswordpro/source/filter/lwpframelayout.cxx +++ b/lotuswordpro/source/filter/lwpframelayout.cxx @@ -129,9 +129,9 @@ void LwpFrame::RegisterStyle(XFFrameStyle* pFrameStyle) if(!aFrameName.isEmpty()) { //cause the bug of SODC, the linkframe name can not be "Frame1", so I change the frame name - /*if(aFrameName.equals(A2OUSTR("Frame1"))) + /*if(aFrameName.equals("Frame1")) { - aFrameName = A2OUSTR("Frame1_COPY"); + aFrameName = "Frame1_COPY"; } pXFFrame->SetName(aFrameName);*/ pXFFrame->SetName(m_StyleName); diff --git a/lotuswordpro/source/filter/lwpfrib.cxx b/lotuswordpro/source/filter/lwpfrib.cxx index 830dc864bde1..d4bda5520845 100644 --- a/lotuswordpro/source/filter/lwpfrib.cxx +++ b/lotuswordpro/source/filter/lwpfrib.cxx @@ -244,7 +244,7 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry) //note by ,1-27 XFFont* pFont; XFTextStyle* pStyle = NULL; - m_StyleName = A2OUSTR(""); + m_StyleName = ""; XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); if (m_pModifiers->HasCharStyle) { @@ -256,7 +256,7 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry) *pStyle = *pNamedStyle; LwpCharacterStyle* pCharStyle = static_cast<LwpCharacterStyle*>(m_pModifiers->CharStyleID.obj()); - pStyle->SetStyleName(A2OUSTR("")); + pStyle->SetStyleName(""); pFont = pFoundry->GetFontManger()->CreateOverrideFont(pCharStyle->GetFinalFontID(),m_pModifiers->FontID); pStyle->SetFont(pFont); IXFStyle *pNewStyle = pXFStyleManager->AddStyle(pStyle); diff --git a/lotuswordpro/source/filter/lwpfribbreaks.cxx b/lotuswordpro/source/filter/lwpfribbreaks.cxx index f23d8d9aae41..4d33903a0822 100644 --- a/lotuswordpro/source/filter/lwpfribbreaks.cxx +++ b/lotuswordpro/source/filter/lwpfribbreaks.cxx @@ -78,7 +78,7 @@ void LwpFribColumnBreak::RegisterBreakStyle(LwpPara * pPara) XFParaStyle* pOverStyle = new XFParaStyle; *pOverStyle = *pBaseStyle; - pOverStyle->SetStyleName(A2OUSTR("")); + pOverStyle->SetStyleName(""); //Old code //if (static_cast<LwpStory*>(pPara->GetStoryID()->obj()) @@ -139,7 +139,7 @@ void LwpFribPageBreak::RegisterBreakStyle(LwpPara* pPara) XFParaStyle* pOverStyle = new XFParaStyle; *pOverStyle = *pBaseStyle; - pOverStyle->SetStyleName(A2OUSTR("")); + pOverStyle->SetStyleName(""); pOverStyle->SetMasterPage(pBaseStyle->GetMasterPage()); if (!GetNext() || GetNext()->GetType()==FRIB_TAG_EOP) diff --git a/lotuswordpro/source/filter/lwpfribmark.cxx b/lotuswordpro/source/filter/lwpfribmark.cxx index 0fd7e9deb876..4ad8977fc593 100644 --- a/lotuswordpro/source/filter/lwpfribmark.cxx +++ b/lotuswordpro/source/filter/lwpfribmark.cxx @@ -115,7 +115,7 @@ void LwpFribCHBlock::XFConvert(XFContentContainer* pXFPara,LwpStory* pStory) if (pHyperlink) { pHyperlink->SetHyperlinkFlag(sal_True); - pHyperlink->SetHyperlink(pMarker->GetNamedProperty(A2OUSTR("URL"))); + pHyperlink->SetHyperlink(pMarker->GetNamedProperty("URL")); } } else if (type == MARKER_END)//or none @@ -266,7 +266,7 @@ void LwpFribField::XFConvert(XFContentContainer* pXFPara) if (pFieldMark->IsFormulaInsert()) { XFTextContent *pSpan = new XFTextContent(); - pSpan->SetText(A2OUSTR(">")); + pSpan->SetText(">"); pXFPara->Add(pSpan); } if (fieldType == LwpFieldMark::FLD_FIELD) @@ -350,7 +350,7 @@ void LwpFribField::XFConvert(XFContentContainer* pXFPara) if (pFieldMark->IsFormulaInsert()) { XFTextContent *pSpan = new XFTextContent(); - pSpan->SetText(A2OUSTR("<")); + pSpan->SetText("<"); pXFPara->Add(pSpan); } @@ -385,7 +385,7 @@ void LwpFribField::RegisterStyle(LwpFoundry* pFoundry) void LwpFribField::RegisterTimeField(LwpFieldMark* pFieldMark) { OUString sFormula = pFieldMark->GetFormula();//now bookmark maybe not all register to bookmarkmgr, - if (sFormula == A2OUSTR("TotalEditingTime"))//so check field type now is not correct. + if (sFormula == "TotalEditingTime")//so check field type now is not correct. RegisterTotalTimeStyle(); else { @@ -397,7 +397,7 @@ void LwpFribField::RegisterTimeField(LwpFieldMark* pFieldMark) return; tag = sFormula.copy(0,index); - if (tag == A2OUSTR("Now()") || tag == A2OUSTR("CreateDate") || tag == A2OUSTR("EditDate")) + if (tag == "Now()" || tag == "CreateDate" || tag == "EditDate") RegisterDateTimeStyle(sFormula.copy(index+1,sFormula.getLength()-index-1)); } } @@ -420,248 +420,248 @@ void LwpFribField::RegisterDateTimeStyle(OUString sFormula) return; if (sFormula[1] == 'F') { - if (sFormula == A2OUSTR("%FLSystemShortDate")) + if (sFormula == "%FLSystemShortDate") { pDateStyle = LwpTools::GetSystemDateStyle(sal_False); } - else if (sFormula == A2OUSTR("%FLSystemLongDate")) + else if (sFormula == "%FLSystemLongDate") { pDateStyle = LwpTools::GetSystemDateStyle(sal_True); } - else if (sFormula == A2OUSTR("%FLISODate1") || sFormula == A2OUSTR("%FLYYYY/MM/DD") ) + else if (sFormula == "%FLISODate1" || sFormula == "%FLYYYY/MM/DD" ) { pDateStyle = new XFDateStyle; pDateStyle->AddYear(); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddMonth(); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddMonthDay(); } - else if (sFormula == A2OUSTR("%FLISODate2") || sFormula == A2OUSTR("%FLYYYY/MM/DD HH:mm:SS") ) + else if (sFormula == "%FLISODate2" || sFormula == "%FLYYYY/MM/DD HH:mm:SS" ) { pDateStyle = new XFDateStyle; pDateStyle->AddYear(); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddMonth(); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddMonthDay(); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddHour(); - pDateStyle->AddText(A2OUSTR(":")); + pDateStyle->AddText(":"); pDateStyle->AddMinute(); - pDateStyle->AddText(A2OUSTR(":")); + pDateStyle->AddText(":"); pDateStyle->AddSecond(sal_True,0); } - else if (sFormula == A2OUSTR("%FLM/D/YY")) + else if (sFormula == "%FLM/D/YY") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_False); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddYear(sal_False); } - else if (sFormula == A2OUSTR("%FLMonth D, YYYY")) + else if (sFormula == "%FLMonth D, YYYY") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%FLWeekday, Month D, YYYY")) + else if (sFormula == "%FLWeekday, Month D, YYYY") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%FLMn D, YYYY")) + else if (sFormula == "%FLMn D, YYYY") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_False,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%FLWday, Mn D, YYYY")) + else if (sFormula == "%FLWday, Mn D, YYYY") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(sal_False); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddMonth(sal_False,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%FLMn D")) + else if (sFormula == "%FLMn D") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_False,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); } - else if (sFormula == A2OUSTR("%FLWeekday, Mn D")) + else if (sFormula == "%FLWeekday, Mn D") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddMonth(sal_False,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); } - else if (sFormula == A2OUSTR("%FLMn D, YY")) + else if (sFormula == "%FLMn D, YY") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_False,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddYear(sal_False); } - else if (sFormula == A2OUSTR("%FLM/D")) + else if (sFormula == "%FLM/D") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_False); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddMonthDay(sal_False); } - else if (sFormula == A2OUSTR("%FLM/YY")) + else if (sFormula == "%FLM/YY") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_False); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddYear(sal_False); } - else if (sFormula == A2OUSTR("%FLMn YY")) + else if (sFormula == "%FLMn YY") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_False,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddYear(sal_False); } - else if (sFormula == A2OUSTR("%FLWeekday")) + else if (sFormula == "%FLWeekday") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(); } - else if (sFormula == A2OUSTR("%FLWday")) + else if (sFormula == "%FLWday") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(sal_False); } - else if (sFormula == A2OUSTR("%FLMonth")) + else if (sFormula == "%FLMonth") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_True,sal_True); } - else if (sFormula == A2OUSTR("%FLMn")) + else if (sFormula == "%FLMn") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_False,sal_True); } - else if (sFormula == A2OUSTR("%FLD")) + else if (sFormula == "%FLD") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(sal_False); } - else if (sFormula == A2OUSTR("%FLM")) + else if (sFormula == "%FLM") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_False); } - else if (sFormula == A2OUSTR("%FLYYYY") ) + else if (sFormula == "%FLYYYY" ) { pDateStyle = new XFDateStyle; pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%FLYY")) + else if (sFormula == "%FLYY") { pDateStyle = new XFDateStyle; pDateStyle->AddYear(sal_False); } //chinese version begin - else if (sFormula == A2OUSTR("%FLYY/M/D")) + else if (sFormula == "%FLYY/M/D") { pDateStyle = new XFDateStyle; pDateStyle->AddYear(sal_False); - pDateStyle->AddText(A2OUSTR("-")); + pDateStyle->AddText("-"); pDateStyle->AddMonth(sal_False); - pDateStyle->AddText(A2OUSTR("-")); + pDateStyle->AddText("-"); pDateStyle->AddMonthDay(sal_False); } - else if(sFormula == A2OUSTR("%FLYYYY Month D")) + else if(sFormula == "%FLYYYY Month D") { pDateStyle = new XFDateStyle; pDateStyle->AddYear(); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); } - else if(sFormula == A2OUSTR("%FLWeekday, YYYY Month D")) + else if(sFormula == "%FLWeekday, YYYY Month D") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(); - pDateStyle->AddText(A2OUSTR(",")); + pDateStyle->AddText(","); pDateStyle->AddYear(); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); } - else if(sFormula == A2OUSTR("%FLYYYY Mn D")) + else if(sFormula == "%FLYYYY Mn D") { pDateStyle = new XFDateStyle; pDateStyle->AddYear(); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_False,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); } - else if(sFormula == A2OUSTR("%FLWday, YYYY Mn D")) + else if(sFormula == "%FLWday, YYYY Mn D") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(sal_False); - pDateStyle->AddText(A2OUSTR(",")); + pDateStyle->AddText(","); pDateStyle->AddYear(); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); } //next 2 are the same with english version - else if (sFormula == A2OUSTR("%FLYY Mn D")) + else if (sFormula == "%FLYY Mn D") { pDateStyle = new XFDateStyle; pDateStyle->AddYear(sal_False); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_False,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); } - else if (sFormula == A2OUSTR("%FLYY/M")) + else if (sFormula == "%FLYY/M") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_False); - pDateStyle->AddText(A2OUSTR("-")); + pDateStyle->AddText("-"); pDateStyle->AddMonth(sal_False); } - else if (sFormula == A2OUSTR("%FLYY Mn")) + else if (sFormula == "%FLYY Mn") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_False); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_False,sal_True); } - else if (sFormula == A2OUSTR("%FLeeeeoa") || sFormula == A2OUSTR("%FLffffooaa") || sFormula == A2OUSTR("%FLEEEEOA")) + else if (sFormula == "%FLeeeeoa" || sFormula == "%FLffffooaa" || sFormula == "%FLEEEEOA") { pDateStyle = new XFDateStyle; OUString sText; @@ -675,7 +675,7 @@ void LwpFribField::RegisterDateTimeStyle(OUString sFormula) sText = OUString(0x65e5); pDateStyle->AddText(sText); } - else if (sFormula == A2OUSTR("%FLoa") || sFormula == A2OUSTR("%FLooaa") || sFormula == A2OUSTR("%FLOA") ) + else if (sFormula == "%FLoa" || sFormula == "%FLooaa" || sFormula == "%FLOA" ) { pDateStyle = new XFDateStyle; OUString sText; @@ -686,289 +686,289 @@ void LwpFribField::RegisterDateTimeStyle(OUString sFormula) sText = OUString(0x65e5); pDateStyle->AddText(sText); } - else if (sFormula == A2OUSTR("%FLYYYY/M/D") || sFormula == A2OUSTR("%FLGGGG/od/ad")) + else if (sFormula == "%FLYYYY/M/D" || sFormula == "%FLGGGG/od/ad") { pDateStyle = new XFDateStyle; pDateStyle->AddYear(); - pDateStyle->AddText(A2OUSTR("-")); + pDateStyle->AddText("-"); pDateStyle->AddMonth(sal_False); - pDateStyle->AddText(A2OUSTR("-")); + pDateStyle->AddText("-"); pDateStyle->AddMonthDay(sal_False); } - else if (sFormula == A2OUSTR("%FLYY.M.D") ) + else if (sFormula == "%FLYY.M.D" ) { pDateStyle = new XFDateStyle; pDateStyle->AddYear(sal_False); - pDateStyle->AddText(A2OUSTR(".")); + pDateStyle->AddText("."); pDateStyle->AddMonth(sal_False); - pDateStyle->AddText(A2OUSTR(".")); + pDateStyle->AddText("."); pDateStyle->AddMonthDay(sal_False); } //chinese version end //other version begin - else if (sFormula == A2OUSTR("%FLWeekday, Month DD, YYYY") ) + else if (sFormula == "%FLWeekday, Month DD, YYYY" ) { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%FLYYYY/MM/DD") ) + else if (sFormula == "%FLYYYY/MM/DD" ) { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%FLD/M/YY") ) + else if (sFormula == "%FLD/M/YY" ) { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddMonth(sal_False); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddYear(sal_False); } - else if (sFormula == A2OUSTR("%FLD Month YYYY")) + else if (sFormula == "%FLD Month YYYY") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%FLDD Month YYYY")) + else if (sFormula == "%FLDD Month YYYY") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%FLWeekday, D Month YYYY")) + else if (sFormula == "%FLWeekday, D Month YYYY") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%FLWeekday, DD Month YYYY")) + else if (sFormula == "%FLWeekday, DD Month YYYY") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddMonthDay(); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%FLD Mn YYYY")) + else if (sFormula == "%FLD Mn YYYY") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_False,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%FLWday, D Mn YYYY")) + else if (sFormula == "%FLWday, D Mn YYYY") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(sal_False); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_False,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%FLWday, DD Mn YYYY")) + else if (sFormula == "%FLWday, DD Mn YYYY") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(sal_False); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddMonthDay(); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_False,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%FLD Mn")) + else if (sFormula == "%FLD Mn") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_False,sal_True); } - else if (sFormula == A2OUSTR("%FLDD Mn")) + else if (sFormula == "%FLDD Mn") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_False,sal_True); } - else if (sFormula == A2OUSTR("%FLWeekday, D Mn")) + else if (sFormula == "%FLWeekday, D Mn") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_False,sal_True); } - else if (sFormula == A2OUSTR("%FLWeekday, DD Mn")) + else if (sFormula == "%FLWeekday, DD Mn") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddMonthDay(); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_False,sal_True); } - else if (sFormula == A2OUSTR("%FLD Mn YY")) + else if (sFormula == "%FLD Mn YY") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_False,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddYear(sal_False); } - else if (sFormula == A2OUSTR("%FLDD Mn YY")) + else if (sFormula == "%FLDD Mn YY") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_False,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddYear(sal_False); } - else if (sFormula == A2OUSTR("%FLD/M")) + else if (sFormula == "%FLD/M") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddMonth(sal_False); } - else if (sFormula == A2OUSTR("%FLDD/MM")) + else if (sFormula == "%FLDD/MM") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddMonth(); } - else if(sFormula == A2OUSTR("%FLDD/MM/YY")) + else if(sFormula == "%FLDD/MM/YY") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddMonth(); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddYear(sal_False); } - else if (sFormula == A2OUSTR("%FLMM/YY")) + else if (sFormula == "%FLMM/YY") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddYear(sal_False); } //other version end //TIME - else if (sFormula == A2OUSTR("%FLSystemTime")) + else if (sFormula == "%FLSystemTime") { pTimeStyle = LwpTools::GetSystemTimeStyle(); } - else if (sFormula == A2OUSTR("%FLISOTime1") || sFormula == A2OUSTR("%FLH:mm:SS")) + else if (sFormula == "%FLISOTime1" || sFormula == "%FLH:mm:SS") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddSecond(sal_True,0); } - else if (sFormula == A2OUSTR("%FLH:mm ampm")) + else if (sFormula == "%FLH:mm ampm") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(sal_False); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); - pTimeStyle->AddText(A2OUSTR(" ")); + pTimeStyle->AddText(" "); pTimeStyle->SetAmPm(sal_True); } - else if (sFormula == A2OUSTR("%FLH:mm")) + else if (sFormula == "%FLH:mm") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(sal_False); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); } - else if (sFormula == A2OUSTR("%FLH:mm:SS ampm")) + else if (sFormula == "%FLH:mm:SS ampm") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(sal_False); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddSecond(sal_True,0); - pTimeStyle->AddText(A2OUSTR(" ")); + pTimeStyle->AddText(" "); pTimeStyle->SetAmPm(sal_True); } - else if (sFormula == A2OUSTR("%FLH:mm:SS")) + else if (sFormula == "%FLH:mm:SS") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(sal_False); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddSecond(sal_True,0); } - else if (sFormula == A2OUSTR("%FLH ampm")) + else if (sFormula == "%FLH ampm") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(sal_False); - pTimeStyle->AddText(A2OUSTR(" ")); + pTimeStyle->AddText(" "); pTimeStyle->SetAmPm(sal_True); } - else if (sFormula == A2OUSTR("%FLH")) + else if (sFormula == "%FLH") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(sal_False); } - else if (sFormula == A2OUSTR("%FLmm")) + else if (sFormula == "%FLmm") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddMinute(); } - else if (sFormula == A2OUSTR("%FLSS")) + else if (sFormula == "%FLSS") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddSecond(sal_True,0); } - else if (sFormula == A2OUSTR("%FLampm")) + else if (sFormula == "%FLampm") { pTimeStyle = new XFTimeStyle; pTimeStyle->SetAmPm(sal_True); } //chinese version begin - else if (sFormula == A2OUSTR("%FLjF") || sFormula == A2OUSTR("%FLJFF") - || sFormula == A2OUSTR("%FLjjF") || sFormula == A2OUSTR("%FLJJFF ") ) + else if (sFormula == "%FLjF" || sFormula == "%FLJFF" + || sFormula == "%FLjjF" || sFormula == "%FLJJFF " ) { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(sal_False); @@ -979,7 +979,7 @@ void LwpFribField::RegisterDateTimeStyle(OUString sFormula) sText = OUString(0x5206); pTimeStyle->AddText(sText); } - else if (sFormula == A2OUSTR("%FLjjjF") || sFormula == A2OUSTR("%FLJJJFF") ) + else if (sFormula == "%FLjjjF" || sFormula == "%FLJJJFF" ) { pTimeStyle = new XFTimeStyle; pTimeStyle->SetAmPm(sal_True); @@ -993,187 +993,187 @@ void LwpFribField::RegisterDateTimeStyle(OUString sFormula) } //chinese version end //other version begin - else if (sFormula == A2OUSTR("%FLHH:mm ampm")) + else if (sFormula == "%FLHH:mm ampm") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); - pTimeStyle->AddText(A2OUSTR(" ")); + pTimeStyle->AddText(" "); pTimeStyle->SetAmPm(sal_True); } - else if (sFormula == A2OUSTR("%FLHH ampm")) + else if (sFormula == "%FLHH ampm") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(); - pTimeStyle->AddText(A2OUSTR(" ")); + pTimeStyle->AddText(" "); pTimeStyle->SetAmPm(sal_True); } - else if (sFormula == A2OUSTR("%FLHH:mm:SS ampm")) + else if (sFormula == "%FLHH:mm:SS ampm") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddSecond(sal_True,0); - pTimeStyle->AddText(A2OUSTR(" ")); + pTimeStyle->AddText(" "); pTimeStyle->SetAmPm(sal_True); } - else if (sFormula == A2OUSTR("%FLHH:mm")) + else if (sFormula == "%FLHH:mm") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); } - else if (sFormula == A2OUSTR("%FLHH:mm:SS")) + else if (sFormula == "%FLHH:mm:SS") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddSecond(sal_True,0); } //other version end } else if(sFormula[1] == 'D') { - if (sFormula == A2OUSTR("%Da")) + if (sFormula == "%Da") { pDateStyle = LwpTools::GetSystemDateStyle(sal_False); } - else if (sFormula == A2OUSTR("%DB") || sFormula == A2OUSTR("%Db")) + else if (sFormula == "%DB" || sFormula == "%Db") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%Dc") || sFormula == A2OUSTR("%DC")) + else if (sFormula == "%Dc" || sFormula == "%DC") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%Dd") || sFormula == A2OUSTR("%DD")) + else if (sFormula == "%Dd" || sFormula == "%DD") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(", ")); + pDateStyle->AddText(", "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%DE") || sFormula == A2OUSTR("%De")) + else if (sFormula == "%DE" || sFormula == "%De") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); } - else if (sFormula == A2OUSTR("%Df") || sFormula == A2OUSTR("%DF")) + else if (sFormula == "%Df" || sFormula == "%DF") { pDateStyle = new XFDateStyle; pDateStyle->AddWeekDay(); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); } - else if (sFormula == A2OUSTR("%Dg")) + else if (sFormula == "%Dg") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_False); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddMonthDay(sal_False); } - else if (sFormula == A2OUSTR("%Dh")) + else if (sFormula == "%Dh") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_False); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%Di") || sFormula == A2OUSTR("%DI")) + else if (sFormula == "%Di" || sFormula == "%DI") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(".")); + pDateStyle->AddText("."); pDateStyle->AddMonth(sal_True,sal_True); } - else if (sFormula == A2OUSTR("%Dj") || sFormula == A2OUSTR("%DJ")) + else if (sFormula == "%Dj" || sFormula == "%DJ") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(sal_False); - pDateStyle->AddText(A2OUSTR(".")); + pDateStyle->AddText("."); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%Dk") || sFormula == A2OUSTR("%DK")) + else if (sFormula == "%Dk" || sFormula == "%DK") { pDateStyle = new XFDateStyle; pDateStyle->AddYear(); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(" ")); + pDateStyle->AddText(" "); pDateStyle->AddMonthDay(sal_False); } - else if (sFormula == A2OUSTR("%DL") || sFormula == A2OUSTR("%Dl")) + else if (sFormula == "%DL" || sFormula == "%Dl") { pDateStyle = new XFDateStyle; pDateStyle->AddMonth(sal_True,sal_True); - pDateStyle->AddText(A2OUSTR(",")); + pDateStyle->AddText(","); pDateStyle->AddYear(); } - else if (sFormula == A2OUSTR("%Dm")) + else if (sFormula == "%Dm") { pDateStyle = new XFDateStyle; pDateStyle->AddMonthDay(); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddMonth(); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddYear(); } } else if (sFormula[1] == 'T') { - if (sFormula == A2OUSTR("%T1")) + if (sFormula == "%T1") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); } - else if (sFormula == A2OUSTR("%T2") || sFormula == A2OUSTR("%T6") - || sFormula == A2OUSTR("%T4") || sFormula == A2OUSTR("%T8") ) + else if (sFormula == "%T2" || sFormula == "%T6" + || sFormula == "%T4" || sFormula == "%T8" ) { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(sal_False); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->SetAmPm(sal_True); } - else if (sFormula == A2OUSTR("%T3") || sFormula == A2OUSTR("%T7") - || sFormula == A2OUSTR("%T5") || sFormula == A2OUSTR("%T9")) + else if (sFormula == "%T3" || sFormula == "%T7" + || sFormula == "%T5" || sFormula == "%T9") { pTimeStyle = new XFTimeStyle; pTimeStyle->AddHour(); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->AddMinute(); - pTimeStyle->AddText(A2OUSTR(":")); + pTimeStyle->AddText(":"); pTimeStyle->SetAmPm(sal_True); } } diff --git a/lotuswordpro/source/filter/lwpfribsection.cxx b/lotuswordpro/source/filter/lwpfribsection.cxx index 03804c71d565..e414e5c04a70 100644 --- a/lotuswordpro/source/filter/lwpfribsection.cxx +++ b/lotuswordpro/source/filter/lwpfribsection.cxx @@ -180,7 +180,7 @@ void LwpFribSection::ParseSection() bRunin = sal_True; if (pIndexSection->IsFormatSeparator()) bSeparator = sal_True; - pIndex->SetDefaultAlphaIndex(A2OUSTR(""),bRunin,bSeparator); + pIndex->SetDefaultAlphaIndex("",bRunin,bSeparator); */ SetDefaultAlphaIndex(pIndex); @@ -198,50 +198,50 @@ void LwpFribSection::ParseSection() void LwpFribSection::SetDefaultAlphaIndex(XFIndex * pXFIndex) { LwpFoundry* pFoundry = m_pPara->GetFoundry(); - OUString styleName = pFoundry->FindActuralStyleName(A2OUSTR("Separator")); + OUString styleName = pFoundry->FindActuralStyleName("Separator"); LwpIndexSection* pIndexSection = static_cast<LwpIndexSection*>(m_Section.obj()); XFIndexTemplate * pTemplateSep = new XFIndexTemplate(); if (pIndexSection->IsFormatSeparator()) { pXFIndex->SetSeparator(sal_True); - pTemplateSep->AddEntry(enumXFIndexTemplateText,A2OUSTR("")); + pTemplateSep->AddEntry(enumXFIndexTemplateText,""); } - //pXFIndex->AddTemplate(A2OUSTR("separator"),A2OUSTR("Separator"),pTemplateSep); - pXFIndex->AddTemplate(A2OUSTR("separator"),styleName,pTemplateSep); + //pXFIndex->AddTemplate("separator","Separator",pTemplateSep); + pXFIndex->AddTemplate("separator",styleName,pTemplateSep); - styleName = pFoundry->FindActuralStyleName(A2OUSTR("Primary")); + styleName = pFoundry->FindActuralStyleName("Primary"); XFIndexTemplate * pTemplate1 = new XFIndexTemplate(); - pTemplate1->AddEntry(enumXFIndexTemplateText,A2OUSTR("")); - pTemplate1->AddEntry(enumXFIndexTemplateTab,A2OUSTR("")); - pTemplate1->AddEntry(enumXFIndexTemplatePage,A2OUSTR("")); - //pXFIndex->AddTemplate(Int32ToOUString(1),A2OUSTR("Primary"),pTemplate1); - pXFIndex->AddTemplate(Int32ToOUString(1),styleName,pTemplate1); + pTemplate1->AddEntry(enumXFIndexTemplateText,""); + pTemplate1->AddEntry(enumXFIndexTemplateTab,""); + pTemplate1->AddEntry(enumXFIndexTemplatePage,""); + //pXFIndex->AddTemplate(OUString::number(1),"Primary",pTemplate1); + pXFIndex->AddTemplate(OUString::number(1),styleName,pTemplate1); XFIndexTemplate * pTemplate2 = new XFIndexTemplate(); - pTemplate2->AddEntry(enumXFIndexTemplateText,A2OUSTR("")); - pTemplate2->AddEntry(enumXFIndexTemplateTab,A2OUSTR("")); - pTemplate2->AddEntry(enumXFIndexTemplatePage,A2OUSTR("")); + pTemplate2->AddEntry(enumXFIndexTemplateText,""); + pTemplate2->AddEntry(enumXFIndexTemplateTab,""); + pTemplate2->AddEntry(enumXFIndexTemplatePage,""); XFIndexTemplate * pTemplate3 = new XFIndexTemplate(); - pTemplate3->AddEntry(enumXFIndexTemplateText,A2OUSTR("")); - pTemplate3->AddEntry(enumXFIndexTemplateTab,A2OUSTR("")); - pTemplate3->AddEntry(enumXFIndexTemplatePage,A2OUSTR("")); + pTemplate3->AddEntry(enumXFIndexTemplateText,""); + pTemplate3->AddEntry(enumXFIndexTemplateTab,""); + pTemplate3->AddEntry(enumXFIndexTemplatePage,""); if (pIndexSection->IsFormatRunin()) { - //pXFIndex->AddTemplate(Int32ToOUString(2),A2OUSTR("Primary"),pTemplate2); - //pXFIndex->AddTemplate(Int32ToOUString(3),A2OUSTR("Primary"),pTemplate3); - pXFIndex->AddTemplate(Int32ToOUString(2),styleName,pTemplate2); - pXFIndex->AddTemplate(Int32ToOUString(3),styleName,pTemplate3); + //pXFIndex->AddTemplate(OUString::number(2),"Primary",pTemplate2); + //pXFIndex->AddTemplate(OUString::number(3),"Primary",pTemplate3); + pXFIndex->AddTemplate(OUString::number(2),styleName,pTemplate2); + pXFIndex->AddTemplate(OUString::number(3),styleName,pTemplate3); } else { - //pXFIndex->AddTemplate(Int32ToOUString(2),A2OUSTR("Secondary"),pTemplate2); - //pXFIndex->AddTemplate(Int32ToOUString(3),A2OUSTR("Secondary"),pTemplate3); - styleName = pFoundry->FindActuralStyleName(A2OUSTR("Secondary")); - pXFIndex->AddTemplate(Int32ToOUString(2),styleName,pTemplate2); - pXFIndex->AddTemplate(Int32ToOUString(3),styleName,pTemplate3); + //pXFIndex->AddTemplate(OUString::number(2),"Secondary",pTemplate2); + //pXFIndex->AddTemplate(OUString::number(3),"Secondary",pTemplate3); + styleName = pFoundry->FindActuralStyleName("Secondary"); + pXFIndex->AddTemplate(OUString::number(2),styleName,pTemplate2); + pXFIndex->AddTemplate(OUString::number(3),styleName,pTemplate3); } } @@ -270,7 +270,7 @@ sal_Bool LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib) XFParaStyle* pOverStyle = new XFParaStyle; *pOverStyle = *(m_pPara->GetXFParaStyle()); - pOverStyle->SetStyleName(A2OUSTR("")); + pOverStyle->SetStyleName(""); LwpLayout::UseWhenType eUserType = m_pLayout->GetUseWhenType(); switch(eUserType) @@ -444,7 +444,7 @@ void LwpMasterPage::RegisterFillerPageStyle() { XFParaStyle* pPagebreakStyle = new XFParaStyle; *pPagebreakStyle = *(m_pPara->GetXFParaStyle()); - pPagebreakStyle->SetStyleName(A2OUSTR("")); + pPagebreakStyle->SetStyleName(""); pPagebreakStyle->SetBreaks(enumXFBreakAftPage); XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); m_FillerPageStyleName= pXFStyleManager->AddStyle(pPagebreakStyle)->GetStyleName(); diff --git a/lotuswordpro/source/filter/lwpfribtext.cxx b/lotuswordpro/source/filter/lwpfribtext.cxx index 9430f1b02501..db236b6ac917 100644 --- a/lotuswordpro/source/filter/lwpfribtext.cxx +++ b/lotuswordpro/source/filter/lwpfribtext.cxx @@ -193,15 +193,15 @@ void LwpFribDocVar::RegisterDefaultTimeStyle() XFDateStyle* pDateStyle = new XFDateStyle;//use the default format pDateStyle->AddMonth(); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddMonthDay(); - pDateStyle->AddText(A2OUSTR("/")); + pDateStyle->AddText("/"); pDateStyle->AddYear(); - pDateStyle->AddText(A2OUSTR(",")); + pDateStyle->AddText(","); pDateStyle->AddHour(); - pDateStyle->AddText(A2OUSTR(":")); + pDateStyle->AddText(":"); pDateStyle->AddMinute(); - pDateStyle->AddText(A2OUSTR(":")); + pDateStyle->AddText(":"); pDateStyle->AddSecond(sal_True,0); XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); @@ -229,13 +229,13 @@ void LwpFribDocVar::XFConvert(XFContentContainer* pXFPara) case FILENAME: { pContent = new XFFileName; - static_cast<XFFileName*>(pContent)->SetType(A2OUSTR("FileName")); + static_cast<XFFileName*>(pContent)->SetType("FileName"); break; } case PATH: { pContent = new XFFileName; - static_cast<XFFileName*>(pContent)->SetType(A2OUSTR("Path")); + static_cast<XFFileName*>(pContent)->SetType("Path"); break; } case DESCRIPTION: @@ -278,109 +278,109 @@ void LwpFribDocVar::XFConvert(XFContentContainer* pXFPara) { /* pContent = new XFAnnotation; XFTextContent* pSpan = new XFTextContent(); - pSpan->SetText(A2OUSTR("Document Size is Here")); + pSpan->SetText("Document Size is Here"); XFParagraph* pPara = new XFParagraph; pPara->Add(pSpan); static_cast<XFAnnotation*>(pContent)->Add(pPara); break; */ - OUString text = A2OUSTR("<Document Size>"); + OUString text = "<Document Size>"; LwpFrib::ConvertChars(pXFPara,text); return; } case SMARTMASTER: { - OUString text = A2OUSTR("<Smart master>"); + OUString text = "<Smart master>"; LwpFrib::ConvertChars(pXFPara,text); return; } case DIVISIONNAME: { - OUString text = A2OUSTR("<Division name>"); + OUString text = "<Division name>"; LwpFrib::ConvertChars(pXFPara,text); return; } case SECTIONNAME: { - OUString text = A2OUSTR("<Section name>"); + OUString text = "<Section name>"; LwpFrib::ConvertChars(pXFPara,text); return; } case VERSIONCREATEBY: { - OUString text = A2OUSTR("<Version Creat by>"); + OUString text = "<Version Creat by>"; LwpFrib::ConvertChars(pXFPara,text); return; } case VERSIONCREATEDATE: { - OUString text = A2OUSTR("<Version Creat date>"); + OUString text = "<Version Creat date>"; LwpFrib::ConvertChars(pXFPara,text); return; } case VERSIONOTHEREDITORS: { - OUString text = A2OUSTR("<Version other Editors>"); + OUString text = "<Version other Editors>"; LwpFrib::ConvertChars(pXFPara,text); return; } case VERSIONNAME: { - OUString text = A2OUSTR("<Version Name>"); + OUString text = "<Version Name>"; LwpFrib::ConvertChars(pXFPara,text); return; } case VERSIONNUMBER: { - OUString text = A2OUSTR("<Version Numbers>"); + OUString text = "<Version Numbers>"; LwpFrib::ConvertChars(pXFPara,text); return; } case ALLVERSIONNAME: { - OUString text = A2OUSTR("<All Version Name>"); + OUString text = "<All Version Name>"; LwpFrib::ConvertChars(pXFPara,text); return; } case VERSIONREMARK: { - OUString text = A2OUSTR("<Version Remark>"); + OUString text = "<Version Remark>"; LwpFrib::ConvertChars(pXFPara,text); return; } case DOCUMENTCATEGORY: { - OUString text = A2OUSTR("<Document Category>"); + OUString text = "<Document Category>"; LwpFrib::ConvertChars(pXFPara,text); return; } case VERSIONLASTDATE: { - OUString text = A2OUSTR("<Version Last Modify Date>"); + OUString text = "<Version Last Modify Date>"; LwpFrib::ConvertChars(pXFPara,text); return; } case VERSIONLASTEDITOR: { - OUString text = A2OUSTR("<Version Last Editor>"); + OUString text = "<Version Last Editor>"; LwpFrib::ConvertChars(pXFPara,text); return; } case LASTEDIT: { - OUString text = A2OUSTR("<Last Editor>"); + OUString text = "<Last Editor>"; LwpFrib::ConvertChars(pXFPara,text); return; } case OTHEREDITORS: { - OUString text = A2OUSTR("<Other Editors>"); + OUString text = "<Other Editors>"; LwpFrib::ConvertChars(pXFPara,text); return; } case NUMOFREVISION: { - OUString text = A2OUSTR("<Number of Revision>"); + OUString text = "<Number of Revision>"; LwpFrib::ConvertChars(pXFPara,text); return; } @@ -453,23 +453,23 @@ void LwpFribPageNumber::XFConvert(XFContentContainer* pXFPara) if (m_nNumStyle == 0x0) return; XFPageNumber* pNum = new XFPageNumber; -// pNum->SetSelect(A2OUSTR("current")); +// pNum->SetSelect("current"); switch(m_nNumStyle) { case 0x01: - pNum->SetNumFmt(A2OUSTR("1")); + pNum->SetNumFmt("1"); break; case 0x02: - pNum->SetNumFmt(A2OUSTR("A")); + pNum->SetNumFmt("A"); break; case 0x03: - pNum->SetNumFmt(A2OUSTR("a")); + pNum->SetNumFmt("a"); break; case 0x04: - pNum->SetNumFmt(A2OUSTR("I")); + pNum->SetNumFmt("I"); break; case 0x05: - pNum->SetNumFmt(A2OUSTR("i")); + pNum->SetNumFmt("i"); break; } OUString styleName = GetStyleName(); diff --git a/lotuswordpro/source/filter/lwpglobalmgr.cxx b/lotuswordpro/source/filter/lwpglobalmgr.cxx index dfded6bc5de0..2d84c8a4222b 100644 --- a/lotuswordpro/source/filter/lwpglobalmgr.cxx +++ b/lotuswordpro/source/filter/lwpglobalmgr.cxx @@ -143,7 +143,7 @@ OUString LwpGlobalMgr::GetEditorName(sal_uInt8 nID) iter = m_EditorAttrMap.find(nID); if (iter != m_EditorAttrMap.end()) return iter->second->cName.str(); - return A2OUSTR(""); + return OUString(""); } XFColor LwpGlobalMgr::GetHighlightColor(sal_uInt8 nID) diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx index 171ab2c69776..cdb5489c8527 100644 --- a/lotuswordpro/source/filter/lwpgrfobj.cxx +++ b/lotuswordpro/source/filter/lwpgrfobj.cxx @@ -675,7 +675,7 @@ void LwpGraphicObject::XFConvertEquation(XFContentContainer * pCont) { //convert equation XFParagraph* pXFPara = new XFParagraph; - pXFPara->Add(A2OUSTR("Formula:")); + pXFPara->Add("Formula:"); //add notes XFAnnotation* pXFNote = new XFAnnotation; //add equation to comment notes diff --git a/lotuswordpro/source/filter/lwpmarker.cxx b/lotuswordpro/source/filter/lwpmarker.cxx index b6d9221e3fb2..bde11c2aa6f9 100644 --- a/lotuswordpro/source/filter/lwpmarker.cxx +++ b/lotuswordpro/source/filter/lwpmarker.cxx @@ -97,7 +97,7 @@ OUString LwpMarker::GetNamedProperty(OUString name) if (pProp) return pProp->GetNamedProperty(name); else - return OUString(A2OUSTR("")); + return OUString(""); } LwpStoryMarker::LwpStoryMarker(LwpObjectHeader &objHdr, LwpSvStream *pStrm) @@ -150,7 +150,7 @@ OUString LwpCHBlkMarker::GetPromptText() pStory = dynamic_cast<LwpStory*>(m_objPromptStory.obj()); if (pStory) return pStory->GetContentText(); - return A2OUSTR(""); + return OUString(""); } void LwpCHBlkMarker::ConvertCHBlock(XFContentContainer* pXFPara, sal_uInt8 nType) @@ -197,16 +197,16 @@ void LwpCHBlkMarker::ProcessPlaceHolder(XFContentContainer* pXFPara,sal_uInt16 n switch(nAction) { case CLICKHERE_CHBEHAVIORTEXT: - pHolder->SetType(A2OUSTR("text")); + pHolder->SetType("text"); break; case CLICKHERE_CHBEHAVIORTABLE: - pHolder->SetType(A2OUSTR("table")); + pHolder->SetType("table"); break; case CLICKHERE_CHBEHAVIORPICTURE: - pHolder->SetType(A2OUSTR("image")); + pHolder->SetType("image"); break; case CLICKHERE_CHBEHAVIOROLEOBJECT: - pHolder->SetType(A2OUSTR("object")); + pHolder->SetType("object"); break; default: break; @@ -234,7 +234,7 @@ void LwpCHBlkMarker::ProcessOtherCHB(XFContentContainer* pXFPara,sal_uInt8 nType if (nType == MARKER_START) { XFHolderStart* pHolder= new XFHolderStart; - pHolder->SetType(A2OUSTR("text")); + pHolder->SetType("text"); if (bHelpFlag) pHolder->SetDesc(m_Help.str()); pHolder->SetPrompt(GetPromptText()); @@ -279,7 +279,7 @@ void LwpCHBlkMarker::ProcessKeylist(XFContentContainer* pXFPara,sal_uInt8 nType) pXFPara->Add(pList); XFHolderStart* pHolder= new XFHolderStart; - pHolder->SetType(A2OUSTR("text")); + pHolder->SetType("text"); pHolder->SetPrompt(GetPromptText()); pXFPara->Add(pHolder); } @@ -305,16 +305,16 @@ sal_Bool LwpCHBlkMarker::IsBubbleHelp() void LwpCHBlkMarker::EnumAllKeywords() { - OUString name1(A2OUSTR("")); - OUString value1(A2OUSTR("")); - OUString name2(A2OUSTR("start")); + OUString name1(""); + OUString value1(""); + OUString name2("start"); LwpPropList* pProp = GetPropList(); if (!pProp) return; while(!name2.isEmpty()) { name2 = pProp->EnumNamedProperty(name1,value1); - if ( name1.match(A2OUSTR("LIST"),0) ) + if ( name1.match("LIST",0) ) { m_Keylist.push_back(value1); } @@ -354,7 +354,7 @@ OUString LwpBookMark::GetName() if (LwpDLNFVList::GetName()) return LwpDLNFVList::GetName()->str(); else - return OUString(A2OUSTR("")); + return OUString(""); } LwpFieldMark::LwpFieldMark(LwpObjectHeader &objHdr, LwpSvStream *pStrm) @@ -394,11 +394,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 = A2OUSTR(""); + sKey1 = ""; if (index[2]>=0 && index[3]>=0) sKey2 = sFormula.copy(index[2]+1,index[3]-index[2]-1); else - sKey2 = A2OUSTR(""); + sKey2 = ""; } void LwpFieldMark::ParseTOC(OUString& sLevel,OUString& sText) @@ -416,11 +416,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 = A2OUSTR(""); + sLevel = ""; if (index[2]>=0 && index[3]>=0) sText = sFormula.copy(index[2]+1,index[3]-index[2]-1); else - sText = A2OUSTR(""); + sText = ""; } sal_Bool LwpFieldMark::IsFormulaInsert() @@ -440,7 +440,7 @@ sal_Bool LwpFieldMark::IsDateTimeField(sal_uInt8& type,OUString& formula) index = sFormula.indexOf(ch1,0); if (index < 0) { - if (sFormula == A2OUSTR("TotalEditingTime")) + if (sFormula == "TotalEditingTime") { type = DATETIME_TOTALTIME; return sal_True; @@ -449,26 +449,26 @@ sal_Bool LwpFieldMark::IsDateTimeField(sal_uInt8& type,OUString& formula) } tag = sFormula.copy(0,index); - if (tag == A2OUSTR("Now()")) + if (tag == "Now()") { type = DATETIME_NOW; formula = sFormula.copy(index+1,sFormula.getLength()-index-1); return sal_True; } - else if (tag == A2OUSTR("CreateDate")) + else if (tag == "CreateDate") { type = DATETIME_CREATE; formula = sFormula.copy(index+1,sFormula.getLength()-index-1); return sal_True; } - else if (tag == A2OUSTR("EditDate")) + else if (tag == "EditDate") { type = DATETIME_LASTEDIT; formula = sFormula.copy(index+1,sFormula.getLength()-index-1); return sal_True; } - else if (tag == A2OUSTR("YesterdaysDate") || tag == A2OUSTR("TomorrowsDate") - || tag == A2OUSTR("TodaysDate")) + else if (tag == "YesterdaysDate" || tag == "TomorrowsDate" + || tag == "TodaysDate") { type = DATETIME_SKIP; return sal_True; @@ -500,13 +500,13 @@ sal_Bool LwpFieldMark::IsCrossRefField(sal_uInt8& nType, OUString& sMarkName) } tag = sFormula.copy(0,index); - if (tag == A2OUSTR("PageRef")) + if (tag == "PageRef") { sMarkName = sFormula.copy(index+1,sFormula.getLength()-index-1); nType = CROSSREF_PAGE; return sal_True; } - else if (tag == A2OUSTR("ParaRef")) + else if (tag == "ParaRef") { sMarkName = sFormula.copy(index+1,sFormula.getLength()-index-1); nType = CROSSREF_PARANUMBER; @@ -520,22 +520,22 @@ sal_Bool LwpFieldMark::IsDocPowerField(sal_uInt8& nType,OUString& sFormula) { sFormula = m_Formula.str(); - if (sFormula == A2OUSTR("Description")) + if (sFormula == "Description") { nType = DOC_DESCRIPTION; return sal_True; } - else if (sFormula == A2OUSTR("NumPages")) + else if (sFormula == "NumPages") { nType = DOC_NUMPAGES; return sal_True; } - else if (sFormula == A2OUSTR("NumChars")) + else if (sFormula == "NumChars") { nType = DOC_NUMCHARS; return sal_True; } - else if (sFormula == A2OUSTR("NumWords")) + else if (sFormula == "NumWords") { nType = DOC_NUMWORDS; return sal_True; diff --git a/lotuswordpro/source/filter/lwpnotes.cxx b/lotuswordpro/source/filter/lwpnotes.cxx index 5c7d916fcd75..cc72a46a841f 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() != A2OUSTR(" ")) + if(m_UserName.str() != OUString(" ")) { return m_UserName.str(); } diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx index c9cedace9876..69a657e419a6 100644 --- a/lotuswordpro/source/filter/lwppagelayout.cxx +++ b/lotuswordpro/source/filter/lwppagelayout.cxx @@ -402,7 +402,7 @@ OUString LwpPageLayout::RegisterEndnoteStyle() //Add master page XFMasterPage* mp1 = new XFMasterPage(); - mp1->SetStyleName(A2OUSTR("Endnote")); + mp1->SetStyleName("Endnote"); mp1->SetPageMaster(pmname); //Set footer style diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx index 3596f8da06df..de58aa65a9db 100644 --- a/lotuswordpro/source/filter/lwppara.cxx +++ b/lotuswordpro/source/filter/lwppara.cxx @@ -332,7 +332,7 @@ sal_Bool LwpPara::RegisterMasterPage(XFParaStyle* pBaseStyle) //register master page style XFParaStyle* pOverStyle = new XFParaStyle(); *pOverStyle = *pBaseStyle; - pOverStyle->SetStyleName( A2OUSTR("")); + pOverStyle->SetStyleName( ""); pOverStyle->SetMasterPage(pLayout->GetStyleName()); if (!m_ParentStyleName.isEmpty()) pOverStyle->SetParentStyleName(m_ParentStyleName); @@ -374,7 +374,7 @@ void LwpPara::RegisterStyle() { pOverStyle = new XFParaStyle; *pOverStyle = *pBaseStyle; - pOverStyle->SetStyleName(A2OUSTR("")); + pOverStyle->SetStyleName(""); LwpParaProperty* pProps = m_pProps; sal_uInt32 PropType; LwpParaStyle* pParaStyle = dynamic_cast<LwpParaStyle*>(m_ParaStyle.obj()); @@ -768,7 +768,7 @@ void LwpPara::RegisterStyle() { XFParaStyle* pParaStyle = new XFParaStyle; *pParaStyle = *GetXFParaStyle(); - //pOverStyle->SetStyleName(A2OUSTR("")); + //pOverStyle->SetStyleName(""); this->RegisterTabStyle(pParaStyle); if (!m_ParentStyleName.isEmpty()) pParaStyle->SetParentStyleName(m_ParentStyleName); @@ -816,7 +816,7 @@ XFSection* LwpPara::CreateXFSection() { XFSection* pXFSection = new XFSection(); pXFSection->SetStyleName(m_SectionStyleName); - m_SectionStyleName = A2OUSTR(""); + m_SectionStyleName = ""; return pXFSection; } diff --git a/lotuswordpro/source/filter/lwpproplist.cxx b/lotuswordpro/source/filter/lwpproplist.cxx index 436e30042143..01646b22e3c0 100644 --- a/lotuswordpro/source/filter/lwpproplist.cxx +++ b/lotuswordpro/source/filter/lwpproplist.cxx @@ -94,7 +94,7 @@ OUString LwpPropList::GetNamedProperty(OUString name) { return pProp->GetValue().str(); } - return OUString(A2OUSTR("")); + return OUString(""); } LwpPropListElement* LwpPropList::FindPropByName(OUString name) @@ -134,7 +134,7 @@ OUString LwpPropList::EnumNamedProperty(OUString& name,OUString& value) return pElement->GetName().str(); } else - return A2OUSTR(""); + return OUString(""); } else @@ -147,7 +147,7 @@ OUString LwpPropList::EnumNamedProperty(OUString& name,OUString& value) if(pElement) return pElement->GetName().str(); } - return A2OUSTR(""); + return OUString(""); } } diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index d33d8b5e589a..cb222732cbd3 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -1220,7 +1220,7 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_ } } - pOverStyle->SetStyleName(A2OUSTR("")); + pOverStyle->SetStyleName(""); OUString StyleName = pXFStyleManager->AddStyle(pOverStyle)->GetStyleName(); pXFPara->SetStyleName(StyleName); diff --git a/lotuswordpro/source/filter/lwptoc.cxx b/lotuswordpro/source/filter/lwptoc.cxx index 8e802a6463e2..3c411af9a4a2 100644 --- a/lotuswordpro/source/filter/lwptoc.cxx +++ b/lotuswordpro/source/filter/lwptoc.cxx @@ -153,7 +153,7 @@ void LwpTocSuperLayout::XFConvert(XFContentContainer* pCont) if(!pLevel) { // add an blank template so that SODC won't add default style to this level - pToc->AddTemplate(Int32ToOUString(i), OUString(), pTemplate); + pToc->AddTemplate(OUString::number(i), OUString(), pTemplate); continue; } @@ -163,7 +163,7 @@ void LwpTocSuperLayout::XFConvert(XFContentContainer* pCont) // One level has 1 template if (!bInserted) { - pTemplate->SetLevel(Int32ToOUString(i)); + pTemplate->SetLevel(OUString::number(i)); if(pLevel->GetUseLeadingText()) { pTemplate->AddEntry(enumXFIndexTemplateChapter, pLevel->GetSearchStyle()); @@ -199,24 +199,24 @@ void LwpTocSuperLayout::XFConvert(XFContentContainer* pCont) } else { - char sSep[8]; + OUString sSep; switch(nLeaderType) { default: // go through case NONE: // no leaders - strcpy(sSep, " "); + sSep = " "; break; case SEPARATORCOMMA: - strcpy(sSep, ", "); + sSep = ", "; break; case SEPARATORDOTS: - strcpy(sSep, "..."); + sSep = "..."; break; } - pTemplate->AddTextEntry(A2OUSTR(sSep), m_TabStyleName); + pTemplate->AddTextEntry(sSep, m_TabStyleName); } //"TOC Page Number Text Style" style always exists in Word Pro file - pTemplate->AddEntry(enumXFIndexTemplatePage, A2OUSTR("TOC Page Number Text Style")); + pTemplate->AddEntry(enumXFIndexTemplatePage, "TOC Page Number Text Style"); } pToc->AddTemplate(Int16ToOUString(i), m_pFoundry->FindActuralStyleName(pLevel->GetSearchStyle()), pTemplate); diff --git a/lotuswordpro/source/filter/lwptools.cxx b/lotuswordpro/source/filter/lwptools.cxx index a87fb165e5c9..1b6437cc4493 100644 --- a/lotuswordpro/source/filter/lwptools.cxx +++ b/lotuswordpro/source/filter/lwptools.cxx @@ -236,20 +236,10 @@ OUString LwpTools::convertToFileUrl(const OString &fileName) OUString LwpTools::DateTimeToOUString(LtTm & dt) { - OUStringBuffer buf; - buf.append(dt.tm_year); - buf.append( A2OUSTR("-") ); - buf.append(dt.tm_mon); - buf.append( A2OUSTR("-") ); - buf.append(dt.tm_mday); - buf.append( A2OUSTR("T") ); - buf.append(dt.tm_hour); - buf.append( A2OUSTR(":") ); - buf.append(dt.tm_min); - buf.append( A2OUSTR(":") ); - buf.append(dt.tm_sec); + OUString aResult = OUString::number(dt.tm_year) + "-" + OUString::number(dt.tm_mon) + "-" + OUString::number(dt.tm_mday) + + "T" + OUString::number(dt.tm_hour) + ":" + OUString::number(dt.tm_min) + ":" + OUString::number(dt.tm_sec); - return buf.makeStringAndClear(); + return aResult; } /** @@ -609,7 +599,7 @@ XFDateStyle* LwpTools::GetSystemDateStyle(sal_Bool bLongFormat) } case '"': { - pDateStyle->AddText(OUString(A2OUSTR("'"))); + pDateStyle->AddText(OUString("'")); break; } default: @@ -829,7 +819,7 @@ XFTimeStyle* LwpTools::GetSystemTimeStyle() } case '"': { - pTimeStyle->AddText(OUString(A2OUSTR("'"))); + pTimeStyle->AddText(OUString("'")); break; } default: diff --git a/lotuswordpro/source/filter/xfilter/xfannotation.hxx b/lotuswordpro/source/filter/xfilter/xfannotation.hxx index 5c88f41be6cb..47a1de82ff95 100644 --- a/lotuswordpro/source/filter/xfilter/xfannotation.hxx +++ b/lotuswordpro/source/filter/xfilter/xfannotation.hxx @@ -94,14 +94,14 @@ inline void XFAnnotation::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !m_strDate.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("office:create-date"), m_strDate ); + pAttrList->AddAttribute( "office:create-date", m_strDate ); if( !m_strAuthor.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("office:author"), m_strAuthor); - pStrm->StartElement( A2OUSTR("office:annotation") ); + pAttrList->AddAttribute( "office:author", m_strAuthor); + pStrm->StartElement( "office:annotation" ); XFContentContainer::ToXml(pStrm); - pStrm->EndElement( A2OUSTR("office:annotation") ); + pStrm->EndElement( "office:annotation" ); } #endif diff --git a/lotuswordpro/source/filter/xfilter/xfarrowstyle.hxx b/lotuswordpro/source/filter/xfilter/xfarrowstyle.hxx index 186d89c5313d..961c1a49abc5 100644 --- a/lotuswordpro/source/filter/xfilter/xfarrowstyle.hxx +++ b/lotuswordpro/source/filter/xfilter/xfarrowstyle.hxx @@ -114,14 +114,14 @@ inline void XFArrowStyle::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !m_strName.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("draw:name"), m_strName ); + pAttrList->AddAttribute( "draw:name", m_strName ); else - pAttrList->AddAttribute( A2OUSTR("draw:name"), GetStyleName() ); + pAttrList->AddAttribute( "draw:name", GetStyleName() ); - pAttrList->AddAttribute( A2OUSTR("svg:viewBox"), m_strViewBox ); - pAttrList->AddAttribute( A2OUSTR("svg:d"), m_strPath ); - pStrm->StartElement(A2OUSTR("draw:marker")); - pStrm->EndElement(A2OUSTR("draw:marker")); + pAttrList->AddAttribute( "svg:viewBox", m_strViewBox ); + pAttrList->AddAttribute( "svg:d", m_strPath ); + pStrm->StartElement("draw:marker"); + pStrm->EndElement("draw:marker"); } #endif diff --git a/lotuswordpro/source/filter/xfilter/xfbgimage.cxx b/lotuswordpro/source/filter/xfilter/xfbgimage.cxx index 091955328b75..1f0f7c5d6cee 100644 --- a/lotuswordpro/source/filter/xfilter/xfbgimage.cxx +++ b/lotuswordpro/source/filter/xfilter/xfbgimage.cxx @@ -88,41 +88,41 @@ void XFBGImage::ToXml(IXFStream *pStrm) if( m_bUserFileLink ) { - pAttrList->AddAttribute( A2OUSTR("xlink:href"), m_strFileName); + pAttrList->AddAttribute( "xlink:href", m_strFileName); } - pAttrList->AddAttribute( A2OUSTR("xlink:type"), A2OUSTR("simple") ); - pAttrList->AddAttribute( A2OUSTR("xlink:actuate"), A2OUSTR("onLoad")); + pAttrList->AddAttribute( "xlink:type", "simple" ); + pAttrList->AddAttribute( "xlink:actuate", "onLoad"); if( m_bPosition ) { - OUString str = GetAlignName(m_eVertAlign) + A2OUSTR(" "); + OUString str = GetAlignName(m_eVertAlign) + " "; if( m_eHoriAlign == enumXFAlignStart ) - str += A2OUSTR("left"); + str += "left"; else if( m_eHoriAlign == enumXFAlignCenter ) - str += A2OUSTR("center"); + str += "center"; else if( m_eHoriAlign == enumXFAlignEnd ) - str += A2OUSTR("right"); + str += "right"; - pAttrList->AddAttribute( A2OUSTR("style:position"), str ); - pAttrList->AddAttribute( A2OUSTR("style:repeat"), A2OUSTR("no-repeat") ); + pAttrList->AddAttribute( "style:position", str ); + pAttrList->AddAttribute( "style:repeat", "no-repeat" ); } else if( m_bRepeate ) - pAttrList->AddAttribute( A2OUSTR("style:repeat"), A2OUSTR("repeat") ); + pAttrList->AddAttribute( "style:repeat", "repeat" ); else if( m_bStretch ) - pAttrList->AddAttribute( A2OUSTR("style:repeat"), A2OUSTR("stretch") ); + pAttrList->AddAttribute( "style:repeat", "stretch" ); - pStrm->StartElement( A2OUSTR("style:background-image") ); + pStrm->StartElement( "style:background-image" ); if( !m_bUserFileLink ) { pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("office:binary-data") ); + pStrm->StartElement( "office:binary-data" ); pStrm->Characters(m_strData); - pStrm->EndElement( A2OUSTR("office:binary-data") ); + pStrm->EndElement( "office:binary-data" ); } - pStrm->EndElement( A2OUSTR("style:background-image") ); + pStrm->EndElement( "style:background-image" ); } bool operator==(XFBGImage& img1, XFBGImage& img2) diff --git a/lotuswordpro/source/filter/xfilter/xfbookmark.hxx b/lotuswordpro/source/filter/xfilter/xfbookmark.hxx index 9a212e19add6..e9c03cd2c87f 100644 --- a/lotuswordpro/source/filter/xfilter/xfbookmark.hxx +++ b/lotuswordpro/source/filter/xfilter/xfbookmark.hxx @@ -92,16 +92,16 @@ public: IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:name"), m_strName ); + pAttrList->AddAttribute( "text:name", m_strName ); if( m_bStart ) { - pStrm->StartElement( A2OUSTR("text:bookmark-start") ); - pStrm->EndElement( A2OUSTR("text:bookmark-start") ); + pStrm->StartElement( "text:bookmark-start" ); + pStrm->EndElement( "text:bookmark-start" ); } else { - pStrm->StartElement( A2OUSTR("text:bookmark-end") ); - pStrm->EndElement( A2OUSTR("text:bookmark-end") ); + pStrm->StartElement( "text:bookmark-end" ); + pStrm->EndElement( "text:bookmark-end" ); } } diff --git a/lotuswordpro/source/filter/xfilter/xfborders.cxx b/lotuswordpro/source/filter/xfilter/xfborders.cxx index 8ffc2554cb26..7da56e5e30bc 100644 --- a/lotuswordpro/source/filter/xfilter/xfborders.cxx +++ b/lotuswordpro/source/filter/xfilter/xfborders.cxx @@ -120,8 +120,8 @@ OUString XFBorder::GetLineWidth() if( m_bDouble ) { str = FloatToOUString(m_fWidthInner); - str += A2OUSTR("cm ") + DoubleToOUString(m_fWidthSpace); - str += A2OUSTR("cm ") + DoubleToOUString(m_fWidthOuter) + A2OUSTR("cm"); + str += "cm " + DoubleToOUString(m_fWidthSpace); + str += "cm " + DoubleToOUString(m_fWidthOuter) + "cm"; } return str; } @@ -138,8 +138,8 @@ OUString XFBorder::ToString() return str; } - str = DoubleToOUString(width) + A2OUSTR("cm"); - str += A2OUSTR(" double ") + m_aColor.ToString(); + str = DoubleToOUString(width) + "cm"; + str += " double " + m_aColor.ToString(); } else { @@ -148,8 +148,8 @@ OUString XFBorder::ToString() { return str; } - str = DoubleToOUString(width) + A2OUSTR("cm"); - str += A2OUSTR(" solid ") + m_aColor.ToString(); + str = DoubleToOUString(width) + "cm"; + str += " solid " + m_aColor.ToString(); } return str; } @@ -336,33 +336,33 @@ void XFBorders::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); if( !m_aBorderLeft.GetLineWidth().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("style:border-line-width-left"), m_aBorderLeft.GetLineWidth() ); + pAttrList->AddAttribute( "style:border-line-width-left", m_aBorderLeft.GetLineWidth() ); if( !m_aBorderRight.GetLineWidth().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("style:border-line-width-right"), m_aBorderRight.GetLineWidth() ); + pAttrList->AddAttribute( "style:border-line-width-right", m_aBorderRight.GetLineWidth() ); if( !m_aBorderTop.GetLineWidth().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("style:border-line-width-top"), m_aBorderTop.GetLineWidth() ); + pAttrList->AddAttribute( "style:border-line-width-top", m_aBorderTop.GetLineWidth() ); if( !m_aBorderBottom.GetLineWidth().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("style:border-line-width-bottom"), m_aBorderBottom.GetLineWidth() ); + pAttrList->AddAttribute( "style:border-line-width-bottom", m_aBorderBottom.GetLineWidth() ); if( !m_aBorderLeft.ToString().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("fo:border-left"), m_aBorderLeft.ToString() ); + pAttrList->AddAttribute( "fo:border-left", m_aBorderLeft.ToString() ); else - pAttrList->AddAttribute( A2OUSTR("fo:border-left"), A2OUSTR("none") ); + pAttrList->AddAttribute( "fo:border-left", "none" ); if( !m_aBorderRight.ToString().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("fo:border-right"), m_aBorderRight.ToString() ); + pAttrList->AddAttribute( "fo:border-right", m_aBorderRight.ToString() ); else - pAttrList->AddAttribute( A2OUSTR("fo:border-right"), A2OUSTR("none") ); + pAttrList->AddAttribute( "fo:border-right", "none" ); if( !m_aBorderTop.ToString().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("fo:border-top"), m_aBorderTop.ToString() ); + pAttrList->AddAttribute( "fo:border-top", m_aBorderTop.ToString() ); else - pAttrList->AddAttribute( A2OUSTR("fo:border-top"), A2OUSTR("none") ); + pAttrList->AddAttribute( "fo:border-top", "none" ); if( !m_aBorderBottom.ToString().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("fo:border-bottom"), m_aBorderBottom.ToString() ); + pAttrList->AddAttribute( "fo:border-bottom", m_aBorderBottom.ToString() ); else - pAttrList->AddAttribute( A2OUSTR("fo:border-bottom"), A2OUSTR("none") ); + pAttrList->AddAttribute( "fo:border-bottom", "none" ); } diff --git a/lotuswordpro/source/filter/xfilter/xfbreaks.hxx b/lotuswordpro/source/filter/xfilter/xfbreaks.hxx index b18bdc75d8f0..a7cea3203d8c 100644 --- a/lotuswordpro/source/filter/xfilter/xfbreaks.hxx +++ b/lotuswordpro/source/filter/xfilter/xfbreaks.hxx @@ -113,19 +113,19 @@ inline void XFBreaks::ToXml(IXFStream *pStrm) case enumXFBreakAuto: break; case enumXFBreakBefPage: - pAttrList->AddAttribute( A2OUSTR("fo:break-before"), A2OUSTR("page") ); + pAttrList->AddAttribute( "fo:break-before", "page" ); break; case enumXFBreakBefColumn: - pAttrList->AddAttribute( A2OUSTR("fo:break-before"), A2OUSTR("column") ); + pAttrList->AddAttribute( "fo:break-before", "column" ); break; case enumXFBreakAftPage: - pAttrList->AddAttribute( A2OUSTR("fo:break-after"), A2OUSTR("page") ); + pAttrList->AddAttribute( "fo:break-after", "page" ); break; case enumXFBreakAftColumn: - pAttrList->AddAttribute( A2OUSTR("fo:break-after"), A2OUSTR("column") ); + pAttrList->AddAttribute( "fo:break-after", "column" ); break; case enumXFBreakKeepWithNext: - pAttrList->AddAttribute( A2OUSTR("fo:keep-with-next"), A2OUSTR("true") ); + pAttrList->AddAttribute( "fo:keep-with-next", "true" ); break; } } diff --git a/lotuswordpro/source/filter/xfilter/xfcell.cxx b/lotuswordpro/source/filter/xfilter/xfcell.cxx index c7b739edfcce..fa83fa1316fa 100644 --- a/lotuswordpro/source/filter/xfilter/xfcell.cxx +++ b/lotuswordpro/source/filter/xfilter/xfcell.cxx @@ -176,21 +176,21 @@ OUString XFCell::GetCellName() XFRow *pRow = m_pOwnerRow; if( !pRow ) - return A2OUSTR(""); + return ""; XFTable *pTable = pRow->GetOwnerTable(); if( !pTable ) - return A2OUSTR(""); + return ""; OUString name; if( pTable->IsSubTable() ) { - name = pTable->GetTableName() + A2OUSTR(".") + Int32ToOUString(m_nCol) + A2OUSTR(".") + Int32ToOUString(pRow->GetRow()); + name = pTable->GetTableName() + "." + OUString::number(m_nCol) + "." + OUString::number(pRow->GetRow()); } else { - name = GetTableColName(m_nCol) + Int32ToOUString(pRow->GetRow()); + name = GetTableColName(m_nCol) + OUString::number(pRow->GetRow()); } return name; } @@ -201,26 +201,26 @@ void XFCell::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("table:style-name"), GetStyleName() ); + pAttrList->AddAttribute( "table:style-name", GetStyleName() ); if( m_nColSpaned>1 ) - pAttrList->AddAttribute( A2OUSTR("table:number-columns-spanned"), Int32ToOUString(m_nColSpaned) ); + pAttrList->AddAttribute( "table:number-columns-spanned", OUString::number(m_nColSpaned) ); if( m_nRepeated ) - pAttrList->AddAttribute( A2OUSTR("table:number-columns-repeated"), Int32ToOUString(m_nRepeated) ); + pAttrList->AddAttribute( "table:number-columns-repeated", OUString::number(m_nRepeated) ); if( m_eValueType != enumXFValueTypeNone ) { - pAttrList->AddAttribute( A2OUSTR("table:value-type"), GetValueType(m_eValueType) ); - pAttrList->AddAttribute( A2OUSTR("table:value"), m_strValue ); + pAttrList->AddAttribute( "table:value-type", GetValueType(m_eValueType) ); + pAttrList->AddAttribute( "table:value", m_strValue ); } if( !m_strFormula.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("table:formula"), m_strFormula ); + pAttrList->AddAttribute( "table:formula", m_strFormula ); if( m_bProtect ) - pAttrList->AddAttribute( A2OUSTR("table:protected"), A2OUSTR("true") ); + pAttrList->AddAttribute( "table:protected", "true" ); //for test only. -// pAttrList->AddAttribute( A2OUSTR("table:cell-name"), GetCellName() ); +// pAttrList->AddAttribute( "table:cell-name", GetCellName() ); - pStrm->StartElement( A2OUSTR("table:table-cell") ); + pStrm->StartElement( "table:table-cell" ); if( m_pSubTable ) m_pSubTable->ToXml(pStrm); @@ -229,7 +229,7 @@ void XFCell::ToXml(IXFStream *pStrm) XFContentContainer::ToXml(pStrm); } - pStrm->EndElement( A2OUSTR("table:table-cell") ); + pStrm->EndElement( "table:table-cell" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx b/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx index b03124880fe9..9e52a0cf2ff2 100644 --- a/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx @@ -205,17 +205,17 @@ void XFCellStyle::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !style.isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:name"),GetStyleName()); + pAttrList->AddAttribute("style:name",GetStyleName()); if( !GetParentStyleName().isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:parent-style-name"),GetParentStyleName()); + pAttrList->AddAttribute("style:parent-style-name",GetParentStyleName()); - pAttrList->AddAttribute(A2OUSTR("style:family"), A2OUSTR("table-cell")); + pAttrList->AddAttribute("style:family", "table-cell"); if( !m_strParentStyleName.isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:parent-style-name"),m_strParentStyleName); + pAttrList->AddAttribute("style:parent-style-name",m_strParentStyleName); if( !m_strDataStyle.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("style:data-style-name"), m_strDataStyle ); + pAttrList->AddAttribute( "style:data-style-name", m_strDataStyle ); - pStrm->StartElement(A2OUSTR("style:style")); + pStrm->StartElement("style:style"); //Paragraph properties: pAttrList->Clear(); @@ -223,7 +223,7 @@ void XFCellStyle::ToXml(IXFStream *pStrm) //text indent: if( m_fTextIndent>FLOAT_MIN ) { - pAttrList->AddAttribute(A2OUSTR("fo:text-indent"), DoubleToOUString(m_fTextIndent) + A2OUSTR("cm") ); + pAttrList->AddAttribute("fo:text-indent", DoubleToOUString(m_fTextIndent) + "cm" ); } //padding: m_aPadding.ToXml(pStrm); @@ -233,15 +233,15 @@ void XFCellStyle::ToXml(IXFStream *pStrm) //text horizontal align: if( m_eHoriAlign != enumXFAlignNone ) { - pAttrList->AddAttribute(A2OUSTR("fo:text-align"), GetAlignName(m_eHoriAlign) ); + pAttrList->AddAttribute("fo:text-align", GetAlignName(m_eHoriAlign) ); } //text vertical align if( m_eVertAlign != enumXFAlignNone ) - pAttrList->AddAttribute( A2OUSTR("fo:vertical-align"), GetAlignName(m_eVertAlign) ); + pAttrList->AddAttribute( "fo:vertical-align", GetAlignName(m_eVertAlign) ); //wrap text: if( m_bWrapText ) - pAttrList->AddAttribute( A2OUSTR("fo:wrap-option"), A2OUSTR("wrap") ); + pAttrList->AddAttribute( "fo:wrap-option", "wrap" ); //shadow: m_aShadow.ToXml(pStrm); @@ -252,20 +252,20 @@ void XFCellStyle::ToXml(IXFStream *pStrm) //background color: if( m_aBackColor.IsValid() && !m_pBackImage ) { - pAttrList->AddAttribute(A2OUSTR("fo:background-color"), m_aBackColor.ToString() ); + pAttrList->AddAttribute("fo:background-color", m_aBackColor.ToString() ); } //Font properties: if( m_pFont ) m_pFont->ToXml(pStrm); - pStrm->StartElement(A2OUSTR("style:properties")); + pStrm->StartElement("style:properties"); if( m_pBackImage ) m_pBackImage->ToXml(pStrm); - pStrm->EndElement(A2OUSTR("style:properties")); + pStrm->EndElement("style:properties"); - pStrm->EndElement(A2OUSTR("style:style")); + pStrm->EndElement("style:style"); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfchange.cxx b/lotuswordpro/source/filter/xfilter/xfchange.cxx index 1be00d4e4d78..fab88d509aff 100644 --- a/lotuswordpro/source/filter/xfilter/xfchange.cxx +++ b/lotuswordpro/source/filter/xfilter/xfchange.cxx @@ -70,10 +70,10 @@ void XFChangeList::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); // Add for disable change tracking - pAttrList->AddAttribute( A2OUSTR("text:track-changes"),A2OUSTR("false")); - pStrm->StartElement( A2OUSTR("text:tracked-changes") ); + pAttrList->AddAttribute( "text:track-changes","false"); + pStrm->StartElement( "text:tracked-changes" ); XFContentContainer::ToXml(pStrm); - pStrm->EndElement(A2OUSTR("text:tracked-changes")); + pStrm->EndElement("text:tracked-changes"); } void XFChangeRegion::ToXml(IXFStream * /*pStrm*/) @@ -87,17 +87,17 @@ void XFChangeInsert::ToXml(IXFStream *pStrm) pAttrList->Clear(); if(m_sID.isEmpty()) return; - pAttrList->AddAttribute( A2OUSTR("text:id"),m_sID); + pAttrList->AddAttribute( "text:id",m_sID); - pStrm->StartElement( A2OUSTR("text:changed-region") ); - pStrm->StartElement( A2OUSTR("text:insertion") ); + pStrm->StartElement( "text:changed-region" ); + pStrm->StartElement( "text:insertion" ); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("office:chg-author"),m_sEditor); - pAttrList->AddAttribute( A2OUSTR("office:chg-date-time"),A2OUSTR("0000-00-00T00:00:00")); - pStrm->StartElement( A2OUSTR("office:change-info") ); - pStrm->EndElement( A2OUSTR("office:change-info") ); - pStrm->EndElement( A2OUSTR("text:insertion") ); - pStrm->EndElement( A2OUSTR("text:changed-region") ); + pAttrList->AddAttribute( "office:chg-author",m_sEditor); + pAttrList->AddAttribute( "office:chg-date-time","0000-00-00T00:00:00"); + pStrm->StartElement( "office:change-info" ); + pStrm->EndElement( "office:change-info" ); + pStrm->EndElement( "text:insertion" ); + pStrm->EndElement( "text:changed-region" ); } void XFChangeDelete::ToXml(IXFStream *pStrm) @@ -107,18 +107,18 @@ void XFChangeDelete::ToXml(IXFStream *pStrm) pAttrList->Clear(); if(m_sID.isEmpty()) return; - pAttrList->AddAttribute( A2OUSTR("text:id"),m_sID); + pAttrList->AddAttribute( "text:id",m_sID); - pStrm->StartElement( A2OUSTR("text:changed-region") ); - pStrm->StartElement( A2OUSTR("text:deletion") ); + pStrm->StartElement( "text:changed-region" ); + pStrm->StartElement( "text:deletion" ); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("office:chg-author"),m_sEditor); - pAttrList->AddAttribute( A2OUSTR("office:chg-date-time"),A2OUSTR("0000-00-00T00:00:00")); - pStrm->StartElement( A2OUSTR("office:change-info") ); - pStrm->EndElement( A2OUSTR("office:change-info") ); + pAttrList->AddAttribute( "office:chg-author",m_sEditor); + pAttrList->AddAttribute( "office:chg-date-time","0000-00-00T00:00:00"); + pStrm->StartElement( "office:change-info" ); + pStrm->EndElement( "office:change-info" ); - pStrm->EndElement( A2OUSTR("text:deletion") ); - pStrm->EndElement( A2OUSTR("text:changed-region") ); + pStrm->EndElement( "text:deletion" ); + pStrm->EndElement( "text:changed-region" ); } void XFChange::ToXml(IXFStream *pStrm) @@ -128,10 +128,10 @@ void XFChange::ToXml(IXFStream *pStrm) pAttrList->Clear(); if(m_sID.isEmpty()) return; - pAttrList->AddAttribute( A2OUSTR("text:change-id"),m_sID); + pAttrList->AddAttribute( "text:change-id",m_sID); - pStrm->StartElement( A2OUSTR("text:change") ); - pStrm->EndElement( A2OUSTR("text:change") ); + pStrm->StartElement( "text:change" ); + pStrm->EndElement( "text:change" ); } void XFChangeStart::ToXml(IXFStream *pStrm) @@ -141,10 +141,10 @@ void XFChangeStart::ToXml(IXFStream *pStrm) pAttrList->Clear(); if(m_sID.isEmpty()) return; - pAttrList->AddAttribute( A2OUSTR("text:change-id"),m_sID); + pAttrList->AddAttribute( "text:change-id",m_sID); - pStrm->StartElement( A2OUSTR("text:change-start") ); - pStrm->EndElement( A2OUSTR("text:change-start") ); + pStrm->StartElement( "text:change-start" ); + pStrm->EndElement( "text:change-start" ); } void XFChangeEnd::ToXml(IXFStream *pStrm) @@ -154,10 +154,10 @@ void XFChangeEnd::ToXml(IXFStream *pStrm) pAttrList->Clear(); if(m_sID.isEmpty()) return; - pAttrList->AddAttribute( A2OUSTR("text:change-id"),m_sID); + pAttrList->AddAttribute( "text:change-id",m_sID); - pStrm->StartElement( A2OUSTR("text:change-end") ); - pStrm->EndElement( A2OUSTR("text:change-end") ); + pStrm->StartElement( "text:change-end" ); + pStrm->EndElement( "text:change-end" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfcolstyle.cxx b/lotuswordpro/source/filter/xfilter/xfcolstyle.cxx index 3ce354e1a128..481b28cea75f 100644 --- a/lotuswordpro/source/filter/xfilter/xfcolstyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfcolstyle.cxx @@ -79,15 +79,15 @@ void XFColStyle::ToXml(IXFStream *pStrm) pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), GetStyleName() ); - pAttrList->AddAttribute( A2OUSTR("style:family"), A2OUSTR("table-column") ); - pStrm->StartElement( A2OUSTR("style:style") ); + pAttrList->AddAttribute( "style:name", GetStyleName() ); + pAttrList->AddAttribute( "style:family", "table-column" ); + pStrm->StartElement( "style:style" ); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:column-width"), DoubleToOUString(m_fWidth) + A2OUSTR("cm") ); - pStrm->StartElement( A2OUSTR("style:properties") ); - pStrm->EndElement( A2OUSTR("style:properties") ); + pAttrList->AddAttribute( "style:column-width", DoubleToOUString(m_fWidth) + "cm" ); + pStrm->StartElement( "style:properties" ); + pStrm->EndElement( "style:properties" ); - pStrm->EndElement( A2OUSTR("style:style") ); + pStrm->EndElement( "style:style" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfcolumns.cxx b/lotuswordpro/source/filter/xfilter/xfcolumns.cxx index 1d51d0dc00a6..cf17b41b9a1b 100644 --- a/lotuswordpro/source/filter/xfilter/xfcolumns.cxx +++ b/lotuswordpro/source/filter/xfilter/xfcolumns.cxx @@ -75,12 +75,12 @@ void XFColumn::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:rel-width"), Int32ToOUString(m_nRelWidth) + A2OUSTR("*") ); - pAttrList->AddAttribute( A2OUSTR("fo:margin-left"), DoubleToOUString(m_fMarginLeft) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("fo:margin-right"), DoubleToOUString(m_fMarginRight) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "style:rel-width", OUString::number(m_nRelWidth) + "*" ); + pAttrList->AddAttribute( "fo:margin-left", DoubleToOUString(m_fMarginLeft) + "cm" ); + pAttrList->AddAttribute( "fo:margin-right", DoubleToOUString(m_fMarginRight) + "cm" ); - pStrm->StartElement( A2OUSTR("style:column") ); - pStrm->EndElement( A2OUSTR("style:column") ); + pStrm->StartElement( "style:column" ); + pStrm->EndElement( "style:column" ); } void XFColumnSep::SetRelHeight(sal_Int32 height) @@ -106,26 +106,26 @@ void XFColumnSep::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:width"), DoubleToOUString(m_fWidth) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "style:width", DoubleToOUString(m_fWidth) + "cm" ); if( m_aColor.IsValid() ) - pAttrList->AddAttribute( A2OUSTR("style:color"), m_aColor.ToString() ); - pAttrList->AddAttribute( A2OUSTR("style:height"), Int32ToOUString(m_nRelHeight) + A2OUSTR("%") ); + pAttrList->AddAttribute( "style:color", m_aColor.ToString() ); + pAttrList->AddAttribute( "style:height", OUString::number(m_nRelHeight) + "%" ); //text align: if( m_eVertAlign == enumXFAlignTop ) { - pAttrList->AddAttribute(A2OUSTR("style:vertical-align"),A2OUSTR("top")); + pAttrList->AddAttribute("style:vertical-align","top"); } else if( m_eVertAlign == enumXFAlignMiddle ) { - pAttrList->AddAttribute(A2OUSTR("style:vertical-align"),A2OUSTR("middle")); + pAttrList->AddAttribute("style:vertical-align","middle"); } else if( m_eVertAlign == enumXFAlignBottom ) { - pAttrList->AddAttribute(A2OUSTR("style:vertical-align"),A2OUSTR("bottom")); + pAttrList->AddAttribute("style:vertical-align","bottom"); } - pStrm->StartElement( A2OUSTR("style:column-sep") ); - pStrm->EndElement( A2OUSTR("style:column-sep") ); + pStrm->StartElement( "style:column-sep" ); + pStrm->EndElement( "style:column-sep" ); } void XFColumns::SetSeparator(XFColumnSep& aSeparator) @@ -155,13 +155,13 @@ void XFColumns::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("fo:column-count"), Int32ToOUString(m_nCount)); + pAttrList->AddAttribute( "fo:column-count", OUString::number(m_nCount)); if( m_nFlag&XFCOLUMNS_FLAG_GAP ) { - pAttrList->AddAttribute( A2OUSTR("fo:column-gap"), DoubleToOUString(m_fGap)+A2OUSTR("cm") ); + pAttrList->AddAttribute( "fo:column-gap", DoubleToOUString(m_fGap)+"cm" ); } - pStrm->StartElement( A2OUSTR("style:columns") ); + pStrm->StartElement( "style:columns" ); if( m_nFlag&XFCOLUMNS_FLAG_SEPARATOR ) //column-sep: { @@ -176,6 +176,6 @@ void XFColumns::ToXml(IXFStream *pStrm) (*it).ToXml(pStrm); } } - pStrm->EndElement( A2OUSTR("style:columns") ); + pStrm->EndElement( "style:columns" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfcrossref.cxx b/lotuswordpro/source/filter/xfilter/xfcrossref.cxx index 080cda98f05c..bb1b8fe56f78 100644 --- a/lotuswordpro/source/filter/xfilter/xfcrossref.cxx +++ b/lotuswordpro/source/filter/xfilter/xfcrossref.cxx @@ -75,18 +75,18 @@ void XFCrossRefStart::ToXml(IXFStream *pStrm) if( m_nType == CROSSREF_TEXT) { - pAttrList->AddAttribute( A2OUSTR("text:reference-format"),A2OUSTR("text") ); + pAttrList->AddAttribute( "text:reference-format","text" ); } else if( m_nType == CROSSREF_PAGE ) { - pAttrList->AddAttribute( A2OUSTR("text:reference-format"), A2OUSTR("page") ); + pAttrList->AddAttribute( "text:reference-format", "page" ); } else if( m_nType == CROSSREF_PARANUMBER ) { - pAttrList->AddAttribute( A2OUSTR("text:reference-format"), A2OUSTR("chapter") ); + pAttrList->AddAttribute( "text:reference-format", "chapter" ); } - pAttrList->AddAttribute( A2OUSTR("text:ref-name"), m_strMarkName); - pStrm->StartElement( A2OUSTR("text:bookmark-ref") ); + pAttrList->AddAttribute( "text:ref-name", m_strMarkName); + pStrm->StartElement( "text:bookmark-ref" ); } XFCrossRefEnd::XFCrossRefEnd() @@ -99,6 +99,6 @@ XFCrossRefEnd::~XFCrossRefEnd() void XFCrossRefEnd::ToXml(IXFStream *pStrm) { - pStrm->EndElement( A2OUSTR("text:bookmark-ref") ); + pStrm->EndElement( "text:bookmark-ref" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdate.cxx b/lotuswordpro/source/filter/xfilter/xfdate.cxx index f87293863555..aecace11241f 100644 --- a/lotuswordpro/source/filter/xfilter/xfdate.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdate.cxx @@ -78,17 +78,17 @@ void XFDate::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("style:data-style-name"), GetStyleName() ); + pAttrList->AddAttribute( "style:data-style-name", GetStyleName() ); if (m_bValued) - pAttrList->AddAttribute( A2OUSTR("text:date-value"), m_strDate ); + pAttrList->AddAttribute( "text:date-value", m_strDate ); if( m_bFixed ) - pAttrList->AddAttribute( A2OUSTR("text:fixed"), A2OUSTR("true") ); + pAttrList->AddAttribute( "text:fixed", "true" ); - pStrm->StartElement( A2OUSTR("text:date") ); + pStrm->StartElement( "text:date" ); if (!m_strText.isEmpty()) pStrm->Characters(m_strText); - pStrm->EndElement( A2OUSTR("text:date") ); + pStrm->EndElement( "text:date" ); } void XFDateStart::ToXml(IXFStream *pStrm) @@ -97,22 +97,22 @@ void XFDateStart::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("style:data-style-name"), GetStyleName() ); + pAttrList->AddAttribute( "style:data-style-name", GetStyleName() ); /* if (m_bValued) - pAttrList->AddAttribute( A2OUSTR("text:date-value"), DateTimeToOUString(m_aDateTime) ); + pAttrList->AddAttribute( "text:date-value", DateTimeToOUString(m_aDateTime) ); if( m_bFixed ) - pAttrList->AddAttribute( A2OUSTR("text:fixed"), A2OUSTR("true") ); + pAttrList->AddAttribute( "text:fixed", "true" ); - pStrm->StartElement( A2OUSTR("text:date") ); + pStrm->StartElement( "text:date" ); if (m_strText.getLength()>0) pStrm->Characters(m_strText); */ - pStrm->StartElement( A2OUSTR("text:date") ); + pStrm->StartElement( "text:date" ); } void XFDateEnd::ToXml(IXFStream *pStrm) { - pStrm->EndElement( A2OUSTR("text:date") ); + pStrm->EndElement( "text:date" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdatestyle.cxx b/lotuswordpro/source/filter/xfilter/xfdatestyle.cxx index 73ae4c5972a5..ae0581c0dc1a 100644 --- a/lotuswordpro/source/filter/xfilter/xfdatestyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdatestyle.cxx @@ -75,84 +75,84 @@ void XFDatePart::ToXml(IXFStream *pStrm) case enumXFDateYear: pAttrList->Clear(); if( m_bLongFmt ) - pAttrList->AddAttribute( A2OUSTR("number:style"), A2OUSTR("long") ); - pStrm->StartElement( A2OUSTR("number:year") ); - pStrm->EndElement( A2OUSTR("number:year") ); + pAttrList->AddAttribute( "number:style", "long" ); + pStrm->StartElement( "number:year" ); + pStrm->EndElement( "number:year" ); break; case enumXFDateMonth: pAttrList->Clear(); if( m_bTexture ) - pAttrList->AddAttribute( A2OUSTR("number:textual"), A2OUSTR("true") ); + pAttrList->AddAttribute( "number:textual", "true" ); if( m_bLongFmt ) - pAttrList->AddAttribute( A2OUSTR("number:style"), A2OUSTR("long") ); - pStrm->StartElement( A2OUSTR("number:month") ); - pStrm->EndElement( A2OUSTR("number:month") ); + pAttrList->AddAttribute( "number:style", "long" ); + pStrm->StartElement( "number:month" ); + pStrm->EndElement( "number:month" ); break; case enumXFDateMonthDay: pAttrList->Clear(); if( m_bLongFmt ) - pAttrList->AddAttribute( A2OUSTR("number:style"), A2OUSTR("long") ); - pStrm->StartElement( A2OUSTR("number:day") ); - pStrm->EndElement( A2OUSTR("number:day") ); + pAttrList->AddAttribute( "number:style", "long" ); + pStrm->StartElement( "number:day" ); + pStrm->EndElement( "number:day" ); break; case enumXFDateWeekDay: pAttrList->Clear(); if( m_bLongFmt ) - pAttrList->AddAttribute( A2OUSTR("number:style"), A2OUSTR("long") ); - pStrm->StartElement( A2OUSTR("number:day-of-week") ); - pStrm->EndElement( A2OUSTR("number:day-of-week") ); + pAttrList->AddAttribute( "number:style", "long" ); + pStrm->StartElement( "number:day-of-week" ); + pStrm->EndElement( "number:day-of-week" ); break; case enumXFDateYearWeek: pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("number:week-of-year") ); - pStrm->EndElement( A2OUSTR("number:week-of-year") ); + pStrm->StartElement( "number:week-of-year" ); + pStrm->EndElement( "number:week-of-year" ); break; case enumXFDateEra: pAttrList->Clear(); if( m_bLongFmt ) - pAttrList->AddAttribute( A2OUSTR("number:style"), A2OUSTR("long") ); - pStrm->StartElement( A2OUSTR("number:era") ); - pStrm->EndElement( A2OUSTR("number:era") ); + pAttrList->AddAttribute( "number:style", "long" ); + pStrm->StartElement( "number:era" ); + pStrm->EndElement( "number:era" ); break; case enumXFDateQuarter: pAttrList->Clear(); if( m_bLongFmt ) - pAttrList->AddAttribute( A2OUSTR("number:style"), A2OUSTR("long") ); - pStrm->StartElement( A2OUSTR("number:quarter") ); - pStrm->EndElement( A2OUSTR("number:quarter") ); + pAttrList->AddAttribute( "number:style", "long" ); + pStrm->StartElement( "number:quarter" ); + pStrm->EndElement( "number:quarter" ); break; case enumXFDateHour: pAttrList->Clear(); if( m_bLongFmt ) - pAttrList->AddAttribute( A2OUSTR("number:style"), A2OUSTR("long") ); - pStrm->StartElement( A2OUSTR("number:hours") ); - pStrm->EndElement( A2OUSTR("number:hours") ); + pAttrList->AddAttribute( "number:style", "long" ); + pStrm->StartElement( "number:hours" ); + pStrm->EndElement( "number:hours" ); break; case enumXFDateMinute: pAttrList->Clear(); if( m_bLongFmt ) - pAttrList->AddAttribute( A2OUSTR("number:style"), A2OUSTR("long") ); - pStrm->StartElement( A2OUSTR("number:minutes") ); - pStrm->EndElement( A2OUSTR("number:minutes") ); + pAttrList->AddAttribute( "number:style", "long" ); + pStrm->StartElement( "number:minutes" ); + pStrm->EndElement( "number:minutes" ); break; case enumXFDateSecond: pAttrList->Clear(); if( m_bLongFmt ) - pAttrList->AddAttribute( A2OUSTR("number:style"), A2OUSTR("long") ); + pAttrList->AddAttribute( "number:style", "long" ); if( m_nDecimalPos ) - pAttrList->AddAttribute( A2OUSTR("number:decimal-places"), Int32ToOUString(m_nDecimalPos) ); - pStrm->StartElement( A2OUSTR("number:seconds") ); - pStrm->EndElement( A2OUSTR("number:seconds") ); + pAttrList->AddAttribute( "number:decimal-places", OUString::number(m_nDecimalPos) ); + pStrm->StartElement( "number:seconds" ); + pStrm->EndElement( "number:seconds" ); break; case enumXFDateAmPm: - pStrm->StartElement( A2OUSTR("number:am-pm") ); - pStrm->EndElement( A2OUSTR("number:am-pm") ); + pStrm->StartElement( "number:am-pm" ); + pStrm->EndElement( "number:am-pm" ); break; case enumXFDateText: pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("number:text") ); + pStrm->StartElement( "number:text" ); pStrm->Characters( m_strText ); - pStrm->EndElement( A2OUSTR("number:text") ); + pStrm->EndElement( "number:text" ); break; } } @@ -177,14 +177,14 @@ void XFDateStyle::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), GetStyleName() ); - pAttrList->AddAttribute( A2OUSTR("style:family"), A2OUSTR("data-style") ); + pAttrList->AddAttribute( "style:name", GetStyleName() ); + pAttrList->AddAttribute( "style:family", "data-style" ); - pStrm->StartElement( A2OUSTR("number:date-style") ); + pStrm->StartElement( "number:date-style" ); m_aParts.ToXml(pStrm); - pStrm->EndElement( A2OUSTR("number:date-style") ); + pStrm->EndElement( "number:date-style" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdocfield.cxx b/lotuswordpro/source/filter/xfilter/xfdocfield.cxx index 9120aaba4079..ff466589a79f 100644 --- a/lotuswordpro/source/filter/xfilter/xfdocfield.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdocfield.cxx @@ -68,91 +68,91 @@ void XFFileName::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - if (m_strType.equals(A2OUSTR("FileName"))) - pAttrList->AddAttribute( A2OUSTR("text:display"), A2OUSTR("name-and-extension") ); - else if (m_strType.equals(A2OUSTR("Path"))) - pAttrList->AddAttribute( A2OUSTR("text:display"), A2OUSTR("path") ); - pStrm->StartElement( A2OUSTR("text:file-name") ); - pStrm->EndElement( A2OUSTR("text:file-name") ); + if (m_strType.equals("FileName")) + pAttrList->AddAttribute( "text:display", "name-and-extension" ); + else if (m_strType.equals("Path")) + pAttrList->AddAttribute( "text:display", "path" ); + pStrm->StartElement( "text:file-name" ); + pStrm->EndElement( "text:file-name" ); } void XFWordCount::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:word-count") ); - pStrm->EndElement( A2OUSTR("text:word-count") ); + pStrm->StartElement( "text:word-count" ); + pStrm->EndElement( "text:word-count" ); } void XFCharCount::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:character-count") ); - pStrm->EndElement( A2OUSTR("text:character-count") ); + pStrm->StartElement( "text:character-count" ); + pStrm->EndElement( "text:character-count" ); } void XFDescription::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:description") ); - pStrm->EndElement( A2OUSTR("text:description") ); + pStrm->StartElement( "text:description" ); + pStrm->EndElement( "text:description" ); } void XFPageCountStart::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:page-count") ); + pStrm->StartElement( "text:page-count" ); } void XFPageCountEnd::ToXml(IXFStream *pStrm) { - pStrm->EndElement( A2OUSTR("text:page-count") ); + pStrm->EndElement( "text:page-count" ); } void XFWordCountStart::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:word-count") ); + pStrm->StartElement( "text:word-count" ); } void XFCharCountStart::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:character-count") ); + pStrm->StartElement( "text:character-count" ); } void XFDescriptionStart::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:description") ); + pStrm->StartElement( "text:description" ); } void XFWordCountEnd::ToXml(IXFStream *pStrm) { - pStrm->EndElement( A2OUSTR("text:word-count") ); + pStrm->EndElement( "text:word-count" ); } void XFCharCountEnd::ToXml(IXFStream *pStrm) { - pStrm->EndElement( A2OUSTR("text:character-count") ); + pStrm->EndElement( "text:character-count" ); } void XFDescriptionEnd::ToXml(IXFStream *pStrm) { - pStrm->EndElement( A2OUSTR("text:description") ); + pStrm->EndElement( "text:description" ); } void XFKeywords::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:keywords") ); - pStrm->EndElement( A2OUSTR("text:keywords") ); + pStrm->StartElement( "text:keywords" ); + pStrm->EndElement( "text:keywords" ); } void XFTotalEditTime::ToXml(IXFStream *pStrm) @@ -160,39 +160,39 @@ void XFTotalEditTime::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); if (!m_strStyleName.isEmpty()) - pAttrList->AddAttribute( A2OUSTR("style:data-style-name"), m_strStyleName ); - pStrm->StartElement( A2OUSTR("text:editing-duration" ) ); - pStrm->EndElement( A2OUSTR("text:editing-duration") ); + pAttrList->AddAttribute( "style:data-style-name", m_strStyleName ); + pStrm->StartElement( "text:editing-duration" ); + pStrm->EndElement( "text:editing-duration" ); } void XFTotalEditTimeStart::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); if (!m_strStyleName.isEmpty()) - pAttrList->AddAttribute( A2OUSTR("style:data-style-name"), m_strStyleName ); - pStrm->StartElement( A2OUSTR("text:editing-duration" ) ); + pAttrList->AddAttribute( "style:data-style-name", m_strStyleName ); + pStrm->StartElement( "text:editing-duration" ); } void XFTotalEditTimeEnd::ToXml(IXFStream *pStrm) { - pStrm->EndElement( A2OUSTR("text:editing-duration") ); + pStrm->EndElement( "text:editing-duration" ); } void XFCreateTime::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); if (!m_strStyleName.isEmpty()) - pAttrList->AddAttribute( A2OUSTR("style:data-style-name"), m_strStyleName ); - pStrm->StartElement( A2OUSTR("text:creation-time") ); - pStrm->EndElement( A2OUSTR("text:creation-time") ); + pAttrList->AddAttribute( "style:data-style-name", m_strStyleName ); + pStrm->StartElement( "text:creation-time" ); + pStrm->EndElement( "text:creation-time" ); } void XFLastEditTime::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); if (!m_strStyleName.isEmpty()) - pAttrList->AddAttribute( A2OUSTR("style:data-style-name"), m_strStyleName ); - pStrm->StartElement( A2OUSTR("text:modification-time") ); - pStrm->EndElement( A2OUSTR("text:modification-time") ); + pAttrList->AddAttribute( "style:data-style-name", m_strStyleName ); + pStrm->StartElement( "text:modification-time" ); + pStrm->EndElement( "text:modification-time" ); } void XFCreateTimeStart::ToXml(IXFStream *pStrm) @@ -200,8 +200,8 @@ void XFCreateTimeStart::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); if (!m_strStyleName.isEmpty()) - pAttrList->AddAttribute( A2OUSTR("style:data-style-name"), m_strStyleName ); - pStrm->StartElement( A2OUSTR("text:creation-time") ); + pAttrList->AddAttribute( "style:data-style-name", m_strStyleName ); + pStrm->StartElement( "text:creation-time" ); } void XFLastEditTimeStart::ToXml(IXFStream *pStrm) @@ -209,24 +209,24 @@ void XFLastEditTimeStart::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); if (!m_strStyleName.isEmpty()) - pAttrList->AddAttribute( A2OUSTR("style:data-style-name"), m_strStyleName ); - pStrm->StartElement( A2OUSTR("text:modification-time") ); + pAttrList->AddAttribute( "style:data-style-name", m_strStyleName ); + pStrm->StartElement( "text:modification-time" ); } void XFCreateTimeEnd::ToXml(IXFStream *pStrm) { - pStrm->EndElement( A2OUSTR("text:creation-time") ); + pStrm->EndElement( "text:creation-time" ); } void XFLastEditTimeEnd::ToXml(IXFStream *pStrm) { - pStrm->EndElement( A2OUSTR("text:modification-time") ); + pStrm->EndElement( "text:modification-time" ); } void XFInitialCreator::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:initial-creator") ); - pStrm->EndElement( A2OUSTR("text:initial-creator") ); + pStrm->StartElement( "text:initial-creator" ); + pStrm->EndElement( "text:initial-creator" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawareastyle.cxx b/lotuswordpro/source/filter/xfilter/xfdrawareastyle.cxx index c52a2758e907..0edb8c67cfd3 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawareastyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawareastyle.cxx @@ -78,20 +78,20 @@ void XFDrawAreaStyle::ToXml(IXFStream *pStrm) pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("draw:name"), GetStyleName() ); + pAttrList->AddAttribute( "draw:name", GetStyleName() ); if( m_eLineStyle == enumXFAreaLineSingle ) - pAttrList->AddAttribute( A2OUSTR("draw:style"), A2OUSTR("single") ); + pAttrList->AddAttribute( "draw:style", "single" ); else if( m_eLineStyle == enumXFAreaLineCrossed ) - pAttrList->AddAttribute( A2OUSTR("draw:style"), A2OUSTR("double") ); + pAttrList->AddAttribute( "draw:style", "double" ); else if( m_eLineStyle == enumXFAreaLineTriple ) - pAttrList->AddAttribute( A2OUSTR("draw:style"), A2OUSTR("triple") ); + pAttrList->AddAttribute( "draw:style", "triple" ); - pAttrList->AddAttribute( A2OUSTR("draw:color"), m_aLineColor.ToString() ); - pAttrList->AddAttribute( A2OUSTR("draw:rotation"), Int32ToOUString(m_nAngle*10) ); - pAttrList->AddAttribute( A2OUSTR("draw:distance"), DoubleToOUString(m_fSpace)+A2OUSTR("cm") ); + pAttrList->AddAttribute( "draw:color", m_aLineColor.ToString() ); + pAttrList->AddAttribute( "draw:rotation", OUString::number(m_nAngle*10) ); + pAttrList->AddAttribute( "draw:distance", DoubleToOUString(m_fSpace)+"cm" ); - pStrm->StartElement( A2OUSTR("draw:hatch") ); - pStrm->EndElement( A2OUSTR("draw:hatch") ); + pStrm->StartElement( "draw:hatch" ); + pStrm->EndElement( "draw:hatch" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawgroup.hxx b/lotuswordpro/source/filter/xfilter/xfdrawgroup.hxx index 32ac42e1d516..d75c4197caea 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawgroup.hxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawgroup.hxx @@ -103,11 +103,11 @@ inline void XFDrawGroup::ToXml(IXFStream *pStrm) pAttrList->Clear(); XFDrawObject::ToXml(pStrm); - pStrm->StartElement( A2OUSTR("draw:g") ); + pStrm->StartElement( "draw:g" ); m_aChildren.ToXml(pStrm); - pStrm->EndElement( A2OUSTR("draw:g") ); + pStrm->EndElement( "draw:g" ); } diff --git a/lotuswordpro/source/filter/xfilter/xfdrawline.cxx b/lotuswordpro/source/filter/xfilter/xfdrawline.cxx index 1cfa356a5157..cb233911a32f 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawline.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawline.cxx @@ -68,56 +68,56 @@ void XFDrawLine::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("draw:style-name"), GetStyleName() ); + pAttrList->AddAttribute( "draw:style-name", GetStyleName() ); assert(!m_strName.isEmpty()); //name should not be null. if( !m_strName.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("draw:name"), m_strName ); + pAttrList->AddAttribute( "draw:name", m_strName ); //anchor type: switch( m_eAnchor ) { case enumXFAnchorPara: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("paragraph") ); + pAttrList->AddAttribute( "text:anchor-type", "paragraph" ); break; case enumXFAnchorPage: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("page") ); + pAttrList->AddAttribute( "text:anchor-type", "page" ); break; case enumXFAnchorChar: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("char") ); + pAttrList->AddAttribute( "text:anchor-type", "char" ); break; case enumXFAnchorAsChar: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("as-char") ); + pAttrList->AddAttribute( "text:anchor-type", "as-char" ); break; case enumXFAnchorFrame: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("frame") ); + pAttrList->AddAttribute( "text:anchor-type", "frame" ); break; default: break; } - pAttrList->AddAttribute( A2OUSTR("draw:z-index"), Int32ToOUString(m_nZIndex) ); + pAttrList->AddAttribute( "draw:z-index", OUString::number(m_nZIndex) ); - pAttrList->AddAttribute( A2OUSTR("svg:x1"), DoubleToOUString(m_aPoint1.GetX()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("svg:y1"), DoubleToOUString(m_aPoint1.GetY()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("svg:x2"), DoubleToOUString(m_aPoint2.GetX()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("svg:y2"), DoubleToOUString(m_aPoint2.GetY()) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "svg:x1", DoubleToOUString(m_aPoint1.GetX()) + "cm" ); + pAttrList->AddAttribute( "svg:y1", DoubleToOUString(m_aPoint1.GetY()) + "cm" ); + pAttrList->AddAttribute( "svg:x2", DoubleToOUString(m_aPoint2.GetX()) + "cm" ); + pAttrList->AddAttribute( "svg:y2", DoubleToOUString(m_aPoint2.GetY()) + "cm" ); //transform OUString strTransform; if( m_nFlag&XFDRAWOBJECT_FLAG_ROTATE ) - strTransform = A2OUSTR("rotate (") + DoubleToOUString(m_fRotate) + A2OUSTR(") "); + strTransform = "rotate (" + DoubleToOUString(m_fRotate) + ") "; if( m_nFlag&XFDRAWOBJECT_FLAG_TRANLATE ) - strTransform += A2OUSTR("translate (") + DoubleToOUString(m_aRotatePoint.GetX()) + A2OUSTR("cm ") + DoubleToOUString(m_aRotatePoint.GetY()) + A2OUSTR("cm) "); + strTransform += "translate (" + DoubleToOUString(m_aRotatePoint.GetX()) + "cm " + DoubleToOUString(m_aRotatePoint.GetY()) + "cm) "; if( m_nFlag&XFDRAWOBJECT_FLAG_SKEWX ) - strTransform += A2OUSTR("skewX (") + DoubleToOUString(m_fSkewX) + A2OUSTR(" "); + strTransform += "skewX (" + DoubleToOUString(m_fSkewX) + " "; if( m_nFlag&XFDRAWOBJECT_FLAG_SKEWY ) - strTransform += A2OUSTR("skewY (") + DoubleToOUString(m_fSkewY) + A2OUSTR(" "); + strTransform += "skewY (" + DoubleToOUString(m_fSkewY) + " "; strTransform = strTransform.trim(); if( !strTransform.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("draw:transform"), strTransform ); + pAttrList->AddAttribute( "draw:transform", strTransform ); - pStrm->StartElement( A2OUSTR("draw:line") ); + pStrm->StartElement( "draw:line" ); ContentToXml(pStrm); - pStrm->EndElement( A2OUSTR("draw:line") ); + pStrm->EndElement( "draw:line" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawlinestyle.cxx b/lotuswordpro/source/filter/xfilter/xfdrawlinestyle.cxx index 5fa83067f793..466b95869fd8 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawlinestyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawlinestyle.cxx @@ -82,9 +82,9 @@ void XFDrawLineStyle::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("draw:name"), GetStyleName()); + pAttrList->AddAttribute( "draw:name", GetStyleName()); //simple place here: - pAttrList->AddAttribute( A2OUSTR("draw:style"), A2OUSTR("rect")); + pAttrList->AddAttribute( "draw:style", "rect"); if( m_eLineStyle == enumXFLineDot ) { @@ -92,30 +92,30 @@ void XFDrawLineStyle::ToXml(IXFStream *pStrm) } else if( m_eLineStyle == enumXFLineDash ) { - pAttrList->AddAttribute( A2OUSTR("draw:dots1"), Int32ToOUString(m_nNumber1)); - pAttrList->AddAttribute( A2OUSTR(" draw:dots1-length"), DoubleToOUString(m_fLength1) + A2OUSTR("cm")); + pAttrList->AddAttribute( "draw:dots1", OUString::number(m_nNumber1)); + pAttrList->AddAttribute( " draw:dots1-length", DoubleToOUString(m_fLength1) + "cm"); - pAttrList->AddAttribute( A2OUSTR("draw:dots2"), Int32ToOUString(m_nNumber2)); - pAttrList->AddAttribute( A2OUSTR(" draw:dots2-length"), DoubleToOUString(m_fLength2) + A2OUSTR("cm")); + pAttrList->AddAttribute( "draw:dots2", OUString::number(m_nNumber2)); + pAttrList->AddAttribute( " draw:dots2-length", DoubleToOUString(m_fLength2) + "cm"); } else if( m_eLineStyle == enumXFLineDotDash ) { - pAttrList->AddAttribute( A2OUSTR("draw:dots1"), Int32ToOUString(m_nNumber1)); + pAttrList->AddAttribute( "draw:dots1", OUString::number(m_nNumber1)); - pAttrList->AddAttribute( A2OUSTR("draw:dots2"), Int32ToOUString(m_nNumber2)); - pAttrList->AddAttribute( A2OUSTR(" draw:dots2-length"), DoubleToOUString(m_fLength2) + A2OUSTR("cm")); + pAttrList->AddAttribute( "draw:dots2", OUString::number(m_nNumber2)); + pAttrList->AddAttribute( " draw:dots2-length", DoubleToOUString(m_fLength2) + "cm"); } else if( m_eLineStyle == enumXFLineDashDot ) { - pAttrList->AddAttribute( A2OUSTR("draw:dots1"), Int32ToOUString(m_nNumber1)); - pAttrList->AddAttribute( A2OUSTR(" draw:dots1-length"), DoubleToOUString(m_fLength1) + A2OUSTR("cm")); + pAttrList->AddAttribute( "draw:dots1", OUString::number(m_nNumber1)); + pAttrList->AddAttribute( " draw:dots1-length", DoubleToOUString(m_fLength1) + "cm"); - pAttrList->AddAttribute( A2OUSTR("draw:dots2"), Int32ToOUString(m_nNumber2)); + pAttrList->AddAttribute( "draw:dots2", OUString::number(m_nNumber2)); } - pAttrList->AddAttribute( A2OUSTR("draw:distance"), DoubleToOUString(m_fSpace) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "draw:distance", DoubleToOUString(m_fSpace) + "cm" ); - pStrm->StartElement( A2OUSTR("draw:stroke-dash") ); - pStrm->EndElement( A2OUSTR("draw:stroke-dash") ); + pStrm->StartElement( "draw:stroke-dash" ); + pStrm->EndElement( "draw:stroke-dash" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawobj.cxx b/lotuswordpro/source/filter/xfilter/xfdrawobj.cxx index c2bec7330cd7..5ec311e72d1b 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawobj.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawobj.cxx @@ -80,54 +80,54 @@ void XFDrawObject::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("draw:style-name"), GetStyleName() ); + pAttrList->AddAttribute( "draw:style-name", GetStyleName() ); assert(!m_strName.isEmpty()); //name should not be null. if( !m_strName.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("draw:name"), m_strName ); + pAttrList->AddAttribute( "draw:name", m_strName ); //anchor type: switch( m_eAnchor ) { case enumXFAnchorPara: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("paragraph") ); + pAttrList->AddAttribute( "text:anchor-type", "paragraph" ); break; case enumXFAnchorPage: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("page") ); + pAttrList->AddAttribute( "text:anchor-type", "page" ); break; case enumXFAnchorChar: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("char") ); + pAttrList->AddAttribute( "text:anchor-type", "char" ); break; case enumXFAnchorAsChar: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("as-char") ); + pAttrList->AddAttribute( "text:anchor-type", "as-char" ); break; case enumXFAnchorFrame: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("frame") ); + pAttrList->AddAttribute( "text:anchor-type", "frame" ); break; default: break; } - pAttrList->AddAttribute( A2OUSTR("draw:z-index"), Int32ToOUString(m_nZIndex) ); + pAttrList->AddAttribute( "draw:z-index", OUString::number(m_nZIndex) ); - pAttrList->AddAttribute( A2OUSTR("svg:x"), DoubleToOUString(m_aRect.GetX()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("svg:y"), DoubleToOUString(m_aRect.GetY()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("svg:width"), DoubleToOUString(m_aRect.GetWidth()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("svg:height"), DoubleToOUString(m_aRect.GetHeight()) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "svg:x", DoubleToOUString(m_aRect.GetX()) + "cm" ); + pAttrList->AddAttribute( "svg:y", DoubleToOUString(m_aRect.GetY()) + "cm" ); + pAttrList->AddAttribute( "svg:width", DoubleToOUString(m_aRect.GetWidth()) + "cm" ); + pAttrList->AddAttribute( "svg:height", DoubleToOUString(m_aRect.GetHeight()) + "cm" ); //transform OUString strTransform; if( m_nFlag&XFDRAWOBJECT_FLAG_ROTATE ) - strTransform = A2OUSTR("rotate (") + DoubleToOUString(m_fRotate) + A2OUSTR(") "); + strTransform = "rotate (" + DoubleToOUString(m_fRotate) + ") "; if( m_nFlag&XFDRAWOBJECT_FLAG_TRANLATE ) - strTransform += A2OUSTR("translate (") + DoubleToOUString(m_aRotatePoint.GetX()) + A2OUSTR("cm ") + DoubleToOUString(m_aRotatePoint.GetY()) + A2OUSTR("cm) "); + strTransform += "translate (" + DoubleToOUString(m_aRotatePoint.GetX()) + "cm " + DoubleToOUString(m_aRotatePoint.GetY()) + "cm) "; if( m_nFlag&XFDRAWOBJECT_FLAG_SCALE ) - strTransform += A2OUSTR("scale (") + DoubleToOUString(m_fScaleX) + A2OUSTR("cm ") + DoubleToOUString(m_fScaleY) + A2OUSTR("cm) "); + strTransform += "scale (" + DoubleToOUString(m_fScaleX) + "cm " + DoubleToOUString(m_fScaleY) + "cm) "; if( m_nFlag&XFDRAWOBJECT_FLAG_SKEWX ) - strTransform += A2OUSTR("skewX (") + DoubleToOUString(m_fSkewX) + A2OUSTR(" "); + strTransform += "skewX (" + DoubleToOUString(m_fSkewX) + " "; if( m_nFlag&XFDRAWOBJECT_FLAG_SKEWY ) - strTransform += A2OUSTR("skewY (") + DoubleToOUString(m_fSkewY) + A2OUSTR(" "); + strTransform += "skewY (" + DoubleToOUString(m_fSkewY) + " "; strTransform = strTransform.trim(); if( !strTransform.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("draw:transform"), strTransform ); + pAttrList->AddAttribute( "draw:transform", strTransform ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawpath.cxx b/lotuswordpro/source/filter/xfilter/xfdrawpath.cxx index a77bd24034e0..7fa8b0586123 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawpath.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawpath.cxx @@ -72,7 +72,7 @@ OUString XFSvgPathEntry::ToString() for( it = m_aPoints.begin(); it != m_aPoints.end(); ++it ) { XFPoint aPt= *it; - str += DoubleToOUString(aPt.GetX()*1000) + A2OUSTR(" ") + DoubleToOUString(aPt.GetY()*1000) + A2OUSTR(" "); + str += DoubleToOUString(aPt.GetX()*1000) + " " + DoubleToOUString(aPt.GetY()*1000) + " "; } return str.trim(); } @@ -86,9 +86,9 @@ void XFDrawPath::MoveTo(XFPoint pt, sal_Bool absPosition) XFSvgPathEntry entry; if( absPosition ) - entry.SetCommand(A2OUSTR("M")); + entry.SetCommand("M"); else - entry.SetCommand(A2OUSTR("m")); + entry.SetCommand("m"); entry.AddPoint(pt); m_aPaths.push_back(entry); } @@ -98,9 +98,9 @@ void XFDrawPath::LineTo(XFPoint pt, sal_Bool absPosition) XFSvgPathEntry entry; if( absPosition ) - entry.SetCommand(A2OUSTR("L")); + entry.SetCommand("L"); else - entry.SetCommand(A2OUSTR("l")); + entry.SetCommand("l"); entry.AddPoint(pt); m_aPaths.push_back(entry); } @@ -110,9 +110,9 @@ void XFDrawPath::CurveTo(XFPoint dest, XFPoint ctrl1, XFPoint ctrl2, sal_Bool XFSvgPathEntry entry; if( absPosition ) - entry.SetCommand(A2OUSTR("C")); + entry.SetCommand("C"); else - entry.SetCommand(A2OUSTR("c")); + entry.SetCommand("c"); entry.AddPoint(ctrl1); entry.AddPoint(ctrl2); entry.AddPoint(dest); @@ -125,9 +125,9 @@ void XFDrawPath::ClosePath(sal_Bool absPosition) XFSvgPathEntry entry; if( absPosition ) - entry.SetCommand(A2OUSTR("Z")); + entry.SetCommand("Z"); else - entry.SetCommand(A2OUSTR("z")); + entry.SetCommand("z"); m_aPaths.push_back(entry); } @@ -140,10 +140,10 @@ void XFDrawPath::ToXml(IXFStream *pStrm) //view-box: XFRect rect = m_aRect; - OUString strViewBox = A2OUSTR("0 0 "); - strViewBox += DoubleToOUString(rect.GetWidth()*1000) + A2OUSTR(" "); + OUString strViewBox = "0 0 "; + strViewBox += DoubleToOUString(rect.GetWidth()*1000) + " "; strViewBox += DoubleToOUString(rect.GetHeight()*1000); - pAttrList->AddAttribute( A2OUSTR("svg:viewBox"), strViewBox); + pAttrList->AddAttribute( "svg:viewBox", strViewBox); //points OUString strPath; @@ -154,14 +154,14 @@ void XFDrawPath::ToXml(IXFStream *pStrm) strPath += aSvg.ToString(); } strPath = strPath.trim(); - pAttrList->AddAttribute( A2OUSTR("svg:d"), strPath); + pAttrList->AddAttribute( "svg:d", strPath); SetPosition(rect); XFDrawObject::ToXml(pStrm); - pStrm->StartElement( A2OUSTR("draw:path") ); + pStrm->StartElement( "draw:path" ); ContentToXml(pStrm); - pStrm->EndElement( A2OUSTR("draw:path") ); + pStrm->EndElement( "draw:path" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawpolygon.cxx b/lotuswordpro/source/filter/xfilter/xfdrawpolygon.cxx index b047f44e41c1..84bb240a2b6a 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawpolygon.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawpolygon.cxx @@ -71,10 +71,10 @@ void XFDrawPolygon::ToXml(IXFStream *pStrm) pAttrList->Clear(); //view-box: XFRect rect = CalcViewBox(); - OUString strViewBox = A2OUSTR("0 0 "); - strViewBox += DoubleToOUString(rect.GetWidth()*1000) + A2OUSTR(" "); + OUString strViewBox = "0 0 "; + strViewBox += DoubleToOUString(rect.GetWidth()*1000) + " "; strViewBox += DoubleToOUString(rect.GetHeight()*1000); - pAttrList->AddAttribute( A2OUSTR("svg:viewBox"), strViewBox); + pAttrList->AddAttribute( "svg:viewBox", strViewBox); //points OUString strPoints; @@ -83,17 +83,17 @@ void XFDrawPolygon::ToXml(IXFStream *pStrm) XFPoint pt = *it; double x = (pt.GetX()-rect.GetX())*1000; double y = (pt.GetY()-rect.GetY())*1000; - strPoints += DoubleToOUString(x) + A2OUSTR(" ") + DoubleToOUString(y) + A2OUSTR(" "); + strPoints += DoubleToOUString(x) + " " + DoubleToOUString(y) + " "; } strPoints = strPoints.trim(); - pAttrList->AddAttribute( A2OUSTR("draw:points"), strPoints); + pAttrList->AddAttribute( "draw:points", strPoints); SetPosition(rect.GetX(),rect.GetY(),rect.GetWidth(),rect.GetHeight()); XFDrawObject::ToXml(pStrm); - pStrm->StartElement( A2OUSTR("draw:polygon") ); + pStrm->StartElement( "draw:polygon" ); ContentToXml(pStrm); - pStrm->EndElement( A2OUSTR("draw:polygon") ); + pStrm->EndElement( "draw:polygon" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawpolyline.cxx b/lotuswordpro/source/filter/xfilter/xfdrawpolyline.cxx index 4c3792f0ed93..bd3e94b7b20e 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawpolyline.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawpolyline.cxx @@ -71,10 +71,10 @@ void XFDrawPolyline::ToXml(IXFStream *pStrm) pAttrList->Clear(); //view-box: XFRect rect = CalcViewBox(); - OUString strViewBox = A2OUSTR("0 0 "); - strViewBox += DoubleToOUString(rect.GetWidth()*1000) + A2OUSTR(" "); + OUString strViewBox = "0 0 "; + strViewBox += DoubleToOUString(rect.GetWidth()*1000) + " "; strViewBox += DoubleToOUString(rect.GetHeight()*1000); - pAttrList->AddAttribute( A2OUSTR("svg:viewBox"), strViewBox); + pAttrList->AddAttribute( "svg:viewBox", strViewBox); //points OUString strPoints; @@ -83,17 +83,17 @@ void XFDrawPolyline::ToXml(IXFStream *pStrm) XFPoint pt = *it; double x = (pt.GetX()-rect.GetX())*1000; double y = (pt.GetY()-rect.GetY())*1000; - strPoints += DoubleToOUString(x) + A2OUSTR(",") + DoubleToOUString(y) + A2OUSTR(" "); + strPoints += DoubleToOUString(x) + "," + DoubleToOUString(y) + " "; } strPoints = strPoints.trim(); - pAttrList->AddAttribute( A2OUSTR("draw:points"), strPoints); + pAttrList->AddAttribute( "draw:points", strPoints); SetPosition(rect.GetX(),rect.GetY(),rect.GetWidth(),rect.GetHeight()); XFDrawObject::ToXml(pStrm); - pStrm->StartElement( A2OUSTR("draw:polyline") ); + pStrm->StartElement( "draw:polyline" ); ContentToXml(pStrm); - pStrm->EndElement( A2OUSTR("draw:polyline") ); + pStrm->EndElement( "draw:polyline" ); } XFRect XFDrawPolyline::CalcViewBox() diff --git a/lotuswordpro/source/filter/xfilter/xfdrawrect.cxx b/lotuswordpro/source/filter/xfilter/xfdrawrect.cxx index 9b4e869da862..5efb0a4a54d3 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawrect.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawrect.cxx @@ -71,11 +71,11 @@ void XFDrawRect::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( 0 != m_fCornerRadius ) - pAttrList->AddAttribute( A2OUSTR("draw:corner-radius"), DoubleToOUString(m_fCornerRadius) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "draw:corner-radius", DoubleToOUString(m_fCornerRadius) + "cm" ); XFDrawObject::ToXml(pStrm); - pStrm->StartElement( A2OUSTR("draw:rect") ); + pStrm->StartElement( "draw:rect" ); ContentToXml(pStrm); - pStrm->EndElement( A2OUSTR("draw:rect") ); + pStrm->EndElement( "draw:rect" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx b/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx index 49ee8bd99b57..983e0f0c7b5d 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx @@ -170,32 +170,32 @@ void XFDrawStyle::ToXml(IXFStream *pStrm) pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), GetStyleName() ); - pAttrList->AddAttribute( A2OUSTR("style:family"), A2OUSTR("graphics") ); - pStrm->StartElement( A2OUSTR("style:style") ); + pAttrList->AddAttribute( "style:name", GetStyleName() ); + pAttrList->AddAttribute( "style:family", "graphics" ); + pStrm->StartElement( "style:style" ); pAttrList->Clear(); if( m_eWrap == enumXFWrapBackground ) { - pAttrList->AddAttribute( A2OUSTR("style:run-through"), A2OUSTR("background") ); + pAttrList->AddAttribute( "style:run-through", "background" ); } else { - pAttrList->AddAttribute( A2OUSTR("style:run-through"), A2OUSTR("foreground") ); + pAttrList->AddAttribute( "style:run-through", "foreground" ); if( m_eWrap == enumXFWrapNone ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("none") ); + pAttrList->AddAttribute( "style:wrap", "none" ); else if( m_eWrap == enumXFWrapLeft ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("left") ); + pAttrList->AddAttribute( "style:wrap", "left" ); else if( m_eWrap == enumXFWrapRight ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("right") ); + pAttrList->AddAttribute( "style:wrap", "right" ); else if( m_eWrap == enumXFWrapParallel ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("parallel") ); + pAttrList->AddAttribute( "style:wrap", "parallel" ); else if( m_eWrap == enumXFWrapRunThrough ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("run-through") ); + pAttrList->AddAttribute( "style:wrap", "run-through" ); else if( m_eWrap == enumXFWrapBest ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("dynamic") ); + pAttrList->AddAttribute( "style:wrap", "dynamic" ); } //line style: @@ -205,144 +205,144 @@ void XFDrawStyle::ToXml(IXFStream *pStrm) if( !m_pLineStyle->IsSolid() ) { // pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("draw:stroke"), A2OUSTR("dash") ); - pAttrList->AddAttribute( A2OUSTR("draw:stroke-dash"), m_pLineStyle->GetStyleName() ); + pAttrList->AddAttribute( "draw:stroke", "dash" ); + pAttrList->AddAttribute( "draw:stroke-dash", m_pLineStyle->GetStyleName() ); } else { - pAttrList->AddAttribute( A2OUSTR("draw:stroke"), A2OUSTR("solid") ); + pAttrList->AddAttribute( "draw:stroke", "solid" ); } if( m_pLineStyle->GetWidth() > 0 ) - pAttrList->AddAttribute( A2OUSTR("svg:stroke-width"), DoubleToOUString(m_pLineStyle->GetWidth()) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "svg:stroke-width", DoubleToOUString(m_pLineStyle->GetWidth()) + "cm" ); XFColor color = m_pLineStyle->GetColor(); if( color.IsValid() ) - pAttrList->AddAttribute( A2OUSTR("svg:stroke-color"), color.ToString() ); + pAttrList->AddAttribute( "svg:stroke-color", color.ToString() ); if( m_pLineStyle->GetTransparency()>0 ) - pAttrList->AddAttribute( A2OUSTR("svg:stroke-opacity"), Int32ToOUString(m_pLineStyle->GetTransparency()) + A2OUSTR("%") ); + pAttrList->AddAttribute( "svg:stroke-opacity", OUString::number(m_pLineStyle->GetTransparency()) + "%" ); } else - pAttrList->AddAttribute( A2OUSTR("draw:stroke"), A2OUSTR("none") ); + pAttrList->AddAttribute( "draw:stroke", "none" ); //area style: if( m_pAreaStyle ) { if( enumXFAreaSolid == m_pAreaStyle->GetAreaStyle() ) { - pAttrList->AddAttribute( A2OUSTR("draw:fill"), A2OUSTR("solid") ); + pAttrList->AddAttribute( "draw:fill", "solid" ); XFColor color = m_pAreaStyle->GetBackColor(); if( color.IsValid() ) - pAttrList->AddAttribute( A2OUSTR("draw:fill-color"), color.ToString() ); + pAttrList->AddAttribute( "draw:fill-color", color.ToString() ); } else if( enumXFAreaHatch == m_pAreaStyle->GetAreaStyle() ) { - pAttrList->AddAttribute( A2OUSTR("draw:fill"), A2OUSTR("hatch") ); - pAttrList->AddAttribute( A2OUSTR("draw:fill-hatch-name"), m_pAreaStyle->GetStyleName() ); + pAttrList->AddAttribute( "draw:fill", "hatch" ); + pAttrList->AddAttribute( "draw:fill-hatch-name", m_pAreaStyle->GetStyleName() ); XFColor color = m_pAreaStyle->GetBackColor(); if( color.IsValid() ) { - pAttrList->AddAttribute( A2OUSTR("draw:fill-hatch-solid"), A2OUSTR("true") ); - pAttrList->AddAttribute( A2OUSTR("draw:fill-color"), color.ToString() ); + pAttrList->AddAttribute( "draw:fill-hatch-solid", "true" ); + pAttrList->AddAttribute( "draw:fill-color", color.ToString() ); } } } else - pAttrList->AddAttribute( A2OUSTR("draw:fill"), A2OUSTR("none") ); + pAttrList->AddAttribute( "draw:fill", "none" ); if( !m_strArrowStart.isEmpty() ) { - pAttrList->AddAttribute( A2OUSTR("draw:marker-start"), m_strArrowStart ); - pAttrList->AddAttribute( A2OUSTR("draw:marker-start-width"), DoubleToOUString(m_fArrowStartSize)+A2OUSTR("cm") ); + pAttrList->AddAttribute( "draw:marker-start", m_strArrowStart ); + pAttrList->AddAttribute( "draw:marker-start-width", DoubleToOUString(m_fArrowStartSize)+"cm" ); if( m_bArrowStartCenter ) - pAttrList->AddAttribute( A2OUSTR("draw:draw:marker-start-center"), A2OUSTR("true") ); + pAttrList->AddAttribute( "draw:draw:marker-start-center", "true" ); } if( !m_strArrowEnd.isEmpty() ) { - pAttrList->AddAttribute( A2OUSTR("draw:marker-end"), m_strArrowEnd ); - pAttrList->AddAttribute( A2OUSTR("draw:marker-end-width"), DoubleToOUString(m_fArrowEndSize)+A2OUSTR("cm") ); + pAttrList->AddAttribute( "draw:marker-end", m_strArrowEnd ); + pAttrList->AddAttribute( "draw:marker-end-width", DoubleToOUString(m_fArrowEndSize)+"cm" ); if( m_bArrowEndCenter ) - pAttrList->AddAttribute( A2OUSTR("draw:draw:marker-end-center"), A2OUSTR("true") ); + pAttrList->AddAttribute( "draw:draw:marker-end-center", "true" ); } if (m_pFontWorkStyle) { // style - OUString aStr = A2OUSTR(""); + OUString aStr = ""; switch (m_pFontWorkStyle->GetStyleType()) { default: // fall through! case enumXFFWOff: break; case enumXFFWRotate: - aStr = A2OUSTR("rotate"); + aStr = "rotate"; break; case enumXFFWUpright: - aStr = A2OUSTR("upright"); + aStr = "upright"; break; case enumXFFWSlantX: - aStr = A2OUSTR("slant-x"); + aStr = "slant-x"; break; case enumXFFWSlantY: - aStr = A2OUSTR("slant-y"); + aStr = "slant-y"; break; } if (!aStr.isEmpty()) { - pAttrList->AddAttribute(A2OUSTR("draw:fontwork-style"), aStr); + pAttrList->AddAttribute("draw:fontwork-style", aStr); } //adjust - aStr = A2OUSTR(""); + aStr = ""; switch (m_pFontWorkStyle->GetAdjustType()) { default: // fall througth case enumXFFWAdjustAutosize: - aStr = A2OUSTR("autosize"); + aStr = "autosize"; break; case enumXFFWAdjustLeft: - aStr = A2OUSTR("left"); + aStr = "left"; break; case enumXFFWAdjustCenter: - aStr = A2OUSTR("center"); + aStr = "center"; break; case enumXFFWAdustRight: - aStr = A2OUSTR("right"); + aStr = "right"; break; } if (!aStr.isEmpty()) { - pAttrList->AddAttribute(A2OUSTR("draw:fontwork-adjust"), aStr); + pAttrList->AddAttribute("draw:fontwork-adjust", aStr); } //form - aStr = A2OUSTR(""); + aStr = ""; switch (m_pFontWorkStyle->GetButtonForm()) { default: // fall through! case -1: break; case 4: - aStr = A2OUSTR("top-arc"); + aStr = "top-arc"; break; case 5: - aStr = A2OUSTR("bottom-arc"); + aStr = "bottom-arc"; break; } if (!aStr.isEmpty()) { - pAttrList->AddAttribute(A2OUSTR("draw:fontwork-form"), aStr); + pAttrList->AddAttribute("draw:fontwork-form", aStr); } // distance - //pAttrList->AddAttribute(A2OUSTR("draw:fontwork-distance"), - // DoubleToOUString(m_pFontWorkStyle->GetFWDistance())+A2OUSTR("cm")); + //pAttrList->AddAttribute("draw:fontwork-distance", + // DoubleToOUString(m_pFontWorkStyle->GetFWDistance())+"cm"); } - pStrm->StartElement( A2OUSTR("style:properties") ); + pStrm->StartElement( "style:properties" ); - pStrm->EndElement( A2OUSTR("style:properties") ); + pStrm->EndElement( "style:properties" ); - pStrm->EndElement( A2OUSTR("style:style") ); + pStrm->EndElement( "style:style" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdropcap.hxx b/lotuswordpro/source/filter/xfilter/xfdropcap.hxx index eb0597406b52..c1830fd070d4 100644 --- a/lotuswordpro/source/filter/xfilter/xfdropcap.hxx +++ b/lotuswordpro/source/filter/xfilter/xfdropcap.hxx @@ -112,7 +112,7 @@ inline void XFDropcap::Reset() m_nCharCount = 0; m_nLines = 0; m_fDistance = 0; - m_strStyleName = A2OUSTR(""); + m_strStyleName = ""; } inline void XFDropcap::ToXml(IXFStream *pStrm) @@ -122,13 +122,13 @@ inline void XFDropcap::ToXml(IXFStream *pStrm) if( m_nCharCount < 1 || m_nLines < 2 ) return; - pAttrList->AddAttribute(A2OUSTR("style:length"), Int32ToOUString(m_nCharCount) ); - pAttrList->AddAttribute(A2OUSTR("style:lines"), Int32ToOUString(m_nLines) ); - pAttrList->AddAttribute(A2OUSTR("style:distance"), DoubleToOUString(m_fDistance) + A2OUSTR("cm") ); + pAttrList->AddAttribute("style:length", OUString::number(m_nCharCount) ); + pAttrList->AddAttribute("style:lines", OUString::number(m_nLines) ); + pAttrList->AddAttribute("style:distance", DoubleToOUString(m_fDistance) + "cm" ); if( !m_strStyleName.isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:style-name"), m_strStyleName ); - pStrm->StartElement( A2OUSTR("style:drop-cap") ); - pStrm->EndElement( A2OUSTR("style:drop-cap") ); + pAttrList->AddAttribute("style:style-name", m_strStyleName ); + pStrm->StartElement( "style:drop-cap" ); + pStrm->EndElement( "style:drop-cap" ); } inline bool operator==(XFDropcap& dc1, XFDropcap& dc2) diff --git a/lotuswordpro/source/filter/xfilter/xfendnote.hxx b/lotuswordpro/source/filter/xfilter/xfendnote.hxx index 761979d6321b..c7de0af798b1 100644 --- a/lotuswordpro/source/filter/xfilter/xfendnote.hxx +++ b/lotuswordpro/source/filter/xfilter/xfendnote.hxx @@ -103,23 +103,23 @@ inline void XFEndNote::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:id"), m_strID ); - pStrm->StartElement( A2OUSTR("text:endnote") ); + pAttrList->AddAttribute( "text:id", m_strID ); + pStrm->StartElement( "text:endnote" ); pAttrList->Clear(); if( !m_strLabel.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:label"), m_strLabel ); - pStrm->StartElement( A2OUSTR("text:endnote-citation") ); + pAttrList->AddAttribute( "text:label", m_strLabel ); + pStrm->StartElement( "text:endnote-citation" ); if( !m_strLabel.isEmpty()) pStrm->Characters(m_strLabel); - pStrm->EndElement( A2OUSTR("text:endnote-citation") ); + pStrm->EndElement( "text:endnote-citation" ); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:endnote-body") ); + pStrm->StartElement( "text:endnote-body" ); XFContentContainer::ToXml(pStrm); - pStrm->EndElement( A2OUSTR("text:endnote-body") ); + pStrm->EndElement( "text:endnote-body" ); - pStrm->EndElement( A2OUSTR("text:endnote") ); + pStrm->EndElement( "text:endnote" ); } #endif diff --git a/lotuswordpro/source/filter/xfilter/xfendnoteconfig.hxx b/lotuswordpro/source/filter/xfilter/xfendnoteconfig.hxx index 5bf3a2b9b639..87edffb05a71 100644 --- a/lotuswordpro/source/filter/xfilter/xfendnoteconfig.hxx +++ b/lotuswordpro/source/filter/xfilter/xfendnoteconfig.hxx @@ -69,10 +69,10 @@ public: { m_bIsFootnote = sal_False; m_bInsertInPage = sal_False; - m_strDefaultStyle = A2OUSTR("Endnote"); - m_strMasterPage = A2OUSTR("Endnote"); - m_strCitationStyle = A2OUSTR("Endnote Symbol"); - m_strBodyStyle = A2OUSTR("Endnote anchor"); + m_strDefaultStyle = "Endnote"; + m_strMasterPage = "Endnote"; + m_strCitationStyle = "Endnote Symbol"; + m_strBodyStyle = "Endnote anchor"; } }; diff --git a/lotuswordpro/source/filter/xfilter/xfentry.cxx b/lotuswordpro/source/filter/xfilter/xfentry.cxx index 8327bcce3202..efb0e8eb046d 100644 --- a/lotuswordpro/source/filter/xfilter/xfentry.cxx +++ b/lotuswordpro/source/filter/xfilter/xfentry.cxx @@ -71,36 +71,36 @@ void XFEntry::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:string-value"), m_strValue ); + pAttrList->AddAttribute( "text:string-value", m_strValue ); if( m_eType == enumXFEntryTOC ) { - pAttrList->AddAttribute( A2OUSTR("text:outline-level"), Int32ToOUString(m_nOutlineLevel) ); - pStrm->StartElement( A2OUSTR("text:toc-mark") ); + pAttrList->AddAttribute( "text:outline-level", OUString::number(m_nOutlineLevel) ); + pStrm->StartElement( "text:toc-mark" ); // pStrm->Characters(m_strDisplay); - pStrm->EndElement( A2OUSTR("text:toc-mark") ); + pStrm->EndElement( "text:toc-mark" ); } else if( m_eType == enumXFEntryAlphabetical ) { - pAttrList->AddAttribute( A2OUSTR("text:key1"), m_strKey1 ); + pAttrList->AddAttribute( "text:key1", m_strKey1 ); if( !m_strKey2.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:key2"), m_strKey2 ); + pAttrList->AddAttribute( "text:key2", m_strKey2 ); if( m_bMainEntry ) - pAttrList->AddAttribute( A2OUSTR("text:main-etry"), A2OUSTR("true") ); + pAttrList->AddAttribute( "text:main-etry", "true" ); - pStrm->StartElement( A2OUSTR("text:alphabetical-index-mark") ); + pStrm->StartElement( "text:alphabetical-index-mark" ); // pStrm->Characters(m_strDisplay); - pStrm->EndElement( A2OUSTR("text:alphabetical-index-mark") ); + pStrm->EndElement( "text:alphabetical-index-mark" ); } else if( m_eType == enumXFEntryUserIndex ) { - pAttrList->AddAttribute( A2OUSTR("text:outline-level"), Int32ToOUString(m_nOutlineLevel) ); - pAttrList->AddAttribute( A2OUSTR("text:index-name"), m_strName ); + pAttrList->AddAttribute( "text:outline-level", OUString::number(m_nOutlineLevel) ); + pAttrList->AddAttribute( "text:index-name", m_strName ); - pStrm->StartElement( A2OUSTR("text:user-index-mark") ); + pStrm->StartElement( "text:user-index-mark" ); // pStrm->Characters(m_strDisplay); - pStrm->EndElement( A2OUSTR("text:user-index-mark") ); + pStrm->EndElement( "text:user-index-mark" ); } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfentry.hxx b/lotuswordpro/source/filter/xfilter/xfentry.hxx index f27eba909adf..d0e7b344cce2 100644 --- a/lotuswordpro/source/filter/xfilter/xfentry.hxx +++ b/lotuswordpro/source/filter/xfilter/xfentry.hxx @@ -95,7 +95,7 @@ public: /** * @descr Set entry key. The keys is available only for enumXFEntryAlphabetical. */ - void SetKey(const OUString& key1, const OUString& key2=A2OUSTR("")); + void SetKey(const OUString& key1, const OUString& key2=""); /** * @descr Set whether it's a main entry. This is available only for enumXFEntryAlphabetical. @@ -140,7 +140,7 @@ inline void XFEntry::SetEntryName(const OUString& name) m_strName = name; } -inline void XFEntry::SetKey(const OUString& key1, const OUString& key2/* =A2OUSTR */) +inline void XFEntry::SetKey(const OUString& key1, const OUString& key2) { m_strKey1 = key1; m_strKey2 = key2; diff --git a/lotuswordpro/source/filter/xfilter/xffont.cxx b/lotuswordpro/source/filter/xfilter/xffont.cxx index be9b9ffa139d..ff15aff2e9e5 100644 --- a/lotuswordpro/source/filter/xfilter/xffont.cxx +++ b/lotuswordpro/source/filter/xfilter/xffont.cxx @@ -245,128 +245,128 @@ void XFFont::ToXml(IXFStream *pStrm) if( m_nFlag & XFFONT_FLAG_NAME ) { - pAttrList->AddAttribute(A2OUSTR("style:font-name"),m_strFontName ); + pAttrList->AddAttribute("style:font-name",m_strFontName ); } if( m_nFlag & XFFONT_FLAG_NAME_ASIA ) { - pAttrList->AddAttribute(A2OUSTR("style:font-name-asian"),m_strFontNameAsia ); + pAttrList->AddAttribute("style:font-name-asian",m_strFontNameAsia ); } if( m_nFlag & XFFONT_FLAG_NAME_COMPLEX ) { - pAttrList->AddAttribute(A2OUSTR("style:font-name-complex"), m_strFontNameComplex); + pAttrList->AddAttribute("style:font-name-complex", m_strFontNameComplex); } //font size: if( (m_nFlag & XFFONT_FLAG_SIZE) && m_nFontSize != 0 ) { - OUString strSize = Int32ToOUString(m_nFontSize); - strSize += A2OUSTR("pt"); - pAttrList->AddAttribute(A2OUSTR("fo:font-size"),strSize); + OUString strSize = OUString::number(m_nFontSize); + strSize += "pt"; + pAttrList->AddAttribute("fo:font-size",strSize); } if( (m_nFlag & XFFONT_FLAG_SIZE_ASIA) && m_nFontSizeAsia ) { - OUString strSize = Int32ToOUString(m_nFontSizeAsia); - strSize += A2OUSTR("pt"); - pAttrList->AddAttribute(A2OUSTR("style:font-size-asian"),strSize); + OUString strSize = OUString::number(m_nFontSizeAsia); + strSize += "pt"; + pAttrList->AddAttribute("style:font-size-asian",strSize); } if( (m_nFlag & XFFONT_FLAG_SIZE_COMPLEX) && m_nFontSizeComplex ) { - OUString strSize = Int32ToOUString(m_nFontSizeComplex); - strSize += A2OUSTR("pt"); - pAttrList->AddAttribute(A2OUSTR("style:font-size-complex"),strSize); + OUString strSize = OUString::number(m_nFontSizeComplex); + strSize += "pt"; + pAttrList->AddAttribute("style:font-size-complex",strSize); } //italic flag: if( ( m_nFlag & XFFONT_FLAG_ITALIC) && m_bItalic ) { - pAttrList->AddAttribute(A2OUSTR("fo:font-style"), A2OUSTR("italic")); + pAttrList->AddAttribute("fo:font-style", "italic"); } if( (m_nFlag & XFFONT_FLAG_ITALIC_ASIA) && m_bItalicAsia ) { - pAttrList->AddAttribute(A2OUSTR("style:font-style-asian"), A2OUSTR("italic")); + pAttrList->AddAttribute("style:font-style-asian", "italic"); } if( (m_nFlag & XFFONT_FLAG_ITALIC_COMPLEX) && m_bItalicComplex ) { - pAttrList->AddAttribute(A2OUSTR("style:font-style-complex"), A2OUSTR("italic")); + pAttrList->AddAttribute("style:font-style-complex", "italic"); } //Bold flag: if( (m_nFlag & XFFONT_FLAG_BOLD) && m_bBold ) { - pAttrList->AddAttribute(A2OUSTR("fo:font-weight"), A2OUSTR("bold")); + pAttrList->AddAttribute("fo:font-weight", "bold"); } if( (m_nFlag & XFFONT_FLAG_BOLD_ASIA) && m_bBoldAsia ) { - pAttrList->AddAttribute(A2OUSTR("style:font-weight-asian"), A2OUSTR("bold")); + pAttrList->AddAttribute("style:font-weight-asian", "bold"); } if( (m_nFlag & XFFONT_FLAG_BOLD_ASIA) && m_bBoldComplex ) { - pAttrList->AddAttribute(A2OUSTR("style:font-weight-complex"), A2OUSTR("bold")); + pAttrList->AddAttribute("style:font-weight-complex", "bold"); } //underline: if( (m_nFlag & XFFONT_FLAG_UNDERLINE) && m_eUnderline ) { - pAttrList->AddAttribute(A2OUSTR("style:text-underline"), GetUnderlineName(m_eUnderline) ); + pAttrList->AddAttribute("style:text-underline", GetUnderlineName(m_eUnderline) ); if( (m_nFlag & XFFONT_FLAG_UNDERLINECOLOR) ) { - pAttrList->AddAttribute( A2OUSTR("style:text-underline-color"), m_aUnderlineColor.ToString() ); + pAttrList->AddAttribute( "style:text-underline-color", m_aUnderlineColor.ToString() ); } else - pAttrList->AddAttribute( A2OUSTR("style:text-underline-color"), A2OUSTR("font-color") ); + pAttrList->AddAttribute( "style:text-underline-color", "font-color" ); } //enumCrossoutType m_eCrossout; if( (m_nFlag & XFFONT_FLAG_CROSSOUT) && m_eCrossout ) { - pAttrList->AddAttribute(A2OUSTR("style:text-crossing-out"), GetCrossoutName(m_eCrossout) ); + pAttrList->AddAttribute("style:text-crossing-out", GetCrossoutName(m_eCrossout) ); } if( m_nFlag & XFFONT_FLAG_UNDERLINE || m_nFlag & XFFONT_FLAG_CROSSOUT ) { if( m_bWordByWord ) - pAttrList->AddAttribute(A2OUSTR("fo:score-spaces"), A2OUSTR("false") ); + pAttrList->AddAttribute("fo:score-spaces", "false" ); else - pAttrList->AddAttribute(A2OUSTR("fo:score-spaces"), A2OUSTR("true") ); + pAttrList->AddAttribute("fo:score-spaces", "true" ); } if( (m_nFlag & XFFONT_FLAG_RELIEF) && m_eRelief ) { - pAttrList->AddAttribute(A2OUSTR("style:font-relief"), GetReliefName(m_eRelief) ); + pAttrList->AddAttribute("style:font-relief", GetReliefName(m_eRelief) ); } if( (m_nFlag & XFFONT_FLAG_TRANSFORM) && m_eTransform ) { //enumTransformSmallCap is different: if( m_eTransform == enumXFTransformSmallCaps ) - pAttrList->AddAttribute(A2OUSTR("fo:font-variant"), GetTransformName(m_eTransform) ); + pAttrList->AddAttribute("fo:font-variant", GetTransformName(m_eTransform) ); else - pAttrList->AddAttribute(A2OUSTR("fo:text-transform"), GetTransformName(m_eTransform) ); + pAttrList->AddAttribute("fo:text-transform", GetTransformName(m_eTransform) ); } if( (m_nFlag & XFFONT_FLAG_EMPHASIZE) && m_eEmphasize ) { OUString empha = GetEmphasizeName(m_eEmphasize); - empha += A2OUSTR(" "); + empha += " "; if( m_bEmphasizeTop ) - empha += A2OUSTR("above"); - pAttrList->AddAttribute(A2OUSTR("style:text-emphasize"), empha ); + empha += "above"; + pAttrList->AddAttribute("style:text-emphasize", empha ); } if( (m_nFlag & XFFONT_FLAG_OUTLINE) && m_bOutline ) { - pAttrList->AddAttribute(A2OUSTR("style:text-outline"), A2OUSTR("true") ); + pAttrList->AddAttribute("style:text-outline", "true" ); } if( (m_nFlag & XFFONT_FLAG_SHADOW) && m_bShadow ) { - pAttrList->AddAttribute(A2OUSTR("fo:text-shadow"), A2OUSTR("1pt 1pt") ); + pAttrList->AddAttribute("fo:text-shadow", "1pt 1pt" ); } if( (m_nFlag & XFFONT_FLAG_BLINK) && m_bBlink ) { - pAttrList->AddAttribute(A2OUSTR("style:text-blinking"), A2OUSTR("true") ); + pAttrList->AddAttribute("style:text-blinking", "true" ); } //position & sacle: @@ -375,34 +375,34 @@ void XFFont::ToXml(IXFStream *pStrm) ) { OUString tmp; - tmp = Int32ToOUString(m_nPosition) + A2OUSTR("% "); - tmp += Int32ToOUString(m_nScale) + A2OUSTR("%"); - pAttrList->AddAttribute(A2OUSTR("style:text-position"), tmp ); + tmp = OUString::number(m_nPosition) + "% "; + tmp += OUString::number(m_nScale) + "%"; + pAttrList->AddAttribute("style:text-position", tmp ); } //char space: if( (m_nFlag & XFFONT_FLAG_CHARSPACE) && m_fCharSpace != 0 ) { - pAttrList->AddAttribute(A2OUSTR("fo:letter-spacing"), DoubleToOUString(m_fCharSpace)+A2OUSTR("cm") ); + pAttrList->AddAttribute("fo:letter-spacing", DoubleToOUString(m_fCharSpace)+"cm" ); } if( (m_nFlag&XFFONT_FLAG_WIDTHSCALE) && m_nWidthScale != 100 ) { - pAttrList->AddAttribute(A2OUSTR("style:text-scale"), DoubleToOUString(m_nWidthScale)+A2OUSTR("%") ); + pAttrList->AddAttribute("style:text-scale", DoubleToOUString(m_nWidthScale)+"%" ); } //Color: if( (m_nFlag & XFFONT_FLAG_COLOR) ) { - pAttrList->AddAttribute( A2OUSTR("fo:color"), m_aColor.ToString() ); + pAttrList->AddAttribute( "fo:color", m_aColor.ToString() ); } if( (m_nFlag & XFFONT_FLAG_BGCOLOR) ) { if (m_bTransparent) - pAttrList->AddAttribute( A2OUSTR("style:text-background-color"), A2OUSTR("transparent")); + pAttrList->AddAttribute( "style:text-background-color", "transparent"); else - pAttrList->AddAttribute( A2OUSTR("style:text-background-color"), m_aBackColor.ToString() ); + pAttrList->AddAttribute( "style:text-background-color", m_aBackColor.ToString() ); } } diff --git a/lotuswordpro/source/filter/xfilter/xffooter.hxx b/lotuswordpro/source/filter/xfilter/xffooter.hxx index 12bc4dadb06e..be656a42df01 100644 --- a/lotuswordpro/source/filter/xfilter/xffooter.hxx +++ b/lotuswordpro/source/filter/xfilter/xffooter.hxx @@ -76,9 +76,9 @@ public: { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("style:footer") ); + pStrm->StartElement( "style:footer" ); XFContentContainer::ToXml(pStrm); - pStrm->EndElement( A2OUSTR("style:footer") ); + pStrm->EndElement( "style:footer" ); } }; diff --git a/lotuswordpro/source/filter/xfilter/xffootnote.hxx b/lotuswordpro/source/filter/xfilter/xffootnote.hxx index 0435244c0985..c7eb93e600e3 100644 --- a/lotuswordpro/source/filter/xfilter/xffootnote.hxx +++ b/lotuswordpro/source/filter/xfilter/xffootnote.hxx @@ -103,23 +103,23 @@ inline void XFFootNote::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:id"), m_strID ); - pStrm->StartElement( A2OUSTR("text:footnote") ); + pAttrList->AddAttribute( "text:id", m_strID ); + pStrm->StartElement( "text:footnote" ); pAttrList->Clear(); if( !m_strLabel.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:label"), m_strLabel ); - pStrm->StartElement( A2OUSTR("text:footnote-citation") ); + pAttrList->AddAttribute( "text:label", m_strLabel ); + pStrm->StartElement( "text:footnote-citation" ); if( !m_strLabel.isEmpty() ) pStrm->Characters(m_strLabel); - pStrm->EndElement( A2OUSTR("text:footnote-citation") ); + pStrm->EndElement( "text:footnote-citation" ); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:footnote-body") ); + pStrm->StartElement( "text:footnote-body" ); XFContentContainer::ToXml(pStrm); - pStrm->EndElement( A2OUSTR("text:footnote-body") ); + pStrm->EndElement( "text:footnote-body" ); - pStrm->EndElement( A2OUSTR("text:footnote") ); + pStrm->EndElement( "text:footnote" ); } #endif diff --git a/lotuswordpro/source/filter/xfilter/xffootnoteconfig.hxx b/lotuswordpro/source/filter/xfilter/xffootnoteconfig.hxx index a9c3445b2ccb..8585c5eb0e1f 100644 --- a/lotuswordpro/source/filter/xfilter/xffootnoteconfig.hxx +++ b/lotuswordpro/source/filter/xfilter/xffootnoteconfig.hxx @@ -116,12 +116,12 @@ inline XFFootnoteConfig::XFFootnoteConfig() { m_nStartValue = 0; m_nRestartType = -1; - m_strNumFmt = A2OUSTR("1"); + m_strNumFmt = "1"; m_bInsertInPage = sal_True; - m_strDefaultStyle = A2OUSTR("Footnote"); - m_strMasterPage = A2OUSTR("Footnote"); - m_strCitationStyle = A2OUSTR("Footnote Symbol"); - m_strBodyStyle = A2OUSTR("Footnote anchor"); + m_strDefaultStyle = "Footnote"; + m_strMasterPage = "Footnote"; + m_strCitationStyle = "Footnote Symbol"; + m_strBodyStyle = "Footnote anchor"; m_bIsFootnote = sal_True; } @@ -198,66 +198,66 @@ inline void XFFootnoteConfig::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !m_strCitationStyle.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:citation-style-name"), m_strCitationStyle); + pAttrList->AddAttribute( "text:citation-style-name", m_strCitationStyle); if( !m_strBodyStyle.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:citation-body-style-name"), m_strBodyStyle); + pAttrList->AddAttribute( "text:citation-body-style-name", m_strBodyStyle); if( !m_strNumPrefix.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("style:num-prefix"), m_strNumPrefix); + pAttrList->AddAttribute( "style:num-prefix", m_strNumPrefix); if( !m_strNumSuffix.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("style:num-suffix"), m_strNumSuffix); + pAttrList->AddAttribute( "style:num-suffix", m_strNumSuffix); if( !m_strNumFmt.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("style:num-format"), m_strNumFmt); + pAttrList->AddAttribute( "style:num-format", m_strNumFmt); if( !m_strDefaultStyle.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:default-style-name"), m_strDefaultStyle); + pAttrList->AddAttribute( "text:default-style-name", m_strDefaultStyle); if( !m_strMasterPage.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:master-page-name"), m_strMasterPage); + pAttrList->AddAttribute( "text:master-page-name", m_strMasterPage); - pAttrList->AddAttribute( A2OUSTR("text:start-value"), Int32ToOUString(m_nStartValue) ); + pAttrList->AddAttribute( "text:start-value", OUString::number(m_nStartValue) ); if( m_bIsFootnote ) { if( m_nRestartType == -1 ) - pAttrList->AddAttribute( A2OUSTR("text:start-numbering-at"), A2OUSTR("document") ); + pAttrList->AddAttribute( "text:start-numbering-at", "document" ); else if( m_nRestartType == 0 ) - pAttrList->AddAttribute( A2OUSTR("text:start-numbering-at"), A2OUSTR("page") ); + pAttrList->AddAttribute( "text:start-numbering-at", "page" ); else if( m_nRestartType == 1 ) - pAttrList->AddAttribute( A2OUSTR("text:start-numbering-at"), A2OUSTR("chapter") ); + pAttrList->AddAttribute( "text:start-numbering-at", "chapter" ); if( m_bInsertInPage ) - pAttrList->AddAttribute( A2OUSTR("text:footnotes-position"), A2OUSTR("page") ); + pAttrList->AddAttribute( "text:footnotes-position", "page" ); else - pAttrList->AddAttribute( A2OUSTR("text:footnotes-position"), A2OUSTR("document") ); + pAttrList->AddAttribute( "text:footnotes-position", "document" ); } if(m_bIsFootnote) { - pStrm->StartElement( A2OUSTR("text:footnotes-configuration") ); + pStrm->StartElement( "text:footnotes-configuration" ); if( !m_strMessageOn.isEmpty() ) { - pStrm->StartElement( A2OUSTR("text:footnote-continuation-notice-forward") ); + pStrm->StartElement( "text:footnote-continuation-notice-forward" ); pStrm->Characters(m_strMessageOn); - pStrm->EndElement( A2OUSTR("text:footnote-continuation-notice-forward") ); + pStrm->EndElement( "text:footnote-continuation-notice-forward" ); } if( !m_strMessageFrom.isEmpty() ) { - pStrm->StartElement( A2OUSTR("text:footnote-continuation-notice-backward") ); + pStrm->StartElement( "text:footnote-continuation-notice-backward" ); pStrm->Characters(m_strMessageFrom); - pStrm->EndElement( A2OUSTR("text:footnote-continuation-notice-backward") ); + pStrm->EndElement( "text:footnote-continuation-notice-backward" ); } - pStrm->EndElement( A2OUSTR("text:footnotes-configuration") ); + pStrm->EndElement( "text:footnotes-configuration" ); } else { - pStrm->StartElement( A2OUSTR("text:endnotes-configuration") ); - pStrm->EndElement( A2OUSTR("text:endnotes-configuration") ); + pStrm->StartElement( "text:endnotes-configuration" ); + pStrm->EndElement( "text:endnotes-configuration" ); } } diff --git a/lotuswordpro/source/filter/xfilter/xfframe.cxx b/lotuswordpro/source/filter/xfilter/xfframe.cxx index f86794cfa2c9..7568b11baaaa 100644 --- a/lotuswordpro/source/filter/xfilter/xfframe.cxx +++ b/lotuswordpro/source/filter/xfilter/xfframe.cxx @@ -138,56 +138,56 @@ void XFFrame::StartFrame(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("draw:style-name"), GetStyleName() ); + pAttrList->AddAttribute( "draw:style-name", GetStyleName() ); assert(!m_strName.isEmpty()); //name should not be null. if( !m_strName.isEmpty() && m_isTextBox == sal_False) - pAttrList->AddAttribute( A2OUSTR("draw:name"), m_strName ); + pAttrList->AddAttribute( "draw:name", m_strName ); //anchor type: switch( m_eAnchor ) { case enumXFAnchorPara: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("paragraph") ); + pAttrList->AddAttribute( "text:anchor-type", "paragraph" ); break; case enumXFAnchorPage: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("page") ); - pAttrList->AddAttribute( A2OUSTR("text:anchor-page-number"), Int32ToOUString(m_nAnchorPage) ); + pAttrList->AddAttribute( "text:anchor-type", "page" ); + pAttrList->AddAttribute( "text:anchor-page-number", OUString::number(m_nAnchorPage) ); break; case enumXFAnchorChar: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("char") ); + pAttrList->AddAttribute( "text:anchor-type", "char" ); break; case enumXFAnchorAsChar: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("as-char") ); + pAttrList->AddAttribute( "text:anchor-type", "as-char" ); break; case enumXFAnchorFrame: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("frame") ); + pAttrList->AddAttribute( "text:anchor-type", "frame" ); break; default: break; } - pAttrList->AddAttribute( A2OUSTR("svg:x"), DoubleToOUString(m_aRect.GetX()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("svg:y"), DoubleToOUString(m_aRect.GetY()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("svg:width"), DoubleToOUString(m_aRect.GetWidth()) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "svg:x", DoubleToOUString(m_aRect.GetX()) + "cm" ); + pAttrList->AddAttribute( "svg:y", DoubleToOUString(m_aRect.GetY()) + "cm" ); + pAttrList->AddAttribute( "svg:width", DoubleToOUString(m_aRect.GetWidth()) + "cm" ); if( m_nFlag& XFFRAME_FLAG_MINHEIGHT ) { - pAttrList->AddAttribute( A2OUSTR("fo:min-height"), DoubleToOUString(m_fMinHeight) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "fo:min-height", DoubleToOUString(m_fMinHeight) + "cm" ); if( m_nFlag&XFFRAME_FLAG_MAXHEIGHT ) - pAttrList->AddAttribute( A2OUSTR("fo:max-height"), DoubleToOUString(m_fMaxHeight) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "fo:max-height", DoubleToOUString(m_fMaxHeight) + "cm" ); } else - pAttrList->AddAttribute( A2OUSTR("svg:height"), DoubleToOUString(m_aRect.GetHeight()) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "svg:height", DoubleToOUString(m_aRect.GetHeight()) + "cm" ); - pAttrList->AddAttribute( A2OUSTR("draw:z-index"), Int32ToOUString(m_nZIndex) ); + pAttrList->AddAttribute( "draw:z-index", OUString::number(m_nZIndex) ); if( !m_strNextLink.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("draw:chain-next-name"), m_strNextLink ); + pAttrList->AddAttribute( "draw:chain-next-name", m_strNextLink ); - pStrm->StartElement( A2OUSTR("draw:text-box") ); + pStrm->StartElement( "draw:text-box" ); } void XFFrame::EndFrame(IXFStream *pStrm) { - pStrm->EndElement( A2OUSTR("draw:text-box") ); + pStrm->EndElement( "draw:text-box" ); } void XFFrame::AdjustZIndex() diff --git a/lotuswordpro/source/filter/xfilter/xfframestyle.cxx b/lotuswordpro/source/filter/xfilter/xfframestyle.cxx index 6ab28faf5e74..6d6414b5cb6a 100644 --- a/lotuswordpro/source/filter/xfilter/xfframestyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfframestyle.cxx @@ -137,12 +137,12 @@ void XFFrameStyle::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), GetStyleName() ); + pAttrList->AddAttribute( "style:name", GetStyleName() ); if( GetParentStyleName().getLength() > 0 ) - pAttrList->AddAttribute(A2OUSTR("style:parent-style-name"),GetParentStyleName()); - pAttrList->AddAttribute( A2OUSTR("style:family"), A2OUSTR("graphics") ); + pAttrList->AddAttribute("style:parent-style-name",GetParentStyleName()); + pAttrList->AddAttribute( "style:family", "graphics" ); //parent style name ignore now. - pStrm->StartElement( A2OUSTR("style:style") ); + pStrm->StartElement( "style:style" ); m_aMargins.ToXml(pStrm); @@ -150,33 +150,33 @@ void XFFrameStyle::ToXml(IXFStream *pStrm) /*if( m_eWrap == enumXFWrapBackground ) { - pAttrList->AddAttribute( A2OUSTR("style:run-through"), A2OUSTR("background") ); + pAttrList->AddAttribute( "style:run-through", "background" ); } else {*/ if( m_bBackground) - pAttrList->AddAttribute( A2OUSTR("style:run-through"), A2OUSTR("background") ); + pAttrList->AddAttribute( "style:run-through", "background" ); else - pAttrList->AddAttribute( A2OUSTR("style:run-through"), A2OUSTR("foreground") ); + pAttrList->AddAttribute( "style:run-through", "foreground" ); if( m_eWrap == enumXFWrapNone ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("none") ); + pAttrList->AddAttribute( "style:wrap", "none" ); else if( m_eWrap == enumXFWrapLeft ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("left") ); + pAttrList->AddAttribute( "style:wrap", "left" ); else if( m_eWrap == enumXFWrapRight ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("right") ); + pAttrList->AddAttribute( "style:wrap", "right" ); else if( m_eWrap == enumXFWrapParallel ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("parallel") ); + pAttrList->AddAttribute( "style:wrap", "parallel" ); else if( m_eWrap == enumXFWrapRunThrough ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("run-through") ); + pAttrList->AddAttribute( "style:wrap", "run-through" ); else if( m_eWrap == enumXFWrapBest ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("dynamic") ); + pAttrList->AddAttribute( "style:wrap", "dynamic" ); //} //background if( m_aBackColor.IsValid() ) { - pAttrList->AddAttribute( A2OUSTR("fo:background-color"), m_aBackColor.ToString() ); - pAttrList->AddAttribute( A2OUSTR("style:background-transparency"), Int16ToOUString(m_nTransparency) + A2OUSTR("%")); + pAttrList->AddAttribute( "fo:background-color", m_aBackColor.ToString() ); + pAttrList->AddAttribute( "style:background-transparency", Int16ToOUString(m_nTransparency) + "%"); } //pad @@ -187,49 +187,49 @@ void XFFrameStyle::ToXml(IXFStream *pStrm) if( m_pBorders ) m_pBorders->ToXml(pStrm); else - pAttrList->AddAttribute( A2OUSTR("fo:border"), A2OUSTR("none") ); + pAttrList->AddAttribute( "fo:border", "none" ); //shadow if( m_pShadow ) m_pShadow->ToXml(pStrm); //print if( m_bPrintable ) - pAttrList->AddAttribute( A2OUSTR("style:print-content"), A2OUSTR("true") ); + pAttrList->AddAttribute( "style:print-content", "true" ); //text directory if( m_eTextDir != enumXFTextDirNone ) - pAttrList->AddAttribute( A2OUSTR("style:writing-mode"), GetTextDirName(m_eTextDir) ); + pAttrList->AddAttribute( "style:writing-mode", GetTextDirName(m_eTextDir) ); //protect: if( m_bProtectContent || m_bProtectSize || m_bProtectPos ) { OUString protect; if( m_bProtectContent ) - protect += A2OUSTR("content"); + protect += "content"; if( m_bProtectSize ) { if( protect.getLength()>0 ) - protect += A2OUSTR(" "); - protect += A2OUSTR("size"); + protect += " "; + protect += "size"; } if( m_bProtectPos ) { if( protect.getLength()>0 ) - protect += A2OUSTR(" "); - protect += A2OUSTR("position"); + protect += " "; + protect += "position"; } - pAttrList->AddAttribute( A2OUSTR("style:protect"), protect ); + pAttrList->AddAttribute( "style:protect", protect ); } //vertical pos and horizon pos: - pAttrList->AddAttribute( A2OUSTR("style:vertical-pos"), GetFrameYPos(m_eYPos) ); - pAttrList->AddAttribute( A2OUSTR("style:vertical-rel"), GetFrameYRel(m_eYRel) ); - pAttrList->AddAttribute( A2OUSTR("style:horizontal-pos"), GetFrameXPos(m_eXPos) ); - pAttrList->AddAttribute( A2OUSTR("style:horizontal-rel"), GetFrameXRel(m_eXRel) ); + pAttrList->AddAttribute( "style:vertical-pos", GetFrameYPos(m_eYPos) ); + pAttrList->AddAttribute( "style:vertical-rel", GetFrameYRel(m_eYRel) ); + pAttrList->AddAttribute( "style:horizontal-pos", GetFrameXPos(m_eXPos) ); + pAttrList->AddAttribute( "style:horizontal-rel", GetFrameXRel(m_eXRel) ); - pStrm->StartElement( A2OUSTR("style:properties") ); + pStrm->StartElement( "style:properties" ); if( m_pColumns ) m_pColumns->ToXml(pStrm); if( m_pBGImage ) m_pBGImage->ToXml(pStrm); - pStrm->EndElement( A2OUSTR("style:properties") ); + pStrm->EndElement( "style:properties" ); - pStrm->EndElement( A2OUSTR("style:style") ); + pStrm->EndElement( "style:style" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfglobal.cxx b/lotuswordpro/source/filter/xfilter/xfglobal.cxx index e634e48985c6..dd0eca8e17ff 100644 --- a/lotuswordpro/source/filter/xfilter/xfglobal.cxx +++ b/lotuswordpro/source/filter/xfilter/xfglobal.cxx @@ -78,38 +78,45 @@ int XFGlobal::s_nImageID = 1; OUString XFGlobal::GenSectionName() { //give it a initial name: - return A2OUSTR("sect") + Int32ToOUString(s_nSectionID++); + OUString sResult = "sect" + OUString::number(s_nSectionID++); + return sResult; } OUString XFGlobal::GenFrameName() { //give it a initial name: - return A2OUSTR("frame") + Int32ToOUString(s_nFrameID++); + OUString sResult = "frame" + OUString::number(s_nFrameID++); + return sResult; } OUString XFGlobal::GenTableName() { - return A2OUSTR("table") + Int32ToOUString(s_nFrameID++); + OUString sResult = "table" + OUString::number(s_nFrameID++); + return sResult; } OUString XFGlobal::GenNoteName() { - return A2OUSTR("ftn") + Int32ToOUString(s_nNoteID++); + OUString sResult = "ftn" + OUString::number(s_nNoteID++); + return sResult; } OUString XFGlobal::GenStrokeDashName() { - return A2OUSTR("stroke dash ") + Int32ToOUString(s_nStrokeDashID++); + OUString sResult = "stroke dash " + OUString::number(s_nStrokeDashID++); + return sResult; } OUString XFGlobal::GenAreaName() { - return A2OUSTR("draw area") + Int32ToOUString(s_nAreaID++); + OUString sResult = "draw area" + OUString::number(s_nAreaID++); + return sResult; } OUString XFGlobal::GenImageName() { - return A2OUSTR("Graphic") + Int32ToOUString(s_nImageID++); + OUString sResult = "Graphic" + OUString::number(s_nImageID++); + return sResult; } void XFGlobal::Reset() diff --git a/lotuswordpro/source/filter/xfilter/xfheader.hxx b/lotuswordpro/source/filter/xfilter/xfheader.hxx index 9825a8811dfd..a73c29d77ba7 100644 --- a/lotuswordpro/source/filter/xfilter/xfheader.hxx +++ b/lotuswordpro/source/filter/xfilter/xfheader.hxx @@ -76,9 +76,9 @@ public: IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("style:header") ); + pStrm->StartElement( "style:header" ); XFContentContainer::ToXml(pStrm); - pStrm->EndElement( A2OUSTR("style:header") ); + pStrm->EndElement( "style:header" ); } private: XFContentContainer m_aContents; diff --git a/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx b/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx index ca1eebca8e2f..61d521f5250b 100644 --- a/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx @@ -137,15 +137,15 @@ void XFHeaderStyle::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( m_bIsFooter ) - pStrm->StartElement( A2OUSTR("style:footer-style") ); + pStrm->StartElement( "style:footer-style" ); else - pStrm->StartElement( A2OUSTR("style:header-style") ); + pStrm->StartElement( "style:header-style" ); //height if( m_fMinHeight>0 ) - pAttrList->AddAttribute( A2OUSTR("fo:min-height"), DoubleToOUString(m_fMinHeight) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "fo:min-height", DoubleToOUString(m_fMinHeight) + "cm" ); else if( m_fHeight>0 ) - pAttrList->AddAttribute( A2OUSTR("svg:height"), DoubleToOUString(m_fHeight) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "svg:height", DoubleToOUString(m_fHeight) + "cm" ); m_aMargin.ToXml(pStrm); if(m_pShadow) @@ -155,25 +155,25 @@ void XFHeaderStyle::ToXml(IXFStream *pStrm) m_pBorders->ToXml(pStrm); if( m_aBackColor.IsValid() ) - pAttrList->AddAttribute( A2OUSTR("fo:background-color"), m_aBackColor.ToString() ); + pAttrList->AddAttribute( "fo:background-color", m_aBackColor.ToString() ); if( m_bDynamicSpace ) - pAttrList->AddAttribute( A2OUSTR("style:dynamic-spacing"), A2OUSTR("true") ); + pAttrList->AddAttribute( "style:dynamic-spacing", "true" ); else - pAttrList->AddAttribute( A2OUSTR("style:dynamic-spacing"), A2OUSTR("false") ); + pAttrList->AddAttribute( "style:dynamic-spacing", "false" ); - pStrm->StartElement( A2OUSTR("style:properties") ); + pStrm->StartElement( "style:properties" ); // background image if( m_pBGImage ) m_pBGImage->ToXml(pStrm); - pStrm->EndElement( A2OUSTR("style:properties") ); + pStrm->EndElement( "style:properties" ); if( m_bIsFooter ) - pStrm->EndElement( A2OUSTR("style:footer-style") ); + pStrm->EndElement( "style:footer-style" ); else - pStrm->EndElement( A2OUSTR("style:header-style") ); + pStrm->EndElement( "style:header-style" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfhyperlink.hxx b/lotuswordpro/source/filter/xfilter/xfhyperlink.hxx index 417af0239bd1..7d8b2d726fbf 100644 --- a/lotuswordpro/source/filter/xfilter/xfhyperlink.hxx +++ b/lotuswordpro/source/filter/xfilter/xfhyperlink.hxx @@ -72,7 +72,7 @@ public: void SetName(OUString name); - void SetTargetFrame(OUString frame=A2OUSTR("_self")); + void SetTargetFrame(OUString frame="_self"); virtual void ToXml(IXFStream *pStrm); @@ -85,7 +85,7 @@ private: inline XFHyperlink::XFHyperlink() { - m_strFrame = A2OUSTR("_self"); + m_strFrame = "_self"; } inline void XFHyperlink::SetHRef(OUString href) @@ -113,25 +113,25 @@ inline void XFHyperlink::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("xlink:type"), A2OUSTR("simple") ); - pAttrList->AddAttribute( A2OUSTR("xlink:href"), m_strHRef ); + pAttrList->AddAttribute( "xlink:type", "simple" ); + pAttrList->AddAttribute( "xlink:href", m_strHRef ); if( !m_strName.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("office:name"), m_strName ); - pAttrList->AddAttribute( A2OUSTR("office:target-frame-name"), m_strFrame ); - pAttrList->AddAttribute( A2OUSTR("xlink:show"), A2OUSTR("replace") ); - pStrm->StartElement( A2OUSTR("text:a") ); + pAttrList->AddAttribute( "office:name", m_strName ); + pAttrList->AddAttribute( "office:target-frame-name", m_strFrame ); + pAttrList->AddAttribute( "xlink:show", "replace" ); + pStrm->StartElement( "text:a" ); pAttrList->Clear(); if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), GetStyleName() ); - pStrm->StartElement( A2OUSTR("text:span") ); + pAttrList->AddAttribute( "text:style-name", GetStyleName() ); + pStrm->StartElement( "text:span" ); if( !m_strText.isEmpty() ) pStrm->Characters(m_strText); else pStrm->Characters(m_strHRef); - pStrm->EndElement( A2OUSTR("text:span") ); + pStrm->EndElement( "text:span" ); - pStrm->EndElement( A2OUSTR("text:a") ); + pStrm->EndElement( "text:a" ); } #endif diff --git a/lotuswordpro/source/filter/xfilter/xfimage.cxx b/lotuswordpro/source/filter/xfilter/xfimage.cxx index 0938bc12702f..306a0094edba 100644 --- a/lotuswordpro/source/filter/xfilter/xfimage.cxx +++ b/lotuswordpro/source/filter/xfilter/xfimage.cxx @@ -91,55 +91,55 @@ void XFImage::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("draw:style-name"), GetStyleName() ); + pAttrList->AddAttribute( "draw:style-name", GetStyleName() ); assert(!m_strName.isEmpty()); //name should not be null. if( !m_strName.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("draw:name"), m_strName ); + pAttrList->AddAttribute( "draw:name", m_strName ); //anchor type: switch( m_eAnchor ) { case enumXFAnchorPara: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("paragraph") ); + pAttrList->AddAttribute( "text:anchor-type", "paragraph" ); break; case enumXFAnchorPage: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("page") ); - pAttrList->AddAttribute( A2OUSTR("text:anchor-page-number"), Int32ToOUString(m_nAnchorPage) ); + pAttrList->AddAttribute( "text:anchor-type", "page" ); + pAttrList->AddAttribute( "text:anchor-page-number", OUString::number(m_nAnchorPage) ); break; case enumXFAnchorChar: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("char") ); + pAttrList->AddAttribute( "text:anchor-type", "char" ); break; case enumXFAnchorAsChar: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("as-char") ); + pAttrList->AddAttribute( "text:anchor-type", "as-char" ); break; case enumXFAnchorFrame: - pAttrList->AddAttribute( A2OUSTR("text:anchor-type"), A2OUSTR("frame") ); + pAttrList->AddAttribute( "text:anchor-type", "frame" ); break; default: break; } - pAttrList->AddAttribute( A2OUSTR("svg:x"), DoubleToOUString(m_aRect.GetX()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("svg:y"), DoubleToOUString(m_aRect.GetY()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("svg:width"), DoubleToOUString(m_aRect.GetWidth()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("svg:height"), DoubleToOUString(m_aRect.GetHeight()) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("draw:z-index"), Int32ToOUString(m_nZIndex) ); + pAttrList->AddAttribute( "svg:x", DoubleToOUString(m_aRect.GetX()) + "cm" ); + pAttrList->AddAttribute( "svg:y", DoubleToOUString(m_aRect.GetY()) + "cm" ); + pAttrList->AddAttribute( "svg:width", DoubleToOUString(m_aRect.GetWidth()) + "cm" ); + pAttrList->AddAttribute( "svg:height", DoubleToOUString(m_aRect.GetHeight()) + "cm" ); + pAttrList->AddAttribute( "draw:z-index", OUString::number(m_nZIndex) ); if( m_bUseLink ) { - pAttrList->AddAttribute( A2OUSTR("xlink:href"), m_strImageFile ); - pAttrList->AddAttribute( A2OUSTR("xlink:type"), A2OUSTR("simple") ); - pAttrList->AddAttribute( A2OUSTR("xlink:show"), A2OUSTR("embed") ); - pAttrList->AddAttribute( A2OUSTR("xlink:actuate"), A2OUSTR("onLoad") ); + pAttrList->AddAttribute( "xlink:href", m_strImageFile ); + pAttrList->AddAttribute( "xlink:type", "simple" ); + pAttrList->AddAttribute( "xlink:show", "embed" ); + pAttrList->AddAttribute( "xlink:actuate", "onLoad" ); } - pStrm->StartElement( A2OUSTR("draw:image") ); + pStrm->StartElement( "draw:image" ); if( !m_bUseLink ) { pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("office:binary-data") ); + pStrm->StartElement( "office:binary-data" ); pStrm->Characters(m_strData); - pStrm->EndElement( A2OUSTR("office:binary-data") ); + pStrm->EndElement( "office:binary-data" ); } - pStrm->EndElement( A2OUSTR("draw:image") ); + pStrm->EndElement( "draw:image" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfimagestyle.cxx b/lotuswordpro/source/filter/xfilter/xfimagestyle.cxx index 1971ebb6cb59..16c5f4ba4ba5 100644 --- a/lotuswordpro/source/filter/xfilter/xfimagestyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfimagestyle.cxx @@ -84,12 +84,12 @@ void XFImageStyle::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), GetStyleName() ); + pAttrList->AddAttribute( "style:name", GetStyleName() ); if( !GetParentStyleName().isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:parent-style-name"),GetParentStyleName()); - pAttrList->AddAttribute( A2OUSTR("style:family"), A2OUSTR("graphics") ); + pAttrList->AddAttribute("style:parent-style-name",GetParentStyleName()); + pAttrList->AddAttribute( "style:family", "graphics" ); //parent style name ignore now. - pStrm->StartElement( A2OUSTR("style:style") ); + pStrm->StartElement( "style:style" ); m_aMargins.ToXml(pStrm); @@ -97,28 +97,28 @@ void XFImageStyle::ToXml(IXFStream *pStrm) if( m_eWrap == enumXFWrapBackground ) { - pAttrList->AddAttribute( A2OUSTR("style:run-through"), A2OUSTR("background") ); + pAttrList->AddAttribute( "style:run-through", "background" ); } else { - pAttrList->AddAttribute( A2OUSTR("style:run-through"), A2OUSTR("foreground") ); + pAttrList->AddAttribute( "style:run-through", "foreground" ); if( m_eWrap == enumXFWrapNone ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("none") ); + pAttrList->AddAttribute( "style:wrap", "none" ); else if( m_eWrap == enumXFWrapLeft ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("left") ); + pAttrList->AddAttribute( "style:wrap", "left" ); else if( m_eWrap == enumXFWrapRight ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("right") ); + pAttrList->AddAttribute( "style:wrap", "right" ); else if( m_eWrap == enumXFWrapParallel ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("parallel") ); + pAttrList->AddAttribute( "style:wrap", "parallel" ); else if( m_eWrap == enumXFWrapRunThrough ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("run-through") ); + pAttrList->AddAttribute( "style:wrap", "run-through" ); else if( m_eWrap == enumXFWrapBest ) - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("dynamic") ); + pAttrList->AddAttribute( "style:wrap", "dynamic" ); } //background if( m_aBackColor.IsValid() ) - pAttrList->AddAttribute( A2OUSTR("fo:background-color"), m_aBackColor.ToString() ); + pAttrList->AddAttribute( "fo:background-color", m_aBackColor.ToString() ); //pad m_aPad.ToXml(pStrm); //margin: @@ -127,31 +127,31 @@ void XFImageStyle::ToXml(IXFStream *pStrm) if( m_bHoriFlip || m_bVertFlip ) { if( m_bHoriFlip && m_bVertFlip ) - pAttrList->AddAttribute( A2OUSTR("style:mirror"), A2OUSTR("horizontal-on-right-pages vertical") ); + pAttrList->AddAttribute( "style:mirror", "horizontal-on-right-pages vertical" ); else if( m_bHoriFlip && !m_bVertFlip ) - pAttrList->AddAttribute( A2OUSTR("style:mirror"), A2OUSTR("horizontal-on-right-pages") ); + pAttrList->AddAttribute( "style:mirror", "horizontal-on-right-pages" ); else if( !m_bHoriFlip && m_bVertFlip ) - pAttrList->AddAttribute( A2OUSTR("style:mirror"), A2OUSTR("vertical") ); + pAttrList->AddAttribute( "style:mirror", "vertical" ); } //color adjust if( m_nAdjustRed ) - pAttrList->AddAttribute( A2OUSTR("draw:red"), Int32ToOUString(m_nAdjustRed) + A2OUSTR("%") ); + pAttrList->AddAttribute( "draw:red", OUString::number(m_nAdjustRed) + "%" ); if( m_nAdjustGreen ) - pAttrList->AddAttribute( A2OUSTR("draw:green"), Int32ToOUString(m_nAdjustGreen) + A2OUSTR("%") ); + pAttrList->AddAttribute( "draw:green", OUString::number(m_nAdjustGreen) + "%" ); if( m_nAdjustBlue ) - pAttrList->AddAttribute( A2OUSTR("draw:blue"), Int32ToOUString(m_nAdjustBlue) + A2OUSTR("%") ); + pAttrList->AddAttribute( "draw:blue", OUString::number(m_nAdjustBlue) + "%" ); if( m_nGamma ) - pAttrList->AddAttribute( A2OUSTR("draw:gamma"), Int32ToOUString(m_nGamma) ); + pAttrList->AddAttribute( "draw:gamma", OUString::number(m_nGamma) ); if( m_nBrightness ) - pAttrList->AddAttribute( A2OUSTR("draw:luminance"), Int32ToOUString(m_nBrightness) + A2OUSTR("%") ); + pAttrList->AddAttribute( "draw:luminance", OUString::number(m_nBrightness) + "%" ); if( m_nContrast ) - pAttrList->AddAttribute( A2OUSTR("draw:contrast"), Int32ToOUString(m_nContrast) + A2OUSTR("%") ); + pAttrList->AddAttribute( "draw:contrast", OUString::number(m_nContrast) + "%" ); if( m_nTransparent ) - pAttrList->AddAttribute( A2OUSTR("draw:transparency"), Int32ToOUString(m_nTransparent) + A2OUSTR("%") ); + pAttrList->AddAttribute( "draw:transparency", OUString::number(m_nTransparent) + "%" ); - pAttrList->AddAttribute(A2OUSTR("draw:color-mode"), GetColorMode(m_eColorMode)); + pAttrList->AddAttribute("draw:color-mode", GetColorMode(m_eColorMode)); //border if( m_pBorders ) m_pBorders->ToXml(pStrm); @@ -160,49 +160,49 @@ void XFImageStyle::ToXml(IXFStream *pStrm) m_pShadow->ToXml(pStrm); if( m_bPrintable ) - pAttrList->AddAttribute( A2OUSTR("style:print-content"), A2OUSTR("true") ); + pAttrList->AddAttribute( "style:print-content", "true" ); //protect: if( m_bProtectContent || m_bProtectSize || m_bProtectPos ) { OUString protect; if( m_bProtectContent ) - protect += A2OUSTR("content"); + protect += "content"; if( m_bProtectSize ) { if( !protect.isEmpty() ) - protect += A2OUSTR(" "); - protect += A2OUSTR("size"); + protect += " "; + protect += "size"; } if( m_bProtectPos ) { if( !protect.isEmpty() ) - protect += A2OUSTR(" "); - protect += A2OUSTR("position"); + protect += " "; + protect += "position"; } - pAttrList->AddAttribute( A2OUSTR("style:protect"), protect ); + pAttrList->AddAttribute( "style:protect", protect ); } //vertical pos and horizon pos: - pAttrList->AddAttribute( A2OUSTR("style:vertical-pos"), GetFrameYPos(m_eYPos) ); - pAttrList->AddAttribute( A2OUSTR("style:vertical-rel"), GetFrameYRel(m_eYRel) ); - pAttrList->AddAttribute( A2OUSTR("style:horizontal-pos"), GetFrameXPos(m_eXPos) ); - pAttrList->AddAttribute( A2OUSTR("style:horizontal-rel"), GetFrameXRel(m_eXRel) ); + pAttrList->AddAttribute( "style:vertical-pos", GetFrameYPos(m_eYPos) ); + pAttrList->AddAttribute( "style:vertical-rel", GetFrameYRel(m_eYRel) ); + pAttrList->AddAttribute( "style:horizontal-pos", GetFrameXPos(m_eXPos) ); + pAttrList->AddAttribute( "style:horizontal-rel", GetFrameXRel(m_eXRel) ); //clip: if( FABS(m_fClipLeft)>FLOAT_MIN || FABS(m_fClipRight)>FLOAT_MIN || FABS(m_fClipTop)>FLOAT_MIN || FABS(m_fClipBottom)>FLOAT_MIN ) { - OUString clip = A2OUSTR("rect("); - clip += DoubleToOUString(m_fClipTop) + A2OUSTR("cm "); - clip += DoubleToOUString(m_fClipRight) + A2OUSTR("cm "); - clip += DoubleToOUString(m_fClipBottom) + A2OUSTR("cm "); - clip += DoubleToOUString(m_fClipLeft) + A2OUSTR("cm"); - clip += A2OUSTR(")"); - pAttrList->AddAttribute(A2OUSTR("fo:clip"),clip); + OUString clip = "rect("; + clip += DoubleToOUString(m_fClipTop) + "cm "; + clip += DoubleToOUString(m_fClipRight) + "cm "; + clip += DoubleToOUString(m_fClipBottom) + "cm "; + clip += DoubleToOUString(m_fClipLeft) + "cm"; + clip += ")"; + pAttrList->AddAttribute("fo:clip",clip); } - pStrm->StartElement( A2OUSTR("style:properties") ); - pStrm->EndElement( A2OUSTR("style:properties") ); + pStrm->StartElement( "style:properties" ); + pStrm->EndElement( "style:properties" ); - pStrm->EndElement( A2OUSTR("style:style") ); + pStrm->EndElement( "style:style" ); } diff --git a/lotuswordpro/source/filter/xfilter/xfindex.cxx b/lotuswordpro/source/filter/xfilter/xfindex.cxx index e707b8e0b5e9..693ab14d242f 100644 --- a/lotuswordpro/source/filter/xfilter/xfindex.cxx +++ b/lotuswordpro/source/filter/xfilter/xfindex.cxx @@ -132,49 +132,49 @@ void XFIndex::ToXml(IXFStream *pStrm) if(m_eType == enumXFIndexTOC ) { - strIndexName = A2OUSTR("text:table-of-content"); - strSourceName = A2OUSTR("text:table-of-content-source"); - strTplName = A2OUSTR("text:table-of-content-entry-template"); + strIndexName = "text:table-of-content"; + strSourceName = "text:table-of-content-source"; + strTplName = "text:table-of-content-entry-template"; } else if( m_eType == enumXFIndexAlphabetical ) { - strIndexName = A2OUSTR("text:alphabetical-index"); - strSourceName = A2OUSTR("text:alphabetical-index-source"); - strTplName = A2OUSTR("text:alphabetical-index-entry-template"); + strIndexName = "text:alphabetical-index"; + strSourceName = "text:alphabetical-index-source"; + strTplName = "text:alphabetical-index-entry-template"; } else if( m_eType == enumXFIndexUserIndex ) { - strIndexName = A2OUSTR("text:user-index"); - strSourceName = A2OUSTR("text:text:user-index-source"); - strTplName = A2OUSTR("text:user-index-entry-template"); + strIndexName = "text:user-index"; + strSourceName = "text:text:user-index-source"; + strTplName = "text:user-index-entry-template"; } else if( m_eType == enumXFIndexObject ) { - strIndexName = A2OUSTR("text:object-index"); - strSourceName = A2OUSTR("text:object-index-source"); - strTplName = A2OUSTR("text:object-index-entry-template"); + strIndexName = "text:object-index"; + strSourceName = "text:object-index-source"; + strTplName = "text:object-index-entry-template"; } else if( m_eType == enumXFIndexIllustration ) { - strIndexName = A2OUSTR("text:illustration-index"); - strSourceName = A2OUSTR("text:illustration-index-source"); - strTplName = A2OUSTR("text:illustration-index-entry-template"); + strIndexName = "text:illustration-index"; + strSourceName = "text:illustration-index-source"; + strTplName = "text:illustration-index-entry-template"; } else if( m_eType == enumXFIndexTableIndex ) { - strIndexName = A2OUSTR("text:table-index"); - strSourceName = A2OUSTR("text:table-index-source"); - strTplName = A2OUSTR("text:table-index-entry-template"); + strIndexName = "text:table-index"; + strSourceName = "text:table-index-source"; + strTplName = "text:table-index-entry-template"; } if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), GetStyleName() ); + pAttrList->AddAttribute( "text:style-name", GetStyleName() ); if( m_bProtect ) - pAttrList->AddAttribute( A2OUSTR("text:protected"), A2OUSTR("true") ); + pAttrList->AddAttribute( "text:protected", "true" ); else - pAttrList->AddAttribute( A2OUSTR("text:protected"), A2OUSTR("false") ); + pAttrList->AddAttribute( "text:protected", "false" ); - pAttrList->AddAttribute( A2OUSTR("text:name"), m_strTitle ); + pAttrList->AddAttribute( "text:name", m_strTitle ); pStrm->StartElement( strIndexName ); //text:table-of-content-source: @@ -182,21 +182,21 @@ void XFIndex::ToXml(IXFStream *pStrm) if(m_eType == enumXFIndexTOC ) { - pAttrList->AddAttribute( A2OUSTR("text:outline-level"), Int32ToOUString(10)); - pAttrList->AddAttribute( A2OUSTR("text:use-index-source-styles"), A2OUSTR("true")); - pAttrList->AddAttribute( A2OUSTR("text:use-index-marks"), A2OUSTR("true")); - pAttrList->AddAttribute( A2OUSTR("text:use-outline-level"), A2OUSTR("false")); + pAttrList->AddAttribute( "text:outline-level", OUString::number(10)); + pAttrList->AddAttribute( "text:use-index-source-styles", "true"); + pAttrList->AddAttribute( "text:use-index-marks", "true"); + pAttrList->AddAttribute( "text:use-outline-level", "false"); } if (m_bSeparator) - pAttrList->AddAttribute( A2OUSTR("text:alphabetical-separators"), A2OUSTR("true") ); + pAttrList->AddAttribute( "text:alphabetical-separators", "true" ); pStrm->StartElement( strSourceName ); //title template: pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:index-title-template") ); + pStrm->StartElement( "text:index-title-template" ); pStrm->Characters( m_strTitle ); - pStrm->EndElement( A2OUSTR("text:index-title-template") ); + pStrm->EndElement( "text:index-title-template" ); //entry templates: std::vector<XFIndexTemplate *>::iterator it; @@ -218,18 +218,18 @@ void XFIndex::ToXml(IXFStream *pStrm) } pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:outline-level"), Int32ToOUString(i)); - pStrm->StartElement( A2OUSTR("text:index-source-styles") ); + pAttrList->AddAttribute( "text:outline-level", OUString::number(i)); + pStrm->StartElement( "text:index-source-styles" ); std::vector<OUString>::iterator it_str; for (it_str = m_aTOCSource[i].begin(); it_str != m_aTOCSource[i].end(); ++it_str) { pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:style-name"), *it_str); - pStrm->StartElement( A2OUSTR("text:index-source-style") ); - pStrm->EndElement( A2OUSTR("text:index-source-style") ); + pAttrList->AddAttribute( "text:style-name", *it_str); + pStrm->StartElement( "text:index-source-style" ); + pStrm->EndElement( "text:index-source-style" ); } - pStrm->EndElement( A2OUSTR("text:index-source-styles") ); + pStrm->EndElement( "text:index-source-styles" ); } } @@ -237,19 +237,19 @@ void XFIndex::ToXml(IXFStream *pStrm) //index-body: pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:index-body") ); + pStrm->StartElement( "text:index-body" ); //index-title: if(!m_strTitle.isEmpty()) { - pAttrList->AddAttribute( A2OUSTR("text:name"), m_strTitle + A2OUSTR("_Head") ); - pStrm->StartElement( A2OUSTR("text:index-title") ); + pAttrList->AddAttribute( "text:name", m_strTitle + "_Head" ); + pStrm->StartElement( "text:index-title" ); if( m_pTitle ) m_pTitle->ToXml(pStrm); - pStrm->EndElement( A2OUSTR("text:index-title") ); + pStrm->EndElement( "text:index-title" ); } XFContentContainer::ToXml(pStrm); - pStrm->EndElement( A2OUSTR("text:index-body") ); + pStrm->EndElement( "text:index-body" ); pStrm->EndElement( strIndexName ); } @@ -259,10 +259,10 @@ void XFIndexTemplate::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:outline-level"), m_nLevel ); - pAttrList->AddAttribute( A2OUSTR("text:style-name"), m_strStyle ); + pAttrList->AddAttribute( "text:outline-level", m_nLevel ); + pAttrList->AddAttribute( "text:style-name", m_strStyle ); if( m_strTagName.isEmpty() ) - m_strTagName = A2OUSTR("text:table-of-content-entry-template"); + m_strTagName = "text:table-of-content-entry-template"; pStrm->StartElement( m_strTagName ); for( size_t i=0; i<m_aEntries.size(); i++ ) @@ -273,77 +273,77 @@ void XFIndexTemplate::ToXml(IXFStream *pStrm) { case enumXFIndexTemplateChapter: if(!m_aEntries[i].second.isEmpty()) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), m_aEntries[i].second ); + pAttrList->AddAttribute( "text:style-name", m_aEntries[i].second ); - pStrm->StartElement( A2OUSTR("text:index-entry-chapter-number") ); - pStrm->EndElement( A2OUSTR("text:index-entry-chapter-number") ); + pStrm->StartElement( "text:index-entry-chapter-number" ); + pStrm->EndElement( "text:index-entry-chapter-number" ); break; case enumXFIndexTemplateText: if(!m_aEntries[i].second.isEmpty()) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), m_aEntries[i].second ); + pAttrList->AddAttribute( "text:style-name", m_aEntries[i].second ); - pStrm->StartElement( A2OUSTR("text:index-entry-text") ); - pStrm->EndElement( A2OUSTR("text:index-entry-text") ); + pStrm->StartElement( "text:index-entry-text" ); + pStrm->EndElement( "text:index-entry-text" ); break; case enumXFIndexTemplateTab: if( m_eTabType != enumXFTabRight ) - pAttrList->AddAttribute( A2OUSTR("style:position"), DoubleToOUString(m_fTabLength) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "style:position", DoubleToOUString(m_fTabLength) + "cm" ); if(!m_aEntries[i].second.isEmpty()) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), m_aEntries[i].second ); + pAttrList->AddAttribute( "text:style-name", m_aEntries[i].second ); switch(m_eTabType) { case enumXFTabLeft: - pAttrList->AddAttribute( A2OUSTR("style:type"), A2OUSTR("left") ); + pAttrList->AddAttribute( "style:type", "left" ); break; case enumXFTabCenter: - pAttrList->AddAttribute( A2OUSTR("style:type"), A2OUSTR("center") ); + pAttrList->AddAttribute( "style:type", "center" ); break; case enumXFTabRight: - pAttrList->AddAttribute( A2OUSTR("style:type"), A2OUSTR("right") ); + pAttrList->AddAttribute( "style:type", "right" ); break; case enumXFTabChar: - pAttrList->AddAttribute( A2OUSTR("style:type"), A2OUSTR("char") ); + pAttrList->AddAttribute( "style:type", "char" ); break; default: break; } //delimiter: if( m_eTabType == enumXFTabChar ) - pAttrList->AddAttribute( A2OUSTR("style:char"), m_strTabDelimiter ); + pAttrList->AddAttribute( "style:char", m_strTabDelimiter ); //leader char: if( !m_strTabLeader.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("style:leader-char"), m_strTabLeader ); + pAttrList->AddAttribute( "style:leader-char", m_strTabLeader ); - pStrm->StartElement( A2OUSTR("text:index-entry-tab-stop") ); - pStrm->EndElement( A2OUSTR("text:index-entry-tab-stop") ); + pStrm->StartElement( "text:index-entry-tab-stop" ); + pStrm->EndElement( "text:index-entry-tab-stop" ); break; case enumXFIndexTemplatePage: if(!m_aEntries[i].second.isEmpty()) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), m_aEntries[i].second ); + pAttrList->AddAttribute( "text:style-name", m_aEntries[i].second ); - pStrm->StartElement( A2OUSTR("text:index-entry-page-number") ); - pStrm->EndElement( A2OUSTR("text:index-entry-page-number") ); + pStrm->StartElement( "text:index-entry-page-number" ); + pStrm->EndElement( "text:index-entry-page-number" ); break; case enumXFIndexTemplateLinkStart: - pStrm->StartElement( A2OUSTR("text:index-entry-link-start") ); - pStrm->EndElement( A2OUSTR("text:index-entry-link-start") ); + pStrm->StartElement( "text:index-entry-link-start" ); + pStrm->EndElement( "text:index-entry-link-start" ); break; case enumXFIndexTemplateLinkEnd: - pStrm->StartElement( A2OUSTR("text:index-entry-link-end") ); - pStrm->EndElement( A2OUSTR("text:index-entry-link-end") ); + pStrm->StartElement( "text:index-entry-link-end" ); + pStrm->EndElement( "text:index-entry-link-end" ); break; case enumXFIndexTemplateSpan: pAttrList->Clear(); - pAttrList->AddAttribute(A2OUSTR("text:style-name"), GetStyleName()); - pStrm->StartElement( A2OUSTR("text:index-entry-span") ); + pAttrList->AddAttribute("text:style-name", GetStyleName()); + pStrm->StartElement( "text:index-entry-span" ); pStrm->Characters(m_aTextEntries[i]); - pStrm->EndElement( A2OUSTR("text:index-entry-span") ); + pStrm->EndElement( "text:index-entry-span" ); break; case enumXFIndexTemplateBibliography: - pStrm->StartElement( A2OUSTR("text:index-entry-bibliography") ); - pStrm->EndElement( A2OUSTR("text:index-entry-bibliography") ); + pStrm->StartElement( "text:index-entry-bibliography" ); + pStrm->EndElement( "text:index-entry-bibliography" ); break; default: break; diff --git a/lotuswordpro/source/filter/xfilter/xfindex.hxx b/lotuswordpro/source/filter/xfilter/xfindex.hxx index 694210ed131b..0ccd917abc61 100644 --- a/lotuswordpro/source/filter/xfilter/xfindex.hxx +++ b/lotuswordpro/source/filter/xfilter/xfindex.hxx @@ -93,17 +93,17 @@ public: /** * @descr Add a entry in the template. */ - void AddEntry(enumXFIndexTemplate entry, OUString styleName = A2OUSTR("")); + void AddEntry(enumXFIndexTemplate entry, OUString styleName = ""); /** * @descr Add a tab entry in the template. */ - void AddTabEntry(enumXFTab type, double len, sal_Unicode leader = '*', sal_Unicode delimiter='.', OUString styleName = A2OUSTR("")); + void AddTabEntry(enumXFTab type, double len, sal_Unicode leader = '*', sal_Unicode delimiter='.', OUString styleName = ""); /** * @descr Add a entry in the template. */ - void AddTextEntry(OUString sSpan, OUString styleName = A2OUSTR("")); + void AddTextEntry(OUString sSpan, OUString styleName = ""); /** * @descr clear all index template parts. @@ -189,7 +189,7 @@ inline XFIndexTemplate::XFIndexTemplate() : m_eTabType(enumXFTabNone) , m_fTabLength(0.0) { - m_nLevel = Int32ToOUString(0); + m_nLevel = OUString::number(0); } inline void XFIndexTemplate::SetLevel(OUString level) diff --git a/lotuswordpro/source/filter/xfilter/xfinputlist.hxx b/lotuswordpro/source/filter/xfilter/xfinputlist.hxx index 565d2c6a0025..a49bbfa46e74 100644 --- a/lotuswordpro/source/filter/xfilter/xfinputlist.hxx +++ b/lotuswordpro/source/filter/xfilter/xfinputlist.hxx @@ -92,21 +92,21 @@ inline void XFInputList::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:name"), m_strName ); - pStrm->StartElement( A2OUSTR("text:drop-down") ); + pAttrList->AddAttribute( "text:name", m_strName ); + pStrm->StartElement( "text:drop-down" ); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:value"), A2OUSTR(" ") ); - pStrm->StartElement( A2OUSTR("text:label") ); - pStrm->EndElement( A2OUSTR("text:label") ); + pAttrList->AddAttribute( "text:value", " " ); + pStrm->StartElement( "text:label" ); + pStrm->EndElement( "text:label" ); for(sal_uInt32 i=0; i< m_list.size();i++) { pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:value"), m_list[i] ); - pStrm->StartElement( A2OUSTR("text:label") ); - pStrm->EndElement( A2OUSTR("text:label") ); + pAttrList->AddAttribute( "text:value", m_list[i] ); + pStrm->StartElement( "text:label" ); + pStrm->EndElement( "text:label" ); } - pStrm->EndElement( A2OUSTR("text:drop-down") ); + pStrm->EndElement( "text:drop-down" ); } #endif diff --git a/lotuswordpro/source/filter/xfilter/xflinebreak.hxx b/lotuswordpro/source/filter/xfilter/xflinebreak.hxx index 940cf5fd4886..72bcf68da32d 100644 --- a/lotuswordpro/source/filter/xfilter/xflinebreak.hxx +++ b/lotuswordpro/source/filter/xfilter/xflinebreak.hxx @@ -74,8 +74,8 @@ inline void XFLineBreak::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:line-break") ); - pStrm->EndElement( A2OUSTR("text:line-break") ); + pStrm->StartElement( "text:line-break" ); + pStrm->EndElement( "text:line-break" ); } #endif diff --git a/lotuswordpro/source/filter/xfilter/xflineheight.hxx b/lotuswordpro/source/filter/xfilter/xflineheight.hxx index 9573fe31443f..94e1ead38f56 100644 --- a/lotuswordpro/source/filter/xfilter/xflineheight.hxx +++ b/lotuswordpro/source/filter/xfilter/xflineheight.hxx @@ -136,16 +136,16 @@ inline void XFLineHeight::ToXml(IXFStream *pStrm) case enumLHNone: return; case enumLHHeight: - pAttrList->AddAttribute( A2OUSTR("fo:line-height"),DoubleToOUString(m_Value.m_fValue) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "fo:line-height",DoubleToOUString(m_Value.m_fValue) + "cm" ); break; case enumLHLeast: - pAttrList->AddAttribute( A2OUSTR("style:line-height-at-least"),DoubleToOUString(m_Value.m_fValue) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "style:line-height-at-least",DoubleToOUString(m_Value.m_fValue) + "cm" ); break; case enumLHPercent: - pAttrList->AddAttribute( A2OUSTR("fo:line-height"), DoubleToOUString(m_Value.m_nValue) + A2OUSTR("%") ); + pAttrList->AddAttribute( "fo:line-height", DoubleToOUString(m_Value.m_nValue) + "%" ); break; case enumLHSpace: - pAttrList->AddAttribute( A2OUSTR("style:line-spacing"), DoubleToOUString(m_Value.m_fValue) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "style:line-spacing", DoubleToOUString(m_Value.m_fValue) + "cm" ); break; } } diff --git a/lotuswordpro/source/filter/xfilter/xflinenumberconfig.hxx b/lotuswordpro/source/filter/xfilter/xflinenumberconfig.hxx index 0b047fa1cf10..71e4d5cbb3d7 100644 --- a/lotuswordpro/source/filter/xfilter/xflinenumberconfig.hxx +++ b/lotuswordpro/source/filter/xfilter/xflinenumberconfig.hxx @@ -76,7 +76,7 @@ public: void SetSeparator(sal_Int32 increment, OUString separator); - void SetNumberFormat(OUString numfmt = A2OUSTR("1")); + void SetNumberFormat(OUString numfmt = "1"); void SetTextStyle(OUString style); @@ -163,45 +163,45 @@ inline void XFLineNumberConfig::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); if( !m_strTextStyle.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), m_strTextStyle ); - pAttrList->AddAttribute( A2OUSTR("text:offset"), DoubleToOUString(m_fOffset) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("style:num-format"), m_strNumFmt ); + pAttrList->AddAttribute( "text:style-name", m_strTextStyle ); + pAttrList->AddAttribute( "text:offset", DoubleToOUString(m_fOffset) + "cm" ); + pAttrList->AddAttribute( "style:num-format", m_strNumFmt ); //position: if( m_ePosition == enumXFLineNumberLeft ) - pAttrList->AddAttribute( A2OUSTR("text:number-position"), A2OUSTR("left") ); + pAttrList->AddAttribute( "text:number-position", "left" ); else if( m_ePosition == enumXFLineNumberRight ) - pAttrList->AddAttribute( A2OUSTR("text:number-position"), A2OUSTR("right") ); + pAttrList->AddAttribute( "text:number-position", "right" ); else if( m_ePosition == enumXFLineNumberInner ) - pAttrList->AddAttribute( A2OUSTR("text:number-position"), A2OUSTR("inner") ); + pAttrList->AddAttribute( "text:number-position", "inner" ); else if( m_ePosition == enumXFLineNumberOuter ) - pAttrList->AddAttribute( A2OUSTR("text:number-position"), A2OUSTR("outer") ); + pAttrList->AddAttribute( "text:number-position", "outer" ); - pAttrList->AddAttribute( A2OUSTR("text:increment"), Int32ToOUString(m_nIncrement) ); + pAttrList->AddAttribute( "text:increment", OUString::number(m_nIncrement) ); if( m_bRestartOnPage ) - pAttrList->AddAttribute( A2OUSTR("text:restart-on-page"), A2OUSTR("true") ); + pAttrList->AddAttribute( "text:restart-on-page", "true" ); else - pAttrList->AddAttribute( A2OUSTR("text:restart-on-page"), A2OUSTR("false") ); + pAttrList->AddAttribute( "text:restart-on-page", "false" ); if( m_bCountEmptyLines ) - pAttrList->AddAttribute( A2OUSTR("text:count-empty-lines"), A2OUSTR("true") ); + pAttrList->AddAttribute( "text:count-empty-lines", "true" ); else - pAttrList->AddAttribute( A2OUSTR("text:count-empty-lines"), A2OUSTR("false") ); + pAttrList->AddAttribute( "text:count-empty-lines", "false" ); if( m_bCountFrameLines ) - pAttrList->AddAttribute( A2OUSTR("text:count-in-floating-frames"), A2OUSTR("true") ); + pAttrList->AddAttribute( "text:count-in-floating-frames", "true" ); else - pAttrList->AddAttribute( A2OUSTR("text:count-in-floating-frames"), A2OUSTR("false") ); + pAttrList->AddAttribute( "text:count-in-floating-frames", "false" ); - pStrm->StartElement( A2OUSTR("text:linenumbering-configuration") ); + pStrm->StartElement( "text:linenumbering-configuration" ); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:increment"), Int32ToOUString(m_nSepIncrement) ); - pStrm->StartElement( A2OUSTR("text:linenumbering-separator") ); + pAttrList->AddAttribute( "text:increment", OUString::number(m_nSepIncrement) ); + pStrm->StartElement( "text:linenumbering-separator" ); pStrm->Characters(m_strSeparator); - pStrm->EndElement( A2OUSTR("text:linenumbering-separator") ); + pStrm->EndElement( "text:linenumbering-separator" ); - pStrm->EndElement( A2OUSTR("text:linenumbering-configuration") ); + pStrm->EndElement( "text:linenumbering-configuration" ); } #endif diff --git a/lotuswordpro/source/filter/xfilter/xflist.cxx b/lotuswordpro/source/filter/xfilter/xflist.cxx index e07799041af7..d72f8f168286 100644 --- a/lotuswordpro/source/filter/xfilter/xflist.cxx +++ b/lotuswordpro/source/filter/xfilter/xflist.cxx @@ -80,14 +80,14 @@ void XFList::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), GetStyleName() ); + pAttrList->AddAttribute( "text:style-name", GetStyleName() ); if( m_bContinueNumber ) - pAttrList->AddAttribute( A2OUSTR("text:continue-numbering"), A2OUSTR("true") ); + pAttrList->AddAttribute( "text:continue-numbering", "true" ); if( m_bOrdered ) - pStrm->StartElement( A2OUSTR("text:ordered-list") ); + pStrm->StartElement( "text:ordered-list" ); else - pStrm->StartElement( A2OUSTR("text:unordered-list") ); + pStrm->StartElement( "text:unordered-list" ); if( m_pHeader ) { @@ -96,9 +96,9 @@ void XFList::ToXml(IXFStream *pStrm) XFContentContainer::ToXml(pStrm); if( m_bOrdered ) - pStrm->EndElement( A2OUSTR("text:ordered-list") ); + pStrm->EndElement( "text:ordered-list" ); else - pStrm->EndElement( A2OUSTR("text:unordered-list") ); + pStrm->EndElement( "text:unordered-list" ); } void XFList::StartList(IXFStream *pStrm, sal_Bool bContinueNumber) @@ -108,22 +108,22 @@ void XFList::StartList(IXFStream *pStrm, sal_Bool bContinueNumber) pAttrList->Clear(); if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), GetStyleName() ); + pAttrList->AddAttribute( "text:style-name", GetStyleName() ); if( bContinueNumber ) - pAttrList->AddAttribute( A2OUSTR("text:continue-numbering"), A2OUSTR("true") ); + pAttrList->AddAttribute( "text:continue-numbering", "true" ); if( m_bOrdered ) - pStrm->StartElement( A2OUSTR("text:ordered-list") ); + pStrm->StartElement( "text:ordered-list" ); else - pStrm->StartElement( A2OUSTR("text:unordered-list") ); + pStrm->StartElement( "text:unordered-list" ); } void XFList::EndList(IXFStream *pStrm) { if( m_bOrdered ) - pStrm->EndElement( A2OUSTR("text:ordered-list") ); + pStrm->EndElement( "text:ordered-list" ); else - pStrm->EndElement( A2OUSTR("text:unordered-list") ); + pStrm->EndElement( "text:unordered-list" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xflistitem.hxx b/lotuswordpro/source/filter/xfilter/xflistitem.hxx index 25aec26403ff..e204c2788a31 100644 --- a/lotuswordpro/source/filter/xfilter/xflistitem.hxx +++ b/lotuswordpro/source/filter/xfilter/xflistitem.hxx @@ -94,19 +94,19 @@ inline void XFListItem::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), GetStyleName() ); + pAttrList->AddAttribute( "text:style-name", GetStyleName() ); if( !m_bIsHeader ) { - pStrm->StartElement( A2OUSTR("text:list-item") ); + pStrm->StartElement( "text:list-item" ); XFContentContainer::ToXml(pStrm); - pStrm->EndElement( A2OUSTR("text:list-item") ); + pStrm->EndElement( "text:list-item" ); } else { - pStrm->StartElement( A2OUSTR("text:list-header") ); + pStrm->StartElement( "text:list-header" ); XFContentContainer::ToXml(pStrm); - pStrm->EndElement( A2OUSTR("text:list-header") ); + pStrm->EndElement( "text:list-header" ); } } diff --git a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx index 2d3ef51d8161..306c75b4ef64 100644 --- a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx @@ -79,34 +79,34 @@ void XFListlevelNumber::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:level"), Int16ToOUString(m_nLevel) ); + pAttrList->AddAttribute( "text:level", Int16ToOUString(m_nLevel) ); //text:style-name,ignore now. m_aNumFmt.ToXml(pStrm); if( m_nDisplayLevel ) - pAttrList->AddAttribute( A2OUSTR("text:display-levels"), Int16ToOUString(m_nDisplayLevel) ); + pAttrList->AddAttribute( "text:display-levels", Int16ToOUString(m_nDisplayLevel) ); - pStrm->StartElement( A2OUSTR("text:list-level-style-number") ); + pStrm->StartElement( "text:list-level-style-number" ); //<style:properties>...</style:properties> pAttrList->Clear(); if( m_fIndent > FLOAT_MIN ) { - pAttrList->AddAttribute( A2OUSTR("text:space-before"), DoubleToOUString(m_fIndent) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "text:space-before", DoubleToOUString(m_fIndent) + "cm" ); } if( m_fMinLabelWidth > FLOAT_MIN ) { - pAttrList->AddAttribute( A2OUSTR("text:min-label-width"), DoubleToOUString(m_fMinLabelWidth) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "text:min-label-width", DoubleToOUString(m_fMinLabelWidth) + "cm" ); } if( m_fMinLabelDistance > FLOAT_MIN ) { - pAttrList->AddAttribute( A2OUSTR("text:min-label-distance"), DoubleToOUString(m_fMinLabelDistance) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "text:min-label-distance", DoubleToOUString(m_fMinLabelDistance) + "cm" ); } - pAttrList->AddAttribute( A2OUSTR("fo:text-align"), GetAlignName(m_eAlign) ); + pAttrList->AddAttribute( "fo:text-align", GetAlignName(m_eAlign) ); - pStrm->StartElement( A2OUSTR("style:properties") ); - pStrm->EndElement( A2OUSTR("style:properties") ); + pStrm->StartElement( "style:properties" ); + pStrm->EndElement( "style:properties" ); - pStrm->EndElement( A2OUSTR("text:list-level-style-number") ); + pStrm->EndElement( "text:list-level-style-number" ); } void XFListLevelBullet::ToXml(IXFStream *pStrm) @@ -114,47 +114,47 @@ void XFListLevelBullet::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:level"), Int16ToOUString(m_nLevel) ); + pAttrList->AddAttribute( "text:level", Int16ToOUString(m_nLevel) ); //text:style-name,ignore now. m_aNumFmt.ToXml(pStrm); //bullet-char OUString bullet(m_chBullet); - pAttrList->AddAttribute( A2OUSTR("text:bullet-char"), bullet ); + pAttrList->AddAttribute( "text:bullet-char", bullet ); - pStrm->StartElement( A2OUSTR("text:list-level-style-bullet") ); + pStrm->StartElement( "text:list-level-style-bullet" ); //<style:properties>...</style:properties> pAttrList->Clear(); if( m_fIndent != 0 ) { - pAttrList->AddAttribute( A2OUSTR("text:space-before"), DoubleToOUString(m_fIndent) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "text:space-before", DoubleToOUString(m_fIndent) + "cm" ); } if( m_fMinLabelWidth != 0 ) { - pAttrList->AddAttribute( A2OUSTR("text:min-label-width"), DoubleToOUString(m_fMinLabelWidth) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "text:min-label-width", DoubleToOUString(m_fMinLabelWidth) + "cm" ); } if( m_fMinLabelDistance != 0 ) { - pAttrList->AddAttribute( A2OUSTR("text:min-label-distance"), DoubleToOUString(m_fMinLabelDistance) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "text:min-label-distance", DoubleToOUString(m_fMinLabelDistance) + "cm" ); } - pAttrList->AddAttribute( A2OUSTR("fo:text-align"), GetAlignName(m_eAlign) ); + pAttrList->AddAttribute( "fo:text-align", GetAlignName(m_eAlign) ); if( !m_strFontName.isEmpty() ) { - pAttrList->AddAttribute( A2OUSTR("style:font-name"), m_strFontName ); + pAttrList->AddAttribute( "style:font-name", m_strFontName ); } - pStrm->StartElement( A2OUSTR("style:properties") ); - pStrm->EndElement( A2OUSTR("style:properties") ); + pStrm->StartElement( "style:properties" ); + pStrm->EndElement( "style:properties" ); - pStrm->EndElement( A2OUSTR("text:list-level-style-bullet") ); + pStrm->EndElement( "text:list-level-style-bullet" ); } XFListStyle::XFListStyle() { XFNumFmt nf; - nf.SetSuffix( A2OUSTR(".") ); - nf.SetFormat( A2OUSTR("1") ); + nf.SetSuffix( "." ); + nf.SetFormat( "1" ); for( int i=0; i<10; i++ ) { @@ -316,10 +316,10 @@ void XFListStyle::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), GetStyleName() ); + pAttrList->AddAttribute( "style:name", GetStyleName() ); if( !GetParentStyleName().isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:parent-style-name"),GetParentStyleName()); - pStrm->StartElement( A2OUSTR("text:list-style") ); + pAttrList->AddAttribute("style:parent-style-name",GetParentStyleName()); + pStrm->StartElement( "text:list-style" ); for( int i=0; i<10; i++ ) { @@ -328,7 +328,7 @@ void XFListStyle::ToXml(IXFStream *pStrm) pLevel->ToXml(pStrm); } - pStrm->EndElement( A2OUSTR("text:list-style") ); + pStrm->EndElement( "text:list-style" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfliststyle.hxx b/lotuswordpro/source/filter/xfilter/xfliststyle.hxx index 221327d79f42..bdca59b1772b 100644 --- a/lotuswordpro/source/filter/xfilter/xfliststyle.hxx +++ b/lotuswordpro/source/filter/xfilter/xfliststyle.hxx @@ -204,9 +204,9 @@ public: void SetListBullet(sal_Int32 level, UChar32 bullet_char, - OUString fontname = A2OUSTR(""), - OUString prefix = A2OUSTR(""), - OUString suffix = A2OUSTR("") + OUString fontname = "", + OUString prefix = "", + OUString suffix = "" ); void SetListNumber( sal_Int32 level, XFNumFmt& numFmt, sal_Int16 nStartValue = 1 ); diff --git a/lotuswordpro/source/filter/xfilter/xfmargins.cxx b/lotuswordpro/source/filter/xfilter/xfmargins.cxx index aeef9f00d05f..2d24be94db82 100644 --- a/lotuswordpro/source/filter/xfilter/xfmargins.cxx +++ b/lotuswordpro/source/filter/xfilter/xfmargins.cxx @@ -80,22 +80,22 @@ void XFMargins::ToXml(IXFStream *pStrm) //margin left: if( m_nFlag&XFMARGINS_FLAG_LEFT ) { - pAttrList->AddAttribute( A2OUSTR("fo:margin-left"), DoubleToOUString(m_fLeft) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "fo:margin-left", DoubleToOUString(m_fLeft) + "cm" ); } //margin right: if( m_nFlag&XFMARGINS_FLAG_RIGHT ) { - pAttrList->AddAttribute(A2OUSTR("fo:margin-right"), DoubleToOUString(m_fRight) + A2OUSTR("cm") ); + pAttrList->AddAttribute("fo:margin-right", DoubleToOUString(m_fRight) + "cm" ); } //margin top: if( m_nFlag&XFMARGINS_FLAG_TOP ) { - pAttrList->AddAttribute(A2OUSTR("fo:margin-top"), DoubleToOUString(m_fTop) + A2OUSTR("cm") ); + pAttrList->AddAttribute("fo:margin-top", DoubleToOUString(m_fTop) + "cm" ); } //margin bottom: if( m_nFlag&XFMARGINS_FLAG_BOTTOM ) { - pAttrList->AddAttribute(A2OUSTR("fo:margin-bottom"), DoubleToOUString(m_fBottom) + A2OUSTR("cm") ); + pAttrList->AddAttribute("fo:margin-bottom", DoubleToOUString(m_fBottom) + "cm" ); } } diff --git a/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx b/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx index 82f0af6b0a0c..785f3136c449 100644 --- a/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx +++ b/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx @@ -106,13 +106,13 @@ void XFMasterPage::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), m_strStyleName ); - pAttrList->AddAttribute( A2OUSTR("style:page-master-name"), m_strPageMaster ); - pStrm->StartElement( A2OUSTR("style:master-page") ); + pAttrList->AddAttribute( "style:name", m_strStyleName ); + pAttrList->AddAttribute( "style:page-master-name", m_strPageMaster ); + pStrm->StartElement( "style:master-page" ); if( m_pHeader ) m_pHeader->ToXml(pStrm); if( m_pFooter ) m_pFooter->ToXml(pStrm); - pStrm->EndElement( A2OUSTR("style:master-page") ); + pStrm->EndElement( "style:master-page" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx b/lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx index 924ab181b0f0..a3ceea05f230 100644 --- a/lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx @@ -151,32 +151,32 @@ void XFNumberStyle::ToXml_StartElement(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), GetStyleName() ); + pAttrList->AddAttribute( "style:name", GetStyleName() ); if( !GetParentStyleName().isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:parent-style-name"),GetParentStyleName()); + pAttrList->AddAttribute("style:parent-style-name",GetParentStyleName()); - pAttrList->AddAttribute( A2OUSTR("style:family"), A2OUSTR("data-style") ); + pAttrList->AddAttribute( "style:family", "data-style" ); if( m_eType == enumXFNumberNumber ) { - pStrm->StartElement( A2OUSTR("number:number-style") ); + pStrm->StartElement( "number:number-style" ); } else if( m_eType == enumXFNumberPercent ) { - pStrm->StartElement( A2OUSTR("number:percentage-style") ); + pStrm->StartElement( "number:percentage-style" ); } else if( m_eType == enuMXFNumberCurrency ) { - pStrm->StartElement( A2OUSTR("number:currency-style") ); + pStrm->StartElement( "number:currency-style" ); } else if( m_eType == enumXFNumberScientific ) { - pStrm->StartElement( A2OUSTR("number:number-style") ); + pStrm->StartElement( "number:number-style" ); } // for Text content number format else if (m_eType == enumXFText) { - pStrm->StartElement( A2OUSTR("number:text-content")); + pStrm->StartElement( "number:text-content"); } // END for Text content number format @@ -187,29 +187,29 @@ void XFNumberStyle::ToXml_EndElement(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), GetStyleName() ); - pAttrList->AddAttribute( A2OUSTR("style:family"), A2OUSTR("data-style") ); + pAttrList->AddAttribute( "style:name", GetStyleName() ); + pAttrList->AddAttribute( "style:family", "data-style" ); if( m_eType == enumXFNumberNumber ) { - pStrm->EndElement( A2OUSTR("number:number-style") ); + pStrm->EndElement( "number:number-style" ); } else if( m_eType == enumXFNumberPercent ) { - pStrm->EndElement( A2OUSTR("number:percentage-style") ); + pStrm->EndElement( "number:percentage-style" ); } else if( m_eType == enuMXFNumberCurrency ) { - pStrm->EndElement( A2OUSTR("number:currency-style") ); + pStrm->EndElement( "number:currency-style" ); } else if( m_eType == enumXFNumberScientific ) { - pStrm->EndElement( A2OUSTR("number:number-style") ); + pStrm->EndElement( "number:number-style" ); } // for Text content number format else if (m_eType == enumXFText) { - pStrm->EndElement( A2OUSTR("number:text-content")); + pStrm->EndElement( "number:text-content"); } // END for Text content number format @@ -229,7 +229,7 @@ void XFNumberStyle::ToXml_Negative(IXFStream *pStrm) pAttrList->Clear(); OUString strStyleName = GetStyleName(); - OUString strGEStyle = strStyleName + A2OUSTR("PO"); + OUString strGEStyle = strStyleName + "PO"; SetStyleName(strGEStyle); ToXml_Normal(pStrm); @@ -240,10 +240,10 @@ void XFNumberStyle::ToXml_Negative(IXFStream *pStrm) ToXml_Content(pStrm,sal_True); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:condition"), A2OUSTR("value()>=0") ); - pAttrList->AddAttribute( A2OUSTR("style:apply-style-name"), strGEStyle ); - pStrm->StartElement( A2OUSTR("style:map") ); - pStrm->EndElement( A2OUSTR("style:map") ); + pAttrList->AddAttribute( "style:condition", "value()>=0" ); + pAttrList->AddAttribute( "style:apply-style-name", strGEStyle ); + pStrm->StartElement( "style:map" ); + pStrm->EndElement( "style:map" ); ToXml_EndElement(pStrm); } @@ -254,20 +254,20 @@ void XFNumberStyle::ToXml_Content(IXFStream *pStrm, sal_Bool nagetive) pAttrList->Clear(); //color: if( !nagetive ) - pAttrList->AddAttribute( A2OUSTR("fo:color"), m_aColor.ToString() ); + pAttrList->AddAttribute( "fo:color", m_aColor.ToString() ); else - pAttrList->AddAttribute( A2OUSTR("fo:color"), m_aNegativeColor.ToString() ); + pAttrList->AddAttribute( "fo:color", m_aNegativeColor.ToString() ); - pStrm->StartElement( A2OUSTR("style:properties") ); - pStrm->EndElement( A2OUSTR("style:properties") ); + pStrm->StartElement( "style:properties" ); + pStrm->EndElement( "style:properties" ); if( !nagetive ) { if( !m_strPrefix.isEmpty() ) { - pStrm->StartElement( A2OUSTR("number:text") ); + pStrm->StartElement( "number:text" ); pStrm->Characters(m_strPrefix); - pStrm->EndElement( A2OUSTR("number:text") ); + pStrm->EndElement( "number:text" ); } } else @@ -276,16 +276,16 @@ void XFNumberStyle::ToXml_Content(IXFStream *pStrm, sal_Bool nagetive) m_strNegativePrefix = m_strPrefix; if( !m_strNegativePrefix.isEmpty() ) { - pStrm->StartElement( A2OUSTR("number:text") ); + pStrm->StartElement( "number:text" ); // pStrm->Characters(m_strNegativePrefix); - pStrm->Characters(m_strNegativePrefix + A2OUSTR("-")); - pStrm->EndElement( A2OUSTR("number:text") ); + pStrm->Characters(m_strNegativePrefix + "-"); + pStrm->EndElement( "number:text" ); } else { - pStrm->StartElement( A2OUSTR("number:text") ); - pStrm->Characters(A2OUSTR("-")); - pStrm->EndElement( A2OUSTR("number:text") ); + pStrm->StartElement( "number:text" ); + pStrm->Characters("-"); + pStrm->EndElement( "number:text" ); } } @@ -293,9 +293,9 @@ void XFNumberStyle::ToXml_Content(IXFStream *pStrm, sal_Bool nagetive) { if( !m_strCurrencySymbol.isEmpty() ) { - pStrm->StartElement( A2OUSTR("number:currency-symbol") ); + pStrm->StartElement( "number:currency-symbol" ); pStrm->Characters(m_strCurrencySymbol); - pStrm->EndElement( A2OUSTR("number:currency-symbol") ); + pStrm->EndElement( "number:currency-symbol" ); } } @@ -303,34 +303,34 @@ void XFNumberStyle::ToXml_Content(IXFStream *pStrm, sal_Bool nagetive) if ( m_eType == enumXFNumberScientific ) { pAttrList->Clear(); - pAttrList->AddAttribute(A2OUSTR("number:decimal-places"), Int32ToOUString(m_nDecimalDigits)); - pAttrList->AddAttribute(A2OUSTR("number:min-integer-digits"), Int32ToOUString(m_nMinInteger)); - pAttrList->AddAttribute(A2OUSTR("number:min-exponent-digits"), Int32ToOUString(m_nMinExponent)); - pStrm->StartElement( A2OUSTR("number:scientific-number") ); - pStrm->EndElement( A2OUSTR("number:scientific-number") ); + pAttrList->AddAttribute("number:decimal-places", OUString::number(m_nDecimalDigits)); + pAttrList->AddAttribute("number:min-integer-digits", OUString::number(m_nMinInteger)); + pAttrList->AddAttribute("number:min-exponent-digits", OUString::number(m_nMinExponent)); + pStrm->StartElement( "number:scientific-number" ); + pStrm->EndElement( "number:scientific-number" ); } else { pAttrList->Clear(); - pAttrList->AddAttribute(A2OUSTR("number:decimal-places"),Int32ToOUString(m_nDecimalDigits)); - pAttrList->AddAttribute(A2OUSTR("number:min-integer-digits"),Int32ToOUString(m_nMinInteger)); + pAttrList->AddAttribute("number:decimal-places", OUString::number(m_nDecimalDigits)); + pAttrList->AddAttribute("number:min-integer-digits", OUString::number(m_nMinInteger)); if( m_bGroup ) - pAttrList->AddAttribute(A2OUSTR("number:grouping"),A2OUSTR("true")); + pAttrList->AddAttribute("number:grouping","true"); else - pAttrList->AddAttribute(A2OUSTR("number:grouping"),A2OUSTR("false")); + pAttrList->AddAttribute("number:grouping","false"); - pStrm->StartElement( A2OUSTR("number:number") ); - pStrm->EndElement( A2OUSTR("number:number") ); + pStrm->StartElement( "number:number" ); + pStrm->EndElement( "number:number" ); } if( m_eType == enuMXFNumberCurrency && m_bCurrencySymbolPost ) { if( !m_strCurrencySymbol.isEmpty() ) { - pStrm->StartElement( A2OUSTR("number:currency-symbol") ); + pStrm->StartElement( "number:currency-symbol" ); pStrm->Characters(m_strCurrencySymbol); - pStrm->EndElement( A2OUSTR("number:currency-symbol") ); + pStrm->EndElement( "number:currency-symbol" ); } } @@ -338,17 +338,17 @@ void XFNumberStyle::ToXml_Content(IXFStream *pStrm, sal_Bool nagetive) { if( !m_strSuffix.isEmpty() ) { - pStrm->StartElement( A2OUSTR("number:text") ); + pStrm->StartElement( "number:text" ); pStrm->Characters(m_strSuffix); - pStrm->EndElement( A2OUSTR("number:text") ); + pStrm->EndElement( "number:text" ); } else { if( m_eType == enumXFNumberPercent ) { - pStrm->StartElement( A2OUSTR("number:text") ); - pStrm->Characters(A2OUSTR("%")); - pStrm->EndElement( A2OUSTR("number:text") ); + pStrm->StartElement( "number:text" ); + pStrm->Characters("%"); + pStrm->EndElement( "number:text" ); } } } @@ -358,17 +358,17 @@ void XFNumberStyle::ToXml_Content(IXFStream *pStrm, sal_Bool nagetive) m_strNegativeSuffix = m_strSuffix; if( !m_strNegativeSuffix.isEmpty() ) { - pStrm->StartElement( A2OUSTR("number:text") ); + pStrm->StartElement( "number:text" ); pStrm->Characters(m_strNegativeSuffix); - pStrm->EndElement( A2OUSTR("number:text") ); + pStrm->EndElement( "number:text" ); } else { if( m_eType == enumXFNumberPercent ) { - pStrm->StartElement( A2OUSTR("number:text") ); - pStrm->Characters(A2OUSTR("%")); - pStrm->EndElement( A2OUSTR("number:text") ); + pStrm->StartElement( "number:text" ); + pStrm->Characters("%"); + pStrm->EndElement( "number:text" ); } } } diff --git a/lotuswordpro/source/filter/xfilter/xfnumberstyle.hxx b/lotuswordpro/source/filter/xfilter/xfnumberstyle.hxx index 1a2953c951b7..749a42257243 100644 --- a/lotuswordpro/source/filter/xfilter/xfnumberstyle.hxx +++ b/lotuswordpro/source/filter/xfilter/xfnumberstyle.hxx @@ -183,9 +183,9 @@ inline void XFNumberStyle::SetCurrencySymbol(sal_Bool post, OUString symbol, sal if( bShowSpace ) { if( post ) - m_strCurrencySymbol = A2OUSTR(" ") + m_strCurrencySymbol; + m_strCurrencySymbol = " " + m_strCurrencySymbol; else - m_strCurrencySymbol += A2OUSTR(" "); + m_strCurrencySymbol += " "; } } diff --git a/lotuswordpro/source/filter/xfilter/xfnumfmt.hxx b/lotuswordpro/source/filter/xfilter/xfnumfmt.hxx index 2fc99df98012..eca89028d5dd 100644 --- a/lotuswordpro/source/filter/xfilter/xfnumfmt.hxx +++ b/lotuswordpro/source/filter/xfilter/xfnumfmt.hxx @@ -132,12 +132,12 @@ public: IXFAttrList *pAttrList = pStrm->GetAttrList(); if( !m_strPrefix.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("style:num-prefix"), m_strPrefix ); + pAttrList->AddAttribute( "style:num-prefix", m_strPrefix ); if( !m_strSuffix.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("style:num-suffix"), m_strSuffix ); - pAttrList->AddAttribute( A2OUSTR("style:num-format"), m_strFormat ); + pAttrList->AddAttribute( "style:num-suffix", m_strSuffix ); + pAttrList->AddAttribute( "style:num-format", m_strFormat ); if( m_nStartValue != 0 ) - pAttrList->AddAttribute( A2OUSTR("text:start-value"), Int16ToOUString(m_nStartValue) ); + pAttrList->AddAttribute( "text:start-value", Int16ToOUString(m_nStartValue) ); } private: OUString m_strPrefix; diff --git a/lotuswordpro/source/filter/xfilter/xfofficemeta.cxx b/lotuswordpro/source/filter/xfilter/xfofficemeta.cxx index 5c72ff198067..54e80963403b 100644 --- a/lotuswordpro/source/filter/xfilter/xfofficemeta.cxx +++ b/lotuswordpro/source/filter/xfilter/xfofficemeta.cxx @@ -90,49 +90,49 @@ void XFOfficeMeta::ToXml(IXFStream *pStream) IXFAttrList *pAttrList = pStream->GetAttrList(); pAttrList->Clear(); - pStream->StartElement( A2OUSTR("office:meta") ); + pStream->StartElement( "office:meta" ); //generator: - pStream->StartElement( A2OUSTR("meta:generator") ); + pStream->StartElement( "meta:generator" ); pStream->Characters( m_strGenerator ); - pStream->EndElement( A2OUSTR("meta:generator") ); + pStream->EndElement( "meta:generator" ); //title - pStream->StartElement( A2OUSTR("dc:title") ); + pStream->StartElement( "dc:title" ); pStream->Characters( m_strTitle ); - pStream->EndElement( A2OUSTR("dc:title") ); + pStream->EndElement( "dc:title" ); //keywords - pStream->StartElement( A2OUSTR("meta:keywords") ); - pStream->StartElement( A2OUSTR("meta:keyword") ); + pStream->StartElement( "meta:keywords" ); + pStream->StartElement( "meta:keyword" ); pStream->Characters( m_strKeywords ); - pStream->EndElement( A2OUSTR("meta:keyword") ); - pStream->EndElement( A2OUSTR("meta:keywords") ); + pStream->EndElement( "meta:keyword" ); + pStream->EndElement( "meta:keywords" ); //creation time - pStream->StartElement( A2OUSTR("meta:creation-date") ); + pStream->StartElement( "meta:creation-date" ); pStream->Characters( m_strCrtime); - pStream->EndElement( A2OUSTR("meta:creation-date") ); + pStream->EndElement( "meta:creation-date" ); //last revision time - pStream->StartElement( A2OUSTR("dc:date") ); + pStream->StartElement( "dc:date" ); pStream->Characters( m_strLstime); - pStream->EndElement( A2OUSTR("dc:date") ); + pStream->EndElement( "dc:date" ); //total edit time - pStream->StartElement( A2OUSTR("meta:editing-duration") ); + pStream->StartElement( "meta:editing-duration" ); pStream->Characters( m_strEdtime); - pStream->EndElement( A2OUSTR("meta:editing-duration") ); + pStream->EndElement( "meta:editing-duration" ); //description - pStream->StartElement( A2OUSTR("dc:description") ); + pStream->StartElement( "dc:description" ); pStream->Characters( m_strDsr ); - pStream->EndElement( A2OUSTR("dc:description") ); + pStream->EndElement( "dc:description" ); //creator - pStream->StartElement( A2OUSTR("meta:initial-creator") ); + pStream->StartElement( "meta:initial-creator" ); pStream->Characters( m_strCreator ); - pStream->EndElement( A2OUSTR("meta:initial-creator") ); + pStream->EndElement( "meta:initial-creator" ); - pStream->EndElement( A2OUSTR("office:meta") ); + pStream->EndElement( "office:meta" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfpadding.hxx b/lotuswordpro/source/filter/xfilter/xfpadding.hxx index 4fa9c1a05b9f..9bbfa7daebfd 100644 --- a/lotuswordpro/source/filter/xfilter/xfpadding.hxx +++ b/lotuswordpro/source/filter/xfilter/xfpadding.hxx @@ -162,28 +162,28 @@ inline void XFPadding::ToXml(IXFStream *pStrm) if( (m_fLeft == m_fRight) && (m_fLeft == m_fTop) && (m_fLeft== m_fBottom ) && m_nFlag == 0x00000015 ) { - pAttrList->AddAttribute( A2OUSTR("fo:padding"), DoubleToOUString(m_fLeft) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "fo:padding", DoubleToOUString(m_fLeft) + "cm" ); return; } //margin left: if( m_nFlag&XFPADDING_FLAG_LEFT ) { - pAttrList->AddAttribute( A2OUSTR("fo:padding-left"), DoubleToOUString(m_fLeft) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "fo:padding-left", DoubleToOUString(m_fLeft) + "cm" ); } //margin right: if( m_nFlag&XFPADDING_FLAG_RIGHT ) { - pAttrList->AddAttribute(A2OUSTR("fo:padding-right"), DoubleToOUString(m_fRight) + A2OUSTR("cm") ); + pAttrList->AddAttribute("fo:padding-right", DoubleToOUString(m_fRight) + "cm" ); } //margin top: if( m_nFlag&XFPADDING_FLAG_TOP ) { - pAttrList->AddAttribute(A2OUSTR("fo:padding-top"), DoubleToOUString(m_fTop) + A2OUSTR("cm") ); + pAttrList->AddAttribute("fo:padding-top", DoubleToOUString(m_fTop) + "cm" ); } //margin bottom: if( m_nFlag&XFPADDING_FLAG_BOTTOM ) { - pAttrList->AddAttribute(A2OUSTR("fo:padding-bottom"), DoubleToOUString(m_fBottom) + A2OUSTR("cm") ); + pAttrList->AddAttribute("fo:padding-bottom", DoubleToOUString(m_fBottom) + "cm" ); } } diff --git a/lotuswordpro/source/filter/xfilter/xfpagecount.hxx b/lotuswordpro/source/filter/xfilter/xfpagecount.hxx index f5f82d953e45..aeb415de638d 100644 --- a/lotuswordpro/source/filter/xfilter/xfpagecount.hxx +++ b/lotuswordpro/source/filter/xfilter/xfpagecount.hxx @@ -79,8 +79,8 @@ inline void XFPageCount::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:page-count") ); - pStrm->EndElement( A2OUSTR("text:page-count") ); + pStrm->StartElement( "text:page-count" ); + pStrm->EndElement( "text:page-count" ); } #endif diff --git a/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx b/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx index 7c05127686f8..e047f5dcad2f 100644 --- a/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx +++ b/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx @@ -210,40 +210,40 @@ void XFPageMaster::ToXml(IXFStream *pStream) IXFAttrList *pAttrList = pStream->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute(A2OUSTR("style:name"),GetStyleName()); + pAttrList->AddAttribute("style:name",GetStyleName()); if( m_eUsage != enumXFPageUsageNone ) - pAttrList->AddAttribute(A2OUSTR("style:page-usage"), GetPageUsageName(m_eUsage)); + pAttrList->AddAttribute("style:page-usage", GetPageUsageName(m_eUsage)); - pStream->StartElement( A2OUSTR("style:page-master") ); + pStream->StartElement( "style:page-master" ); //style:properties pAttrList->Clear(); if( m_fPageWidth != 0 ) - pAttrList->AddAttribute( A2OUSTR("fo:page-width"), DoubleToOUString(m_fPageWidth) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "fo:page-width", DoubleToOUString(m_fPageWidth) + "cm" ); if( m_fPageHeight != 0 ) - pAttrList->AddAttribute( A2OUSTR("fo:page-height"), DoubleToOUString(m_fPageHeight) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "fo:page-height", DoubleToOUString(m_fPageHeight) + "cm" ); m_aMargin.ToXml(pStream); if( m_bPrintOrient ) - pAttrList->AddAttribute( A2OUSTR("style:print-orientation"), A2OUSTR("portrait") ); + pAttrList->AddAttribute( "style:print-orientation", "portrait" ); else - pAttrList->AddAttribute( A2OUSTR("style:print-orientation"), A2OUSTR("landscape") ); + pAttrList->AddAttribute( "style:print-orientation", "landscape" ); if( m_pBorders ) m_pBorders->ToXml(pStream); if( m_pShadow ) - pAttrList->AddAttribute( A2OUSTR("style:shadow"), m_pShadow->ToString() ); + pAttrList->AddAttribute( "style:shadow", m_pShadow->ToString() ); if( m_aBackColor.IsValid() ) - pAttrList->AddAttribute( A2OUSTR("fo:background-color"), m_aBackColor.ToString() ); + pAttrList->AddAttribute( "fo:background-color", m_aBackColor.ToString() ); //text directory if( m_eTextDir != enumXFTextDirNone ) - pAttrList->AddAttribute( A2OUSTR("style:writing-mode"), GetTextDirName(m_eTextDir) ); + pAttrList->AddAttribute( "style:writing-mode", GetTextDirName(m_eTextDir) ); - pStream->StartElement( A2OUSTR("style:properties") ); + pStream->StartElement( "style:properties" ); if( m_pColumns ) m_pColumns->ToXml(pStream); @@ -253,22 +253,22 @@ void XFPageMaster::ToXml(IXFStream *pStream) if( m_eSepAlign || m_nSepLengthPercent>0 || m_fSepSpaceAbove>0 || m_fSepSpaceBelow>0 ) { pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:width"), DoubleToOUString(m_fSepWidth) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("style:distance-before-sep"), DoubleToOUString(m_fSepSpaceAbove) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("style:distance-after-sep"), DoubleToOUString(m_fSepSpaceBelow) + A2OUSTR("cm") ); - pAttrList->AddAttribute( A2OUSTR("style:color"), m_aSepColor.ToString() ); + pAttrList->AddAttribute( "style:width", DoubleToOUString(m_fSepWidth) + "cm" ); + pAttrList->AddAttribute( "style:distance-before-sep", DoubleToOUString(m_fSepSpaceAbove) + "cm" ); + pAttrList->AddAttribute( "style:distance-after-sep", DoubleToOUString(m_fSepSpaceBelow) + "cm" ); + pAttrList->AddAttribute( "style:color", m_aSepColor.ToString() ); if( m_eSepAlign == enumXFAlignStart ) - pAttrList->AddAttribute( A2OUSTR("style:adjustment"), A2OUSTR("left") ); + pAttrList->AddAttribute( "style:adjustment", "left" ); else if( m_eSepAlign == enumXFAlignCenter ) - pAttrList->AddAttribute( A2OUSTR("style:adjustment"), A2OUSTR("center") ); + pAttrList->AddAttribute( "style:adjustment", "center" ); else if( m_eSepAlign == enumXFAlignEnd ) - pAttrList->AddAttribute( A2OUSTR("style:adjustment"), A2OUSTR("right") ); - pAttrList->AddAttribute( A2OUSTR("style:rel-width"), Int32ToOUString(m_nSepLengthPercent) + A2OUSTR("%") ); - pStream->StartElement( A2OUSTR("style:footnote-sep") ); - pStream->EndElement( A2OUSTR("style:footnote-sep") ); + pAttrList->AddAttribute( "style:adjustment", "right" ); + pAttrList->AddAttribute( "style:rel-width", OUString::number(m_nSepLengthPercent) + "%" ); + pStream->StartElement( "style:footnote-sep" ); + pStream->EndElement( "style:footnote-sep" ); } - pStream->EndElement( A2OUSTR("style:properties") ); + pStream->EndElement( "style:properties" ); //header style: if( m_pHeaderStyle ) @@ -277,7 +277,7 @@ void XFPageMaster::ToXml(IXFStream *pStream) if( m_pFooterStyle ) m_pFooterStyle->ToXml(pStream); - pStream->EndElement( A2OUSTR("style:page-master") ); + pStream->EndElement( "style:page-master" ); } diff --git a/lotuswordpro/source/filter/xfilter/xfpagenumber.hxx b/lotuswordpro/source/filter/xfilter/xfpagenumber.hxx index 52a73d3fb6a2..8517f0c15f8a 100644 --- a/lotuswordpro/source/filter/xfilter/xfpagenumber.hxx +++ b/lotuswordpro/source/filter/xfilter/xfpagenumber.hxx @@ -90,9 +90,9 @@ inline void XFPageNumber::ToXml(IXFStream *pStrm) pAttrList->Clear(); m_aNumFmt.ToXml(pStrm); - pAttrList->AddAttribute( A2OUSTR("text:select-page"), A2OUSTR("current") ); - pStrm->StartElement( A2OUSTR("text:page-number") ); - pStrm->EndElement( A2OUSTR("text:page-number") ); + pAttrList->AddAttribute( "text:select-page", "current" ); + pStrm->StartElement( "text:page-number" ); + pStrm->EndElement( "text:page-number" ); } #endif diff --git a/lotuswordpro/source/filter/xfilter/xfparagraph.cxx b/lotuswordpro/source/filter/xfilter/xfparagraph.cxx index 14619d9ae67b..eea2457c42de 100644 --- a/lotuswordpro/source/filter/xfilter/xfparagraph.cxx +++ b/lotuswordpro/source/filter/xfilter/xfparagraph.cxx @@ -92,12 +92,12 @@ void XFParagraph::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), GetStyleName() ); - pStrm->StartElement( A2OUSTR("text:p") ); + pAttrList->AddAttribute( "text:style-name", GetStyleName() ); + pStrm->StartElement( "text:p" ); XFContentContainer::ToXml(pStrm); - pStrm->EndElement( A2OUSTR("text:p") ); + pStrm->EndElement( "text:p" ); } sal_Bool XFParagraph::HasContents() diff --git a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx index 4a2627c3cf97..b49ee1a72b94 100644 --- a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx @@ -407,14 +407,14 @@ void XFParaStyle::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !style.isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:name"),GetStyleName()); - pAttrList->AddAttribute(A2OUSTR("style:family"), A2OUSTR("paragraph")); + pAttrList->AddAttribute("style:name",GetStyleName()); + pAttrList->AddAttribute("style:family", "paragraph"); if( !GetParentStyleName().isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:parent-style-name"),GetParentStyleName()); + pAttrList->AddAttribute("style:parent-style-name",GetParentStyleName()); if( !m_strMasterPage.isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:master-page-name"),m_strMasterPage); - pStrm->StartElement(A2OUSTR("style:style")); + pAttrList->AddAttribute("style:master-page-name",m_strMasterPage); + pStrm->StartElement("style:style"); //Paragraph properties: pAttrList->Clear(); @@ -422,7 +422,7 @@ void XFParaStyle::ToXml(IXFStream *pStrm) //text indent: if( m_fTextIndent ) { - pAttrList->AddAttribute(A2OUSTR("fo:text-indent"), DoubleToOUString(m_fTextIndent) + A2OUSTR("cm") ); + pAttrList->AddAttribute("fo:text-indent", DoubleToOUString(m_fTextIndent) + "cm" ); } //padding: m_aPadding.ToXml(pStrm); @@ -432,26 +432,26 @@ void XFParaStyle::ToXml(IXFStream *pStrm) //text align: if( m_eAlignType != enumXFAlignNone ) { - pAttrList->AddAttribute(A2OUSTR("fo:text-align"), GetAlignName(m_eAlignType) ); + pAttrList->AddAttribute("fo:text-align", GetAlignName(m_eAlignType) ); } //last line align: if( m_eLastLineAlign != enumXFAlignNone ) { - pAttrList->AddAttribute(A2OUSTR("fo:fo:text-align-last"), GetAlignName(m_eLastLineAlign) ); + pAttrList->AddAttribute("fo:fo:text-align-last", GetAlignName(m_eLastLineAlign) ); if( m_bJustSingleWord ) - pAttrList->AddAttribute(A2OUSTR("style:justify-single-word"), A2OUSTR("true") ); + pAttrList->AddAttribute("style:justify-single-word", "true" ); } //line number: if( m_bNumberLines ) { - pAttrList->AddAttribute( A2OUSTR("text:number-lines"), A2OUSTR("true") ); - pAttrList->AddAttribute( A2OUSTR("text:line-number"), Int32ToOUString(m_nLineNumberRestart) ); + pAttrList->AddAttribute( "text:number-lines", "true" ); + pAttrList->AddAttribute( "text:line-number", OUString::number(m_nLineNumberRestart) ); } else { - pAttrList->AddAttribute( A2OUSTR("text:number-lines"), A2OUSTR("false") ); + pAttrList->AddAttribute( "text:number-lines", "false" ); assert(m_nLineNumberRestart>0); - pAttrList->AddAttribute( A2OUSTR("text:line-number"), A2OUSTR("0") ); + pAttrList->AddAttribute( "text:line-number", "0" ); } //shadow: @@ -465,7 +465,7 @@ void XFParaStyle::ToXml(IXFStream *pStrm) //background color: if( m_nFlag&XFPARA_FLAG_BACKCOLOR && m_aBackColor.IsValid() ) { - pAttrList->AddAttribute(A2OUSTR("fo:background-color"), m_aBackColor.ToString() ); + pAttrList->AddAttribute("fo:background-color", m_aBackColor.ToString() ); } //Font properties: if( m_pFont ) @@ -473,14 +473,14 @@ void XFParaStyle::ToXml(IXFStream *pStrm) //page number: if( m_nPageNumber ) - pAttrList->AddAttribute(A2OUSTR("fo:page-number"), Int32ToOUString(m_nPageNumber) ); + pAttrList->AddAttribute("fo:page-number", OUString::number(m_nPageNumber) ); //page breaks: m_aBreaks.ToXml(pStrm); if( m_bKeepWithNext ) - pAttrList->AddAttribute(A2OUSTR("fo:fo:keep-with-next"), A2OUSTR("true") ); + pAttrList->AddAttribute("fo:fo:keep-with-next", "true" ); - pStrm->StartElement(A2OUSTR("style:properties")); + pStrm->StartElement("style:properties"); //dropcap: m_aDropcap.ToXml(pStrm); @@ -489,18 +489,18 @@ void XFParaStyle::ToXml(IXFStream *pStrm) if( m_aTabs.GetCount() > 0 ) { pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("style:tab-stops") ); + pStrm->StartElement( "style:tab-stops" ); m_aTabs.ToXml(pStrm); - pStrm->EndElement( A2OUSTR("style:tab-stops") ); + pStrm->EndElement( "style:tab-stops" ); } //background color: if( m_pBGImage ) m_pBGImage->ToXml(pStrm); - pStrm->EndElement(A2OUSTR("style:properties")); + pStrm->EndElement("style:properties"); - pStrm->EndElement(A2OUSTR("style:style")); + pStrm->EndElement("style:style"); } XFDefaultParaStyle::XFDefaultParaStyle() @@ -517,17 +517,17 @@ void XFDefaultParaStyle::ToXml(IXFStream * pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute(A2OUSTR("style:family"), A2OUSTR("paragraph")); - pStrm->StartElement(A2OUSTR("style:default-style")); + pAttrList->AddAttribute("style:family", "paragraph"); + pStrm->StartElement("style:default-style"); //Paragraph properties: pAttrList->Clear(); - pAttrList->AddAttribute(A2OUSTR("style:tab-stop-distance"), DoubleToOUString(m_fTabDistance) + A2OUSTR("cm") ); + pAttrList->AddAttribute("style:tab-stop-distance", DoubleToOUString(m_fTabDistance) + "cm" ); - pStrm->StartElement(A2OUSTR("style:properties")); - pStrm->EndElement(A2OUSTR("style:properties")); - pStrm->EndElement(A2OUSTR("style:default-style")); + pStrm->StartElement("style:properties"); + pStrm->EndElement("style:properties"); + pStrm->EndElement("style:default-style"); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfplaceholder.hxx b/lotuswordpro/source/filter/xfilter/xfplaceholder.hxx index 2df7c371f695..6d4e1dbb0ffb 100644 --- a/lotuswordpro/source/filter/xfilter/xfplaceholder.hxx +++ b/lotuswordpro/source/filter/xfilter/xfplaceholder.hxx @@ -108,10 +108,10 @@ inline void XFHolderStart::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:placeholder-type"),m_strType); + pAttrList->AddAttribute( "text:placeholder-type",m_strType); if (!m_strDesc.isEmpty()) - pAttrList->AddAttribute( A2OUSTR("text:description"), m_strDesc); - pStrm->StartElement( A2OUSTR("text:placeholder") ); + pAttrList->AddAttribute( "text:description", m_strDesc); + pStrm->StartElement( "text:placeholder" ); if( !m_strText.isEmpty()) pStrm->Characters(m_strText); } @@ -134,7 +134,7 @@ XFHolderEnd::~XFHolderEnd() inline void XFHolderEnd::ToXml(IXFStream *pStrm) { - pStrm->EndElement( A2OUSTR("text:placeholder") ); + pStrm->EndElement( "text:placeholder" ); } #endif diff --git a/lotuswordpro/source/filter/xfilter/xfrow.cxx b/lotuswordpro/source/filter/xfilter/xfrow.cxx index 030fbe527a6d..3d77167dd0b8 100644 --- a/lotuswordpro/source/filter/xfilter/xfrow.cxx +++ b/lotuswordpro/source/filter/xfilter/xfrow.cxx @@ -147,10 +147,10 @@ void XFRow::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("table:style-name"), GetStyleName() ); + pAttrList->AddAttribute( "table:style-name", GetStyleName() ); if( m_nRepeat ) - pAttrList->AddAttribute( A2OUSTR("table:number-rows-repeated"), Int32ToOUString(m_nRepeat) ); - pStrm->StartElement( A2OUSTR("table:table-row") ); + pAttrList->AddAttribute( "table:number-rows-repeated", OUString::number(m_nRepeat) ); + pStrm->StartElement( "table:table-row" ); std::map<sal_Int32,XFCell*>::iterator it = m_aCells.begin(); for( ; it!=m_aCells.end(); ++it ) @@ -170,6 +170,6 @@ void XFRow::ToXml(IXFStream *pStrm) lastCol = col; } - pStrm->EndElement( A2OUSTR("table:table-row") ); + pStrm->EndElement( "table:table-row" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfrowstyle.cxx b/lotuswordpro/source/filter/xfilter/xfrowstyle.cxx index 9692d47f3410..2732e48f91af 100644 --- a/lotuswordpro/source/filter/xfilter/xfrowstyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfrowstyle.cxx @@ -77,27 +77,27 @@ void XFRowStyle::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), GetStyleName() ); + pAttrList->AddAttribute( "style:name", GetStyleName() ); if( !GetParentStyleName().isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:parent-style-name"),GetParentStyleName()); + pAttrList->AddAttribute("style:parent-style-name",GetParentStyleName()); - pAttrList->AddAttribute( A2OUSTR("style:family"), A2OUSTR("table-row") ); - pStrm->StartElement( A2OUSTR("style:style") ); + pAttrList->AddAttribute( "style:family", "table-row" ); + pStrm->StartElement( "style:style" ); pAttrList->Clear(); if( m_fMinHeight ) - pAttrList->AddAttribute( A2OUSTR("style:min-row-height"), DoubleToOUString(m_fMinHeight) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "style:min-row-height", DoubleToOUString(m_fMinHeight) + "cm" ); else if( m_fHeight ) - pAttrList->AddAttribute( A2OUSTR("style:row-height"), DoubleToOUString(m_fHeight) + A2OUSTR("cm") ); + pAttrList->AddAttribute( "style:row-height", DoubleToOUString(m_fHeight) + "cm" ); if( m_aBackColor.IsValid() && !m_pBGImage ) - pAttrList->AddAttribute( A2OUSTR("fo:background-color"), m_aBackColor.ToString() ); - pStrm->StartElement( A2OUSTR("style:properties") ); + pAttrList->AddAttribute( "fo:background-color", m_aBackColor.ToString() ); + pStrm->StartElement( "style:properties" ); if( m_pBGImage ) m_pBGImage->ToXml(pStrm); - pStrm->EndElement( A2OUSTR("style:properties") ); + pStrm->EndElement( "style:properties" ); - pStrm->EndElement( A2OUSTR("style:style") ); + pStrm->EndElement( "style:style" ); } XFRowStyle& XFRowStyle::operator=(XFRowStyle const &other) diff --git a/lotuswordpro/source/filter/xfilter/xfruby.hxx b/lotuswordpro/source/filter/xfilter/xfruby.hxx index ecae0cf8245e..5521ba4de56e 100644 --- a/lotuswordpro/source/filter/xfilter/xfruby.hxx +++ b/lotuswordpro/source/filter/xfilter/xfruby.hxx @@ -82,10 +82,10 @@ void XFRubyStart::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); if( !GetStyleName().isEmpty()) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), GetStyleName()); - pStrm->StartElement( A2OUSTR("text:ruby") ); + pAttrList->AddAttribute( "text:style-name", GetStyleName()); + pStrm->StartElement( "text:ruby" ); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:ruby-base") ); + pStrm->StartElement( "text:ruby-base" ); } void XFRubyEnd::SetText(OUString sText) @@ -95,16 +95,16 @@ void XFRubyEnd::SetText(OUString sText) void XFRubyEnd::ToXml(IXFStream *pStrm) { - pStrm->EndElement( A2OUSTR("text:ruby-base") ); + pStrm->EndElement( "text:ruby-base" ); IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); if( !GetStyleName().isEmpty()) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), GetStyleName()); - pStrm->StartElement( A2OUSTR("text:ruby-text") ); + pAttrList->AddAttribute( "text:style-name", GetStyleName()); + pStrm->StartElement( "text:ruby-text" ); if( !m_strText.isEmpty() ) pStrm->Characters(m_strText); - pStrm->EndElement( A2OUSTR("text:ruby-text") ); - pStrm->EndElement( A2OUSTR("text:ruby") ); + pStrm->EndElement( "text:ruby-text" ); + pStrm->EndElement( "text:ruby" ); } #endif diff --git a/lotuswordpro/source/filter/xfilter/xfrubystyle.hxx b/lotuswordpro/source/filter/xfilter/xfrubystyle.hxx index 5302ed3f50ac..a673cfc9354b 100644 --- a/lotuswordpro/source/filter/xfilter/xfrubystyle.hxx +++ b/lotuswordpro/source/filter/xfilter/xfrubystyle.hxx @@ -102,43 +102,43 @@ void XFRubyStyle::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !style.isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:name"),GetStyleName()); - pAttrList->AddAttribute(A2OUSTR("style:family"), A2OUSTR("ruby")); - pStrm->StartElement(A2OUSTR("style:style")); + pAttrList->AddAttribute("style:name", GetStyleName()); + pAttrList->AddAttribute("style:family", "ruby"); + pStrm->StartElement("style:style"); pAttrList->Clear(); OUString sPos; if (m_eAlign == enumXFRubyLeft) { - sPos = A2OUSTR("left"); + sPos ="left"; } else if(m_eAlign == enumXFRubyRight) { - sPos = A2OUSTR("right"); + sPos = "right"; } else if(m_eAlign == enumXFRubyCenter) { - sPos = A2OUSTR("center"); + sPos = "center"; } if (!sPos.isEmpty()) - pAttrList->AddAttribute(A2OUSTR("style:ruby-align"),sPos); + pAttrList->AddAttribute("style:ruby-align", sPos); OUString sAlign; if (m_ePos == enumXFRubyTop) { - sAlign = A2OUSTR("above"); + sAlign = "above"; } else if(m_ePos == enumXFRubyBottom) { - sAlign = A2OUSTR("below"); + sAlign = "below"; } if (!sAlign.isEmpty()) - pAttrList->AddAttribute(A2OUSTR("style:ruby-position"),sAlign); + pAttrList->AddAttribute("style:ruby-position", sAlign); - pStrm->StartElement(A2OUSTR("style:properties")); - pStrm->EndElement(A2OUSTR("style:properties")); - pStrm->EndElement(A2OUSTR("style:style")); + pStrm->StartElement("style:properties"); + pStrm->EndElement("style:properties"); + pStrm->EndElement("style:style"); } #endif diff --git a/lotuswordpro/source/filter/xfilter/xfsection.cxx b/lotuswordpro/source/filter/xfilter/xfsection.cxx index f7e9918ecd8a..a76435998cf8 100644 --- a/lotuswordpro/source/filter/xfilter/xfsection.cxx +++ b/lotuswordpro/source/filter/xfilter/xfsection.cxx @@ -79,28 +79,28 @@ void XFSection::ToXml(IXFStream *pStrm) pAttrList->Clear(); OUString style = GetStyleName(); if( !style.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), style); + pAttrList->AddAttribute( OUString("text:style-name"), style); //section name if( !m_strSectionName.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:name"), m_strSectionName); + pAttrList->AddAttribute( OUString("text:name"), m_strSectionName); if( m_bProtected ) - pAttrList->AddAttribute( A2OUSTR("text:protected"), A2OUSTR("true") ); + pAttrList->AddAttribute( OUString("text:protected"), OUString("true") ); if( m_bHiden ) - pAttrList->AddAttribute( A2OUSTR("text:display"), A2OUSTR("none") ); + pAttrList->AddAttribute( OUString("text:display"), OUString("none") ); - pStrm->StartElement( A2OUSTR("text:section") ); + pStrm->StartElement( OUString("text:section") ); if( !m_strSourceLink.isEmpty() ) { pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("xlink:href"), m_strSourceLink); - pAttrList->AddAttribute( A2OUSTR("text:filter-name"), A2OUSTR("wordpro")); - pStrm->StartElement( A2OUSTR("text:section-source") ); - pStrm->EndElement( A2OUSTR("text:section-source") ); + pAttrList->AddAttribute( OUString("xlink:href"), m_strSourceLink); + pAttrList->AddAttribute( OUString("text:filter-name"), OUString("wordpro")); + pStrm->StartElement( OUString("text:section-source") ); + pStrm->EndElement( OUString("text:section-source") ); } XFContentContainer::ToXml(pStrm); - pStrm->EndElement( A2OUSTR("text:section") ); + pStrm->EndElement( OUString("text:section") ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx b/lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx index bed7ea2f0288..5207daa3471e 100644 --- a/lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx @@ -103,39 +103,39 @@ void XFSectionStyle::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), GetStyleName() ); - pAttrList->AddAttribute( A2OUSTR("style:family"), A2OUSTR("section") ); + pAttrList->AddAttribute( OUString("style:name"), GetStyleName() ); + pAttrList->AddAttribute( OUString("style:family"), OUString("section") ); - pStrm->StartElement( A2OUSTR("style:style") ); + pStrm->StartElement( OUString("style:style") ); pAttrList->Clear(); if( m_fMarginLeft != 0 ) { - pAttrList->AddAttribute( A2OUSTR("fo:margin-left"), DoubleToOUString(m_fMarginLeft) + A2OUSTR("cm") ); + pAttrList->AddAttribute( OUString("fo:margin-left"), DoubleToOUString(m_fMarginLeft) + OUString("cm") ); } if( m_fMarginRight != 0 ) { - pAttrList->AddAttribute( A2OUSTR("fo:margin-right"), DoubleToOUString(m_fMarginRight) + A2OUSTR("cm") ); + pAttrList->AddAttribute( OUString("fo:margin-right"), DoubleToOUString(m_fMarginRight) + OUString("cm") ); } if( m_aBackColor.IsValid() && !m_pBackImage ) { - pAttrList->AddAttribute( A2OUSTR("fo:background-color"), m_aBackColor.ToString() ); + pAttrList->AddAttribute( OUString("fo:background-color"), m_aBackColor.ToString() ); } else { - pAttrList->AddAttribute( A2OUSTR("fo:background-color"), A2OUSTR("transparent") ); + pAttrList->AddAttribute( OUString("fo:background-color"), OUString("transparent") ); } - pStrm->StartElement( A2OUSTR("style:properties") ); + pStrm->StartElement( OUString("style:properties") ); if( m_pColumns ) m_pColumns->ToXml(pStrm); if( m_pBackImage ) m_pBackImage->ToXml(pStrm); - pStrm->EndElement( A2OUSTR("style:properties") ); + pStrm->EndElement( OUString("style:properties") ); - pStrm->EndElement( A2OUSTR("style:style") ); + pStrm->EndElement( OUString("style:style") ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfshadow.cxx b/lotuswordpro/source/filter/xfilter/xfshadow.cxx index 194e02b28278..4412a61f1945 100644 --- a/lotuswordpro/source/filter/xfilter/xfshadow.cxx +++ b/lotuswordpro/source/filter/xfilter/xfshadow.cxx @@ -78,16 +78,16 @@ OUString XFShadow::ToString() switch(m_ePosition) { case enumXFShadowRightBottom: - buf += A2OUSTR(" ") + strOff + A2OUSTR("cm") + A2OUSTR(" ") + strOff + A2OUSTR("cm"); + buf += OUString(" ") + strOff + OUString("cm") + OUString(" ") + strOff + OUString("cm"); break; case enumXFShadowRightTop: - buf += A2OUSTR(" ") + strOff + A2OUSTR("cm") + A2OUSTR(" -") + strOff + A2OUSTR("cm"); + buf += OUString(" ") + strOff + OUString("cm") + OUString(" -") + strOff + OUString("cm"); break; case enumXFShadowLeftBottom: - buf += A2OUSTR(" -") + strOff + A2OUSTR("cm") + A2OUSTR(" ") + strOff + A2OUSTR("cm"); + buf += OUString(" -") + strOff + OUString("cm") + OUString(" ") + strOff + OUString("cm"); break; case enumXFShadowLeftTop: - buf += A2OUSTR(" -") + strOff + A2OUSTR("cm") + A2OUSTR(" -") + strOff + A2OUSTR("cm"); + buf += OUString(" -") + strOff + OUString("cm") + OUString(" -") + strOff + OUString("cm"); break; default: break; @@ -102,7 +102,7 @@ void XFShadow::ToXml(IXFStream *pStrm) if( m_ePosition == enumXFShadowNone ) return; else - pAttrList->AddAttribute( A2OUSTR("style:shadow"), ToString() ); + pAttrList->AddAttribute( OUString("style:shadow"), ToString() ); } sal_Bool operator==(XFShadow& s1, XFShadow& s2) diff --git a/lotuswordpro/source/filter/xfilter/xfstylecont.cxx b/lotuswordpro/source/filter/xfilter/xfstylecont.cxx index 7ab73a9d3284..850dba98bf70 100644 --- a/lotuswordpro/source/filter/xfilter/xfstylecont.cxx +++ b/lotuswordpro/source/filter/xfilter/xfstylecont.cxx @@ -128,7 +128,7 @@ IXFStyle* XFStyleContainer::AddStyle(IXFStyle *pStyle) { if( pStyle->GetStyleName().isEmpty() ) { - name = m_strStyleNamePrefix + Int32ToOUString(m_aStyles.size()+1); + name = m_strStyleNamePrefix + OUString::number(m_aStyles.size()+1); pStyle->SetStyleName(name); } else @@ -137,7 +137,7 @@ IXFStyle* XFStyleContainer::AddStyle(IXFStyle *pStyle) //for name conflict if(FindStyle( name)) { - name = name + Int32ToOUString(m_aStyles.size()+1); + name = name + OUString::number(m_aStyles.size()+1); pStyle->SetStyleName(name); } } diff --git a/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx b/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx index 7e04eb482769..ba3d5f23f5ff 100644 --- a/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx +++ b/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx @@ -60,11 +60,11 @@ #include "xfstylemanager.hxx" #include "ixfstyle.hxx" -XFStyleManager::XFStyleManager() : s_aStdArrowStyles( A2OUSTR("arrow") ), s_aTextStyles( A2OUSTR("T") ), - s_aParaStyles( A2OUSTR("P") ),s_aListStyles( A2OUSTR("L") ),s_aSectionStyles( A2OUSTR("Sect") ), - s_aPageMasters( A2OUSTR("PM") ),s_aMasterpages( A2OUSTR("MP") ),s_aDateStyles( A2OUSTR("N") ), - s_aGraphicsStyles( A2OUSTR("fr") ),s_aTableStyles( A2OUSTR("table") ),s_aTableCellStyles( A2OUSTR("cell") ), - s_aTableRowStyles( A2OUSTR("row") ),s_aTableColStyles( A2OUSTR("col") ),s_pOutlineStyle(NULL) +XFStyleManager::XFStyleManager() : s_aStdArrowStyles( OUString("arrow") ), s_aTextStyles( OUString("T") ), + s_aParaStyles( OUString("P") ),s_aListStyles( OUString("L") ),s_aSectionStyles( OUString("Sect") ), + s_aPageMasters( OUString("PM") ),s_aMasterpages( OUString("MP") ),s_aDateStyles( OUString("N") ), + s_aGraphicsStyles( OUString("fr") ),s_aTableStyles( OUString("table") ),s_aTableCellStyles( OUString("cell") ), + s_aTableRowStyles( OUString("row") ),s_aTableColStyles( OUString("col") ),s_pOutlineStyle(NULL) { } @@ -311,7 +311,7 @@ void XFStyleManager::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("office:font-decls") ); + pStrm->StartElement( OUString("office:font-decls") ); //font declarations: for( itDecl = s_aFontDecls.begin(); itDecl != s_aFontDecls.end(); ++itDecl ) @@ -319,21 +319,21 @@ void XFStyleManager::ToXml(IXFStream *pStrm) XFFontDecl &f = *itDecl; pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), f.GetFontName() ); - pAttrList->AddAttribute( A2OUSTR("fo:font-family"), f.GetFontFamily() ); + pAttrList->AddAttribute( OUString("style:name"), f.GetFontName() ); + pAttrList->AddAttribute( OUString("fo:font-family"), f.GetFontFamily() ); if( f.GetFontPitchFixed() ) - pAttrList->AddAttribute( A2OUSTR("style:font-pitch"), A2OUSTR("fixed") ); + pAttrList->AddAttribute( OUString("style:font-pitch"), OUString("fixed") ); else - pAttrList->AddAttribute( A2OUSTR("style:font-pitch"), A2OUSTR("variable") ); - pStrm->StartElement( A2OUSTR("style:font-decl") ); - pStrm->EndElement( A2OUSTR("style:font-decl") ); + pAttrList->AddAttribute( OUString("style:font-pitch"), OUString("variable") ); + pStrm->StartElement( OUString("style:font-decl") ); + pStrm->EndElement( OUString("style:font-decl") ); } - pStrm->EndElement( A2OUSTR("office:font-decls") ); + pStrm->EndElement( OUString("office:font-decls") ); //office:styles: pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("office:styles") ); + pStrm->StartElement( OUString("office:styles") ); s_aStdParaStyles.ToXml(pStrm); s_aStdTextStyles.ToXml(pStrm); @@ -349,11 +349,11 @@ void XFStyleManager::ToXml(IXFStream *pStrm) if( s_pOutlineStyle ) s_pOutlineStyle->ToXml(pStrm); - pStrm->EndElement( A2OUSTR("office:styles") ); + pStrm->EndElement( OUString("office:styles") ); //automatic styles: pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("office:automatic-styles") ); + pStrm->StartElement( OUString("office:automatic-styles") ); s_aTableStyles.ToXml(pStrm); s_aTableCellStyles.ToXml(pStrm); @@ -367,15 +367,15 @@ void XFStyleManager::ToXml(IXFStream *pStrm) //graphics: s_aGraphicsStyles.ToXml(pStrm); - pStrm->EndElement( A2OUSTR("office:automatic-styles") ); + pStrm->EndElement( OUString("office:automatic-styles") ); //master:styles pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("office:master-styles") ); + pStrm->StartElement( OUString("office:master-styles") ); //masters pages: s_aMasterpages.ToXml(pStrm); - pStrm->EndElement( A2OUSTR("office:master-styles") ); + pStrm->EndElement( OUString("office:master-styles") ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xftable.cxx b/lotuswordpro/source/filter/xfilter/xftable.cxx index 842b0aa34b6b..89e40c68e3b2 100644 --- a/lotuswordpro/source/filter/xfilter/xftable.cxx +++ b/lotuswordpro/source/filter/xfilter/xftable.cxx @@ -206,15 +206,15 @@ void XFTable::ToXml(IXFStream *pStrm) pAttrList->Clear(); //sub table shouldn't use table name. if( !m_bSubTable ) - pAttrList->AddAttribute( A2OUSTR("table:name"), m_strName); + pAttrList->AddAttribute( OUString("table:name"), m_strName); if( !GetStyleName().isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("table:style-name"), GetStyleName() ); + pAttrList->AddAttribute( OUString("table:style-name"), GetStyleName() ); if( m_bSubTable ) - pStrm->StartElement( A2OUSTR("table:sub-table") ); + pStrm->StartElement( OUString("table:sub-table") ); else - pStrm->StartElement( A2OUSTR("table:table") ); + pStrm->StartElement( OUString("table:table") ); //output columns: { @@ -232,29 +232,29 @@ void XFTable::ToXml(IXFStream *pStrm) { if( !m_strDefColStyle.isEmpty() ) { - pAttrList->AddAttribute( A2OUSTR("table:style-name"), m_strDefColStyle ); + pAttrList->AddAttribute( OUString("table:style-name"), m_strDefColStyle ); } - pAttrList->AddAttribute( A2OUSTR("table:number-columns-repeated"), Int32ToOUString(col-lastCol-1) ); + pAttrList->AddAttribute( OUString("table:number-columns-repeated"), OUString::number(col-lastCol-1) ); } - pStrm->StartElement( A2OUSTR("table:table-column") ); - pStrm->EndElement( A2OUSTR("table:table-column") ); + pStrm->StartElement( OUString("table:table-column") ); + pStrm->EndElement( OUString("table:table-column") ); } if( !style.isEmpty() ) { - pAttrList->AddAttribute( A2OUSTR("table:style-name"), style ); + pAttrList->AddAttribute( OUString("table:style-name"), style ); } - pStrm->StartElement( A2OUSTR("table:table-column") ); - pStrm->EndElement( A2OUSTR("table:table-column") ); + pStrm->StartElement( OUString("table:table-column") ); + pStrm->EndElement( OUString("table:table-column") ); lastCol = col; } } if( m_aHeaderRows.GetCount()>0 ) { - pStrm->StartElement( A2OUSTR("table:table-header-rows") ); + pStrm->StartElement( OUString("table:table-header-rows") ); m_aHeaderRows.ToXml(pStrm); - pStrm->EndElement( A2OUSTR("table:table-header-rows") ); + pStrm->EndElement( OUString("table:table-header-rows") ); } //output rows: { @@ -284,8 +284,8 @@ void XFTable::ToXml(IXFStream *pStrm) } if( m_bSubTable ) - pStrm->EndElement( A2OUSTR("table:sub-table") ); + pStrm->EndElement( OUString("table:sub-table") ); else - pStrm->EndElement( A2OUSTR("table:table") ); + pStrm->EndElement( OUString("table:table") ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xftablestyle.cxx b/lotuswordpro/source/filter/xfilter/xftablestyle.cxx index ef57002632c1..60bca7f9c6c2 100644 --- a/lotuswordpro/source/filter/xfilter/xftablestyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xftablestyle.cxx @@ -91,34 +91,34 @@ void XFTableStyle::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), GetStyleName() ); + pAttrList->AddAttribute( OUString("style:name"), GetStyleName() ); if( !GetParentStyleName().isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:parent-style-name"),GetParentStyleName()); - pAttrList->AddAttribute( A2OUSTR("style:family"), A2OUSTR("table") ); - pStrm->StartElement( A2OUSTR("style:style") ); + pAttrList->AddAttribute(OUString("style:parent-style-name"),GetParentStyleName()); + pAttrList->AddAttribute( OUString("style:family"), OUString("table") ); + pStrm->StartElement( OUString("style:style") ); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:width"), DoubleToOUString(m_fWidth) + A2OUSTR("cm") ); + pAttrList->AddAttribute( OUString("style:width"), DoubleToOUString(m_fWidth) + OUString("cm") ); //text align: if( m_eAlign == enumXFAlignStart ) { - pAttrList->AddAttribute(A2OUSTR("table:align"),A2OUSTR("left")); + pAttrList->AddAttribute(OUString("table:align"),OUString("left")); } else if( m_eAlign == enumXFAlignCenter ) { - pAttrList->AddAttribute(A2OUSTR("table:align"),A2OUSTR("center")); + pAttrList->AddAttribute(OUString("table:align"),OUString("center")); } else if( m_eAlign == enumXFAlignEnd ) { - pAttrList->AddAttribute(A2OUSTR("table:align"),A2OUSTR("right")); + pAttrList->AddAttribute(OUString("table:align"),OUString("right")); } else if( m_eAlign == enumXFALignMargins ) { - pAttrList->AddAttribute(A2OUSTR("table:align"),A2OUSTR("margins")); + pAttrList->AddAttribute(OUString("table:align"),OUString("margins")); } //background color: if( m_aBackColor.IsValid() && !m_pBGImage ) - pAttrList->AddAttribute(A2OUSTR("fo:background-color"), m_aBackColor.ToString() ); + pAttrList->AddAttribute(OUString("fo:background-color"), m_aBackColor.ToString() ); //shadow: m_aShadow.ToXml(pStrm); //margin: @@ -126,12 +126,12 @@ void XFTableStyle::ToXml(IXFStream *pStrm) //breaks: m_aBreaks.ToXml(pStrm); - pStrm->StartElement( A2OUSTR("style:properties") ); + pStrm->StartElement( OUString("style:properties") ); if( m_pBGImage ) m_pBGImage->ToXml(pStrm); - pStrm->EndElement( A2OUSTR("style:properties") ); + pStrm->EndElement( OUString("style:properties") ); - pStrm->EndElement( A2OUSTR("style:style") ); + pStrm->EndElement( OUString("style:style") ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xftabstop.hxx b/lotuswordpro/source/filter/xfilter/xftabstop.hxx index 6e8dcb90b91e..693189a40622 100644 --- a/lotuswordpro/source/filter/xfilter/xftabstop.hxx +++ b/lotuswordpro/source/filter/xfilter/xftabstop.hxx @@ -74,8 +74,8 @@ inline void XFTabStop::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("text:tab-stop") ); - pStrm->EndElement( A2OUSTR("text:tab-stop") ); + pStrm->StartElement( OUString("text:tab-stop") ); + pStrm->EndElement( OUString("text:tab-stop") ); } #endif diff --git a/lotuswordpro/source/filter/xfilter/xftabstyle.cxx b/lotuswordpro/source/filter/xfilter/xftabstyle.cxx index 612a98575e9d..acb33b0a0f7d 100644 --- a/lotuswordpro/source/filter/xfilter/xftabstyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xftabstyle.cxx @@ -70,32 +70,32 @@ void XFTabStyle::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:position"), DoubleToOUString(m_fLength) + A2OUSTR("cm") ); + pAttrList->AddAttribute( OUString("style:position"), DoubleToOUString(m_fLength) + OUString("cm") ); switch(m_eType) { case enumXFTabLeft: - pAttrList->AddAttribute( A2OUSTR("style:type"), A2OUSTR("left") ); + pAttrList->AddAttribute( OUString("style:type"), OUString("left") ); break; case enumXFTabCenter: - pAttrList->AddAttribute( A2OUSTR("style:type"), A2OUSTR("center") ); + pAttrList->AddAttribute( OUString("style:type"), OUString("center") ); break; case enumXFTabRight: - pAttrList->AddAttribute( A2OUSTR("style:type"), A2OUSTR("right") ); + pAttrList->AddAttribute( OUString("style:type"), OUString("right") ); break; case enumXFTabChar: - pAttrList->AddAttribute( A2OUSTR("style:type"), A2OUSTR("char") ); + pAttrList->AddAttribute( OUString("style:type"), OUString("char") ); break; default: break; } //delimiter: if( m_eType == enumXFTabChar ) - pAttrList->AddAttribute( A2OUSTR("style:char"), m_strDelimiter ); + pAttrList->AddAttribute( OUString("style:char"), m_strDelimiter ); //leader char: if( !m_strLeader.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("style:leader-char"), m_strLeader ); + pAttrList->AddAttribute( OUString("style:leader-char"), m_strLeader ); - pStrm->StartElement( A2OUSTR("style:tab-stop") ); - pStrm->EndElement( A2OUSTR("style:tab-stop") ); + pStrm->StartElement( OUString("style:tab-stop") ); + pStrm->EndElement( OUString("style:tab-stop") ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xftextboxstyle.cxx b/lotuswordpro/source/filter/xfilter/xftextboxstyle.cxx index 0c1929fb59f3..93aff776c9a1 100644 --- a/lotuswordpro/source/filter/xfilter/xftextboxstyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xftextboxstyle.cxx @@ -77,28 +77,28 @@ void XFTextBoxStyle::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), GetStyleName() ); + pAttrList->AddAttribute( OUString("style:name"), GetStyleName() ); if( !GetParentStyleName().isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:parent-style-name"),GetParentStyleName()); - pAttrList->AddAttribute( A2OUSTR("style:family"), A2OUSTR("graphics") ); + pAttrList->AddAttribute(OUString("style:parent-style-name"),GetParentStyleName()); + pAttrList->AddAttribute( OUString("style:family"), OUString("graphics") ); //parent style name ignore now. - pStrm->StartElement( A2OUSTR("style:style") ); + pStrm->StartElement( OUString("style:style") ); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("draw:stroke"), A2OUSTR("none") ); - pAttrList->AddAttribute( A2OUSTR("svg:stroke-color"), A2OUSTR("#000000") ); - pAttrList->AddAttribute( A2OUSTR("draw:fill"), A2OUSTR("none") ); - pAttrList->AddAttribute( A2OUSTR("draw:fill-color"), A2OUSTR("#ffffff") ); - pAttrList->AddAttribute( A2OUSTR("draw:auto-grow-height"), A2OUSTR("true") ); - pAttrList->AddAttribute( A2OUSTR("style:run-through"), A2OUSTR("foreground") ); - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("run-through") ); - pAttrList->AddAttribute( A2OUSTR("style:wrap"), A2OUSTR("run-through") ); - pAttrList->AddAttribute( A2OUSTR("style:number-wrapped-paragraphs"), A2OUSTR("no-limit") ); - pAttrList->AddAttribute( A2OUSTR("style:wrap-contour"), A2OUSTR("false") ); + pAttrList->AddAttribute( OUString("draw:stroke"), OUString("none") ); + pAttrList->AddAttribute( OUString("svg:stroke-color"), OUString("#000000") ); + pAttrList->AddAttribute( OUString("draw:fill"), OUString("none") ); + pAttrList->AddAttribute( OUString("draw:fill-color"), OUString("#ffffff") ); + pAttrList->AddAttribute( OUString("draw:auto-grow-height"), OUString("true") ); + pAttrList->AddAttribute( OUString("style:run-through"), OUString("foreground") ); + pAttrList->AddAttribute( OUString("style:wrap"), OUString("run-through") ); + pAttrList->AddAttribute( OUString("style:wrap"), OUString("run-through") ); + pAttrList->AddAttribute( OUString("style:number-wrapped-paragraphs"), OUString("no-limit") ); + pAttrList->AddAttribute( OUString("style:wrap-contour"), OUString("false") ); - pStrm->StartElement( A2OUSTR("style:properties") ); - pStrm->EndElement( A2OUSTR("style:properties") ); + pStrm->StartElement( OUString("style:properties") ); + pStrm->EndElement( OUString("style:properties") ); - pStrm->EndElement( A2OUSTR("style:style") ); + pStrm->EndElement( OUString("style:style") ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xftextcontent.cxx b/lotuswordpro/source/filter/xfilter/xftextcontent.cxx index f2fcdf1a5ba2..baca854d8d63 100644 --- a/lotuswordpro/source/filter/xfilter/xftextcontent.cxx +++ b/lotuswordpro/source/filter/xfilter/xftextcontent.cxx @@ -106,9 +106,9 @@ void XFTextContent::ToXml(IXFStream *pStrm) } IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("text:c"), OUString::number(j-nIndex) ); - pStrm->StartElement( A2OUSTR("text:s") ); - pStrm->EndElement( A2OUSTR("text:s") ); + pAttrList->AddAttribute( "text:c", OUString::number(j-nIndex) ); + pStrm->StartElement( OUString("text:s") ); + pStrm->EndElement( OUString("text:s") ); i+=j; } diff --git a/lotuswordpro/source/filter/xfilter/xftextspan.cxx b/lotuswordpro/source/filter/xfilter/xftextspan.cxx index 0631c2660ca8..6f667bc0e29c 100644 --- a/lotuswordpro/source/filter/xfilter/xftextspan.cxx +++ b/lotuswordpro/source/filter/xfilter/xftextspan.cxx @@ -114,8 +114,8 @@ void XFTextSpan::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !style.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), GetStyleName() ); - pStrm->StartElement( A2OUSTR("text:span") ); + pAttrList->AddAttribute( "text:style-name", GetStyleName() ); + pStrm->StartElement( "text:span" ); std::vector<IXFContent*>::iterator it; for( it= m_aContents.begin(); it!= m_aContents.end(); ++it ) @@ -125,7 +125,7 @@ void XFTextSpan::ToXml(IXFStream *pStrm) pContent->ToXml(pStrm); } - pStrm->EndElement( A2OUSTR("text:span") ); + pStrm->EndElement( "text:span" ); } void XFTextSpanStart::ToXml(IXFStream *pStrm) @@ -137,8 +137,8 @@ void XFTextSpanStart::ToXml(IXFStream *pStrm) pAttrList->Clear(); if( !style.isEmpty() ) - pAttrList->AddAttribute( A2OUSTR("text:style-name"), GetStyleName() ); - pStrm->StartElement( A2OUSTR("text:span") ); + pAttrList->AddAttribute( "text:style-name", GetStyleName() ); + pStrm->StartElement( "text:span" ); std::vector<IXFContent*>::iterator it; for( it= m_aContents.begin(); it!= m_aContents.end(); ++it ) @@ -157,7 +157,7 @@ void XFTextSpanEnd::ToXml(IXFStream *pStrm) if( pContent ) pContent->ToXml(pStrm); } - pStrm->EndElement( A2OUSTR("text:span") ); + pStrm->EndElement( "text:span" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xftextstyle.cxx b/lotuswordpro/source/filter/xfilter/xftextstyle.cxx index 577734714388..e3e592e803f1 100644 --- a/lotuswordpro/source/filter/xfilter/xftextstyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xftextstyle.cxx @@ -116,12 +116,12 @@ void XFTextStyle::ToXml(IXFStream *strm) pAttrList->Clear(); if( !style.isEmpty() ) - pAttrList->AddAttribute(OUString("style:name"),GetStyleName()); + pAttrList->AddAttribute("style:name", GetStyleName()); if( !GetParentStyleName().isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:parent-style-name"),GetParentStyleName()); + pAttrList->AddAttribute("style:parent-style-name", GetParentStyleName()); - pAttrList->AddAttribute(OUString("style:family"),A2OUSTR("text") ); - strm->StartElement(OUString("style:style")); + pAttrList->AddAttribute("style:family", "text" ); + strm->StartElement("style:style"); //Font properties: pAttrList->Clear(); @@ -129,10 +129,10 @@ void XFTextStyle::ToXml(IXFStream *strm) if( m_pFont ) m_pFont->ToXml(strm); - strm->StartElement(OUString("style:properties")); - strm->EndElement(OUString("style:properties")); + strm->StartElement("style:properties"); + strm->EndElement("style:properties"); - strm->EndElement(OUString("style:style")); + strm->EndElement("style:style"); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xftimestyle.cxx b/lotuswordpro/source/filter/xfilter/xftimestyle.cxx index f890af77b36d..1568e4c51b90 100644 --- a/lotuswordpro/source/filter/xfilter/xftimestyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xftimestyle.cxx @@ -74,32 +74,32 @@ void XFTimePart::ToXml(IXFStream *pStrm) case enumXFDateHour: pAttrList->Clear(); if( m_bLongFmt ) - pAttrList->AddAttribute( A2OUSTR("number:style"), A2OUSTR("long") ); - pStrm->StartElement( A2OUSTR("number:hours") ); - pStrm->EndElement( A2OUSTR("number:hours") ); + pAttrList->AddAttribute( "number:style", "long" ); + pStrm->StartElement( "number:hours" ); + pStrm->EndElement( "number:hours" ); break; case enumXFDateMinute: pAttrList->Clear(); if( m_bLongFmt ) - pAttrList->AddAttribute( A2OUSTR("number:style"), A2OUSTR("long") ); + pAttrList->AddAttribute( "number:style", "long" ); if( m_nDecimalPos>0 ) - pAttrList->AddAttribute( A2OUSTR("number:decimal-places"), Int32ToOUString(m_nDecimalPos) ); + pAttrList->AddAttribute( "number:decimal-places", OUString::number(m_nDecimalPos) ); - pStrm->StartElement( A2OUSTR("number:minutes") ); - pStrm->EndElement( A2OUSTR("number:minutes") ); + pStrm->StartElement( "number:minutes" ); + pStrm->EndElement( "number:minutes" ); break; case enumXFDateSecond: pAttrList->Clear(); if( m_bLongFmt ) - pAttrList->AddAttribute( A2OUSTR("number:style"), A2OUSTR("long") ); - pStrm->StartElement( A2OUSTR("number:seconds") ); - pStrm->EndElement( A2OUSTR("number:seconds") ); + pAttrList->AddAttribute( "number:style", "long" ); + pStrm->StartElement( "number:seconds" ); + pStrm->EndElement( "number:seconds" ); break; case enumXFDateText: pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("number:text") ); + pStrm->StartElement( "number:text" ); pStrm->Characters( m_strText ); - pStrm->EndElement( A2OUSTR("number:text") ); + pStrm->EndElement( "number:text" ); break; default: break; @@ -127,13 +127,13 @@ void XFTimeStyle::ToXml(IXFStream *pStrm) IXFAttrList *pAttrList = pStrm->GetAttrList(); pAttrList->Clear(); - pAttrList->AddAttribute( A2OUSTR("style:name"), GetStyleName() ); + pAttrList->AddAttribute( "style:name", GetStyleName() ); if( !GetParentStyleName().isEmpty() ) - pAttrList->AddAttribute(A2OUSTR("style:parent-style-name"),GetParentStyleName()); - pAttrList->AddAttribute( A2OUSTR("style:family"), A2OUSTR("data-style") ); + pAttrList->AddAttribute("style:parent-style-name",GetParentStyleName()); + pAttrList->AddAttribute( "style:family", "data-style" ); if (!m_bTruncate) - pAttrList->AddAttribute( A2OUSTR("number:truncate-on-overflow"), A2OUSTR("false") ); - pStrm->StartElement( A2OUSTR("number:time-style") ); + pAttrList->AddAttribute( "number:truncate-on-overflow", "false" ); + pStrm->StartElement( "number:time-style" ); std::vector<XFTimePart>::iterator it; for( it = m_aParts.begin(); it != m_aParts.end(); ++it ) @@ -143,9 +143,9 @@ void XFTimeStyle::ToXml(IXFStream *pStrm) if( m_bAmPm ) { pAttrList->Clear(); - pStrm->StartElement( A2OUSTR("number:am-pm") ); - pStrm->EndElement( A2OUSTR("number:am-pm") ); + pStrm->StartElement( "number:am-pm" ); + pStrm->EndElement( "number:am-pm" ); } - pStrm->EndElement( A2OUSTR("number:time-style") ); + pStrm->EndElement( "number:time-style" ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfutil.cxx b/lotuswordpro/source/filter/xfilter/xfutil.cxx index f1d33797294c..899422973574 100644 --- a/lotuswordpro/source/filter/xfilter/xfutil.cxx +++ b/lotuswordpro/source/filter/xfilter/xfutil.cxx @@ -64,16 +64,6 @@ #include <rtl/ustrbuf.hxx> #include <sstream> -OUString Int32ToOUString(sal_Int32 num) -{ - /*std::stringstream sstrm; - - sstrm<<(int)num; - return OUString::createFromAscii(sstrm.str().c_str()); - */ - return OUString::number(num); -} - OUString Int16ToOUString(sal_Int16 num) { /*std::stringstream sstrm; @@ -111,22 +101,11 @@ OUString DoubleToOUString(double num, sal_Int32 /*precision*/) OUString DateTimeToOUString(XFDateTime& dt) { - OUStringBuffer buf; - buf.append(dt.nYear); - buf.append( A2OUSTR("-") ); - buf.append(dt.nMonth); - buf.append( A2OUSTR("-") ); - buf.append(dt.nDay); - buf.append( A2OUSTR("T") ); - buf.append(dt.nHour); - buf.append( A2OUSTR(":") ); - buf.append(dt.nMinute); - buf.append( A2OUSTR(":") ); - buf.append(dt.nSecond); - buf.append( A2OUSTR(".") ); - buf.append(dt.nMillSecond); + OUString aResult = OUString::number(dt.nYear) + "-" + OUString::number(dt.nMonth) + "-" + OUString::number(dt.nDay) + + "T" + OUString::number(dt.nHour) + ":" + OUString::number(dt.nMinute) + ":" + OUString::number(dt.nSecond) + "." + + OUString::number(dt.nMillSecond); - return buf.makeStringAndClear(); + return aResult; } OUString GetTableColName(sal_Int32 col) @@ -139,7 +118,7 @@ OUString GetTableColName(sal_Int32 col) { ch = 'A' + col -1; strOut += ch; - return A2OUSTR(strOut.c_str()); + return OUString::createFromAscii(strOut.c_str()); } while( col>26 ) @@ -152,7 +131,7 @@ OUString GetTableColName(sal_Int32 col) ch = 'A' + remain -1; strOut += ch; - return A2OUSTR(strOut.c_str()); + return OUString::createFromAscii(strOut.c_str()); } //tool functions: @@ -161,61 +140,61 @@ OUString GetUnderlineName(enumXFUnderline type) switch(type) { case enumXFUnderlineNone: - return A2OUSTR("none"); + return OUString("none"); break; case enumXFUnderlineSingle: - return A2OUSTR("single"); + return OUString("single"); break; case enumXFUnderlineDouble: - return A2OUSTR("double"); + return OUString("double"); break; case enumXFUnderlineDotted: - return A2OUSTR("dotted"); + return OUString("dotted"); break; case enumXFUnderlineDash: - return A2OUSTR("dash"); + return OUString("dash"); break; case enumXFUnderlineLongDash: - return A2OUSTR("long-dash"); + return OUString("long-dash"); break; case enumXFUnderlineDotDash: - return A2OUSTR("dot-dash"); + return OUString("dot-dash"); break; case enumXFUnderlineDotDotDash: - return A2OUSTR("dot-dot-dash"); + return OUString("dot-dot-dash"); break; case enumXFUnderlineWave: - return A2OUSTR("wave"); + return OUString("wave"); break; case enumXFUnderlineBold: - return A2OUSTR("bold"); + return OUString("bold"); break; case enumXFUnderlineBoldDotted: - return A2OUSTR("bold-dotted"); + return OUString("bold-dotted"); break; case enumXFUnderlineBoldDash: - return A2OUSTR("bold-dash"); + return OUString("bold-dash"); break; case enumXFUnderlineBoldLongDash: - return A2OUSTR("bold-long-dash"); + return OUString("bold-long-dash"); break; case enumXFUnderlineBoldDotDash: - return A2OUSTR("bold-dot-dash"); + return OUString("bold-dot-dash"); break; case enumXFUnderlineBoldDotDotDash: - return A2OUSTR("bold-dot-dot-dash"); + return OUString("bold-dot-dot-dash"); break; case enumXFUnderlineBoldWave: - return A2OUSTR("bold-wave"); + return OUString("bold-wave"); break; case enumXFUnderlineDoubleWave: - return A2OUSTR("double-wave"); + return OUString("double-wave"); break; case enumXFUnderlineSmallWave: - return A2OUSTR("samll-wave"); + return OUString("samll-wave"); break; } - return A2OUSTR(""); + return OUString(""); } OUString GetReliefName(enumXFRelief type) @@ -223,15 +202,15 @@ OUString GetReliefName(enumXFRelief type) switch(type) { case enumXFReliefEngraved: - return A2OUSTR("engraved"); + return OUString("engraved"); break; case enumXFReliefEmbossed: - return A2OUSTR("embossed"); + return OUString("embossed"); break; default: break; } - return A2OUSTR(""); + return OUString(""); } OUString GetCrossoutName(enumXFCrossout type) @@ -239,66 +218,66 @@ OUString GetCrossoutName(enumXFCrossout type) switch(type) { case enumXFCrossoutSignel: - return A2OUSTR("single-line"); + return OUString("single-line"); break; case enumXFCrossoutDouble: - return A2OUSTR("double-line"); + return OUString("double-line"); break; case enumXFCrossoutThick: - return A2OUSTR("thick-line"); + return OUString("thick-line"); break; case enumXFCrossoutSlash: - return A2OUSTR("slash"); + return OUString("slash"); break; case enumXFCrossoutX: - return A2OUSTR("X"); + return OUString("X"); break; default: break; } - return A2OUSTR(""); + return OUString(""); } OUString GetTransformName(enumXFTransform type) { switch(type) { case enumXFTransformUpper: - return A2OUSTR("uppercase"); + return OUString("uppercase"); break; case enumXFTransformLower: - return A2OUSTR("lowercase"); + return OUString("lowercase"); break; case enumXFTransformCapitalize: - return A2OUSTR("capitalize"); + return OUString("capitalize"); break; case enumXFTransformSmallCaps: - return A2OUSTR("small-caps"); + return OUString("small-caps"); break; default: break; } - return A2OUSTR(""); + return OUString(""); } OUString GetEmphasizeName(enumXFEmphasize type) { switch(type) { case enumXFEmphasizeDot: - return A2OUSTR("dot"); + return OUString("dot"); break; case enumXFEmphasizeCircle: - return A2OUSTR("circle"); + return OUString("circle"); break; case enumXFEmphasizeDisc: - return A2OUSTR("disc"); + return OUString("disc"); break; case enumXFEmphasizeAccent: - return A2OUSTR("accent"); + return OUString("accent"); break; default: break; } - return A2OUSTR(""); + return OUString(""); } OUString GetTextDirName(enumXFTextDir dir) @@ -306,33 +285,33 @@ OUString GetTextDirName(enumXFTextDir dir) switch(dir) { case enumXFTextDirLR: - return A2OUSTR("lr"); + return OUString("lr"); break; case enumXFTextDirLR_TB: - return A2OUSTR("lr-tb"); + return OUString("lr-tb"); break; case enumXFTextDirPage: - return A2OUSTR("page"); + return OUString("page"); break; case enumXFTextDirRL: - return A2OUSTR("rl"); + return OUString("rl"); break; case enumXFTextDirRL_TB: - return A2OUSTR("rl-tb"); + return OUString("rl-tb"); break; case enumXFTextDirTB: - return A2OUSTR("tb"); + return OUString("tb"); break; case enumXFTextDirTB_LR: - return A2OUSTR("tb-lr"); + return OUString("tb-lr"); break; case enumXFTextDirTB_RL: - return A2OUSTR("tb-rl"); + return OUString("tb-rl"); break; default: break; } - return A2OUSTR(""); + return OUString(""); } OUString GetFrameXPos(enumXFFrameXPos pos) @@ -340,21 +319,21 @@ OUString GetFrameXPos(enumXFFrameXPos pos) switch(pos) { case enumXFFrameXPosLeft: - return A2OUSTR("left"); + return OUString("left"); break; case enumXFFrameXPosRight: - return A2OUSTR("right"); + return OUString("right"); break; case enumXFFrameXPosCenter: - return A2OUSTR("center"); + return OUString("center"); break; case enumXFFrameXPosFromLeft: - return A2OUSTR("from-left"); + return OUString("from-left"); break; default: break; } - return A2OUSTR(""); + return OUString(""); } OUString GetFrameXRel(enumXFFrameXRel rel) @@ -362,48 +341,48 @@ OUString GetFrameXRel(enumXFFrameXRel rel) switch(rel) { case enumXFFrameXRelPage: - return A2OUSTR("page"); + return OUString("page"); break; case enumXFFrameXRelPageContent: - return A2OUSTR("page-content"); + return OUString("page-content"); break; case enumXFFrameXRelPageEndMargin: - return A2OUSTR("page-end-margin"); + return OUString("page-end-margin"); break; case enumXFFrameXRelPageStartMargin: - return A2OUSTR("page-start-margin"); + return OUString("page-start-margin"); break; case enumXFFrameXRelPara: - return A2OUSTR("paragraph"); + return OUString("paragraph"); break; case enumXFFrameXRelParaContent: - return A2OUSTR("paragraph-content"); + return OUString("paragraph-content"); break; case enumXFFrameXRelParaEndMargin: - return A2OUSTR("paragraph-end-margin"); + return OUString("paragraph-end-margin"); break; case enumXFFrameXRelParaStartMargin: - return A2OUSTR("paragraph-start-margin"); + return OUString("paragraph-start-margin"); break; case enumXFFrameXRelChar: - return A2OUSTR("char"); + return OUString("char"); break; case enumXFFrameXRelFrame: - return A2OUSTR("frame"); + return OUString("frame"); break; case enumXFFrameXRelFrameContent: - return A2OUSTR("frame-content"); + return OUString("frame-content"); break; case enumXFFrameXRelFrameEndMargin: - return A2OUSTR("frame-end-margin"); + return OUString("frame-end-margin"); break; case enumXFFrameXRelFrameStartMargin: - return A2OUSTR("frame-start-margin"); + return OUString("frame-start-margin"); break; default: break; } - return A2OUSTR(""); + return OUString(""); } OUString GetFrameYPos(enumXFFrameYPos pos) @@ -411,17 +390,17 @@ OUString GetFrameYPos(enumXFFrameYPos pos) switch(pos) { case enumXFFrameYPosTop: - return A2OUSTR("top"); + return OUString("top"); case enumXFFrameYPosMiddle: - return A2OUSTR("middle"); + return OUString("middle"); case enumXFFrameYPosBottom: - return A2OUSTR("bottom"); + return OUString("bottom"); case enumXFFrameYPosFromTop: - return A2OUSTR("from-top"); + return OUString("from-top"); case enumXFFrameYPosBelow: - return A2OUSTR("below"); + return OUString("below"); } - return A2OUSTR(""); + return OUString(""); } OUString GetFrameYRel(enumXFFrameYRel rel) @@ -429,61 +408,61 @@ OUString GetFrameYRel(enumXFFrameYRel rel) switch(rel) { case enumXFFrameYRelBaseLine: - return A2OUSTR("baseline"); + return OUString("baseline"); case enumXFFrameYRelChar: - return A2OUSTR("char"); + return OUString("char"); case enumXFFrameYRelFrame: - return A2OUSTR("frame"); + return OUString("frame"); case enumXFFrameYRelFrameContent: - return A2OUSTR("frame-content"); + return OUString("frame-content"); case enumXFFrameYRelLine: - return A2OUSTR("line"); + return OUString("line"); case enumXFFrameYRelPage: - return A2OUSTR("page"); + return OUString("page"); case enumXFFrameYRelPageContent: - return A2OUSTR("page-content"); + return OUString("page-content"); case enumXFFrameYRelPara: - return A2OUSTR("paragraph"); + return OUString("paragraph"); case enumXFFrameYRelParaContent: - return A2OUSTR("paragraph-content"); + return OUString("paragraph-content"); case enumXFFrameYRelText: - return A2OUSTR("text"); + return OUString("text"); } - return A2OUSTR(""); + return OUString(""); } OUString GetAlignName(enumXFAlignType align) { if( align == enumXFAlignStart ) - return A2OUSTR("start"); + return OUString("start"); else if( align == enumXFAlignCenter ) - return A2OUSTR("center"); + return OUString("center"); else if( align == enumXFAlignEnd ) - return A2OUSTR("end"); + return OUString("end"); else if( align == enumXFAlignJustify ) - return A2OUSTR("justify"); + return OUString("justify"); else if( align == enumXFAlignBottom ) - return A2OUSTR("bottom"); + return OUString("bottom"); else if( align == enumXFAlignTop ) - return A2OUSTR("top"); + return OUString("top"); else if( align == enumXFAlignMiddle ) - return A2OUSTR("middle"); + return OUString("middle"); else if( align == enumXFALignMargins ) - return A2OUSTR("margins"); + return OUString("margins"); - return A2OUSTR(""); + return OUString(""); } OUString GetDrawKind(enumXFDrawKind kind) { if( kind == enumXFDrawKindFull ) - return A2OUSTR("full"); + return OUString("full"); else if( kind == enumXFDrawKindSection ) - return A2OUSTR("section"); + return OUString("section"); else if( kind == enumXFDrawKindCut ) - return A2OUSTR("cut"); + return OUString("cut"); else //( kind == enumXFDrawKindArc ) - return A2OUSTR("arc"); + return OUString("arc"); } OUString GetPageUsageName(enumXFPageUsage usage) @@ -492,19 +471,19 @@ OUString GetPageUsageName(enumXFPageUsage usage) switch(usage) { case enumXFPageUsageAll: - sRet = A2OUSTR("all"); + sRet = "all"; break; case enumXFPageUsageLeft: - sRet = A2OUSTR("left"); + sRet = "left"; break; case enumXFPageUsageRight: - sRet = A2OUSTR("right"); + sRet = "right"; break; case enumXFPageUsageMirror: - sRet = A2OUSTR("mirrored"); + sRet = "mirrored"; break; default: - sRet = A2OUSTR("mirrored"); + sRet = "mirrored"; break; } return sRet; @@ -516,28 +495,28 @@ OUString GetValueType(enumXFValueType type) switch(type) { case enumXFValueTypeBoolean: - sRet = A2OUSTR("boolean"); + sRet = "boolean"; break; case enumXFValueTypeCurrency: - sRet = A2OUSTR("currency"); + sRet = "currency"; break; case enumXFValueTypeDate: - sRet = A2OUSTR("date"); + sRet = "date"; break; case enumXFValueTypeFloat: - sRet = A2OUSTR("float"); + sRet = "float"; break; case enumXFValueTypePercentage: - sRet = A2OUSTR("percentage"); + sRet = "percentage"; break; case enumXFValueTypeString: - sRet = A2OUSTR("string"); + sRet = "string"; break; case enumXFValueTypeTime: - sRet = A2OUSTR("time"); + sRet = "time"; break; default: - sRet = A2OUSTR("mirrored"); + sRet = "mirrored"; break; } return sRet; @@ -548,15 +527,15 @@ OUString GetColorMode(enumXFColorMode mode) switch(mode) { case enumXFColorStandard: - return A2OUSTR("standard"); + return OUString("standard"); case enumXFColorGreyscale: - return A2OUSTR("greyscale"); + return OUString("greyscale"); case enumXFColorWatermark: - return A2OUSTR("watermark"); + return OUString("watermark"); case enumXFColorMono: - return A2OUSTR("mono"); + return OUString("mono"); } - return A2OUSTR(""); + return OUString(""); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfutil.hxx b/lotuswordpro/source/filter/xfilter/xfutil.hxx index 9c238db582f5..a765bb5eed92 100644 --- a/lotuswordpro/source/filter/xfilter/xfutil.hxx +++ b/lotuswordpro/source/filter/xfilter/xfutil.hxx @@ -65,10 +65,6 @@ #include <rtl/ustring.hxx> #include <string> -#define A2OUSTR(str) OUString::createFromAscii(str) - -OUString Int32ToOUString(sal_Int32 num); - OUString Int16ToOUString(sal_Int16 num); OUString FloatToOUString(float num, sal_Int32 precision=6); |