[Libreoffice-commits] core.git: 2 commits - editeng/source i18npool/source include/rtl writerfilter/source xmloff/source
Michael Stahl
mstahl at redhat.com
Fri Jan 23 06:56:49 PST 2015
editeng/source/editeng/editdoc.cxx | 2 +-
i18npool/source/breakiterator/xdictionary.cxx | 4 ++--
i18npool/source/localedata/localedata.cxx | 3 ++-
include/rtl/strbuf.hxx | 3 ---
include/rtl/ustrbuf.hxx | 3 ---
writerfilter/source/dmapper/DomainMapper.cxx | 2 +-
writerfilter/source/dmapper/LoggedResources.cxx | 2 +-
xmloff/source/style/fonthdl.cxx | 2 +-
xmloff/source/style/xmlnumfe.cxx | 4 ++--
9 files changed, 10 insertions(+), 15 deletions(-)
New commits:
commit 9964b4087924777d2bd585a5d6ce5c088ef65b65
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jan 23 15:40:46 2015 +0100
fix 64-bit build after OUStringBuffer change
Change-Id: I6c5295110292ae48ff0cb3472e4dbea287645d2a
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 7ded8e7..23441a9 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -2206,7 +2206,7 @@ OUString EditDoc::GetText( LineEnd eEnd ) const
const OUString aSep = EditDoc::GetSepStr( eEnd );
const sal_Int32 nSepSize = aSep.getLength();
- const sal_uLong nLen = GetTextLen() + (nNodes - 1)*nSepSize;
+ const sal_uInt32 nLen = GetTextLen() + (nNodes - 1)*nSepSize;
OUStringBuffer aBuffer(nLen + 16); // leave some slack
diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx
index 965b9b0..5f14995 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -161,10 +161,10 @@ void xdictionary::initDictionaryData(const sal_Char *pLang)
aEntry.maLang = OString( pLang, strlen( pLang ) );
#ifdef SAL_DLLPREFIX
- OUStringBuffer aBuf( strlen( pLang ) + 7 + 6 ); // mostly "lib*.so" (with * == dict_zh)
+ OUStringBuffer aBuf( sal::static_int_cast<int>(strlen(pLang) + 7 + 6) ); // mostly "lib*.so" (with * == dict_zh)
aBuf.appendAscii( SAL_DLLPREFIX );
#else
- OUStringBuffer aBuf( strlen( pLang ) + 7 + 4 ); // mostly "*.dll" (with * == dict_zh)
+ OUStringBuffer aBuf( sal::static_int_cast<int>(strlen(pLang) + 7 + 4) ); // mostly "*.dll" (with * == dict_zh)
#endif
aBuf.appendAscii( "dict_" ).appendAscii( pLang ).appendAscii( SAL_DLLEXTENSION );
aEntry.mhModule = osl_loadModuleRelative( &thisModule, aBuf.makeStringAndClear().pData, SAL_LOADMODULE_DEFAULT );
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index a9ce490..dc2991d 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -476,7 +476,8 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
(bFallback && aFallback.equalsAscii(aLibTable[i].pLocale)))
{
#ifndef DISABLE_DYNLOADING
- OUStringBuffer aBuf(strlen(aLibTable[i].pLocale) + 1 + strlen(pFunction));
+ OUStringBuffer aBuf(sal::static_int_cast<int>(
+ strlen(aLibTable[i].pLocale) + 1 + strlen(pFunction)));
{
::osl::MutexGuard aGuard( maMutex );
for (size_t l = 0; l < maLookupTable.size(); l++)
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 223e3f1..9d13e22 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2944,7 +2944,7 @@ void DomainMapper::lcl_positivePercentage(const OUString& rText)
void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
{
OUString sText;
- OUStringBuffer aBuffer = OUStringBuffer(len);
+ OUStringBuffer aBuffer = OUStringBuffer(sal::static_int_cast<int>(len));
aBuffer.append( reinterpret_cast<const sal_Unicode *>(data_), len);
sText = aBuffer.makeStringAndClear();
diff --git a/writerfilter/source/dmapper/LoggedResources.cxx b/writerfilter/source/dmapper/LoggedResources.cxx
index da058be..1cb2ffa 100644
--- a/writerfilter/source/dmapper/LoggedResources.cxx
+++ b/writerfilter/source/dmapper/LoggedResources.cxx
@@ -188,7 +188,7 @@ void LoggedStream::utext(const sal_uInt8 * data, size_t len)
mHelper.startElement("data");
OUString sText;
- OUStringBuffer aBuffer = OUStringBuffer(len);
+ OUStringBuffer aBuffer = OUStringBuffer(sal::static_int_cast<int>(len));
aBuffer.append( reinterpret_cast<const sal_Unicode *>(data), len);
sText = aBuffer.makeStringAndClear();
diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx
index 5421f36..a5aa39b 100644
--- a/xmloff/source/style/fonthdl.cxx
+++ b/xmloff/source/style/fonthdl.cxx
@@ -117,7 +117,7 @@ bool XMLFontFamilyNamePropHdl::exportXML( OUString& rStrExpValue, const uno::Any
if( rValue >>= aStrFamilyName )
{
- OUStringBuffer sValue( aStrFamilyName.getLength() + 2L );
+ OUStringBuffer sValue( aStrFamilyName.getLength() + 2 );
sal_Int32 nPos = 0;
do
{
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index f848293..af92a11 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -305,7 +305,7 @@ SvXMLNumFmtExport::~SvXMLNumFmtExport()
static OUString lcl_CreateStyleName( sal_Int32 nKey, sal_Int32 nPart, bool bDefPart, const OUString& rPrefix )
{
- OUStringBuffer aFmtName( 10L );
+ OUStringBuffer aFmtName(10);
aFmtName.append( rPrefix );
aFmtName.append( nKey );
if (!bDefPart)
@@ -724,7 +724,7 @@ void SvXMLNumFmtExport::WriteMapElement_Impl( sal_Int32 nOp, double fLimit,
{
// style namespace
- OUStringBuffer aCondStr( 20L );
+ OUStringBuffer aCondStr(20);
aCondStr.appendAscii( "value()" ); //! define constant
switch ( nOp )
{
commit 4c752c44f8a0857c4f2dbd61aff6b2d10cf3b5e5
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jan 23 15:49:41 2015 +0100
sal: remove GCC 4.6 check, it does not claim C++11 support
Change-Id: Ica0ff6a36e64c732000ef900fa7aeafaf6da3e04
diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx
index 7c8abf0..f0fd1f1 100644
--- a/include/rtl/strbuf.hxx
+++ b/include/rtl/strbuf.hxx
@@ -97,8 +97,6 @@ public:
rtl_string_new_WithLength( &pData, length );
}
#if __cplusplus >= 201103L
- // GCC 4.6 lacks delegating ctors
-#if defined(__clang__) || !defined(__GNUC__) || (__GNUC__ > 4) || (__GNUC_MINOR__ > 6)
explicit OStringBuffer(unsigned int length)
: OStringBuffer(static_cast<int>(length))
{
@@ -118,7 +116,6 @@ public:
explicit OStringBuffer(char) = delete;
explicit OStringBuffer(sal_Unicode) = delete;
#endif
-#endif
/**
Constructs a string buffer so that it represents the same
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index d205c63..fdec924 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -92,8 +92,6 @@ public:
rtl_uString_new_WithLength( &pData, length );
}
#if __cplusplus >= 201103L
- // GCC 4.6 lacks delegating ctors
-#if defined(__clang__) || !defined(__GNUC__) || (__GNUC__ > 4) || (__GNUC_MINOR__ > 6)
explicit OUStringBuffer(unsigned int length)
: OUStringBuffer(static_cast<int>(length))
{
@@ -113,7 +111,6 @@ public:
explicit OUStringBuffer(char) = delete;
explicit OUStringBuffer(sal_Unicode) = delete;
#endif
-#endif
/**
Constructs a string buffer so that it represents the same
More information about the Libreoffice-commits
mailing list