summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-01-21 21:57:16 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-01-21 21:57:16 -0500
commitbee2fd88edac562c5ba28037339c726bdecb9ff7 (patch)
treec0269b3d34ba20cc9015b7e9c65b8f80cdf76beb /sc
parent3119de050ef5e3561e01badeb6307ae2538d215a (diff)
Reduced indent levels again.
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmldpimp.cxx150
1 files changed, 75 insertions, 75 deletions
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index 6a2970a13040..60c74afc9389 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -398,90 +398,90 @@ void ScXMLDataPilotTableContext::AddGroupDim(const ScDPSaveGroupDimension& aGrou
void ScXMLDataPilotTableContext::EndElement()
{
- if (bTargetRangeAddress)
+ if (!bTargetRangeAddress)
+ return;
+
+ pDPObject->SetName(sDataPilotTableName);
+ pDPObject->SetTag(sApplicationData);
+ pDPObject->SetOutRange(aTargetRangeAddress);
+ pDPObject->SetHeaderLayout(bHeaderGridLayout);
+ switch (nSourceType)
{
- pDPObject->SetName(sDataPilotTableName);
- pDPObject->SetTag(sApplicationData);
- pDPObject->SetOutRange(aTargetRangeAddress);
- pDPObject->SetHeaderLayout(bHeaderGridLayout);
- switch (nSourceType)
+ case SQL :
{
- case SQL :
- {
- ScImportSourceDesc aImportDesc;
- aImportDesc.aDBName = sDatabaseName;
- aImportDesc.aObject = sSourceObject;
- aImportDesc.nType = sheet::DataImportMode_SQL;
- aImportDesc.bNative = bIsNative;
- pDPObject->SetImportDesc(aImportDesc);
- }
- break;
- case TABLE :
- {
- ScImportSourceDesc aImportDesc;
- aImportDesc.aDBName = sDatabaseName;
- aImportDesc.aObject = sSourceObject;
- aImportDesc.nType = sheet::DataImportMode_TABLE;
- pDPObject->SetImportDesc(aImportDesc);
- }
- break;
- case QUERY :
- {
- ScImportSourceDesc aImportDesc;
- aImportDesc.aDBName = sDatabaseName;
- aImportDesc.aObject = sSourceObject;
- aImportDesc.nType = sheet::DataImportMode_QUERY;
- pDPObject->SetImportDesc(aImportDesc);
- }
- break;
- case SERVICE :
- {
- ScDPServiceDesc aServiceDesk(sServiceName, sServiceSourceName, sServiceSourceObject,
- sServiceUsername, sServicePassword);
- pDPObject->SetServiceData(aServiceDesk);
- }
- break;
- case CELLRANGE :
+ ScImportSourceDesc aImportDesc;
+ aImportDesc.aDBName = sDatabaseName;
+ aImportDesc.aObject = sSourceObject;
+ aImportDesc.nType = sheet::DataImportMode_SQL;
+ aImportDesc.bNative = bIsNative;
+ pDPObject->SetImportDesc(aImportDesc);
+ }
+ break;
+ case TABLE :
+ {
+ ScImportSourceDesc aImportDesc;
+ aImportDesc.aDBName = sDatabaseName;
+ aImportDesc.aObject = sSourceObject;
+ aImportDesc.nType = sheet::DataImportMode_TABLE;
+ pDPObject->SetImportDesc(aImportDesc);
+ }
+ break;
+ case QUERY :
+ {
+ ScImportSourceDesc aImportDesc;
+ aImportDesc.aDBName = sDatabaseName;
+ aImportDesc.aObject = sSourceObject;
+ aImportDesc.nType = sheet::DataImportMode_QUERY;
+ pDPObject->SetImportDesc(aImportDesc);
+ }
+ break;
+ case SERVICE :
+ {
+ ScDPServiceDesc aServiceDesk(sServiceName, sServiceSourceName, sServiceSourceObject,
+ sServiceUsername, sServicePassword);
+ pDPObject->SetServiceData(aServiceDesk);
+ }
+ break;
+ case CELLRANGE :
+ {
+ if (bSourceCellRange)
{
- if (bSourceCellRange)
- {
- ScSheetSourceDesc aSheetDesc(pDoc);
- aSheetDesc.SetSourceRange(aSourceCellRangeAddress);
- aSheetDesc.SetQueryParam(aSourceQueryParam);
- pDPObject->SetSheetDesc(aSheetDesc);
- }
+ ScSheetSourceDesc aSheetDesc(pDoc);
+ aSheetDesc.SetSourceRange(aSourceCellRangeAddress);
+ aSheetDesc.SetQueryParam(aSourceQueryParam);
+ pDPObject->SetSheetDesc(aSheetDesc);
}
- break;
}
+ break;
+ }
- pDPSave->SetRowGrand(maRowGrandTotal.mbVisible);
- pDPSave->SetColumnGrand(maColGrandTotal.mbVisible);
- if (maRowGrandTotal.maDisplayName.getLength())
- // TODO: Right now, we only support one grand total name for both
- // column and row totals. Take the value from the row total for
- // now.
- pDPSave->SetGrandTotalName(maRowGrandTotal.maDisplayName);
-
- pDPSave->SetIgnoreEmptyRows(bIgnoreEmptyRows);
- pDPSave->SetRepeatIfEmpty(bIdentifyCategories);
- pDPSave->SetFilterButton(bShowFilter);
- pDPSave->SetDrillDown(bDrillDown);
- if (pDPDimSaveData)
- pDPSave->SetDimensionData(pDPDimSaveData);
- pDPObject->SetSaveData(*pDPSave);
- if (pDoc)
- {
- ScDPCollection* pDPCollection = pDoc->GetDPCollection();
+ pDPSave->SetRowGrand(maRowGrandTotal.mbVisible);
+ pDPSave->SetColumnGrand(maColGrandTotal.mbVisible);
+ if (maRowGrandTotal.maDisplayName.getLength())
+ // TODO: Right now, we only support one grand total name for both
+ // column and row totals. Take the value from the row total for
+ // now.
+ pDPSave->SetGrandTotalName(maRowGrandTotal.maDisplayName);
+
+ pDPSave->SetIgnoreEmptyRows(bIgnoreEmptyRows);
+ pDPSave->SetRepeatIfEmpty(bIdentifyCategories);
+ pDPSave->SetFilterButton(bShowFilter);
+ pDPSave->SetDrillDown(bDrillDown);
+ if (pDPDimSaveData)
+ pDPSave->SetDimensionData(pDPDimSaveData);
+ pDPObject->SetSaveData(*pDPSave);
+ if (pDoc)
+ {
+ ScDPCollection* pDPCollection = pDoc->GetDPCollection();
- // #i94570# Names have to be unique, or the tables can't be accessed by API.
- if ( pDPCollection->GetByName(pDPObject->GetName()) )
- pDPObject->SetName( String() ); // ignore the invalid name, create a new name in AfterXMLLoading
+ // #i94570# Names have to be unique, or the tables can't be accessed by API.
+ if ( pDPCollection->GetByName(pDPObject->GetName()) )
+ pDPObject->SetName( String() ); // ignore the invalid name, create a new name in AfterXMLLoading
- pDPObject->SetAlive(sal_True);
- pDPCollection->InsertNewTable(pDPObject);
- }
- SetButtons();
+ pDPObject->SetAlive(sal_True);
+ pDPCollection->InsertNewTable(pDPObject);
}
+ SetButtons();
}
void ScXMLDataPilotTableContext::SetGrandTotal(