summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/ucalc.cxx338
-rw-r--r--sc/source/core/data/dpoutput.cxx40
-rw-r--r--sc/source/ui/vba/vbafilesearch.cxx12
-rw-r--r--sc/source/ui/vba/vbaglobals.cxx28
-rw-r--r--sc/source/ui/vba/vbahelper.cxx46
-rw-r--r--sc/source/ui/vba/vbapagesetup.cxx88
-rw-r--r--sc/source/ui/vba/vbapropvalue.hxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx274
-rw-r--r--sc/source/ui/view/cellsh1.cxx10
-rw-r--r--sc/source/ui/view/cellsh2.cxx2
-rw-r--r--sc/source/ui/view/formatsh.cxx2
-rw-r--r--sc/source/ui/view/gridwin2.cxx2
-rw-r--r--sc/source/ui/view/prevwsh.cxx8
-rw-r--r--sc/source/ui/view/tabvwshg.cxx10
14 files changed, 430 insertions, 432 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 71014a18320d..d37e3f15ba55 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 544fb9ddef56..741ee2dc472b 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 f526011c629e..ddb5c04be3eb 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 9d210f81b62e..3ef30f9625ed 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 b3a4a35efee6..b5fda853b822 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 2831df0fcf92..fe0403c056b9 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 2cbc37ecc981..f4d296a2e82c 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 572abbe4225e..958888eeb2ff 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 )
@@ -1416,14 +1416,14 @@ table::CellRangeAddress getCellRangeAddressForVBARange( const uno::Any& aParam,
ScVbaRange* pRange = dynamic_cast< ScVbaRange* >( xRange.get() );
if ( pRange && pDocSh && pRange->getScDocument() != pDocSh->GetDocument() )
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Invalid range" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Invalid range" ), uno::Reference< uno::XInterface >() );
}
xRange->getCellRange() >>= xRangeParam;
}
break;
}
default:
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can't extact CellRangeAddress from type" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can't extact CellRangeAddress from type" ), uno::Reference< uno::XInterface >() );
}
return lclGetRangeAddress( xRangeParam );
}
@@ -1434,7 +1434,7 @@ lcl_setupBorders( const uno::Reference< excel::XRange >& xParentRange, const uno
uno::Reference< XHelperInterface > xParent( xParentRange, uno::UNO_QUERY_THROW );
ScDocument* pDoc = excel::GetDocumentFromRange(xRange);
if ( !pDoc )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to access document from shell" ), uno::Reference< uno::XInterface >() );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
uno::Reference< XCollection > borders( new ScVbaBorders( xParent, xContext, xRange, aPalette ) );
return borders;
@@ -1448,7 +1448,7 @@ void lcl_NotifyRangeChanges( const uno::Reference< frame::XModel >& xModel, ScCe
const ScRangeList& aCellRanges = pUnoRangesBase->GetRangeList();
if ( pModelObj && pModelObj->HasChangesListeners() )
{
- pModelObj->NotifyChanges( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "cell-change" ) ), aCellRanges );
+ pModelObj->NotifyChanges( ::rtl::OUString( "cell-change" ), aCellRanges );
}
}
}
@@ -1476,9 +1476,9 @@ ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const
mbIsColumns( bIsColumns )
{
if ( !xContext.is() )
- throw lang::IllegalArgumentException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "context is not set " ) ), uno::Reference< uno::XInterface >() , 1 );
+ throw lang::IllegalArgumentException( rtl::OUString( "context is not set " ), uno::Reference< uno::XInterface >() , 1 );
if ( !xRange.is() )
- throw lang::IllegalArgumentException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "range is not set " ) ), uno::Reference< uno::XInterface >() , 1 );
+ throw lang::IllegalArgumentException( rtl::OUString( "range is not set " ), uno::Reference< uno::XInterface >() , 1 );
uno::Reference< container::XIndexAccess > xIndex( new SingleRangeIndexAccess( mxParent, mxContext, xRange ) );
m_Areas = new ScVbaRangeAreas( mxParent, mxContext, xIndex, mbIsRows, mbIsColumns );
@@ -1533,10 +1533,10 @@ uno::Any SAL_CALL ScVbaRange::getName() throw (uno::RuntimeException)
uno::Reference< frame::XModel > xModel = pDocShell ? pDocShell->GetModel() : NULL;
if ( !xModel.is() )
{
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid document" )), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Invalid document" ), uno::Reference< uno::XInterface >() );
}
uno::Reference< beans::XPropertySet > xPropertySet( xModel, uno::UNO_QUERY_THROW );
- uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NamedRanges"))) , uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString("NamedRanges")) , uno::UNO_QUERY_THROW );
uno::Reference< excel::XNames > xNames( new ScVbaNames( uno::Reference< XHelperInterface >(), mxContext , xNamedRanges , xModel ) );
sal_Int32 nCount = xNames->getCount();
@@ -1582,10 +1582,10 @@ ScVbaRange::setName( const uno::Any& aName ) throw (uno::RuntimeException)
uno::Reference< frame::XModel > xModel = pDocShell ? pDocShell->GetModel() : NULL;
if ( !xModel.is() )
{
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid document" )), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Invalid document" ), uno::Reference< uno::XInterface >() );
}
uno::Reference< beans::XPropertySet > xPropertySet( xModel, uno::UNO_QUERY_THROW );
- uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NamedRanges"))) , uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString("NamedRanges")) , uno::UNO_QUERY_THROW );
uno::Reference< excel::XNames > xNames( new ScVbaNames( uno::Reference< XHelperInterface >(), mxContext , xNamedRanges , xModel ) );
@@ -2231,7 +2231,7 @@ ScVbaRange::Font() throw ( script::BasicErrorException, uno::RuntimeException)
else if ( mxRanges.is() )
xProps.set(mxRanges, ::uno::UNO_QUERY );
if ( !pDoc )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to access document from shell" ), uno::Reference< uno::XInterface >() );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
ScCellRangeObj* pRangeObj = NULL;
@@ -2369,7 +2369,7 @@ ScVbaRange::Select() throw (uno::RuntimeException)
{
ScCellRangesBase* pUnoRangesBase = getCellRangesBase();
if ( !pUnoRangesBase )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access underlying uno range object" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to access underlying uno range object" ), uno::Reference< uno::XInterface >() );
ScDocShell* pShell = pUnoRangesBase->GetDocShell();
if ( pShell )
{
@@ -2503,10 +2503,10 @@ ScVbaRange::Rows(const uno::Any& aIndex ) throw (uno::RuntimeException)
aRange.aEnd.SetRow( aRange.aStart.Row() + ( nEndRow - nStartRow ));
}
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Illegal param" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Illegal param" ), uno::Reference< uno::XInterface >() );
if ( aRange.aStart.Row() < 0 || aRange.aEnd.Row() < 0 )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Internal failure, illegal param")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("Internal failure, illegal param"), uno::Reference< uno::XInterface >() );
// return a normal range ( even for multi-selection
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) );
return new ScVbaRange( mxParent, mxContext, xRange, true );
@@ -2547,10 +2547,10 @@ ScVbaRange::Columns(const uno::Any& aIndex ) throw (uno::RuntimeException)
aRange.aEnd.SetCol( aRange.aStart.Col() + ( nEndCol - nStartCol ));
}
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Illegal param" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Illegal param" ), uno::Reference< uno::XInterface >() );
if ( aRange.aStart.Col() < 0 || aRange.aEnd.Col() < 0 )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Internal failure, illegal param")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("Internal failure, illegal param"), uno::Reference< uno::XInterface >() );
}
// Columns() - no params
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) );
@@ -2627,7 +2627,7 @@ ScVbaRange::Copy(const ::uno::Any& Destination) throw (uno::RuntimeException)
{
// #TODO support ( if necessary ) multi-area range in this scenario
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("!!! That command cannot be used on multiple selections" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "!!! That command cannot be used on multiple selections" ), uno::Reference< uno::XInterface >() );
uno::Reference< excel::XRange > xRange( Destination, uno::UNO_QUERY_THROW );
uno::Any aRange = xRange->getCellRange();
uno::Reference< table::XCellRange > xCellRange;
@@ -2650,7 +2650,7 @@ ScVbaRange::Copy(const ::uno::Any& Destination) throw (uno::RuntimeException)
ScRangeList aList = pUnoRangesBase->GetRangeList();
if ( !excel::implnCopyRanges( xModel, aList ) )
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("That command cannot be used on multiple selections" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "That command cannot be used on multiple selections" ), uno::Reference< uno::XInterface >() );
}
}
else
@@ -2668,7 +2668,7 @@ void
ScVbaRange::Cut(const ::uno::Any& Destination) throw (uno::RuntimeException)
{
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("That command cannot be used on multiple selections" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "That command cannot be used on multiple selections" ), uno::Reference< uno::XInterface >() );
if (Destination.hasValue())
{
uno::Reference< excel::XRange > xRange( Destination, uno::UNO_QUERY_THROW );
@@ -2778,7 +2778,7 @@ ScVbaRange::setWrapText( const uno::Any& aIsWrapped ) throw (script::BasicErrorE
uno::Reference< beans::XPropertySet > xProps(mxRange, ::uno::UNO_QUERY_THROW );
bool bIsWrapped = extractBoolFromAny( aIsWrapped );
- xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsTextWrapped" ) ), uno::Any( bIsWrapped ) );
+ xProps->setPropertyValue( rtl::OUString( "IsTextWrapped" ), uno::Any( bIsWrapped ) );
}
uno::Any
@@ -2806,7 +2806,7 @@ ScVbaRange::getWrapText() throw (script::BasicErrorException, uno::RuntimeExcept
return aNULL();
uno::Reference< beans::XPropertySet > xProps(mxRange, ::uno::UNO_QUERY_THROW );
- uno::Any aValue = xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsTextWrapped" ) ) );
+ uno::Any aValue = xProps->getPropertyValue( rtl::OUString( "IsTextWrapped" ) );
return aValue;
}
@@ -2847,7 +2847,7 @@ ScVbaRange::Range( const uno::Any &Cell1, const uno::Any &Cell2, bool bForceUseI
if( !Cell1.hasValue() )
throw uno::RuntimeException(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " Invalid Argument " ) ),
+ rtl::OUString( " Invalid Argument " ),
uno::Reference< XInterface >() );
table::CellRangeAddress resultAddress;
@@ -2998,7 +2998,7 @@ void SAL_CALL
ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, const uno::Any& SkipBlanks, const uno::Any& Transpose ) throw (::com::sun::star::uno::RuntimeException)
{
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("That command cannot be used on multiple selections" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "That command cannot be used on multiple selections" ), uno::Reference< uno::XInterface >() );
ScDocShell* pShell = getScDocShell();
uno::Reference< frame::XModel > xModel( ( pShell ? pShell->GetModel() : NULL ), uno::UNO_QUERY_THROW );
@@ -3131,7 +3131,7 @@ ScVbaRange::getHidden() throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xProps = getRowOrColumnProps( mxRange, mbIsRows );
if ( !( xProps->getPropertyValue( ISVISIBLE ) >>= bIsVisible ) )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to get IsVisible property")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to get IsVisible property"), uno::Reference< uno::XInterface >() );
}
catch( const uno::Exception& e )
{
@@ -3181,7 +3181,7 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
// sanity check required params
if ( What.isEmpty() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, missing params" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, missing params" ) , uno::Reference< uno::XInterface >() );
rtl::OUString sWhat = VBAToRegexp( What);
// #TODO #FIXME SearchFormat & ReplacesFormat are not processed
// What do we do about MatchByte.. we don't seem to support that
@@ -3199,7 +3199,7 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
xReplace->createReplaceDescriptor();
xDescriptor->setSearchString( sWhat);
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHREGEXP ) ), uno::makeAny( sal_True ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHREGEXP ), uno::makeAny( sal_True ) );
xDescriptor->setReplaceString( Replacement);
if ( LookAt.hasValue() )
{
@@ -3211,11 +3211,11 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
else if ( nLook == excel::XlLookAt::xlWhole )
bSearchWords = sal_True;
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for LookAt" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, illegal value for LookAt" ) , uno::Reference< uno::XInterface >() );
// set global search props ( affects the find dialog
// and of course the defaults for this method
newOptions.SetWordOnly( bSearchWords );
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHWORDS ) ), uno::makeAny( bSearchWords ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHWORDS ), uno::makeAny( bSearchWords ) );
}
// sets SearchByRow ( true for Rows )
if ( SearchOrder.hasValue() )
@@ -3227,16 +3227,16 @@ ScVbaRange::Replace( const ::rtl::OUString& What, const ::rtl::OUString& Replace
else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
bSearchByRow = sal_True;
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for SearchOrder" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, illegal value for SearchOrder" ) , uno::Reference< uno::XInterface >() );
newOptions.SetRowDirection( bSearchByRow );
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHBYROW ) ), uno::makeAny( bSearchByRow ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHBYROW ), uno::makeAny( bSearchByRow ) );
}
if ( MatchCase.hasValue() )
{
// SearchCaseSensitive
MatchCase >>= bMatchCase;
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHCASE ) ), uno::makeAny( bMatchCase ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHCASE ), uno::makeAny( bMatchCase ) );
}
ScGlobal::SetSearchItem( newOptions );
@@ -3270,7 +3270,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
if( What >>= sWhat )
{
if( sWhat.isEmpty() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Find, missing params" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Find, missing params" ) , uno::Reference< uno::XInterface >() );
}
else if( What >>= nWhat )
{
@@ -3281,7 +3281,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
sWhat = rtl::OUString::valueOf( fWhat );
}
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Find, missing params" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Find, missing params" ) , uno::Reference< uno::XInterface >() );
rtl::OUString sSearch = VBAToRegexp( sWhat );
@@ -3296,7 +3296,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
{
uno::Reference< util::XSearchDescriptor > xDescriptor = xSearch->createSearchDescriptor();
xDescriptor->setSearchString( sSearch );
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHREGEXP ) ), uno::Any( true ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHREGEXP ), uno::Any( true ) );
uno::Reference< excel::XRange > xAfterRange;
uno::Reference< table::XCellRange > xStartCell;
@@ -3304,10 +3304,10 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
{
// After must be a single cell in the range
if( xAfterRange->getCount() > 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("After must be a single cell." )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "After must be a single cell." ) , uno::Reference< uno::XInterface >() );
uno::Reference< excel::XRange > xCell( Cells( uno::makeAny( xAfterRange->getRow() ), uno::makeAny( xAfterRange->getColumn() ) ), uno::UNO_QUERY );
if( !xCell.is() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("After must be in range." )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "After must be in range." ) , uno::Reference< uno::XInterface >() );
xStartCell.set( xAfterRange->getCellRange(), uno::UNO_QUERY_THROW );
}
@@ -3330,10 +3330,10 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
nSearchType = SVX_SEARCHIN_VALUE;
break;
default:
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for LookIn." )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, illegal value for LookIn." ) , uno::Reference< uno::XInterface >() );
}
newOptions.SetCellType( nSearchType );
- xDescriptor->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SearchType" )), uno::makeAny( nSearchType ) );
+ xDescriptor->setPropertyValue( rtl::OUString( "SearchType" ), uno::makeAny( nSearchType ) );
}
}
@@ -3347,9 +3347,9 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
else if ( nLookAt == excel::XlLookAt::xlWhole )
bSearchWords = sal_True;
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for LookAt" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, illegal value for LookAt" ) , uno::Reference< uno::XInterface >() );
newOptions.SetWordOnly( bSearchWords );
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHWORDS ) ), uno::makeAny( bSearchWords ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHWORDS ), uno::makeAny( bSearchWords ) );
}
// SearchOrder
@@ -3362,10 +3362,10 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
bSearchByRow = sal_True;
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for SearchOrder" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, illegal value for SearchOrder" ) , uno::Reference< uno::XInterface >() );
newOptions.SetRowDirection( bSearchByRow );
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHBYROW ) ), uno::makeAny( bSearchByRow ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHBYROW ), uno::makeAny( bSearchByRow ) );
}
// SearchDirection
@@ -3380,9 +3380,9 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
else if( nSearchDirection == excel::XlSearchDirection::xlPrevious )
bSearchBackwards = sal_True;
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for SearchDirection" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, illegal value for SearchDirection" ) , uno::Reference< uno::XInterface >() );
newOptions.SetBackward( bSearchBackwards );
- xDescriptor->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SearchBackwards" )), uno::makeAny( bSearchBackwards ) );
+ xDescriptor->setPropertyValue( rtl::OUString( "SearchBackwards" ), uno::makeAny( bSearchBackwards ) );
}
}
@@ -3392,9 +3392,9 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
{
// SearchCaseSensitive
if( !( MatchCase >>= bMatchCase ) )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Range::Replace, illegal value for MatchCase" )) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Range::Replace, illegal value for MatchCase" ) , uno::Reference< uno::XInterface >() );
}
- xDescriptor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_SRCHCASE ) ), uno::makeAny( bMatchCase ) );
+ xDescriptor->setPropertyValue( rtl::OUString( SC_UNO_SRCHCASE ), uno::makeAny( bMatchCase ) );
// MatchByte
// SearchFormat
@@ -3439,11 +3439,11 @@ uno::Reference< table::XCellRange > processKey( const uno::Any& Key, uno::Refere
rtl::OUString sRangeName = ::comphelper::getString( Key );
table::CellRangeAddress aRefAddr;
if ( !pDocSh )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Range::Sort no docshell to calculate key param")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("Range::Sort no docshell to calculate key param"), uno::Reference< uno::XInterface >() );
xKeyRange = getRangeForName( xContext, sRangeName, pDocSh, aRefAddr );
}
else
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Range::Sort illegal type value for key param")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("Range::Sort illegal type value for key param"), uno::Reference< uno::XInterface >() );
uno::Reference< table::XCellRange > xKey;
xKey.set( xKeyRange->getCellRange(), uno::UNO_QUERY_THROW );
return xKey;
@@ -3461,7 +3461,7 @@ const rtl::OUString& sPropName ) throw( uno::RuntimeException )
if ( pProp->Name.equals( sPropName ) )
return count;
if ( count == nItems )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Range::Sort unknown sort property")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("Range::Sort unknown sort property"), uno::Reference< uno::XInterface >() );
return -1; //should never reach here ( satisfy compiler )
}
@@ -3497,7 +3497,7 @@ void updateTableSortField( const uno::Reference< table::XCellRange >& xParentRan
aTableField.IsAscending = false;
}
else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Illegal Key param" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Illegal Key param" ), uno::Reference< uno::XInterface >() );
}
@@ -3507,7 +3507,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
{
// #TODO# #FIXME# can we do something with Type
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("That command cannot be used on multiple selections" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "That command cannot be used on multiple selections" ), uno::Reference< uno::XInterface >() );
sal_Int16 nDataOption1 = excel::XlSortDataOption::xlSortNormal;
sal_Int16 nDataOption2 = excel::XlSortDataOption::xlSortNormal;
@@ -3515,7 +3515,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
ScDocument* pDoc = getScDocument();
if ( !pDoc )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to access document from shell" ), uno::Reference< uno::XInterface >() );
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisRangeAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
@@ -3645,7 +3645,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
ScDocShell* pDocShell = getScDocShell();
xKey1 = processKey( Key1, mxContext, pDocShell );
if ( !xKey1.is() )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Range::Sort needs a key1 param")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("Range::Sort needs a key1 param"), uno::Reference< uno::XInterface >() );
if ( Key2.hasValue() )
xKey2 = processKey( Key2, mxContext, pDocShell );
@@ -3654,7 +3654,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
uno::Reference< util::XSortable > xSort( mxRange, uno::UNO_QUERY_THROW );
uno::Sequence< beans::PropertyValue > sortDescriptor = xSort->createSortDescriptor();
- sal_Int32 nTableSortFieldIndex = findSortPropertyIndex( sortDescriptor, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("SortFields") ) );
+ sal_Int32 nTableSortFieldIndex = findSortPropertyIndex( sortDescriptor, rtl::OUString( "SortFields" ) );
uno::Sequence< table::TableSortField > sTableFields(1);
sal_Int32 nTableIndex = 0;
@@ -3672,7 +3672,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
}
sortDescriptor[ nTableSortFieldIndex ].Value <<= sTableFields;
- sal_Int32 nIndex = findSortPropertyIndex( sortDescriptor, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsSortColumns")) );
+ sal_Int32 nIndex = findSortPropertyIndex( sortDescriptor, rtl::OUString("IsSortColumns") );
sortDescriptor[ nIndex ].Value <<= bIsSortColumns;
nIndex = findSortPropertyIndex( sortDescriptor, CONTS_HEADER );
@@ -3722,7 +3722,7 @@ ScVbaRange::End( ::sal_Int32 Direction ) throw (uno::RuntimeException)
nMoveX = 1;
break;
default:
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid Direction" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( ::rtl::OUString( "Invalid Direction" ), uno::Reference< uno::XInterface >() );
}
if ( pDoc )
@@ -3749,11 +3749,11 @@ uno::Reference< excel::XCharacters > SAL_CALL
ScVbaRange::characters( const uno::Any& Start, const uno::Any& Length ) throw (uno::RuntimeException)
{
if ( !isSingleCellRange() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can't create Characters property for multicell range ") ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can't create Characters property for multicell range " ), uno::Reference< uno::XInterface >() );
uno::Reference< text::XSimpleText > xSimple(mxRange->getCellByPosition(0,0) , uno::UNO_QUERY_THROW );
ScDocument* pDoc = excel::GetDocumentFromRange(mxRange);
if ( !pDoc )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from shell" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to access document from shell" ), uno::Reference< uno::XInterface >() );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
return new ScVbaCharacters( this, mxContext, aPalette, xSimple, Start, Length );
@@ -3788,7 +3788,7 @@ ScVbaRange::Delete( const uno::Any& Shift ) throw (uno::RuntimeException)
mode = sheet::CellDeleteMode_LEFT;
break;
default:
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ("Illegal paramater ") ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Illegal paramater " ), uno::Reference< uno::XInterface >() );
}
}
else
@@ -3840,7 +3840,7 @@ ScVbaRange::createEnumeration() throw (uno::RuntimeException)
::rtl::OUString SAL_CALL
ScVbaRange::getDefaultMethodName( ) throw (uno::RuntimeException)
{
- const static rtl::OUString sName( RTL_CONSTASCII_USTRINGPARAM("Item") );
+ const static rtl::OUString sName( "Item" );
return sName;
}
@@ -3878,9 +3878,9 @@ ScVbaRange::getCalcRowHeight( const table::CellRangeAddress& rAddress ) throw (u
// return Char Width in points
double getDefaultCharWidth( const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException )
{
- const static rtl::OUString sDflt( RTL_CONSTASCII_USTRINGPARAM("Default"));
- const static rtl::OUString sCharFontName( RTL_CONSTASCII_USTRINGPARAM("CharFontName"));
- const static rtl::OUString sPageStyles( RTL_CONSTASCII_USTRINGPARAM("PageStyles"));
+ const static rtl::OUString sDflt( "Default");
+ const static rtl::OUString sCharFontName( "CharFontName");
+ const static rtl::OUString sPageStyles( "PageStyles");
// get the font from the default style
uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( xModel, uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xNameAccess( xStyleSupplier->getStyleFamilies(), uno::UNO_QUERY_THROW );
@@ -4019,7 +4019,7 @@ uno::Reference< excel::XRange >
ScVbaRange::getArea( sal_Int32 nIndex ) throw( css::uno::RuntimeException )
{
if ( !m_Areas.is() )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No areas available")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("No areas available"), uno::Reference< uno::XInterface >() );
uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( ++nIndex ), uno::Any() ), uno::UNO_QUERY_THROW );
return xRange;
}
@@ -4314,7 +4314,7 @@ ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xC
Cell1 >>= sRangeName;
if ( Cell1.hasValue() && !Cell2.hasValue() && !sRangeName.isEmpty() )
{
- const static rtl::OUString sNamedRanges( RTL_CONSTASCII_USTRINGPARAM("NamedRanges"));
+ const static rtl::OUString sNamedRanges( "NamedRanges");
uno::Reference< beans::XPropertySet > xPropSet( getCurrentExcelDoc(xContext), uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xNamed( xPropSet->getPropertyValue( sNamedRanges ), uno::UNO_QUERY_THROW );
@@ -4441,7 +4441,7 @@ void lcl_setTableFieldsFromCriteria( rtl::OUString& sCriteria1, uno::Reference<
sCriteria1 = VBAToRegexp( sCriteria1 );
// UseRegularExpressions
if ( xDescProps.is() )
- xDescProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UseRegularExpressions" ) ), uno::Any( sal_True ) );
+ xDescProps->setPropertyValue( rtl::OUString( "UseRegularExpressions" ), uno::Any( sal_True ) );
}
}
@@ -4456,7 +4456,7 @@ void lcl_setTableFieldsFromCriteria( rtl::OUString& sCriteria1, uno::Reference<
sCriteria1 = VBAToRegexp( sCriteria1 );
// UseRegularExpressions
if ( xDescProps.is() )
- xDescProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UseRegularExpressions" ) ), uno::Any( sal_True ) );
+ xDescProps->setPropertyValue( rtl::OUString( "UseRegularExpressions" ), uno::Any( sal_True ) );
}
}
else if ( ( nPos = sCriteria1.indexOf( GREATERTHAN ) ) == 0 )
@@ -4530,7 +4530,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
if ( pRange )
{
if ( pRange->isSingleCellRange() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can't create AutoFilter") ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can't create AutoFilter" ), uno::Reference< uno::XInterface >() );
RangeHelper currentRegion( pRange->mxRange );
autoFiltAddress = currentRegion.getCellRangeAddressable()->getRangeAddress();
}
@@ -4565,18 +4565,18 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
xDataBaseRange.set( xDBRanges->getByTable(nSheet ), uno::UNO_QUERY_THROW );
}
if ( !xDataBaseRange.is() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Failed to find the autofilter placeholder range" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to find the autofilter placeholder range" ), uno::Reference< uno::XInterface >() );
uno::Reference< beans::XPropertySet > xDBRangeProps( xDataBaseRange, uno::UNO_QUERY_THROW );
// set autofilt
- xDBRangeProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoFilter") ), uno::Any(sal_True) );
+ xDBRangeProps->setPropertyValue( rtl::OUString( "AutoFilter" ), uno::Any(sal_True) );
// set header
uno::Reference< beans::XPropertySet > xFiltProps( xDataBaseRange->getFilterDescriptor(), uno::UNO_QUERY_THROW );
sal_Bool bHasColHeader = false;
ScDocument* pDoc = pShell ? pShell->GetDocument() : NULL;
bHasColHeader = pDoc->HasColHeader( static_cast< SCCOL >( autoFiltAddress.StartColumn ), static_cast< SCROW >( autoFiltAddress.StartRow ), static_cast< SCCOL >( autoFiltAddress.EndColumn ), static_cast< SCROW >( autoFiltAddress.EndRow ), static_cast< SCTAB >( autoFiltAddress.Sheet ) ) ? sal_True : false;
- xFiltProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ContainsHeader") ), uno::Any( bHasColHeader ) );
+ xFiltProps->setPropertyValue( rtl::OUString( "ContainsHeader" ), uno::Any( bHasColHeader ) );
}
@@ -4690,7 +4690,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
nConn = sheet::FilterConnection_AND;
break;
default:
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UnknownOption") ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "UnknownOption" ), uno::Reference< uno::XInterface >() );
}
@@ -4757,7 +4757,7 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
if( xSheetFilterDescriptor.is() )
xSheetFilterDescriptor->setFilterFields2( uno::Sequence< sheet::TableFilterField2 >() );
}
- xDBRangeProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoFilter") ), uno::Any(!bHasAuto) );
+ xDBRangeProps->setPropertyValue( rtl::OUString( "AutoFilter" ), uno::Any(!bHasAuto) );
}
}
@@ -4785,7 +4785,7 @@ ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& /*CopyOrigin*/ ) thro
mode = sheet::CellInsertMode_DOWN;
break;
default:
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ("Illegal paramater ") ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Illegal paramater " ), uno::Reference< uno::XInterface >() );
}
}
else
@@ -4869,7 +4869,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( Destination.hasValue() )
{
if( !( Destination >>= xRange ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Destination parameter should be a range" )),
+ throw uno::RuntimeException( rtl::OUString( "Destination parameter should be a range" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set range");
}
@@ -4884,7 +4884,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if ( DataType.hasValue() )
{
if( !( DataType >>= xlTextParsingType ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DataType parameter should be a short" )),
+ throw uno::RuntimeException( rtl::OUString( "DataType parameter should be a short" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Datatype" );
}
@@ -4894,7 +4894,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( TextQualifier.hasValue() )
{
if( !( TextQualifier >>= xlTextQualifier ))
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "TextQualifier parameter should be a short" )),
+ throw uno::RuntimeException( rtl::OUString( "TextQualifier parameter should be a short" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set TextQualifier");
}
@@ -4903,7 +4903,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( ConsecutiveDelimiter.hasValue() )
{
if( !( ConsecutiveDelimiter >>= bConsecutiveDelimiter ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ConsecutiveDelimiter parameter should be a boolean" )),
+ throw uno::RuntimeException( rtl::OUString( "ConsecutiveDelimiter parameter should be a boolean" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set ConsecutiveDelimiter");
}
@@ -4912,7 +4912,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( Tab.hasValue() && bDilimited )
{
if( !( Tab >>= bTab ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Tab parameter should be a boolean" )),
+ throw uno::RuntimeException( rtl::OUString( "Tab parameter should be a boolean" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Tab");
}
@@ -4921,7 +4921,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( Semicolon.hasValue() && bDilimited )
{
if( !( Semicolon >>= bSemicolon ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Semicolon parameter should be a boolean" )),
+ throw uno::RuntimeException( rtl::OUString( "Semicolon parameter should be a boolean" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Semicolon");
}
@@ -4929,7 +4929,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( Comma.hasValue() && bDilimited )
{
if( !( Comma >>= bComma ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Comma parameter should be a boolean" )),
+ throw uno::RuntimeException( rtl::OUString( "Comma parameter should be a boolean" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Comma");
}
@@ -4937,7 +4937,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( Space.hasValue() && bDilimited )
{
if( !( Space >>= bSpace ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Space parameter should be a boolean" )),
+ throw uno::RuntimeException( rtl::OUString( "Space parameter should be a boolean" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set Space");
}
@@ -4949,12 +4949,12 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
{
if( OtherChar.hasValue() )
if( !( OtherChar >>= sOtherChar ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OtherChar parameter should be a String" )),
+ throw uno::RuntimeException( rtl::OUString( "OtherChar parameter should be a String" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set OtherChar" );
}
else if( bOther )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Other parameter should be a True" )),
+ throw uno::RuntimeException( rtl::OUString( "Other parameter should be a True" ),
uno::Reference< uno::XInterface >() );
}
// FieldInfo, Optional Variant. An array containing parse information for the individual columns of data.
@@ -4969,7 +4969,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( DecimalSeparator.hasValue() )
{
if( !( DecimalSeparator >>= sDecimalSeparator ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DecimalSeparator parameter should be a String" )),
+ throw uno::RuntimeException( rtl::OUString( "DecimalSeparator parameter should be a String" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set DecimalSeparator" );
}
@@ -4977,7 +4977,7 @@ ScVbaRange::TextToColumns( const css::uno::Any& Destination, const css::uno::Any
if( ThousandsSeparator.hasValue() )
{
if( !( ThousandsSeparator >>= sThousandsSeparator ) )
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ThousandsSeparator parameter should be a String" )),
+ throw uno::RuntimeException( rtl::OUString( "ThousandsSeparator parameter should be a String" ),
uno::Reference< uno::XInterface >() );
OSL_TRACE("set ThousandsSpeparator" );
}
@@ -5095,7 +5095,7 @@ ScVbaRange::Hyperlinks( const uno::Any& aIndex ) throw (uno::RuntimeException)
uno::Reference< excel::XHyperlinks > xSheetHlinks( xWorksheet->Hyperlinks( uno::Any() ), uno::UNO_QUERY_THROW );
ScVbaHyperlinksRef xScSheetHlinks( dynamic_cast< ScVbaHyperlinks* >( xSheetHlinks.get() ) );
if( !xScSheetHlinks.is() )
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cannot obtain hyperlinks implementation object" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( ::rtl::OUString( "Cannot obtain hyperlinks implementation object" ), uno::Reference< uno::XInterface >() );
// create a new local hyperlinks object based on the sheet hyperlinks
ScVbaHyperlinksRef xHlinks( new ScVbaHyperlinks( getParent(), mxContext, xScSheetHlinks, getScRangeList() ) );
@@ -5200,7 +5200,7 @@ uno::Any SAL_CALL ScVbaRange::getPrefixCharacter() throw (uno::RuntimeException)
return lclGetPrefixVariant( lclGetPrefixChar( mxRange ) );
if( mxRanges.is() )
return lclGetPrefixVariant( lclGetPrefixChar( mxRanges ) );
- throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unexpected empty Range object" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( ::rtl::OUString( "Unexpected empty Range object" ), uno::Reference< uno::XInterface >() );
}
uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
@@ -5209,7 +5209,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
// In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception
if( m_Areas->getCount() > 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not get Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can not get Range.ShowDetail attribute "), uno::Reference< uno::XInterface >() );
sal_Bool bShowDetail = false;
@@ -5241,7 +5241,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException)
}
else
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can not set Range.ShowDetail attribute "), uno::Reference< uno::XInterface >() );
}
return aNULL();
}
@@ -5252,7 +5252,7 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru
// In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception
if( m_Areas->getCount() > 1 )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can not set Range.ShowDetail attribute "), uno::Reference< uno::XInterface >() );
bool bShowDetail = extractBoolFromAny( aShowDetail );
@@ -5277,7 +5277,7 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru
}
else
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Can not set Range.ShowDetail attribute "), uno::Reference< uno::XInterface >() );
}
}
@@ -5360,9 +5360,9 @@ throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::Run
Data >>= xIntRes;
uno::Reference< script::XInvocation > xInvRes(xIntRes, uno::UNO_QUERY_THROW);
- rtl::OUString oMoveNext(RTL_CONSTASCII_USTRINGPARAM("MoveNext")) ;
- rtl::OUString oEof(RTL_CONSTASCII_USTRINGPARAM("EOF")) ;
- rtl::OUString oFields(RTL_CONSTASCII_USTRINGPARAM("Fields")) ;
+ rtl::OUString oMoveNext("MoveNext") ;
+ rtl::OUString oEof("EOF") ;
+ rtl::OUString oFields("Fields") ;
if( !xInvRes->hasMethod(oMoveNext))
{
@@ -5373,7 +5373,7 @@ throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::Run
aRet = xInvRes->getValue(oFields);
aRet >>= xIntFields;
uno::Reference< script::XInvocation > xInvFields(xIntFields, uno::UNO_QUERY_THROW);
- aRet = xInvFields->getValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Count"))) ;
+ aRet = xInvFields->getValue( rtl::OUString("Count")) ;
aRet >>= lColCnt;
//Set the assign column number
@@ -5401,12 +5401,12 @@ throw (::com::sun::star::script::BasicErrorException, ::com::sun::star::uno::Run
nCol = l;
aPar <<= nCol;
//get every field
- aRet = xInvFields->invoke( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Item")), uno::Sequence< uno::Any >(&aPar,1) , aOutParamIndex,aOutParam);
+ aRet = xInvFields->invoke( rtl::OUString("Item"), uno::Sequence< uno::Any >(&aPar,1) , aOutParamIndex,aOutParam);
aRet >>= xIntFld;
uno::Reference< script::XInvocation > xInvFld(xIntFld, uno::UNO_QUERY_THROW); //Get the Field obj
//set the field value
- aRet = xInvFld->getValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")) );
+ aRet = xInvFld->getValue( rtl::OUString("Value") );
uno::Reference< excel::XRange > xRngToFill = xRngPos->Offset(aCrrRow,aCrrCol );
xRngToFill->setValue(aRet);
@@ -5568,7 +5568,7 @@ ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const
eCmd = FILL_GROWTH;
break;
case excel::XlAutoFillType::xlFillFormats:
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "xlFillFormat not supported for AutoFill" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "xlFillFormat not supported for AutoFill" ), uno::Reference< uno::XInterface >() );
case excel::XlAutoFillType::xlFillValues:
case excel::XlAutoFillType::xlFillSeries:
case excel::XlAutoFillType::xlLinearTrend:
@@ -6086,17 +6086,17 @@ uno::Any SAL_CALL ScVbaRange::AdvancedFilter( sal_Int32 Action, const uno::Any&
ScDocument* pDoc = getScDocument();
if ( !pDoc )
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Failed to access document from range" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Failed to access document from range" ), uno::Reference< uno::XInterface >() );
}
// Action
if ( Action != excel::XlFilterAction::xlFilterInPlace && Action != excel::XlFilterAction::xlFilterCopy )
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Invalid input parameter" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Invalid input parameter" ), uno::Reference< uno::XInterface >() );
}
if ( m_Areas->getCount() > 1 )
{
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Invalid range" ) ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString( "Invalid range" ), uno::Reference< uno::XInterface >() );
}
sal_Bool bCopyOut = ( Action != excel::XlFilterAction::xlFilterInPlace );
@@ -6156,7 +6156,7 @@ uno::Any SAL_CALL ScVbaRange::AdvancedFilter( sal_Int32 Action, const uno::Any&
uno::Reference< beans::XPropertySet > xPropertySet( xFilterDesc, uno::UNO_QUERY );
if ( xPropertySet.is() )
{
- xPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_COPYOUT ) ), uno::makeAny( bCopyOut ) );
+ xPropertySet->setPropertyValue( rtl::OUString( SC_UNONAME_COPYOUT ), uno::makeAny( bCopyOut ) );
}
// CopyToRange
@@ -6173,7 +6173,7 @@ uno::Any SAL_CALL ScVbaRange::AdvancedFilter( sal_Int32 Action, const uno::Any&
ScUnoConversion::FillScRange( refRange, getCellRangeAddressForVBARange( CopyToRange, getScDocShell(), aTmpConv ) );
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getScDocShell(), refRange ) );
uno::Reference< sheet::XCellAddressable > xCellAddr( xRange->getCellByPosition( 0, 0 ), uno::UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_OUTPOS ) ), uno::makeAny( xCellAddr->getCellAddress() ) );
+ xPropertySet->setPropertyValue( rtl::OUString( SC_UNONAME_OUTPOS ), uno::makeAny( xCellAddr->getCellAddress() ) );
}
// Unique
@@ -6189,7 +6189,7 @@ uno::Any SAL_CALL ScVbaRange::AdvancedFilter( sal_Int32 Action, const uno::Any&
catch( const uno::Exception& )
{
}
- xPropertySet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_SKIPDUP ) ), aUnique );
+ xPropertySet->setPropertyValue( rtl::OUString( SC_UNONAME_SKIPDUP ), aUnique );
}
// Do filter.
@@ -6255,7 +6255,7 @@ ScVbaRange::PivotTable() throw (uno::RuntimeException)
rtl::OUString
ScVbaRange::getServiceImplName()
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaRange"));
+ return rtl::OUString("ScVbaRange");
}
uno::Sequence< rtl::OUString >
@@ -6265,7 +6265,7 @@ ScVbaRange::getServiceNames()
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Range" ) );
+ aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.excel.Range" );
}
return aServiceNames;
}
@@ -6277,7 +6277,7 @@ ScVbaRange::hasError() throw (uno::RuntimeException)
uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
uno::Reference< script::XInvocation > xInvoc( xApplication->WorksheetFunction(), uno::UNO_QUERY_THROW );
- static rtl::OUString FunctionName( RTL_CONSTASCII_USTRINGPARAM("IsError" ) );
+ static rtl::OUString FunctionName( "IsError" );
uno::Sequence< uno::Any > Params(1);
uno::Reference< excel::XRange > aRange( this );
Params[0] = uno::makeAny( aRange );
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 7c650c42b9d3..1588e4080c84 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1596,7 +1596,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
Reference< ui::dialogs::XExecutableDialog > xDialog(
xMCF->createInstanceWithContext(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ChineseTranslationDialog"))
+ rtl::OUString("com.sun.star.linguistic2.ChineseTranslationDialog")
, xContext), UNO_QUERY);
Reference< lang::XInitialization > xInit( xDialog, UNO_QUERY );
if( xInit.is() )
@@ -1606,7 +1606,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
Sequence<Any> aSeq(1);
Any* pArray = aSeq.getArray();
PropertyValue aParam;
- aParam.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow"));
+ aParam.Name = rtl::OUString("ParentWindow");
aParam.Value <<= makeAny(xDialogParentWindow);
pArray[0] <<= makeAny(aParam);
xInit->initialize( aSeq );
@@ -1624,9 +1624,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
try
{
- xProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDirectionToSimplified")) ) >>= bToSimplified;
- xProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsUseCharacterVariants")) ) >>= bUseVariants;
- xProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsTranslateCommonTerms")) ) >>= bCommonTerms;
+ xProp->getPropertyValue( rtl::OUString("IsDirectionToSimplified") ) >>= bToSimplified;
+ xProp->getPropertyValue( rtl::OUString("IsUseCharacterVariants") ) >>= bUseVariants;
+ xProp->getPropertyValue( rtl::OUString("IsTranslateCommonTerms") ) >>= bCommonTerms;
}
catch( Exception& )
{
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index a5f44a8b4266..3021062c47ef 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -225,7 +225,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
uno::Reference<frame::XFrame> xFrame = pViewFrame->GetFrame().GetFrameInterface();
uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_beamer")),
+ rtl::OUString("_beamer"),
frame::FrameSearchFlag::CHILDREN);
if ( xBeamerFrame.is() )
bWasOpen = sal_True;
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index dc75138a9120..98ac6655ded8 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -367,7 +367,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xInfo;
xStyles->getByName( pNameItem->GetValue() ) >>= xInfo;
::rtl::OUString aUIName;
- xInfo->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName")) ) >>= aUIName;
+ xInfo->getPropertyValue( ::rtl::OUString("DisplayName") ) >>= aUIName;
if ( !aUIName.isEmpty() )
rReq.AppendItem( SfxStringItem( SID_STYLE_APPLY, aUIName ) );
}
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index bf3402c32e4e..24a37cfa12fc 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -465,7 +465,7 @@ void ScGridWindow::DPLaunchFieldPopupMenu(
const ScDPLabelData& rLabelData = pDPData->maLabels;
mpDPFieldPopup.reset(new ScCheckListMenuWindow(this, pViewData->GetDocument()));
- mpDPFieldPopup->setName(OUString(RTL_CONSTASCII_USTRINGPARAM("DataPilot field member popup")));
+ mpDPFieldPopup->setName(OUString("DataPilot field member popup"));
mpDPFieldPopup->setExtendedData(pDPData.release());
mpDPFieldPopup->setOKAction(new DPFieldPopupOKAction(this));
{
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 86f3315bf5cb..adc5208567a3 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -954,14 +954,14 @@ void ScPreviewShell::WriteUserDataSequence(uno::Sequence < beans::PropertyValue
if(pSeq)
{
sal_uInt16 nViewID(GetViewFrame()->GetCurViewId());
- pSeq[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_VIEWID));
- rtl::OUStringBuffer sBuffer(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_VIEW)));
+ pSeq[0].Name = rtl::OUString(SC_VIEWID);
+ rtl::OUStringBuffer sBuffer(rtl::OUString(SC_VIEW));
::sax::Converter::convertNumber(sBuffer,
static_cast<sal_Int32>(nViewID));
pSeq[0].Value <<= sBuffer.makeStringAndClear();
- pSeq[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_ZOOMVALUE));
+ pSeq[1].Name = rtl::OUString(SC_ZOOMVALUE);
pSeq[1].Value <<= sal_Int32 (pPreview->GetZoom());
- pSeq[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PageNumber"));
+ pSeq[2].Name = rtl::OUString("PageNumber");
pSeq[2].Value <<= pPreview->GetPageNo();
}
}
diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx
index 43ccf1ce8c79..6e6fad45cdf9 100644
--- a/sc/source/ui/view/tabvwshg.cxx
+++ b/sc/source/ui/view/tabvwshg.cxx
@@ -86,26 +86,26 @@ void ScTabViewShell::InsertURLButton( const String& rName, const String& rURL,
uno::Any aAny;
aAny <<= rtl::OUString(rName);
- xPropSet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Label" )), aAny );
+ xPropSet->setPropertyValue( rtl::OUString( "Label" ), aAny );
::rtl::OUString aTmp = INetURLObject::GetAbsURL( pDoc->GetDocumentShell()->GetMedium()->GetBaseURL(), rURL );
aAny <<= aTmp;
- xPropSet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "TargetURL" )), aAny );
+ xPropSet->setPropertyValue( rtl::OUString( "TargetURL" ), aAny );
if( rTarget.Len() )
{
aAny <<= rtl::OUString(rTarget);
- xPropSet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "TargetFrame" )), aAny );
+ xPropSet->setPropertyValue( rtl::OUString( "TargetFrame" ), aAny );
}
form::FormButtonType eButtonType = form::FormButtonType_URL;
aAny <<= eButtonType;
- xPropSet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ButtonType" )), aAny );
+ xPropSet->setPropertyValue( rtl::OUString( "ButtonType" ), aAny );
if ( ::avmedia::MediaWindow::isMediaURL( rURL ) )
{
aAny <<= sal_True;
- xPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DispatchURLInternal" )), aAny );
+ xPropSet->setPropertyValue( rtl::OUString( "DispatchURLInternal" ), aAny );
}
Point aPos;