[Libreoffice-commits] core.git: Branch 'feature/textbox' - 195 commits - accessibility/source animations/source avmedia/inc avmedia/Library_avmediaMacAVF.mk avmedia/Library_avmedia.mk avmedia/Library_avmediaQuickTime.mk avmedia/Module_avmedia.mk avmedia/source basctl/source basegfx/inc basegfx/Library_basegfx.mk basegfx/source basic/source bin/findunusedcode bridges/inc bridges/source chart2/inc chart2/opengl chart2/Package_opengl.mk chart2/qa chart2/source cli_ure/source comphelper/source compilerplugins/clang configure.ac connectivity/source cppcanvas/source cppuhelper/source crashrep/source cui/source cui/uiconfig dbaccess/source dictionaries drawinglayer/source dtrans/source dtrans/test editeng/source embeddedobj/source embeddedobj/test embedserv/source extensions/source external/collada2gltf external/mdds external/nss external/opencollada filter/source forms/source formula/source fpicker/source framework/inc framework/source helpcontent2 i18npool/inc i18npool/source i18nutil/source idl/inc i nclude/comphelper include/filter include/formula include/framework include/oox include/osl include/rtl include/sal include/sax include/sfx2 include/svl include/svtools include/svx include/systools include/test include/tools include/unotools include/vbahelper include/vcl include/wntgcci include/wntgccx include/xmloff jvmfwk/plugins jvmfwk/source l10ntools/inc linguistic/source Makefile.fetch o3tl/qa odk/docs odk/Package_odk_headers.mk oox/inc oox/source package/source postprocess/qa postprocess/Rdb_services.mk pyuno/inc pyuno/source readlicense_oo/license registry/source registry/test reportdesign/inc reportdesign/Library_rpt.mk reportdesign/Library_rptui.mk reportdesign/Library_rptxml.mk reportdesign/source Repository.mk rsc/inc rsc/source sal/android salhelper/test sal/inc sal/osl sal/qa sal/rtl sal/workben sax/qa sax/source sccomp/source sc/inc scp2/InstallModule_ooo.mk scp2/source sc/qa scripting/source sc/source sc/uiconfig sdext/source sd/inc sd/qa sd/source sd/uiconfig setup_n ative/source sfx2/inc sfx2/source shell/source slideshow/source soltools/cpp soltools/mkdepend starmath/source stoc/source svgio/inc svl/inc svl/Library_svl.mk svl/qa svl/source svtools/inc svtools/source svx/inc svx/source sw/inc sw/Library_sw.mk sw/qa sw/sdi sw/source sw/uiconfig test/Library_test.mk test/source testtools/source toolkit/inc toolkit/source tools/CppunitTest_tools_test.mk tools/inc tools/qa tools/source ucb/source unotools/source unusedcode.easy uui/source vcl/CppunitTest_vcl_wmf_test.mk vcl/generic vcl/inc vcl/Module_vcl.mk vcl/osx vcl/qa vcl/quartz vcl/source vcl/unx winaccessibility/inc winaccessibility/source writerfilter/source writerperfect/source xmloff/source xmlscript/source xmlsecurity/inc xmlsecurity/source

Miklos Vajna vmiklos at collabora.co.uk
Fri May 16 04:09:16 PDT 2014


Rebased ref, commits from common ancestor:
commit cd2e279c95220bbdfb048ac598a097a0eba1bc95
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 14 17:03:45 2014 +0200

    SwXShape: allow setting TextBox property to false
    
    Change-Id: I3b501d6928cded0f4684817c24674423c1d6c2da

diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx
index 93a459d..0c992dc 100644
--- a/sw/inc/textboxhelper.hxx
+++ b/sw/inc/textboxhelper.hxx
@@ -26,6 +26,8 @@ class SwTextBoxHelper
 public:
     /// Create a TextBox for a shape.
     static void create(SwFrmFmt* pShape);
+    /// Destroy a TextBox for a shape.
+    static void destroy(SwFrmFmt* pShape);
     /// Get XTextAppend of a shape's TextBox, if there is any.
     static css::uno::Any getXTextAppend(SwFrmFmt* pShape, const css::uno::Type& rType);
     /// Sync property of TextBox with the one of the shape.
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 9937778..faadb5f 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -65,6 +65,22 @@ void SwTextBoxHelper::create(SwFrmFmt* pShape)
     }
 }
 
