diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-02-23 20:14:08 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-02-24 00:51:41 -0500 |
commit | 34ff598994a52e8058e34074cb18a993e8c82157 (patch) | |
tree | 96ebf2114c58f2707f74f87a6cc0e097ea22748c /sc/source/core/data/dpoutput.cxx | |
parent | d473a3699befc388d49bdba491a543d88bcf0778 (diff) |
Use a dedicated method instead of manually removing trailing '*'s.
Also, caption shouldn't have a leading ' any more. We have a dedicated
flag for that.
Diffstat (limited to 'sc/source/core/data/dpoutput.cxx')
-rw-r--r-- | sc/source/core/data/dpoutput.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 690d5b6ab256..37f09708e5ab 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -54,6 +54,7 @@ #include "unonames.hxx" #include "sc.hrc" #include "stringutil.hxx" +#include "dputil.hxx" #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/sheet/DataPilotTableHeaderData.hpp> @@ -1481,7 +1482,7 @@ bool ScDPOutput::GetDataResultPositionData(vector<sheet::DataPilotFieldFilter>& // helper functions for ScDPOutput::GetPivotData // -bool lcl_IsNamedDataField( const ScDPGetPivotDataField& rTarget, const String& rSourceName, const String& rGivenName ) +bool lcl_IsNamedDataField( const ScDPGetPivotDataField& rTarget, const rtl::OUString& rSourceName, const rtl::OUString& rGivenName ) { // match one of the names, ignoring case return ScGlobal::GetpTransliteration()->isEqual( rTarget.maFieldName, rSourceName ) || @@ -1740,13 +1741,10 @@ void lcl_FilterInclude( std::vector< sal_Bool >& rResult, std::vector< sal_Int32 { // Asterisks are added in ScDPSaveData::WriteToSource to create unique names. //! preserve original name there? - String aSourceName( aResultEntry.Name ); - aSourceName.EraseTrailingChars( '*' ); + rtl::OUString aSourceName = ScDPUtil::getSourceDimensionName(aResultEntry.Name); - String aGivenName( aResultEntry.Caption ); //! Should use a stored name when available - aGivenName.EraseLeadingChars( '\'' ); - - rResult[j] = lcl_IsNamedDataField( rTarget, aSourceName, aGivenName ); + rResult[j] = lcl_IsNamedDataField( + rTarget, aSourceName, aResultEntry.Caption); } } else if ( bHasFilter ) |