~pkgcrosswire/sword/main

« back to all changes in this revision

Viewing changes to bindings/corba/orbitcpp/swordorb-impl.cpp

  • Committer: Dmitrijs Ledkovs
  • Date: 2010-11-28 12:59:25 UTC
  • mto: This revision was merged to the branch mainline in revision 81.
  • Revision ID: dmitrij.ledkov@ubuntu.com-20101128125925-6wxsfkfror94p0mg
Tags: upstream-1.6.2+dfsg
ImportĀ upstreamĀ versionĀ 1.6.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
287
287
        return retVal;
288
288
}
289
289
 
290
 
void SWModule_impl::setKeyText(const char *key) throw(CORBA::SystemException) {
 
290
void SWModule_impl::setKeyText(const char *keyText) throw(CORBA::SystemException) {
291
291
        sword::SWKey *key = delegate->getKey();
292
292
        sword::VerseKey *vkey = SWDYNAMIC_CAST(VerseKey, key);
293
 
        if (vkey && (*keyText=='+' ||*keyText=='-')) {
294
 
                if (!stricmp(keyText+1, "book")) {
295
 
                        vkey->setBook(vkey->getBook() + ((*keyText=='+')?1:-1));
296
 
                        return;
 
293
        if (vkey) {
 
294
                if ((*keyText=='+' || *keyText=='-')) {
 
295
                        if (!stricmp(keyText+1, "book")) {
 
296
                                vkey->setBook(vkey->getBook() + ((*keyText=='+')?1:-1));
 
297
                                return;
 
298
                        }
 
299
                        else if (!stricmp(keyText+1, "chapter")) {
 
300
                                vkey->setChapter(vkey->getChapter() + ((*keyText=='+')?1:-1));
 
301
                                return;
 
302
                        }
297
303
                }
298
 
                else if (!stricmp(keyText+1, "chapter")) {
299
 
                        vkey->setChapter(vkey->getChapter() + ((*keyText=='+')?1:-1));
 
304
                else if (*keyText=='=') {
 
305
                        vkey->Headings(true);
 
306
                        vkey->AutoNormalize(false);
 
307
                        vkey->setText(keyText+1);
300
308
                        return;
301
309
                }
302
310
        }
303
311
 
304
 
        delegate->KeyText(key);
 
312
        delegate->KeyText(keyText);
305
313
}
306
314
 
307
315
StringList *SWModule_impl::getKeyChildren() throw(CORBA::SystemException) {