summaryrefslogtreecommitdiff
path: root/toolkit/source
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2012-09-07 17:44:22 +0100
committerNoel Power <noel.power@suse.com>2012-09-11 16:04:12 +0100
commit7c7267e88691ce354ed0cf116315952ceae555ad (patch)
treeef77c7202ddfb8fda4a8933933049e9aca235f22 /toolkit/source
parent67adc642765862c6609914a0131a18967538b81c (diff)
get scrollbar details actually read for groupbox
<sigh> the display with groupbox is disappointing, there are many artifacts and the size of the area you actually need to scroll wrong, perhaps we actuall really need a proper groupbox Change-Id: Iba6ff62718728324a461806cef61ee6a6a438ddf
Diffstat (limited to 'toolkit/source')
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx2
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx42
-rw-r--r--toolkit/source/controls/unocontrol.cxx1
-rw-r--r--toolkit/source/controls/unocontrolcontainer.cxx26
4 files changed, 45 insertions, 26 deletions
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 225134d1d399..76f83158e2b2 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -243,7 +243,7 @@ TOOLKIT_DLLPUBLIC WinBits ImplGetWinBits( sal_uInt32 nComponentAttribs, sal_uInt
if( nComponentAttribs & ::com::sun::star::awt::VclWindowPeerAttribute::DEF_NO )
nWinBits |= WB_DEF_NO;
}
- if ( nCompType == WINDOW_MULTILINEEDIT || nCompType == WINDOW_DIALOG )
+ if ( nCompType == WINDOW_MULTILINEEDIT || nCompType == WINDOW_DIALOG || WINDOW_GROUPBOX )
{
if( nComponentAttribs & ::com::sun::star::awt::VclWindowPeerAttribute::AUTOHSCROLL )
nWinBits |= WB_AUTOHSCROLL;
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 106c7aad8fbc..d29f0ec8f3a7 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -60,7 +60,6 @@
#include <vcl/tabctrl.hxx>
#include <toolkit/awt/vclxwindows.hxx>
#include "toolkit/controls/unocontrols.hxx"
-#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -373,24 +372,7 @@ void UnoDialogControl::createPeer( const Reference< XToolkit > & rxToolkit, cons
void UnoDialogControl::PrepareWindowDescriptor( ::com::sun::star::awt::WindowDescriptor& rDesc )
{
- // HACK due to the fact that we can't really use VSCROLL & HSCROLL
- // for Dialog ( ::com::sun::star::awt::VclWindowPeerAttribute::VSCROLL
- // has the same value as
- // ::com::sun::star::awt::WindowAttribute::NODECORATION )
- // For convenience in the PropBrowse using HSCROLL and VSCROLL ensures
- // the Correct text. We exchange them here and the control knows
- // about this hack ( it sucks badly I know )
- if ( rDesc.WindowAttributes & ::com::sun::star::awt::VclWindowPeerAttribute::VSCROLL )
- {
- rDesc.WindowAttributes &= ~::com::sun::star::awt::VclWindowPeerAttribute::VSCROLL;
- rDesc.WindowAttributes |= ::com::sun::star::awt::VclWindowPeerAttribute::AUTOVSCROLL;
- }
- if ( rDesc.WindowAttributes & ::com::sun::star::awt::VclWindowPeerAttribute::HSCROLL )
- {
- rDesc.WindowAttributes &= ~::com::sun::star::awt::VclWindowPeerAttribute::HSCROLL;
- rDesc.WindowAttributes |= ::com::sun::star::awt::VclWindowPeerAttribute::AUTOHSCROLL;
- }
-
+ UnoControlContainer::PrepareWindowDescriptor( rDesc );
sal_Bool bDecoration( sal_True );
ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_DECORATION )) >>= bDecoration;
if ( !bDecoration )
@@ -1192,11 +1174,25 @@ UnoFrameModel::Clone() const
uno::Any UnoFrameModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
{
- if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
+ uno::Any aAny;
+ switch ( nPropId )
{
- uno::Any aAny;
- aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoFrameControl );
- return aAny;
+ case BASEPROPERTY_DEFAULTCONTROL:
+ {
+ aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoFrameControl );
+ return aAny;
+ }
+ case BASEPROPERTY_SCROLLWIDTH:
+ case BASEPROPERTY_SCROLLHEIGHT:
+ case BASEPROPERTY_SCROLLTOP:
+ case BASEPROPERTY_SCROLLLEFT:
+ aAny <<= sal_Int32(0);
+ return aAny;
+ case BASEPROPERTY_USERFORMCONTAINEES:
+ {
+ uno::Reference< XNameContainer > xNameCont = new SimpleNamedThingContainer< XControlModel >();
+ return makeAny( xNameCont );
+ }
}
return ControlModelContainerBase::ImplGetDefaultValue( nPropId );
}
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 2f2c7c979911..7d5a6ac98c68 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -1117,7 +1117,6 @@ void UnoControl::peerCreated()
void UnoControl::createPeer( const Reference< XToolkit >& rxToolkit, const Reference< XWindowPeer >& rParentPeer ) throw(RuntimeException)
{
::osl::ClearableMutexGuard aGuard( GetMutex() );
-
if ( !mxModel.is() )
{
RuntimeException aException;
diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx
index e5b656a2df11..0bdf24c195db 100644
--- a/toolkit/source/controls/unocontrolcontainer.cxx
+++ b/toolkit/source/controls/unocontrolcontainer.cxx
@@ -46,6 +46,7 @@
#include <limits>
#include <map>
#include <boost/shared_ptr.hpp>
+#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
using namespace ::com::sun::star;
@@ -771,6 +772,10 @@ void UnoControlContainer::createPeer( const uno::Reference< awt::XToolkit >& rxT
sal_Bool bVis = maComponentInfos.bVisible;
if( bVis )
UnoControl::setVisible( sal_False );
+
+ uno::Reference< beans::XPropertySet > xTmpPropSet
+ ( getModel(), uno::UNO_QUERY );
+
// Create a new peer
UnoControl::createPeer( rxToolkit, rParent );
@@ -827,6 +832,25 @@ void UnoControlContainer::setVisible( sal_Bool bVisible ) throw(uno::RuntimeExce
createPeer( uno::Reference< awt::XToolkit > (), uno::Reference< awt::XWindowPeer > () );
}
-
+void UnoControlContainer::PrepareWindowDescriptor( ::com::sun::star::awt::WindowDescriptor& rDesc )
+{
+ // HACK due to the fact that we can't really use VSCROLL & HSCROLL
+ // for Dialog ( ::com::sun::star::awt::VclWindowPeerAttribute::VSCROLL
+ // has the same value as
+ // ::com::sun::star::awt::WindowAttribute::NODECORATION )
+ // For convenience in the PropBrowse using HSCROLL and VSCROLL ensures
+ // the Correct text. We exchange them here and the control knows
+ // about this hack ( it sucks badly I know )
+ if ( rDesc.WindowAttributes & ::com::sun::star::awt::VclWindowPeerAttribute::VSCROLL )
+ {
+ rDesc.WindowAttributes &= ~::com::sun::star::awt::VclWindowPeerAttribute::VSCROLL;
+ rDesc.WindowAttributes |= ::com::sun::star::awt::VclWindowPeerAttribute::AUTOVSCROLL;
+ }
+ if ( rDesc.WindowAttributes & ::com::sun::star::awt::VclWindowPeerAttribute::HSCROLL )
+ {
+ rDesc.WindowAttributes &= ~::com::sun::star::awt::VclWindowPeerAttribute::HSCROLL;
+ rDesc.WindowAttributes |= ::com::sun::star::awt::VclWindowPeerAttribute::AUTOHSCROLL;
+ }
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */