mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Raw pointers from functions -> JSSmart
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
JSSmart<CJSValue> CGraphicsEmbed::init(JSSmart<CJSValue> Native, JSSmart<CJSValue> width_px, JSSmart<CJSValue> height_px, JSSmart<CJSValue> width_mm, JSSmart<CJSValue> height_mm)
|
||||
{
|
||||
m_pInternal->init((NSNativeControl::CNativeControl*)Native->toObjectSmart()->getNative()->getObject(), width_px->toDouble(), height_px->toDouble(), width_mm->toDouble(), height_mm->toDouble());
|
||||
m_pInternal->init((NSNativeControl::CNativeControl*)Native->toObject()->getNative()->getObject(), width_px->toDouble(), height_px->toDouble(), width_mm->toDouble(), height_mm->toDouble());
|
||||
return NULL;
|
||||
}
|
||||
JSSmart<CJSValue> CGraphicsEmbed::Destroy()
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
#include "./PointerEmbed.h"
|
||||
#include "./../../fontengine/TextShaper.h"
|
||||
|
||||
#define RAW_POINTER(value) ((CPointerEmbedObject*)value->toObjectSmart()->getNative())->Data
|
||||
#define POINTER_OBJECT(value) ((CPointerEmbedObject*)value->toObjectSmart()->getNative())
|
||||
#define RAW_POINTER(value) ((CPointerEmbedObject*)value->toObject()->getNative())->Data
|
||||
#define POINTER_OBJECT(value) ((CPointerEmbedObject*)value->toObject()->getNative())
|
||||
|
||||
// в js не хотим следить, чтобы в каждом face была ссылка на library - т.е. чтобы
|
||||
// сначала удалились все face, а потом library - поэтому делаем свой счетчик ссылок
|
||||
@ -55,7 +55,7 @@ JSSmart<CJSValue> CTextMeasurerEmbed::FT_Malloc(JSSmart<CJSValue> typed_array_or
|
||||
}
|
||||
JSSmart<CJSValue> CTextMeasurerEmbed::FT_Free(JSSmart<CJSValue> pointer)
|
||||
{
|
||||
CPointerEmbedObject* pEmbed = (CPointerEmbedObject*)pointer->toObjectSmart()->getNative();
|
||||
CPointerEmbedObject* pEmbed = (CPointerEmbedObject*)pointer->toObject()->getNative();
|
||||
pEmbed->Free();
|
||||
return CJSContext::createUndefined();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user