summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2013-07-05 16:25:03 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-07-07 20:00:16 +0000
commit009851223b5ced4ed2662af2e2ae81c0f9200e45 (patch)
treea8ab339589ea23b98513d394eabc4f135e69ccae /svl
parent35b42a9d1282a92dbc9a7fbc51d279812070688c (diff)
module svl: all String and some bool and related clean-up
Change-Id: I36eb559fa58dbe75384b7119c788af0048813aed Reviewed-on: https://gerrit.libreoffice.org/4733 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/fsstor/fsstorage.cxx3
-rw-r--r--svl/source/items/itemprop.cxx82
-rw-r--r--svl/source/items/macitem.cxx2
-rw-r--r--svl/source/items/style.cxx112
-rw-r--r--svl/source/misc/inethist.cxx12
-rw-r--r--svl/source/numbers/zforlist.cxx91
-rw-r--r--svl/source/numbers/zformat.cxx6
-rw-r--r--svl/source/numbers/zforscan.cxx6
-rw-r--r--svl/source/svdde/ddecli.cxx116
-rw-r--r--svl/source/svdde/ddedata.cxx12
-rw-r--r--svl/source/svdde/ddesvr.cxx326
-rw-r--r--svl/source/undo/undo.cxx60
-rw-r--r--svl/unx/source/svdde/ddedummy.cxx139
13 files changed, 480 insertions, 487 deletions
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index f42f952b0cac..5d5bfefe1616 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -49,7 +49,6 @@
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/exc_hlp.hxx>
-#include <tools/string.hxx>
#include <tools/urlobj.hxx>
#include <unotools/ucbhelper.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -480,7 +479,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement(
else
{
// TODO: test whether it really works for http and fwp
- SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( String(aFileURL.GetMainURL( INetURLObject::NO_DECODE )),
+ SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aFileURL.GetMainURL( INetURLObject::NO_DECODE ),
STREAM_STD_WRITE );
if ( pStream )
{
diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx
index 001ed129960c..00ca36e2218c 100644
--- a/svl/source/items/itemprop.cxx
+++ b/svl/source/items/itemprop.cxx
@@ -130,7 +130,7 @@ beans::Property SfxItemPropertyMap::getPropertyByName( const OUString rName ) co
return aProp;
}
-sal_Bool SfxItemPropertyMap::hasPropertyByName( const OUString& rName ) const
+bool SfxItemPropertyMap::hasPropertyByName( const OUString& rName ) const
{
SfxItemPropertyHashMap_t::const_iterator aIter = m_pImpl->find(rName);
return aIter != m_pImpl->end();
@@ -218,8 +218,8 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEn
}
void SfxItemPropertySet::getPropertyValue( const OUString &rName,
- const SfxItemSet& rSet, Any& rAny ) const
- throw(RuntimeException, UnknownPropertyException)
+ const SfxItemSet& rSet, Any& rAny ) const
+ throw(RuntimeException, UnknownPropertyException)
{
// detect which-id
const SfxItemPropertySimpleEntry* pEntry = m_aMap.getByName( rName );
@@ -229,8 +229,8 @@ void SfxItemPropertySet::getPropertyValue( const OUString &rName,
}
Any SfxItemPropertySet::getPropertyValue( const OUString &rName,
- const SfxItemSet& rSet ) const
- throw(RuntimeException, UnknownPropertyException)
+ const SfxItemSet& rSet ) const
+ throw(RuntimeException, UnknownPropertyException)
{
Any aVal;
getPropertyValue( rName,rSet, aVal );
@@ -238,10 +238,10 @@ Any SfxItemPropertySet::getPropertyValue( const OUString &rName,
}
void SfxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry& rEntry,
- const Any& aVal,
- SfxItemSet& rSet ) const
- throw(RuntimeException,
- IllegalArgumentException)
+ const Any& aVal,
+ SfxItemSet& rSet ) const
+ throw(RuntimeException,
+ IllegalArgumentException)
{
// get the SfxPoolItem
const SfxPoolItem* pItem = 0;
@@ -277,11 +277,11 @@ void SfxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry& rEn
}
void SfxItemPropertySet::setPropertyValue( const OUString &rName,
- const Any& aVal,
- SfxItemSet& rSet ) const
- throw(RuntimeException,
- IllegalArgumentException,
- UnknownPropertyException)
+ const Any& aVal,
+ SfxItemSet& rSet ) const
+ throw(RuntimeException,
+ IllegalArgumentException,
+ UnknownPropertyException)
{
const SfxItemPropertySimpleEntry* pEntry = m_aMap.getByName( rName );
if ( !pEntry )
@@ -292,7 +292,7 @@ void SfxItemPropertySet::setPropertyValue( const OUString &rName,
}
PropertyState SfxItemPropertySet::getPropertyState(const SfxItemPropertySimpleEntry& rEntry, const SfxItemSet& rSet) const
- throw()
+ throw()
{
PropertyState eRet = PropertyState_DIRECT_VALUE;
sal_uInt16 nWhich = rEntry.nWID;
@@ -306,9 +306,9 @@ PropertyState SfxItemPropertySet::getPropertyState(const SfxItemPropertySimpleEn
eRet = PropertyState_AMBIGUOUS_VALUE;
return eRet;
}
-PropertyState SfxItemPropertySet::getPropertyState(
- const OUString& rName, const SfxItemSet& rSet) const
- throw(UnknownPropertyException)
+
+PropertyState SfxItemPropertySet::getPropertyState(const OUString& rName, const SfxItemSet& rSet) const
+ throw(UnknownPropertyException)
{
PropertyState eRet = PropertyState_DIRECT_VALUE;
@@ -333,8 +333,7 @@ PropertyState SfxItemPropertySet::getPropertyState(
return eRet;
}
-Reference<XPropertySetInfo>
- SfxItemPropertySet::getPropertySetInfo() const
+Reference<XPropertySetInfo> SfxItemPropertySet::getPropertySetInfo() const
{
if( !m_xInfo.is() )
m_xInfo = new SfxItemPropertySetInfo( m_aMap );
@@ -346,21 +345,20 @@ struct SfxItemPropertySetInfo_Impl
SfxItemPropertyMap* m_pOwnMap;
};
-SfxItemPropertySetInfo::SfxItemPropertySetInfo(const SfxItemPropertyMap &rMap ) :
- m_pImpl( new SfxItemPropertySetInfo_Impl )
+SfxItemPropertySetInfo::SfxItemPropertySetInfo(const SfxItemPropertyMap &rMap )
+ : m_pImpl( new SfxItemPropertySetInfo_Impl )
{
m_pImpl->m_pOwnMap = new SfxItemPropertyMap( rMap );
}
-SfxItemPropertySetInfo::SfxItemPropertySetInfo(const SfxItemPropertyMapEntry *pEntries ) :
- m_pImpl( new SfxItemPropertySetInfo_Impl )
+SfxItemPropertySetInfo::SfxItemPropertySetInfo(const SfxItemPropertyMapEntry *pEntries )
+ : m_pImpl( new SfxItemPropertySetInfo_Impl )
{
m_pImpl->m_pOwnMap = new SfxItemPropertyMap( pEntries );
}
-Sequence< Property > SAL_CALL
- SfxItemPropertySetInfo::getProperties( )
- throw(RuntimeException)
+Sequence< Property > SAL_CALL SfxItemPropertySetInfo::getProperties( )
+ throw(RuntimeException)
{
return m_pImpl->m_pOwnMap->getProperties();
}
@@ -371,24 +369,21 @@ SfxItemPropertySetInfo::~SfxItemPropertySetInfo()
delete m_pImpl;
}
-Property SAL_CALL
- SfxItemPropertySetInfo::getPropertyByName( const OUString& rName )
- throw(UnknownPropertyException, RuntimeException)
+Property SAL_CALL SfxItemPropertySetInfo::getPropertyByName( const OUString& rName )
+ throw(UnknownPropertyException, RuntimeException)
{
return m_pImpl->m_pOwnMap->getPropertyByName( rName );
}
-sal_Bool SAL_CALL
- SfxItemPropertySetInfo::hasPropertyByName( const OUString& rName )
- throw(RuntimeException)
+sal_Bool SAL_CALL SfxItemPropertySetInfo::hasPropertyByName( const OUString& rName )
+ throw(RuntimeException)
{
return m_pImpl->m_pOwnMap->hasPropertyByName( rName );
}
-SfxExtItemPropertySetInfo::SfxExtItemPropertySetInfo(
- const SfxItemPropertyMapEntry *pMap,
- const Sequence<Property>& rPropSeq ) :
- aExtMap( pMap )
+SfxExtItemPropertySetInfo::SfxExtItemPropertySetInfo( const SfxItemPropertyMapEntry *pMap,
+ const Sequence<Property>& rPropSeq )
+ : aExtMap( pMap )
{
aExtMap.mergeProperties( rPropSeq );
}
@@ -397,22 +392,19 @@ SfxExtItemPropertySetInfo::~SfxExtItemPropertySetInfo()
{
}
-Sequence< Property > SAL_CALL
- SfxExtItemPropertySetInfo::getProperties( ) throw(RuntimeException)
+Sequence< Property > SAL_CALL SfxExtItemPropertySetInfo::getProperties( ) throw(RuntimeException)
{
return aExtMap.getProperties();
}
-Property SAL_CALL
-SfxExtItemPropertySetInfo::getPropertyByName( const OUString& rPropertyName )
- throw(UnknownPropertyException, RuntimeException)
+Property SAL_CALL SfxExtItemPropertySetInfo::getPropertyByName( const OUString& rPropertyName )
+ throw(UnknownPropertyException, RuntimeException)
{
return aExtMap.getPropertyByName( rPropertyName );
}
-sal_Bool SAL_CALL
-SfxExtItemPropertySetInfo::hasPropertyByName( const OUString& rPropertyName )
- throw(RuntimeException)
+sal_Bool SAL_CALL SfxExtItemPropertySetInfo::hasPropertyByName( const OUString& rPropertyName )
+ throw(RuntimeException)
{
return aExtMap.hasPropertyByName( rPropertyName );
}
diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx
index cd812c6c16d0..5484f5f21c7a 100644
--- a/svl/source/items/macitem.cxx
+++ b/svl/source/items/macitem.cxx
@@ -131,7 +131,7 @@ SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion )
for( short i = 0; i < nMacro; ++i )
{
sal_uInt16 nCurKey, eType = STARBASIC;
- String aLibName, aMacName;
+ OUString aLibName, aMacName;
rStrm >> nCurKey;
aLibName = SfxPoolItem::readByteString(rStrm);
aMacName = SfxPoolItem::readByteString(rStrm);
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 8c8c19314736..635480d42f93 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -62,8 +62,8 @@ TYPEINIT1(SfxStyleSheetPoolHint, SfxHint);
SfxStyleSheetHintExtended::SfxStyleSheetHintExtended
(
- sal_uInt16 nAction, // SFX_STYLESHEET_... (s.o.)
- const String& rOldName,
+ sal_uInt16 nAction, // SFX_STYLESHEET_... (s.o.)
+ const OUString& rOldName,
SfxStyleSheetBase& rStyleSheet // geh"ort weiterhin dem Aufrufer
)
: SfxStyleSheetHint( nAction, rStyleSheet ),
@@ -88,7 +88,7 @@ public:
};
-SfxStyleSheetBase::SfxStyleSheetBase( const XubString& rName, SfxStyleSheetBasePool* p, SfxStyleFamily eFam, sal_uInt16 mask )
+SfxStyleSheetBase::SfxStyleSheetBase( const OUString& rName, SfxStyleSheetBasePool* p, SfxStyleFamily eFam, sal_uInt16 mask )
: pPool( p )
, nFamily( eFam )
, aName( rName )
@@ -147,18 +147,19 @@ sal_uInt16 SfxStyleSheetBase::GetVersion() const
// Change name
-const XubString& SfxStyleSheetBase::GetName() const
+const OUString& SfxStyleSheetBase::GetName() const
{
return aName;
}
-bool SfxStyleSheetBase::SetName( const XubString& rName )
+bool SfxStyleSheetBase::SetName( const OUString& rName )
{
- if(rName.Len() == 0)
- return sal_False;
+ if(rName.isEmpty())
+ return false;
+
if( aName != rName )
{
- String aOldName = aName;
+ OUString aOldName = aName;
SfxStyleSheetBase *pOther = pPool->Find( rName, nFamily ) ;
if ( pOther && pOther != this )
return sal_False;
@@ -168,16 +169,17 @@ bool SfxStyleSheetBase::SetName( const XubString& rName )
pPool->SetSearchMask(nFamily);
- if ( aName.Len() )
+ if ( !aName.isEmpty() )
pPool->ChangeParent( aName, rName, sal_False );
- if ( aFollow.Equals( aName ) )
+
+ if ( aFollow == aName )
aFollow = rName;
aName = rName;
pPool->SetSearchMask(eTmpFam, nTmpMask);
pPool->Broadcast( SfxStyleSheetHintExtended(
SFX_STYLESHEET_MODIFIED, aOldName, *this ) );
}
- return sal_True;
+ return true;
}
OUString SfxStyleSheetBase::GetDisplayName() const
@@ -199,12 +201,12 @@ void SfxStyleSheetBase::SetDisplayName( const OUString& rDisplayName )
// Change Parent
-const XubString& SfxStyleSheetBase::GetParent() const
+const OUString& SfxStyleSheetBase::GetParent() const
{
return aParent;
}
-bool SfxStyleSheetBase::SetParent( const XubString& rName )
+bool SfxStyleSheetBase::SetParent( const OUString& rName )
{
if ( rName == aName )
return false;
@@ -212,19 +214,21 @@ bool SfxStyleSheetBase::SetParent( const XubString& rName )
if( aParent != rName )
{
SfxStyleSheetBase* pIter = pPool->Find(rName, nFamily);
- if( rName.Len() && !pIter )
+ if( !rName.isEmpty() && !pIter )
{
OSL_FAIL( "StyleSheet-Parent not found" );
return false;
}
// prevent recursive linkages
- if( aName.Len() )
+ if( !aName.isEmpty() )
+ {
while(pIter)
{
if(pIter->GetName() == aName)
return false;
pIter = pPool->Find(pIter->GetParent(), nFamily);
}
+ }
aParent = rName;
}
pPool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *this ) );
@@ -239,12 +243,12 @@ void SfxStyleSheetBase::SetHidden( sal_Bool hidden )
// Change follow
-const XubString& SfxStyleSheetBase::GetFollow() const
+const OUString& SfxStyleSheetBase::GetFollow() const
{
return aFollow;
}
-bool SfxStyleSheetBase::SetFollow( const XubString& rName )
+bool SfxStyleSheetBase::SetFollow( const OUString& rName )
{
if( aFollow != rName )
{
@@ -315,17 +319,17 @@ bool SfxStyleSheetBase::IsUsed() const
// eingestellte Attribute ausgeben
-XubString SfxStyleSheetBase::GetDescription()
+OUString SfxStyleSheetBase::GetDescription()
{
return GetDescription( SFX_MAPUNIT_CM );
}
// eingestellte Attribute ausgeben
-XubString SfxStyleSheetBase::GetDescription( SfxMapUnit eMetric )
+OUString SfxStyleSheetBase::GetDescription( SfxMapUnit eMetric )
{
SfxItemIter aIter( GetItemSet() );
- XubString aDesc;
+ OUString aDesc;
const SfxPoolItem* pItem = aIter.FirstItem();
IntlWrapper aIntlWrapper( SvtSysLocale().GetLanguageTag() );
@@ -338,8 +342,8 @@ XubString SfxStyleSheetBase::GetDescription( SfxMapUnit eMetric )
*pItem, SFX_ITEM_PRESENTATION_COMPLETE,
eMetric, aItemPresentation, &aIntlWrapper ) )
{
- if ( aDesc.Len() && !aItemPresentation.isEmpty() )
- aDesc.AppendAscii(" + ");
+ if ( !aDesc.isEmpty() && !aItemPresentation.isEmpty() )
+ aDesc += " + ";
if ( !aItemPresentation.isEmpty() )
aDesc += aItemPresentation;
}
@@ -355,8 +359,8 @@ SfxStyleFamily SfxStyleSheetIterator::GetSearchFamily() const
inline bool SfxStyleSheetIterator::IsTrivialSearch()
{
- return ( nMask & SFXSTYLEBIT_ALL_VISIBLE ) == SFXSTYLEBIT_ALL_VISIBLE
- && GetSearchFamily() == SFX_STYLE_FAMILY_ALL;
+ return (( nMask & SFXSTYLEBIT_ALL_VISIBLE ) == SFXSTYLEBIT_ALL_VISIBLE) &&
+ (GetSearchFamily() == SFX_STYLE_FAMILY_ALL);
}
bool SfxStyleSheetIterator::DoesStyleMatch(SfxStyleSheetBase *pStyle)
@@ -498,7 +502,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Find(const OUString& rStr)
// #98454# performance: in case of bSearchUsed==sal_True it may be
// significant to first compare the name and only if it matches to call
// the style sheet IsUsed() method in DoesStyleMatch().
- if ( pStyle->GetName().Equals( rStr ) && DoesStyleMatch( pStyle ) )
+ if ( pStyle->GetName() == rStr && DoesStyleMatch( pStyle ) )
{
nAktPosition = n;
return pAktStyle = pStyle;
@@ -517,8 +521,7 @@ sal_uInt16 SfxStyleSheetIterator::GetSearchMask() const
}
-void SfxStyleSheetBasePool::Replace(
- SfxStyleSheetBase& rSource, SfxStyleSheetBase& rTarget )
+void SfxStyleSheetBasePool::Replace( SfxStyleSheetBase& rSource, SfxStyleSheetBase& rTarget )
{
rTarget.SetFollow( rSource.GetFollow() );
rTarget.SetParent( rSource.GetParent() );
@@ -578,7 +581,7 @@ SfxStyleSheetBasePool::~SfxStyleSheetBasePool()
delete pImp;
}
-bool SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const XubString& rStyle, const XubString& rParent)
+bool SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const OUString& rStyle, const OUString& rParent)
{
SfxStyleSheetIterator aIter(this,eFam,SFXSTYLEBIT_ALL);
SfxStyleSheetBase *pStyle = aIter.Find(rStyle);
@@ -611,7 +614,7 @@ SfxStyleSheetIteratorPtr SfxStyleSheetBasePool::CreateIterator
SfxStyleSheetBase* SfxStyleSheetBasePool::Create
(
- const XubString& rName,
+ const OUString& rName,
SfxStyleFamily eFam,
sal_uInt16 mask
)
@@ -624,7 +627,7 @@ SfxStyleSheetBase* SfxStyleSheetBasePool::Create( const SfxStyleSheetBase& r )
return new SfxStyleSheetBase( r );
}
-SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const XubString& rName, SfxStyleFamily eFam, sal_uInt16 mask, sal_uInt16 nPos)
+SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const OUString& rName, SfxStyleFamily eFam, sal_uInt16 mask, sal_uInt16 nPos)
{
OSL_ENSURE( eFam != SFX_STYLE_FAMILY_ALL, "svl::SfxStyleSheetBasePool::Make(), FamilyAll is not a allowed Familie" );
@@ -698,7 +701,7 @@ SfxStyleSheetBase *SfxStyleSheetBasePool::operator[](sal_uInt16 nIdx)
return GetIterator_Impl()[nIdx];
}
-SfxStyleSheetBase* SfxStyleSheetBasePool::Find(const XubString& rName,
+SfxStyleSheetBase* SfxStyleSheetBasePool::Find(const OUString& rName,
SfxStyleFamily eFam,
sal_uInt16 mask)
{
@@ -793,15 +796,15 @@ void SfxStyleSheetBasePool::Clear()
}
}
-void SfxStyleSheetBasePool::ChangeParent(const XubString& rOld,
- const XubString& rNew,
+void SfxStyleSheetBasePool::ChangeParent(const OUString& rOld,
+ const OUString& rNew,
bool bVirtual)
{
const sal_uInt16 nTmpMask = GetSearchMask();
SetSearchMask(GetSearchFamily(), SFXSTYLEBIT_ALL);
for( SfxStyleSheetBase* p = First(); p; p = Next() )
{
- if( p->GetParent().Equals( rOld ) )
+ if( p->GetParent() == rOld )
{
if(bVirtual)
p->SetParent( rNew );
@@ -831,19 +834,21 @@ const SfxItemPool& SfxStyleSheetBasePool::GetPool() const
}
-SfxStyleSheet::SfxStyleSheet(const XubString &rName,
+SfxStyleSheet::SfxStyleSheet(const OUString &rName,
const SfxStyleSheetBasePool& r_Pool,
SfxStyleFamily eFam,
- sal_uInt16 mask ):
- SfxStyleSheetBase(rName, const_cast< SfxStyleSheetBasePool* >( &r_Pool ), eFam, mask)
-{}
+ sal_uInt16 mask )
+ : SfxStyleSheetBase(rName, const_cast< SfxStyleSheetBasePool* >( &r_Pool ), eFam, mask)
+{
+}
-SfxStyleSheet::SfxStyleSheet(const SfxStyleSheet& rStyle) :
- SfxStyleSheetBase(rStyle),
- SfxListener( rStyle ),
- SfxBroadcaster( rStyle ),
- svl::StyleSheetUser()
-{}
+SfxStyleSheet::SfxStyleSheet(const SfxStyleSheet& rStyle)
+ : SfxStyleSheetBase(rStyle)
+ , SfxListener( rStyle )
+ , SfxBroadcaster( rStyle )
+ , svl::StyleSheetUser()
+{
+}
SfxStyleSheet::~SfxStyleSheet()
{
@@ -851,22 +856,25 @@ SfxStyleSheet::~SfxStyleSheet()
}
-bool SfxStyleSheet::SetParent( const XubString& rName )
+bool SfxStyleSheet::SetParent( const OUString& rName )
{
if(aParent == rName)
return true;
- const XubString aOldParent(aParent);
- if(SfxStyleSheetBase::SetParent(rName)) {
+ const OUString aOldParent(aParent);
+ if(SfxStyleSheetBase::SetParent(rName))
+ {
// aus der Benachrichtigungskette des alten
// Parents gfs. austragen
- if(aOldParent.Len()) {
+ if(!aOldParent.isEmpty())
+ {
SfxStyleSheet *pParent = (SfxStyleSheet *)pPool->Find(aOldParent, nFamily, SFXSTYLEBIT_ALL);
if(pParent)
EndListening(*pParent);
}
// in die Benachrichtigungskette des neuen
// Parents eintragen
- if(aParent.Len()) {
+ if(!aParent.isEmpty())
+ {
SfxStyleSheet *pParent = (SfxStyleSheet *)pPool->Find(aParent, nFamily, SFXSTYLEBIT_ALL);
if(pParent)
StartListening(*pParent);
@@ -893,8 +901,8 @@ SfxStyleSheetPool::SfxStyleSheetPool( SfxItemPool const& rSet)
{
}
-SfxStyleSheetBase* SfxStyleSheetPool::Create( const XubString& rName,
- SfxStyleFamily eFam, sal_uInt16 mask )
+SfxStyleSheetBase* SfxStyleSheetPool::Create( const OUString& rName,
+ SfxStyleFamily eFam, sal_uInt16 mask )
{
return new SfxStyleSheet( rName, *this, eFam, mask );
}
@@ -905,7 +913,7 @@ SfxStyleSheetBase* SfxStyleSheetPool::Create( const SfxStyleSheet& r )
}
// class SfxUnoStyleSheet
-SfxUnoStyleSheet::SfxUnoStyleSheet( const UniString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, sal_uInt16 _nMaske )
+SfxUnoStyleSheet::SfxUnoStyleSheet( const OUString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, sal_uInt16 _nMaske )
: ::cppu::ImplInheritanceHelper2< SfxStyleSheet, ::com::sun::star::style::XStyle, ::com::sun::star::lang::XUnoTunnel >( _rName, _rPool, _eFamily, _nMaske )
{
}
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index 7dda81a7c621..167ccdc4909b 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -26,7 +26,6 @@
#include "rtl/crc.h"
#include <tools/solar.h>
#include <tools/debug.hxx>
-#include <tools/string.hxx>
#include <tools/urlobj.hxx>
/*========================================================================
@@ -201,8 +200,8 @@ public:
/** putUrl/queryUrl.
*/
- void putUrl (const String &rUrl);
- sal_Bool queryUrl (const String &rUrl);
+ void putUrl (const OUString &rUrl);
+ sal_Bool queryUrl (const OUString &rUrl);
};
/*========================================================================
@@ -292,7 +291,7 @@ void INetURLHistory_Impl::move (sal_uInt16 nSI, sal_uInt16 nDI)
/*
* putUrl.
*/
-void INetURLHistory_Impl::putUrl (const String &rUrl)
+void INetURLHistory_Impl::putUrl (const OUString &rUrl)
{
sal_uInt32 h = crc32 (rUrl);
sal_uInt16 k = find (h);
@@ -349,7 +348,7 @@ void INetURLHistory_Impl::putUrl (const String &rUrl)
/*
* queryUrl.
*/
-sal_Bool INetURLHistory_Impl::queryUrl (const String &rUrl)
+sal_Bool INetURLHistory_Impl::queryUrl (const OUString &rUrl)
{
sal_uInt32 h = crc32 (rUrl);
sal_uInt16 k = find (h);
@@ -417,8 +416,7 @@ void INetURLHistory::NormalizeUrl_Impl (INetURLObject &rUrl)
case INET_PROT_FILE:
if (!rUrl.IsCaseSensitive())
{
- String aPath (rUrl.GetURLPath(INetURLObject::NO_DECODE));
- aPath.ToLowerAscii();
+ OUString aPath (rUrl.GetURLPath(INetURLObject::NO_DECODE).toAsciiLowerCase());
rUrl.SetURLPath (aPath, INetURLObject::NOT_CANONIC);
}
break;
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 2dba599fb4b8..f75748ba6202 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -596,19 +596,6 @@ bool SvNumberFormatter::PutandConvertEntrySystem(OUString& rString,
return bRes;
}
-sal_uInt32 SvNumberFormatter::GetIndexPuttingAndConverting( String & rString, LanguageType eLnge,
- LanguageType eSysLnge, short & rType,
- bool & rNewInserted, xub_StrLen & rCheckPos )
-{
- sal_uInt32 result;
- OUString sTemp(rString);
- sal_Int32 nCheckPos = (rCheckPos == (xub_StrLen)0xFFFF) ? -1 : (sal_Int32)rCheckPos;
- result = GetIndexPuttingAndConverting(sTemp, eLnge, eSysLnge, rType, rNewInserted, nCheckPos);
- rCheckPos = nCheckPos < 0 ? (xub_StrLen)0xFFFF : (xub_StrLen)nCheckPos;
- rString = sTemp;
- return result;
-}
-
sal_uInt32 SvNumberFormatter::GetIndexPuttingAndConverting( OUString & rString, LanguageType eLnge,
LanguageType eSysLnge, short & rType,
bool & rNewInserted, sal_Int32 & rCheckPos )
@@ -1498,15 +1485,6 @@ void SvNumberFormatter::GetInputLineString(const double& fOutNumber,
}
}
-void SvNumberFormatter::GetInputLineString(const double& fOutNumber,
- sal_uInt32 nFIndex,
- String& rOutString)
-{
- OUString aTmp;
- GetInputLineString(fOutNumber, nFIndex, aTmp);
- rOutString = aTmp;
-}
-
void SvNumberFormatter::GetOutputString(const OUString& sString,
sal_uInt32 nFIndex,
OUString& sOutString,
@@ -1560,17 +1538,6 @@ void SvNumberFormatter::GetOutputString(const double& fOutNumber,
pFormat->SetStarFormatSupport( false );
}
-void SvNumberFormatter::GetOutputString(const double& fOutNumber,
- sal_uInt32 nFIndex,
- String& sOutString,
- Color** ppColor,
- bool bUseStarFormat )
-{
- OUString sTemp(sOutString);
- GetOutputString(fOutNumber, nFIndex, sTemp, ppColor, bUseStarFormat);
- sOutString = sTemp;
-}
-
bool SvNumberFormatter::GetPreviewString(const OUString& sFormatString,
double fPreviewNumber,
OUString& sOutString,
@@ -1824,22 +1791,22 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const ::com::sun::star::i18n
sal_uInt32 nPos, bool bAfterChangingSystemCL,
sal_Int16 nOrgIndex )
{
- String aCodeStr( rCode.Code );
+ OUString aCodeStr( rCode.Code );
if ( rCode.Index < NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS &&
rCode.Usage == ::com::sun::star::i18n::KNumberFormatUsage::CURRENCY &&
rCode.Index != NF_CURRENCY_1000DEC2_CCC )
{ // strip surrounding [$...] on automatic currency
- if ( aCodeStr.SearchAscii( "[$" ) != STRING_NOTFOUND )
+ if ( aCodeStr.indexOf( "[$" ) >= 0)
aCodeStr = SvNumberformat::StripNewCurrencyDelimiters( aCodeStr, false );
else
{
if (LocaleDataWrapper::areChecksEnabled() &&
rCode.Index != NF_CURRENCY_1000DEC2_CCC )
{
- OUString aMsg("SvNumberFormatter::ImpInsertFormat: no [$...] on currency format code, index ");
- aMsg += OUString::valueOf( sal_Int32(rCode.Index) );
- aMsg += ":\n";
- aMsg += rCode.Code;
+ OUString aMsg(OUString("SvNumberFormatter::ImpInsertFormat: no [$...] on currency format code, index ") +
+ OUString::valueOf( sal_Int32(rCode.Index)) +
+ OUString(":\n") +
+ rCode.Code);
LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
}
}
@@ -1856,10 +1823,10 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const ::com::sun::star::i18n
{
if (LocaleDataWrapper::areChecksEnabled())
{
- OUString aMsg( "SvNumberFormatter::ImpInsertFormat: bad format code, index " );
- aMsg += OUString::valueOf( sal_Int32(rCode.Index) );
- aMsg += "\n";
- aMsg += rCode.Code;
+ OUString aMsg( OUString("SvNumberFormatter::ImpInsertFormat: bad format code, index " ) +
+ OUString::valueOf( sal_Int32(rCode.Index) ) +
+ OUString("\n") +
+ rCode.Code);
LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
}
delete pFormat;
@@ -2842,7 +2809,7 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex,
else if (eType == NUMBERFORMAT_CURRENCY)
{
OUStringBuffer sNegStr(sString);
- String aCurr;
+ OUString aCurr;
const NfCurrencyEntry* pEntry;
bool bBank;
if ( GetNewCurrencySymbolString( nIndex, aCurr, &pEntry, &bBank ) )
@@ -3462,18 +3429,19 @@ inline
}
-bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat, String& rStr,
+bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat, OUString& rStr,
const NfCurrencyEntry** ppEntry /* = NULL */,
bool* pBank /* = NULL */ ) const
{
- rStr.Erase();
if ( ppEntry )
*ppEntry = NULL;
if ( pBank )
*pBank = false;
+
const SvNumberformat* pFormat = GetFormatEntry(nFormat);
if ( pFormat )
{
+ OUStringBuffer sBuff(128); // guess-estimate of a value that will pretty much garantee no re-alloc
OUString aSymbol, aExtension;
if ( pFormat->GetNewCurrencySymbol( aSymbol, aExtension ) )
{
@@ -3492,26 +3460,31 @@ bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat, String&
rStr = pFoundEntry->BuildSymbolString(bFoundBank);
}
}
- if ( !rStr.Len() )
+ if ( rStr.isEmpty() )
{ // analog to BuildSymbolString
- rStr = '[';
- rStr += '$';
+ sBuff.append("[$");
if ( aSymbol.indexOf( '-' ) != -1 ||
aSymbol.indexOf( ']' ) != -1 )
{
- rStr += '"';
- rStr += aSymbol;
- rStr += '"';
+ sBuff.append('"');
+ sBuff.append( aSymbol);
+ sBuff.append('"');
}
else
- rStr += aSymbol;
- if ( aExtension.getLength() )
- rStr += aExtension;
- rStr += ']';
+ {
+ sBuff.append(aSymbol);
+ }
+ if ( !aExtension.isEmpty() )
+ {
+ sBuff.append(aExtension);
+ }
+ sBuff.append(']');
}
+ rStr = sBuff.toString();
return true;
}
}
+ rStr = "";
return false;
}
@@ -4172,10 +4145,8 @@ void NfCurrencyEntry::CompleteNegativeFormatString(OUStringBuffer& rStr,
break;
case 11: // $ -1
{
- String aTmp( rSymStr );
- aTmp += ' ';
- aTmp += '-';
- rStr.insert(0, aTmp);
+ rStr.insert(0, " -");
+ rStr.insert(0, rSymStr);
}
break;
case 12 : // $ 1-
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 720ea8727953..abaf36b068b5 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1919,7 +1919,7 @@ void SvNumberformat::ConvertLanguage( SvNumberFormatter& rConverter,
// static
OUString SvNumberformat::LoadString( SvStream& rStream )
{
- CharSet eStream = rStream.GetStreamCharSet();
+ rtl_TextEncoding eStream = rStream.GetStreamCharSet();
OString aStr = read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStream);
sal_Char cStream = NfCurrencyEntry::GetEuroSymbol( eStream );
if (aStr.indexOf(cStream) < 0)
@@ -5024,7 +5024,7 @@ Color* SvNumberformat::GetColor( sal_uInt16 nNumFor ) const
static void lcl_SvNumberformat_AddLimitStringImpl( OUString& rStr,
SvNumberformatLimitOps eOp,
- double fLimit, const String& rDecSep )
+ double fLimit, const OUString& rDecSep )
{
if ( eOp != NUMBERFORMAT_OP_NO )
{
@@ -5054,7 +5054,7 @@ static void lcl_SvNumberformat_AddLimitStringImpl( OUString& rStr,
}
rStr += ::rtl::math::doubleToUString( fLimit,
rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max,
- rDecSep.GetChar(0), true);
+ rDecSep[0], true);
rStr += "]";
}
}
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 387da214ea8e..ce019296ed68 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -742,7 +742,7 @@ short ImpSvNumberformatScan::Next_Symbol( const OUString& rStr,
bool bCurrency = false;
// "Automatic" currency may start with keyword,
// like "R" (Rand) and 'R' (era)
- if ( nCurrPos != STRING_NOTFOUND &&
+ if ( nCurrPos >= 0 &&
nPos-1 + sCurString.getLength() <= rStr.getLength() &&
sCurString.indexOf( sKeyword[nTmpType] ) == 0 )
{
@@ -1314,7 +1314,7 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
case NUMBERFORMAT_FRACTION: // MM/SS
break;
default:
- if (nCurrPos != STRING_NOTFOUND)
+ if (nCurrPos >= 0)
{
eScannedType = NUMBERFORMAT_UNDEFINED;
}
@@ -1373,7 +1373,7 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
eScannedType = eNewType;
break;
default:
- if (nCurrPos != STRING_NOTFOUND)
+ if (nCurrPos >= 0)
{
eScannedType = NUMBERFORMAT_UNDEFINED;
}
diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx
index 168881144d35..f2d53cb51355 100644
--- a/svl/source/svdde/ddecli.cxx
+++ b/svl/source/svdde/ddecli.cxx
@@ -54,9 +54,9 @@ struct DdeImp
// --- DdeInternat::CliCallback() ----------------------------------
-HDDEDATA CALLBACK DdeInternal::CliCallback(
- WORD nCode, WORD nCbType, HCONV hConv, HSZ, HSZ hText2,
- HDDEDATA hData, DWORD nInfo1, DWORD )
+HDDEDATA CALLBACK DdeInternal::CliCallback( WORD nCode, WORD nCbType,
+ HCONV hConv, HSZ, HSZ hText2,
+ HDDEDATA hData, DWORD nInfo1, DWORD )
{
HDDEDATA nRet = DDE_FNOTPROCESSED;
const std::vector<DdeConnection*> &rAll = DdeConnection::GetConnections();
@@ -75,35 +75,35 @@ HDDEDATA CALLBACK DdeInternal::CliCallback(
if( self )
{
- sal_Bool bFound = sal_False;
+ bool bFound = false;
std::vector<DdeTransaction*>::iterator iter;
for( iter = self->aTransactions.begin(); iter != self->aTransactions.end(); ++iter )
{
switch( nCode )
{
- case XTYP_XACT_COMPLETE:
- if( (DWORD)(*iter)->nId == nInfo1 )
- {
- nCode = (*iter)->nType & (XCLASS_MASK | XTYP_MASK);
- (*iter)->bBusy = false;
- (*iter)->Done( 0 != hData );
- bFound = sal_True;
- }
- break;
+ case XTYP_XACT_COMPLETE:
+ if( (DWORD)(*iter)->nId == nInfo1 )
+ {
+ nCode = (*iter)->nType & (XCLASS_MASK | XTYP_MASK);
+ (*iter)->bBusy = false;
+ (*iter)->Done( 0 != hData );
+ bFound = true;
+ }
+ break;
- case XTYP_DISCONNECT:
- self->pImp->hConv = DdeReconnect( hConv );
- self->pImp->nStatus = self->pImp->hConv
- ? DMLERR_NO_ERROR
- : DdeGetLastError( pInst->hDdeInstCli );
- iter = self->aTransactions.end();
- nRet = 0;
- bFound = sal_True;
- break;
+ case XTYP_DISCONNECT:
+ self->pImp->hConv = DdeReconnect( hConv );
+ self->pImp->nStatus = self->pImp->hConv
+ ? DMLERR_NO_ERROR
+ : DdeGetLastError( pInst->hDdeInstCli );
+ iter = self->aTransactions.end();
+ nRet = 0;
+ bFound = true;
+ break;
- case XTYP_ADVDATA:
- bFound = sal_Bool( *(*iter)->pName == hText2 );
- break;
+ case XTYP_ADVDATA:
+ bFound = *(*iter)->pName == hText2;
+ break;
}
if( bFound )
break;
@@ -143,7 +143,7 @@ HDDEDATA CALLBACK DdeInternal::CliCallback(
// --- DdeConnection::DdeConnection() ------------------------------
-DdeConnection::DdeConnection( const String& rService, const String& rTopic )
+DdeConnection::DdeConnection( const OUString& rService, const OUString& rTopic )
{
pImp = new DdeImp;
pImp->nStatus = DMLERR_NO_ERROR;
@@ -212,33 +212,33 @@ DdeConnection::~DdeConnection()
// --- DdeConnection::IsConnected() --------------------------------
-sal_Bool DdeConnection::IsConnected()
+bool DdeConnection::IsConnected()
{
CONVINFO c;
c.cb = sizeof( c );
if ( DdeQueryConvInfo( pImp->hConv, QID_SYNC, &c ) )
- return sal_True;
+ return true;
else
{
DdeInstData* pInst = ImpGetInstData();
pImp->hConv = DdeReconnect( pImp->hConv );
pImp->nStatus = pImp->hConv ? DMLERR_NO_ERROR : DdeGetLastError( pInst->hDdeInstCli );
- return sal_Bool( pImp->nStatus == DMLERR_NO_ERROR );
+ return pImp->nStatus == DMLERR_NO_ERROR;
}
}
// --- DdeConnection::GetServiceName() -----------------------------
-const String& DdeConnection::GetServiceName()
+const OUString DdeConnection::GetServiceName()
{
- return (const String&)*pService;
+ return pService->toOUString();
}
// --- DdeConnection::GetTopicName() -------------------------------
-const String& DdeConnection::GetTopicName()
+const OUString DdeConnection::GetTopicName()
{
- return (const String&)*pTopic;
+ return pTopic->toOUString();
}
// --- DdeConnection::GetConvId() ----------------------------------
@@ -257,9 +257,9 @@ const std::vector<DdeConnection*>& DdeConnection::GetConnections()
// --- DdeTransaction::DdeTransaction() ----------------------------
-DdeTransaction::DdeTransaction( DdeConnection& d, const String& rItemName,
- long n ) :
- rDde( d )
+DdeTransaction::DdeTransaction( DdeConnection& d, const OUString& rItemName,
+ long n )
+ : rDde( d )
{
DdeInstData* pInst = ImpGetInstData();
pName = new DdeString( pInst->hDdeInstCli, rItemName );
@@ -360,7 +360,7 @@ void DdeTransaction::Data( const DdeData* p )
// --- DdeTransaction::Done() --------------------------------------
-void DdeTransaction::Done( sal_Bool bDataValid )
+void DdeTransaction::Done( bool bDataValid )
{
const sal_uIntPtr nDataValid(bDataValid);
aDone.Call( reinterpret_cast<void*>(nDataValid) );
@@ -368,8 +368,8 @@ void DdeTransaction::Done( sal_Bool bDataValid )
// --- DdeLink::DdeLink() ------------------------------------------
-DdeLink::DdeLink( DdeConnection& d, const String& aItemName, long n ) :
- DdeTransaction (d, aItemName, n)
+DdeLink::DdeLink( DdeConnection& d, const OUString& aItemName, long n )
+ : DdeTransaction (d, aItemName, n)
{
}
@@ -390,33 +390,33 @@ void DdeLink::Notify()
// --- DdeRequest::DdeRequest() ------------------------------------
-DdeRequest::DdeRequest( DdeConnection& d, const String& i, long n ) :
- DdeTransaction( d, i, n )
+DdeRequest::DdeRequest( DdeConnection& d, const OUString& i, long n )
+ : DdeTransaction( d, i, n )
{
nType = XTYP_REQUEST;
}
// --- DdeWarmLink::DdeWarmLink() ----------------------------------
-DdeWarmLink::DdeWarmLink( DdeConnection& d, const String& i, long n ) :
- DdeLink( d, i, n )
+DdeWarmLink::DdeWarmLink( DdeConnection& d, const OUString& i, long n )
+ : DdeLink( d, i, n )
{
nType = XTYP_ADVSTART | XTYPF_NODATA;
}
// --- DdeHotLink::DdeHotLink() ------------------------------------
-DdeHotLink::DdeHotLink( DdeConnection& d, const String& i, long n ) :
- DdeLink( d, i, n )
+DdeHotLink::DdeHotLink( DdeConnection& d, const OUString& i, long n )
+ : DdeLink( d, i, n )
{
nType = XTYP_ADVSTART;
}
// --- DdePoke::DdePoke() ------------------------------------------
-DdePoke::DdePoke( DdeConnection& d, const String& i, const char* p,
- long l, sal_uLong f, long n ) :
- DdeTransaction( d, i, n )
+DdePoke::DdePoke( DdeConnection& d, const OUString& i, const char* p,
+ long l, sal_uLong f, long n )
+ : DdeTransaction( d, i, n )
{
aDdeData = DdeData( p, l, f );
nType = XTYP_POKE;
@@ -424,19 +424,19 @@ DdePoke::DdePoke( DdeConnection& d, const String& i, const char* p,
// --- DdePoke::DdePoke() ------------------------------------------
-DdePoke::DdePoke( DdeConnection& d, const String& i, const String& rData,
- long n ) :
- DdeTransaction( d, i, n )
+DdePoke::DdePoke( DdeConnection& d, const OUString& i, const OUString& rData,
+ long n )
+ : DdeTransaction( d, i, n )
{
- aDdeData = DdeData( (void*) rData.GetBuffer(), sizeof(sal_Unicode) * (rData.Len()), CF_TEXT );
+ aDdeData = DdeData( (void*) rData.getStr(), sizeof(sal_Unicode) * (rData.getLength()), CF_TEXT );
nType = XTYP_POKE;
}
// --- DdePoke::DdePoke() ------------------------------------------
-DdePoke::DdePoke( DdeConnection& d, const String& i, const DdeData& rData,
- long n ) :
- DdeTransaction( d, i, n )
+DdePoke::DdePoke( DdeConnection& d, const OUString& i, const DdeData& rData,
+ long n )
+ : DdeTransaction( d, i, n )
{
aDdeData = rData;
nType = XTYP_POKE;
@@ -444,10 +444,10 @@ DdePoke::DdePoke( DdeConnection& d, const String& i, const DdeData& rData,
// --- DdeExecute::DdeExecute() ------------------------------------
-DdeExecute::DdeExecute( DdeConnection& d, const String& rData, long n ) :
- DdeTransaction( d, String(), n )
+DdeExecute::DdeExecute( DdeConnection& d, const OUString& rData, long n )
+ : DdeTransaction( d, OUString(), n )
{
- aDdeData = DdeData( (void*)rData.GetBuffer(), sizeof(sal_Unicode) * (rData.Len() + 1), CF_TEXT );
+ aDdeData = DdeData( (void*)rData.getStr(), sizeof(sal_Unicode) * (rData.getLength() + 1), CF_TEXT );
nType = XTYP_EXECUTE;
}
diff --git a/svl/source/svdde/ddedata.cxx b/svl/source/svdde/ddedata.cxx
index 4b4c051a8ca3..4c9e465f572f 100644
--- a/svl/source/svdde/ddedata.cxx
+++ b/svl/source/svdde/ddedata.cxx
@@ -55,12 +55,12 @@ DdeData::DdeData( const void* p, long n, sal_uLong f )
// --- DdeData::DdeData() ------------------------------------------
-DdeData::DdeData( const String& s )
+DdeData::DdeData( const OUString& s )
{
pImp = new DdeDataImp;
pImp->hData = NULL;
- pImp->pData = (LPBYTE)s.GetBuffer();
- pImp->nData = s.Len()+1;
+ pImp->pData = (LPBYTE)s.getStr();
+ pImp->nData = s.getLength()+1;
pImp->nFmt = CF_TEXT;
}
@@ -151,9 +151,9 @@ sal_uLong DdeData::GetExternalFormat( sal_uLong nFmt )
default:
{
#if defined(WNT)
- String aName( SotExchange::GetFormatName( nFmt ) );
- if( aName.Len() )
- nFmt = RegisterClipboardFormat( reinterpret_cast<LPCWSTR>(aName.GetBuffer()) );
+ OUString aName( SotExchange::GetFormatName( nFmt ) );
+ if( !aName.isEmpty() )
+ nFmt = RegisterClipboardFormat( reinterpret_cast<LPCWSTR>(aName.getStr()) );
#endif
}
}
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index eaafebb0afb0..25a3f3fd56c1 100644
--- a/svl/source/svdde/ddesvr.cxx
+++ b/svl/source/svdde/ddesvr.cxx
@@ -204,7 +204,7 @@ found:
return (HDDEDATA)NULL;
}
- sal_Bool bExec = sal_Bool(nCode == XTYP_EXECUTE);
+ bool bExec = nCode == XTYP_EXECUTE;
pTopic = pC->pTopic;
if ( pTopic && !bExec )
pItem = FindItem( *pTopic, hText2 );
@@ -220,14 +220,14 @@ found:
else
pTopic->aItem = OUString();
- sal_Bool bRes = sal_False;
+ bool bRes = false;
pInst->hCurConvSvr = (sal_IntPtr)hConv;
switch( nCode )
{
- case XTYP_REQUEST:
- case XTYP_ADVREQ:
- {
- String aRes; // darf erst am Ende freigegeben werden!!
+ case XTYP_REQUEST:
+ case XTYP_ADVREQ:
+ {
+ OUString aRes; // darf erst am Ende freigegeben werden!!
if ( pTopic->IsSystemTopic() )
{
if ( pTopic->aItem == reinterpret_cast<const sal_Unicode*>(SZDDESYS_ITEM_TOPICS) )
@@ -243,18 +243,22 @@ found:
else
aRes = pService->SysTopicGet( pTopic->aItem );
- if ( aRes.Len() )
+ if ( !aRes.isEmpty() )
pData = new DdeData( aRes );
else
pData = NULL;
}
else if( DDEGETPUTITEM == pItem->nType )
- pData = ((DdeGetPutItem*)pItem)->Get(
- DdeData::GetInternalFormat( nCbType ) );
+ {
+ pData = ((DdeGetPutItem*)pItem)->Get( DdeData::GetInternalFormat( nCbType ) );
+ }
else
+ {
pData = pTopic->Get( DdeData::GetInternalFormat( nCbType ));
+ }
if ( pData )
+ {
return DdeCreateDataHandle( pInst->hDdeInstSvr,
(LPBYTE)pData->pImp->pData,
pData->pImp->nData,
@@ -263,94 +267,95 @@ found:
pData->pImp->nFmt ),
0 );
}
- break;
+ }
+ break;
- case XTYP_POKE:
- if ( !pTopic->IsSystemTopic() )
- {
- DdeData d;
- d.pImp->hData = hData;
- d.pImp->nFmt = DdeData::GetInternalFormat( nCbType );
- d.Lock();
- if( DDEGETPUTITEM == pItem->nType )
- bRes = ((DdeGetPutItem*)pItem)->Put( &d );
- else
- bRes = pTopic->Put( &d );
- }
- pInst->hCurConvSvr = 0;
- if ( bRes )
- return (HDDEDATA)DDE_FACK;
+ case XTYP_POKE:
+ if ( !pTopic->IsSystemTopic() )
+ {
+ DdeData d;
+ d.pImp->hData = hData;
+ d.pImp->nFmt = DdeData::GetInternalFormat( nCbType );
+ d.Lock();
+ if( DDEGETPUTITEM == pItem->nType )
+ bRes = ((DdeGetPutItem*)pItem)->Put( &d );
else
- return (HDDEDATA) DDE_FNOTPROCESSED;
+ bRes = pTopic->Put( &d );
+ }
+ pInst->hCurConvSvr = 0;
+ if ( bRes )
+ return (HDDEDATA)DDE_FACK;
+ else
+ return (HDDEDATA) DDE_FNOTPROCESSED;
- case XTYP_ADVSTART:
+ case XTYP_ADVSTART:
+ {
+ // wird das Item zum erstenmal ein HotLink ?
+ if( !pItem->pImpData && pTopic->StartAdviseLoop() )
{
- // wird das Item zum erstenmal ein HotLink ?
- if( !pItem->pImpData && pTopic->StartAdviseLoop() )
+ // dann wurde das Item ausgewechselt
+ std::vector<DdeItem*>::iterator it(std::find(pTopic->aItems.begin(),
+ pTopic->aItems.end(),
+ pItem));
+ if (it != pTopic->aItems.end())
+ pTopic->aItems.erase(it);
+
+ std::vector<DdeItem*>::iterator iter;
+ for( iter = pTopic->aItems.begin();
+ iter != pTopic->aItems.end();
+ ++iter )
{
- // dann wurde das Item ausgewechselt
- std::vector<DdeItem*>::iterator it(std::find(pTopic->aItems.begin(),
- pTopic->aItems.end(),
- pItem));
- if (it != pTopic->aItems.end())
- pTopic->aItems.erase(it);
-
- std::vector<DdeItem*>::iterator iter;
- for( iter = pTopic->aItems.begin();
- iter != pTopic->aItems.end();
- ++iter )
+ if( *(*iter)->pName == hText2 )
{
- if( *(*iter)->pName == hText2 )
- {
- // es wurde tatsaechlich ausgewechselt
- delete pItem;
- pItem = 0;
- break;
- }
+ // es wurde tatsaechlich ausgewechselt
+ delete pItem;
+ pItem = 0;
+ break;
}
-
- if( pItem )
- // es wurde doch nicht ausgewechselt, also wieder rein
- pTopic->aItems.push_back(pItem);
- else
- pItem = iter != pTopic->aItems.end() ? *iter : NULL;
}
- if (pItem)
- {
- pItem->IncMonitor( (sal_IntPtr)hConv );
- pInst->hCurConvSvr = 0;
- }
+ if( pItem )
+ // es wurde doch nicht ausgewechselt, also wieder rein
+ pTopic->aItems.push_back(pItem);
+ else
+ pItem = iter != pTopic->aItems.end() ? *iter : NULL;
}
- return (HDDEDATA)sal_True;
- case XTYP_ADVSTOP:
- pItem->DecMonitor( (sal_IntPtr)hConv );
- if( !pItem->pImpData )
- pTopic->StopAdviseLoop();
- pInst->hCurConvSvr = 0;
- return (HDDEDATA)sal_True;
-
- case XTYP_EXECUTE:
+ if (pItem)
{
- DdeData aExec;
- aExec.pImp->hData = hData;
- aExec.pImp->nFmt = DdeData::GetInternalFormat( nCbType );
- aExec.Lock();
- String aName;
+ pItem->IncMonitor( (sal_IntPtr)hConv );
+ pInst->hCurConvSvr = 0;
+ }
+ }
+ return (HDDEDATA)sal_True;
- aName = (const sal_Unicode *)aExec.pImp->pData;
+ case XTYP_ADVSTOP:
+ pItem->DecMonitor( (sal_IntPtr)hConv );
+ if( !pItem->pImpData )
+ pTopic->StopAdviseLoop();
+ pInst->hCurConvSvr = 0;
+ return (HDDEDATA)sal_True;
- if( pTopic->IsSystemTopic() )
- bRes = pService->SysTopicExecute( &aName );
- else
- bRes = pTopic->Execute( &aName );
- }
- pInst->hCurConvSvr = 0;
- if ( bRes )
- return (HDDEDATA)DDE_FACK;
+ case XTYP_EXECUTE:
+ {
+ DdeData aExec;
+ aExec.pImp->hData = hData;
+ aExec.pImp->nFmt = DdeData::GetInternalFormat( nCbType );
+ aExec.Lock();
+ OUString aName;
+
+ aName = (const sal_Unicode *)aExec.pImp->pData;
+
+ if( pTopic->IsSystemTopic() )
+ bRes = pService->SysTopicExecute( &aName );
else
- return (HDDEDATA)DDE_FNOTPROCESSED;
+ bRes = pTopic->Execute( &aName );
+ }
+ pInst->hCurConvSvr = 0;
+ if ( bRes )
+ return (HDDEDATA)DDE_FACK;
+ else
+ return (HDDEDATA)DDE_FNOTPROCESSED;
}
return (HDDEDATA)NULL;
@@ -378,11 +383,12 @@ DdeTopic* DdeInternal::FindTopic( DdeService& rService, HSZ hTopic )
{
std::vector<DdeTopic*>::iterator iter;
std::vector<DdeTopic*> &rTopics = rService.aTopics;
- int bWeiter = sal_False;
+ bool bWeiter = false;
DdeInstData* pInst = ImpGetInstData();
DBG_ASSERT(pInst,"SVDDE:No instance data");
- do { // middle check loop
+ do
+ { // middle check loop
for ( iter = rTopics.begin(); iter != rTopics.end(); ++iter )
{
if ( *(*iter)->pName == hTopic )
@@ -398,7 +404,8 @@ DdeTopic* DdeInternal::FindTopic( DdeService& rService, HSZ hTopic )
DdeQueryString(pInst->hDdeInstSvr,hTopic,chBuf,sizeof(chBuf)/sizeof(TCHAR),CP_WINUNICODE );
bWeiter = rService.MakeTopic( reinterpret_cast<const sal_Unicode*>(chBuf) );
// dann muessen wir noch mal suchen
- } while( bWeiter );
+ }
+ while( bWeiter );
return 0;
}
@@ -411,14 +418,16 @@ DdeItem* DdeInternal::FindItem( DdeTopic& rTopic, HSZ hItem )
std::vector<DdeItem*> &rItems = rTopic.aItems;
DdeInstData* pInst = ImpGetInstData();
DBG_ASSERT(pInst,"SVDDE:No instance data");
- int bWeiter = sal_False;
+ bool bWeiter = false;
- do { // middle check loop
+ do
+ { // middle check loop
for ( iter = rItems.begin(); iter != rItems.end(); ++iter )
+ {
if ( *(*iter)->pName == hItem )
return *iter;
-
+ }
bWeiter = !bWeiter;
if( !bWeiter )
break;
@@ -428,14 +437,15 @@ DdeItem* DdeInternal::FindItem( DdeTopic& rTopic, HSZ hItem )
DdeQueryString(pInst->hDdeInstSvr,hItem,chBuf,sizeof(chBuf)/sizeof(TCHAR),CP_WINUNICODE );
bWeiter = rTopic.MakeItem( reinterpret_cast<const sal_Unicode*>(chBuf) );
// dann muessen wir noch mal suchen
- } while( bWeiter );
+ }
+ while( bWeiter );
return 0;
}
// --- DdeService::DdeService() ------------------------------------
-DdeService::DdeService( const String& rService )
+DdeService::DdeService( const OUString& rService )
{
DdeInstData* pInst = ImpGetInstData();
if( !pInst )
@@ -463,10 +473,13 @@ DdeService::DdeService( const String& rService )
pName = new DdeString( pInst->hDdeInstSvr, rService );
if ( nStatus == DMLERR_NO_ERROR )
+ {
if ( !DdeNameService( pInst->hDdeInstSvr, *pName, NULL,
- DNS_REGISTER | DNS_FILTEROFF ) )
+ DNS_REGISTER | DNS_FILTEROFF ) )
+ {
nStatus = DMLERR_SYS_ERROR;
-
+ }
+ }
AddFormat( FORMAT_STRING );
pSysTopic = new DdeTopic( reinterpret_cast<const sal_Unicode*>(SZDDESYS_TOPIC) );
pSysTopic->AddItem( DdeItem( reinterpret_cast<const sal_Unicode*>(SZDDESYS_ITEM_TOPICS) ) );
@@ -565,7 +578,7 @@ void DdeService::RemoveTopic( const DdeTopic& rTopic )
// --- DdeService::HasCbFormat() -----------------------------------
-sal_Bool DdeService::HasCbFormat( sal_uInt16 nFmt )
+bool DdeService::HasCbFormat( sal_uInt16 nFmt )
{
for ( size_t i = 0, n = aFormats.size(); i < n; ++i )
if ( aFormats[ i ] == nFmt )
@@ -575,7 +588,7 @@ sal_Bool DdeService::HasCbFormat( sal_uInt16 nFmt )
// --- DdeService::HasFormat() -------------------------------------
-sal_Bool DdeService::HasFormat( sal_uLong nFmt )
+bool DdeService::HasFormat( sal_uLong nFmt )
{
return HasCbFormat( (sal_uInt16)DdeData::GetExternalFormat( nFmt ));
}
@@ -596,8 +609,10 @@ void DdeService::AddFormat( sal_uLong nFmt )
void DdeService::RemoveFormat( sal_uLong nFmt )
{
nFmt = DdeData::GetExternalFormat( nFmt );
- for ( DdeFormats::iterator it = aFormats.begin(); it != aFormats.end(); ++it ) {
- if ( (sal_uLong) *it == nFmt ) {
+ for ( DdeFormats::iterator it = aFormats.begin(); it != aFormats.end(); ++it )
+ {
+ if ( (sal_uLong) *it == nFmt )
+ {
aFormats.erase( it );
break;
}
@@ -636,9 +651,9 @@ const OUString DdeTopic::GetName() const
// --- DdeTopic::IsSystemTopic() -----------------------------------
-sal_Bool DdeTopic::IsSystemTopic()
+bool DdeTopic::IsSystemTopic()
{
- return sal_Bool (GetName() == reinterpret_cast<const sal_Unicode*>(SZDDESYS_TOPIC));
+ return GetName() == reinterpret_cast<const sal_Unicode*>(SZDDESYS_TOPIC);
}
// --- DdeTopic::AddItem() -----------------------------------------
@@ -650,6 +665,7 @@ DdeItem* DdeTopic::AddItem( const DdeItem& r )
s = new DdeGetPutItem( r );
else
s = new DdeItem( r );
+
if ( s )
{
aItems.push_back( s );
@@ -690,7 +706,7 @@ void DdeTopic::RemoveItem( const DdeItem& r )
// --- DdeTopic::NotifyClient() ------------------------------------
-void DdeTopic::NotifyClient( const String& rItem )
+void DdeTopic::NotifyClient( const OUString& rItem )
{
std::vector<DdeItem*>::iterator iter;
DdeInstData* pInst = ImpGetInstData();
@@ -742,22 +758,22 @@ DdeData* DdeTopic::Get( sal_uIntPtr nFmt )
// --- DdeTopic::Put() ---------------------------------------------
-sal_Bool DdeTopic::Put( const DdeData* r )
+bool DdeTopic::Put( const DdeData* r )
{
if ( aPutLink.IsSet() )
- return (sal_Bool)aPutLink.Call( (void*) r );
+ return aPutLink.Call( (void*) r );
else
- return sal_False;
+ return false;
}
// --- DdeTopic::Execute() -----------------------------------------
-sal_Bool DdeTopic::Execute( const String* r )
+bool DdeTopic::Execute( const OUString* r )
{
if ( aExecLink.IsSet() )
- return (sal_Bool)aExecLink.Call( (void*)r );
+ return aExecLink.Call( (void*)r );
else
- return sal_False;
+ return false;
}
// --- DdeTopic::GetConvId() ---------------------------------------
@@ -771,16 +787,16 @@ long DdeTopic::GetConvId()
// --- DdeTopic::StartAdviseLoop() ---------------------------------
-sal_Bool DdeTopic::StartAdviseLoop()
+bool DdeTopic::StartAdviseLoop()
{
- return sal_False;
+ return false;
}
// --- DdeTopic::StopAdviseLoop() ----------------------------------
-sal_Bool DdeTopic::StopAdviseLoop()
+bool DdeTopic::StopAdviseLoop()
{
- return sal_False;
+ return false;
}
// --- DdeItem::DdeItem() ------------------------------------------
@@ -797,7 +813,7 @@ DdeItem::DdeItem( const sal_Unicode* p )
// --- DdeItem::DdeItem() ------------------------------------------
-DdeItem::DdeItem( const String& r)
+DdeItem::DdeItem( const OUString& r)
{
DdeInstData* pInst = ImpGetInstData();
DBG_ASSERT(pInst,"SVDDE:No instance data");
@@ -857,7 +873,7 @@ void DdeItem::IncMonitor( sal_uLong nHCnv )
{
pImpData = new DdeItemImp;
if( DDEGETPUTITEM == nType )
- ((DdeGetPutItem*)this)->AdviseLoop( sal_True );
+ ((DdeGetPutItem*)this)->AdviseLoop( true );
}
else
{
@@ -893,7 +909,7 @@ void DdeItem::DecMonitor( sal_uLong nHCnv )
{
delete pImpData, pImpData = 0;
if( DDEGETPUTITEM == nType )
- ((DdeGetPutItem*)this)->AdviseLoop( sal_False );
+ ((DdeGetPutItem*)this)->AdviseLoop( false );
}
}
return ;
@@ -908,10 +924,12 @@ short DdeItem::GetLinks()
{
short nCnt = 0;
if( pImpData )
+ {
for( sal_uInt16 n = pImpData->size(); n; )
{
nCnt = nCnt + (*pImpData)[ --n ].nCnt;
}
+ }
return nCnt;
}
@@ -925,7 +943,7 @@ DdeGetPutItem::DdeGetPutItem( const sal_Unicode* p )
// --- DdeGetPutItem::DdeGetPutItem() ------------------------------
-DdeGetPutItem::DdeGetPutItem( const String& rStr )
+DdeGetPutItem::DdeGetPutItem( const OUString& rStr )
: DdeItem( rStr )
{
nType = DDEGETPUTITEM;
@@ -949,23 +967,23 @@ DdeData* DdeGetPutItem::Get( sal_uLong )
// --- DdeGetPutData::Put() ----------------------------------------
-sal_Bool DdeGetPutItem::Put( const DdeData* )
+bool DdeGetPutItem::Put( const DdeData* )
{
- return sal_False;
+ return false;
}
// --- DdeGetPutData::AdviseLoop() ---------------------------------
-void DdeGetPutItem::AdviseLoop( sal_Bool )
+void DdeGetPutItem::AdviseLoop( bool )
{
}
// --- DdeService::SysItems() --------------------------------------
-String DdeService::SysItems()
+OUString DdeService::SysItems()
{
- String s;
+ OUString s;
std::vector<DdeTopic*>::iterator iter;
std::vector<DdeItem*>::iterator iterItem;
for ( iter = aTopics.begin(); iter != aTopics.end(); ++iter )
@@ -976,10 +994,10 @@ String DdeService::SysItems()
for ( iterItem = (*iter)->aItems.begin(); iterItem != (*iter)->aItems.end(); ++iterItem, n++ )
{
if ( n )
- s += '\t';
+ s += "\t";
s += (*iterItem)->GetName();
}
- s += OUString("\r\n");
+ s += "\r\n";
}
}
@@ -988,28 +1006,28 @@ String DdeService::SysItems()
// --- DdeService::Topics() ----------------------------------------
-String DdeService::Topics()
+OUString DdeService::Topics()
{
- String s;
+ OUString s;
std::vector<DdeTopic*>::iterator iter;
short n = 0;
for ( iter = aTopics.begin(); iter != aTopics.end(); ++iter, n++ )
{
if ( n )
- s += '\t';
+ s += "\t";
s += (*iter)->GetName();
}
- s += OUString("\r\n");
+ s += "\r\n";
return s;
}
// --- DdeService::Formats() ---------------------------------------
-String DdeService::Formats()
+OUString DdeService::Formats()
{
- String s;
+ OUString s;
long f;
short n = 0;
@@ -1017,70 +1035,70 @@ String DdeService::Formats()
{
f = aFormats[ i ];
if ( n )
- s += '\t';
+ s += "\t";
switch( (sal_uInt16)f )
{
- case CF_TEXT:
- s += OUString("TEXT");
- break;
- case CF_BITMAP:
- s += OUString("BITMAP");
- break;
- default:
- {
- TCHAR buf[128];
- GetClipboardFormatName( (UINT)f, buf, sizeof(buf) / sizeof(TCHAR) );
- s += OUString(reinterpret_cast<sal_Unicode*>(buf));
- }
- break;
+ case CF_TEXT:
+ s += "TEXT";
+ break;
+ case CF_BITMAP:
+ s += "BITMAP";
+ break;
+ default:
+ {
+ TCHAR buf[128];
+ GetClipboardFormatName( (UINT)f, buf, sizeof(buf) / sizeof(TCHAR) );
+ s += OUString(reinterpret_cast<sal_Unicode*>(buf));
+ }
+ break;
}
}
- s += OUString("\r\n");
+ s += "\r\n";
return s;
}
// --- DdeService::Status() ----------------------------------------
-String DdeService::Status()
+OUString DdeService::Status()
{
return IsBusy() ? OUString("Busy\r\n") : OUString("Ready\r\n");
}
// --- DdeService::IsBusy() ----------------------------------------
-sal_Bool DdeService::IsBusy()
+bool DdeService::IsBusy()
{
- return sal_False;
+ return false;
}
// --- DdeService::GetHelp() ----------------------------------------
-String DdeService::GetHelp()
+OUString DdeService::GetHelp()
{
- return String();
+ return OUString();
}
-sal_Bool DdeTopic::MakeItem( const OUString& )
+bool DdeTopic::MakeItem( const OUString& )
{
- return sal_False;
+ return false;
}
-sal_Bool DdeService::MakeTopic( const OUString& )
+bool DdeService::MakeTopic( const OUString& )
{
- return sal_False;
+ return false;
}
-String DdeService::SysTopicGet( const String& )
+OUString DdeService::SysTopicGet( const OUString& )
{
- return String();
+ return OUString();
}
-sal_Bool DdeService::SysTopicExecute( const String* )
+bool DdeService::SysTopicExecute( const OUString* )
{
- return sal_False;
+ return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index d27de22e266e..04aaceb2ade6 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -84,10 +84,10 @@ SfxUndoAction::SfxUndoAction()
//------------------------------------------------------------------------
-sal_Bool SfxUndoAction::Merge( SfxUndoAction * )
+bool SfxUndoAction::Merge( SfxUndoAction * )
{
DBG_CHKTHIS(SfxUndoAction, 0);
- return sal_False;
+ return false;
}
//------------------------------------------------------------------------
@@ -158,9 +158,9 @@ void SfxUndoAction::Repeat(SfxRepeatTarget&)
//------------------------------------------------------------------------
-sal_Bool SfxUndoAction::CanRepeat(SfxRepeatTarget&) const
+bool SfxUndoAction::CanRepeat(SfxRepeatTarget&) const
{
- return sal_True;
+ return true;
}
//========================================================================
@@ -226,7 +226,7 @@ namespace svl { namespace undo { namespace impl
//--------------------------------------------------------------------
typedef void ( SfxUndoListener::*UndoListenerVoidMethod )();
- typedef void ( SfxUndoListener::*UndoListenerStringMethod )( const String& );
+ typedef void ( SfxUndoListener::*UndoListenerStringMethod )( const OUString& );
//--------------------------------------------------------------------
struct SVL_DLLPRIVATE NotifyUndoListener : public ::std::unary_function< SfxUndoListener*, void >
@@ -245,7 +245,7 @@ namespace svl { namespace undo { namespace impl
{
}
- NotifyUndoListener( UndoListenerStringMethod i_notificationMethod, const String& i_actionComment )
+ NotifyUndoListener( UndoListenerStringMethod i_notificationMethod, const OUString& i_actionComment )
:m_notificationMethod( NULL )
,m_altNotificationMethod( i_notificationMethod )
,m_sActionComment( i_actionComment )
@@ -273,7 +273,7 @@ namespace svl { namespace undo { namespace impl
private:
UndoListenerVoidMethod m_notificationMethod;
UndoListenerStringMethod m_altNotificationMethod;
- String m_sActionComment;
+ OUString m_sActionComment;
};
//--------------------------------------------------------------------
@@ -326,7 +326,7 @@ namespace svl { namespace undo { namespace impl
m_notifiers.push_back( NotifyUndoListener( i_notificationMethod ) );
}
- void scheduleNotification( UndoListenerStringMethod i_notificationMethod, const String& i_actionComment )
+ void scheduleNotification( UndoListenerStringMethod i_notificationMethod, const OUString& i_actionComment )
{
m_notifiers.push_back( NotifyUndoListener( i_notificationMethod, i_actionComment ) );
}
@@ -648,7 +648,7 @@ bool SfxUndoManager::ImplAddUndoAction_NoNotify( SfxUndoAction *pAction, bool bT
//------------------------------------------------------------------------
-void SfxUndoManager::AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerge )
+void SfxUndoManager::AddUndoAction( SfxUndoAction *pAction, bool bTryMerge )
{
UndoManagerGuard aGuard( *m_pData );
@@ -739,21 +739,21 @@ bool SfxUndoManager::IsDoing() const
//------------------------------------------------------------------------
-sal_Bool SfxUndoManager::Undo()
+bool SfxUndoManager::Undo()
{
return ImplUndo( NULL );
}
//------------------------------------------------------------------------
-sal_Bool SfxUndoManager::UndoWithContext( SfxUndoContext& i_context )
+bool SfxUndoManager::UndoWithContext( SfxUndoContext& i_context )
{
return ImplUndo( &i_context );
}
//------------------------------------------------------------------------
-sal_Bool SfxUndoManager::ImplUndo( SfxUndoContext* i_contextOrNull )
+bool SfxUndoManager::ImplUndo( SfxUndoContext* i_contextOrNull )
{
UndoManagerGuard aGuard( *m_pData );
OSL_ENSURE( !IsDoing(), "SfxUndoManager::Undo: *nested* Undo/Redo actions? How this?" );
@@ -774,7 +774,7 @@ sal_Bool SfxUndoManager::ImplUndo( SfxUndoContext* i_contextOrNull )
}
SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ --m_pData->pActUndoArray->nCurUndoAction ].pAction;
- const String sActionComment = pAction->GetComment();
+ const OUString sActionComment = pAction->GetComment();
try
{
// clear the guard/mutex before calling into the SfxUndoAction - this can be an extension-implemented UNO component
@@ -846,7 +846,7 @@ SfxUndoAction* SfxUndoManager::GetRedoAction( size_t nNo, bool const i_currentLe
OUString SfxUndoManager::GetRedoActionComment( size_t nNo, bool const i_currentLevel ) const
{
- String sComment;
+ OUString sComment;
UndoManagerGuard aGuard( *m_pData );
const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray;
if ( (pUndoArray->nCurUndoAction + nNo) < pUndoArray->aUndoActions.size() )
@@ -858,21 +858,21 @@ OUString SfxUndoManager::GetRedoActionComment( size_t nNo, bool const i_currentL
//------------------------------------------------------------------------
-sal_Bool SfxUndoManager::Redo()
+bool SfxUndoManager::Redo()
{
return ImplRedo( NULL );
}
//------------------------------------------------------------------------
-sal_Bool SfxUndoManager::RedoWithContext( SfxUndoContext& i_context )
+bool SfxUndoManager::RedoWithContext( SfxUndoContext& i_context )
{
return ImplRedo( &i_context );
}
//------------------------------------------------------------------------
-sal_Bool SfxUndoManager::ImplRedo( SfxUndoContext* i_contextOrNull )
+bool SfxUndoManager::ImplRedo( SfxUndoContext* i_contextOrNull )
{
UndoManagerGuard aGuard( *m_pData );
OSL_ENSURE( !IsDoing(), "SfxUndoManager::Redo: *nested* Undo/Redo actions? How this?" );
@@ -893,7 +893,7 @@ sal_Bool SfxUndoManager::ImplRedo( SfxUndoContext* i_contextOrNull )
}
SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction++ ].pAction;
- const String sActionComment = pAction->GetComment();
+ const OUString sActionComment = pAction->GetComment();
try
{
// clear the guard/mutex before calling into the SfxUndoAction - this can be a extension-implemented UNO component
@@ -951,7 +951,7 @@ OUString SfxUndoManager::GetRepeatActionComment(SfxRepeatTarget &rTarget) const
//------------------------------------------------------------------------
-sal_Bool SfxUndoManager::Repeat( SfxRepeatTarget &rTarget )
+bool SfxUndoManager::Repeat( SfxRepeatTarget &rTarget )
{
UndoManagerGuard aGuard( *m_pData );
if ( !m_pData->pActUndoArray->aUndoActions.empty() )
@@ -963,12 +963,12 @@ sal_Bool SfxUndoManager::Repeat( SfxRepeatTarget &rTarget )
return sal_True;
}
- return sal_False;
+ return false;
}
//------------------------------------------------------------------------
-sal_Bool SfxUndoManager::CanRepeat( SfxRepeatTarget &rTarget ) const
+bool SfxUndoManager::CanRepeat( SfxRepeatTarget &rTarget ) const
{
UndoManagerGuard aGuard( *m_pData );
if ( !m_pData->pActUndoArray->aUndoActions.empty() )
@@ -976,7 +976,7 @@ sal_Bool SfxUndoManager::CanRepeat( SfxRepeatTarget &rTarget ) const
size_t nActionNo = m_pData->pActUndoArray->aUndoActions.size() - 1;
return m_pData->pActUndoArray->aUndoActions[nActionNo].pAction->CanRepeat(rTarget);
}
- return sal_False;
+ return false;
}
//------------------------------------------------------------------------
@@ -1007,8 +1007,8 @@ void SfxUndoManager::RemoveUndoListener( SfxUndoListener& i_listener )
//------------------------------------------------------------------------
-void SfxUndoManager::EnterListAction(
- const OUString& rComment, const OUString &rRepeatComment, sal_uInt16 nId )
+void SfxUndoManager::EnterListAction( const OUString& rComment,
+ const OUString &rRepeatComment, sal_uInt16 nId )
/* [Beschreibung]
@@ -1372,17 +1372,19 @@ void SfxListUndoAction::Repeat(SfxRepeatTarget&rTarget)
//------------------------------------------------------------------------
-sal_Bool SfxListUndoAction::CanRepeat(SfxRepeatTarget&r) const
+bool SfxListUndoAction::CanRepeat(SfxRepeatTarget&r) const
{
for(size_t i=0;i<nCurUndoAction;i++)
+ {
if(!aUndoActions[i].pAction->CanRepeat(r))
- return sal_False;
- return sal_True;
+ return false;
+ }
+ return true;
}
//------------------------------------------------------------------------
-sal_Bool SfxListUndoAction::Merge( SfxUndoAction *pNextAction )
+bool SfxListUndoAction::Merge( SfxUndoAction *pNextAction )
{
return !aUndoActions.empty() && aUndoActions[aUndoActions.size()-1].pAction->Merge( pNextAction );
}
@@ -1433,7 +1435,7 @@ void SfxLinkUndoAction::Redo()
//------------------------------------------------------------------------
-sal_Bool SfxLinkUndoAction::CanRepeat(SfxRepeatTarget& r) const
+bool SfxLinkUndoAction::CanRepeat(SfxRepeatTarget& r) const
{
return pAction && pAction->CanRepeat(r);
}
diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx
index 70104ef189bc..2e03c0862105 100644
--- a/svl/unx/source/svdde/ddedummy.cxx
+++ b/svl/unx/source/svdde/ddedummy.cxx
@@ -24,7 +24,7 @@ DdeData::DdeData()
{
}
-DdeData::DdeData( const String& )
+DdeData::DdeData( const OUString& )
{
}
@@ -46,17 +46,17 @@ void DdeData::SetFormat( SAL_UNUSED_PARAMETER sal_uLong )
sal_uLong DdeData::GetFormat() const
{
- return 0L;
+ return 0L;
}
DdeData& DdeData::operator = ( const DdeData& )
{
- return *this;
+ return *this;
}
DdeData::operator long() const
{
- return 0L;
+ return 0L;
}
DdeData::operator const void*() const
@@ -66,10 +66,10 @@ DdeData::operator const void*() const
long DdeConnection::GetError()
{
- return 0L;
+ return 0L;
}
-DdeConnection::DdeConnection( const String&, const String& )
+DdeConnection::DdeConnection( const OUString&, const OUString& )
{
}
@@ -77,23 +77,23 @@ DdeConnection::~DdeConnection()
{
}
-const String& DdeConnection::GetServiceName()
+const OUString DdeConnection::GetServiceName()
{
- return String::EmptyString();
+ return OUString();
}
-const String& DdeConnection::GetTopicName()
+const OUString DdeConnection::GetTopicName()
{
- return String::EmptyString();
+ return OUString();;
}
-DdeTransaction::DdeTransaction( DdeConnection& rConnection, const String&, long ) :
- rDde( rConnection )
+DdeTransaction::DdeTransaction( DdeConnection& rConnection, const OUString&, long )
+ : rDde( rConnection )
{
}
-DdeTransaction::DdeTransaction( const DdeTransaction& rTransaction ) :
- rDde( rTransaction.rDde )
+DdeTransaction::DdeTransaction( const DdeTransaction& rTransaction )
+ : rDde( rTransaction.rDde )
{
}
@@ -101,7 +101,7 @@ void DdeTransaction::Execute()
{
}
-void DdeTransaction::Done( SAL_UNUSED_PARAMETER sal_Bool )
+void DdeTransaction::Done( SAL_UNUSED_PARAMETER bool )
{
}
@@ -113,18 +113,18 @@ DdeTransaction::~DdeTransaction()
{
}
-DdeRequest::DdeRequest( DdeConnection& rConnection, const String& rString, long lLong ) :
- DdeTransaction( rConnection, rString, lLong )
+DdeRequest::DdeRequest( DdeConnection& rConnection, const OUString& rString, long lLong )
+ : DdeTransaction( rConnection, rString, lLong )
{
}
-DdeExecute::DdeExecute( DdeConnection& rConnection, const String& rString, long lLong ) :
- DdeTransaction( rConnection, rString, lLong )
+DdeExecute::DdeExecute( DdeConnection& rConnection, const OUString& rString, long lLong )
+ : DdeTransaction( rConnection, rString, lLong )
{
}
-DdePoke::DdePoke( DdeConnection& rConnection, const String& rString, const DdeData&, long lLong ) :
- DdeTransaction( rConnection, rString, lLong )
+DdePoke::DdePoke( DdeConnection& rConnection, const OUString& rString, const DdeData&, long lLong )
+ : DdeTransaction( rConnection, rString, lLong )
{
}
@@ -151,7 +151,7 @@ void DdeTopic::InsertItem( SAL_UNUSED_PARAMETER DdeItem* )
DdeItem* DdeTopic::AddItem( const DdeItem& rDdeItem )
{
- return (DdeItem*) &rDdeItem;
+ return (DdeItem*) &rDdeItem;
}
void DdeTopic::RemoveItem( SAL_UNUSED_PARAMETER const DdeItem& )
@@ -160,80 +160,85 @@ void DdeTopic::RemoveItem( SAL_UNUSED_PARAMETER const DdeItem& )
DdeData* DdeTopic::Get( SAL_UNUSED_PARAMETER sal_uLong )
{
- return NULL;
+ return NULL;
}
-sal_Bool DdeTopic::MakeItem( SAL_UNUSED_PARAMETER const OUString& )
+bool DdeTopic::MakeItem( SAL_UNUSED_PARAMETER const OUString& )
{
- return sal_False;
+ return false;
}
-sal_Bool DdeTopic::StartAdviseLoop()
+bool DdeTopic::StartAdviseLoop()
{
- return sal_False;
+ return false;
}
-sal_Bool DdeTopic::StopAdviseLoop()
+bool DdeTopic::StopAdviseLoop()
{
- return sal_False;
+ return false;
}
-sal_Bool DdeTopic::Execute( SAL_UNUSED_PARAMETER const String* )
+bool DdeTopic::Execute( SAL_UNUSED_PARAMETER const OUString* )
{
- return sal_False;
+ return false;
}
-sal_Bool DdeTopic::Put( SAL_UNUSED_PARAMETER const DdeData* )
+bool DdeTopic::Put( SAL_UNUSED_PARAMETER const DdeData* )
{
- return sal_False;
+ return false;
}
const OUString DdeTopic::GetName() const
{
- return OUString();
+ return OUString();
}
-DdeService::DdeService( const String& )
+DdeService::DdeService( const OUString& )
{
- nStatus = 0;
+ nStatus = 0;
}
-String DdeService::Topics() {
- return String();
+OUString DdeService::Topics()
+{
+ return OUString();
}
-String DdeService::Formats() {
- return String();
+OUString DdeService::Formats() {
+ return OUString();
}
-String DdeService::SysItems() {
- return String();
+OUString DdeService::SysItems()
+{
+ return OUString();
}
-String DdeService::Status() {
- return String();
+OUString DdeService::Status()
+{
+ return OUString();
}
-String DdeService::SysTopicGet(const String& rString) {
+OUString DdeService::SysTopicGet(const OUString& rString)
+{
return rString;
}
-sal_Bool DdeService::SysTopicExecute(SAL_UNUSED_PARAMETER const String*) {
- return sal_False;
+bool DdeService::SysTopicExecute(SAL_UNUSED_PARAMETER const OUString*)
+{
+ return false;
}
DdeService::~DdeService()
{
}
-sal_Bool DdeService::IsBusy()
+bool DdeService::IsBusy()
{
- return sal_False;
+ return false;
}
-String DdeService::GetHelp()
+OUString DdeService::GetHelp()
{
- return String::EmptyString();
+ return OUString();
}
void DdeService::AddFormat( SAL_UNUSED_PARAMETER sal_uLong )
@@ -248,14 +253,14 @@ void DdeService::RemoveTopic( SAL_UNUSED_PARAMETER const DdeTopic& )
{
}
-sal_Bool DdeService::MakeTopic( SAL_UNUSED_PARAMETER const OUString& )
+bool DdeService::MakeTopic( SAL_UNUSED_PARAMETER const OUString& )
{
- return sal_False;
+ return false;
}
const OUString DdeService::GetName() const
{
- return OUString();
+ return OUString();
}
namespace
@@ -269,7 +274,7 @@ DdeServices& DdeService::GetServices()
return theDdeServices::get();
}
-DdeItem::DdeItem( const String& )
+DdeItem::DdeItem( const OUString& )
{
}
@@ -285,32 +290,32 @@ void DdeItem::NotifyClient()
{
}
-DdeGetPutItem::DdeGetPutItem( const String& rStr ) :
-DdeItem( rStr )
+DdeGetPutItem::DdeGetPutItem( const OUString& rStr )
+ : DdeItem( rStr )
{
}
-DdeGetPutItem::DdeGetPutItem( const DdeItem& rItem ) :
-DdeItem( rItem )
+DdeGetPutItem::DdeGetPutItem( const DdeItem& rItem )
+ : DdeItem( rItem )
{
}
DdeData* DdeGetPutItem::Get( SAL_UNUSED_PARAMETER sal_uLong )
{
- return NULL;
+ return NULL;
}
-sal_Bool DdeGetPutItem::Put( SAL_UNUSED_PARAMETER const DdeData* )
+bool DdeGetPutItem::Put( SAL_UNUSED_PARAMETER const DdeData* )
{
- return sal_False;
+ return false;
}
-void DdeGetPutItem::AdviseLoop( SAL_UNUSED_PARAMETER sal_Bool )
+void DdeGetPutItem::AdviseLoop( SAL_UNUSED_PARAMETER bool )
{
}
-DdeLink::DdeLink( DdeConnection& rConnection, const String& rString, long l ) :
-DdeTransaction( rConnection, rString, l )
+DdeLink::DdeLink( DdeConnection& rConnection, const OUString& rString, long l )
+ : DdeTransaction( rConnection, rString, l )
{
}
@@ -322,8 +327,8 @@ void DdeLink::Notify()
{
}
-DdeHotLink::DdeHotLink( DdeConnection& rConnection, const String& rString, long l ) :
-DdeLink( rConnection, rString, l )
+DdeHotLink::DdeHotLink( DdeConnection& rConnection, const OUString& rString, long l )
+ : DdeLink( rConnection, rString, l )
{
}