summaryrefslogtreecommitdiff
path: root/sd/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 /sd/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 'sd/source')
-rw-r--r--sd/source/core/anminfo.cxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.cxx30
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx46
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx28
-rw-r--r--sd/source/ui/dlg/animobjs.cxx10
-rw-r--r--sd/source/ui/dlg/copydlg.cxx2
-rw-r--r--sd/source/ui/dlg/custsdlg.cxx20
-rw-r--r--sd/source/ui/dlg/navigatr.cxx2
-rw-r--r--sd/source/ui/dlg/present.cxx4
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx16
-rw-r--r--sd/source/ui/dlg/tpaction.cxx8
-rw-r--r--sd/source/ui/dlg/tpoption.cxx8
-rw-r--r--sd/source/ui/func/fulinend.cxx2
-rw-r--r--sd/source/ui/func/fumorph.cxx4
-rw-r--r--sd/source/ui/view/outlview.cxx4
15 files changed, 94 insertions, 94 deletions
diff --git a/sd/source/core/anminfo.cxx b/sd/source/core/anminfo.cxx
index 1f897a0dfbd8..f160910ede1a 100644
--- a/sd/source/core/anminfo.cxx
+++ b/sd/source/core/anminfo.cxx
@@ -52,7 +52,7 @@ SdAnimationInfo::SdAnimationInfo(SdrObject& rObject)
mbSecondSoundOn (sal_False),
mbSecondPlayFull (sal_False),
mnVerb (0),
- mnPresOrder (LIST_APPEND),
+ mnPresOrder (TREELIST_APPEND),
mrObject (rObject)
{
maBlueScreen = RGB_Color(COL_LIGHTMAGENTA);
@@ -82,7 +82,7 @@ SdAnimationInfo::SdAnimationInfo(const SdAnimationInfo& rAnmInfo, SdrObject& rOb
mbSecondSoundOn (rAnmInfo.mbSecondSoundOn),
mbSecondPlayFull (rAnmInfo.mbSecondPlayFull),
mnVerb (rAnmInfo.mnVerb),
- mnPresOrder (LIST_APPEND),
+ mnPresOrder (TREELIST_APPEND),
mrObject (rObject)
{
// can not be copied
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 1e1912fde7bf..36692adc70b5 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -77,7 +77,7 @@ public:
virtual void MouseButtonUp( const MouseEvent& rMEvt );
- sal_uInt16 InsertCategory( const OUString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
+ sal_Int32 InsertCategory( const OUString& rStr, sal_Int32 nPos = LISTBOX_APPEND );
void SetDoubleClickLink( const Link& rDoubleClickHdl ) { maDoubleClickHdl = rDoubleClickHdl; }
@@ -105,9 +105,9 @@ CategoryListBox::~CategoryListBox()
{
}
-sal_uInt16 CategoryListBox::InsertCategory( const OUString& rStr, sal_uInt16 nPos /* = LISTBOX_APPEND */ )
+sal_Int32 CategoryListBox::InsertCategory( const OUString& rStr, sal_Int32 nPos /* = LISTBOX_APPEND */ )
{
- sal_uInt16 n = ListBox::InsertEntry( rStr, nPos );
+ sal_Int32 n = ListBox::InsertEntry( rStr, nPos );
if( n != LISTBOX_ENTRY_NOTFOUND )
ListBox::SetEntryFlags( n, ListBox::GetEntryFlags(n) | LISTBOX_ENTRY_FLAG_DISABLE_SELECTION );
@@ -208,9 +208,9 @@ private:
sal_uInt16 mnId;
- sal_uInt16 mnCurvePathPos;
- sal_uInt16 mnPolygonPathPos;
- sal_uInt16 mnFreeformPathPos;
+ sal_Int32 mnCurvePathPos;
+ sal_Int32 mnPolygonPathPos;
+ sal_Int32 mnFreeformPathPos;
};
@@ -255,7 +255,7 @@ CustomAnimationCreateTabPage::CustomAnimationCreateTabPage( Window* pParent, Cus
OUString sMotionPathLabel( SD_RESSTR( STR_CUSTOMANIMATION_USERPATH ) );
- sal_uInt16 nFirstEffect = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nFirstEffect = LISTBOX_ENTRY_NOTFOUND;
if( nTabId == MOTIONPATH )
{
@@ -287,7 +287,7 @@ CustomAnimationCreateTabPage::CustomAnimationCreateTabPage( Window* pParent, Cus
CustomAnimationPresetPtr pDescriptor = (*aIter++);
if( pDescriptor.get() && (bHasText || !pDescriptor->isTextOnly() ) )
{
- sal_uInt16 nPos = mpLBEffects->InsertEntry( pDescriptor->getLabel() );
+ sal_Int32 nPos = mpLBEffects->InsertEntry( pDescriptor->getLabel() );
mpLBEffects->SetEntryData( nPos, static_cast<void*>( new CustomAnimationPresetPtr( pDescriptor ) ) );
if( nFirstEffect == LISTBOX_ENTRY_NOTFOUND )
@@ -338,7 +338,7 @@ void CustomAnimationCreateTabPage::onSelectEffect()
CustomAnimationPresetPtr pPreset( *p );
const double fDuration = pPreset->getDuration();
- sal_uInt16 nPos = 0xffff;
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
if( fDuration == 5.0 )
nPos = 0;
@@ -365,7 +365,7 @@ void CustomAnimationCreateTabPage::onSelectEffect()
void CustomAnimationCreateTabPage::clearEffects()
{
- sal_uInt16 nPos = mpLBEffects->GetEntryCount();
+ sal_Int32 nPos = mpLBEffects->GetEntryCount();
while( nPos-- )
delete static_cast< CustomAnimationPresetPtr* >( mpLBEffects->GetEntryData( nPos ) );
@@ -392,7 +392,7 @@ PathKind CustomAnimationCreateTabPage::getCreatePathKind() const
if( mpLBEffects->GetSelectEntryCount() == 1 )
{
- const sal_uInt16 nPos = mpLBEffects->GetSelectEntryPos();
+ const sal_Int32 nPos = mpLBEffects->GetSelectEntryPos();
if( nPos == mnCurvePathPos )
{
eKind = CURVE;
@@ -414,8 +414,8 @@ PathKind CustomAnimationCreateTabPage::getCreatePathKind() const
double CustomAnimationCreateTabPage::getDuration() const
{
- sal_uInt16 nPos = mpCBSpeed->GetSelectEntryPos();
- if( (nPos == 0xffff) || !mpCBSpeed->IsEnabled() )
+ sal_Int32 nPos = mpCBSpeed->GetSelectEntryPos();
+ if( (nPos == LISTBOX_ENTRY_NOTFOUND) || !mpCBSpeed->IsEnabled() )
{
CustomAnimationPresetPtr pPreset = getSelectedPreset();
if( pPreset.get() )
@@ -436,7 +436,7 @@ double CustomAnimationCreateTabPage::getDuration() const
void CustomAnimationCreateTabPage::setDuration( double fDuration )
{
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
if( fDuration < 2.0f )
{
if( fDuration < 1.0f )
@@ -480,7 +480,7 @@ sal_uInt16 CustomAnimationCreateTabPage::getId() const
bool CustomAnimationCreateTabPage::select( const OUString& rsPresetId )
{
- sal_uInt16 nPos = mpLBEffects->GetEntryCount();
+ sal_Int32 nPos = mpLBEffects->GetEntryCount();
while( nPos-- )
{
void* pEntryData = mpLBEffects->GetEntryData( nPos );
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index bb425853248a..8cbc95ab13ee 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -152,7 +152,7 @@ void PresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId )
while( aIter != aEnd )
{
- sal_uInt16 nPos = mpControl->InsertEntry( rPresets.getUINameForProperty( (*aIter) ) );
+ sal_Int32 nPos = mpControl->InsertEntry( rPresets.getUINameForProperty( (*aIter) ) );
if( (*aIter) == aPropertyValue )
mpControl->SelectEntryPos( nPos );
maPropertyValues[nPos] = (*aIter++);
@@ -229,7 +229,7 @@ ColorPropertyBox::ColorPropertyBox( sal_Int32 nControlType, Window* pParent, con
for ( long i = 0; i < pColorList->Count(); i++ )
{
XColorEntry* pEntry = pColorList->GetColor(i);
- sal_uInt16 nPos = mpControl->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ sal_Int32 nPos = mpControl->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
if( pEntry->GetColor().GetRGBColor() == (sal_uInt32)nColor )
mpControl->SelectEntryPos( nPos );
}
@@ -1274,7 +1274,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
sal_Bool bHasAfterEffect = sal_False;
pSet->getPropertyValue( nHandleHasAfterEffect ) >>= bHasAfterEffect;
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
if( bHasAfterEffect )
{
nPos++;
@@ -1288,7 +1288,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
sal_Int32 nColor = 0;
aDimColor >>= nColor;
Color aColor( nColor );
- sal_uInt16 nColorPos = mpCLBDimColor->GetEntryPos( aColor );
+ sal_Int32 nColorPos = mpCLBDimColor->GetEntryPos( aColor );
if ( LISTBOX_ENTRY_NOTFOUND != nColorPos )
mpCLBDimColor->SelectEntryPos( nColorPos );
else
@@ -1313,7 +1313,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
{
if( pSet->getPropertyState( nHandleIterateType ) != STLPropertyState_AMBIGUOUS)
{
- sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
sal_Int32 nIterateType = 0;
pSet->getPropertyValue( nHandleIterateType ) >>= nIterateType;
@@ -1345,7 +1345,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
if( pSet->getPropertyState( nHandleSoundURL ) != STLPropertyState_AMBIGUOUS )
{
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
const Any aValue( pSet->getPropertyValue( nHandleSoundURL ) );
@@ -1366,14 +1366,14 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
OUString aString = maSoundList[ i ];
if( aString == aSoundURL )
{
- nPos = (sal_uInt16)i+2;
+ nPos = (sal_Int32)i+2;
break;
}
}
if( nPos == 0 )
{
- nPos = (sal_uInt16)maSoundList.size()+2;
+ nPos = (sal_Int32)maSoundList.size()+2;
maSoundList.push_back( aSoundURL );
INetURLObject aURL( aSoundURL );
nPos = mpLBSound->InsertEntry( aURL.GetBase(), nPos );
@@ -1396,7 +1396,7 @@ CustomAnimationEffectTabPage::~CustomAnimationEffectTabPage()
void CustomAnimationEffectTabPage::updateControlStates()
{
- sal_uInt16 nPos = mpLBAfterEffect->GetSelectEntryPos();
+ sal_Int32 nPos = mpLBAfterEffect->GetSelectEntryPos();
mpCLBDimColor->Enable( nPos == 1 );
mpFTDimColor->Enable( nPos == 1 );
@@ -1415,7 +1415,7 @@ IMPL_LINK( CustomAnimationEffectTabPage, implSelectHdl, Control*, pControl )
{
if( pControl == mpLBAfterEffect )
{
- sal_uInt16 nPos = static_cast<ListBox*>( mpLBAfterEffect )->GetSelectEntryPos();
+ sal_Int32 nPos = static_cast<ListBox*>( mpLBAfterEffect )->GetSelectEntryPos();
if( nPos == 1 )
{
if( mpCLBDimColor->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
@@ -1429,7 +1429,7 @@ IMPL_LINK( CustomAnimationEffectTabPage, implSelectHdl, Control*, pControl )
}
else if( pControl == mpLBSound )
{
- sal_uInt16 nPos = mpLBSound->GetSelectEntryPos();
+ sal_Int32 nPos = mpLBSound->GetSelectEntryPos();
if( nPos == (mpLBSound->GetEntryCount() - 1) )
{
openSoundFileDialog();
@@ -1484,7 +1484,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
pSet->setPropertyValue( nHandleDecelerate, makeAny( fTemp ) );
}
- sal_uInt16 nPos = mpLBAfterEffect->GetSelectEntryPos();
+ sal_Int32 nPos = mpLBAfterEffect->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
sal_Bool bAfterEffect = nPos != 0;
@@ -1674,12 +1674,12 @@ void CustomAnimationEffectTabPage::openSoundFileDialog()
if( !bValidSoundFile )
nPos = 0;
- mpLBSound->SelectEntryPos( (sal_uInt16) nPos );
+ mpLBSound->SelectEntryPos( nPos );
}
void CustomAnimationEffectTabPage::onSoundPreview()
{
- const sal_uInt16 nPos = mpLBSound->GetSelectEntryPos();
+ const sal_Int32 nPos = mpLBSound->GetSelectEntryPos();
if( nPos >= 2 ) try
{
@@ -1746,7 +1746,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
{
sal_Int16 nStart = 0;
pSet->getPropertyValue( nHandleStart ) >>= nStart;
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
switch( nStart )
{
case EffectNodeType::WITH_PREVIOUS: nPos = 1; break;
@@ -1777,7 +1777,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
}
else
{
- sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
if( fDuration == 5.0 )
nPos = 0;
@@ -1806,7 +1806,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
if( aRepeatCount.hasValue() )
aRepeatCount >>= fRepeat;
- sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
if( fRepeat == 0 )
nPos = 0;
@@ -1883,7 +1883,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
}
OUString aDescription( getShapeDescription( xShape, true ) );
- sal_uInt16 nPos = mpLBTrigger->InsertEntry( aDescription );
+ sal_Int32 nPos = mpLBTrigger->InsertEntry( aDescription );
mpLBTrigger->SetEntryData( nPos, (void*)(sal_IntPtr)nShape );
if( xShape == xTrigger )
@@ -1909,7 +1909,7 @@ IMPL_LINK( CustomAnimationDurationTabPage, implControlHdl, Control*, pControl )
void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
{
- sal_uInt16 nPos = mpLBStart->GetSelectEntryPos();
+ sal_Int32 nPos = mpLBStart->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
sal_Int16 nStart;
@@ -2108,7 +2108,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent,
{
sal_Int32 nTextGrouping = 0;
if( pSet->getPropertyValue( nHandleTextGrouping ) >>= nTextGrouping )
- maLBGroupText->SelectEntryPos( (sal_uInt16)(nTextGrouping + 1) );
+ maLBGroupText->SelectEntryPos( nTextGrouping + 1 );
}
if( pSet->getPropertyState( nHandleHasVisibleShape ) != STLPropertyState_AMBIGUOUS )
@@ -2162,7 +2162,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent,
sal_Int32 nPos = 6;
while( (nPos > 2) && (nPos > nMaxParaDepth) )
{
- maLBGroupText->RemoveEntry( (sal_uInt16)nPos );
+ maLBGroupText->RemoveEntry( nPos );
nPos--;
}
}
@@ -2172,7 +2172,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent,
void CustomAnimationTextAnimTabPage::update( STLPropertySet* pSet )
{
- sal_uInt16 nPos = maLBGroupText->GetSelectEntryPos();
+ sal_Int32 nPos = maLBGroupText->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
sal_Int32 nTextGrouping = nPos - 1;
@@ -2226,7 +2226,7 @@ void CustomAnimationTextAnimTabPage::update( STLPropertySet* pSet )
void CustomAnimationTextAnimTabPage::updateControlStates()
{
- sal_uInt16 nPos = maLBGroupText->GetSelectEntryPos();
+ sal_Int32 nPos = maLBGroupText->GetSelectEntryPos();
maCBXGroupAuto->Enable( nPos > 1 );
maMFGroupAuto->Enable( nPos > 1 );
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 792e1f9efb25..4f9228d0c047 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -274,16 +274,16 @@ void lcl_CreateUndoForPages(
}
}
-sal_uInt16 lcl_getTransitionEffectIndex(
+sal_Int32 lcl_getTransitionEffectIndex(
SdDrawDocument * pDoc,
const ::sd::impl::TransitionEffect & rTransition )
{
// first entry: "<none>"
- sal_uInt16 nResultIndex = LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nResultIndex = LISTBOX_ENTRY_NOTFOUND;
if( pDoc )
{
- sal_uInt16 nCurrentIndex = 0;
+ sal_Int32 nCurrentIndex = 0;
const ::sd::TransitionPresetList & rPresetList = ::sd::TransitionPreset::getTransitionPresetList();
::sd::TransitionPresetList::const_iterator aIt( rPresetList.begin());
const ::sd::TransitionPresetList::const_iterator aEndIt( rPresetList.end());
@@ -367,14 +367,14 @@ OUString lcl_getSoundFileURL(
{
if( rListBox->GetSelectEntryCount() > 0 )
{
- sal_uInt16 nPos = rListBox->GetSelectEntryPos();
+ sal_Int32 nPos = rListBox->GetSelectEntryPos();
// the first three entries are no actual sounds
if( nPos >= 3 )
{
DBG_ASSERT( (sal_uInt32)(rListBox->GetEntryCount() - 3) == rSoundList.size(),
"Sound list-box is not synchronized to sound list" );
nPos -= 3;
- if( rSoundList.size() > nPos )
+ if( rSoundList.size() > static_cast<size_t>(nPos) )
return rSoundList[ nPos ];
}
}
@@ -402,10 +402,10 @@ void lcl_FillSoundListBox(
const ::std::vector< OUString > & rSoundList,
ListBox* rOutListBox )
{
- sal_uInt16 nCount = rOutListBox->GetEntryCount();
+ sal_Int32 nCount = rOutListBox->GetEntryCount();
// keep first three entries
- for( sal_uInt16 i=nCount - 1; i>=3; --i )
+ for( sal_Int32 i=nCount - 1; i>=3; --i )
rOutListBox->RemoveEntry( i );
::std::for_each( rSoundList.begin(), rSoundList.end(),
@@ -593,7 +593,7 @@ void SlideTransitionPane::updateControls()
mpLB_SLIDE_TRANSITIONS->SelectEntryPos( 0 );
else
{
- sal_uInt16 nEntry = lcl_getTransitionEffectIndex( mpDrawDoc, aEffect );
+ sal_Int32 nEntry = lcl_getTransitionEffectIndex( mpDrawDoc, aEffect );
if( nEntry == LISTBOX_ENTRY_NOTFOUND )
mpLB_SLIDE_TRANSITIONS->SetNoSelection();
else
@@ -633,7 +633,7 @@ void SlideTransitionPane::updateControls()
if( lcl_findSoundInList( maSoundList, aEffect.maSound, nPos ))
{
// skip first three entries
- mpLB_SOUND->SelectEntryPos( (sal_uInt16)nPos + 3 );
+ mpLB_SOUND->SelectEntryPos( nPos + 3 );
maCurrentSoundFile = aEffect.maSound;
}
}
@@ -750,7 +750,7 @@ void SlideTransitionPane::openSoundFileDialog()
if( bValidSoundFile )
// skip first three entries in list
- mpLB_SOUND->SelectEntryPos( (sal_uInt16)nPos + 3 );
+ mpLB_SOUND->SelectEntryPos( nPos + 3 );
}
if( ! bValidSoundFile )
@@ -759,7 +759,7 @@ void SlideTransitionPane::openSoundFileDialog()
{
tSoundListType::size_type nPos = 0;
if( lcl_findSoundInList( maSoundList, maCurrentSoundFile, nPos ))
- mpLB_SOUND->SelectEntryPos( (sal_uInt16)nPos + 3 );
+ mpLB_SOUND->SelectEntryPos( nPos + 3 );
else
mpLB_SOUND->SelectEntryPos( 0 ); // NONE
}
@@ -796,7 +796,7 @@ impl::TransitionEffect SlideTransitionPane::getTransitionEffectFromControls() co
if( mpLB_SPEED->IsEnabled() &&
mpLB_SPEED->GetSelectEntryCount() > 0 )
{
- sal_uInt16 nPos = mpLB_SPEED->GetSelectEntryPos();
+ sal_Int32 nPos = mpLB_SPEED->GetSelectEntryPos();
aResult.mfDuration = (nPos == 0)
? 3.0
: (nPos == 1)
@@ -832,7 +832,7 @@ impl::TransitionEffect SlideTransitionPane::getTransitionEffectFromControls() co
maCurrentSoundFile = "";
if( mpLB_SOUND->GetSelectEntryCount() > 0 )
{
- sal_uInt16 nPos = mpLB_SOUND->GetSelectEntryPos();
+ sal_Int32 nPos = mpLB_SOUND->GetSelectEntryPos();
aResult.mbStopSound = nPos == 1;
aResult.mbSoundOn = nPos > 1;
if( aResult.mbStopSound )
@@ -1035,7 +1035,7 @@ IMPL_LINK_NOARG(SlideTransitionPane, SoundListBoxSelected)
{
if( mpLB_SOUND->GetSelectEntryCount() )
{
- sal_uInt16 nPos = mpLB_SOUND->GetSelectEntryPos();
+ sal_Int32 nPos = mpLB_SOUND->GetSelectEntryPos();
if( nPos == 2 )
{
// other sound...
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 2651d367deb0..59cc9bbbac90 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -916,9 +916,9 @@ void AnimationWindow::AddObj (::sd::View& rView )
// several objects
SdrObjList* pObjList = ((SdrObjGroup*)pObject)->GetSubList();
- for( sal_uInt16 nObject = 0; nObject < pObjList->GetObjCount(); nObject++ )
+ for( sal_uLong nObject = 0; nObject < pObjList->GetObjCount(); nObject++ )
{
- SdrObject* pSnapShot = (SdrObject*) pObjList->GetObj( (sal_uLong) nObject );
+ SdrObject* pSnapShot = (SdrObject*) pObjList->GetObj( nObject );
BitmapEx *const pBitmapEx = new BitmapEx(
SdrExchangeView::GetObjGraphic(
@@ -994,7 +994,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
SdrObjList* pObjList = pCloneGroup->GetSubList();
for (sal_uLong nObject= 0; nObject < nMarkCount; nObject++)
- pObjList->InsertObject(rMarkList.GetMark(nObject)->GetMarkedSdrObj()->Clone(), LIST_APPEND);
+ pObjList->InsertObject(rMarkList.GetMark(nObject)->GetMarkedSdrObj()->Clone(), CONTAINER_APPEND);
pPage->InsertObject(pCloneGroup, m_nCurrentFrame + 1);
}
@@ -1122,7 +1122,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
// find LoopCount (number of passes)
AnimationBitmap aAnimBmp;
long nLoopCount = 0L;
- sal_uInt16 nPos = aLbLoopCount.GetSelectEntryPos();
+ sal_Int32 nPos = aLbLoopCount.GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND && nPos != aLbLoopCount.GetEntryCount() - 1 ) // endless
nLoopCount = (long) aLbLoopCount.GetSelectEntry().toInt32();
@@ -1222,7 +1222,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
pClone = pPage->GetObj(i);
SdrObject* pCloneOfClone = pClone->Clone();
//SdrObject* pCloneOfClone = pPage->GetObj(i)->Clone();
- pObjList->InsertObject(pCloneOfClone, LIST_APPEND);
+ pObjList->InsertObject(pCloneOfClone, CONTAINER_APPEND);
}
// until now the top left corner of the group is in the window center;
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index 5a76931d2fdd..f6d223d992b1 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -233,7 +233,7 @@ void CopyDlg::GetAttr( SfxItemSet& rOutAttrs )
*/
IMPL_LINK_NOARG(CopyDlg, SelectColorHdl)
{
- sal_uInt16 nPos = m_pLbStartColor->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbStartColor->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND &&
!m_pLbEndColor->IsEnabled() )
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index 8c7f54da43b2..1561111ab371 100644
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -74,7 +74,7 @@ SdCustomShowDlg::SdCustomShowDlg( Window* pWindow,
{
m_pLbCustomShows->InsertEntry( pCustomShow->GetName() );
}
- m_pLbCustomShows->SelectEntryPos( (sal_uInt16)nPosToSelect );
+ m_pLbCustomShows->SelectEntryPos( (sal_Int32)nPosToSelect );
pCustomShowList->Seek( nPosToSelect );
}
@@ -89,7 +89,7 @@ SdCustomShowDlg::~SdCustomShowDlg()
void SdCustomShowDlg::CheckState()
{
- sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos();
sal_Bool bEnable = nPos != LISTBOX_ENTRY_NOTFOUND;
m_pBtnEdit->Enable( bEnable );
@@ -134,7 +134,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
// edit CustomShow
else if( p == m_pBtnEdit )
{
- sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
DBG_ASSERT( pCustomShowList, "pCustomShowList does not exist" );
@@ -159,7 +159,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
// delete CustomShow
else if( p == m_pBtnRemove )
{
- sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
delete (*pCustomShowList)[nPos];
@@ -172,7 +172,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
// copy CustomShow
else if( p == m_pBtnCopy )
{
- sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
SdCustomShow* pShow = new SdCustomShow( *(*pCustomShowList)[nPos] );
@@ -231,7 +231,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
}
else if( p == m_pLbCustomShows )
{
- sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
pCustomShowList->Seek( nPos );
@@ -358,15 +358,15 @@ IMPL_LINK( SdDefineCustomShowDlg, ClickButtonHdl, void *, p )
{
if( p == m_pBtnAdd )
{
- sal_uInt16 nCount = m_pLbPages->GetSelectEntryCount();
+ sal_Int32 nCount = m_pLbPages->GetSelectEntryCount();
if( nCount > 0 )
{
- sal_uLong nPosCP = LIST_APPEND;
+ sal_uLong nPosCP = TREELIST_APPEND;
SvTreeListEntry* pEntry = m_pLbCustomPages->FirstSelected();
if( pEntry )
nPosCP = m_pLbCustomPages->GetModel()->GetAbsPos( pEntry ) + 1L;
- for( sal_uInt16 i = 0; i < nCount; i++ )
+ for( sal_Int32 i = 0; i < nCount; i++ )
{
OUString aStr = m_pLbPages->GetSelectEntry( i );
pEntry = m_pLbCustomPages->InsertEntry( aStr,
@@ -377,7 +377,7 @@ IMPL_LINK( SdDefineCustomShowDlg, ClickButtonHdl, void *, p )
GetSelectEntryPos( i ), PK_STANDARD );
pEntry->SetUserData( pPage );
- if( nPosCP != LIST_APPEND )
+ if( nPosCP != TREELIST_APPEND )
nPosCP++;
}
bModified = sal_True;
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 66a3ca0aa9f9..9753e01823f2 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -679,7 +679,7 @@ bool SdNavigatorWin::InsertFile(const OUString& rFileName)
void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName )
{
- sal_uInt16 nPos = 0;
+ sal_Int32 nPos = 0;
if( pDocName )
{
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index b7c14fefc02d..7d1f022f8760 100644
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -250,7 +250,7 @@ void SdStartPresentationDlg::InitMonitorSettings()
nSelectedIndex = nDefaultExternalIndex;
}
- maLBMonitor->SelectEntryPos((sal_uInt16)nSelectedIndex);
+ maLBMonitor->SelectEntryPos(nSelectedIndex);
}
}
catch( Exception& )
@@ -278,7 +278,7 @@ void SdStartPresentationDlg::GetAttr( SfxItemSet& rAttr )
rAttr.Put( SfxUInt32Item ( ATTR_PRESENT_PAUSE_TIMEOUT, aTmfPause->GetTime().GetMSFromTime() / 1000 ) );
rAttr.Put( SfxBoolItem ( ATTR_PRESENT_SHOW_PAUSELOGO, aCbxAutoLogo->IsChecked() ) );
- sal_uInt16 nPos = maLBMonitor->GetSelectEntryPos();
+ sal_Int32 nPos = maLBMonitor->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
rAttr.Put( SfxInt32Item ( ATTR_PRESENT_DISPLAY, (sal_Int32)(sal_IntPtr)maLBMonitor->GetEntryData(nPos)) );
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 82401f1b17b1..70a521c05323 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -593,7 +593,7 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, SfxMedium* pInMedium,
Image aImgDocClosed=Image( BitmapEx( SdResId( BMP_DOC_CLOSED ) ) );
// insert document name
- InsertEntry( maDocName, aImgDocOpen, aImgDocClosed, NULL, sal_True, LIST_APPEND,
+ InsertEntry( maDocName, aImgDocOpen, aImgDocClosed, NULL, sal_True, TREELIST_APPEND,
reinterpret_cast< void* >( 1 )
);
}
@@ -625,7 +625,7 @@ void SdPageObjsTLB::AddShapeList (
aIcon,
pParentEntry,
sal_False,
- LIST_APPEND,
+ TREELIST_APPEND,
pUserData);
SdrObjListIter aIter(
@@ -674,7 +674,7 @@ void SdPageObjsTLB::AddShapeList (
maImgOle,
pEntry,
sal_False,
- LIST_APPEND,
+ TREELIST_APPEND,
pObj
);
@@ -708,7 +708,7 @@ void SdPageObjsTLB::AddShapeList (
maImgGraphic,
pEntry,
sal_False,
- LIST_APPEND,
+ TREELIST_APPEND,
pObj
);
@@ -757,7 +757,7 @@ void SdPageObjsTLB::AddShapeList (
rIconProvider.maImgObjects,
pEntry,
sal_False,
- LIST_APPEND,
+ TREELIST_APPEND,
pObj
);
@@ -973,7 +973,7 @@ void SdPageObjsTLB::RequestingChildren( SvTreeListEntry* pFileEntry )
aImgPage,
pFileEntry,
sal_False,
- LIST_APPEND,
+ TREELIST_APPEND,
reinterpret_cast< void* >( 1 ) );
SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS );
@@ -1445,8 +1445,8 @@ bool SdPageObjsTLB::PageBelongsToCurrentShow (const SdPage* pPage) const
if (pCustomShow != NULL)
{
bBelongsToShow = false;
- sal_uLong nPageCount = pCustomShow->PagesVector().size();
- for (sal_uInt16 i=0; i<nPageCount && !bBelongsToShow; i++)
+ size_t nPageCount = pCustomShow->PagesVector().size();
+ for (size_t i=0; i<nPageCount && !bBelongsToShow; i++)
if (pPage == pCustomShow->PagesVector()[i])
bBelongsToShow = true;
}
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 602fc58b7e6a..b52a0c0dcb56 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -723,9 +723,9 @@ IMPL_LINK_NOARG(SdTPAction, CheckFileHdl)
presentation::ClickAction SdTPAction::GetActualClickAction()
{
presentation::ClickAction eCA = presentation::ClickAction_NONE;
- sal_uInt16 nPos = m_pLbAction->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbAction->GetSelectEntryPos();
- if (nPos != LISTBOX_ENTRY_NOTFOUND && nPos < maCurrentActions.size())
+ if (nPos != LISTBOX_ENTRY_NOTFOUND && static_cast<size_t>(nPos) < maCurrentActions.size())
eCA = maCurrentActions[ nPos ];
return( eCA );
}
@@ -818,8 +818,8 @@ OUString SdTPAction::GetEditText( sal_Bool bFullDocDestination )
break;
case presentation::ClickAction_VERB:
{
- const sal_uInt16 nPos = m_pLbOLEAction->GetSelectEntryPos();
- if( nPos < aVerbVector.size() )
+ const sal_Int32 nPos = m_pLbOLEAction->GetSelectEntryPos();
+ if( static_cast<size_t>(nPos) < aVerbVector.size() )
aStr = OUString::number( aVerbVector[ nPos ] );
return aStr;
}
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index afd3547087a3..43809ecc6f9d 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -254,7 +254,7 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
{
OUString sMetric = aMetricArr.GetStringByPos( i );
sal_IntPtr nFieldUnit = aMetricArr.GetValue( i );
- sal_uInt16 nPos = m_pLbMetric->InsertEntry( sMetric );
+ sal_Int32 nPos = m_pLbMetric->InsertEntry( sMetric );
m_pLbMetric->SetEntryData( nPos, (void*)nFieldUnit );
}
m_pLbMetric->SetSelectHdl( LINK( this, SdTpOptionsMisc, SelectMetricHdl_Impl ) );
@@ -401,7 +401,7 @@ sal_Bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
}
// metric
- const sal_uInt16 nMPos = m_pLbMetric->GetSelectEntryPos();
+ const sal_Int32 nMPos = m_pLbMetric->GetSelectEntryPos();
if ( nMPos != m_pLbMetric->GetSavedValue() )
{
sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pLbMetric->GetEntryData( nMPos );
@@ -470,7 +470,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs.Get( nWhich );
long nFieldUnit = (long)rItem.GetValue();
- for ( sal_uInt16 i = 0; i < m_pLbMetric->GetEntryCount(); ++i )
+ for ( sal_Int32 i = 0; i < m_pLbMetric->GetEntryCount(); ++i )
{
if ( (sal_IntPtr)m_pLbMetric->GetEntryData( i ) == nFieldUnit )
{
@@ -523,7 +523,7 @@ SfxTabPage* SdTpOptionsMisc::Create( Window* pWindow,
IMPL_LINK_NOARG(SdTpOptionsMisc, SelectMetricHdl_Impl)
{
- sal_uInt16 nPos = m_pLbMetric->GetSelectEntryPos();
+ sal_Int32 nPos = m_pLbMetric->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx
index d22098310029..01be0670ab84 100644
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -134,7 +134,7 @@ void FuLineEnd::DoExecute( SfxRequest& )
if( bDifferent )
{
XLineEndEntry* pEntry = new XLineEndEntry( aPolyPolygon, aName );
- pLineEndList->Insert( pEntry, LIST_APPEND);
+ pLineEndList->Insert( pEntry);
}
else
{
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index 1aeee02f9a05..faa94e172edc 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -431,13 +431,13 @@ void FuMorph::ImpInsertPolygons(
pNewObj->SetMergedItemSetAndBroadcast(aSet);
- pObjList->InsertObject( pNewObj, LIST_APPEND );
+ pObjList->InsertObject( pNewObj, CONTAINER_APPEND );
}
if ( nCount )
{
pObjList->InsertObject( pObj1->Clone(), 0 );
- pObjList->InsertObject( pObj2->Clone(), LIST_APPEND );
+ pObjList->InsertObject( pObj2->Clone(), CONTAINER_APPEND );
mpView->DeleteMarked();
mpView->InsertObjectAtView( pObjGroup, *pPageView, SDRINSERT_SETDEFLAYER );
}
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 0288c165678b..76abf4f257a0 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -121,7 +121,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, ::Window* pWindow, OutlineViewSh
Rectangle aNullRect;
mpOutlinerView[0]->SetOutputArea(aNullRect);
mrOutliner.SetUpdateMode(false);
- mrOutliner.InsertView(mpOutlinerView[0], LIST_APPEND);
+ mrOutliner.InsertView(mpOutlinerView[0], EE_APPEND);
onUpdateStyleSettings( true );
@@ -254,7 +254,7 @@ void OutlineView::AddWindowToPaintView(OutputDevice* pWin)
{
mpOutlinerView[nView] = new OutlinerView(&mrOutliner, dynamic_cast< ::sd::Window* >(pWin));
mpOutlinerView[nView]->SetBackgroundColor( aWhiteColor );
- mrOutliner.InsertView(mpOutlinerView[nView], LIST_APPEND);
+ mrOutliner.InsertView(mpOutlinerView[nView], EE_APPEND);
bAdded = sal_True;
if (bValidArea)