Typo: *adress* -> *address* (except from not translated German parts)
Change-Id: I62e12aed5bc67119433c39ff333f69b79944dca3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123318 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
@@ -295,14 +295,14 @@ table::CellRangeAddress lclCreateTestData(uno::Reference<sheet::XSpreadsheetDocu
|
|||||||
uno::Reference<beans::XPropertySet> xCellProp(xCellRange, UNO_QUERY_THROW);
|
uno::Reference<beans::XPropertySet> xCellProp(xCellRange, UNO_QUERY_THROW);
|
||||||
xCellProp->setPropertyValue("NumberFormat", uno::makeAny(nDateKey));
|
xCellProp->setPropertyValue("NumberFormat", uno::makeAny(nDateKey));
|
||||||
|
|
||||||
table::CellRangeAddress sCellRangeAdress;
|
table::CellRangeAddress sCellRangeAddress;
|
||||||
sCellRangeAdress.Sheet = 0;
|
sCellRangeAddress.Sheet = 0;
|
||||||
sCellRangeAdress.StartColumn = 0;
|
sCellRangeAddress.StartColumn = 0;
|
||||||
sCellRangeAdress.StartRow = 0;
|
sCellRangeAddress.StartRow = 0;
|
||||||
sCellRangeAdress.EndColumn = nEndCol;
|
sCellRangeAddress.EndColumn = nEndCol;
|
||||||
sCellRangeAdress.EndRow = nEndRow;
|
sCellRangeAddress.EndRow = nEndRow;
|
||||||
|
|
||||||
return sCellRangeAdress;
|
return sCellRangeAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end anonymous namespace
|
} // end anonymous namespace
|
||||||
@@ -535,12 +535,12 @@ void PivotChartTest::testPivotChartWithOneColumnField()
|
|||||||
|
|
||||||
OUString sPivotTableName("DataPilotTable");
|
OUString sPivotTableName("DataPilotTable");
|
||||||
|
|
||||||
table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc);
|
table::CellRangeAddress sCellRangeAddress = lclCreateTestData(xSheetDoc);
|
||||||
|
|
||||||
uno::Reference<sheet::XDataPilotTables> xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
|
uno::Reference<sheet::XDataPilotTables> xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
|
||||||
|
|
||||||
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
|
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
|
||||||
xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
|
xDataPilotDescriptor->setSourceRange(sCellRangeAddress);
|
||||||
|
|
||||||
lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_COLUMN);
|
lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_COLUMN);
|
||||||
lclModifyOrientation(xDataPilotDescriptor, u"Sales T1", sheet::DataPilotFieldOrientation_DATA);
|
lclModifyOrientation(xDataPilotDescriptor, u"Sales T1", sheet::DataPilotFieldOrientation_DATA);
|
||||||
@@ -617,12 +617,12 @@ void PivotChartTest::testPivotChartWithOneRowField()
|
|||||||
|
|
||||||
OUString sPivotTableName("DataPilotTable");
|
OUString sPivotTableName("DataPilotTable");
|
||||||
|
|
||||||
table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc);
|
table::CellRangeAddress sCellRangeAddress = lclCreateTestData(xSheetDoc);
|
||||||
|
|
||||||
uno::Reference<sheet::XDataPilotTables> xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
|
uno::Reference<sheet::XDataPilotTables> xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
|
||||||
|
|
||||||
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
|
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
|
||||||
xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
|
xDataPilotDescriptor->setSourceRange(sCellRangeAddress);
|
||||||
|
|
||||||
lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_ROW);
|
lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_ROW);
|
||||||
lclModifyOrientation(xDataPilotDescriptor, u"Sales T1", sheet::DataPilotFieldOrientation_DATA);
|
lclModifyOrientation(xDataPilotDescriptor, u"Sales T1", sheet::DataPilotFieldOrientation_DATA);
|
||||||
@@ -677,12 +677,12 @@ void PivotChartTest::testPivotTableDataProvider_PivotTableFields()
|
|||||||
|
|
||||||
OUString sPivotTableName("DataPilotTable");
|
OUString sPivotTableName("DataPilotTable");
|
||||||
|
|
||||||
table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc);
|
table::CellRangeAddress sCellRangeAddress = lclCreateTestData(xSheetDoc);
|
||||||
|
|
||||||
uno::Reference<sheet::XDataPilotTables> xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
|
uno::Reference<sheet::XDataPilotTables> xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
|
||||||
|
|
||||||
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
|
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
|
||||||
xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
|
xDataPilotDescriptor->setSourceRange(sCellRangeAddress);
|
||||||
|
|
||||||
lclModifyOrientation(xDataPilotDescriptor, u"City", sheet::DataPilotFieldOrientation_ROW);
|
lclModifyOrientation(xDataPilotDescriptor, u"City", sheet::DataPilotFieldOrientation_ROW);
|
||||||
lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_COLUMN);
|
lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_COLUMN);
|
||||||
@@ -785,12 +785,12 @@ void PivotChartTest::testPivotChartRowFieldInOutlineMode()
|
|||||||
|
|
||||||
OUString sPivotTableName("DataPilotTable");
|
OUString sPivotTableName("DataPilotTable");
|
||||||
|
|
||||||
table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc);
|
table::CellRangeAddress sCellRangeAddress = lclCreateTestData(xSheetDoc);
|
||||||
|
|
||||||
uno::Reference<sheet::XDataPilotTables> xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
|
uno::Reference<sheet::XDataPilotTables> xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
|
||||||
|
|
||||||
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
|
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
|
||||||
xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
|
xDataPilotDescriptor->setSourceRange(sCellRangeAddress);
|
||||||
|
|
||||||
lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_ROW);
|
lclModifyOrientation(xDataPilotDescriptor, u"Country", sheet::DataPilotFieldOrientation_ROW);
|
||||||
lclModifyOrientation(xDataPilotDescriptor, u"City", sheet::DataPilotFieldOrientation_ROW);
|
lclModifyOrientation(xDataPilotDescriptor, u"City", sheet::DataPilotFieldOrientation_ROW);
|
||||||
@@ -916,12 +916,12 @@ void PivotChartTest::testPivotChartWithDateRowField()
|
|||||||
|
|
||||||
OUString sPivotTableName("DataPilotTable");
|
OUString sPivotTableName("DataPilotTable");
|
||||||
|
|
||||||
table::CellRangeAddress sCellRangeAdress = lclCreateTestData(xSheetDoc);
|
table::CellRangeAddress sCellRangeAddress = lclCreateTestData(xSheetDoc);
|
||||||
|
|
||||||
uno::Reference<sheet::XDataPilotTables> xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
|
uno::Reference<sheet::XDataPilotTables> xDataPilotTables = lclGetDataPilotTables(0, xSheetDoc);
|
||||||
|
|
||||||
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
|
uno::Reference<sheet::XDataPilotDescriptor> xDataPilotDescriptor = xDataPilotTables->createDataPilotDescriptor();
|
||||||
xDataPilotDescriptor->setSourceRange(sCellRangeAdress);
|
xDataPilotDescriptor->setSourceRange(sCellRangeAddress);
|
||||||
|
|
||||||
lclModifyOrientation(xDataPilotDescriptor, u"Date", sheet::DataPilotFieldOrientation_ROW);
|
lclModifyOrientation(xDataPilotDescriptor, u"Date", sheet::DataPilotFieldOrientation_ROW);
|
||||||
lclModifyOrientation(xDataPilotDescriptor, u"City", sheet::DataPilotFieldOrientation_ROW);
|
lclModifyOrientation(xDataPilotDescriptor, u"City", sheet::DataPilotFieldOrientation_ROW);
|
||||||
|
@@ -107,7 +107,7 @@ struct SdHyperlinkEntry
|
|||||||
sal_Int32 nPrivate3;
|
sal_Int32 nPrivate3;
|
||||||
sal_Int32 nInfo;
|
sal_Int32 nInfo;
|
||||||
OUString aTarget;
|
OUString aTarget;
|
||||||
OUString aSubAdress;
|
OUString aSubAddress;
|
||||||
|
|
||||||
OUString aConvSubString;
|
OUString aConvSubString;
|
||||||
};
|
};
|
||||||
|
@@ -83,10 +83,10 @@ uses
|
|||||||
function GetBookmarkFromDBPointer(
|
function GetBookmarkFromDBPointer(
|
||||||
oDoc : Variant;
|
oDoc : Variant;
|
||||||
sBookmarkName : String) : Variant;
|
sBookmarkName : String) : Variant;
|
||||||
function GetBookmarkFromAdress(
|
function GetBookmarkFromAddress(
|
||||||
oDoc : Variant;
|
oDoc : Variant;
|
||||||
sTableName : String;
|
sTableName : String;
|
||||||
sCellAdress : String) : Variant;
|
sCellAddress : String) : Variant;
|
||||||
function JumpToBookmark(
|
function JumpToBookmark(
|
||||||
oBookmark : Variant) : Variant;
|
oBookmark : Variant) : Variant;
|
||||||
function CreateUniqueTablename(oDoc : Variant) : String;
|
function CreateUniqueTablename(oDoc : Variant) : String;
|
||||||
@@ -172,7 +172,7 @@ var
|
|||||||
sBookmarkName : String;
|
sBookmarkName : String;
|
||||||
iPos : Integer;
|
iPos : Integer;
|
||||||
begin
|
begin
|
||||||
oBookmark := GetBookmarkFromAdress( Document, sTableName, sCellName );
|
oBookmark := GetBookmarkFromAddress( Document, sTableName, sCellName );
|
||||||
|
|
||||||
sBookmarkName := oBookmark.getName();
|
sBookmarkName := oBookmark.getName();
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ var
|
|||||||
oTextCursor : Variant;
|
oTextCursor : Variant;
|
||||||
sBookmarkName : String;
|
sBookmarkName : String;
|
||||||
begin
|
begin
|
||||||
oBookmark := GetBookmarkFromAdress( oDoc, sTableName, sCellName );
|
oBookmark := GetBookmarkFromAddress( oDoc, sTableName, sCellName );
|
||||||
oTextCursor := JumpToBookmark( oBookmark );
|
oTextCursor := JumpToBookmark( oBookmark );
|
||||||
oTextCursor.Cell.Value := dValue;
|
oTextCursor.Cell.Value := dValue;
|
||||||
|
|
||||||
@@ -343,17 +343,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ ' Returns the Bookmark the Tablename and Cellname }
|
{ ' Returns the Bookmark the Tablename and Cellname }
|
||||||
function TSampleCode.GetBookmarkFromAdress(
|
function TSampleCode.GetBookmarkFromAddress(
|
||||||
oDoc : Variant;
|
oDoc : Variant;
|
||||||
sTableName : String;
|
sTableName : String;
|
||||||
sCellAdress : String) : Variant;
|
sCellAddress : String) : Variant;
|
||||||
var
|
var
|
||||||
sTableAddress : String;
|
sTableAddress : String;
|
||||||
iTableNameLength : Integer;
|
iTableNameLength : Integer;
|
||||||
sBookNames : Variant;
|
sBookNames : Variant;
|
||||||
iBookCounter : Integer;
|
iBookCounter : Integer;
|
||||||
begin
|
begin
|
||||||
sTableAddress := '//' + sTableName + '/%' + sCellAdress;
|
sTableAddress := '//' + sTableName + '/%' + sCellAddress;
|
||||||
iTableNameLength := Length( sTableAddress );
|
iTableNameLength := Length( sTableAddress );
|
||||||
|
|
||||||
sBookNames := oDoc.Bookmarks.getElementNames;
|
sBookNames := oDoc.Bookmarks.getElementNames;
|
||||||
@@ -362,7 +362,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
If sTableAddress = Copy( sBookNames[iBookCounter], 1, iTableNameLength) then
|
If sTableAddress = Copy( sBookNames[iBookCounter], 1, iTableNameLength) then
|
||||||
begin
|
begin
|
||||||
GetBookmarkFromAdress := oDoc.Bookmarks.getByName(sBookNames[iBookCounter]);
|
GetBookmarkFromAddress := oDoc.Bookmarks.getByName(sBookNames[iBookCounter]);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@@ -121,18 +121,18 @@ public class ScDataPilotItemObj extends TestCase {
|
|||||||
log.println("Creating a test environment");
|
log.println("Creating a test environment");
|
||||||
|
|
||||||
// the cell range
|
// the cell range
|
||||||
CellRangeAddress sCellRangeAdress = new CellRangeAddress();
|
CellRangeAddress sCellRangeAddress = new CellRangeAddress();
|
||||||
sCellRangeAdress.Sheet = 0;
|
sCellRangeAddress.Sheet = 0;
|
||||||
sCellRangeAdress.StartColumn = 1;
|
sCellRangeAddress.StartColumn = 1;
|
||||||
sCellRangeAdress.StartRow = 0;
|
sCellRangeAddress.StartRow = 0;
|
||||||
sCellRangeAdress.EndColumn = mMaxFieldIndex - 1;
|
sCellRangeAddress.EndColumn = mMaxFieldIndex - 1;
|
||||||
sCellRangeAdress.EndRow = mMaxFieldIndex - 1;
|
sCellRangeAddress.EndRow = mMaxFieldIndex - 1;
|
||||||
|
|
||||||
// position of the data pilot table
|
// position of the data pilot table
|
||||||
CellAddress sCellAdress = new CellAddress();
|
CellAddress sCellAddress = new CellAddress();
|
||||||
sCellAdress.Sheet = 0;
|
sCellAddress.Sheet = 0;
|
||||||
sCellAdress.Column = 7;
|
sCellAddress.Column = 7;
|
||||||
sCellAdress.Row = 8;
|
sCellAddress.Row = 8;
|
||||||
|
|
||||||
log.println("Getting a sheet");
|
log.println("Getting a sheet");
|
||||||
|
|
||||||
@@ -168,8 +168,8 @@ public class ScDataPilotItemObj extends TestCase {
|
|||||||
|
|
||||||
oSheet.getCellByPosition(1, 5);
|
oSheet.getCellByPosition(1, 5);
|
||||||
|
|
||||||
int x = sCellAdress.Column;
|
int x = sCellAddress.Column;
|
||||||
int y = sCellAdress.Row + 3;
|
int y = sCellAddress.Row + 3;
|
||||||
|
|
||||||
|
|
||||||
oSheet.getCellByPosition(x, y);
|
oSheet.getCellByPosition(x, y);
|
||||||
@@ -183,7 +183,7 @@ public class ScDataPilotItemObj extends TestCase {
|
|||||||
oSheet);
|
oSheet);
|
||||||
XDataPilotTables DPT = DPTS.getDataPilotTables();
|
XDataPilotTables DPT = DPTS.getDataPilotTables();
|
||||||
XDataPilotDescriptor DPDsc = DPT.createDataPilotDescriptor();
|
XDataPilotDescriptor DPDsc = DPT.createDataPilotDescriptor();
|
||||||
DPDsc.setSourceRange(sCellRangeAdress);
|
DPDsc.setSourceRange(sCellRangeAddress);
|
||||||
|
|
||||||
XPropertySet fieldPropSet = null;
|
XPropertySet fieldPropSet = null;
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ public class ScDataPilotItemObj extends TestCase {
|
|||||||
XIndexAccess IA = DPDsc.getDataPilotFields();
|
XIndexAccess IA = DPDsc.getDataPilotFields();
|
||||||
getSRange(IA);
|
getSRange(IA);
|
||||||
|
|
||||||
DPT.insertNewByName("DataPilotTable", sCellAdress, DPDsc);
|
DPT.insertNewByName("DataPilotTable", sCellAddress, DPDsc);
|
||||||
|
|
||||||
oObj = (XInterface) AnyConverter.toObject(
|
oObj = (XInterface) AnyConverter.toObject(
|
||||||
new Type(XInterface.class), IA.getByIndex(0));
|
new Type(XInterface.class), IA.getByIndex(0));
|
||||||
|
@@ -87,18 +87,18 @@ uno::Reference<uno::XInterface> CheckDataPilotField::init()
|
|||||||
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
|
uno::Reference<sheet::XSpreadsheetDocument> xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
|
||||||
|
|
||||||
// the cell range
|
// the cell range
|
||||||
table::CellRangeAddress sCellRangeAdress;
|
table::CellRangeAddress sCellRangeAddress;
|
||||||
sCellRangeAdress.Sheet = 0;
|
sCellRangeAddress.Sheet = 0;
|
||||||
sCellRangeAdress.StartColumn = 1;
|
sCellRangeAddress.StartColumn = 1;
|
||||||
sCellRangeAdress.StartRow = 0;
|
sCellRangeAddress.StartRow = 0;
|
||||||
sCellRangeAdress.EndColumn = mMaxFieldIndex - 1;
|
sCellRangeAddress.EndColumn = mMaxFieldIndex - 1;
|
||||||
sCellRangeAdress.EndRow = mMaxFieldIndex - 1;
|
sCellRangeAddress.EndRow = mMaxFieldIndex - 1;
|
||||||
|
|
||||||
// position of the data pilot table
|
// position of the data pilot table
|
||||||
table::CellAddress sCellAdress;
|
table::CellAddress sCellAddress;
|
||||||
sCellAdress.Sheet = 0;
|
sCellAddress.Sheet = 0;
|
||||||
sCellAdress.Column = 7;
|
sCellAddress.Column = 7;
|
||||||
sCellAdress.Row = 8;
|
sCellAddress.Row = 8;
|
||||||
// Getting spreadsheet
|
// Getting spreadsheet
|
||||||
uno::Reference<sheet::XSpreadsheets> xSpreadsheets = xSheetDoc->getSheets();
|
uno::Reference<sheet::XSpreadsheets> xSpreadsheets = xSheetDoc->getSheets();
|
||||||
uno::Reference<container::XIndexAccess> oIndexAccess(xSpreadsheets, uno::UNO_QUERY_THROW);
|
uno::Reference<container::XIndexAccess> oIndexAccess(xSpreadsheets, uno::UNO_QUERY_THROW);
|
||||||
@@ -135,8 +135,8 @@ uno::Reference<uno::XInterface> CheckDataPilotField::init()
|
|||||||
// cell of data
|
// cell of data
|
||||||
uno::Any oChangeCell;
|
uno::Any oChangeCell;
|
||||||
oChangeCell <<= oSheet->getCellByPosition(1, 5);
|
oChangeCell <<= oSheet->getCellByPosition(1, 5);
|
||||||
int x = sCellAdress.Column;
|
int x = sCellAddress.Column;
|
||||||
int y = sCellAdress.Row + 3;
|
int y = sCellAddress.Row + 3;
|
||||||
// cell of the data pilot output
|
// cell of the data pilot output
|
||||||
uno::Any oCheckCell;
|
uno::Any oCheckCell;
|
||||||
oCheckCell <<= oSheet->getCellByPosition(x, y);
|
oCheckCell <<= oSheet->getCellByPosition(x, y);
|
||||||
@@ -144,7 +144,7 @@ uno::Reference<uno::XInterface> CheckDataPilotField::init()
|
|||||||
uno::Reference<sheet::XDataPilotTablesSupplier> DPTS(oSheet, uno::UNO_QUERY_THROW);
|
uno::Reference<sheet::XDataPilotTablesSupplier> DPTS(oSheet, uno::UNO_QUERY_THROW);
|
||||||
uno::Reference<sheet::XDataPilotTables> DPT = DPTS->getDataPilotTables();
|
uno::Reference<sheet::XDataPilotTables> DPT = DPTS->getDataPilotTables();
|
||||||
uno::Reference<sheet::XDataPilotDescriptor> DPDsc = DPT->createDataPilotDescriptor();
|
uno::Reference<sheet::XDataPilotDescriptor> DPDsc = DPT->createDataPilotDescriptor();
|
||||||
DPDsc->setSourceRange(sCellRangeAdress);
|
DPDsc->setSourceRange(sCellRangeAddress);
|
||||||
|
|
||||||
uno::Any oDataPilotField = DPDsc->getDataPilotFields()->getByIndex(0);
|
uno::Any oDataPilotField = DPDsc->getDataPilotFields()->getByIndex(0);
|
||||||
uno::Reference<beans::XPropertySet> fieldPropSet(oDataPilotField, uno::UNO_QUERY_THROW);
|
uno::Reference<beans::XPropertySet> fieldPropSet(oDataPilotField, uno::UNO_QUERY_THROW);
|
||||||
@@ -160,7 +160,7 @@ uno::Reference<uno::XInterface> CheckDataPilotField::init()
|
|||||||
//Insert the DataPilotTable
|
//Insert the DataPilotTable
|
||||||
if (DPT->hasByName("DataPilotField"))
|
if (DPT->hasByName("DataPilotField"))
|
||||||
DPT->removeByName("DataPilotField");
|
DPT->removeByName("DataPilotField");
|
||||||
DPT->insertNewByName("DataPilotTField", sCellAdress, DPDsc);
|
DPT->insertNewByName("DataPilotTField", sCellAddress, DPDsc);
|
||||||
|
|
||||||
uno::Reference<container::XIndexAccess> IA = DPDsc->getDataPilotFields();
|
uno::Reference<container::XIndexAccess> IA = DPDsc->getDataPilotFields();
|
||||||
uno::Reference<uno::XInterface> xDataPilotFieldObject;
|
uno::Reference<uno::XInterface> xDataPilotFieldObject;
|
||||||
|
@@ -85,18 +85,18 @@ uno::Reference< uno::XInterface > CheckDataPilotTable::init()
|
|||||||
uno::Reference< sheet::XSpreadsheetDocument > xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
|
uno::Reference< sheet::XSpreadsheetDocument > xSheetDoc(mxComponent, uno::UNO_QUERY_THROW);
|
||||||
|
|
||||||
// the cell range
|
// the cell range
|
||||||
table::CellRangeAddress sCellRangeAdress;
|
table::CellRangeAddress sCellRangeAddress;
|
||||||
sCellRangeAdress.Sheet = 0;
|
sCellRangeAddress.Sheet = 0;
|
||||||
sCellRangeAdress.StartColumn = 1;
|
sCellRangeAddress.StartColumn = 1;
|
||||||
sCellRangeAdress.StartRow = 0;
|
sCellRangeAddress.StartRow = 0;
|
||||||
sCellRangeAdress.EndColumn = MAX_FIELD_INDEX-1;
|
sCellRangeAddress.EndColumn = MAX_FIELD_INDEX-1;
|
||||||
sCellRangeAdress.EndRow = MAX_FIELD_INDEX - 1;
|
sCellRangeAddress.EndRow = MAX_FIELD_INDEX - 1;
|
||||||
|
|
||||||
// position of the data pilot table
|
// position of the data pilot table
|
||||||
table::CellAddress sCellAdress;
|
table::CellAddress sCellAddress;
|
||||||
sCellAdress.Sheet = 0;
|
sCellAddress.Sheet = 0;
|
||||||
sCellAdress.Column = 7;
|
sCellAddress.Column = 7;
|
||||||
sCellAdress.Row = 8;
|
sCellAddress.Row = 8;
|
||||||
// Getting spreadsheet
|
// Getting spreadsheet
|
||||||
uno::Reference< sheet::XSpreadsheets > xSpreadsheets = xSheetDoc->getSheets();
|
uno::Reference< sheet::XSpreadsheets > xSpreadsheets = xSheetDoc->getSheets();
|
||||||
uno::Reference< container::XIndexAccess > oIndexAccess(xSpreadsheets, uno::UNO_QUERY_THROW);
|
uno::Reference< container::XIndexAccess > oIndexAccess(xSpreadsheets, uno::UNO_QUERY_THROW);
|
||||||
@@ -133,8 +133,8 @@ uno::Reference< uno::XInterface > CheckDataPilotTable::init()
|
|||||||
// cell of data
|
// cell of data
|
||||||
uno::Any oChangeCell;
|
uno::Any oChangeCell;
|
||||||
oChangeCell<<= oSheet->getCellByPosition(1, 5);
|
oChangeCell<<= oSheet->getCellByPosition(1, 5);
|
||||||
int x = sCellAdress.Column;
|
int x = sCellAddress.Column;
|
||||||
int y = sCellAdress.Row + 3;
|
int y = sCellAddress.Row + 3;
|
||||||
// cell of the data pilot output
|
// cell of the data pilot output
|
||||||
uno::Any oCheckCell;
|
uno::Any oCheckCell;
|
||||||
oCheckCell<<= oSheet->getCellByPosition(x, y);
|
oCheckCell<<= oSheet->getCellByPosition(x, y);
|
||||||
@@ -142,7 +142,7 @@ uno::Reference< uno::XInterface > CheckDataPilotTable::init()
|
|||||||
uno::Reference< sheet::XDataPilotTablesSupplier> DPTS(oSheet, uno::UNO_QUERY_THROW);
|
uno::Reference< sheet::XDataPilotTablesSupplier> DPTS(oSheet, uno::UNO_QUERY_THROW);
|
||||||
uno::Reference< sheet::XDataPilotTables> DPT = DPTS->getDataPilotTables();
|
uno::Reference< sheet::XDataPilotTables> DPT = DPTS->getDataPilotTables();
|
||||||
uno::Reference< sheet::XDataPilotDescriptor> DPDsc = DPT->createDataPilotDescriptor();
|
uno::Reference< sheet::XDataPilotDescriptor> DPDsc = DPT->createDataPilotDescriptor();
|
||||||
DPDsc->setSourceRange(sCellRangeAdress);
|
DPDsc->setSourceRange(sCellRangeAddress);
|
||||||
|
|
||||||
uno::Any oDataPilotField = DPDsc->getDataPilotFields()->getByIndex(0);
|
uno::Any oDataPilotField = DPDsc->getDataPilotFields()->getByIndex(0);
|
||||||
uno::Reference<beans::XPropertySet> fieldPropSet(oDataPilotField, uno::UNO_QUERY_THROW);
|
uno::Reference<beans::XPropertySet> fieldPropSet(oDataPilotField, uno::UNO_QUERY_THROW);
|
||||||
@@ -158,7 +158,7 @@ uno::Reference< uno::XInterface > CheckDataPilotTable::init()
|
|||||||
//Insert the DataPilotTable
|
//Insert the DataPilotTable
|
||||||
if (DPT->hasByName("DataPilotTable"))
|
if (DPT->hasByName("DataPilotTable"))
|
||||||
DPT->removeByName("DataPilotTable");
|
DPT->removeByName("DataPilotTable");
|
||||||
DPT->insertNewByName("DataPilotTable", sCellAdress, DPDsc);
|
DPT->insertNewByName("DataPilotTable", sCellAddress, DPDsc);
|
||||||
|
|
||||||
uno::Reference<uno::XInterface> xDataPilotTableObject;
|
uno::Reference<uno::XInterface> xDataPilotTableObject;
|
||||||
data = DPT->getByName( DPT->getElementNames()[0] );
|
data = DPT->getByName( DPT->getElementNames()[0] );
|
||||||
|
@@ -412,13 +412,13 @@ bool ImplSdPPTImport::Import()
|
|||||||
INetURLObject aUrl( aHyperlink.aTarget, INetProtocol::File );
|
INetURLObject aUrl( aHyperlink.aTarget, INetProtocol::File );
|
||||||
aHyperlink.aTarget = aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE );
|
aHyperlink.aTarget = aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE );
|
||||||
|
|
||||||
if ( !aPropItem.Read( aHyperlink.aSubAdress ) )
|
if ( !aPropItem.Read( aHyperlink.aSubAddress ) )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ( !aHyperlink.aSubAdress.isEmpty() ) // get the converted subaddress
|
if ( !aHyperlink.aSubAddress.isEmpty() ) // get the converted subaddress
|
||||||
{
|
{
|
||||||
sal_uInt32 nPageNumber = 0;
|
sal_uInt32 nPageNumber = 0;
|
||||||
OUString aString( aHyperlink.aSubAdress );
|
OUString aString( aHyperlink.aSubAddress );
|
||||||
OString aStringAry[ 3 ];
|
OString aStringAry[ 3 ];
|
||||||
size_t nTokenCount = 0;
|
size_t nTokenCount = 0;
|
||||||
sal_Int32 nPos = 0;
|
sal_Int32 nPos = 0;
|
||||||
|
@@ -36,7 +36,7 @@ constexpr OUStringLiteral colLevel4 = u"OutlineSheet.G1:S1";
|
|||||||
constexpr OUStringLiteral rowLevel1 = u"OutlineSheet.A1:A30";
|
constexpr OUStringLiteral rowLevel1 = u"OutlineSheet.A1:A30";
|
||||||
constexpr OUStringLiteral rowLevel2 = u"OutlineSheet.A3:A27";
|
constexpr OUStringLiteral rowLevel2 = u"OutlineSheet.A3:A27";
|
||||||
|
|
||||||
static OUString getVisibleAdress(
|
static OUString getVisibleAddress(
|
||||||
uno::Reference<sheet::XSpreadsheet> const& xSheet,
|
uno::Reference<sheet::XSpreadsheet> const& xSheet,
|
||||||
const OUString& aLevelRangeString)
|
const OUString& aLevelRangeString)
|
||||||
{
|
{
|
||||||
@@ -78,14 +78,14 @@ void XSheetOutline::testHideDetail()
|
|||||||
aSheetOutline->hideDetail(aLevelRangeAddress);
|
aSheetOutline->hideDetail(aLevelRangeAddress);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Column level 2 not hidden",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Column level 2 not hidden",
|
||||||
getVisibleAdress(aSheet, colLevel2), OUString());
|
getVisibleAddress(aSheet, colLevel2), OUString());
|
||||||
|
|
||||||
// Row Level 2
|
// Row Level 2
|
||||||
aLevelRangeAddress = getAddressFromRangeString(aSheet, rowLevel2);
|
aLevelRangeAddress = getAddressFromRangeString(aSheet, rowLevel2);
|
||||||
aSheetOutline->hideDetail(aLevelRangeAddress);
|
aSheetOutline->hideDetail(aLevelRangeAddress);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Row level 2 not hidden",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Row level 2 not hidden",
|
||||||
getVisibleAdress(aSheet, rowLevel2), OUString());
|
getVisibleAddress(aSheet, rowLevel2), OUString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,14 +102,14 @@ void XSheetOutline::testShowDetail()
|
|||||||
aSheetOutline->showDetail(aLevelRangeAddress);
|
aSheetOutline->showDetail(aLevelRangeAddress);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Row level 2 still hidden",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Row level 2 still hidden",
|
||||||
getVisibleAdress(aSheet, rowLevel2), OUString(rowLevel2));
|
getVisibleAddress(aSheet, rowLevel2), OUString(rowLevel2));
|
||||||
|
|
||||||
// Column Level 2
|
// Column Level 2
|
||||||
aLevelRangeAddress = getAddressFromRangeString(aSheet, colLevel2);
|
aLevelRangeAddress = getAddressFromRangeString(aSheet, colLevel2);
|
||||||
aSheetOutline->showDetail(aLevelRangeAddress);
|
aSheetOutline->showDetail(aLevelRangeAddress);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Column level 2 still hidden",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Column level 2 still hidden",
|
||||||
getVisibleAdress(aSheet, colLevel2), OUString(colLevel2));
|
getVisibleAddress(aSheet, colLevel2), OUString(colLevel2));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,14 +137,14 @@ void XSheetOutline::testShowLevel()
|
|||||||
|
|
||||||
aSheetOutline->showLevel(2, table::TableOrientation_COLUMNS);
|
aSheetOutline->showLevel(2, table::TableOrientation_COLUMNS);
|
||||||
|
|
||||||
std::cout << " verify showLevel col apres" << getVisibleAdress(aSheet, "OutlineSheet.A1:Z30") << std::endl;
|
std::cout << " verify showLevel col apres" << getVisibleAddress(aSheet, "OutlineSheet.A1:Z30") << std::endl;
|
||||||
|
|
||||||
// verify that level 2 and level 1 are shown --> column 0..3 & column 22..26
|
// verify that level 2 and level 1 are shown --> column 0..3 & column 22..26
|
||||||
// level 3 & 4 are hidden --> column 4..19
|
// level 3 & 4 are hidden --> column 4..19
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("testShowLevel Column", OUString("OutlineSheet.A1:D1"), getVisibleAdress(aSheet, "OutlineSheet.A1:D1"));
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("testShowLevel Column", OUString("OutlineSheet.A1:D1"), getVisibleAddress(aSheet, "OutlineSheet.A1:D1"));
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("testShowLevel Column", OUString("OutlineSheet.V1:Z1"), getVisibleAdress(aSheet, "OutlineSheet.V1:Z1"));
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("testShowLevel Column", OUString("OutlineSheet.V1:Z1"), getVisibleAddress(aSheet, "OutlineSheet.V1:Z1"));
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("testShowLevel Column", OUString(), getVisibleAdress(aSheet, colLevel3));
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("testShowLevel Column", OUString(), getVisibleAddress(aSheet, colLevel3));
|
||||||
|
|
||||||
/* FIXME !!
|
/* FIXME !!
|
||||||
|
|
||||||
@@ -159,25 +159,25 @@ void XSheetOutline::testShowLevel()
|
|||||||
aSheetOutline->showDetail(getAddressFromRangeString(rowLevel1));
|
aSheetOutline->showDetail(getAddressFromRangeString(rowLevel1));
|
||||||
aSheetOutline->showDetail(getAddressFromRangeString(rowLevel2));
|
aSheetOutline->showDetail(getAddressFromRangeString(rowLevel2));
|
||||||
|
|
||||||
std::cout << " verify showLevel row before" << OUStringToOString(getVisibleAdress("OutlineSheet.A1:Z30"), RTL_TEXTENCODING_UTF8).getStr() << std::endl;
|
std::cout << " verify showLevel row before" << OUStringToOString(getVisibleAddress("OutlineSheet.A1:Z30"), RTL_TEXTENCODING_UTF8).getStr() << std::endl;
|
||||||
|
|
||||||
aSheetOutline->hideDetail(aLevel1);
|
aSheetOutline->hideDetail(aLevel1);
|
||||||
aSheetOutline->hideDetail(aLevel2);
|
aSheetOutline->hideDetail(aLevel2);
|
||||||
aSheetOutline->hideDetail(aLevel3);
|
aSheetOutline->hideDetail(aLevel3);
|
||||||
aSheetOutline->hideDetail(aLevel4);
|
aSheetOutline->hideDetail(aLevel4);
|
||||||
|
|
||||||
std::cout << " verify showLevel row just before" << OUStringToOString(getVisibleAdress("OutlineSheet.A1:Z30"), RTL_TEXTENCODING_UTF8).getStr() << std::endl;
|
std::cout << " verify showLevel row just before" << OUStringToOString(getVisibleAddress("OutlineSheet.A1:Z30"), RTL_TEXTENCODING_UTF8).getStr() << std::endl;
|
||||||
|
|
||||||
aSheetOutline->showLevel(2, table::TableOrientation_ROWS);
|
aSheetOutline->showLevel(2, table::TableOrientation_ROWS);
|
||||||
|
|
||||||
std::cout << " verify showLevel row after" << OUStringToOString(getVisibleAdress("OutlineSheet.A1:Z30"), RTL_TEXTENCODING_UTF8).getStr() << std::endl;
|
std::cout << " verify showLevel row after" << OUStringToOString(getVisibleAddress("OutlineSheet.A1:Z30"), RTL_TEXTENCODING_UTF8).getStr() << std::endl;
|
||||||
|
|
||||||
// verify rows visible 0..3 & 24..29
|
// verify rows visible 0..3 & 24..29
|
||||||
// verify rows hidden 4..23
|
// verify rows hidden 4..23
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("testShowLevel Row", OUString("OutlineSheet.A1:A4"), getVisibleAdress("OutlineSheet.A1:A4"));
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("testShowLevel Row", OUString("OutlineSheet.A1:A4"), getVisibleAddress("OutlineSheet.A1:A4"));
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("testShowLevel Row", OUString("OutlineSheet.A25:A30"), getVisibleAdress("OutlineSheet.A25:A30"));
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("testShowLevel Row", OUString("OutlineSheet.A25:A30"), getVisibleAddress("OutlineSheet.A25:A30"));
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("testShowLevel Row", OUString(), getVisibleAdress(rowLevel3));
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("testShowLevel Row", OUString(), getVisibleAddress(rowLevel3));
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ void XSheetOutline::testGroup()
|
|||||||
|
|
||||||
aSheetOutline->hideDetail(aLevelRangeAddress);
|
aSheetOutline->hideDetail(aLevelRangeAddress);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("testGroup Column still visible", getVisibleAdress(aSheet, aNewString), OUString());
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("testGroup Column still visible", getVisibleAddress(aSheet, aNewString), OUString());
|
||||||
|
|
||||||
// Row Level 2
|
// Row Level 2
|
||||||
aNewString = "OutlineSheet.A50:A60";
|
aNewString = "OutlineSheet.A50:A60";
|
||||||
@@ -205,7 +205,7 @@ void XSheetOutline::testGroup()
|
|||||||
|
|
||||||
aSheetOutline->hideDetail(aLevelRangeAddress);
|
aSheetOutline->hideDetail(aLevelRangeAddress);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("testGroup Row still visible", getVisibleAdress(aSheet, aNewString), OUString());
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("testGroup Row still visible", getVisibleAddress(aSheet, aNewString), OUString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ void XSheetOutline::testUngroup()
|
|||||||
aSheetOutline->showDetail(aLevelRangeAddress);
|
aSheetOutline->showDetail(aLevelRangeAddress);
|
||||||
// should remain hidden ?
|
// should remain hidden ?
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("testUnGroup Column becomes visible after ungroup", getVisibleAdress(aSheet, aNewString), OUString());
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("testUnGroup Column becomes visible after ungroup", getVisibleAddress(aSheet, aNewString), OUString());
|
||||||
|
|
||||||
// New Row level
|
// New Row level
|
||||||
aNewString = "OutlineSheet.A70:A80";
|
aNewString = "OutlineSheet.A70:A80";
|
||||||
@@ -238,7 +238,7 @@ void XSheetOutline::testUngroup()
|
|||||||
aSheetOutline->showDetail(aLevelRangeAddress);
|
aSheetOutline->showDetail(aLevelRangeAddress);
|
||||||
// should remain hidden ?
|
// should remain hidden ?
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("testUnGroup Row becomes visible after ungroup", getVisibleAdress(aSheet, aNewString), OUString());
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("testUnGroup Row becomes visible after ungroup", getVisibleAddress(aSheet, aNewString), OUString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,8 +254,8 @@ void XSheetOutline::testClearOutline()
|
|||||||
aLevelRangeAddress = getAddressFromRangeString(aSheet, rowLevel1);
|
aLevelRangeAddress = getAddressFromRangeString(aSheet, rowLevel1);
|
||||||
aSheetOutline->hideDetail(aLevelRangeAddress);
|
aSheetOutline->hideDetail(aLevelRangeAddress);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("testClearOutline Columns are hidden after clear", getVisibleAdress(aSheet, colLevel1), OUString(colLevel1));
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("testClearOutline Columns are hidden after clear", getVisibleAddress(aSheet, colLevel1), OUString(colLevel1));
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("testClearOutline Rows are hidden after clear", getVisibleAdress(aSheet, rowLevel1), OUString(rowLevel1));
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("testClearOutline Rows are hidden after clear", getVisibleAddress(aSheet, rowLevel1), OUString(rowLevel1));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user