Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
541dcc5b
Kaydet (Commit)
541dcc5b
authored
May 04, 2014
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
OUString: remove temporaries and concatenated appends, constify
Change-Id: Iea37617435e69a51bb0d70740092f0489f58e41a
üst
84eda0e6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
55 deletions
+42
-55
unotbl.cxx
sw/source/core/unocore/unotbl.cxx
+42
-55
No files found.
sw/source/core/unocore/unotbl.cxx
Dosyayı görüntüle @
541dcc5b
...
@@ -279,7 +279,7 @@ static uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimp
...
@@ -279,7 +279,7 @@ static uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimp
sPDesc
=
SwStyleNameMapper
::
GetProgName
(
pDsc
->
GetName
(),
nsSwGetPoolIdFromName
::
GET_POOLID_PAGEDESC
);
sPDesc
=
SwStyleNameMapper
::
GetProgName
(
pDsc
->
GetName
(),
nsSwGetPoolIdFromName
::
GET_POOLID_PAGEDESC
);
}
}
}
}
aRet
<<=
OUString
(
sPDesc
)
;
aRet
<<=
sPDesc
;
}
}
break
;
break
;
...
@@ -494,12 +494,11 @@ OUString sw_GetCellName( sal_Int32 nColumn, sal_Int32 nRow )
...
@@ -494,12 +494,11 @@ OUString sw_GetCellName( sal_Int32 nColumn, sal_Int32 nRow )
}
}
#endif
#endif
OUString
sCellName
;
if
(
nColumn
<
0
||
nRow
<
0
)
if
(
nColumn
<
0
||
nRow
<
0
)
return
sCellName
;
return
OUString
();
OUString
sCellName
;
sw_GetTblBoxColStr
(
static_cast
<
sal_uInt16
>
(
nColumn
),
sCellName
);
sw_GetTblBoxColStr
(
static_cast
<
sal_uInt16
>
(
nColumn
),
sCellName
);
sCellName
+=
OUString
::
number
(
nRow
+
1
);
return
sCellName
+
OUString
::
number
(
nRow
+
1
);
return
sCellName
;
}
}
/** Find the top left or bottom right corner box in given table.
/** Find the top left or bottom right corner box in given table.
...
@@ -575,7 +574,7 @@ void SwRangeDescriptor::Normalize()
...
@@ -575,7 +574,7 @@ void SwRangeDescriptor::Normalize()
static
SwXCell
*
lcl_CreateXCell
(
SwFrmFmt
*
pFmt
,
sal_Int32
nColumn
,
sal_Int32
nRow
)
static
SwXCell
*
lcl_CreateXCell
(
SwFrmFmt
*
pFmt
,
sal_Int32
nColumn
,
sal_Int32
nRow
)
{
{
SwXCell
*
pXCell
=
0
;
SwXCell
*
pXCell
=
0
;
OUString
sCellName
=
sw_GetCellName
(
nColumn
,
nRow
);
const
OUString
sCellName
=
sw_GetCellName
(
nColumn
,
nRow
);
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
SwTableBox
*
pBox
=
(
SwTableBox
*
)
pTable
->
GetTblBox
(
sCellName
);
SwTableBox
*
pBox
=
(
SwTableBox
*
)
pTable
->
GetTblBox
(
sCellName
);
if
(
pBox
)
if
(
pBox
)
...
@@ -1098,7 +1097,7 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
...
@@ -1098,7 +1097,7 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
}
}
else
else
{
{
throw
beans
::
UnknownPropertyException
(
OUString
(
"No redline type property: "
)
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"No redline type property: "
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
}
}
}
}
else
else
...
@@ -1164,7 +1163,7 @@ uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName)
...
@@ -1164,7 +1163,7 @@ uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName)
}
}
break
;
break
;
case
FN_UNO_CELL_NAME
:
case
FN_UNO_CELL_NAME
:
aRet
<<=
OUString
(
pBox
->
GetName
()
);
aRet
<<=
pBox
->
GetName
(
);
break
;
break
;
case
FN_UNO_REDLINE_NODE_START
:
case
FN_UNO_REDLINE_NODE_START
:
case
FN_UNO_REDLINE_NODE_END
:
case
FN_UNO_REDLINE_NODE_END
:
...
@@ -1389,7 +1388,7 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, const uno:
...
@@ -1389,7 +1388,7 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, const uno:
}
}
else
else
{
{
throw
beans
::
UnknownPropertyException
(
OUString
(
"No redline type property: "
)
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"No redline type property: "
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
}
}
}
}
else
else
...
@@ -1398,7 +1397,7 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, const uno:
...
@@ -1398,7 +1397,7 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, const uno:
m_pPropSet
->
getPropertyMap
().
getByName
(
rPropertyName
);
m_pPropSet
->
getPropertyMap
().
getByName
(
rPropertyName
);
SwDoc
*
pDoc
=
pFmt
->
GetDoc
();
SwDoc
*
pDoc
=
pFmt
->
GetDoc
();
if
(
!
pEntry
)
if
(
!
pEntry
)
throw
beans
::
UnknownPropertyException
(
OUString
(
"Unknown property: "
)
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"Unknown property: "
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
if
(
pEntry
->
nFlags
&
beans
::
PropertyAttribute
::
READONLY
)
if
(
pEntry
->
nFlags
&
beans
::
PropertyAttribute
::
READONLY
)
throw
beans
::
PropertyVetoException
(
"Property is read-only: "
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
PropertyVetoException
(
"Property is read-only: "
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
...
@@ -1460,7 +1459,7 @@ uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName) throw(
...
@@ -1460,7 +1459,7 @@ uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName) throw(
const
SfxItemPropertySimpleEntry
*
pEntry
=
const
SfxItemPropertySimpleEntry
*
pEntry
=
m_pPropSet
->
getPropertyMap
().
getByName
(
rPropertyName
);
m_pPropSet
->
getPropertyMap
().
getByName
(
rPropertyName
);
if
(
!
pEntry
)
if
(
!
pEntry
)
throw
beans
::
UnknownPropertyException
(
OUString
(
"Unknown property: "
)
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"Unknown property: "
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
switch
(
pEntry
->
nWID
)
switch
(
pEntry
->
nWID
)
{
{
...
@@ -1620,7 +1619,7 @@ OUString SwXTextTableCursor::getRangeName()
...
@@ -1620,7 +1619,7 @@ OUString SwXTextTableCursor::getRangeName()
const
SwStartNode
*
pNode
=
pTblCrsr
->
GetPoint
()
->
nNode
.
GetNode
().
FindTableBoxStartNode
();
const
SwStartNode
*
pNode
=
pTblCrsr
->
GetPoint
()
->
nNode
.
GetNode
().
FindTableBoxStartNode
();
const
SwTable
*
pTable
=
SwTable
::
FindTable
(
GetFrmFmt
()
);
const
SwTable
*
pTable
=
SwTable
::
FindTable
(
GetFrmFmt
()
);
const
SwTableBox
*
pEndBox
=
pTable
->
GetTblBox
(
pNode
->
GetIndex
());
const
SwTableBox
*
pEndBox
=
pTable
->
GetTblBox
(
pNode
->
GetIndex
());
OUString
aTmp
(
pEndBox
->
GetName
()
);
aRet
=
pEndBox
->
GetName
(
);
if
(
pTblCrsr
->
HasMark
())
if
(
pTblCrsr
->
HasMark
())
{
{
...
@@ -1636,17 +1635,14 @@ OUString SwXTextTableCursor::getRangeName()
...
@@ -1636,17 +1635,14 @@ OUString SwXTextTableCursor::getRangeName()
pEndBox
=
pTmpBox
;
pEndBox
=
pTmpBox
;
}
}
aTmp
=
pStartBox
->
GetName
();
aRet
=
pStartBox
->
GetName
()
+
":"
+
pEndBox
->
GetName
();
aTmp
+=
":"
;
aTmp
+=
pEndBox
->
GetName
();
}
}
}
}
aRet
=
aTmp
;
}
}
return
aRet
;
return
aRet
;
}
}
sal_Bool
SwXTextTableCursor
::
gotoCellByName
(
const
OUString
&
CellName
,
sal_Bool
Expand
)
sal_Bool
SwXTextTableCursor
::
gotoCellByName
(
const
OUString
&
s
CellName
,
sal_Bool
Expand
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
SolarMutexGuard
aGuard
;
SolarMutexGuard
aGuard
;
...
@@ -1656,7 +1652,6 @@ sal_Bool SwXTextTableCursor::gotoCellByName(const OUString& CellName, sal_Bool E
...
@@ -1656,7 +1652,6 @@ sal_Bool SwXTextTableCursor::gotoCellByName(const OUString& CellName, sal_Bool E
{
{
SwUnoTableCrsr
*
pTblCrsr
=
dynamic_cast
<
SwUnoTableCrsr
*>
(
pUnoCrsr
);
SwUnoTableCrsr
*
pTblCrsr
=
dynamic_cast
<
SwUnoTableCrsr
*>
(
pUnoCrsr
);
lcl_CrsrSelect
(
pTblCrsr
,
Expand
);
lcl_CrsrSelect
(
pTblCrsr
,
Expand
);
OUString
sCellName
(
CellName
);
bRet
=
pTblCrsr
->
GotoTblBox
(
sCellName
);
bRet
=
pTblCrsr
->
GotoTblBox
(
sCellName
);
}
}
return
bRet
;
return
bRet
;
...
@@ -1868,7 +1863,7 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, const u
...
@@ -1868,7 +1863,7 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, const u
}
}
}
}
else
else
throw
beans
::
UnknownPropertyException
(
OUString
(
"Unknown property: "
)
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"Unknown property: "
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
}
}
}
}
...
@@ -1930,7 +1925,7 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName)
...
@@ -1930,7 +1925,7 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName)
}
}
}
}
else
else
throw
beans
::
UnknownPropertyException
(
OUString
(
"Unknown property: "
)
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"Unknown property: "
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
}
}
return
aRet
;
return
aRet
;
}
}
...
@@ -2275,7 +2270,7 @@ uno::Reference< table::XTableColumns > SwXTextTable::getColumns(void) throw( un
...
@@ -2275,7 +2270,7 @@ uno::Reference< table::XTableColumns > SwXTextTable::getColumns(void) throw( un
return
xRet
;
return
xRet
;
}
}
uno
::
Reference
<
table
::
XCell
>
SwXTextTable
::
getCellByName
(
const
OUString
&
CellName
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
uno
::
Reference
<
table
::
XCell
>
SwXTextTable
::
getCellByName
(
const
OUString
&
s
CellName
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
SolarMutexGuard
aGuard
;
SolarMutexGuard
aGuard
;
uno
::
Reference
<
table
::
XCell
>
xRet
;
uno
::
Reference
<
table
::
XCell
>
xRet
;
...
@@ -2283,7 +2278,6 @@ uno::Reference< table::XCell > SwXTextTable::getCellByName(const OUString& CellN
...
@@ -2283,7 +2278,6 @@ uno::Reference< table::XCell > SwXTextTable::getCellByName(const OUString& CellN
if
(
pFmt
)
if
(
pFmt
)
{
{
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
OUString
sCellName
(
CellName
);
SwTableBox
*
pBox
=
(
SwTableBox
*
)
pTable
->
GetTblBox
(
sCellName
);
SwTableBox
*
pBox
=
(
SwTableBox
*
)
pTable
->
GetTblBox
(
sCellName
);
if
(
pBox
)
if
(
pBox
)
{
{
...
@@ -2318,7 +2312,7 @@ uno::Sequence< OUString > SwXTextTable::getCellNames(void) throw( uno::RuntimeEx
...
@@ -2318,7 +2312,7 @@ uno::Sequence< OUString > SwXTextTable::getCellNames(void) throw( uno::RuntimeEx
return
uno
::
Sequence
<
OUString
>
();
return
uno
::
Sequence
<
OUString
>
();
}
}
uno
::
Reference
<
text
::
XTextTableCursor
>
SwXTextTable
::
createCursorByCellName
(
const
OUString
&
CellName
)
uno
::
Reference
<
text
::
XTextTableCursor
>
SwXTextTable
::
createCursorByCellName
(
const
OUString
&
s
CellName
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
SolarMutexGuard
aGuard
;
SolarMutexGuard
aGuard
;
...
@@ -2327,7 +2321,6 @@ uno::Reference< text::XTextTableCursor > SwXTextTable::createCursorByCellName(co
...
@@ -2327,7 +2321,6 @@ uno::Reference< text::XTextTableCursor > SwXTextTable::createCursorByCellName(co
if
(
pFmt
)
if
(
pFmt
)
{
{
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
OUString
sCellName
(
CellName
);
SwTableBox
*
pBox
=
(
SwTableBox
*
)
pTable
->
GetTblBox
(
sCellName
);
SwTableBox
*
pBox
=
(
SwTableBox
*
)
pTable
->
GetTblBox
(
sCellName
);
if
(
pBox
&&
pBox
->
getRowSpan
()
>
0
)
if
(
pBox
&&
pBox
->
getRowSpan
()
>
0
)
{
{
...
@@ -2394,11 +2387,10 @@ void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTex
...
@@ -2394,11 +2387,10 @@ void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTex
if
(
!
m_sTableName
.
isEmpty
())
if
(
!
m_sTableName
.
isEmpty
())
{
{
sal_uInt16
nIndex
=
1
;
sal_uInt16
nIndex
=
1
;
const
OUString
sTmpName
(
m_sTableName
);
OUString
sTmpNameIndex
(
m_sTableName
);
OUString
sTmpNameIndex
(
sTmpName
);
while
(
pDoc
->
FindTblFmtByName
(
sTmpNameIndex
,
true
)
&&
nIndex
<
USHRT_MAX
)
while
(
pDoc
->
FindTblFmtByName
(
sTmpNameIndex
,
true
)
&&
nIndex
<
USHRT_MAX
)
{
{
sTmpNameIndex
=
sTmp
Name
+
OUString
::
number
(
nIndex
++
);
sTmpNameIndex
=
m_sTable
Name
+
OUString
::
number
(
nIndex
++
);
}
}
pDoc
->
SetTableName
(
*
pTblFmt
,
sTmpNameIndex
);
pDoc
->
SetTableName
(
*
pTblFmt
,
sTmpNameIndex
);
}
}
...
@@ -2497,9 +2489,7 @@ uno::Reference< table::XCellRange > SwXTextTable::GetRangeByName(SwFrmFmt* pFmt
...
@@ -2497,9 +2489,7 @@ uno::Reference< table::XCellRange > SwXTextTable::GetRangeByName(SwFrmFmt* pFmt
{
{
SolarMutexGuard
aGuard
;
SolarMutexGuard
aGuard
;
uno
::
Reference
<
table
::
XCellRange
>
aRef
;
uno
::
Reference
<
table
::
XCellRange
>
aRef
;
OUString
sTLName
(
rTLName
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
rTLName
);
OUString
sBRName
(
rBRName
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
if
(
pTLBox
)
if
(
pTLBox
)
{
{
// invalidate all actions
// invalidate all actions
...
@@ -2510,7 +2500,7 @@ uno::Reference< table::XCellRange > SwXTextTable::GetRangeByName(SwFrmFmt* pFmt
...
@@ -2510,7 +2500,7 @@ uno::Reference< table::XCellRange > SwXTextTable::GetRangeByName(SwFrmFmt* pFmt
SwUnoCrsr
*
pUnoCrsr
=
pFmt
->
GetDoc
()
->
CreateUnoCrsr
(
aPos
,
true
);
SwUnoCrsr
*
pUnoCrsr
=
pFmt
->
GetDoc
()
->
CreateUnoCrsr
(
aPos
,
true
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
SetRemainInSection
(
false
);
pUnoCrsr
->
SetRemainInSection
(
false
);
const
SwTableBox
*
pBRBox
=
pTable
->
GetTblBox
(
s
BRName
);
const
SwTableBox
*
pBRBox
=
pTable
->
GetTblBox
(
r
BRName
);
if
(
pBRBox
)
if
(
pBRBox
)
{
{
pUnoCrsr
->
SetMark
();
pUnoCrsr
->
SetMark
();
...
@@ -2549,8 +2539,8 @@ uno::Reference< table::XCellRange > SwXTextTable::getCellRangeByPosition(sal_In
...
@@ -2549,8 +2539,8 @@ uno::Reference< table::XCellRange > SwXTextTable::getCellRangeByPosition(sal_In
aDesc
.
nBottom
=
nBottom
;
aDesc
.
nBottom
=
nBottom
;
aDesc
.
nLeft
=
nLeft
;
aDesc
.
nLeft
=
nLeft
;
aDesc
.
nRight
=
nRight
;
aDesc
.
nRight
=
nRight
;
OUString
sTLName
=
sw_GetCellName
(
aDesc
.
nLeft
,
aDesc
.
nTop
);
const
OUString
sTLName
=
sw_GetCellName
(
aDesc
.
nLeft
,
aDesc
.
nTop
);
OUString
sBRName
=
sw_GetCellName
(
aDesc
.
nRight
,
aDesc
.
nBottom
);
const
OUString
sBRName
=
sw_GetCellName
(
aDesc
.
nRight
,
aDesc
.
nBottom
);
// please note that according to the 'if' statement at the begin
// please note that according to the 'if' statement at the begin
// sTLName:sBRName already denotes the normalized range string
// sTLName:sBRName already denotes the normalized range string
...
@@ -2563,7 +2553,7 @@ uno::Reference< table::XCellRange > SwXTextTable::getCellRangeByPosition(sal_In
...
@@ -2563,7 +2553,7 @@ uno::Reference< table::XCellRange > SwXTextTable::getCellRangeByPosition(sal_In
return
aRef
;
return
aRef
;
}
}
uno
::
Reference
<
table
::
XCellRange
>
SwXTextTable
::
getCellRangeByName
(
const
OUString
&
a
Range
)
uno
::
Reference
<
table
::
XCellRange
>
SwXTextTable
::
getCellRangeByName
(
const
OUString
&
s
Range
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
SolarMutexGuard
aGuard
;
SolarMutexGuard
aGuard
;
...
@@ -2574,9 +2564,9 @@ uno::Reference< table::XCellRange > SwXTextTable::getCellRangeByName(const OUSt
...
@@ -2574,9 +2564,9 @@ uno::Reference< table::XCellRange > SwXTextTable::getCellRangeByName(const OUSt
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
if
(
!
pTable
->
IsTblComplex
())
if
(
!
pTable
->
IsTblComplex
())
{
{
OUString
sRange
(
aRange
)
;
sal_Int32
nPos
=
0
;
OUString
sTLName
(
sRange
.
getToken
(
0
,
':'
));
const
OUString
sTLName
(
sRange
.
getToken
(
0
,
':'
,
nPos
));
OUString
sBRName
(
sRange
.
getToken
(
1
,
':'
));
const
OUString
sBRName
(
sRange
.
getToken
(
0
,
':'
,
nPos
));
if
(
sTLName
.
isEmpty
()
||
sBRName
.
isEmpty
())
if
(
sTLName
.
isEmpty
()
||
sBRName
.
isEmpty
())
throw
uno
::
RuntimeException
();
throw
uno
::
RuntimeException
();
SwRangeDescriptor
aDesc
;
SwRangeDescriptor
aDesc
;
...
@@ -3029,7 +3019,7 @@ void SwXTextTable::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor
...
@@ -3029,7 +3019,7 @@ void SwXTextTable::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor
}
}
}
}
void
SwXTextTable
::
autoFormat
(
const
OUString
&
a
Name
)
void
SwXTextTable
::
autoFormat
(
const
OUString
&
sAutoFmt
Name
)
throw
(
lang
::
IllegalArgumentException
,
uno
::
RuntimeException
,
throw
(
lang
::
IllegalArgumentException
,
uno
::
RuntimeException
,
std
::
exception
)
std
::
exception
)
{
{
...
@@ -3040,8 +3030,6 @@ void SwXTextTable::autoFormat(const OUString& aName)
...
@@ -3040,8 +3030,6 @@ void SwXTextTable::autoFormat(const OUString& aName)
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
if
(
!
pTable
->
IsTblComplex
())
if
(
!
pTable
->
IsTblComplex
())
{
{
OUString
sAutoFmtName
(
aName
);
SwTableAutoFmtTbl
aAutoFmtTbl
;
SwTableAutoFmtTbl
aAutoFmtTbl
;
aAutoFmtTbl
.
Load
();
aAutoFmtTbl
.
Load
();
for
(
size_t
i
=
aAutoFmtTbl
.
size
();
i
;)
for
(
size_t
i
=
aAutoFmtTbl
.
size
();
i
;)
...
@@ -3335,7 +3323,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
...
@@ -3335,7 +3323,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
m_pPropSet
->
getPropertyMap
().
getByName
(
rPropertyName
);
m_pPropSet
->
getPropertyMap
().
getByName
(
rPropertyName
);
if
(
!
pEntry
)
if
(
!
pEntry
)
throw
beans
::
UnknownPropertyException
(
OUString
(
"Unknown property: "
)
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"Unknown property: "
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
if
(
pFmt
)
if
(
pFmt
)
{
{
...
@@ -3842,8 +3830,8 @@ uno::Reference< table::XCellRange > SwXCellRange::getCellRangeByPosition(
...
@@ -3842,8 +3830,8 @@ uno::Reference< table::XCellRange > SwXCellRange::getCellRangeByPosition(
aNewDesc
.
nLeft
=
nLeft
+
aRgDesc
.
nLeft
;
aNewDesc
.
nLeft
=
nLeft
+
aRgDesc
.
nLeft
;
aNewDesc
.
nRight
=
nRight
+
aRgDesc
.
nLeft
;
aNewDesc
.
nRight
=
nRight
+
aRgDesc
.
nLeft
;
aNewDesc
.
Normalize
();
aNewDesc
.
Normalize
();
OUString
sTLName
=
sw_GetCellName
(
aNewDesc
.
nLeft
,
aNewDesc
.
nTop
);
const
OUString
sTLName
=
sw_GetCellName
(
aNewDesc
.
nLeft
,
aNewDesc
.
nTop
);
OUString
sBRName
=
sw_GetCellName
(
aNewDesc
.
nRight
,
aNewDesc
.
nBottom
);
const
OUString
sBRName
=
sw_GetCellName
(
aNewDesc
.
nRight
,
aNewDesc
.
nBottom
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
if
(
pTLBox
)
if
(
pTLBox
)
{
{
...
@@ -3881,9 +3869,9 @@ uno::Reference< table::XCellRange > SwXCellRange::getCellRangeByName(const OUSt
...
@@ -3881,9 +3869,9 @@ uno::Reference< table::XCellRange > SwXCellRange::getCellRangeByName(const OUSt
throw
(
uno
::
RuntimeException
,
std
::
exception
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
{
SolarMutexGuard
aGuard
;
SolarMutexGuard
aGuard
;
OUString
sRange
(
rRange
)
;
sal_Int32
nPos
=
0
;
OUString
sTLName
(
sRange
.
getToken
(
0
,
':'
));
const
OUString
sTLName
(
rRange
.
getToken
(
0
,
':'
,
nPos
));
OUString
sBRName
(
sRange
.
getToken
(
1
,
':'
));
const
OUString
sBRName
(
rRange
.
getToken
(
0
,
':'
,
nPos
));
if
(
sTLName
.
isEmpty
()
||
sBRName
.
isEmpty
())
if
(
sTLName
.
isEmpty
()
||
sBRName
.
isEmpty
())
throw
uno
::
RuntimeException
();
throw
uno
::
RuntimeException
();
SwRangeDescriptor
aDesc
;
SwRangeDescriptor
aDesc
;
...
@@ -4016,7 +4004,7 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An
...
@@ -4016,7 +4004,7 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An
}
}
}
}
else
else
throw
beans
::
UnknownPropertyException
(
OUString
(
"Unknown property: "
)
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"Unknown property: "
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
}
}
}
}
...
@@ -4098,7 +4086,7 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName)
...
@@ -4098,7 +4086,7 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName)
}
}
}
}
else
else
throw
beans
::
UnknownPropertyException
(
OUString
(
"Unknown property: "
)
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"Unknown property: "
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
}
}
return
aRet
;
return
aRet
;
}
}
...
@@ -4243,9 +4231,8 @@ void SwXCellRange::GetDataSequence(
...
@@ -4243,9 +4231,8 @@ void SwXCellRange::GetDataSequence(
nFIndex
=
pNumFormatter
->
GetStandardIndex
(
eLang
);
nFIndex
=
pNumFormatter
->
GetStandardIndex
(
eLang
);
}
}
OUString
aTxt
(
lcl_getString
(
*
pXCell
)
);
double
fTmp
;
double
fTmp
;
if
(
pNumFormatter
->
IsNumberFormat
(
aTxt
,
nFIndex
,
fTmp
))
if
(
pNumFormatter
->
IsNumberFormat
(
lcl_getString
(
*
pXCell
)
,
nFIndex
,
fTmp
))
fVal
=
fTmp
;
fVal
=
fTmp
;
}
}
pDblData
[
nDtaCnt
++
]
=
fVal
;
pDblData
[
nDtaCnt
++
]
=
fVal
;
...
@@ -4828,7 +4815,7 @@ void SwXTableRows::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
...
@@ -4828,7 +4815,7 @@ void SwXTableRows::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
throw
aExcept
;
throw
aExcept
;
}
}
OUString
sTLName
=
sw_GetCellName
(
0
,
nIndex
);
const
OUString
sTLName
=
sw_GetCellName
(
0
,
nIndex
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
bool
bAppend
=
false
;
bool
bAppend
=
false
;
if
(
!
pTLBox
)
if
(
!
pTLBox
)
...
@@ -4890,7 +4877,7 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
...
@@ -4890,7 +4877,7 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
SwUnoCrsr
*
pUnoCrsr
=
pFrmFmt
->
GetDoc
()
->
CreateUnoCrsr
(
aPos
,
true
);
SwUnoCrsr
*
pUnoCrsr
=
pFrmFmt
->
GetDoc
()
->
CreateUnoCrsr
(
aPos
,
true
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
SetRemainInSection
(
false
);
pUnoCrsr
->
SetRemainInSection
(
false
);
OUString
sBLName
=
sw_GetCellName
(
0
,
nIndex
+
nCount
-
1
);
const
OUString
sBLName
=
sw_GetCellName
(
0
,
nIndex
+
nCount
-
1
);
const
SwTableBox
*
pBLBox
=
pTable
->
GetTblBox
(
sBLName
);
const
SwTableBox
*
pBLBox
=
pTable
->
GetTblBox
(
sBLName
);
if
(
pBLBox
)
if
(
pBLBox
)
{
{
...
@@ -5042,7 +5029,7 @@ void SwXTableColumns::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
...
@@ -5042,7 +5029,7 @@ void SwXTableColumns::insertByIndex(sal_Int32 nIndex, sal_Int32 nCount)
throw
aExcept
;
throw
aExcept
;
}
}
OUString
sTLName
=
sw_GetCellName
(
nIndex
,
0
);
const
OUString
sTLName
=
sw_GetCellName
(
nIndex
,
0
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
bool
bAppend
=
false
;
bool
bAppend
=
false
;
if
(
!
pTLBox
)
if
(
!
pTLBox
)
...
@@ -5088,7 +5075,7 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
...
@@ -5088,7 +5075,7 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFrmFmt
);
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFrmFmt
);
if
(
!
pTable
->
IsTblComplex
())
if
(
!
pTable
->
IsTblComplex
())
{
{
OUString
sTLName
=
sw_GetCellName
(
nIndex
,
0
);
const
OUString
sTLName
=
sw_GetCellName
(
nIndex
,
0
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
const
SwTableBox
*
pTLBox
=
pTable
->
GetTblBox
(
sTLName
);
if
(
pTLBox
)
if
(
pTLBox
)
{
{
...
@@ -5102,7 +5089,7 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
...
@@ -5102,7 +5089,7 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
SwUnoCrsr
*
pUnoCrsr
=
pFrmFmt
->
GetDoc
()
->
CreateUnoCrsr
(
aPos
,
true
);
SwUnoCrsr
*
pUnoCrsr
=
pFrmFmt
->
GetDoc
()
->
CreateUnoCrsr
(
aPos
,
true
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
SetRemainInSection
(
false
);
pUnoCrsr
->
SetRemainInSection
(
false
);
OUString
sTRName
=
sw_GetCellName
(
nIndex
+
nCount
-
1
,
0
);
const
OUString
sTRName
=
sw_GetCellName
(
nIndex
+
nCount
-
1
,
0
);
const
SwTableBox
*
pTRBox
=
pTable
->
GetTblBox
(
sTRName
);
const
SwTableBox
*
pTRBox
=
pTable
->
GetTblBox
(
sTRName
);
if
(
pTRBox
)
if
(
pTRBox
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment