Kaydet (Commit) 2a081a0f authored tarafından Miklos Vajna's avatar Miklos Vajna

Rectangle::toString(): output position, then size

This order seems to be less confusing.

Change-Id: I95a7e3e2f6244915c820bb86e67745a777714e2d
üst 89254242
......@@ -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();
......
......@@ -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:
......
......@@ -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;
}
......
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment