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
c903c377
Kaydet (Commit)
c903c377
authored
Nis 18, 2013
tarafından
Noel Power
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix fdo#63659 restore handling of ZOOM MID, MID_VALUESET & MID_TYPE sub parmas
Change-Id: I01eff3bb8b194e1437a263e527cb8e6d2defa4de
üst
96488510
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
40 deletions
+84
-40
zoomitem.cxx
sfx2/source/doc/zoomitem.cxx
+84
-40
No files found.
sfx2/source/doc/zoomitem.cxx
Dosyayı görüntüle @
c903c377
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
#include <sfx2/zoomitem.hxx>
#include <sfx2/zoomitem.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include "sfx.hrc"
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
TYPEINIT1_FACTORY
(
SvxZoomItem
,
SfxUInt16Item
,
new
SvxZoomItem
);
TYPEINIT1_FACTORY
(
SvxZoomItem
,
SfxUInt16Item
,
new
SvxZoomItem
);
...
@@ -107,19 +107,28 @@ int SvxZoomItem::operator==( const SfxPoolItem& rAttr ) const
...
@@ -107,19 +107,28 @@ int SvxZoomItem::operator==( const SfxPoolItem& rAttr ) const
bool
SvxZoomItem
::
QueryValue
(
com
::
sun
::
star
::
uno
::
Any
&
rVal
,
sal_uInt8
nMemberId
)
const
bool
SvxZoomItem
::
QueryValue
(
com
::
sun
::
star
::
uno
::
Any
&
rVal
,
sal_uInt8
nMemberId
)
const
{
{
// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId
&=
~
CONVERT_TWIPS
;
nMemberId
&=
~
CONVERT_TWIPS
;
switch
(
nMemberId
)
{
case
0
:
{
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>
aSeq
(
ZOOM_PARAMS
);
aSeq
[
0
].
Name
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
ZOOM_PARAM_VALUE
));
aSeq
[
0
].
Value
<<=
sal_Int32
(
GetValue
()
);
aSeq
[
1
].
Name
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
ZOOM_PARAM_VALUESET
));
aSeq
[
1
].
Value
<<=
sal_Int16
(
nValueSet
);
aSeq
[
2
].
Name
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
ZOOM_PARAM_TYPE
));
aSeq
[
2
].
Value
<<=
sal_Int16
(
eType
);
rVal
<<=
aSeq
;
}
assert
(
nMemberId
==
0
);
case
MID_VALUE
:
rVal
<<=
(
sal_Int32
)
GetValue
();
break
;
case
MID_VALUESET
:
rVal
<<=
(
sal_Int16
)
nValueSet
;
break
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>
aSeq
(
ZOOM_PARAMS
);
case
MID_TYPE
:
rVal
<<=
(
sal_Int16
)
eType
;
break
;
aSeq
[
0
].
Name
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
ZOOM_PARAM_VALUE
));
default
:
aSeq
[
0
].
Value
<<=
sal_Int32
(
GetValue
()
);
OSL_FAIL
(
"sfx2::SvxZoomItem::QueryValue(), Wrong MemberId!"
);
aSeq
[
1
].
Name
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
ZOOM_PARAM_VALUESET
));
return
false
;
aSeq
[
1
].
Value
<<=
sal_Int16
(
nValueSet
);
}
aSeq
[
2
].
Name
=
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
ZOOM_PARAM_TYPE
));
aSeq
[
2
].
Value
<<=
sal_Int16
(
eType
);
rVal
<<=
aSeq
;
return
true
;
return
true
;
}
}
...
@@ -127,45 +136,80 @@ bool SvxZoomItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberI
...
@@ -127,45 +136,80 @@ bool SvxZoomItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberI
bool
SvxZoomItem
::
PutValue
(
const
com
::
sun
::
star
::
uno
::
Any
&
rVal
,
sal_uInt8
nMemberId
)
bool
SvxZoomItem
::
PutValue
(
const
com
::
sun
::
star
::
uno
::
Any
&
rVal
,
sal_uInt8
nMemberId
)
{
{
nMemberId
&=
~
CONVERT_TWIPS
;
nMemberId
&=
~
CONVERT_TWIPS
;
assert
(
nMemberId
==
0
);
switch
(
nMemberId
)
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>
aSeq
;
if
((
rVal
>>=
aSeq
)
&&
(
aSeq
.
getLength
()
==
ZOOM_PARAMS
))
{
{
sal_Int32
nValueTmp
(
0
);
case
0
:
sal_Int16
nValueSetTmp
(
0
);
sal_Int16
nTypeTmp
(
0
);
sal_Bool
bAllConverted
(
sal_True
);
sal_Int16
nConvertedCount
(
0
);
for
(
sal_Int32
i
=
0
;
i
<
aSeq
.
getLength
();
i
++
)
{
{
if
(
aSeq
[
i
].
Name
.
equalsAscii
(
ZOOM_PARAM_VALUE
))
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>
aSeq
;
{
if
((
rVal
>>=
aSeq
)
&&
(
aSeq
.
getLength
()
==
ZOOM_PARAMS
))
bAllConverted
&=
(
aSeq
[
i
].
Value
>>=
nValueTmp
);
++
nConvertedCount
;
}
else
if
(
aSeq
[
i
].
Name
.
equalsAscii
(
ZOOM_PARAM_VALUESET
))
{
{
bAllConverted
&=
(
aSeq
[
i
].
Value
>>=
nValueSetTmp
);
sal_Int32
nValueTmp
(
0
);
++
nConvertedCount
;
sal_Int16
nValueSetTmp
(
0
);
sal_Int16
nTypeTmp
(
0
);
sal_Bool
bAllConverted
(
sal_True
);
sal_Int16
nConvertedCount
(
0
);
for
(
sal_Int32
i
=
0
;
i
<
aSeq
.
getLength
();
i
++
)
{
if
(
aSeq
[
i
].
Name
.
equalsAscii
(
ZOOM_PARAM_VALUE
))
{
bAllConverted
&=
(
aSeq
[
i
].
Value
>>=
nValueTmp
);
++
nConvertedCount
;
}
else
if
(
aSeq
[
i
].
Name
.
equalsAscii
(
ZOOM_PARAM_VALUESET
))
{
bAllConverted
&=
(
aSeq
[
i
].
Value
>>=
nValueSetTmp
);
++
nConvertedCount
;
}
else
if
(
aSeq
[
i
].
Name
.
equalsAscii
(
ZOOM_PARAM_TYPE
))
{
bAllConverted
&=
(
aSeq
[
i
].
Value
>>=
nTypeTmp
);
++
nConvertedCount
;
}
}
if
(
bAllConverted
&&
nConvertedCount
==
ZOOM_PARAMS
)
{
SetValue
(
(
sal_uInt16
)
nValueTmp
);
nValueSet
=
nValueSetTmp
;
eType
=
SvxZoomType
(
nTypeTmp
);
return
true
;
}
}
}
else
if
(
aSeq
[
i
].
Name
.
equalsAscii
(
ZOOM_PARAM_TYPE
))
return
false
;
}
case
MID_VALUE
:
{
sal_Int32
nVal
=
0
;
if
(
rVal
>>=
nVal
)
{
{
bAllConverted
&=
(
aSeq
[
i
].
Value
>>=
nTypeTmp
);
SetValue
(
(
sal_uInt16
)
nVal
);
++
nConvertedCount
;
return
true
;
}
}
else
return
false
;
}
}
if
(
bAllConverted
&&
nConvertedCount
==
ZOOM_PARAMS
)
case
MID_VALUESET
:
case
MID_TYPE
:
{
{
SetValue
(
(
sal_uInt16
)
nValueTmp
);
sal_Int16
nVal
=
sal_Int16
();
nValueSet
=
nValueSetTmp
;
if
(
rVal
>>=
nVal
)
eType
=
SvxZoomType
(
nTypeTmp
);
{
return
true
;
if
(
nMemberId
==
MID_VALUESET
)
nValueSet
=
(
sal_Int16
)
nVal
;
else
if
(
nMemberId
==
MID_TYPE
)
eType
=
SvxZoomType
(
(
sal_Int16
)
nVal
);
return
true
;
}
else
return
false
;
}
}
}
return
false
;
default
:
OSL_FAIL
(
"sfx2::SvxZoomItem::PutValue(), Wrong MemberId!"
);
return
false
;
}
return
true
;
}
}
/* 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