Exemplo n.º 1
0
 def addRow(self):
     l = []
     self.rowNumber += 1
     for c in range(self.columnNumber):
         l.append(Cell(self.rowNumber - 1, c))
         l[-1].name = columns_labels.getLabel(self.labels, c + 1) + str(self.rowNumber)
     self.matrix.append(l)
Exemplo n.º 2
0
 def __init__(self):
     self.labels = columns_labels.generate(1)  # Noms des colonnes
     self.matrix = [[Cell(0, 0)]]  # Initialisation de la matrice
     self.matrix[0][0].name = columns_labels.getLabel(self.labels, 0) + str(1)
     self.columnNumber = 1
     self.rowNumber = 1
     self.saved = True
     self.title = "Nouvelle feuille"
Exemplo n.º 3
0
 def reset(self, initalRows, initalColumns):
     self.__init__()
     self.subsitute([[Cell(0, 0)]])
     self.getCell(0,0).name = columns_labels.getLabel(self.labels, 0) + str(1)
     self.addColumns(initalColumns - 1)
     self.addRows(initalRows - 1)
     self.columnNumber = initalColumns
     self.rowNumber = initalRows
Exemplo n.º 4
0
def horizontalPull(inputDecomposed, columns, labels):
    elementList = copy.copy(inputDecomposed[0])  # Pour ne pas changer sur place la decomposition initiale
    elementType = inputDecomposed[1]
    for i in range(len(elementList)):
        if elementType[i] == 'cell':
            if elementList[i][0] != '$':
                letters = ''.join([char for char in elementList[i] if char.isalpha()])
                n = columns_labels.getColumn(letters)  # On recupere le label de la colonne pour l'itérer columns fois
                newletters = columns_labels.getLabel(labels, n + columns)
                elementList[i] = newletters + elementList[i][len(letters):]  # On change la partie des lettres
    return ''.join(elementList)
Exemplo n.º 5
0
 def addColumn(self):
     self.columnNumber += 1
     for r in range(self.rowNumber):
         self.matrix[r].append(Cell(r, self.columnNumber - 1, ))
         self.matrix[r][-1].name = columns_labels.getLabel(self.labels, self.columnNumber) + str(r + 1)