summaryrefslogtreecommitdiff
path: root/sd/source/ui/func/fuinsfil.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/func/fuinsfil.cxx')
-rw-r--r--sd/source/ui/func/fuinsfil.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index a090f74f85bc..8653000cc926 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -630,14 +630,16 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
nFormat = EE_FORMAT_HTML;
::Outliner* pDocliner = static_cast<OutlineView*>(mpView)->GetOutliner();
- List* pList = pDocliner->GetView(0)->CreateSelectionList();
- Paragraph* pPara = (Paragraph*)pList->First();
+
+ std::vector<Paragraph*> aSelList;
+ pDocliner->GetView(0)->CreateSelectionList(aSelList);
+
+ Paragraph* pPara = aSelList.empty() ? NULL : *(aSelList.begin());
// wo soll eingefuegt werden?
while( !pDocliner->HasParaFlag( pPara, PARAFLAG_ISPAGE ) )
- {
pPara = pDocliner->GetParent(pPara);
- }
+
ULONG nTargetPos = pDocliner->GetAbsPos(pPara) + 1;
// Layout der Vorgaengerseite uebernehmen