Hallo
Am 13.01.2016 um 22:28 schrieb Franklin Schiftan:
Hallo Werner,

am 13.01.2016 um 21:59 Uhr schrieb Werner Tietz <[email protected]>

...


Eigentlich müsste man doch in Deinem Code-Beispiel "nur" anstelle
der Prüfung auf eine bestimmte Zellvorlage auf den Gesperrt-Status
der Zelle prüfen ... Das scheint aber nicht so einfach möglich zu
sein, oder?

>> *x- - - - - - - - - - - - - > Schnipp < - - - - - - - - - - - -x*
>>           if not cellrange.CellProtection.IsLocked:
>> *x- - - - - - - - - - - - - > Schnipp < - - - - - - - - - - - -x*

Es würde dir auch nicht schaden, *selber* nachzudenken und tatsächlich einen Objektinspektor zu benutzen wie z.B.
http://extensions.services.openoffice.org/de/project/MRI


*x- - - - - - - - - - - - - > Schnipp < - - - - - - - - - - - -x*

def main():
      doc = XSCRIPTCONTEXT.getDocument()
      selection = doc.CurrentSelection
      for cellrange in iterate(selection.getUniqueCellFormatRanges()):
          if cellrange.CellStyle == 'input':
              cellrange.clearContents(15)

def iterate(enumerable):
      enum = enumerable.createEnumeration()
      while enum.hasMoreElements():
          yield enum.nextElement()

*x- - - - - - - - - - - - - > Schnipp < - - - - - - - - - - - -x*




--
Liste abmelden mit E-Mail an: [email protected]
Probleme? 
http://de.libreoffice.org/hilfe-kontakt/mailing-listen/abmeldung-liste/
Tipps zu Listenmails: http://wiki.documentfoundation.org/Netiquette/de
Listenarchiv: http://listarchives.libreoffice.org/de/users/
Alle E-Mails an diese Liste werden unlöschbar öffentlich archiviert

Antwort per Email an