[Libreoffice-commits] .: sc/qa sc/source
Norbert Thiebaud
nthiebaud at kemper.freedesktop.org
Fri Jun 1 04:12:40 PDT 2012
sc/qa/unit/ucalc.cxx | 338 ++++++++++++++++++-------------------
sc/source/core/data/dpoutput.cxx | 40 ++--
sc/source/ui/vba/vbafilesearch.cxx | 12 -
sc/source/ui/vba/vbaglobals.cxx | 28 +--
sc/source/ui/vba/vbahelper.cxx | 46 ++---
sc/source/ui/vba/vbapagesetup.cxx | 88 ++++-----
sc/source/ui/vba/vbapropvalue.hxx | 2
sc/source/ui/vba/vbarange.cxx | 274 ++++++++++++++---------------
sc/source/ui/view/cellsh1.cxx | 10 -
sc/source/ui/view/cellsh2.cxx | 2
sc/source/ui/view/formatsh.cxx | 2
sc/source/ui/view/gridwin2.cxx | 2
sc/source/ui/view/prevwsh.cxx | 8
sc/source/ui/view/tabvwshg.cxx | 10 -
14 files changed, 430 insertions(+), 432 deletions(-)
New commits:
commit 20a132b51715bb1869068a52202e63701550041d
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Jun 1 05:35:31 2012 -0500
targeted string re-work
Change-Id: I970c967cce1a5d18e2b9b2b99cddfb3118159950
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 71014a1..d37e3f1 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -334,8 +334,8 @@ void Test::tearDown()
void Test::testCollator()
{
- OUString s1(RTL_CONSTASCII_USTRINGPARAM("A"));
- OUString s2(RTL_CONSTASCII_USTRINGPARAM("B"));
+ OUString s1("A");
+ OUString s2("B");
CollatorWrapper* p = ScGlobal::GetCollator();
sal_Int32 nRes = p->compareString(s1, s2);
CPPUNIT_ASSERT_MESSAGE("these strings are supposed to be different!", nRes != 0);
@@ -343,12 +343,12 @@ void Test::testCollator()
void Test::testInput()
{
- rtl::OUString aTabName(RTL_CONSTASCII_USTRINGPARAM("foo"));
+ rtl::OUString aTabName("foo");
CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet",
m_pDoc->InsertTab (0, aTabName));
- OUString numstr(RTL_CONSTASCII_USTRINGPARAM("'10.5"));
- OUString str(RTL_CONSTASCII_USTRINGPARAM("'apple'"));
+ OUString numstr("'10.5");
+ OUString str("'apple'");
OUString test;
m_pDoc->SetString(0, 0, 0, numstr);
@@ -369,7 +369,7 @@ void testFuncSUM(ScDocument* pDoc)
double result;
pDoc->SetValue (0, 0, 0, val);
pDoc->SetValue (0, 1, 0, val);
- pDoc->SetString (0, 2, 0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=SUM(A1:A2)")));
+ pDoc->SetString (0, 2, 0, rtl::OUString("=SUM(A1:A2)"));
pDoc->CalcAll();
pDoc->GetValue (0, 2, 0, result);
CPPUNIT_ASSERT_MESSAGE ("calculation failed", result == 2.0);
@@ -384,12 +384,12 @@ void testFuncPRODUCT(ScDocument* pDoc)
pDoc->SetValue(0, 1, 0, val);
val = 3;
pDoc->SetValue(0, 2, 0, val);
- pDoc->SetString(0, 3, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=PRODUCT(A1:A3)")));
+ pDoc->SetString(0, 3, 0, OUString("=PRODUCT(A1:A3)"));
pDoc->CalcAll();
pDoc->GetValue(0, 3, 0, result);
CPPUNIT_ASSERT_MESSAGE("Calculation of PRODUCT failed", result == 6.0);
- pDoc->SetString(0, 4, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=PRODUCT({1;2;3})")));
+ pDoc->SetString(0, 4, 0, OUString("=PRODUCT({1;2;3})"));
pDoc->CalcAll();
pDoc->GetValue(0, 4, 0, result);
CPPUNIT_ASSERT_MESSAGE("Calculation of PRODUCT with inline array failed", result == 6.0);
@@ -405,38 +405,38 @@ void testFuncN(ScDocument* pDoc)
// Put values to reference.
double val = 0;
pDoc->SetValue(0, 0, 0, val);
- pDoc->SetString(0, 2, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("Text")));
+ pDoc->SetString(0, 2, 0, OUString("Text"));
val = 1;
pDoc->SetValue(0, 3, 0, val);
val = -1;
pDoc->SetValue(0, 4, 0, val);
val = 12.3;
pDoc->SetValue(0, 5, 0, val);
- pDoc->SetString(0, 6, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("'12.3")));
+ pDoc->SetString(0, 6, 0, OUString("'12.3"));
// Cell references
- pDoc->SetString(1, 0, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(A1)")));
- pDoc->SetString(1, 1, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(A2)")));
- pDoc->SetString(1, 2, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(A3)")));
- pDoc->SetString(1, 3, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(A4)")));
- pDoc->SetString(1, 4, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(A5)")));
- pDoc->SetString(1, 5, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(A6)")));
- pDoc->SetString(1, 6, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(A9)")));
+ pDoc->SetString(1, 0, 0, OUString("=N(A1)"));
+ pDoc->SetString(1, 1, 0, OUString("=N(A2)"));
+ pDoc->SetString(1, 2, 0, OUString("=N(A3)"));
+ pDoc->SetString(1, 3, 0, OUString("=N(A4)"));
+ pDoc->SetString(1, 4, 0, OUString("=N(A5)"));
+ pDoc->SetString(1, 5, 0, OUString("=N(A6)"));
+ pDoc->SetString(1, 6, 0, OUString("=N(A9)"));
// In-line values
- pDoc->SetString(1, 7, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(0)")));
- pDoc->SetString(1, 8, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(1)")));
- pDoc->SetString(1, 9, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(-1)")));
- pDoc->SetString(1, 10, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(123)")));
- pDoc->SetString(1, 11, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(\"\")")));
- pDoc->SetString(1, 12, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(\"12\")")));
- pDoc->SetString(1, 13, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(\"foo\")")));
+ pDoc->SetString(1, 7, 0, OUString("=N(0)"));
+ pDoc->SetString(1, 8, 0, OUString("=N(1)"));
+ pDoc->SetString(1, 9, 0, OUString("=N(-1)"));
+ pDoc->SetString(1, 10, 0, OUString("=N(123)"));
+ pDoc->SetString(1, 11, 0, OUString("=N(\"\")"));
+ pDoc->SetString(1, 12, 0, OUString("=N(\"12\")"));
+ pDoc->SetString(1, 13, 0, OUString("=N(\"foo\")"));
// Range references
- pDoc->SetString(1, 14, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(A1:A8)")));
- pDoc->SetString(1, 15, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(A4:B8)")));
- pDoc->SetString(1, 16, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(A6:B8)")));
- pDoc->SetString(1, 17, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=N(A2:B8)")));
+ pDoc->SetString(1, 14, 0, OUString("=N(A1:A8)"));
+ pDoc->SetString(1, 15, 0, OUString("=N(A4:B8)"));
+ pDoc->SetString(1, 16, 0, OUString("=N(A6:B8)"));
+ pDoc->SetString(1, 17, 0, OUString("=N(A2:B8)"));
// Calculate and check the results.
pDoc->CalcAll();
@@ -527,8 +527,8 @@ void testFuncCOUNTIF(ScDocument* pDoc)
// Clear A1:A2.
clearRange(pDoc, ScRange(0, 0, 0, 0, 1, 0));
- pDoc->SetString(0, 0, 0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=\"\"")));
- pDoc->SetString(0, 1, 0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=COUNTIF(A1;1)")));
+ pDoc->SetString(0, 0, 0, rtl::OUString("=\"\""));
+ pDoc->SetString(0, 1, 0, rtl::OUString("=COUNTIF(A1;1)"));
pDoc->CalcAll();
double result = pDoc->GetValue(0, 1, 0);
@@ -919,7 +919,7 @@ void testFuncINDIRECT(ScDocument* pDoc)
void Test::testCellFunctions()
{
- rtl::OUString aTabName(RTL_CONSTASCII_USTRINGPARAM("foo"));
+ rtl::OUString aTabName("foo");
CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet",
m_pDoc->InsertTab (0, aTabName));
@@ -938,12 +938,12 @@ void Test::testCellFunctions()
void Test::testSheetsFunc()
{
- rtl::OUString aTabName1(RTL_CONSTASCII_USTRINGPARAM("test1"));
- rtl::OUString aTabName2(RTL_CONSTASCII_USTRINGPARAM("test2"));
+ rtl::OUString aTabName1("test1");
+ rtl::OUString aTabName2("test2");
CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet",
m_pDoc->InsertTab (SC_TAB_APPEND, aTabName1));
- m_pDoc->SetString(0, 0, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=SHEETS()")));
+ m_pDoc->SetString(0, 0, 0, OUString("=SHEETS()"));
m_pDoc->CalcFormulaTree(false, true);
double original;
m_pDoc->GetValue(0, 0, 0, original);
@@ -971,13 +971,13 @@ void Test::testSheetsFunc()
void Test::testVolatileFunc()
{
- rtl::OUString aTabName(RTL_CONSTASCII_USTRINGPARAM("foo"));
+ rtl::OUString aTabName("foo");
CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet",
m_pDoc->InsertTab (0, aTabName));
double val = 1;
m_pDoc->SetValue(0, 0, 0, val);
- m_pDoc->SetString(0, 1, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=IF(A1>0;NOW();0")));
+ m_pDoc->SetString(0, 1, 0, OUString("=IF(A1>0;NOW();0"));
double now1;
m_pDoc->GetValue(0, 1, 0, now1);
CPPUNIT_ASSERT_MESSAGE("Value of NOW() should be positive.", now1 > 0.0);
@@ -1001,12 +1001,12 @@ void Test::testVolatileFunc()
void Test::testFuncParam()
{
- rtl::OUString aTabName(RTL_CONSTASCII_USTRINGPARAM("foo"));
+ rtl::OUString aTabName("foo");
CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet",
m_pDoc->InsertTab (0, aTabName));
// First, the normal case, with no missing parameters.
- m_pDoc->SetString(0, 0, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=AVERAGE(1;2;3)")));
+ m_pDoc->SetString(0, 0, 0, OUString("=AVERAGE(1;2;3)"));
m_pDoc->CalcFormulaTree(false, true);
double val;
m_pDoc->GetValue(0, 0, 0, val);
@@ -1014,7 +1014,7 @@ void Test::testFuncParam()
// Now function with missing parameters. Missing values should be treated
// as zeros.
- m_pDoc->SetString(0, 0, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("=AVERAGE(1;;;)")));
+ m_pDoc->SetString(0, 0, 0, OUString("=AVERAGE(1;;;)"));
m_pDoc->CalcFormulaTree(false, true);
m_pDoc->GetValue(0, 0, 0, val);
CPPUNIT_ASSERT_MESSAGE("incorrect result", val == 0.25);
@@ -1033,7 +1033,7 @@ void Test::testNamedRange()
{ "MyRange3", "$Sheet1.$C$1:$C$100", 4 }
};
- rtl::OUString aTabName(RTL_CONSTASCII_USTRINGPARAM("Sheet1"));
+ rtl::OUString aTabName("Sheet1");
CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet",
m_pDoc->InsertTab (0, aTabName));
@@ -1064,7 +1064,7 @@ void Test::testNamedRange()
// Test usage in formula expression.
m_pDoc->SetRangeName(pNewRanges);
- m_pDoc->SetString (1, 0, 0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=A1/Divisor")));
+ m_pDoc->SetString (1, 0, 0, rtl::OUString("=A1/Divisor"));
m_pDoc->CalcAll();
double result;
@@ -1265,7 +1265,7 @@ void Test::testMatrix()
pMat->PutBoolean(true, 1, 1);
pMat->PutDouble(-12.5, 4, 5);
- rtl::OUString aStr(RTL_CONSTASCII_USTRINGPARAM("Test"));
+ rtl::OUString aStr("Test");
pMat->PutString(aStr, 8, 2);
pMat->PutEmptyPath(8, 11);
checkMatrixElements<PartiallyFilledEmptyMatrix>(*pMat);
@@ -1479,8 +1479,8 @@ public:
void Test::testPivotTable()
{
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("Data")));
- m_pDoc->InsertTab(1, OUString(RTL_CONSTASCII_USTRINGPARAM("Table")));
+ m_pDoc->InsertTab(0, OUString("Data"));
+ m_pDoc->InsertTab(1, OUString("Table"));
// Dimension definition
DPFieldDef aFields[] = {
@@ -1636,7 +1636,7 @@ void Test::testPivotTable()
// Insert a brand new pivot table object once again, but this time, don't
// create the output to avoid creating a data cache.
m_pDoc->DeleteTab(1);
- m_pDoc->InsertTab(1, OUString(RTL_CONSTASCII_USTRINGPARAM("Table")));
+ m_pDoc->InsertTab(1, OUString("Table"));
pDPObj = createDPFromRange(
m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), aFields, nFieldCount, false);
@@ -1663,8 +1663,8 @@ void Test::testPivotTable()
void Test::testPivotTableLabels()
{
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("Data")));
- m_pDoc->InsertTab(1, OUString(RTL_CONSTASCII_USTRINGPARAM("Table")));
+ m_pDoc->InsertTab(0, OUString("Data"));
+ m_pDoc->InsertTab(1, OUString("Table"));
// Dimension definition
DPFieldDef aFields[] = {
@@ -1719,8 +1719,8 @@ void Test::testPivotTableLabels()
void Test::testPivotTableDateLabels()
{
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("Data")));
- m_pDoc->InsertTab(1, OUString(RTL_CONSTASCII_USTRINGPARAM("Table")));
+ m_pDoc->InsertTab(0, OUString("Data"));
+ m_pDoc->InsertTab(1, OUString("Table"));
// Dimension definition
DPFieldDef aFields[] = {
@@ -1795,8 +1795,8 @@ void Test::testPivotTableDateLabels()
void Test::testPivotTableFilters()
{
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("Data")));
- m_pDoc->InsertTab(1, OUString(RTL_CONSTASCII_USTRINGPARAM("Table")));
+ m_pDoc->InsertTab(0, OUString("Data"));
+ m_pDoc->InsertTab(1, OUString("Table"));
// Dimension definition
DPFieldDef aFields[] = {
@@ -1857,16 +1857,16 @@ void Test::testPivotTableFilters()
ScAddress aFormulaAddr = aOutRange.aEnd;
aFormulaAddr.IncRow(2);
m_pDoc->SetString(aFormulaAddr.Col(), aFormulaAddr.Row(), aFormulaAddr.Tab(),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=B6")));
+ rtl::OUString("=B6"));
double fTest = m_pDoc->GetValue(aFormulaAddr);
CPPUNIT_ASSERT_MESSAGE("Incorrect formula value that references a cell in the pivot table output.", fTest == 80.0);
// Set current page of 'Group2' to 'A'.
ScDPSaveData aSaveData(*pDPObj->GetSaveData());
ScDPSaveDimension* pDim = aSaveData.GetDimensionByName(
- OUString(RTL_CONSTASCII_USTRINGPARAM("Group2")));
+ OUString("Group2"));
CPPUNIT_ASSERT_MESSAGE("Dimension not found", pDim);
- OUString aPage(RTL_CONSTASCII_USTRINGPARAM("A"));
+ OUString aPage("A");
pDim->SetCurrentPage(&aPage);
pDPObj->SetSaveData(aSaveData);
aOutRange = refresh(pDPObj);
@@ -1927,8 +1927,8 @@ void Test::testPivotTableFilters()
void Test::testPivotTableNamedSource()
{
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("Data")));
- m_pDoc->InsertTab(1, OUString(RTL_CONSTASCII_USTRINGPARAM("Table")));
+ m_pDoc->InsertTab(0, OUString("Data"));
+ m_pDoc->InsertTab(1, OUString("Table"));
// Dimension definition
DPFieldDef aFields[] = {
@@ -1956,7 +1956,7 @@ void Test::testPivotTableNamedSource()
aSrcRange.Format(aRangeStr, SCR_ABS_3D, m_pDoc);
// Name this range.
- rtl::OUString aRangeName(RTL_CONSTASCII_USTRINGPARAM("MyData"));
+ rtl::OUString aRangeName("MyData");
ScRangeName* pNames = m_pDoc->GetRangeName();
CPPUNIT_ASSERT_MESSAGE("Failed to get global range name container.", pNames);
ScRangeData* pName = new ScRangeData(
@@ -2028,7 +2028,7 @@ void Test::testPivotTableNamedSource()
void Test::testPivotTableCache()
{
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("Data")));
+ m_pDoc->InsertTab(0, OUString("Data"));
// Raw data
const char* aData[][3] = {
@@ -2190,8 +2190,8 @@ void Test::testPivotTableCache()
void Test::testPivotTableDuplicateDataFields()
{
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("Data")));
- m_pDoc->InsertTab(1, OUString(RTL_CONSTASCII_USTRINGPARAM("Table")));
+ m_pDoc->InsertTab(0, OUString("Data"));
+ m_pDoc->InsertTab(1, OUString("Table"));
// Raw data
const char* aData[][2] = {
@@ -2287,8 +2287,8 @@ void Test::testPivotTableDuplicateDataFields()
void Test::testPivotTableNormalGrouping()
{
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("Data")));
- m_pDoc->InsertTab(1, OUString(RTL_CONSTASCII_USTRINGPARAM("Table")));
+ m_pDoc->InsertTab(0, OUString("Data"));
+ m_pDoc->InsertTab(1, OUString("Table"));
// Raw data
const char* aData[][2] = {
@@ -2347,8 +2347,8 @@ void Test::testPivotTableNormalGrouping()
ScDPDimensionSaveData* pDimData = pSaveData->GetDimensionData();
CPPUNIT_ASSERT_MESSAGE("Failed to create dimension data.", pDimData);
- rtl::OUString aGroupPrefix(RTL_CONSTASCII_USTRINGPARAM("Group"));
- rtl::OUString aBaseDimName(RTL_CONSTASCII_USTRINGPARAM("Name"));
+ rtl::OUString aGroupPrefix("Group");
+ rtl::OUString aBaseDimName("Name");
rtl::OUString aGroupDimName =
pDimData->CreateGroupDimName(aBaseDimName, *pDPObj, false, NULL);
@@ -2359,9 +2359,9 @@ void Test::testPivotTableNormalGrouping()
CPPUNIT_ASSERT_MESSAGE("Unexpected group name", aGroupName.equalsAscii("Group1"));
ScDPSaveGroupItem aGroup(aGroupName);
- aGroup.AddElement(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("A")));
- aGroup.AddElement(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("B")));
- aGroup.AddElement(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("C")));
+ aGroup.AddElement(rtl::OUString("A"));
+ aGroup.AddElement(rtl::OUString("B"));
+ aGroup.AddElement(rtl::OUString("C"));
aGroupDim.AddGroupItem(aGroup);
pDimData->AddGroupDimension(aGroupDim);
@@ -2401,9 +2401,9 @@ void Test::testPivotTableNormalGrouping()
CPPUNIT_ASSERT_MESSAGE("Unexpected group name", aGroupName.equalsAscii("Group2"));
ScDPSaveGroupItem aGroup(aGroupName);
- aGroup.AddElement(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("D")));
- aGroup.AddElement(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("E")));
- aGroup.AddElement(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("F")));
+ aGroup.AddElement(rtl::OUString("D"));
+ aGroup.AddElement(rtl::OUString("E"));
+ aGroup.AddElement(rtl::OUString("F"));
pGroupDim->AddGroupItem(aGroup);
}
@@ -2438,8 +2438,8 @@ void Test::testPivotTableNormalGrouping()
void Test::testPivotTableNumberGrouping()
{
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("Data")));
- m_pDoc->InsertTab(1, OUString(RTL_CONSTASCII_USTRINGPARAM("Table")));
+ m_pDoc->InsertTab(0, OUString("Data"));
+ m_pDoc->InsertTab(1, OUString("Table"));
// Raw data
const char* aData[][2] = {
@@ -2500,7 +2500,7 @@ void Test::testPivotTableNumberGrouping()
aInfo.mfStart = 30;
aInfo.mfEnd = 60;
aInfo.mfStep = 10;
- ScDPSaveNumGroupDimension aGroup(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Order")), aInfo);
+ ScDPSaveNumGroupDimension aGroup(rtl::OUString("Order"), aInfo);
pDimData->AddNumGroupDimension(aGroup);
}
@@ -2533,8 +2533,8 @@ void Test::testPivotTableNumberGrouping()
void Test::testPivotTableDateGrouping()
{
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("Data")));
- m_pDoc->InsertTab(1, OUString(RTL_CONSTASCII_USTRINGPARAM("Table")));
+ m_pDoc->InsertTab(0, OUString("Data"));
+ m_pDoc->InsertTab(1, OUString("Table"));
// Raw data
const char* aData[][2] = {
@@ -2575,7 +2575,7 @@ void Test::testPivotTableDateGrouping()
ScDPDimensionSaveData* pDimData = pSaveData->GetDimensionData();
CPPUNIT_ASSERT_MESSAGE("No dimension data !?", pDimData);
- rtl::OUString aBaseDimName(RTL_CONSTASCII_USTRINGPARAM("Date"));
+ rtl::OUString aBaseDimName("Date");
ScDPNumGroupInfo aInfo;
aInfo.mbEnable = true;
@@ -2642,9 +2642,9 @@ void Test::testPivotTableDateGrouping()
{
// Let's hide year 2012.
pSaveData = pDPObj->GetSaveData();
- ScDPSaveDimension* pDim = pSaveData->GetDimensionByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Years")));
+ ScDPSaveDimension* pDim = pSaveData->GetDimensionByName(rtl::OUString("Years"));
CPPUNIT_ASSERT_MESSAGE("Years dimension should exist.", pDim);
- ScDPSaveMember* pMem = pDim->GetMemberByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("2012")));
+ ScDPSaveMember* pMem = pDim->GetMemberByName(rtl::OUString("2012"));
CPPUNIT_ASSERT_MESSAGE("Member should exist.", pMem);
pMem->SetIsVisible(false);
}
@@ -2678,7 +2678,7 @@ void Test::testPivotTableDateGrouping()
void Test::testSheetCopy()
{
- OUString aTabName(RTL_CONSTASCII_USTRINGPARAM("TestTab"));
+ OUString aTabName("TestTab");
m_pDoc->InsertTab(0, aTabName);
CPPUNIT_ASSERT_MESSAGE("document should have one sheet to begin with.", m_pDoc->GetTableCount() == 1);
SCROW nRow1, nRow2;
@@ -2715,7 +2715,7 @@ void Test::testSheetCopy()
void Test::testSheetMove()
{
- OUString aTabName(RTL_CONSTASCII_USTRINGPARAM("TestTab1"));
+ OUString aTabName("TestTab1");
m_pDoc->InsertTab(0, aTabName);
CPPUNIT_ASSERT_EQUAL_MESSAGE("document should have one sheet to begin with.", m_pDoc->GetTableCount(), static_cast<SCTAB>(1));
SCROW nRow1, nRow2;
@@ -2723,7 +2723,7 @@ void Test::testSheetMove()
CPPUNIT_ASSERT_MESSAGE("new sheet should have all rows visible", !bHidden && nRow1 == 0 && nRow2 == MAXROW);
//test if inserting before another sheet works
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("TestTab2")));
+ m_pDoc->InsertTab(0, OUString("TestTab2"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("document should have two sheets", m_pDoc->GetTableCount(), static_cast<SCTAB>(2));
bHidden = m_pDoc->RowHidden(0, 0, &nRow1, &nRow2);
CPPUNIT_ASSERT_MESSAGE("new sheet should have all rows visible", !bHidden && nRow1 == 0 && nRow2 == MAXROW);
@@ -2821,10 +2821,10 @@ ScRange getCachedRange(const ScExternalRefCache::TableTypeRef& pCacheTab)
void Test::testExternalRef()
{
ScDocShellRef xExtDocSh = new ScDocShell;
- OUString aExtDocName(RTL_CONSTASCII_USTRINGPARAM("file:///extdata.fake"));
- OUString aExtSh1Name(RTL_CONSTASCII_USTRINGPARAM("Data1"));
- OUString aExtSh2Name(RTL_CONSTASCII_USTRINGPARAM("Data2"));
- OUString aExtSh3Name(RTL_CONSTASCII_USTRINGPARAM("Data3"));
+ OUString aExtDocName("file:///extdata.fake");
+ OUString aExtSh1Name("Data1");
+ OUString aExtSh2Name("Data2");
+ OUString aExtSh3Name("Data3");
SfxMedium* pMed = new SfxMedium(aExtDocName, STREAM_STD_READWRITE);
xExtDocSh->DoInitNew(pMed);
CPPUNIT_ASSERT_MESSAGE("external document instance not loaded.",
@@ -2836,16 +2836,16 @@ void Test::testExternalRef()
pExtDoc->InsertTab(1, aExtSh2Name);
pExtDoc->InsertTab(2, aExtSh3Name);
- OUString name(RTL_CONSTASCII_USTRINGPARAM("Name"));
- OUString value(RTL_CONSTASCII_USTRINGPARAM("Value"));
- OUString andy(RTL_CONSTASCII_USTRINGPARAM("Andy"));
- OUString bruce(RTL_CONSTASCII_USTRINGPARAM("Bruce"));
- OUString charlie(RTL_CONSTASCII_USTRINGPARAM("Charlie"));
- OUString david(RTL_CONSTASCII_USTRINGPARAM("David"));
- OUString edward(RTL_CONSTASCII_USTRINGPARAM("Edward"));
- OUString frank(RTL_CONSTASCII_USTRINGPARAM("Frank"));
- OUString george(RTL_CONSTASCII_USTRINGPARAM("George"));
- OUString henry(RTL_CONSTASCII_USTRINGPARAM("Henry"));
+ OUString name("Name");
+ OUString value("Value");
+ OUString andy("Andy");
+ OUString bruce("Bruce");
+ OUString charlie("Charlie");
+ OUString david("David");
+ OUString edward("Edward");
+ OUString frank("Frank");
+ OUString george("George");
+ OUString henry("Henry");
// Sheet 1
pExtDoc->SetString(0, 0, 0, name);
@@ -2884,8 +2884,8 @@ void Test::testExternalRef()
// Test external refernces on the main document while the external
// document is still in memory.
OUString test;
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("Test Sheet")));
- m_pDoc->SetString(0, 0, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data1.A1")));
+ m_pDoc->InsertTab(0, OUString("Test Sheet"));
+ m_pDoc->SetString(0, 0, 0, OUString("='file:///extdata.fake'#Data1.A1"));
m_pDoc->GetString(0, 0, 0, test);
CPPUNIT_ASSERT_MESSAGE("Value is different from the original", test.equals(name));
@@ -2902,15 +2902,15 @@ void Test::testExternalRef()
CPPUNIT_ASSERT_MESSAGE("Unexpected sheet name.", aTabNames[1].equals(aExtSh2Name));
CPPUNIT_ASSERT_MESSAGE("Unexpected sheet name.", aTabNames[2].equals(aExtSh3Name));
- m_pDoc->SetString(1, 0, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data1.B1")));
+ m_pDoc->SetString(1, 0, 0, OUString("='file:///extdata.fake'#Data1.B1"));
m_pDoc->GetString(1, 0, 0, test);
CPPUNIT_ASSERT_MESSAGE("Value is different from the original", test.equals(value));
- m_pDoc->SetString(0, 1, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data1.A2")));
- m_pDoc->SetString(0, 2, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data1.A3")));
- m_pDoc->SetString(0, 3, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data1.A4")));
- m_pDoc->SetString(0, 4, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data1.A5")));
- m_pDoc->SetString(0, 5, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data1.A6")));
+ m_pDoc->SetString(0, 1, 0, OUString("='file:///extdata.fake'#Data1.A2"));
+ m_pDoc->SetString(0, 2, 0, OUString("='file:///extdata.fake'#Data1.A3"));
+ m_pDoc->SetString(0, 3, 0, OUString("='file:///extdata.fake'#Data1.A4"));
+ m_pDoc->SetString(0, 4, 0, OUString("='file:///extdata.fake'#Data1.A5"));
+ m_pDoc->SetString(0, 5, 0, OUString("='file:///extdata.fake'#Data1.A6"));
{
// Referencing an empty cell should display '0'.
@@ -2921,11 +2921,11 @@ void Test::testExternalRef()
CPPUNIT_ASSERT_MESSAGE("Unexpected cell value.", test.equalsAscii(pChecks[i]));
}
}
- m_pDoc->SetString(1, 1, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data1.B2")));
- m_pDoc->SetString(1, 2, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data1.B3")));
- m_pDoc->SetString(1, 3, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data1.B4")));
- m_pDoc->SetString(1, 4, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data1.B5")));
- m_pDoc->SetString(1, 5, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data1.B6")));
+ m_pDoc->SetString(1, 1, 0, OUString("='file:///extdata.fake'#Data1.B2"));
+ m_pDoc->SetString(1, 2, 0, OUString("='file:///extdata.fake'#Data1.B3"));
+ m_pDoc->SetString(1, 3, 0, OUString("='file:///extdata.fake'#Data1.B4"));
+ m_pDoc->SetString(1, 4, 0, OUString("='file:///extdata.fake'#Data1.B5"));
+ m_pDoc->SetString(1, 5, 0, OUString("='file:///extdata.fake'#Data1.B6"));
{
double pChecks[] = { 10, 11, 12, 13, 0 };
for (size_t i = 0; i < SAL_N_ELEMENTS(pChecks); ++i)
@@ -2935,10 +2935,10 @@ void Test::testExternalRef()
}
}
- m_pDoc->SetString(2, 0, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data3.A1")));
- m_pDoc->SetString(2, 1, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data3.A2")));
- m_pDoc->SetString(2, 2, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data3.A3")));
- m_pDoc->SetString(2, 3, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data3.A4")));
+ m_pDoc->SetString(2, 0, 0, OUString("='file:///extdata.fake'#Data3.A1"));
+ m_pDoc->SetString(2, 1, 0, OUString("='file:///extdata.fake'#Data3.A2"));
+ m_pDoc->SetString(2, 2, 0, OUString("='file:///extdata.fake'#Data3.A3"));
+ m_pDoc->SetString(2, 3, 0, OUString("='file:///extdata.fake'#Data3.A4"));
{
const char* pChecks[] = { "Name", "Edward", "Frank", "George" };
for (size_t i = 0; i < SAL_N_ELEMENTS(pChecks); ++i)
@@ -2948,10 +2948,10 @@ void Test::testExternalRef()
}
}
- m_pDoc->SetString(3, 0, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data3.B1")));
- m_pDoc->SetString(3, 1, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data3.B2")));
- m_pDoc->SetString(3, 2, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data3.B3")));
- m_pDoc->SetString(3, 3, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("='file:///extdata.fake'#Data3.B4")));
+ m_pDoc->SetString(3, 0, 0, OUString("='file:///extdata.fake'#Data3.B1"));
+ m_pDoc->SetString(3, 1, 0, OUString("='file:///extdata.fake'#Data3.B2"));
+ m_pDoc->SetString(3, 2, 0, OUString("='file:///extdata.fake'#Data3.B3"));
+ m_pDoc->SetString(3, 3, 0, OUString("='file:///extdata.fake'#Data3.B4"));
{
const char* pChecks[] = { "Value", "99", "98", "97" };
for (size_t i = 0; i < SAL_N_ELEMENTS(pChecks); ++i)
@@ -2996,12 +2996,12 @@ void testExtRefFuncT(ScDocument* pDoc, ScDocument* pExtDoc)
clearRange(pDoc, ScRange(0, 0, 0, 1, 9, 0));
clearRange(pExtDoc, ScRange(0, 0, 0, 1, 9, 0));
- pExtDoc->SetString(0, 0, 0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("'1.2")));
- pExtDoc->SetString(0, 1, 0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Foo")));
+ pExtDoc->SetString(0, 0, 0, rtl::OUString("'1.2"));
+ pExtDoc->SetString(0, 1, 0, rtl::OUString("Foo"));
pExtDoc->SetValue(0, 2, 0, 12.3);
- pDoc->SetString(0, 0, 0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=T('file:///extdata.fake'#Data.A1)")));
- pDoc->SetString(0, 1, 0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=T('file:///extdata.fake'#Data.A2)")));
- pDoc->SetString(0, 2, 0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=T('file:///extdata.fake'#Data.A3)")));
+ pDoc->SetString(0, 0, 0, rtl::OUString("=T('file:///extdata.fake'#Data.A1)"));
+ pDoc->SetString(0, 1, 0, rtl::OUString("=T('file:///extdata.fake'#Data.A2)"));
+ pDoc->SetString(0, 2, 0, rtl::OUString("=T('file:///extdata.fake'#Data.A3)"));
pDoc->CalcAll();
rtl::OUString aRes = pDoc->GetString(0, 0, 0);
@@ -3015,7 +3015,7 @@ void testExtRefFuncT(ScDocument* pDoc, ScDocument* pExtDoc)
void Test::testExternalRefFunctions()
{
ScDocShellRef xExtDocSh = new ScDocShell;
- OUString aExtDocName(RTL_CONSTASCII_USTRINGPARAM("file:///extdata.fake"));
+ OUString aExtDocName("file:///extdata.fake");
SfxMedium* pMed = new SfxMedium(aExtDocName, STREAM_STD_READWRITE);
xExtDocSh->DoInitNew(pMed);
CPPUNIT_ASSERT_MESSAGE("external document instance not loaded.",
@@ -3030,7 +3030,7 @@ void Test::testExternalRefFunctions()
// Populate the external source document.
ScDocument* pExtDoc = xExtDocSh->GetDocument();
- pExtDoc->InsertTab(0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Data")));
+ pExtDoc->InsertTab(0, rtl::OUString("Data"));
double val = 1;
pExtDoc->SetValue(0, 0, 0, val);
// leave cell B1 empty.
@@ -3044,7 +3044,7 @@ void Test::testExternalRefFunctions()
pExtDoc->SetValue(0, 3, 0, val);
pExtDoc->SetValue(1, 3, 0, val);
- m_pDoc->InsertTab(0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Test")));
+ m_pDoc->InsertTab(0, rtl::OUString("Test"));
struct {
const char* pFormula; double fResult;
@@ -3078,7 +3078,7 @@ void Test::testExternalRefFunctions()
void Test::testDataArea()
{
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("Data")));
+ m_pDoc->InsertTab(0, OUString("Data"));
// Totally empty sheet should be rightfully considered empty in all accounts.
CPPUNIT_ASSERT_MESSAGE("Sheet is expected to be empty.", m_pDoc->IsPrintEmpty(0, 0, 0, 100, 100));
@@ -3101,7 +3101,7 @@ void Test::testDataArea()
m_pDoc->IsBlockEmpty(0, 0, 0, 100, 100));
// Adding a real cell content should turn the block non-empty.
- m_pDoc->SetString(0, 0, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("Some text")));
+ m_pDoc->SetString(0, 0, 0, OUString("Some text"));
CPPUNIT_ASSERT_MESSAGE("Now the block should not be empty with a real cell content.",
!m_pDoc->IsBlockEmpty(0, 0, 0, 100, 100));
@@ -3112,14 +3112,14 @@ void Test::testDataArea()
void Test::testStreamValid()
{
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("Sheet1")));
- m_pDoc->InsertTab(1, OUString(RTL_CONSTASCII_USTRINGPARAM("Sheet2")));
- m_pDoc->InsertTab(2, OUString(RTL_CONSTASCII_USTRINGPARAM("Sheet3")));
- m_pDoc->InsertTab(3, OUString(RTL_CONSTASCII_USTRINGPARAM("Sheet4")));
+ m_pDoc->InsertTab(0, OUString("Sheet1"));
+ m_pDoc->InsertTab(1, OUString("Sheet2"));
+ m_pDoc->InsertTab(2, OUString("Sheet3"));
+ m_pDoc->InsertTab(3, OUString("Sheet4"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("We should have 4 sheet instances.", m_pDoc->GetTableCount(), static_cast<SCTAB>(4));
- OUString a1(RTL_CONSTASCII_USTRINGPARAM("A1"));
- OUString a2(RTL_CONSTASCII_USTRINGPARAM("A2"));
+ OUString a1("A1");
+ OUString a2("A2");
OUString test;
// Put values into Sheet1.
@@ -3131,10 +3131,10 @@ void Test::testStreamValid()
CPPUNIT_ASSERT_MESSAGE("Unexpected value in Sheet1.A2", test.equals(a2));
// Put formulas into Sheet2 to Sheet4 to reference values from Sheet1.
- m_pDoc->SetString(0, 0, 1, OUString(RTL_CONSTASCII_USTRINGPARAM("=Sheet1.A1")));
- m_pDoc->SetString(0, 1, 1, OUString(RTL_CONSTASCII_USTRINGPARAM("=Sheet1.A2")));
- m_pDoc->SetString(0, 0, 2, OUString(RTL_CONSTASCII_USTRINGPARAM("=Sheet1.A1")));
- m_pDoc->SetString(0, 0, 3, OUString(RTL_CONSTASCII_USTRINGPARAM("=Sheet1.A2")));
+ m_pDoc->SetString(0, 0, 1, OUString("=Sheet1.A1"));
+ m_pDoc->SetString(0, 1, 1, OUString("=Sheet1.A2"));
+ m_pDoc->SetString(0, 0, 2, OUString("=Sheet1.A1"));
+ m_pDoc->SetString(0, 0, 3, OUString("=Sheet1.A2"));
m_pDoc->GetString(0, 0, 1, test);
CPPUNIT_ASSERT_MESSAGE("Unexpected value in Sheet2.A1", test.equals(a1));
@@ -3544,7 +3544,7 @@ void Test::testFunctionLists()
void Test::testGraphicsInGroup()
{
- OUString aTabName(RTL_CONSTASCII_USTRINGPARAM("TestTab"));
+ OUString aTabName("TestTab");
m_pDoc->InsertTab(0, aTabName);
CPPUNIT_ASSERT_MESSAGE("document should have one sheet to begin with.", m_pDoc->GetTableCount() == 1);
SCROW nRow1, nRow2;
@@ -3644,8 +3644,8 @@ void Test::testGraphicsInGroup()
void Test::testGraphicsOnSheetMove()
{
- m_pDoc->InsertTab(0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tab1")));
- m_pDoc->InsertTab(1, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tab2")));
+ m_pDoc->InsertTab(0, rtl::OUString("Tab1"));
+ m_pDoc->InsertTab(1, rtl::OUString("Tab2"));
CPPUNIT_ASSERT_MESSAGE("There should be only 2 sheets to begin with", m_pDoc->GetTableCount() == 2);
m_pDoc->InitDrawLayer();
@@ -3672,7 +3672,7 @@ void Test::testGraphicsOnSheetMove()
// Insert a new sheet at left-end, and make sure the object has moved to
// the 2nd page.
- m_pDoc->InsertTab(0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NewTab")));
+ m_pDoc->InsertTab(0, rtl::OUString("NewTab"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be 3 sheets.", m_pDoc->GetTableCount(), static_cast<SCTAB>(3));
pPage = pDrawLayer->GetPage(0);
CPPUNIT_ASSERT_MESSAGE("1st sheet should have no object.", pPage && pPage->GetObjCount() == 0);
@@ -3718,10 +3718,10 @@ void Test::testGraphicsOnSheetMove()
void Test::testPostIts()
{
- rtl::OUString aHello(RTL_CONSTASCII_USTRINGPARAM("Hello world"));
- rtl::OUString aJimBob(RTL_CONSTASCII_USTRINGPARAM("Jim Bob"));
- rtl::OUString aTabName(RTL_CONSTASCII_USTRINGPARAM("PostIts"));
- rtl::OUString aTabName2(RTL_CONSTASCII_USTRINGPARAM("Table2"));
+ rtl::OUString aHello("Hello world");
+ rtl::OUString aJimBob("Jim Bob");
+ rtl::OUString aTabName("PostIts");
+ rtl::OUString aTabName2("Table2");
m_pDoc->InsertTab(0, aTabName);
ScAddress rAddr(2, 2, 0);
@@ -3764,13 +3764,13 @@ void Test::testToggleRefFlag()
// the document, as ScRefFinder does not depend on the content of the
// document except for the sheet names.
- OUString aTabName(RTL_CONSTASCII_USTRINGPARAM("Test"));
+ OUString aTabName("Test");
m_pDoc->InsertTab(0, aTabName);
{
// Calc A1: basic 2D reference
- OUString aFormula(RTL_CONSTASCII_USTRINGPARAM("=B100"));
+ OUString aFormula("=B100");
ScAddress aPos(1, 5, 0);
ScRefFinder aFinder(aFormula, aPos, m_pDoc, formula::FormulaGrammar::CONV_OOO);
@@ -3801,7 +3801,7 @@ void Test::testToggleRefFlag()
{
// Excel R1C1: basic 2D reference
- OUString aFormula(RTL_CONSTASCII_USTRINGPARAM("=R2C1"));
+ OUString aFormula("=R2C1");
ScAddress aPos(3, 5, 0);
ScRefFinder aFinder(aFormula, aPos, m_pDoc, formula::FormulaGrammar::CONV_XL_R1C1);
@@ -3837,8 +3837,8 @@ void Test::testToggleRefFlag()
void Test::testAutofilter()
{
- OUString aTabName(RTL_CONSTASCII_USTRINGPARAM("Test"));
- OUString aDBName(RTL_CONSTASCII_USTRINGPARAM("NONAME"));
+ OUString aTabName("Test");
+ OUString aDBName("NONAME");
m_pDoc->InsertTab( 0, aTabName );
@@ -3930,8 +3930,8 @@ void Test::testAutofilter()
void Test::testCopyPaste()
{
- m_pDoc->InsertTab(0, OUString(RTL_CONSTASCII_USTRINGPARAM("Sheet1")));
- m_pDoc->InsertTab(1, OUString(RTL_CONSTASCII_USTRINGPARAM("Sheet2")));
+ m_pDoc->InsertTab(0, OUString("Sheet1"));
+ m_pDoc->InsertTab(1, OUString("Sheet2"));
//test copy&paste + ScUndoPaste
//copy local and global range names in formulas
//string cells and value cells
@@ -3940,13 +3940,13 @@ void Test::testCopyPaste()
m_pDoc->SetValue(3, 1, 0, 1);
m_pDoc->SetValue(3, 2, 0, 2);
m_pDoc->SetValue(3, 3, 0, 3);
- m_pDoc->SetString(2, 0, 0, OUString(RTL_CONSTASCII_USTRINGPARAM("test")));
+ m_pDoc->SetString(2, 0, 0, OUString("test"));
ScAddress aAdr (0, 0, 0);
//create some range names, local and global
- ScRangeData* pLocal1 = new ScRangeData(m_pDoc, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("local1")), aAdr);
- ScRangeData* pLocal2 = new ScRangeData(m_pDoc, OUString(RTL_CONSTASCII_USTRINGPARAM("local2")), aAdr);
- ScRangeData* pGlobal = new ScRangeData(m_pDoc, OUString(RTL_CONSTASCII_USTRINGPARAM("global")), aAdr);
+ ScRangeData* pLocal1 = new ScRangeData(m_pDoc, rtl::OUString("local1"), aAdr);
+ ScRangeData* pLocal2 = new ScRangeData(m_pDoc, OUString("local2"), aAdr);
+ ScRangeData* pGlobal = new ScRangeData(m_pDoc, OUString("global"), aAdr);
ScRangeName* pGlobalRangeName = new ScRangeName();
pGlobalRangeName->insert(pGlobal);
ScRangeName* pLocalRangeName1 = new ScRangeName();
@@ -3956,7 +3956,7 @@ void Test::testCopyPaste()
m_pDoc->SetRangeName(0, pLocalRangeName1);
//add formula
- rtl::OUString aFormulaString(RTL_CONSTASCII_USTRINGPARAM("=local1+global+SUM($C$1:$D$4)"));
+ rtl::OUString aFormulaString("=local1+global+SUM($C$1:$D$4)");
m_pDoc->SetString(1, 0, 0, aFormulaString);
double aValue = 0;
@@ -3993,12 +3993,12 @@ void Test::testCopyPaste()
CPPUNIT_ASSERT_MESSAGE("copied value should be 1", aValue == 1);
//chack local range name after copying
- pLocal1 = m_pDoc->GetRangeName(1)->findByUpperName(OUString(RTL_CONSTASCII_USTRINGPARAM("LOCAL1")));
+ pLocal1 = m_pDoc->GetRangeName(1)->findByUpperName(OUString("LOCAL1"));
CPPUNIT_ASSERT_MESSAGE("local range name 1 should be copied", pLocal1);
ScRange aRangeLocal1;
pLocal1->IsValidReference(aRangeLocal1);
CPPUNIT_ASSERT_MESSAGE("local range 1 should still point to Sheet1.A1",aRangeLocal1 == ScRange(0,0,0,0,0,0));
- pLocal2 = m_pDoc->GetRangeName(1)->findByUpperName(OUString(RTL_CONSTASCII_USTRINGPARAM("LOCAL2")));
+ pLocal2 = m_pDoc->GetRangeName(1)->findByUpperName(OUString("LOCAL2"));
CPPUNIT_ASSERT_MESSAGE("local2 should not be copied", pLocal2 == NULL);
@@ -4028,7 +4028,7 @@ void Test::testMergedCells()
{
//test merge and unmerge
//TODO: an undo/redo test for this would be a good idea
- m_pDoc->InsertTab(0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Sheet1")));
+ m_pDoc->InsertTab(0, rtl::OUString("Sheet1"));
m_pDoc->DoMerge(0, 1, 1, 3, 3, false);
SCCOL nEndCol = 1;
SCROW nEndRow = 1;
@@ -4097,7 +4097,7 @@ void Test::testSetBackgroundColor()
//test set background color
//TODO: set color1 and set color2 and do an undo to check if color1 is set now.
- m_pDoc->InsertTab(0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Sheet1")));
+ m_pDoc->InsertTab(0, rtl::OUString("Sheet1"));
Color aColor;
//test yellow
@@ -4126,10 +4126,10 @@ void Test::testUpdateReference()
{
//test that formulas are correctly updated during sheet delete
//TODO: add tests for relative references, updating of named ranges, ...
- rtl::OUString aSheet1(RTL_CONSTASCII_USTRINGPARAM("Sheet1"));
- rtl::OUString aSheet2(RTL_CONSTASCII_USTRINGPARAM("Sheet2"));
- rtl::OUString aSheet3(RTL_CONSTASCII_USTRINGPARAM("Sheet3"));
- rtl::OUString aSheet4(RTL_CONSTASCII_USTRINGPARAM("Sheet4"));
+ rtl::OUString aSheet1("Sheet1");
+ rtl::OUString aSheet2("Sheet2");
+ rtl::OUString aSheet3("Sheet3");
+ rtl::OUString aSheet4("Sheet4");
m_pDoc->InsertTab(0, aSheet1);
m_pDoc->InsertTab(1, aSheet2);
m_pDoc->InsertTab(2, aSheet3);
@@ -4138,8 +4138,8 @@ void Test::testUpdateReference()
m_pDoc->SetValue(0,0,2, 1);
m_pDoc->SetValue(1,0,2, 2);
m_pDoc->SetValue(1,1,3, 4);
- m_pDoc->SetString(2,0,2, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=A1+B1")));
- m_pDoc->SetString(2,1,2, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=Sheet4.B2+A1")));
+ m_pDoc->SetString(2,0,2, rtl::OUString("=A1+B1"));
+ m_pDoc->SetString(2,1,2, rtl::OUString("=Sheet4.B2+A1"));
double aValue;
m_pDoc->GetValue(2,0,2, aValue);
@@ -4244,10 +4244,10 @@ void Test::testJumpToPrecedentsDependents()
{
// Precedent is another cell that the cell references, while dependent is
// another cell that references it.
- m_pDoc->InsertTab(0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Test")));
+ m_pDoc->InsertTab(0, rtl::OUString("Test"));
- m_pDoc->SetString(2, 0, 0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=A1+A2+B3"))); // C1
- m_pDoc->SetString(2, 1, 0, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=A1"))); // C2
+ m_pDoc->SetString(2, 0, 0, rtl::OUString("=A1+A2+B3")); // C1
+ m_pDoc->SetString(2, 1, 0, rtl::OUString("=A1")); // C2
m_pDoc->CalcAll();
std::vector<ScTokenRef> aRefTokens;
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 544fb9d..741ee2d 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -379,14 +379,14 @@ void lcl_FillNumberFormats( sal_uInt32*& rFormats, long& rCount,
{
sheet::DataPilotFieldOrientation eDimOrient =
(sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTATION)),
+ xDimProp, rtl::OUString(SC_UNO_DP_ORIENTATION),
sheet::DataPilotFieldOrientation_HIDDEN );
if ( eDimOrient == sheet::DataPilotFieldOrientation_DATA )
{
aDataNames[nDataCount] = xDimName->getName();
long nFormat = ScUnoHelpFunctions::GetLongProperty(
xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_NUMFMT)) );
+ rtl::OUString(SC_UNONAME_NUMFMT) );
nDataFormats[nDataCount] = nFormat;
if ( nFormat != 0 )
bAnySet = true;
@@ -446,13 +446,13 @@ sal_uInt32 lcl_GetFirstNumberFormat( const uno::Reference<container::XIndexAcces
{
sheet::DataPilotFieldOrientation eDimOrient =
(sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTATION)),
+ xDimProp, rtl::OUString(SC_UNO_DP_ORIENTATION),
sheet::DataPilotFieldOrientation_HIDDEN );
if ( eDimOrient == sheet::DataPilotFieldOrientation_DATA )
{
long nFormat = ScUnoHelpFunctions::GetLongProperty(
xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_NUMFMT)) );
+ rtl::OUString(SC_UNONAME_NUMFMT) );
return nFormat; // use format from first found data dimension
}
@@ -494,7 +494,7 @@ uno::Sequence<sheet::MemberResult> lcl_GetSelectedPageAsResult( const uno::Refer
{
//! merge with ScDPDimension::setPropertyValue?
- uno::Any aValue = xDimProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_FILTER)) );
+ uno::Any aValue = xDimProp->getPropertyValue( rtl::OUString(SC_UNO_DP_FILTER) );
uno::Sequence<sheet::TableFilterField> aSeq;
if (aValue >>= aSeq)
@@ -568,14 +568,14 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
{
sheet::DataPilotFieldOrientation eDimOrient =
(sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTATION)),
+ xDimProp, rtl::OUString(SC_UNO_DP_ORIENTATION),
sheet::DataPilotFieldOrientation_HIDDEN );
long nDimPos = ScUnoHelpFunctions::GetLongProperty( xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_POSITION)) );
+ rtl::OUString(SC_UNO_DP_POSITION) );
bool bIsDataLayout = ScUnoHelpFunctions::GetBoolProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISDATALAYOUT)));
+ xDimProp, rtl::OUString(SC_UNO_DP_ISDATALAYOUT));
bool bHasHiddenMember = ScUnoHelpFunctions::GetBoolProperty(
- xDimProp, OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_HAS_HIDDEN_MEMBER)));
+ xDimProp, OUString(SC_UNO_DP_HAS_HIDDEN_MEMBER));
if ( eDimOrient != sheet::DataPilotFieldOrientation_HIDDEN )
{
@@ -583,7 +583,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
new ScNameToIndexAccess( xDimSupp->getHierarchies() );
long nHierarchy = ScUnoHelpFunctions::GetLongProperty(
xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_USEDHIERARCHY)) );
+ rtl::OUString(SC_UNO_DP_USEDHIERARCHY) );
if ( nHierarchy >= xHiers->getCount() )
nHierarchy = 0;
@@ -612,7 +612,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
// #i108948# use ScUnoHelpFunctions::GetStringProperty, because
// LayoutName is new and may not be present in external implementation
OUString aCaption = ScUnoHelpFunctions::GetStringProperty( xPropSet,
- OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_LAYOUTNAME)), aName );
+ OUString(SC_UNO_DP_LAYOUTNAME), aName );
bool bRowFieldHasMember = false;
switch ( eDimOrient )
@@ -713,7 +713,7 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
try
{
uno::Any aAny = xSrcProp->getPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_DATADESC)) );
+ rtl::OUString(SC_UNO_DP_DATADESC) );
rtl::OUString aUStr;
aAny >>= aUStr;
aDataDescription = aUStr;
@@ -1230,12 +1230,12 @@ void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, s
uno::Reference<beans::XPropertySet> xSrcProp( xSource, uno::UNO_QUERY );
bool bColGrand = ScUnoHelpFunctions::GetBoolProperty(
- xSrcProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_COLGRAND)));
+ xSrcProp, rtl::OUString(SC_UNO_DP_COLGRAND));
if ( bColGrand )
rGrandTotalCols = 1; // default if data layout not in columns
bool bRowGrand = ScUnoHelpFunctions::GetBoolProperty(
- xSrcProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ROWGRAND)));
+ xSrcProp, rtl::OUString(SC_UNO_DP_ROWGRAND));
if ( bRowGrand )
rGrandTotalRows = 1; // default if data layout not in rows
@@ -1256,10 +1256,10 @@ void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, s
{
sheet::DataPilotFieldOrientation eDimOrient =
(sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ORIENTATION)),
+ xDimProp, rtl::OUString(SC_UNO_DP_ORIENTATION),
sheet::DataPilotFieldOrientation_HIDDEN );
if ( ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_ISDATALAYOUT)) ) )
+ rtl::OUString(SC_UNO_DP_ISDATALAYOUT) ) )
{
rDataLayoutIndex = nDim;
rDataOrient = eDimOrient;
@@ -1319,7 +1319,7 @@ void ScDPOutput::GetPositionData(const ScAddress& rPos, DataPilotTablePositionDa
if (xPropSet.is())
{
sal_Int32 nDataFieldCount = ScUnoHelpFunctions::GetLongProperty( xPropSet,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_DATAFIELDCOUNT)) );
+ rtl::OUString(SC_UNO_DP_DATAFIELDCOUNT) );
if (nDataFieldCount > 0)
aResData.DataFieldIndex = (nRow - nDataStartRow) % nDataFieldCount;
}
@@ -1401,7 +1401,7 @@ bool ScDPOutput::GetDataResultPositionData(vector<sheet::DataPilotFieldFilter>&
return false;
sal_Int32 nDataFieldCount = ScUnoHelpFunctions::GetLongProperty( xPropSet,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_DATAFIELDCOUNT)) );
+ rtl::OUString(SC_UNO_DP_DATAFIELDCOUNT) );
if (nDataFieldCount == 0)
// No data field is present in this datapilot table.
return false;
@@ -1583,7 +1583,7 @@ uno::Sequence<sheet::GeneralFunction> lcl_GetSubTotals(
{
try
{
- uno::Any aValue = xLevelProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_SUBTOTAL)) );
+ uno::Any aValue = xLevelProp->getPropertyValue( rtl::OUString(SC_UNO_DP_SUBTOTAL) );
aValue >>= aSubTotals;
}
catch(uno::Exception&)
@@ -1837,7 +1837,7 @@ void ScDPOutput::GetDataDimensionNames(
//! Should use a stored name when available
sheet::GeneralFunction eFunc = (sheet::GeneralFunction)ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_DP_FUNCTION)),
+ xDimProp, rtl::OUString(SC_UNO_DP_FUNCTION),
sheet::GeneralFunction_NONE );
rGivenName = lcl_GetDataFieldName( rSourceName, eFunc );
}
diff --git a/sc/source/ui/vba/vbafilesearch.cxx b/sc/source/ui/vba/vbafilesearch.cxx
index f526011..ddb5c04 100644
--- a/sc/source/ui/vba/vbafilesearch.cxx
+++ b/sc/source/ui/vba/vbafilesearch.cxx
@@ -56,7 +56,7 @@ static Reference< XSimpleFileAccess3 > getFileAccess( void )
if( xSMgr.is() )
{
xSFI = Reference< XSimpleFileAccess3 >( xSMgr->createInstance
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )) ), UNO_QUERY );
+ ( ::rtl::OUString( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY );
}
}
return xSFI;
@@ -180,15 +180,15 @@ sal_Int32 SAL_CALL ScVbaFileSearch::Execute( ) throw (css::uno::RuntimeExceptio
if ( IsWildCard( aTempFileName ) )
{
bool bEndWithAsterisk = aTempFileName.endsWithAsciiL("*", 1);
- bool bStartWithAsterisk = (aTempFileName.indexOf(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*"))) == 0);
+ bool bStartWithAsterisk = (aTempFileName.indexOf(::rtl::OUString("*")) == 0);
if ( !bEndWithAsterisk && !bStartWithAsterisk )
{
- aTempFileName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) + aTempFileName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*"));
+ aTempFileName = ::rtl::OUString("*") + aTempFileName + ::rtl::OUString("*");
}
}
else
{
- aTempFileName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) + aTempFileName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*"));
+ aTempFileName = ::rtl::OUString("*") + aTempFileName + ::rtl::OUString("*");
}
WildCard wildCard( aTempFileName );
SearchWildCard( wildCard, m_sLookIn, m_bSearchSubFolders, m_aSearchedFiles );
@@ -227,7 +227,7 @@ Reference< XFoundFiles > SAL_CALL ScVbaFileSearch::getFoundFiles() throw (css::u
rtl::OUString ScVbaFileSearch::getServiceImplName()
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VbaFileSearch"));
+ return rtl::OUString("VbaFileSearch");
}
css::uno::Sequence< rtl::OUString > ScVbaFileSearch::getServiceNames()
@@ -236,7 +236,7 @@ css::uno::Sequence< rtl::OUString > ScVbaFileSearch::getServiceNames()
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.FileSearch") );
+ aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.FileSearch" );
}
return aServiceNames;
}
diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index 9d210f8..3ef30f9 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -51,14 +51,14 @@ using namespace ::ooo::vba;
// =============================================================================
//ScVbaGlobals::ScVbaGlobals( css::uno::Reference< css::uno::XComponentContext >const& rxContext, ) : ScVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext )
-rtl::OUString sDocCtxName( RTL_CONSTASCII_USTRINGPARAM("ExcelDocumentContext") );
+rtl::OUString sDocCtxName( "ExcelDocumentContext" );
ScVbaGlobals::ScVbaGlobals( uno::Sequence< uno::Any > const& aArgs, uno::Reference< uno::XComponentContext >const& rxContext ) : ScVbaGlobals_BASE( uno::Reference< XHelperInterface >(), rxContext, sDocCtxName )
{
OSL_TRACE("ScVbaGlobals::ScVbaGlobals()");
uno::Sequence< beans::PropertyValue > aInitArgs( 2 );
- aInitArgs[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Application"));
+ aInitArgs[ 0 ].Name = rtl::OUString("Application");
aInitArgs[ 0 ].Value = uno::makeAny( getApplication() );
aInitArgs[ 1 ].Name = sDocCtxName;
aInitArgs[ 1 ].Value = uno::makeAny( getXSomethingFromArgs< frame::XModel >( aArgs, 0 ) );
@@ -102,8 +102,8 @@ ScVbaGlobals::getActiveWorkbook() throw (uno::RuntimeException)
return xWorkbook;
}
// FIXME check if this is correct/desired behavior
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "No activeWorkbook available" )), Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(
+ "No activeWorkbook available" ), Reference< uno::XInterface >() );
}
@@ -241,7 +241,7 @@ ScVbaGlobals::getDebug() throw (uno::RuntimeException)
aArgs[ 0 ] <<= uno::Reference< XHelperInterface >( this );
uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW );
uno::Reference< uno::XInterface > xVBADebug = xServiceManager->createInstanceWithArgumentsAndContext(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.Debug" ) ), aArgs, mxContext );
+ ::rtl::OUString( "ooo.vba.Debug" ), aArgs, mxContext );
return uno::Any( xVBADebug );
}
catch( uno::Exception& )
@@ -264,13 +264,13 @@ ScVbaGlobals::getAvailableServiceNames( ) throw (uno::RuntimeException)
if ( !bInit )
{
rtl::OUString names[] = {
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Range" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Workbook" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Window" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Worksheet" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Application" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.excel.Hyperlink" ) ),
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.script.vba.VBASpreadsheetEventProcessor" ) )
+ ::rtl::OUString( "ooo.vba.excel.Range" ),
+ ::rtl::OUString( "ooo.vba.excel.Workbook" ),
+ ::rtl::OUString( "ooo.vba.excel.Window" ),
+ ::rtl::OUString( "ooo.vba.excel.Worksheet" ),
+ ::rtl::OUString( "ooo.vba.excel.Application" ),
+ ::rtl::OUString( "ooo.vba.excel.Hyperlink" ),
+ ::rtl::OUString( "com.sun.star.script.vba.VBASpreadsheetEventProcessor" )
};
sal_Int32 nExcelServices = ( sizeof( names )/ sizeof( names[0] ) );
sal_Int32 startIndex = serviceNames.getLength();
@@ -285,7 +285,7 @@ ScVbaGlobals::getAvailableServiceNames( ) throw (uno::RuntimeException)
rtl::OUString
ScVbaGlobals::getServiceImplName()
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaGlobals"));
+ return rtl::OUString("ScVbaGlobals");
}
uno::Sequence< rtl::OUString >
@@ -295,7 +295,7 @@ ScVbaGlobals::getServiceNames()
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Globals" ) );
+ aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.excel.Globals" );
}
return aServiceNames;
}
diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx
index b3a4a35..b5fda85 100644
--- a/sc/source/ui/vba/vbahelper.cxx
+++ b/sc/source/ui/vba/vbahelper.cxx
@@ -82,7 +82,7 @@ getIntrospectionAccess( const uno::Any& aObject ) throw (uno::RuntimeException)
if( !xIntrospection.is() )
{
uno::Reference< lang::XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
- xIntrospection.set( xFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.Introspection") ) ), uno::UNO_QUERY_THROW );
+ xIntrospection.set( xFactory->createInstance( rtl::OUString( "com.sun.star.beans.Introspection" ) ), uno::UNO_QUERY_THROW );
}
return xIntrospection->inspect( aObject );
}
@@ -90,7 +90,7 @@ getIntrospectionAccess( const uno::Any& aObject ) throw (uno::RuntimeException)
uno::Reference< script::XTypeConverter >
getTypeConverter( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
{
- static uno::Reference< script::XTypeConverter > xTypeConv( xContext->getServiceManager()->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.Converter") ), xContext ), uno::UNO_QUERY_THROW );
+ static uno::Reference< script::XTypeConverter > xTypeConv( xContext->getServiceManager()->createInstanceWithContext( rtl::OUString( "com.sun.star.script.Converter" ), xContext ), uno::UNO_QUERY_THROW );
return xTypeConv;
}
// helper method to determine if the view ( calc ) is in print-preview mode
@@ -124,10 +124,10 @@ private:
static uno::Reference< beans::XPropertySet > getGlobalSheetSettings() throw ( uno::RuntimeException )
{
static uno::Reference< beans::XPropertySet > xTmpProps( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
- static uno::Reference<uno::XComponentContext > xContext( xTmpProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), uno::UNO_QUERY_THROW );
+ static uno::Reference<uno::XComponentContext > xContext( xTmpProps->getPropertyValue( rtl::OUString( "DefaultContext" )), uno::UNO_QUERY_THROW );
static uno::Reference<lang::XMultiComponentFactory > xServiceManager(
xContext->getServiceManager(), uno::UNO_QUERY_THROW );
- static uno::Reference< beans::XPropertySet > xProps( xServiceManager->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.GlobalSheetSettings" ) ) ,xContext ), uno::UNO_QUERY_THROW );
+ static uno::Reference< beans::XPropertySet > xProps( xServiceManager->createInstanceWithContext( rtl::OUString( "com.sun.star.sheet.GlobalSheetSettings" ) ,xContext ), uno::UNO_QUERY_THROW );
return xProps;
}
@@ -270,7 +270,7 @@ getCurrentDocument() throw (uno::RuntimeException)
uno::Any aModel;
- SbxVariable *pCompVar = basicChosen->Find( UniString(RTL_CONSTASCII_USTRINGPARAM("ThisComponent")), SbxCLASS_OBJECT );
+ SbxVariable *pCompVar = basicChosen->Find( UniString("ThisComponent"), SbxCLASS_OBJECT );
if ( pCompVar )
{
@@ -281,14 +281,14 @@ getCurrentDocument() throw (uno::RuntimeException)
// trying last gasp try the current component
uno::Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
// test if vba service is present
- uno::Reference< uno::XComponentContext > xCtx( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), uno::UNO_QUERY_THROW );
+ uno::Reference< uno::XComponentContext > xCtx( xProps->getPropertyValue( rtl::OUString( "DefaultContext" )), uno::UNO_QUERY_THROW );
uno::Reference<lang::XMultiComponentFactory > xSMgr( xCtx->getServiceManager(), uno::UNO_QUERY_THROW );
- uno::Reference< frame::XDesktop > xDesktop (xSMgr->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")), xCtx), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XDesktop > xDesktop (xSMgr->createInstanceWithContext(::rtl::OUString("com.sun.star.frame.Desktop"), xCtx), uno::UNO_QUERY_THROW );
xModel.set( xDesktop->getCurrentComponent(), uno::UNO_QUERY );
if ( !xModel.is() )
{
throw uno::RuntimeException(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can't extract model from basic ( its obviously not set yet ) therefore don't know the currently selected document") ), uno::Reference< uno::XInterface >() );
+ rtl::OUString( "Can't extract model from basic ( its obviously not set yet therefore don't know the currently selected document") ), uno::Reference< uno::XInterface >() );
}
return xModel;
}
@@ -303,9 +303,7 @@ getCurrentDocument() throw (uno::RuntimeException)
{
OSL_TRACE("Failed to get ThisComponent");
throw uno::RuntimeException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "Can't determine the currently selected document") ),
+ rtl::OUString( "Can't determine the currently selected document" ),
uno::Reference< uno::XInterface >() );
}
return xModel;
@@ -408,7 +406,7 @@ void PrintOutHelper( const uno::Any& From, const uno::Any& To, const uno::Any& C
if ( nCopies > 1 ) // Collate only useful when more that 1 copy
Collate >>= bCollate;
- rtl::OUString sRange( RTL_CONSTASCII_USTRINGPARAM( "-" ) );
+ rtl::OUString sRange( "-" );
rtl::OUString sFileName;
if (( nFrom || nTo ) )
@@ -535,7 +533,7 @@ rtl::OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeEx
break;
}
default:
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid type, can't convert" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Invalid type, can't convert" ), uno::Reference< uno::XInterface >() );
}
return sString;
}
@@ -592,7 +590,7 @@ ContainerUtilities::FieldInList( const uno::Sequence< rtl::OUString >& SearchLis
}
bool NeedEsc(sal_Unicode cCode)
{
- String sEsc(RTL_CONSTASCII_USTRINGPARAM(".^$+\\|{}()"));
+ String sEsc(".^$+\\|{}()");
return (STRING_NOTFOUND != sEsc.Search(cCode));
}
@@ -615,11 +613,11 @@ rtl::OUString VBAToRegexp(const rtl::OUString &rIn, bool bForLike )
start++;
break;
case '*':
- sResult.append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".*")));
+ sResult.append(rtl::OUString(".*"));
start++;
break;
case '#':
- sResult.append(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[0-9]")));
+ sResult.append(rtl::OUString("[0-9]"));
start++;
break;
case '~':
@@ -713,42 +711,42 @@ UserFormGeometryHelper::UserFormGeometryHelper( const uno::Reference< uno::XComp
double UserFormGeometryHelper::getLeft()
{
sal_Int32 nLeft = 0;
- mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ) ) >>= nLeft;
+ mxModel->getPropertyValue( rtl::OUString( VBA_LEFT ) ) >>= nLeft;
return Millimeter::getInPoints( nLeft );
}
void UserFormGeometryHelper::setLeft( double nLeft )
{
- mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_LEFT ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nLeft ) ) );
+ mxModel->setPropertyValue( rtl::OUString( VBA_LEFT ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nLeft ) ) );
}
double UserFormGeometryHelper::getTop()
{
sal_Int32 nTop = 0;
- mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_TOP ) ) ) >>= nTop;
+ mxModel->getPropertyValue( rtl::OUString( VBA_TOP ) ) >>= nTop;
return Millimeter::getInPoints( nTop );
}
void UserFormGeometryHelper::setTop( double nTop )
{
- mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( VBA_TOP ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nTop ) ) );
+ mxModel->setPropertyValue( rtl::OUString( VBA_TOP ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nTop ) ) );
}
double UserFormGeometryHelper::getHeight()
{
sal_Int32 nHeight = 0;
- mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLHGT ) ) ) >>= nHeight;
+ mxModel->getPropertyValue( rtl::OUString( SC_UNONAME_CELLHGT ) ) >>= nHeight;
return Millimeter::getInPoints( nHeight );
}
void UserFormGeometryHelper::setHeight( double nHeight )
{
- mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLHGT ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nHeight ) ) );
+ mxModel->setPropertyValue( rtl::OUString( SC_UNONAME_CELLHGT ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nHeight ) ) );
}
double UserFormGeometryHelper::getWidth()
{
sal_Int32 nWidth = 0;
- mxModel->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLWID ) ) ) >>= nWidth;
+ mxModel->getPropertyValue( rtl::OUString( SC_UNONAME_CELLWID ) ) >>= nWidth;
return Millimeter::getInPoints( nWidth );
}
void UserFormGeometryHelper::setWidth( double nWidth)
{
- mxModel->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_CELLWID ) ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nWidth ) ) );
+ mxModel->setPropertyValue( rtl::OUString( SC_UNONAME_CELLWID ), uno::makeAny( Millimeter::getInHundredthsOfOneMillimeter( nWidth ) ) );
}
SfxItemSet*
diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx
index 2831df0..fe0403c 100644
--- a/sc/source/ui/vba/vbapagesetup.cxx
+++ b/sc/source/ui/vba/vbapagesetup.cxx
@@ -60,13 +60,13 @@ ScVbaPageSetup::ScVbaPageSetup(const uno::Reference< XHelperInterface >& xParent
// query for current page style
mxModel.set( xModel, uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xSheetProps( mxSheet, uno::UNO_QUERY_THROW );
- uno::Any aValue = xSheetProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageStyle" )));
+ uno::Any aValue = xSheetProps->getPropertyValue( rtl::OUString( "PageStyle" ));
rtl::OUString aStyleName;
aValue >>= aStyleName;
uno::Reference< style::XStyleFamiliesSupplier > xStyleFamiliesSup( mxModel, uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xStyleFamilies = xStyleFamiliesSup->getStyleFamilies();
- uno::Reference< container::XNameAccess > xPageStyle( xStyleFamilies->getByName(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyles"))), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xPageStyle( xStyleFamilies->getByName(rtl::OUString( "PageStyles")), uno::UNO_QUERY_THROW );
mxPageProps.set( xPageStyle->getByName(aStyleName), uno::UNO_QUERY_THROW );
mnOrientLandscape = excel::XlPageOrientation::xlLandscape;
mnOrientPortrait = excel::XlPageOrientation::xlPortrait;
@@ -101,7 +101,7 @@ void SAL_CALL ScVbaPageSetup::setPrintArea( const rtl::OUString& rAreas ) throw
{
uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
if( rAreas.isEmpty() ||
- rAreas.equalsIgnoreAsciiCase ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FALSE")) ) )
+ rAreas.equalsIgnoreAsciiCase ( rtl::OUString("FALSE") ) )
{
// print the whole sheet
uno::Sequence< table::CellRangeAddress > aSeq;
@@ -148,7 +148,7 @@ void SAL_CALL ScVbaPageSetup::setFooterMargin( double margin ) throw (css::uno::
uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesTall() throw (css::uno::RuntimeException)
{
- return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")));
+ return mxPageProps->getPropertyValue( rtl::OUString( "ScaleToPagesY"));
}
void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) throw (css::uno::RuntimeException)
@@ -162,7 +162,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall)
fitToPagesTall >>= scaleToPageY;
}
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( scaleToPageY ));
+ mxPageProps->setPropertyValue( rtl::OUString( "ScaleToPagesY"), uno::makeAny( scaleToPageY ));
}
catch( uno::Exception& )
{
@@ -171,7 +171,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall)
uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesWide() throw (css::uno::RuntimeException)
{
- return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")));
+ return mxPageProps->getPropertyValue( rtl::OUString( "ScaleToPagesX"));
}
void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) throw (css::uno::RuntimeException)
@@ -185,7 +185,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide)
fitToPagesWide >>= scaleToPageX;
}
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( scaleToPageX ));
+ mxPageProps->setPropertyValue( rtl::OUString( "ScaleToPagesX"), uno::makeAny( scaleToPageX ));
}
catch( uno::Exception& )
{
@@ -194,7 +194,7 @@ void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide)
uno::Any SAL_CALL ScVbaPageSetup::getZoom() throw (css::uno::RuntimeException)
{
- return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageScale")));
+ return mxPageProps->getPropertyValue( rtl::OUString( "PageScale"));
}
void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::RuntimeException)
@@ -222,9 +222,9 @@ void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::Ru
// these only exist in S08
sal_uInt16 nScale = 0;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPages")), uno::makeAny( nScale ));
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( nScale ));
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( nScale ));
+ mxPageProps->setPropertyValue( rtl::OUString( "ScaleToPages"), uno::makeAny( nScale ));
+ mxPageProps->setPropertyValue( rtl::OUString( "ScaleToPagesX"), uno::makeAny( nScale ));
+ mxPageProps->setPropertyValue( rtl::OUString( "ScaleToPagesY"), uno::makeAny( nScale ));
}
catch( beans::UnknownPropertyException& )
{
@@ -237,7 +237,7 @@ void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::Ru
{
}
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageScale")), uno::makeAny( pageScale ));
+ mxPageProps->setPropertyValue( rtl::OUString( "PageScale"), uno::makeAny( pageScale ));
}
rtl::OUString SAL_CALL ScVbaPageSetup::getLeftHeader() throw (css::uno::RuntimeException)
@@ -245,7 +245,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getLeftHeader() throw (css::uno::RuntimeE
rtl::OUString leftHeader;
try
{
- uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW);
if( xHeaderContent.is() )
{
uno::Reference< text::XText > xText = xHeaderContent->getLeftText();
@@ -263,12 +263,12 @@ void SAL_CALL ScVbaPageSetup::setLeftHeader( const rtl::OUString& leftHeader) th
{
try
{
- uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW);
if( xHeaderContent.is() )
{
uno::Reference< text::XText > xText = xHeaderContent->getLeftText();
xText->setString( leftHeader );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) );
+ mxPageProps->setPropertyValue( rtl::OUString( "RightPageHeaderContent"), uno::makeAny(xHeaderContent) );
}
}
catch( uno::Exception& )
@@ -281,7 +281,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getCenterHeader() throw (css::uno::Runtim
rtl::OUString centerHeader;
try
{
- uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW);
if( xHeaderContent.is() )
{
uno::Reference< text::XText > xText = xHeaderContent->getCenterText();
@@ -299,12 +299,12 @@ void SAL_CALL ScVbaPageSetup::setCenterHeader( const rtl::OUString& centerHeader
{
try
{
- uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW);
if( xHeaderContent.is() )
{
uno::Reference< text::XText > xText = xHeaderContent->getCenterText();
xText->setString( centerHeader );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) );
+ mxPageProps->setPropertyValue( rtl::OUString( "RightPageHeaderContent"), uno::makeAny(xHeaderContent) );
}
}
catch( uno::Exception& )
@@ -317,7 +317,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getRightHeader() throw (css::uno::Runtime
rtl::OUString rightHeader;
try
{
- uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW);
if( xHeaderContent.is() )
{
uno::Reference< text::XText > xText = xHeaderContent->getRightText();
@@ -335,12 +335,12 @@ void SAL_CALL ScVbaPageSetup::setRightHeader( const rtl::OUString& rightHeader)
{
try
{
- uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageHeaderContent")), uno::UNO_QUERY_THROW);
if( xHeaderContent.is() )
{
uno::Reference< text::XText > xText = xHeaderContent->getRightText();
xText->setString( rightHeader );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) );
+ mxPageProps->setPropertyValue( rtl::OUString( "RightPageHeaderContent"), uno::makeAny(xHeaderContent) );
}
}
catch( uno::Exception& )
@@ -353,7 +353,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getLeftFooter() throw (css::uno::RuntimeE
rtl::OUString leftFooter;
try
{
- uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW);
if( xFooterContent.is() )
{
uno::Reference< text::XText > xText = xFooterContent->getLeftText();
@@ -371,12 +371,12 @@ void SAL_CALL ScVbaPageSetup::setLeftFooter( const rtl::OUString& leftFooter) th
{
try
{
- uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW);
if( xFooterContent.is() )
{
uno::Reference< text::XText > xText = xFooterContent->getLeftText();
xText->setString( leftFooter );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) );
+ mxPageProps->setPropertyValue( rtl::OUString( "RightPageFooterContent"), uno::makeAny(xFooterContent) );
}
}
catch( uno::Exception& )
@@ -389,7 +389,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getCenterFooter() throw (css::uno::Runtim
rtl::OUString centerFooter;
try
{
- uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW);
if( xFooterContent.is() )
{
uno::Reference< text::XText > xText = xFooterContent->getCenterText();
@@ -407,12 +407,12 @@ void SAL_CALL ScVbaPageSetup::setCenterFooter( const rtl::OUString& centerFooter
{
try
{
- uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW);
if( xFooterContent.is() )
{
uno::Reference< text::XText > xText = xFooterContent->getCenterText();
xText->setString( centerFooter );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) );
+ mxPageProps->setPropertyValue( rtl::OUString( "RightPageFooterContent"), uno::makeAny(xFooterContent) );
}
}
catch( uno::Exception& )
@@ -426,7 +426,7 @@ rtl::OUString SAL_CALL ScVbaPageSetup::getRightFooter() throw (css::uno::Runtime
rtl::OUString rightFooter;
try
{
- uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW);
if( xFooterContent.is() )
{
uno::Reference< text::XText > xText = xFooterContent->getRightText();
@@ -444,12 +444,12 @@ void SAL_CALL ScVbaPageSetup::setRightFooter( const rtl::OUString& rightFooter)
{
try
{
- uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( "RightPageFooterContent")), uno::UNO_QUERY_THROW);
if( xFooterContent.is() )
{
uno::Reference< text::XText > xText = xFooterContent->getRightText();
xText->setString( rightFooter );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) );
+ mxPageProps->setPropertyValue( rtl::OUString( "RightPageFooterContent"), uno::makeAny(xFooterContent) );
}
}
catch( uno::Exception& )
@@ -462,7 +462,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getOrder() throw (css::uno::RuntimeException)
sal_Int32 order = excel::XlOrder::xlDownThenOver;
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")));
+ uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( "PrintDownFirst"));
sal_Bool bPrintDownFirst = false;
aValue >>= bPrintDownFirst;
if( !bPrintDownFirst )
@@ -491,7 +491,7 @@ void SAL_CALL ScVbaPageSetup::setOrder( sal_Int32 order) throw (css::uno::Runtim
try
{
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")), uno::makeAny( bOrder ));
+ mxPageProps->setPropertyValue( rtl::OUString( "PrintDownFirst"), uno::makeAny( bOrder ));
}
catch( uno::Exception& )
{
@@ -503,7 +503,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getFirstPageNumber() throw (css::uno::Runtime
sal_Int16 number = 0;
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")));
+ uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( "FirstPageNumber"));
aValue >>= number;
}
catch( uno::Exception& )
@@ -529,7 +529,7 @@ void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber) thr
{
uno::Any aValue;
aValue <<= (sal_Int16)firstPageNumber;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")), aValue );
+ mxPageProps->setPropertyValue( rtl::OUString( "FirstPageNumber"), aValue );
}
catch( uno::Exception& )
{
@@ -541,7 +541,7 @@ sal_Bool SAL_CALL ScVbaPageSetup::getCenterVertically() throw (css::uno::Runtime
sal_Bool centerVertically = false;
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterVertically")));
+ uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( "CenterVertically"));
aValue >>= centerVertically;
}
catch( uno::Exception& )
@@ -554,7 +554,7 @@ void SAL_CALL ScVbaPageSetup::setCenterVertically( sal_Bool centerVertically) th
{
try
{
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterVertically")), uno::makeAny( centerVertically ));
+ mxPageProps->setPropertyValue( rtl::OUString( "CenterVertically"), uno::makeAny( centerVertically ));
}
catch( uno::Exception& )
{
@@ -566,7 +566,7 @@ sal_Bool SAL_CALL ScVbaPageSetup::getCenterHorizontally() throw (css::uno::Runti
sal_Bool centerHorizontally = false;
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")));
+ uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( "CenterHorizontally"));
aValue >>= centerHorizontally;
}
catch( uno::Exception& )
@@ -579,7 +579,7 @@ void SAL_CALL ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally
{
try
{
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")), uno::makeAny( centerHorizontally ));
+ mxPageProps->setPropertyValue( rtl::OUString( "CenterHorizontally"), uno::makeAny( centerHorizontally ));
}
catch( uno::Exception& )
{
@@ -591,7 +591,7 @@ sal_Bool SAL_CALL ScVbaPageSetup::getPrintHeadings() throw (css::uno::RuntimeExc
sal_Bool printHeadings = false;
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")));
+ uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( "PrintHeaders"));
aValue >>= printHeadings;
}
catch( uno::Exception& )
@@ -604,7 +604,7 @@ void SAL_CALL ScVbaPageSetup::setPrintHeadings( sal_Bool printHeadings) throw (c
{
try
{
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")), uno::makeAny( printHeadings ));
+ mxPageProps->setPropertyValue( rtl::OUString( "PrintHeaders"), uno::makeAny( printHeadings ));
}
catch( uno::Exception& )
{
@@ -614,7 +614,7 @@ void SAL_CALL ScVbaPageSetup::setPrintHeadings( sal_Bool printHeadings) throw (c
rtl::OUString
ScVbaPageSetup::getServiceImplName()
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaPageSetup"));
+ return rtl::OUString("ScVbaPageSetup");
}
uno::Sequence< rtl::OUString >
@@ -624,7 +624,7 @@ ScVbaPageSetup::getServiceNames()
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PageSetup" ) );
+ aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.excel.PageSetup" );
}
return aServiceNames;
}
@@ -688,7 +688,7 @@ sal_Int32 SAL_CALL ScVbaPageSetup::getPaperSize() throw (css::uno::RuntimeExcept
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Size")));
+ uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( "Size"));
aValue >>= size;
ePaper = SvxPaperInfo::GetSvxPaper( Size(size.Width, size.Height), MAP_100TH_MM, true);
}
@@ -722,7 +722,7 @@ void SAL_CALL ScVbaPageSetup::setPaperSize( sal_Int32 paperSize) throw (css::uno
{
Size size1 = SvxPaperInfo::GetPaperSize( ePaper, MAP_100TH_MM );
com::sun::star::awt::Size size(size1.Width(), size1.Height());
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Size")), uno::makeAny( size ));
+ mxPageProps->setPropertyValue( rtl::OUString( "Size"), uno::makeAny( size ));
}
catch( uno::Exception& )
{
diff --git a/sc/source/ui/vba/vbapropvalue.hxx b/sc/source/ui/vba/vbapropvalue.hxx
index 2cbc37e..f4d296a 100644
--- a/sc/source/ui/vba/vbapropvalue.hxx
+++ b/sc/source/ui/vba/vbapropvalue.hxx
@@ -52,7 +52,7 @@ public:
virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- rtl::OUString SAL_CALL getDefaultPropertyName() throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
+ rtl::OUString SAL_CALL getDefaultPropertyName() throw (css::uno::RuntimeException) { return ::rtl::OUString("Value"); }
};
#endif //SC_VBA_PROPVALULE_HXX
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 572abbe..958888e 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -273,7 +273,7 @@ ScCellRangesBase* ScVbaRange::getCellRangesBase() throw ( uno::RuntimeException
return ScCellRangesBase::getImplementation( mxRanges );
if( mxRange.is() )
return ScCellRangesBase::getImplementation( mxRange );
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("General Error creating range - Unknown" )), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("General Error creating range - Unknown" ), uno::Reference< uno::XInterface >() );
}
ScCellRangeObj* ScVbaRange::getCellRangeObj() throw ( uno::RuntimeException )
@@ -285,7 +285,7 @@ SfxItemSet* ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException )
{
SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( getCellRangesBase() );
if ( !pDataSet )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can't access Itemset for range" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can't access Itemset for range" ), uno::Reference< uno::XInterface >() );
return pDataSet;
}
@@ -456,14 +456,14 @@ const ScRangeList& ScVbaRange::getScRangeList() throw (uno::RuntimeException)
{
if( ScCellRangesBase* pScRangesBase = getCellRangesBase() )
return pScRangesBase->GetRangeList();
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain UNO range implementation object" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( ::rtl::OUString( "Cannot obtain UNO range implementation object" ), uno::Reference< uno::XInterface >() );
}
const ScRangeList& ScVbaRange::getScRangeList( const uno::Reference< excel::XRange >& rxRange ) throw (uno::RuntimeException)
{
if( ScVbaRange* pScVbaRange = getImplementation( rxRange ) )
return pScVbaRange->getScRangeList();
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain VBA range implementation object" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( ::rtl::OUString( "Cannot obtain VBA range implementation object" ), uno::Reference< uno::XInterface >() );
}
@@ -482,7 +482,7 @@ public:
uno::Reference< beans::XPropertySet > getNumberProps()
{
long nIndexKey = 0;
- uno::Any aValue = mxRangeProps->getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberFormat")));
+ uno::Any aValue = mxRangeProps->getPropertyValue(rtl::OUString( "NumberFormat"));
aValue >>= nIndexKey;
if ( mxFormats.is() )
@@ -526,7 +526,7 @@ public:
uno::Reference< beans::XPropertySet > xNumberProps( getNumberProps(), uno::UNO_QUERY_THROW );
::rtl::OUString aFormatString;
- uno::Any aString = xNumberProps->getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FormatString")));
+ uno::Any aString = xNumberProps->getPropertyValue(rtl::OUString( "FormatString"));
aString >>= aFormatString;
return aFormatString;
}
@@ -535,7 +535,7 @@ public:
{
uno::Reference< beans::XPropertySet > xNumberProps = getNumberProps();
sal_Int16 nType = ::comphelper::getINT16(
- xNumberProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Type" )) ) );
+ xNumberProps->getPropertyValue( ::rtl::OUString( "Type" ) ) );
return nType;
}
@@ -547,12 +547,12 @@ public:
{
lang::Locale aLocale;
uno::Reference< beans::XPropertySet > xNumProps = getNumberProps();
- xNumProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Locale" ) ) ) >>= aLocale;
+ xNumProps->getPropertyValue( ::rtl::OUString( "Locale" ) ) >>= aLocale;
nNewIndex = mxFormats->queryKey( rFormat, aLocale, false );
if ( nNewIndex == -1 ) // format not defined
nNewIndex = mxFormats->addNew( rFormat, aLocale );
}
- mxRangeProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberFormat") ), uno::makeAny( nNewIndex ) );
+ mxRangeProps->setPropertyValue( rtl::OUString( "NumberFormat" ), uno::makeAny( nNewIndex ) );
return true;
}
@@ -560,12 +560,12 @@ public:
{
uno::Reference< beans::XPropertySet > xNumberProps = getNumberProps();
lang::Locale aLocale;
- xNumberProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Locale" )) ) >>= aLocale;
+ xNumberProps->getPropertyValue( ::rtl::OUString( "Locale" ) ) >>= aLocale;
uno::Reference<util::XNumberFormatTypes> xTypes( mxFormats, uno::UNO_QUERY );
if ( xTypes.is() )
{
sal_Int32 nNewIndex = xTypes->getStandardFormat( nType, aLocale );
- mxRangeProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberFormat") ), uno::makeAny( nNewIndex ) );
+ mxRangeProps->setPropertyValue( rtl::OUString( "NumberFormat" ), uno::makeAny( nNewIndex ) );
return true;
}
return false;
@@ -668,19 +668,19 @@ public:
};
-const static ::rtl::OUString ISVISIBLE( RTL_CONSTASCII_USTRINGPARAM( "IsVisible"));
-const static ::rtl::OUString POSITION( RTL_CONSTASCII_USTRINGPARAM( "Position"));
-const static rtl::OUString EQUALS( RTL_CONSTASCII_USTRINGPARAM("=") );
-const static rtl::OUString NOTEQUALS( RTL_CONSTASCII_USTRINGPARAM("<>") );
-const static rtl::OUString GREATERTHAN( RTL_CONSTASCII_USTRINGPARAM(">") );
-const static rtl::OUString GREATERTHANEQUALS( RTL_CONSTASCII_USTRINGPARAM(">=") );
-const static rtl::OUString LESSTHAN( RTL_CONSTASCII_USTRINGPARAM("<") );
-const static rtl::OUString LESSTHANEQUALS( RTL_CONSTASCII_USTRINGPARAM("<=") );
-const static rtl::OUString CONTS_HEADER( RTL_CONSTASCII_USTRINGPARAM("ContainsHeader" ));
-const static rtl::OUString INSERTPAGEBREAKS( RTL_CONSTASCII_USTRINGPARAM("InsertPageBreaks" ));
-const static rtl::OUString STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY( RTL_CONSTASCII_USTRINGPARAM("The command you chose cannot be performed with multiple selections.\nSelect a single range and click the command again") );
-const static rtl::OUString STR_ERRORMESSAGE_NOCELLSWEREFOUND( RTL_CONSTASCII_USTRINGPARAM("No cells were found") );
-const static rtl::OUString CELLSTYLE( RTL_CONSTASCII_USTRINGPARAM("CellStyle") );
+const static ::rtl::OUString ISVISIBLE( "IsVisible");
+const static ::rtl::OUString POSITION( "Position");
+const static rtl::OUString EQUALS( "=" );
+const static rtl::OUString NOTEQUALS( "<>" );
+const static rtl::OUString GREATERTHAN( ">" );
+const static rtl::OUString GREATERTHANEQUALS( ">=" );
+const static rtl::OUString LESSTHAN( "<" );
+const static rtl::OUString LESSTHANEQUALS( "<=" );
+const static rtl::OUString CONTS_HEADER( "ContainsHeader" );
+const static rtl::OUString INSERTPAGEBREAKS( "InsertPageBreaks" );
+const static rtl::OUString STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY( "The command you chose cannot be performed with multiple selections.\nSelect a single range and click the command again" );
+const static rtl::OUString STR_ERRORMESSAGE_NOCELLSWEREFOUND( "No cells were found" );
+const static rtl::OUString CELLSTYLE( "CellStyle" );
class CellValueSetter : public ValueSetter
{
@@ -815,7 +815,7 @@ void CellValueGetter::visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference<
table::CellContentType eFormulaType = table::CellContentType_VALUE;
// some formulas give textual results
- xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FormulaResultType" ) ) ) >>= eFormulaType;
+ xProp->getPropertyValue( rtl::OUString( "FormulaResultType" ) ) >>= eFormulaType;
if ( eFormulaType == table::CellContentType_TEXT )
{
@@ -962,7 +962,7 @@ public:
};
-const static rtl::OUString sNA(RTL_CONSTASCII_USTRINGPARAM("#N/A"));
+const static rtl::OUString sNA("#N/A");
class Dim1ArrayValueSetter : public ArrayVisitor
{
@@ -1152,7 +1152,7 @@ bool getScRangeListForAddress( const rtl::OUString& sName, ScDocShell* pDocSh, S
{
// see if there is a match with a named range
uno::Reference< beans::XPropertySet > xProps( pDocSh->GetModel(), uno::UNO_QUERY_THROW );
- uno::Reference< container::XNameAccess > xNameAccess( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NamedRanges") ) ), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xNameAccess( xProps->getPropertyValue( rtl::OUString( "NamedRanges" ) ), uno::UNO_QUERY_THROW );
// Strangly enough you can have Range( "namedRange1, namedRange2, etc," )
// loop around each ',' seperated name
std::vector< rtl::OUString > vNames;
@@ -1286,10 +1286,10 @@ uno::Reference< sheet::XSheetCellRange > lclExpandToMerged( const uno::Reference
uno::Reference< sheet::XSheetCellRangeContainer > lclExpandToMerged( const uno::Reference< sheet::XSheetCellRangeContainer >& rxCellRanges, bool bRecursive ) throw (uno::RuntimeException)
{
if( !rxCellRanges.is() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Missing cell ranges object" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Missing cell ranges object" ), uno::Reference< uno::XInterface >() );
sal_Int32 nCount = rxCellRanges->getCount();
if( nCount < 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Missing cell ranges object" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Missing cell ranges object" ), uno::Reference< uno::XInterface >() );
ScRangeList aScRanges;
for( sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex )
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list