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
139cbd04
Kaydet (Commit)
139cbd04
authored
Agu 20, 2012
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SwXTextTable::setPropertyValue: de-dent
Change-Id: Icad5dfcf8b9962623ac9f8954672a50a232bb9be
üst
08ab21f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
89 deletions
+90
-89
unotbl.cxx
sw/source/core/unocore/unotbl.cxx
+90
-89
No files found.
sw/source/core/unocore/unotbl.cxx
Dosyayı görüntüle @
139cbd04
...
@@ -3086,72 +3086,71 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
...
@@ -3086,72 +3086,71 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
{
{
break
;
// something else
break
;
// something else
}
}
SwDoc
*
pDoc
=
pFmt
->
GetDoc
();
SwFrm
*
pFrm
=
SwIterator
<
SwFrm
,
SwFmt
>::
FirstElement
(
*
pFmt
);
// tables without layout (invisible header/footer?)
if
(
!
pFrm
)
{
{
SwDoc
*
pDoc
=
pFmt
->
GetDoc
();
break
;
SwFrm
*
pFrm
=
SwIterator
<
SwFrm
,
SwFmt
>::
FirstElement
(
*
pFmt
);
}
// tables without layout (invisible header/footer?)
lcl_FormatTable
(
pFmt
);
if
(
pFrm
)
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
{
SwTableLines
&
rLines
=
pTable
->
GetTabLines
();
lcl_FormatTable
(
pFmt
);
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
SwTableLines
&
rLines
=
pTable
->
GetTabLines
();
// hier muessen die Actions aufgehoben werden
// hier muessen die Actions aufgehoben werden
UnoActionRemoveContext
aRemoveContext
(
pDoc
);
UnoActionRemoveContext
aRemoveContext
(
pDoc
);
const
SwTableBox
*
pTLBox
=
lcl_FindCornerTableBox
(
rLines
,
true
);
const
SwTableBox
*
pTLBox
=
lcl_FindCornerTableBox
(
rLines
,
true
);
const
SwStartNode
*
pSttNd
=
pTLBox
->
GetSttNd
();
const
SwStartNode
*
pSttNd
=
pTLBox
->
GetSttNd
();
SwPosition
aPos
(
*
pSttNd
);
SwPosition
aPos
(
*
pSttNd
);
// set cursor to top left cell
// set cursor to top left cell
SwUnoCrsr
*
pUnoCrsr
=
pDoc
->
CreateUnoCrsr
(
aPos
,
sal_True
);
SwUnoCrsr
*
pUnoCrsr
=
pDoc
->
CreateUnoCrsr
(
aPos
,
sal_True
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
SetRemainInSection
(
sal_False
);
pUnoCrsr
->
SetRemainInSection
(
sal_False
);
const
SwTableBox
*
pBRBox
=
lcl_FindCornerTableBox
(
rLines
,
false
);
const
SwTableBox
*
pBRBox
=
lcl_FindCornerTableBox
(
rLines
,
false
);
pUnoCrsr
->
SetMark
();
pUnoCrsr
->
SetMark
();
pUnoCrsr
->
GetPoint
()
->
nNode
=
*
pBRBox
->
GetSttNd
();
pUnoCrsr
->
GetPoint
()
->
nNode
=
*
pBRBox
->
GetSttNd
();
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
SwUnoTableCrsr
*
pCrsr
=
dynamic_cast
<
SwUnoTableCrsr
*>
(
pUnoCrsr
);
SwUnoTableCrsr
*
pCrsr
=
dynamic_cast
<
SwUnoTableCrsr
*>
(
pUnoCrsr
);
pCrsr
->
MakeBoxSels
();
pCrsr
->
MakeBoxSels
();
SfxItemSet
aSet
(
pDoc
->
GetAttrPool
(),
SfxItemSet
aSet
(
pDoc
->
GetAttrPool
(),
RES_BOX
,
RES_BOX
,
RES_BOX
,
RES_BOX
,
SID_ATTR_BORDER_INNER
,
SID_ATTR_BORDER_INNER
,
SID_ATTR_BORDER_INNER
,
SID_ATTR_BORDER_INNER
,
0
);
0
);
SvxBoxItem
aBox
(
RES_BOX
);
SvxBoxItem
aBox
(
RES_BOX
);
SvxBoxInfoItem
aBoxInfo
(
SID_ATTR_BORDER_INNER
);
SvxBoxInfoItem
aBoxInfo
(
SID_ATTR_BORDER_INNER
);
aBox
.
SetLine
(
aTopLine
.
isEmpty
()
?
0
:
&
aTopLine
,
BOX_LINE_TOP
);
aBox
.
SetLine
(
aTopLine
.
isEmpty
()
?
0
:
&
aTopLine
,
BOX_LINE_TOP
);
aBoxInfo
.
SetValid
(
VALID_TOP
,
aBorder
.
IsTopLineValid
);
aBoxInfo
.
SetValid
(
VALID_TOP
,
aBorder
.
IsTopLineValid
);
aBox
.
SetLine
(
aBottomLine
.
isEmpty
()
?
0
:
&
aBottomLine
,
BOX_LINE_BOTTOM
);
aBox
.
SetLine
(
aBottomLine
.
isEmpty
()
?
0
:
&
aBottomLine
,
BOX_LINE_BOTTOM
);
aBoxInfo
.
SetValid
(
VALID_BOTTOM
,
aBorder
.
IsBottomLineValid
);
aBoxInfo
.
SetValid
(
VALID_BOTTOM
,
aBorder
.
IsBottomLineValid
);
aBox
.
SetLine
(
aLeftLine
.
isEmpty
()
?
0
:
&
aLeftLine
,
BOX_LINE_LEFT
);
aBox
.
SetLine
(
aLeftLine
.
isEmpty
()
?
0
:
&
aLeftLine
,
BOX_LINE_LEFT
);
aBoxInfo
.
SetValid
(
VALID_LEFT
,
aBorder
.
IsLeftLineValid
);
aBoxInfo
.
SetValid
(
VALID_LEFT
,
aBorder
.
IsLeftLineValid
);
aBox
.
SetLine
(
aRightLine
.
isEmpty
()
?
0
:
&
aRightLine
,
BOX_LINE_RIGHT
);
aBox
.
SetLine
(
aRightLine
.
isEmpty
()
?
0
:
&
aRightLine
,
BOX_LINE_RIGHT
);
aBoxInfo
.
SetValid
(
VALID_RIGHT
,
aBorder
.
IsRightLineValid
);
aBoxInfo
.
SetValid
(
VALID_RIGHT
,
aBorder
.
IsRightLineValid
);
aBoxInfo
.
SetLine
(
aHoriLine
.
isEmpty
()
?
0
:
&
aHoriLine
,
BOXINFO_LINE_HORI
);
aBoxInfo
.
SetLine
(
aHoriLine
.
isEmpty
()
?
0
:
&
aHoriLine
,
BOXINFO_LINE_HORI
);
aBoxInfo
.
SetValid
(
VALID_HORI
,
aBorder
.
IsHorizontalLineValid
);
aBoxInfo
.
SetValid
(
VALID_HORI
,
aBorder
.
IsHorizontalLineValid
);
aBoxInfo
.
SetLine
(
aVertLine
.
isEmpty
()
?
0
:
&
aVertLine
,
BOXINFO_LINE_VERT
);
aBoxInfo
.
SetLine
(
aVertLine
.
isEmpty
()
?
0
:
&
aVertLine
,
BOXINFO_LINE_VERT
);
aBoxInfo
.
SetValid
(
VALID_VERT
,
aBorder
.
IsVerticalLineValid
);
aBoxInfo
.
SetValid
(
VALID_VERT
,
aBorder
.
IsVerticalLineValid
);
aBox
.
SetDistance
((
sal_uInt16
)
MM100_TO_TWIP
(
aBorder
.
Distance
));
aBox
.
SetDistance
((
sal_uInt16
)
MM100_TO_TWIP
(
aBorder
.
Distance
));
aBoxInfo
.
SetValid
(
VALID_DISTANCE
,
aBorder
.
IsDistanceValid
);
aBoxInfo
.
SetValid
(
VALID_DISTANCE
,
aBorder
.
IsDistanceValid
);
aSet
.
Put
(
aBox
);
aSet
.
Put
(
aBox
);
aSet
.
Put
(
aBoxInfo
);
aSet
.
Put
(
aBoxInfo
);
pDoc
->
SetTabBorders
(
*
pCrsr
,
aSet
);
pDoc
->
SetTabBorders
(
*
pCrsr
,
aSet
);
delete
pUnoCrsr
;
delete
pUnoCrsr
;
}
}
}
}
break
;
break
;
case
FN_UNO_TABLE_BORDER_DISTANCES
:
case
FN_UNO_TABLE_BORDER_DISTANCES
:
...
@@ -3278,43 +3277,46 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
...
@@ -3278,43 +3277,46 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
{
{
SwDoc
*
pDoc
=
pFmt
->
GetDoc
();
SwDoc
*
pDoc
=
pFmt
->
GetDoc
();
SwFrm
*
pFrm
=
SwIterator
<
SwFrm
,
SwFmt
>::
FirstElement
(
*
pFmt
);
SwFrm
*
pFrm
=
SwIterator
<
SwFrm
,
SwFmt
>::
FirstElement
(
*
pFmt
);
//
Tabellen ohne Layout (unsichtbare Header/Footer
)
//
tables without layout (invisible header/footer?
)
if
(
pFrm
)
if
(
!
pFrm
)
{
{
lcl_FormatTable
(
pFmt
);
break
;
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
}
SwTableLines
&
rLines
=
pTable
->
GetTabLines
();
lcl_FormatTable
(
pFmt
);
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
SwTableLines
&
rLines
=
pTable
->
GetTabLines
();
// hier muessen die Actions aufgehoben werden
// hier muessen die Actions aufgehoben werden
UnoActionRemoveContext
aRemoveContext
(
pDoc
);
UnoActionRemoveContext
aRemoveContext
(
pDoc
);
const
SwTableBox
*
pTLBox
=
lcl_FindCornerTableBox
(
rLines
,
true
);
const
SwTableBox
*
pTLBox
=
lcl_FindCornerTableBox
(
rLines
,
true
);
const
SwStartNode
*
pSttNd
=
pTLBox
->
GetSttNd
();
const
SwStartNode
*
pSttNd
=
pTLBox
->
GetSttNd
();
SwPosition
aPos
(
*
pSttNd
);
SwPosition
aPos
(
*
pSttNd
);
// Cursor in die obere linke Zelle des Ranges setzen
// set cursor to top left cell
SwUnoCrsr
*
pUnoCrsr
=
pDoc
->
CreateUnoCrsr
(
aPos
,
sal_True
);
SwUnoCrsr
*
pUnoCrsr
=
pDoc
->
CreateUnoCrsr
(
aPos
,
sal_True
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
SetRemainInSection
(
sal_False
);
pUnoCrsr
->
SetRemainInSection
(
sal_False
);
const
SwTableBox
*
pBRBox
=
lcl_FindCornerTableBox
(
rLines
,
false
);
const
SwTableBox
*
pBRBox
=
lcl_FindCornerTableBox
(
rLines
,
false
);
pUnoCrsr
->
SetMark
();
pUnoCrsr
->
SetMark
();
const
SwStartNode
*
pLastNd
=
pBRBox
->
GetSttNd
();
const
SwStartNode
*
pLastNd
=
pBRBox
->
GetSttNd
();
pUnoCrsr
->
GetPoint
()
->
nNode
=
*
pLastNd
;
pUnoCrsr
->
GetPoint
()
->
nNode
=
*
pLastNd
;
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
pUnoCrsr
->
Move
(
fnMoveForward
,
fnGoNode
);
SwUnoTableCrsr
*
pCrsr
=
dynamic_cast
<
SwUnoTableCrsr
*>
(
pUnoCrsr
);
SwUnoTableCrsr
*
pCrsr
=
dynamic_cast
<
SwUnoTableCrsr
*>
(
pUnoCrsr
);
pCrsr
->
MakeBoxSels
();
pCrsr
->
MakeBoxSels
();
SfxItemSet
aSet
(
pDoc
->
GetAttrPool
(),
SfxItemSet
aSet
(
pDoc
->
GetAttrPool
(),
RES_BOX
,
RES_BOX
,
RES_BOX
,
RES_BOX
,
SID_ATTR_BORDER_INNER
,
SID_ATTR_BORDER_INNER
,
SID_ATTR_BORDER_INNER
,
SID_ATTR_BORDER_INNER
,
0
);
0
);
aSet
.
Put
(
SvxBoxInfoItem
(
SID_ATTR_BORDER_INNER
));
aSet
.
Put
(
SvxBoxInfoItem
(
SID_ATTR_BORDER_INNER
));
pDoc
->
GetTabBorders
(
*
pCrsr
,
aSet
);
pDoc
->
GetTabBorders
(
*
pCrsr
,
aSet
);
const
SvxBoxInfoItem
&
rBoxInfoItem
=
(
const
SvxBoxInfoItem
&
)
aSet
.
Get
(
SID_ATTR_BORDER_INNER
);
const
SvxBoxInfoItem
&
rBoxInfoItem
=
const
SvxBoxItem
&
rBox
=
(
const
SvxBoxItem
&
)
aSet
.
Get
(
RES_BOX
);
(
const
SvxBoxInfoItem
&
)
aSet
.
Get
(
SID_ATTR_BORDER_INNER
);
const
SvxBoxItem
&
rBox
=
(
const
SvxBoxItem
&
)
aSet
.
Get
(
RES_BOX
);
if
(
FN_UNO_TABLE_BORDER
==
pEntry
->
nWID
)
{
if
(
FN_UNO_TABLE_BORDER
==
pEntry
->
nWID
)
{
table
::
TableBorder
aTableBorder
;
table
::
TableBorder
aTableBorder
;
aTableBorder
.
TopLine
=
SvxBoxItem
::
SvxLineToLine
(
rBox
.
GetTop
(),
true
);
aTableBorder
.
TopLine
=
SvxBoxItem
::
SvxLineToLine
(
rBox
.
GetTop
(),
true
);
aTableBorder
.
IsTopLineValid
=
rBoxInfoItem
.
IsValid
(
VALID_TOP
);
aTableBorder
.
IsTopLineValid
=
rBoxInfoItem
.
IsValid
(
VALID_TOP
);
...
@@ -3331,9 +3333,9 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
...
@@ -3331,9 +3333,9 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
aTableBorder
.
Distance
=
TWIP_TO_MM100_UNSIGNED
(
rBox
.
GetDistance
()
);
aTableBorder
.
Distance
=
TWIP_TO_MM100_UNSIGNED
(
rBox
.
GetDistance
()
);
aTableBorder
.
IsDistanceValid
=
rBoxInfoItem
.
IsValid
(
VALID_DISTANCE
);
aTableBorder
.
IsDistanceValid
=
rBoxInfoItem
.
IsValid
(
VALID_DISTANCE
);
aRet
<<=
aTableBorder
;
aRet
<<=
aTableBorder
;
}
}
else
else
{
{
table
::
TableBorder2
aTableBorder
;
table
::
TableBorder2
aTableBorder
;
aTableBorder
.
TopLine
=
SvxBoxItem
::
SvxLineToLine
(
rBox
.
GetTop
(),
true
);
aTableBorder
.
TopLine
=
SvxBoxItem
::
SvxLineToLine
(
rBox
.
GetTop
(),
true
);
aTableBorder
.
IsTopLineValid
=
rBoxInfoItem
.
IsValid
(
VALID_TOP
);
aTableBorder
.
IsTopLineValid
=
rBoxInfoItem
.
IsValid
(
VALID_TOP
);
...
@@ -3350,9 +3352,8 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
...
@@ -3350,9 +3352,8 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
aTableBorder
.
Distance
=
TWIP_TO_MM100_UNSIGNED
(
rBox
.
GetDistance
()
);
aTableBorder
.
Distance
=
TWIP_TO_MM100_UNSIGNED
(
rBox
.
GetDistance
()
);
aTableBorder
.
IsDistanceValid
=
rBoxInfoItem
.
IsValid
(
VALID_DISTANCE
);
aTableBorder
.
IsDistanceValid
=
rBoxInfoItem
.
IsValid
(
VALID_DISTANCE
);
aRet
<<=
aTableBorder
;
aRet
<<=
aTableBorder
;
}
delete
pUnoCrsr
;
}
}
delete
pUnoCrsr
;
}
}
break
;
break
;
case
FN_UNO_TABLE_BORDER_DISTANCES
:
case
FN_UNO_TABLE_BORDER_DISTANCES
:
...
...
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