LibreOffice Module test (master) 1
Public Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
apitest::XSpreadsheets2 Class Referenceabstract

#include <xspreadsheets2.hxx>

Public Member Functions

 XSpreadsheets2 ()
 
virtual ~XSpreadsheets2 ()
 
void testImportedSheetNameAndIndex ()
 
void testImportString ()
 
void testImportValue ()
 
void testImportFormulaBasicMath ()
 
void testImportFormulaWithNamedRange ()
 
void testImportOverExistingNamedRange ()
 
void testImportNamedRangeDefinedInSource ()
 
void testImportNamedRangeRedefinedInSource ()
 
void testImportNewNamedRange ()
 
void testImportCellStyle ()
 
void testLastAfterInsertCopy ()
 
virtual css::uno::Reference< css::lang::XComponent > getComponent ()=0
 
virtual css::uno::Reference< css::uno::XInterface > init ()=0
 
virtual css::uno::Reference< css::lang::XComponent > loadFromDesktop (const OUString &)=0
 
virtual void createFileURL (const OUString &, OUString &)=0
 

Protected Attributes

css::uno::Reference< css::sheet::XSpreadsheetDocument > xDocument
 

Private Member Functions

css::uno::Reference< css::sheet::XSpreadsheetDocument > getDoc (const OUString &)
 
void importSheetToCopy ()
 

Static Private Member Functions

static css::uno::Reference< css::sheet::XNamedRanges > getNamedRanges (css::uno::Reference< css::sheet::XSpreadsheetDocument > const &)
 
static bool isExternalReference (const OUString &aDestContent, std::u16string_view aSrcContent)
 

Private Attributes

css::uno::Reference< css::sheet::XSpreadsheetDocument > xDestDoc
 
css::uno::Reference< css::sheet::XSpreadsheet > xDestSheet
 
css::uno::Reference< css::sheet::XSpreadsheet > xSrcSheet
 

Detailed Description

Definition at line 22 of file xspreadsheets2.hxx.

Constructor & Destructor Documentation

◆ XSpreadsheets2()

apitest::XSpreadsheets2::XSpreadsheets2 ( )

Definition at line 42 of file xspreadsheets2.cxx.

◆ ~XSpreadsheets2()

apitest::XSpreadsheets2::~XSpreadsheets2 ( )
virtual

Definition at line 46 of file xspreadsheets2.cxx.

References xDestDoc.

Member Function Documentation

◆ createFileURL()

virtual void apitest::XSpreadsheets2::createFileURL ( const OUString &  ,
OUString &   
)
pure virtual

Referenced by getDoc().

◆ getComponent()

virtual css::uno::Reference< css::lang::XComponent > apitest::XSpreadsheets2::getComponent ( )
pure virtual

◆ getDoc()

uno::Reference< sheet::XSpreadsheetDocument > apitest::XSpreadsheets2::getDoc ( const OUString &  aFileBase)
private

Definition at line 320 of file xspreadsheets2.cxx.

References createFileURL(), and loadFromDesktop().

Referenced by importSheetToCopy(), and testLastAfterInsertCopy().

◆ getNamedRanges()

uno::Reference< sheet::XNamedRanges > apitest::XSpreadsheets2::getNamedRanges ( css::uno::Reference< css::sheet::XSpreadsheetDocument > const &  )
staticprivate

◆ importSheetToCopy()

void apitest::XSpreadsheets2::importSheetToCopy ( )
private

◆ init()

virtual css::uno::Reference< css::uno::XInterface > apitest::XSpreadsheets2::init ( )
pure virtual

◆ isExternalReference()

bool apitest::XSpreadsheets2::isExternalReference ( const OUString &  aDestContent,
std::u16string_view  aSrcContent 
)
staticprivate

Definition at line 356 of file xspreadsheets2.cxx.

References apitest::gaSrcFileName().

Referenced by testImportNewNamedRange().

◆ loadFromDesktop()

virtual css::uno::Reference< css::lang::XComponent > apitest::XSpreadsheets2::loadFromDesktop ( const OUString &  )
pure virtual

Referenced by getDoc().

◆ testImportCellStyle()

void apitest::XSpreadsheets2::testImportCellStyle ( )

in source file, imported sheet uses a cellstyle that does not exists in target test that

  • an imported cell D1 uses the right cellStyle
  • the cellStyle is created in CellStyles family
  • a property of the cellStyle (VertJustify) is correctly set

Definition at line 229 of file xspreadsheets2.cxx.

