Longstory:

Sub Main
	
	Sheet = ThisComponent.CurrentController.getActiveSheet()
	Cell = Sheet.getCellRangeByName("A1")
	Cell.setString("Hello World")
	MsgBox("Check the A1 cell contents! It will not be saved!")
	
	CloseDocIgnoreConfirmation()
	
End Sub

Function CloseDocIgnoreConfirmation()

	ThisComponent.Close(TRUE)

End Function

Short:

ThisComponent.Close(TRUE)

Описание:
Вышепредставленный программный код на бейсике для макросов либреофиса можно использовать чтобы закрыть текущий документ, не спрашивая пользователя сохранить его или нет. Таким образом можно программно закрыть несохраненный документ, не сохранив изменения в нём и игнорируя диалоговые окна, мешающие закрытию.

Sub Main
    
    MsgBox(GetDocFullPath())
    
End Sub

' Returns document full path if document has a path. Returns empty string if   '
' document has no path and IgnoreNoPathError flag is set to TRUE.              '
Function GetDocFullPath(Optional IgnoreNoPathError as Boolean) As String
    
    ' Default behavior is to return empty string if document location is empty '
    ' This can happen if document is new and not saved thus do not have a path '
    If NOT ThisComponent.hasLocation() AND IgnoreNoPathError <> TRUE Then
        ' Err.Raise is not valid statement but will generate error anyway.     '
        Err.Raise("Document has no path. Probably because is not saved.")
    End If
    
    GetDocFullPath = ConvertFromURL(ThisComponent.getLocation())
    
End Function

Описание:
Вышепредставленный программный код на бейсике для макросов либреофиса можно использовать чтобы получить полный путь к текущему (над которым работает макрос) документу / файлу в обычном формате.

  1. Встроенная система классов навязывает использование new при создании экземпляров объектов.
  2. Оператор return не создает блока, поэтому нельзя написать
    a = (b) ->
      return
        b + 1
    
  3. Отсутствие syntax shugar для yield. Хотя возможно что с приходом await/async yield отомрёт
  4. Comprehensions для функций (не для выражений). Вот это:
    obj = 
      prop:
        console.log "wtf!"
        if a then 1 else 2
    

    хорошо, а вот это:

    fn = (a) ->
      for b in a 
        b.increment()
    

    возвращающее массив - очень хуёво. Были проблемы из-за этого.

  5. Сука пиздец ёбаный ну это что вообще блядь сука пиздец, а
    a = ["abc","ebc","undefined","defg"]
    a = a.filter (el) -> el.indexOf "undefined" is -1
    console.dir a # ["abc","ebc","undefined","defg"]
    

    работает как

    a.filter (el) -> el.indexOf("undefined" is -1)
    

    Пиздец.

  6. coffee> a = /Письменные консультации/
    /Письменные консультации/
    coffee> a = ///Письменные консультации///
    /Письменныеконсультации/
    

    Что? Блядь, ЧТО? ЧТО БЛЯДЬ!!!!!!!!!!!!!!!
    Всё я дропаю это говно нахуй. Сударь, вы безумны. Вы безумны, сударь, блядь. Беды с башкой.
    https://github.com/jashkenas/coffeescript/issues/1199

  7. Твою мать блядь сука ёбаный ты в рот:

    for collection_id \
    in collections_list
      console.log 123
    

    17:5: error: unexpected in
    in collections_list
    ^^

[ ]
 
TypeError: object is not a function

Причина:
Написал typeof вместо instanceof

[ ]
 

The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.The folder Inbox is full, and can't hold any more messages. To make room for more messages, delete any old or unwanted mail and compact the folder.

Don't tell me to get a life.
I had one once.
It sucked.

 

In Soviet Russia, law violates you!

 

setcookie содержит в себе одну подлую опцию path. И если её не указать, куки начинают сохраняться через сраку гуся.

[ ]
 

Нужно её ЗАКОДИРОВАТЬ. И тогда она, блядь, раскодируется.

iconv = require 'iconv-lite'
fileName = '%D0%90%D0%BA%D1%82%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9%20%D0%BF%D1%80%D0%B0%D0%B9%D1%8111.08.15.xls'
fileName = unescape(fileName)
console.log fileName
fileName = iconv.encode(fileName,'iso8859-1')
console.log fileName.toString()

Trapped inside the dream forever