+void SwTextBoxHelper::destroy(SwFrmFmt* pShape)
+{
+    // If a TextBox was enabled previously
+    if (pShape->GetAttrSet().HasItem(RES_CNTNT))
+    {
+        SwFrmFmt* pFmt = findTextBox(pShape);
+
+        // Unlink the TextBox's text range from the original shape.
+        pShape->ResetFmtAttr(RES_CNTNT);
+
+        // Delete the associated TextFrame.
+        if (pFmt)
+            pShape->GetDoc()->DelLayoutFmt(pFmt);
+    }
+}
+
 SwFrmFmt* SwTextBoxHelper::findTextBox(SwFrmFmt* pShape)
 {
     SwFrmFmt* pRet = 0;
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 5ece513..6a3261b 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1182,9 +1182,10 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
                 {
                     bool bValue;
                     aValue >>= bValue;
-                    // If TextBox is to be enabled.
                     if (bValue)
                         SwTextBoxHelper::create(pFmt);
+                    else
+                        SwTextBoxHelper::destroy(pFmt);
 
                 }
                 // #i28749#
commit d61734cd9f53bbc2d7b7b2164b1fe4cd6fb1f6bb
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 14 16:06:13 2014 +0200

    SwTextBoxHelper::syncProperty(): avoid crash on not-yet-inserted shape
    
    Change-Id: Ic5d6a62ec3ba2e096e9257ab7d30004cf3213069

diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index ec27548..9937778 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -105,6 +105,10 @@ uno::Any SwTextBoxHelper::getXTextAppend(SwFrmFmt* pShape, const uno::Type& rTyp
 
 void SwTextBoxHelper::syncProperty(SwFrmFmt* pShape, sal_uInt16 nWID, sal_uInt8 nMemberId, const OUString& rPropertyName, const css::uno::Any& rValue)
 {
+    // No shape yet? Then nothing to do, initial properties are set by create().
+    if (!pShape)
+        return;
+
     uno::Any aValue(rValue);
     nMemberId &= ~CONVERT_TWIPS;
 
commit 16e923c84ee57bf5d0c9f2fc4697c1a1214e6394
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 14 11:52:33 2014 +0200

    SwXShape: new bool TextBox property
    
    Change-Id: Id9744db2d2a7c6102514f05109c80650af243e28

diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 8f49675..2d3ae39 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -855,6 +855,7 @@
 #define FN_SHAPE_STARTPOSITION_IN_HORI_L2R (FN_PARAM2+25)
 #define FN_SHAPE_ENDPOSITION_IN_HORI_L2R   (FN_PARAM2+26)
 #define FN_PARAM_PAM                    (FN_PARAM2+27) /* Point and Mark */
+#define FN_TEXT_BOX                     (FN_PARAM2+28) /* TextBox Property*/
 
 /*--------------------------------------------------------------------
     Description: Status: not more than 19!
diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx
index 65ba9cf..93a459d 100644
--- a/sw/inc/textboxhelper.hxx
+++ b/sw/inc/textboxhelper.hxx
@@ -30,6 +30,8 @@ public:
     static css::uno::Any getXTextAppend(SwFrmFmt* pShape, const css::uno::Type& rType);
     /// Sync property of TextBox with the one of the shape.
     static void syncProperty(SwFrmFmt* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, const OUString& rPropertyName, const css::uno::Any& rValue);
+    /// If we have an associated TextFrame, then return that.
+    static SwFrmFmt* findTextBox(SwFrmFmt* pShape);
 };
 
 #endif // INCLUDED_SW_INC_TEXTBOXHELPER_HXX
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 63dfe4a..bed1254 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -65,6 +65,7 @@
 #define UNO_NAME_FOOTER_LEFT_MARGIN "FooterLeftMargin"
 #define UNO_NAME_FOOTER_RIGHT_MARGIN "FooterRightMargin"
 #define UNO_NAME_TEXT_RANGE "TextRange"
+#define UNO_NAME_TEXT_BOX "TextBox"
 #define UNO_NAME_NAME "Name"
 #define UNO_NAME_NUMBERING_ALIGNMENT "NumberingAlignment"
 #define UNO_NAME_BULLET_FONT_NAME "BulletFontName"
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index d7702f7..ec27548 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -65,8 +65,7 @@ void SwTextBoxHelper::create(SwFrmFmt* pShape)
     }
 }
 
-// If we have an associated TextFrame, then return that.
-SwFrmFmt* lcl_findTextBox(SwFrmFmt* pShape)
+SwFrmFmt* SwTextBoxHelper::findTextBox(SwFrmFmt* pShape)
 {
     SwFrmFmt* pRet = 0;
 
@@ -94,7 +93,7 @@ uno::Any SwTextBoxHelper::getXTextAppend(SwFrmFmt* pShape, const uno::Type& rTyp
 
     if (rType == cppu::UnoType<css::text::XTextAppend>::get())
     {
-        if (SwFrmFmt* pFmt = lcl_findTextBox(pShape))
+        if (SwFrmFmt* pFmt = findTextBox(pShape))
         {
             uno::Reference<text::XTextAppend> xTextAppend(static_cast<cppu::OWeakObject*>(SwXFrames::GetObject(*pFmt, FLYCNTTYPE_FRM)), uno::UNO_QUERY);
             aRet <<= xTextAppend;
@@ -109,7 +108,7 @@ void SwTextBoxHelper::syncProperty(SwFrmFmt* pShape, sal_uInt16 nWID, sal_uInt8
     uno::Any aValue(rValue);
     nMemberId &= ~CONVERT_TWIPS;
 
-    if (SwFrmFmt* pFmt = lcl_findTextBox(pShape))
+    if (SwFrmFmt* pFmt = findTextBox(pShape))
     {
         bool bSync = false;
         bool bAdjustX = false;
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 82d969a..5ece513 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1178,6 +1178,15 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
                         delete pInternalPam;
                     }
                 }
+                else if (pEntry->nWID == FN_TEXT_BOX)
+                {
+                    bool bValue;
+                    aValue >>= bValue;
+                    // If TextBox is to be enabled.
+                    if (bValue)
+                        SwTextBoxHelper::create(pFmt);
+
+                }
                 // #i28749#
                 else if ( FN_SHAPE_POSITION_LAYOUT_DIR == pEntry->nWID )
                 {
@@ -1500,6 +1509,11 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
                         }
                     }
                 }
+                else if (pEntry->nWID == FN_TEXT_BOX)
+                {
+                    bool bValue = SwTextBoxHelper::findTextBox(pFmt);
+                    aRet <<= bValue;
+                }
                 // #i28749#
                 else if ( FN_SHAPE_TRANSFORMATION_IN_HORI_L2R == pEntry->nWID )
                 {
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index b2fb907..5a9cb5a 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -1394,6 +1394,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
                     { OUString(UNO_NAME_RELATIVE_HEIGHT_RELATION), RES_FRM_SIZE, cppu::UnoType<sal_Int16>::get(),      PROPERTY_NONE, MID_FRMSIZE_REL_HEIGHT_RELATION },
                     { OUString(UNO_NAME_RELATIVE_WIDTH), RES_FRM_SIZE,      cppu::UnoType<sal_Int16>::get()  ,         PROPERTY_NONE, MID_FRMSIZE_REL_WIDTH  },
                     { OUString(UNO_NAME_RELATIVE_WIDTH_RELATION), RES_FRM_SIZE, cppu::UnoType<sal_Int16>::get(),       PROPERTY_NONE, MID_FRMSIZE_REL_WIDTH_RELATION },
+                    { OUString(UNO_NAME_TEXT_BOX), FN_TEXT_BOX, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0},
                     { OUString(), 0, css::uno::Type(), 0, 0 }
                 };
                 aMapEntriesArr[nPropertyId] = aShapeMap_Impl;
commit 702cb8f3c2eb6d08bea3dfd4a54d5399f257df05
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 14 11:44:35 2014 +0200

    SwXShape: invoke SwTextBoxHelper
    
    For now, only in queryInterface(), setPropertyValue() and setSize().
    It's safe to always call these methods, if they are not relevant, the
    method will be a NOP.
    
    Change-Id: I1985f8bcac38cf232652a1e30241a5fa6bef5aba

diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 229ae11..82d969a 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -28,6 +28,7 @@
 #include <unotextrange.hxx>
 #include <svx/svditer.hxx>
 #include <swunohelper.hxx>
+#include <textboxhelper.hxx>
 #include <doc.hxx>
 #include <IDocumentUndoRedo.hxx>
 #include <fmtcntnt.hxx>
@@ -974,7 +975,11 @@ SwXShape::~SwXShape()
 
 uno::Any SwXShape::queryInterface( const uno::Type& aType ) throw( uno::RuntimeException, std::exception )
 {
-    uno::Any aRet = SwXShapeBaseClass::queryInterface(aType);
+    uno::Any aRet = SwTextBoxHelper::getXTextAppend(GetFrmFmt(), aType);
+    if (aRet.hasValue())
+        return aRet;
+
+    aRet = SwXShapeBaseClass::queryInterface(aType);
     // #i53320# - follow-up of #i31698#
     // interface drawing::XShape is overloaded. Thus, provide
     // correct object instance.
@@ -1325,6 +1330,8 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
                     else
                         pFmt->SetFmtAttr(aSet);
                 }
+                // We have a pFmt and a pEntry as well: try to sync TextBox property.
+                SwTextBoxHelper::syncProperty(pFmt, pEntry->nWID, pEntry->nMemberId, rPropertyName, aValue);
             }
             else
             {
@@ -2309,6 +2316,7 @@ void SAL_CALL SwXShape::setSize( const awt::Size& aSize )
     {
         mxShape->setSize( aSize );
     }
+    SwTextBoxHelper::syncProperty(GetFrmFmt(), RES_FRM_SIZE, MID_FRMSIZE_SIZE, "Size", uno::makeAny(aSize));
 }
 // #i31698#
 // implementation of virtual methods from drawing::XShapeDescriptor
commit 4d22f683be09cae1b7770a14a63bdd6bb0bea92a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 14 11:41:19 2014 +0200

    Initial SwTextBoxHelper
    
    Change-Id: I928cf7d7cbfb62ffa98be9412d7425a6dc61bfdb

diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index ec4e021..b84e9fc 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -202,6 +202,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
     sw/source/core/doc/tblafmt \
     sw/source/core/doc/tblcpy \
     sw/source/core/doc/tblrwcl \
+    sw/source/core/doc/textboxhelper \
     sw/source/core/doc/visiturl \
     sw/source/core/docnode/cancellablejob \
     sw/source/core/docnode/finalthreadmanager \
diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx
new file mode 100644
index 0000000..65ba9cf
--- /dev/null
+++ b/sw/inc/textboxhelper.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SW_INC_TEXTBOXHELPER_HXX
+#define INCLUDED_SW_INC_TEXTBOXHELPER_HXX
+
+#include <com/sun/star/uno/Any.h>
+#include <com/sun/star/uno/Type.h>
+
+class SwFrmFmt;
+
+/**
+ * A TextBox is a TextFrame, that is tied to a drawinglayer shape.
+ *
+ * This class provides helper methods to create, query and maintain such
+ * TextBoxes.
+ */
+class SwTextBoxHelper
+{
+public:
+    /// Create a TextBox for a shape.
+    static void create(SwFrmFmt* pShape);
+    /// Get XTextAppend of a shape's TextBox, if there is any.
+    static css::uno::Any getXTextAppend(SwFrmFmt* pShape, const css::uno::Type& rType);
+    /// Sync property of TextBox with the one of the shape.
+    static void syncProperty(SwFrmFmt* pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, const OUString& rPropertyName, const css::uno::Any& rValue);
+};
+
+#endif // INCLUDED_SW_INC_TEXTBOXHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
new file mode 100644
index 0000000..d7702f7
--- /dev/null
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -0,0 +1,189 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <textboxhelper.hxx>
+#include <frmfmt.hxx>
+#include <fmtcntnt.hxx>
+#include <doc.hxx>
+#include <docsh.hxx>
+#include <docary.hxx>
+#include <unocoll.hxx>
+#include <unoframe.hxx>
+#include <unotextbodyhf.hxx>
+#include <unotextrange.hxx>
+#include <unomid.h>
+
+#include <svx/svdoashp.hxx>
+#include <svx/unopage.hxx>
+
+#include <com/sun/star/table/BorderLine2.hpp>
+#include <com/sun/star/text/SizeType.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+
+using namespace com::sun::star;
+
+void SwTextBoxHelper::create(SwFrmFmt* pShape)
+{
+    // If TextBox wasn't enabled previously
+    if (!pShape->GetAttrSet().HasItem(RES_CNTNT))
+    {
+        // Create the associated TextFrame and insert it into the document.
+        uno::Reference<text::XTextContent> xTextFrame(SwXServiceProvider::MakeInstance(SW_SERVICE_TYPE_TEXTFRAME, pShape->GetDoc()), uno::UNO_QUERY);
+        uno::Reference<text::XTextDocument> xTextDocument(pShape->GetDoc()->GetDocShell()->GetBaseModel(), uno::UNO_QUERY);
+        uno::Reference<text::XTextContentAppend> xTextContentAppend(xTextDocument->getText(), uno::UNO_QUERY);
+        xTextContentAppend->appendTextContent(xTextFrame, uno::Sequence<beans::PropertyValue>());
+
+        // Initialize properties.
+        uno::Reference<beans::XPropertySet> xPropertySet(xTextFrame, uno::UNO_QUERY);
+        uno::Any aEmptyBorder = uno::makeAny(table::BorderLine2());
+        xPropertySet->setPropertyValue("TopBorder", aEmptyBorder);
+        xPropertySet->setPropertyValue("BottomBorder", aEmptyBorder);
+        xPropertySet->setPropertyValue("LeftBorder", aEmptyBorder);
+        xPropertySet->setPropertyValue("RightBorder", aEmptyBorder);
+
+        xPropertySet->setPropertyValue("FillTransparence", uno::makeAny(sal_Int32(100)));
+
+        xPropertySet->setPropertyValue("SizeType", uno::makeAny(text::SizeType::FIX));
+
+        // Link its text range to the original shape.
+        uno::Reference<text::XTextRange> xTextBox(xTextFrame, uno::UNO_QUERY_THROW);
+        SwUnoInternalPaM aInternalPaM(*pShape->GetDoc());
+        if (sw::XTextRangeToSwPaM(aInternalPaM, xTextBox))
+        {
+            SwAttrSet aSet(pShape->GetAttrSet());
+            SwFmtCntnt aCntnt(aInternalPaM.GetNode()->StartOfSectionNode());
+            aSet.Put(aCntnt);
+            pShape->SetFmtAttr(aSet);
+        }
+    }
+}
+
+// If we have an associated TextFrame, then return that.
+SwFrmFmt* lcl_findTextBox(SwFrmFmt* pShape)
+{
+    SwFrmFmt* pRet = 0;
+
+    if (pShape->GetAttrSet().HasItem(RES_CNTNT))
+    {
+        const SwFmtCntnt& rCntnt = pShape->GetCntnt();
+        SwFrmFmts& rSpzFrmFmts = *pShape->GetDoc()->GetSpzFrmFmts();
+        for (SwFrmFmts::iterator it = rSpzFrmFmts.begin(); it != rSpzFrmFmts.end(); ++it)
+        {
+            SwFrmFmt* pFmt = *it;
+            if (pFmt->Which() == RES_FLYFRMFMT && pFmt->GetAttrSet().HasItem(RES_CNTNT) && pFmt->GetCntnt() == rCntnt)
+            {
+                pRet = pFmt;
+                break;
+            }
+        }
+    }
+
+    return pRet;
+}
+
+uno::Any SwTextBoxHelper::getXTextAppend(SwFrmFmt* pShape, const uno::Type& rType)
+{
+    uno::Any aRet;
+
+    if (rType == cppu::UnoType<css::text::XTextAppend>::get())
+    {
+        if (SwFrmFmt* pFmt = lcl_findTextBox(pShape))
+        {
+            uno::Reference<text::XTextAppend> xTextAppend(static_cast<cppu::OWeakObject*>(SwXFrames::GetObject(*pFmt, FLYCNTTYPE_FRM)), uno::UNO_QUERY);
+            aRet <<= xTextAppend;
+        }
+    }
+
+    return aRet;
+}
+
+void SwTextBoxHelper::syncProperty(SwFrmFmt* pShape, sal_uInt16 nWID, sal_uInt8 nMemberId, const OUString& rPropertyName, const css::uno::Any& rValue)
+{
+    uno::Any aValue(rValue);
+    nMemberId &= ~CONVERT_TWIPS;
+
+    if (SwFrmFmt* pFmt = lcl_findTextBox(pShape))
+    {
+        bool bSync = false;
+        bool bAdjustX = false;
+        bool bAdjustY = false;
+        bool bAdjustSize = false;
+        switch (nWID)
+        {
+        case RES_HORI_ORIENT:
+            switch (nMemberId)
+            {
+            case MID_HORIORIENT_ORIENT:
+            case MID_HORIORIENT_RELATION:
+                bSync = true;
+                break;
+            case MID_HORIORIENT_POSITION:
+                bSync = true;
+                bAdjustX = true;
+                break;
+            }
+            break;
+        case RES_VERT_ORIENT:
+            switch (nMemberId)
+            {
+            case MID_VERTORIENT_ORIENT:
+            case MID_VERTORIENT_RELATION:
+                bSync = true;
+                break;
+            case MID_VERTORIENT_POSITION:
+                bSync = true;
+                bAdjustY = true;
+                break;
+            }
+            break;
+        case RES_FRM_SIZE:
+            bSync = true;
+            bAdjustSize = true;
+            break;
+        }
+
+        if (bSync)
+        {
+            // Position/size should be the text position/size, not the shape one as-is.
+            if (bAdjustX || bAdjustY || bAdjustSize)
+            {
+                SdrObjCustomShape* pCustomShape = dynamic_cast<SdrObjCustomShape*>(pShape->FindRealSdrObject());
+                if (pCustomShape)
+                {
+                    Rectangle aRect;
+                    pCustomShape->GetTextBounds(aRect);
+
+                    if (bAdjustX || bAdjustY)
+                    {
+                        sal_Int32 nValue;
+                        if (aValue >>= nValue)
+                        {
+                            if (bAdjustX)
+                                nValue = TWIPS_TO_MM(aRect.getX());
+                            else if (bAdjustY)
+                                nValue = TWIPS_TO_MM(aRect.getY());
+                            aValue <<= nValue;
+                        }
+                    }
+                    else if (bAdjustSize)
+                    {
+                        awt::Size aSize(TWIPS_TO_MM(aRect.getWidth()), TWIPS_TO_MM(aRect.getHeight()));
+                        aValue <<= aSize;
+                    }
+                }
+            }
+
+            uno::Reference<beans::XPropertySet> xPropertySet(static_cast<cppu::OWeakObject*>(SwXFrames::GetObject(*pFmt, FLYCNTTYPE_FRM)), uno::UNO_QUERY);
+            xPropertySet->setPropertyValue(rPropertyName, aValue);
+        }
+    }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 8fecca0b4e7a16a14878926692333c249eff5be3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed May 14 11:36:35 2014 +0200

    WIP: oox: trigger the TextBox property on XML_txbx
    
    Change-Id: Ia3e69e61073cc915c4462c9d3fcfe07b75ac3fb3

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 6d13868..d3343b5 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -824,8 +824,7 @@ Reference< XShape > Shape::createAndInsert(
             }
             else if (mbTextBox)
             {
-                //No such property yet
-                //aShapeProps.setProperty(PROP_TextBox, uno::makeAny(true));
+                aShapeProps.setProperty(PROP_TextBox, uno::makeAny(true));
             }
 
             PropertySet( xSet ).setProperties( aShapeProps );
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index ed2b1de..cf7bb7e 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -116,7 +116,6 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
     case XML_txbx:
     {
         mpShape->getCustomShapeProperties()->setShapeTypeOverride(true);
-        mpShape->setServiceName("com.sun.star.text.TextFrame");
         mpShape->setTextBox(true);
         //in case if the textbox is linked, save the attributes
         //for further processing.
commit 0bc869459b8dfc05923249ec07ccfd4f0ddd2c2c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 16 11:05:41 2014 +0200

    Consolidate CreateTempName_Impl and lcl_createName more faithfully
    
    This is a follow-up to fcf455d4efde077bb2b092b607de12ebfc350275 "Consolidate
    CreateTempName_Impl and lcl_createName," which apparently lead to hard-to-
    diagnose sporadic "make check" failures on some machines.  Hope is that bLock
    now more carefully tracking the behavior of the original two functions fixes
    that.
    
    Change-Id: I37ba00545f5921fd603ff9f1ea46927c42e88899

diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index a62e68d..3d5814f 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -160,13 +160,13 @@ OUString ConstructTempDir_Impl( const OUString* pParent )
 }
 
 OUString lcl_createName(
-    const OUString& rLeadingChars, unsigned long nSeed, bool bFirst,
-    const OUString* pExtension, const OUString* pParent, bool bDirectory,
-    bool bKeep)
+    const OUString& rLeadingChars, unsigned long nSeed, sal_Int16 nRadix,
+    bool bFirst, const OUString* pExtension, const OUString* pParent,
+    bool bDirectory, bool bKeep, bool bLock)
 {
     // 36 ** 6 == 2176782336
-    unsigned const nRadix = 36;
-    unsigned long const nMax = (nRadix*nRadix*nRadix*nRadix*nRadix*nRadix);
+    unsigned long const nMaxRadix = 36;
+    unsigned long const nMax = (nMaxRadix*nMaxRadix*nMaxRadix*nMaxRadix*nMaxRadix*nMaxRadix);
     nSeed %= nMax;
 
     // get correct directory
@@ -179,7 +179,7 @@ OUString lcl_createName(
     {
         OUString aTmp( aName );
         if ( bUseNumber )
-            aTmp += OUString::number( i );
+            aTmp += OUString::number(i, nRadix);
         bUseNumber = true;
         if ( pExtension )
             aTmp += *pExtension;
@@ -208,11 +208,11 @@ OUString lcl_createName(
             /* RW permission for the user only! */
             mode_t old_mode = umask(077);
 #endif
-            FileBase::RC err = aFile.open(osl_File_OpenFlag_Create);
+            FileBase::RC err = aFile.open(osl_File_OpenFlag_Create | (bLock ? 0 : osl_File_OpenFlag_NoLock));
 #ifdef UNX
             umask(old_mode);
 #endif
-            if ( err == FileBase::E_None || err == FileBase::E_NOLCK )
+            if ( err == FileBase::E_None || (bLock && err == FileBase::E_NOLCK) )
             {
                 aFile.close();
                 return aTmp;
@@ -250,7 +250,8 @@ OUString CreateTempName_Impl( const OUString* pParent, bool bKeep, bool bDir = t
 #endif
 #endif
     return lcl_createName(
-        aEyeCatcher, Time::GetSystemTicks(), true, 0, pParent, bDir, bKeep);
+        aEyeCatcher, Time::GetSystemTicks(), 36, true, 0, pParent, bDir, bKeep,
+        false);
 }
 
 OUString TempFile::CreateTempName()
@@ -277,7 +278,7 @@ TempFile::TempFile( const OUString& rLeadingChars, bool _bStartWithZero, const O
     , bIsDirectory( bDirectory )
     , bKillingFileEnabled( false )
 {
-    aName = lcl_createName(rLeadingChars, 0, _bStartWithZero, pExtension, pParent, bDirectory, true);
+    aName = lcl_createName(rLeadingChars, 0, 10, _bStartWithZero, pExtension, pParent, bDirectory, true, true);
 }
 
 TempFile::~TempFile()
commit a05e5016287fdf06378e8b854a40db32d2da7204
Author: Pallavi Jadhav <pallavi.jadhav at synerzip.com>
Date:   Mon May 12 15:33:08 2014 +0530

    fdo#78432 : DOCX: File gets  corrupt after RoundTrip
    
    	Issue :
    	- In RT in document.xml, value of Absolute Position Offset
    	<wp:posOffset> was going out of bounds.
    	- <wp:posOffset> is of type Int(32-bits), hence it's value
    	should not cross the MAX and MIN limits of Int.
    
    	Implementation :
    	- Added check for <wp:posOffset> should not cross
    	Maximum/Minimum limit of Int.
    	- Written Export Unit test case.
    
    Reviewed on:
    	https://gerrit.libreoffice.org/9328
    
    Change-Id: I22e75d7e603ebbf6a49e764fb1a3e6a4d2fd8b23

diff --git a/sw/qa/extras/ooxmlexport/data/fdo78432.docx b/sw/qa/extras/ooxmlexport/data/fdo78432.docx
new file mode 100644
index 0000000..343e76a
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo78432.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index cb89ac3..014c3b9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3310,6 +3310,33 @@ DECLARE_OOXMLEXPORT_TEST(testPageBreakInFirstPara,"fdo77727.docx")
     assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:br","type","page");
 }
 
+DECLARE_OOXMLEXPORT_TEST(testAbsolutePositionOffsetValue,"fdo78432.docx")
+{
+    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+    if (!pXmlDoc)
+        return;
+
+    sal_Int32 IntMax = 2147483647;
+
+    xmlNodeSetPtr pXmlNodes[6];
+    pXmlNodes[0] = getXPathNode(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionH[1]/wp:posOffset[1]");
+    pXmlNodes[1] = getXPathNode(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionV[1]/wp:posOffset[1]");
+
+    pXmlNodes[2] = getXPathNode(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[2]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionH[1]/wp:posOffset[1]");
+    pXmlNodes[3] = getXPathNode(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[2]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionV[1]/wp:posOffset[1]");
+
+    pXmlNodes[4] = getXPathNode(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[3]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionH[1]/wp:posOffset[1]");
+    pXmlNodes[5] = getXPathNode(pXmlDoc,"/w:document[1]/w:body[1]/w:p[1]/w:r[1]/mc:AlternateContent[3]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:positionV[1]/wp:posOffset[1]");
+
+    for(sal_Int32 index = 0; index<6; ++index)
+    {
+        CPPUNIT_ASSERT(pXmlNodes[index] != 0);
+        xmlNodePtr pXmlNode = pXmlNodes[index]->nodeTab[0];
+        OUString contents = OUString::createFromAscii((const char*)((pXmlNode->children[0]).content));
+        CPPUNIT_ASSERT( contents.toInt64() <= IntMax );
+    }
+}
+
 DECLARE_OOXMLEXPORT_TEST(testFDO78284, "fdo78284.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("[Content_Types].xml");
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index dff5310..e377a36 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -44,6 +44,8 @@
 #include <writerhelper.hxx>
 #include <comphelper/seqstream.hxx>
 
+#include <climits>
+
 using namespace com::sun::star;
 using namespace oox;
 
@@ -422,7 +424,27 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS
         else
         {
             m_pImpl->m_pSerializer->startElementNS(XML_wp, XML_posOffset, FSEND);
-            m_pImpl->m_pSerializer->write(TwipsToEMU(aPos.X));
+            sal_Int64 nTwipstoEMU = TwipsToEMU(aPos.X);
+
+            /* Absolute Position Offset Value is of type Int. Hence it should not be greater than
+             * Maximum value for Int OR Less than the Minimum value for Int.
+             * - Maximum value for Int = 2147483647
+             * - Minimum value for Int = -2147483648
+             *
+             * As per ECMA Specification : ECMA-376, Second Edition,
+             * Part 1 - Fundamentals And Markup Language Reference[20.4.3.3 ST_PositionOffset (Absolute Position Offset Value)]
+             *
+             * Please refer : http://www.schemacentral.com/sc/xsd/t-xsd_int.html
+             */
+            if (nTwipstoEMU > INT_MAX)
+            {
+                nTwipstoEMU = INT_MAX;
+            }
+            else if (nTwipstoEMU < INT_MIN)
+            {
+                nTwipstoEMU = INT_MIN;
+            }
+            m_pImpl->m_pSerializer->write(nTwipstoEMU);
             m_pImpl->m_pSerializer->endElementNS(XML_wp, XML_posOffset);
         }
         m_pImpl->m_pSerializer->endElementNS(XML_wp, XML_positionH);
@@ -436,7 +458,16 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS
         else
         {
             m_pImpl->m_pSerializer->startElementNS(XML_wp, XML_posOffset, FSEND);
-            m_pImpl->m_pSerializer->write(TwipsToEMU(aPos.Y));
+            sal_Int64 nTwipstoEMU = TwipsToEMU(aPos.Y);
+            if (nTwipstoEMU > INT_MAX)
+            {
+                nTwipstoEMU = INT_MAX;
+            }
+            else if (nTwipstoEMU < INT_MIN)
+            {
+                nTwipstoEMU = INT_MIN;
+            }
+            m_pImpl->m_pSerializer->write(nTwipstoEMU);
             m_pImpl->m_pSerializer->endElementNS(XML_wp, XML_posOffset);
         }
         m_pImpl->m_pSerializer->endElementNS(XML_wp, XML_positionV);
commit 5a9399a62873dae10e6486e8a6764b163283c0e1
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri May 16 08:40:11 2014 +0200

    small hickup

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 68c9093..3697903 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -100,8 +100,8 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
             float nXPos = nIndex * (nBarSizeX + nBarDistanceX);
 
 
-            glm::mat4 aScaleMatrix = glm::scale(nBarSizeX, nBarSizeY, static_cast<float>(0));
-            glm::mat4 aTranslationMatrix = glm::translate(nXPos, nYPos, nVal);
+            glm::mat4 aScaleMatrix = glm::scale(nBarSizeX, nBarSizeY, nVal);
+            glm::mat4 aTranslationMatrix = glm::translate(nXPos, nYPos, static_cast<float>(0));
             glm::mat4 aBarPosition = aTranslationMatrix * aScaleMatrix;
 
             maShapes.push_back(new opengl3D::Bar(mpRenderer.get(), aBarPosition, nColor, nId++));
commit 48eccfb812284f43ba24c3be3903537ce954944d
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu May 15 20:32:05 2014 -0400

    fdo#77537: Exporting font names in edit text needs special handling.
    
    Change-Id: Ia9c29d37eaf962e0245920e50f534dd779af72dc

diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index b1f831d..737a881 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -1116,10 +1116,18 @@ const SvxFieldData* toXMLPropertyStates(
             case EE_CHAR_FONTINFO_CJK:
             case EE_CHAR_FONTINFO_CTL:
             {
-                if (!static_cast<const SvxFontItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
-                    continue;
+                // Apparently font info needs special handling.
+                const SvxFontItem* pItem = static_cast<const SvxFontItem*>(p);
 
-                rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+                sal_Int32 nIndexFontName = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, "font-name", 0);
+
+                if (nIndexFontName == -1 || nIndexFontName >= nEntryCount)
+                    break;
+
+                if (!pItem->QueryValue(aAny, MID_FONT_FAMILY_NAME))
+                    break;
+
+                rPropStates.push_back(XMLPropertyState(nIndexFontName, aAny));
             }
             break;
             case EE_CHAR_WEIGHT:
commit 90f7bd61fb1c4665051f721bb7721277a79eb267
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu May 15 20:27:44 2014 -0400

    fdo#77537: Write export test for this.
    
    Change-Id: I2960713b1005c5f91fe78d12e33f1786978eac67

diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index f984e69..ab25140 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -44,6 +44,7 @@
 #include <editeng/section.hxx>
 #include <editeng/crossedoutitem.hxx>
 #include <editeng/borderline.hxx>
+#include <editeng/fontitem.hxx>
 #include <formula/grammar.hxx>
 
 #include <com/sun/star/table/BorderLineStyle.hpp>
@@ -441,6 +442,19 @@ void setAttribute( ScFieldEditEngine& rEE, sal_Int32 nPara, sal_Int32 nStart, sa
     }
 }
 
+void setFont( ScFieldEditEngine& rEE, sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, const OUString& rFontName )
+{
+    ESelection aSel;
+    aSel.nStartPara = aSel.nEndPara = nPara;
+    aSel.nStartPos = nStart;
+    aSel.nEndPos = nEnd;
+
+    SfxItemSet aItemSet = rEE.GetEmptyItemSet();
+    SvxFontItem aItem(FAMILY_MODERN, rFontName, "", PITCH_VARIABLE, RTL_TEXTENCODING_UTF8, EE_CHAR_FONTINFO);
+    aItemSet.Put(aItem);
+    rEE.QuickSetAttribs(aItemSet, aSel);
+}
+
 }
 
 void ScExportTest::testNamedRangeBugfdo62729()
@@ -525,6 +539,23 @@ void ScExportTest::testRichTextExportODS()
             return false;
         }
 
+        static bool isFont(const editeng::Section& rAttr, const OUString& rFontName)
+        {
+            if (rAttr.maAttributes.empty())
+                return false;
+
+            std::vector<const SfxPoolItem*>::const_iterator it = rAttr.maAttributes.begin(), itEnd = rAttr.maAttributes.end();
+            for (; it != itEnd; ++it)
+            {
+                const SfxPoolItem* p = *it;
+                if (p->Which() != EE_CHAR_FONTINFO)
+                    continue;
+
+                return static_cast<const SvxFontItem*>(p)->GetFamilyName() == rFontName;
+            }
+            return false;
+        }
+
         bool checkB2(const EditTextObject* pText) const
         {
             if (!pText)
@@ -649,27 +680,62 @@ void ScExportTest::testRichTextExportODS()
             return true;
         }
 
+        bool checkB7(const EditTextObject* pText) const
+        {
+            if (!pText)
+                return false;
+
+            if (pText->GetParagraphCount() != 1)
+                return false;
+
+            if (pText->GetText(0) != "Font1 and Font2")
+                return false;
+
+            std::vector<editeng::Section> aSecAttrs;
+            pText->GetAllSections(aSecAttrs);
+            if (aSecAttrs.size() != 3)
+                return false;
+
+            // First section should have "Courier" font applied.
+            const editeng::Section* pAttr = &aSecAttrs[0];
+            if (pAttr->mnParagraph != 0 ||pAttr->mnStart != 0 || pAttr->mnEnd != 5)
+                return false;
+
+            if (pAttr->maAttributes.size() != 1 || !isFont(*pAttr, "Courier"))
+                return false;
+
+            // Last section should have "Luxi Mono" applied.
+            pAttr = &aSecAttrs[2];
+            if (pAttr->mnParagraph != 0 ||pAttr->mnStart != 10 || pAttr->mnEnd != 15)
+                return false;
+
+            if (pAttr->maAttributes.size() != 1 || !isFont(*pAttr, "Luxi Mono"))
+                return false;
+
+            return true;
+        }
+
     } aCheckFunc;
 
     // Start with an empty document, put one edit text cell, and make sure it
     // survives the save and reload.
-    ScDocShellRef xOrigDocSh = loadDoc("empty.", ODS);
+    ScDocShellRef xOrigDocSh = loadDoc("empty.", ODS, true);
     ScDocument* pDoc = xOrigDocSh->GetDocument();
     CPPUNIT_ASSERT(pDoc);
     CPPUNIT_ASSERT_MESSAGE("This document should at least have one sheet.", pDoc->GetTableCount() > 0);
 
     // Insert an edit text cell.
-    ScFieldEditEngine& rEE = pDoc->GetEditEngine();
-    rEE.SetText("Bold and Italic");
+    ScFieldEditEngine* pEE = &pDoc->GetEditEngine();
+    pEE->SetText("Bold and Italic");
     // Set the 'Bold' part bold.
-    setAttribute(rEE, 0, 0, 4, EE_CHAR_WEIGHT);
+    setAttribute(*pEE, 0, 0, 4, EE_CHAR_WEIGHT);
     // Set the 'Italic' part italic.
-    setAttribute(rEE, 0, 9, 15, EE_CHAR_ITALIC);
+    setAttribute(*pEE, 0, 9, 15, EE_CHAR_ITALIC);
     ESelection aSel;
     aSel.nStartPara = aSel.nEndPara = 0;
 
     // Set this edit text to cell B2.
-    pDoc->SetEditText(ScAddress(1,1,0), rEE.CreateTextObject());
+    pDoc->SetEditText(ScAddress(1,1,0), pEE->CreateTextObject());
     const EditTextObject* pEditText = pDoc->GetEditText(ScAddress(1,1,0));
     CPPUNIT_ASSERT_MESSAGE("Incorret B2 value.", aCheckFunc.checkB2(pEditText));
 
@@ -680,20 +746,22 @@ void ScExportTest::testRichTextExportODS()
     pDoc = xNewDocSh->GetDocument();
     CPPUNIT_ASSERT(pDoc);
     CPPUNIT_ASSERT_MESSAGE("Reloaded document should at least have one sheet.", pDoc->GetTableCount() > 0);
+    pEE = &pDoc->GetEditEngine();
 
     // Make sure the content of B2 is still intact.
     CPPUNIT_ASSERT_MESSAGE("Incorret B2 value.", aCheckFunc.checkB2(pEditText));
 
     // Insert a multi-line content to B4.
-    rEE.Clear();
-    rEE.SetText("One\nTwo\nThree");
-    pDoc->SetEditText(ScAddress(3,1,0), rEE.CreateTextObject());
+    pEE->Clear();
+    pEE->SetText("One\nTwo\nThree");
+    pDoc->SetEditText(ScAddress(3,1,0), pEE->CreateTextObject());
     pEditText = pDoc->GetEditText(ScAddress(3,1,0));
     CPPUNIT_ASSERT_MESSAGE("Incorret B4 value.", aCheckFunc.checkB4(pEditText));
 
     // Reload the doc again, and check the content of B2 and B4.
     ScDocShellRef xNewDocSh2 = saveAndReload(xNewDocSh, ODS);
     pDoc = xNewDocSh2->GetDocument();
+    pEE = &pDoc->GetEditEngine();
     xNewDocSh->DoClose();
 
     pEditText = pDoc->GetEditText(ScAddress(1,1,0));
@@ -702,22 +770,31 @@ void ScExportTest::testRichTextExportODS()
     CPPUNIT_ASSERT_MESSAGE("Incorret B4 value.", aCheckFunc.checkB4(pEditText));
 
     // Insert a multi-line content to B5, but this time, set some empty paragraphs.
-    rEE.Clear();
-    rEE.SetText("\nTwo\nThree\n\nFive\n");
-    pDoc->SetEditText(ScAddress(4,1,0), rEE.CreateTextObject());
+    pEE->Clear();
+    pEE->SetText("\nTwo\nThree\n\nFive\n");
+    pDoc->SetEditText(ScAddress(4,1,0), pEE->CreateTextObject());
     pEditText = pDoc->GetEditText(ScAddress(4,1,0));
     CPPUNIT_ASSERT_MESSAGE("Incorret B5 value.", aCheckFunc.checkB5(pEditText));
 
     // Insert a text with strikethrough in B6.
-    rEE.Clear();
-    rEE.SetText("Strike Me");
+    pEE->Clear();
+    pEE->SetText("Strike Me");
     // Set the 'Strike' part strikethrough.
-    setAttribute(rEE, 0, 0, 6, EE_CHAR_STRIKEOUT);
-    pDoc->SetEditText(ScAddress(5,1,0), rEE.CreateTextObject());
+    setAttribute(*pEE, 0, 0, 6, EE_CHAR_STRIKEOUT);
+    pDoc->SetEditText(ScAddress(5,1,0), pEE->CreateTextObject());
     pEditText = pDoc->GetEditText(ScAddress(5,1,0));
     CPPUNIT_ASSERT_MESSAGE("Incorret B6 value.", aCheckFunc.checkB6(pEditText));
 
-    // Reload the doc again, and check the content of B2, B4 and B6.
+    // Insert a text with different font segments in B7.
+    pEE->Clear();
+    pEE->SetText("Font1 and Font2");
+    setFont(*pEE, 0, 0, 5, "Courier");
+    setFont(*pEE, 0, 10, 15, "Luxi Mono");
+    pDoc->SetEditText(ScAddress(6,1,0), pEE->CreateTextObject());
+    pEditText = pDoc->GetEditText(ScAddress(6,1,0));
+    CPPUNIT_ASSERT_MESSAGE("Incorret B7 value.", aCheckFunc.checkB7(pEditText));
+
+    // Reload the doc again, and check the content of B2, B4, B6 and B7.
     ScDocShellRef xNewDocSh3 = saveAndReload(xNewDocSh2, ODS);
     pDoc = xNewDocSh3->GetDocument();
     xNewDocSh2->DoClose();
@@ -730,6 +807,8 @@ void ScExportTest::testRichTextExportODS()
     CPPUNIT_ASSERT_MESSAGE("Incorret B5 value.", aCheckFunc.checkB5(pEditText));
     pEditText = pDoc->GetEditText(ScAddress(5,1,0));
     CPPUNIT_ASSERT_MESSAGE("Incorret B6 value.", aCheckFunc.checkB6(pEditText));
+    pEditText = pDoc->GetEditText(ScAddress(6,1,0));
+    CPPUNIT_ASSERT_MESSAGE("Incorret B7 value.", aCheckFunc.checkB7(pEditText));
 
     xNewDocSh3->DoClose();
 }
commit fd70beaccb8655ed962bb306ed34c6c134e3922e
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Thu May 15 23:50:23 2014 +0200

    vcl wmf test: null terminate stream
    
    Change-Id: I10342262cacbe3e3d978fee652cdbc4692f46dc4

diff --git a/vcl/qa/cppunit/wmf/wmfimporttest.cxx b/vcl/qa/cppunit/wmf/wmfimporttest.cxx
index d4db955..12d1942 100644
--- a/vcl/qa/cppunit/wmf/wmfimporttest.cxx
+++ b/vcl/qa/cppunit/wmf/wmfimporttest.cxx
@@ -54,6 +54,7 @@ void WmfTest::testNonPlaceableWmf()
     dumper.filterActionType(META_POLYLINE_ACTION, false);
     dumper.dump(aGDIMetaFile);
 
+    aStream->WriteChar(0);
     aStream->Seek(STREAM_SEEK_TO_BEGIN);
 
     xmlDocPtr pDoc = parseXmlStream(aStream.get());
commit fb1e8105536a5c3a2cbe291e012294da562cd9f4
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Thu May 15 23:49:17 2014 +0200

    test: don't create root element in startDocument() in xmlwriter
    
    Change-Id: Ia08e9f8caf2a2fb42855dcb2245e013e1a181216

diff --git a/include/test/xmlwriter.hxx b/include/test/xmlwriter.hxx
index e4df527..1f5bfc7 100644
--- a/include/test/xmlwriter.hxx
+++ b/include/test/xmlwriter.hxx
@@ -25,7 +25,7 @@ public:
     XmlWriter(xmlTextWriterPtr pWriter);
     virtual ~XmlWriter();
 
-    void startDocument(const OString& sTagName);
+    void startDocument();
     void endDocument();
 
     void element(const OString& sTagName);
diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx
index ef127e3..31f9aba 100644
--- a/test/source/mtfxmldump.cxx
+++ b/test/source/mtfxmldump.cxx
@@ -168,7 +168,8 @@ void MetafileXmlDump::dump(GDIMetaFile& rMetaFile)
     xmlTextWriterSetIndent( xmlWriter, 1 );
 
     XmlWriter aWriter(xmlWriter);
-    aWriter.startDocument("metafile");
+    aWriter.startDocument();
+    aWriter.startElement("metafile");
 
     for(MetaAction* pAction = rMetaFile.FirstAction(); pAction != NULL; pAction = rMetaFile.NextAction())
     {
@@ -391,12 +392,9 @@ void MetafileXmlDump::dump(GDIMetaFile& rMetaFile)
 
         }
     }
-    aWriter.endDocument();
 
-    for(size_t i=0; i<usedIds.size(); ++i)
-        if(usedIds[i])
-            printf("%ld ", i);
-    printf("\n");
+    aWriter.endElement();
+    aWriter.endDocument();
 
     mrStream.WriteOString(aString.makeStringAndClear());
 }
diff --git a/test/source/xmlwriter.cxx b/test/source/xmlwriter.cxx
index 3485f10..b1166be 100644
--- a/test/source/xmlwriter.cxx
+++ b/test/source/xmlwriter.cxx
@@ -27,10 +27,9 @@ XmlWriter::XmlWriter(xmlTextWriterPtr pWriter) :
 XmlWriter::~XmlWriter()
 {}
 
-void XmlWriter::startDocument(const OString& name)
+void XmlWriter::startDocument()
 {
     xmlTextWriterStartDocument(mpWriter, NULL, NULL, NULL);
-    startElement(name);
 }
 
 void XmlWriter::endDocument()
commit b7cb2ae5026cfd3bb30f148ed40f244b5c128876
Author: Lennard Wasserthal <Wasserthal at nefkom.net>
Date:   Sat Sep 7 14:00:01 2013 +0200

    fdo#55582 Writer: Dont overwrite from even when selected, from writer.
    
    This patch fixes the writer part, calc part is fixed long ago.
    Problem: it overwrites when you paste from impress or calc.
    This allows to keep the graphic's frame,
    so the text doesn't have to be rearranged.
    (i.e. it is desired, so I didn't change that)
    I was trying to give the user a choice,
    but I didn't succeed in keeping the frame when pasting from writer to writer.
    coming soon!
    
    Change-Id: I07271df9bb501779d06f332bb13edd05f0aefacb
    Signed-off-by: Lennard Wasserthal <Wasserthal at nefkom.net>

diff --git a/sw/source/core/uibase/dochdl/swdtflvr.cxx b/sw/source/core/uibase/dochdl/swdtflvr.cxx
index 447dbfd..62938d5 100644
--- a/sw/source/core/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/core/uibase/dochdl/swdtflvr.cxx
@@ -3203,8 +3203,8 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell )
 
     bool bKillPaMs = false;
 
-    //Delete selected content, not at table-selection and table in Clipboard
-    if( rShell.HasSelection() && !( nSelection & nsSelectionType::SEL_TBL_CELLS))
+    //Delete selected content, not at table-selection and table in Clipboard, and dont delete hovering graphics.
+    if( rShell.HasSelection() && !( nSelection & nsSelectionType::SEL_TBL_CELLS) && !( nSelection & nsSelectionType::SEL_DRW))
     {
         bKillPaMs = true;
         rShell.SetRetainSelection( true );
@@ -3221,6 +3221,10 @@ bool SwTransferable::PrivatePaste( SwWrtShell& rShell )
         }
         rShell.SetRetainSelection( false );
     }
+    if ( nSelection & nsSelectionType::SEL_DRW) //unselect hovering graphics
+    {
+       rShell.ResetSelect(NULL,false);
+    }
 
     bool bInWrd = false, bEndWrd = false, bSttWrd = false,
          bSmart = 0 != (TRNSFR_DOCUMENT_WORD & eBufferType);
commit 0b3d0fb2d9256dc6bae6af69ed494487004def75
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu May 15 23:28:55 2014 +0200

    fdo#78159: fix import of OOoXML embedded objects
    
    MimeConfigurationHelper::GetDefaultFilterFromServiceName() checks that
    there is both an import and an export filter, and for OOoXML the export
    has been removed; tweak the check to require only import for OOoXML.
    
    Currently it still works invoke the OOoXML filter, but it is clearly
    better to store the embedded documents only in ODF, so tweak
    OCommonEmbeddedObject::store* methods to do that.
    
    (regression from aeeaccf59abbc485d7786486f1accc1cb4d4dbf7)
    
    Change-Id: Ib71f23fd110cbd4b570517f2dde2c53e3aa6301d

diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx
index 6f25f00..249f474 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -743,7 +743,12 @@ OUString MimeConfigurationHelper::GetDefaultFilterFromServiceName( const OUStrin
                         sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( "Flags", (sal_Int32)0 );
 
                         // that should be import, export, own filter and not a template filter ( TemplatePath flag )
-                        sal_Int32 nRequired = ( SFX_FILTER_OWN | SFX_FILTER_EXPORT | SFX_FILTER_IMPORT );
+                        sal_Int32 const nRequired = (SFX_FILTER_OWN
+                            // fdo#78159 for OOoXML, there is code to convert
+                            // to ODF in OCommonEmbeddedObject::store*
+                            // so accept it even though there's no export
+                            | (SOFFICE_FILEFORMAT_60 == nVersion ? 0 : SFX_FILTER_EXPORT)
+                            | SFX_FILTER_IMPORT );
                         if ( ( ( nFlags & nRequired ) == nRequired ) && !( nFlags & SFX_FILTER_TEMPLATEPATH ) )
                         {
                             // if there are more than one filter the preffered one should be used
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index 2db77f65..4d2ddc8 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -1165,6 +1165,12 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed::
     {
         SAL_WARN( "embeddedobj.common", "Can not retrieve target storage media type!" );
     }
+    if (nTargetStorageFormat == SOFFICE_FILEFORMAT_60)
+    {
+        SAL_INFO("embeddedobj.common", "fdo#78159: Storing OOoXML as ODF");
+        nTargetStorageFormat = SOFFICE_FILEFORMAT_CURRENT;
+        // setting MediaType is done later anyway, no need to do it here
+    }
 
     try
     {
@@ -1294,6 +1300,12 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed::
     {
         SAL_WARN( "embeddedobj.common", "Can not retrieve target storage media type!" );
     }
+    if (nTargetStorageFormat == SOFFICE_FILEFORMAT_60)
+    {
+        SAL_INFO("embeddedobj.common", "fdo#78159: Storing OOoXML as ODF");
+        nTargetStorageFormat = SOFFICE_FILEFORMAT_CURRENT;
+        // setting MediaType is done later anyway, no need to do it here
+    }
 
     try
     {
@@ -1579,6 +1591,12 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn()
         {
             SAL_WARN( "embeddedobj.common", "Can not retrieve storage media type!" );
         }
+        if (nStorageFormat == SOFFICE_FILEFORMAT_60)
+        {
+            SAL_INFO("embeddedobj.common", "fdo#78159: Storing OOoXML as ODF");
+            nStorageFormat = SOFFICE_FILEFORMAT_CURRENT;
+            // setting MediaType is done later anyway, no need to do it here
+        }
 
         aGuard.clear();
         StoreDocToStorage_Impl( m_xObjectStorage, nStorageFormat, GetBaseURL_Impl(), m_aEntryName, true );
commit 68741d0055f3b76f88ca225b0ebe4991d6cb2f7f
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Thu May 15 22:51:43 2014 +0200

    Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part13
    
    Change-Id: Ieecfd7ccb10c75ac639d0ba8e7cb588607097c2a

diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 3a53c0c..df5c361 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1931,7 +1931,7 @@ public:
 uno::Type ModuleContainer_Impl::getElementType()
     throw(uno::RuntimeException, std::exception)
 {
-    uno::Type aModuleType = ::getCppuType( (const uno::Reference< script::XStarBasicModuleInfo > *)0 );
+    uno::Type aModuleType = cppu::UnoType<script::XStarBasicModuleInfo>::get();
     return aModuleType;
 }
 
@@ -1993,7 +1993,7 @@ void ModuleContainer_Impl::replaceByName( const OUString& aName, const uno::Any&
 void ModuleContainer_Impl::insertByName( const OUString& aName, const uno::Any& aElement )
     throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
 {
-    uno::Type aModuleType = ::getCppuType( (const uno::Reference< script::XStarBasicModuleInfo > *)0 );
+    uno::Type aModuleType = cppu::UnoType<script::XStarBasicModuleInfo>::get();
     uno::Type aAnyType = aElement.getValueType();
     if( aModuleType != aAnyType )
     {
@@ -2080,7 +2080,7 @@ public:
 uno::Type DialogContainer_Impl::getElementType()
     throw(uno::RuntimeException, std::exception)
 {
-    uno::Type aModuleType = ::getCppuType( (const uno::Reference< script::XStarBasicDialogInfo > *)0 );
+    uno::Type aModuleType = cppu::UnoType<script::XStarBasicDialogInfo>::get();
     return aModuleType;
 }
 
@@ -2173,7 +2173,7 @@ void DialogContainer_Impl::insertByName( const OUString& aName, const uno::Any&
     throw(lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
 {
     (void)aName;
-    uno::Type aModuleType = ::getCppuType( (const uno::Reference< script::XStarBasicDialogInfo > *)0 );
+    uno::Type aModuleType = cppu::UnoType<script::XStarBasicDialogInfo>::get();
     uno::Type aAnyType = aElement.getValueType();
     if( aModuleType != aAnyType )
     {
@@ -2240,7 +2240,7 @@ public:
 uno::Type LibraryContainer_Impl::getElementType()
     throw(uno::RuntimeException, std::exception)
 {
-    uno::Type aType = ::getCppuType( (const uno::Reference< script::XStarBasicLibraryInfo > *)0 );
+    uno::Type aType = cppu::UnoType<script::XStarBasicLibraryInfo>::get();
     return aType;
 }
 
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 102fe6c..85343b2 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -848,26 +848,26 @@ Type getUnoTypeForSbxBaseType( SbxDataType eType )
     switch( eType )
     {
         case SbxNULL:       aRetType = ::getCppuType( (const Reference< XInterface > *)0 ); break;
-        case SbxINTEGER:    aRetType = ::cppu::UnoType<sal_Int16>::get(); break;
-        case SbxLONG:       aRetType = ::cppu::UnoType<sal_Int32>::get(); break;
-        case SbxSINGLE:     aRetType = ::cppu::UnoType<float>::get(); break;
-        case SbxDOUBLE:     aRetType = ::cppu::UnoType<double>::get(); break;
-        case SbxCURRENCY:   aRetType = ::getCppuType( (oleautomation::Currency*)0 ); break;
-        case SbxDECIMAL:    aRetType = ::getCppuType( (oleautomation::Decimal*)0 ); break;
+        case SbxINTEGER:    aRetType = cppu::UnoType<sal_Int16>::get(); break;
+        case SbxLONG:       aRetType = cppu::UnoType<sal_Int32>::get(); break;
+        case SbxSINGLE:     aRetType = cppu::UnoType<float>::get(); break;
+        case SbxDOUBLE:     aRetType = cppu::UnoType<double>::get(); break;
+        case SbxCURRENCY:   aRetType = cppu::UnoType<oleautomation::Currency>::get(); break;
+        case SbxDECIMAL:    aRetType = cppu::UnoType<oleautomation::Decimal>::get(); break;
         case SbxDATE:       {
                             SbiInstance* pInst = GetSbData()->pInst;
                             if( pInst && pInst->IsCompatibility() )
-                                aRetType = ::cppu::UnoType<double>::get();
+                                aRetType = cppu::UnoType<double>::get();
                             else
-                                aRetType = ::getCppuType( (oleautomation::Date*)0 );
+                                aRetType = cppu::UnoType<oleautomation::Date>::get();
                             }
                             break;
-        case SbxSTRING:     aRetType = ::cppu::UnoType<OUString>::get(); break;
-        case SbxBOOL:       aRetType = ::getCppuType( (sal_Bool*)0 ); break;
-        case SbxVARIANT:    aRetType = ::getCppuType( (Any*)0 ); break;
-        case SbxCHAR:       aRetType = ::getCppuType( (sal_Unicode*)0 ); break;
-        case SbxBYTE:       aRetType = ::cppu::UnoType<sal_Int8>::get(); break;
-        case SbxUSHORT:     aRetType = ::getCppuType( (sal_uInt16*)0 ); break;
+        case SbxSTRING:     aRetType = cppu::UnoType<OUString>::get(); break;
+        case SbxBOOL:       aRetType = cppu::UnoType<sal_Bool>::get(); break;
+        case SbxVARIANT:    aRetType = cppu::UnoType<Any>::get(); break;
+        case SbxCHAR:       aRetType = cppu::UnoType<cppu::UnoCharType>::get(); break;
+        case SbxBYTE:       aRetType = cppu::UnoType<sal_Int8>::get(); break;
+        case SbxUSHORT:     aRetType = cppu::UnoType<cppu::UnoUnsignedShortType>::get(); break;
         case SbxULONG:      aRetType = ::cppu::UnoType<sal_uInt32>::get(); break;
         // map machine-dependent ones to long for consistency
         case SbxINT:        aRetType = ::cppu::UnoType<sal_Int32>::get(); break;
@@ -926,7 +926,7 @@ Type getUnoTypeForSbxValue( const SbxValue* pVal )
                             {
                                 // if only first element is void: different types  -> []any
                                 // if all elements are void: []void is not allowed -> []any
-                                aElementType = getCppuType( (Any*)0 );
+                                aElementType = cppu::UnoType<Any>::get();
                                 break;
                             }
                             aElementType = aType;
@@ -935,7 +935,7 @@ Type getUnoTypeForSbxValue( const SbxValue* pVal )
                         else if( aElementType != aType )
                         {
                             // different types -> AnySequence
-                            aElementType = getCppuType( (Any*)0 );
+                            aElementType = cppu::UnoType<Any>::get();
                             break;
                         }
                     }
@@ -963,7 +963,7 @@ Type getUnoTypeForSbxValue( const SbxValue* pVal )
                             {
                                 // if only first element is void: different types  -> []any
                                 // if all elements are void: []void is not allowed -> []any
-                                aElementType = getCppuType( (Any*)0 );
+                                aElementType = cppu::UnoType<Any>::get();
                                 break;
                             }
                             aElementType = aType;
@@ -972,7 +972,7 @@ Type getUnoTypeForSbxValue( const SbxValue* pVal )
                         else if( aElementType != aType )
                         {
                             // different types -> AnySequence
-                            aElementType = getCppuType( (Any*)0 );
+                            aElementType = cppu::UnoType<Any>::get();
                             break;
                         }
                     }
@@ -1087,16 +1087,16 @@ Any sbxToUnoValueImpl( const SbxValue* pVar, bool bBlockConversionToSmallestType
             {
                 sal_uInt16 n = pVar->GetUShort();
                 if( n <= 255 )
-                    aType = ::getCppuType( (sal_uInt8*)0 );
+                    aType = cppu::UnoType<sal_uInt8>::get();
                 break;
             }
             case TypeClass_UNSIGNED_LONG:
             {
                 sal_uInt32 n = pVar->GetLong();
                 if( n <= 255 )
-                    aType = ::getCppuType( (sal_uInt8*)0 );
+                    aType = cppu::UnoType<sal_uInt8>::get();
                 else if( n <= SbxMAXUINT )
-                    aType = ::getCppuType( (sal_uInt16*)0 );
+                    aType = cppu::UnoType<cppu::UnoUnsignedShortType>::get();
                 break;
             }
             // TODO: need to add hyper types ?
@@ -1247,20 +1247,20 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper
                     SbiInstance* pInst = GetSbData()->pInst;
                     if( pInst && pInst->IsCompatibility() )
                     {
-                        if( rType == ::getCppuType( (oleautomation::Decimal*)0 ) )
+                        if( rType == cppu::UnoType<oleautomation::Decimal>::get())
                         {
                             oleautomation::Decimal aDecimal;
                             pVar->fillAutomationDecimal( aDecimal );
                             aRetVal <<= aDecimal;
                             break;
                         }
-                        else if( rType == ::getCppuType( (oleautomation::Currency*)0 ) )
+                        else if( rType == cppu::UnoType<oleautomation::Currency>::get())
                         {
                             // assumes per previous code that ole Currency is Int64
                             aRetVal <<= (sal_Int64)( pVar->GetInt64() );
                             break;
                         }
-                        else if( rType == ::getCppuType( (oleautomation::Date*)0 ) )
+                        else if( rType == cppu::UnoType<oleautomation::Date>::get())
                         {
                             oleautomation::Date aDate;
                             aDate.Value = pVar->GetDate();
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 1dfeb8f..fe2f00d 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1887,7 +1887,7 @@ RTLFUNC(CDateFromUnoDate)
         return;
     }
 
-    Any aAny (sbxToUnoValue(rPar.Get(1), ::getCppuType( (com::sun::star::util::Date*)0 )));
+    Any aAny (sbxToUnoValue(rPar.Get(1), cppu::UnoType<com::sun::star::util::Date>::get()));
     com::sun::star::util::Date aUnoDate;
     if(aAny >>= aUnoDate)
         SbxDateFromUNODate(rPar.Get(0), aUnoDate);
@@ -1940,7 +1940,7 @@ RTLFUNC(CDateFromUnoTime)
         return;
     }
 
-    Any aAny (sbxToUnoValue(rPar.Get(1), ::getCppuType( (com::sun::star::util::Time*)0 )));
+    Any aAny (sbxToUnoValue(rPar.Get(1), cppu::UnoType<com::sun::star::util::Time>::get()));
     com::sun::star::util::Time aUnoTime;
     if(aAny >>= aUnoTime)
         SbxDateFromUNOTime(rPar.Get(0), aUnoTime);
@@ -2002,7 +2002,7 @@ RTLFUNC(CDateFromUnoDateTime)
         return;
     }
 
-    Any aAny (sbxToUnoValue(rPar.Get(1), ::getCppuType( (com::sun::star::util::DateTime*)0 )));
+    Any aAny (sbxToUnoValue(rPar.Get(1), cppu::UnoType<com::sun::star::util::DateTime>::get()));
     com::sun::star::util::DateTime aUnoDT;
     if(aAny >>= aUnoDT)
         SbxDateFromUNODateTime(rPar.Get(0), aUnoDT);
diff --git a/framework/inc/macros/xtypeprovider.hxx b/framework/inc/macros/xtypeprovider.hxx
index 498c877..0aa9bbf 100644
--- a/framework/inc/macros/xtypeprovider.hxx
+++ b/framework/inc/macros/xtypeprovider.hxx
@@ -243,7 +243,7 @@ ________________________________________________________________________________
 
 #define PRIVATE_DEFINE_XTYPEPROVIDER_PURE( CLASS )                                                                                                          \
     PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS )                                                                                               \
-    PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, ::getCppuType(( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider >*)NULL ) )
+    PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, cppu::UnoType<com::sun::star::lang::XTypeProvider>::get())
 
 #define PRIVATE_DEFINE_XTYPEPROVIDER( CLASS, TYPES )                                                                                                        \
     PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS )                                                                                               \
diff --git a/framework/source/fwe/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx
index 6e5a12d..a1d0e5e 100644
--- a/framework/source/fwe/classes/actiontriggerpropertyset.cxx
+++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx
@@ -307,10 +307,10 @@ const Sequence< Property > ActionTriggerPropertySet::impl_getStaticPropertyDescr
 {
     const Property pActionTriggerPropertys[] =
     {
-        Property( OUString( "CommandURL"    ), HANDLE_COMMANDURL   , ::getCppuType((OUString*)0)                , PropertyAttribute::TRANSIENT  ),
-        Property( OUString( "HelpURL"       ), HANDLE_HELPURL      , ::getCppuType((OUString*)0)                , PropertyAttribute::TRANSIENT  ),
+        Property( OUString( "CommandURL"    ), HANDLE_COMMANDURL   , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT  ),
+        Property( OUString( "HelpURL"       ), HANDLE_HELPURL      , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT  ),
         Property( OUString( "Image"         ), HANDLE_IMAGE     , ::getCppuType((Reference<XBitmap>*)0)     , PropertyAttribute::TRANSIENT  ),
-        Property( OUString( "SubContainer"  ), HANDLE_SUBCONTAINER , ::getCppuType((OUString*)0)                , PropertyAttribute::TRANSIENT  ),
+        Property( OUString( "SubContainer"  ), HANDLE_SUBCONTAINER , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT  ),
         Property( OUString( "Text"          ), HANDLE_TEXT         , ::getCppuType((Reference<XInterface>*)0)  , PropertyAttribute::TRANSIENT  )
     };
 
diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx
index 87324dd..2622311 100644
--- a/framework/source/fwi/uielement/constitemcontainer.cxx
+++ b/framework/source/fwi/uielement/constitemcontainer.cxx
@@ -398,7 +398,7 @@ const com::sun::star::uno::Sequence< com::sun::star::beans::Property > ConstItem
     const com::sun::star::beans::Property pProperties[] =
     {
         com::sun::star::beans::Property( OUString(PROPNAME_UINAME), PROPHANDLE_UINAME ,
-                                         ::getCppuType((const OUString*)NULL),
+                                         cppu::UnoType<OUString>::get(),
                                          com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY  )
     };
     // Use it to initialize sequence!
diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx
index 9ff376ac..b7a9141 100644
--- a/framework/source/fwi/uielement/rootitemcontainer.cxx
+++ b/framework/source/fwi/uielement/rootitemcontainer.cxx
@@ -367,7 +367,7 @@ const com::sun::star::uno::Sequence< com::sun::star::beans::Property > RootItemC
     const com::sun::star::beans::Property pProperties[] =
     {
         com::sun::star::beans::Property( OUString(PROPNAME_UINAME), PROPHANDLE_UINAME ,
-                                         ::getCppuType((const OUString*)NULL),
+                                         cppu::UnoType<OUString>::get(),
                                          com::sun::star::beans::PropertyAttribute::TRANSIENT )
     };
     // Use it to initialize sequence!
diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx
index 300d8c8..741b9ea 100644
--- a/framework/source/helper/uiconfigelementwrapperbase.cxx
+++ b/framework/source/helper/uiconfigelementwrapperbase.cxx
@@ -95,12 +95,12 @@ Sequence< Type > SAL_CALL UIConfigElementWrapperBase::getTypes(  ) throw(Runtime
 // XComponent
 void SAL_CALL UIConfigElementWrapperBase::addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception)
 {
-    m_aListenerContainer.addInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), xListener );
+    m_aListenerContainer.addInterface( cppu::UnoType<css::lang::XEventListener>::get(), xListener );
 }
 
 void SAL_CALL UIConfigElementWrapperBase::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException, std::exception)
 {
-    m_aListenerContainer.removeInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), aListener );
+    m_aListenerContainer.removeInterface( cppu::UnoType<css::lang::XEventListener>::get(), aListener );
 }
 
 // XEventListener
@@ -434,13 +434,13 @@ const com::sun::star::uno::Sequence< com::sun::star::beans::Property > UIConfigE
 
     const com::sun::star::beans::Property pProperties[] =
     {
-        com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_CONFIGLISTENER), UIELEMENT_PROPHANDLE_CONFIGLISTENER , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT  ),
+        com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_CONFIGLISTENER), UIELEMENT_PROPHANDLE_CONFIGLISTENER , cppu::UnoType<sal_Bool>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT  ),
         com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_CONFIGSOURCE), UIELEMENT_PROPHANDLE_CONFIGSOURCE   , ::getCppuType((const Reference< ::com::sun::star::ui::XUIConfigurationManager >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT  ),
         com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_FRAME), UIELEMENT_PROPHANDLE_FRAME          , ::getCppuType((const Reference< com::sun::star::frame::XFrame >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
-        com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_NOCLOSE), UIELEMENT_PROPHANDLE_NOCLOSE        , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
-        com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_PERSISTENT), UIELEMENT_PROPHANDLE_PERSISTENT     , ::getCppuType((const sal_Bool*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT  ),
-        com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_RESOURCEURL), UIELEMENT_PROPHANDLE_RESOURCEURL    , ::getCppuType((const OUString*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
-        com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_TYPE), UIELEMENT_PROPHANDLE_TYPE           , ::getCppuType((const OUString*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
+        com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_NOCLOSE), UIELEMENT_PROPHANDLE_NOCLOSE        , cppu::UnoType<sal_Bool>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
+        com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_PERSISTENT), UIELEMENT_PROPHANDLE_PERSISTENT     , cppu::UnoType<sal_Bool>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT  ),
+        com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_RESOURCEURL), UIELEMENT_PROPHANDLE_RESOURCEURL    , cppu::UnoType<OUString>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
+        com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_TYPE), UIELEMENT_PROPHANDLE_TYPE           , cppu::UnoType<OUString>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
         com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_XMENUBAR), UIELEMENT_PROPHANDLE_XMENUBAR       , ::getCppuType((const Reference< com::sun::star::awt::XMenuBar >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY )
     };
     // Use it to initialize sequence!
diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx
index 6fade11..1273c83 100644
--- a/framework/source/helper/uielementwrapperbase.cxx
+++ b/framework/source/helper/uielementwrapperbase.cxx
@@ -75,12 +75,12 @@ Sequence< Type > SAL_CALL UIElementWrapperBase::getTypes(  ) throw(RuntimeExcept
 
 void SAL_CALL UIElementWrapperBase::addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception)
 {
-    m_aListenerContainer.addInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), xListener );
+    m_aListenerContainer.addInterface( cppu::UnoType<css::lang::XEventListener>::get(), xListener );
 }
 
 void SAL_CALL UIElementWrapperBase::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception)
 {
-    m_aListenerContainer.removeInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), xListener );
+    m_aListenerContainer.removeInterface( cppu::UnoType<css::lang::XEventListener>::get(), xListener );
 }
 
 void SAL_CALL UIElementWrapperBase::initialize( const Sequence< Any >& aArguments )
