vcl/inc/fontselect.hxx |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit 2c704832567d0948595ebe1b239314890a01da4e
Author:     Jan-Marek Glogowski <[email protected]>
AuthorDate: Thu Sep 6 14:09:47 2018 +0200
Commit:     Jan-Marek Glogowski <[email protected]>
CommitDate: Thu Sep 6 18:45:28 2018 +0200

    Pretty print FontSelectPattern
    
    Change-Id: Ia43dbfd6313935bec90ac88018011eacca0c0eaf
    Reviewed-on: https://gerrit.libreoffice.org/60090
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <[email protected]>

diff --git a/vcl/inc/fontselect.hxx b/vcl/inc/fontselect.hxx
index 220bb32d9861..9707ba4e5fa9 100644
--- a/vcl/inc/fontselect.hxx
+++ b/vcl/inc/fontselect.hxx
@@ -25,6 +25,7 @@
 
 #include "fontattributes.hxx"
 
+#include <ostream>
 #include <unordered_map>
 
 namespace vcl { class Font; }
@@ -68,6 +69,16 @@ public:
     ItalicMatrix    maItalicMatrix;             // Force matrix for slant
 };
 
+template< typename charT, typename traits >
+inline std::basic_ostream<charT, traits> & operator <<(
+    std::basic_ostream<charT, traits> & stream, const FontSelectPattern & rFSP)
+{
+    stream << (rFSP.maTargetName.isEmpty() ? "<default>" : rFSP.maTargetName)
+           << " (" << rFSP.maSearchName << ") w: " << rFSP.mnWidth << " h: "
+           << rFSP.mnHeight << " alias: " << rFSP.mbNonAntialiased;
+    return stream;
+}
+
 #endif // INCLUDED_VCL_INC_FONTSELECT_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to