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
b241005c
Kaydet (Commit)
b241005c
authored
Eyl 06, 2012
tarafından
Noel Power
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
make interface for scrollablity properties to allow more code sharing
Change-Id: I0e03360808e73426848820d807f741c13c76abf8
üst
27a19817
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
106 additions
and
120 deletions
+106
-120
scrollabledialog.hxx
toolkit/inc/toolkit/awt/scrollabledialog.hxx
+25
-12
vclxcontainer.hxx
toolkit/inc/toolkit/awt/vclxcontainer.hxx
+3
-0
scrollabledialog.cxx
toolkit/source/awt/scrollabledialog.cxx
+17
-23
vclxcontainer.cxx
toolkit/source/awt/vclxcontainer.cxx
+58
-0
vclxtoolkit.cxx
toolkit/source/awt/vclxtoolkit.cxx
+2
-2
vclxwindows.cxx
toolkit/source/awt/vclxwindows.cxx
+1
-83
No files found.
toolkit/inc/toolkit/awt/scrollabledialog.hxx
Dosyayı görüntüle @
b241005c
...
@@ -34,8 +34,21 @@
...
@@ -34,8 +34,21 @@
//........................................................................
//........................................................................
namespace
toolkit
namespace
toolkit
{
{
class
ScrollableInterface
{
public
:
virtual
void
SetScrollWidth
(
long
nWidth
)
=
0
;
virtual
long
GetScrollWidth
()
=
0
;
virtual
void
SetScrollHeight
(
long
nHeight
)
=
0
;
virtual
long
GetScrollHeight
()
=
0
;
virtual
void
SetScrollLeft
(
long
nLeft
)
=
0
;
virtual
long
GetScrollLeft
()
=
0
;
virtual
void
SetScrollTop
(
long
Top
)
=
0
;
virtual
long
GetScrollTop
()
=
0
;
};
template
<
class
T
>
template
<
class
T
>
class
Scrollable
Dialog
:
public
T
class
Scrollable
Wrapper
:
public
T
,
public
ScrollableInterface
{
{
ScrollBar
maHScrollBar
;
ScrollBar
maHScrollBar
;
ScrollBar
maVScrollBar
;
ScrollBar
maVScrollBar
;
...
@@ -51,17 +64,17 @@ namespace toolkit
...
@@ -51,17 +64,17 @@ namespace toolkit
ScrollBarVisibility
maScrollVis
;
ScrollBarVisibility
maScrollVis
;
void
lcl_Scroll
(
long
nX
,
long
nY
);
void
lcl_Scroll
(
long
nX
,
long
nY
);
public
:
public
:
Scrollable
Dialog
(
Window
*
pParent
,
WinBits
nStyle
=
WB_STDDIALOG
);
Scrollable
Wrapper
(
Window
*
pParent
,
WinBits
nStyle
=
WB_STDDIALOG
);
virtual
~
Scrollable
Dialog
();
virtual
~
Scrollable
Wrapper
();
void
SetScrollWidth
(
long
nWidth
);
v
irtual
v
oid
SetScrollWidth
(
long
nWidth
);
long
GetScrollWidth
()
{
return
maScrollArea
.
Width
();
}
virtual
long
GetScrollWidth
()
{
return
maScrollArea
.
Width
();
}
void
SetScrollHeight
(
long
nHeight
);
v
irtual
v
oid
SetScrollHeight
(
long
nHeight
);
long
GetScrollHeight
()
{
return
maScrollArea
.
Height
();
}
virtual
long
GetScrollHeight
()
{
return
maScrollArea
.
Height
();
}
void
SetScrollLeft
(
long
nLeft
);
v
irtual
v
oid
SetScrollLeft
(
long
nLeft
);
long
GetScrollLeft
()
{
return
mnScrollPos
.
X
();
}
virtual
long
GetScrollLeft
()
{
return
mnScrollPos
.
X
();
}
void
SetScrollTop
(
long
Top
);
v
irtual
v
oid
SetScrollTop
(
long
Top
);
long
GetScrollTop
()
{
return
mnScrollPos
.
Y
()
;
}
virtual
long
GetScrollTop
()
{
return
mnScrollPos
.
Y
()
;
}
Window
*
getContentWindow
();
ScrollBarVisibility
getScrollVisibility
()
{
return
maScrollVis
;
}
ScrollBarVisibility
getScrollVisibility
()
{
return
maScrollVis
;
}
void
setScrollVisibility
(
ScrollBarVisibility
rState
);
void
setScrollVisibility
(
ScrollBarVisibility
rState
);
DECL_LINK
(
ScrollBarHdl
,
ScrollBar
*
);
DECL_LINK
(
ScrollBarHdl
,
ScrollBar
*
);
...
...
toolkit/inc/toolkit/awt/vclxcontainer.hxx
Dosyayı görüntüle @
b241005c
...
@@ -61,6 +61,9 @@ public:
...
@@ -61,6 +61,9 @@ public:
void
SAL_CALL
setTabOrder
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
awt
::
XWindow
>
>&
WindowOrder
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Any
>&
Tabs
,
sal_Bool
GroupControl
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
void
SAL_CALL
setTabOrder
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
awt
::
XWindow
>
>&
WindowOrder
,
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Any
>&
Tabs
,
sal_Bool
GroupControl
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
void
SAL_CALL
setGroup
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
awt
::
XWindow
>
>&
Windows
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
void
SAL_CALL
setGroup
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
awt
::
XWindow
>
>&
Windows
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// ::com::sun::star::awt::XVclWindowPeer
void
SAL_CALL
setProperty
(
const
::
rtl
::
OUString
&
PropertyName
,
const
::
com
::
sun
::
star
::
uno
::
Any
&
Value
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
static
void
ImplGetPropertyIds
(
std
::
list
<
sal_uInt16
>
&
aIds
);
static
void
ImplGetPropertyIds
(
std
::
list
<
sal_uInt16
>
&
aIds
);
virtual
void
GetPropertyIds
(
std
::
list
<
sal_uInt16
>
&
aIds
)
{
return
ImplGetPropertyIds
(
aIds
);
}
virtual
void
GetPropertyIds
(
std
::
list
<
sal_uInt16
>
&
aIds
)
{
return
ImplGetPropertyIds
(
aIds
);
}
};
};
...
...
toolkit/source/awt/scrollabledialog.cxx
Dosyayı görüntüle @
b241005c
...
@@ -6,9 +6,9 @@ namespace toolkit
...
@@ -6,9 +6,9 @@ namespace toolkit
{
{
template
<
class
T
>
template
<
class
T
>
Scrollable
Dialog
<
T
>::
ScrollableDialog
(
Window
*
pParent
,
WinBits
nStyle
)
:
T
(
pParent
,
nStyle
|
~
(
WB_HSCROLL
|
WB_VSCROLL
)
),
maHScrollBar
(
this
,
WB_HSCROLL
|
WB_DRAG
),
maVScrollBar
(
this
,
WB_VSCROLL
|
WB_DRAG
),
mbHasHoriBar
(
false
),
mbHasVertBar
(
false
),
maScrollVis
(
None
)
Scrollable
Wrapper
<
T
>::
ScrollableWrapper
(
Window
*
pParent
,
WinBits
nStyle
)
:
T
(
pParent
,
nStyle
|
~
(
WB_HSCROLL
|
WB_VSCROLL
)
),
maHScrollBar
(
this
,
WB_HSCROLL
|
WB_DRAG
),
maVScrollBar
(
this
,
WB_VSCROLL
|
WB_DRAG
),
mbHasHoriBar
(
false
),
mbHasVertBar
(
false
),
maScrollVis
(
None
)
{
{
Link
aLink
(
LINK
(
this
,
Scrollable
Dialog
,
ScrollBarHdl
)
);
Link
aLink
(
LINK
(
this
,
Scrollable
Wrapper
,
ScrollBarHdl
)
);
maVScrollBar
.
SetScrollHdl
(
aLink
);
maVScrollBar
.
SetScrollHdl
(
aLink
);
maHScrollBar
.
SetScrollHdl
(
aLink
);
maHScrollBar
.
SetScrollHdl
(
aLink
);
...
@@ -32,7 +32,7 @@ ScrollableDialog<T>::ScrollableDialog( Window* pParent, WinBits nStyle ) : T( pP
...
@@ -32,7 +32,7 @@ ScrollableDialog<T>::ScrollableDialog( Window* pParent, WinBits nStyle ) : T( pP
}
}
template
<
class
T
>
template
<
class
T
>
void
Scrollable
Dialog
<
T
>::
setScrollVisibility
(
ScrollBarVisibility
rVisState
)
void
Scrollable
Wrapper
<
T
>::
setScrollVisibility
(
ScrollBarVisibility
rVisState
)
{
{
maScrollVis
=
rVisState
;
maScrollVis
=
rVisState
;
if
(
maScrollVis
==
Hori
||
maScrollVis
==
Both
)
if
(
maScrollVis
==
Hori
||
maScrollVis
==
Both
)
...
@@ -50,18 +50,12 @@ void ScrollableDialog<T>::setScrollVisibility( ScrollBarVisibility rVisState )
...
@@ -50,18 +50,12 @@ void ScrollableDialog<T>::setScrollVisibility( ScrollBarVisibility rVisState )
}
}
template
<
class
T
>
template
<
class
T
>
Scrollable
Dialog
<
T
>::~
ScrollableDialog
()
Scrollable
Wrapper
<
T
>::~
ScrollableWrapper
()
{
{
}
}
template
<
class
T
>
template
<
class
T
>
Window
*
ScrollableDialog
<
T
>::
getContentWindow
()
void
ScrollableWrapper
<
T
>::
lcl_Scroll
(
long
nX
,
long
nY
)
{
return
this
;
}
template
<
class
T
>
void
ScrollableDialog
<
T
>::
lcl_Scroll
(
long
nX
,
long
nY
)
{
{
long
nXScroll
=
mnScrollPos
.
X
()
-
nX
;
long
nXScroll
=
mnScrollPos
.
X
()
-
nX
;
long
nYScroll
=
mnScrollPos
.
Y
()
-
nY
;
long
nYScroll
=
mnScrollPos
.
Y
()
-
nY
;
...
@@ -83,16 +77,16 @@ void ScrollableDialog<T>::lcl_Scroll( long nX, long nY )
...
@@ -83,16 +77,16 @@ void ScrollableDialog<T>::lcl_Scroll( long nX, long nY )
}
}
//Can't use IMPL_LINK with the template
//Can't use IMPL_LINK with the template
//IMPL_LINK( Scrollable
Dialog
, ScrollBarHdl, ScrollBar*, pSB )
//IMPL_LINK( Scrollable
Wrapper
, ScrollBarHdl, ScrollBar*, pSB )
template
<
class
T
>
template
<
class
T
>
long
Scrollable
Dialog
<
T
>::
LinkStubScrollBarHdl
(
void
*
pThis
,
void
*
pCaller
)
long
Scrollable
Wrapper
<
T
>::
LinkStubScrollBarHdl
(
void
*
pThis
,
void
*
pCaller
)
{
{
return
((
Scrollable
Dialog
<
T
>*
)
pThis
)
->
ScrollBarHdl
(
(
ScrollBar
*
)
pCaller
);
return
((
Scrollable
Wrapper
<
T
>*
)
pThis
)
->
ScrollBarHdl
(
(
ScrollBar
*
)
pCaller
);
}
}
template
<
class
T
>
template
<
class
T
>
long
Scrollable
Dialog
<
T
>::
ScrollBarHdl
(
ScrollBar
*
pSB
)
long
Scrollable
Wrapper
<
T
>::
ScrollBarHdl
(
ScrollBar
*
pSB
)
{
{
sal_uInt16
nPos
=
(
sal_uInt16
)
pSB
->
GetThumbPos
();
sal_uInt16
nPos
=
(
sal_uInt16
)
pSB
->
GetThumbPos
();
if
(
pSB
==
&
maVScrollBar
)
if
(
pSB
==
&
maVScrollBar
)
...
@@ -103,7 +97,7 @@ long ScrollableDialog<T>::ScrollBarHdl( ScrollBar* pSB )
...
@@ -103,7 +97,7 @@ long ScrollableDialog<T>::ScrollBarHdl( ScrollBar* pSB )
}
}
template
<
class
T
>
template
<
class
T
>
void
Scrollable
Dialog
<
T
>::
SetScrollTop
(
long
nTop
)
void
Scrollable
Wrapper
<
T
>::
SetScrollTop
(
long
nTop
)
{
{
Point
aOld
=
mnScrollPos
;
Point
aOld
=
mnScrollPos
;
lcl_Scroll
(
mnScrollPos
.
X
()
,
mnScrollPos
.
Y
()
-
nTop
);
lcl_Scroll
(
mnScrollPos
.
X
()
,
mnScrollPos
.
Y
()
-
nTop
);
...
@@ -112,7 +106,7 @@ void ScrollableDialog<T>::SetScrollTop( long nTop )
...
@@ -112,7 +106,7 @@ void ScrollableDialog<T>::SetScrollTop( long nTop )
mnScrollPos
=
aOld
;
mnScrollPos
=
aOld
;
}
}
template
<
class
T
>
template
<
class
T
>
void
Scrollable
Dialog
<
T
>::
SetScrollLeft
(
long
nLeft
)
void
Scrollable
Wrapper
<
T
>::
SetScrollLeft
(
long
nLeft
)
{
{
Point
aOld
=
mnScrollPos
;
Point
aOld
=
mnScrollPos
;
lcl_Scroll
(
mnScrollPos
.
X
()
-
nLeft
,
mnScrollPos
.
Y
()
);
lcl_Scroll
(
mnScrollPos
.
X
()
-
nLeft
,
mnScrollPos
.
Y
()
);
...
@@ -121,27 +115,27 @@ void ScrollableDialog<T>::SetScrollLeft( long nLeft )
...
@@ -121,27 +115,27 @@ void ScrollableDialog<T>::SetScrollLeft( long nLeft )
mnScrollPos
=
aOld
;
mnScrollPos
=
aOld
;
}
}
template
<
class
T
>
template
<
class
T
>
void
Scrollable
Dialog
<
T
>::
SetScrollWidth
(
long
nWidth
)
void
Scrollable
Wrapper
<
T
>::
SetScrollWidth
(
long
nWidth
)
{
{
maScrollArea
.
Width
()
=
nWidth
;
maScrollArea
.
Width
()
=
nWidth
;
ResetScrollBars
();
ResetScrollBars
();
}
}
template
<
class
T
>
template
<
class
T
>
void
Scrollable
Dialog
<
T
>::
SetScrollHeight
(
long
nHeight
)
void
Scrollable
Wrapper
<
T
>::
SetScrollHeight
(
long
nHeight
)
{
{
maScrollArea
.
Height
()
=
nHeight
;
maScrollArea
.
Height
()
=
nHeight
;
ResetScrollBars
();
ResetScrollBars
();
}
}
template
<
class
T
>
template
<
class
T
>
void
Scrollable
Dialog
<
T
>::
Resize
()
void
Scrollable
Wrapper
<
T
>::
Resize
()
{
{
ResetScrollBars
();
ResetScrollBars
();
}
}
template
<
class
T
>
template
<
class
T
>
void
Scrollable
Dialog
<
T
>::
ResetScrollBars
()
void
Scrollable
Wrapper
<
T
>::
ResetScrollBars
()
{
{
Size
aOutSz
=
T
::
GetOutputSizePixel
();
Size
aOutSz
=
T
::
GetOutputSizePixel
();
...
@@ -158,8 +152,8 @@ void ScrollableDialog<T>::ResetScrollBars()
...
@@ -158,8 +152,8 @@ void ScrollableDialog<T>::ResetScrollBars()
maVScrollBar
.
SetVisibleSize
(
T
::
GetSizePixel
().
Height
()
);
maVScrollBar
.
SetVisibleSize
(
T
::
GetSizePixel
().
Height
()
);
}
}
template
class
Scrollable
Dialog
<
Dialog
>
;
template
class
Scrollable
Wrapper
<
Dialog
>
;
template
class
Scrollable
Dialog
<
GroupBox
>
;
template
class
Scrollable
Wrapper
<
GroupBox
>
;
}
// toolkit
}
// toolkit
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
toolkit/source/awt/vclxcontainer.cxx
Dosyayı görüntüle @
b241005c
...
@@ -36,6 +36,8 @@
...
@@ -36,6 +36,8 @@
#include <vcl/svapp.hxx>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
#include <vcl/window.hxx>
#include <tools/debug.hxx>
#include <tools/debug.hxx>
#include "toolkit/awt/scrollabledialog.hxx"
#include <toolkit/helper/property.hxx>
// ----------------------------------------------------
// ----------------------------------------------------
// class VCLXContainer
// class VCLXContainer
...
@@ -232,4 +234,60 @@ void VCLXContainer::setGroup( const ::com::sun::star::uno::Sequence< ::com::sun:
...
@@ -232,4 +234,60 @@ void VCLXContainer::setGroup( const ::com::sun::star::uno::Sequence< ::com::sun:
}
}
}
}
void
SAL_CALL
VCLXContainer
::
setProperty
(
const
::
rtl
::
OUString
&
PropertyName
,
const
::
com
::
sun
::
star
::
uno
::
Any
&
Value
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
SolarMutexGuard
aGuard
;
sal_uInt16
nPropType
=
GetPropertyId
(
PropertyName
);
switch
(
nPropType
)
{
case
BASEPROPERTY_SCROLLHEIGHT
:
case
BASEPROPERTY_SCROLLWIDTH
:
case
BASEPROPERTY_SCROLLTOP
:
case
BASEPROPERTY_SCROLLLEFT
:
{
sal_Int32
nVal
=
0
;
Value
>>=
nVal
;
Size
aSize
(
nVal
,
nVal
);
Window
*
pWindow
=
GetWindow
();
MapMode
aMode
(
MAP_APPFONT
);
toolkit
::
ScrollableInterface
*
pScrollable
=
dynamic_cast
<
toolkit
::
ScrollableInterface
*
>
(
pWindow
);
if
(
pWindow
&&
pScrollable
)
{
OutputDevice
*
pDev
=
VCLUnoHelper
::
GetOutputDevice
(
getGraphics
()
);
if
(
!
pDev
)
pDev
=
pWindow
->
GetParent
();
aSize
=
pDev
->
LogicToPixel
(
aSize
,
aMode
);
switch
(
nPropType
)
{
case
BASEPROPERTY_SCROLLHEIGHT
:
pScrollable
->
SetScrollHeight
(
aSize
.
Height
()
);
break
;
case
BASEPROPERTY_SCROLLWIDTH
:
pScrollable
->
SetScrollWidth
(
aSize
.
Width
()
);
break
;
case
BASEPROPERTY_SCROLLTOP
:
pScrollable
->
SetScrollTop
(
aSize
.
Height
()
);
break
;
case
BASEPROPERTY_SCROLLLEFT
:
pScrollable
->
SetScrollLeft
(
aSize
.
Width
()
);
break
;
default
:
break
;
}
break
;
}
break
;
}
default
:
{
VCLXWindow
::
setProperty
(
PropertyName
,
Value
);
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
toolkit/source/awt/vclxtoolkit.cxx
Dosyayı görüntüle @
b241005c
...
@@ -725,7 +725,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
...
@@ -725,7 +725,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
case
WINDOW_GROUPBOX
:
case
WINDOW_GROUPBOX
:
{
{
if
(
bFrameControl
)
if
(
bFrameControl
)
pNewWindow
=
new
toolkit
::
Scrollable
Dialog
<
GroupBox
>
(
pParent
,
nWinBits
);
pNewWindow
=
new
toolkit
::
Scrollable
Wrapper
<
GroupBox
>
(
pParent
,
nWinBits
);
else
else
pNewWindow
=
new
GroupBox
(
pParent
,
nWinBits
);
pNewWindow
=
new
GroupBox
(
pParent
,
nWinBits
);
if
(
bFrameControl
)
if
(
bFrameControl
)
...
@@ -790,7 +790,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
...
@@ -790,7 +790,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
// Modal/Modeless nur durch Show/Execute
// Modal/Modeless nur durch Show/Execute
if
(
(
pParent
==
NULL
)
&&
(
rDescriptor
.
ParentIndex
==
-
1
)
)
if
(
(
pParent
==
NULL
)
&&
(
rDescriptor
.
ParentIndex
==
-
1
)
)
pParent
=
DIALOG_NO_PARENT
;
pParent
=
DIALOG_NO_PARENT
;
pNewWindow
=
new
toolkit
::
Scrollable
Dialog
<
Dialog
>
(
pParent
,
nWinBits
);
pNewWindow
=
new
toolkit
::
Scrollable
Wrapper
<
Dialog
>
(
pParent
,
nWinBits
);
// #i70217# Don't always create a new component object. It's possible that VCL has called
// #i70217# Don't always create a new component object. It's possible that VCL has called
// GetComponentInterface( sal_True ) in the Dialog ctor itself (see Window::IsTopWindow() )
// GetComponentInterface( sal_True ) in the Dialog ctor itself (see Window::IsTopWindow() )
// which creates a component object.
// which creates a component object.
...
...
toolkit/source/awt/vclxwindows.cxx
Dosyayı görüntüle @
b241005c
...
@@ -2454,44 +2454,6 @@ throw(::com::sun::star::uno::RuntimeException)
...
@@ -2454,44 +2454,6 @@ throw(::com::sun::star::uno::RuntimeException)
sal_uInt16
nPropType
=
GetPropertyId
(
PropertyName
);
sal_uInt16
nPropType
=
GetPropertyId
(
PropertyName
);
switch
(
nPropType
)
switch
(
nPropType
)
{
{
case
BASEPROPERTY_SCROLLHEIGHT
:
case
BASEPROPERTY_SCROLLWIDTH
:
case
BASEPROPERTY_SCROLLTOP
:
case
BASEPROPERTY_SCROLLLEFT
:
{
sal_Int32
nVal
=
0
;
Value
>>=
nVal
;
Size
aSize
(
nVal
,
nVal
);
Window
*
pWindow
=
GetWindow
();
MapMode
aMode
(
MAP_APPFONT
);
toolkit
::
ScrollableDialog
<
Dialog
>*
pScrollable
=
dynamic_cast
<
toolkit
::
ScrollableDialog
<
Dialog
>*
>
(
pWindow
);
if
(
pWindow
&&
pScrollable
)
{
OutputDevice
*
pDev
=
VCLUnoHelper
::
GetOutputDevice
(
getGraphics
()
);
if
(
!
pDev
)
pDev
=
pWindow
->
GetParent
();
aSize
=
pDev
->
LogicToPixel
(
aSize
,
aMode
);
switch
(
nPropType
)
{
case
BASEPROPERTY_SCROLLHEIGHT
:
pScrollable
->
SetScrollHeight
(
aSize
.
Height
()
);
break
;
case
BASEPROPERTY_SCROLLWIDTH
:
pScrollable
->
SetScrollWidth
(
aSize
.
Width
()
);
break
;
case
BASEPROPERTY_SCROLLTOP
:
pScrollable
->
SetScrollTop
(
aSize
.
Height
()
);
break
;
case
BASEPROPERTY_SCROLLLEFT
:
pScrollable
->
SetScrollLeft
(
aSize
.
Width
()
);
break
;
default
:
break
;
}
}
break
;
}
case
BASEPROPERTY_GRAPHIC
:
case
BASEPROPERTY_GRAPHIC
:
{
{
Reference
<
XGraphic
>
xGraphic
;
Reference
<
XGraphic
>
xGraphic
;
...
@@ -2517,7 +2479,7 @@ throw(::com::sun::star::uno::RuntimeException)
...
@@ -2517,7 +2479,7 @@ throw(::com::sun::star::uno::RuntimeException)
default
:
default
:
{
{
VCLX
Window
::
setProperty
(
PropertyName
,
Value
);
VCLX
Container
::
setProperty
(
PropertyName
,
Value
);
}
}
}
}
}
}
...
@@ -6694,50 +6656,6 @@ throw(::com::sun::star::uno::RuntimeException)
...
@@ -6694,50 +6656,6 @@ throw(::com::sun::star::uno::RuntimeException)
sal_Bool
bVoid
=
Value
.
getValueType
().
getTypeClass
()
==
::
com
::
sun
::
star
::
uno
::
TypeClass_VOID
;
sal_Bool
bVoid
=
Value
.
getValueType
().
getTypeClass
()
==
::
com
::
sun
::
star
::
uno
::
TypeClass_VOID
;
(
void
)
bVoid
;
(
void
)
bVoid
;
#endif
#endif
// #TODO needs to be in common container base class,
// we need a common Scrollable interface then too
sal_uInt16
nPropType
=
GetPropertyId
(
PropertyName
);
switch
(
nPropType
)
{
case
BASEPROPERTY_SCROLLHEIGHT
:
case
BASEPROPERTY_SCROLLWIDTH
:
case
BASEPROPERTY_SCROLLTOP
:
case
BASEPROPERTY_SCROLLLEFT
:
{
sal_Int32
nVal
=
0
;
Value
>>=
nVal
;
Size
aSize
(
nVal
,
nVal
);
Window
*
pWindow
=
GetWindow
();
MapMode
aMode
(
MAP_APPFONT
);
toolkit
::
ScrollableDialog
<
GroupBox
>*
pScrollable
=
dynamic_cast
<
toolkit
::
ScrollableDialog
<
GroupBox
>*
>
(
pWindow
);
if
(
pWindow
&&
pScrollable
)
{
OutputDevice
*
pDev
=
VCLUnoHelper
::
GetOutputDevice
(
getGraphics
()
);
if
(
!
pDev
)
pDev
=
pWindow
->
GetParent
();
aSize
=
pDev
->
LogicToPixel
(
aSize
,
aMode
);
switch
(
nPropType
)
{
case
BASEPROPERTY_SCROLLHEIGHT
:
pScrollable
->
SetScrollHeight
(
aSize
.
Height
()
);
break
;
case
BASEPROPERTY_SCROLLWIDTH
:
pScrollable
->
SetScrollWidth
(
aSize
.
Width
()
);
break
;
case
BASEPROPERTY_SCROLLTOP
:
pScrollable
->
SetScrollTop
(
aSize
.
Height
()
);
break
;
case
BASEPROPERTY_SCROLLLEFT
:
pScrollable
->
SetScrollLeft
(
aSize
.
Width
()
);
break
;
default
:
break
;
}
}
break
;
}
}
VCLXContainer
::
setProperty
(
PropertyName
,
Value
);
VCLXContainer
::
setProperty
(
PropertyName
,
Value
);
}
}
...
...
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