@@ -230,7 +230,7 @@ const com::sun::star::uno::Sequence< com::sun::star::beans::Property > UIElement
     {
         com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_FRAME), UIELEMENT_PROPHANDLE_FRAME          , ::getCppuType((Reference< XFrame >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
         com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_RESOURCEURL), UIELEMENT_PROPHANDLE_RESOURCEURL    , ::getCppuType((sal_Int16*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
-        com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_TYPE), UIELEMENT_PROPHANDLE_TYPE           , ::getCppuType((const OUString*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY )
+        com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_TYPE), UIELEMENT_PROPHANDLE_TYPE           , cppu::UnoType<OUString>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY )
     };
     // Use it to initialize sequence!
     const com::sun::star::uno::Sequence< com::sun::star::beans::Property > lPropertyDescriptor( pProperties, UIELEMENT_PROPCOUNT );
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 89e9109..a58ddd2 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -2616,19 +2616,19 @@ IMPL_LINK_NOARG(LayoutManager, SettingsChanged)
 void SAL_CALL LayoutManager::addLayoutManagerEventListener( const uno::Reference< frame::XLayoutManagerListener >& xListener )
 throw (uno::RuntimeException, std::exception)
 {
-    m_aListenerContainer.addInterface( ::getCppuType( (const uno::Reference< frame::XLayoutManagerListener >*)NULL ), xListener );
+    m_aListenerContainer.addInterface( cppu::UnoType<frame::XLayoutManagerListener>::get(), xListener );
 }
 
 void SAL_CALL LayoutManager::removeLayoutManagerEventListener( const uno::Reference< frame::XLayoutManagerListener >& xListener )
 throw (uno::RuntimeException, std::exception)
 {
-    m_aListenerContainer.removeInterface( ::getCppuType( (const uno::Reference< frame::XLayoutManagerListener >*)NULL ), xListener );
+    m_aListenerContainer.removeInterface( cppu::UnoType<frame::XLayoutManagerListener>::get(), xListener );
 }
 
 void LayoutManager::implts_notifyListeners( short nEvent, uno::Any aInfoParam )
 {
     lang::EventObject                  aSource( static_cast< ::cppu::OWeakObject*>(this) );
-    ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const uno::Reference< frame::XLayoutManagerListener >*) NULL ) );
+    ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( cppu::UnoType<frame::XLayoutManagerListener>::get());
     if (pContainer!=NULL)
     {
         ::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx
index a97f3a3..c5bbaeb 100644
--- a/framework/source/recording/dispatchrecorder.cxx
+++ b/framework/source/recording/dispatchrecorder.cxx
@@ -382,7 +382,7 @@ void SAL_CALL DispatchRecorder::implts_recordMacro( const OUString& aURL,
 
 com::sun::star::uno::Type SAL_CALL DispatchRecorder::getElementType() throw (::com::sun::star::uno::RuntimeException, std::exception)
 {
-    return ::getCppuType((const com::sun::star::frame::DispatchStatement *)NULL);
+    return cppu::UnoType<com::sun::star::frame::DispatchStatement>::get();
 }
 
 sal_Bool SAL_CALL DispatchRecorder::hasElements()  throw (::com::sun::star::uno::RuntimeException, std::exception)
@@ -405,7 +405,7 @@ com::sun::star::uno::Any SAL_CALL DispatchRecorder::getByIndex(sal_Int32 idx)  t
     }
 
     Any element(&m_aStatements[idx],
-        ::getCppuType((const com::sun::star::frame::DispatchStatement *)NULL));
+        cppu::UnoType<com::sun::star::frame::DispatchStatement>::get());
 
     return element;
 }
