--- svx/inc/svx/svxids.hrc (revision 1344995) +++ svx/inc/svx/svxids.hrc (working copy) @@ -1257,6 +1257,7 @@ #define SID_TRANSLITERATE_SENTENCE_CASE (SID_SVX_START+1102) #define SID_TRANSLITERATE_TITLE_CASE (SID_SVX_START+1103) #define SID_TRANSLITERATE_TOGGLE_CASE (SID_SVX_START+1104) +#define SID_INSERT_HYPERLINKCONTROL (SID_SVX_START+1105) // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id #define SID_SVX_FIRSTFREE (SID_TRANSLITERATE_TOGGLE_CASE + 1) --- svx/inc/svx/svxcommands.h (revision 1344995) +++ svx/inc/svx/svxcommands.h (working copy) @@ -154,6 +154,7 @@ #define CMD_SID_FM_FILECONTROL ".uno:FileControl" #define CMD_SID_INSERT_FILECONTROL ".uno:InsertFileControl" #define CMD_SID_INSERT_TREECONTROL ".uno:InsertTreeControl" +#define CMD_SID_INSERT_HYPERLINKCONTROL ".uno:InsertHyperlinkControl" #define CMD_SID_ATTR_FILL_BITMAP ".uno:FillBitmap" #define CMD_SID_ATTR_FILL_COLOR ".uno:FillColor" #define CMD_SID_ATTR_FILL_GRADIENT ".uno:FillGradient" --- svx/sdi/svx.sdi (revision 1344995) +++ svx/sdi/svx.sdi (working copy) @@ -3590,6 +3590,33 @@ //-------------------------------------------------------------------------- +SfxBoolItem InsertHyperlinkControl SID_INSERT_HYPERLINKCONTROL + +[ + /* flags: */ + AutoUpdate = TRUE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + Readonly = FALSE, + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_CONTROLS; +] + +//-------------------------------------------------------------------------- XFillBitmapItem FillBitmap SID_ATTR_FILL_BITMAP [ --- svx/sdi/svxitems.sdi (revision 1344995) +++ svx/sdi/svxitems.sdi (working copy) @@ -80,7 +80,8 @@ SVX_SNAP_FORMATTEDFIELD, SVX_SNAP_PATTERNFIELD, SVX_SNAP_FILECONTROL, - SVX_SNAP_TREECONTROL + SVX_SNAP_TREECONTROL, + SVX_SNAP_HYPERLINKCONTROL } item SvxChooseControlEnum SvxChooseControlItem; --- officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu (revision 1344995) +++ officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu (working copy) @@ -2556,6 +2556,14 @@ 1 + + + Hyperlink Control + + + 1 + + Properties --- basctl/source/inc/dlgeddef.hxx (revision 1344995) +++ basctl/source/inc/dlgeddef.hxx (working copy) @@ -57,7 +57,9 @@ #define OBJ_DLG_PATTERNFIELD ((sal_uInt16)22) #define OBJ_DLG_FILECONTROL ((sal_uInt16)23) #define OBJ_DLG_TREECONTROL ((sal_uInt16)24) +#define OBJ_DLG_HYPERLINKCONTROL ((sal_uInt16)25) + // control properties #define DLGED_PROP_BACKGROUNDCOLOR ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BackgroundColor" ) ) #define DLGED_PROP_DROPDOWN ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Dropdown" ) ) --- basctl/source/inc/dlgresid.hrc (revision 1344995) +++ basctl/source/inc/dlgresid.hrc (working copy) @@ -54,6 +54,7 @@ #define RID_STR_TRANSLATION_NOTLOCALIZED ( RID_DLG_START + 21 ) #define RID_STR_TRANSLATION_DEFAULT ( RID_DLG_START + 22 ) #define RID_STR_CLASS_TREECONTROL ( RID_DLG_START + 23 ) +#define RID_STR_CLASS_HYPERLINKCONTROL ( RID_DLG_START + 24 ) // Property Browser Headline Id's ----------------------------------------------------------- #define RID_STR_BRWTITLE_PROPERTIES ( RID_DLG_START + 60 ) --- basctl/source/dlged/dlgedobj.cxx (revision 1344995) +++ basctl/source/dlged/dlgedobj.cxx (working copy) @@ -795,6 +795,10 @@ { nResId = RID_STR_CLASS_TREECONTROL; } + else if ( supportsService( "com.sun.star.awt.UnoControlFixedHyperlinkModel" ) ) + { + nResId = RID_STR_CLASS_HYPERLINKCONTROL; + } else { @@ -925,6 +929,10 @@ { return OBJ_DLG_TREECONTROL; } + else if ( supportsService( "com.sun.star.awt.UnoControlFixedHyperlinkModel" )) + { + return OBJ_DLG_HYPERLINKCONTROL; + } else { return OBJ_DLG_CONTROL; @@ -1085,7 +1093,8 @@ supportsService( "com.sun.star.awt.UnoControlRadioButtonModel" ) || supportsService( "com.sun.star.awt.UnoControlCheckBoxModel" ) || supportsService( "com.sun.star.awt.UnoControlGroupBoxModel" ) || - supportsService( "com.sun.star.awt.UnoControlFixedTextModel" ) ) + supportsService( "com.sun.star.awt.UnoControlFixedTextModel" ) || + supportsService( "com.sun.star.awt.UnoControlFixedHyperlinkModel" )) { xPSet->setPropertyValue( DLGED_PROP_LABEL, aUniqueName ); } --- basctl/source/dlged/dlgresid.src (revision 1344995) +++ basctl/source/dlged/dlgresid.src (working copy) @@ -113,6 +113,10 @@ { Text = "TreeControl" ; }; +String RID_STR_CLASS_HYPERLINKCONTROL +{ + Text = "HyperlinkControl" ; +}; // Property Browser Headline ---------------------------------------------------------------- --- basctl/source/dlged/dlgedfac.cxx (revision 1344995) +++ basctl/source/dlged/dlgedfac.cxx (working copy) @@ -70,7 +70,7 @@ if( (pObjFactory->nInventor == DlgInventor) && (pObjFactory->nIdentifier >= OBJ_DLG_PUSHBUTTON) && - (pObjFactory->nIdentifier <= OBJ_DLG_TREECONTROL) ) + (pObjFactory->nIdentifier <= OBJ_DLG_HYPERLINKCONTROL) ) { switch( pObjFactory->nIdentifier ) { @@ -184,76 +184,11 @@ pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlFileControlModel") , xDialogSFact ); break; case OBJ_DLG_TREECONTROL: - DlgEdObj* pNew = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.tree.TreeControlModel") , xDialogSFact ); - pObjFactory->pNewObj = pNew; - /* - try - { - uno::Reference< beans::XPropertySet > xPSet(pNew->GetUnoControlModel(), uno::UNO_QUERY); - if (xPSet.is()) - { - // first create a data model for our tree control - Reference< XComponentContext > xComponentContext; - - Reference< XPropertySet > xPropSet( xInterface, UNO_QUERY ); - xPropSet->getPropertyValue( OUString::createFromAscii("DefaultContext") ) >>= xComponentContext; - - // gets the service manager from the office - Reference< XMultiComponentFactory > xMultiComponentFactoryServer( xComponentContext->getServiceManager() ); - - - // gets the TreeDataModel - Reference< XMutableTreeDataModel > xTreeDataModel; - - xTreeDataModel = Reference< XMutableTreeDataModel >( - xMultiComponentFactoryServer->createInstanceWithContext( - OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.tree.MutableTreeDataModel" ) ), xComponentContext ), UNO_QUERY_THROW ); - - // now fill it with some sample data - const OUString sRoot( RTL_CONSTASCII_USTRINGPARAM( "Root" ) ); - - Reference< XMutableTreeNode > xNode( mxTreeDataModel->createNode( sRoot, false ), UNO_QUERY_THROW ); - xNode->setDataValue( sRoot ); - xNode->setExpandedGraphicURL( OUString( RTL_CONSTASCII_USTRINGPARAM( "private:graphicrepository/sd/res/triangle_down.png" ) ) ); - xNode->setCollapsedGraphicURL( OUString( RTL_CONSTASCII_USTRINGPARAM( "private:graphicrepository/sd/res/triangle_right.png" ) ) ); - - const OUString sNode_1( RTL_CONSTASCII_USTRINGPARAM( "Node_1" ) ); - - Reference< XMutableTreeNode > xChildNode_1( mxTreeDataModel->createNode( sNode_1, true ), UNO_QUERY_THROW ); - xChildNode_1->setDataValue( sNode_1 ); - xChildNode_1->setExpandedGraphicURL( OUString( RTL_CONSTASCII_USTRINGPARAM( "private:graphicrepository/sd/res/triangle_down.png" ) ) ); - xChildNode_1->setCollapsedGraphicURL( OUString( RTL_CONSTASCII_USTRINGPARAM( "private:graphicrepository/sd/res/triangle_right.png" ) ) ); - - xNode->appendChild( xChildNode_1 ); - - const OUString sNode_1_1( RTL_CONSTASCII_USTRINGPARAM( "Node_1_1" ) ); - - Reference< XMutableTreeNode > xChildNode_1_1( mxTreeDataModel->createNode( sNode_1_1, false ), UNO_QUERY_THROW ); - xChildNode_1_1->setDataValue( sNode_1_1 ); - xChildNode_1_1->setExpandedGraphicURL( OUString( RTL_CONSTASCII_USTRINGPARAM( "private:graphicrepository/sd/res/triangle_down.png" ) ) ); - xChildNode_1_1->setCollapsedGraphicURL( OUString( RTL_CONSTASCII_USTRINGPARAM( "private:graphicrepository/sd/res/triangle_right.png" ) ) ); - - xChildNode_1->appendChild( xChildNode_1_1 ); - - const OUString sNode_1_1( RTL_CONSTASCII_USTRINGPARAM( "Node_2" ) ); - - Reference< XMutableTreeNode > xChildNode_2( mxTreeDataModel->createNode( sNode_2, false ), UNO_QUERY_THROW ); - xChildNode_2->setDataValue( sNode_2 ); - xChildNode_2->setNodeGraphicURL( OUString( RTL_CONSTASCII_USTRINGPARAM("private:graphicrepository/sw/imglst/nc20010.png") ) ); - xNode->appendChild( xChildNode_2 ); - - xTreeDataModel->setRoot( xNode ); - - - const OUString sDataModel( RTL_CONSTASCII_USTRINGPARAM( "DataModel" ) ); - - xPSet->setPropertyValue( sDataModel, xTreeDataModel ); - } - } - catch(...) - { - }*/ + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.tree.TreeControlModel") , xDialogSFact ); break; + case OBJ_DLG_HYPERLINKCONTROL: + pObjFactory->pNewObj = new DlgEdObj( ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlFixedHyperlinkModel"), xDialogSFact ); + break; } } --- basctl/source/dlged/propbrw.cxx (revision 1344995) +++ basctl/source/dlged/propbrw.cxx (working copy) @@ -488,6 +488,10 @@ { nResId = RID_STR_CLASS_TREECONTROL; } + else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedHyperlinkModel" ) ) ) ) + { + nResId = RID_STR_CLASS_HYPERLINKCONTROL; + } else { nResId = RID_STR_CLASS_CONTROL; --- basctl/source/basicide/idetemp.hxx (revision 1344995) +++ basctl/source/basicide/idetemp.hxx (working copy) @@ -52,7 +52,8 @@ SVX_SNAP_FORMATTEDFIELD, SVX_SNAP_PATTERNFIELD, SVX_SNAP_FILECONTROL, - SVX_SNAP_TREECONTROL + SVX_SNAP_TREECONTROL, + SVX_SNAP_HYPERLINKCONTROL }; #define SvxChooseControlItem SfxAllEnumItem --- basctl/source/basicide/tbxctl.cxx (revision 1344995) +++ basctl/source/basicide/tbxctl.cxx (working copy) @@ -171,6 +171,7 @@ case SVX_SNAP_PATTERNFIELD: nTemp = SID_INSERT_PATTERNFIELD; break; case SVX_SNAP_FILECONTROL: nTemp = SID_INSERT_FILECONTROL; break; case SVX_SNAP_TREECONTROL: nTemp = SID_INSERT_TREECONTROL; break; + case SVX_SNAP_HYPERLINKCONTROL: nTemp = SID_INSERT_HYPERLINKCONTROL; break; } if( nTemp ) { --- basctl/source/basicide/baside3.cxx (revision 1344995) +++ basctl/source/basicide/baside3.cxx (working copy) @@ -391,6 +391,7 @@ case OBJ_DLG_PATTERNFIELD: nObj = SVX_SNAP_PATTERNFIELD; break; case OBJ_DLG_FILECONTROL: nObj = SVX_SNAP_FILECONTROL; break; case OBJ_DLG_TREECONTROL: nObj = SVX_SNAP_TREECONTROL; break; + case OBJ_DLG_HYPERLINKCONTROL: nObj = SVX_SNAP_HYPERLINKCONTROL; break; default: nObj = 0; } #ifdef DBG_UTIL @@ -598,6 +599,12 @@ GetEditor()->SetInsertObj( OBJ_DLG_TREECONTROL ); } break; + case SVX_SNAP_HYPERLINKCONTROL: + { + GetEditor()->SetMode( DLGED_INSERT ); + GetEditor()->SetInsertObj( OBJ_DLG_HYPERLINKCONTROL ); + } + break; case SVX_SNAP_SELECT: { --- basctl/uiconfig/basicide/toolbar/insertcontrolsbar.xml (revision 1344995) +++ basctl/uiconfig/basicide/toolbar/insertcontrolsbar.xml (working copy) @@ -62,4 +62,5 @@ + --- xmlscript/dtd/dialog.dtd (revision 1344995) +++ xmlscript/dtd/dialog.dtd (working copy) @@ -64,7 +64,8 @@ dlg:formattedfield| dlg:fixedline| dlg:progressmeter| - dlg:scrollbar + dlg:scrollbar| + dlg:linklabel )"> @@ -227,6 +228,16 @@ dlg:tabstop %boolean; #IMPLIED > + + + * pNamesSeq = NULL; if ( !pNamesSeq ) { - pNamesSeq = new Sequence< ::rtl::OUString >( 24 ); + pNamesSeq = new Sequence< ::rtl::OUString >( 25 ); ::rtl::OUString* pNames = pNamesSeq->getArray(); pNames[0] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlEditModel ); pNames[1] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFormattedFieldModel ); @@ -455,6 +455,7 @@ pNames[21] = ::rtl::OUString::createFromAscii( szServiceName_GridControlModel ); pNames[22] = ::rtl::OUString::createFromAscii( szServiceName_UnoControlTabPageContainerModel ); pNames[23] = ::rtl::OUString::createFromAscii( szServiceName_UnoControlTabPageModel ); + pNames[24] = ::rtl::OUString::createFromAscii( szServiceName_UnoControlFixedHyperlinkModel ); } return *pNamesSeq; } --- helpcontent2/source/text/sbasic/shared/02/20000000.xhp (revision 1344995) +++ helpcontent2/source/text/sbasic/shared/02/20000000.xhp (working copy) @@ -434,5 +434,19 @@ Adds a tree control that can show a hierarchical list. You can populate the list by your program, using API calls (XtreeControl). - + +Hyperlink Control + + + + +Insert hyperlink control icon + + + +Adds a hyperlink control that can open an address in web browser. + + +
+