summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/source/lib/init.cxx7
-rw-r--r--desktop/source/lib/lokandroid.cxx4
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h1
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx3
-rw-r--r--include/vcl/svpforlokit.hxx1
-rw-r--r--ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m2
-rw-r--r--libreofficekit/qa/lokdocview_quad/lokdocview_quad.c10
-rw-r--r--libreofficekit/qa/tilebench/tilebench.cxx9
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx3
-rw-r--r--vcl/headless/svpvd.cxx8
10 files changed, 5 insertions, 43 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c29223b73baf..d0ae29b15498 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -185,7 +185,6 @@ static void doc_setPartMode(LibreOfficeKitDocument* pThis, int nPartMode);
void doc_paintTile(LibreOfficeKitDocument* pThis,
unsigned char* pBuffer,
const int nCanvasWidth, const int nCanvasHeight,
- int* pRowStride,
const int nTilePosX, const int nTilePosY,
const int nTileWidth, const int nTileHeight);
static void doc_getDocumentSize(LibreOfficeKitDocument* pThis,
@@ -585,7 +584,6 @@ static void doc_setPartMode(LibreOfficeKitDocument* pThis,
void doc_paintTile (LibreOfficeKitDocument* pThis,
unsigned char* pBuffer,
const int nCanvasWidth, const int nCanvasHeight,
- int* pRowStride,
const int nTilePosX, const int nTilePosY,
const int nTileWidth, const int nTileHeight)
{
@@ -615,8 +613,6 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
pDoc->paintTile(aDevice, nCanvasWidth, nCanvasHeight,
nTilePosX, nTilePosY, nTileWidth, nTileHeight);
-
- *pRowStride = GetRowStrideForLibreOfficeKit(aDevice.getSalVirtualDevice());
#else
SystemGraphicsData aData;
aData.rCGContext = reinterpret_cast<CGContextRef>(pBuffer);
@@ -625,8 +621,6 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
pDoc->paintTile(aDevice, nCanvasWidth, nCanvasHeight,
nTilePosX, nTilePosY, nTileWidth, nTileHeight);
-
- (void) pRowStride;
#endif
static bool bDebug = getenv("LOK_DEBUG") != 0;
@@ -646,7 +640,6 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
(void) pBuffer;
(void) nCanvasWidth;
(void) nCanvasHeight;
- (void) pRowStride;
(void) nTilePosX;
(void) nTilePosY;
(void) nTileWidth;
diff --git a/desktop/source/lib/lokandroid.cxx b/desktop/source/lib/lokandroid.cxx
index c23fd3f0cbd3..5f7eab4d2fb7 100644
--- a/desktop/source/lib/lokandroid.cxx
+++ b/desktop/source/lib/lokandroid.cxx
@@ -220,9 +220,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_paintTi
LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
unsigned char* buffer = (unsigned char*) pEnv->GetDirectBufferAddress(aByteBuffer);
- int nStride = 0;
- pDocument->pClass->paintTile(pDocument, buffer, nCanvasWidth, nCanvasHeight, &nStride, nTilePosX, nTilePosY, nTileWidth, nTileHeight);
- (void) nStride;
+ pDocument->pClass->paintTile(pDocument, buffer, nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight);
}
extern "C" SAL_JNI_EXPORT jlong JNICALL Java_org_libreoffice_kit_Document_getDocumentHeight
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 85f760c1df5c..98aa24de469c 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -97,7 +97,6 @@ struct _LibreOfficeKitDocumentClass
unsigned char* pBuffer,
const int nCanvasWidth,
const int nCanvasHeight,
- int* pRowStride,
const int nTilePosX,
const int nTilePosY,
const int nTileWidth,
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 1d7d7096c149..25d8980faa1a 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -73,13 +73,12 @@ public:
unsigned char* pBuffer,
const int nCanvasWidth,
const int nCanvasHeight,
- int* pRowStride,
const int nTilePosX,
const int nTilePosY,
const int nTileWidth,
const int nTileHeight)
{
- return mpDoc->pClass->paintTile(mpDoc, pBuffer, nCanvasWidth, nCanvasHeight, pRowStride,
+ return mpDoc->pClass->paintTile(mpDoc, pBuffer, nCanvasWidth, nCanvasHeight,
nTilePosX, nTilePosY, nTileWidth, nTileHeight);
}
diff --git a/include/vcl/svpforlokit.hxx b/include/vcl/svpforlokit.hxx
index 51299eea21d6..0b8477afe2f2 100644
--- a/include/vcl/svpforlokit.hxx
+++ b/include/vcl/svpforlokit.hxx
@@ -18,7 +18,6 @@
class SalFrame;
VCL_DLLPUBLIC void InitSvpForLibreOfficeKit();
-VCL_DLLPUBLIC int GetRowStrideForLibreOfficeKit(SalVirtualDevice* pVD);
VCL_DLLPUBLIC SalFrame* GetSvpFocusFrameForLibreOfficeKit();
VCL_DLLPUBLIC vcl::Window* GetSalFrameWindowForLibreOfficeKit(SalFrame *pSF);
diff --git a/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m b/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m
index 4092379400ad..75a14e7c0ff7 100644
--- a/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m
+++ b/ios/experimental/TiledLibreOffice/TiledLibreOffice/TiledView.m
@@ -176,10 +176,8 @@ extern const char *ptyl_test_encryption_pathname;
if (!getenv("DRAW_ONLY_TILE") || tileMatches(getenv("DRAW_ONLY_TILE"), bb)) {
fprintf(stderr, "+++ rendering to context %p\n", ctx);
- int rowStride;
loDocument->pClass->paintTile(loDocument, (unsigned char *)ctx,
tileSize.width, tileSize.height,
- &rowStride,
bb.origin.x/self.scale, bb.origin.y/self.scale,
bb.size.width/self.scale, bb.size.height/self.scale);
} else {
diff --git a/libreofficekit/qa/lokdocview_quad/lokdocview_quad.c b/libreofficekit/qa/lokdocview_quad/lokdocview_quad.c
index c920f1ff2312..9024006475a4 100644
--- a/libreofficekit/qa/lokdocview_quad/lokdocview_quad.c
+++ b/libreofficekit/qa/lokdocview_quad/lokdocview_quad.c
@@ -109,7 +109,6 @@ void renderDocument( LOKDocViewQuad* pDocView )
{
long nWidth, nHeight;
int nRenderWidth, nRenderHeight;
- int nRowStride;
int x, y;
GdkPixbuf* pTempBuf;
@@ -145,7 +144,6 @@ void renderDocument( LOKDocViewQuad* pDocView )
pDocView->pDocument->pClass->paintTile( pDocView->pDocument,
gdk_pixbuf_get_pixels( pDocView->pPixBuf[0][0] ),
nRenderWidth / 2, nRenderHeight / 2,
- &nRowStride,
0, 0, // origin
nWidth / 2, nHeight / 2 );
@@ -155,7 +153,6 @@ void renderDocument( LOKDocViewQuad* pDocView )
pDocView->pDocument->pClass->paintTile( pDocView->pDocument,
gdk_pixbuf_get_pixels( pDocView->pPixBuf[1][0] ),
nRenderWidth, nRenderHeight,
- &nRowStride,
nWidth / 2, 0,
nWidth / 2, nHeight / 2 );
pTempBuf = gdk_pixbuf_scale_simple( GDK_PIXBUF( pDocView->pPixBuf[1][0] ),
@@ -172,7 +169,6 @@ void renderDocument( LOKDocViewQuad* pDocView )
pDocView->pDocument->pClass->paintTile( pDocView->pDocument,
gdk_pixbuf_get_pixels( pDocView->pPixBuf[0][1] ),
nRenderWidth / 4, nRenderHeight / 4,
- &nRowStride,
0, nHeight / 2,
nWidth / 2, nHeight / 2 );
pTempBuf = gdk_pixbuf_scale_simple( GDK_PIXBUF( pDocView->pPixBuf[0][1] ),
@@ -188,7 +184,6 @@ void renderDocument( LOKDocViewQuad* pDocView )
pDocView->pDocument->pClass->paintTile( pDocView->pDocument,
gdk_pixbuf_get_pixels( pDocView->pPixBuf[1][1] ),
nRenderWidth / 8, nRenderHeight / 8,
- &nRowStride,
nWidth / 2, nHeight / 2,
nWidth / 2, nHeight / 2 );
pTempBuf = gdk_pixbuf_scale_simple( GDK_PIXBUF( pDocView->pPixBuf[1][1] ),
@@ -200,11 +195,6 @@ void renderDocument( LOKDocViewQuad* pDocView )
- // TODO: double check that the rowstride really matches what we expected,
- // although presumably we'd already be crashing by now if things were
- // wrong.
- (void) nRowStride;
-
// gtk_image_set_from_pixbuf( GTK_IMAGE( pDocView->pCanvas ), pDocView->pPixBuf );
for ( x = 0; x < 2; x++ )
{
diff --git a/libreofficekit/qa/tilebench/tilebench.cxx b/libreofficekit/qa/tilebench/tilebench.cxx
index 013f8667ac7d..e72c730a6dfe 100644
--- a/libreofficekit/qa/tilebench/tilebench.cxx
+++ b/libreofficekit/qa/tilebench/tilebench.cxx
@@ -98,8 +98,7 @@ int main( int argc, char* argv[] )
{ // whole document
aTimes.push_back(TimeRecord("render whole document"));
- int nRowStride = 256;
- pDocument->paintTile(pPixels, 256, 256, &nRowStride,
+ pDocument->paintTile(pPixels, 256, 256,
0, 0, nWidth, nHeight); // not square
aTimes.push_back(TimeRecord());
}
@@ -112,10 +111,9 @@ int main( int argc, char* argv[] )
{
for (int nY = 0; nY < nHeight / nSplit; nY++)
{
- int nRowStride = 256;
int nTilePosX = nX * nSplit;
int nTilePosY = nY * nSplit;
- pDocument->paintTile(pPixels, 256, 256, &nRowStride,
+ pDocument->paintTile(pPixels, 256, 256,
nTilePosX, nTilePosY, 256, 256);
nTiles++;
fprintf (stderr, " rendered tile %d at %d, %d\n",
@@ -133,10 +131,9 @@ int main( int argc, char* argv[] )
{
for (int nY = 0; nY < nHeight / nSplit; nY++)
{
- int nRowStride = 256;
int nTilePosX = nX * nSplit;
int nTilePosY = nY * nSplit;
- pDocument->paintTile(pPixels, 256, 256, &nRowStride,
+ pDocument->paintTile(pPixels, 256, 256,
nTilePosX, nTilePosY, nSplit, nSplit);
nTiles++;
fprintf (stderr, " rendered tile %d at %d, %d\n",
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 668d6dec77d9..b2597d24c23e 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -697,17 +697,14 @@ void renderDocument(LOKDocView* pDocView, GdkRectangle* pPartial)
GdkPixbuf* pPixBuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, aTileRectanglePixels.width, aTileRectanglePixels.height);
unsigned char* pBuffer = gdk_pixbuf_get_pixels(pPixBuf);
g_info("renderDocument: paintTile(%d, %d)", nRow, nColumn);
- int nRowStride;
pDocView->pDocument->pClass->paintTile(pDocView->pDocument,
// Buffer and its size, depends on the position only.
pBuffer,
aTileRectanglePixels.width, aTileRectanglePixels.height,
- &nRowStride,
// Position of the tile.
aTileRectangleTwips.x, aTileRectangleTwips.y,
// Size of the tile, depends on the zoom factor and the tile position only.
aTileRectangleTwips.width, aTileRectangleTwips.height);
- (void) nRowStride;
if (pDocView->pCanvas[nTile])
gtk_widget_destroy(GTK_WIDGET(pDocView->pCanvas[nTile]));
diff --git a/vcl/headless/svpvd.cxx b/vcl/headless/svpvd.cxx
index 0daf4cdc0cfb..f720d18f613c 100644
--- a/vcl/headless/svpvd.cxx
+++ b/vcl/headless/svpvd.cxx
@@ -104,14 +104,6 @@ void InitSvpForLibreOfficeKit()
pSalInstance->setBitCountFormatMapping( 32, ::basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA );
}
-int GetRowStrideForLibreOfficeKit(SalVirtualDevice* pVD)
-{
- SvpSalVirtualDevice* pSalDev = static_cast< SvpSalVirtualDevice* >(pVD);
- basebmp::BitmapDeviceSharedPtr pBmpDev = pSalDev->getBitmapDevice();
-
- return pBmpDev->getScanlineStride();
-}
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */