[Libreoffice-commits] .: sc/source

Lionel Elie Mamane lmamane at kemper.freedesktop.org
Mon Dec 5 23:25:56 PST 2011


 sc/source/ui/unoobj/chart2uno.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e68487b719a1690150d88b251fb3e0b9f0ff4e09
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Tue Dec 6 08:24:34 2011 +0100

    calcGlueState(): move State enum to file-global anonymous namespace
    
    so that it can be used in templates in strict C++98.
    C++11 allows local types (i.e. without linkage) to be used in templates.

diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 6e54996..1847bb0 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -599,6 +599,8 @@ void Chart2Positioner::glueState()
     calcGlueState(nC, nR);
 }
 
+enum State { Hole = 0, Occupied = 1, Free = 2, Glue = 3 };
+
 void Chart2Positioner::calcGlueState(SCCOL nColSize, SCROW nRowSize)
 {
     // TODO: This code can use some space optimization.  Using an array to
@@ -607,8 +609,6 @@ void Chart2Positioner::calcGlueState(SCCOL nColSize, SCROW nRowSize)
 
     sal_uInt32 nCR = static_cast<sal_uInt32>(nColSize*nRowSize);
 
-    enum State { Hole = 0, Occupied = 1, Free = 2, Glue = 3 };
-
     vector<State> aCellStates(nCR, Hole);
 
     // Mark all referenced cells "occupied".


More information about the Libreoffice-commits mailing list