Skip to content

Commit

Permalink
Merge pull request #2 from Aulla/master
Browse files Browse the repository at this point in the history
exportar a ODS en alpha
  • Loading branch information
gestiweb committed May 16, 2012
2 parents 567c4d2 + e6f211f commit 6516600
Show file tree
Hide file tree
Showing 15 changed files with 986 additions and 541 deletions.
942 changes: 611 additions & 331 deletions tools/aqods/AQOdsGenerator.cpp

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion tools/aqods/odf-gen/celladdress.h
@@ -1,6 +1,6 @@
/*
odf-gen: Simple API to generate OpenDocument documents.
Copyright (C) 2009 Pablo Jorge, FuDePAN
Copyright (C) 2012 Pablo Jorge, FuDePAN
This file is part of the odf-gen project.
Expand All @@ -18,6 +18,18 @@ odf-gen: Simple API to generate OpenDocument documents.
along with odf-gen. If not, see <http://www.gnu.org/licenses/>.
*/

/* As a special exception, you may create a larger work that contains
part of all of the odf-gen project and distribute that work under
the terms of the GNU General Public License as published by the
Free Software Foundation; version 2 of the License
Alternatively, if you modify or redistribute the ODF generator
itself, you may (ar your option) remove this special exception
This special exception was added by Pablo Jorge in
version 1.3 of odf-gen.
*/

#ifndef CELLADDRESS_H
#define CELLADDRESS_H

Expand Down
14 changes: 13 additions & 1 deletion tools/aqods/odf-gen/chart.h
@@ -1,6 +1,6 @@
/*
odf-gen: Simple API to generate OpenDocument documents.
Copyright (C) 2009 Pablo Jorge, FuDePAN
Copyright (C) 2012 Pablo Jorge, FuDePAN
This file is part of the odf-gen project.
Expand All @@ -18,6 +18,18 @@ odf-gen: Simple API to generate OpenDocument documents.
along with odf-gen. If not, see <http://www.gnu.org/licenses/>.
*/

/* As a special exception, you may create a larger work that contains
part of all of the odf-gen project and distribute that work under
the terms of the GNU General Public License as published by the
Free Software Foundation; version 2 of the License
Alternatively, if you modify or redistribute the ODF generator
itself, you may (ar your option) remove this special exception
This special exception was added by Pablo Jorge in
version 1.3 of odf-gen.
*/

#ifndef CHART_H
#define CHART_H

Expand Down
41 changes: 21 additions & 20 deletions tools/aqods/odf-gen/color.h
@@ -1,6 +1,6 @@
/*
odf-gen: Simple API to generate OpenDocument documents.
Copyright (C) 2009 Pablo Jorge, FuDePAN
Copyright (C) 2012 Pablo Jorge, FuDePAN
This file is part of the odf-gen project.
Expand All @@ -18,11 +18,21 @@ odf-gen: Simple API to generate OpenDocument documents.
along with odf-gen. If not, see <http://www.gnu.org/licenses/>.
*/

/* As a special exception, you may create a larger work that contains
part of all of the odf-gen project and distribute that work under
the terms of the GNU General Public License as published by the
Free Software Foundation; version 2 of the License
Alternatively, if you modify or redistribute the ODF generator
itself, you may (ar your option) remove this special exception
This special exception was added by Pablo Jorge in
version 1.3 of odf-gen.
*/

#ifndef COLOR_H
#define COLOR_H

#include <time.h>

#include <iostream>
#include <iomanip>
#include <cstdlib>
Expand All @@ -34,38 +44,29 @@ class Color
: _red( 0 ),
_green( 0 ),
_blue( 0 ),
_valid( false )
_valid( false )
{}

Color( unsigned char red,
unsigned char green,
unsigned char blue )
: _red( red ),
_green( green ),
_blue( blue ),
_valid( true )
_valid( true )
{}

Color( unsigned int color )
: _red( color >> 16 ),
_green( color >> 8 ),
_blue( color ),
_valid( true )
_valid( true )
{}

