summaryrefslogtreecommitdiff
path: root/reportdesign/source
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-03-01 03:13:28 +0100
committerEike Rathke <erack@redhat.com>2014-03-05 07:31:19 -0600
commit68ec95b3f80408ae50897b043eed69a07d084df9 (patch)
tree5d32076e843fae44f28e3c8d9dbbacf7648fecbc /reportdesign/source
parentc3403ac888c2e62edaf8befe7982f5f8cc95c16f (diff)
made ListBox handle more than 64k elements, fdo#61520 related
ListBox and related now handle up to sal_Int32 elements correctly. sal_Int32 instead of sal_Size or size_t because of UNO and a11y API. Also disentangled some of the mess of SvTreeList and other containers regarding sal_uInt16, sal_uLong, long, size_t, ... type mixtures. Change-Id: Idb6e0ae689dc5bc2cf980721972b57b0261e688a Reviewed-on: https://gerrit.libreoffice.org/8460 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'reportdesign/source')
-rw-r--r--reportdesign/source/ui/dlg/AddField.cxx10
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx6
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx16
3 files changed, 16 insertions, 16 deletions
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index 1ff8e015a49d..cf982895fbb1 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -274,7 +274,7 @@ namespace
const OUString* pEntries = _rEntries.getConstArray();
sal_Int32 nEntries = _rEntries.getLength();
for ( sal_Int32 i = 0; i < nEntries; ++i, ++pEntries )
- _rListBox.InsertEntry( *pEntries,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries) );
+ _rListBox.InsertEntry( *pEntries,NULL,sal_False,TREELIST_APPEND,new ColumnInfo(*pEntries) );
}
void lcl_addToList( OAddFieldWindowListBox& _rListBox, const uno::Reference< container::XNameAccess>& i_xColumns )
{
@@ -288,9 +288,9 @@ namespace
if ( xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_LABEL) )
xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
if ( !sLabel.isEmpty() )
- _rListBox.InsertEntry( sLabel,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
+ _rListBox.InsertEntry( sLabel,NULL,sal_False,TREELIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
else
- _rListBox.InsertEntry( *pEntries,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
+ _rListBox.InsertEntry( *pEntries,NULL,sal_False,TREELIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
}
}
}
@@ -456,9 +456,9 @@ void OAddFieldWindow::_elementInserted( const container::ContainerEvent& _rEvent
if ( xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_LABEL) )
xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
if ( !sLabel.isEmpty() )
- m_pListBox->InsertEntry( sLabel,NULL,sal_False,LIST_APPEND,new ColumnInfo(sName,sLabel) );
+ m_pListBox->InsertEntry( sLabel,NULL,sal_False,TREELIST_APPEND,new ColumnInfo(sName,sLabel) );
else
- m_pListBox->InsertEntry( sName,NULL,sal_False,LIST_APPEND,new ColumnInfo(sName,sLabel) );
+ m_pListBox->InsertEntry( sName,NULL,sal_False,TREELIST_APPEND,new ColumnInfo(sName,sLabel) );
}
}
}
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 1d56f1b81183..d84b3d87ead2 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -253,7 +253,7 @@ sal_Int8 OFieldExpressionControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt
sal_Int8 nAction = DND_ACTION_NONE;
if ( IsEditing() )
{
- sal_uInt16 nPos = m_pComboCell->GetSelectEntryPos();
+ sal_Int32 nPos = m_pComboCell->GetSelectEntryPos();
if ( COMBOBOX_ENTRY_NOTFOUND != nPos || !m_pComboCell->GetText().isEmpty() )
SaveModified();
DeactivateCell();
@@ -447,7 +447,7 @@ sal_Bool OFieldExpressionControl::SaveModified(bool _bAppendRow)
xGroup = m_pParent->getGroup(m_aGroupPositions[nRow]);
if ( xGroup.is() )
{
- sal_uInt16 nPos = m_pComboCell->GetSelectEntryPos();
+ sal_Int32 nPos = m_pComboCell->GetSelectEntryPos();
OUString sExpression;
if ( COMBOBOX_ENTRY_NOTFOUND == nPos )
sExpression = m_pComboCell->GetText();
@@ -1287,7 +1287,7 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x
m_aGroupOnLst.SetEntryData(1,reinterpret_cast<void*>(report::GroupOn::INTERVAL));
break;
}
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
switch(_xGroup->getGroupOn())
{
case report::GroupOn::DEFAULT:
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 9bdcbbcd34fb..f424dff3ca06 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -154,7 +154,7 @@ class NavigatorTree : public ::cppu::BaseMutex
unsigned short m_nTimerCounter;
SvTreeListEntry* insertEntry(const OUString& _sName,SvTreeListEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition,UserData* _pData);
- void traverseSection(const uno::Reference< report::XSection>& _xSection,SvTreeListEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition = LIST_APPEND);
+ void traverseSection(const uno::Reference< report::XSection>& _xSection,SvTreeListEntry* _pParent,sal_uInt16 _nImageId,sal_uLong _nPosition = TREELIST_APPEND);
void traverseFunctions(const uno::Reference< report::XFunctions>& _xFunctions,SvTreeListEntry* _pParent);
NavigatorTree(const NavigatorTree&);
@@ -521,7 +521,7 @@ void NavigatorTree::traverseSection(const uno::Reference< report::XSection>& _xS
{
uno::Reference< report::XReportComponent> xElement(_xSection->getByIndex(i),uno::UNO_QUERY_THROW);
OSL_ENSURE(xElement.is(),"Found report element which is NULL!");
- insertEntry(lcl_getName(xElement.get()),pSection,lcl_getImageId(xElement),LIST_APPEND,new UserData(this,xElement));
+ insertEntry(lcl_getName(xElement.get()),pSection,lcl_getImageId(xElement),TREELIST_APPEND,new UserData(this,xElement));
uno::Reference< report::XReportDefinition> xSubReport(xElement,uno::UNO_QUERY);
if ( xSubReport.is() )
{
@@ -534,12 +534,12 @@ void NavigatorTree::traverseSection(const uno::Reference< report::XSection>& _xS
void NavigatorTree::traverseFunctions(const uno::Reference< report::XFunctions>& _xFunctions,SvTreeListEntry* _pParent)
{
- SvTreeListEntry* pFunctions = insertEntry(OUString(ModuleRes(RID_STR_FUNCTIONS)), _pParent, SID_RPT_NEW_FUNCTION, LIST_APPEND, new UserData(this,_xFunctions));
+ SvTreeListEntry* pFunctions = insertEntry(OUString(ModuleRes(RID_STR_FUNCTIONS)), _pParent, SID_RPT_NEW_FUNCTION, TREELIST_APPEND, new UserData(this,_xFunctions));
const sal_Int32 nCount = _xFunctions->getCount();
for (sal_Int32 i = 0; i< nCount; ++i)
{
uno::Reference< report::XFunction> xElement(_xFunctions->getByIndex(i),uno::UNO_QUERY);
- insertEntry(xElement->getName(),pFunctions,SID_RPT_NEW_FUNCTION,LIST_APPEND,new UserData(this,xElement));
+ insertEntry(xElement->getName(),pFunctions,SID_RPT_NEW_FUNCTION,TREELIST_APPEND,new UserData(this,xElement));
}
}
@@ -568,7 +568,7 @@ SvTreeListEntry* NavigatorTree::find(const uno::Reference< uno::XInterface >& _x
void NavigatorTree::traverseReport(const uno::Reference< report::XReportDefinition>& _xReport)
{
- insertEntry(_xReport->getName(),m_pMasterReport,SID_SELECT_REPORT,LIST_APPEND,new UserData(this,_xReport));
+ insertEntry(_xReport->getName(),m_pMasterReport,SID_SELECT_REPORT,TREELIST_APPEND,new UserData(this,_xReport));
}
void NavigatorTree::traverseReportFunctions(const uno::Reference< report::XFunctions>& _xFunctions)
@@ -604,7 +604,7 @@ void NavigatorTree::traversePageFooter(const uno::Reference< report::XSection>&
void NavigatorTree::traverseGroups(const uno::Reference< report::XGroups>& _xGroups)
{
SvTreeListEntry* pReport = find(_xGroups->getReportDefinition());
- insertEntry(OUString(ModuleRes(RID_STR_GROUPS)), pReport, SID_SORTINGANDGROUPING, LIST_APPEND, new UserData(this,_xGroups));
+ insertEntry(OUString(ModuleRes(RID_STR_GROUPS)), pReport, SID_SORTINGANDGROUPING, TREELIST_APPEND, new UserData(this,_xGroups));
}
void NavigatorTree::traverseGroup(const uno::Reference< report::XGroup>& _xGroup)
@@ -665,7 +665,7 @@ void NavigatorTree::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
traverseSection(xReport->getPageFooter(),pParent, SID_PAGEHEADERFOOTER);
else if ( _rEvent.PropertyName == PROPERTY_REPORTFOOTERON )
{
- sal_uLong nPos = xReport->getPageFooterOn() ? (GetLevelChildCount(pParent) - 1) : LIST_APPEND;
+ sal_uLong nPos = xReport->getPageFooterOn() ? (GetLevelChildCount(pParent) - 1) : TREELIST_APPEND;
traverseSection(xReport->getReportFooter(),pParent,SID_REPORTHEADERFOOTER,nPos);
}
}
@@ -696,7 +696,7 @@ void NavigatorTree::_elementInserted( const container::ContainerEvent& _rEvent )
uno::Reference< report::XReportComponent> xElement(xProp,uno::UNO_QUERY);
if ( xProp.is() )
sName = lcl_getName(xProp);
- insertEntry(sName,pEntry,(!xElement.is() ? sal_uInt16(SID_RPT_NEW_FUNCTION) : lcl_getImageId(xElement)),LIST_APPEND,new UserData(this,xProp));
+ insertEntry(sName,pEntry,(!xElement.is() ? sal_uInt16(SID_RPT_NEW_FUNCTION) : lcl_getImageId(xElement)),TREELIST_APPEND,new UserData(this,xProp));
}
if ( !IsExpanded(pEntry) )
Expand(pEntry);