ooo-build r13026 - trunk/patches/test/vba
- From: noelpwer svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r13026 - trunk/patches/test/vba
- Date: Wed, 2 Jul 2008 13:57:58 +0000 (UTC)
Author: noelpwer
Date: Wed Jul 2 13:57:58 2008
New Revision: 13026
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13026&view=rev
Log:
support for data-aware combobox for Userforms
Modified:
trunk/patches/test/vba/ObjectModule.diff
Modified: trunk/patches/test/vba/ObjectModule.diff
==============================================================================
--- trunk/patches/test/vba/ObjectModule.diff (original)
+++ trunk/patches/test/vba/ObjectModule.diff Wed Jul 2 13:57:58 2008
@@ -1,5 +1,5 @@
diff --git basctl/source/basicide/baside3.cxx basctl/source/basicide/baside3.cxx
-index b89f52f..1ec7f80 100644
+index 1865b94..12c8e0c 100644
--- basctl/source/basicide/baside3.cxx
+++ basctl/source/basicide/baside3.cxx
@@ -112,7 +112,7 @@ DialogWindow::DialogWindow( Window* pPar
@@ -30,7 +30,7 @@
}
}
diff --git basctl/source/basicide/basides3.cxx basctl/source/basicide/basides3.cxx
-index 4ea4a68..f1fac09 100644
+index b211eb3..e562ecb 100644
--- basctl/source/basicide/basides3.cxx
+++ basctl/source/basicide/basides3.cxx
@@ -98,7 +98,7 @@ DialogWindow* BasicIDEShell::CreateDlgWi
@@ -43,7 +43,7 @@
// new dialog window
diff --git basctl/source/basicide/moduldlg.cxx basctl/source/basicide/moduldlg.cxx
-index a709c08..80af64d 100644
+index a5b41e7..cd2c032 100644
--- basctl/source/basicide/moduldlg.cxx
+++ basctl/source/basicide/moduldlg.cxx
@@ -315,7 +315,7 @@ void BasicIDEShell::CopyDialogResources(
@@ -65,7 +65,7 @@
}
diff --git basctl/source/basicide/scriptdocument.cxx basctl/source/basicide/scriptdocument.cxx
-index 875deba..931f090 100644
+index a12fb46..e984052 100644
--- basctl/source/basicide/scriptdocument.cxx
+++ basctl/source/basicide/scriptdocument.cxx
@@ -663,7 +663,7 @@ namespace basctl
@@ -115,7 +115,7 @@
// insert dialog into library
xLib->insertByName( _rDialogName, makeAny( _out_rDialogProvider ) );
diff --git basctl/source/dlged/dlged.cxx basctl/source/dlged/dlged.cxx
-index 6470d3e..2b61840 100644
+index b7588ee..09ebe9c 100644
--- basctl/source/dlged/dlged.cxx
+++ basctl/source/dlged/dlged.cxx
@@ -208,7 +208,7 @@ BOOL DlgEditor::RemarkDialog()
@@ -163,7 +163,7 @@
// get control models from clipboard dialog model
diff --git basctl/source/inc/dlged.hxx basctl/source/inc/dlged.hxx
-index da44ccc..03203c2 100644
+index 02a1b08..3db132a 100644
--- basctl/source/inc/dlged.hxx
+++ basctl/source/inc/dlged.hxx
@@ -35,6 +35,7 @@
@@ -188,7 +188,7 @@
void SetWindow( Window* pWindow );
diff --git basic/inc/basic/basmgr.hxx basic/inc/basic/basmgr.hxx
-index b32a186..8ab080d 100644
+index 2674c59..3c4f364 100644
--- basic/inc/basic/basmgr.hxx
+++ basic/inc/basic/basmgr.hxx
@@ -113,9 +113,10 @@ struct LibraryContainerInfo
@@ -234,7 +234,7 @@
virtual void InitObject();
public:
diff --git basic/source/basmgr/basmgr.cxx basic/source/basmgr/basmgr.cxx
-index 3a69095..c0eb3bf 100644
+index b5394ae..f12312e 100644
--- basic/source/basmgr/basmgr.cxx
+++ basic/source/basmgr/basmgr.cxx
@@ -44,6 +44,7 @@
@@ -344,8 +344,48 @@
String aLibName = pStdLib->GetName();
if( xScriptCont.is() )
{
+diff --git basic/source/classes/eventatt.cxx basic/source/classes/eventatt.cxx
+index a91863b..b91b9d2 100644
+--- basic/source/classes/eventatt.cxx
++++ basic/source/classes/eventatt.cxx
+@@ -557,20 +557,33 @@ void RTL_Impl_CreateUnoDialog( StarBASIC
+ }
+
+ Any aDlgLibAny;
++ bool bDocDialog = false;
+ if( pSearchBasic1 )
+ {
++ StarBASIC* pSearch = (StarBASIC*)pSearchBasic1;
+ aDlgLibAny = implFindDialogLibForDialog( aAnyISP, pSearchBasic1 );
+ if( pSearchBasic2 && aDlgLibAny.getValueType().getTypeClass() == TypeClass_VOID )
++ {
++ pSearch = (StarBASIC*)pSearchBasic2;
+ aDlgLibAny = implFindDialogLibForDialog( aAnyISP, pSearchBasic2 );
++ }
++ // If we found the dialog then it belongs to the Search basic
++ if ( aDlgLibAny.hasValue() )
++ bDocDialog = pSearch->IsDocBasic();
++ // otherwise it belongs to the opposite,
++ // and yes, this algorithm doesn't scale does it
++ else
++ bDocDialog = !( pFound->IsDocBasic() );
++
+ }
+
+
+- OSL_TRACE("About to try get a hold of ThisComponent");
++ OSL_TRACE("About to try get a hold of ThisComponent, dlg located in document %s", bDocDialog ? "TRUE" : "FALSE" );
+ Reference< frame::XModel > xModel = getModelFromBasic( pStartedBasic ) ;
+ Reference< XScriptListener > xScriptListener = new BasicScriptListener_Impl( pBasic, xModel );
+
+ Sequence< Any > aArgs( 4 );
+- aArgs[ 0 ] <<= xModel;
++ aArgs[ 0 ] <<= bDocDialog ? xModel : uno::Reference< uno::XInterface >();
+ aArgs[ 1 ] <<= xInput;
+ aArgs[ 2 ] = aDlgLibAny;
+ aArgs[ 3 ] <<= xScriptListener;
diff --git basic/source/classes/sbxmod.cxx basic/source/classes/sbxmod.cxx
-index 734b63b..9ba8a61 100644
+index 3f9e76c..af126c2 100644
--- basic/source/classes/sbxmod.cxx
+++ basic/source/classes/sbxmod.cxx
@@ -2250,25 +2250,26 @@ SbObjModule::SbObjModule( const com::sun
@@ -442,7 +482,7 @@
}
catch( uno::Exception& e )
diff --git basic/source/inc/namecont.hxx basic/source/inc/namecont.hxx
-index d7c1d17..213935c 100644
+index d281396..9776e64 100644
--- basic/source/inc/namecont.hxx
+++ basic/source/inc/namecont.hxx
@@ -62,20 +62,23 @@
@@ -545,7 +585,7 @@
protected:
virtual bool SAL_CALL isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const = 0;
diff --git basic/source/inc/scriptcont.hxx basic/source/inc/scriptcont.hxx
-index 9ca08af..9007372 100644
+index 1679b30..b9d3415 100644
--- basic/source/inc/scriptcont.hxx
+++ basic/source/inc/scriptcont.hxx
@@ -97,6 +97,7 @@ class SfxScriptLibraryContainer : public
@@ -575,7 +615,7 @@
static bool containsValidModule( const ::com::sun::star::uno::Any& _rElement );
diff --git basic/source/runtime/step2.cxx basic/source/runtime/step2.cxx
-index 4eaf4ed..a6c38cf 100644
+index 0e7e68d..af41ee1 100644
--- basic/source/runtime/step2.cxx
+++ basic/source/runtime/step2.cxx
@@ -39,6 +39,7 @@
@@ -601,7 +641,7 @@
}
diff --git basic/source/uno/dlgcont.cxx basic/source/uno/dlgcont.cxx
-index 2c46841..f32a783 100644
+index e010d24..31f6757 100644
--- basic/source/uno/dlgcont.cxx
+++ basic/source/uno/dlgcont.cxx
@@ -322,7 +322,7 @@ Any SAL_CALL SfxDialogLibraryContainer::
@@ -623,7 +663,7 @@
return aRetAny;
}
diff --git basic/source/uno/namecont.cxx basic/source/uno/namecont.cxx
-index 34c862e..0b1d617 100644
+index b433b0f..db64f07 100644
--- basic/source/uno/namecont.cxx
+++ basic/source/uno/namecont.cxx
@@ -107,6 +107,27 @@ static bool GbMigrationSuppressErrors =
@@ -806,7 +846,7 @@
} // namespace basic
diff --git basic/source/uno/sbservices.cxx basic/source/uno/sbservices.cxx
-index 5826afe..e5fdcbe 100644
+index a2a4ded..aa076ea 100644
--- basic/source/uno/sbservices.cxx
+++ basic/source/uno/sbservices.cxx
@@ -43,6 +43,7 @@ namespace basic
@@ -826,7 +866,7 @@
}
}
diff --git basic/source/uno/scriptcont.cxx basic/source/uno/scriptcont.cxx
-index eb05883..88de184 100644
+index 4a46e98..0683981 100644
--- basic/source/uno/scriptcont.cxx
+++ basic/source/uno/scriptcont.cxx
@@ -157,7 +157,7 @@ SfxScriptLibraryContainer::SfxScriptLibr
@@ -1066,7 +1106,7 @@
} // namespace basic
diff --git extensions/source/propctrlr/defaultforminspection.cxx extensions/source/propctrlr/defaultforminspection.cxx
-index a71b2d9..fb3269c 100644
+index 9dcd644..3073295 100644
--- extensions/source/propctrlr/defaultforminspection.cxx
+++ extensions/source/propctrlr/defaultforminspection.cxx
@@ -154,7 +154,7 @@ namespace pcr
@@ -1146,7 +1186,7 @@
+};
+#endif
diff --git offapi/com/sun/star/script/makefile.mk offapi/com/sun/star/script/makefile.mk
-index feebf3b..1dd0972 100644
+index ea9bbd1..9837104 100644
--- offapi/com/sun/star/script/makefile.mk
+++ offapi/com/sun/star/script/makefile.mk
@@ -52,6 +52,7 @@ IDLFILES=\
@@ -1212,7 +1252,7 @@
// --> PB 2004-08-23 #i33095# Security Options
diff --git sc/source/core/data/documen2.cxx sc/source/core/data/documen2.cxx
-index f096e3f..8f087f9 100644
+index 6dd6697..2f32352 100644
--- sc/source/core/data/documen2.cxx
+++ sc/source/core/data/documen2.cxx
@@ -247,6 +247,7 @@ ScDocument::ScDocument( ScDocumentMode e
@@ -1233,7 +1273,7 @@
aArgs[0] = uno::Any( xModel );
uno::Reference< document::XVbaEventsHelper > xVbaEventsHelper( xSF->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.VbaEventsHelper" ) ), aArgs ), uno::UNO_QUERY );
diff --git sc/source/core/data/document.cxx sc/source/core/data/document.cxx
-index a353d19..9f434f1 100644
+index b123ad7..7ee3b4a 100644
--- sc/source/core/data/document.cxx
+++ sc/source/core/data/document.cxx
@@ -91,6 +91,9 @@
@@ -1278,7 +1318,7 @@
diff --git sc/source/filter/excel/excimp8.cxx sc/source/filter/excel/excimp8.cxx
-index 49652a2..698d617 100644
+index 9c34585..cebd7dc 100644
--- sc/source/filter/excel/excimp8.cxx
+++ sc/source/filter/excel/excimp8.cxx
@@ -105,6 +105,7 @@
@@ -1346,7 +1386,7 @@
}
}
diff --git sc/source/filter/xml/xmlsubti.cxx sc/source/filter/xml/xmlsubti.cxx
-index 454ab74..ccbf565 100644
+index ab00932..f8674ae 100644
--- sc/source/filter/xml/xmlsubti.cxx
+++ sc/source/filter/xml/xmlsubti.cxx
@@ -228,6 +228,7 @@ void ScMyTables::NewSheet(const rtl::OUS
@@ -1384,7 +1424,7 @@
if ( sStyleName.getLength() )
diff --git sc/source/ui/docshell/docfunc.cxx sc/source/ui/docshell/docfunc.cxx
-index 46f2053..9db8edc 100644
+index 105f743..91ff9f7 100644
--- sc/source/ui/docshell/docfunc.cxx
+++ sc/source/ui/docshell/docfunc.cxx
@@ -2028,23 +2028,29 @@ BOOL ScDocFunc::MoveBlock( const ScRange
@@ -1487,7 +1527,7 @@
}
rDocShell.Broadcast( ScTablesHint( SC_TAB_INSERTED, nTab ) );
diff --git sc/source/ui/docshell/docsh.cxx sc/source/ui/docshell/docsh.cxx
-index 63f8412..fbc1687 100644
+index b904d50..28c6140 100644
--- sc/source/ui/docshell/docsh.cxx
+++ sc/source/ui/docshell/docsh.cxx
@@ -130,6 +130,7 @@
@@ -1595,7 +1635,7 @@
bIsEmpty = FALSE;
diff --git sc/source/ui/unoobj/addruno.cxx sc/source/ui/unoobj/addruno.cxx
-index bf3fc40..d033709 100644
+index b417b7e..4f313f2 100644
--- sc/source/ui/unoobj/addruno.cxx
+++ sc/source/ui/unoobj/addruno.cxx
@@ -72,7 +72,7 @@ void ScAddressConversionObj::Notify( Sfx
@@ -1689,7 +1729,7 @@
}
aRet <<= rtl::OUString( aFormatStr );
diff --git sc/source/ui/unoobj/docuno.cxx sc/source/ui/unoobj/docuno.cxx
-index 8307571..2de82b3 100644
+index cb8560a..a259a95 100644
--- sc/source/ui/unoobj/docuno.cxx
+++ sc/source/ui/unoobj/docuno.cxx
@@ -1691,6 +1691,7 @@ uno::Sequence<rtl::OUString> SAL_CALL Sc
@@ -1709,7 +1749,7 @@
uno::Reference< drawing::XDrawPagesSupplier > xSupplier( pDocShell->GetModel(), uno::UNO_QUERY_THROW );
uno::Reference< container::XIndexAccess > xIndex( xSupplier->getDrawPages(), uno::UNO_QUERY_THROW );
diff --git sc/source/ui/unoobj/servuno.cxx sc/source/ui/unoobj/servuno.cxx
-index 9924391..449514d 100644
+index b1a8a85..270c61a 100644
--- sc/source/ui/unoobj/servuno.cxx
+++ sc/source/ui/unoobj/servuno.cxx
@@ -63,7 +63,6 @@
@@ -1862,7 +1902,7 @@
#endif
diff --git sc/source/ui/vba/vbarange.cxx sc/source/ui/vba/vbarange.cxx
-index 1736fa0..9d46d8c 100644
+index 31620f8..b5595ef 100644
--- sc/source/ui/vba/vbarange.cxx
+++ sc/source/ui/vba/vbarange.cxx
@@ -214,24 +214,27 @@ uno::Reference< excel::XRange > lcl_make
@@ -1912,7 +1952,7 @@
return xRange;
}
diff --git scripting/source/dlgprov/dlgevtatt.cxx scripting/source/dlgprov/dlgevtatt.cxx
-index 902488e..325e825 100644
+index ed8f91e..970b945 100644
--- scripting/source/dlgprov/dlgevtatt.cxx
+++ scripting/source/dlgprov/dlgevtatt.cxx
@@ -415,7 +415,7 @@ namespace dlgprov
@@ -1952,20 +1992,40 @@
Any aReturn;
firing_impl( aScriptEvent, &aReturn );
diff --git scripting/source/dlgprov/dlgprov.cxx scripting/source/dlgprov/dlgprov.cxx
-index 7ccaf87..a01ec52 100644
+index b6912c6..7e6ad46 100644
--- scripting/source/dlgprov/dlgprov.cxx
+++ scripting/source/dlgprov/dlgprov.cxx
-@@ -188,7 +188,7 @@ static ::rtl::OUString aResourceResolver
+@@ -188,7 +188,15 @@ static ::rtl::OUString aResourceResolver
Reference< container::XNameContainer > DialogProviderImpl::createDialogModel( const Reference< io::XInputStream >& xInput, const Reference< resource::XStringResourceManager >& xStringResourceManager ) throw ( Exception )
{
Reference< container::XNameContainer > xDialogModel( createControlModel() );
- ::xmlscript::importDialogModel( xInput, xDialogModel, m_xContext );
++ // #TODO we really need to detect the source of the Dialog, is it
++ // located in the document or not. m_xModel need not be the location of
++ // the dialog. E.g. if the dialog was created from basic ( then we just
++ // can't tell where its from )
++ // If we are happy to always substitute the form model for the awt
++ // one then maybe the presence of a document model is enough to trigger
++ // swapping out the models ( or perhaps we only want to do this
++ // for vba mode ) there are a number of feasible and valid possibilities
+ ::xmlscript::importDialogModel( xInput, xDialogModel, m_xContext, m_xModel );
// Set resource property
if( xStringResourceManager.is() )
{
+@@ -649,7 +657,10 @@ static ::rtl::OUString aResourceResolver
+ aArguments[0] >>= m_xModel;
+ m_BasicInfo.reset( new BasicRTLParams() );
+ m_BasicInfo->mxInput.set( aArguments[ 1 ], UNO_QUERY_THROW );
+- m_BasicInfo->mxDlgLib.set( aArguments[ 2 ], UNO_QUERY_THROW );
++ // allow null mxDlgLib, a document dialog instantiated from
++ // from application basic is unable to provide ( or find ) it's
++ // Library
++ aArguments[ 2 ] >>= m_BasicInfo->mxDlgLib;
+ // leave the possibility to optionally allow the old dialog creation
+ // to use the new XScriptListener ( which converts the old style macro
+ // to a SF url )
diff --git svx/inc/svx/msocximex.hxx svx/inc/svx/msocximex.hxx
-index 98bce66..abbe885 100644
+index a6368b9..752587c 100644
--- svx/inc/svx/msocximex.hxx
+++ svx/inc/svx/msocximex.hxx
@@ -405,6 +405,8 @@ public:
@@ -1996,6 +2056,15 @@
mnBackColor = 0x80000005L;
mnForeColor = 0x80000008L;
aFontData.SetHasAlign(TRUE);
+@@ -1015,7 +1020,7 @@ class OCX_ComboBox : public OCX_ModernCo
+ public:
+ OCX_ComboBox() : OCX_ModernControl(rtl::OUString::createFromAscii("ComboBox")){
+ msFormType = rtl::OUString::createFromAscii("com.sun.star.form.component.ComboBox");
+- msDialogType = rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlComboBoxModel");
++ msDialogType = rtl::OUString::createFromAscii("com.sun.star.form.component.ComboBox");
+ mnBackColor = 0x80000005;
+ mnForeColor = 0x80000008;
+ nBorderColor = 0x80000006;
@@ -1040,7 +1045,8 @@ class OCX_ListBox : public OCX_ModernCon
public:
OCX_ListBox() : OCX_ModernControl(rtl::OUString::createFromAscii("ListBox")){
@@ -2007,7 +2076,7 @@
mnForeColor = 0x80000008;
nBorderColor = 0x80000006;
diff --git svx/source/msfilter/msocximex.cxx svx/source/msfilter/msocximex.cxx
-index 1723a76..803391a 100644
+index a771c8e..8535aa5 100644
--- svx/source/msfilter/msocximex.cxx
+++ svx/source/msfilter/msocximex.cxx
@@ -49,6 +49,10 @@
@@ -2119,10 +2188,10 @@
+ beans::NamedValue aArg1;
+ aArg1.Name = C2U("CellRange");
+ aArg1.Value <<= aAddress;
-+
+
+ uno::Sequence< uno::Any > aArgs(1);
+ aArgs[ 0 ] <<= aArg1;
-
++
+ uno::Reference< form::binding::XListEntrySource > xSource( xFac->createInstanceWithArguments( C2U("com.sun.star.table.CellRangeListSource" ), aArgs ), uno::UNO_QUERY );
+ xListEntrySink->setListEntrySource( xSource );
+ }
@@ -2140,7 +2209,17 @@
aFontData.Import(rPropSet);
return sal_True;
}
-@@ -2672,7 +2754,8 @@ sal_Bool OCX_ListBox::Import(com::sun::s
+@@ -2452,6 +2534,9 @@ sal_Bool OCX_ComboBox::Import(com::sun::
+ aTmp <<= nTmp;
+ rPropSet->setPropertyValue( WW8_ASCII2STR("MaxTextLen"), aTmp);
+
++ uno::Reference< frame::XModel > xModel ( pDocSh ? pDocSh->GetModel() : NULL );
++ lcl_ApplyListSourceAndBindableStuff( xModel, rPropSet, msCtrlSource, msRowSource );
++
+ aFontData.Import(rPropSet);
+ return sal_True;
+ }
+@@ -2672,7 +2757,8 @@ sal_Bool OCX_ListBox::Import(com::sun::s
aTmp <<= ImportColor( nBorderColor );
rPropSet->setPropertyValue( WW8_ASCII2STR("BorderColor"), aTmp);
@@ -2150,7 +2229,7 @@
aFontData.Import(rPropSet);
return sal_True;
}
-@@ -3447,15 +3530,28 @@ void OCX_ContainerControl::ProcessContro
+@@ -3447,15 +3533,29 @@ void OCX_ContainerControl::ProcessContro
{
// A container control needs to read the f stream in
// the folder ( substorage ) associated with this control
@@ -2173,6 +2252,7 @@
+ }
+ case LISTBOX:
+ case OPTIONBUTTON:
++ case COMBOBOX:
+ {
+ OCX_ModernControl* pList = static_cast< OCX_ModernControl* >( pControl );
+ if ( pList )
@@ -2186,7 +2266,7 @@
pControl->sName = rec.cName;
pControl->msToolTip = rec.controlTip;
// Position of controls is relative to the container
-@@ -4084,7 +4180,7 @@ sal_Bool OCX_UserForm::Import(
+@@ -4084,7 +4184,7 @@ sal_Bool OCX_UserForm::Import(
OCX_ContainerControl::Import( xPropSet );
uno::Reference<io::XInputStreamProvider> xSource =
@@ -2196,7 +2276,7 @@
if (rLib->hasByName(sName))
rLib->replaceByName(sName, aSourceAny);
diff --git svx/source/msfilter/svxmsbas.cxx svx/source/msfilter/svxmsbas.cxx
-index 7bb049d..053da47 100644
+index 7acf7db..14ed343 100644
--- svx/source/msfilter/svxmsbas.cxx
+++ svx/source/msfilter/svxmsbas.cxx
@@ -54,6 +54,7 @@ using namespace com::sun::star::awt;
@@ -2250,7 +2330,7 @@
}
else
diff --git xmlscript/inc/xmlscript/xmldlg_imexp.hxx xmlscript/inc/xmlscript/xmldlg_imexp.hxx
-index b624248..714f107 100644
+index ea5b591..4549fa9 100644
--- xmlscript/inc/xmlscript/xmldlg_imexp.hxx
+++ xmlscript/inc/xmlscript/xmldlg_imexp.hxx
@@ -30,6 +30,8 @@
@@ -2307,7 +2387,7 @@
}
diff --git xmlscript/inc/xmlscript/xmllib_imexp.hxx xmlscript/inc/xmlscript/xmllib_imexp.hxx
-index 7a153fa..03cae3a 100644
+index 9a3048f..f92b154 100644
--- xmlscript/inc/xmlscript/xmllib_imexp.hxx
+++ xmlscript/inc/xmlscript/xmllib_imexp.hxx
@@ -34,11 +34,21 @@
@@ -2367,17 +2447,20 @@
void
SAL_CALL exportLibrary(
diff --git xmlscript/source/xmldlg_imexp/exp_share.hxx xmlscript/source/xmldlg_imexp/exp_share.hxx
-index bab2b67..35e2cc7 100644
+index c87538f..c5cdcaa 100644
--- xmlscript/source/xmldlg_imexp/exp_share.hxx
+++ xmlscript/source/xmldlg_imexp/exp_share.hxx
-@@ -180,7 +180,7 @@ public:
+@@ -180,9 +180,9 @@ public:
SAL_THROW( (css::uno::Exception) );
void readCheckBoxModel( StyleBag * all_styles )
SAL_THROW( (css::uno::Exception) );
- void readRadioButtonModel( StyleBag * all_styles )
+ void readRadioButtonModel( StyleBag * all_styles, com::sun::star::uno::Reference< com::sun::star::frame::XModel > const & xDocument )
SAL_THROW( (css::uno::Exception) );
- void readComboBoxModel( StyleBag * all_styles )
+- void readComboBoxModel( StyleBag * all_styles )
++ void readComboBoxModel( StyleBag * all_styles, com::sun::star::uno::Reference< com::sun::star::frame::XModel > const & xDocument )
+ SAL_THROW( (css::uno::Exception) );
+ void readCurrencyFieldModel( StyleBag * all_styles )
SAL_THROW( (css::uno::Exception) );
@@ -198,7 +198,7 @@ public:
SAL_THROW( (css::uno::Exception) );
@@ -2389,7 +2472,7 @@
void readNumericFieldModel( StyleBag * all_styles )
SAL_THROW( (css::uno::Exception) );
diff --git xmlscript/source/xmldlg_imexp/imp_share.hxx xmlscript/source/xmldlg_imexp/imp_share.hxx
-index 8544c9b..7741994 100644
+index c53e325..e5263ad 100644
--- xmlscript/source/xmldlg_imexp/imp_share.hxx
+++ xmlscript/source/xmldlg_imexp/imp_share.hxx
@@ -131,6 +131,7 @@ struct DialogImport
@@ -2422,7 +2505,7 @@
virtual void SAL_CALL startDocument(
css::uno::Reference< css::xml::input::XNamespaceMapping >
diff --git xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx
-index e6840c8..87bbddc 100644
+index be29402..1d7e398 100644
--- xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx
+++ xmlscript/source/xmldlg_imexp/xmldlg_addfunc.cxx
@@ -44,6 +44,7 @@
@@ -2472,7 +2555,7 @@
xml::sax::InputSource source;
source.aInputStream = xInput;
diff --git xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
-index 4b756e1..e8b5c43 100644
+index 3d744be..3cf76d0 100644
--- xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
+++ xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
@@ -33,7 +33,11 @@
@@ -2549,7 +2632,26 @@
static inline bool readBorderProps(
ElementDescriptor * element, Style & style )
{
-@@ -276,7 +334,7 @@ void ElementDescriptor::readComboBoxMode
+@@ -209,7 +267,7 @@ void ElementDescriptor::readCheckBoxMode
+ readEvents();
+ }
+ //__________________________________________________________________________________________________
+-void ElementDescriptor::readComboBoxModel( StyleBag * all_styles )
++void ElementDescriptor::readComboBoxModel( StyleBag * all_styles, Reference< frame::XModel > const & xDocument )
+ SAL_THROW( (Exception) )
+ {
+ // collect styles
+@@ -250,7 +308,8 @@ void ElementDescriptor::readComboBoxMode
+ OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":maxlength") ) );
+ readShortAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("LineCount") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":linecount") ) );
+-
++ // Cell Range, Ref Cell etc.
++ lclExportBindableAndListSourceBits( xDocument, _xProps, *this );
+ // string item list
+ Sequence< OUString > itemValues;
+ if ((readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("StringItemList") ) ) >>= itemValues) &&
+@@ -276,7 +335,7 @@ void ElementDescriptor::readComboBoxMode
readEvents();
}
//__________________________________________________________________________________________________
@@ -2558,7 +2660,7 @@
SAL_THROW( (Exception) )
{
// collect styles
-@@ -311,7 +369,7 @@ void ElementDescriptor::readListBoxModel
+@@ -311,7 +370,7 @@ void ElementDescriptor::readListBoxModel
OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":linecount") ) );
readAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":align") ) );
@@ -2567,7 +2669,7 @@
// string item list
Sequence< OUString > itemValues;
if ((readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("StringItemList") ) ) >>= itemValues) &&
-@@ -351,7 +409,7 @@ void ElementDescriptor::readListBoxModel
+@@ -351,7 +410,7 @@ void ElementDescriptor::readListBoxModel
readEvents();
}
//__________________________________________________________________________________________________
@@ -2576,7 +2678,7 @@
SAL_THROW( (Exception) )
{
// collect styles
-@@ -409,6 +467,7 @@ void ElementDescriptor::readRadioButtonM
+@@ -409,6 +468,7 @@ void ElementDescriptor::readRadioButtonM
break;
}
}
@@ -2585,7 +2687,7 @@
}
//__________________________________________________________________________________________________
diff --git xmlscript/source/xmldlg_imexp/xmldlg_export.cxx xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
-index b65d5c9..f8fd87f 100644
+index 999f899..de2d659 100644
--- xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -1309,7 +1309,8 @@ void StyleBag::dump( Reference< xml::sax
@@ -2607,6 +2709,15 @@
pRadioGroup->addSubElement( xElem );
}
else // no radio
+@@ -1386,7 +1387,7 @@ void SAL_CALL exportDialogModel(
+ xProps, xPropState,
+ OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":combobox") ) );
+ xElem = static_cast< xml::sax::XAttributeList * >( pElem );
+- pElem->readComboBoxModel( &all_styles );
++ pElem->readComboBoxModel( &all_styles, xDocument );
+ }
+ else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlListBoxModel") ) ) )
+ {
@@ -1394,7 +1395,7 @@ void SAL_CALL exportDialogModel(
xProps, xPropState,
OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":menulist") ) );
@@ -2617,7 +2728,7 @@
else if (xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlGroupBoxModel") ) ) )
{
diff --git xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
-index dba6d41..ee10a4f 100644
+index ee1d824..d57bb95 100644
--- xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -34,6 +34,12 @@
@@ -2760,20 +2871,22 @@
::std::vector< Reference< xml::input::XElement > > * radioEvents =
static_cast< RadioElement * >( xRadio.get() )->getEvents();
ctx.importEvents( *radioEvents );
-@@ -1644,9 +1728,24 @@ Reference< xml::input::XElement > MenuLi
+@@ -1644,9 +1728,26 @@ Reference< xml::input::XElement > MenuLi
void MenuListElement::endElement()
throw (xml::sax::SAXException, RuntimeException)
{
+ OUString sLinkedCell;
+ OUString sCellRange;
+ OUString sListBoxService( OUSTR("com.sun.star.awt.UnoControlListBoxModel") );
++
++ // we should probably limit this to vba mode also ( leave for now )
++ if ( _pImport->getDocOwner().is() )
++ sListBoxService = OUSTR("com.sun.star.form.component.ListBox");
++
+ try
+ {
+ sLinkedCell = _xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, OUSTR( "linked-cell" ) );
+ sCellRange = _xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, OUSTR( "source-cell-range" ) );
-+ // we should probably limit this to vba mode also ( leave for now )
-+ if ( _pImport->getDocOwner().is() )
-+ sListBoxService = OUSTR("com.sun.star.form.component.ListBox");
+ }
+ catch( Exception& /*e*/ )
+ {
@@ -2786,7 +2899,7 @@
Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
-@@ -1679,13 +1778,16 @@ void MenuListElement::endElement()
+@@ -1679,13 +1780,16 @@ void MenuListElement::endElement()
ctx.importAlignProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
OUString( RTL_CONSTASCII_USTRINGPARAM("align") ),
_xAttributes );
@@ -2806,8 +2919,48 @@
makeAny( p->getSelectedItems() ) );
}
ctx.importEvents( _events );
+@@ -1731,9 +1835,26 @@ Reference< xml::input::XElement > ComboB
+ void ComboBoxElement::endElement()
+ throw (xml::sax::SAXException, RuntimeException)
+ {
++ OUString sService( OUSTR("com.sun.star.awt.UnoControlComboBoxModel") );
++
++ // we should probably limit this to vba mode also ( leave for now )
++ if ( _pImport->getDocOwner().is() )
++ sService = OUSTR("com.sun.star.form.component.ComboBox");
++
++ OUString sLinkedCell;
++ OUString sCellRange;
++ try
++ {
++ sLinkedCell = _xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, OUSTR( "linked-cell" ) );
++ sCellRange = _xAttributes->getValueByUidName( _pImport->XMLNS_DIALOGS_UID, OUSTR( "source-cell-range" ) );
++ }
++ catch( Exception& /*e*/ )
++ {
++ }
++
+ ControlImportContext ctx(
+ _pImport, getControlId( _xAttributes ),
+- OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlComboBoxModel") ) );
++ sService );
+ Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+
+ Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
+@@ -1775,8 +1896,10 @@ void ComboBoxElement::endElement()
+ ctx.importAlignProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("align") ),
+ _xAttributes );
++ // import cell-link and cell source range
++ importBindableAndListRangeBits( _pImport, sLinkedCell, sCellRange, ctx );
+
+- if (_popup.is())
++ if (_popup.is() && !sCellRange.getLength() )
+ {
+ MenuPopupElement * p = static_cast< MenuPopupElement * >( _popup.get() );
+ xControlModel->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("StringItemList") ),
diff --git xmlscript/source/xmldlg_imexp/xmldlg_import.cxx xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
-index 1f727eb..980aee3 100644
+index 74c09e6..092dcc0 100644
--- xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+++ xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
@@ -62,6 +62,7 @@
@@ -2835,7 +2988,7 @@
}
diff --git xmlscript/source/xmllib_imexp/imp_share.hxx xmlscript/source/xmllib_imexp/imp_share.hxx
-index d3c0389..f7ae1c3 100644
+index d602103..fdc0536 100644
--- xmlscript/source/xmllib_imexp/imp_share.hxx
+++ xmlscript/source/xmllib_imexp/imp_share.hxx
@@ -220,7 +220,6 @@ class LibrariesElement : public LibEleme
@@ -2856,7 +3009,7 @@
virtual Reference< xml::input::XElement > SAL_CALL startChildElement(
diff --git xmlscript/source/xmllib_imexp/xmllib_import.cxx xmlscript/source/xmllib_imexp/xmllib_import.cxx
-index f66b46a..fbc6191 100644
+index b533d37..ce31ee0 100644
--- xmlscript/source/xmllib_imexp/xmllib_import.cxx
+++ xmlscript/source/xmllib_imexp/xmllib_import.cxx
@@ -44,7 +44,20 @@ namespace xmlscript
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]