summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src/column.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/HistoryStats/src/column.cpp')
-rw-r--r--plugins/HistoryStats/src/column.cpp65
1 files changed, 25 insertions, 40 deletions
diff --git a/plugins/HistoryStats/src/column.cpp b/plugins/HistoryStats/src/column.cpp
index 82429700bf..f44aa5c890 100644
--- a/plugins/HistoryStats/src/column.cpp
+++ b/plugins/HistoryStats/src/column.cpp
@@ -33,18 +33,18 @@ Column::FactoryList::~FactoryList()
void Column::FactoryList::initList()
{
- registerUID(new Factory<ColRank> );
- registerUID(new Factory<ColNick> );
- registerUID(new Factory<ColProtocol> );
- registerUID(new Factory<ColGroup> );
- registerUID(new Factory<ColInOut> );
- registerUID(new Factory<ColInOutGraph> );
- registerUID(new Factory<ColChatDuration> );
- registerUID(new Factory<ColWords> );
- registerUID(new Factory<ColWordCount> );
- registerUID(new Factory<ColEvents> );
- registerUID(new Factory<ColSplit> );
- registerUID(new Factory<ColTimeline> );
+ registerUID(new Factory<ColRank>);
+ registerUID(new Factory<ColNick>);
+ registerUID(new Factory<ColProtocol>);
+ registerUID(new Factory<ColGroup>);
+ registerUID(new Factory<ColInOut>);
+ registerUID(new Factory<ColInOutGraph>);
+ registerUID(new Factory<ColChatDuration>);
+ registerUID(new Factory<ColWords>);
+ registerUID(new Factory<ColWordCount>);
+ registerUID(new Factory<ColEvents>);
+ registerUID(new Factory<ColSplit>);
+ registerUID(new Factory<ColTimeline>);
registerUID(new Factory<ColSplitTimeline>);
}
@@ -54,22 +54,17 @@ void Column::FactoryList::initList()
ext::string Column::IDProvider::getID()
{
- ext::string s = muT("q");
+ ext::string s = _T("q");
int val = m_nNextID++;
- while (val > 0)
- {
+ while (val > 0) {
int digit = val % 36;
if (digit < 10)
- {
- s += (muC('0') + digit);
- }
+ s += ('0' + digit);
else
- {
- s += (muC('a') + digit - 10);
- }
-
+ s += ('a' + digit - 10);
+
val /= 36;
}
@@ -87,9 +82,7 @@ Column* Column::fromUID(const ext::string& guid)
upto_each_(i, countColInfo())
{
if (getColInfo(i).m_UID == guid)
- {
return getColInfo(i).m_pFactory->makeInstance();
- }
}
return NULL;
@@ -100,12 +93,10 @@ void Column::registerUID(FactoryBase* pFactory)
Column* pDummy = pFactory->makeInstance();
ColumnInfo ci;
-
ci.m_UID = pDummy->getUID();
ci.m_Title = pDummy->getTitle();
ci.m_Description = pDummy->getDescription();
ci.m_pFactory = pFactory;
-
m_Factories.m_List.push_back(ci);
delete pDummy;
@@ -115,26 +106,22 @@ void Column::writeRowspanTD(ext::ostream& tos, const ext::string& innerHTML, int
{
int curRowSpan = (row < numRows) ? 1 : (rowSpan - numRows + 1);
- tos << muT("<td");
+ tos << _T("<td");
if (colSpan > 1)
- {
- tos << muT(" colspan=\"") << colSpan << muT("\"");
- }
+ tos << _T(" colspan=\"") << colSpan << _T("\"");
if (curRowSpan > 1)
- {
- tos << muT(" rowspan=\"") << curRowSpan << muT("\"");
- }
+ tos << _T(" rowspan=\"") << curRowSpan << _T("\"");
- tos << muT(">") << innerHTML << muT("</td>") << ext::endl;
+ tos << _T(">") << innerHTML << _T("</td>") << ext::endl;
}
void Column::copyAttrib(const Column* pSource)
{
- m_bEnabled = pSource->m_bEnabled;
- m_CustomTitle = pSource->m_CustomTitle;
- m_nContactDataSlot = pSource->m_nContactDataSlot;
+ m_bEnabled = pSource->m_bEnabled;
+ m_CustomTitle = pSource->m_CustomTitle;
+ m_nContactDataSlot = pSource->m_nContactDataSlot;
m_nContactDataTransformSlot = pSource->m_nContactDataTransformSlot;
}
@@ -143,9 +130,7 @@ const ext::string Column::getCustomTitle(const ext::string& strShort, const ext:
ext::string strTitle = utils::htmlEscape(m_CustomTitle.empty() ? (m_pSettings->m_TableHeaderVerbose ? strLong : strShort) : m_CustomTitle);
if (m_pSettings->m_HeaderTooltips && (!m_pSettings->m_HeaderTooltipsIfCustom || !m_CustomTitle.empty() || (!m_pSettings->m_TableHeaderVerbose && strShort != strLong)))
- {
- strTitle = muT("<span title=\"") + utils::htmlEscape(strLong) + muT("\">") + strTitle + muT("</span>");
- }
+ strTitle = _T("<span title=\"") + utils::htmlEscape(strLong) + _T("\">") + strTitle + _T("</span>");
return strTitle;
}