@@ -413,7 +413,7 @@ com::sun::star::uno::Any SAL_CALL DispatchRecorder::getByIndex(sal_Int32 idx)  t
 void SAL_CALL DispatchRecorder::replaceByIndex(sal_Int32 idx, const com::sun::star::uno::Any& element) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception)
 {
     if (element.getValueType() !=
-        ::getCppuType((const com::sun::star::frame::DispatchStatement *)NULL)) {
+        cppu::UnoType<com::sun::star::frame::DispatchStatement>::get()) {
                         throw com::sun::star::lang::IllegalArgumentException(
                         OUString( "Illegal argument in dispatch recorder" ),
                         Reference< XInterface >(), 2 );
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index fddecae..771dfa6 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -396,7 +396,7 @@ void SAL_CALL Desktop::addTerminateListener( const css::uno::Reference< css::fra
     }
 
     // No lock required ... container is threadsafe by itself.
-    m_aListenerContainer.addInterface( ::getCppuType( ( const css::uno::Reference< css::frame::XTerminateListener >*) NULL ), xListener );
+    m_aListenerContainer.addInterface( cppu::UnoType<css::frame::XTerminateListener>::get(), xListener );
 }
 
 void SAL_CALL Desktop::removeTerminateListener( const css::uno::Reference< css::frame::XTerminateListener >& xListener )
@@ -437,7 +437,7 @@ void SAL_CALL Desktop::removeTerminateListener( const css::uno::Reference< css::
     }
 
     // No lock required ... container is threadsafe by itself.
-    m_aListenerContainer.removeInterface( ::getCppuType( ( const css::uno::Reference< css::frame::XTerminateListener >*) NULL ), xListener );
+    m_aListenerContainer.removeInterface( cppu::UnoType<css::frame::XTerminateListener>::get(), xListener );
 }
 
 /*-************************************************************************************************************
@@ -1100,7 +1100,7 @@ void SAL_CALL Desktop::addEventListener( const css::uno::Reference< css::lang::X
     // Register transaction and reject wrong calls.
     TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS );
 
-    m_aListenerContainer.addInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >*) NULL ), xListener );
+    m_aListenerContainer.addInterface( cppu::UnoType<css::lang::XEventListener>::get(), xListener );
 }
 
 void SAL_CALL Desktop::removeEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) throw( css::uno::RuntimeException, std::exception )
@@ -1112,7 +1112,7 @@ void SAL_CALL Desktop::removeEventListener( const css::uno::Reference< css::lang
     // Register transaction and reject wrong calls.
     TransactionGuard aTransaction( m_aTransactionManager, E_SOFTEXCEPTIONS );
 
-    m_aListenerContainer.removeInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >*) NULL ), xListener );
+    m_aListenerContainer.removeInterface( cppu::UnoType<css::lang::XEventListener>::get(), xListener );
 }
 
 /*-************************************************************************************************************
@@ -1585,7 +1585,7 @@ const css::uno::Sequence< css::beans::Property > Desktop::impl_getStaticProperty
         css::beans::Property( DESKTOP_PROPNAME_DISPATCHRECORDERSUPPLIER , DESKTOP_PROPHANDLE_DISPATCHRECORDERSUPPLIER, ::getCppuType((const css::uno::Reference< css::frame::XDispatchRecorderSupplier >*)NULL), css::beans::PropertyAttribute::TRANSIENT ),
         css::beans::Property( DESKTOP_PROPNAME_ISPLUGGED                , DESKTOP_PROPHANDLE_ISPLUGGED               , ::getBooleanCppuType()                                                                  , css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ),
         css::beans::Property( DESKTOP_PROPNAME_SUSPENDQUICKSTARTVETO    , DESKTOP_PROPHANDLE_SUSPENDQUICKSTARTVETO   , ::getBooleanCppuType()                                                                  , css::beans::PropertyAttribute::TRANSIENT ),
-        css::beans::Property( DESKTOP_PROPNAME_TITLE                    , DESKTOP_PROPHANDLE_TITLE                   , ::getCppuType((const OUString*)NULL)                                             , css::beans::PropertyAttribute::TRANSIENT ),
+        css::beans::Property( DESKTOP_PROPNAME_TITLE                    , DESKTOP_PROPHANDLE_TITLE                   , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT ),
     };
     // Use it to initialize sequence!
     const css::uno::Sequence< css::beans::Property > lPropertyDescriptor( pProperties, DESKTOP_PROPCOUNT );
@@ -1600,7 +1600,7 @@ void Desktop::impl_sendQueryTerminationEvent(Desktop::TTerminateListenerList& lC
 
     TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS );
 
-    ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< css::frame::XTerminateListener >*) NULL ) );
+    ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( cppu::UnoType<css::frame::XTerminateListener>::get());
     if ( ! pContainer )
         return;
 
@@ -1661,7 +1661,7 @@ void Desktop::impl_sendNotifyTerminationEvent()
 {
     TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS );
 
-    ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< css::frame::XTerminateListener >*) NULL ) );
+    ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( cppu::UnoType<css::frame::XTerminateListener>::get());
     if ( ! pContainer )
         return;
 
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 9c78eab..e374471 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -2128,7 +2128,7 @@ void SAL_CALL Frame::addEventListener( const css::uno::Reference< css::lang::XEv
     TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS );
 
     /* SAFE AREA ----------------------------------------------------------------------------------------------- */
