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
18c7992d
Kaydet (Commit)
18c7992d
authored
Nis 06, 2014
tarafından
Thomas Arnhold
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
no need for those static strings
üst
532b69fb
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
62 additions
and
101 deletions
+62
-101
vbabutton.cxx
vbahelper/source/msforms/vbabutton.cxx
+2
-4
vbacheckbox.cxx
vbahelper/source/msforms/vbacheckbox.cxx
+5
-8
vbacombobox.cxx
vbahelper/source/msforms/vbacombobox.cxx
+4
-8
vbacontrol.cxx
vbahelper/source/msforms/vbacontrol.cxx
+1
-2
vbaframe.cxx
vbahelper/source/msforms/vbaframe.cxx
+2
-5
vbalabel.cxx
vbahelper/source/msforms/vbalabel.cxx
+2
-4
vbalistbox.cxx
vbahelper/source/msforms/vbalistbox.cxx
+10
-15
vbalistcontrolhelper.cxx
vbahelper/source/msforms/vbalistcontrolhelper.cxx
+8
-10
vbaradiobutton.cxx
vbahelper/source/msforms/vbaradiobutton.cxx
+5
-8
vbascrollbar.cxx
vbahelper/source/msforms/vbascrollbar.cxx
+11
-17
vbaspinbutton.cxx
vbahelper/source/msforms/vbaspinbutton.cxx
+7
-11
vbatogglebutton.cxx
vbahelper/source/msforms/vbatogglebutton.cxx
+5
-9
No files found.
vbahelper/source/msforms/vbabutton.cxx
Dosyayı görüntüle @
18c7992d
...
...
@@ -23,8 +23,6 @@
using
namespace
com
::
sun
::
star
;
using
namespace
ooo
::
vba
;
const
static
OUString
LABEL
(
"Label"
);
VbaButton
::
VbaButton
(
const
uno
::
Reference
<
XHelperInterface
>&
xParent
,
const
uno
::
Reference
<
uno
::
XComponentContext
>&
xContext
,
const
uno
::
Reference
<
uno
::
XInterface
>&
xControl
,
const
uno
::
Reference
<
frame
::
XModel
>&
xModel
,
AbstractGeometryAttributes
*
pGeomHelper
)
:
ButtonImpl_BASE
(
xParent
,
xContext
,
xControl
,
xModel
,
pGeomHelper
)
{
}
...
...
@@ -34,14 +32,14 @@ OUString SAL_CALL
VbaButton
::
getCaption
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
OUString
Label
;
m_xProps
->
getPropertyValue
(
LABEL
)
>>=
Label
;
m_xProps
->
getPropertyValue
(
"Label"
)
>>=
Label
;
return
Label
;
}
void
SAL_CALL
VbaButton
::
setCaption
(
const
OUString
&
_caption
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
{
m_xProps
->
setPropertyValue
(
LABEL
,
uno
::
makeAny
(
_caption
)
);
m_xProps
->
setPropertyValue
(
"Label"
,
uno
::
makeAny
(
_caption
)
);
}
sal_Bool
SAL_CALL
VbaButton
::
getAutoSize
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
...
...
vbahelper/source/msforms/vbacheckbox.cxx
Dosyayı görüntüle @
18c7992d
...
...
@@ -24,9 +24,6 @@
using
namespace
com
::
sun
::
star
;
using
namespace
ooo
::
vba
;
const
static
OUString
LABEL
(
"Label"
);
const
static
OUString
STATE
(
"State"
);
ScVbaCheckbox
::
ScVbaCheckbox
(
const
uno
::
Reference
<
ov
::
XHelperInterface
>&
xParent
,
const
uno
::
Reference
<
uno
::
XComponentContext
>&
xContext
,
const
uno
::
Reference
<
uno
::
XInterface
>&
xControl
,
const
uno
::
Reference
<
frame
::
XModel
>&
xModel
,
ov
::
AbstractGeometryAttributes
*
pGeomHelper
)
:
CheckBoxImpl_BASE
(
xParent
,
xContext
,
xControl
,
xModel
,
pGeomHelper
)
{
}
...
...
@@ -36,21 +33,21 @@ OUString SAL_CALL
ScVbaCheckbox
::
getCaption
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
OUString
Label
;
m_xProps
->
getPropertyValue
(
LABEL
)
>>=
Label
;
m_xProps
->
getPropertyValue
(
"Label"
)
>>=
Label
;
return
Label
;
}
void
SAL_CALL
ScVbaCheckbox
::
setCaption
(
const
OUString
&
_caption
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
{
m_xProps
->
setPropertyValue
(
LABEL
,
uno
::
makeAny
(
_caption
)
);
m_xProps
->
setPropertyValue
(
"Label"
,
uno
::
makeAny
(
_caption
)
);
}
uno
::
Any
SAL_CALL
ScVbaCheckbox
::
getValue
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
sal_Int16
nValue
=
-
1
;
m_xProps
->
getPropertyValue
(
STATE
)
>>=
nValue
;
m_xProps
->
getPropertyValue
(
"State"
)
>>=
nValue
;
if
(
nValue
!=
0
)
nValue
=
-
1
;
// return uno::makeAny( nValue );
...
...
@@ -64,7 +61,7 @@ ScVbaCheckbox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeExcept
{
sal_Int16
nValue
=
0
;
sal_Int16
nOldValue
=
0
;
m_xProps
->
getPropertyValue
(
STATE
)
>>=
nOldValue
;
m_xProps
->
getPropertyValue
(
"State"
)
>>=
nOldValue
;
if
(
!
(
_value
>>=
nValue
)
)
{
sal_Bool
bValue
=
false
;
...
...
@@ -75,7 +72,7 @@ ScVbaCheckbox::setValue( const uno::Any& _value ) throw (css::uno::RuntimeExcept
if
(
nValue
==
-
1
)
nValue
=
1
;
m_xProps
->
setPropertyValue
(
STATE
,
uno
::
makeAny
(
nValue
)
);
m_xProps
->
setPropertyValue
(
"State"
,
uno
::
makeAny
(
nValue
)
);
if
(
nValue
!=
nOldValue
)
fireClickEvent
();
}
...
...
vbahelper/source/msforms/vbacombobox.cxx
Dosyayı görüntüle @
18c7992d
...
...
@@ -37,17 +37,13 @@ using namespace ooo::vba;
//SelectedItems list of integer indexes
//StringItemList list of items
const
static
OUString
TEXT
(
"Text"
);
const
static
OUString
ITEMS
(
"StringItemList"
);
const
static
OUString
CONTROLSOURCEPROP
(
"DataFieldProperty"
);
ScVbaComboBox
::
ScVbaComboBox
(
const
uno
::
Reference
<
XHelperInterface
>&
xParent
,
const
uno
::
Reference
<
uno
::
XComponentContext
>&
xContext
,
const
uno
::
Reference
<
uno
::
XInterface
>&
xControl
,
const
uno
::
Reference
<
frame
::
XModel
>&
xModel
,
AbstractGeometryAttributes
*
pGeomHelper
)
:
ComboBoxImpl_BASE
(
xParent
,
xContext
,
xControl
,
xModel
,
pGeomHelper
)
{
mpListHelper
.
reset
(
new
ListControlHelper
(
m_xProps
)
);
try
{
// grab the default value property name
m_xProps
->
getPropertyValue
(
CONTROLSOURCEPROP
)
>>=
sSourceName
;
m_xProps
->
getPropertyValue
(
"DataFieldProperty"
)
>>=
sSourceName
;
}
catch
(
uno
::
Exception
&
)
{
...
...
@@ -76,11 +72,11 @@ ScVbaComboBox::setListIndex( const uno::Any& _value ) throw (uno::RuntimeExcepti
sal_Int32
nOldIndex
=
-
1
;
getListIndex
()
>>=
nOldIndex
;
uno
::
Sequence
<
OUString
>
sItems
;
m_xProps
->
getPropertyValue
(
ITEMS
)
>>=
sItems
;
m_xProps
->
getPropertyValue
(
"StringItemList"
)
>>=
sItems
;
if
(
(
nIndex
>=
0
)
&&
(
sItems
.
getLength
()
>
nIndex
)
)
{
OUString
sText
=
sItems
[
nIndex
];
m_xProps
->
setPropertyValue
(
TEXT
,
uno
::
makeAny
(
sText
)
);
m_xProps
->
setPropertyValue
(
"Text"
,
uno
::
makeAny
(
sText
)
);
// fire the _Change event
if
(
nOldIndex
!=
nIndex
)
...
...
@@ -93,7 +89,7 @@ uno::Any SAL_CALL
ScVbaComboBox
::
getListIndex
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
uno
::
Sequence
<
OUString
>
sItems
;
m_xProps
->
getPropertyValue
(
ITEMS
)
>>=
sItems
;
m_xProps
->
getPropertyValue
(
"StringItemList"
)
>>=
sItems
;
// should really return the item that has focus regardless of
// it been selected
if
(
sItems
.
getLength
()
>
0
)
...
...
vbahelper/source/msforms/vbacontrol.cxx
Dosyayı görüntüle @
18c7992d
...
...
@@ -608,8 +608,7 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R
{
uno
::
Reference
<
beans
::
XPropertySet
>
xProps
(
xControlShape
->
getControl
(),
uno
::
UNO_QUERY_THROW
);
sal_Int32
nClassId
=
-
1
;
const
static
OUString
sClassId
(
"ClassId"
);
xProps
->
getPropertyValue
(
sClassId
)
>>=
nClassId
;
xProps
->
getPropertyValue
(
"ClassId"
)
>>=
nClassId
;
uno
::
Reference
<
XHelperInterface
>
xVbaParent
;
// #FIXME - should be worksheet I guess
uno
::
Reference
<
drawing
::
XShape
>
xShape
(
xControlShape
,
uno
::
UNO_QUERY_THROW
);
::
std
::
auto_ptr
<
ConcreteXShapeGeometryAttributes
>
xGeoHelper
(
new
ConcreteXShapeGeometryAttributes
(
xContext
,
xShape
)
);
...
...
vbahelper/source/msforms/vbaframe.cxx
Dosyayı görüntüle @
18c7992d
...
...
@@ -26,9 +26,6 @@
using
namespace
com
::
sun
::
star
;
using
namespace
ooo
::
vba
;
const
static
OUString
LABEL
(
"Label"
);
ScVbaFrame
::
ScVbaFrame
(
const
uno
::
Reference
<
XHelperInterface
>&
xParent
,
const
uno
::
Reference
<
uno
::
XComponentContext
>&
xContext
,
...
...
@@ -46,13 +43,13 @@ ScVbaFrame::ScVbaFrame(
OUString
SAL_CALL
ScVbaFrame
::
getCaption
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
OUString
Label
;
m_xProps
->
getPropertyValue
(
LABEL
)
>>=
Label
;
m_xProps
->
getPropertyValue
(
"Label"
)
>>=
Label
;
return
Label
;
}
void
SAL_CALL
ScVbaFrame
::
setCaption
(
const
OUString
&
_caption
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
{
m_xProps
->
setPropertyValue
(
LABEL
,
uno
::
makeAny
(
_caption
)
);
m_xProps
->
setPropertyValue
(
"Label"
,
uno
::
makeAny
(
_caption
)
);
}
sal_Int32
SAL_CALL
ScVbaFrame
::
getSpecialEffect
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
...
...
vbahelper/source/msforms/vbalabel.cxx
Dosyayı görüntüle @
18c7992d
...
...
@@ -23,8 +23,6 @@
using
namespace
com
::
sun
::
star
;
using
namespace
ooo
::
vba
;
const
static
OUString
LABEL
(
"Label"
);
ScVbaLabel
::
ScVbaLabel
(
const
css
::
uno
::
Reference
<
XHelperInterface
>&
xParent
,
const
uno
::
Reference
<
uno
::
XComponentContext
>&
xContext
,
const
uno
::
Reference
<
uno
::
XInterface
>&
xControl
,
const
uno
::
Reference
<
frame
::
XModel
>&
xModel
,
ov
::
AbstractGeometryAttributes
*
pGeomHelper
)
:
LabelImpl_BASE
(
xParent
,
xContext
,
xControl
,
xModel
,
pGeomHelper
)
{
}
...
...
@@ -34,14 +32,14 @@ OUString SAL_CALL
ScVbaLabel
::
getCaption
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
OUString
Label
;
m_xProps
->
getPropertyValue
(
LABEL
)
>>=
Label
;
m_xProps
->
getPropertyValue
(
"Label"
)
>>=
Label
;
return
Label
;
}
void
SAL_CALL
ScVbaLabel
::
setCaption
(
const
OUString
&
_caption
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
{
m_xProps
->
setPropertyValue
(
LABEL
,
uno
::
makeAny
(
_caption
)
);
m_xProps
->
setPropertyValue
(
"Label"
,
uno
::
makeAny
(
_caption
)
);
}
uno
::
Any
SAL_CALL
ScVbaLabel
::
getValue
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
...
...
vbahelper/source/msforms/vbalistbox.cxx
Dosyayı görüntüle @
18c7992d
...
...
@@ -27,11 +27,6 @@
using
namespace
com
::
sun
::
star
;
using
namespace
ooo
::
vba
;
const
static
OUString
TEXT
(
"Text"
);
const
static
OUString
SELECTEDITEMS
(
"SelectedItems"
);
const
static
OUString
ITEMS
(
"StringItemList"
);
ScVbaListBox
::
ScVbaListBox
(
const
uno
::
Reference
<
XHelperInterface
>&
xParent
,
const
uno
::
Reference
<
uno
::
XComponentContext
>&
xContext
,
const
uno
::
Reference
<
css
::
uno
::
XInterface
>&
xControl
,
const
uno
::
Reference
<
frame
::
XModel
>&
xModel
,
AbstractGeometryAttributes
*
pGeomHelper
)
:
ListBoxImpl_BASE
(
xParent
,
xContext
,
xControl
,
xModel
,
pGeomHelper
)
,
m_nIndex
(
0
)
...
...
@@ -53,7 +48,7 @@ uno::Any SAL_CALL
ScVbaListBox
::
getListIndex
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
uno
::
Sequence
<
sal_Int16
>
sSelection
;
m_xProps
->
getPropertyValue
(
SELECTEDITEMS
)
>>=
sSelection
;
m_xProps
->
getPropertyValue
(
"SelectedItems"
)
>>=
sSelection
;
if
(
sSelection
.
getLength
()
==
0
)
return
uno
::
Any
(
sal_Int32
(
-
1
)
);
return
uno
::
Any
(
sSelection
[
0
]
);
...
...
@@ -64,8 +59,8 @@ ScVbaListBox::getValue() throw (uno::RuntimeException, std::exception)
{
uno
::
Sequence
<
sal_Int16
>
sSelection
;
uno
::
Sequence
<
OUString
>
sItems
;
m_xProps
->
getPropertyValue
(
SELECTEDITEMS
)
>>=
sSelection
;
m_xProps
->
getPropertyValue
(
ITEMS
)
>>=
sItems
;
m_xProps
->
getPropertyValue
(
"SelectedItems"
)
>>=
sSelection
;
m_xProps
->
getPropertyValue
(
"StringItemList"
)
>>=
sItems
;
if
(
getMultiSelect
()
)
throw
uno
::
RuntimeException
(
"Attribute use invalid."
,
uno
::
Reference
<
uno
::
XInterface
>
()
);
uno
::
Any
aRet
;
...
...
@@ -83,7 +78,7 @@ ScVbaListBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException, s
}
OUString
sValue
=
getAnyAsString
(
_value
);
uno
::
Sequence
<
OUString
>
sList
;
m_xProps
->
getPropertyValue
(
ITEMS
)
>>=
sList
;
m_xProps
->
getPropertyValue
(
"StringItemList"
)
>>=
sList
;
sal_Int16
nLength
=
static_cast
<
sal_Int16
>
(
sList
.
getLength
()
);
sal_Int16
nValue
=
-
1
;
sal_Int16
i
=
0
;
...
...
@@ -100,9 +95,9 @@ ScVbaListBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException, s
uno
::
Sequence
<
sal_Int16
>
nSelectedIndices
(
1
);
uno
::
Sequence
<
sal_Int16
>
nOldSelectedIndices
;
m_xProps
->
getPropertyValue
(
SELECTEDITEMS
)
>>=
nOldSelectedIndices
;
m_xProps
->
getPropertyValue
(
"SelectedItems"
)
>>=
nOldSelectedIndices
;
nSelectedIndices
[
0
]
=
nValue
;
m_xProps
->
setPropertyValue
(
SELECTEDITEMS
,
uno
::
makeAny
(
nSelectedIndices
)
);
m_xProps
->
setPropertyValue
(
"SelectedItems"
,
uno
::
makeAny
(
nSelectedIndices
)
);
if
(
nSelectedIndices
!=
nOldSelectedIndices
)
fireClickEvent
();
}
...
...
@@ -155,7 +150,7 @@ css::uno::Any SAL_CALL
ScVbaListBox
::
Selected
(
sal_Int32
index
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
uno
::
Sequence
<
OUString
>
sList
;
m_xProps
->
getPropertyValue
(
ITEMS
)
>>=
sList
;
m_xProps
->
getPropertyValue
(
"StringItemList"
)
>>=
sList
;
sal_Int16
nLength
=
static_cast
<
sal_Int16
>
(
sList
.
getLength
()
);
// no choice but to do a horror cast as internally
// the indices are but sal_Int16
...
...
@@ -196,7 +191,7 @@ ScVbaListBox::setValueEvent( const uno::Any& value )
if
(
!
(
value
>>=
bValue
)
)
throw
uno
::
RuntimeException
(
"Invalid type
\n
. need boolean."
,
uno
::
Reference
<
uno
::
XInterface
>
()
);
uno
::
Sequence
<
sal_Int16
>
nList
;
m_xProps
->
getPropertyValue
(
SELECTEDITEMS
)
>>=
nList
;
m_xProps
->
getPropertyValue
(
"SelectedItems"
)
>>=
nList
;
sal_Int16
nLength
=
static_cast
<
sal_Int16
>
(
nList
.
getLength
()
);
sal_Int16
nIndex
=
m_nIndex
;
for
(
sal_Int16
i
=
0
;
i
<
nLength
;
i
++
)
...
...
@@ -214,7 +209,7 @@ ScVbaListBox::setValueEvent( const uno::Any& value )
nList
.
realloc
(
nLength
-
1
);
//m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
fireClickEvent
();
m_xProps
->
setPropertyValue
(
SELECTEDITEMS
,
uno
::
makeAny
(
nList
)
);
m_xProps
->
setPropertyValue
(
"SelectedItems"
,
uno
::
makeAny
(
nList
)
);
return
;
}
}
...
...
@@ -233,7 +228,7 @@ ScVbaListBox::setValueEvent( const uno::Any& value )
}
//m_xProps->setPropertyValue( sSourceName, uno::makeAny( nList ) );
fireClickEvent
();
m_xProps
->
setPropertyValue
(
SELECTEDITEMS
,
uno
::
makeAny
(
nList
)
);
m_xProps
->
setPropertyValue
(
"SelectedItems"
,
uno
::
makeAny
(
nList
)
);
}
}
...
...
vbahelper/source/msforms/vbalistcontrolhelper.cxx
Dosyayı görüntüle @
18c7992d
...
...
@@ -24,8 +24,6 @@
using
namespace
com
::
sun
::
star
;
using
namespace
ooo
::
vba
;
const
static
OUString
ITEMS
(
"StringItemList"
);
class
ListPropListener
:
public
PropListener
{
private
:
...
...
@@ -49,13 +47,13 @@ void ListPropListener::setValueEvent( const uno::Any& value )
if
(
m_pvargIndex
.
hasValue
()
||
m_pvarColumn
.
hasValue
()
)
throw
uno
::
RuntimeException
(
"Bad argument"
,
uno
::
Reference
<
uno
::
XInterface
>
()
);
m_xProps
->
setPropertyValue
(
ITEMS
,
value
);
m_xProps
->
setPropertyValue
(
"StringItemList"
,
value
);
}
uno
::
Any
ListPropListener
::
getValueEvent
()
{
uno
::
Sequence
<
OUString
>
sList
;
m_xProps
->
getPropertyValue
(
ITEMS
)
>>=
sList
;
m_xProps
->
getPropertyValue
(
"StringItemList"
)
>>=
sList
;
sal_Int16
nLength
=
static_cast
<
sal_Int16
>
(
sList
.
getLength
()
);
uno
::
Any
aRet
;
if
(
m_pvargIndex
.
hasValue
()
)
...
...
@@ -87,7 +85,7 @@ ListControlHelper::AddItem( const uno::Any& pvargItem, const uno::Any& pvargInde
if
(
pvargItem
.
hasValue
()
)
{
uno
::
Sequence
<
OUString
>
sList
;
m_xProps
->
getPropertyValue
(
ITEMS
)
>>=
sList
;
m_xProps
->
getPropertyValue
(
"StringItemList"
)
>>=
sList
;
sal_Int32
nIndex
=
sList
.
getLength
();
...
...
@@ -131,7 +129,7 @@ ListControlHelper::AddItem( const uno::Any& pvargItem, const uno::Any& pvargInde
}
m_xProps
->
setPropertyValue
(
ITEMS
,
uno
::
makeAny
(
sList
)
);
m_xProps
->
setPropertyValue
(
"StringItemList"
,
uno
::
makeAny
(
sList
)
);
}
}
...
...
@@ -144,7 +142,7 @@ ListControlHelper::removeItem( const uno::Any& index ) throw (uno::RuntimeExcept
if
(
index
>>=
nIndex
)
{
uno
::
Sequence
<
OUString
>
sList
;
m_xProps
->
getPropertyValue
(
ITEMS
)
>>=
sList
;
m_xProps
->
getPropertyValue
(
"StringItemList"
)
>>=
sList
;
if
(
nIndex
<
0
||
nIndex
>
(
sList
.
getLength
()
-
1
)
)
throw
uno
::
RuntimeException
(
"Invalid index"
,
uno
::
Reference
<
uno
::
XInterface
>
()
);
if
(
sList
.
hasElements
()
)
...
...
@@ -161,7 +159,7 @@ ListControlHelper::removeItem( const uno::Any& index ) throw (uno::RuntimeExcept
sList
.
realloc
(
sList
.
getLength
()
-
1
);
}
m_xProps
->
setPropertyValue
(
ITEMS
,
uno
::
makeAny
(
sList
)
);
m_xProps
->
setPropertyValue
(
"StringItemList"
,
uno
::
makeAny
(
sList
)
);
}
}
...
...
@@ -170,7 +168,7 @@ ListControlHelper::Clear( ) throw (uno::RuntimeException)
{
// urk, setValue doesn't seem to work !!
//setValue( uno::makeAny( sal_Int16() ) );
m_xProps
->
setPropertyValue
(
ITEMS
,
uno
::
makeAny
(
uno
::
Sequence
<
OUString
>
()
)
);
m_xProps
->
setPropertyValue
(
"StringItemList"
,
uno
::
makeAny
(
uno
::
Sequence
<
OUString
>
()
)
);
}
void
SAL_CALL
...
...
@@ -184,7 +182,7 @@ sal_Int32 SAL_CALL
ListControlHelper
::
getListCount
()
throw
(
uno
::
RuntimeException
)
{
uno
::
Sequence
<
OUString
>
sList
;
m_xProps
->
getPropertyValue
(
ITEMS
)
>>=
sList
;
m_xProps
->
getPropertyValue
(
"StringItemList"
)
>>=
sList
;
return
sList
.
getLength
();
}
...
...
vbahelper/source/msforms/vbaradiobutton.cxx
Dosyayı görüntüle @
18c7992d
...
...
@@ -23,9 +23,6 @@
using
namespace
com
::
sun
::
star
;
using
namespace
ooo
::
vba
;
const
static
OUString
LABEL
(
"Label"
);
const
static
OUString
STATE
(
"State"
);
ScVbaRadioButton
::
ScVbaRadioButton
(
const
uno
::
Reference
<
XHelperInterface
>&
xParent
,
const
uno
::
Reference
<
uno
::
XComponentContext
>&
xContext
,
const
uno
::
Reference
<
uno
::
XInterface
>&
xControl
,
const
uno
::
Reference
<
frame
::
XModel
>&
xModel
,
AbstractGeometryAttributes
*
pGeomHelper
)
:
RadioButtonImpl_BASE
(
xParent
,
xContext
,
xControl
,
xModel
,
pGeomHelper
)
{
}
...
...
@@ -35,21 +32,21 @@ OUString SAL_CALL
ScVbaRadioButton
::
getCaption
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
OUString
Label
;
m_xProps
->
getPropertyValue
(
LABEL
)
>>=
Label
;
m_xProps
->
getPropertyValue
(
"Label"
)
>>=
Label
;
return
Label
;
}
void
SAL_CALL
ScVbaRadioButton
::
setCaption
(
const
OUString
&
_caption
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
{
m_xProps
->
setPropertyValue
(
LABEL
,
uno
::
makeAny
(
_caption
)
);
m_xProps
->
setPropertyValue
(
"Label"
,
uno
::
makeAny
(
_caption
)
);
}
uno
::
Any
SAL_CALL
ScVbaRadioButton
::
getValue
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
sal_Int16
nValue
=
-
1
;
m_xProps
->
getPropertyValue
(
STATE
)
>>=
nValue
;
m_xProps
->
getPropertyValue
(
"State"
)
>>=
nValue
;
if
(
nValue
!=
0
)
nValue
=
-
1
;
// return uno::makeAny( nValue );
...
...
@@ -64,7 +61,7 @@ ScVbaRadioButton::setValue( const uno::Any& _value ) throw (uno::RuntimeExceptio
{
sal_Int16
nValue
=
0
;
sal_Int16
nOldValue
=
0
;
m_xProps
->
getPropertyValue
(
STATE
)
>>=
nOldValue
;
m_xProps
->
getPropertyValue
(
"State"
)
>>=
nOldValue
;
if
(
!
(
_value
>>=
nValue
)
)
{
...
...
@@ -76,7 +73,7 @@ ScVbaRadioButton::setValue( const uno::Any& _value ) throw (uno::RuntimeExceptio
if
(
nValue
==
-
1
)
nValue
=
1
;
m_xProps
->
setPropertyValue
(
STATE
,
uno
::
makeAny
(
nValue
)
);
m_xProps
->
setPropertyValue
(
"State"
,
uno
::
makeAny
(
nValue
)
);
if
(
nValue
!=
nOldValue
)
{
fireChangeEvent
();
...
...
vbahelper/source/msforms/vbascrollbar.cxx
Dosyayı görüntüle @
18c7992d
...
...
@@ -16,19 +16,13 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "vbascrollbar.hxx"
#include <vector>
using
namespace
com
::
sun
::
star
;
using
namespace
ooo
::
vba
;
const
static
OUString
LARGECHANGE
(
"BlockIncrement"
);
const
static
OUString
SMALLCHANGE
(
"LineIncrement"
);
const
static
OUString
SCROLLVALUE
(
"ScrollValue"
);
const
static
OUString
SCROLLMAX
(
"ScrollValueMax"
);
const
static
OUString
SCROLLMIN
(
"ScrollValueMin"
);
ScVbaScrollBar
::
ScVbaScrollBar
(
const
css
::
uno
::
Reference
<
ov
::
XHelperInterface
>&
xParent
,
const
uno
::
Reference
<
uno
::
XComponentContext
>&
xContext
,
const
uno
::
Reference
<
uno
::
XInterface
>&
xControl
,
const
uno
::
Reference
<
frame
::
XModel
>&
xModel
,
AbstractGeometryAttributes
*
pGeomHelper
)
:
ScrollBarImpl_BASE
(
xParent
,
xContext
,
xControl
,
xModel
,
pGeomHelper
)
{
}
...
...
@@ -37,54 +31,54 @@ ScVbaScrollBar::ScVbaScrollBar( const css::uno::Reference< ov::XHelperInterface
uno
::
Any
SAL_CALL
ScVbaScrollBar
::
getValue
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
return
m_xProps
->
getPropertyValue
(
SCROLLVALUE
);
return
m_xProps
->
getPropertyValue
(
"ScrollValue"
);
}
void
SAL_CALL
ScVbaScrollBar
::
setValue
(
const
uno
::
Any
&
_value
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
{
m_xProps
->
setPropertyValue
(
SCROLLVALUE
,
_value
);
m_xProps
->
setPropertyValue
(
"ScrollValue"
,
_value
);
}
::
sal_Int32
SAL_CALL
ScVbaScrollBar
::
getMax
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
sal_Int32
nMax
=
0
;
m_xProps
->
getPropertyValue
(
SCROLLMAX
)
>>=
nMax
;
m_xProps
->
getPropertyValue
(
"ScrollValueMax"
)
>>=
nMax
;
return
nMax
;
}
void
SAL_CALL
ScVbaScrollBar
::
setMax
(
sal_Int32
nVal
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
m_xProps
->
setPropertyValue
(
SCROLLMAX
,
uno
::
makeAny
(
nVal
)
);
m_xProps
->
setPropertyValue
(
"ScrollValueMax"
,
uno
::
makeAny
(
nVal
)
);
}
::
sal_Int32
SAL_CALL
ScVbaScrollBar
::
getMin
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
sal_Int32
nVal
=
0
;
m_xProps
->
getPropertyValue
(
SCROLLMIN
)
>>=
nVal
;
m_xProps
->
getPropertyValue
(
"ScrollValueMin"
)
>>=
nVal
;
return
nVal
;
}
void
SAL_CALL
ScVbaScrollBar
::
setMin
(
sal_Int32
nVal
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
m_xProps
->
setPropertyValue
(
SCROLLMIN
,
uno
::
makeAny
(
nVal
)
);
m_xProps
->
setPropertyValue
(
"ScrollValueMin"
,
uno
::
makeAny
(
nVal
)
);
}
void
SAL_CALL
ScVbaScrollBar
::
setLargeChange
(
::
sal_Int32
_largechange
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
m_xProps
->
setPropertyValue
(
LARGECHANGE
,
uno
::
makeAny
(
_largechange
)
);
m_xProps
->
setPropertyValue
(
"BlockIncrement"
,
uno
::
makeAny
(
_largechange
)
);
}
::
sal_Int32
SAL_CALL
ScVbaScrollBar
::
getLargeChange
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
sal_Int32
nVal
=
0
;
m_xProps
->
getPropertyValue
(
LARGECHANGE
)
>>=
nVal
;
m_xProps
->
getPropertyValue
(
"BlockIncrement"
)
>>=
nVal
;
return
nVal
;
}
...
...
@@ -92,14 +86,14 @@ ScVbaScrollBar::getLargeChange() throw (uno::RuntimeException, std::exception)
ScVbaScrollBar
::
getSmallChange
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
sal_Int32
nSmallChange
=
0
;
m_xProps
->
getPropertyValue
(
SMALLCHANGE
)
>>=
nSmallChange
;
m_xProps
->
getPropertyValue
(
"LineIncrement"
)
>>=
nSmallChange
;
return
nSmallChange
;
}
void
SAL_CALL
ScVbaScrollBar
::
setSmallChange
(
::
sal_Int32
_smallchange
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
m_xProps
->
setPropertyValue
(
SMALLCHANGE
,
uno
::
makeAny
(
_smallchange
)
);
m_xProps
->
setPropertyValue
(
"LineIncrement"
,
uno
::
makeAny
(
_smallchange
)
);
}
OUString
...
...
vbahelper/source/msforms/vbaspinbutton.cxx
Dosyayı görüntüle @
18c7992d
...
...
@@ -16,17 +16,13 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "vbaspinbutton.hxx"
#include <vector>
using
namespace
com
::
sun
::
star
;
using
namespace
ooo
::
vba
;
const
static
OUString
SPINVALUE
(
"SpinValue"
);
const
static
OUString
SPINMAX
(
"SpinValueMax"
);
const
static
OUString
SPINMIN
(
"SpinValueMin"
);
ScVbaSpinButton
::
ScVbaSpinButton
(
const
css
::
uno
::
Reference
<
ov
::
XHelperInterface
>&
xParent
,
const
uno
::
Reference
<
uno
::
XComponentContext
>&
xContext
,
const
uno
::
Reference
<
uno
::
XInterface
>&
xControl
,
const
uno
::
Reference
<
frame
::
XModel
>&
xModel
,
AbstractGeometryAttributes
*
pGeomHelper
)
:
SpinButtonImpl_BASE
(
xParent
,
xContext
,
xControl
,
xModel
,
pGeomHelper
)
{
}
...
...
@@ -35,41 +31,41 @@ ScVbaSpinButton::ScVbaSpinButton( const css::uno::Reference< ov::XHelperInterfa
uno
::
Any
SAL_CALL
ScVbaSpinButton
::
getValue
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
return
m_xProps
->
getPropertyValue
(
SPINVALUE
);
return
m_xProps
->
getPropertyValue
(
"SpinValue"
);
}
void
SAL_CALL
ScVbaSpinButton
::
setValue
(
const
uno
::
Any
&
_value
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
{
m_xProps
->
setPropertyValue
(
SPINVALUE
,
_value
);
m_xProps
->
setPropertyValue
(
"SpinValue"
,
_value
);
}
::
sal_Int32
SAL_CALL
ScVbaSpinButton
::
getMax
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
sal_Int32
nMax
=
0
;
m_xProps
->
getPropertyValue
(
SPINMAX
)
>>=
nMax
;
m_xProps
->
getPropertyValue
(
"SpinValueMax"
)
>>=
nMax
;
return
nMax
;
}
void
SAL_CALL
ScVbaSpinButton
::
setMax
(
sal_Int32
nVal
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
m_xProps
->
setPropertyValue
(
SPINMAX
,
uno
::
makeAny
(
nVal
)
);
m_xProps
->
setPropertyValue
(
"SpinValueMax"
,
uno
::
makeAny
(
nVal
)
);
}
::
sal_Int32
SAL_CALL
ScVbaSpinButton
::
getMin
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
sal_Int32
nVal
=
0
;
m_xProps
->
getPropertyValue
(
SPINMIN
)
>>=
nVal
;
m_xProps
->
getPropertyValue
(
"SpinValueMin"
)
>>=
nVal
;
return
nVal
;
}
void
SAL_CALL
ScVbaSpinButton
::
setMin
(
sal_Int32
nVal
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
m_xProps
->
setPropertyValue
(
SPINMIN
,
uno
::
makeAny
(
nVal
)
);
m_xProps
->
setPropertyValue
(
"SpinValueMin"
,
uno
::
makeAny
(
nVal
)
);
}
OUString
...
...
vbahelper/source/msforms/vbatogglebutton.cxx
Dosyayı görüntüle @
18c7992d
...
...
@@ -23,14 +23,10 @@
using
namespace
com
::
sun
::
star
;
using
namespace
ooo
::
vba
;
const
static
OUString
LABEL
(
"Label"
);
const
static
OUString
TOGGLE
(
"Toggle"
);
const
static
OUString
STATE
(
"State"
);
ScVbaToggleButton
::
ScVbaToggleButton
(
const
css
::
uno
::
Reference
<
ov
::
XHelperInterface
>&
xParent
,
const
uno
::
Reference
<
uno
::
XComponentContext
>&
xContext
,
const
uno
::
Reference
<
uno
::
XInterface
>&
xControl
,
const
uno
::
Reference
<
frame
::
XModel
>&
xModel
,
ov
::
AbstractGeometryAttributes
*
pGeomHelper
)
:
ToggleButtonImpl_BASE
(
xParent
,
xContext
,
xControl
,
xModel
,
pGeomHelper
)
{
SAL_INFO
(
"vbahelper"
,
"ScVbaToggleButton(ctor)"
);
m_xProps
->
setPropertyValue
(
TOGGLE
,
uno
::
makeAny
(
sal_True
)
);
m_xProps
->
setPropertyValue
(
"Toggle"
,
uno
::
makeAny
(
sal_True
)
);
}
ScVbaToggleButton
::~
ScVbaToggleButton
()
...
...
@@ -43,21 +39,21 @@ OUString SAL_CALL
ScVbaToggleButton
::
getCaption
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
OUString
Label
;
m_xProps
->
getPropertyValue
(
LABEL
)
>>=
Label
;
m_xProps
->
getPropertyValue
(
"Label"
)
>>=
Label
;
return
Label
;
}
void
SAL_CALL
ScVbaToggleButton
::
setCaption
(
const
OUString
&
_caption
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
{
m_xProps
->
setPropertyValue
(
LABEL
,
uno
::
makeAny
(
_caption
)
);
m_xProps
->
setPropertyValue
(
"Label"
,
uno
::
makeAny
(
_caption
)
);
}
uno
::
Any
SAL_CALL
ScVbaToggleButton
::
getValue
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
sal_Int16
nState
=
0
;
m_xProps
->
getPropertyValue
(
STATE
)
>>=
nState
;
m_xProps
->
getPropertyValue
(
"State"
)
>>=
nState
;
return
uno
::
makeAny
(
nState
?
sal_Int16
(
-
1
)
:
sal_Int16
(
0
)
);
}
...
...
@@ -76,7 +72,7 @@ ScVbaToggleButton::setValue( const uno::Any& _value ) throw (uno::RuntimeExcepti
SAL_INFO
(
"vbahelper"
,
"nState - "
<<
nState
);
nState
=
(
nState
==
-
1
)
?
1
:
0
;
SAL_INFO
(
"vbahelper"
,
"nState - "
<<
nState
);
m_xProps
->
setPropertyValue
(
STATE
,
uno
::
makeAny
(
nState
)
);
m_xProps
->
setPropertyValue
(
"State"
,
uno
::
makeAny
(
nState
)
);
}
sal_Bool
SAL_CALL
ScVbaToggleButton
::
getAutoSize
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
...
...
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