summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMert Tumer <mert.tumer@collabora.com>2019-10-24 12:11:21 +0300
committerAshod Nakashian <ashnakash@gmail.com>2019-11-10 22:39:55 +0100
commit7c8450abac77a2e41f1068fb11d19c1c0c93783f (patch)
treecf9257e7ea5888f6414726602fd952635c3c7f7a /include
parentec7374ff84c71edfbb30d6e4dc5b486b6df7107f (diff)
Added Orientation argument to LOKIT renderFont
method for rendering watermarks with angle Change-Id: Id422ed62e4f78390661e4e1efa45101af9ecfc23 Reviewed-on: https://gerrit.libreoffice.org/81435 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h8
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx8
2 files changed, 14 insertions, 2 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 29d834969ad6..78f2b478e861 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -419,6 +419,14 @@ struct _LibreOfficeKitDocumentClass
unsigned nLOKWindowId,
const char* pArguments);
+ /// @see lok::Document::renderFontOrientation().
+ unsigned char* (*renderFontOrientation) (LibreOfficeKitDocument* pThis,
+ const char* pFontName,
+ const char* pChar,
+ int* pFontWidth,
+ int* pFontHeight,
+ int pOrientation);
+
#endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
};
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 6879a24436ca..18a20c7a2e2d 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -556,9 +556,13 @@ public:
unsigned char* renderFont(const char *pFontName,
const char *pChar,
int *pFontWidth,
- int *pFontHeight)
+ int *pFontHeight,
+ int pOrientation=0)
{
- return mpDoc->pClass->renderFont(mpDoc, pFontName, pChar, pFontWidth, pFontHeight);
+ if (LIBREOFFICEKIT_DOCUMENT_HAS(mpDoc, renderFontOrientation))
+ return mpDoc->pClass->renderFontOrientation(mpDoc, pFontName, pChar, pFontWidth, pFontHeight, pOrientation);
+ else
+ return mpDoc->pClass->renderFont(mpDoc, pFontName, pChar, pFontWidth, pFontHeight);
}
/**