summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-09-23 13:42:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-09-23 16:04:00 +0200
commit8bb3c1143755930a02c3ebeb3425ace94884374a (patch)
tree061a8f3ca9b5d191c2276ddb5669b320bcdeaddf
parent830e539547c463b932ce643517f880789185032d (diff)
Improve SwRect (debug) printing
e.g. SwVisibleCursor::SetPosAndShow in sw/source/core/crsr/viscrs.cxx has legitimate calls to SSize() and Pos() of an SwRect for which IsEmpty() is true, so don't hide those values by just printing "EMPTY" Change-Id: I8240ed1cf8cbd2bca9caf599192250f0292eaeba Reviewed-on: https://gerrit.libreoffice.org/79403 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--sw/inc/swrect.hxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
index 24f87ed58fce..69b1f2ad781a 100644
--- a/sw/inc/swrect.hxx
+++ b/sw/inc/swrect.hxx
@@ -335,10 +335,9 @@ inline std::basic_ostream<charT, traits> & operator <<(
std::basic_ostream<charT, traits> & stream, const SwRect& rectangle )
{
if (rectangle.IsEmpty())
- return stream << "EMPTY";
- else
- return stream << rectangle.SSize()
- << "@(" << rectangle.Pos() << ")";
+ stream << "EMPTY:";
+ return stream << rectangle.SSize()
+ << "@(" << rectangle.Pos() << ")";
}
#endif // INCLUDED_SW_INC_SWRECT_HXX