summaryrefslogtreecommitdiff
path: root/regexp
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2007-12-05 15:44:55 +0000
committerVladimir Glazounov <vg@openoffice.org>2007-12-05 15:44:55 +0000
commit24eec91a92735bd954294f8db44e9f9cf7e5174f (patch)
tree7b2894ed0aedbd0b07da210fe9c969b9c7660004 /regexp
parentf9bb8ca2afca2eacf67f2bed4c6520007438ef5b (diff)
INTEGRATION: CWS regexp02 (1.5.18); FILE MERGED
2007/11/01 12:32:31 ama 1.5.18.1: Fix #i15666#: Deliver backreferences
Diffstat (limited to 'regexp')
-rw-r--r--regexp/source/reclass.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/regexp/source/reclass.cxx b/regexp/source/reclass.cxx
index e5bc9a2f0114..d98c72372587 100644
--- a/regexp/source/reclass.cxx
+++ b/regexp/source/reclass.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: reclass.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 16:05:31 $
+ * last change: $Author: vg $ $Date: 2007-12-05 16:44:55 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -2236,13 +2236,13 @@ Regexpr::re_match2(struct re_registers *regs, sal_Int32 pos, sal_Int32 range)
/* Go through the first `min (num_regs, regs->num_regs)'
registers, since that is all we initialized. */
- for (mcnt = regs->num_of_match; (unsigned) mcnt < MIN(num_regs, regs->num_regs);
+ for (mcnt = regs->num_of_match; (unsigned) mcnt < MIN(num_regs, regs->num_regs);
mcnt++) {
- if (REG_UNSET(regstart[mcnt]) || REG_UNSET(regend[mcnt]))
- regs->start[mcnt] = regs->end[mcnt] = -1;
- else {
- regs->start[mcnt] = (sal_Int32) POINTER_TO_OFFSET(regstart[mcnt]);
- regs->end[mcnt] = (sal_Int32) POINTER_TO_OFFSET(regend[mcnt]);
+ regs->start[mcnt] = regs->end[mcnt] = -1;
+ if( !(REG_UNSET(regstart[mcnt]) || REG_UNSET(regend[mcnt])) ) {
+ regs->start[regs->num_of_match] = (sal_Int32) POINTER_TO_OFFSET(regstart[mcnt]);
+ regs->end[regs->num_of_match] = (sal_Int32) POINTER_TO_OFFSET(regend[mcnt]);
+ regs->num_of_match++;
}
}