[Libreoffice-commits] .: 4 commits - starmath/source sw/CppunitTest_sw_swdoc_test.mk sw/Module_sw.mk sw/qa sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Jun 13 03:45:50 PDT 2011


 starmath/source/view.cxx        |    2 
 sw/CppunitTest_sw_swdoc_test.mk |  116 ++++++++++++++++++++++++++++++++++++++++
 sw/Module_sw.mk                 |    1 
 sw/qa/core/swdoc-test.cxx       |   28 +++------
 sw/source/filter/ww8/wrtww8.cxx |   40 ++++++-------
 5 files changed, 149 insertions(+), 38 deletions(-)

New commits:
commit 829e2cc44dd7c20a3dc9231ca60ff50067fb1d86
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 10 23:25:28 2011 +0100

    createFromAscii -> RTL_CONSTASCII_USTRINGPARAM

diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index ac4f6d9..79bfd82 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -852,7 +852,7 @@ IMPL_LINK( SmCmdBoxWindow, InitialFocusTimerHdl, Timer *, EMPTYARG /*pTimer*/ )
         if (xSMGR.is())
         {
             xDesktop = uno::Reference< frame::XDesktop >(
-                xSMGR->createInstance( rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" )), uno::UNO_QUERY_THROW );
+                xSMGR->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))), uno::UNO_QUERY_THROW );
         }
 
         aEdit.GrabFocus();
commit 146c117b4449cddb9b05ac6879fffa32110b47b8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 10 23:20:54 2011 +0100

    createFromAscii -> RTL_CONSTASCII_USTRINGPARAM

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index eabc718..70de2b2 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3853,26 +3853,26 @@ const NfKeywordTable & MSWordExportBase::GetNfKeywordTable()
     {
         pKeyMap.reset(new NfKeywordTable);
         NfKeywordTable & rKeywordTable = *pKeyMap;
-        rKeywordTable[NF_KEY_D] = ::rtl::OUString::createFromAscii("d");
-        rKeywordTable[NF_KEY_DD] = ::rtl::OUString::createFromAscii("dd");
-        rKeywordTable[NF_KEY_DDD] = ::rtl::OUString::createFromAscii("ddd");
-        rKeywordTable[NF_KEY_DDDD] = ::rtl::OUString::createFromAscii("dddd");
-        rKeywordTable[NF_KEY_M] = ::rtl::OUString::createFromAscii("M");
-        rKeywordTable[NF_KEY_MM] = ::rtl::OUString::createFromAscii("MM");
-        rKeywordTable[NF_KEY_MMM] = ::rtl::OUString::createFromAscii("MMM");
-        rKeywordTable[NF_KEY_MMMM] = ::rtl::OUString::createFromAscii("MMMM");
-        rKeywordTable[NF_KEY_NN] = ::rtl::OUString::createFromAscii("ddd");
-        rKeywordTable[NF_KEY_NNN] = ::rtl::OUString::createFromAscii("dddd");
-        rKeywordTable[NF_KEY_NNNN] = ::rtl::OUString::createFromAscii("dddd");
-        rKeywordTable[NF_KEY_YY] = ::rtl::OUString::createFromAscii("yy");
-        rKeywordTable[NF_KEY_YYYY] = ::rtl::OUString::createFromAscii("yyyy");
-        rKeywordTable[NF_KEY_H] = ::rtl::OUString::createFromAscii("H");
-        rKeywordTable[NF_KEY_HH] = ::rtl::OUString::createFromAscii("HH");
-        rKeywordTable[NF_KEY_MI] = ::rtl::OUString::createFromAscii("m");
-        rKeywordTable[NF_KEY_MMI] = ::rtl::OUString::createFromAscii("mm");
-        rKeywordTable[NF_KEY_S] = ::rtl::OUString::createFromAscii("s");
-        rKeywordTable[NF_KEY_SS] = ::rtl::OUString::createFromAscii("ss");
-        rKeywordTable[NF_KEY_AMPM] = ::rtl::OUString::createFromAscii("AM/PM");
+        rKeywordTable[NF_KEY_D] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("d"));
+        rKeywordTable[NF_KEY_DD] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dd"));
+        rKeywordTable[NF_KEY_DDD] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ddd"));
+        rKeywordTable[NF_KEY_DDDD] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dddd"));
+        rKeywordTable[NF_KEY_M] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("M"));
+        rKeywordTable[NF_KEY_MM] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MM"));
+        rKeywordTable[NF_KEY_MMM] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MMM"));
+        rKeywordTable[NF_KEY_MMMM] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MMMM"));
+        rKeywordTable[NF_KEY_NN] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ddd"));
+        rKeywordTable[NF_KEY_NNN] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dddd"));
+        rKeywordTable[NF_KEY_NNNN] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dddd"));
+        rKeywordTable[NF_KEY_YY] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("yy"));
+        rKeywordTable[NF_KEY_YYYY] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("yyyy"));
+        rKeywordTable[NF_KEY_H] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("H"));
+        rKeywordTable[NF_KEY_HH] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HH"));
+        rKeywordTable[NF_KEY_MI] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("m"));
+        rKeywordTable[NF_KEY_MMI] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("mm"));
+        rKeywordTable[NF_KEY_S] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("s"));
+        rKeywordTable[NF_KEY_SS] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ss"));
+        rKeywordTable[NF_KEY_AMPM] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AM/PM"));
     }
 
     return *pKeyMap;