bool isValid() const
{
return _valid;
}

Color& operator = ( const Color &other )
{
_red = other._red;
_green = other._green;
_blue = other._blue;
_valid = other._valid;
return *this;
}

std::ostream& operator << ( std::ostream& ostream ) const
{
Expand All @@ -83,7 +84,7 @@ class Color
unsigned char _red,
_green,
_blue;
bool _valid;
bool _valid;
};

inline
Expand All @@ -98,7 +99,7 @@ class ColorGenerator
ColorGenerator()
: _idx( 0 )
{
srand( time( NULL ) );
srandom( time( NULL ) );
}

Color next()
Expand All @@ -109,11 +110,11 @@ class ColorGenerator
if( _idx < sizeof(palette) / sizeof(palette[0]) )
return Color( palette[_idx++] );

return Color( rand() );
return Color( random() );
}

private:
uint _idx;
int _idx;
};

#endif // COLOR_H
14 changes: 13 additions & 1 deletion tools/aqods/odf-gen/element.h
@@ -1,6 +1,6 @@
/*
odf-gen: Simple API to generate OpenDocument documents.
Copyright (C) 2009 Pablo Jorge, FuDePAN
Copyright (C) 2012 Pablo Jorge, FuDePAN
This file is part of the odf-gen project.
Expand All @@ -18,6 +18,18 @@ odf-gen: Simple API to generate OpenDocument documents.
along with odf-gen. If not, see <http://www.gnu.org/licenses/>.
*/

/* As a special exception, you may create a larger work that contains
part of all of the odf-gen project and distribute that work under
the terms of the GNU General Public License as published by the
Free Software Foundation; version 2 of the License
Alternatively, if you modify or redistribute the ODF generator
itself, you may (ar your option) remove this special exception
This special exception was added by Pablo Jorge in
version 1.3 of odf-gen.
*/

#ifndef ELEMENT_H
#define ELEMENT_H

Expand Down
14 changes: 13 additions & 1 deletion tools/aqods/odf-gen/image.h
@@ -1,6 +1,6 @@
/*
odf-gen: Simple API to generate OpenDocument documents.
Copyright (C) 2009 Pablo Jorge, FuDePAN
Copyright (C) 2012 Pablo Jorge, FuDePAN
This file is part of the odf-gen project.
Expand All @@ -18,6 +18,18 @@ odf-gen: Simple API to generate OpenDocument documents.
along with odf-gen. If not, see <http://www.gnu.org/licenses/>.
*/

/* As a special exception, you may create a larger work that contains
part of all of the odf-gen project and distribute that work under
the terms of the GNU General Public License as published by the
Free Software Foundation; version 2 of the License
Alternatively, if you modify or redistribute the ODF generator
itself, you may (ar your option) remove this special exception
This special exception was added by Pablo Jorge in
version 1.3 of odf-gen.
*/

#ifndef IMAGE_H
#define IMAGE_H

Expand Down
20 changes: 16 additions & 4 deletions tools/aqods/odf-gen/length.h
@@ -1,6 +1,6 @@
/*
odf-gen: Simple API to generate OpenDocument documents.
Copyright (C) 2009 Pablo Jorge, FuDePAN
Copyright (C) 2012 Pablo Jorge, FuDePAN
This file is part of the odf-gen project.
Expand All @@ -18,6 +18,18 @@ odf-gen: Simple API to generate OpenDocument documents.
along with odf-gen. If not, see <http://www.gnu.org/licenses/>.
*/

/* As a special exception, you may create a larger work that contains
part of all of the odf-gen project and distribute that work under
the terms of the GNU General Public License as published by the
Free Software Foundation; version 2 of the License
Alternatively, if you modify or redistribute the ODF generator
itself, you may (ar your option) remove this special exception
This special exception was added by Pablo Jorge in
version 1.3 of odf-gen.
*/

