summaryrefslogtreecommitdiff
path: root/toolkit/source/controls/dialogcontrol.cxx
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/controls/dialogcontrol.cxx
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/controls/dialogcontrol.cxx')
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx42
1 files changed, 19 insertions, 23 deletions
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 );
}