commit 28f591993fb2127f6542a0ad2eff3d958cd2f656
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 10 21:38:15 2011 +0100

    don't need this bit now

diff --git a/sw/qa/core/swdoc-test.cxx b/sw/qa/core/swdoc-test.cxx
index 860e92e..297bf9f 100644
--- a/sw/qa/core/swdoc-test.cxx
+++ b/sw/qa/core/swdoc-test.cxx
@@ -65,11 +65,6 @@ SO2_IMPL_REF(SwDocShell)
 
 using namespace ::com::sun::star;
 
-static sal_uInt16 aWndFunc(Window *, sal_uInt16, const String &, const String &)
-{
-    return ERRCODE_BUTTON_OK;
-}
-
 /* Implementation of Swdoc-Test class */
 
 class SwDocTest : public CppUnit::TestFixture
@@ -209,8 +204,6 @@ SwDocTest::SwDocTest()
     InitVCL(xSM);
 
     SwGlobals::ensure();
-
-    ErrorHandler::RegisterDisplay(&aWndFunc);
 }
 
 void SwDocTest::setUp()
commit f90c0dbe3f630cc90ad886b6cfef5e2dfbbc73f8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 10 21:19:45 2011 +0100

    recover this unit test again

diff --git a/sw/CppunitTest_sw_swdoc_test.mk b/sw/CppunitTest_sw_swdoc_test.mk
new file mode 100644
index 0000000..c25b2b9
--- /dev/null
+++ b/sw/CppunitTest_sw_swdoc_test.mk
@@ -0,0 +1,116 @@
+#*************************************************************************
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+#       Caolán McNamara, Red Hat, Inc. <caolanm at redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2011 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_swdoc_test))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_swdoc_test, \
+    sw/qa/core/swdoc-test \
+))
+
+$(call gb_CxxObject_get_target,sw/qa/core/swdoc-test): $(WORKDIR)/AllLangRes/sw
+
+$(eval $(call gb_CppunitTest_add_library_objects,sw_swdoc_test,sw))
+
+$(eval $(call gb_CppunitTest_add_linked_libs,sw_swdoc_test, \
+    avmedia \
+    basegfx \
+    comphelper \
+    cppu \
+    cppuhelper \
+    drawinglayer \
+    editeng \
+    i18nisolang1 \
+    i18nutil \
+    icuuc \
+    lng \
+    sal \
+    salhelper \
+    sb \
+    sfx \
+    sot \
+    svl \
+    svt \
+    svx \
+    svxcore \
+    swd \
+    tk \
+    tl \
+    ucbhelper \
+    utl \
+    vbahelper \
+    vcl \
+    xo \
+    xml2 \
+    $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_swdoc_test,\
+    -I$(realpath $(SRCDIR)/sw/inc/pch) \
+    -I$(realpath $(SRCDIR)/sw/source/ui/inc) \
+    -I$(realpath $(SRCDIR)/sw/inc) \
+    $$(INCLUDE) \
+    -I$(OUTDIR)/inc/offuh \
+    -I$(OUTDIR)/inc \
+))
+
+$(eval $(call gb_CppunitTest_uses_ure,sw_swdoc_test))
+
+$(eval $(call gb_CppunitTest_add_type_rdbs,sw_swdoc_test,\
+    types \
+))
+
+$(eval $(call gb_CppunitTest_add_service_rdbs,sw_swdoc_test,\
+    sw_swdoc_test \
+))
+
+$(call gb_CppunitTest_get_target,sw_swdoc_test) : \
+        $(call gb_AllLangResTarget_get_target,sw)
+
+$(eval $(call gb_CppunitTest_set_args,sw_swdoc_test,\
+    --headless \
+    --invisible \
+))
+
+$(eval $(call gb_RdbTarget_RdbTarget,sw_swdoc_test))
+
+$(eval $(call gb_RdbTarget_add_components,sw_swdoc_test,\
+    sfx2/util/sfx \
+    framework/util/fwk \
+    unoxml/source/service/unoxml \
+    fileaccess/source/fileacc \
+    comphelper/util/comphelp \
+))
+
+$(eval $(call gb_RdbTarget_add_old_components,sw_swdoc_test,\
+    i18npool \
+    ucb1 \
+    ucpfile1 \
+))
+
+# vim: set noet sw=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 0394f37..527c8ea 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -41,6 +41,7 @@ $(eval $(call gb_Module_add_targets,sw,\
 
 $(eval $(call gb_Module_add_check_targets,sw,\
     CppunitTest_sw_test_filters \
+    CppunitTest_sw_swdoc_test \
 ))
 
 $(eval $(call gb_Module_add_subsequentcheck_targets,sw,\
diff --git a/sw/qa/core/swdoc-test.cxx b/sw/qa/core/swdoc-test.cxx
index e0def7a..860e92e 100644
--- a/sw/qa/core/swdoc-test.cxx
+++ b/sw/qa/core/swdoc-test.cxx
@@ -27,20 +27,25 @@
  * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
  * instead of those above.
  */
-#include "precompiled_sw.hxx"
+#include <sal/cppunit.h>
 
-#include <cppunit/TestSuite.h>
-#include <cppunit/TestFixture.h>
-#include <cppunit/TestCase.h>
-#include <cppunit/plugin/TestPlugIn.h>
-#include <cppunit/extensions/HelperMacros.h>
+#include <sal/config.h>
 
 #include <osl/file.hxx>
 #include <osl/process.h>
+
 #include <cppuhelper/compbase1.hxx>
 #include <cppuhelper/bootstrap.hxx>
 #include <cppuhelper/basemutex.hxx>
+
 #include <comphelper/processfactory.hxx>
+
+#include <tools/urlobj.hxx>
+
+#include <unotools/tempfile.hxx>
+
+#include <ucbhelper/contentbroker.hxx>
+
 #include <vcl/svapp.hxx>
 
 #include <sfx2/app.hxx>
@@ -48,10 +53,6 @@
 #include <sfx2/docfile.hxx>
 #include <sfx2/sfxmodelfactory.hxx>
 
-#include <tools/urlobj.hxx>
-#include <unotools/tempfile.hxx>
-#include <ucbhelper/contentbroker.hxx>
-
 #include "init.hxx"
 #include "swtypes.hxx"
 #include "doc.hxx"


More information about the Libreoffice-commits mailing list