[Libreoffice-commits] core.git: Branch 'feature/gsoc-calc-enhanced-db-range' - sc/inc sc/source
Akash Shetye
shetyeakash at gmail.com
Thu Aug 1 11:17:32 PDT 2013
sc/inc/dbdata.hxx | 2 ++
sc/source/core/tool/dbdata.cxx | 11 ++++++++---
sc/source/filter/excel/xestyle.cxx | 3 +--
3 files changed, 11 insertions(+), 5 deletions(-)
New commits:
commit 3c05f57d8243b1aa9e29ae23779ebb2128b4fee3
Author: Akash Shetye <shetyeakash at gmail.com>
Date: Thu Aug 1 23:45:58 2013 +0530
Corrected a redundant if statement to do what it should
Not proud of this patch :D
Change-Id: I9d08a48188d1bd086ae0135b1044cd56ee141951
diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index a16e11f..b1e6569 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -58,6 +58,7 @@ private:
bool bDoSize;
bool bKeepFmt;
bool bStripData;
+ bool bHasFormatting;
// QueryParam
bool bIsAdvanced; // true if created by advanced filter
@@ -107,6 +108,7 @@ public:
void SetKeepFmt(bool bSet) { bKeepFmt = bSet; }
bool IsStripData() const { return bStripData; }
void SetStripData(bool bSet) { bStripData = bSet; }
+ bool HasFormatting() { return bHasFormatting; }
OUString GetSourceString() const;
OUString GetOperations() const;
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 33aece7..6515211 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -71,7 +71,8 @@ ScDBData::ScDBData( const OUString& rName,
bDBSelection(false),
nIndex (0),
bAutoFilter (false),
- bModified (false)
+ bModified (false),
+ bHasFormatting(false)
{
aUpper = ScGlobal::pCharClass->uppercase(aUpper);
}
@@ -99,7 +100,8 @@ ScDBData::ScDBData( const ScDBData& rData ) :
bDBSelection (rData.bDBSelection),
nIndex (rData.nIndex),
bAutoFilter (rData.bAutoFilter),
- bModified (rData.bModified)
+ bModified (rData.bModified),
+ bHasFormatting (rData.bHasFormatting)
{
}
@@ -126,7 +128,8 @@ ScDBData::ScDBData( const OUString& rName, const ScDBData& rData ) :
bDBSelection (rData.bDBSelection),
nIndex (rData.nIndex),
bAutoFilter (rData.bAutoFilter),
- bModified (rData.bModified)
+ bModified (rData.bModified),
+ bHasFormatting (rData.bHasFormatting)
{
aUpper = ScGlobal::pCharClass->uppercase(aUpper);
}
@@ -155,6 +158,7 @@ ScDBData& ScDBData::operator= (const ScDBData& rData)
bDBSelection = rData.bDBSelection;
nIndex = rData.nIndex;
bAutoFilter = rData.bAutoFilter;
+ bHasFormatting = rData.bHasFormatting;
return *this;
}
@@ -410,6 +414,7 @@ void ScDBData::SetImportParam(const ScImportParam& rImportParam)
//Methods to get and set ScDBDataFormatting instance
void ScDBData::SetTableFormatting( const ScDBDataFormatting& rTableFormatData )
{
+ bHasFormatting = true;
mpTableFormatData.reset( new ScDBDataFormatting( rTableFormatData ) );
}
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 2e0a74e..f2e33db 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -3234,8 +3234,7 @@ XclExpTableStyles::XclExpTableStyles( const XclExpRoot& rRoot, XclExpDxfs& rDxfs
the named DBs for table style information.
*/
ScDBDataFormatting aDBFormatting;
- (*itr).GetTableFormatting( aDBFormatting );
- if( &(aDBFormatting)!=NULL )//Probably non-standard?
+ if( (*itr).HasFormatting() )
{
miCount++;
maStyleContainer.push_back( new XclExpTableStyle( rRoot, aDBFormatting, rDxfs ) );
More information about the Libreoffice-commits
mailing list