diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-08-19 17:48:16 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-08-19 17:48:16 -0400 |
commit | 82acea96bbf9ac89feddbf91e1881330b26c253b (patch) | |
tree | ce02cd77d48fd7bceac597cd29c833195091a7fa | |
parent | 3a6626f030a495212c8245b4359fecb88ed0f02e (diff) |
Don't return a reference to a temporary variable.
That's a recipe for trouble.
Change-Id: I78647225209e57cf88c04718d99a07142983369d
-rw-r--r-- | sc/inc/dbdata.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/dbdata2.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx index e6a35ede65c7..f337a38a33c3 100644 --- a/sc/inc/dbdata.hxx +++ b/sc/inc/dbdata.hxx @@ -156,7 +156,7 @@ public: SCsCOL nDx, SCsROW nDy, SCsTAB nDz); void ExtendDataArea(ScDocument* pDoc); - const OUString& GetCellStyle( const ScAddress& rPos, bool bRowStripe ); + OUString GetCellStyle( const ScAddress& rPos, bool bRowStripe ); }; class SC_DLLPUBLIC ScDBCollection diff --git a/sc/source/core/tool/dbdata2.cxx b/sc/source/core/tool/dbdata2.cxx index 0f70a6f4c243..879437a5e414 100644 --- a/sc/source/core/tool/dbdata2.cxx +++ b/sc/source/core/tool/dbdata2.cxx @@ -11,7 +11,7 @@ #include "dbdata.hxx" #include "dbdataformatting.hxx" -const OUString& ScDBData::GetCellStyle( const ScAddress& rPos, bool bRowStripe ) +OUString ScDBData::GetCellStyle( const ScAddress& rPos, bool bRowStripe ) { //first see if the DB Range has any DB Formatting at all if( !HasFormatting() ) |