diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-16 15:33:25 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-23 09:18:58 +0100 |
commit | 2a081a0f9ba8c73a0eba55020b6c39ee7778f9c9 (patch) | |
tree | fa9b9d1e978c7ed22c58bc48930923c5c058820d | |
parent | 892542426fb69bbb19f0a5cb9338f67074bd3add (diff) |
Rectangle::toString(): output position, then size
This order seems to be less confusing.
Change-Id: I95a7e3e2f6244915c820bb86e67745a777714e2d
-rw-r--r-- | android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java | 8 | ||||
-rw-r--r-- | include/tools/gen.hxx | 1 | ||||
-rw-r--r-- | libreofficekit/source/gtk/lokdocview.cxx | 8 | ||||
-rw-r--r-- | tools/source/generic/gen.cxx | 2 |
4 files changed, 10 insertions, 9 deletions
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java index 22aeda39f613..d94c93a047f2 100644 --- a/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java +++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/InvalidationHandler.java @@ -97,10 +97,10 @@ public class InvalidationHandler implements Document.MessageCallback { return null; } - int width = Integer.decode(coordinates[0]); - int height = Integer.decode(coordinates[1]); - int x = Integer.decode(coordinates[2]); - int y = Integer.decode(coordinates[3]); + int x = Integer.decode(coordinates[0]); + int y = Integer.decode(coordinates[1]); + int width = Integer.decode(coordinates[2]); + int height = Integer.decode(coordinates[3]); float dpi = (float) LOKitShell.getDpi(); diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx index b17cb196dd87..c5d898b91296 100644 --- a/include/tools/gen.hxx +++ b/include/tools/gen.hxx @@ -440,6 +440,7 @@ public: void setY( long n ) { nBottom += n-nTop; nTop = n; } void setWidth( long n ) { nRight = nLeft + n; } void setHeight( long n ) { nBottom = nTop + n; } + /// Returns the string representation of the rectangle, format is "x, y, width, height". rtl::OString toString() const; private: diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index b2597d24c23e..af5db19d76c7 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -740,19 +740,19 @@ static GdkRectangle lcl_payloadToRectangle(const char* pPayload) gchar** ppCoordinate = ppCoordinates; if (!*ppCoordinate) return aRet; - aRet.width = atoi(*ppCoordinate); + aRet.x = atoi(*ppCoordinate); ++ppCoordinate; if (!*ppCoordinate) return aRet; - aRet.height = atoi(*ppCoordinate); + aRet.y = atoi(*ppCoordinate); ++ppCoordinate; if (!*ppCoordinate) return aRet; - aRet.x = atoi(*ppCoordinate); + aRet.width = atoi(*ppCoordinate); ++ppCoordinate; if (!*ppCoordinate) return aRet; - aRet.y = atoi(*ppCoordinate); + aRet.height = atoi(*ppCoordinate); g_strfreev(ppCoordinates); return aRet; } diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx index e2a61c5f56a8..925d4d61e866 100644 --- a/tools/source/generic/gen.cxx +++ b/tools/source/generic/gen.cxx @@ -198,7 +198,7 @@ SvStream& WriteRectangle( SvStream& rOStream, const Rectangle& rRect ) OString Rectangle::toString() const { std::stringstream ss; - ss << getWidth() << ", " << getHeight() << ", " << getX() << ", " << getY(); + ss << getX() << ", " << getY() << ", " << getWidth() << ", " << getHeight(); return ss.str().c_str(); } |