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
ce9caa96
Kaydet (Commit)
ce9caa96
authored
Eki 23, 2000
tarafından
Daniel Rentz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
rmv: XMLBoolValuesPropHdl
add: constructors for XMLNumberNonePropHdl
üst
943577be
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
70 deletions
+32
-70
prhdlfac.cxx
xmloff/source/style/prhdlfac.cxx
+8
-2
xmlbahdl.cxx
xmloff/source/style/xmlbahdl.cxx
+18
-48
xmlbahdl.hxx
xmloff/source/style/xmlbahdl.hxx
+6
-20
No files found.
xmloff/source/style/prhdlfac.cxx
Dosyayı görüntüle @
ce9caa96
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: prhdlfac.cxx,v $
*
* $Revision: 1.
4
$
* $Revision: 1.
5
$
*
* last change: $Author:
cl $ $Date: 2000-10-20 14:53:32
$
* last change: $Author:
dr $ $Date: 2000-10-23 09:54:37
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -230,6 +230,12 @@ const XMLPropertyHandler* XMLPropertyHandlerFactory::GetBasicHandler( sal_Int32
case
XML_TYPE_NUMBER_NONE
:
pPropHdl
=
new
XMLNumberNonePropHdl
;
break
;
case
XML_TYPE_NUMBER8_NONE
:
pPropHdl
=
new
XMLNumberNonePropHdl
(
1
);
break
;
case
XML_TYPE_NUMBER16_NONE
:
pPropHdl
=
new
XMLNumberNonePropHdl
(
2
);
break
;
case
XML_TYPE_DOUBLE
:
pPropHdl
=
new
XMLDoublePropHdl
;
break
;
...
...
xmloff/source/style/xmlbahdl.cxx
Dosyayı görüntüle @
ce9caa96
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlbahdl.cxx,v $
*
* $Revision: 1.
4
$
* $Revision: 1.
5
$
*
* last change: $Author: dr $ $Date: 2000-10-2
0 16:35:5
7 $
* last change: $Author: dr $ $Date: 2000-10-2
3 09:54:3
7 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -179,6 +179,18 @@ sal_Bool XMLNumberPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue,
// class XMLNumberNonePropHdl
//
XMLNumberNonePropHdl
::
XMLNumberNonePropHdl
(
sal_Int8
nB
)
:
sZeroStr
(
RTL_CONSTASCII_USTRINGPARAM
(
sXML_no_limit
)
),
nBytes
(
nB
)
{
}
XMLNumberNonePropHdl
::
XMLNumberNonePropHdl
(
const
sal_Char
*
sZeroString
,
sal_Int8
nB
)
:
sZeroStr
(
OUString
::
createFromAscii
(
sZeroString
)
),
nBytes
(
nB
)
{
}
XMLNumberNonePropHdl
::~
XMLNumberNonePropHdl
()
{
// nothing to do
...
...
@@ -189,7 +201,7 @@ sal_Bool XMLNumberNonePropHdl::importXML( const OUString& rStrImpValue, Any& rVa
sal_Bool
bRet
=
sal_False
;
sal_Int32
nValue
;
if
(
rStrImpValue
.
compareToAscii
(
sXML_no_limit
)
==
0
)
if
(
rStrImpValue
==
sZeroStr
)
{
nValue
=
0
;
bRet
=
sal_True
;
...
...
@@ -198,7 +210,7 @@ sal_Bool XMLNumberNonePropHdl::importXML( const OUString& rStrImpValue, Any& rVa
{
bRet
=
rUnitConverter
.
convertNumber
(
nValue
,
rStrImpValue
);
}
rValue
<<=
nValue
;
lcl_xmloff_setAny
(
rValue
,
nValue
,
nBytes
)
;
return
bRet
;
}
...
...
@@ -208,13 +220,13 @@ sal_Bool XMLNumberNonePropHdl::exportXML( OUString& rStrExpValue, const Any& rVa
sal_Bool
bRet
=
sal_False
;
sal_Int32
nValue
;
if
(
rValue
>>=
nValue
)
if
(
lcl_xmloff_getAny
(
rValue
,
nValue
,
nBytes
)
)
{
OUStringBuffer
aOut
;
if
(
nValue
==
0
)
{
aOut
.
append
Ascii
(
sXML_no_limit
);
aOut
.
append
(
sZeroStr
);
}
else
{
...
...
@@ -586,45 +598,3 @@ sal_Bool XMLCompareOnlyPropHdl::exportXML( OUString& rStrExpValue, const Any& rV
return
sal_False
;
}
///////////////////////////////////////////////////////////////////////////////
//
// class XMLBoolValuesPropHdl
//
XMLBoolValuesPropHdl
::
XMLBoolValuesPropHdl
(
const
sal_Char
*
sTrueValue
,
const
sal_Char
*
sFalseValue
)
:
sTrueVal
(
OUString
::
createFromAscii
(
sTrueValue
)
),
sFalseVal
(
OUString
::
createFromAscii
(
sFalseValue
)
)
{
}
XMLBoolValuesPropHdl
::~
XMLBoolValuesPropHdl
()
{
}
sal_Bool
XMLBoolValuesPropHdl
::
importXML
(
const
OUString
&
rStrImpValue
,
Any
&
rValue
,
const
SvXMLUnitConverter
&
rUnitConverter
)
const
{
sal_Bool
bTrue
=
(
rStrImpValue
==
sTrueVal
);
sal_Bool
bFalse
=
!
bTrue
&&
(
rStrImpValue
==
sFalseVal
);
if
(
bTrue
||
bFalse
)
setBOOL
(
rValue
,
bTrue
);
return
(
bTrue
||
bFalse
);
}
sal_Bool
XMLBoolValuesPropHdl
::
exportXML
(
OUString
&
rStrExpValue
,
const
Any
&
rValue
,
const
SvXMLUnitConverter
&
rUnitConverter
)
const
{
rStrExpValue
=
getBOOL
(
rValue
)
?
sTrueVal
:
sFalseVal
;
return
sal_True
;
}
xmloff/source/style/xmlbahdl.hxx
Dosyayı görüntüle @
ce9caa96
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlbahdl.hxx,v $
*
* $Revision: 1.
4
$
* $Revision: 1.
5
$
*
* last change: $Author: dr $ $Date: 2000-10-2
0 16:35:5
7 $
* last change: $Author: dr $ $Date: 2000-10-2
3 09:54:3
7 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -90,7 +90,11 @@ public:
*/
class
XMLNumberNonePropHdl
:
public
XMLPropertyHandler
{
::
rtl
::
OUString
sZeroStr
;
sal_Int8
nBytes
;
public
:
XMLNumberNonePropHdl
(
sal_Int8
nB
=
4
);
XMLNumberNonePropHdl
(
const
sal_Char
*
sZeroString
,
sal_Int8
nB
=
4
);
virtual
~
XMLNumberNonePropHdl
();
virtual
sal_Bool
importXML
(
const
::
rtl
::
OUString
&
rStrImpValue
,
::
com
::
sun
::
star
::
uno
::
Any
&
rValue
,
const
SvXMLUnitConverter
&
rUnitConverter
)
const
;
...
...
@@ -222,23 +226,5 @@ public:
virtual
sal_Bool
exportXML
(
::
rtl
::
OUString
&
rStrExpValue
,
const
::
com
::
sun
::
star
::
uno
::
Any
&
rValue
,
const
SvXMLUnitConverter
&
rUnitConverter
)
const
;
};
/**
A property handler for a boolean property that is represented by two
different strings
*/
class
XMLBoolValuesPropHdl
:
public
XMLPropertyHandler
{
protected
:
::
rtl
::
OUString
sTrueVal
;
::
rtl
::
OUString
sFalseVal
;
public
:
XMLBoolValuesPropHdl
(
const
sal_Char
*
sTrueValue
,
const
sal_Char
*
sFalseValue
);
virtual
~
XMLBoolValuesPropHdl
();
virtual
sal_Bool
importXML
(
const
::
rtl
::
OUString
&
rStrImpValue
,
::
com
::
sun
::
star
::
uno
::
Any
&
rValue
,
const
SvXMLUnitConverter
&
rUnitConverter
)
const
;
virtual
sal_Bool
exportXML
(
::
rtl
::
OUString
&
rStrExpValue
,
const
::
com
::
sun
::
star
::
uno
::
Any
&
rValue
,
const
SvXMLUnitConverter
&
rUnitConverter
)
const
;
};
#endif // _XMLOFF_PROPERTYHANDLER_BASICTYPES_HXX
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