summaryrefslogtreecommitdiff
path: root/basctl/source/dlged
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2001-04-26 11:40:09 +0000
committerThomas Benisch <tbe@openoffice.org>2001-04-26 11:40:09 +0000
commitda78440c332d081eb12f4d741e88c532382f7ff0 (patch)
treefd329ee8534edea779105f9f0178666872d71776 /basctl/source/dlged
parentf7a8454152e71470e693de7d62cb669282cda52b (diff)
added ProgressBar
Diffstat (limited to 'basctl/source/dlged')
-rw-r--r--basctl/source/dlged/dlged.cxx50
-rw-r--r--basctl/source/dlged/dlgedfac.cxx5
-rw-r--r--basctl/source/dlged/dlgedobj.cxx12
-rw-r--r--basctl/source/dlged/dlgresid.src8
-rw-r--r--basctl/source/dlged/propbrw.cxx8
5 files changed, 27 insertions, 56 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 49a68b0caa1b..b2bd28f5e02b 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlged.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: tbe $ $Date: 2001-04-12 11:52:23 $
+ * last change: $Author: tbe $ $Date: 2001-04-26 12:38:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -129,11 +129,6 @@
#include "vcsbxdef.hxx"
-// only for progressbar test
-//#define _PROGRESSBAR_TEST_
-#ifdef _PROGRESSBAR_TEST_
-#include <com/sun/star/lang/XTypeProvider.hpp>
-#endif
using namespace comphelper;
using namespace ::com::sun::star;
@@ -430,47 +425,6 @@ void DlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoContr
pDlgEdForm->SortByTabIndex(); // for backward compatibility
pDlgEdForm->StartListening();
-
- // test progressbar
-
-#ifdef _PROGRESSBAR_TEST_
-
- uno::Reference< lang::XMultiServiceFactory > xModFact( xDlgMod, uno::UNO_QUERY );
- //DlgEdObj* pBar = new DlgEdObj(rtl::OUString::createFromAscii("com.sun.star.awt.XProgressBar"), xModFact);
- DlgEdObj* pBar = new DlgEdObj(rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlButtonModel"));
- pBar->SetSnapRect( Rectangle( Point(1000,1000) , Size(1000,1000) ) );
- pBar->SetChanged();
- pSdrModel->GetPage(0)->InsertObject( pBar );
- pBar->SendRepaintBroadcast();
-
- uno::Reference< awt::XControlModel > xCtrl1( xModFact->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.XProgressBar" ) ) ), uno::UNO_QUERY );
-
- Reference< lang::XTypeProvider > xTypeProvider( pBar->GetUnoControlModel() , UNO_QUERY );
- if( xTypeProvider.is() )
- {
- Sequence< Type > aTypeSeq = xTypeProvider->getTypes();
- const Type* pTypeArray = aTypeSeq.getConstArray();
- UINT32 nIfaceCount = aTypeSeq.getLength();
- for( UINT32 j = 0 ; j < nIfaceCount ; j++ )
- {
- const Type& rType = pTypeArray[j];
- //aRet += Impl_GetInterfaceInfo( x, TypeToIdlClass( rType ), 1 );
- }
- }
-
- uno::Reference< beans::XPropertySet > xPSet( xCtrl1, uno::UNO_QUERY );
- uno::Any aValue;
- aValue <<= (sal_Int32) 10;
- //xPSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Range" ) ), aValue );
- uno::Any aAny;
- aAny <<= xCtrl1;
- uno::Reference< container::XNameContainer > xC( xDlgMod , uno::UNO_QUERY );
- //xC->insertByName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ProgressBar1" ) ), aAny );
-
-#endif
-
- // end of progressbar test
-
// create controls
Reference< ::com::sun::star::container::XNameAccess > xNameAcc( m_xUnoControlDialogModel, UNO_QUERY );
if ( xNameAcc.is() )
diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx
index ffe0b01423a3..168a7bee6d66 100644
--- a/basctl/source/dlged/dlgedfac.cxx
+++ b/basctl/source/dlged/dlgedfac.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgedfac.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: tbe $ $Date: 2001-03-23 16:08:20 $
+ * last change: $Author: tbe $ $Date: 2001-04-26 12:38:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -174,6 +174,7 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
pObjFactory->pNewObj = new DlgEdObj(rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlImageControlModel"), xDialogSFact);
break;
case OBJ_DLG_SPINBUTTON:
+ pObjFactory->pNewObj = new DlgEdObj(rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlProgressBarModel"), xDialogSFact);
break;
case OBJ_DLG_HSCROLLBAR:
break;
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 11c24993bbf3..710fcb430c32 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgedobj.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: tbe $ $Date: 2001-04-10 15:15:06 $
+ * last change: $Author: tbe $ $Date: 2001-04-26 12:39:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -774,6 +774,10 @@ void SAL_CALL DlgEdObj::TabIndexChange( const ::com::sun::star::beans::Property
{
nResId = RID_STR_CLASS_IMAGECONTROL;
}
+ else if (aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlProgressBarModel") ))
+ {
+ nResId = RID_STR_CLASS_PROGRESSBAR;
+ }
if (nResId)
{
@@ -874,6 +878,10 @@ sal_uInt16 DlgEdObj::GetObjIdentifier() const
{
return OBJ_DLG_PREVIEW;
}
+ else if (aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlProgressBarModel") ))
+ {
+ return OBJ_DLG_SPINBUTTON; // ???change this!
+ }
else
{
return 0;
diff --git a/basctl/source/dlged/dlgresid.src b/basctl/source/dlged/dlgresid.src
index bf7df1fc263e..4fedaa574777 100644
--- a/basctl/source/dlged/dlgresid.src
+++ b/basctl/source/dlged/dlgresid.src
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgresid.src,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: kz $ $Date: 2001-04-09 23:23:08 $
+ * last change: $Author: tbe $ $Date: 2001-04-26 12:39:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -103,6 +103,10 @@ String RID_STR_CLASS_IMAGECONTROL
{
Text = "ImageControl" ;
};
+String RID_STR_CLASS_PROGRESSBAR
+{
+ Text = "ProgressBar" ;
+};
// Property Browser Headline ----------------------------------------------------------------
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index 7c2916a0efe9..0c3c6795efc4 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: propbrw.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: tbe $ $Date: 2001-03-23 16:16:26 $
+ * last change: $Author: tbe $ $Date: 2001-04-26 12:39:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -473,6 +473,10 @@ void PropBrw::implSetNewObject(const Reference< XPropertySet >& _rxObject)
{
nResId = RID_STR_CLASS_IMAGECONTROL;
}
+ else if (aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlProgressBarModel") ))
+ {
+ nResId = RID_STR_CLASS_PROGRESSBAR;
+ }
if (nResId)
{