Index: src/ch/CustomCopyDlg.cpp =================================================================== diff -u -r6df9b4cff81dedf8c5571a98702b584b061eac09 -rde5a63babb2991c808333230014a4f2e6cc8b7b2 --- src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision 6df9b4cff81dedf8c5571a98702b584b061eac09) +++ src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision de5a63babb2991c808333230014a4f2e6cc8b7b2) @@ -591,7 +591,7 @@ void CCustomCopyDlg::OnAddfilterButton() { CFilterDlg dlg; - CString strData; + chcore::TString strData; CFiltersArray afFilters = GetTaskPropValue(m_tTaskDefinition.GetConfiguration()); for (size_t i = 0; i < afFilters.GetSize(); i++) @@ -634,7 +634,7 @@ if (rFilter.m_bUseMask) { - CString strData; + chcore::TString strData; rFilter.GetCombinedMask(strData); _tcscpy(szLoaded, strData); } @@ -650,7 +650,7 @@ if (rFilter.m_bUseExcludeMask) { - CString strData; + chcore::TString strData; rFilter.GetCombinedExcludeMask(strData); _tcscpy(szLoaded, strData); } @@ -833,7 +833,7 @@ if(pFilter) dlg.m_ffFilter = *pFilter; - CString strData; + chcore::TString strData; for(size_t stIndex = 0; stIndex < afFilters.GetSize(); ++stIndex) { pFilter = afFilters.GetAt(stIndex); Index: src/ch/FileFilter.cpp =================================================================== diff -u -r5fd6beaad9f1eccb664b997d151acb59961e4827 -rde5a63babb2991c808333230014a4f2e6cc8b7b2 --- src/ch/FileFilter.cpp (.../FileFilter.cpp) (revision 5fd6beaad9f1eccb664b997d151acb59961e4827) +++ src/ch/FileFilter.cpp (.../FileFilter.cpp) (revision de5a63babb2991c808333230014a4f2e6cc8b7b2) @@ -34,10 +34,10 @@ { // files mask m_bUseMask=false; - m_astrMask.clear(); + m_astrMask.Clear(); m_bUseExcludeMask=false; - m_astrExcludeMask.clear(); + m_astrExcludeMask.Clear(); // size filtering m_bUseSize=false; @@ -121,22 +121,25 @@ return *this; } -CString& CFileFilter::GetCombinedMask(CString& strMask) const +chcore::TString& CFileFilter::GetCombinedMask(chcore::TString& strMask) const { - strMask.Empty(); - if(m_astrMask.size() > 0) + strMask.Clear(); + size_t stCount = m_astrMask.GetCount(); + if(stCount > 0) { - strMask = m_astrMask.at(0); - for(size_t stIndex = 1; stIndex < m_astrMask.size(); stIndex++) - strMask += _T("|") + m_astrMask.at(stIndex); + strMask = m_astrMask.GetAt(0); + for(size_t stIndex = 1; stIndex < stCount; stIndex++) + { + strMask += _T("|") + m_astrMask.GetAt(stIndex); + } } return strMask; } -void CFileFilter::SetCombinedMask(const CString& pMask) +void CFileFilter::SetCombinedMask(const chcore::TString& pMask) { - m_astrMask.clear(); + m_astrMask.Clear(); TCHAR *pszData=new TCHAR[pMask.GetLength()+1]; _tcscpy(pszData, pMask); @@ -145,7 +148,7 @@ while (szToken != NULL) { // add token to a table - m_astrMask.push_back(szToken); + m_astrMask.Add(szToken); // search for next szToken=_tcstok(NULL, _T("|")); @@ -154,22 +157,25 @@ delete [] pszData; } -CString& CFileFilter::GetCombinedExcludeMask(CString& strMask) const +chcore::TString& CFileFilter::GetCombinedExcludeMask(chcore::TString& strMask) const { - strMask.Empty(); - if(m_astrExcludeMask.size() > 0) + strMask.Clear(); + size_t stCount = m_astrExcludeMask.GetCount(); + if(stCount > 0) { - strMask = m_astrExcludeMask.at(0); - for(size_t stIndex = 1; stIndex < m_astrExcludeMask.size(); stIndex++) - strMask += _T("|") + m_astrExcludeMask.at(stIndex); + strMask = m_astrExcludeMask.GetAt(0); + for(size_t stIndex = 1; stIndex < stCount; stIndex++) + { + strMask += _T("|") + m_astrExcludeMask.GetAt(stIndex); + } } return strMask; } -void CFileFilter::SetCombinedExcludeMask(const CString& pMask) +void CFileFilter::SetCombinedExcludeMask(const chcore::TString& pMask) { - m_astrExcludeMask.clear(); + m_astrExcludeMask.Clear(); TCHAR *pszData=new TCHAR[pMask.GetLength()+1]; _tcscpy(pszData, pMask); @@ -178,7 +184,7 @@ while (szToken != NULL) { // add token - m_astrExcludeMask.push_back(szToken); + m_astrExcludeMask.Add(szToken); // find next szToken=_tcstok(NULL, _T("|")); @@ -232,13 +238,13 @@ if(!GetConfigValue(rConfig, _T("IncludeMask.Use"), m_bUseMask)) m_bUseMask = false; - m_astrMask.clear(); + m_astrMask.Clear(); GetConfigValue(rConfig, _T("IncludeMask.MaskList.Mask"), m_astrMask); if(!GetConfigValue(rConfig, _T("ExcludeMask.Use"), m_bUseExcludeMask)) m_bUseExcludeMask = false; - m_astrExcludeMask.clear(); + m_astrExcludeMask.Clear(); GetConfigValue(rConfig, _T("ExcludeMask.MaskList.Mask"), m_astrExcludeMask); if(!GetConfigValue(rConfig, _T("SizeA.Use"), m_bUseSize)) @@ -391,7 +397,7 @@ if(m_bUseMask) { bool bRes=false; - for(std::vector::const_iterator iterMask = m_astrMask.begin(); iterMask != m_astrMask.end(); ++iterMask) + for(chcore::TStringArray::const_iterator iterMask = m_astrMask.Begin(); iterMask != m_astrMask.End(); ++iterMask) { if(MatchMask(*iterMask, spInfo->GetFullFilePath().GetFileName().ToString())) bRes = true; @@ -403,7 +409,7 @@ // excluding mask if(m_bUseExcludeMask) { - for(std::vector::const_iterator iterExcludeMask = m_astrExcludeMask.begin(); iterExcludeMask != m_astrExcludeMask.end(); ++iterExcludeMask) + for(chcore::TStringArray::const_iterator iterExcludeMask = m_astrExcludeMask.Begin(); iterExcludeMask != m_astrExcludeMask.End(); ++iterExcludeMask) { if(MatchMask(*iterExcludeMask, spInfo->GetFullFilePath().GetFileName().ToString())) return false; @@ -675,7 +681,7 @@ { chcore::TConfig cfgNode; rFilter.StoreInConfig(cfgNode); - rConfig.AddSubConfig(CString(pszNodeName) + _T(".FilterDefinition"), cfgNode); + rConfig.AddSubConfig(chcore::TString(pszNodeName) + _T(".FilterDefinition"), cfgNode); } } Index: src/ch/FileFilter.h =================================================================== diff -u -r5fd6beaad9f1eccb664b997d151acb59961e4827 -rde5a63babb2991c808333230014a4f2e6cc8b7b2 --- src/ch/FileFilter.h (.../FileFilter.h) (revision 5fd6beaad9f1eccb664b997d151acb59961e4827) +++ src/ch/FileFilter.h (.../FileFilter.h) (revision de5a63babb2991c808333230014a4f2e6cc8b7b2) @@ -44,11 +44,11 @@ bool Match(const CFileInfoPtr& spInfo) const; - CString& GetCombinedMask(CString& pMask) const; - void SetCombinedMask(const CString& pMask); + chcore::TString& GetCombinedMask(chcore::TString& pMask) const; + void SetCombinedMask(const chcore::TString& pMask); - CString& GetCombinedExcludeMask(CString& pMask) const; - void SetCombinedExcludeMask(const CString& pMask); + chcore::TString& GetCombinedExcludeMask(chcore::TString& pMask) const; + void SetCombinedExcludeMask(const chcore::TString& pMask); void StoreInConfig(chcore::TConfig& rConfig) const; void ReadFromConfig(const chcore::TConfig& rConfig); @@ -63,11 +63,11 @@ public: // files mask bool m_bUseMask; - std::vector m_astrMask; + chcore::TStringArray m_astrMask; // files mask- bool m_bUseExcludeMask; - std::vector m_astrExcludeMask; + chcore::TStringArray m_astrExcludeMask; // size filtering bool m_bUseSize; Index: src/ch/FilterDlg.cpp =================================================================== diff -u -r22bbc4a87fa0b249e1e02ba385f28da9d77a4aa1 -rde5a63babb2991c808333230014a4f2e6cc8b7b2 --- src/ch/FilterDlg.cpp (.../FilterDlg.cpp) (revision 22bbc4a87fa0b249e1e02ba385f28da9d77a4aa1) +++ src/ch/FilterDlg.cpp (.../FilterDlg.cpp) (revision de5a63babb2991c808333230014a4f2e6cc8b7b2) @@ -138,7 +138,7 @@ // copy data from CFileFilter to a dialog - mask m_bFilter=m_ffFilter.m_bUseMask; - CString strData; + chcore::TString strData; m_ctlFilter.SetCurSel(m_ctlFilter.AddString(m_ffFilter.GetCombinedMask(strData))); for (int i=0;i