diff options
Diffstat (limited to 'extensions/source')
110 files changed, 1459 insertions, 700 deletions
diff --git a/extensions/source/abpilot/abp.component b/extensions/source/abpilot/abp.component new file mode 100644 index 000000000..a07cef986 --- /dev/null +++ b/extensions/source/abpilot/abp.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="org.openoffice.comp.abp.OAddressBookSourcePilot"> + <service name="com.sun.star.ui.dialogs.AddressBookSourcePilot"/> + </implementation> +</component> diff --git a/extensions/source/abpilot/abpresid.hrc b/extensions/source/abpilot/abpresid.hrc index 273ba6b6e..08ade5d67 100644 --- a/extensions/source/abpilot/abpresid.hrc +++ b/extensions/source/abpilot/abpresid.hrc @@ -29,7 +29,8 @@ #define EXTENSIONS_ABPRESID_HRC #include "abpilot.hrc" - +#include "extensio.hrc" + //======================================================================== // basics diff --git a/extensions/source/abpilot/abpservices.cxx b/extensions/source/abpilot/abpservices.cxx index f4131c8ba..f589ac0db 100644 --- a/extensions/source/abpilot/abpservices.cxx +++ b/extensions/source/abpilot/abpservices.cxx @@ -66,27 +66,6 @@ component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - return ::abp::OModule::writeComponentInfos( - static_cast<XMultiServiceFactory*>(pServiceManager), - static_cast<XRegistryKey*>(pRegistryKey)); - } - catch (InvalidRegistryException& ) - { - OSL_ASSERT("abp::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/extensions/source/abpilot/abspilot.src b/extensions/source/abpilot/abspilot.src index a69ac07eb..f159ff692 100644 --- a/extensions/source/abpilot/abspilot.src +++ b/extensions/source/abpilot/abspilot.src @@ -71,6 +71,7 @@ ModalDialog RID_DLG_ADDRESSBOOKSOURCEPILOT //........................................................................ TabPage RID_PAGE_SELECTABTYPE { + HelpID = "extensions:TabPage:RID_PAGE_SELECTABTYPE"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; @@ -93,56 +94,67 @@ TabPage RID_PAGE_SELECTABTYPE RadioButton RB_EVOLUTION { + HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_EVOLUTION"; Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Evolution"; }; RadioButton RB_EVOLUTION_GROUPWISE { + HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_EVOLUTION_GROUPWISE"; Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Groupwise"; }; RadioButton RB_EVOLUTION_LDAP { + HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_EVOLUTION_LDAP"; Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Evolution LDAP"; }; RadioButton RB_MORK { + HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_MORK"; Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Mozilla / Netscape"; }; RadioButton RB_THUNDERBIRD { + HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_THUNDERBIRD"; Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Thunderbird"; }; RadioButton RB_KAB { + HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_KAB"; Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "KDE address book"; }; RadioButton RB_MACAB { + HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_MACAB"; Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Mac OS X address book"; }; RadioButton RB_LDAP { + HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_LDAP"; Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "LDAP address data"; }; RadioButton RB_OUTLOOK { + HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_OUTLOOK"; Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Outlook address book"; }; RadioButton RB_OUTLOOKEXPRESS { + HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_OUTLOOKEXPRESS"; Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Windows system address book"; }; RadioButton RB_OTHER { + HelpID = "extensions:RadioButton:RID_PAGE_SELECTABTYPE:RB_OTHER"; Size = MAP_APPFONT ( WINDOW_SIZE_X - 30, 8 ) ; Text [ en-US ] = "Other external data source"; }; @@ -151,6 +163,7 @@ TabPage RID_PAGE_SELECTABTYPE //........................................................................ TabPage RID_PAGE_ADMININVOKATION { + HelpID = "extensions:TabPage:RID_PAGE_ADMININVOKATION"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; @@ -165,6 +178,7 @@ TabPage RID_PAGE_ADMININVOKATION PushButton PB_INVOKE_ADMIN_DIALOG { + HelpID = "extensions:PushButton:RID_PAGE_ADMININVOKATION:PB_INVOKE_ADMIN_DIALOG"; Pos = MAP_APPFONT ( ( WINDOW_SIZE_X - BUTTON_SIZE_X ) / 2, 60 ) ; Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y ) ; @@ -185,6 +199,7 @@ TabPage RID_PAGE_ADMININVOKATION //........................................................................ TabPage RID_PAGE_TABLESELECTION_AB { + HelpID = "extensions:TabPage:RID_PAGE_TABLESELECTION_AB"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; @@ -199,6 +214,7 @@ TabPage RID_PAGE_TABLESELECTION_AB ListBox LB_TABLELIST { + HelpID = "extensions:ListBox:RID_PAGE_TABLESELECTION_AB:LB_TABLELIST"; Pos = MAP_APPFONT ( BORDER_X, 36 ) ; Size = MAP_APPFONT ( WINDOW_SIZE_X - 2 * BORDER_X, 50 ) ; SVLook = TRUE; @@ -212,6 +228,7 @@ TabPage RID_PAGE_TABLESELECTION_AB //........................................................................ TabPage RID_PAGE_FIELDMAPPING { + HelpID = "extensions:TabPage:RID_PAGE_FIELDMAPPING"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; @@ -226,6 +243,7 @@ TabPage RID_PAGE_FIELDMAPPING PushButton PB_INVOKE_FIELDS_DIALOG { + HelpID = "extensions:PushButton:RID_PAGE_FIELDMAPPING:PB_INVOKE_FIELDS_DIALOG"; Pos = MAP_APPFONT ( ( WINDOW_SIZE_X - BUTTON_SIZE_X ) / 2, 84 ) ; Size = MAP_APPFONT ( BUTTON_SIZE_X, BUTTON_SIZE_Y ) ; @@ -243,6 +261,7 @@ TabPage RID_PAGE_FIELDMAPPING //........................................................................ TabPage RID_PAGE_FINAL { + HelpID = "extensions:TabPage:RID_PAGE_FINAL"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; @@ -266,6 +285,7 @@ TabPage RID_PAGE_FINAL ComboBox CBB_LOCATION { + HelpID = "extensions:ComboBox:RID_PAGE_FINAL:CBB_LOCATION"; Pos = MAP_APPFONT ( BORDER_X , 64 ) ; Size = MAP_APPFONT ( WINDOW_SIZE_X - 53 - BORDER_X - BORDER_X, 12) ; SVLook = TRUE; @@ -276,6 +296,7 @@ TabPage RID_PAGE_FINAL PushButton PB_BROWSE { + HelpID = "extensions:PushButton:RID_PAGE_FINAL:PB_BROWSE"; Pos = MAP_APPFONT ( WINDOW_SIZE_X - 50 - BORDER_X , 63 ) ; Size = MAP_APPFONT ( 50, 14) ; SVLook = TRUE; @@ -286,6 +307,7 @@ TabPage RID_PAGE_FINAL CheckBox CB_REGISTER_DS { + HelpID = "extensions:CheckBox:RID_PAGE_FINAL:CB_REGISTER_DS"; Pos = MAP_APPFONT ( BORDER_X, 82 ) ; Size = MAP_APPFONT ( WINDOW_SIZE_X - BORDER_X - BORDER_X, 8) ; SVLook = TRUE; @@ -303,6 +325,7 @@ TabPage RID_PAGE_FINAL Edit ET_DATASOURCENAME { + HelpID = "extensions:Edit:RID_PAGE_FINAL:ET_DATASOURCENAME"; Pos = MAP_APPFONT ( BORDER_X + 10, 104 ) ; Size = MAP_APPFONT ( WINDOW_SIZE_X - 56 - BORDER_X - BORDER_X - 10, 12) ; SVLook = TRUE; diff --git a/extensions/source/abpilot/exports.dxp b/extensions/source/abpilot/exports.dxp index 9630d7e06..f0e1c6993 100644 --- a/extensions/source/abpilot/exports.dxp +++ b/extensions/source/abpilot/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/extensions/source/abpilot/makefile.mk b/extensions/source/abpilot/makefile.mk index 19477e1b6..86bc5c68a 100644 --- a/extensions/source/abpilot/makefile.mk +++ b/extensions/source/abpilot/makefile.mk @@ -104,3 +104,11 @@ DEF1EXPORTFILE= exports.dxp # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/abp.component + +$(MISC)/abp.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + abp.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt abp.component diff --git a/extensions/source/bibliography/bib.component b/extensions/source/bibliography/bib.component new file mode 100644 index 000000000..98627854d --- /dev/null +++ b/extensions/source/bibliography/bib.component @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.extensions.Bibliography"> + <service name="com.sun.star.frame.Bibliography"/> + <service name="com.sun.star.frame.FrameLoader"/> + </implementation> +</component> diff --git a/extensions/source/bibliography/bib.hrc b/extensions/source/bibliography/bib.hrc index eb6afcb44..454bda0e5 100644 --- a/extensions/source/bibliography/bib.hrc +++ b/extensions/source/bibliography/bib.hrc @@ -28,7 +28,7 @@ #define BIB_HRC #include "bibliography.hrc" - +#include <svl/solar.hrc> #ifndef RID_BIB_START #define RID_BIB_START RID_EXTENSIONS_START #endif diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index 0b57c4bd4..9d361aff8 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -225,36 +225,6 @@ extern "C" *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo( void * //pServiceManager - , registry::XRegistryKey * pRegistryKey ) - { - try - { - rtl::OUString sKey = rtl::OUString::createFromAscii("/"); - sKey += BibliographyLoader::getImplementationName_Static(); - //creates the impl key: /com.sun.star.extensions.Bibliography - Reference< registry::XRegistryKey > xImplKey = pRegistryKey->createKey(sKey); - - - //sKey += rtl::OUString::createFromAscii("/UNO/SERVICES"); - Reference< registry::XRegistryKey > xNewKey = xImplKey->createKey( C2U("/UNO/SERVICES") ); - Sequence< rtl::OUString > aServices = BibliographyLoader::getSupportedServiceNames_Static(); - for( INT32 i = 0; i < aServices.getLength(); i++ ) - xNewKey->createKey( aServices.getConstArray()[i]); - xNewKey = xImplKey->createKey( C2U("/UNO/Loader")); - - Reference< registry::XRegistryKey > xPatternKey = xImplKey->createKey( C2U("/Loader/Pattern" )); - xPatternKey->setAsciiValue( C2U( ".component:Bibliography/*" ) ); - - return sal_True; - } - catch (Exception &) - { - return sal_False; - } - } - - void * SAL_CALL component_getFactory( const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, void * /*pRegistryKey*/ ) { diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index 52575a6f3..79afe88ea 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -646,7 +646,7 @@ DBChangeDialog_Impl::DBChangeDialog_Impl(Window* pParent, BibDataManager* pMan ) aSelectionHB.Show(); aSelectionLB.SetTabs( &nTabs[0], MAP_PIXEL ); - aSelectionLB.SetWindowBits(WB_CLIPCHILDREN|WB_SORT); + aSelectionLB.SetStyle(aSelectionLB.GetStyle()|WB_CLIPCHILDREN|WB_SORT); aSelectionLB.GetModel()->SetSortMode(SortAscending); ::rtl::OUString sActiveSource = pDatMan->getActiveDataSource(); @@ -1436,9 +1436,9 @@ Reference< awt::XControlModel > BibDataManager::createGridModel(const ::rtl::OUS Reference< XPropertySetInfo > xPropInfo = xPropSet->getPropertySetInfo(); if (xPropInfo->hasPropertyByName(uProp)) { - ::rtl::OUString sId = ::rtl::OUString::createFromAscii( "HID:" ); - sId += ::rtl::OUString::valueOf( (sal_Int32) HID_BIB_DB_GRIDCTRL ); - xPropSet->setPropertyValue( uProp, makeAny( ::rtl::OUString( sId ) ) ); + ::rtl::OUString sId = ::rtl::OUString::createFromAscii( INET_HID_SCHEME ); + sId += ::rtl::OUString::createFromAscii( HID_BIB_DB_GRIDCTRL ); + xPropSet->setPropertyValue( uProp, makeAny( sId ) ); } } catch(Exception& e ) diff --git a/extensions/source/bibliography/datman.src b/extensions/source/bibliography/datman.src index 6b8c4b00e..639e6640d 100644 --- a/extensions/source/bibliography/datman.src +++ b/extensions/source/bibliography/datman.src @@ -62,6 +62,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_IDENTIFIER { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_IDENTIFIER"; Pos = MAP_APPFONT ( 65 , 13 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -73,6 +74,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_AUTHORITYTYPE { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_AUTHORITYTYPE"; Pos = MAP_APPFONT ( 171 , 13 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -84,6 +86,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_YEAR { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_YEAR"; Pos = MAP_APPFONT ( 282 , 13 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -95,6 +98,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_AUTHOR { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_AUTHOR"; Pos = MAP_APPFONT ( 65 , 28 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -106,6 +110,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_TITLE { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_TITLE"; Pos = MAP_APPFONT ( 171 , 28 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -117,6 +122,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_PUBLISHER { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_PUBLISHER"; Pos = MAP_APPFONT ( 65 , 43 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -128,6 +134,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_ADDRESS { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_ADDRESS"; Pos = MAP_APPFONT ( 171, 43 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -139,6 +146,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_ISBN { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_ISBN"; Pos = MAP_APPFONT ( 282 , 43 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -150,6 +158,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_CHAPTER { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_CHAPTER"; Pos = MAP_APPFONT ( 65 , 58 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -161,6 +170,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_PAGES { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_PAGES"; Pos = MAP_APPFONT ( 171, 58) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -172,6 +182,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_EDITOR { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_EDITOR"; Pos = MAP_APPFONT ( 65 , 73 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -183,6 +194,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_EDITION { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_EDITION"; Pos = MAP_APPFONT ( 171 , 73 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -194,6 +206,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_BOOKTITLE { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_BOOKTITLE"; Pos = MAP_APPFONT ( 65, 88 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -205,6 +218,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_VOLUME { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_VOLUME"; Pos = MAP_APPFONT ( 171 , 88 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -216,6 +230,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_HOWPUBLISHED { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_HOWPUBLISHED"; Pos = MAP_APPFONT ( 282, 88 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -227,6 +242,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_ORGANIZATIONS { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_ORGANIZATIONS"; Pos = MAP_APPFONT ( 65 , 103 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -238,6 +254,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_INSTITUTION { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_INSTITUTION"; Pos = MAP_APPFONT ( 171 , 103) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -249,6 +266,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_SCHOOL { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_SCHOOL"; Pos = MAP_APPFONT ( 282 , 103 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -260,6 +278,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_REPORTTYPE { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_REPORTTYPE"; Pos = MAP_APPFONT ( 65 , 118 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -271,6 +290,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_MONTH { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_MONTH"; Pos = MAP_APPFONT ( 171 , 118) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -282,6 +302,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_JOURNAL { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_JOURNAL"; Pos = MAP_APPFONT ( 65 , 133) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -293,6 +314,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_NUMBER { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_NUMBER"; Pos = MAP_APPFONT ( 171 , 133 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -304,6 +326,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_SERIES { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_SERIES"; Pos = MAP_APPFONT ( 282 , 133 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -315,6 +338,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_ANNOTE { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_ANNOTE"; Pos = MAP_APPFONT ( 65 , 148 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -326,6 +350,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_NOTE { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_NOTE"; Pos = MAP_APPFONT ( 171 , 148 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -337,6 +362,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_URL { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_URL"; Pos = MAP_APPFONT ( 282, 148 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -348,6 +374,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_CUSTOM1 { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_CUSTOM1"; Pos = MAP_APPFONT ( 65 , 163 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -359,6 +386,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_CUSTOM2 { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_CUSTOM2"; Pos = MAP_APPFONT ( 171 , 163 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -370,6 +398,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_CUSTOM3 { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_CUSTOM3"; Pos = MAP_APPFONT ( 282 , 163 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -381,6 +410,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_CUSTOM4 { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_CUSTOM4"; Pos = MAP_APPFONT ( 65 , 177 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; @@ -392,6 +422,7 @@ ModalDialog RID_DLG_MAPPING }; ListBox LB_CUSTOM5 { + HelpID = "extensions:ListBox:RID_DLG_MAPPING:LB_CUSTOM5"; Pos = MAP_APPFONT ( 171 , 177 ) ; Size = MAP_APPFONT ( 50 , 60 ) ; DropDown = TRUE; diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index 77439de9c..d74678e44 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -57,6 +57,7 @@ #include <algorithm> #include <functional> #include <vector> +#include <tools/urlobj.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -463,12 +464,12 @@ void BibGeneralPage::CommitActiveControl() } //----------------------------------------------------------------------------- void BibGeneralPage::AddControlWithError( const OUString& rColumnName, const ::Point& rPos, const ::Size& rSize, - String& rErrorString, String aColumnUIName, sal_uInt16 nHelpId, sal_uInt16 nIndexInFTArray ) + String& rErrorString, String aColumnUIName, const rtl::OString& sHelpId, sal_uInt16 nIndexInFTArray ) { // adds also the XControl and creates a map entry in nFT2CtrlMap[] for mapping between control and FT INT16 nIndex = -1; - uno::Reference< awt::XControlModel > xTmp = AddXControl(rColumnName, rPos, rSize, nHelpId, nIndex ); + uno::Reference< awt::XControlModel > xTmp = AddXControl(rColumnName, rPos, rSize, sHelpId, nIndex ); if( xTmp.is() ) { DBG_ASSERT( nIndexInFTArray < FIELD_COUNT, "*BibGeneralPage::AddControlWithError(): wrong array index!" ); @@ -487,7 +488,7 @@ void BibGeneralPage::AddControlWithError( const OUString& rColumnName, const ::P //----------------------------------------------------------------------------- uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl( const String& rName, - ::Point rPos, ::Size rSize, sal_uInt16 nHelpId, INT16& rIndex ) + ::Point rPos, ::Size rSize, const rtl::OString& sHelpId, INT16& rIndex ) { uno::Reference< awt::XControlModel > xCtrModel; try @@ -509,11 +510,10 @@ uno::Reference< awt::XControlModel > BibGeneralPage::AddXControl( rtl::OUString uProp(C2U("HelpURL")); if(xPropInfo->hasPropertyByName(uProp)) { - String sId(C2S("HID:")); - sId += String::CreateFromInt32(nHelpId); - rtl::OUString uId(sId) ; - uno::Any aVal; aVal <<= uId; - xPropSet->setPropertyValue(uProp, aVal); + ::rtl::OUString sId = ::rtl::OUString::createFromAscii( INET_HID_SCHEME ); + DBG_ASSERT( INetURLObject( rtl::OStringToOUString( sHelpId, RTL_TEXTENCODING_UTF8 ) ).GetProtocol() == INET_PROT_NOT_VALID, "Wrong HelpId!" ); + sId += ::rtl::OUString( sHelpId, sHelpId.getLength(), RTL_TEXTENCODING_UTF8 ); + xPropSet->setPropertyValue( uProp, makeAny( sId ) ); } if(bTypeListBox) diff --git a/extensions/source/bibliography/general.hxx b/extensions/source/bibliography/general.hxx index 6e4896888..a924c047b 100644 --- a/extensions/source/bibliography/general.hxx +++ b/extensions/source/bibliography/general.hxx @@ -140,12 +140,12 @@ class BibGeneralPage: public BibGeneralPageBaseClass, public BibTabPage BibDataManager* pDatMan; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > - AddXControl( const String& rName, Point aPos, Size aSize, sal_uInt16 nHelpId, + AddXControl( const String& rName, Point aPos, Size aSize, const rtl::OString& sHelpId, sal_Int16& rIndex ); void AddControlWithError( const rtl::OUString& rColumnName, const Point& rPos, const Size& rSize, String& rErrorString, String aColumnUIName, - sal_uInt16 nHelpId, sal_uInt16 nIndexInFTArray ); + const rtl::OString& sHelpId, sal_uInt16 nIndexInFTArray ); void AdjustScrollbars(); diff --git a/extensions/source/bibliography/makefile.mk b/extensions/source/bibliography/makefile.mk index f25dce110..b681c6c90 100644 --- a/extensions/source/bibliography/makefile.mk +++ b/extensions/source/bibliography/makefile.mk @@ -54,7 +54,6 @@ SRS1NAME=$(TARGET) SRC1FILES= bib.src \ datman.src \ sections.src \ - menu.src \ toolbar.src RESLIB1NAME=bib @@ -89,3 +88,11 @@ DEF1NAME= $(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/bib.component + +$(MISC)/bib.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + bib.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt bib.component diff --git a/extensions/source/bibliography/menu.src b/extensions/source/bibliography/menu.src index 6b8adc355..45ebcda37 100644 --- a/extensions/source/bibliography/menu.src +++ b/extensions/source/bibliography/menu.src @@ -27,14 +27,8 @@ #include <svl/solar.hrc> #include <svx/svxids.hrc> -#ifndef _GLOBLMN_HRC #include <svx/globlmn.hrc> -#endif -#ifndef _GLOBALACC_SRC -#include <svx/globlac.hrc> -#endif #include "bibliography.hrc" - #include "bib.hrc" /* diff --git a/extensions/source/bibliography/toolbar.src b/extensions/source/bibliography/toolbar.src index 9016a4570..35217d6b6 100644 --- a/extensions/source/bibliography/toolbar.src +++ b/extensions/source/bibliography/toolbar.src @@ -27,6 +27,7 @@ #include <svx/svxids.hrc> #include "bibliography.hrc" #include "toolbar.hrc" +#include "svx/svxcommands.h" #define MASKCOLOR MaskColor = Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; }; @@ -46,7 +47,6 @@ ToolBox RID_BIB_TOOLBAR ToolBoxItem { Identifier = TBC_FT_SOURCE; - //HelpID = SID_SBA_BRW_INSERT ; Text [ en-US ] = "Table"; }; ToolBoxItem @@ -63,7 +63,6 @@ ToolBox RID_BIB_TOOLBAR ToolBoxItem { Identifier = TBC_FT_QUERY; - //HelpID = SID_SBA_BRW_INSERT ; Text [ en-US ] = "Search Key"; }; ToolBoxItem @@ -90,7 +89,6 @@ ToolBox RID_BIB_TOOLBAR ToolBoxItem { Identifier = TBC_BT_FILTERCRIT ; - HelpID = SID_FM_FILTERCRIT ; // ItemBitmap = Bitmap { File = "sc10715.bmp" ; }; // Text [ de ] = "Standard Filter" ; Command = ".uno:Bib/standardFilter" ; @@ -100,7 +98,6 @@ ToolBox RID_BIB_TOOLBAR ToolBoxItem { Identifier = TBC_BT_REMOVEFILTER ; - HelpID = SID_FM_REMOVE_FILTER_SORT ; // ItemBitmap = Bitmap { File = "sc10711.bmp" ; }; Command = ".uno:Bib/removeFilter" ; Text [ en-US ] = "Remove Filter"; @@ -122,78 +119,6 @@ ToolBox RID_BIB_TOOLBAR Checkable=TRUE; Text [ en-US ] = "Data Source"; }; -/* - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - - ToolBoxItem - { - Identifier = TBC_BT_NEWCARD ; - //HelpID = SID_FM_REMOVE_FILTER_SORT ; - Command = ".uno:Bib/newEntry" ; - ItemBitmap = Bitmap { File = "newcard.bmp" ; }; - Text [ en-US ] = "New Address"; - }; - - ToolBoxItem - { - Identifier = TBC_BT_EDITCARD ; - //HelpID = SID_FM_REMOVE_FILTER_SORT ; - Command = ".uno:Bib/changeEntry" ; - ItemBitmap = Bitmap { File = "modcard.bmp" ; }; - Text [ en-US ] = "Edit Address"; - }; - - ToolBoxItem - { - Identifier = TBC_BT_REMOVECARD ; - //HelpID = SID_FM_REMOVE_FILTER_SORT ; - Command = ".uno:Bib/removeEntry" ; - ItemBitmap = Bitmap { File = "remcard.bmp" ; }; - Text [ en-US ] = "Remove Address"; - }; - - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - - ToolBoxItem - { - Identifier = TBC_BT_INSERT ; - HelpID = SID_SBA_BRW_INSERT ; - ItemBitmap = Bitmap { File = "sc12202.bmp" ; }; - Text [ en-US ] = "Data into Text"; - }; - ToolBoxItem - { - Identifier = TBC_BT_UPDATE ; - HelpID = SID_SBA_BRW_UPDATE ; - ItemBitmap = Bitmap { File = "sc12201.bmp" ; }; - Text = "Daten in Felder" ; - }; - - ToolBoxItem - { - Type = TOOLBOXITEM_SEPARATOR ; - }; - - ToolBoxItem - { - Identifier = TBC_BT_MAIL ; - //HelpID = HID_ADDRPI_AUTOMAIL ; - ItemBitmap = Bitmap { File = "sc06305.bmp" ; }; - Text [ en-US ] = "AutoMail"; - }; - ToolBoxItem - { - Identifier = TBC_BT_URL ; - //HelpID = HID_ADDRPI_AUTOBROWSE ; - ItemBitmap = Bitmap { File = "sc06304.bmp" ; }; - Text [ en-US ] = "AutoBrowse"; - };*/ }; Scroll = TRUE ; }; diff --git a/extensions/source/config/ldap/componentdef.cxx b/extensions/source/config/ldap/componentdef.cxx index abeb75bb0..bf946c112 100644 --- a/extensions/source/config/ldap/componentdef.cxx +++ b/extensions/source/config/ldap/componentdef.cxx @@ -62,13 +62,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //------------------------------------------------------------------------------ -extern "C" sal_Bool SAL_CALL component_writeInfo(void *aServiceManager, - void *aRegistryKey) { - return cppu::component_writeInfoHelper( - aServiceManager, aRegistryKey, kImplementations_entries); -} -//------------------------------------------------------------------------------ - extern "C" void *component_getFactory(const sal_Char *aImplementationName, void *aServiceManager, void *aRegistryKey) { diff --git a/extensions/source/config/ldap/exports.dxp b/extensions/source/config/ldap/exports.dxp index 9630d7e06..f0e1c6993 100644 --- a/extensions/source/config/ldap/exports.dxp +++ b/extensions/source/config/ldap/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/extensions/source/config/ldap/ldapbe2.component b/extensions/source/config/ldap/ldapbe2.component new file mode 100644 index 000000000..071064d1c --- /dev/null +++ b/extensions/source/config/ldap/ldapbe2.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.configuration.backend.LdapUserProfileBe"> + <service name="com.sun.star.configuration.backend.LdapUserProfileBe"/> + </implementation> +</component> diff --git a/extensions/source/config/ldap/makefile.mk b/extensions/source/config/ldap/makefile.mk index a27cb39b6..d35e2428c 100644 --- a/extensions/source/config/ldap/makefile.mk +++ b/extensions/source/config/ldap/makefile.mk @@ -95,3 +95,11 @@ DEF1DES=Configuration: LDAP User Profile Backend .INCLUDE : target.mk .INCLUDE : $(PRJ)$/util$/target.pmk + +ALLTAR : $(MISC)/ldapbe2.component + +$(MISC)/ldapbe2.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ldapbe2.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ldapbe2.component diff --git a/extensions/source/dbpilots/commonpagesdbp.src b/extensions/source/dbpilots/commonpagesdbp.src index 783bdb48b..fd2bef2f4 100644 --- a/extensions/source/dbpilots/commonpagesdbp.src +++ b/extensions/source/dbpilots/commonpagesdbp.src @@ -31,6 +31,7 @@ TabPage RID_PAGE_TABLESELECTION { + HelpID = "extensions:TabPage:RID_PAGE_TABLESELECTION"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; Text [ en-US ] = "Data"; @@ -58,6 +59,7 @@ TabPage RID_PAGE_TABLESELECTION }; ListBox LB_DATASOURCE { + HelpID = "extensions:ListBox:RID_PAGE_TABLESELECTION:LB_DATASOURCE"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 , 26 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 27 , 14 ) ; SVLook = TRUE ; @@ -68,6 +70,7 @@ TabPage RID_PAGE_TABLESELECTION PushButton PB_FORMDATASOURCE { + HelpID = "extensions:PushButton:RID_PAGE_TABLESELECTION:PB_FORMDATASOURCE"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 + WINDOW_HALF_SIZE_X - 24 , 25 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; Text [ en-US ] = "~..."; @@ -82,6 +85,7 @@ TabPage RID_PAGE_TABLESELECTION }; ListBox LB_TABLE { + HelpID = "extensions:ListBox:RID_PAGE_TABLESELECTION:LB_TABLE"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3, 57 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10 , WINDOW_SIZE_Y - 6 - 57 ) ; SVLook = TRUE ; @@ -118,6 +122,7 @@ TabPage RID_PAGE_TABLESELECTION TabPage RID_PAGE_OPTION_DBFIELD { + HelpID = "extensions:TabPage:RID_PAGE_OPTION_DBFIELD"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; Text [ en-US ] = "Database Field"; @@ -142,6 +147,7 @@ TabPage RID_PAGE_OPTION_DBFIELD }; RadioButton RB_STOREINFIELD_YES { + HelpID = "extensions:RadioButton:RID_PAGE_OPTION_DBFIELD:RB_STOREINFIELD_YES"; Pos = MAP_APPFONT ( 7 , 53 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 20, 10 ) ; Group = TRUE; @@ -150,6 +156,7 @@ TabPage RID_PAGE_OPTION_DBFIELD }; ListBox LB_STOREINFIELD { + HelpID = "extensions:ListBox:RID_PAGE_OPTION_DBFIELD:LB_STOREINFIELD"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 23, 51 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 30, 14 ) ; TabStop = TRUE; @@ -160,6 +167,7 @@ TabPage RID_PAGE_OPTION_DBFIELD }; RadioButton RB_STOREINFIELD_NO { + HelpID = "extensions:RadioButton:RID_PAGE_OPTION_DBFIELD:RB_STOREINFIELD_NO"; Pos = MAP_APPFONT ( 7 , 68 ) ; Size = MAP_APPFONT ( WINDOW_SIZE_X - 14, 10 ) ; TabStop = FALSE; @@ -169,6 +177,7 @@ TabPage RID_PAGE_OPTION_DBFIELD TabPage RID_PAGE_FORM_DATASOURCE_STATUS { + HelpID = "extensions:TabPage:RID_PAGE_FORM_DATASOURCE_STATUS"; FixedLine FL_FORMSETINGS { Pos = MAP_APPFONT ( 4 , 3 ) ; diff --git a/extensions/source/dbpilots/dbp.component b/extensions/source/dbpilots/dbp.component new file mode 100644 index 000000000..84ec98713 --- /dev/null +++ b/extensions/source/dbpilots/dbp.component @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="org.openoffice.comp.dbp.OGridWizard"> + <service name="com.sun.star.sdb.GridControlAutoPilot"/> + </implementation> + <implementation name="org.openoffice.comp.dbp.OGroupBoxWizard"> + <service name="com.sun.star.sdb.GroupBoxAutoPilot"/> + </implementation> + <implementation name="org.openoffice.comp.dbp.OListComboWizard"> + <service name="com.sun.star.sdb.ListComboBoxAutoPilot"/> + </implementation> +</component> diff --git a/extensions/source/dbpilots/dbpilots.src b/extensions/source/dbpilots/dbpilots.src index fcdda32e0..7e5cf6adf 100644 --- a/extensions/source/dbpilots/dbpilots.src +++ b/extensions/source/dbpilots/dbpilots.src @@ -31,6 +31,7 @@ ModalDialog RID_DLG_GROUPBOXWIZARD { + HelpID = "extensions:ModalDialog:RID_DLG_GROUPBOXWIZARD"; Text [ en-US ] = "Group Element Wizard"; OutputSize = TRUE ; @@ -42,6 +43,7 @@ ModalDialog RID_DLG_GROUPBOXWIZARD ModalDialog RID_DLG_LISTCOMBOWIZARD { + HelpID = "extensions:ModalDialog:RID_DLG_LISTCOMBOWIZARD"; OutputSize = TRUE ; SVLook = TRUE ; Moveable = TRUE ; @@ -51,6 +53,7 @@ ModalDialog RID_DLG_LISTCOMBOWIZARD ModalDialog RID_DLG_GRIDWIZARD { + HelpID = "extensions:ModalDialog:RID_DLG_GRIDWIZARD"; OutputSize = TRUE ; SVLook = TRUE ; Moveable = TRUE ; diff --git a/extensions/source/dbpilots/dbpresid.hrc b/extensions/source/dbpilots/dbpresid.hrc index 81f61d49c..7d766516c 100644 --- a/extensions/source/dbpilots/dbpresid.hrc +++ b/extensions/source/dbpilots/dbpresid.hrc @@ -29,6 +29,7 @@ #define _EXTENSIONS_DBP_DBPRESID_HRC_ #include "dbpilots.hrc" +#include "extensio.hrc" //======================================================================== // basics diff --git a/extensions/source/dbpilots/dbpservices.cxx b/extensions/source/dbpilots/dbpservices.cxx index b7e63c663..726049977 100644 --- a/extensions/source/dbpilots/dbpservices.cxx +++ b/extensions/source/dbpilots/dbpservices.cxx @@ -70,27 +70,6 @@ component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - return ::dbp::OModule::writeComponentInfos( - static_cast<XMultiServiceFactory*>(pServiceManager), - static_cast<XRegistryKey*>(pRegistryKey)); - } - catch (InvalidRegistryException& ) - { - OSL_ASSERT("dbp::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/extensions/source/dbpilots/gridpages.src b/extensions/source/dbpilots/gridpages.src index 5b5d557ca..ccba53592 100644 --- a/extensions/source/dbpilots/gridpages.src +++ b/extensions/source/dbpilots/gridpages.src @@ -31,6 +31,7 @@ TabPage RID_PAGE_GW_FIELDSELECTION { + HelpID = "extensions:TabPage:RID_PAGE_GW_FIELDSELECTION"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; @@ -51,6 +52,7 @@ TabPage RID_PAGE_GW_FIELDSELECTION }; ListBox LB_EXISTING_FIELDS { + HelpID = "extensions:ListBox:RID_PAGE_GW_FIELDSELECTION:LB_EXISTING_FIELDS"; Pos = MAP_APPFONT ( 7 , 63 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 - 13, WINDOW_SIZE_Y - 63 - 6 ) ; SVLook = TRUE ; @@ -61,24 +63,28 @@ TabPage RID_PAGE_GW_FIELDSELECTION }; PushButton PB_FIELDRIGHT { + HelpID = "extensions:PushButton:RID_PAGE_GW_FIELDSELECTION:PB_FIELDRIGHT"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2, 63 ); Size = MAP_APPFONT ( ITEM_BUTTON_SIZE_X, ITEM_BUTTON_SIZE_Y ); Text = "->"; }; PushButton PB_ALLFIELDSRIGHT { + HelpID = "extensions:PushButton:RID_PAGE_GW_FIELDSELECTION:PB_ALLFIELDSRIGHT"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2, 63 + ITEM_BUTTON_SIZE_Y + 3 ); Size = MAP_APPFONT ( ITEM_BUTTON_SIZE_X, ITEM_BUTTON_SIZE_Y ); Text = "=>>"; }; PushButton PB_FIELDLEFT { + HelpID = "extensions:PushButton:RID_PAGE_GW_FIELDSELECTION:PB_FIELDLEFT"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2, 63 + ITEM_BUTTON_SIZE_Y + 3 + ITEM_BUTTON_SIZE_Y + 12 ); Size = MAP_APPFONT ( ITEM_BUTTON_SIZE_X, ITEM_BUTTON_SIZE_Y ); Text = "<-"; }; PushButton PB_ALLFIELDSLEFT { + HelpID = "extensions:PushButton:RID_PAGE_GW_FIELDSELECTION:PB_ALLFIELDSLEFT"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2, 63 + ITEM_BUTTON_SIZE_Y + 3 + ITEM_BUTTON_SIZE_Y + 12 + ITEM_BUTTON_SIZE_Y + 3 ); Size = MAP_APPFONT ( ITEM_BUTTON_SIZE_X, ITEM_BUTTON_SIZE_Y ); Text = "<<="; @@ -91,6 +97,7 @@ TabPage RID_PAGE_GW_FIELDSELECTION }; ListBox LB_SELECTED_FIELDS { + HelpID = "extensions:ListBox:RID_PAGE_GW_FIELDSELECTION:LB_SELECTED_FIELDS"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + ITEM_BUTTON_SIZE_X / 2 + 6 , 63 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 - 13, WINDOW_SIZE_Y - 63 - 6 ) ; SVLook = TRUE ; diff --git a/extensions/source/dbpilots/groupboxpages.src b/extensions/source/dbpilots/groupboxpages.src index f5538e2a1..11f77711c 100644 --- a/extensions/source/dbpilots/groupboxpages.src +++ b/extensions/source/dbpilots/groupboxpages.src @@ -31,6 +31,7 @@ TabPage RID_PAGE_GROUPRADIOSELECTION { + HelpID = "extensions:TabPage:RID_PAGE_GROUPRADIOSELECTION"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; Text [ en-US ] = "Data"; @@ -50,6 +51,7 @@ TabPage RID_PAGE_GROUPRADIOSELECTION }; Edit ET_RADIOLABELS { + HelpID = "extensions:Edit:RID_PAGE_GROUPRADIOSELECTION:ET_RADIOLABELS"; Pos = MAP_APPFONT ( 7 , 79 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 - 13, 12 ) ; SVLook = TRUE ; @@ -57,12 +59,14 @@ TabPage RID_PAGE_GROUPRADIOSELECTION }; PushButton PB_MOVETORIGHT { + HelpID = "extensions:PushButton:RID_PAGE_GROUPRADIOSELECTION:PB_MOVETORIGHT"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 , 79 ) ; Size = MAP_APPFONT ( ITEM_BUTTON_SIZE_X , ITEM_BUTTON_SIZE_Y ) ; Text = "~>>"; }; PushButton PB_MOVETOLEFT { + HelpID = "extensions:PushButton:RID_PAGE_GROUPRADIOSELECTION:PB_MOVETOLEFT"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 , 79 + ITEM_BUTTON_SIZE_Y + 3 ) ; Size = MAP_APPFONT ( ITEM_BUTTON_SIZE_X , ITEM_BUTTON_SIZE_Y ) ; Text = "~<<"; @@ -76,6 +80,7 @@ TabPage RID_PAGE_GROUPRADIOSELECTION }; ListBox LB_RADIOBUTTONS { + HelpID = "extensions:ListBox:RID_PAGE_GROUPRADIOSELECTION:LB_RADIOBUTTONS"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + ITEM_BUTTON_SIZE_X / 2 + 6 , 79 ) ; Size = MAP_APPFONT ( WINDOW_SIZE_X - WINDOW_HALF_SIZE_X - ITEM_BUTTON_SIZE_X / 2 - 6 - 7, WINDOW_SIZE_Y - 79 - 6 ) ; SVLook = TRUE ; @@ -87,6 +92,7 @@ TabPage RID_PAGE_GROUPRADIOSELECTION TabPage RID_PAGE_DEFAULTFIELDSELECTION { + HelpID = "extensions:TabPage:RID_PAGE_DEFAULTFIELDSELECTION"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; Text [ en-US ] = "Default Field Selection"; @@ -106,6 +112,7 @@ TabPage RID_PAGE_DEFAULTFIELDSELECTION }; RadioButton RB_DEFSELECTION_YES { + HelpID = "extensions:RadioButton:RID_PAGE_DEFAULTFIELDSELECTION:RB_DEFSELECTION_YES"; Pos = MAP_APPFONT ( 7 , 44 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, 10 ) ; Group = TRUE; @@ -114,6 +121,7 @@ TabPage RID_PAGE_DEFAULTFIELDSELECTION }; ListBox LB_DEFSELECTIONFIELD { + HelpID = "extensions:ListBox:RID_PAGE_DEFAULTFIELDSELECTION:LB_DEFSELECTIONFIELD"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 , 42 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, 14 ) ; TabStop = TRUE; @@ -125,6 +133,7 @@ TabPage RID_PAGE_DEFAULTFIELDSELECTION }; RadioButton RB_DEFSELECTION_NO { + HelpID = "extensions:RadioButton:RID_PAGE_DEFAULTFIELDSELECTION:RB_DEFSELECTION_NO"; Pos = MAP_APPFONT ( 7 , 59 ) ; Size = MAP_APPFONT ( WINDOW_SIZE_X - 14, 10 ) ; TabStop = FALSE; @@ -134,6 +143,7 @@ TabPage RID_PAGE_DEFAULTFIELDSELECTION TabPage RID_PAGE_OPTIONVALUES { + HelpID = "extensions:TabPage:RID_PAGE_OPTIONVALUES"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; Text [ en-US ] = "Field Values"; @@ -160,6 +170,7 @@ TabPage RID_PAGE_OPTIONVALUES }; Edit ET_OPTIONVALUE { + HelpID = "extensions:Edit:RID_PAGE_OPTIONVALUES:ET_OPTIONVALUE"; Pos = MAP_APPFONT ( 7 , 61 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, 12 ) ; SVLook = TRUE ; @@ -174,6 +185,7 @@ TabPage RID_PAGE_OPTIONVALUES }; ListBox LB_RADIOBUTTONS { + HelpID = "extensions:ListBox:RID_PAGE_OPTIONVALUES:LB_RADIOBUTTONS"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 , 26 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10 , WINDOW_SIZE_Y - 32 ) ; SVLook = TRUE ; @@ -185,6 +197,7 @@ TabPage RID_PAGE_OPTIONVALUES TabPage RID_PAGE_OPTIONS_FINAL { + HelpID = "extensions:TabPage:RID_PAGE_OPTIONS_FINAL"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; Text [ en-US ] = "Create Option Group"; @@ -203,6 +216,7 @@ TabPage RID_PAGE_OPTIONS_FINAL }; Edit ET_NAMEIT { + HelpID = "extensions:Edit:RID_PAGE_OPTIONS_FINAL:ET_NAMEIT"; Pos = MAP_APPFONT ( 7 , 34 ) ; Size = MAP_APPFONT ( WINDOW_SIZE_X - 14, 12 ) ; SVLook = TRUE ; diff --git a/extensions/source/dbpilots/listcombopages.src b/extensions/source/dbpilots/listcombopages.src index 7e48fef2c..dd8603502 100644 --- a/extensions/source/dbpilots/listcombopages.src +++ b/extensions/source/dbpilots/listcombopages.src @@ -31,6 +31,7 @@ TabPage RID_PAGE_LCW_CONTENTSELECTION_TABLE { + HelpID = "extensions:TabPage:RID_PAGE_LCW_CONTENTSELECTION_TABLE"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; @@ -53,6 +54,7 @@ TabPage RID_PAGE_LCW_CONTENTSELECTION_TABLE }; ListBox LB_SELECTTABLE { + HelpID = "extensions:ListBox:RID_PAGE_LCW_CONTENTSELECTION_TABLE:LB_SELECTTABLE"; Pos = MAP_APPFONT ( 130 , 52 ) ; Size = MAP_APPFONT ( WINDOW_SIZE_X - 130 - 7, WINDOW_SIZE_Y - 52 - 6 ) ; SVLook = TRUE ; @@ -65,6 +67,7 @@ TabPage RID_PAGE_LCW_CONTENTSELECTION_TABLE TabPage RID_PAGE_LCW_CONTENTSELECTION_FIELD { + HelpID = "extensions:TabPage:RID_PAGE_LCW_CONTENTSELECTION_FIELD"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; @@ -86,6 +89,7 @@ TabPage RID_PAGE_LCW_CONTENTSELECTION_FIELD }; ListBox LB_SELECTFIELD { + HelpID = "extensions:ListBox:RID_PAGE_LCW_CONTENTSELECTION_FIELD:LB_SELECTFIELD"; Pos = MAP_APPFONT ( 7 , 26 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, WINDOW_SIZE_Y - 32 ) ; SVLook = TRUE ; @@ -102,6 +106,7 @@ TabPage RID_PAGE_LCW_CONTENTSELECTION_FIELD }; Edit ET_DISPLAYEDFIELD { + HelpID = "extensions:Edit:RID_PAGE_LCW_CONTENTSELECTION_FIELD:ET_DISPLAYEDFIELD"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 , 26 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, 12 ) ; SVLook = TRUE ; @@ -127,6 +132,7 @@ TabPage RID_PAGE_LCW_CONTENTSELECTION_FIELD TabPage RID_PAGE_LCW_FIELDLINK { + HelpID = "extensions:TabPage:RID_PAGE_LCW_FIELDLINK"; SVLook = TRUE ; Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; @@ -153,6 +159,7 @@ TabPage RID_PAGE_LCW_FIELDLINK }; ComboBox CMB_VALUELISTFIELD { + HelpID = "extensions:ComboBox:RID_PAGE_LCW_FIELDLINK:CMB_VALUELISTFIELD"; Pos = MAP_APPFONT ( 7 , 48 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, WINDOW_SIZE_Y - 54 ) ; SVLook = TRUE ; @@ -170,6 +177,7 @@ TabPage RID_PAGE_LCW_FIELDLINK }; ComboBox CMB_TABLEFIELD { + HelpID = "extensions:ComboBox:RID_PAGE_LCW_FIELDLINK:CMB_TABLEFIELD"; Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 3 , 48 ) ; Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 10, WINDOW_SIZE_Y - 54 ) ; SVLook = TRUE ; diff --git a/extensions/source/dbpilots/makefile.mk b/extensions/source/dbpilots/makefile.mk index b5831e5fd..e37ab0a54 100644 --- a/extensions/source/dbpilots/makefile.mk +++ b/extensions/source/dbpilots/makefile.mk @@ -101,3 +101,11 @@ DEF1NAME= $(SHL1TARGET) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk + +ALLTAR : $(MISC)/dbp.component + +$(MISC)/dbp.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + dbp.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt dbp.component diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx index cbcb0cec1..0a9f4bb76 100644 --- a/extensions/source/inc/componentmodule.cxx +++ b/extensions/source/inc/componentmodule.cxx @@ -238,54 +238,6 @@ namespace COMPMOD_NAMESPACE } //-------------------------------------------------------------------------- - sal_Bool OModule::writeComponentInfos( - const Reference< XMultiServiceFactory >& /*_rxServiceManager*/, - const Reference< XRegistryKey >& _rxRootKey) - { - OSL_ENSURE(_rxRootKey.is(), "OModule::writeComponentInfos : invalid argument !"); - - if (!s_pImplementationNames) - { - OSL_ASSERT("OModule::writeComponentInfos : have no class infos ! Are you sure called this method at the right time ?"); - return sal_True; - } - OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, - "OModule::writeComponentInfos : inconsistent state (the pointers) !"); - OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) - && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) - && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), - "OModule::writeComponentInfos : inconsistent state !"); - - sal_Int32 nLen = s_pImplementationNames->getLength(); - const ::rtl::OUString* pImplName = s_pImplementationNames->getConstArray(); - const Sequence< ::rtl::OUString >* pServices = s_pSupportedServices->getConstArray(); - - ::rtl::OUString sRootKey("/", 1, RTL_TEXTENCODING_ASCII_US); - for (sal_Int32 i=0; i<nLen; ++i, ++pImplName, ++pServices) - { - ::rtl::OUString aMainKeyName(sRootKey); - aMainKeyName += *pImplName; - aMainKeyName += ::rtl::OUString::createFromAscii("/UNO/SERVICES"); - - try - { - Reference< XRegistryKey > xNewKey( _rxRootKey->createKey(aMainKeyName) ); - - const ::rtl::OUString* pService = pServices->getConstArray(); - for (sal_Int32 j=0; j<pServices->getLength(); ++j, ++pService) - xNewKey->createKey(*pService); - } - catch(Exception&) - { - OSL_ASSERT("OModule::writeComponentInfos : something went wrong while creating the keys !"); - return sal_False; - } - } - - return sal_True; - } - - //-------------------------------------------------------------------------- Reference< XInterface > OModule::getComponentFactory( const ::rtl::OUString& _rImplementationName, const Reference< XMultiServiceFactory >& _rxServiceManager) diff --git a/extensions/source/inc/componentmodule.hxx b/extensions/source/inc/componentmodule.hxx index 741903e50..268aa9ce0 100644 --- a/extensions/source/inc/componentmodule.hxx +++ b/extensions/source/inc/componentmodule.hxx @@ -121,21 +121,6 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService static void revokeComponent( const ::rtl::OUString& _rImplementationName); - /** write the registration information of all known components - <p>writes the registration information of all components which are currently registered into the - specified registry.<p/> - <p>Usually used from within component_writeInfo.<p/> - @param _rxServiceManager - the service manager - @param _rRootKey - the registry key under which the information will be stored - @return - sal_True if the registration of all implementations was successfull, sal_False otherwise - */ - static sal_Bool writeComponentInfos( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxServiceManager, - const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey >& _rRootKey); - /** creates a Factory for the component with the given implementation name. <p>Usually used from within component_getFactory.<p/> @param _rxServiceManager diff --git a/extensions/source/logging/log.component b/extensions/source/logging/log.component new file mode 100644 index 000000000..4dd2db56c --- /dev/null +++ b/extensions/source/logging/log.component @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.extensions.ConsoleHandler"> + <service name="com.sun.star.logging.ConsoleHandler"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.CsvFormatter"> + <service name="com.sun.star.logging.CsvFormatter"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.FileHandler"> + <service name="com.sun.star.logging.FileHandler"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.LoggerPool"> + <service name="com.sun.star.logging.LoggerPool"/> + <singleton name="com.sun.star.logging.LoggerPool"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.PlainTextFormatter"> + <service name="com.sun.star.logging.PlainTextFormatter"/> + </implementation> +</component> diff --git a/extensions/source/logging/makefile.mk b/extensions/source/logging/makefile.mk index 4a1fa9813..1436576e8 100644 --- a/extensions/source/logging/makefile.mk +++ b/extensions/source/logging/makefile.mk @@ -74,3 +74,11 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map .INCLUDE : target.mk + +ALLTAR : $(MISC)/log.component + +$(MISC)/log.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + log.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt log.component diff --git a/extensions/source/macosx/spotlight/makefile.mk b/extensions/source/macosx/spotlight/makefile.mk index 3d1cb12d1..e7b15150b 100644 --- a/extensions/source/macosx/spotlight/makefile.mk +++ b/extensions/source/macosx/spotlight/makefile.mk @@ -74,8 +74,11 @@ ZIP1LIST = * .INCLUDE : target.mk +.IF "$(ZIP1TARGETN)"!="" $(ZIP1TARGETN) : $(plistfiles) $(binaries) $(resources) +.ENDIF # "$(ZIP1TARGETN)"!="" + # Info.plist is just versioned and copied into the bundle $(CONTENTS)$/%.plist : mdimporter/%.plist $(MKDIRHIER) $(@:d) diff --git a/extensions/source/nsplugin/source/makefile.mk b/extensions/source/nsplugin/source/makefile.mk index 4f9be7434..5a0870b47 100644 --- a/extensions/source/nsplugin/source/makefile.mk +++ b/extensions/source/nsplugin/source/makefile.mk @@ -77,7 +77,7 @@ SHL1STDLIBS+=$(SOLARLIBDIR)$/npunix.o #.ENDIF #FREEBSD .ENDIF #UNX .IF "$(GUI)"=="WNT" -SHL1OBJS+=$(SOLARLIBDIR)$/pathutils-slo.obj +SHL1OBJS+=$(SOLARLIBDIR)$/pathutils-obj.obj STDLIBS+=$(SOLARLIBDIR)$/npwin.obj SHL1STDLIBS+= $(SHELL32LIB) $(SOLARLIBDIR)$/npwin.obj diff --git a/extensions/source/ole/makefile.mk b/extensions/source/ole/makefile.mk index ad4ecee72..806cd027e 100644 --- a/extensions/source/ole/makefile.mk +++ b/extensions/source/ole/makefile.mk @@ -129,3 +129,10 @@ DEF2EXPORTFILE=$(TARGET).dxp .INCLUDE : target.mk +ALLTAR : $(MISC)/oleautobridge.component + +$(MISC)/oleautobridge.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt oleautobridge.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt oleautobridge.component diff --git a/extensions/source/ole/oleautobridge.component b/extensions/source/ole/oleautobridge.component new file mode 100644 index 000000000..6f5309e42 --- /dev/null +++ b/extensions/source/ole/oleautobridge.component @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.ole.OleClient"> + <service name="com.sun.star.bridge.OleObjectFactory"/> + <service name="com.sun.star.bridge.oleautomation.Factory"/> + </implementation> + <implementation name="com.sun.star.comp.ole.OleConverter2"> + <service name="com.sun.star.bridge.OleBridgeSupplier2"/> + <service name="com.sun.star.bridge.oleautomation.BridgeSupplier"/> + </implementation> + <implementation name="com.sun.star.comp.ole.OleConverterVar1"> + <service name="com.sun.star.bridge.OleBridgeSupplierVar1"/> + </implementation> + <implementation name="com.sun.star.comp.ole.OleServer"> + <service name="com.sun.star.bridge.OleApplicationRegistration"/> + <service name="com.sun.star.bridge.oleautomation.ApplicationRegistration"/> + </implementation> +</component> diff --git a/extensions/source/ole/oleautobridge.uno.dxp b/extensions/source/ole/oleautobridge.uno.dxp index e7947188a..1f26fd019 100644 --- a/extensions/source/ole/oleautobridge.uno.dxp +++ b/extensions/source/ole/oleautobridge.uno.dxp @@ -1,4 +1,3 @@ -component_writeInfo @100 component_getFactory @101 component_getImplementationEnvironment @102 component_canUnload @103 diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index 7a73ed7e6..73820ae40 100755 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -74,6 +74,7 @@ using namespace com::sun::star::lang; using namespace com::sun::star::bridge; using namespace com::sun::star::bridge::oleautomation; using namespace com::sun::star::bridge::ModelDependent; +using namespace ::com::sun::star; #define JSCRIPT_ID_PROPERTY L"_environment" #define JSCRIPT_ID L"jscript" @@ -155,8 +156,8 @@ Any IUnknownWrapper_Impl::queryInterface(const Type& t) if (t == getCppuType(static_cast<Reference<XInvocation>*>( 0)) && !m_spDispatch) return Any(); - return WeakImplHelper6<XInvocation, XBridgeSupplier2, - XInitialization, XAutomationObject, XDefaultProperty, XDefaultMethod>::queryInterface(t); + return WeakImplHelper7<XInvocation, XBridgeSupplier2, + XInitialization, XAutomationObject, XDefaultProperty, XDefaultMethod, XDirectInvocation>::queryInterface(t); } Reference<XIntrospectionAccess> SAL_CALL IUnknownWrapper_Impl::getIntrospection(void) @@ -1174,7 +1175,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName, - // -------------------------- +// -------------------------- // XInitialization void SAL_CALL IUnknownWrapper_Impl::initialize( const Sequence< Any >& aArguments ) throw(Exception, RuntimeException) { @@ -1257,6 +1258,274 @@ void SAL_CALL IUnknownWrapper_Impl::initialize( const Sequence< Any >& aArgument } } +// -------------------------- +// XDirectInvocation +uno::Any SAL_CALL IUnknownWrapper_Impl::directInvoke( const ::rtl::OUString& aName, const uno::Sequence< uno::Any >& aParams ) + throw (lang::IllegalArgumentException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException) +{ + Any aResult; + + if ( !m_spDispatch ) + { + throw RuntimeException( + OUSTR("[automation bridge] The object does not have an IDispatch interface"), + Reference<XInterface>()); + } + + o2u_attachCurrentThread(); + DISPID dispid; + if ( !getDispid( aName, &dispid ) ) + throw IllegalArgumentException( + OUSTR( "[automation bridge] The object does not have a function or property " ) + + aName, Reference<XInterface>(), 0); + + CComVariant varResult; + ExcepInfo excepinfo; + unsigned int uArgErr = 0; + INVOKEKIND pInvkinds[2]; + pInvkinds[0] = INVOKE_FUNC; + pInvkinds[1] = aParams.getLength() ? INVOKE_PROPERTYPUT : INVOKE_PROPERTYGET; + HRESULT hInvRes = E_FAIL; + + // try Invoke first, if it does not work, try put/get property + for ( sal_Int32 nStep = 0; FAILED( hInvRes ) && nStep < 2; nStep++ ) + { + DISPPARAMS dispparams = {NULL, NULL, 0, 0}; + + DISPID idPropertyPut = DISPID_PROPERTYPUT; + scoped_array<DISPID> arDispidNamedArgs; + scoped_array<CComVariant> ptrArgs; + scoped_array<CComVariant> ptrRefArgs; // referenced arguments + CComVariant * arArgs = NULL; + CComVariant * arRefArgs = NULL; + bool bVarargParam = false; + + dispparams.cArgs = aParams.getLength(); + + // Determine the number of named arguments + for ( sal_Int32 nInd = 0; nInd < aParams.getLength(); nInd++ ) + if ( aParams[nInd].getValueType() == getCppuType((NamedArgument*) 0) ) + dispparams.cNamedArgs ++; + + // fill the named arguments + if ( dispparams.cNamedArgs > 0 + && !( dispparams.cNamedArgs == 1 && pInvkinds[nStep] == INVOKE_PROPERTYPUT ) ) + { + int nSizeAr = dispparams.cNamedArgs + 1; + if ( pInvkinds[nStep] == INVOKE_PROPERTYPUT ) + nSizeAr = dispparams.cNamedArgs; + + scoped_array<OLECHAR*> saNames(new OLECHAR*[nSizeAr]); + OLECHAR ** pNames = saNames.get(); + pNames[0] = const_cast<OLECHAR*>(reinterpret_cast<LPCOLESTR>(aName.getStr())); + + int cNamedArg = 0; + for ( size_t nInd = 0; nInd < dispparams.cArgs; nInd++ ) + { + if ( aParams[nInd].getValueType() == getCppuType((NamedArgument*) 0)) + { + const NamedArgument& arg = *(NamedArgument const*)aParams[nInd].getValue(); + + //We put the parameter names in reverse order into the array, + //so we can use the DISPID array for DISPPARAMS::rgdispidNamedArgs + //The first name in the array is the method name + pNames[nSizeAr - 1 - cNamedArg++] = const_cast<OLECHAR*>(reinterpret_cast<LPCOLESTR>(arg.Name.getStr())); + } + } + + arDispidNamedArgs.reset( new DISPID[nSizeAr] ); + HRESULT hr = getTypeInfo()->GetIDsOfNames( pNames, nSizeAr, arDispidNamedArgs.get() ); + if ( hr == E_NOTIMPL ) + hr = m_spDispatch->GetIDsOfNames(IID_NULL, pNames, nSizeAr, LOCALE_USER_DEFAULT, arDispidNamedArgs.get() ); + + if ( SUCCEEDED( hr ) ) + { + if ( pInvkinds[nStep] == DISPATCH_PROPERTYPUT ) + { + DISPID* arIDs = arDispidNamedArgs.get(); + arIDs[0] = DISPID_PROPERTYPUT; + dispparams.rgdispidNamedArgs = arIDs; + } + else + { + DISPID* arIDs = arDispidNamedArgs.get(); + dispparams.rgdispidNamedArgs = & arIDs[1]; + } + } + else if (hr == DISP_E_UNKNOWNNAME) + { + throw IllegalArgumentException( + OUSTR("[automation bridge]One of the named arguments is wrong!"), + Reference<XInterface>(), 0); + } + else + { + throw InvocationTargetException( + OUSTR("[automation bridge] ITypeInfo::GetIDsOfNames returned error ") + + OUString::valueOf((sal_Int32) hr, 16), Reference<XInterface>(), Any()); + } + } + + //Convert arguments + ptrArgs.reset(new CComVariant[dispparams.cArgs]); + ptrRefArgs.reset(new CComVariant[dispparams.cArgs]); + arArgs = ptrArgs.get(); + arRefArgs = ptrRefArgs.get(); + + sal_Int32 nInd = 0; + try + { + sal_Int32 revIndex = 0; + for ( nInd = 0; nInd < sal_Int32(dispparams.cArgs); nInd++) + { + revIndex = dispparams.cArgs - nInd - 1; + arRefArgs[revIndex].byref = 0; + Any anyArg; + if ( nInd < aParams.getLength() ) + anyArg = aParams.getConstArray()[nInd]; + + // Property Put arguments + if ( anyArg.getValueType() == getCppuType((PropertyPutArgument*)0) ) + { + PropertyPutArgument arg; + anyArg >>= arg; + anyArg <<= arg.Value; + } + // named argument + if (anyArg.getValueType() == getCppuType((NamedArgument*) 0)) + { + NamedArgument aNamedArgument; + anyArg >>= aNamedArgument; + anyArg <<= aNamedArgument.Value; + } + + if ( nInd < aParams.getLength() && anyArg.getValueTypeClass() != TypeClass_VOID ) + { + anyToVariant( &arArgs[revIndex], anyArg, VT_VARIANT ); + } + else + { + arArgs[revIndex].vt = VT_ERROR; + arArgs[revIndex].scode = DISP_E_PARAMNOTFOUND; + } + } + } + catch (IllegalArgumentException & e) + { + e.ArgumentPosition = ::sal::static_int_cast< sal_Int16, sal_Int32 >( nInd ); + throw; + } + catch (CannotConvertException & e) + { + e.ArgumentIndex = nInd; + throw; + } + + dispparams.rgvarg = arArgs; + // invoking OLE method + DWORD localeId = LOCALE_USER_DEFAULT; + hInvRes = m_spDispatch->Invoke( dispid, + IID_NULL, + localeId, + ::sal::static_int_cast< WORD, INVOKEKIND >( pInvkinds[nStep] ), + &dispparams, + &varResult, + &excepinfo, + &uArgErr); + } + + // converting return value and out parameter back to UNO + if ( SUCCEEDED( hInvRes ) ) + variantToAny( &varResult, aResult, sal_False ); + else + { + // map error codes to exceptions + OUString message; + switch ( hInvRes ) + { + case S_OK: + break; + case DISP_E_BADPARAMCOUNT: + throw IllegalArgumentException(OUSTR("[automation bridge] Wrong " + "number of arguments. Object returned DISP_E_BADPARAMCOUNT."), + 0, 0); + break; + case DISP_E_BADVARTYPE: + throw RuntimeException(OUSTR("[automation bridge] One or more " + "arguments have the wrong type. Object returned " + "DISP_E_BADVARTYPE."), 0); + break; + case DISP_E_EXCEPTION: + message = OUSTR("[automation bridge]: "); + message += OUString(reinterpret_cast<const sal_Unicode*>(excepinfo.bstrDescription), + ::SysStringLen(excepinfo.bstrDescription)); + throw InvocationTargetException(message, Reference<XInterface>(), Any()); + break; + case DISP_E_MEMBERNOTFOUND: + message = OUSTR("[automation bridge]: A function with the name \"") + + aName + OUSTR("\" is not supported. Object returned " + "DISP_E_MEMBERNOTFOUND."); + throw IllegalArgumentException(message, 0, 0); + break; + case DISP_E_NONAMEDARGS: + throw IllegalArgumentException(OUSTR("[automation bridge] Object " + "returned DISP_E_NONAMEDARGS"),0, ::sal::static_int_cast< sal_Int16, unsigned int >( uArgErr )); + break; + case DISP_E_OVERFLOW: + throw CannotConvertException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[automation bridge] Call failed.")), + static_cast<XInterface*>( + static_cast<XWeak*>(this)), TypeClass_UNKNOWN, FailReason::OUT_OF_RANGE, uArgErr); + break; + case DISP_E_PARAMNOTFOUND: + throw IllegalArgumentException(OUSTR("[automation bridge]Call failed." + "Object returned DISP_E_PARAMNOTFOUND."), + 0, ::sal::static_int_cast< sal_Int16, unsigned int >( uArgErr )); + break; + case DISP_E_TYPEMISMATCH: + throw CannotConvertException(OUSTR("[automation bridge] Call failed. " + "Object returned DISP_E_TYPEMISMATCH"), + static_cast<XInterface*>( + static_cast<XWeak*>(this)) , TypeClass_UNKNOWN, FailReason::UNKNOWN, uArgErr); + break; + case DISP_E_UNKNOWNINTERFACE: + throw RuntimeException(OUSTR("[automation bridge] Call failed. " + "Object returned DISP_E_UNKNOWNINTERFACE."),0); + break; + case DISP_E_UNKNOWNLCID: + throw RuntimeException(OUSTR("[automation bridge] Call failed. " + "Object returned DISP_E_UNKNOWNLCID."),0); + break; + case DISP_E_PARAMNOTOPTIONAL: + throw CannotConvertException(OUSTR("[automation bridge] Call failed." + "Object returned DISP_E_PARAMNOTOPTIONAL"), + static_cast<XInterface*>(static_cast<XWeak*>(this)), + TypeClass_UNKNOWN, FailReason::NO_DEFAULT_AVAILABLE, uArgErr); + break; + default: + throw RuntimeException(); + break; + } + } + + return aResult; +} + +::sal_Bool SAL_CALL IUnknownWrapper_Impl::hasMember( const ::rtl::OUString& aName ) + throw (uno::RuntimeException) +{ + if ( ! m_spDispatch ) + { + throw RuntimeException( + OUSTR("[automation bridge] The object does not have an IDispatch interface"), + Reference<XInterface>()); + } + + o2u_attachCurrentThread(); + DISPID dispid; + return getDispid( aName, &dispid ); +} + + // UnoConversionUtilities -------------------------------------------------------------------------------- Reference< XInterface > IUnknownWrapper_Impl::createUnoWrapperInstance() { @@ -1591,22 +1860,6 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(const OUString& sFuncName, throw IllegalArgumentException( buf.makeStringAndClear(), Reference<XInterface>(), (sal_Int16) i); } - //make sure we get no void any for an in parameter. In StarBasic - //this may be caused by - // Dim arg - // obj.func(arg) - //A void any is allowed if the parameter is optional - if ( ! (aFuncDesc->lprgelemdescParam[i].paramdesc.wParamFlags & PARAMFLAG_FOPT) - && (i < nUnoArgs) && (paramFlags & PARAMFLAG_FIN) && - Params.getConstArray()[i].getValueTypeClass() == TypeClass_VOID) - { - OUStringBuffer buf(256); - buf.appendAscii("ole automation bridge: The argument at position: "); - buf.append(OUString::valueOf((sal_Int32) i)); - buf.appendAscii(" (index starts with 0) is uninitialized."); - throw IllegalArgumentException( buf.makeStringAndClear(), - Reference<XInterface>(), (sal_Int16) i); - } // Property Put arguments if (anyArg.getValueType() == getCppuType((PropertyPutArgument*)0)) @@ -1719,12 +1972,16 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(const OUString& sFuncName, & aFuncDesc->lprgelemdescParam[i].paramdesc. pparamdescex->varDefaultValue); } - else + else if (paramFlags & PARAMFLAG_FOPT) { - OSL_ASSERT(paramFlags & PARAMFLAG_FOPT); arArgs[revIndex].vt = VT_ERROR; arArgs[revIndex].scode = DISP_E_PARAMNOTFOUND; } + else + { + arArgs[revIndex].vt = VT_EMPTY; + arArgs[revIndex].lVal = 0; + } } } } diff --git a/extensions/source/ole/oleobjw.hxx b/extensions/source/ole/oleobjw.hxx index 334fb18e5..8635a9d12 100644 --- a/extensions/source/ole/oleobjw.hxx +++ b/extensions/source/ole/oleobjw.hxx @@ -50,7 +50,7 @@ #endif #include <cppuhelper/implbase3.hxx> #include <cppuhelper/implbase4.hxx> -#include <cppuhelper/implbase6.hxx> +#include <cppuhelper/implbase7.hxx> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/bridge/oleautomation/XAutomationObject.hpp> @@ -58,6 +58,7 @@ #include <com/sun/star/script/XDefaultProperty.hpp> #include <com/sun/star/script/XDefaultMethod.hpp> +#include <com/sun/star/script/XDirectInvocation.hpp> #include <typelib/typedescription.hxx> #include "unoconversionutilities.hxx" @@ -81,7 +82,7 @@ typedef hash_multimap<OUString, unsigned int, hashOUString_Impl, equalOUString_I // This class wraps an IDispatch and maps XInvocation calls to IDispatch calls on the wrapped object. // If m_TypeDescription is set then this class represents an UNO interface implemented in a COM component. // The interface is not a real interface in terms of an abstract class but is realized through IDispatch. -class IUnknownWrapper_Impl : public WeakImplHelper6<XInvocation, XBridgeSupplier2, XInitialization, XAutomationObject, XDefaultProperty, XDefaultMethod>, +class IUnknownWrapper_Impl : public WeakImplHelper7< XInvocation, XBridgeSupplier2, XInitialization, XAutomationObject, XDefaultProperty, XDefaultMethod, XDirectInvocation >, public UnoConversionUtilities<IUnknownWrapper_Impl> @@ -130,10 +131,18 @@ public: // XInitialization virtual void SAL_CALL initialize( const Sequence< Any >& aArguments ) throw(Exception, RuntimeException); + + // XDefaultProperty virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (::com::sun::star::uno::RuntimeException) { return m_sDefaultMember; } -protected: + + // XDefaultMethod virtual ::rtl::OUString SAL_CALL getDefaultMethodName( ) throw (::com::sun::star::uno::RuntimeException) { return m_sDefaultMember; } + // XDirectInvocation + virtual ::com::sun::star::uno::Any SAL_CALL directInvoke( const ::rtl::OUString& aName, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aParams ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::script::CannotConvertException, ::com::sun::star::reflection::InvocationTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL hasMember( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); + +protected: // ---------------------------------------------------------------------------- virtual Any invokeWithDispIdUnoTlb(const OUString& sFunctionName, const Sequence< Any >& Params, diff --git a/extensions/source/ole/servreg.cxx b/extensions/source/ole/servreg.cxx index a0bd98e33..f43b4f6bf 100644 --- a/extensions/source/ole/servreg.cxx +++ b/extensions/source/ole/servreg.cxx @@ -119,47 +119,6 @@ extern "C" void * SAL_CALL component_getFactory( } -extern "C" sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - //deprecated - Reference<XRegistryKey> xNewKey = - reinterpret_cast<XRegistryKey*>( pRegistryKey)->createKey(reinterpret_cast<const sal_Unicode*>(L"/com.sun.star.comp.ole.OleConverter2/UNO/SERVICES")); - xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.OleBridgeSupplier2")); - - xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.oleautomation.BridgeSupplier")); - - //deprecated - xNewKey = - reinterpret_cast<XRegistryKey*>( pRegistryKey)->createKey(reinterpret_cast<const sal_Unicode*>(L"/com.sun.star.comp.ole.OleConverterVar1/UNO/SERVICES")); - xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.OleBridgeSupplierVar1")); - - //deprecated - xNewKey = - reinterpret_cast<XRegistryKey*>( pRegistryKey)->createKey(reinterpret_cast<const sal_Unicode*>(L"/com.sun.star.comp.ole.OleClient/UNO/SERVICES")); - xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.OleObjectFactory")); - - xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.oleautomation.Factory")); - //deprecated - xNewKey = - reinterpret_cast<XRegistryKey*>( pRegistryKey)->createKey(reinterpret_cast<const sal_Unicode*>(L"/com.sun.star.comp.ole.OleServer/UNO/SERVICES")); - xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.OleApplicationRegistration")); - - xNewKey->createKey(reinterpret_cast<const sal_Unicode*>(L"com.sun.star.bridge.oleautomation.ApplicationRegistration")); - - return sal_True; - } - catch (InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; -} - extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { diff --git a/extensions/source/oooimprovecore/makefile.mk b/extensions/source/oooimprovecore/makefile.mk index 97e130c3a..f92804dbf 100644 --- a/extensions/source/oooimprovecore/makefile.mk +++ b/extensions/source/oooimprovecore/makefile.mk @@ -75,3 +75,11 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map .INCLUDE : target.mk + +ALLTAR : $(MISC)/oooimprovecore.component + +$(MISC)/oooimprovecore.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt oooimprovecore.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt oooimprovecore.component diff --git a/extensions/source/oooimprovecore/oooimprovecore.component b/extensions/source/oooimprovecore/oooimprovecore.component new file mode 100644 index 000000000..58bdaf37c --- /dev/null +++ b/extensions/source/oooimprovecore/oooimprovecore.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.extensions.oooimprovecore.Core"> + <service name="com.sun.star.oooimprovement.Core"/> + </implementation> +</component> diff --git a/extensions/source/oooimprovement/invite_job.cxx b/extensions/source/oooimprovement/invite_job.cxx index 77cef48ce..74204cdb2 100644 --- a/extensions/source/oooimprovement/invite_job.cxx +++ b/extensions/source/oooimprovement/invite_job.cxx @@ -121,7 +121,7 @@ namespace oooimprovement Sequence<OUString> SAL_CALL InviteJob::getSupportedServiceNames_static() { Sequence<OUString> aServiceNames(1); - aServiceNames[0] = OUString::createFromAscii("com.sun.star.task.XAsyncJob"); + aServiceNames[0] = OUString::createFromAscii("com.sun.star.task.AsyncJob"); return aServiceNames; } diff --git a/extensions/source/oooimprovement/makefile.mk b/extensions/source/oooimprovement/makefile.mk index 6e5d7ab0d..16e3f12f1 100644 --- a/extensions/source/oooimprovement/makefile.mk +++ b/extensions/source/oooimprovement/makefile.mk @@ -102,3 +102,11 @@ $(SPOOLDIR)$/$(PACKAGEDIR)$/Jobs$/Jobs-oooimprovement.xcu : $(XCU_SOURCEDIR)$/Jo $(SPOOLDIR)$/$(PACKAGEDIR)$/Logging$/Logging-oooimprovement.xcu : $(XCU_SOURCEDIR)$/Logging.xcu @-$(MKDIRHIER) $(@:d) @$(COPY) $< $@ + +ALLTAR : $(MISC)/oooimprovement.component + +$(MISC)/oooimprovement.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt oooimprovement.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt oooimprovement.component diff --git a/extensions/source/oooimprovement/onlogrotate_job.cxx b/extensions/source/oooimprovement/onlogrotate_job.cxx index fa497f62f..42dc001ed 100644 --- a/extensions/source/oooimprovement/onlogrotate_job.cxx +++ b/extensions/source/oooimprovement/onlogrotate_job.cxx @@ -223,7 +223,7 @@ namespace oooimprovement Sequence<OUString> SAL_CALL OnLogRotateJob::getSupportedServiceNames_static() { Sequence<OUString> aServiceNames(1); - aServiceNames[0] = OUString::createFromAscii("com.sun.star.task.XAsyncJob"); + aServiceNames[0] = OUString::createFromAscii("com.sun.star.task.AsyncJob"); return aServiceNames; } diff --git a/extensions/source/oooimprovement/oooimprovement.component b/extensions/source/oooimprovement/oooimprovement.component new file mode 100644 index 000000000..e133f932c --- /dev/null +++ b/extensions/source/oooimprovement/oooimprovement.component @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation + name="com.sun.star.comp.extensions.oooimprovement.CoreController"> + <service name="com.sun.star.oooimprovement.CoreController"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.oooimprovement.InviteJob"/> + <implementation + name="com.sun.star.comp.extensions.oooimprovement.OnLogRotateJob"/> +</component> diff --git a/extensions/source/oooimprovement/oooimprovement_exports.cxx b/extensions/source/oooimprovement/oooimprovement_exports.cxx index e073088a5..13eb763e1 100644 --- a/extensions/source/oooimprovement/oooimprovement_exports.cxx +++ b/extensions/source/oooimprovement/oooimprovement_exports.cxx @@ -65,28 +65,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(const sal_Char** env_type_name, uno_Environment**) { *env_type_name = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo(void*, void* p_reg_key) - { - if (!p_reg_key) return sal_False; - try - { - Reference<XRegistryKey> reg_key(reinterpret_cast<XRegistryKey*>(p_reg_key), UNO_QUERY); - writeInfo(reg_key, - CoreController::getImplementationName_static(), - CoreController::getSupportedServiceNames_static()[0]); - writeInfo(reg_key, - OnLogRotateJob::getImplementationName_static(), - OnLogRotateJob::getSupportedServiceNames_static()[0]); - writeInfo(reg_key, - InviteJob::getImplementationName_static(), - InviteJob::getSupportedServiceNames_static()[0]); - return sal_True; - } - catch(const InvalidRegistryException&) - { OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); } - return sal_False; - } - void* SAL_CALL component_getFactory(const sal_Char* pImplName, void* pServiceManager, void*) { if ( !pServiceManager || !pImplName ) return 0; diff --git a/extensions/source/plugin/base/service.cxx b/extensions/source/plugin/base/service.cxx index 3a4b8b78e..eabefd4c4 100644 --- a/extensions/source/plugin/base/service.cxx +++ b/extensions/source/plugin/base/service.cxx @@ -54,33 +54,6 @@ extern "C" { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pXUnoKey ) - { - if( pXUnoKey ) - { - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey( reinterpret_cast< ::com::sun::star::registry::XRegistryKey* >( pXUnoKey ) ); - - ::rtl::OUString aImplName = ::rtl::OUString::createFromAscii( "/" ); - aImplName += XPluginManager_Impl::getImplementationName_Static(); - aImplName += ::rtl::OUString::createFromAscii( "/UNO/SERVICES/com.sun.star.plugin.PluginManager" ); - xKey->createKey( aImplName ); - - aImplName = ::rtl::OUString::createFromAscii( "/" ); - aImplName += PluginModel::getImplementationName_Static(); - aImplName += ::rtl::OUString::createFromAscii( "/UNO/SERVICES/com.sun.star.plugin.PluginModel" ); - xKey->createKey( aImplName ); - - return sal_True; - } - catch( ::com::sun::star::registry::InvalidRegistryException& ) - { - } - } - return sal_False; - } - void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pXUnoSMgr, diff --git a/extensions/source/plugin/util/makefile.mk b/extensions/source/plugin/util/makefile.mk index 7a8c46c01..765941689 100644 --- a/extensions/source/plugin/util/makefile.mk +++ b/extensions/source/plugin/util/makefile.mk @@ -107,3 +107,11 @@ SHL1STDLIBS+=$(SHL1OWNLIBS) + +ALLTAR : $(MISC)/pl.component + +$(MISC)/pl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + pl.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt pl.component diff --git a/extensions/source/plugin/util/pl.component b/extensions/source/plugin/util/pl.component new file mode 100644 index 000000000..4a9d98f7d --- /dev/null +++ b/extensions/source/plugin/util/pl.component @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.extensions.PluginManager"> + <service name="com.sun.star.plugin.PluginManager"/> + </implementation> + <implementation name="com.sun.star.extensions.PluginModel"> + <service name="com.sun.star.plugin.PluginModel"/> + </implementation> +</component> diff --git a/extensions/source/preload/makefile.mk b/extensions/source/preload/makefile.mk index fb11a2bfd..8bd622661 100644 --- a/extensions/source/preload/makefile.mk +++ b/extensions/source/preload/makefile.mk @@ -83,3 +83,11 @@ DEF1NAME= $(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/preload.component + +$(MISC)/preload.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + preload.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt preload.component diff --git a/extensions/source/preload/preload.component b/extensions/source/preload/preload.component new file mode 100644 index 000000000..56a8a0d7a --- /dev/null +++ b/extensions/source/preload/preload.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="org.openoffice.comp.preload.OEMPreloadWizard"> + <service name="org.openoffice.comp.preload.OEMPreloadWizard"/> + </implementation> +</component> diff --git a/extensions/source/preload/preload.src b/extensions/source/preload/preload.src index 301e489cd..17ccbf8b4 100644 --- a/extensions/source/preload/preload.src +++ b/extensions/source/preload/preload.src @@ -31,6 +31,7 @@ ModalDialog RID_DLG_OEMWIZARD { + HelpID = "extensions:ModalDialog:RID_DLG_OEMWIZARD"; Text = "%PRODUCTNAME %PRODUCTVERSION"; OutputSize = TRUE ; @@ -40,11 +41,13 @@ ModalDialog RID_DLG_OEMWIZARD Hide = TRUE; PushButton PB_PREV { + HelpID = "extensions:PushButton:RID_DLG_OEMWIZARD:PB_PREV"; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "<< Back" ; }; PushButton PB_NEXT { + HelpID = "extensions:PushButton:RID_DLG_OEMWIZARD:PB_NEXT"; Size = MAP_APPFONT ( 50 , 14 ) ; Text [ en-US ] = "Next >>" ; }; @@ -72,6 +75,7 @@ ModalDialog RID_DLG_OEMWIZARD }; TabPage RID_TP_WELCOME { + HelpID = "extensions:TabPage:RID_TP_WELCOME"; // HelpId = ; OutputSize = TRUE ; SVLook = TRUE ; @@ -130,6 +134,7 @@ TabPage RID_TP_WELCOME TabPage RID_TP_LICENSE { + HelpID = "extensions:TabPage:RID_TP_LICENSE"; OutputSize = TRUE ; SVLook = TRUE ; Hide = TRUE ; @@ -138,6 +143,7 @@ TabPage RID_TP_LICENSE MultiLineEdit ML_LICENSE { + HelpID = "extensions:MultiLineEdit:RID_TP_LICENSE:ML_LICENSE"; PosSize = MAP_APPFONT ( LICENSE_COL_1 , LICENSE_ROW_1 , LICENSE_WIDTH , LICENCE_HEIGHT ) ; Border = TRUE ; VScroll = TRUE ; @@ -185,6 +191,7 @@ TabPage RID_TP_LICENSE PushButton PB_PAGEDOWN { + HelpID = "extensions:PushButton:RID_TP_LICENSE:PB_PAGEDOWN"; TabStop = TRUE ; Pos = MAP_APPFONT ( LICENSE_COL_4 , LICENSE_ROW_3 ) ; Size = MAP_APPFONT ( PD_WIDTH , PB_HEIGHT ) ; @@ -209,6 +216,7 @@ TabPage RID_TP_LICENSE CheckBox CB_ACCEPT { + HelpID = "extensions:CheckBox:RID_TP_LICENSE:CB_ACCEPT"; TabStop = TRUE ; Pos = MAP_APPFONT ( LICENSE_COL_3, LICENSE_ROW_5 ) ; Size = MAP_APPFONT ( COL3_WIDTH, FT_HEIGHT ) ; diff --git a/extensions/source/preload/services.cxx b/extensions/source/preload/services.cxx index b5ef9ceeb..d35c3d1ed 100644 --- a/extensions/source/preload/services.cxx +++ b/extensions/source/preload/services.cxx @@ -66,27 +66,6 @@ component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - return ::preload::OModule::writeComponentInfos( - static_cast<XMultiServiceFactory*>(pServiceManager), - static_cast<XRegistryKey*>(pRegistryKey)); - } - catch (InvalidRegistryException& ) - { - OSL_ASSERT("preload::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx index bbff22638..07516e1bd 100644 --- a/extensions/source/propctrlr/browserline.cxx +++ b/extensions/source/propctrlr/browserline.cxx @@ -105,20 +105,20 @@ namespace pcr } //------------------------------------------------------------------ - void OBrowserLine::SetComponentHelpIds( const SmartId& _rHelpId, sal_uInt32 _bPrimaryButtonId, sal_uInt32 _nSecondaryButtonId ) + void OBrowserLine::SetComponentHelpIds( const rtl::OString& _rHelpId, const rtl::OString& _sPrimaryButtonId, const rtl::OString& _sSecondaryButtonId ) { if ( m_pControlWindow ) - m_pControlWindow->SetSmartHelpId( _rHelpId ); + m_pControlWindow->SetHelpId( _rHelpId ); if ( m_pBrowseButton ) { - m_pBrowseButton->SetSmartHelpId( _rHelpId ); - m_pBrowseButton->SetUniqueId( _bPrimaryButtonId ); + m_pBrowseButton->SetHelpId( _rHelpId ); + m_pBrowseButton->SetUniqueId( _sPrimaryButtonId ); if ( m_pAdditionalBrowseButton ) { - m_pAdditionalBrowseButton->SetSmartHelpId( _rHelpId ); - m_pAdditionalBrowseButton->SetUniqueId( _nSecondaryButtonId ); + m_pAdditionalBrowseButton->SetHelpId( _rHelpId ); + m_pAdditionalBrowseButton->SetUniqueId( _sSecondaryButtonId ); } } } diff --git a/extensions/source/propctrlr/browserline.hxx b/extensions/source/propctrlr/browserline.hxx index bd2aa9a5e..5dd27349c 100644 --- a/extensions/source/propctrlr/browserline.hxx +++ b/extensions/source/propctrlr/browserline.hxx @@ -92,7 +92,7 @@ namespace pcr const ::rtl::OUString& GetEntryName() const { return m_sEntryName; } - void SetComponentHelpIds( const SmartId& _rHelpId, sal_uInt32 _bPrimaryButtonId, sal_uInt32 _nSecondaryButtonId ); + void SetComponentHelpIds( const rtl::OString& _rHelpId, const rtl::OString& _sPrimaryButtonId, const rtl::OString& _sSecondaryButtonId ); void SetTitle(const String& rString ); void FullFillTitleString(); diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index bee29a21e..c64375903 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -1196,8 +1196,8 @@ namespace pcr m_aOutOfDateLines.insert( nPos ); rLine.pLine->SetComponentHelpIds( HelpIdUrl::getHelpId( _rPropertyData.HelpURL ), - _rPropertyData.PrimaryButtonId, - _rPropertyData.SecondaryButtonId + rtl::OUStringToOString( _rPropertyData.PrimaryButtonId, RTL_TEXTENCODING_UTF8 ), + rtl::OUStringToOString( _rPropertyData.SecondaryButtonId, RTL_TEXTENCODING_UTF8 ) ); if ( _rPropertyData.bReadOnly ) diff --git a/extensions/source/propctrlr/defaultforminspection.cxx b/extensions/source/propctrlr/defaultforminspection.cxx index 2fab07761..1971138df 100644 --- a/extensions/source/propctrlr/defaultforminspection.cxx +++ b/extensions/source/propctrlr/defaultforminspection.cxx @@ -187,7 +187,7 @@ namespace pcr { const sal_Char* programmaticName; USHORT uiNameResId; - sal_uInt32 helpId; + const sal_Char* helpId; } aCategories[] = { { "General", RID_STR_PROPPAGE_DEFAULT, HID_FM_PROPDLG_TAB_GENERAL }, { "Data", RID_STR_PROPPAGE_DATA, HID_FM_PROPDLG_TAB_DATA }, diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index 588480a7b..f88aa3928 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -454,12 +454,12 @@ namespace pcr } break; - case PROPERTY_ID_BIND_EXPRESSION: aDescriptor.PrimaryButtonId = UID_PROP_DLG_BIND_EXPRESSION; break; - case PROPERTY_ID_XSD_REQUIRED: aDescriptor.PrimaryButtonId = UID_PROP_DLG_XSD_REQUIRED; break; - case PROPERTY_ID_XSD_RELEVANT: aDescriptor.PrimaryButtonId = UID_PROP_DLG_XSD_RELEVANT; break; - case PROPERTY_ID_XSD_READONLY: aDescriptor.PrimaryButtonId = UID_PROP_DLG_XSD_READONLY; break; - case PROPERTY_ID_XSD_CONSTRAINT: aDescriptor.PrimaryButtonId = UID_PROP_DLG_XSD_CONSTRAINT; break; - case PROPERTY_ID_XSD_CALCULATION: aDescriptor.PrimaryButtonId = UID_PROP_DLG_XSD_CALCULATION; break; + case PROPERTY_ID_BIND_EXPRESSION: aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_BIND_EXPRESSION); break; + case PROPERTY_ID_XSD_REQUIRED: aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_XSD_REQUIRED); break; + case PROPERTY_ID_XSD_RELEVANT: aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_XSD_RELEVANT); break; + case PROPERTY_ID_XSD_READONLY: aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_XSD_READONLY); break; + case PROPERTY_ID_XSD_CONSTRAINT: aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_XSD_CONSTRAINT); break; + case PROPERTY_ID_XSD_CALCULATION: aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_XSD_CALCULATION); break; default: DBG_ERROR( "EFormsPropertyHandler::describePropertyLine: cannot handle this property!" ); diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index 253315f4e..5235ba1d2 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -151,11 +151,11 @@ namespace pcr //= EventDescription //==================================================================== EventDescription::EventDescription( EventId _nId, const sal_Char* _pListenerNamespaceAscii, const sal_Char* _pListenerClassAsciiName, - const sal_Char* _pListenerMethodAsciiName, sal_uInt16 _nDisplayNameResId, sal_Int32 _nHelpId, sal_Int32 _nUniqueBrowseId ) + const sal_Char* _pListenerMethodAsciiName, sal_uInt16 _nDisplayNameResId, const rtl::OString& _sHelpId, const rtl::OString& _sUniqueBrowseId ) :sDisplayName( String( PcrRes( _nDisplayNameResId ) ) ) ,sListenerMethodName( ::rtl::OUString::createFromAscii( _pListenerMethodAsciiName ) ) - ,nHelpId( _nHelpId ) - ,nUniqueBrowseId( _nUniqueBrowseId ) + ,sHelpId( _sHelpId ) + ,sUniqueBrowseId( _sUniqueBrowseId ) ,nId( _nId ) { ::rtl::OUStringBuffer aQualifiedListenerClass; @@ -879,8 +879,8 @@ namespace pcr const EventDescription& rEvent = impl_getEventForName_throw( _rPropertyName ); aDescriptor.DisplayName = rEvent.sDisplayName; - aDescriptor.HelpURL = HelpIdUrl::getHelpURL( rEvent.nHelpId ); - aDescriptor.PrimaryButtonId = rEvent.nUniqueBrowseId; + aDescriptor.HelpURL = HelpIdUrl::getHelpURL( rEvent.sHelpId ); + aDescriptor.PrimaryButtonId = rtl::OStringToOUString(rEvent.sUniqueBrowseId, RTL_TEXTENCODING_UTF8); aDescriptor.HasPrimaryButton = sal_True; aDescriptor.Category = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Events" ) ); return aDescriptor; @@ -1265,12 +1265,12 @@ namespace pcr switch ( m_nGridColumnType ) { case FormComponentType::COMBOBOX: - if ( UID_BRWEVT_ACTIONPERFORMED == _rEvent.nUniqueBrowseId ) + if ( UID_BRWEVT_ACTIONPERFORMED == _rEvent.sUniqueBrowseId ) return false; break; case FormComponentType::LISTBOX: - if ( ( UID_BRWEVT_CHANGED == _rEvent.nUniqueBrowseId ) - || ( UID_BRWEVT_ACTIONPERFORMED == _rEvent.nUniqueBrowseId ) + if ( ( UID_BRWEVT_CHANGED == _rEvent.sUniqueBrowseId ) + || ( UID_BRWEVT_ACTIONPERFORMED == _rEvent.sUniqueBrowseId ) ) return false; break; diff --git a/extensions/source/propctrlr/eventhandler.hxx b/extensions/source/propctrlr/eventhandler.hxx index 437ee464b..f1561d242 100644 --- a/extensions/source/propctrlr/eventhandler.hxx +++ b/extensions/source/propctrlr/eventhandler.hxx @@ -57,14 +57,12 @@ namespace pcr ::rtl::OUString sDisplayName; ::rtl::OUString sListenerClassName; ::rtl::OUString sListenerMethodName; - sal_Int32 nHelpId; - sal_Int32 nUniqueBrowseId; + ::rtl::OString sHelpId; + ::rtl::OString sUniqueBrowseId; EventId nId; - EventDescription() - :nHelpId( 0 ) - ,nUniqueBrowseId( 0 ) - ,nId( 0 ) + EventDescription() + :nId( 0 ) { } @@ -74,8 +72,8 @@ namespace pcr const sal_Char* _pListenerClassAsciiName, const sal_Char* _pListenerMethodAsciiName, sal_uInt16 _nDisplayNameResId, - sal_Int32 _nHelpId, - sal_Int32 _nUniqueBrowseId ); + const rtl::OString& _sHelpId, + const rtl::OString& _sUniqueBrowseId ); }; typedef ::std::hash_map< ::rtl::OUString, EventDescription, ::rtl::OUStringHash > EventMap; diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 97d72dad1..ec7c6d557 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -1023,39 +1023,39 @@ namespace pcr { case PROPERTY_ID_DEFAULT_SELECT_SEQ: case PROPERTY_ID_SELECTEDITEMS: - aDescriptor.PrimaryButtonId = UID_PROP_DLG_SELECTION; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_SELECTION); break; case PROPERTY_ID_FILTER: - aDescriptor.PrimaryButtonId = UID_PROP_DLG_FILTER; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_FILTER); break; case PROPERTY_ID_SORT: - aDescriptor.PrimaryButtonId = UID_PROP_DLG_ORDER; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_ORDER); break; case PROPERTY_ID_MASTERFIELDS: case PROPERTY_ID_DETAILFIELDS: nControlType = PropertyControlType::StringListField; - aDescriptor.PrimaryButtonId = UID_PROP_DLG_FORMLINKFIELDS; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_FORMLINKFIELDS); break; case PROPERTY_ID_COMMAND: - aDescriptor.PrimaryButtonId = UID_PROP_DLG_SQLCOMMAND; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_SQLCOMMAND); break; case PROPERTY_ID_TABINDEX: { Reference< XControlContainer > xControlContext( impl_getContextControlContainer_nothrow() ); if ( xControlContext.is() ) - aDescriptor.PrimaryButtonId = UID_PROP_DLG_TABINDEX; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_TABINDEX); nControlType = PropertyControlType::NumericField; }; break; case PROPERTY_ID_FONT: bReadOnly = sal_True; - aDescriptor.PrimaryButtonId = UID_PROP_DLG_FONT_TYPE; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_FONT_TYPE); break; case PROPERTY_ID_TARGET_URL: @@ -1063,8 +1063,8 @@ namespace pcr { aDescriptor.Control = new OFileUrlControl( impl_getDefaultDialogParent_nothrow(), WB_TABSTOP | WB_BORDER ); - aDescriptor.PrimaryButtonId = ( PROPERTY_ID_TARGET_URL == nPropId ) - ? UID_PROP_DLG_ATTR_TARGET_URL : UID_PROP_DLG_IMAGE_URL; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(( PROPERTY_ID_TARGET_URL == nPropId ) + ? UID_PROP_DLG_ATTR_TARGET_URL : UID_PROP_DLG_IMAGE_URL); } break; @@ -1081,13 +1081,13 @@ namespace pcr switch( nPropId ) { case PROPERTY_ID_BACKGROUNDCOLOR: - aDescriptor.PrimaryButtonId = UID_PROP_DLG_BACKGROUNDCOLOR; break; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_BACKGROUNDCOLOR); break; case PROPERTY_ID_FILLCOLOR: - aDescriptor.PrimaryButtonId = UID_PROP_DLG_FILLCOLOR; break; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_FILLCOLOR); break; case PROPERTY_ID_SYMBOLCOLOR: - aDescriptor.PrimaryButtonId = UID_PROP_DLG_SYMBOLCOLOR; break; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_SYMBOLCOLOR); break; case PROPERTY_ID_BORDERCOLOR: - aDescriptor.PrimaryButtonId = UID_PROP_DLG_BORDERCOLOR; break; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_BORDERCOLOR); break; } break; @@ -1111,7 +1111,7 @@ namespace pcr case PROPERTY_ID_CONTROLLABEL: bReadOnly = sal_True; - aDescriptor.PrimaryButtonId = UID_PROP_DLG_CONTROLLABEL; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_CONTROLLABEL); break; case PROPERTY_ID_FORMATKEY: @@ -1141,7 +1141,7 @@ namespace pcr aDescriptor.Control = pControl; pControl->SetFormatSupplier( pSupplier ); - aDescriptor.PrimaryButtonId = UID_PROP_DLG_NUMBER_FORMAT; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_NUMBER_FORMAT); } else { @@ -1342,7 +1342,7 @@ namespace pcr if ( nPropId == PROPERTY_ID_MAXTEXTLEN ) aMinValue.Value = -1; - else if ( ( nPropId == PROPERTY_ID_BOUNDCOLUMN ) || ( nPropId == PROPERTY_ID_VISIBLESIZE ) ) + else if ( nPropId == PROPERTY_ID_VISIBLESIZE ) aMinValue.Value = 1; else aMinValue.Value = 0; @@ -1366,7 +1366,7 @@ namespace pcr // DataSource case PROPERTY_ID_DATASOURCE: { - aDescriptor.PrimaryButtonId = UID_PROP_DLG_ATTR_DATASOURCE; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_ATTR_DATASOURCE); ::std::vector< ::rtl::OUString > aListEntries; @@ -1416,7 +1416,7 @@ namespace pcr } } - if ( aDescriptor.PrimaryButtonId ) + if ( aDescriptor.PrimaryButtonId.getLength() ) aDescriptor.HasPrimaryButton = sal_True; if ( aDescriptor.SecondaryButtonId ) aDescriptor.HasSecondaryButton = sal_True; @@ -2471,7 +2471,7 @@ namespace pcr _out_rProperty.DisplayName = m_pInfoService->getPropertyTranslation( PROPERTY_ID_COMMAND ); _out_rProperty.HelpURL = HelpIdUrl::getHelpURL( m_pInfoService->getPropertyHelpId( PROPERTY_ID_COMMAND ) ); - _out_rProperty.PrimaryButtonId = UID_PROP_DLG_SQLCOMMAND; + _out_rProperty.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_DLG_SQLCOMMAND); //////////////////////////////////////////////////////////// sal_Int32 nCommandType = CommandType::COMMAND; diff --git a/extensions/source/propctrlr/formlinkdialog.src b/extensions/source/propctrlr/formlinkdialog.src index ca936a58d..db0ef08d6 100644 --- a/extensions/source/propctrlr/formlinkdialog.src +++ b/extensions/source/propctrlr/formlinkdialog.src @@ -35,6 +35,7 @@ ModalDialog RID_DLG_FORMLINKS { + HelpID = "extensions:ModalDialog:RID_DLG_FORMLINKS"; OutputSize = TRUE ; Moveable = TRUE ; Closeable = TRUE ; @@ -133,6 +134,7 @@ ModalDialog RID_DLG_FORMLINKS PushButton PB_SUGGEST { + HelpID = "extensions:PushButton:RID_DLG_FORMLINKS:PB_SUGGEST"; Pos = MAP_APPFONT( 199, 90 ); Size = MAP_APPFONT( 50, 14 ); TabStop = TRUE; diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx index f6ab37e3f..31a1cda41 100644 --- a/extensions/source/propctrlr/formmetadata.cxx +++ b/extensions/source/propctrlr/formmetadata.cxx @@ -57,7 +57,7 @@ namespace pcr { String sName; String sTranslation; - sal_uInt32 nHelpId; + rtl::OString sHelpId; sal_Int32 nId; sal_uInt16 nPos; sal_uInt32 nUIFlags; @@ -67,16 +67,16 @@ namespace pcr sal_Int32 _nId, const String& aTranslation, sal_uInt16 nPosId, - sal_uInt32 nHelpId, + const rtl::OString&, sal_uInt32 _nUIFlags); }; //------------------------------------------------------------------------ OPropertyInfoImpl::OPropertyInfoImpl(const ::rtl::OUString& _rName, sal_Int32 _nId, - const String& aString, sal_uInt16 nP, sal_uInt32 nHid, sal_uInt32 _nUIFlags) + const String& aString, sal_uInt16 nP, const rtl::OString& sHid, sal_uInt32 _nUIFlags) :sName(_rName) ,sTranslation(aString) - ,nHelpId(nHid) + ,sHelpId(sHid) ,nId(_nId) ,nPos(nP) ,nUIFlags(_nUIFlags) @@ -399,10 +399,10 @@ namespace pcr } //------------------------------------------------------------------------ - sal_Int32 OPropertyInfoService::getPropertyHelpId(sal_Int32 _nId) const + rtl::OString OPropertyInfoService::getPropertyHelpId(sal_Int32 _nId) const { const OPropertyInfoImpl* pInfo = getPropertyInfo(_nId); - return (pInfo) ? pInfo->nHelpId : 0; + return (pInfo) ? pInfo->sHelpId : rtl::OString(); } //------------------------------------------------------------------------ @@ -560,7 +560,7 @@ namespace pcr // intialisierung if(!s_pPropertyInfos) getPropertyInfo(); - OPropertyInfoImpl aSearch(_rName, 0L, String(), 0, 0, 0); + OPropertyInfoImpl aSearch(_rName, 0L, String(), 0, "", 0); const OPropertyInfoImpl* pInfo = ::std::lower_bound( s_pPropertyInfos, s_pPropertyInfos + s_nCount, aSearch, PropertyInfoLessByName() ); diff --git a/extensions/source/propctrlr/formmetadata.hxx b/extensions/source/propctrlr/formmetadata.hxx index e5413f297..a7ff622d1 100644 --- a/extensions/source/propctrlr/formmetadata.hxx +++ b/extensions/source/propctrlr/formmetadata.hxx @@ -59,7 +59,7 @@ namespace pcr // IPropertyInfoService virtual sal_Int32 getPropertyId(const String& _rName) const; virtual String getPropertyTranslation(sal_Int32 _nId) const; - virtual sal_Int32 getPropertyHelpId(sal_Int32 _nId) const; + virtual rtl::OString getPropertyHelpId(sal_Int32 _nId) const; virtual sal_Int16 getPropertyPos(sal_Int32 _nId) const; virtual sal_uInt32 getPropertyUIFlags(sal_Int32 _nId) const; virtual ::std::vector< ::rtl::OUString > getPropertyEnumRepresentations(sal_Int32 _nId) const; diff --git a/extensions/source/propctrlr/listselectiondlg.src b/extensions/source/propctrlr/listselectiondlg.src index 7b148e8a9..c2cae7ab0 100644 --- a/extensions/source/propctrlr/listselectiondlg.src +++ b/extensions/source/propctrlr/listselectiondlg.src @@ -35,6 +35,7 @@ ModalDialog RID_DLG_SELECTION { + HelpID = "extensions:ModalDialog:RID_DLG_SELECTION"; OutputSize = TRUE ; Moveable = TRUE ; Closeable = TRUE ; @@ -49,6 +50,7 @@ ModalDialog RID_DLG_SELECTION ListBox LB_ENTRIES { + HelpID = "extensions:ListBox:RID_DLG_SELECTION:LB_ENTRIES"; Pos = MAP_APPFONT( 6, 17 ); Size = MAP_APPFONT( 85, 97 ); diff --git a/extensions/source/propctrlr/makefile.mk b/extensions/source/propctrlr/makefile.mk index c69f47bce..ebb629ae3 100644 --- a/extensions/source/propctrlr/makefile.mk +++ b/extensions/source/propctrlr/makefile.mk @@ -144,3 +144,11 @@ DEF1NAME= $(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/pcr.component + +$(MISC)/pcr.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + pcr.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt pcr.component diff --git a/extensions/source/propctrlr/newdatatype.src b/extensions/source/propctrlr/newdatatype.src index 6cf39a322..90be27153 100644 --- a/extensions/source/propctrlr/newdatatype.src +++ b/extensions/source/propctrlr/newdatatype.src @@ -39,6 +39,7 @@ ModalDialog RID_DLG_NEW_DATA_TYPE { + HelpID = "extensions:ModalDialog:RID_DLG_NEW_DATA_TYPE"; OutputSize = TRUE ; Moveable = TRUE ; Closeable = TRUE ; @@ -57,6 +58,7 @@ ModalDialog RID_DLG_NEW_DATA_TYPE Edit ED_NAME { + HelpID = "extensions:Edit:RID_DLG_NEW_DATA_TYPE:ED_NAME"; Pos = MAP_APPFONT( 6, 17 ); Size = MAP_APPFONT( DIALOG_WIDTH - 2 * 6, 12 ); Border = TRUE; diff --git a/extensions/source/propctrlr/pcr.component b/extensions/source/propctrlr/pcr.component new file mode 100644 index 000000000..2b606cc01 --- /dev/null +++ b/extensions/source/propctrlr/pcr.component @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="StringRepresentation"> + <service name="com.sun.star.inspection.StringRepresentation"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.ButtonNavigationHandler"> + <service name="com.sun.star.form.inspection.ButtonNavigationHandler"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.CellBindingPropertyHandler"> + <service name="com.sun.star.form.inspection.CellBindingPropertyHandler"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.EFormsPropertyHandler"> + <service name="com.sun.star.form.inspection.XMLFormsPropertyHandler"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.EditPropertyHandler"> + <service name="com.sun.star.form.inspection.EditPropertyHandler"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.EventHandler"> + <service name="com.sun.star.form.inspection.EventHandler"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.FormComponentPropertyHandler"> + <service name="com.sun.star.form.inspection.FormComponentPropertyHandler"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.FormGeometryHandler"> + <service name="com.sun.star.form.inspection.FormGeometryHandler"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.GenericPropertyHandler"> + <service name="com.sun.star.inspection.GenericPropertyHandler"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.SubmissionPropertyHandler"> + <service name="com.sun.star.form.inspection.SubmissionPropertyHandler"/> + </implementation> + <implementation name="com.sun.star.comp.extensions.XSDValidationPropertyHandler"> + <service name="com.sun.star.form.inspection.XSDValidationPropertyHandler"/> + </implementation> + <implementation name="org.openoffice.comp.extensions.DefaultFormComponentInspectorModel"> + <service name="com.sun.star.form.inspection.DefaultFormComponentInspectorModel"/> + </implementation> + <implementation name="org.openoffice.comp.extensions.DefaultHelpProvider"> + <service name="com.sun.star.inspection.DefaultHelpProvider"/> + </implementation> + <implementation name="org.openoffice.comp.extensions.DialogController"> + <service name="com.sun.star.awt.PropertyBrowserController"/> + </implementation> + <implementation name="org.openoffice.comp.extensions.FormController"> + <service name="com.sun.star.form.PropertyBrowserController"/> + </implementation> + <implementation name="org.openoffice.comp.extensions.ObjectInspector"> + <service name="com.sun.star.inspection.ObjectInspector"/> + </implementation> + <implementation name="org.openoffice.comp.extensions.ObjectInspectorModel"> + <service name="com.sun.star.inspection.ObjectInspectorModel"/> + </implementation> + <implementation name="org.openoffice.comp.form.ui.MasterDetailLinkDialog"> + <service name="com.sun.star.form.MasterDetailLinkDialog"/> + </implementation> + <implementation name="org.openoffice.comp.form.ui.OControlFontDialog"> + <service name="com.sun.star.form.ControlFontDialog"/> + </implementation> + <implementation name="org.openoffice.comp.form.ui.OTabOrderDialog"> + <service name="com.sun.star.form.ui.TabOrderDialog"/> + </implementation> +</component> diff --git a/extensions/source/propctrlr/pcrcommon.cxx b/extensions/source/propctrlr/pcrcommon.cxx index 8949e9b40..5d1ac809c 100644 --- a/extensions/source/propctrlr/pcrcommon.cxx +++ b/extensions/source/propctrlr/pcrcommon.cxx @@ -39,6 +39,7 @@ #include <com/sun/star/util/MeasureUnit.hpp> /** === end UNO includes === **/ #include <rtl/ustrbuf.hxx> +#include <tools/urlobj.hxx> //............................................................................ namespace pcr @@ -51,20 +52,24 @@ namespace pcr //= HelpIdUrl //======================================================================== //------------------------------------------------------------------------ - SmartId HelpIdUrl::getHelpId( const ::rtl::OUString& _rHelpURL ) + rtl::OString HelpIdUrl::getHelpId( const ::rtl::OUString& _rHelpURL ) { - SmartId aSmartHelpId( _rHelpURL ); - if ( 0 == _rHelpURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "HID:" ) ) ) - aSmartHelpId = SmartId( _rHelpURL.copy( sizeof( "HID:" ) - 1 ).toInt32() ); - return aSmartHelpId; + INetURLObject aHID( _rHelpURL ); + if ( aHID.GetProtocol() == INET_PROT_HID ) + return rtl::OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ); + else + return rtl::OUStringToOString( _rHelpURL, RTL_TEXTENCODING_UTF8 ); } //------------------------------------------------------------------------ - ::rtl::OUString HelpIdUrl::getHelpURL( sal_uInt32 _nHelpId ) + ::rtl::OUString HelpIdUrl::getHelpURL( const rtl::OString& sHelpId ) { ::rtl::OUStringBuffer aBuffer; - aBuffer.appendAscii( "HID:" ); - aBuffer.append( (sal_Int32)_nHelpId ); + ::rtl::OUString aTmp( sHelpId, sHelpId.getLength(), RTL_TEXTENCODING_UTF8 ); + INetURLObject aHID( aTmp ); + if ( aHID.GetProtocol() == INET_PROT_NOT_VALID ) + aBuffer.appendAscii( INET_HID_SCHEME ); + aBuffer.append( aTmp.getStr() ); return aBuffer.makeStringAndClear(); } //............................................................................ diff --git a/extensions/source/propctrlr/pcrcommon.hxx b/extensions/source/propctrlr/pcrcommon.hxx index d8699e6f4..790bf0e02 100644 --- a/extensions/source/propctrlr/pcrcommon.hxx +++ b/extensions/source/propctrlr/pcrcommon.hxx @@ -37,7 +37,6 @@ #include <com/sun/star/beans/PropertyChangeEvent.hpp> /** === end UNO includes === **/ -#include <vcl/smartid.hxx> #include <tools/string.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <comphelper/listenernotification.hxx> @@ -78,8 +77,8 @@ namespace pcr class HelpIdUrl { public: - static SmartId getHelpId( const ::rtl::OUString& _rHelpURL ); - static ::rtl::OUString getHelpURL( sal_uInt32 _nHelpId ); + static rtl::OString getHelpId( const ::rtl::OUString& _rHelpURL ); + static ::rtl::OUString getHelpURL( const rtl::OString& ); }; //==================================================================== diff --git a/extensions/source/propctrlr/pcrservices.cxx b/extensions/source/propctrlr/pcrservices.cxx index 51d6cc9b8..6a34e9567 100644 --- a/extensions/source/propctrlr/pcrservices.cxx +++ b/extensions/source/propctrlr/pcrservices.cxx @@ -104,27 +104,6 @@ component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* pServiceManager, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - return ::pcr::PcrModule::getInstance().writeComponentInfos( - static_cast<XMultiServiceFactory*>(pServiceManager), - static_cast<XRegistryKey*>(pRegistryKey)); - } - catch (InvalidRegistryException& ) - { - OSL_ASSERT("pcr::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index 26f0da8df..4b12280f1 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -1273,7 +1273,7 @@ namespace pcr // this category does not yet exist. This is allowed, as an inspector model might be lazy, and not provide // any category information of its own. In this case, we have a fallback ... m_aPageIds[ aDescriptor.Category ] = - getPropertyBox().AppendPage( aDescriptor.Category, SmartId() ); + getPropertyBox().AppendPage( aDescriptor.Category, rtl::OString() ); nTargetPageId = impl_getPageIdForCategory_nothrow( aDescriptor.Category ); } diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx index 6a47ab17a..6b815fbaa 100644 --- a/extensions/source/propctrlr/propertyeditor.cxx +++ b/extensions/source/propctrlr/propertyeditor.cxx @@ -220,7 +220,7 @@ namespace pcr } //------------------------------------------------------------------ - sal_uInt16 OPropertyEditor::AppendPage( const String & _rText, const SmartId& _rHelpId ) + sal_uInt16 OPropertyEditor::AppendPage( const String & _rText, const rtl::OString& _rHelpId ) { // obtain a new id sal_uInt16 nId = m_nNextId++; @@ -236,7 +236,7 @@ namespace pcr pPage->getListBox().SetObserver(m_pObserver); pPage->getListBox().EnableHelpSection( m_bHasHelpSection ); pPage->getListBox().SetHelpLineLimites( m_nMinHelpLines, m_nMaxHelpLines ); - pPage->SetSmartHelpId( _rHelpId ); + pPage->SetHelpId( _rHelpId ); // immediately activate the page m_aTabControl.SetTabPage(nId, pPage); @@ -246,10 +246,10 @@ namespace pcr } //------------------------------------------------------------------ - void OPropertyEditor::SetHelpId( sal_uInt32 nHelpId ) + void OPropertyEditor::SetHelpId( const rtl::OString& rHelpId ) { - Control::SetHelpId(0); - m_aTabControl.SetHelpId(nHelpId); + Control::SetHelpId(""); + m_aTabControl.SetHelpId(rHelpId); } //------------------------------------------------------------------ diff --git a/extensions/source/propctrlr/propertyeditor.hxx b/extensions/source/propctrlr/propertyeditor.hxx index 5898b7053..a9a999be0 100644 --- a/extensions/source/propctrlr/propertyeditor.hxx +++ b/extensions/source/propctrlr/propertyeditor.hxx @@ -97,8 +97,8 @@ namespace pcr void SetHelpText( const ::rtl::OUString& _rHelpText ); void SetHelpLineLimites( sal_Int32 _nMinLines, sal_Int32 _nMaxLines ); - void SetHelpId( sal_uInt32 nHelpId ); - sal_uInt16 AppendPage( const String& r, const SmartId& _rHelpId ); + void SetHelpId( const rtl::OString& sHelpId ); + sal_uInt16 AppendPage( const String& r, const rtl::OString& _rHelpId ); void SetPage( sal_uInt16 ); void RemovePage(sal_uInt16 nID); sal_uInt16 GetCurPage(); diff --git a/extensions/source/propctrlr/propertyinfo.hxx b/extensions/source/propctrlr/propertyinfo.hxx index 7a2737a35..c2a6f8bbc 100644 --- a/extensions/source/propctrlr/propertyinfo.hxx +++ b/extensions/source/propctrlr/propertyinfo.hxx @@ -31,6 +31,7 @@ #include <sal/types.h> #include <tools/string.hxx> #include <rtl/ustring.hxx> +#include <rtl/string.hxx> #include <vector> //............................................................................ @@ -46,7 +47,7 @@ namespace pcr public: virtual sal_Int32 getPropertyId(const String& _rName) const = 0; virtual String getPropertyTranslation(sal_Int32 _nId) const = 0; - virtual sal_Int32 getPropertyHelpId(sal_Int32 _nId) const = 0; + virtual rtl::OString getPropertyHelpId(sal_Int32 _nId) const = 0; virtual sal_Int16 getPropertyPos(sal_Int32 _nId) const = 0; virtual sal_uInt32 getPropertyUIFlags(sal_Int32 _nId) const = 0; virtual ::std::vector< ::rtl::OUString > getPropertyEnumRepresentations(sal_Int32 _nId) const = 0; diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx index c81e59f0b..c5b920363 100644 --- a/extensions/source/propctrlr/selectlabeldialog.cxx +++ b/extensions/source/propctrlr/selectlabeldialog.cxx @@ -79,7 +79,7 @@ namespace pcr m_aControlTree.SetSelectionMode( SINGLE_SELECTION ); m_aControlTree.SetDragDropMode( 0 ); m_aControlTree.EnableInplaceEditing( sal_False ); - m_aControlTree.SetWindowBits(WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL); + m_aControlTree.SetStyle(m_aControlTree.GetStyle() | WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL); m_aControlTree.SetNodeBitmaps( m_aModelImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ), m_aModelImages.GetImage( RID_SVXIMG_EXPANDEDNODE ) ); m_aControlTree.SetSelectHdl(LINK(this, OSelectLabelDialog, OnEntrySelected)); diff --git a/extensions/source/propctrlr/selectlabeldialog.src b/extensions/source/propctrlr/selectlabeldialog.src index 93cf7d24e..ab961c456 100644 --- a/extensions/source/propctrlr/selectlabeldialog.src +++ b/extensions/source/propctrlr/selectlabeldialog.src @@ -31,6 +31,7 @@ ModalDialog RID_DLG_SELECTLABELCONTROL { + HelpID = "extensions:ModalDialog:RID_DLG_SELECTLABELCONTROL"; OutputSize = TRUE; Size = MAP_APPFONT( 200, 151 ); Moveable = TRUE; @@ -51,6 +52,7 @@ ModalDialog RID_DLG_SELECTLABELCONTROL }; CheckBox 1 { + HelpID = "extensions:CheckBox:RID_DLG_SELECTLABELCONTROL:1"; Pos = MAP_APPFONT( 6, 115 ); Size = MAP_APPFONT( 188, 8 ); Text [ en-US ] = "~No assignment"; diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 291bfab33..5a3f39b8b 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -47,7 +47,7 @@ #include <svx/svxids.hrc> #endif #include <svx/drawitem.hxx> -#include <xtable.hxx> +#include <svx/xtable.hxx> //================================================================== #include <vcl/floatwin.hxx> #include <svtools/svmedit.hxx> diff --git a/extensions/source/propctrlr/taborder.src b/extensions/source/propctrlr/taborder.src index fe55988f3..1dfe0ee58 100644 --- a/extensions/source/propctrlr/taborder.src +++ b/extensions/source/propctrlr/taborder.src @@ -35,6 +35,7 @@ ModalDialog RID_DLG_TABORDER { + HelpID = "extensions:ModalDialog:RID_DLG_TABORDER"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 168 , 158 ) ; @@ -60,6 +61,7 @@ ModalDialog RID_DLG_TABORDER PushButton PB_MOVE_UP { + HelpID = "extensions:PushButton:RID_DLG_TABORDER:PB_MOVE_UP"; Pos = MAP_APPFONT ( 102 , 14 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "Move Up" ; @@ -67,6 +69,7 @@ ModalDialog RID_DLG_TABORDER PushButton PB_MOVE_DOWN { + HelpID = "extensions:PushButton:RID_DLG_TABORDER:PB_MOVE_DOWN"; Pos = MAP_APPFONT ( 102 , 32 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "Move Down" ; @@ -74,6 +77,7 @@ ModalDialog RID_DLG_TABORDER PushButton PB_AUTO_ORDER { + HelpID = "extensions:PushButton:RID_DLG_TABORDER:PB_AUTO_ORDER"; Pos = MAP_APPFONT ( 102 , 50 ) ; Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "Automatic Sort" ; diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx index b81061222..32d410816 100644 --- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx +++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx @@ -331,8 +331,8 @@ namespace pcr implGetAvailableDataTypeNames( aListEntries ); - aDescriptor.PrimaryButtonId = UID_PROP_ADD_DATA_TYPE; - aDescriptor.SecondaryButtonId = UID_PROP_REMOVE_DATA_TYPE; + aDescriptor.PrimaryButtonId = rtl::OUString::createFromAscii(UID_PROP_ADD_DATA_TYPE); + aDescriptor.SecondaryButtonId = rtl::OUString::createFromAscii(UID_PROP_REMOVE_DATA_TYPE);; aDescriptor.HasPrimaryButton = aDescriptor.HasSecondaryButton = sal_True; aDescriptor.PrimaryButtonImageURL = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:graphicrepository/extensions/res/buttonplus.png" ) ); aDescriptor.SecondaryButtonImageURL = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:graphicrepository/extensions/res/buttonminus.png" ) ); diff --git a/extensions/source/resource/exports.dxp b/extensions/source/resource/exports.dxp index 9e59e9403..f0e1c6993 100644 --- a/extensions/source/resource/exports.dxp +++ b/extensions/source/resource/exports.dxp @@ -1,3 +1,2 @@ -component_writeInfo component_getImplementationEnvironment component_getFactory diff --git a/extensions/source/resource/makefile.mk b/extensions/source/resource/makefile.mk index a89d690b7..adeec5fd0 100644 --- a/extensions/source/resource/makefile.mk +++ b/extensions/source/resource/makefile.mk @@ -74,3 +74,11 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : target.mk .INCLUDE : $(PRJ)$/util$/target.pmk + +ALLTAR : $(MISC)/res.component + +$(MISC)/res.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + res.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt res.component diff --git a/extensions/source/resource/res.component b/extensions/source/resource/res.component new file mode 100644 index 000000000..57f96609d --- /dev/null +++ b/extensions/source/resource/res.component @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.extensions.ResourceService"> + <service name="com.sun.star.resource.VclStringResourceLoader"/> + </implementation> + <implementation name="com.sun.star.comp.resource.OpenOfficeResourceLoader"> + <service name="com.sun.star.resource.OfficeResourceLoader"/> + <singleton name="com.sun.star.resource.OfficeResourceLoader"/> + </implementation> +</component> diff --git a/extensions/source/resource/res_services.cxx b/extensions/source/resource/res_services.cxx index 73a979c22..dea7cf675 100644 --- a/extensions/source/resource/res_services.cxx +++ b/extensions/source/resource/res_services.cxx @@ -29,12 +29,7 @@ #include "precompiled_extensions.hxx" #include "res_services.hxx" -/** === begin UNO includes === **/ -#include <com/sun/star/registry/XRegistryKey.hpp> -/** === end UNO includes === **/ - /** === begin UNO using === **/ -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Exception; @@ -64,43 +59,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, XRegistryKey * pRegistryKey ) -{ - try - { - ::std::vector< ::res::ComponentInfo > aComponentInfos( ::res::getComponentInfos() ); - for ( ::std::vector< ::res::ComponentInfo >::const_iterator loop = aComponentInfos.begin(); - loop != aComponentInfos.end(); - ++loop - ) - { - Reference< XRegistryKey > xNewKey = - pRegistryKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) - + loop->sImplementationName + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" ) ) ); - - for( sal_Int32 i = 0; i < loop->aSupportedServices.getLength(); ++i ) - xNewKey->createKey( loop->aSupportedServices.getConstArray()[i]); - - if ( loop->sSingletonName.getLength() ) - { - OSL_ENSURE( loop->aSupportedServices.getLength() == 1, "singletons must support exactly one service!" ); - xNewKey = pRegistryKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) - + loop->sImplementationName + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SINGLETONS/" ) ) - + loop->sSingletonName ); - xNewKey->setStringValue( loop->aSupportedServices[ 0 ] ); - } - } - - return sal_True; - } - catch (Exception &) - { - // not allowed to throw an exception over the c function. - //OSL_ENSURE( sal_False, "Exception cannot register component!" ); - return sal_False; - } -} - void * SAL_CALL component_getFactory( const sal_Char * pImplName, XMultiServiceFactory * /*pServiceManager*/, void * /*pRegistryKey*/ ) { diff --git a/extensions/source/scanner/exports.dxp b/extensions/source/scanner/exports.dxp index 9630d7e06..f0e1c6993 100644 --- a/extensions/source/scanner/exports.dxp +++ b/extensions/source/scanner/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/extensions/source/scanner/grid.src b/extensions/source/scanner/grid.src index ddf593ef7..e1734456f 100644 --- a/extensions/source/scanner/grid.src +++ b/extensions/source/scanner/grid.src @@ -28,6 +28,7 @@ ModalDialog GRID_DIALOG { + HelpID = "extensions:ModalDialog:GRID_DIALOG"; OutputSize = TRUE ; SVLook = TRUE ; Pos = MAP_APPFONT ( 10 , 10 ) ; @@ -48,6 +49,7 @@ ModalDialog GRID_DIALOG }; ListBox GRID_DIALOG_TYPE_BOX { + HelpID = "extensions:ListBox:GRID_DIALOG:GRID_DIALOG_TYPE_BOX"; Border = TRUE ; Dropdown = TRUE ; Pos = MAP_APPFONT( 245, 45 ); @@ -55,6 +57,7 @@ ModalDialog GRID_DIALOG }; PushButton GRID_DIALOG_RESET_BTN { + HelpID = "extensions:PushButton:GRID_DIALOG:GRID_DIALOG_RESET_BTN"; Pos = MAP_APPFONT( 245, 65 ); Size = MAP_APPFONT( 50, 15 ); Text [ en-US ] = "Set"; diff --git a/extensions/source/scanner/makefile.mk b/extensions/source/scanner/makefile.mk index ff42864e0..519be1ff8 100644 --- a/extensions/source/scanner/makefile.mk +++ b/extensions/source/scanner/makefile.mk @@ -98,3 +98,11 @@ DEF1EXPORTFILE=exports.dxp .INCLUDE : target.mk + +ALLTAR : $(MISC)/scn.component + +$(MISC)/scn.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + scn.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt scn.component diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 44562a7ec..385470a40 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -120,12 +120,13 @@ SaneDlg::SaneDlg( Window* pParent, Sane& rSane ) : Bitmap( SaneResId( RID_SCAN_BITMAP_PLUS ) ), Bitmap( SaneResId( RID_SCAN_BITMAP_MINUS ) ) ); - maOptionBox.SetWindowBits( WB_HASLINES | - WB_HASBUTTONS | - WB_NOINITIALSELECTION | - WB_HASBUTTONSATROOT | - WB_HASLINESATROOT - ); + maOptionBox.SetStyle( maOptionBox.GetStyle()| + WB_HASLINES | + WB_HASBUTTONS | + WB_NOINITIALSELECTION | + WB_HASBUTTONSATROOT | + WB_HASLINESATROOT + ); FreeResource(); } diff --git a/extensions/source/scanner/sanedlg.src b/extensions/source/scanner/sanedlg.src index 2b41785c8..20e825c07 100644 --- a/extensions/source/scanner/sanedlg.src +++ b/extensions/source/scanner/sanedlg.src @@ -27,6 +27,7 @@ #include <sanedlg.hrc> ModalDialog RID_SANE_DIALOG { + HelpID = "extensions:ModalDialog:RID_SANE_DIALOG"; OutputSize = TRUE ; SVLook = TRUE ; Pos = MAP_APPFONT ( 10 , 10 ) ; @@ -46,12 +47,14 @@ ModalDialog RID_SANE_DIALOG }; PushButton RID_DEVICEINFO_BTN { + HelpID = "extensions:PushButton:RID_SANE_DIALOG:RID_DEVICEINFO_BTN"; Pos = MAP_APPFONT ( THIRD_COLUMN , 44 ) ; Size = MAP_APPFONT ( 55 , 22 ) ; Text [ en-US ] = "About\n Dev~ice" ; }; PushButton RID_PREVIEW_BTN { + HelpID = "extensions:PushButton:RID_SANE_DIALOG:RID_PREVIEW_BTN"; Pos = MAP_APPFONT ( THIRD_COLUMN , 71 ) ; Size = MAP_APPFONT ( 55 , 22 ) ; Text [ en-US ] = "Create\nPreview" ; @@ -76,6 +79,7 @@ ModalDialog RID_SANE_DIALOG }; MetricField RID_SCAN_LEFT_BOX { + HelpID = "extensions:MetricField:RID_SANE_DIALOG:RID_SCAN_LEFT_BOX"; Spin = TRUE ; Repeat = TRUE ; Border = TRUE ; @@ -90,6 +94,7 @@ ModalDialog RID_SANE_DIALOG }; MetricField RID_SCAN_TOP_BOX { + HelpID = "extensions:MetricField:RID_SANE_DIALOG:RID_SCAN_TOP_BOX"; Spin = TRUE ; Repeat = TRUE ; Border = TRUE ; @@ -104,6 +109,7 @@ ModalDialog RID_SANE_DIALOG }; MetricField RID_SCAN_RIGHT_BOX { + HelpID = "extensions:MetricField:RID_SANE_DIALOG:RID_SCAN_RIGHT_BOX"; Spin = TRUE ; Repeat = TRUE ; Border = TRUE ; @@ -118,6 +124,7 @@ ModalDialog RID_SANE_DIALOG }; MetricField RID_SCAN_BOTTOM_BOX { + HelpID = "extensions:MetricField:RID_SANE_DIALOG:RID_SCAN_BOTTOM_BOX"; Spin = TRUE ; Repeat = TRUE ; Border = TRUE ; @@ -132,6 +139,7 @@ ModalDialog RID_SANE_DIALOG }; ListBox RID_DEVICE_BOX { + HelpID = "extensions:ListBox:RID_SANE_DIALOG:RID_DEVICE_BOX"; Border = TRUE ; Dropdown = TRUE ; Sort = TRUE ; @@ -146,6 +154,7 @@ ModalDialog RID_SANE_DIALOG }; NumericBox RID_SCAN_RESOLUTION_BOX { + HelpID = "extensions:NumericBox:RID_SANE_DIALOG:RID_SCAN_RESOLUTION_BOX"; Dropdown = TRUE ; Pos = MAP_APPFONT ( SECOND_COLUMN + 70 , 23 ) ; Size = MAP_APPFONT ( 60 , 80 ) ; @@ -158,6 +167,7 @@ ModalDialog RID_SANE_DIALOG }; CheckBox RID_SCAN_ADVANCED_BOX { + HelpID = "extensions:CheckBox:RID_SANE_DIALOG:RID_SCAN_ADVANCED_BOX"; Check = FALSE ; Pos = MAP_APPFONT ( SECOND_COLUMN + 120 , 40 ) ; Size = MAP_APPFONT ( 8 , 8 ) ; @@ -188,17 +198,20 @@ ModalDialog RID_SANE_DIALOG }; CheckBox RID_SCAN_BOOL_OPTION_BOX { + HelpID = "extensions:CheckBox:RID_SANE_DIALOG:RID_SCAN_BOOL_OPTION_BOX"; Pos = MAP_APPFONT ( SECOND_COLUMN + 120 , 225 ) ; Size = MAP_APPFONT ( 8 , 8 ) ; }; Edit RID_SCAN_STRING_OPTION_EDT { + HelpID = "extensions:Edit:RID_SANE_DIALOG:RID_SCAN_STRING_OPTION_EDT"; Border = TRUE ; Pos = MAP_APPFONT ( SECOND_COLUMN , 234 ) ; Size = MAP_APPFONT ( 130 , 12 ) ; }; ListBox RID_SCAN_QUANTUM_RANGE_BOX { + HelpID = "extensions:ListBox:RID_SANE_DIALOG:RID_SCAN_QUANTUM_RANGE_BOX"; Border = TRUE ; Dropdown = TRUE ; Pos = MAP_APPFONT ( SECOND_COLUMN , 234 ) ; @@ -206,6 +219,7 @@ ModalDialog RID_SANE_DIALOG }; ListBox RID_SCAN_STRING_RANGE_BOX { + HelpID = "extensions:ListBox:RID_SANE_DIALOG:RID_SCAN_STRING_RANGE_BOX"; Border = TRUE ; Dropdown = TRUE ; Pos = MAP_APPFONT ( SECOND_COLUMN , 234 ) ; @@ -213,6 +227,7 @@ ModalDialog RID_SANE_DIALOG }; Edit RID_SCAN_NUMERIC_OPTION_EDT { + HelpID = "extensions:Edit:RID_SANE_DIALOG:RID_SCAN_NUMERIC_OPTION_EDT"; Border = TRUE ; Pos = MAP_APPFONT ( SECOND_COLUMN , 234 ) ; Size = MAP_APPFONT ( 130 , 12 ) ; @@ -225,6 +240,7 @@ ModalDialog RID_SANE_DIALOG }; NumericField RID_SCAN_NUMERIC_VECTOR_BOX { + HelpID = "extensions:NumericField:RID_SANE_DIALOG:RID_SCAN_NUMERIC_VECTOR_BOX"; Border = TRUE ; Spin = TRUE ; Repeat = TRUE ; @@ -233,6 +249,7 @@ ModalDialog RID_SANE_DIALOG }; PushButton RID_SCAN_BUTTON_OPTION_BTN { + HelpID = "extensions:PushButton:RID_SANE_DIALOG:RID_SCAN_BUTTON_OPTION_BTN"; Pos = MAP_APPFONT ( SECOND_COLUMN , 234 ) ; Size = MAP_APPFONT ( 130 , 14 ) ; Text [ en-US ] = "Set" ; diff --git a/extensions/source/scanner/scn.component b/extensions/source/scanner/scn.component new file mode 100644 index 000000000..d7daf3ae3 --- /dev/null +++ b/extensions/source/scanner/scn.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.scanner.ScannerManager"> + <service name="com.sun.star.scanner.ScannerManager"/> + </implementation> +</component> diff --git a/extensions/source/scanner/scnserv.cxx b/extensions/source/scanner/scnserv.cxx index 1ac61483d..93fe9dbdc 100644 --- a/extensions/source/scanner/scnserv.cxx +++ b/extensions/source/scanner/scnserv.cxx @@ -45,37 +45,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char* *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -// ----------------------- -// - component_writeInfo - -// ----------------------- - -extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) -{ - sal_Bool bRet = sal_False; - - if( pRegistryKey ) - { - try - { - ::rtl::OUString aImplName( '/' ); - - aImplName += ScannerManager::getImplementationName_Static(); - aImplName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES/" ) ); - aImplName += ScannerManager::getImplementationName_Static(); - - REF( XRegistryKey ) xNewKey1( static_cast< XRegistryKey* >( pRegistryKey )->createKey( aImplName ) ); - - bRet = sal_True; - } - catch( InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - - return bRet; -} - // ------------------------ // - component_getFactory - // ------------------------ diff --git a/extensions/source/svg/svguno.cxx b/extensions/source/svg/svguno.cxx index ba1a5824d..38cf50eab 100644 --- a/extensions/source/svg/svguno.cxx +++ b/extensions/source/svg/svguno.cxx @@ -60,36 +60,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -// ----------------------- -// - component_writeInfo - -// ----------------------- - -extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey ) -{ - sal_Bool bRet = sal_False; - - if( pRegistryKey ) - { - try - { - REF( NMSP_REGISTRY::XRegistryKey ) xNewKey1( - static_cast< NMSP_REGISTRY::XRegistryKey* >( pRegistryKey )->createKey( - B2UCONST( "/com.sun.star.comp.extensions.SVGWriter/UNO/SERVICES/com.sun.star.svg.SVGWriter" ) ) ); - REF( NMSP_REGISTRY::XRegistryKey ) xNewKey2( - static_cast< NMSP_REGISTRY::XRegistryKey* >( pRegistryKey )->createKey( - B2UCONST( "/com.sun.star.comp.extensions.SVGPrinter/UNO/SERVICES/com.sun.star.svg.SVGPrinter" ) ) ); - - bRet = sal_True; - } - catch( NMSP_REGISTRY::InvalidRegistryException& ) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - - return bRet; -} - // ------------------------ // - component_getFactory - // ------------------------ diff --git a/extensions/source/update/check/makefile.mk b/extensions/source/update/check/makefile.mk index 9f5f54410..47da869ea 100644 --- a/extensions/source/update/check/makefile.mk +++ b/extensions/source/update/check/makefile.mk @@ -132,3 +132,11 @@ $(SPOOLDIR)$/$(PACKAGEDIR)$/Jobs$/Jobs-onlineupdate.xcu : $(XCU_SOURCEDIR)$/Jobs @$(COPY) $< $@ # @$(PERL) transform.pl < $< > $@ + +ALLTAR : $(MISC)/updchk.uno.component + +$(MISC)/updchk.uno.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + updchk.uno.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt updchk.uno.component diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx index 987e5fce6..163d46576 100755 --- a/extensions/source/update/check/updatecheckconfig.cxx +++ b/extensions/source/update/check/updatecheckconfig.cxx @@ -32,10 +32,8 @@ #include "updatecheckconfig.hxx" #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertyState.hpp> - -#ifndef _COM_SUN_STAR_CONTAINER_CHANGESEVENT_HPP_ -#include <com/sun/star/beans/XPropertyState.hpp> -#endif +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <osl/security.hxx> #include <osl/time.h> @@ -78,6 +76,8 @@ namespace uno = com::sun::star::uno ; #define RELEASE_NOTE "ReleaseNote" #define EXTENSION_PREFIX "Extension_" +#define PROPERTY_VERSION UNISTRING("Version") + static const sal_Char * const aUpdateEntryProperties[] = { UPDATE_VERSION, UPDATE_BUILDID, @@ -246,19 +246,19 @@ rtl::OUString UpdateCheckConfig::getAllUsersDirectory() } //------------------------------------------------------------------------------ - -UpdateCheckConfig::UpdateCheckConfig( - const uno::Reference<container::XNameContainer>& xContainer, - const ::rtl::Reference< UpdateCheckConfigListener >& rListener -) : m_xContainer(xContainer), m_rListener(rListener) -{ -} +UpdateCheckConfig::UpdateCheckConfig( const uno::Reference<container::XNameContainer>& xContainer, + const uno::Reference<container::XNameContainer>& xAvailableUpdates, + const uno::Reference<container::XNameContainer>& xIgnoredUpdates, + const ::rtl::Reference< UpdateCheckConfigListener >& rListener ) : + m_xContainer( xContainer ), + m_xAvailableUpdates( xAvailableUpdates ), + m_xIgnoredUpdates( xIgnoredUpdates ), + m_rListener( rListener ) +{} //------------------------------------------------------------------------------ - UpdateCheckConfig::~UpdateCheckConfig() -{ -} +{} //------------------------------------------------------------------------------ @@ -295,7 +295,15 @@ UpdateCheckConfig::get( UNISTRING("com.sun.star.configuration.ConfigurationUpdateAccess"), aArgumentList ), uno::UNO_QUERY_THROW ); - return new UpdateCheckConfig( xContainer, rListener ); + aProperty.Value = uno::makeAny( UNISTRING("/org.openoffice.Office.ExtensionManager/ExtensionUpdateData/IgnoredUpdates") ); + aArgumentList[0] = uno::makeAny( aProperty ); + uno::Reference< container::XNameContainer > xIgnoredExt( xConfigProvider->createInstanceWithArguments( UNISTRING("com.sun.star.configuration.ConfigurationUpdateAccess"), aArgumentList ), uno::UNO_QUERY_THROW ); + + aProperty.Value = uno::makeAny( UNISTRING("/org.openoffice.Office.ExtensionManager/ExtensionUpdateData/AvailableUpdates") ); + aArgumentList[0] = uno::makeAny( aProperty ); + uno::Reference< container::XNameContainer > xUpdateAvail( xConfigProvider->createInstanceWithArguments( UNISTRING("com.sun.star.configuration.ConfigurationUpdateAccess"), aArgumentList ), uno::UNO_QUERY_THROW ); + + return new UpdateCheckConfig( xContainer, xUpdateAvail, xIgnoredExt, rListener ); } //------------------------------------------------------------------------------ @@ -627,6 +635,19 @@ UpdateCheckConfig::commitChanges() } } } + + xChangesBatch = uno::Reference< util::XChangesBatch > ( m_xAvailableUpdates, uno::UNO_QUERY ); + if( xChangesBatch.is() && xChangesBatch->hasPendingChanges() ) + { + util::ChangesSet aChangesSet = xChangesBatch->getPendingChanges(); + xChangesBatch->commitChanges(); + } + xChangesBatch = uno::Reference< util::XChangesBatch > ( m_xIgnoredUpdates, uno::UNO_QUERY ); + if( xChangesBatch.is() && xChangesBatch->hasPendingChanges() ) + { + util::ChangesSet aChangesSet = xChangesBatch->getPendingChanges(); + xChangesBatch->commitChanges(); + } } //------------------------------------------------------------------------------ @@ -654,40 +675,66 @@ UpdateCheckConfig::getPendingChanges( ) throw (uno::RuntimeException) } //------------------------------------------------------------------------------ -void UpdateCheckConfig::storeExtensionVersion( const rtl::OUString& rExtensionName, +bool UpdateCheckConfig::storeExtensionVersion( const rtl::OUString& rExtensionName, const rtl::OUString& rVersion ) { - const rtl::OUString aExtName = UNISTRING( EXTENSION_PREFIX ) + rExtensionName; - const uno::Any aValue = uno::makeAny( rVersion ); - - if( m_xContainer->hasByName( aExtName ) ) - m_xContainer->replaceByName( aExtName, aValue ); + bool bNotify = true; + + if ( m_xAvailableUpdates->hasByName( rExtensionName ) ) + uno::Reference< beans::XPropertySet >( m_xAvailableUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->setPropertyValue( PROPERTY_VERSION, uno::Any( rVersion ) ); else - m_xContainer->insertByName( aExtName, aValue ); + { + uno::Reference< beans::XPropertySet > elem( uno::Reference< lang::XSingleServiceFactory >( m_xAvailableUpdates, uno::UNO_QUERY_THROW )->createInstance(), uno::UNO_QUERY_THROW ); + elem->setPropertyValue( PROPERTY_VERSION, uno::Any( rVersion ) ); + m_xAvailableUpdates->insertByName( rExtensionName, uno::Any( elem ) ); + } + + if ( m_xIgnoredUpdates->hasByName( rExtensionName ) ) + { + ::rtl::OUString aIgnoredVersion; + uno::Any aValue( uno::Reference< beans::XPropertySet >( m_xIgnoredUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) ); + aValue >>= aIgnoredVersion; + if ( aIgnoredVersion.getLength() == 0 ) // no version means ignore all updates + bNotify = false; + else if ( aIgnoredVersion == rVersion ) // the user wanted to ignore this update + bNotify = false; + } commitChanges(); + + return bNotify; } //------------------------------------------------------------------------------ bool UpdateCheckConfig::checkExtensionVersion( const rtl::OUString& rExtensionName, const rtl::OUString& rVersion ) { - const rtl::OUString aExtName = UNISTRING( EXTENSION_PREFIX ) + rExtensionName; - - if( m_xContainer->hasByName( aExtName ) ) + if ( m_xAvailableUpdates->hasByName( rExtensionName ) ) { - uno::Any aValue = m_xContainer->getByName( aExtName ); - rtl::OUString aStoredVersion; + ::rtl::OUString aStoredVersion; + uno::Any aValue( uno::Reference< beans::XPropertySet >( m_xAvailableUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) ); aValue >>= aStoredVersion; + if ( m_xIgnoredUpdates->hasByName( rExtensionName ) ) + { + ::rtl::OUString aIgnoredVersion; + uno::Any aValue2( uno::Reference< beans::XPropertySet >( m_xIgnoredUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) ); + aValue2 >>= aIgnoredVersion; + if ( aIgnoredVersion.getLength() == 0 ) // no version means ignore all updates + return false; + else if ( aIgnoredVersion == aStoredVersion ) // the user wanted to ignore this update + return false; + // TODO: else delete ignored entry? + } if ( isVersionGreater( rVersion, aStoredVersion ) ) return true; else { - m_xContainer->removeByName( aExtName ); + m_xAvailableUpdates->removeByName( rExtensionName ); commitChanges(); } } + return false; } diff --git a/extensions/source/update/check/updatecheckconfig.hxx b/extensions/source/update/check/updatecheckconfig.hxx index 1cf320711..7169ad44c 100644..100755 --- a/extensions/source/update/check/updatecheckconfig.hxx +++ b/extensions/source/update/check/updatecheckconfig.hxx @@ -93,8 +93,10 @@ class UpdateCheckConfig : public ::cppu::WeakImplHelper3< ::com::sun::star::util::XChangesBatch, ::com::sun::star::lang::XServiceInfo > { - UpdateCheckConfig(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xContainer, - const ::rtl::Reference< UpdateCheckConfigListener >& rListener ); + UpdateCheckConfig( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xContainer, + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xAvailableUpdates, + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xIgnoredUpdates, + const ::rtl::Reference< UpdateCheckConfigListener >& rListener ); virtual ~UpdateCheckConfig(); @@ -154,7 +156,7 @@ public: static rtl::OUString getAllUsersDirectory(); // store and retrieve information about extensions - void storeExtensionVersion( const rtl::OUString& rExtensionName, + bool storeExtensionVersion( const rtl::OUString& rExtensionName, const rtl::OUString& rVersion ); bool checkExtensionVersion( const rtl::OUString& rExtensionName, const rtl::OUString& rVersion ); @@ -205,6 +207,8 @@ private: static bool isVersionGreater( const rtl::OUString& rVersion1, const rtl::OUString& rVersion2 ); const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xContainer; + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xAvailableUpdates; + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xIgnoredUpdates; const ::rtl::Reference< UpdateCheckConfigListener > m_rListener; }; diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx index c75530388..d8d95540a 100755 --- a/extensions/source/update/check/updatecheckjob.cxx +++ b/extensions/source/update/check/updatecheckjob.cxx @@ -388,18 +388,6 @@ component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Envir //------------------------------------------------------------------------------ -extern "C" sal_Bool SAL_CALL -component_writeInfo(void *pServiceManager, void *pRegistryKey) -{ - return cppu::component_writeInfoHelper( - pServiceManager, - pRegistryKey, - kImplementations_entries - ); -} - -//------------------------------------------------------------------------------ - extern "C" void * component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey) { diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index abb05a480..92ecd5ae4 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -69,6 +69,7 @@ #include <com/sun/star/resource/XResourceBundleLoader.hpp> #include "updatehdl.hrc" +#include <tools/urlobj.hxx> #define UNISTRING(s) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s)) @@ -158,7 +159,7 @@ void UpdateHandler::setDownloadBtnLabel( bool bAppendDots ) aLabel += UNISTRING( "..." ); setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], UNISTRING("Label"), uno::Any( aLabel ) ); - setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_DOWNLOAD2 ) ) ); + setControlProperty( msButtonIDs[DOWNLOAD_BUTTON], UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DOWNLOAD2 ) ) ); mbDownloadBtnHasDots = bAppendDots; } @@ -1174,7 +1175,7 @@ void UpdateHandler::createDialog() xPropSet->setPropertyValue( UNISTRING("PositionY"), uno::Any(sal_Int32( 100 )) ); xPropSet->setPropertyValue( UNISTRING("Width"), uno::Any(sal_Int32( DIALOG_WIDTH )) ); xPropSet->setPropertyValue( UNISTRING("Height"), uno::Any(sal_Int32( DIALOG_HEIGHT )) ); - xPropSet->setPropertyValue( UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_DLG ) ) ); + xPropSet->setPropertyValue( UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DLG ) ) ); } { // Label (fixed text) <status> uno::Sequence< beans::NamedValue > aProps(1); @@ -1201,7 +1202,7 @@ void UpdateHandler::createDialog() setProperty( aProps, 3, UNISTRING("MultiLine"), uno::Any( true ) ); setProperty( aProps, 4, UNISTRING("ReadOnly"), uno::Any( true ) ); setProperty( aProps, 5, UNISTRING("AutoVScroll"), uno::Any( true ) ); - setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_STATUS ) ) ); + setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_STATUS ) ) ); insertControlModel( xControlModel, EDIT_FIELD_MODEL, TEXT_STATUS, awt::Rectangle( DIALOG_BORDER + TEXT_OFFSET, @@ -1232,7 +1233,7 @@ void UpdateHandler::createDialog() setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) ); setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) ); setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msPauseBtn ) ); - setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_PAUSE ) ) ); + setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_PAUSE ) ) ); insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[PAUSE_BUTTON], awt::Rectangle( BOX1_BTN_X, BOX1_BTN_Y, BUTTON_WIDTH, BUTTON_HEIGHT ), @@ -1245,7 +1246,7 @@ void UpdateHandler::createDialog() setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) ); setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) ); setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msResumeBtn ) ); - setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_RESUME ) ) ); + setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_RESUME ) ) ); insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[RESUME_BUTTON], awt::Rectangle( BOX1_BTN_X, @@ -1261,7 +1262,7 @@ void UpdateHandler::createDialog() setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) ); setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) ); setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msCancelBtn ) ); - setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_CANCEL ) ) ); + setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_CANCEL ) ) ); insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[CANCEL_BUTTON], awt::Rectangle( BOX1_BTN_X, @@ -1295,7 +1296,7 @@ void UpdateHandler::createDialog() setProperty( aProps, 3, UNISTRING("MultiLine"), uno::Any( true ) ); setProperty( aProps, 4, UNISTRING("ReadOnly"), uno::Any( true ) ); setProperty( aProps, 5, UNISTRING("AutoVScroll"), uno::Any( true ) ); - setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_DESCRIPTION ) ) ); + setProperty( aProps, 6, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DESCRIPTION ) ) ); insertControlModel( xControlModel, EDIT_FIELD_MODEL, TEXT_DESCRIPTION, awt::Rectangle( DIALOG_BORDER + TEXT_OFFSET, @@ -1325,7 +1326,7 @@ void UpdateHandler::createDialog() // setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_CANCEL) ) ); // [property] string Label // only if PushButtonType_STANDARD setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msClose ) ); - setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_CLOSE ) ) ); + setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_CLOSE ) ) ); insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[ CLOSE_BUTTON ], awt::Rectangle( CLOSE_BTN_X, BUTTON_Y_POS, BUTTON_WIDTH, BUTTON_HEIGHT ), @@ -1338,7 +1339,7 @@ void UpdateHandler::createDialog() setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) ); setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) ); setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msInstall ) ); - setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_INSTALL ) ) ); + setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_INSTALL ) ) ); insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[INSTALL_BUTTON], awt::Rectangle( INSTALL_BTN_X, BUTTON_Y_POS, BUTTON_WIDTH, BUTTON_HEIGHT ), @@ -1351,7 +1352,7 @@ void UpdateHandler::createDialog() setProperty( aProps, 1, UNISTRING("Enabled"), uno::Any( true ) ); setProperty( aProps, 2, UNISTRING("PushButtonType"), uno::Any( sal_Int16(awt::PushButtonType_STANDARD) ) ); setProperty( aProps, 3, UNISTRING("Label"), uno::Any( msDownload ) ); - setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( "HID:" ) + rtl::OUString::valueOf( (sal_Int32) HID_CHECK_FOR_UPD_DOWNLOAD ) ) ); + setProperty( aProps, 4, UNISTRING("HelpURL"), uno::Any( UNISTRING( INET_HID_SCHEME ) + rtl::OUString::createFromAscii( HID_CHECK_FOR_UPD_DOWNLOAD ) ) ); insertControlModel ( xControlModel, BUTTON_MODEL, msButtonIDs[DOWNLOAD_BUTTON], awt::Rectangle( DOWNLOAD_BTN_X, BUTTON_Y_POS, BUTTON_WIDTH, BUTTON_HEIGHT ), diff --git a/extensions/source/update/check/updateprotocol.cxx b/extensions/source/update/check/updateprotocol.cxx index 83d982986..98d17e520 100644..100755 --- a/extensions/source/update/check/updateprotocol.cxx +++ b/extensions/source/update/check/updateprotocol.cxx @@ -255,16 +255,18 @@ checkForUpdates( bool storeExtensionUpdateInfos( const uno::Reference< uno::XComponentContext > & rxContext, const uno::Sequence< uno::Sequence< rtl::OUString > > &rUpdateInfos ) { + bool bNotify = false; + if ( rUpdateInfos.hasElements() ) { rtl::Reference< UpdateCheckConfig > aConfig = UpdateCheckConfig::get( rxContext ); for ( sal_Int32 i = rUpdateInfos.getLength() - 1; i >= 0; i-- ) { - aConfig->storeExtensionVersion( rUpdateInfos[i][0], rUpdateInfos[i][1] ); + bNotify |= aConfig->storeExtensionVersion( rUpdateInfos[i][0], rUpdateInfos[i][1] ); } } - return rUpdateInfos.hasElements(); + return bNotify; } //------------------------------------------------------------------------------ @@ -289,9 +291,9 @@ bool checkForExtensionUpdates( const uno::Reference< uno::XComponentContext > & if ( !xInfoProvider.is() ) return false; aUpdateList = xInfoProvider->isUpdateAvailable( ::rtl::OUString() ); - storeExtensionUpdateInfos( rxContext, aUpdateList ); + bool bNotify = storeExtensionUpdateInfos( rxContext, aUpdateList ); - return aUpdateList.hasElements(); + return bNotify; } //------------------------------------------------------------------------------ diff --git a/extensions/source/update/check/updchk.uno.component b/extensions/source/update/check/updchk.uno.component new file mode 100644 index 000000000..b1eb32917 --- /dev/null +++ b/extensions/source/update/check/updchk.uno.component @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="vnd.sun.UpdateCheck"> + <service name="com.sun.star.setup.UpdateCheck"/> + </implementation> + <implementation name="vnd.sun.UpdateCheckConfig"> + <service name="com.sun.star.setup.UpdateCheckConfig"/> + </implementation> +</component> diff --git a/extensions/source/update/feed/makefile.mk b/extensions/source/update/feed/makefile.mk index 7e12970dd..6361f20bd 100644 --- a/extensions/source/update/feed/makefile.mk +++ b/extensions/source/update/feed/makefile.mk @@ -62,3 +62,11 @@ DEF1NAME=$(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/updatefeed.component + +$(MISC)/updatefeed.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + updatefeed.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt updatefeed.component diff --git a/extensions/source/update/feed/updatefeed.component b/extensions/source/update/feed/updatefeed.component new file mode 100644 index 000000000..2d53ff5f9 --- /dev/null +++ b/extensions/source/update/feed/updatefeed.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="vnd.sun.UpdateInformationProvider"> + <service name="com.sun.star.deployment.UpdateInformationProvider"/> + </implementation> +</component> diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index 9053c4456..b0db10d1c 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -851,18 +851,6 @@ component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Envir //------------------------------------------------------------------------------ -extern "C" sal_Bool SAL_CALL -component_writeInfo(void *pServiceManager, void *pRegistryKey) -{ - return cppu::component_writeInfoHelper( - pServiceManager, - pRegistryKey, - kImplementations_entries - ); -} - -//------------------------------------------------------------------------------ - extern "C" void * component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey) { diff --git a/extensions/source/update/ui/makefile.mk b/extensions/source/update/ui/makefile.mk index c4826efba..5ea6994d3 100644 --- a/extensions/source/update/ui/makefile.mk +++ b/extensions/source/update/ui/makefile.mk @@ -72,3 +72,11 @@ DEF1NAME=$(SHL1TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/updchk.component + +$(MISC)/updchk.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + updchk.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt updchk.component diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 2fd478af3..e23a26464 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -52,7 +52,7 @@ #include <vcl/outdev.hxx> #include <vcl/msgbox.hxx> #include <vcl/lineinfo.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <sfx2/sfx.hrc> @@ -1059,18 +1059,6 @@ component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Envir //------------------------------------------------------------------------------ -extern "C" sal_Bool SAL_CALL -component_writeInfo(void *pServiceManager, void *pRegistryKey) -{ - return cppu::component_writeInfoHelper( - pServiceManager, - pRegistryKey, - kImplementations_entries - ); -} - -//------------------------------------------------------------------------------ - extern "C" void * component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey) { diff --git a/extensions/source/update/ui/updchk.component b/extensions/source/update/ui/updchk.component new file mode 100644 index 000000000..bd533e30d --- /dev/null +++ b/extensions/source/update/ui/updchk.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="vnd.sun.UpdateCheckUI"> + <service name="com.sun.star.setup.UpdateCheckUI"/> + </implementation> +</component> diff --git a/extensions/source/xmlextract/makefile.mk b/extensions/source/xmlextract/makefile.mk index 0a021027f..fa54df738 100644 --- a/extensions/source/xmlextract/makefile.mk +++ b/extensions/source/xmlextract/makefile.mk @@ -63,3 +63,11 @@ SHL1LIBS= $(SLB)$/$(TARGET).lib # --- Targets ---------------------------------- .INCLUDE : target.mk + +ALLTAR : $(MISC)/xmx.component + +$(MISC)/xmx.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + xmx.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt xmx.component diff --git a/extensions/source/xmlextract/xmx.component b/extensions/source/xmlextract/xmx.component new file mode 100644 index 000000000..456ff33b6 --- /dev/null +++ b/extensions/source/xmlextract/xmx.component @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.io.XMLExtractor"> + <service name="com.sun.star.io.XMLExtractor"/> + </implementation> +</component> diff --git a/extensions/source/xmlextract/xmxuno.cxx b/extensions/source/xmlextract/xmxuno.cxx index 2d4dfd7f8..5af30267e 100644 --- a/extensions/source/xmlextract/xmxuno.cxx +++ b/extensions/source/xmlextract/xmxuno.cxx @@ -52,27 +52,6 @@ void SAL_CALL component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } //================================================================================================== -sal_Bool SAL_CALL component_writeInfo( - void * /*pServiceManager*/, void * pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - REF( NMSP_REGISTRY::XRegistryKey ) xNewKey( - reinterpret_cast< NMSP_REGISTRY::XRegistryKey * >( pRegistryKey )->createKey( - NMSP_RTL::OUString( RTL_CONSTASCII_USTRINGPARAM("/com.sun.star.comp.io.XMLExtractor/UNO/SERVICES/com.sun.star.io.XMLExtractor") ) ) ); - - return sal_True; - } - catch (NMSP_REGISTRY::InvalidRegistryException &) - { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); - } - } - return sal_False; -} -//================================================================================================== void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { |