/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef __com_sun_star_awt_XImageConsumer_idl__ #define __com_sun_star_awt_XImageConsumer_idl__ #include module com { module sun { module star { module awt { published interface XImageProducer; /** specifies a data sink for an image.

An image consumer is a component which wants to display or just receive an image from an image producer.

@see XImageProducer */ published interface XImageConsumer: com::sun::star::uno::XInterface { /** initializes the consumer with image dimensions. */ void init( [in] long Width, [in] long Height ); /** changes color model for next pixels typically called once after initialization. */ void setColorModel( [in] short BitCount, [in] sequence RGBAPal, [in] long RedMask, [in] long GreenMask, [in] long BlueMask, [in] long AlphaMask ); /** delivers a chunk of pixels as long values.

The pixels of the image are delivered using one or more calls to this method. Each call specifies the location and size of the rectangle of source pixels that are contained in the array of pixels. The specified color model object should be used to convert the pixels into their corresponding color and alpha components. Pixel (m,n) is stored in the pixels array at index (n * nScanSize + m + nOffset).

*/ void setPixelsByBytes( [in] long nX, [in] long nY, [in] long nWidth, [in] long nHeight, [in] sequence aProducerData, [in] long nOffset, [in] long nScanSize ); /** delivers a chunk of pixels as byte values.

The pixels of the image are delivered using one or more calls to this method. Each call specifies the location and size of the rectangle of source pixels that are contained in the array of pixels. The specified color model object should be used to convert the pixels into their corresponding color and alpha components. Pixel (m,n) is stored in the pixels array at index (n * nScanSize + m + nOffset).

*/ void setPixelsByLongs( [in] long nX, [in] long nY, [in] long nWidth, [in] long nHeight, [in] sequence aProducerData, [in] long nOffset, [in] long nScanSize ); /** is called for the notification of the degree to which the image is delivered.

The complete method is called when the image producer has finished delivering all of the pixels that the source image contains, or when a single frame of a multi-frame animation has been completed, or when an error in loading or producing the image has occurred. The image consumer should remove itself from the list of consumers registered with the image producer at this time, unless it is interested in successive frames.

*/ void complete( [in] long Status, [in] XImageProducer xProducer ); }; }; }; }; }; #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ abora/libreoffice-7-6+backports'>distro/collabora/libreoffice-7-6+backports LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-07-28 01:16:00 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-07-28 01:14:42 +0200
commit233af54afb6e493c3538efe7c93d0f53f1b4c3ab (patch)
treef31908c2b29995e6ea7f0d51edb4877a2773ae54 /basic/qa/basic_coverage/test_getsolarversion_method.bas
parent5373679b695e5bd4f68fe4554234dd9facc3e54f (diff)
tdf#162219: pass correct DecimalDigits value to SQLBindParameter HEADmaster
... when setting DECIMAL / NUMERIC. Passing 'scale' from setObjectWithInfo to SQLBindParameter was wrong anyway: in setObjectWithInfo, the scale is needed if it converts the object 'x' to the requested format before sending to the database. In this case, it mismatched with the actual count of decimals in the string sent to ODBC: it could be "1" or "1.2"; but 'scale' is always equal to the scale of the parameter in the database (4 in the bugdoc), which resulted in the error returned by driver. Note that there is code that truncates excessive decimals - it is in OKeySet::impl_convertValue_throw, implemented for i#106772; it would be best to remove that code, and let the database do its magic: e.g., passing a string like "1.99999" to a DECIMAL(19,4) field in MS SQL Server would round it to 2, while our code truncates it to 1.9999. The ODBC driver can handle more digits itself. But that isn't in the scope here, and may need to tweak other database connectors. Change-Id: Ib50c6d78bfd0cbf5ecd59f46f300107076ec0037 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171127 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>