summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2006-01-13 15:45:53 +0000
committerRüdiger Timm <rt@openoffice.org>2006-01-13 15:45:53 +0000
commit6e98b75d7b828eb1bfe2561c6e614bfece58a424 (patch)
treecdc863c46c0bf7a86ee44434d14c48d33e10a6b7
parentda2637451838b05abf22f01c9c1642b962b2ef2c (diff)
INTEGRATION: CWS dr43 (1.65.78); FILE MERGED
2006/01/04 16:33:45 dr 1.65.78.2: RESYNC: (1.65-1.66); FILE MERGED 2005/12/19 10:12:41 nn 1.65.78.1: #121103# when copying between documents, get color pointers from own scanner
-rw-r--r--svtools/source/numbers/zformat.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/svtools/source/numbers/zformat.cxx b/svtools/source/numbers/zformat.cxx
index 7a94de93b5c3..ea0b6a88ed50 100644
--- a/svtools/source/numbers/zformat.cxx
+++ b/svtools/source/numbers/zformat.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: zformat.cxx,v $
*
- * $Revision: 1.66 $
+ * $Revision: 1.67 $
*
- * last change: $Author: rt $ $Date: 2005-12-14 15:01:57 $
+ * last change: $Author: rt $ $Date: 2006-01-13 16:45:53 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -394,12 +394,15 @@ void ImpSvNumFor::Enlarge(USHORT nAnz)
}
}
-void ImpSvNumFor::Copy( const ImpSvNumFor& rNumFor )
+void ImpSvNumFor::Copy( const ImpSvNumFor& rNumFor, ImpSvNumberformatScan* pSc )
{
Enlarge( rNumFor.nAnzStrings );
aI.Copy( rNumFor.aI, nAnzStrings );
- pColor = rNumFor.pColor;
sColorName = rNumFor.sColorName;
+ if ( pSc )
+ pColor = pSc->GetColor( sColorName ); // #121103# don't copy pointer between documents
+ else
+ pColor = rNumFor.pColor;
aNatNum = rNumFor.aNatNum;
}
@@ -560,8 +563,12 @@ void SvNumberformat::ImpCopyNumberformat( const SvNumberformat& rFormat )
bIsUsed = rFormat.bIsUsed;
sComment = rFormat.sComment;
nNewStandardDefined = rFormat.nNewStandardDefined;
+
+ // #121103# when copying between documents, get color pointers from own scanner
+ ImpSvNumberformatScan* pColorSc = ( &rScan != &rFormat.rScan ) ? &rScan : NULL;
+
for (USHORT i = 0; i < 4; i++)
- NumFor[i].Copy(rFormat.NumFor[i]);
+ NumFor[i].Copy(rFormat.NumFor[i], pColorSc);
}
SvNumberformat::SvNumberformat( SvNumberformat& rFormat )