summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2001-05-04 08:04:05 +0000
committerThomas Benisch <tbe@openoffice.org>2001-05-04 08:04:05 +0000
commitcb43206b77451309b08fa2141b91eca2607c731f (patch)
tree247bbdbf0a7e7cbddb374706d94e0744c4afcfb2 /toolkit
parent346fa27d98b86bdab146e46bba1bf541dfc14d74 (diff)
added FixedLine
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/inc/toolkit/controls/unocontrols.hxx47
-rw-r--r--toolkit/inc/toolkit/helper/servicenames.hxx6
-rw-r--r--toolkit/source/awt/vclxwindow.cxx27
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx9
-rw-r--r--toolkit/source/controls/unocontrols.cxx79
-rw-r--r--toolkit/source/helper/registerservices.cxx10
-rw-r--r--toolkit/source/helper/servicenames.cxx6
7 files changed, 165 insertions, 19 deletions
diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx
index 5ca8b1f98e49..35674349b0fe 100644
--- a/toolkit/inc/toolkit/controls/unocontrols.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrols.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unocontrols.hxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: tbe $ $Date: 2001-05-02 12:27:22 $
+ * last change: $Author: tbe $ $Date: 2001-05-04 09:01:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1577,5 +1577,48 @@ public:
};
+// ----------------------------------------------------
+// class UnoControlFixedLineModel
+// ----------------------------------------------------
+class UnoControlFixedLineModel : public UnoControlModel
+{
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+public:
+ UnoControlFixedLineModel();
+ UnoControlFixedLineModel( const UnoControlFixedLineModel& rModel ) : UnoControlModel( rModel ) {;}
+
+ UnoControlModel* Clone() const { return new UnoControlFixedLineModel( *this ); }
+
+ ::rtl::OUString getServiceName() const;
+
+
+ // ::com::sun::star::beans::XMultiPropertySet
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO( UnoControlFixedLineModel, ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedLineModel ) )
+
+};
+
+// ----------------------------------------------------
+// class UnoFixedLineControl
+// ----------------------------------------------------
+class UnoFixedLineControl : public UnoControlBase
+{
+public:
+ UnoFixedLineControl();
+ ::rtl::OUString GetComponentServiceName();
+
+ sal_Bool SAL_CALL isTransparent( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XServiceInfo
+ DECLIMPL_SERVICEINFO( UnoFixedLineControl, ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedLine ) )
+
+};
+
+
#endif // _TOOLKIT_HELPER_UNOCONTROLS_HXX_
diff --git a/toolkit/inc/toolkit/helper/servicenames.hxx b/toolkit/inc/toolkit/helper/servicenames.hxx
index afc6d22cbd44..a94e82808559 100644
--- a/toolkit/inc/toolkit/helper/servicenames.hxx
+++ b/toolkit/inc/toolkit/helper/servicenames.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: servicenames.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: tbe $ $Date: 2001-05-02 12:28:29 $
+ * last change: $Author: tbe $ $Date: 2001-05-04 09:01:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -119,6 +119,8 @@ extern const sal_Char __FAR_DATA szServiceName_UnoControlProgressBar[], szServic
extern const sal_Char __FAR_DATA szServiceName_UnoControlProgressBarModel[], szServiceName2_UnoControlProgressBarModel[];
extern const sal_Char __FAR_DATA szServiceName_UnoControlScrollBar[], szServiceName2_UnoControlScrollBar[];
extern const sal_Char __FAR_DATA szServiceName_UnoControlScrollBarModel[], szServiceName2_UnoControlScrollBarModel[];
+extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedLine[], szServiceName2_UnoControlFixedLine[];
+extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedLineModel[], szServiceName2_UnoControlFixedLineModel[];
extern const sal_Char __FAR_DATA szServiceName_PrinterServer[], szServiceName2_PrinterServer[];
// ExtUnoWrapper:
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 90b46ec20107..e59fbd2e680a 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: vclxwindow.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: mt $ $Date: 2001-04-11 09:45:18 $
+ * last change: $Author: tbe $ $Date: 2001-05-04 09:02:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -686,6 +686,29 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
}
}
break;
+ case BASEPROPERTY_ORIENTATION:
+ {
+ switch ( eWinType )
+ {
+ case WINDOW_FIXEDLINE:
+ {
+ sal_Int32 nOrientation;
+ if ( Value >>= nOrientation )
+ {
+ WinBits nStyle = pWindow->GetStyle();
+ nStyle &= ~(WB_HORZ|WB_VERT);
+ if ( nOrientation == 0 )
+ nStyle |= WB_HORZ;
+ else
+ nStyle |= WB_VERT;
+
+ pWindow->SetStyle( nStyle );
+ }
+ }
+ break;
+ }
+ }
+ break;
}
}
}
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index c7f9c5e0dff8..0bf3ec06a5c1 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unocontrolmodel.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: tbe $ $Date: 2001-05-02 12:24:34 $
+ * last change: $Author: tbe $ $Date: 2001-05-04 09:02:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,9 +77,6 @@
#ifndef _COM_SUN_STAR_AWT_FONTSLANT_HPP_
#include <com/sun/star/awt/FontSlant.hpp>
#endif
-#ifndef _COM_SUN_STAR_AWT_SCROLLBARORIENTATION_HPP_
-#include <com/sun/star/awt/ScrollBarOrientation.hpp>
-#endif
#ifndef _COM_SUN_STAR_IO_XMARKABLESTREAM_HPP_
#include <com/sun/star/io/XMarkableStream.hpp>
@@ -329,7 +326,7 @@ void UnoControlModel::ImplPropertyChanged( sal_uInt16 nPropId )
case BASEPROPERTY_SCROLLVALUE_MAX: aDefault <<= (sal_Int32) 100; break;
case BASEPROPERTY_LINEINCREMENT: aDefault <<= (sal_Int32) 1; break;
case BASEPROPERTY_BLOCKINCREMENT: aDefault <<= (sal_Int32) 10; break;
- case BASEPROPERTY_ORIENTATION: aDefault <<= (sal_Int32) ::com::sun::star::awt::ScrollBarOrientation::VERTICAL; break;
+ case BASEPROPERTY_ORIENTATION: aDefault <<= (sal_Int32) 0; break;
case BASEPROPERTY_DEFAULTCONTROL: aDefault <<= ((UnoControlModel*)this)->getServiceName(); break;
case BASEPROPERTY_MOVEABLE:
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index a39cd9936ac7..bf22e844e561 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unocontrols.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: tbe $ $Date: 2001-05-02 15:21:44 $
+ * last change: $Author: tbe $ $Date: 2001-05-04 09:03:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -291,6 +291,8 @@ uno::Reference< uno::XInterface >UnoControlDialogModel::createInstance( const ::
pNewModel = new OGeometryControlModel< UnoControlProgressBarModel >;
else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlScrollBarModel ) == 0 )
pNewModel = new OGeometryControlModel< UnoControlScrollBarModel >;
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlFixedLineModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoControlFixedLineModel >;
uno::Reference< uno::XInterface > xNewModel = (::cppu::OWeakObject*)pNewModel;
return xNewModel;
@@ -306,7 +308,7 @@ uno::Sequence< ::rtl::OUString > UnoControlDialogModel::getAvailableServiceNames
static uno::Sequence< ::rtl::OUString >* pNamesSeq = NULL;
if ( !pNamesSeq )
{
- pNamesSeq = new uno::Sequence< ::rtl::OUString >( 18 );
+ pNamesSeq = new uno::Sequence< ::rtl::OUString >( 19 );
::rtl::OUString* pNames = pNamesSeq->getArray();
pNames[0] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlEditModel );
pNames[1] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFormattedFieldModel );
@@ -326,6 +328,7 @@ uno::Sequence< ::rtl::OUString > UnoControlDialogModel::getAvailableServiceNames
pNames[15] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlPatternFieldModel );
pNames[16] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlProgressBarModel );
pNames[17] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlScrollBarModel );
+ pNames[18] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedLineModel );
}
return *pNamesSeq;
}
@@ -4320,3 +4323,73 @@ sal_Int32 UnoScrollBarControl::getOrientation() throw(::com::sun::star::uno::Run
}
return n;
}
+
+
+// ----------------------------------------------------
+// class UnoControlFixedLineModel
+// ----------------------------------------------------
+UnoControlFixedLineModel::UnoControlFixedLineModel()
+{
+ ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
+ ImplRegisterProperty( BASEPROPERTY_ENABLED );
+ ImplRegisterProperty( BASEPROPERTY_FONTDESCRIPTOR );
+ ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
+ ImplRegisterProperty( BASEPROPERTY_HELPURL );
+ ImplRegisterProperty( BASEPROPERTY_LABEL );
+ ImplRegisterProperty( BASEPROPERTY_ORIENTATION );
+ ImplRegisterProperty( BASEPROPERTY_PRINTABLE );
+ ImplRegisterProperty( BASEPROPERTY_TEXTCOLOR );
+}
+
+::rtl::OUString UnoControlFixedLineModel::getServiceName() const
+{
+ return ::rtl::OUString::createFromAscii( szServiceName_UnoControlFixedLineModel );
+}
+
+uno::Any UnoControlFixedLineModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
+{
+ if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
+ {
+ uno::Any aAny;
+ aAny <<= ::rtl::OUString::createFromAscii( szServiceName_UnoControlFixedLine );
+ return aAny;
+ }
+ return UnoControlModel::ImplGetDefaultValue( nPropId );
+}
+
+::cppu::IPropertyArrayHelper& UnoControlFixedLineModel::getInfoHelper()
+{
+ static UnoPropertyArrayHelper* pHelper = NULL;
+ if ( !pHelper )
+ {
+ uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
+ pHelper = new UnoPropertyArrayHelper( aIDs );
+ }
+ return *pHelper;
+}
+
+// beans::XMultiPropertySet
+uno::Reference< beans::XPropertySetInfo > UnoControlFixedLineModel::getPropertySetInfo( ) throw(uno::RuntimeException)
+{
+ static uno::Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
+ return xInfo;
+}
+
+// ----------------------------------------------------
+// class UnoFixedLineControl
+// ----------------------------------------------------
+UnoFixedLineControl::UnoFixedLineControl()
+{
+ maComponentInfos.nWidth = 100; // ??
+ maComponentInfos.nHeight = 100; // ??
+}
+
+::rtl::OUString UnoFixedLineControl::GetComponentServiceName()
+{
+ return ::rtl::OUString::createFromAscii( "FixedLine" );
+}
+
+sal_Bool UnoFixedLineControl::isTransparent() throw(uno::RuntimeException)
+{
+ return sal_True;
+}
diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx
index 6efee659acbf..3546dd5bcd99 100644
--- a/toolkit/source/helper/registerservices.cxx
+++ b/toolkit/source/helper/registerservices.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: registerservices.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: tbe $ $Date: 2001-05-02 12:30:55 $
+ * last change: $Author: tbe $ $Date: 2001-05-04 09:03:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -155,6 +155,7 @@ IMPL_CREATEINSTANCE( UnoControlRadioButtonModel )
IMPL_CREATEINSTANCE( UnoControlTimeFieldModel )
IMPL_CREATEINSTANCE( UnoControlProgressBarModel )
IMPL_CREATEINSTANCE( UnoControlScrollBarModel )
+IMPL_CREATEINSTANCE( UnoControlFixedLineModel )
IMPL_CREATEINSTANCE( UnoCurrencyFieldControl )
IMPL_CREATEINSTANCE( UnoDateFieldControl )
IMPL_CREATEINSTANCE( UnoDialogControl )
@@ -171,6 +172,7 @@ IMPL_CREATEINSTANCE( UnoRadioButtonControl )
IMPL_CREATEINSTANCE( UnoTimeFieldControl )
IMPL_CREATEINSTANCE( UnoProgressBarControl )
IMPL_CREATEINSTANCE( UnoScrollBarControl )
+IMPL_CREATEINSTANCE( UnoFixedLineControl )
IMPL_CREATEINSTANCE( VCLXMenuBar )
IMPL_CREATEINSTANCE( VCLXPointer )
IMPL_CREATEINSTANCE( VCLXPopupMenu )
@@ -240,6 +242,8 @@ sal_Bool SAL_CALL component_writeInfo( void* _pServiceManager, void* _pRegistryK
REGISTER_SERVICES( UnoControlProgressBarModel, ::rtl::OUString::createFromAscii( szServiceName_UnoControlProgressBarModel ), ::rtl::OUString::createFromAscii( szServiceName2_UnoControlProgressBarModel ) );
REGISTER_SERVICES( UnoScrollBarControl, ::rtl::OUString::createFromAscii( szServiceName_UnoControlScrollBar ), ::rtl::OUString::createFromAscii( szServiceName2_UnoControlScrollBar ) );
REGISTER_SERVICES( UnoControlScrollBarModel, ::rtl::OUString::createFromAscii( szServiceName_UnoControlScrollBarModel ), ::rtl::OUString::createFromAscii( szServiceName2_UnoControlScrollBarModel ) );
+ REGISTER_SERVICES( UnoFixedLineControl, ::rtl::OUString::createFromAscii( szServiceName_UnoControlFixedLine ), ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedLine ) );
+ REGISTER_SERVICES( UnoControlFixedLineModel, ::rtl::OUString::createFromAscii( szServiceName_UnoControlFixedLineModel ), ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedLineModel ) );
REGISTER_SERVICES( VCLXPrinterServer, ::rtl::OUString::createFromAscii( szServiceName_PrinterServer ), ::rtl::OUString::createFromAscii( szServiceName2_PrinterServer ) );
return sal_True;
}
@@ -302,6 +306,8 @@ void* SAL_CALL component_getFactory( const sal_Char* sImplementationName, void*
else CHECKANDCREATEFACTORY( UnoControlProgressBarModel, ::rtl::OUString::createFromAscii( szServiceName_UnoControlProgressBarModel ), ::rtl::OUString::createFromAscii( szServiceName2_UnoControlProgressBarModel ) )
else CHECKANDCREATEFACTORY( UnoScrollBarControl, ::rtl::OUString::createFromAscii( szServiceName_UnoControlScrollBar ), ::rtl::OUString::createFromAscii( szServiceName2_UnoControlScrollBar ) )
else CHECKANDCREATEFACTORY( UnoControlScrollBarModel, ::rtl::OUString::createFromAscii( szServiceName_UnoControlScrollBarModel ), ::rtl::OUString::createFromAscii( szServiceName2_UnoControlScrollBarModel ) )
+ else CHECKANDCREATEFACTORY( UnoFixedLineControl, ::rtl::OUString::createFromAscii( szServiceName_UnoControlFixedLine ), ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedLine ) )
+ else CHECKANDCREATEFACTORY( UnoControlFixedLineModel, ::rtl::OUString::createFromAscii( szServiceName_UnoControlFixedLineModel ), ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedLineModel ) )
else CHECKANDCREATEFACTORY( VCLXPrinterServer, ::rtl::OUString::createFromAscii( szServiceName_PrinterServer ), ::rtl::OUString::createFromAscii( szServiceName2_PrinterServer ) )
}
return pRet;
diff --git a/toolkit/source/helper/servicenames.cxx b/toolkit/source/helper/servicenames.cxx
index d45481cb61af..a388deb14538 100644
--- a/toolkit/source/helper/servicenames.cxx
+++ b/toolkit/source/helper/servicenames.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: servicenames.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: tbe $ $Date: 2001-05-02 12:31:11 $
+ * last change: $Author: tbe $ $Date: 2001-05-04 09:04:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -120,3 +120,5 @@ const sal_Char __FAR_DATA szServiceName_UnoControlProgressBar[] = "stardiv.vcl.c
const sal_Char __FAR_DATA szServiceName_UnoControlProgressBarModel[] = "stardiv.vcl.controlmodel.ProgressBar", szServiceName2_UnoControlProgressBarModel[] = "com.sun.star.awt.UnoControlProgressBarModel";
const sal_Char __FAR_DATA szServiceName_UnoControlScrollBar[] = "stardiv.vcl.control.ScrollBar", szServiceName2_UnoControlScrollBar[] = "com.sun.star.awt.UnoControlScrollBar";
const sal_Char __FAR_DATA szServiceName_UnoControlScrollBarModel[] = "stardiv.vcl.controlmodel.ScrollBar", szServiceName2_UnoControlScrollBarModel[] = "com.sun.star.awt.UnoControlScrollBarModel";
+const sal_Char __FAR_DATA szServiceName_UnoControlFixedLine[] = "stardiv.vcl.control.FixedLine", szServiceName2_UnoControlFixedLine[] = "com.sun.star.awt.UnoControlFixedLine";
+const sal_Char __FAR_DATA szServiceName_UnoControlFixedLineModel[] = "stardiv.vcl.controlmodel.FixedLine", szServiceName2_UnoControlFixedLineModel[] = "com.sun.star.awt.UnoControlFixedLineModel";