[Libreoffice-commits] core.git: sw/inc sw/qa sw/source

Noel Grandin noel.grandin at collabora.co.uk
Mon Apr 3 06:25:17 UTC 2017


 sw/inc/fmtruby.hxx                           |   15 ++---
 sw/inc/unosett.hxx                           |    5 +
 sw/qa/extras/htmlimport/htmlimport.cxx       |   15 +++++
 sw/qa/extras/mailmerge/mailmerge.cxx         |   10 +++
 sw/qa/extras/odfexport/odfexport.cxx         |   40 ++++++++++++++
 sw/qa/extras/odfimport/odfimport.cxx         |   24 ++++++++
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx     |   30 ++++++++++
 sw/qa/extras/ooxmlexport/ooxmlexport2.cxx    |   65 +++++++++++++++++++++++
 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx    |   31 +++++++++++
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx    |   10 +++
 sw/qa/extras/ooxmlexport/ooxmlexport6.cxx    |   30 ++++++++++
 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx    |   10 +++
 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx    |   75 +++++++++++++++++++++++++++
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx     |   26 +++++++++
 sw/qa/extras/rtfexport/rtfexport.cxx         |   50 ++++++++++++++++++
 sw/qa/extras/rtfimport/rtfimport.cxx         |   52 ++++++++++++++++++
 sw/qa/extras/ww8export/ww8export.cxx         |   30 ++++++++++
 sw/source/core/fields/docufld.cxx            |    2 
 sw/source/core/layout/atrfrm.cxx             |   14 ++---
 sw/source/core/text/porlay.cxx               |    8 +-
 sw/source/core/text/pormulti.cxx             |   16 ++---
 sw/source/core/text/pormulti.hxx             |    7 +-
 sw/source/core/txtnode/fmtatr2.cxx           |    6 +-
 sw/source/core/unocore/unodraw.cxx           |    2 
 sw/source/core/unocore/unoobj.cxx            |    2 
 sw/source/core/unocore/unoport.cxx           |    2 
 sw/source/core/unocore/unosett.cxx           |    4 -
 sw/source/core/unocore/unostyle.cxx          |    4 -
 sw/source/filter/html/htmlform.cxx           |    4 -
 sw/source/filter/ww8/docxattributeoutput.cxx |   10 +--
 sw/source/filter/ww8/rtfattributeoutput.cxx  |   10 +--
 sw/source/filter/ww8/wrtw8nds.cxx            |   10 +--
 sw/source/filter/ww8/ww8par3.cxx             |   13 +---
 sw/source/filter/ww8/ww8par5.cxx             |   13 ++--
 sw/source/ui/vba/vbaparagraphformat.cxx      |    6 +-
 sw/source/ui/vba/vbaparagraphformat.hxx      |    5 +
 sw/source/uibase/uno/unotxvw.cxx             |    2 
 37 files changed, 579 insertions(+), 79 deletions(-)

New commits:
commit 4809096a1f60d9ef57a494ba6ae8fb8541361572
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Mar 31 13:49:52 2017 +0200

    use actual UNO enums in sw
    
    Change-Id: If0f4a6532cc255f632d88d97e6b1a9e57462f5fc
    Reviewed-on: https://gerrit.libreoffice.org/35969
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx
index dcf5575ce873..646a26f7df43 100644
--- a/sw/inc/fmtruby.hxx
+++ b/sw/inc/fmtruby.hxx
@@ -20,6 +20,7 @@
 #define INCLUDED_SW_INC_FMTRUBY_HXX
 
 #include <svl/poolitem.hxx>
+#include <com/sun/star/text/RubyAdjust.hpp>
 
 class SwTextRuby;
 
@@ -27,12 +28,12 @@ class SW_DLLPUBLIC SwFormatRuby : public SfxPoolItem
 {
     friend class SwTextRuby;
 
-    OUString sRubyText;                      ///< The ruby txt.
-    OUString sCharFormatName;                  ///< Name of the charformat.
-    SwTextRuby* pTextAttr;                    ///< The TextAttribute.
-    sal_uInt16 nCharFormatId;                  ///< PoolId of the charformat.
+    OUString sRubyText;                     ///< The ruby txt.
+    OUString sCharFormatName;               ///< Name of the charformat.
+    SwTextRuby* pTextAttr;                  ///< The TextAttribute.
+    sal_uInt16 nCharFormatId;               ///< PoolId of the charformat.
     sal_uInt16 nPosition;                   ///< Position of the Ruby-character.
-    sal_uInt16 nAdjustment;                 ///< Specific adjustment of the Ruby-ch.
+    css::text::RubyAdjust nAdjustment;      ///< Specific adjustment of the Ruby-ch.
 
 public:
     SwFormatRuby( const OUString& rRubyText );
@@ -68,8 +69,8 @@ public:
     sal_uInt16 GetPosition() const                  { return nPosition; }
     void SetPosition( sal_uInt16 nNew )             { nPosition = nNew; }
 
-    sal_uInt16 GetAdjustment() const                { return nAdjustment; }
-    void SetAdjustment( sal_uInt16 nNew )           { nAdjustment = nNew; }
+    css::text::RubyAdjust GetAdjustment() const       { return nAdjustment; }
+    void SetAdjustment( css::text::RubyAdjust nNew )  { nAdjustment = nNew; }
 };
 
 #endif
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
index 0c2e9c796e95..96668f3680c0 100644
--- a/sw/inc/unosett.hxx
+++ b/sw/inc/unosett.hxx
@@ -28,6 +28,7 @@
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/style/VerticalAlignment.hpp>
 #include <cppuhelper/implbase2.hxx>
 #include <cppuhelper/implbase4.hxx>
 #include <cppuhelper/implbase5.hxx>
