summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-06-02 19:51:12 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-06-02 19:51:12 -0400
commit6bae46740b3aa5b8154ff9b10c5f3f35d7fc79dc (patch)
tree524adc717d6f78bd49d0054010a581e2c1ca6cda /sc/source
parent5120e40e9c1ed0d9ba49eb40333fcec754e086e0 (diff)
String and bool cleanup.
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/inc/areasave.hxx18
-rw-r--r--sc/source/ui/undo/areasave.cxx21
2 files changed, 20 insertions, 19 deletions
diff --git a/sc/source/ui/inc/areasave.hxx b/sc/source/ui/inc/areasave.hxx
index c1a7eeb9aa65..b3624a464905 100644
--- a/sc/source/ui/inc/areasave.hxx
+++ b/sc/source/ui/inc/areasave.hxx
@@ -40,12 +40,12 @@ class ScAreaLink;
class ScAreaLinkSaver : public ScDataObject
{
private:
- String aFileName;
- String aFilterName;
- String aOptions;
- String aSourceArea;
- ScRange aDestArea;
- sal_uLong nRefresh;
+ ::rtl::OUString aFileName;
+ ::rtl::OUString aFilterName;
+ ::rtl::OUString aOptions;
+ ::rtl::OUString aSourceArea;
+ ScRange aDestArea;
+ sal_uLong nRefresh;
public:
ScAreaLinkSaver( const ScAreaLink& rSource );
@@ -54,8 +54,8 @@ public:
virtual ScDataObject* Clone() const;
- sal_Bool IsEqual( const ScAreaLink& rCompare ) const;
- sal_Bool IsEqualSource( const ScAreaLink& rCompare ) const;
+ bool IsEqual( const ScAreaLink& rCompare ) const;
+ bool IsEqualSource( const ScAreaLink& rCompare ) const;
void WriteToLink( ScAreaLink& rLink ) const;
void InsertNewLink( ScDocument* pDoc ) const;
@@ -73,7 +73,7 @@ public:
ScAreaLinkSaver* operator[](sal_uInt16 nIndex) const {return (ScAreaLinkSaver*)At(nIndex);}
- sal_Bool IsEqual( const ScDocument* pDoc ) const;
+ bool IsEqual( const ScDocument* pDoc ) const;
void Restore( ScDocument* pDoc ) const;
// returns NULL if empty
diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx
index b014b3f25ef3..7e5078fcf726 100644
--- a/sc/source/ui/undo/areasave.cxx
+++ b/sc/source/ui/undo/areasave.cxx
@@ -73,16 +73,16 @@ ScDataObject* ScAreaLinkSaver::Clone() const
return new ScAreaLinkSaver( *this );
}
-sal_Bool ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const
+bool ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const
{
- return ( aFileName == rCompare.GetFile() &&
- aFilterName == rCompare.GetFilter() &&
- aOptions == rCompare.GetOptions() &&
- aSourceArea == rCompare.GetSource() &&
- nRefresh == rCompare.GetRefreshDelay() );
+ return ( aFileName.equals(rCompare.GetFile()) &&
+ aFilterName.equals(rCompare.GetFilter()) &&
+ aOptions.equals(rCompare.GetOptions()) &&
+ aSourceArea.equals(rCompare.GetSource()) &&
+ nRefresh == rCompare.GetRefreshDelay() );
}
-sal_Bool ScAreaLinkSaver::IsEqual( const ScAreaLink& rCompare ) const
+bool ScAreaLinkSaver::IsEqual( const ScAreaLink& rCompare ) const
{
return ( IsEqualSource( rCompare ) &&
aDestArea == rCompare.GetDestArea() );
@@ -106,7 +106,8 @@ void ScAreaLinkSaver::InsertNewLink( ScDocument* pDoc ) const
aSourceArea, aDestArea.aStart, nRefresh );
pLink->SetInCreate( sal_True );
pLink->SetDestArea( aDestArea );
- pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aFileName, &aFilterName, &aSourceArea );
+ String aTmp1(aFilterName), aTmp2(aSourceArea);
+ pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aFileName, &aTmp1, &aTmp2 );
pLink->Update();
pLink->SetInCreate( false );
}
@@ -132,7 +133,7 @@ ScDataObject* ScAreaLinkSaveCollection::Clone() const
return new ScAreaLinkSaveCollection( *this );
}
-sal_Bool ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const
+bool ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const
{
// IsEqual can be checked in sequence.
// Neither ref-update nor removing links will change the order.
@@ -158,7 +159,7 @@ sal_Bool ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const
return false; // fewer links in the document than in the save collection
}
- return sal_True;
+ return true;
}
ScAreaLink* lcl_FindLink( const ::sfx2::SvBaseLinks& rLinks, const ScAreaLinkSaver& rSaver )