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
b4386480
Kaydet (Commit)
b4386480
authored
Mar 28, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
flatten and simplify
Change-Id: I7339a7a54dcb6eb3a887416d05f8f78f38aa3c96
üst
df384772
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
51 deletions
+44
-51
unotbl.cxx
sw/source/core/unocore/unotbl.cxx
+44
-51
No files found.
sw/source/core/unocore/unotbl.cxx
Dosyayı görüntüle @
b4386480
...
@@ -1049,7 +1049,7 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
...
@@ -1049,7 +1049,7 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
if
(
rPropertyName
==
"FRMDirection"
)
if
(
rPropertyName
==
"FRMDirection"
)
{
{
SvxFrameDirection
eDir
=
FRMDIR_ENVIRONMENT
;
SvxFrameDirection
eDir
=
FRMDIR_ENVIRONMENT
;
sal_Int
16
nNum
=
aValue
.
get
<
sal_Int16
>
(
nNum
);
sal_Int
32
nNum
=
aValue
.
get
<
sal_Int32
>
(
);
SAL_INFO
(
"sw.uno"
,
"FRMDirection val "
<<
nNum
);
SAL_INFO
(
"sw.uno"
,
"FRMDirection val "
<<
nNum
);
switch
(
nNum
)
switch
(
nNum
)
{
{
...
@@ -1074,16 +1074,15 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
...
@@ -1074,16 +1074,15 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV
uno
::
Sequence
<
beans
::
PropertyValue
>
tableCellProperties
;
uno
::
Sequence
<
beans
::
PropertyValue
>
tableCellProperties
;
tableCellProperties
=
aValue
.
get
<
uno
::
Sequence
<
beans
::
PropertyValue
>
>
();
tableCellProperties
=
aValue
.
get
<
uno
::
Sequence
<
beans
::
PropertyValue
>
>
();
comphelper
::
SequenceAsHashMap
aPropMap
(
tableCellProperties
);
comphelper
::
SequenceAsHashMap
aPropMap
(
tableCellProperties
);
uno
::
Any
sRedlineTypeValue
=
aPropMap
.
getUnpackedValueOrDefault
(
"RedlineType"
,
make
Any
());
uno
::
Any
sRedlineTypeValue
=
aPropMap
.
getUnpackedValueOrDefault
(
"RedlineType"
,
uno
::
Any
());
if
(
!
sRedlineTypeValue
.
has
(
OUString
))
if
(
!
sRedlineTypeValue
.
has
<
OUString
>
(
))
throw
beans
::
UnknownPropertyException
(
"No redline type property: "
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"No redline type property: "
,
static_cast
<
cppu
::
OWeakObject
*>
(
this
)
);
// Create a 'Table Cell Redline' object
// Create a 'Table Cell Redline' object
SwUnoCursorHelper
::
makeTableCellRedline
(
*
pBox
,
sRedlineTypeValue
.
get
<
OUString
(),
tableCellProperties
);
SwUnoCursorHelper
::
makeTableCellRedline
(
*
pBox
,
sRedlineTypeValue
.
get
<
OUString
>
(),
tableCellProperties
);
}
}
else
else
{
{
const
SfxItemPropertySimpleEntry
*
pEntry
=
auto
pEntry
(
m_pPropSet
->
getPropertyMap
().
getByName
(
rPropertyName
));
m_pPropSet
->
getPropertyMap
().
getByName
(
rPropertyName
);
if
(
!
pEntry
)
if
(
!
pEntry
)
{
{
beans
::
UnknownPropertyException
aEx
;
beans
::
UnknownPropertyException
aEx
;
...
@@ -1110,56 +1109,50 @@ uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName)
...
@@ -1110,56 +1109,50 @@ uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName)
throw
(
beans
::
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
throw
(
beans
::
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
{
{
SolarMutexGuard
aGuard
;
SolarMutexGuard
aGuard
;
uno
::
Any
aRet
;
if
(
!
IsValid
())
if
(
IsValid
())
return
uno
::
Any
();
auto
pEntry
(
m_pPropSet
->
getPropertyMap
().
getByName
(
rPropertyName
));
if
(
!
pEntry
)
{
{
const
SfxItemPropertySimpleEntry
*
pEntry
=
beans
::
UnknownPropertyException
aEx
;
m_pPropSet
->
getPropertyMap
().
getByName
(
rPropertyName
);
aEx
.
Message
=
rPropertyName
;
if
(
!
pEntry
)
throw
(
aEx
);
}
switch
(
pEntry
->
nWID
)
{
case
FN_UNO_CELL_ROW_SPAN
:
return
uno
::
makeAny
(
pBox
->
getRowSpan
());
break
;
case
FN_UNO_TEXT_SECTION
:
{
{
beans
::
UnknownPropertyException
aEx
;
SwFrmFmt
*
pTblFmt
=
GetFrmFmt
();
aEx
.
Message
=
rPropertyName
;
SwTable
*
pTable
=
SwTable
::
FindTable
(
pTblFmt
);
throw
(
aEx
);
SwTableNode
*
pTblNode
=
pTable
->
GetTableNode
();
SwSectionNode
*
pSectionNode
=
pTblNode
->
FindSectionNode
();
if
(
!
pSectionNode
)
return
uno
::
Any
();
SwSection
&
rSect
=
pSectionNode
->
GetSection
();
return
uno
::
makeAny
(
SwXTextSections
::
GetObject
(
*
rSect
.
GetFmt
()));
}
}
switch
(
pEntry
->
nWID
)
break
;
case
FN_UNO_CELL_NAME
:
return
uno
::
makeAny
(
pBox
->
GetName
());
break
;
case
FN_UNO_REDLINE_NODE_START
:
case
FN_UNO_REDLINE_NODE_END
:
{
{
case
FN_UNO_CELL_ROW_SPAN
:
//redline can only be returned if it's a living object
aRet
<<=
pBox
->
getRowSpan
();
return
makeAny
(
SwXText
::
getPropertyValue
(
rPropertyName
));
break
;
}
case
FN_UNO_TEXT_SECTION
:
break
;
{
default
:
SwFrmFmt
*
pTblFmt
=
GetFrmFmt
();
{
SwTable
*
pTable
=
SwTable
::
FindTable
(
pTblFmt
);
const
SwAttrSet
&
rSet
=
pBox
->
GetFrmFmt
()
->
GetAttrSet
();
SwTableNode
*
pTblNode
=
pTable
->
GetTableNode
();
uno
::
Any
aResult
;
SwSectionNode
*
pSectionNode
=
pTblNode
->
FindSectionNode
();
m_pPropSet
->
getPropertyValue
(
rPropertyName
,
rSet
,
aResult
);
if
(
pSectionNode
)
return
aResult
;
{
SwSection
&
rSect
=
pSectionNode
->
GetSection
();
uno
::
Reference
<
text
::
XTextSection
>
xSect
=
SwXTextSections
::
GetObject
(
*
rSect
.
GetFmt
()
);
aRet
<<=
xSect
;
}
}
break
;
case
FN_UNO_CELL_NAME
:
aRet
<<=
pBox
->
GetName
();
break
;
case
FN_UNO_REDLINE_NODE_START
:
case
FN_UNO_REDLINE_NODE_END
:
{
//redline can only be returned if it's a living object
aRet
=
SwXText
::
getPropertyValue
(
rPropertyName
);
}
break
;
default
:
{
const
SwFrmFmt
*
pBoxFmt
=
pBox
->
GetFrmFmt
();
const
SwAttrSet
&
rSet
=
pBoxFmt
->
GetAttrSet
();
m_pPropSet
->
getPropertyValue
(
rPropertyName
,
rSet
,
aRet
);
}
}
}
}
}
return
aRet
;
}
}
void
SwXCell
::
addPropertyChangeListener
(
const
OUString
&
/*rPropertyName*/
,
const
uno
::
Reference
<
beans
::
XPropertyChangeListener
>
&
/*xListener*/
)
throw
(
beans
::
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
void
SwXCell
::
addPropertyChangeListener
(
const
OUString
&
/*rPropertyName*/
,
const
uno
::
Reference
<
beans
::
XPropertyChangeListener
>
&
/*xListener*/
)
throw
(
beans
::
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
...
...
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