@@ -257,7 +258,7 @@ class SwXTextColumns : public cppu::WeakAggImplHelper4
     sal_Int32                   nSepLineWidth;
     sal_Int32                   nSepLineColor;
     sal_Int8                    nSepLineHeightRelative;
-    sal_Int8                    nSepLineVertAlign;//style::VerticalAlignment
+    css::style::VerticalAlignment nSepLineVertAlign;
     bool                        bSepLineIsOn;
     sal_Int8                    nSepLineStyle;
 
@@ -296,7 +297,7 @@ public:
     sal_Int32   GetSepLineWidth() const {return nSepLineWidth;}
     sal_Int32   GetSepLineColor() const {return     nSepLineColor;}
     sal_Int8    GetSepLineHeightRelative() const {return    nSepLineHeightRelative;}
-    sal_Int8    GetSepLineVertAlign() const {return     nSepLineVertAlign;}
+    css::style::VerticalAlignment GetSepLineVertAlign() const {return nSepLineVertAlign;}
     bool        GetSepLineIsOn() const {return  bSepLineIsOn;}
     sal_Int8    GetSepLineStyle() const {return nSepLineStyle;}
 
diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx
index b04f7c927b70..ff2a7af94dfe 100644
--- a/sw/qa/extras/htmlimport/htmlimport.cxx
+++ b/sw/qa/extras/htmlimport/htmlimport.cxx
@@ -26,6 +26,21 @@ class HtmlImportTest : public SwModelTestBase
         HtmlImportTest() : SwModelTestBase("sw/qa/extras/htmlimport/data/", "HTML (StarWriter)") {}
 };
 
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, BitmapMode n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 #define DECLARE_HTMLIMPORT_TEST(TestName, filename) DECLARE_SW_IMPORT_TEST(TestName, filename, nullptr, HtmlImportTest)
 
 DECLARE_HTMLIMPORT_TEST(testPictureImport, "picture.html")
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx
index a8f55d9cafdf..cb8e4de67481 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -42,6 +42,16 @@
 typedef std::map<OUString, OUString> DBuriMap;
 static DBuriMap aDBuriMap;
 
