diff --git a/src/FsSpreadsheet/FsAddress.fs b/src/FsSpreadsheet/FsAddress.fs index fd45f03a..8f749688 100644 --- a/src/FsSpreadsheet/FsAddress.fs +++ b/src/FsSpreadsheet/FsAddress.fs @@ -82,6 +82,10 @@ type FsAddress(rowNumber : int, columnNumber : int, fixedRow : bool, fixedColumn let mutable _trimmedAddress = "" + // ---------------------- + // ALTERNATE CONSTRUCTORS + // ---------------------- + new (rowNumber : int, columnLetter : string, fixedRow : bool, fixedColumn : bool) = FsAddress(rowNumber,CellReference.colAdressToIndex columnLetter |> int,fixedRow,fixedColumn) @@ -91,9 +95,19 @@ type FsAddress(rowNumber : int, columnNumber : int, fixedRow : bool, fixedColumn new (cellAddressString : string) = let colIndex,rowIndex = CellReference.toIndices cellAddressString FsAddress(int rowIndex,int colIndex) + + + // ---------- + // PROPERTIES + // ---------- - member this.LOL () = 1 - //let mutable _address = address + member self.ColumnNumber + with get() = _columnNumber + and set(colI) = _columnNumber <- colI + + member self.RowNumber + with get() = _rowNumber + and set(rowI) = _rowNumber <- rowI member self.Address with get() = CellReference.ofIndices (uint32 _columnNumber) (uint32 _rowNumber) @@ -102,19 +116,18 @@ type FsAddress(rowNumber : int, columnNumber : int, fixedRow : bool, fixedColumn _rowNumber <- int row _columnNumber <- int column - member self.OfIndices(rowIndex,colIndex) = - _columnNumber <- colIndex - _rowNumber <- rowIndex + member self.FixedRow = false + member self.FixedColumn = false - member self.ToIndices() = _rowNumber,_columnNumber - member self.ColumnNumber - with get() = _columnNumber - and set(colI) = _columnNumber <- colI + // ------- + // METHODS + // ------- - member self.RowNumber - with get() = _rowNumber - and set(rowI) = _rowNumber <- rowI + member this.LOL () = 1 + //let mutable _address = address - member self.FixedRow = false - member self.FixedColumn = false \ No newline at end of file + /// Updates the row- and columnIndex respective to the given indices. + member self.OfIndices(rowIndex,colIndex) = + _columnNumber <- colIndex + _rowNumber <- rowIndex \ No newline at end of file