summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui/pfiltdlg.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2011-11-04 12:18:47 -0400
committerKohei Yoshida <kohei.yoshida@suse.com>2011-11-04 22:40:28 -0400
commita917af4fe40faf5a7538b0bf852796949192787d (patch)
tree9652d5c32f7b20f50bce257f989d6768fc16070e /sc/source/ui/dbgui/pfiltdlg.cxx
parent9dd9e4baccc4009be524f6ab3070e7458138d82d (diff)
More on avoiding direct access to pStr, also fixed several memory leaks.
Diffstat (limited to 'sc/source/ui/dbgui/pfiltdlg.cxx')
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index 171a2b5f5616..c776021d7044 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -215,8 +215,8 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
{
const ScQueryEntry& rEntry = theQueryData.GetEntry(i);
- String aValStr = *rEntry.pStr;
- if (!rEntry.bQueryByString && aValStr == EMPTY_STRING)
+ rtl::OUString aValStr = rEntry.GetQueryString();
+ if (!rEntry.bQueryByString && aValStr.isEmpty())
{
if (rEntry.nVal == SC_EMPTYFIELDS)
aValStr = aStrEmpty;
@@ -230,7 +230,7 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
aCondLbArr [i]->SelectEntryPos( nCondPos );
UpdateValueList( static_cast<sal_uInt16>(i+1) );
aValueEdArr[i]->SetText( aValStr );
- if (aValStr == aStrEmpty || aValStr == aStrNotEmpty)
+ if (aValStr.equals(aStrEmpty) || aValStr.equals(aStrNotEmpty))
aCondLbArr[i]->Disable();
}
else
@@ -426,19 +426,19 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
*/
if ( aStrVal == aStrEmpty )
{
- *rEntry.pStr = EMPTY_STRING;
+ rEntry.SetQueryString(rtl::OUString());
rEntry.nVal = SC_EMPTYFIELDS;
rEntry.bQueryByString = false;
}
else if ( aStrVal == aStrNotEmpty )
{
- *rEntry.pStr = EMPTY_STRING;
+ rEntry.SetQueryString(rtl::OUString());
rEntry.nVal = SC_NONEMPTYFIELDS;
rEntry.bQueryByString = false;
}
else
{
- *rEntry.pStr = aStrVal;
+ rEntry.SetQueryString(aStrVal);
rEntry.nVal = 0;
rEntry.bQueryByString = sal_True;
}