[Libreoffice-commits] .: 2 commits - basic/source sdext/source vcl/unx writerfilter/source
Thorsten Behrens
thorsten at kemper.freedesktop.org
Mon Nov 28 05:57:05 PST 2011
basic/source/sbx/sbxcurr.cxx | 10 +++---
sdext/source/pdfimport/tree/imagecontainer.cxx | 14 ++++----
vcl/unx/gtk/app/gtkinst.cxx | 2 -
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 2 -
writerfilter/source/dmapper/ConversionHelper.cxx | 38 +++++++++++------------
5 files changed, 33 insertions(+), 33 deletions(-)
New commits:
commit 75dbef14bb484e018f9019c82b7bd9d54549401c
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Mon Nov 28 14:18:04 2011 +0100
Headless got moved, fix gtk3 build.
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index a16df25..f3f1343 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -611,7 +611,7 @@ GenPspGraphics *GtkInstance::CreatePrintGraphics()
}
#if GTK_CHECK_VERSION(3,0,0)
-#include "../../headless/svpinst.cxx"
+#include "../../../headless/svpinst.cxx"
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index cb84e15..1a9f5b9 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -28,7 +28,7 @@
// Gross inclusion hacks for now ...
-#include "../../headless/svpgdi.cxx"
+#include "../../../headless/svpgdi.cxx"
#include <unx/gtk/gtkframe.hxx>
#include <unx/gtk/gtkdata.hxx>
#include <unx/gtk/gtkinst.hxx>
commit 13673b71bc9936d4a8c97f86c7d6f4e713839b40
Author: August Sodora <augsod at gmail.com>
Date: Sat Nov 26 02:03:23 2011 -0500
Remove uses of OUString::setCharAt
diff --git a/basic/source/sbx/sbxcurr.cxx b/basic/source/sbx/sbxcurr.cxx
index 5f2e89c..20a3968 100644
--- a/basic/source/sbx/sbxcurr.cxx
+++ b/basic/source/sbx/sbxcurr.cxx
@@ -85,13 +85,13 @@ static rtl::OUString ImpCurrencyToString( const sal_Int64 &rVal )
for ( sal_Int32 charCpyIndex = aAbsStr.getLength() - 1; nInsertIndex >= nEndIndex; ++nDigitCount )
{
if ( nDigitCount == 4 )
- aBuf.setCharAt( nInsertIndex--, cDecimalSep );
+ aBuf[nInsertIndex--] = cDecimalSep;
#if MAYBEFUTURE
if ( nDigitCount > 4 && ! ( ( nDigitCount - 4 ) % 3) )
- aBuf.setCharAt( nInsertIndex--, cThousandSep );
+ aBuf[nInsertIndex--] = cThousandSep;
#endif
if ( nDigitCount < initialLen )
- aBuf.setCharAt( nInsertIndex--, aAbsStr[ charCpyIndex-- ] );
+ aBuf[nInsertIndex--] = aAbsStr[ charCpyIndex-- ];
else
// Handle leading 0's to right of decimal point
// Note: in VBA the stringification is a little more complex
@@ -104,10 +104,10 @@ static rtl::OUString ImpCurrencyToString( const sal_Int64 &rVal )
// 0 0.0000 0
// 0.1 0.1000 0.1
- aBuf.setCharAt( nInsertIndex--, (sal_Unicode)'0' );
+ aBuf[nInsertIndex--] = (sal_Unicode)'0';
}
if ( isNeg )
- aBuf.setCharAt( nInsertIndex, (sal_Unicode)'-' );
+ aBuf[nInsertIndex] = (sal_Unicode)'-';
aAbsStr = aBuf.makeStringAndClear();
return aAbsStr;
diff --git a/sdext/source/pdfimport/tree/imagecontainer.cxx b/sdext/source/pdfimport/tree/imagecontainer.cxx
index 921b573..d6ab304 100644
--- a/sdext/source/pdfimport/tree/imagecontainer.cxx
+++ b/sdext/source/pdfimport/tree/imagecontainer.cxx
@@ -73,16 +73,16 @@ rtl::OUString encodeBase64( const sal_Int8* i_pBuffer, const sal_uInt32 i_nBuffe
aBuf.appendAscii("====");
sal_uInt8 nIndex (static_cast<sal_uInt8>((nBinary & 0xFC0000) >> 18));
- aBuf.setCharAt(nBufPos, aBase64EncodeTable [nIndex]);
+ aBuf[nBufPos] = aBase64EncodeTable [nIndex];
nIndex = static_cast<sal_uInt8>((nBinary & 0x3F000) >> 12);
- aBuf.setCharAt(nBufPos+1, aBase64EncodeTable [nIndex]);
+ aBuf[nBufPos+1] = aBase64EncodeTable [nIndex];
nIndex = static_cast<sal_uInt8>((nBinary & 0xFC0) >> 6);
- aBuf.setCharAt(nBufPos+2, aBase64EncodeTable [nIndex]);
+ aBuf[nBufPos+2] = aBase64EncodeTable [nIndex];
nIndex = static_cast<sal_uInt8>((nBinary & 0x3F));
- aBuf.setCharAt(nBufPos+3, aBase64EncodeTable [nIndex]);
+ aBuf[nBufPos+3] = aBase64EncodeTable [nIndex];
}
if( nRemain > 0 )
{
@@ -98,15 +98,15 @@ rtl::OUString encodeBase64( const sal_Int8* i_pBuffer, const sal_uInt32 i_nBuffe
break;
}
sal_uInt8 nIndex (static_cast<sal_uInt8>((nBinary & 0xFC0000) >> 18));
- aBuf.setCharAt(nBufPos, aBase64EncodeTable [nIndex]);
+ aBuf[nBufPos] = aBase64EncodeTable [nIndex];
nIndex = static_cast<sal_uInt8>((nBinary & 0x3F000) >> 12);
- aBuf.setCharAt(nBufPos+1, aBase64EncodeTable [nIndex]);
+ aBuf[nBufPos+1] = aBase64EncodeTable [nIndex];
if( nRemain == 2 )
{
nIndex = static_cast<sal_uInt8>((nBinary & 0xFC0) >> 6);
- aBuf.setCharAt(nBufPos+2, aBase64EncodeTable [nIndex]);
+ aBuf[nBufPos+2] = aBase64EncodeTable [nIndex];
}
}
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx
index a1ebac5..a803477 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -224,9 +224,9 @@ void lcl_SwapQuotesInField(::rtl::OUString &rFmt)
for (sal_Int32 nI = 0; nI < nLen; ++nI)
{
if ((pFmt[nI] == '\"') && (!nI || pFmt[nI-1] != '\\'))
- aBuffer.setCharAt(nI, '\'');
+ aBuffer[nI] = '\'';
else if ((pFmt[nI] == '\'') && (!nI || pFmt[nI-1] != '\\'))
- aBuffer.setCharAt(nI, '\"');
+ aBuffer[nI] = '\"';
}
rFmt = aBuffer.makeStringAndClear();
}
@@ -235,8 +235,8 @@ bool lcl_IsNotAM(::rtl::OUString& rFmt, sal_Int32 nPos)
return (
(nPos == rFmt.getLength() - 1) ||
(
- (rFmt.getStr()[nPos+1] != 'M') &&
- (rFmt.getStr()[nPos+1] != 'm')
+ (rFmt[nPos+1] != 'M') &&
+ (rFmt[nPos+1] != 'm')
)
);
}
@@ -253,34 +253,34 @@ bool lcl_IsNotAM(::rtl::OUString& rFmt, sal_Int32 nPos)
sal_Int32 nLen = sFormat.getLength();
sal_Int32 nI = 0;
// const sal_Unicode* pFormat = sFormat.getStr();
- ::rtl::OUStringBuffer aNewFormat( sFormat.getStr() );
+ ::rtl::OUStringBuffer aNewFormat( sFormat );
while (nI < nLen)
{
- if (aNewFormat.charAt(nI) == '\\')
+ if (aNewFormat[nI] == '\\')
nI++;
- else if (aNewFormat.charAt(nI) == '\"')
+ else if (aNewFormat[nI] == '\"')
{
++nI;
//While not at the end and not at an unescaped end quote
- while ((nI < nLen) && (!(aNewFormat.charAt(nI) == '\"') && (aNewFormat.charAt(nI-1) != '\\')))
+ while ((nI < nLen) && (!(aNewFormat[nI] == '\"') && (aNewFormat[nI-1] != '\\')))
++nI;
}
else //normal unquoted section
{
- sal_Unicode nChar = aNewFormat.charAt(nI);
+ sal_Unicode nChar = aNewFormat[nI];
if (nChar == 'O')
{
- aNewFormat.setCharAt(nI, 'M');
+ aNewFormat[nI] = 'M';
bForceNatNum = true;
}
else if (nChar == 'o')
{
- aNewFormat.setCharAt(nI, 'm');
+ aNewFormat[nI] = 'm';
bForceNatNum = true;
}
else if ((nChar == 'A') && lcl_IsNotAM(sFormat, nI))
{
- aNewFormat.setCharAt(nI, 'D');
+ aNewFormat[nI] = 'D';
bForceNatNum = true;
}
else if ((nChar == 'g') || (nChar == 'G'))
@@ -289,11 +289,11 @@ bool lcl_IsNotAM(::rtl::OUString& rFmt, sal_Int32 nPos)
bForceJapanese = true;
else if (nChar == 'E')
{
- if ((nI != nLen-1) && (aNewFormat.charAt(nI+1) == 'E'))
+ if ((nI != nLen-1) && (aNewFormat[nI+1] == 'E'))
{
//todo: this cannot be the right way to replace a part of the string!
- aNewFormat.setCharAt( nI, 'Y' );
- aNewFormat.setCharAt( nI + 1, 'Y' );
+ aNewFormat[nI] = 'Y';
+ aNewFormat[nI + 1] = 'Y';
aNewFormat.insert(nI + 2, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YY")));
nLen+=2;
nI+=3;
@@ -302,11 +302,11 @@ bool lcl_IsNotAM(::rtl::OUString& rFmt, sal_Int32 nPos)
}
else if (nChar == 'e')
{
- if ((nI != nLen-1) && (aNewFormat.charAt(nI+1) == 'e'))
+ if ((nI != nLen-1) && (aNewFormat[nI+1] == 'e'))
{
//todo: this cannot be the right way to replace a part of the string!
- aNewFormat.setCharAt( nI, 'y' );
- aNewFormat.setCharAt( nI + 1, 'y' );
+ aNewFormat[nI] = 'y';
+ aNewFormat[nI + 1] = 'y';
aNewFormat.insert(nI + 2, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("yy")));
nLen+=2;
nI+=3;
@@ -317,7 +317,7 @@ bool lcl_IsNotAM(::rtl::OUString& rFmt, sal_Int32 nPos)
{
// MM We have to escape '/' in case it's used as a char
//todo: this cannot be the right way to replace a part of the string!
- aNewFormat.setCharAt( nI, '\\' );
+ aNewFormat[nI] = '\\';
aNewFormat.insert(nI + 1, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")));
nI++;
nLen++;
More information about the Libreoffice-commits
mailing list