summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-22 16:39:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-04 06:38:03 +0000
commit5676ced82539d9e40bde6196d2aa3b2e4c7b3fdb (patch)
treedb860b2365f8cb0e2fab4772e80e4e38d4d89b37 /sw
parent1a1d1a86e9129ec3885610b641179b30f9bf5e79 (diff)
make UNO enums scoped for internal LO code
this modifies codemaker so that, for an UNO enum, we generate code that effectively looks like: #ifdef LIBO_INTERNAL_ONLY && HAVE_CX11_CONSTEXPR enum class XXX { ONE = 1 }; constexpr auto ONE = XXX_ONE; #else ...the old normal way.. #endif which means that for LO internal code, the enums are scoped. The "constexpr auto" trick acts like an alias so we don't have to use scoped naming everywhere. Change-Id: I3054ecb230e8666ce98b4a9cb87b384df5f64fb4 Reviewed-on: https://gerrit.libreoffice.org/34546 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx70
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx56
2 files changed, 18 insertions, 108 deletions
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 76a82593aafb..9dba6712a039 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -93,14 +93,7 @@ public:
}
};
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace awt
-{
+namespace com { namespace sun { namespace star { namespace awt {
std::ostream& operator<<(std::ostream& rStrm, GradientStyle n)
{
@@ -108,19 +101,9 @@ std::ostream& operator<<(std::ostream& rStrm, GradientStyle n)
return rStrm;
}
-}
-}
-}
-}
+} } } }
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace drawing
-{
+namespace com { namespace sun { namespace star { namespace drawing {
std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
{
@@ -128,19 +111,9 @@ std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
return rStrm;
}
-}
-}
-}
-}
+} } } }
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace style
-{
+namespace com { namespace sun { namespace star { namespace style {
std::ostream& operator<<(std::ostream& rStrm, PageStyleLayout n)
{
@@ -148,19 +121,9 @@ std::ostream& operator<<(std::ostream& rStrm, PageStyleLayout n)
return rStrm;
}
-}
-}
-}
-}
+} } } }
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace text
-{
+namespace com { namespace sun { namespace star { namespace text {
std::ostream& operator<<(std::ostream& rStrm, TextContentAnchorType n)
{
@@ -168,19 +131,9 @@ std::ostream& operator<<(std::ostream& rStrm, TextContentAnchorType n)
return rStrm;
}
-}
-}
-}
-}
+} } } }
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace table
-{
+namespace com { namespace sun { namespace star { namespace table {
std::ostream& operator<<(std::ostream& rStrm, ShadowLocation n)
{
@@ -188,10 +141,7 @@ std::ostream& operator<<(std::ostream& rStrm, ShadowLocation n)
return rStrm;
}
-}
-}
-}
-}
+} } } }
DECLARE_RTFEXPORT_TEST(testZoom, "zoom.rtf")
{
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 28c96fb690d3..191fc7a2664b 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -63,14 +63,7 @@
#include <bordertest.hxx>
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace beans
-{
+namespace com { namespace sun { namespace star { namespace beans {
std::ostream& operator<<(std::ostream& rStrm, PropertyState n)
{
@@ -78,18 +71,8 @@ std::ostream& operator<<(std::ostream& rStrm, PropertyState n)
return rStrm;
}
-}
-}
-}
-}
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace style
-{
+} } } }
+namespace com { namespace sun { namespace star { namespace style {
std::ostream& operator<<(std::ostream& rStrm, BreakType n)
{
@@ -107,18 +90,8 @@ std::ostream& operator<<(std::ostream& rStrm, ParagraphAdjust n)
return rStrm;
}
-}
-}
-}
-}
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace drawing
-{
+} } } }
+namespace com { namespace sun { namespace star { namespace drawing {
std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
{
@@ -126,18 +99,8 @@ std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
return rStrm;
}
-}
-}
-}
-}
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace text
-{
+} } } }
+namespace com { namespace sun { namespace star { namespace text {
std::ostream& operator<<(std::ostream& rStrm, TextContentAnchorType n)
{
@@ -150,10 +113,7 @@ std::ostream& operator<<(std::ostream& rStrm, WrapTextMode n)
return rStrm;
}
-}
-}
-}
-}
+} } } }
class Test : public SwModelTestBase
{