summaryrefslogtreecommitdiff
path: root/sc/inc/token.hxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-06-12 09:17:25 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-06-12 09:17:25 +0000
commitd466ef8008f7b5439a6c1f38a7845c1279926aaa (patch)
treedd086fc1406869a395abce4859c32ba1af343dcf /sc/inc/token.hxx
parentf68541de3665e80d78669fa80fd30c0f711e0860 (diff)
INTEGRATION: CWS mh11rc (1.6.158); FILE MERGED
2003/06/06 09:03:02 mh 1.6.158.1: join: from beta2
Diffstat (limited to 'sc/inc/token.hxx')
-rw-r--r--sc/inc/token.hxx46
1 files changed, 33 insertions, 13 deletions
diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx
index dac076b60fdd..eb52e01bda6a 100644
--- a/sc/inc/token.hxx
+++ b/sc/inc/token.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: token.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: er $ $Date: 2002-09-27 17:17:43 $
+ * last change: $Author: vg $ $Date: 2003-06-12 10:17:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -463,20 +463,40 @@ public:
class SingleDoubleRefModifier
{
ComplRefData aDub;
- SingleRefData& rS;
- ComplRefData& rD;
- BOOL bSingle;
+ SingleRefData* pS;
+ ComplRefData* pD;
+
+ // not implemented, prevent usage
+ SingleDoubleRefModifier( const SingleDoubleRefModifier& );
+ SingleDoubleRefModifier& operator=( const SingleDoubleRefModifier& );
public:
- SingleDoubleRefModifier( SingleRefData& r )
- : rS( r ), rD( aDub ), bSingle( TRUE )
- { aDub.Ref1 = aDub.Ref2 = rS; }
- SingleDoubleRefModifier( ComplRefData& r )
- : rD( r ), rS( r.Ref1 ), bSingle( FALSE )
- {}
+ SingleDoubleRefModifier( ScToken& rT )
+ {
+ if ( rT.GetType() == svSingleRef )
+ {
+ pS = &rT.GetSingleRef();
+ aDub.Ref1 = aDub.Ref2 = *pS;
+ pD = &aDub;
+ }
+ else
+ {
+ pS = 0;
+ pD = &rT.GetDoubleRef();
+ }
+ }
+ SingleDoubleRefModifier( SingleRefData& rS )
+ {
+ pS = &rS;
+ aDub.Ref1 = aDub.Ref2 = *pS;
+ pD = &aDub;
+ }
~SingleDoubleRefModifier()
- { if ( bSingle ) rS = rD.Ref1; }
- inline ComplRefData& Ref() { return rD; }
+ {
+ if ( pS )
+ *pS = (*pD).Ref1;
+ }
+ inline ComplRefData& Ref() { return *pD; }
};
class SingleDoubleRefProvider