+namespace com { namespace sun { namespace star { namespace text {
+
+std::ostream& operator<<(std::ostream& rStrm, TextContentAnchorType n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 class MMTest : public SwModelTestBase
 {
 public:
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index dddaa4b5e801..41d7abbbfd03 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -97,6 +97,46 @@ public:
     }
 };
 
+namespace com { namespace sun { namespace star { namespace awt {
+
+std::ostream& operator<<(std::ostream& rStrm, FontSlant n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, GradientStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, TextVerticalAdjust n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace table {
+
+std::ostream& operator<<(std::ostream& rStrm, ShadowLocation n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 DECLARE_ODFEXPORT_TEST(testMathObjectFlatExport, "2_MathType3.docx")
 {
     uno::Reference<util::XModifiable> xModifiable(mxComponent, uno::UNO_QUERY);
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 9572e7f4dba4..9015dd805e6d 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -32,6 +32,30 @@
 typedef std::map<OUString, css::uno::Sequence< css::table::BorderLine> > AllBordersMap;
 typedef std::pair<OUString, css::uno::Sequence< css::table::BorderLine> > StringSequencePair;
 
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, BitmapMode n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+namespace com { namespace sun { namespace star { namespace style {
+
+std::ostream& operator<<(std::ostream& rStrm, PageStyleLayout n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 class Test : public SwModelTestBase
 {
     public:
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 7c488f719d0d..480a091de014 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -80,6 +80,36 @@ protected:
     }
 };
 
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace style {
+
+std::ostream& operator<<(std::ostream& rStrm, BreakType n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace awt {
+
+std::ostream& operator<<(std::ostream& rStrm, FontSlant n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 DECLARE_OOXMLEXPORT_TEST(testfdo81381, "fdo81381.docx")
 {
     if (xmlDocPtr pXmlDoc = parseExport("word/document.xml"))
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
index a0bd7e490320..568ce9114ac9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
@@ -92,6 +92,71 @@ protected:
     }
 };
 
+namespace com { namespace sun { namespace star { namespace style {
+
+std::ostream& operator<<(std::ostream& rStrm, ParagraphAdjust n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace text {
+
+std::ostream& operator<<(std::ostream& rStrm, WrapTextMode n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, LineStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace awt {
+
+std::ostream& operator<<(std::ostream& rStrm, GradientStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace table {
+
+std::ostream& operator<<(std::ostream& rStrm, ShadowLocation n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace style {
+
+std::ostream& operator<<(std::ostream& rStrm, TabAlign n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 DECLARE_OOXMLEXPORT_TEST(testPageGraphicBackground, "page-graphic-background.odt")
 {
     // No idea how the graphic background should be exported (seems there is no
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 4614e3fb2780..7f36628e2164 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -76,6 +76,37 @@ protected:
     }
 };
 
+namespace com { namespace sun { namespace star { namespace style {
+
+std::ostream& operator<<(std::ostream& rStrm, BreakType n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+
+namespace com { namespace sun { namespace star { namespace table {
+
+std::ostream& operator<<(std::ostream& rStrm, ShadowLocation n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 DECLARE_OOXMLEXPORT_TEST(testFdo68418, "fdo68418.docx")
 {
     // The problem was that in 'MSWordExportBase::SectionProperties' function in 'wrt8sty.cxx'
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 1d94e25938aa..2b369fa9c6c7 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -73,6 +73,16 @@ protected:
     }
 };
 
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 DECLARE_OOXMLEXPORT_TEST(testRelorientation, "relorientation.docx")
 {
     uno::Reference<drawing::XShape> xShape = getShape(1);
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index 80f28f09875a..a1839fcfc9e4 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -41,6 +41,36 @@ protected:
     }
 };
 
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, LineJoint n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, LineStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, HatchStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, TextVerticalAdjust n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 DECLARE_OOXMLEXPORT_TEST(testDmlShapeTitle, "dml-shape-title.docx")
 {
     CPPUNIT_ASSERT_EQUAL(OUString("Title"), getProperty<OUString>(getShape(1), "Title"));
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index b538e9f990da..0f8480f3c6d5 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -41,6 +41,16 @@ protected:
     }
 };
 
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, TextVerticalAdjust n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 DECLARE_OOXMLEXPORT_TEST( testChildNodesOfCubicBezierTo, "FDO74774.docx")
 {
     /* Number of children required by cubicBexTo is 3 of type "pt".
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 706a359fb58e..156f8f4fa696 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -115,6 +115,81 @@ protected:
     }
 };
 
+namespace com { namespace sun { namespace star { namespace beans {
+
+std::ostream& operator<<(std::ostream& rStrm, PropertyState n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace awt {
+
+std::ostream& operator<<(std::ostream& rStrm, FontSlant n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace style {
+
+std::ostream& operator<<(std::ostream& rStrm, ParagraphAdjust n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, TextVerticalAdjust n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace table {
+
+std::ostream& operator<<(std::ostream& rStrm, ShadowLocation n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace text {
+
+std::ostream& operator<<(std::ostream& rStrm, WrapTextMode n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, TextContentAnchorType n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace style {
+
+std::ostream& operator<<(std::ostream& rStrm, BreakType n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 #if !defined(_WIN32)
 
 DECLARE_OOXMLEXPORT_TEST(testN751054, "n751054.docx")
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 208ed6370e7b..c1155bdb69cb 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -81,6 +81,32 @@ public:
     }
 };
 
+namespace com { namespace sun { namespace star { namespace text {
+
+std::ostream& operator<<(std::ostream& rStrm, TextContentAnchorType n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, WrapTextMode n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+
+namespace com { namespace sun { namespace star { namespace style {
+
+std::ostream& operator<<(std::ostream& rStrm, BreakType n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 #if !defined _WIN32
 class FailTest : public Test
 {
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index ff413cf0d1f5..9dba6712a039 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -93,6 +93,56 @@ public:
     }
 };
 
+namespace com { namespace sun { namespace star { namespace awt {
+
+std::ostream& operator<<(std::ostream& rStrm, GradientStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace style {
+
+std::ostream& operator<<(std::ostream& rStrm, PageStyleLayout n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace text {
+
+std::ostream& operator<<(std::ostream& rStrm, TextContentAnchorType n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace table {
+
+std::ostream& operator<<(std::ostream& rStrm, ShadowLocation n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 DECLARE_RTFEXPORT_TEST(testZoom, "zoom.rtf")
 {
     uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index d03d76979498..191fc7a2664b 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -63,6 +63,58 @@
 
 #include <bordertest.hxx>
 
+namespace com { namespace sun { namespace star { namespace beans {
+
+std::ostream& operator<<(std::ostream& rStrm, PropertyState n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+namespace com { namespace sun { namespace star { namespace style {
+
+std::ostream& operator<<(std::ostream& rStrm, BreakType n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, TabAlign n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, ParagraphAdjust n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, FillStyle n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+namespace com { namespace sun { namespace star { namespace text {
+
+std::ostream& operator<<(std::ostream& rStrm, TextContentAnchorType n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+std::ostream& operator<<(std::ostream& rStrm, WrapTextMode n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 class Test : public SwModelTestBase
 {
 public:
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 4e70aa3aff16..55022b806431 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -137,6 +137,36 @@ protected:
     }
 };
 
+namespace com { namespace sun { namespace star { namespace drawing {
+
+std::ostream& operator<<(std::ostream& rStrm, TextVerticalAdjust n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace table {
+
+std::ostream& operator<<(std::ostream& rStrm, ShadowLocation n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
+namespace com { namespace sun { namespace star { namespace beans {
+
+std::ostream& operator<<(std::ostream& rStrm, PropertyState n)
+{
+    rStrm << (int) n;
+    return rStrm;
+}
+
+} } } }
+
 DECLARE_WW8EXPORT_TEST(testN757910, "n757910.doc")
 {
     // The internal margin was larger than 0.28cm
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index a43179f5fb5a..0b7579bd9d46 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -283,7 +283,7 @@ bool SwPageNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
         nOffset = nSet;
         break;
     case FIELD_PROP_SUBTYPE:
-        switch( SWUnoHelper::GetEnumAsInt32( rAny ) )
+        switch( (text::PageNumberType) SWUnoHelper::GetEnumAsInt32( rAny ) )
         {
             case text::PageNumberType_CURRENT:
                 nSubType = PG_RANDOM;
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 63584585268a..8863b5ee6526 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1109,9 +1109,9 @@ bool SwFormatCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
                     m_eAdj = COLADJ_NONE;
                 else switch(pSwColums->GetSepLineVertAlign())
                 {
-                    case 0: m_eAdj = COLADJ_TOP;  break;  //VerticalAlignment_TOP
-                    case 1: m_eAdj = COLADJ_CENTER;break; //VerticalAlignment_MIDDLE
-                    case 2: m_eAdj = COLADJ_BOTTOM;break; //VerticalAlignment_BOTTOM
+                    case style::VerticalAlignment_TOP: m_eAdj = COLADJ_TOP;  break;
+                    case style::VerticalAlignment_MIDDLE: m_eAdj = COLADJ_CENTER; break;
+                    case style::VerticalAlignment_BOTTOM: m_eAdj = COLADJ_BOTTOM; break;
                     default: OSL_ENSURE( false, "unknown alignment" ); break;
                 }
             }
@@ -1210,9 +1210,9 @@ bool SwFormatSurround::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
     {
         case MID_SURROUND_SURROUNDTYPE:
         {
-            sal_Int32 eVal = SWUnoHelper::GetEnumAsInt32( rVal );
+            css::text::WrapTextMode eVal = (css::text::WrapTextMode) SWUnoHelper::GetEnumAsInt32( rVal );
             if( eVal >= css::text::WrapTextMode_NONE && eVal <= css::text::WrapTextMode_RIGHT )
-                SetValue( (css::text::WrapTextMode)eVal );
+                SetValue( eVal );
             else {
                 //exception
                 ;
@@ -1240,7 +1240,7 @@ void SwFormatSurround::dumpAsXml(xmlTextWriterPtr pWriter) const
 {
     xmlTextWriterStartElement(pWriter, BAD_CAST("SwFormatSurround"));
     xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
-    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(GetValue()).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number((sal_Int32)GetValue()).getStr()));
 
     OUString aPresentation;
     GetPresentation(SfxItemPresentation::Nameless, MapUnit::Map100thMM, MapUnit::Map100thMM, aPresentation);
@@ -1620,7 +1620,7 @@ bool SwFormatAnchor::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
         case MID_ANCHOR_ANCHORTYPE:
         {
             RndStdIds   eAnchor;
-            switch( SWUnoHelper::GetEnumAsInt32( rVal ) )
+            switch( (text::TextContentAnchorType) SWUnoHelper::GetEnumAsInt32( rVal ) )
             {
                 case  text::TextContentAnchorType_AS_CHARACTER:
                     eAnchor = RndStdIds::FLY_AS_CHAR;
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 5762965b182d..fd2ffaf66b7e 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -1785,8 +1785,8 @@ bool SwScriptInfo::IsArabicText( const OUString& rText, sal_Int32 nStt, sal_Int3
 {
     using namespace ::com::sun::star::i18n;
     static const ScriptTypeList typeList[] = {
-        { UnicodeScript_kArabic, UnicodeScript_kArabic, UnicodeScript_kArabic },        // 11,
-        { UnicodeScript_kScriptCount, UnicodeScript_kScriptCount, UnicodeScript_kScriptCount }    // 88
+        { UnicodeScript_kArabic, UnicodeScript_kArabic, (sal_Int16)UnicodeScript_kArabic },        // 11,
+        { UnicodeScript_kScriptCount, UnicodeScript_kScriptCount, (sal_Int16)UnicodeScript_kScriptCount }    // 88
     };
 
     // go forward if current position does not hold a regular character:
@@ -1811,8 +1811,8 @@ bool SwScriptInfo::IsArabicText( const OUString& rText, sal_Int32 nStt, sal_Int3
     if( nIdx >= 0 )
     {
         const sal_Unicode cCh = rText[nIdx];
-        const sal_Int16 type = unicode::getUnicodeScriptType( cCh, typeList, UnicodeScript_kScriptCount );
-        return type == UnicodeScript_kArabic;
+        const sal_Int16 type = unicode::getUnicodeScriptType( cCh, typeList, (sal_Int16)UnicodeScript_kScriptCount );
+        return type == (sal_Int16)UnicodeScript_kArabic;
     }
     return false;
 }
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 4e279c76565f..542392f19181 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -596,10 +596,10 @@ SwRubyPortion::SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt,
     if ( rCreate.nLevel % 2 )
     {
         // switch right and left ruby adjustment in rtl environment
-        if ( 0 == nAdjustment )
-            nAdjustment = 2;
-        else if ( 2 == nAdjustment )
-            nAdjustment = 0;
+        if ( css::text::RubyAdjust_LEFT == nAdjustment )
+            nAdjustment = css::text::RubyAdjust_RIGHT;
+        else if ( css::text::RubyAdjust_RIGHT == nAdjustment )
+            nAdjustment = css::text::RubyAdjust_LEFT;
 
         SetDirection( DIR_RIGHT2LEFT );
     }
@@ -642,12 +642,12 @@ void SwRubyPortion::Adjust_( SwTextFormatInfo &rInf )
     sal_Int32 nSub = 0;
     switch ( nAdjustment )
     {
-        case 1: nRight = static_cast<sal_uInt16>(nLineDiff / 2);
+        case css::text::RubyAdjust_CENTER: nRight = static_cast<sal_uInt16>(nLineDiff / 2);
             SAL_FALLTHROUGH;
-        case 2: nLeft  = static_cast<sal_uInt16>(nLineDiff - nRight); break;
-        case 3: nSub   = 1;
+        case css::text::RubyAdjust_RIGHT: nLeft  = static_cast<sal_uInt16>(nLineDiff - nRight); break;
+        case css::text::RubyAdjust_BLOCK: nSub   = 1;
             SAL_FALLTHROUGH;
-        case 4:
+        case css::text::RubyAdjust_INDENT_BLOCK:
         {
             sal_Int32 nCharCnt = 0;
             SwLinePortion *pPor;
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index 105d4540fbaf..7af74fcc9764 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -21,6 +21,7 @@
 
 #include "porlay.hxx"
 #include "porexp.hxx"
+#include <com/sun/star/text/RubyAdjust.hpp>
 
 class SwTextFormatInfo;
 class SwFieldPortion;
@@ -180,7 +181,7 @@ public:
 class SwRubyPortion : public SwMultiPortion
 {
     sal_Int32 nRubyOffset;
-    sal_uInt16 nAdjustment;
+    css::text::RubyAdjust nAdjustment;
     void Adjust_( SwTextFormatInfo &rInf);
 public:
     SwRubyPortion( const SwRubyPortion& rRuby, sal_Int32 nEnd );
@@ -192,8 +193,8 @@ public:
 
     void CalcRubyOffset();
     void Adjust( SwTextFormatInfo &rInf )
-        { if(nAdjustment && GetRoot().GetNext()) Adjust_(rInf); }
-    sal_uInt16 GetAdjustment() const { return nAdjustment; }
+        { if(nAdjustment != css::text::RubyAdjust_LEFT && GetRoot().GetNext()) Adjust_(rInf); }
+    css::text::RubyAdjust GetAdjustment() const { return nAdjustment; }
     sal_Int32 GetRubyOffset() const { return nRubyOffset; }
 };
 
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index df31e6a4d5d5..45abe6550540 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -401,7 +401,7 @@ SwFormatRuby::SwFormatRuby( const OUString& rRubyText )
     pTextAttr( nullptr ),
     nCharFormatId( 0 ),
     nPosition( 0 ),
-    nAdjustment( 0 )
+    nAdjustment( css::text::RubyAdjust_LEFT )
 {
 }
 
@@ -490,8 +490,8 @@ bool SwFormatRuby::PutValue( const uno::Any& rVal,
         {
             sal_Int16 nSet = 0;
             rVal >>= nSet;
-            if(nSet >= 0 && nSet <= text::RubyAdjust_INDENT_BLOCK)
-                nAdjustment = nSet;
+            if(nSet >= (sal_Int16)text::RubyAdjust_LEFT && nSet <= (sal_Int16)text::RubyAdjust_INDENT_BLOCK)
+                nAdjustment = (text::RubyAdjust)nSet;
             else
                 bRet = false;
         }
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 84122febaf3f..9479f9be96c1 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1250,7 +1250,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
                     if(RES_ANCHOR == pEntry->nWID && MID_ANCHOR_ANCHORTYPE == pEntry->nMemberId)
                     {
                         bool bSetAttr = true;
-                        sal_Int32 eNewAnchor = SWUnoHelper::GetEnumAsInt32( aValue );
+                        text::TextContentAnchorType eNewAnchor = (text::TextContentAnchorType)SWUnoHelper::GetEnumAsInt32( aValue );
 
                         //if old anchor was in_cntnt the related text attribute has to be removed
                         const SwFormatAnchor& rOldAnchor = pFormat->GetAnchor();
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 730d329a05dc..c02cdd730816 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1879,7 +1879,7 @@ SwUnoCursorHelper::GetPropertyStates(
                         eCaller)
             {
                 //this values marks the element as unknown property
-                pStates[i] = beans::PropertyState_MAKE_FIXED_SIZE;
+                pStates[i] = beans::PropertyState::PropertyState_MAKE_FIXED_SIZE;
                 continue;
             }
             else
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index 98ed94f2d72d..916150b1b73e 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -607,7 +607,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion:
             try
             {
                 aResult.Name = pProp[i];
-                if(pPropertyStates[i] == beans::PropertyState_MAKE_FIXED_SIZE)     // property unknown?
+                if(pPropertyStates[i] == beans::PropertyState::PropertyState_MAKE_FIXED_SIZE)     // property unknown?
                 {
                     if( bDirectValuesOnly )
                         continue;
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index ef24606f4bb0..7ec4232deff3 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -2459,10 +2459,10 @@ void SwXTextColumns::setPropertyValue( const OUString& rPropertyName, const Any&
                 if (! ( aValue >>= nTmp ) )
                     throw IllegalArgumentException();
                 else
-                    nSepLineVertAlign = nTmp;
+                    nSepLineVertAlign = (style::VerticalAlignment)nTmp;
             }
             else
-                nSepLineVertAlign = static_cast< sal_Int8 >(eAlign);
+                nSepLineVertAlign = eAlign;
         }
         break;
         case WID_TXTCOL_LINE_IS_ON:
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 67b5610bb092..60c8d64d11c8 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -3702,7 +3702,7 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAut
     // special case for ruby auto styles:
     if ( IStyleAccess::AUTO_STYLE_RUBY == eFam )
     {
-        std::set< std::pair< sal_uInt16, sal_uInt16 > > aRubyMap;
+        std::set< std::pair< sal_uInt16, text::RubyAdjust > > aRubyMap;
         SwAttrPool& rAttrPool = pDoc->GetAttrPool();
         sal_uInt32 nCount = rAttrPool.GetItemCount2( RES_TXTATR_CJK_RUBY );
 
@@ -3711,7 +3711,7 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAut
             const SwFormatRuby* pItem = static_cast<const SwFormatRuby*>(rAttrPool.GetItem2( RES_TXTATR_CJK_RUBY, nI ));
             if ( pItem && pItem->GetTextRuby() )
             {
-                std::pair< sal_uInt16, sal_uInt16 > aPair( pItem->GetPosition(), pItem->GetAdjustment() );
+                std::pair< sal_uInt16, text::RubyAdjust > aPair( pItem->GetPosition(), pItem->GetAdjustment() );
                 if ( aRubyMap.find( aPair ) == aRubyMap.end() )
                 {
                     aRubyMap.insert( aPair );
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 431509fd2f4b..63cf7df0479c 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -1064,10 +1064,10 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
         }
 
         uno::Reference< text::XTextRange >  xTextRg;
-        sal_Int16 nAnchorType = text::TextContentAnchorType_AS_CHARACTER;
+        text::TextContentAnchorType nAnchorType = text::TextContentAnchorType_AS_CHARACTER;
         bool bSetPos = false, bSetSurround = false;
         sal_Int32 nXPos = 0, nYPos = 0;
-        sal_Int16 nSurround = text::WrapTextMode_NONE;
+        text::WrapTextMode nSurround = text::WrapTextMode_NONE;
         if( SVX_CSS1_POS_ABSOLUTE == rCSS1PropInfo.m_ePosition &&
             SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.m_eLeftType &&
             SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.m_eTopType )
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index b69b06d72ed6..dc8ab99bc126 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2253,19 +2253,19 @@ void DocxAttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 nPos, co
     OString sAlign ( "center" );
     switch ( rRuby.GetAdjustment( ) )
     {
-        case 0:
+        case css::text::RubyAdjust_LEFT:
             sAlign = OString( "left" );
             break;
-        case 1:
+        case css::text::RubyAdjust_CENTER:
             // Defaults to center
             break;
-        case 2:
+        case css::text::RubyAdjust_RIGHT:
             sAlign = OString( "right" );
             break;
-        case 3:
+        case css::text::RubyAdjust_BLOCK:
             sAlign = OString( "distributeLetter" );
             break;
-        case 4:
+        case css::text::RubyAdjust_INDENT_BLOCK:
             sAlign = OString( "distributeSpace" );
             break;
         default:
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 8ee1a2fd38d3..5defc6eccb62 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -440,22 +440,22 @@ void RtfAttributeOutput::StartRuby(const SwTextNode& rNode, sal_Int32 /*nPos*/,
     sal_Char cDirective = 0;
     switch (rRuby.GetAdjustment())
     {
-    case 0:
+    case css::text::RubyAdjust_LEFT:
         nJC = 3;
         cDirective = 'l';
         break;
-    case 1:
+    case css::text::RubyAdjust_CENTER:
         //defaults to 0
         break;
-    case 2:
+    case css::text::RubyAdjust_RIGHT:
         nJC = 4;
         cDirective = 'r';
         break;
-    case 3:
+    case css::text::RubyAdjust_BLOCK:
         nJC = 1;
         cDirective = 'd';
         break;
-    case 4:
+    case css::text::RubyAdjust_INDENT_BLOCK:
         nJC = 2;
         cDirective = 'd';
         break;
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 0ce54ec5a03a..0f95e9cb27bc 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -773,22 +773,22 @@ void WW8AttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 /*nPos*/,
     sal_Char cDirective = 0;
     switch ( rRuby.GetAdjustment() )
     {
-        case 0:
+        case css::text::RubyAdjust_LEFT:
             nJC = 3;
             cDirective = 'l';
             break;
-        case 1:
+        case css::text::RubyAdjust_CENTER:
             //defaults to 0
             break;
-        case 2:
+        case css::text::RubyAdjust_RIGHT:
             nJC = 4;
             cDirective = 'r';
             break;
-        case 3:
+        case css::text::RubyAdjust_BLOCK:
             nJC = 1;
             cDirective = 'd';
             break;
-        case 4:
+        case css::text::RubyAdjust_INDENT_BLOCK:
             nJC = 2;
             cDirective = 'd';
             break;
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 4e25a26c8cac..2177cb5ecc85 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2561,18 +2561,15 @@ bool SwMSConvertControls::InsertControl(
 
     //I lay a small bet that this will change to
     //sal_Int16 nTemp=TextContentAnchorType::AS_CHARACTER;
-    sal_Int16 nTemp;
+    text::TextContentAnchorType nTemp;
     if (bFloatingCtrl)
-        nTemp= text::TextContentAnchorType_AT_PARAGRAPH;
+        nTemp = text::TextContentAnchorType_AT_PARAGRAPH;
     else
-        nTemp= text::TextContentAnchorType_AS_CHARACTER;
+        nTemp = text::TextContentAnchorType_AS_CHARACTER;
 
-    aTmp <<= nTemp;
-    xShapePropSet->setPropertyValue("AnchorType", aTmp );
+    xShapePropSet->setPropertyValue("AnchorType", uno::Any((sal_Int16)nTemp) );
 
-    nTemp= text::VertOrientation::TOP;
-    aTmp <<= nTemp;
-    xShapePropSet->setPropertyValue("VertOrient", aTmp );
+    xShapePropSet->setPropertyValue("VertOrient", uno::Any((sal_Int16)text::VertOrientation::TOP) );
 
     uno::Reference< text::XText >  xDummyTextRef;
     uno::Reference< text::XTextRange >  xTextRg =
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 68328025ab1f..9e486a57f4bc 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2680,23 +2680,24 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam)
     //Translate and apply
     if (!sRuby.isEmpty() && !sText.isEmpty() && !sFontName.isEmpty() && nFontSize)
     {
+        css::text::RubyAdjust eRubyAdjust;
         switch (nJustificationCode)
         {
             case 0:
-                nJustificationCode=1;
+                eRubyAdjust = css::text::RubyAdjust_CENTER;
                 break;
             case 1:
-                nJustificationCode=3;
+                eRubyAdjust = css::text::RubyAdjust_BLOCK;
                 break;
             case 2:
-                nJustificationCode=4;
+                eRubyAdjust = css::text::RubyAdjust_INDENT_BLOCK;
                 break;
             default:
             case 3:
-                nJustificationCode=0;
+                eRubyAdjust = css::text::RubyAdjust_LEFT;
                 break;
             case 4:
-                nJustificationCode=2;
+                eRubyAdjust = css::text::RubyAdjust_RIGHT;
                 break;
         }
 
@@ -2753,7 +2754,7 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam)
         //Set the charstyle and justification
         aRuby.SetCharFormatName(pCharFormat->GetName());
         aRuby.SetCharFormatId(pCharFormat->GetPoolFormatId());
-        aRuby.SetAdjustment(nJustificationCode);
+        aRuby.SetAdjustment(eRubyAdjust);
 
         NewAttr(aRuby);
         m_rDoc.getIDocumentContentOperations().InsertString( *m_pPaM, sText );
diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx
index b44130efa22a..0cdb90004c2c 100644
--- a/sw/source/ui/vba/vbaparagraphformat.cxx
+++ b/sw/source/ui/vba/vbaparagraphformat.cxx
@@ -481,9 +481,9 @@ sal_Int16 SwVbaParagraphFormat::getCharHeight()
     return (sal_Int16)( Millimeter::getInHundredthsOfOneMillimeter( fCharHeight ) );
 }
 
-sal_Int32 SwVbaParagraphFormat::getOOoAlignment( sal_Int32 _alignment )
+style::ParagraphAdjust SwVbaParagraphFormat::getOOoAlignment( sal_Int32 _alignment )
 {
-    sal_Int32 nParaAjust = style::ParagraphAdjust_LEFT;
+    style::ParagraphAdjust nParaAjust = style::ParagraphAdjust_LEFT;
     switch( _alignment )
     {
         case word::WdParagraphAlignment::wdAlignParagraphCenter:
@@ -514,7 +514,7 @@ sal_Int32 SwVbaParagraphFormat::getOOoAlignment( sal_Int32 _alignment )
     return nParaAjust;
 }
 
-sal_Int32 SwVbaParagraphFormat::getMSWordAlignment( sal_Int32 _alignment )
+sal_Int32 SwVbaParagraphFormat::getMSWordAlignment( style::ParagraphAdjust _alignment )
 {
     sal_Int32 wdAlignment = word::WdParagraphAlignment::wdAlignParagraphLeft;
     switch( _alignment )
diff --git a/sw/source/ui/vba/vbaparagraphformat.hxx b/sw/source/ui/vba/vbaparagraphformat.hxx
index 645c14c635cc..80e5407c1ed3 100644
--- a/sw/source/ui/vba/vbaparagraphformat.hxx
+++ b/sw/source/ui/vba/vbaparagraphformat.hxx
@@ -23,6 +23,7 @@
 #include <vbahelper/vbahelperinterface.hxx>
 #include <com/sun/star/text/XTextDocument.hpp>
 #include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/ParagraphAdjust.hpp>
 
 typedef InheritedHelperInterfaceWeakImpl< ooo::vba::word::XParagraphFormat > SwVbaParagraphFormat_BASE;
 
@@ -38,8 +39,8 @@ private:
     static sal_Int32 getMSWordLineSpacingRule( css::style::LineSpacing& rLineSpacing );
     /// @throws css::uno::RuntimeException
     sal_Int16 getCharHeight();
-    static sal_Int32 getOOoAlignment( sal_Int32 _alignment );
-    static sal_Int32 getMSWordAlignment( sal_Int32 _alignment );
+    static css::style::ParagraphAdjust getOOoAlignment( sal_Int32 _alignment );
+    static sal_Int32 getMSWordAlignment( css::style::ParagraphAdjust _alignment );
 
 public:
     SwVbaParagraphFormat( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::beans::XPropertySet >& rParaProps );
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index 67cf62bddb85..336af0c47e8e 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -609,7 +609,7 @@ void SAL_CALL SwXTextView::setRubyList(
             {
                 sal_Int16 nTmp = 0;
                 if((pProperties[nProp].Value >>= nTmp))
-                    pEntry->GetRubyAttr().SetAdjustment(nTmp);
+                    pEntry->GetRubyAttr().SetAdjustment((css::text::RubyAdjust)nTmp);
             }
             else if(pProperties[nProp].Name == UNO_NAME_RUBY_IS_ABOVE)
             {


More information about the Libreoffice-commits mailing list