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
c78449c8
Kaydet (Commit)
c78449c8
authored
Nis 02, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
throw instead of silent noop
Change-Id: I47dddce1513a870c27844d88694295c5999c0c7f
üst
c34d3eb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
63 deletions
+60
-63
unotbl.cxx
sw/source/core/unocore/unotbl.cxx
+60
-63
No files found.
sw/source/core/unocore/unotbl.cxx
Dosyayı görüntüle @
c78449c8
...
...
@@ -1306,81 +1306,78 @@ void SwXTextTableRow::setPropertyValue(const OUString& rPropertyName, const uno:
std::exception)
{
SolarMutexGuard aGuard;
SwFrmFmt
*
pFmt
=
GetFrmFmt
();
if
(
pFmt
)
SwFrmFmt* pFmt = lcl_EnsureCoreConnected(GetFrmFmt());
SwTable* pTable = SwTable::FindTable( pFmt );
SwTableLine* pLn = SwXTextTableRow::FindLine(pTable, pLine);
if(pLn)
{
SwTable
*
pTable
=
SwTable
::
FindTable
(
pFmt
);
SwTableLine
*
pLn
=
SwXTextTableRow
::
FindLine
(
pTable
,
pLine
);
if
(
pLn
)
// Check for a specific property
if ( rPropertyName == "TableRedlineParams" )
{
// Check for a specific property
if
(
rPropertyName
==
"TableRedlineParams"
)
// Get the table row properties
uno::Sequence< beans::PropertyValue > tableRowProperties;
tableRowProperties = aValue.get< uno::Sequence< beans::PropertyValue > >();
comphelper::SequenceAsHashMap aPropMap( tableRowProperties );
OUString sRedlineType;
uno::Any sRedlineTypeValue;
sRedlineTypeValue = aPropMap.getUnpackedValueOrDefault("RedlineType", sRedlineTypeValue);
if( sRedlineTypeValue >>= sRedlineType )
{
// Get the table row properties
uno
::
Sequence
<
beans
::
PropertyValue
>
tableRowProperties
;
tableRowProperties
=
aValue
.
get
<
uno
::
Sequence
<
beans
::
PropertyValue
>
>
();
comphelper
::
SequenceAsHashMap
aPropMap
(
tableRowProperties
);
OUString
sRedlineType
;
uno
::
Any
sRedlineTypeValue
;
sRedlineTypeValue
=
aPropMap
.
getUnpackedValueOrDefault
(
"RedlineType"
,
sRedlineTypeValue
);
if
(
sRedlineTypeValue
>>=
sRedlineType
)
{
// Create a 'Table Row Redline' object
SwUnoCursorHelper
::
makeTableRowRedline
(
*
pLn
,
sRedlineType
,
tableRowProperties
);
}
else
{
throw
beans
::
UnknownPropertyException
(
"No redline type property: "
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
}
// Create a 'Table Row Redline' object
SwUnoCursorHelper::makeTableRowRedline( *pLn, sRedlineType, tableRowProperties);
}
else
{
const
SfxItemPropertySimpleEntry
*
pEntry
=
m_pPropSet
->
getPropertyMap
().
getByName
(
rPropertyName
);
SwDoc
*
pDoc
=
pFmt
->
GetDoc
();
if
(
!
pEntry
)
throw
beans
::
UnknownPropertyException
(
"Unknown property: "
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
if
(
pEntry
->
nFlags
&
beans
::
PropertyAttribute
::
READONLY
)
throw
beans
::
PropertyVetoException
(
"Property is read-only: "
+
rPropertyName
,
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
switch
(
pEntry
->
nWID
)
throw beans::UnknownPropertyException("No redline type property: ", static_cast < cppu::OWeakObject * > ( this ) );
}
}
else
{
const SfxItemPropertySimpleEntry* pEntry =
m_pPropSet->getPropertyMap().getByName(rPropertyName);
SwDoc* pDoc = pFmt->GetDoc();
if (!pEntry)
throw beans::UnknownPropertyException("Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
switch(pEntry->nWID)
{
case FN_UNO_ROW_HEIGHT:
case FN_UNO_ROW_AUTO_HEIGHT:
{
case
FN_UNO_ROW_HEIGHT
:
case
FN_UNO_ROW_AUTO_HEIGHT
:
SwFmtFrmSize aFrmSize(pLn->GetFrmFmt()->GetFrmSize());
if(FN_UNO_ROW_AUTO_HEIGHT== pEntry->nWID)
{
SwFmtFrmSize
aFrmSize
(
pLn
->
GetFrmFmt
()
->
GetFrmSize
());
if
(
FN_UNO_ROW_AUTO_HEIGHT
==
pEntry
->
nWID
)
{
bool
bSet
=
*
static_cast
<
sal_Bool
const
*>
(
aValue
.
getValue
());
aFrmSize
.
SetHeightSizeType
(
bSet
?
ATT_VAR_SIZE
:
ATT_FIX_SIZE
);
}
else
{
sal_Int32
nHeight
=
0
;
aValue
>>=
nHeight
;
Size
aSz
(
aFrmSize
.
GetSize
());
aSz
.
Height
()
=
convertMm100ToTwip
(
nHeight
);
aFrmSize
.
SetSize
(
aSz
);
}
pDoc
->
SetAttr
(
aFrmSize
,
*
pLn
->
ClaimFrmFmt
());
bool bSet = *static_cast<sal_Bool const *>(aValue.getValue());
aFrmSize.SetHeightSizeType(bSet ? ATT_VAR_SIZE : ATT_FIX_SIZE);
}
break
;
case
FN_UNO_TABLE_COLUMN_SEPARATORS
:
else
{
UnoActionContext
aContext
(
pDoc
);
SwTable
*
pTable2
=
SwTable
::
FindTable
(
pFmt
);
lcl_SetTblSeparators
(
aValue
,
pTable2
,
pLine
->
GetTabBoxes
()[
0
],
true
,
pDoc
);
sal_Int32 nHeight = 0;
aValue >>= nHeight;
Size aSz(aFrmSize.GetSize());
aSz.Height() = convertMm100ToTwip(nHeight);
aFrmSize.SetSize(aSz);
}
break
;
pDoc->SetAttr(aFrmSize, *pLn->ClaimFrmFmt());
}
break;
default
:
{
SwFrmFmt
*
pLnFmt
=
pLn
->
ClaimFrmFmt
();
SwAttrSet
aSet
(
pLnFmt
->
GetAttrSet
());
m_pPropSet
->
setPropertyValue
(
*
pEntry
,
aValue
,
aSet
);
pDoc
->
SetAttr
(
aSet
,
*
pLnFmt
);
}
case FN_UNO_TABLE_COLUMN_SEPARATORS:
{
UnoActionContext aContext(pDoc);
SwTable* pTable2 = SwTable::FindTable( pFmt );
lcl_SetTblSeparators(aValue, pTable2, pLine->GetTabBoxes()[0], true, pDoc);
}
break;
default:
{
SwFrmFmt* pLnFmt = pLn->ClaimFrmFmt();
SwAttrSet aSet(pLnFmt->GetAttrSet());
m_pPropSet->setPropertyValue(*pEntry, aValue, aSet);
pDoc->SetAttr(aSet, *pLnFmt);
}
}
}
...
...
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