summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-20 09:58:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-06-20 12:06:40 +0100
commit81099135677ac6997473ca01a297c32025c58662 (patch)
treee30d5e1d30e588af37a373da935faa8225ed209d
parent8c023fd645c8b83637ffcde4055886b2e4f94393 (diff)
ditch last (?) uses of UniString::UniString(sal_Unicode, ...)
Change-Id: Ie04a3465100d2f013f34168aaf136a20cd2f7e0d
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx3
-rw-r--r--filter/source/msfilter/msdffimp.cxx10
-rw-r--r--filter/source/msfilter/svdfppt.cxx13
-rw-r--r--sc/source/ui/docshell/impex.cxx4
-rw-r--r--sd/source/filter/ppt/propread.cxx6
-rw-r--r--sw/source/core/unocore/unochart.cxx4
-rw-r--r--sw/source/core/unocore/unotbl.cxx14
-rwxr-xr-xunusedcode.easy2
8 files changed, 27 insertions, 29 deletions
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 9fe02ca543a9..0a42576b6bc4 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -199,8 +199,7 @@ namespace pcr
_rValue >>= nValue;
if ( nValue )
{
- sal_Unicode nCharacter = nValue;
- sText = String( &nCharacter, 1 );
+ sText = rtl::OUString(static_cast<sal_Unicode>(nValue));
}
}
else
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 865bcfd0a131..fbcc445f9f54 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3728,7 +3728,7 @@ void SvxMSDffManager::ReadObjText( const String& rText, SdrObject* pObj ) const
rOutliner.SetVertical( pText->IsVerticalWriting() );
sal_uInt16 nParaIndex = 0;
- sal_uInt32 nParaSize;
+ sal_Int32 nParaSize;
const sal_Unicode* pCurrent, *pBuf = rText.GetBuffer();
const sal_Unicode* pEnd = rText.GetBuffer() + rText.Len();
@@ -3752,12 +3752,12 @@ void SvxMSDffManager::ReadObjText( const String& rText, SdrObject* pObj ) const
break;
}
else
- nParaSize++;
+ ++nParaSize;
}
ESelection aSelection( nParaIndex, 0, nParaIndex, 0 );
- String aParagraph( pCurrent, (sal_uInt16)nParaSize );
- if ( !nParaIndex && !aParagraph.Len() ) // SJ: we are crashing if the first paragraph is empty ?
- aParagraph += (sal_Unicode)' '; // otherwise these two lines can be removed.
+ rtl::OUString aParagraph( pCurrent, nParaSize );
+ if ( !nParaIndex && aParagraph.isEmpty() ) // SJ: we are crashing if the first paragraph is empty ?
+ aParagraph += rtl::OUString(' '); // otherwise these two lines can be removed.
rOutliner.Insert( aParagraph, nParaIndex, 0 );
rOutliner.SetParaAttribs( nParaIndex, rOutliner.GetEmptyItemSet() );
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index d4988a0d9164..5575ef4debe1 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -442,7 +442,7 @@ SvStream& operator>>( SvStream& rIn, PptFontEntityAtom& rAtom )
cData[ i ] = ( nTemp >> 8 ) | ( nTemp << 8 );
#endif
}
- rAtom.aName = String( cData, i );
+ rAtom.aName = rtl::OUString(cData, i);
OutputDevice* pDev = (OutputDevice*)Application::GetDefaultDevice();
rAtom.bAvailable = pDev->IsFontAvailable( rAtom.aName );
aHd.SeekToEndOfRecord( rIn );
@@ -2217,14 +2217,14 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
{
PPTPortionObj* pPortion;
sal_Unicode* pParaText = new sal_Unicode[ nTextSize ];
- sal_uInt32 nCurrentIndex = 0;
+ sal_Int32 nCurrentIndex = 0;
for ( pPortion = pPara->First(); pPortion; pPortion = pPara->Next() )
{
if ( pPortion->mpFieldItem )
pParaText[ nCurrentIndex++ ] = ' ';
else
{
- sal_uInt32 nCharacters = pPortion->Count();
+ sal_Int32 nCharacters = pPortion->Count();
const sal_Unicode* pSource = pPortion->maString.GetBuffer();
sal_Unicode* pDest = pParaText + nCurrentIndex;
@@ -2233,9 +2233,8 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
PptFontEntityAtom* pFontEnityAtom = GetFontEnityAtom( nFont );
if ( pFontEnityAtom && ( pFontEnityAtom->eCharSet == RTL_TEXTENCODING_SYMBOL ) )
{
- sal_uInt32 i;
sal_Unicode nUnicode;
- for ( i = 0; i < nCharacters; i++ )
+ for (sal_Int32 i = 0; i < nCharacters; i++ )
{
nUnicode = pSource[ i ];
if ( ! ( nUnicode & 0xff00 ) )
@@ -2253,7 +2252,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
ESelection aSelection( nParaIndex, 0, nParaIndex, 0 );
rOutliner.Insert( String(), nParaIndex, pPara->pParaSet->mnDepth );
- rOutliner.QuickInsertText( String( pParaText, (sal_uInt16)nCurrentIndex ), aSelection );
+ rOutliner.QuickInsertText( rtl::OUString(pParaText, nCurrentIndex), aSelection );
rOutliner.SetParaAttribs( nParaIndex, rOutliner.GetEmptyItemSet() );
if ( pS )
rOutliner.SetStyleSheet( nParaIndex, pS );
@@ -5054,7 +5053,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con
}
}
if ( i )
- aString = String( pBuf, (sal_uInt16)i );
+ aString = rtl::OUString(pBuf, i);
delete[] pBuf;
}
else if( aTextHd.nRecType == PPT_PST_TextBytesAtom )
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index a0bb6cdf2050..392d855e0f35 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1881,8 +1881,8 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm )
const sal_Unicode* p0 = p;
while( *p && *p != ';' )
p++;
- String aNumber( p0, sal::static_int_cast<xub_StrLen>( p - p0 ) );
- nFormat = aNumber.ToInt32();
+ rtl::OUString aNumber(p0, p - p0);
+ nFormat = aNumber.toInt32();
}
break;
}
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 8ca34ebfb626..52b9e5b25a2d 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -114,7 +114,7 @@ sal_Bool PropItem::Read( String& rString, sal_uInt32 nStringType, sal_Bool bAlig
sal_Unicode* pWString = (sal_Unicode*)pString;
for ( i = 0; i < nItemSize; i++ )
*this >> pWString[ i ];
- rString = String( pWString, lcl_getMaxSafeStrLen(nItemSize) );
+ rString = rtl::OUString(pWString, lcl_getMaxSafeStrLen(nItemSize));
}
else
rString = String();
@@ -156,7 +156,7 @@ sal_Bool PropItem::Read( String& rString, sal_uInt32 nStringType, sal_Bool bAlig
if ( pString[ i - 1 ] == 0 )
{
if ( (sal_uInt16)nItemSize > 1 )
- rString = String( pString, lcl_getMaxSafeStrLen(nItemSize) );
+ rString = rtl::OUString(pString, lcl_getMaxSafeStrLen(nItemSize));
else
rString = String();
bRetValue = sal_True;
@@ -304,7 +304,7 @@ sal_Bool Section::GetDictionary( Dictionary& rDict )
sal_Unicode* pWString = (sal_Unicode*)pString;
for ( i = 0; i < nSize; i++ )
aStream >> pWString[ i ];
- aString = String( pWString, lcl_getMaxSafeStrLen(nSize) );
+ aString = rtl::OUString(pWString, lcl_getMaxSafeStrLen(nSize));
}
else
aString = rtl::OUString(pString, lcl_getMaxSafeStrLen(nSize), mnTextEnc);
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index d5628f7ca7b0..9ddee9633e64 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -2190,12 +2190,12 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::generateLabel(
if (bUseCol)
{
aRplc = String::CreateFromAscii( "%COLUMNLETTER" );
- aNew = String( aCellName.GetBuffer(), static_cast<xub_StrLen>(pBuf - aCellName.GetBuffer()) );
+ aNew = rtl::OUString(aCellName.GetBuffer(), pBuf - aCellName.GetBuffer());
}
else
{
aRplc = String::CreateFromAscii( "%ROWNUMBER" );
- aNew = String( pBuf, static_cast<xub_StrLen>((aCellName.GetBuffer() + nLen) - pBuf) );
+ aNew = rtl::OUString(pBuf, (aCellName.GetBuffer() + nLen) - pBuf);
}
xub_StrLen nPos = aTxt.Search( aRplc );
if (nPos != STRING_NOTFOUND)
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 7fd61afdf97b..78027ba4e382 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -350,18 +350,18 @@ void lcl_GetCellPosition( const String &rCellName,
// start of number found?
if (pBuf < pEnd && ('0' <= *pBuf && *pBuf <= '9'))
{
- String aColTxt( rCellName.GetBuffer(), static_cast< xub_StrLen >(pBuf - rCellName.GetBuffer()) );
- String aRowTxt( pBuf, static_cast< xub_StrLen >(rCellName.GetBuffer() + nLen - pBuf) );
- if (aColTxt.Len() && aRowTxt.Len())
+ rtl::OUString aColTxt(rCellName.GetBuffer(), pBuf - rCellName.GetBuffer());
+ rtl::OUString aRowTxt(pBuf, (rCellName.GetBuffer() + nLen - pBuf));
+ if (!aColTxt.isEmpty() && !aRowTxt.isEmpty())
{
sal_Int32 nColIdx = 0;
- sal_Int32 nLength = aColTxt.Len();
- for (xub_StrLen i = 0; i < nLength; ++i)
+ sal_Int32 nLength = aColTxt.getLength();
+ for (sal_Int32 i = 0; i < nLength; ++i)
{
nColIdx = 52 * nColIdx;
if (i < nLength - 1)
++nColIdx;
- sal_Unicode cChar = aColTxt.GetBuffer()[i];
+ sal_Unicode cChar = aColTxt[i];
if ('A' <= cChar && cChar <= 'Z')
nColIdx = nColIdx + (cChar - 'A');
else if ('a' <= cChar && cChar <= 'z')
@@ -374,7 +374,7 @@ void lcl_GetCellPosition( const String &rCellName,
}
rColumn = nColIdx;
- rRow = aRowTxt.ToInt32() - 1; // - 1 because indices ought to be 0 based
+ rRow = aRowTxt.toInt32() - 1; // - 1 because indices ought to be 0 based
}
}
}
diff --git a/unusedcode.easy b/unusedcode.easy
index d23ad1bf294d..ffc27a2fe4d5 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -206,7 +206,7 @@ VCLXPrinterServer::getImplementationId()
VCLXPrinterServer::getTypes()
VclEventListeners2::~VclEventListeners2()
ViewShell::getIDocumentFieldsAccess() const
-VirtualDevice::SetOutputSizePixelAndBuffer(Size const&, boost::shared_array<unsigned char> const&)
+VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer(Size const&, Fraction const&, Point const&, boost::shared_array<unsigned char> const&)
Window::PostUserEvent(unsigned long&, unsigned long, void*)
X11SalGraphics::SetMask(int&, int&, unsigned int&, unsigned int&, int&, int&, unsigned long)
X509Certificate_NssImpl::getImplementation(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>)