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
33e424ae
Kaydet (Commit)
33e424ae
authored
Şub 13, 2001
tarafından
Frank Schönheit
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#83529# introducing ORadioImport - need special handling for DefaultState / State
üst
51f00eec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
4 deletions
+70
-4
elementimport.cxx
xmloff/source/forms/elementimport.cxx
+47
-2
elementimport.hxx
xmloff/source/forms/elementimport.hxx
+23
-2
No files found.
xmloff/source/forms/elementimport.cxx
Dosyayı görüntüle @
33e424ae
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: elementimport.cxx,v $
*
* $Revision: 1.
9
$
* $Revision: 1.
10
$
*
* last change: $Author: fs $ $Date: 2001-02-
01 09:46:47
$
* last change: $Author: fs $ $Date: 2001-02-
13 09:09:32
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -90,6 +90,9 @@
#include "eventimport.hxx"
#endif
#ifndef _CPPUHELPER_EXTRACT_HXX_
#include <cppuhelper/extract.hxx>
#endif
#ifndef _COM_SUN_STAR_UTIL_XCLONEABLE_HPP_
#include <com/sun/star/util/XCloneable.hpp>
#endif
...
...
@@ -632,6 +635,43 @@ namespace xmloff
OControlImport
::
handleAttribute
(
_nNamespaceKey
,
_rLocalName
,
_rValue
);
}
//=====================================================================
//= ORadioImport
//=====================================================================
//---------------------------------------------------------------------
ORadioImport
::
ORadioImport
(
IFormsImportContext
&
_rImport
,
IEventAttacherManager
&
_rEventManager
,
sal_uInt16
_nPrefix
,
const
::
rtl
::
OUString
&
_rName
,
const
Reference
<
XNameContainer
>&
_rxParentContainer
,
OControlElement
::
ElementType
_eType
)
:
OControlImport
(
_rImport
,
_rEventManager
,
_nPrefix
,
_rName
,
_rxParentContainer
,
_eType
)
{
}
//---------------------------------------------------------------------
void
ORadioImport
::
handleAttribute
(
sal_uInt16
_nNamespaceKey
,
const
::
rtl
::
OUString
&
_rLocalName
,
const
::
rtl
::
OUString
&
_rValue
)
{
// need special handling for the State & CurrentState properties:
// they're stored as booleans, but expected to be int16 properties
static
const
::
rtl
::
OUString
s_sCurrentSelected
=
::
rtl
::
OUString
::
createFromAscii
(
getCommonControlAttributeName
(
CCA_CURRENT_SELECTED
));
static
const
::
rtl
::
OUString
s_sSelected
=
::
rtl
::
OUString
::
createFromAscii
(
getCommonControlAttributeName
(
CCA_SELECTED
));
if
((
_rLocalName
==
s_sCurrentSelected
)
||
(
_rLocalName
==
s_sSelected
))
{
const
OAttribute2Property
::
AttributeAssignment
*
pProperty
=
m_rContext
.
getAttributeMap
().
getAttributeTranslation
(
_rLocalName
);
OSL_ENSURE
(
pProperty
,
"ORadioImport::handleAttribute: invalid property map!"
);
if
(
pProperty
)
{
Any
aBooleanValue
=
convertString
(
m_rContext
.
getGlobalContext
(),
pProperty
->
aPropertyType
,
_rValue
,
pProperty
->
pEnumMap
);
// create and store a new PropertyValue
PropertyValue
aNewValue
;
aNewValue
.
Name
=
pProperty
->
sPropertyName
;
aNewValue
.
Value
<<=
(
sal_Int16
)
::
cppu
::
any2bool
(
aBooleanValue
);
implPushBackPropertyValue
(
aNewValue
);
}
}
else
OControlImport
::
handleAttribute
(
_nNamespaceKey
,
_rLocalName
,
_rValue
);
}
//=====================================================================
//= OListAndComboImport
//=====================================================================
...
...
@@ -853,6 +893,8 @@ namespace xmloff
case
OControlElement
:
:
COMBOBOX
:
case
OControlElement
:
:
LISTBOX
:
return
new
OListAndComboImport
(
m_rFormImport
,
m_rEventManager
,
_nPrefix
,
_rLocalName
,
m_xParentContainer
,
_eType
);
case
OControlElement
:
:
RADIO
:
return
new
ORadioImport
(
m_rFormImport
,
m_rEventManager
,
_nPrefix
,
_rLocalName
,
m_xParentContainer
,
_eType
);
case
OControlElement
:
:
FRAME
:
case
OControlElement
:
:
FIXED_TEXT
:
...
...
@@ -1045,6 +1087,9 @@ namespace xmloff
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
* Revision 1.9 2001/02/01 09:46:47 fs
* no own style handling anymore - the shape exporter is responsible for our styles now
*
* Revision 1.8 2001/01/24 09:37:58 fs
* OFormImport: call enter-/leaveEventContext when starting/ending the element
*
...
...
xmloff/source/forms/elementimport.hxx
Dosyayı görüntüle @
33e424ae
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: elementimport.hxx,v $
*
* $Revision: 1.
7
$
* $Revision: 1.
8
$
*
* last change: $Author: fs $ $Date: 2001-0
1-24 09:37:58
$
* last change: $Author: fs $ $Date: 2001-0
2-13 09:09:32
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -326,6 +326,24 @@ namespace xmloff
const
::
rtl
::
OUString
&
_rValue
);
};
//=====================================================================
//= ORadioImport
//=====================================================================
class
ORadioImport
:
public
OControlImport
{
public
:
ORadioImport
(
IFormsImportContext
&
_rImport
,
IEventAttacherManager
&
_rEventManager
,
sal_uInt16
_nPrefix
,
const
::
rtl
::
OUString
&
_rName
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XNameContainer
>&
_rxParentContainer
,
OControlElement
::
ElementType
_eType
);
// OPropertyImport overridables
virtual
void
handleAttribute
(
sal_uInt16
_nNamespaceKey
,
const
::
rtl
::
OUString
&
_rLocalName
,
const
::
rtl
::
OUString
&
_rValue
);
};
//=====================================================================
//= OListAndComboImport
//=====================================================================
...
...
@@ -560,6 +578,9 @@ namespace xmloff
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
* Revision 1.7 2001/01/24 09:37:58 fs
* OFormImport: call enter-/leaveEventContext when starting/ending the element
*
* Revision 1.6 2001/01/03 16:25:34 fs
* file format change (extra wrapper element for controls, similar to columns)
*
...
...
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