#ifndef LENGTH_H
#define LENGTH_H

Expand All @@ -28,7 +40,7 @@ odf-gen: Simple API to generate OpenDocument documents.
class Length
{
public:
Length( float value )
Length( unsigned int value )
: _value( value )
{}

Expand All @@ -45,13 +57,13 @@ class Length
}

private:
float _value;
unsigned int _value;
};

class Centimeters : public Length
{
public:
Centimeters( float value )
Centimeters( unsigned int value )
: Length( value )
{}

Expand Down
16 changes: 13 additions & 3 deletions tools/aqods/odf-gen/odfgen.h
@@ -1,6 +1,6 @@
/*
odf-gen: Simple API to generate OpenDocument documents.
Copyright (C) 2009 Pablo Jorge, FuDePAN
Copyright (C) 2012 Pablo Jorge, FuDePAN
This file is part of the odf-gen project.
Expand All @@ -18,11 +18,21 @@ odf-gen: Simple API to generate OpenDocument documents.
along with odf-gen. If not, see <http://www.gnu.org/licenses/>.
*/

/* As a special exception, you may create a larger work that contains
part of all of the odf-gen project and distribute that work under
the terms of the GNU General Public License as published by the
Free Software Foundation; version 2 of the License
Alternatively, if you modify or redistribute the ODF generator
itself, you may (ar your option) remove this special exception
This special exception was added by Pablo Jorge in
version 1.3 of odf-gen.
*/

#ifndef ODFGEN_H
#define ODFGEN_H

//#define ODFGEN_NAMESPACE

#ifdef ODFGEN_NAMESPACE
namespace odfgen
{
Expand Down
15 changes: 13 additions & 2 deletions tools/aqods/odf-gen/odsgenerator.h
@@ -1,6 +1,6 @@
/*
odf-gen: Simple API to generate OpenDocument documents.
Copyright (C) 2009 Pablo Jorge, FuDePAN
Copyright (C) 2012 Pablo Jorge, FuDePAN
This file is part of the odf-gen project.
Expand All @@ -18,6 +18,18 @@ odf-gen: Simple API to generate OpenDocument documents.
along with odf-gen. If not, see <http://www.gnu.org/licenses/>.
*/

/* As a special exception, you may create a larger work that contains
part of all of the odf-gen project and distribute that work under
the terms of the GNU General Public License as published by the
Free Software Foundation; version 2 of the License
Alternatively, if you modify or redistribute the ODF generator
itself, you may (ar your option) remove this special exception
This special exception was added by Pablo Jorge in
version 1.3 of odf-gen.
*/

#ifndef ODSGENERATOR_H
#define ODSGENERATOR_H

Expand All @@ -28,7 +40,6 @@ odf-gen: Simple API to generate OpenDocument documents.
#include "sheet.h"
#include "row.h"
#include "chart.h"
#include "image.h"

#include "style.h"

Expand Down
14 changes: 13 additions & 1 deletion tools/aqods/odf-gen/odstype.h
@@ -1,6 +1,6 @@
/*
odf-gen: Simple API to generate OpenDocument documents.
Copyright (C) 2009 Pablo Jorge, FuDePAN
Copyright (C) 2012 Pablo Jorge, FuDePAN
This file is part of the odf-gen project.
Expand All @@ -18,6 +18,18 @@ odf-gen: Simple API to generate OpenDocument documents.
along with odf-gen. If not, see <http://www.gnu.org/licenses/>.
*/

/* As a special exception, you may create a larger work that contains
part of all of the odf-gen project and distribute that work under
the terms of the GNU General Public License as published by the
Free Software Foundation; version 2 of the License
Alternatively, if you modify or redistribute the ODF generator
itself, you may (ar your option) remove this special exception
This special exception was added by Pablo Jorge in
version 1.3 of odf-gen.
*/

#ifndef ODSTYPE_H
#define ODSTYPE_H

Expand Down

0 comments on commit 6516600

Please sign in to comment.