summaryrefslogtreecommitdiff
path: root/svl/qa
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-19 12:47:44 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-19 12:47:44 +0200
commit941020379b1ea1ec7c564c21e68ea1674cda7683 (patch)
tree40fcaf109d6d585bcdc0faf7ea6c0812b3cc9a39 /svl/qa
parent0692507dcc62e94c7af88388961db1d7d12d6dbd (diff)
parent0d2916e03ea51529e15995830a1a8c36bd72e442 (diff)
Merge branch 'master' into feature/gnumake4
Conflicts: basebmp/prj/d.lst basebmp/test/basictest.cxx basebmp/test/makefile.mk basegfx/inc/basegfx/basegfxdllapi.h basegfx/inc/basegfx/tools/debugplotter.hxx basegfx/inc/basegfx/tuple/b2ituple.hxx basegfx/prj/d.lst basegfx/source/numeric/makefile.mk basegfx/source/polygon/makefile.mk basegfx/source/range/makefile.mk basegfx/source/raster/makefile.mk basegfx/source/tuple/makefile.mk basegfx/source/vector/makefile.mk basegfx/test/basegfx1d.cxx basegfx/test/makefile.mk basegfx/util/makefile.mk canvas/Library_canvasfactory.mk canvas/Module_canvas.mk canvas/prj/build.lst canvas/prj/d.lst canvas/source/cairo/cairo_canvashelper_texturefill.cxx canvas/source/cairo/makefile.mk canvas/source/tools/makefile.mk comphelper/qa/string/makefile.mk cppcanvas/Module_cppcanvas.mk cppcanvas/inc/cppcanvas/cppcanvasdllapi.h cppcanvas/prj/build.lst cppcanvas/prj/d.lst cppcanvas/source/mtfrenderer/makefile.mk cppcanvas/util/makefile.mk i18npool/source/search/makefile.mk regexp/Library_regexp.mk regexp/prj/d.lst sax/CppunitTest_sax.mk sax/Library_sax.mk sax/prj/d.lst sax/qa/cppunit/test_converter.cxx sax/source/expatwrap/attrlistimpl.hxx sax/util/makefile.mk svtools/Library_svt.mk tools/Executable_sspretty.mk ucbhelper/prj/d.lst ucbhelper/source/provider/configureucb.cxx ucbhelper/source/provider/provconf.cxx ucbhelper/util/makefile.mk unotools/Library_utl.mk unotools/Module_unotools.mk unotools/Package_inc.mk unotools/prj/build.lst vcl/Library_desktop_detector.mk vcl/Library_vcl.mk vcl/Library_vclplug_gtk.mk vcl/aqua/source/gdi/salprn.cxx vcl/inc/aqua/saldata.hxx vcl/unx/generic/gdi/salgdi3.cxx
Diffstat (limited to 'svl/qa')
-rw-r--r--svl/qa/complex/ConfigItems/helper/AccessibilityOptTest.cxx3
-rw-r--r--svl/qa/complex/ConfigItems/helper/AccessibilityOptTest.hxx3
-rw-r--r--svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx23
-rw-r--r--svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx121
-rw-r--r--svl/qa/complex/ConfigItems/helper/HistoryOptTest.hxx3
-rw-r--r--svl/qa/complex/ConfigItems/helper/PrintOptTest.cxx113
-rw-r--r--svl/qa/complex/ConfigItems/helper/PrintOptTest.hxx3
-rw-r--r--svl/qa/complex/ConfigItems/helper/UserOptTest.cxx75
-rw-r--r--svl/qa/complex/ConfigItems/helper/UserOptTest.hxx3
-rw-r--r--svl/qa/export.map2
-rw-r--r--svl/qa/test_URIHelper.cxx25
-rw-r--r--svl/qa/unit/makefile.mk96
-rw-r--r--svl/qa/unit/svl.cxx298
-rw-r--r--svl/qa/unit/version.map34
14 files changed, 635 insertions, 167 deletions
diff --git a/svl/qa/complex/ConfigItems/helper/AccessibilityOptTest.cxx b/svl/qa/complex/ConfigItems/helper/AccessibilityOptTest.cxx
index 10112c07ac8c..63a88e733efb 100644
--- a/svl/qa/complex/ConfigItems/helper/AccessibilityOptTest.cxx
+++ b/svl/qa/complex/ConfigItems/helper/AccessibilityOptTest.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -390,3 +391,5 @@ void AccessibilityOptTest::impl_checkAccessibilityOptions()
impl_checkSetHelpTipSeconds();
impl_checkSetSelectionInReadonly();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/qa/complex/ConfigItems/helper/AccessibilityOptTest.hxx b/svl/qa/complex/ConfigItems/helper/AccessibilityOptTest.hxx
index cf2146f54e49..89dce6d2bdd1 100644
--- a/svl/qa/complex/ConfigItems/helper/AccessibilityOptTest.hxx
+++ b/svl/qa/complex/ConfigItems/helper/AccessibilityOptTest.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,5 @@ private:
};
#endif // #ifndef SVTOOLS_ACCESSIBILITYOPTTEST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx b/svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx
index b342eff7ff76..3172fd9322d6 100644
--- a/svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx
+++ b/svl/qa/complex/ConfigItems/helper/ConfigItemTest.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,13 +47,11 @@ namespace css = ::com::sun::star;
namespace svl{
//=============================================================================
-static const ::rtl::OUString PROP_TEST = ::rtl::OUString::createFromAscii("Test");
-static const ::rtl::OUString TEST_PICKLIST = ::rtl::OUString::createFromAscii("checkPicklist");
-static const ::rtl::OUString TEST_URLHISTORY = ::rtl::OUString::createFromAscii("checkURLHistory");
-static const ::rtl::OUString TEST_HELPBOOKMARKS = ::rtl::OUString::createFromAscii("checkHelpBookmarks");
-// static const ::rtl::OUString TEST_ACCESSIBILITYOPTIONS = ::rtl::OUString::createFromAscii("checkAccessibilityOptions");
-// static const ::rtl::OUString TEST_PRINTOPTIONS = ::rtl::OUString::createFromAscii("checkPrintOptions");
-static const ::rtl::OUString TEST_USEROPTIONS = ::rtl::OUString::createFromAscii("checkUserOptions");
+static const ::rtl::OUString PROP_TEST (RTL_CONSTASCII_USTRINGPARAM("Test"));
+static const ::rtl::OUString TEST_PICKLIST (RTL_CONSTASCII_USTRINGPARAM("checkPicklist"));
+static const ::rtl::OUString TEST_URLHISTORY (RTL_CONSTASCII_USTRINGPARAM("checkURLHistory"));
+static const ::rtl::OUString TEST_HELPBOOKMARKS (RTL_CONSTASCII_USTRINGPARAM("checkHelpBookmarks"));
+static const ::rtl::OUString TEST_USEROPTIONS (RTL_CONSTASCII_USTRINGPARAM("checkUserOptions"));
//=============================================================================
class ConfigItemTest : public ::cppu::WeakImplHelper2< css::task::XJob ,
@@ -188,14 +187,14 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL ConfigItemTest::getSupportedServi
//=============================================================================
::rtl::OUString SAL_CALL ConfigItemTest::st_getImplementationName()
{
- return ::rtl::OUString::createFromAscii("com.sun.star.comp.svl.ConfigItemTest");
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.svl.ConfigItemTest"));
}
//=============================================================================
css::uno::Sequence< ::rtl::OUString > SAL_CALL ConfigItemTest::st_getSupportedServiceNames()
{
css::uno::Sequence< ::rtl::OUString > lServices(1);
- lServices[0] = ::rtl::OUString::createFromAscii("com.sun.star.test.ConfigItems");
+ lServices[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.test.ConfigItems"));
return lServices;
}
@@ -223,14 +222,14 @@ static ::cppu::ImplementationEntry const lRegEntries[] =
};
//=============================================================================
-extern "C" void SAL_CALL component_getImplementationEnvironment(const char** pEnvTypeName,
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const char** pEnvTypeName,
uno_Environment** )
{
*pEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//=============================================================================
-extern "C" void * SAL_CALL component_getFactory(const char* sImplName ,
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const char* sImplName ,
void* pServiceManager,
void* pRegistryKey )
{
@@ -243,3 +242,5 @@ extern "C" sal_Bool SAL_CALL component_writeInfo(void* pServiceManager,
{
return ::cppu::component_writeInfoHelper(pServiceManager, pRegistryKey, lRegEntries);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx b/svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx
index 4f8e2159847d..09eae2f5d37e 100644
--- a/svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx
+++ b/svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,14 +42,14 @@
namespace css = ::com::sun::star;
//=============================================================================
-static const ::rtl::OUString MESSAGE_CLEAR_FAILED = ::rtl::OUString::createFromAscii("Clearing the list failed.");
-static const ::rtl::OUString MESSAGE_SETSIZE_FAILED = ::rtl::OUString::createFromAscii("Setting a new size for a list failed.");
-static const ::rtl::OUString MESSAGE_MISS_HISTORY = ::rtl::OUString::createFromAscii("Could not get config access to history list inside config.");
-static const ::rtl::OUString MESSAGE_MISS_ITEMLIST = ::rtl::OUString::createFromAscii("Could not get config access to item list inside config.");
-static const ::rtl::OUString MESSAGE_MISS_ORDERLIST = ::rtl::OUString::createFromAscii("Could not get config access to order list inside config.");
-static const ::rtl::OUString MESSAGE_MISS_ITEM = ::rtl::OUString::createFromAscii("Could not locate item.");
-static const ::rtl::OUString MESSAGE_UNEXPECTED_ITEM = ::rtl::OUString::createFromAscii("Found an unexpected item.");
-static const ::rtl::OUString MESSAGE_WRONG_ORDER = ::rtl::OUString::createFromAscii("Wrong order in history list.");
+static const ::rtl::OUString MESSAGE_CLEAR_FAILED (RTL_CONSTASCII_USTRINGPARAM("Clearing the list failed."));
+static const ::rtl::OUString MESSAGE_SETSIZE_FAILED (RTL_CONSTASCII_USTRINGPARAM("Setting a new size for a list failed."));
+static const ::rtl::OUString MESSAGE_MISS_HISTORY (RTL_CONSTASCII_USTRINGPARAM("Could not get config access to history list inside config."));
+static const ::rtl::OUString MESSAGE_MISS_ITEMLIST (RTL_CONSTASCII_USTRINGPARAM("Could not get config access to item list inside config."));
+static const ::rtl::OUString MESSAGE_MISS_ORDERLIST (RTL_CONSTASCII_USTRINGPARAM("Could not get config access to order list inside config."));
+static const ::rtl::OUString MESSAGE_MISS_ITEM (RTL_CONSTASCII_USTRINGPARAM("Could not locate item."));
+static const ::rtl::OUString MESSAGE_UNEXPECTED_ITEM (RTL_CONSTASCII_USTRINGPARAM("Found an unexpected item."));
+static const ::rtl::OUString MESSAGE_WRONG_ORDER (RTL_CONSTASCII_USTRINGPARAM("Wrong order in history list."));
//=============================================================================
HistoryOptTest::HistoryOptTest()
@@ -464,13 +465,13 @@ void HistoryOptTest::impl_clearList(const ::rtl::OUString& sList)
css::uno::Reference< css::beans::XPropertySet > xFirstItem;
css::uno::Sequence< ::rtl::OUString > sFileList;
- if (sList.equalsAscii("PickList"))
+ if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PickList")))
m_xCfg->getByName(s_sPickList) >>= xListAccess;
- else if (sList.equalsAscii("URLHistory"))
+ else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLHistory")))
m_xCfg->getByName(s_sURLHistory) >>= xListAccess;
- else if (sList.equalsAscii("HelpBookmarks"))
+ else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HelpBookmarks")))
m_xCfg->getByName(s_sHelpBookmarks) >>= xListAccess;
if (xListAccess.is())
@@ -501,13 +502,13 @@ sal_Bool HistoryOptTest::impl_isListEmpty(const ::rtl::OUString& sList)
css::uno::Reference< css::container::XNameAccess > xOrderList;
sal_Bool bRet = sal_True;
- if (sList.equalsAscii("PickList"))
+ if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PickList")))
m_xCfg->getByName(s_sPickList) >>= xListAccess;
- else if (sList.equalsAscii("URLHistory"))
+ else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLHistory")))
m_xCfg->getByName(s_sURLHistory) >>= xListAccess;
- else if (sList.equalsAscii("HelpBookmarks"))
+ else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HelpBookmarks")))
m_xCfg->getByName(s_sHelpBookmarks) >>= xListAccess;
if (xListAccess.is())
@@ -539,7 +540,7 @@ void HistoryOptTest::impl_checkGetSize(const ::rtl::OUString& sList)
sal_uInt32 nSize = 0;
sal_uInt32 nSize_ = 0;
- if (sList.equalsAscii("PickList"))
+ if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PickList")))
{
nSize = aHistoryOpt.GetSize(ePICKLIST);
@@ -552,7 +553,7 @@ void HistoryOptTest::impl_checkGetSize(const ::rtl::OUString& sList)
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GetSize(ePICKLIST) error!")), 0);
}
- else if (sList.equalsAscii("URLHistory"))
+ else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLHistory")))
{
nSize = aHistoryOpt.GetSize(eHISTORY);
@@ -566,7 +567,7 @@ void HistoryOptTest::impl_checkGetSize(const ::rtl::OUString& sList)
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GetSize(eHISTORY) error!")), 0);
}
- else if (sList.equalsAscii("HelpBookmarks"))
+ else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HelpBookmarks")))
{
nSize = aHistoryOpt.GetSize(eHELPBOOKMARKS);
@@ -590,7 +591,7 @@ void HistoryOptTest::impl_checkSetSize(const ::rtl::OUString& sList)
sal_uInt32 nSize = 0;
sal_uInt32 nSize_ = 0;
- if (sList.equalsAscii("PickList"))
+ if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PickList")))
{
xSet->getPropertyValue(s_sPickListSize) >>= nSize;
aHistoryOpt.SetSize(ePICKLIST, (nSize+1));
@@ -601,7 +602,7 @@ void HistoryOptTest::impl_checkSetSize(const ::rtl::OUString& sList)
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetSize(ePICKLIST) error!")), 0);
}
- else if (sList.equalsAscii("URLHistory"))
+ else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLHistory")))
{
xSet->getPropertyValue(s_sURLHistorySize) >>= nSize;
aHistoryOpt.SetSize(eHISTORY, (nSize+1));
@@ -612,7 +613,7 @@ void HistoryOptTest::impl_checkSetSize(const ::rtl::OUString& sList)
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetSize(eHISTORY) error!")), 0);
}
- else if (sList.equalsAscii("HelpBookmarks"))
+ else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HelpBookmarks")))
{
xSet->getPropertyValue(s_sHelpBookmarksSize) >>= nSize;
aHistoryOpt.SetSize(eHELPBOOKMARKS, (nSize+1));
@@ -628,7 +629,7 @@ void HistoryOptTest::impl_checkSetSize(const ::rtl::OUString& sList)
// test SvtHistoryOptions::Clear()
void HistoryOptTest::impl_checkClear(const ::rtl::OUString& sList)
{
- if (sList.equalsAscii("PickList"))
+ if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PickList")))
{
aHistoryOpt.Clear(ePICKLIST);
if ( !impl_isListEmpty(s_sPickList) )
@@ -636,7 +637,7 @@ void HistoryOptTest::impl_checkClear(const ::rtl::OUString& sList)
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Clear(ePICKLIST) error!")), 0);
}
- else if (sList.equalsAscii("URLHistory"))
+ else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLHistory")))
{
aHistoryOpt.Clear(eHISTORY);
if ( !impl_isListEmpty(s_sURLHistory) )
@@ -644,7 +645,7 @@ void HistoryOptTest::impl_checkClear(const ::rtl::OUString& sList)
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Clear(eHISTORY) error!")), 0);
}
- else if (sList.equalsAscii("HelpBookmarks"))
+ else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HelpBookmarks")))
{
aHistoryOpt.Clear(eHELPBOOKMARKS);
if ( !impl_isListEmpty(s_sHelpBookmarks) )
@@ -657,14 +658,14 @@ void HistoryOptTest::impl_checkClear(const ::rtl::OUString& sList)
// test SvtHistoryOptions::GetList()
void HistoryOptTest::impl_checkGetList(const ::rtl::OUString& sList)
{
- if (sList.equalsAscii("PickList"))
+ if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PickList")))
{
impl_clearList(s_sPickList);
aHistoryOpt.AppendItem( ePICKLIST ,
- ::rtl::OUString::createFromAscii("file:///c/test1"),
- ::rtl::OUString::createFromAscii(""),
- ::rtl::OUString::createFromAscii(""),
- ::rtl::OUString::createFromAscii("") );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///c/test1")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) );
css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aHistoryList = aHistoryOpt.GetList( ePICKLIST );
if ( aHistoryList.getLength()==0 )
@@ -672,14 +673,14 @@ void HistoryOptTest::impl_checkGetList(const ::rtl::OUString& sList)
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GetList(ePICKLIST) error!")), 0);
}
- else if (sList.equalsAscii("URLHistory"))
+ else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLHistory")))
{
impl_clearList(s_sURLHistory);
aHistoryOpt.AppendItem( eHISTORY ,
- ::rtl::OUString::createFromAscii("file:///c/test1"),
- ::rtl::OUString::createFromAscii(""),
- ::rtl::OUString::createFromAscii(""),
- ::rtl::OUString::createFromAscii("") );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///c/test1")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) );
css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aHistoryList = aHistoryOpt.GetList( eHISTORY );
if ( aHistoryList.getLength()==0 )
@@ -687,14 +688,14 @@ void HistoryOptTest::impl_checkGetList(const ::rtl::OUString& sList)
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GetList(eHISTORY) error!")), 0);
}
- else if (sList.equalsAscii("HelpBookmarks"))
+ else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HelpBookmarks")))
{
impl_clearList(s_sHelpBookmarks);
aHistoryOpt.AppendItem( eHELPBOOKMARKS ,
- ::rtl::OUString::createFromAscii("file:///c/test1"),
- ::rtl::OUString::createFromAscii(""),
- ::rtl::OUString::createFromAscii(""),
- ::rtl::OUString::createFromAscii("") );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///c/test1")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) );
css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aHistoryList = aHistoryOpt.GetList( eHELPBOOKMARKS );
if ( aHistoryList.getLength()==0 )
@@ -705,7 +706,7 @@ void HistoryOptTest::impl_checkGetList(const ::rtl::OUString& sList)
void HistoryOptTest::impl_checkAppendItem(const ::rtl::OUString& sList)
{
- if (sList.equalsAscii("PickList"))
+ if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PickList")))
{
impl_clearList(s_sPickList);
sal_Int32 nListSize = aHistoryOpt.GetSize(ePICKLIST);
@@ -713,18 +714,18 @@ void HistoryOptTest::impl_checkAppendItem(const ::rtl::OUString& sList)
for (sal_Int32 i=0; i<nListSize; ++i)
aHistoryOpt.AppendItem( ePICKLIST ,
::rtl::OUString::valueOf(i),
- ::rtl::OUString::createFromAscii(""),
- ::rtl::OUString::createFromAscii(""),
- ::rtl::OUString::createFromAscii("") );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) );
aHistoryOpt.AppendItem( ePICKLIST ,
::rtl::OUString::valueOf(nListSize),
- ::rtl::OUString::createFromAscii(""),
- ::rtl::OUString::createFromAscii(""),
- ::rtl::OUString::createFromAscii("") );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) );
}
- else if (sList.equalsAscii("URLHistory"))
+ else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLHistory")))
{
impl_clearList(s_sURLHistory);
sal_Int32 nListSize = aHistoryOpt.GetSize(eHISTORY);
@@ -732,18 +733,18 @@ void HistoryOptTest::impl_checkAppendItem(const ::rtl::OUString& sList)
for (sal_Int32 i=0; i<nListSize; ++i)
aHistoryOpt.AppendItem( eHISTORY ,
::rtl::OUString::valueOf(i),
- ::rtl::OUString::createFromAscii(""),
- ::rtl::OUString::createFromAscii(""),
- ::rtl::OUString::createFromAscii("") );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) );
aHistoryOpt.AppendItem( eHISTORY ,
::rtl::OUString::valueOf(nListSize),
- ::rtl::OUString::createFromAscii(""),
- ::rtl::OUString::createFromAscii(""),
- ::rtl::OUString::createFromAscii("") );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) );
}
- else if (sList.equalsAscii("HelpBookmarks"))
+ else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HelpBookmarks")))
{
//impl_clearList(s_sHelpBookmarks);
//sal_Int32 nListSize = aHistoryOpt.GetSize(eHELPBOOKMARKS);
@@ -751,15 +752,15 @@ void HistoryOptTest::impl_checkAppendItem(const ::rtl::OUString& sList)
//for (sal_Int32 i=0; i<nListSize; ++i)
// aHistoryOpt.AppendItem( eHELPBOOKMARKS ,
// ::rtl::OUString::valueOf(i),
- // ::rtl::OUString::createFromAscii(""),
- // ::rtl::OUString::createFromAscii(""),
- // ::rtl::OUString::createFromAscii("") );
+ // ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ // ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ // ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) );
//aHistoryOpt.AppendItem( eHELPBOOKMARKS ,
// ::rtl::OUString::valueOf(nListSize),
- // ::rtl::OUString::createFromAscii(""),
- // ::rtl::OUString::createFromAscii(""),
- // ::rtl::OUString::createFromAscii("") );
+ // ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ // ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")),
+ // ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) );
}
}
@@ -796,3 +797,5 @@ void HistoryOptTest::impl_checkHelpBookmarks()
impl_checkAppendItem(s_sHelpBookmarks);
}
*/
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/qa/complex/ConfigItems/helper/HistoryOptTest.hxx b/svl/qa/complex/ConfigItems/helper/HistoryOptTest.hxx
index 05ea7edb01cc..c73a71e3d81e 100644
--- a/svl/qa/complex/ConfigItems/helper/HistoryOptTest.hxx
+++ b/svl/qa/complex/ConfigItems/helper/HistoryOptTest.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -201,3 +202,5 @@ class HistoryOptTest
};
#endif // #ifndef SVTOOLS_HISTORYOPTTEST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/qa/complex/ConfigItems/helper/PrintOptTest.cxx b/svl/qa/complex/ConfigItems/helper/PrintOptTest.cxx
index 0731aa2a4253..b02c7deba53b 100644
--- a/svl/qa/complex/ConfigItems/helper/PrintOptTest.cxx
+++ b/svl/qa/complex/ConfigItems/helper/PrintOptTest.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,24 +36,24 @@
namespace css = ::com::sun::star;
// using test only
-#define ROOTNODE_PRINTOPTION rtl::OUString::createFromAscii("org.openoffice.Office.Common/Print/Option")
-#define PROPERTYNAME_REDUCETRANSPARENCY rtl::OUString::createFromAscii("ReduceTransparency")
-#define PROPERTYNAME_REDUCEDTRANSPARENCYMODE rtl::OUString::createFromAscii("ReducedTransparencyMode")
-#define PROPERTYNAME_REDUCEGRADIENTS rtl::OUString::createFromAscii("ReduceGradients")
-#define PROPERTYNAME_REDUCEDGRADIENTMODE rtl::OUString::createFromAscii("ReducedGradientMode")
-#define PROPERTYNAME_REDUCEDGRADIENTSTEPCOUNT rtl::OUString::createFromAscii("ReducedGradientStepCount")
-#define PROPERTYNAME_REDUCEBITMAPS rtl::OUString::createFromAscii("ReduceBitmaps")
-#define PROPERTYNAME_REDUCEDBITMAPMODE rtl::OUString::createFromAscii("ReducedBitmapMode")
-#define PROPERTYNAME_REDUCEDBITMAPRESOLUTION rtl::OUString::createFromAscii("ReducedBitmapResolution")
-#define PROPERTYNAME_REDUCEDBITMAPINCLUDESTRANSPARENCY rtl::OUString::createFromAscii("ReducedBitmapIncludesTransparency")
-#define PROPERTYNAME_CONVERTTOGREYSCALES rtl::OUString::createFromAscii("ConvertToGreyscales")
+#define ROOTNODE_PRINTOPTION rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/Print/Option"))
+#define PROPERTYNAME_REDUCETRANSPARENCY rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceTransparency"))
+#define PROPERTYNAME_REDUCEDTRANSPARENCYMODE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedTransparencyMode"))
+#define PROPERTYNAME_REDUCEGRADIENTS rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceGradients"))
+#define PROPERTYNAME_REDUCEDGRADIENTMODE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedGradientMode"))
+#define PROPERTYNAME_REDUCEDGRADIENTSTEPCOUNT rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedGradientStepCount"))
+#define PROPERTYNAME_REDUCEBITMAPS rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceBitmaps"))
+#define PROPERTYNAME_REDUCEDBITMAPMODE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedBitmapMode"))
+#define PROPERTYNAME_REDUCEDBITMAPRESOLUTION rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedBitmapResolution"))
+#define PROPERTYNAME_REDUCEDBITMAPINCLUDESTRANSPARENCY rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedBitmapIncludesTransparency"))
+#define PROPERTYNAME_CONVERTTOGREYSCALES rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ConvertToGreyscales"))
PrintOptTest::PrintOptTest()
{
m_xCfg = css::uno::Reference< css::container::XNameAccess >(
::comphelper::ConfigurationHelper::openConfig(
::utl::getProcessServiceFactory(),
- rtl::OUString::createFromAscii("org.openoffice.Office.Common/Print/Option"),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/Print/Option")),
::comphelper::ConfigurationHelper::E_STANDARD),
css::uno::UNO_QUERY);
@@ -61,7 +62,7 @@ PrintOptTest::PrintOptTest()
//UniString sTmp = UniString("printer");
//xub_StrLen nTokenCount = sTmp.GetTokenCount('/');
//sTmp = sTmp.GetToken(nTokenCount - 1, '/');
- m_xCfg->getByName(rtl::OUString::createFromAscii("Printer")) >>= m_xNode;
+ m_xCfg->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Printer"))) >>= m_xNode;
}
}
@@ -396,9 +397,9 @@ void PrintOptTest::impl_checkPrint()
if ( bNewValue == bOldValue ) // test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the SetReduceTransparency() error!"),
+ "the SetReduceTransparency() error!")),
0);
}
@@ -412,9 +413,9 @@ void PrintOptTest::impl_checkPrint()
if(bNewValue == bOldValue) // test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the IsReduceTransparency() error!"),
+ "the IsReduceTransparency() error!")),
0);
}
@@ -429,9 +430,9 @@ void PrintOptTest::impl_checkPrint()
if ( nNewMode == nOldMode ) // test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the SetReducedTransparencyMode() error!"),
+ "the SetReducedTransparencyMode() error!")),
0);
}
@@ -445,10 +446,10 @@ void PrintOptTest::impl_checkPrint()
if(nNewMode == nOldMode) // test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
"the IsReducedTransparencyMode() error!"
- "nOldMode's value is :"),
+ "nOldMode's value is :")),
0);
}
@@ -462,9 +463,9 @@ void PrintOptTest::impl_checkPrint()
if (bNewValue == bOldValue) //test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the SetReduceGradients() error!"),
+ "the SetReduceGradients() error!")),
0);
}
@@ -479,9 +480,9 @@ void PrintOptTest::impl_checkPrint()
if (bNewValue == bOldValue) // test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the IsReduceGradients() error!"),
+ "the IsReduceGradients() error!")),
0);
}
@@ -496,9 +497,9 @@ void PrintOptTest::impl_checkPrint()
if (nNewMode == nOldMode)// test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the SetRedecedGradientMode() error!"),
+ "the SetRedecedGradientMode() error!")),
0);
}
@@ -512,9 +513,9 @@ void PrintOptTest::impl_checkPrint()
if (nNewMode == nOldMode) // test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the GetReducedGradientMode() error!"),
+ "the GetReducedGradientMode() error!")),
0);
}
@@ -531,9 +532,9 @@ void PrintOptTest::impl_checkPrint()
if (nNewStepCount == nOldStepCount) // test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the SetReducedGradientStepCount() error!"),
+ "the SetReducedGradientStepCount() error!")),
0);
}
@@ -548,9 +549,9 @@ void PrintOptTest::impl_checkPrint()
if (nNewStepCount == nOldStepCount) //test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the GetReduceGradientStepCount() error!"),
+ "the GetReduceGradientStepCount() error!")),
0);
}
@@ -564,9 +565,9 @@ void PrintOptTest::impl_checkPrint()
if (bNewValue == bOldValue) // test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the SetReduceBitmaps() error!"),
+ "the SetReduceBitmaps() error!")),
0);
}
@@ -580,9 +581,9 @@ void PrintOptTest::impl_checkPrint()
if (bNewValue == bOldValue) // test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the IsReduceBitmaps() error!"),
+ "the IsReduceBitmaps() error!")),
0);
}
@@ -596,9 +597,9 @@ void PrintOptTest::impl_checkPrint()
if (nNewMode == nOldMode)// test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the SetReduceBitmap() error!"),
+ "the SetReduceBitmap() error!")),
0);
}
@@ -612,9 +613,9 @@ void PrintOptTest::impl_checkPrint()
if (nNewMode == nOldMode) // test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the SetReduceBitmapMode() error!"),
+ "the SetReduceBitmapMode() error!")),
0);
}
@@ -628,9 +629,9 @@ void PrintOptTest::impl_checkPrint()
if (nNewMode == nOldMode)// test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the GetReduceBitmapMode() error!"),
+ "the GetReduceBitmapMode() error!")),
0);
}
@@ -647,9 +648,9 @@ void PrintOptTest::impl_checkPrint()
if (nNewResolution == nOldResolution)// test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the SetReducedBitmapResolution() error!"),
+ "the SetReducedBitmapResolution() error!")),
0);
}
@@ -663,9 +664,9 @@ void PrintOptTest::impl_checkPrint()
if (nNewResolution == nOldResolution) // test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the GetReduceBitmapResolution() error!"),
+ "the GetReduceBitmapResolution() error!")),
0);
}
@@ -679,9 +680,9 @@ void PrintOptTest::impl_checkPrint()
if (bNewValue == bOldValue) // test the old source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the SetReducedBitmapIncludesTransparency() error!"),
+ "the SetReducedBitmapIncludesTransparency() error!")),
0);
}
@@ -695,9 +696,9 @@ void PrintOptTest::impl_checkPrint()
if (bNewValue == bOldValue) // test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the IsReducedBitmapIncludesTransparency() error!"),
+ "the IsReducedBitmapIncludesTransparency() error!")),
0);
}
@@ -711,9 +712,9 @@ void PrintOptTest::impl_checkPrint()
if (bNewValue == bOldValue) // test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the SetConvertToGreyscales() error!"),
+ "the SetConvertToGreyscales() error!")),
0);
}
@@ -727,9 +728,11 @@ void PrintOptTest::impl_checkPrint()
if (bNewValue == bOldValue) // test the new source
{
throw css::uno::RuntimeException(
- rtl::OUString::createFromAscii(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"null com.sun.star.configuration."
- "the IsConvertToGreyscales() error!"),
+ "the IsConvertToGreyscales() error!")),
0);
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/qa/complex/ConfigItems/helper/PrintOptTest.hxx b/svl/qa/complex/ConfigItems/helper/PrintOptTest.hxx
index 7d366dc38090..2d43d7057154 100644
--- a/svl/qa/complex/ConfigItems/helper/PrintOptTest.hxx
+++ b/svl/qa/complex/ConfigItems/helper/PrintOptTest.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,5 @@ private: // methods
};
#endif // #ifndef SVTOOLS_PRINTOPTTEST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/qa/complex/ConfigItems/helper/UserOptTest.cxx b/svl/qa/complex/ConfigItems/helper/UserOptTest.cxx
index b14d20a76694..c1e03e915ed2 100644
--- a/svl/qa/complex/ConfigItems/helper/UserOptTest.cxx
+++ b/svl/qa/complex/ConfigItems/helper/UserOptTest.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,24 +31,24 @@
namespace css = ::com::sun::star;
//=============================================================================
-static const ::rtl::OUString MESSAGE_SETCOMPANY_FAILED = ::rtl::OUString::createFromAscii("set company failed") ;
-static const ::rtl::OUString MESSAGE_SETFIRSTNAME_FAILED = ::rtl::OUString::createFromAscii("set firstname failed") ;
-static const ::rtl::OUString MESSAGE_SETLASTNAME_FAILED = ::rtl::OUString::createFromAscii("set lastname failed") ;
-static const ::rtl::OUString MESSAGE_SETID_FAILED = ::rtl::OUString::createFromAscii("set ID failed") ;
-static const ::rtl::OUString MESSAGE_SETSTREET_FAILED = ::rtl::OUString::createFromAscii("set street failed") ;
-static const ::rtl::OUString MESSAGE_SETCITY_FAILED = ::rtl::OUString::createFromAscii("set city failed") ;
-static const ::rtl::OUString MESSAGE_SETSTATE_FAILED = ::rtl::OUString::createFromAscii("set state failed") ;
-static const ::rtl::OUString MESSAGE_SETZIP_FAILED = ::rtl::OUString::createFromAscii("set zip failed") ;
-static const ::rtl::OUString MESSAGE_SETCOUNTRY_FAILED = ::rtl::OUString::createFromAscii("set country failed") ;
-static const ::rtl::OUString MESSAGE_SETPOSITION_FAILED = ::rtl::OUString::createFromAscii("set position failed") ;
-static const ::rtl::OUString MESSAGE_SETTITLE_FAILED = ::rtl::OUString::createFromAscii("set title failed") ;
-static const ::rtl::OUString MESSAGE_SETTELEPHONEHOME_FAILED = ::rtl::OUString::createFromAscii("set telephonehome failed") ;
-static const ::rtl::OUString MESSAGE_SETTELEPHONEWORK_FAILED = ::rtl::OUString::createFromAscii("set telephonework failed") ;
-static const ::rtl::OUString MESSAGE_SETFAX_FAILED = ::rtl::OUString::createFromAscii("set fax failed") ;
-static const ::rtl::OUString MESSAGE_SETEMAIL_FAILED = ::rtl::OUString::createFromAscii("set email failed") ;
-static const ::rtl::OUString MESSAGE_SETCUSTOMERNUMBER_FAILED = ::rtl::OUString::createFromAscii("set customernumber failed");
-static const ::rtl::OUString MESSAGE_SETFATHERSNAME_FAILED = ::rtl::OUString::createFromAscii("set fathersname failed") ;
-static const ::rtl::OUString MESSAGE_SETAPARTMENT_FAILED = ::rtl::OUString::createFromAscii("set apartment failed") ;
+static const ::rtl::OUString MESSAGE_SETCOMPANY_FAILED (RTL_CONSTASCII_USTRINGPARAM("set company failed")) ;
+static const ::rtl::OUString MESSAGE_SETFIRSTNAME_FAILED (RTL_CONSTASCII_USTRINGPARAM("set firstname failed")) ;
+static const ::rtl::OUString MESSAGE_SETLASTNAME_FAILED (RTL_CONSTASCII_USTRINGPARAM("set lastname failed")) ;
+static const ::rtl::OUString MESSAGE_SETID_FAILED (RTL_CONSTASCII_USTRINGPARAM("set ID failed")) ;
+static const ::rtl::OUString MESSAGE_SETSTREET_FAILED (RTL_CONSTASCII_USTRINGPARAM("set street failed")) ;
+static const ::rtl::OUString MESSAGE_SETCITY_FAILED (RTL_CONSTASCII_USTRINGPARAM("set city failed")) ;
+static const ::rtl::OUString MESSAGE_SETSTATE_FAILED (RTL_CONSTASCII_USTRINGPARAM("set state failed")) ;
+static const ::rtl::OUString MESSAGE_SETZIP_FAILED (RTL_CONSTASCII_USTRINGPARAM("set zip failed")) ;
+static const ::rtl::OUString MESSAGE_SETCOUNTRY_FAILED (RTL_CONSTASCII_USTRINGPARAM("set country failed")) ;
+static const ::rtl::OUString MESSAGE_SETPOSITION_FAILED (RTL_CONSTASCII_USTRINGPARAM("set position failed")) ;
+static const ::rtl::OUString MESSAGE_SETTITLE_FAILED (RTL_CONSTASCII_USTRINGPARAM("set title failed")) ;
+static const ::rtl::OUString MESSAGE_SETTELEPHONEHOME_FAILED (RTL_CONSTASCII_USTRINGPARAM("set telephonehome failed")) ;
+static const ::rtl::OUString MESSAGE_SETTELEPHONEWORK_FAILED (RTL_CONSTASCII_USTRINGPARAM("set telephonework failed")) ;
+static const ::rtl::OUString MESSAGE_SETFAX_FAILED (RTL_CONSTASCII_USTRINGPARAM("set fax failed")) ;
+static const ::rtl::OUString MESSAGE_SETEMAIL_FAILED (RTL_CONSTASCII_USTRINGPARAM("set email failed")) ;
+static const ::rtl::OUString MESSAGE_SETCUSTOMERNUMBER_FAILED (RTL_CONSTASCII_USTRINGPARAM("set customernumber failed"));
+static const ::rtl::OUString MESSAGE_SETFATHERSNAME_FAILED (RTL_CONSTASCII_USTRINGPARAM("set fathersname failed")) ;
+static const ::rtl::OUString MESSAGE_SETAPARTMENT_FAILED (RTL_CONSTASCII_USTRINGPARAM("set apartment failed")) ;
//=============================================================================
@@ -83,24 +84,24 @@ void UserOptTest::impl_checkUserData()
impl_checkSetFathersName( ::rtl::OUString() );
impl_checkSetApartment( ::rtl::OUString() );
- impl_checkSetCompany( ::rtl::OUString::createFromAscii("RedFlag2000") );
- impl_checkSetFirstName( ::rtl::OUString::createFromAscii("Yan") );
- impl_checkSetLastName( ::rtl::OUString::createFromAscii("Wu") );
- impl_checkSetID( ::rtl::OUString::createFromAscii("wuy") );
- impl_checkSetStreet( ::rtl::OUString::createFromAscii("SouthFifthRing") );
- impl_checkSetCity( ::rtl::OUString::createFromAscii("Beijing") );
- impl_checkSetState( ::rtl::OUString::createFromAscii("Beijing") );
- impl_checkSetZip( ::rtl::OUString::createFromAscii("100176") );
- impl_checkSetCountry( ::rtl::OUString::createFromAscii("China") );
- impl_checkSetPosition( ::rtl::OUString::createFromAscii("Engineer") );
- impl_checkSetTitle( ::rtl::OUString::createFromAscii("Software Engineer") );
- impl_checkSetTelephoneHome( ::rtl::OUString::createFromAscii("010-51570010") );
- impl_checkSetTelephoneWork( ::rtl::OUString::createFromAscii("010-51570010") );
- impl_checkSetFax( ::rtl::OUString::createFromAscii("010-51570010") );
- impl_checkSetEmail( ::rtl::OUString::createFromAscii("wuy@redflag2000.cn") );
- //impl_checkSetCustomerNumber( ::rtl::OUString::createFromAscii("87654321") );
- impl_checkSetFathersName( ::rtl::OUString::createFromAscii("father") );
- impl_checkSetApartment( ::rtl::OUString::createFromAscii("apartment") );
+ impl_checkSetCompany( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RedFlag2000")) );
+ impl_checkSetFirstName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Yan")) );
+ impl_checkSetLastName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wu")) );
+ impl_checkSetID( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("wuy")) );
+ impl_checkSetStreet( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SouthFifthRing")) );
+ impl_checkSetCity( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Beijing")) );
+ impl_checkSetState( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Beijing")) );
+ impl_checkSetZip( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("100176")) );
+ impl_checkSetCountry( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("China")) );
+ impl_checkSetPosition( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Engineer")) );
+ impl_checkSetTitle( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Software Engineer")) );
+ impl_checkSetTelephoneHome( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("010-51570010")) );
+ impl_checkSetTelephoneWork( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("010-51570010")) );
+ impl_checkSetFax( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("010-51570010")) );
+ impl_checkSetEmail( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("wuy@redflag2000.cn")) );
+ //impl_checkSetCustomerNumber( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("87654321")) );
+ impl_checkSetFathersName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("father")) );
+ impl_checkSetApartment( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("apartment")) );
}
void UserOptTest::impl_checkSetCompany( const ::rtl::OUString& sUserData )
@@ -264,3 +265,5 @@ void UserOptTest::impl_checkSetApartment( const ::rtl::OUString& sUserData )
if ( sCheck != sUserData )
throw css::uno::Exception(MESSAGE_SETAPARTMENT_FAILED, 0);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/qa/complex/ConfigItems/helper/UserOptTest.hxx b/svl/qa/complex/ConfigItems/helper/UserOptTest.hxx
index 8fc63a58a9cc..11e7de6794c1 100644
--- a/svl/qa/complex/ConfigItems/helper/UserOptTest.hxx
+++ b/svl/qa/complex/ConfigItems/helper/UserOptTest.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68,3 +69,5 @@ private:
};
#endif // #ifndef SVTOOLS_USEROPTTEST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/qa/export.map b/svl/qa/export.map
index 7321bbca16ad..3308588ef6f8 100644
--- a/svl/qa/export.map
+++ b/svl/qa/export.map
@@ -27,7 +27,7 @@
UDK_3_0_0 {
global:
- registerAllTestFunction;
+ cppunitTestPlugIn;
local:
*;
diff --git a/svl/qa/test_URIHelper.cxx b/svl/qa/test_URIHelper.cxx
index cdf6b1780884..c206def13830 100644
--- a/svl/qa/test_URIHelper.cxx
+++ b/svl/qa/test_URIHelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,6 +31,12 @@
#include "sal/config.h"
+#include <cppunit/TestSuite.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/TestCase.h>
+#include <cppunit/plugin/TestPlugIn.h>
+#include <cppunit/extensions/HelperMacros.h>
+
#include <cstddef>
#include "com/sun/star/lang/Locale.hpp"
@@ -54,7 +61,6 @@
#include "cppuhelper/bootstrap.hxx"
#include "cppuhelper/implbase1.hxx"
#include "cppuhelper/implbase2.hxx"
-#include "testshl/simpleheader.hxx"
#include "osl/diagnose.h"
#include "rtl/strbuf.hxx"
#include "rtl/string.h"
@@ -63,6 +69,7 @@
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#include "sal/types.h"
+#include <sal/macros.h>
#include "tools/solar.h"
#include "unotools/charclass.hxx"
@@ -284,7 +291,7 @@ void Test::testNormalizedMakeRelative() {
"nonex3/nonex4" }
#endif
};
- for (std::size_t i = 0; i < sizeof tests / sizeof tests[0]; ++i) {
+ for (std::size_t i = 0; i < SAL_N_ELEMENTS(tests); ++i) {
css::uno::Reference< css::uri::XUriReference > ref(
URIHelper::normalizedMakeRelative(
m_context, rtl::OUString::createFromAscii(tests[i].base),
@@ -335,7 +342,13 @@ void Test::testFindFirstURLInText() {
"ftp://bla.bla.bla/blubber/", 3, 29 },
{ "..\\ftp://bla.bla.bla/blubber/...", 0, 0, 0 },
{ "..\\ftp:\\\\bla.bla.bla\\blubber/...",
+//Sync with tools/source/fsys/urlobj.cxx and changeScheme
+#ifdef LINUX
+ "smb://bla.bla.bla/blubber%2F", 7, 29 },
+#endif
+#ifdef WNT
"file://bla.bla.bla/blubber%2F", 7, 29 },
+#endif
{ "http://sun.com", "http://sun.com/", 0, 14 },
{ "http://sun.com/", "http://sun.com/", 0, 15 },
{ "http://www.xerox.com@www.pcworld.com/go/3990332.htm", 0, 0, 0 },
@@ -414,7 +427,7 @@ void Test::testFindFirstURLInText() {
com::sun::star::lang::Locale(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US")), rtl::OUString()));
- for (std::size_t i = 0; i < sizeof tests / sizeof tests[0]; ++i) {
+ for (std::size_t i = 0; i < SAL_N_ELEMENTS(tests); ++i) {
rtl::OUString input(rtl::OUString::createFromAscii(tests[i].input));
xub_StrLen begin = 0;
xub_StrLen end = static_cast< xub_StrLen >(input.getLength());
@@ -452,8 +465,10 @@ void Test::testFindFirstURLInText() {
css::uno::Reference< css::uno::XComponentContext > Test::m_context;
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests");
+CPPUNIT_TEST_SUITE_REGISTRATION(Test);
}
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/qa/unit/makefile.mk b/svl/qa/unit/makefile.mk
new file mode 100644
index 000000000000..ab59123b7efc
--- /dev/null
+++ b/svl/qa/unit/makefile.mk
@@ -0,0 +1,96 @@
+# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+#
+# 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. 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
+# Novell, Inc.
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# 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.
+#
+
+PRJ=..$/..
+PRJNAME=svl
+TARGET=qa_unit
+
+ENABLE_EXCEPTIONS=TRUE
+
+.INCLUDE : settings.mk
+
+CFLAGSCXX += $(CPPUNIT_CFLAGS) -I../../inc
+
+SHL1TARGET = $(TARGET)
+SHL1OBJS = $(SLO)$/svl.obj
+SHL1STDLIBS= \
+ $(UNOTOOLSLIB) \
+ $(SVLLIB) \
+ $(TOOLSLIB) \
+ $(I18NISOLANGLIB) \
+ $(UCBHELPERLIB) \
+ $(COMPHELPERLIB) \
+ $(CPPUHELPERLIB) \
+ $(CPPULIB) \
+ $(SOTLIB) \
+ $(SALLIB) \
+ $(CPPUNITLIB)
+
+SHL1IMPLIB = i$(SHL1TARGET)
+DEF1NAME = $(SHL1TARGET)
+SHL1VERSIONMAP=version.map
+
+.INCLUDE: target.mk
+
+.IF "$(OS)" == "WNT"
+my_file = file:///
+.ELSE
+my_file = file://
+.END
+
+ALLTAR: test
+
+$(MISC)$/$(TARGET)$/types.rdb .ERRREMOVE : $(SOLARBINDIR)$/types.rdb
+ $(MKDIRHIER) $(@:d)
+ $(GNUCOPY) $? $@
+
+$(MISC)/$(TARGET)/udkapi.rdb .ERRREMOVE : $(SOLARBINDIR)$/udkapi.rdb
+ $(MKDIRHIER) $(@:d)
+ $(GNUCOPY) $? $@
+
+#Make a services.rdb with the services we know we need to get up and running
+$(MISC)/$(TARGET)/services.rdb .ERRREMOVE : $(MISC)/$(TARGET)/udkapi.rdb makefile.mk
+ $(MKDIRHIER) $(@:d)
+ $(REGCOMP) -register -br $(MISC)/$(TARGET)/udkapi.rdb -r $@ -wop \
+ -c i18npool.uno$(DLLPOST)
+
+#Tweak things so that we use the .res files in the solver
+STAR_RESOURCEPATH:=$(PWD)/$(BIN)$(PATH_SEPERATOR)$(SOLARBINDIR)
+.EXPORT : STAR_RESOURCEPATH
+
+test .PHONY: $(SHL1TARGETN) $(MISC)/$(TARGET)/services.rdb $(MISC)$/$(TARGET)$/types.rdb $(MISC)/$(TARGET)/udkapi.rdb
+ @echo ----------------------------------------------------------
+ @echo - start unit test \#1 on library $(SHL1TARGETN)
+ @echo In the environment: STAR_RESOURCEPATH=$$STAR_RESOURCEPATH
+ @echo ----------------------------------------------------------
+ $(CPPUNITTESTER) $(SHL1TARGETN) \
+ -env:UNO_SERVICES=$(my_file)$(PWD)/$(MISC)/$(TARGET)/services.rdb \
+ -env:UNO_TYPES="$(my_file)$(PWD)/$(MISC)/$(TARGET)/types.rdb $(my_file)$(PWD)/$(MISC)/$(TARGET)/udkapi.rdb" \
+ -env:OOO_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
+ -env:BRAND_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
+ -env:UNO_USER_PACKAGES_CACHE="$(my_file)$(PWD)/$(MISC)/$(TARGET)"
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
new file mode 100644
index 000000000000..201a20ee1e57
--- /dev/null
+++ b/svl/qa/unit/svl.cxx
@@ -0,0 +1,298 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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. 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
+ * Novell, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * 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.
+ */
+
+#include "precompiled_svl.hxx"
+
+#ifdef WNT
+# undef ERROR
+#endif
+
+#include <cppunit/TestAssert.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/plugin/TestPlugIn.h>
+
+#include <sal/config.h>
+#include <osl/file.hxx>
+#include <osl/process.h>
+#include <rtl/ustrbuf.hxx>
+
+#include <cppuhelper/bootstrap.hxx>
+#include <comphelper/processfactory.hxx>
+
+#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
+#include <com/sun/star/sheet/GeneralFunction.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+
+#include <i18npool/lang.h>
+
+#include "svl/zforlist.hxx"
+#include "svl/zformat.hxx"
+
+#define DEBUG_UNIT_TEST 0
+
+#if DEBUG_UNIT_TEST
+#include <iostream>
+#endif
+
+using namespace ::com::sun::star;
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
+
+#if DEBUG_UNIT_TEST
+using ::std::cout;
+using ::std::endl;
+#endif
+
+namespace {
+
+#if DEBUG_UNIT_TEST
+::std::ostream& operator<< (::std::ostream& os, const OUString& str)
+{
+ return os << ::rtl::OUStringToOString(str, RTL_TEXTENCODING_UTF8).getStr();
+}
+#endif
+
+class Test : public CppUnit::TestFixture {
+public:
+ Test();
+ ~Test();
+
+ virtual void setUp();
+ virtual void tearDown();
+
+ void testNumberFormat();
+
+ CPPUNIT_TEST_SUITE(Test);
+ CPPUNIT_TEST(testNumberFormat);
+ CPPUNIT_TEST_SUITE_END();
+
+private:
+ uno::Reference< uno::XComponentContext > m_xContext;
+};
+
+Test::Test()
+{
+ m_xContext = cppu::defaultBootstrap_InitialComponentContext();
+
+ uno::Reference<lang::XMultiComponentFactory> xFactory(m_xContext->getServiceManager());
+ uno::Reference<lang::XMultiServiceFactory> xSM(xFactory, uno::UNO_QUERY_THROW);
+
+ //Without this we're crashing because callees are using
+ //getProcessServiceFactory. In general those should be removed in favour
+ //of retaining references to the root ServiceFactory as its passed around
+ comphelper::setProcessServiceFactory(xSM);
+}
+
+void Test::setUp()
+{
+}
+
+void Test::tearDown()
+{
+}
+
+Test::~Test()
+{
+ uno::Reference< lang::XComponent >(m_xContext, uno::UNO_QUERY_THROW)->dispose();
+}
+
+void Test::testNumberFormat()
+{
+ LanguageType eLang = LANGUAGE_ENGLISH_US;
+
+ const char* pNumber[] = {
+ "General",
+ "0",
+ "0.00",
+ "#,##0",
+ "#,##0.00",
+ "#,###.00",
+ 0
+ };
+
+ const char* pScientific[] = {
+ "0.00E+000",
+ "0.00E+00",
+ 0
+ };
+
+ const char* pPercent[] = {
+ "0%",
+ "0.00%",
+ 0
+ };
+
+ const char* pFraction[] = {
+ "# \?/\?",
+ "# \?\?/\?\?",
+ "# \?/4",
+ "# \?\?/100",
+ 0
+ };
+
+#if 0 // TODO: Find out why on some systems the last two currency format codes differ.
+ const char* pCurrency[] = {
+ "$#,##0;[RED]-$#,##0",
+ "$#,##0.00;[RED]-$#,##0.00",
+ "#,##0.00 CCC",
+ "$#,##0.--;[RED]-$#,##0.--",
+ "$#,##0;-$#,##0",
+ "$#,##0;-$#,##0",
+ 0
+ };
+#endif
+
+ const char* pDate[] = {
+ "MM/DD/YY",
+ "MM/DD/YYYY",
+ "MMM D, YY",
+ "MMM D, YYYY",
+ "D. MMM. YYYY",
+ "MMMM D, YYYY",
+ "D. MMMM YYYY",
+ "NN, MMM D, YY",
+ "NN DD/MMM YY",
+ "NN, MMMM D, YYYY",
+ "NNNNMMMM D, YYYY",
+ "MM-DD",
+ "YY-MM-DD",
+ "YYYY-MM-DD",
+ "MM/YY",
+ "MMM DD",
+ "MMMM",
+ "QQ YY",
+ "WW",
+ "MM/DD/YY",
+ "WW",
+ 0
+ };
+
+ const char* pTime[] = {
+ "HH:MM AM/PM",
+ "HH:MM:SS AM/PM",
+ "[HH]:MM:SS",
+ "MM:SS.00",
+ "[HH]:MM:SS.00",
+ "HH:MM:SS AM/PM",
+ "HH:MM:SS AM/PM",
+ 0
+ };
+
+ const char* pDateTime[] = {
+ "MM/DD/YY HH:MM AM/PM",
+ "MM/DD/YY HH:MM AM/PM",
+ 0
+ };
+
+ const char* pBoolean[] = {
+ "BOOLEAN",
+ 0
+ };
+
+ const char* pText[] = {
+ "@",
+ 0
+ };
+
+ struct {
+ NfIndexTableOffset eStart;
+ NfIndexTableOffset eEnd;
+ size_t nSize;
+ const char** pCodes;
+ } aTests[] = {
+ { NF_NUMBER_START, NF_NUMBER_END, 6, pNumber },
+ { NF_SCIENTIFIC_START, NF_SCIENTIFIC_END, 2, pScientific },
+ { NF_PERCENT_START, NF_PERCENT_END, 2, pPercent },
+ { NF_FRACTION_START, NF_FRACTION_END, 4, pFraction },
+#if 0 // TODO: Find out why on some systems the last two currency format codes differ.
+ { NF_CURRENCY_START, NF_CURRENCY_END, 6, pCurrency },
+#endif
+ { NF_DATE_START, NF_DATE_END, 21, pDate },
+ { NF_TIME_START, NF_TIME_END, 7, pTime },
+ { NF_DATETIME_START, NF_DATETIME_END, 2, pDateTime },
+ { NF_BOOLEAN, NF_BOOLEAN, 1, pBoolean },
+ { NF_TEXT, NF_TEXT, 1, pText }
+ };
+
+ SvNumberFormatter aFormatter(eLang);
+
+ for (size_t i = 0; i < SAL_N_ELEMENTS(aTests); ++i)
+ {
+ size_t nStart = aTests[i].eStart;
+ size_t nEnd = aTests[i].eEnd;
+
+ CPPUNIT_ASSERT_MESSAGE("Unexpected number of formats for this category.",
+ (nEnd - nStart + 1) == aTests[i].nSize);
+
+ for (size_t j = nStart; j <= nEnd; ++j)
+ {
+ sal_uInt32 nIndex =
+ aFormatter.GetFormatIndex(static_cast<NfIndexTableOffset>(j));
+ const SvNumberformat* p = aFormatter.GetEntry(nIndex);
+
+ CPPUNIT_ASSERT_MESSAGE("Number format entry is expected, but doesn't exist.", p);
+ OUString aCode = p->GetFormatstring();
+ bool bEqual = aCode.equalsAscii(aTests[i].pCodes[j-nStart]);
+ CPPUNIT_ASSERT_MESSAGE("Unexpected number format code.", bEqual);
+ }
+ }
+
+ xub_StrLen nPos;
+ short nType = NUMBERFORMAT_DEFINED;
+ sal_uInt32 nKey;
+ OUString aCode;
+ // Thai date format (implicit locale).
+ aCode = OUString(RTL_CONSTASCII_USTRINGPARAM("[$-1070000]d/mm/yyyy;@"));
+ if (!aFormatter.PutEntry(aCode, nPos, nType, nKey))
+ {
+ CPPUNIT_ASSERT_MESSAGE("failed to insert format code '[$-1070000]d/mm/yyyy;@'", false);
+ }
+
+ // Thai date format (explicit locale)
+ aCode = OUString(RTL_CONSTASCII_USTRINGPARAM("[$-107041E]d/mm/yyyy;@"));
+ if (!aFormatter.PutEntry(aCode, nPos, nType, nKey))
+ {
+ CPPUNIT_ASSERT_MESSAGE("failed to insert format code '[$-107041E]d/mm/yyyy;@'", false);
+ }
+
+ // Thai date format (using buddhist calendar type).
+ aCode = OUString(RTL_CONSTASCII_USTRINGPARAM("[~buddhist]D MMMM YYYY"));
+ if (!aFormatter.PutEntry(aCode, nPos, nType, nKey))
+ {
+ CPPUNIT_ASSERT_MESSAGE("failed to insert format code '[~buddhist]D MMMM YYYY'", false);
+ }
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(Test);
+
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/qa/unit/version.map b/svl/qa/unit/version.map
new file mode 100644
index 000000000000..3308588ef6f8
--- /dev/null
+++ b/svl/qa/unit/version.map
@@ -0,0 +1,34 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+UDK_3_0_0 {
+ global:
+ cppunitTestPlugIn;
+
+ local:
+ *;
+};