summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-19 13:54:15 +0200
committerNoel Grandin <noel@peralex.com>2013-09-19 13:54:39 +0200
commit8d8e10ab4c3ef890323dd9b21edab8e91b9068c2 (patch)
tree8a3925fab8518ddd824ff5c8854ff6546aacadd6 /sd
parent7c34df7c6a65ce2ed616f6013f39121ce90e7c6b (diff)
restore behaviour after OUString changes
in commit ab0806e183fcdc8b2e4eca2d29b877a41f3ded8b, "convert sd/.../fuinsfil.hxx from String to OUString" my OUString conversion changed the behaviour of the x.Erase(x.Search()) operations. Change-Id: I0f7f342eb4caf277fe62c3c11d1aa2c74290e549
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fuinsfil.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index d789de78a3c1..42e180ceae6c 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -446,7 +446,9 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
SdPage* pPage = static_cast<DrawViewShell*>(mpViewShell)->GetActualPage();
aLayoutName = pPage->GetLayoutName();
- aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR));
+ sal_Int32 nIndex = aLayoutName.indexOf(SD_LT_SEPARATOR);
+ if( nIndex != -1 )
+ aLayoutName = aLayoutName.copy(0, nIndex);
pOutliner->SetPaperSize(pPage->GetSize());
@@ -583,7 +585,9 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
}
SdPage* pPage = mpDoc->GetSdPage(nPage, PK_STANDARD);
aLayoutName = pPage->GetLayoutName();
- aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR));
+ sal_Int32 nIndex = aLayoutName.indexOf(SD_LT_SEPARATOR);
+ if( nIndex != -1 )
+ aLayoutName = aLayoutName.copy(0, nIndex);
/* create our own outline since:
- it is possible that the document outliner is actually used in the