[Libreoffice-commits] core.git: 2 commits - lotuswordpro/source
Norbert Thiebaud
nthiebaud at gmail.com
Sat Mar 8 23:04:07 PST 2014
lotuswordpro/source/filter/lwptoc.cxx | 2 -
lotuswordpro/source/filter/xfilter/xfborders.cxx | 12 ++++------
lotuswordpro/source/filter/xfilter/xfframestyle.cxx | 2 -
lotuswordpro/source/filter/xfilter/xfliststyle.cxx | 6 ++---
lotuswordpro/source/filter/xfilter/xfnumfmt.hxx | 2 -
lotuswordpro/source/filter/xfilter/xfutil.cxx | 23 --------------------
lotuswordpro/source/filter/xfilter/xfutil.hxx | 4 ---
7 files changed, 11 insertions(+), 40 deletions(-)
New commits:
commit beebe5149d610ea663e884e5b08f260747eae00d
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Sun Mar 9 01:03:32 2014 -0600
lotuswordpro: use native OUString api rather than a wrapper
Change-Id: I0a390cda1378bf7be19cb361c90b3374f4756fa4
diff --git a/lotuswordpro/source/filter/xfilter/xfborders.cxx b/lotuswordpro/source/filter/xfilter/xfborders.cxx
index aa1c783..d78760f 100644
--- a/lotuswordpro/source/filter/xfilter/xfborders.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfborders.cxx
@@ -119,9 +119,9 @@ OUString XFBorder::GetLineWidth()
if( m_bDouble )
{
- str = FloatToOUString(m_fWidthInner);
- str += "cm " + OUString::number(m_fWidthSpace);
- str += "cm " + OUString::number(m_fWidthOuter) + "cm";
+ str = OUString::number(m_fWidthInner) + "cm " +
+ OUString::number(m_fWidthSpace) + "cm " +
+ OUString::number(m_fWidthOuter) + "cm";
}
return str;
}
@@ -138,8 +138,7 @@ OUString XFBorder::ToString()
return str;
}
- str = OUString::number(width) + "cm";
- str += " double " + m_aColor.ToString();
+ str = OUString::number(width) + "cm double " + m_aColor.ToString();
}
else
{
@@ -148,8 +147,7 @@ OUString XFBorder::ToString()
{
return str;
}
- str = OUString::number(width) + "cm";
- str += " solid " + m_aColor.ToString();
+ str = OUString::number(width) + "cm solid " + m_aColor.ToString();
}
return str;
}
diff --git a/lotuswordpro/source/filter/xfilter/xfutil.cxx b/lotuswordpro/source/filter/xfilter/xfutil.cxx
index e480f7b..da50ea3 100644
--- a/lotuswordpro/source/filter/xfilter/xfutil.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfutil.cxx
@@ -64,18 +64,6 @@
#include <rtl/ustrbuf.hxx>
#include <sstream>
-OUString FloatToOUString(float num, sal_Int32 /*precision*/)
-{
- /*std::stringstream sstrm;
- std::string strRet;
-
- sstrm.precision(precision);
- sstrm<<num;
- return OUString::createFromAscii(sstrm.str().c_str());
- */
- return OUString::number(num);
-}
-
OUString DateTimeToOUString(XFDateTime& dt)
{
OUString aResult = OUString::number(dt.nYear) + "-" + OUString::number(dt.nMonth) + "-" + OUString::number(dt.nDay) +
diff --git a/lotuswordpro/source/filter/xfilter/xfutil.hxx b/lotuswordpro/source/filter/xfilter/xfutil.hxx
index c224392..0ea5f87 100644
--- a/lotuswordpro/source/filter/xfilter/xfutil.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfutil.hxx
@@ -65,8 +65,6 @@
#include <rtl/ustring.hxx>
#include <string>
-OUString FloatToOUString(float num, sal_Int32 precision=6);
-
OUString DateTimeToOUString(XFDateTime& dt);
OUString GetTableColName(sal_Int32 col);
commit b49b1e4c0e5e23039b8cfb44857c2f7d22372984
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Sun Mar 9 00:57:03 2014 -0600
lotuswordpro: use native OUString api rather than a wrapper
Change-Id: Id670e3cb4982a67d096f548b6d105b97582e1958
diff --git a/lotuswordpro/source/filter/lwptoc.cxx b/lotuswordpro/source/filter/lwptoc.cxx
index 3c411af..9196432 100644
--- a/lotuswordpro/source/filter/lwptoc.cxx
+++ b/lotuswordpro/source/filter/lwptoc.cxx
@@ -219,7 +219,7 @@ void LwpTocSuperLayout::XFConvert(XFContentContainer* pCont)
pTemplate->AddEntry(enumXFIndexTemplatePage, "TOC Page Number Text Style");
}
- pToc->AddTemplate(Int16ToOUString(i), m_pFoundry->FindActuralStyleName(pLevel->GetSearchStyle()), pTemplate);
+ pToc->AddTemplate(OUString::number((sal_Int32)i), m_pFoundry->FindActuralStyleName(pLevel->GetSearchStyle()), pTemplate);
bInserted = sal_True;
}
diff --git a/lotuswordpro/source/filter/xfilter/xfframestyle.cxx b/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
index 6d6414b..61169ef 100644
--- a/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
@@ -176,7 +176,7 @@ void XFFrameStyle::ToXml(IXFStream *pStrm)
if( m_aBackColor.IsValid() )
{
pAttrList->AddAttribute( "fo:background-color", m_aBackColor.ToString() );
- pAttrList->AddAttribute( "style:background-transparency", Int16ToOUString(m_nTransparency) + "%");
+ pAttrList->AddAttribute( "style:background-transparency", OUString::number((sal_Int32)m_nTransparency) + "%");
}
//pad
diff --git a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
index ff06a23..23f98fc 100644
--- a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
@@ -79,11 +79,11 @@ void XFListlevelNumber::ToXml(IXFStream *pStrm)
IXFAttrList *pAttrList = pStrm->GetAttrList();
pAttrList->Clear();
- pAttrList->AddAttribute( "text:level", Int16ToOUString(m_nLevel) );
+ pAttrList->AddAttribute( "text:level", OUString::number((sal_Int32)m_nLevel) );
//text:style-name,ignore now.
m_aNumFmt.ToXml(pStrm);
if( m_nDisplayLevel )
- pAttrList->AddAttribute( "text:display-levels", Int16ToOUString(m_nDisplayLevel) );
+ pAttrList->AddAttribute( "text:display-levels", OUString::number((sal_Int32)m_nDisplayLevel) );
pStrm->StartElement( "text:list-level-style-number" );
@@ -114,7 +114,7 @@ void XFListLevelBullet::ToXml(IXFStream *pStrm)
IXFAttrList *pAttrList = pStrm->GetAttrList();
pAttrList->Clear();
- pAttrList->AddAttribute( "text:level", Int16ToOUString(m_nLevel) );
+ pAttrList->AddAttribute( "text:level", OUString::number((sal_Int32)m_nLevel) );
//text:style-name,ignore now.
m_aNumFmt.ToXml(pStrm);
//bullet-char
diff --git a/lotuswordpro/source/filter/xfilter/xfnumfmt.hxx b/lotuswordpro/source/filter/xfilter/xfnumfmt.hxx
index eca8902..3122ae1 100644
--- a/lotuswordpro/source/filter/xfilter/xfnumfmt.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfnumfmt.hxx
@@ -137,7 +137,7 @@ public:
pAttrList->AddAttribute( "style:num-suffix", m_strSuffix );
pAttrList->AddAttribute( "style:num-format", m_strFormat );
if( m_nStartValue != 0 )
- pAttrList->AddAttribute( "text:start-value", Int16ToOUString(m_nStartValue) );
+ pAttrList->AddAttribute( "text:start-value", OUString::number((sal_Int32)m_nStartValue) );
}
private:
OUString m_strPrefix;
diff --git a/lotuswordpro/source/filter/xfilter/xfutil.cxx b/lotuswordpro/source/filter/xfilter/xfutil.cxx
index 9ea0090..e480f7b 100644
--- a/lotuswordpro/source/filter/xfilter/xfutil.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfutil.cxx
@@ -64,17 +64,6 @@
#include <rtl/ustrbuf.hxx>
#include <sstream>
-OUString Int16ToOUString(sal_Int16 num)
-{
- /*std::stringstream sstrm;
-
- sstrm<<(int)num;
- return OUString::createFromAscii(sstrm.str().c_str());
- */
- sal_Int32 nNum = static_cast<sal_Int32>(num);
- return OUString::number(nNum);
-}
-
OUString FloatToOUString(float num, sal_Int32 /*precision*/)
{
/*std::stringstream sstrm;
diff --git a/lotuswordpro/source/filter/xfilter/xfutil.hxx b/lotuswordpro/source/filter/xfilter/xfutil.hxx
index 7ebd187..c224392 100644
--- a/lotuswordpro/source/filter/xfilter/xfutil.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfutil.hxx
@@ -65,8 +65,6 @@
#include <rtl/ustring.hxx>
#include <string>
-OUString Int16ToOUString(sal_Int16 num);
-
OUString FloatToOUString(float num, sal_Int32 precision=6);
OUString DateTimeToOUString(XFDateTime& dt);
More information about the Libreoffice-commits
mailing list