[Libreoffice-commits] online.git: 2 commits - loolwsd/LOKitClient.cpp
Tor Lillqvist
tml at collabora.com
Sat May 23 04:02:37 PDT 2015
loolwsd/LOKitClient.cpp | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
New commits:
commit c97b4d49945cf0347f22e4931c37e2ca52a51d9d
Author: Tor Lillqvist <tml at collabora.com>
Date: Sat May 23 12:02:05 2015 +0100
Mention the 'help' command, too
diff --git a/loolwsd/LOKitClient.cpp b/loolwsd/LOKitClient.cpp
index 34ab393..7ca4dd7 100644
--- a/loolwsd/LOKitClient.cpp
+++ b/loolwsd/LOKitClient.cpp
@@ -69,7 +69,7 @@ protected:
if (isatty(0))
{
- std::cout << "Enter LOKit \"commands\", one per line. Enter EOF to finish." << std::endl;
+ std::cout << "Enter LOKit \"commands\", one per line. 'help' for help. EOF to finish." << std::endl;
}
while (!std::cin.eof())
commit 54d1ee6d427a44db98fa82fa7749459638881301
Author: Tor Lillqvist <tml at collabora.com>
Date: Sat May 23 12:01:24 2015 +0100
Take the part number too in the 'tile' command and switch to it
diff --git a/loolwsd/LOKitClient.cpp b/loolwsd/LOKitClient.cpp
index bdfacce..34ab393 100644
--- a/loolwsd/LOKitClient.cpp
+++ b/loolwsd/LOKitClient.cpp
@@ -88,7 +88,7 @@ protected:
"Commands mimic LOOL protocol but we talk directly to LOKit:" << std::endl <<
" status" << std::endl <<
" calls LibreOfficeKitDocument::getDocumentType, getParts, getPartName, getDocumentSize" << std::endl <<
- " tile pixelwidth pixelheight docposx docposy doctilewidth doctileheight" << std::endl <<
+ " tile part pixelwidth pixelheight docposx docposy doctilewidth doctileheight" << std::endl <<
" calls LibreOfficeKitDocument::paintTile" << std::endl;
}
else if (tokens[0] == "status")
@@ -106,20 +106,22 @@ protected:
}
else if (tokens[0] == "tile")
{
- if (tokens.count() != 7)
+ if (tokens.count() != 8)
{
std::cout << "? syntax" << std::endl;
continue;
}
- int canvasWidth(std::stoi(tokens[1]));
- int canvasHeight(std::stoi(tokens[2]));
- int tilePosX(std::stoi(tokens[3]));
- int tilePosY(std::stoi(tokens[4]));
- int tileWidth(std::stoi(tokens[5]));
- int tileHeight(std::stoi(tokens[6]));
+ int partNumber(std::stoi(tokens[1]));
+ int canvasWidth(std::stoi(tokens[2]));
+ int canvasHeight(std::stoi(tokens[3]));
+ int tilePosX(std::stoi(tokens[4]));
+ int tilePosY(std::stoi(tokens[5]));
+ int tileWidth(std::stoi(tokens[6]));
+ int tileHeight(std::stoi(tokens[7]));
std::vector<unsigned char> pixmap(canvasWidth*canvasHeight*4);
+ loKitDocument->pClass->setPart(loKitDocument, partNumber);
loKitDocument->pClass->paintTile(loKitDocument, pixmap.data(), canvasWidth, canvasHeight, tilePosX, tilePosY, tileWidth, tileHeight);
if (!Util::windowingAvailable())
More information about the Libreoffice-commits
mailing list