-    m_aListenerContainer.addInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), xListener );
+    m_aListenerContainer.addInterface( cppu::UnoType<css::lang::XEventListener>::get(), xListener );
 }
 
 void SAL_CALL Frame::removeEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) throw( css::uno::RuntimeException, std::exception )
@@ -2142,7 +2142,7 @@ void SAL_CALL Frame::removeEventListener( const css::uno::Reference< css::lang::
     TransactionGuard aTransaction( m_aTransactionManager, E_SOFTEXCEPTIONS );
 
     /* SAFE AREA ----------------------------------------------------------------------------------------------- */
-    m_aListenerContainer.removeInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), xListener );
+    m_aListenerContainer.removeInterface( cppu::UnoType<css::lang::XEventListener>::get(), xListener );
 }
 
 /*-****************************************************************************************************
@@ -2684,7 +2684,7 @@ void Frame::impl_initializePropInfo()
         css::beans::Property(
             FRAME_PROPNAME_TITLE,
             FRAME_PROPHANDLE_TITLE,
-            ::getCppuType((const OUString*)NULL),
+            cppu::UnoType<OUString>::get(),
             css::beans::PropertyAttribute::TRANSIENT));
 }
 
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index ea75785..7639388 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -1090,7 +1090,7 @@ void PathSettings::impl_rebuildPropertyDescriptor()
         pProp             = &(m_lPropDesc[i]);
         pProp->Name       = rPath.sPathName;
         pProp->Handle     = i;
-        pProp->Type       = ::getCppuType((OUString*)0);
+        pProp->Type       = cppu::UnoType<OUString>::get();
         pProp->Attributes = css::beans::PropertyAttribute::BOUND;
         if (rPath.bIsReadonly)
             pProp->Attributes |= css::beans::PropertyAttribute::READONLY;
@@ -1116,7 +1116,7 @@ void PathSettings::impl_rebuildPropertyDescriptor()
         pProp             = &(m_lPropDesc[i]);
         pProp->Name       = rPath.sPathName+POSTFIX_WRITE_PATH;
         pProp->Handle     = i;
-        pProp->Type       = ::getCppuType((OUString*)0);
+        pProp->Type       = cppu::UnoType<OUString>::get();
         pProp->Attributes = css::beans::PropertyAttribute::BOUND;
         if (rPath.bIsReadonly)
             pProp->Attributes |= css::beans::PropertyAttribute::READONLY;
diff --git a/framework/source/services/tabwindowservice.cxx b/framework/source/services/tabwindowservice.cxx
index b1ebfb8..8aa1e64 100644
--- a/framework/source/services/tabwindowservice.cxx
+++ b/framework/source/services/tabwindowservice.cxx
@@ -368,7 +368,7 @@ void SAL_CALL TabWindowService::dispose()
 void SAL_CALL TabWindowService::addEventListener(const css::uno::Reference< css::lang::XEventListener >& xListener)
     throw (css::uno::RuntimeException, std::exception)
 {
-    m_lListener.addInterface(::getCppuType((const css::uno::Reference< css::lang::XEventListener >*)NULL), xListener);
+    m_lListener.addInterface(cppu::UnoType<css::lang::XEventListener>::get(), xListener);
 }
 
 //  XComponent
@@ -376,7 +376,7 @@ void SAL_CALL TabWindowService::addEventListener(const css::uno::Reference< css:
 void SAL_CALL TabWindowService::removeEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener)
     throw (css::uno::RuntimeException, std::exception)
 {
-    m_lListener.removeInterface(::getCppuType((const css::uno::Reference< css::lang::XEventListener >*)NULL), xListener);
+    m_lListener.removeInterface(cppu::UnoType<css::lang::XEventListener>::get(), xListener);
 }
 
 void TabWindowService::impl_initializePropInfo()
@@ -387,7 +387,7 @@ void TabWindowService::impl_initializePropInfo()
         css::beans::Property(
             OUString("Window"),
             TABWINDOWSERVICE_PROPHANDLE_WINDOW,
-            ::getCppuType((const css::uno::Reference< css::awt::XWindow >*)NULL),
+            cppu::UnoType<css::awt::XWindow>::get(),
             css::beans::PropertyAttribute::TRANSIENT));
 }
 
diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx
index 94e988b..05c1afc 100644
--- a/framework/source/tabwin/tabwindow.cxx
+++ b/framework/source/tabwin/tabwindow.cxx
@@ -462,7 +462,7 @@ throw (css::uno::RuntimeException, std::exception)
     aLock.clear();
     /* SAFE AREA ----------------------------------------------------------------------------------------------- */
 
