Changeset 96 for Mulberry

Show
Ignore:
Timestamp:
07/09/07 21:40:14 (1 year ago)
Author:
daboo
Message:

Whitespace fixes.

Location:
Mulberry/branches/v4.1d1/Sources_Common
Files:
17 modified

Legend:

Unmodified
Added
Removed
  • Mulberry/branches/v4.1d1/Sources_Common/Application/Address_Book/CAddressBookViewCommon.cp

    r86 r96  
    131131bool CAddressBookView::TestClose() 
    132132{ 
    133                 // Can always close remote 
    134                 return true; 
     133        // Can always close remote 
     134        return true; 
    135135} 
    136136 
     
    301301        { 
    302302                GetAddressBook()->Open(); 
    303                  
    304         // Start listening to new address book's protocol 
     303                         
     304                // Start listening to new address book's protocol 
    305305                GetAddressBook()->GetProtocol()->Add_Listener(this); 
    306306        } 
  • Mulberry/branches/v4.1d1/Sources_Common/Application/Address_Book_Manager/CAdbkManagerTableCommon.cp

    r86 r96  
    215215                (fullview.GetSingleClickModifiers() == mods)) 
    216216                DoFullView(); 
    217         } 
    218          
     217} 
     218 
    219219// Handle double click 
    220220void CAdbkManagerTable::DoDoubleClick(unsigned long row, const CKeyModifiers& mods) 
     
    236236{ 
    237237        PreviewAddressBook(); 
    238         } 
    239          
     238} 
     239 
    240240void CAdbkManagerTable::DoPreview(CAddressBook* adbk) 
    241241{ 
     
    510510        create.use_search = true; 
    511511 
    512                 CAdbkProtocol* proto = NULL; 
     512        CAdbkProtocol* proto = NULL; 
    513513        CAddressBook* node = NULL; 
    514514        CAddressBook* result = NULL; 
     
    516516 
    517517        // Determine initial creation type 
    518                 if (IsSelectionValid()) 
    519                 { 
     518        if (IsSelectionValid()) 
     519        { 
    520520                TableIndexT row = GetFirstSelectedRow(); 
    521521                TableIndexT woRow = mCollapsableTree->GetWideOpenIndex(row); 
     
    550550                        create.use_wd = false; 
    551551                } 
    552                         } 
     552        } 
    553553 
    554554        try 
     
    578578                        CAddressBook* adbk = NULL; 
    579579 
    580                                 // Create address book 
     580                        // Create address book 
    581581                        adbk = mManager->NewAddressBook(proto, new_name, create.directory); 
    582582 
     
    596596                         
    597597                        result = adbk; 
    598                                 } 
    599                         } 
    600                         catch (...) 
    601                         { 
    602                                 CLOG_LOGCATCH(...); 
    603                 } 
    604         } 
     598                } 
     599        } 
     600        catch (...) 
     601        { 
     602                CLOG_LOGCATCH(...); 
     603        } 
     604} 
    605605 
    606606// Open address book 
    607607void CAdbkManagerTable::OnOpenAddressBook(void) 
    608608{ 
    609                 // Display each selected address book 
    610                 DoToSelection((DoToSelectionPP) &CAdbkManagerTable::OpenAddressBook); 
     609        // Display each selected address book 
     610        DoToSelection((DoToSelectionPP) &CAdbkManagerTable::OpenAddressBook); 
    611611} 
    612612 
     
    621621                return false; 
    622622         
    623                 // Open it 
     623        // Open it 
    624624        return CAddressBookWindow::OpenWindow(adbk); 
    625625} 
     
    698698                                for(CAddressBookList::reverse_iterator riter = selected.rbegin(); riter != selected.rend(); riter++) 
    699699                                        mManager->DeleteAddressBook(*riter); 
    700         } 
    701 } 
     700                        } 
     701                } 
    702702        } 
    703703        catch (...) 
     
    705705                CLOG_LOGCATCH(...); 
    706706        } 
    707         } 
     707} 
    708708 
    709709// Search address books 
     
    10291029        uint32_t woRow = adbk->GetRow(); 
    10301030        TableIndexT exp_row = GetExposedIndex(woRow); 
    1031                 if (exp_row) 
     1031        if (exp_row) 
    10321032                RefreshRow(exp_row); 
    10331033} 
     
    11391139                CPreferences::sPrefs->mExpandedAdbks.Value().insert(adbk->IsProtocol() ? adbk->GetName() : adbk->GetAccountName()); 
    11401140        } 
    1141                                 else 
     1141        else 
    11421142        { 
    11431143                CPreferences::sPrefs->mExpandedAdbks.Value().erase(adbk->IsProtocol() ? adbk->GetName() : adbk->GetAccountName()); 
     
    11621162                if (exp_row) 
    11631163                        RefreshRow(exp_row); 
    1164                         } 
    1165                 } 
     1164        } 
     1165} 
    11661166 
    11671167void CAdbkManagerTable::ExpandAction(TableIndexT worow, bool deep) 
  • Mulberry/branches/v4.1d1/Sources_Common/Application/Preferences/CIdentity.cp

    r86 r96  
    911911         
    912912        return NULL; 
    913         } 
    914          
     913} 
     914 
    915915CIdentity* CIdentityList::GetIdentity(const CCalendarAddress& caladdr) const 
    916916{ 
  • Mulberry/branches/v4.1d1/Sources_Common/Calendar_Store/Clients/CCalDAVCalendarClient.cpp

    r86 r96  
    359359        if (no_report) 
    360360        { 
    361         for(cdstrvect::const_iterator iter = hrefs.begin(); iter != hrefs.end(); iter++) 
    362         { 
    363                 // Read in the component 
    364                 ReadCalendarComponent(*iter, cal); 
    365         } 
     361                for(cdstrvect::const_iterator iter = hrefs.begin(); iter != hrefs.end(); iter++) 
     362                { 
     363                        // Read in the component 
     364                        ReadCalendarComponent(*iter, cal); 
     365                } 
    366366        } 
    367367        else 
    368368        { 
    369         // Don't bother with this if empty (actually spec requires at least one href) 
    370         if (hrefs.empty()) 
    371                 return; 
    372  
    373         // Run the calendar-multiget report 
    374         cdstring rurl = GetRURL(&node); 
    375  
    376         // Create WebDAV REPORT 
    377         bool old_style = false; 
     369                // Don't bother with this if empty (actually spec requires at least one href) 
     370                if (hrefs.empty()) 
     371                        return; 
     372 
     373                // Run the calendar-multiget report 
     374                cdstring rurl = GetRURL(&node); 
     375 
     376                // Create WebDAV REPORT 
     377                bool old_style = false; 
    378378#ifdef OLD_STYLE_CALENDAR_DATA 
    379         old_style = (GetCalendarProtocol()->GetAccount()->GetName().find("oldstyle") != cdstring::npos); 
     379                old_style = (GetCalendarProtocol()->GetAccount()->GetName().find("oldstyle") != cdstring::npos); 
    380380#endif 
    381         auto_ptr<http::caldav::CCalDAVMultigetReport> request(new http::caldav::CCalDAVMultigetReport(this, rurl, hrefs, old_style)); 
    382         http::CHTTPOutputDataString dout; 
    383         request->SetOutput(&dout); 
    384  
    385         // Process it 
    386         RunSession(request.get()); 
    387  
    388         // Check response status 
    389         switch(request->GetStatusCode()) 
    390         { 
    391         case http::webdav::eStatus_MultiStatus: 
    392                 // Do default action 
    393                 break; 
    394         default: 
    395                 // Handle error and exit here 
    396                 HandleHTTPError(request.get()); 
    397                 return; 
    398         } 
    399  
    400         http::caldav::CCalDAVReportParser parser(cal); 
    401         parser.ParseData(dout.GetData()); 
     381                auto_ptr<http::caldav::CCalDAVMultigetReport> request(new http::caldav::CCalDAVMultigetReport(this, rurl, hrefs, old_style)); 
     382                http::CHTTPOutputDataString dout; 
     383                request->SetOutput(&dout); 
     384 
     385                // Process it 
     386                RunSession(request.get()); 
     387 
     388                // Check response status 
     389                switch(request->GetStatusCode()) 
     390                { 
     391                case http::webdav::eStatus_MultiStatus: 
     392                        // Do default action 
     393                        break; 
     394                default: 
     395                        // Handle error and exit here 
     396                        HandleHTTPError(request.get()); 
     397                        return; 
     398                } 
     399 
     400                http::caldav::CCalDAVReportParser parser(cal); 
     401                parser.ParseData(dout.GetData()); 
    402402        } 
    403403} 
  • Mulberry/branches/v4.1d1/Sources_Common/Calendar_Store/Clients/CWebDAVCalendarClient.cpp

    r86 r96  
    15521552                                        // as we might have a digest re-auth. 
    15531553                                        if (!first_time) 
    1554                                         DisplayHTTPError(request); 
     1554                                                DisplayHTTPError(request); 
    15551555                                } 
    15561556 
  • Mulberry/branches/v4.1d1/Sources_Common/HTTP/HTTPClient/CHTTPAuthorizationDigest.cpp

    r79 r96  
    5151        else 
    5252        { 
    53         os << cHeaderAuthorization << cHeaderDelimiter << "Digest " 
     53                os << cHeaderAuthorization << cHeaderDelimiter << "Digest " 
    5454                << "username=\"" << mUser << "\"," << net_endl 
    5555                << " realm=\"" << mRealm << "\"," << net_endl 
  • Mulberry/branches/v4.1d1/Sources_Common/HTTP/WebDAVClient/CWebDAVACL.cpp

    r86 r96  
    112112        { 
    113113                for(CCalendarACLList::const_iterator iter = mCalACLs->begin(); iter != mCalACLs->end(); iter++) 
    114         { 
    115                 // Cannot do if change not allowed 
    116                 if (!(*iter).CanChange()) 
    117                         continue; 
    118                  
    119                 // <DAV:ace> element 
    120                 (*iter).GenerateACE(&xmldoc, acl, static_cast<const CWebDAVSession*>(GetSession())->HasDAVVersion(CWebDAVSession::eCyrusoftInheritable)); 
     114                { 
     115                        // Cannot do if change not allowed 
     116                        if (!(*iter).CanChange()) 
     117                                continue; 
     118                         
     119                        // <DAV:ace> element 
     120                        (*iter).GenerateACE(&xmldoc, acl, static_cast<const CWebDAVSession*>(GetSession())->HasDAVVersion(CWebDAVSession::eCyrusoftInheritable)); 
    121121                } 
    122122        } 
  • Mulberry/branches/v4.1d1/Sources_Common/Mail/Address/CAdbkAddress.cp

    r86 r96  
    274274                result += GetMailAddress(); 
    275275                result += ">"; 
    276 } 
    277  
     276        } 
     277         
    278278        list.push_back(result); 
    279279} 
  • Mulberry/branches/v4.1d1/Sources_Common/Mail/Address/CAddressList.h

    r86 r96  
    7070                                                                 bool full) const; 
    7171        void    AddCalendarAddressToList(cdstrvect& list,                               // Add calendar addresses to list 
    72                                                                         bool full) const; 
     72                                                                 bool full) const; 
    7373        void    WriteToStream(ostream& stream) const;                                   // Write to stream 
    7474 
  • Mulberry/branches/v4.1d1/Sources_Common/Mail/AddressBook/CAddressBook.cp

    r86 r96  
    530530 
    531531                // Mark as open 
    532         SetFlags(eOpen); 
     532                SetFlags(eOpen); 
    533533        } 
    534534        catch (...) 
     
    795795        } 
    796796 
    797                 // Add unique items 
     797        // Add unique items 
    798798        if (unique.size()) 
    799799                AddAddress(&unique); 
    800         } 
     800} 
    801801 
    802802void CAddressBook::UpdateAddress(CAddress* addr, bool sorted) 
     
    14761476        else 
    14771477        { 
    1478         cdstring matchit(name); 
    1479         CAdbkAddress::ExpandMatch(match, matchit); 
    1480  
    1481         // Iterate over all single addresses 
    1482         for(CAddressList::const_iterator iter = mAddresses.begin(); iter != mAddresses.end(); iter++) 
    1483         { 
    1484                 bool result = false; 
    1485  
    1486                 CAdbkAddress* addr = dynamic_cast<CAdbkAddress*>(*iter); 
    1487                 if (!addr) 
    1488                         continue; 
    1489                          
    1490                 // Do comparison of specific field 
    1491                 result = addr->Search(matchit, field); 
    1492  
    1493                 // Check for matching item 
    1494                 if (result) 
    1495                         // Add copy to list 
    1496                         addr_list.push_back(new CAdbkAddress(*addr)); 
     1478                cdstring matchit(name); 
     1479                CAdbkAddress::ExpandMatch(match, matchit); 
     1480 
     1481                // Iterate over all single addresses 
     1482                for(CAddressList::const_iterator iter = mAddresses.begin(); iter != mAddresses.end(); iter++) 
     1483                { 
     1484                        bool result = false; 
     1485 
     1486                        CAdbkAddress* addr = dynamic_cast<CAdbkAddress*>(*iter); 
     1487                        if (!addr) 
     1488                                continue; 
     1489                                 
     1490                        // Do comparison of specific field 
     1491                        result = addr->Search(matchit, field); 
     1492 
     1493                        // Check for matching item 
     1494                        if (result) 
     1495                                // Add copy to list 
     1496                                addr_list.push_back(new CAdbkAddress(*addr)); 
    14971497                } 
    14981498        } 
  • Mulberry/branches/v4.1d1/Sources_Common/Mail/AddressBook/CAddressBookManager.cp

    r86 r96  
    403403                        break; 
    404404                } 
    405         } 
     405        }        
    406406} 
    407407 
     
    558558                // Add to protos list 
    559559                mProtos.push_back(proto); 
    560 } 
     560        } 
    561561 
    562562        // Adjust indices to remove local/web 
     
    571571        if (new_index < (long) mProtos.size() - 1 - proto_offset) 
    572572                accts.insert(accts.begin() + new_index, acct); 
    573                 else 
     573        else 
    574574                accts.push_back(acct); 
    575575        CPreferences::sPrefs->mAddressAccounts.SetDirty(); 
     
    587587                if (result != NULL) 
    588588                        return result; 
    589 } 
    590  
     589        } 
     590         
    591591        return NULL; 
    592         } 
     592} 
    593593 
    594594// Managing the store 
     
    596596{ 
    597597        if ((proto == NULL) || name.empty()) 
    598         return NULL; 
     598                return NULL; 
    599599 
    600600        // Create account name 
     
    623623                if (!directory) 
    624624                { 
    625 } 
     625                } 
    626626 
    627627                // Now insert into parent 
     
    682682                                // Now read the calendar data 
    683683                                node->GetProtocol()->ReadFullCalendar(*node, *cal); 
    684 } 
    685  
     684                        } 
     685                         
    686686                        // Change the name in the calendar 
    687687                        cal->EditName(node->GetShortName()); 
     
    704704                        { 
    705705                                node->SetCalendar(NULL); 
    706                 } 
    707                  
     706                        } 
     707                         
    708708                        CLOG_LOGRETHROW; 
    709709                        throw; 
     
    711711#endif 
    712712        } 
    713  
     713         
    714714        // Now adjust node position 
    715715         
     
    725725                parent_node->AddChild(node, true); 
    726726                Broadcast_Message(eBroadcast_InsertNode, node); 
    727 } 
     727        } 
    728728 
    729729        // Make sure protocol list is in sync after rename 
     
    778778                        if (found == mAdbkSearch.end()) 
    779779                                mAdbkSearch.push_back(adbk); 
    780                                 } 
    781                         } 
     780                } 
     781        } 
    782782        else 
    783783        { 
  • Mulberry/branches/v4.1d1/Sources_Common/Mail/Extensions/CAdbkACL.cp

    r86 r96  
    3232        if (this != &copy) 
    3333        { 
    34         CACL::operator=(copy); 
     34                CACL::operator=(copy); 
    3535                mType = copy.mType; 
    3636                mCanChange = copy.mCanChange; 
  • Mulberry/branches/v4.1d1/Sources_Common/Mail/INET_Clients/IMSP/CIMSPClient.cp

    r86 r96  
    14251425        } 
    14261426 
    1427                 // Add adress book to list 
     1427        // Add adress book to list 
    14281428        CAddressBook* adbk = new CAddressBook(GetAdbkOwner(), GetAdbkOwner()->GetStoreRoot(), !noselect, !noinferiors, adbk_name); 
    14291429        GetAdbkOwner()->GetStoreRoot()->AddChildHierarchy(adbk); 
  • Mulberry/branches/v4.1d1/Sources_Common/Mail/Protocols/CAdbkProtocol.cp

    r86 r96  
    447447                return; 
    448448 
    449                 try 
    450                 { 
     449        try 
     450        { 
    451451                // Logoff if required 
    452452                if (IsLoggedOn()) 
     
    463463                // Clean any free connections in cache 
    464464                CleanConnections(); 
    465                 } 
    466