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
4e6bde63
Kaydet (Commit)
4e6bde63
authored
Ara 13, 2000
tarafından
Frank Schönheit
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
initial checkin - helper class for meta data for the different value properties
üst
e113c936
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
292 additions
and
0 deletions
+292
-0
valueproperties.cxx
xmloff/source/forms/valueproperties.cxx
+175
-0
valueproperties.hxx
xmloff/source/forms/valueproperties.hxx
+117
-0
No files found.
xmloff/source/forms/valueproperties.cxx
0 → 100644
Dosyayı görüntüle @
4e6bde63
/*************************************************************************
*
* $RCSfile: valueproperties.cxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: fs $ $Date: 2000-12-13 10:36:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc..
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _XMLOFF_FORMS_VALUEPROPERTIES_HXX_
#include "valueproperties.hxx"
#endif
#ifndef _XMLOFF_FORMS_STRINGS_HXX_
#include "strings.hxx"
#endif
#ifndef _COM_SUN_STAR_FORM_FORMCOMPONENTTYPE_HPP_
#include <com/sun/star/form/FormComponentType.hpp>
#endif
//.........................................................................
namespace
xmloff
{
//.........................................................................
using
namespace
::
com
::
sun
::
star
::
form
;
//=====================================================================
//= OValuePropertiesMetaData
//=====================================================================
//---------------------------------------------------------------------
void
OValuePropertiesMetaData
::
getValuePropertyNames
(
OControlElement
::
ElementType
_eType
,
sal_Int16
_nFormComponentType
,
sal_Char
const
*
&
_rpCurrentValuePropertyName
,
sal_Char
const
*
&
_rpValuePropertyName
)
{
// reset the pointers in case we can't determine the property names
_rpCurrentValuePropertyName
=
_rpValuePropertyName
=
NULL
;
switch
(
_nFormComponentType
)
{
case
FormComponentType
:
:
TEXTFIELD
:
if
(
OControlElement
::
FORMATTED_TEXT
==
_eType
)
{
_rpCurrentValuePropertyName
=
PROPERTY_EFFECTIVE_VALUE
;
_rpValuePropertyName
=
PROPERTY_EFFECTIVE_DEFAULT
;
}
else
{
_rpCurrentValuePropertyName
=
PROPERTY_TEXT
;
_rpValuePropertyName
=
PROPERTY_DEFAULT_TEXT
;
}
break
;
case
FormComponentType
:
:
DATEFIELD
:
_rpCurrentValuePropertyName
=
PROPERTY_DATE
;
_rpValuePropertyName
=
PROPERTY_DEFAULT_DATE
;
break
;
case
FormComponentType
:
:
TIMEFIELD
:
_rpCurrentValuePropertyName
=
PROPERTY_TIME
;
_rpValuePropertyName
=
PROPERTY_DEFAULT_TIME
;
break
;
case
FormComponentType
:
:
NUMERICFIELD
:
case
FormComponentType
:
:
CURRENCYFIELD
:
_rpCurrentValuePropertyName
=
PROPERTY_VALUE
;
_rpValuePropertyName
=
PROPERTY_DEFAULT_VALUE
;
break
;
case
FormComponentType
:
:
PATTERNFIELD
:
case
FormComponentType
:
:
FILECONTROL
:
case
FormComponentType
:
:
COMBOBOX
:
_rpValuePropertyName
=
PROPERTY_DEFAULT_TEXT
;
// NO BREAK!!
case
FormComponentType
:
:
COMMANDBUTTON
:
_rpCurrentValuePropertyName
=
PROPERTY_TEXT
;
break
;
case
FormComponentType
:
:
CHECKBOX
:
case
FormComponentType
:
:
RADIOBUTTON
:
_rpValuePropertyName
=
PROPERTY_REFVALUE
;
break
;
case
FormComponentType
:
:
HIDDENCONTROL
:
_rpValuePropertyName
=
PROPERTY_VALUE
;
break
;
}
}
//---------------------------------------------------------------------
void
OValuePropertiesMetaData
::
getValueLimitPropertyNames
(
sal_Int16
_nFormComponentType
,
sal_Char
const
*
&
_rpMinValuePropertyName
,
sal_Char
const
*
&
_rpMaxValuePropertyName
)
{
_rpMinValuePropertyName
=
_rpMinValuePropertyName
=
NULL
;
switch
(
_nFormComponentType
)
{
case
FormComponentType
:
:
DATEFIELD
:
_rpMinValuePropertyName
=
PROPERTY_DATE_MIN
;
_rpMaxValuePropertyName
=
PROPERTY_DATE_MAX
;
break
;
case
FormComponentType
:
:
TIMEFIELD
:
_rpMinValuePropertyName
=
PROPERTY_TIME_MIN
;
_rpMaxValuePropertyName
=
PROPERTY_TIME_MAX
;
break
;
case
FormComponentType
:
:
NUMERICFIELD
:
case
FormComponentType
:
:
CURRENCYFIELD
:
_rpMinValuePropertyName
=
PROPERTY_VALUE_MIN
;
_rpMaxValuePropertyName
=
PROPERTY_VALUE_MAX
;
break
;
case
FormComponentType
:
:
PATTERNFIELD
:
// no min/max value for the pattern field
break
;
case
FormComponentType
:
:
TEXTFIELD
:
_rpMinValuePropertyName
=
PROPERTY_EFFECTIVE_MIN
;
_rpMaxValuePropertyName
=
PROPERTY_EFFECTIVE_MAX
;
break
;
}
}
//.........................................................................
}
// namespace xmloff
//.........................................................................
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
*
* Revision 1.0 12.12.00 14:14:36 fs
************************************************************************/
xmloff/source/forms/valueproperties.hxx
0 → 100644
Dosyayı görüntüle @
4e6bde63
/*************************************************************************
*
* $RCSfile: valueproperties.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: fs $ $Date: 2000-12-13 10:36:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc..
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _XMLOFF_FORMS_VALUEPROPERTIES_HXX_
#define _XMLOFF_FORMS_VALUEPROPERTIES_HXX_
#ifndef _XMLOFF_FORMS_CONTROLELEMENT_HXX_
#include "controlelement.hxx"
#endif
//.........................................................................
namespace
xmloff
{
//.........................................................................
//=====================================================================
//= OValuePropertiesMetaData
//=====================================================================
class
OValuePropertiesMetaData
{
protected
:
OValuePropertiesMetaData
()
{
}
public
:
/** calculate the property names for the <em>current-value</em> and the <em>value</em> attribute.
<p>If controls of the given FormComponentType do not have any of the properties requested,
the respective out parameter will be set to NULL.</p>
*/
static
void
getValuePropertyNames
(
OControlElement
::
ElementType
_eType
,
sal_Int16
_nFormComponentType
,
sal_Char
const
*
&
_rpCurrentValuePropertyName
,
sal_Char
const
*
&
_rpValuePropertyName
);
/** calculate the property names for the <em>min-value</em> and the <em>max-value</em> attribute.
<p>If controls of the given FormComponentType do not have any of the properties requested,
the respective out parameter will be set to NULL.</p>
*/
static
void
getValueLimitPropertyNames
(
sal_Int16
_nFormComponentType
,
sal_Char
const
*
&
_rpMinValuePropertyName
,
sal_Char
const
*
&
_rpMaxValuePropertyName
);
};
//.........................................................................
}
// namespace xmloff
//.........................................................................
#endif // _XMLOFF_FORMS_VALUEPROPERTIES_HXX_
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
*
* Revision 1.0 12.12.00 13:22:54 fs
************************************************************************/
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