summaryrefslogtreecommitdiff
path: root/test/source/sheet
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-03-19 09:22:44 +0100
committerThomas Arnhold <thomas@arnhold.org>2013-03-19 09:00:26 +0000
commit8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch)
tree2dbddceebf0f96492adc5652697e8efce8a8ba06 /test/source/sheet
parentfe8eba5faa59ddf9ee82f3eb009daac72a0ec846 (diff)
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex: s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec Reviewed-on: https://gerrit.libreoffice.org/2832 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'test/source/sheet')
-rw-r--r--test/source/sheet/datapilotfield.cxx6
-rw-r--r--test/source/sheet/tableautoformatfield.cxx2
-rw-r--r--test/source/sheet/xdatabaserange.cxx30
-rw-r--r--test/source/sheet/xdatapilottable2.cxx2
-rw-r--r--test/source/sheet/xnamedrange.cxx8
5 files changed, 24 insertions, 24 deletions
diff --git a/test/source/sheet/datapilotfield.cxx b/test/source/sheet/datapilotfield.cxx
index 5f3ccdc6867b..c922b9899280 100644
--- a/test/source/sheet/datapilotfield.cxx
+++ b/test/source/sheet/datapilotfield.cxx
@@ -54,7 +54,7 @@ void DataPilotField::testSortInfo()
uno::Reference< beans::XPropertySet> xPropSet(init(),UNO_QUERY_THROW);
sheet::DataPilotFieldSortInfo aSortInfoValue;
rtl::OUString aSortInfo(RTL_CONSTASCII_USTRINGPARAM("SortInfo"));
- aSortInfoValue.Field = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Col1"));
+ aSortInfoValue.Field = rtl::OUString("Col1");
aSortInfoValue.IsAscending = false;
aSortInfoValue.Mode = sheet::DataPilotFieldSortMode::MANUAL;
uno::Any xValue;
@@ -120,7 +120,7 @@ void DataPilotField::testAutoShowInfo()
{
uno::Reference< beans::XPropertySet > xPropSet(init(),UNO_QUERY_THROW);
sheet::DataPilotFieldAutoShowInfo aAutoShowInfoValue;
- aAutoShowInfoValue.DataField = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Col1"));
+ aAutoShowInfoValue.DataField = rtl::OUString("Col1");
aAutoShowInfoValue.IsEnabled = true;
rtl::OUString aAutoShowInfo(RTL_CONSTASCII_USTRINGPARAM("AutoShowInfo"));
uno::Any xValue;
@@ -153,7 +153,7 @@ void DataPilotField::testReference()
{
uno::Reference< beans::XPropertySet > xPropSet(init(),UNO_QUERY_THROW);
sheet::DataPilotFieldReference aReferenceValue;
- aReferenceValue.ReferenceField = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Col1"));
+ aReferenceValue.ReferenceField = rtl::OUString("Col1");
aReferenceValue.ReferenceItemType = sheet::DataPilotFieldReferenceItemType::NAMED;
rtl::OUString aReference(RTL_CONSTASCII_USTRINGPARAM("Reference"));
uno::Any xValue;
diff --git a/test/source/sheet/tableautoformatfield.cxx b/test/source/sheet/tableautoformatfield.cxx
index c846b6a22503..540dcd7a1d6a 100644
--- a/test/source/sheet/tableautoformatfield.cxx
+++ b/test/source/sheet/tableautoformatfield.cxx
@@ -37,7 +37,7 @@ namespace apitest {
uno::Reference< beans::XPropertySet > TableAutoFormatField::initTest()
{
- uno::Reference< container::XIndexAccess > xAutoFormatFields( getServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.TableAutoFormats"))), UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xAutoFormatFields( getServiceFactory()->createInstance(rtl::OUString("com.sun.star.sheet.TableAutoFormats")), UNO_QUERY_THROW );
CPPUNIT_ASSERT(xAutoFormatFields.is());
uno::Reference< container::XIndexAccess > xIndex( xAutoFormatFields->getByIndex(0), UNO_QUERY_THROW );
CPPUNIT_ASSERT(xIndex.is());
diff --git a/test/source/sheet/xdatabaserange.cxx b/test/source/sheet/xdatabaserange.cxx
index f57e3d37fcdd..68634b1ff4a7 100644
--- a/test/source/sheet/xdatabaserange.cxx
+++ b/test/source/sheet/xdatabaserange.cxx
@@ -55,7 +55,7 @@ namespace apitest {
*/
void XDatabaseRange::testDataArea()
{
- uno::Reference< sheet::XDatabaseRange > xDBRange(init(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataArea"))), UNO_QUERY_THROW);
+ uno::Reference< sheet::XDatabaseRange > xDBRange(init(rtl::OUString("DataArea")), UNO_QUERY_THROW);
table::CellRangeAddress aCellAddress;
aCellAddress.Sheet = 0;
@@ -75,67 +75,67 @@ void XDatabaseRange::testDataArea()
void XDatabaseRange::testGetSubtotalDescriptor()
{
- uno::Reference< sheet::XDatabaseRange > xDBRange(init(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SubtotalDescriptor"))), UNO_QUERY_THROW);
+ uno::Reference< sheet::XDatabaseRange > xDBRange(init(rtl::OUString("SubtotalDescriptor")), UNO_QUERY_THROW);
uno::Reference< sheet::XSubTotalDescriptor> xSubtotalDescr = xDBRange->getSubTotalDescriptor();
CPPUNIT_ASSERT(xSubtotalDescr.is());
}
void XDatabaseRange::testGetSortDescriptor()
{
- uno::Reference< sheet::XDatabaseRange > xDBRange(init(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SortDescriptor"))), UNO_QUERY_THROW);
+ uno::Reference< sheet::XDatabaseRange > xDBRange(init(rtl::OUString("SortDescriptor")), UNO_QUERY_THROW);
uno::Sequence< beans::PropertyValue > xSortDescr = xDBRange->getSortDescriptor();
for (sal_Int32 i = 0; i < xSortDescr.getLength(); ++i)
{
beans::PropertyValue xProp = xSortDescr[i];
//std::cout << "Prop " << i << " Name: " << rtl::OUString(xProp.Name) << std::endl;
- if (xProp.Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsSortColumns")))
+ if (xProp.Name == rtl::OUString("IsSortColumns"))
{
sal_Bool bIsSortColumns = sal_True;
xProp.Value >>= bIsSortColumns;
CPPUNIT_ASSERT(bIsSortColumns == sal_True);
}
- else if (xProp.Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContainsHeader")))
+ else if (xProp.Name == rtl::OUString("ContainsHeader"))
{
sal_Bool bContainsHeader = sal_True;
xProp.Value >>= bContainsHeader;
CPPUNIT_ASSERT(bContainsHeader == sal_True);
}
- else if (xProp.Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MaxFieldCount")))
+ else if (xProp.Name == rtl::OUString("MaxFieldCount"))
{
sal_Int32 nMaxFieldCount = 0;
xProp.Value >>= nMaxFieldCount;
std::cout << "Value: " << nMaxFieldCount << std::endl;
}
- else if (xProp.Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SortFields")))
+ else if (xProp.Name == rtl::OUString("SortFields"))
{
}
- else if (xProp.Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BindFormatsToContent")))
+ else if (xProp.Name == rtl::OUString("BindFormatsToContent"))
{
sal_Bool bBindFormatsToContent = sal_False;
xProp.Value >>= bBindFormatsToContent;
CPPUNIT_ASSERT(bBindFormatsToContent == sal_True);
}
- else if (xProp.Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CopyOutputData")))
+ else if (xProp.Name == rtl::OUString("CopyOutputData"))
{
sal_Bool bCopyOutputData = sal_True;
xProp.Value >>= bCopyOutputData;
CPPUNIT_ASSERT(bCopyOutputData == sal_False);
}
- else if (xProp.Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OutputPosition")))
+ else if (xProp.Name == rtl::OUString("OutputPosition"))
{
}
- else if (xProp.Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsUserListEnabled")))
+ else if (xProp.Name == rtl::OUString("IsUserListEnabled"))
{
sal_Bool bIsUserListEnabled = sal_True;
xProp.Value >>= bIsUserListEnabled;
CPPUNIT_ASSERT(bIsUserListEnabled == sal_False);
}
- else if (xProp.Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UserListIndex")))
+ else if (xProp.Name == rtl::OUString("UserListIndex"))
{
sal_Int32 nUserListIndex = 1;
xProp.Value >>= nUserListIndex;
@@ -146,20 +146,20 @@ void XDatabaseRange::testGetSortDescriptor()
void XDatabaseRange::testGetFilterDescriptor()
{
- uno::Reference< sheet::XDatabaseRange > xDBRange( init(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FilterDescriptor"))), UNO_QUERY_THROW);
+ uno::Reference< sheet::XDatabaseRange > xDBRange( init(rtl::OUString("FilterDescriptor")), UNO_QUERY_THROW);
uno::Reference< uno::XInterface > xFilterDescr( xDBRange->getFilterDescriptor(), UNO_QUERY_THROW);
CPPUNIT_ASSERT(xFilterDescr.is());
}
void XDatabaseRange::testGetImportDescriptor()
{
- uno::Reference< sheet::XDatabaseRange > xDBRange( init(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImportDescriptor"))), UNO_QUERY_THROW);
+ uno::Reference< sheet::XDatabaseRange > xDBRange( init(rtl::OUString("ImportDescriptor")), UNO_QUERY_THROW);
uno::Sequence< beans::PropertyValue > xImportDescr = xDBRange->getImportDescriptor();
}
void XDatabaseRange::testRefresh()
{
- uno::Reference< sheet::XDatabaseRange > xDBRange( init(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Refresh"))), UNO_QUERY_THROW);
+ uno::Reference< sheet::XDatabaseRange > xDBRange( init(rtl::OUString("Refresh")), UNO_QUERY_THROW);
const sal_Int32 nCol = 0;
rtl::OUString aHidden(RTL_CONSTASCII_USTRINGPARAM("IsVisible"));
diff --git a/test/source/sheet/xdatapilottable2.cxx b/test/source/sheet/xdatapilottable2.cxx
index dd29aa3064c8..7d9e8ac97335 100644
--- a/test/source/sheet/xdatapilottable2.cxx
+++ b/test/source/sheet/xdatapilottable2.cxx
@@ -242,7 +242,7 @@ void XDataPilotTable2::buildDataFields( uno::Reference< sheet::XDataPilotTable2
for( sal_Int32 i = 0; i < nFieldCount; ++i)
{
uno::Reference< beans::XPropertySet > xPropSet(xIndex->getByIndex(i), UNO_QUERY_THROW);
- Any aAny = xPropSet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Orientation")));
+ Any aAny = xPropSet->getPropertyValue(rtl::OUString("Orientation"));
sheet::DataPilotFieldOrientation aOrientation;
CPPUNIT_ASSERT( aAny >>= aOrientation );
diff --git a/test/source/sheet/xnamedrange.cxx b/test/source/sheet/xnamedrange.cxx
index 8330c1e7ef9d..bd4615018494 100644
--- a/test/source/sheet/xnamedrange.cxx
+++ b/test/source/sheet/xnamedrange.cxx
@@ -68,19 +68,19 @@ void XNamedRange::testSetContent()
rtl::OUString aExpectedContent;
// test a cell
- aExpectedContent = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("D1"));
+ aExpectedContent = rtl::OUString("D1");
xNamedRange->setContent(aExpectedContent);
CPPUNIT_ASSERT_MESSAGE("Wrong expected content for initial1 after SetContent a cell", xNamedRange->getContent().equals(aExpectedContent));
// test a cellrange
- aExpectedContent = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("D1:D10"));
+ aExpectedContent = rtl::OUString("D1:D10");
xNamedRange->setContent(aExpectedContent);
CPPUNIT_ASSERT_MESSAGE("Wrong expected content for initial1 after SetContent a cellrange", xNamedRange->getContent().equals(aExpectedContent));
// test a formula
- aExpectedContent = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=D10"));
+ aExpectedContent = rtl::OUString("=D10");
xNamedRange->setContent(aExpectedContent);
- aExpectedContent = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("D10"));
+ aExpectedContent = rtl::OUString("D10");
CPPUNIT_ASSERT_MESSAGE("Wrong expected content for initial1 after SetContent a formula", xNamedRange->getContent().equals(aExpectedContent));
}