summaryrefslogtreecommitdiff
path: root/basegfx/source/inc/hommatrixtemplate.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source/inc/hommatrixtemplate.hxx')
-rw-r--r--basegfx/source/inc/hommatrixtemplate.hxx97
1 files changed, 12 insertions, 85 deletions
diff --git a/basegfx/source/inc/hommatrixtemplate.hxx b/basegfx/source/inc/hommatrixtemplate.hxx
index 992d395dadfc..9f87ff293763 100644
--- a/basegfx/source/inc/hommatrixtemplate.hxx
+++ b/basegfx/source/inc/hommatrixtemplate.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: hommatrixtemplate.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: thb $ $Date: 2003-08-20 16:56:48 $
+ * last change: $Author: thb $ $Date: 2003-09-26 07:54:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -598,97 +598,24 @@ public:
// create a copy as source for the original values
const ImplHomMatrixTemplate aCopy(*this);
- if(rMat.mpLine)
- {
- // complex first lines
- for(sal_uInt16 a(0); a < (RowSize - 1); a++)
- {
- for(sal_uInt16 b(0); b < RowSize; b++)
- {
- double fValue(0.0);
-
- for(sal_uInt16 c(0); c < RowSize; c++)
- {
- fValue += aCopy.get(c, b) * rMat.get(a, c);
- }
+ // TODO: maybe optimize cases where last line is [0 0 1].
- set(a, b, fValue);
- }
- }
+ double fValue(0.0);
- if(mpLine)
- {
- // complex last line
- for(sal_uInt16 b(0); b < RowSize; b++)
- {
- double fValue(0.0);
-
- for(sal_uInt16 c(0); c < RowSize; c++)
- {
- fValue += aCopy.get(c, b) * rMat.get((RowSize - 1), c);
- }
-
- set((RowSize - 1), b, fValue);
- }
-
- testLastLine();
- }
- else
- {
- // last line is rMat line, copy
- mpLine = new ImplMatLine< RowSize >((RowSize - 1), rMat.mpLine);
- }
- }
- else
+ for(sal_uInt16 a(0); a < RowSize; ++a)
{
- // simplified first lines
- for(sal_uInt16 a(0); a < (RowSize - 1); a++)
+ for(sal_uInt16 b(0); b < RowSize; ++b)
{
- for(sal_uInt16 b(0); b < RowSize; b++)
- {
- double fValue(0.0);
-
- for(sal_uInt16 c(0); c < (RowSize - 1); c++)
- {
- fValue += aCopy.get(c, b) * rMat.get(a, c);
- }
-
- if(b == (RowSize -1))
- {
- fValue += aCopy.get(a, (RowSize - 1));
- }
-
- set(a, b, fValue);
- }
- }
-
- if(mpLine)
- {
- // simplified last line
- for(sal_uInt16 b(0); b < RowSize; b++)
- {
- double fValue(0.0);
-
- for(sal_uInt16 c(0); c < (RowSize - 1); c++)
- {
- fValue += aCopy.get(c, b) * rMat.get((RowSize - 1), c);
- }
+ fValue = 0.0;
- if(b == (RowSize -1))
- {
- fValue += aCopy.get((RowSize - 1), (RowSize - 1));
- }
-
- set((RowSize - 1), b, fValue);
- }
+ for(sal_uInt16 c(0); c < RowSize; ++c)
+ fValue += aCopy.get(c, b) * rMat.get(a, c);
- testLastLine();
- }
- else
- {
- // no last line
+ set(a, b, fValue);
}
}
+
+ testLastLine();
}
bool isEqual(const ImplHomMatrixTemplate& rMat)