summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/ole/axcontrol.cxx1
-rw-r--r--toolkit/inc/toolkit/controls/unocontrolcontainer.hxx1
-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
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx2
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx2
8 files changed, 49 insertions, 28 deletions
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index cba97f575e23..affd9d7659b0 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -328,7 +328,6 @@ void ControlConverter::convertScrollabilitySettings( PropertyMap& rPropMap,
rPropMap.setProperty( PROP_ScrollLeft, tmpPos.X );
rPropMap.setProperty( PROP_HScroll, ( nScrollBars & 0x1 ) == 0x1 );
rPropMap.setProperty( PROP_VScroll, ( nScrollBars & 0x2 ) == 0x2 );
- printf("** imported hscroll %d vscroll %d\n", ( nScrollBars & 0x1 ) == 0x1, ( nScrollBars & 0x2 ) == 0x2);
}
void ControlConverter::convertScrollBar( PropertyMap& rPropMap,
diff --git a/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx b/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx
index e29fab5b8350..71df40a754dd 100644
--- a/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrolcontainer.hxx
@@ -118,6 +118,7 @@ public:
DECLIMPL_SERVICEINFO_DERIVED( UnoControlContainer, UnoControlBase, szServiceName2_UnoControlContainer )
protected:
+ virtual void PrepareWindowDescriptor( ::com::sun::star::awt::WindowDescriptor& rDesc );
virtual void removingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
virtual void addingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
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: */
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
index c8daaaf1a704..4f638056e466 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
@@ -124,7 +124,7 @@ void ElementDescriptor::readFrameModel( StyleBag * all_styles )
title->addAttribute( XMLNS_DIALOGS_PREFIX ":value", aTitle );
addSubElement( title );
}
-
+ readScrollableSettings();
uno::Reference< container::XNameContainer > xControlContainer( _xProps, uno::UNO_QUERY );
if ( xControlContainer.is() && xControlContainer->getElementNames().getLength() )
{
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index e8e3b5381fa7..b448d186bdc2 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -97,6 +97,7 @@ void Frame::endElement()
{
xControlModel->setPropertyValue( "Label" , makeAny( _label ) );
}
+ ctx.importScollableSettings( _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -1625,6 +1626,7 @@ void CheckBoxElement::endElement()
}
ctx.importEvents( _events );
+ ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
_events.clear();