-    m_aListenerContainer.addInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), xListener );
+    m_aListenerContainer.addInterface( cppu::UnoType<css::lang::XEventListener>::get(), xListener );
 }
 
 void SAL_CALL TabWindow::removeEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener )
@@ -475,7 +475,7 @@ throw (css::uno::RuntimeException, std::exception)
     aLock.clear();
     /* SAFE AREA ----------------------------------------------------------------------------------------------- */
 
-    m_aListenerContainer.removeInterface( ::getCppuType( ( const css::uno::Reference< css::lang::XEventListener >* ) NULL ), xListener );
+    m_aListenerContainer.removeInterface( cppu::UnoType<css::lang::XEventListener>::get(), xListener );
 }
 
 // XEventListener
@@ -911,11 +911,11 @@ const css::uno::Sequence< css::beans::Property > TabWindow::impl_getStaticProper
     {
         com::sun::star::beans::Property( TABWINDOW_PROPNAME_PARENTWINDOW,
                                          TABWINDOW_PROPHANDLE_PARENTWINDOW,
-                                         ::getCppuType((const css::uno::Reference< css::awt::XWindow >*)NULL),
+                                         cppu::UnoType<css::awt::XWindow>::get(),
                                          com::sun::star::beans::PropertyAttribute::READONLY  ),
         com::sun::star::beans::Property( TABWINDOW_PROPNAME_TOPWINDOW,
                                          TABWINDOW_PROPHANDLE_TOPWINDOW,
-                                         ::getCppuType((const css::uno::Reference< css::awt::XWindow >*)NULL),
+                                         cppu::UnoType<css::awt::XWindow>::get(),
                                          com::sun::star::beans::PropertyAttribute::READONLY  )
     };  // Use it to initialize sequence!
     const com::sun::star::uno::Sequence< com::sun::star::beans::Property > lPropertyDescriptor( pProperties, TABWINDOW_PROPCOUNT );
