update dev300-m58
[ooovba.git] / applied_patches / 0334-sfx2-pre-and-postprocess-crash-fix.diff
blob834ab639c0d047b866a59075afb6a0aa29def45d
1 --- sfx2/source/doc/objstor.cxx.before 2007-05-03 13:46:37.000000000 +0200
2 +++ sfx2/source/doc/objstor.cxx 2007-05-03 13:51:58.000000000 +0200
3 @@ -957,11 +957,15 @@
5 pImp->nLoadedFlags = 0;
6 pImp->bModelInitialized = sal_False;
7 - String aUserData=pFilter->GetUserData();
8 - // check whether a prepocessing step is requested in the configuration
9 - static const char PREPROCESS_CONST[]="Preprocess=<";
10 - int pos=aUserData.Search(::rtl::OUString::createFromAscii(PREPROCESS_CONST).getStr(), 0);
11 - int end=aUserData.Search( '>', pos+strlen(PREPROCESS_CONST));
12 + int end, pos = STRING_NOTFOUND;
13 + String aUserData;
14 + static const char PREPROCESS_CONST[]="Preprocess=<";
15 + if (pFilter) {
16 + aUserData=pFilter->GetUserData();
17 + // check whether a prepocessing step is requested in the configuration
18 + pos=aUserData.Search(::rtl::OUString::createFromAscii(PREPROCESS_CONST).getStr(), 0);
19 + end=aUserData.Search( '>', pos+strlen(PREPROCESS_CONST));
20 + }
21 if (pos!=STRING_NOTFOUND && end!=STRING_NOTFOUND) {
22 String aAppName(aUserData, pos+strlen(PREPROCESS_CONST), end-(pos+strlen(PREPROCESS_CONST)));