References importSheetToCopy(), u, xDestDoc, xDestSheet, and xSrcSheet.

◆ testImportedSheetNameAndIndex()

void apitest::XSpreadsheets2::testImportedSheetNameAndIndex ( )

Verify that the imported sheet has the correct name and is placed at the right requested index

Definition at line 55 of file xspreadsheets2.cxx.

References apitest::gaSrcSheetName(), importSheetToCopy(), and xDestDoc.

◆ testImportFormulaBasicMath()

void apitest::XSpreadsheets2::testImportFormulaBasicMath ( )

tests the cell C1 containing an arithmetic formula correctly imported

Definition at line 102 of file xspreadsheets2.cxx.

References importSheetToCopy(), xDestSheet, and xSrcSheet.

◆ testImportFormulaWithNamedRange()

void apitest::XSpreadsheets2::testImportFormulaWithNamedRange ( )

tests the cell D1 containing a formula that uses a NamedRange expression

Definition at line 120 of file xspreadsheets2.cxx.

References importSheetToCopy(), xDestSheet, and xSrcSheet.

◆ testImportNamedRangeDefinedInSource()

void apitest::XSpreadsheets2::testImportNamedRangeDefinedInSource ( )

in Source file, InSheetRangeName named range is defined in the copied sheet it does not exists in target file test that the range named is created in target and that it points in the target copied sheet

Definition at line 157 of file xspreadsheets2.cxx.

References getNamedRanges(), importSheetToCopy(), and xDestDoc.

◆ testImportNamedRangeRedefinedInSource()

void apitest::XSpreadsheets2::testImportNamedRangeRedefinedInSource ( )

in Source file, initial2 named range is defined in the copied sheet it is defined in another sheet of target file test that the range named points in the target copied sheet

Definition at line 181 of file xspreadsheets2.cxx.

References getNamedRanges(), importSheetToCopy(), and xDestDoc.

◆ testImportNewNamedRange()

void apitest::XSpreadsheets2::testImportNewNamedRange ( )

in Source file, new_rangename range named is defined outside the copied sheet it does not exists in target file test that new_rangename is created and its content points to source file as an external reference

Definition at line 202 of file xspreadsheets2.cxx.

References getNamedRanges(), importSheetToCopy(), isExternalReference(), and xDestDoc.

◆ testImportOverExistingNamedRange()

void apitest::XSpreadsheets2::testImportOverExistingNamedRange ( )

Both Source and Target file define the named range initial1 in Source, initial1 is defined outside the copied sheet In Target, after import sheet, initial1 should point on its initial definition $Sheet1.$B$1

NEED MORE WORK

Definition at line 136 of file xspreadsheets2.cxx.

References getNamedRanges(), importSheetToCopy(), and xDestDoc.

◆ testImportString()

void apitest::XSpreadsheets2::testImportString ( )

tests the cell A1 containing a string correctly imported

Definition at line 68 of file xspreadsheets2.cxx.

References importSheetToCopy(), xDestSheet, and xSrcSheet.

◆ testImportValue()

void apitest::XSpreadsheets2::testImportValue ( )

tests the cell B1 containing a value correctly imported

Definition at line 86 of file xspreadsheets2.cxx.

References importSheetToCopy(), xDestSheet, and xSrcSheet.

◆ testLastAfterInsertCopy()

void apitest::XSpreadsheets2::testLastAfterInsertCopy ( )

Test that results in row 1 of all inserted sheets are equal to the source sheet. The loaded destination document is kept open so several sheets are imported.

Definition at line 270 of file xspreadsheets2.cxx.

References apitest::gaDestFileBase(), apitest::gaSrcSheetName(), getDoc(), init(), apitest::nInsertedSheets(), xDestDoc, xDestSheet, and xSrcSheet.

Member Data Documentation

◆ xDestDoc

css::uno::Reference< css::sheet::XSpreadsheetDocument> apitest::XSpreadsheets2::xDestDoc
private

◆ xDestSheet

css::uno::Reference< css::sheet::XSpreadsheet > apitest::XSpreadsheets2::xDestSheet
private

◆ xDocument

css::uno::Reference< css::sheet::XSpreadsheetDocument> apitest::XSpreadsheets2::xDocument
protected

Definition at line 47 of file xspreadsheets2.hxx.

Referenced by importSheetToCopy().

◆ xSrcSheet

css::uno::Reference< css::sheet::XSpreadsheet > apitest::XSpreadsheets2::xSrcSheet
private

The documentation for this class was generated from the following files: