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
eeeaf6c3
Kaydet (Commit)
eeeaf6c3
authored
Şub 23, 2011
tarafından
Noel Power
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
oops forgot to support the getProperty...
üst
e51fbdff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
7 deletions
+46
-7
unobookmark.hxx
sw/inc/unobookmark.hxx
+9
-1
unobkm.cxx
sw/source/core/unocore/unobkm.cxx
+37
-6
No files found.
sw/inc/unobookmark.hxx
Dosyayı görüntüle @
eeeaf6c3
...
@@ -149,7 +149,7 @@ public:
...
@@ -149,7 +149,7 @@ public:
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
g
etPropertyValue
(
virtual
::
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
G
etPropertyValue
(
const
::
rtl
::
OUString
&
rPropertyName
)
const
::
rtl
::
OUString
&
rPropertyName
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
...
@@ -264,6 +264,8 @@ public:
...
@@ -264,6 +264,8 @@ public:
class
SwXODFCheckboxField
:
public
SwXFieldmark
class
SwXODFCheckboxField
:
public
SwXFieldmark
{
{
private
:
::
sw
::
mark
::
ICheckboxFieldmark
*
getCheckboxFieldmark
();
public
:
public
:
SwXODFCheckboxField
(
::
sw
::
mark
::
IMark
*
pBkm
=
0
,
SwDoc
*
pDoc
=
0
)
:
SwXFieldmark
(
true
,
SwXODFCheckboxField
(
::
sw
::
mark
::
IMark
*
pBkm
=
0
,
SwDoc
*
pDoc
=
0
)
:
SwXFieldmark
(
true
,
pBkm
,
pDoc
)
{}
pBkm
,
pDoc
)
{}
...
@@ -277,6 +279,12 @@ public:
...
@@ -277,6 +279,12 @@ public:
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
getPropertyValue
(
const
::
rtl
::
OUString
&
rPropertyName
)
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
};
};
#endif // SW_UNOBOOKMARK_HXX
#endif // SW_UNOBOOKMARK_HXX
...
...
sw/source/core/unocore/unobkm.cxx
Dosyayı görüntüle @
eeeaf6c3
...
@@ -678,6 +678,19 @@ SwXFieldmark::CreateXFieldmark(SwDoc & rDoc, ::sw::mark::IMark & rMark)
...
@@ -678,6 +678,19 @@ SwXFieldmark::CreateXFieldmark(SwDoc & rDoc, ::sw::mark::IMark & rMark)
return
xMark
;
return
xMark
;
}
}
::
sw
::
mark
::
ICheckboxFieldmark
*
SwXODFCheckboxField
::
getCheckboxFieldmark
()
{
// evil #TODO #FIXME can we get rid of the dynamic_cast
const
::
sw
::
mark
::
ICheckboxFieldmark
*
pCheckboxFm
=
dynamic_cast
<
const
::
sw
::
mark
::
ICheckboxFieldmark
*
>
(
GetBookmark
());
// even evil-er #TODO #FIXME casting away the constness
return
((
::
sw
::
mark
::
ICheckboxFieldmark
*
)(
pCheckboxFm
));
}
// support 'hidden' "Checked" property ( note: this property is just for convenience to support
// docx import filter thus not published via PropertySet info )
void
SAL_CALL
void
SAL_CALL
SwXODFCheckboxField
::
setPropertyValue
(
const
OUString
&
PropertyName
,
SwXODFCheckboxField
::
setPropertyValue
(
const
OUString
&
PropertyName
,
const
uno
::
Any
&
rValue
)
const
uno
::
Any
&
rValue
)
...
@@ -685,20 +698,38 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
...
@@ -685,20 +698,38 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
lang
::
IllegalArgumentException
,
lang
::
WrappedTargetException
,
lang
::
IllegalArgumentException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
)
uno
::
RuntimeException
)
{
{
SolarMutexGuard
g
;
if
(
PropertyName
.
equals
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Checked"
)
)
)
)
if
(
PropertyName
.
equals
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Checked"
)
)
)
)
{
{
const
::
sw
::
mark
::
ICheckboxFieldmark
*
pCheckboxFm
=
dynamic_cast
<
const
::
sw
::
mark
::
ICheckboxFieldmark
*
>
(
GetBookmark
()
);
::
sw
::
mark
::
ICheckboxFieldmark
*
pCheckboxFm
=
getCheckboxFieldmark
(
);
sal_Bool
bChecked
(
sal_False
);
sal_Bool
bChecked
(
sal_False
);
if
(
pCheckboxFm
&&
(
rValue
>>=
bChecked
)
)
if
(
pCheckboxFm
&&
(
rValue
>>=
bChecked
)
)
{
pCheckboxFm
->
SetChecked
(
bChecked
);
// evil #TODO #FIXME
((
::
sw
::
mark
::
ICheckboxFieldmark
*
)(
pCheckboxFm
))
->
SetChecked
(
bChecked
);
}
else
else
throw
uno
::
RuntimeException
();
throw
uno
::
RuntimeException
();
}
}
else
else
throw
lang
::
IllegalArgumentException
();
SwXFieldmark
::
setPropertyValue
(
PropertyName
,
rValue
);
}
// support 'hidden' "Checked" property ( note: this property is just for convenience to support
// docx import filter thus not published via PropertySet info )
uno
::
Any
SAL_CALL
SwXODFCheckboxField
::
getPropertyValue
(
const
OUString
&
rPropertyName
)
throw
(
beans
::
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
)
{
SolarMutexGuard
g
;
if
(
PropertyName
.
equals
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Checked"
)
)
)
)
{
::
sw
::
mark
::
ICheckboxFieldmark
*
pCheckboxFm
=
getCheckboxFieldmark
();
if
(
pCheckboxFm
)
return
uno
::
makeAny
(
pCheckboxFm
->
GetChecked
()
);
else
throw
uno
::
RuntimeException
();
}
return
SwXFieldmark
::
getPropertyValue
(
PropertyName
);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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