diff --git a/framework/source/uiconfiguration/graphicnameaccess.cxx b/framework/source/uiconfiguration/graphicnameaccess.cxx
index e127152..e81a797 100644
--- a/framework/source/uiconfiguration/graphicnameaccess.cxx
+++ b/framework/source/uiconfiguration/graphicnameaccess.cxx
@@ -88,7 +88,7 @@ throw( uno::RuntimeException, std::exception )
 uno::Type SAL_CALL GraphicNameAccess::getElementType()
 throw( uno::RuntimeException, std::exception )
 {
-    return ::getCppuType( (const uno::Reference< graphic::XGraphic > *)NULL );
+    return cppu::UnoType<graphic::XGraphic>::get();
 }
 
 } // namespace framework
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index 2beaa00..347c7e6 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -721,13 +721,13 @@ void ImageManagerImpl::addEventListener( const uno::Reference< XEventListener >&
             throw DisposedException();
     }
 
-    m_aListenerContainer.addInterface( ::getCppuType( ( const uno::Reference< XEventListener >* ) NULL ), xListener );
+    m_aListenerContainer.addInterface( cppu::UnoType<XEventListener>::get(), xListener );
 }
 
 void ImageManagerImpl::removeEventListener( const uno::Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException)
 {
     /* SAFE AREA ----------------------------------------------------------------------------------------------- */
-    m_aListenerContainer.removeInterface( ::getCppuType( ( const uno::Reference< XEventListener >* ) NULL ), xListener );
+    m_aListenerContainer.removeInterface( cppu::UnoType<XEventListener>::get(), xListener );
 }
 
 // XInitialization
