summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkash Shetye <shetyeakash@gmail.com>2013-08-19 07:55:38 +0530
committerAkash Shetye <shetyeakash@gmail.com>2013-08-19 07:55:38 +0530
commitc3a6f0390fbfe415ac500f440337c17cb9502c85 (patch)
treed5a2060c777f83d206276a818644e3c64dfa53b3
parent051317604e9ffdea9e5a4dc1004eced7409cf767 (diff)
Added stripe size members in db formatting
Change-Id: Ia87cf2ea8f2f8053649b427b55393d525c817374
-rw-r--r--sc/inc/dbdataformatting.hxx12
-rw-r--r--sc/source/core/tool/dbdataformatting.cxx23
2 files changed, 25 insertions, 10 deletions
diff --git a/sc/inc/dbdataformatting.hxx b/sc/inc/dbdataformatting.hxx
index 50d62f5857a7..812901b361e6 100644
--- a/sc/inc/dbdataformatting.hxx
+++ b/sc/inc/dbdataformatting.hxx
@@ -29,6 +29,10 @@ class SC_DLLPUBLIC ScDBDataFormatting
OUString maSecondRowStripeStyle;
OUString maFirstColStripeStyle;
OUString maSecondColStripeStyle;
+ sal_Int32 maFirstRowStripeSize;
+ sal_Int32 maSecondRowStripeSize;
+ sal_Int32 maFirstColStripeSize;
+ sal_Int32 maSecondColStripeSize;
bool bBandedRows;
bool bBandedColumns;
public:
@@ -45,6 +49,14 @@ class SC_DLLPUBLIC ScDBDataFormatting
const OUString& GetSecondRowStripeStyle() const;
const OUString& GetFirstColStripeStyle() const;
const OUString& GetSecondColStripeStyle() const;
+ sal_Int32 GetFirstRowStripeSize() const { return maFirstRowStripeSize; }
+ sal_Int32 GetSecondRowStripeSize() const { return maSecondRowStripeSize; }
+ sal_Int32 GetFirstColStripeSize() const { return maFirstColStripeSize; }
+ sal_Int32 GetSecondColStripeSize() const { return maSecondColStripeSize; }
+ void SetFirstRowStripeSize( const sal_Int32 nSize ){ maFirstRowStripeSize = nSize; }
+ void SetSecondRowStripeSize( const sal_Int32 nSize ){ maSecondRowStripeSize = nSize; }
+ void SetFirstColStripeSize( const sal_Int32 nSize ){ maFirstColStripeSize = nSize; }
+ void SetSecondColStripeSize( const sal_Int32 nSize ){ maSecondColStripeSize = nSize; }
void SetFirstRowStripeStyle( const OUString& aStyleName );
void SetSecondRowStripeStyle( const OUString& aStyleName );
void SetFirstColStripeStyle( const OUString& aStyleName );
diff --git a/sc/source/core/tool/dbdataformatting.cxx b/sc/source/core/tool/dbdataformatting.cxx
index 4ca3ef3cac9f..c1f11c254284 100644
--- a/sc/source/core/tool/dbdataformatting.cxx
+++ b/sc/source/core/tool/dbdataformatting.cxx
@@ -20,16 +20,19 @@
#include "dbdataformatting.hxx"
#include "rtl/ustring.hxx"
-ScDBDataFormatting::ScDBDataFormatting()
-{
- //Avoiding problems caused by uninitialized values
- maTableStyleName = "Default";
- maFirstRowStripeStyle = "Default";
- maSecondRowStripeStyle = "Default";
- maFirstColStripeStyle = "Default";
- maSecondColStripeStyle = "Default";
- bBandedRows = false;
- bBandedColumns = false;
+ScDBDataFormatting::ScDBDataFormatting():
+ maTableStyleName ( "Default" ),
+ maFirstRowStripeStyle ( "Default" ),
+ maSecondRowStripeStyle ( "Default" ),
+ maFirstColStripeStyle ( "Default" ),
+ maSecondColStripeStyle ( "Default" ),
+ bBandedRows ( false ),
+ bBandedColumns ( false ),
+ maFirstRowStripeSize ( 1 ),
+ maSecondRowStripeSize ( 1 ),
+ maFirstColStripeSize ( 1 ),
+ maSecondColStripeSize ( 1 )
+{
}
ScDBDataFormatting::ScDBDataFormatting(const OUString& rTableStyleName, const OUString& rFirstRowStripeStyle, const OUString& rSecondRowStripeStyle, const OUString& rFirstColStripeStyle, const OUString& rSecondColStripeStyle, bool bBRows, bool bBCols) :