@@ -1372,20 +1372,20 @@ throw (::com::sun::star::uno::RuntimeException)
             throw DisposedException();
     }
 
-    m_aListenerContainer.addInterface( ::getCppuType( ( const uno::Reference< XUIConfigurationListener >* ) NULL ), xListener );
+    m_aListenerContainer.addInterface( cppu::UnoType<XUIConfigurationListener>::get(), xListener );
 }
 
 void ImageManagerImpl::removeConfigurationListener( const uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener )
 throw (::com::sun::star::uno::RuntimeException)
 {
     /* SAFE AREA ----------------------------------------------------------------------------------------------- */
-    m_aListenerContainer.removeInterface( ::getCppuType( ( const uno::Reference< XUIConfigurationListener >* ) NULL ), xListener );
+    m_aListenerContainer.removeInterface( cppu::UnoType<XUIConfigurationListener>::get(), xListener );
 }
 
 void ImageManagerImpl::implts_notifyContainerListener( const ConfigurationEvent& aEvent, NotifyOp eOp )
 {
     ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer(
-                                        ::getCppuType( ( const css::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >*) NULL ) );
+                                        cppu::UnoType<com::sun::star::ui::XUIConfigurationListener>::get());
     if ( pContainer != NULL )
     {
         ::cppu::OInterfaceIteratorHelper pIterator( *pContainer );
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 384ba7a..42c57f0 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -1677,7 +1677,7 @@ sal_Bool SAL_CALL ModuleUIConfigurationManager::isReadOnly() throw (::com::sun::
 
 void ModuleUIConfigurationManager::implts_notifyContainerListener( const ui::ConfigurationEvent& aEvent, NotifyOp eOp )
 {
-    ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >*) NULL ) );
+    ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( cppu::UnoType<com::sun::star::ui::XUIConfigurationListener>::get());
     if ( pContainer != NULL )
     {
         ::cppu::OInterfaceIteratorHelper pIterator( *pContainer );
diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx
index d2d5a12..a2c6947 100644
--- a/framework/source/uiconfiguration/uicategorydescription.cxx
+++ b/framework/source/uiconfiguration/uicategorydescription.cxx
@@ -181,7 +181,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception)
 Type SAL_CALL ConfigurationAccess_UICategory::getElementType()
 throw ( RuntimeException, std::exception )
 {
-    return( ::getCppuType( (const OUString*)NULL ) );
+    return( cppu::UnoType<OUString>::get());
 }
 
 sal_Bool SAL_CALL ConfigurationAccess_UICategory::hasElements()
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 8ac7dcc..717a3cf 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -1384,7 +1384,7 @@ sal_Bool SAL_CALL UIConfigurationManager::isReadOnly() throw (::com::sun::star::
 
 void UIConfigurationManager::implts_notifyContainerListener( const ConfigurationEvent& aEvent, NotifyOp eOp )
 {
-    ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >*) NULL ) );
+    ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( cppu::UnoType<com::sun::star::ui::XUIConfigurationListener>::get());
     if ( pContainer != NULL )
     {
         ::cppu::OInterfaceIteratorHelper pIterator( *pContainer );
diff --git a/toolkit/source/awt/vclxbitmap.cxx b/toolkit/source/awt/vclxbitmap.cxx
index b64cdfd..e989da3 100644
--- a/toolkit/source/awt/vclxbitmap.cxx
+++ b/toolkit/source/awt/vclxbitmap.cxx
@@ -44,8 +44,8 @@ IMPL_XUNOTUNNEL( VCLXBitmap )
 
 // ::com::sun::star::lang::XTypeProvider
 IMPL_XTYPEPROVIDER_START( VCLXBitmap )
-    getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap>* ) NULL ),
-    getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDisplayBitmap>* ) NULL )
+    cppu::UnoType<com::sun::star::awt::XBitmap>::get(),
+    cppu::UnoType<com::sun::star::awt::XDisplayBitmap>::get()
 IMPL_XTYPEPROVIDER_END
 
 
diff --git a/toolkit/source/awt/vclxcontainer.cxx b/toolkit/source/awt/vclxcontainer.cxx
index 90bc126..45b5e20 100644
--- a/toolkit/source/awt/vclxcontainer.cxx
+++ b/toolkit/source/awt/vclxcontainer.cxx
@@ -57,8 +57,8 @@ VCLXContainer::~VCLXContainer()
 
 // ::com::sun::star::lang::XTypeProvider
 IMPL_XTYPEPROVIDER_START( VCLXContainer )
-    getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclContainer>* ) NULL ),
-    getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclContainerPeer>* ) NULL ),
+    cppu::UnoType<com::sun::star::awt::XVclContainer>::get(),
+    cppu::UnoType<com::sun::star::awt::XVclContainerPeer>::get(),
     VCLXWindow::getTypes()
 IMPL_XTYPEPROVIDER_END
 
diff --git a/toolkit/source/awt/vclxdevice.cxx b/toolkit/source/awt/vclxdevice.cxx
index f9b1c4f..ce0e3de 100644
--- a/toolkit/source/awt/vclxdevice.cxx
+++ b/toolkit/source/awt/vclxdevice.cxx
@@ -82,8 +82,8 @@ IMPL_XUNOTUNNEL( VCLXDevice )
 
 // ::com::sun::star::lang::XTypeProvider
 IMPL_XTYPEPROVIDER_START( VCLXDevice )
-    getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice>* ) NULL ),
-    getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XUnitConversion>* ) NULL )
+    cppu::UnoType<com::sun::star::awt::XDevice>::get(),
+    cppu::UnoType<com::sun::star::awt::XUnitConversion>::get()
 IMPL_XTYPEPROVIDER_END
 
 
diff --git a/toolkit/source/awt/vclxfont.cxx b/toolkit/source/awt/vclxfont.cxx
index 06a440b..14174f2 100644
--- a/toolkit/source/awt/vclxfont.cxx
+++ b/toolkit/source/awt/vclxfont.cxx
@@ -84,7 +84,7 @@ IMPL_XUNOTUNNEL( VCLXFont )
 
 // ::com::sun::star::lang::XTypeProvider
 IMPL_XTYPEPROVIDER_START( VCLXFont )
-    getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont2>* ) NULL )
+    cppu::UnoType<com::sun::star::awt::XFont2>::get()
 IMPL_XTYPEPROVIDER_END
 
 
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index 82efe16..6a3a479 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -53,7 +53,7 @@ IMPL_XUNOTUNNEL( VCLXGraphics )
 
 // lang::XTypeProvider
 IMPL_XTYPEPROVIDER_START( VCLXGraphics )
-    getCppuType( ( uno::Reference< awt::XGraphics>* ) NULL )
+    cppu::UnoType<awt::XGraphics>::get()
 IMPL_XTYPEPROVIDER_END
 
 VCLXGraphics::VCLXGraphics()
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index 97ccd04..7a691e3 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -250,10 +250,10 @@ throw(css::uno::RuntimeException, std::exception)
             if( !pCollectionPopupMenu )
             {
                 static ::cppu::OTypeCollection collectionPopupMenu(
-                getCppuType( ( css::uno::Reference< css::lang::XTypeProvider>* ) NULL ),
-                getCppuType( ( css::uno::Reference< css::awt::XMenu>* ) NULL ),
-                getCppuType( ( css::uno::Reference< css::awt::XPopupMenu>* ) NULL ),
-                getCppuType( ( css::uno::Reference< css::lang::XServiceInfo>* ) NULL ) );
+                cppu::UnoType<css::lang::XTypeProvider>::get(),
+                cppu::UnoType<css::awt::XMenu>::get(),
+                cppu::UnoType<css::awt::XPopupMenu>::get(),
+                cppu::UnoType<css::lang::XServiceInfo>::get());
                 pCollectionPopupMenu = &collectionPopupMenu;
             }
         }
@@ -268,10 +268,10 @@ throw(css::uno::RuntimeException, std::exception)
             if( !pCollectionMenuBar )
             {
                 static ::cppu::OTypeCollection collectionMenuBar(
-                getCppuType( ( css::uno::Reference< css::lang::XTypeProvider>* ) NULL ),
-                getCppuType( ( css::uno::Reference< css::awt::XMenu>* ) NULL ),
-                getCppuType( ( css::uno::Reference< css::awt::XMenuBar>* ) NULL ),
-                getCppuType( ( css::uno::Reference< css::lang::XServiceInfo>* ) NULL ) );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list