diff options
author | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2010-12-09 10:13:55 +0100 |
---|---|---|
committer | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2010-12-09 10:13:55 +0100 |
commit | b8c0bb8307498d9f78d14c81e4bae482ce8825b3 (patch) | |
tree | 9e1cd93fb2ce38190b131fa020ed59438a25ac5c /extensions/source | |
parent | 65db01a81bae6922c9aed8d99ba3bfbcc1526538 (diff) | |
parent | 082cd85b058e66a3b99e66f8c75ed8d013370958 (diff) |
mib19: rebase to DEV300m95
Diffstat (limited to 'extensions/source')
114 files changed, 1218 insertions, 705 deletions
diff --git a/extensions/source/abpilot/abp.component b/extensions/source/abpilot/abp.component new file mode 100644 index 000000000000..a07cef986219 --- /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 1afc6e88a2f0..e6a648a28423 100644 --- a/extensions/source/abpilot/abpresid.hrc +++ b/extensions/source/abpilot/abpresid.hrc @@ -29,6 +29,7 @@ #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 8997ce335676..1cb327f73c72 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 be177b5f6e19..a612a2051075 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 9630d7e06768..f0e1c69934bc 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 19477e1b6b2b..86bc5c68a7df 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 000000000000..98627854dffa --- /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 319c58d509ad..14c5259489fd 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 91356a0d1074..64262d2356a9 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 9fa401a1620c..e903707a74ec 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 0a0643b1b117..461404b2483a 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 33cff121021b..63c813fe2a99 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 fdcb97c9e177..27074404929a 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 f25dce11045b..e24c32237533 100644 --- a/extensions/source/bibliography/makefile.mk +++ b/extensions/source/bibliography/makefile.mk @@ -89,3 +89,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/toolbar.src b/extensions/source/bibliography/toolbar.src index b8a604587bc4..a08fe44d04bd 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 0fd917d2ff9e..e76314ba56f2 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 9630d7e06768..f0e1c69934bc 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/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx index c518dc37e94c..99312cdfde23 100644 --- a/extensions/source/config/ldap/ldapaccess.cxx +++ b/extensions/source/config/ldap/ldapaccess.cxx @@ -279,7 +279,7 @@ void LdapConnection::loadModule() { if ( !s_Ldap_Module ) { -#if defined(WIN) || defined(WNT) +#if defined(WNT) # define LIBLDAP "nsldap32v50.dll" #else # ifdef WITH_OPENLDAP diff --git a/extensions/source/config/ldap/ldapbe2.component b/extensions/source/config/ldap/ldapbe2.component new file mode 100644 index 000000000000..071064d1c823 --- /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 a27cb39b6225..d35e2428ca31 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 41d199a70209..c867313eac2c 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 000000000000..84ec98713b2a --- /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 fa96cbead1eb..1cf4bc72d427 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 ecb424c5e3b7..74b71bf35007 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 28e55e1e8900..6cb77dde19bb 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 5aca75b77d55..fac3a00dda23 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 6b651e848010..b98f6a70f843 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 eb83140de316..7a24abaef60c 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 b5831e5fda0f..e37ab0a546ac 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 6b08c46ff13b..f72458b01ec2 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 09fd0807639f..88d6e5cf99c0 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 000000000000..4dd2db56c3cc --- /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 4a1fa9813cb0..1436576e89ba 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/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx index 5e86da9726b9..f4eb2ef42169 100644 --- a/extensions/source/nsplugin/source/so_env.cxx +++ b/extensions/source/nsplugin/source/so_env.cxx @@ -204,7 +204,9 @@ int nspluginOOoModuleHook (void** aResult) strcpy (realFileName, libFileName); } + #if OSL_DEBUG_LEVEL > 1 fprintf (stderr, "OpenOffice path before fixup is '%s'\n", realFileName); + #endif if (realFileName[0] != '/') { /* a relative sym-link and we need to get an absolute path */ @@ -223,7 +225,9 @@ int nspluginOOoModuleHook (void** aResult) *aResult = realFileName; + #if OSL_DEBUG_LEVEL > 1 fprintf (stderr, "OpenOffice path is '%s'\n", realFileName); + #endif return 0; } diff --git a/extensions/source/ole/makefile.mk b/extensions/source/ole/makefile.mk index ad4ecee72c82..806cd027eaae 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 000000000000..6f5309e42ad9 --- /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 e7947188aa92..1f26fd019c1c 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/servreg.cxx b/extensions/source/ole/servreg.cxx index 17fc24e9a08c..f5d6c8080a15 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 97e130c3a644..f92804dbf261 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 000000000000..58bdaf37c2c5 --- /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 8bf4a3c5d241..69036826432f 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 6e5d7ab0d6a2..16e3f12f126c 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 a92044b87d7e..c5f6b56be31a 100644 --- a/extensions/source/oooimprovement/onlogrotate_job.cxx +++ b/extensions/source/oooimprovement/onlogrotate_job.cxx @@ -35,15 +35,21 @@ #include "soapsender.hxx" #include <com/sun/star/ucb/XSimpleFileAccess.hpp> +#include <com/sun/star/frame/XDesktop.hpp> +#include <com/sun/star/frame/XTerminateListener.hpp> #include <osl/mutex.hxx> #include <osl/thread.hxx> #include <osl/time.h> +#include <cppuhelper/implbase1.hxx> +#include <memory> using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::task; using namespace ::com::sun::star::uno; +using ::com::sun::star::frame::XTerminateListener; +using ::com::sun::star::frame::XDesktop; using ::com::sun::star::ucb::XSimpleFileAccess; using ::rtl::OUString; using ::std::vector; @@ -102,7 +108,8 @@ namespace public: OnLogRotateThread(Reference<XMultiServiceFactory> sf); virtual void SAL_CALL run(); - void disposing(); + OnLogRotateThread* disposing(); + private: Reference<XMultiServiceFactory> m_ServiceFactory; ::osl::Mutex m_ServiceFactoryMutex; @@ -135,11 +142,35 @@ namespace } } - void OnLogRotateThread::disposing() + OnLogRotateThread* OnLogRotateThread::disposing() { ::osl::Guard< ::osl::Mutex> service_factory_guard(m_ServiceFactoryMutex); m_ServiceFactory.clear(); + return this; } + + class OnLogRotateThreadWatcher : public ::cppu::WeakImplHelper1<XTerminateListener> + { + public: + OnLogRotateThreadWatcher(Reference<XMultiServiceFactory> sf) + : m_Thread(new OnLogRotateThread(sf)) + { + m_Thread->create(); + } + virtual ~OnLogRotateThreadWatcher() + { m_Thread->disposing()->terminate(); }; + + // XTerminateListener + virtual void SAL_CALL queryTermination(const EventObject&) throw(RuntimeException) + { }; + virtual void SAL_CALL notifyTermination(const EventObject&) throw(RuntimeException) + { m_Thread->disposing()->terminate(); }; + // XEventListener + virtual void SAL_CALL disposing(const EventObject&) throw(RuntimeException) + { m_Thread->disposing()->terminate(); }; + private: + ::std::auto_ptr<OnLogRotateThread> m_Thread; + }; } namespace oooimprovement @@ -163,9 +194,11 @@ namespace oooimprovement const Reference<XJobListener>& listener) throw(RuntimeException) { - OnLogRotateThread* thread = new OnLogRotateThread(m_ServiceFactory); - thread->create(); - + Reference<XDesktop> xDesktop( + m_ServiceFactory->createInstance(OUString::createFromAscii("com.sun.star.frame.Desktop")), + UNO_QUERY); + if(xDesktop.is()) + xDesktop->addTerminateListener(Reference<XTerminateListener>(new OnLogRotateThreadWatcher(m_ServiceFactory))); Any result; listener->jobFinished(Reference<XAsyncJob>(this), result); } @@ -190,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 000000000000..e133f932c199 --- /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 147089dd203c..b351f84680d7 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 de74d05060db..21389caa2bbd 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/inc/plugin/unx/mediator.hxx b/extensions/source/plugin/inc/plugin/unx/mediator.hxx index 68619db54cad..e1a7f59b5dee 100644 --- a/extensions/source/plugin/inc/plugin/unx/mediator.hxx +++ b/extensions/source/plugin/inc/plugin/unx/mediator.hxx @@ -90,10 +90,10 @@ protected: int m_nSocket; std::vector<MediatorMessage*> m_aMessageQueue; - NAMESPACE_VOS(OMutex) m_aQueueMutex; - NAMESPACE_VOS(OMutex) m_aSendMutex; + vos::OMutex m_aQueueMutex; + vos::OMutex m_aSendMutex; // only one thread can send a message at any given time - NAMESPACE_VOS(OCondition) m_aNewMessageCdtn; + vos::OCondition m_aNewMessageCdtn; MediatorListener* m_pListener; // thread to fill the queue @@ -150,7 +150,7 @@ public: } }; -class MediatorListener : public NAMESPACE_VOS( OThread ) +class MediatorListener : public vos:: OThread { friend class Mediator; private: diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx index 9044a14a9cbc..694fab30801a 100644 --- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx +++ b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx @@ -166,7 +166,7 @@ public: class PluginConnector : public Mediator { protected: - NAMESPACE_VOS(OMutex) m_aUserEventMutex; + vos::OMutex m_aUserEventMutex; static std::vector<PluginConnector*> allConnectors; diff --git a/extensions/source/plugin/unx/mediator.cxx b/extensions/source/plugin/unx/mediator.cxx index 6191fa5e897a..9ecf0f48d9f8 100644 --- a/extensions/source/plugin/unx/mediator.cxx +++ b/extensions/source/plugin/unx/mediator.cxx @@ -80,7 +80,7 @@ ULONG Mediator::SendMessage( ULONG nBytes, const char* pBytes, ULONG nMessageID if( ! m_pListener ) return 0; - NAMESPACE_VOS(OGuard) aGuard( m_aSendMutex ); + vos::OGuard aGuard( m_aSendMutex ); if( ! nMessageID ) nMessageID = m_nCurrentID; @@ -132,7 +132,7 @@ MediatorMessage* Mediator::WaitForAnswer( ULONG nMessageID ) while( m_pListener ) { { - NAMESPACE_VOS(OGuard) aGuard( m_aQueueMutex ); + vos::OGuard aGuard( m_aQueueMutex ); for( size_t i = 0; i < m_aMessageQueue.size(); i++ ) { MediatorMessage* pMessage = m_aMessageQueue[ i ]; @@ -157,7 +157,7 @@ MediatorMessage* Mediator::GetNextMessage( BOOL bWait ) { // guard must be after WaitForMessage, else the listener // cannot insert a new one -> deadlock - NAMESPACE_VOS(OGuard) aGuard( m_aQueueMutex ); + vos::OGuard aGuard( m_aQueueMutex ); for( size_t i = 0; i < m_aMessageQueue.size(); i++ ) { MediatorMessage* pMessage = m_aMessageQueue[ i ]; @@ -207,7 +207,7 @@ void MediatorListener::run() { ::vos::OGuard aMyGuard( m_aMutex ); { - NAMESPACE_VOS(OGuard) + vos::OGuard aGuard( m_pMediator->m_aQueueMutex ); MediatorMessage* pMessage = new MediatorMessage( nHeader[ 0 ], nHeader[ 1 ], pBuffer ); diff --git a/extensions/source/plugin/unx/nppapi.cxx b/extensions/source/plugin/unx/nppapi.cxx index 5e5c2dba1cf5..82be7ae3c2df 100644 --- a/extensions/source/plugin/unx/nppapi.cxx +++ b/extensions/source/plugin/unx/nppapi.cxx @@ -46,7 +46,7 @@ PluginConnector::PluginConnector( int nSocket ) : PluginConnector::~PluginConnector() { - NAMESPACE_VOS(OGuard) aGuard( m_aUserEventMutex ); + vos::OGuard aGuard( m_aUserEventMutex ); for( std::vector< PluginConnector* >::iterator it = allConnectors.begin(); it != allConnectors.end(); ++it ) { @@ -60,7 +60,7 @@ PluginConnector::~PluginConnector() IMPL_LINK( PluginConnector, NewMessageHdl, Mediator*, /*pMediator*/ ) { - NAMESPACE_VOS(OGuard) aGuard( m_aUserEventMutex ); + vos::OGuard aGuard( m_aUserEventMutex ); bool bFound = false; for( std::vector< PluginConnector* >::iterator it = allConnectors.begin(); it != allConnectors.end() && bFound == false; ++it ) @@ -87,7 +87,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ ) return 0; /* { - NAMESPACE_VOS(OGuard) aGuard( m_aUserEventMutex ); + vos::OGuard aGuard( m_aUserEventMutex ); m_aUserEventIDs.pop_front(); } */ diff --git a/extensions/source/plugin/unx/plugcon.cxx b/extensions/source/plugin/unx/plugcon.cxx index 74d8fa8bd2da..8e0183ab8c81 100644 --- a/extensions/source/plugin/unx/plugcon.cxx +++ b/extensions/source/plugin/unx/plugcon.cxx @@ -172,7 +172,7 @@ MediatorMessage* PluginConnector::WaitForAnswer( ULONG nMessageID ) while( m_pListener ) { { - NAMESPACE_VOS(OGuard) aGuard( m_aQueueMutex ); + vos::OGuard aGuard( m_aQueueMutex ); for( size_t i = 0; i < m_aMessageQueue.size(); i++ ) { MediatorMessage* pMessage = m_aMessageQueue[ i ]; diff --git a/extensions/source/plugin/util/makefile.mk b/extensions/source/plugin/util/makefile.mk index 7a8c46c01769..765941689658 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 000000000000..4a9d98f7dc7b --- /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 fb11a2bfd32c..8bd6226619bc 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 000000000000..56a8a0d7a0cf --- /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 59805b768adf..2570d5ee81f0 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 39904ef7cc51..e063789e0f0c 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 108333076e19..e67e466c5d24 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 7848b387d608..ac65993c0e12 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 8a2885fc8c69..27d97868bcf2 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 f477c4deaa1e..ace7be265fb1 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 cfa93bb35d7d..e2d57aaee57e 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 282130daea0b..24fb4e8b88db 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 b8b50e4b4a5f..a2d9003a75f4 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 ) + :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 fbf2cc38b63e..7ad5d944ce43 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 f319675d7c42..2f993fc8efca 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 9d8becfbd923..d9fe180c1ac7 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 294a43e4a9e7..82a313a70105 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 24a1d7f0a815..84cad0d9c0a9 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 c69f47bcef1a..ebb629ae39c9 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 50fbad0be2f1..c732013141e7 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 000000000000..2b606cc01c11 --- /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 9e09d4977697..d04ece5dc06f 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 80f83d03a2e6..69e508ca8d87 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 e04169e7d90e..e515a87c1b16 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 cf14f3778682..814b7475fbae 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 36d2e78956a7..2d81566d8fbb 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 304b7628b1d5..6affea7376d3 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 e389c3282460..3e188c25fe06 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 8beb5c557785..5fbbe57dc11b 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 af536befb3bf..357a223bf2b8 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/taborder.src b/extensions/source/propctrlr/taborder.src index 73f12ff3ff89..a1458f4d4016 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 7af9166510da..a7a6844973ea 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 9e59e94034a6..f0e1c69934bc 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 a89d690b7393..adeec5fd09dc 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 000000000000..57f96609d5df --- /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 6babbe48e8cd..7bdc684294ea 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 9630d7e06768..f0e1c69934bc 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 e7e8128cbc84..97e438253b42 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 ff42864e0496..519be1ff863d 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 2889257a1f1c..7b4b258ea43f 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 2c4cc338ab8a..961f0ed39cf1 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/scanner.cxx b/extensions/source/scanner/scanner.cxx index 884ee866a902..cc08b5f10c52 100644 --- a/extensions/source/scanner/scanner.cxx +++ b/extensions/source/scanner/scanner.cxx @@ -43,13 +43,14 @@ REF( XInterface ) SAL_CALL ScannerManager_CreateInstance( const REF( com::sun::s ScannerManager::ScannerManager() : mpData( NULL ) { + AcquireData(); } // ----------------------------------------------------------------------------- ScannerManager::~ScannerManager() { - DestroyData(); + ReleaseData(); } // ----------------------------------------------------------------------------- diff --git a/extensions/source/scanner/scanner.hxx b/extensions/source/scanner/scanner.hxx index 6ca0804d1c33..3453598974a7 100644 --- a/extensions/source/scanner/scanner.hxx +++ b/extensions/source/scanner/scanner.hxx @@ -73,7 +73,8 @@ protected: vos::OMutex maProtector; void* mpData; - void DestroyData(); + void AcquireData(); + void ReleaseData(); public: @@ -105,7 +106,7 @@ public: void Unlock() { maProtector.release(); } void* GetData() const { return mpData; } - void SetData( void* pData ) { DestroyData(); mpData = pData; } + void SetData( void* pData ) { ReleaseData(); mpData = pData; } }; // ----------------------------------------------------------------------------- diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx index b47ddb9adbea..0a477a9dae7d 100644 --- a/extensions/source/scanner/scanunx.cxx +++ b/extensions/source/scanner/scanunx.cxx @@ -31,6 +31,7 @@ #include <sanedlg.hxx> #include <vos/thread.hxx> #include <tools/list.hxx> +#include <boost/shared_ptr.hpp> #if OSL_DEBUG_LEVEL > 1 #include <stdio.h> @@ -113,12 +114,41 @@ struct SaneHolder vos::OMutex m_aProtector; ScanError m_nError; bool m_bBusy; + + SaneHolder() : m_nError(ScanError_ScanErrorNone), m_bBusy(false) {} }; -DECLARE_LIST( SaneHolderList, SaneHolder* ) +namespace +{ + typedef std::vector< boost::shared_ptr<SaneHolder> > sanevec; + class allSanes + { + private: + int mnRefCount; + public: + sanevec m_aSanes; + allSanes() : mnRefCount(0) {} + void acquire(); + void release(); + }; + + void allSanes::acquire() + { + ++mnRefCount; + } + + void allSanes::release() + { + // was unused, now because of i99835: "Scanning interface not SANE API + // compliant" destroy all SaneHolder to get Sane Dtor called + --mnRefCount; + if (!mnRefCount) + m_aSanes.clear(); + } -static SaneHolderList allSanes; -static vos::OMutex aSaneProtector; + struct theSaneProtector : public rtl::Static<vos::OMutex, theSaneProtector> {}; + struct theSanes : public rtl::Static<allSanes, theSanes> {}; +} // ----------------- // - ScannerThread - @@ -126,7 +156,7 @@ static vos::OMutex aSaneProtector; class ScannerThread : public vos::OThread { - SaneHolder* m_pHolder; + boost::shared_ptr<SaneHolder> m_pHolder; REF( com::sun::star::lang::XEventListener ) m_xListener; ScannerManager* m_pManager; // just for the disposing call @@ -134,7 +164,7 @@ public: virtual void run(); virtual void onTerminated() { delete this; } public: - ScannerThread( SaneHolder* pHolder, + ScannerThread( boost::shared_ptr<SaneHolder> pHolder, const REF( com::sun::star::lang::XEventListener )& listener, ScannerManager* pManager ); virtual ~ScannerThread(); @@ -143,7 +173,7 @@ public: // ----------------------------------------------------------------------------- ScannerThread::ScannerThread( - SaneHolder* pHolder, + boost::shared_ptr<SaneHolder> pHolder, const REF( com::sun::star::lang::XEventListener )& listener, ScannerManager* pManager ) : m_pHolder( pHolder ), m_xListener( listener ), m_pManager( pManager ) @@ -192,16 +222,16 @@ void ScannerThread::run() // - ScannerManager - // ------------------ -void ScannerManager::DestroyData() +void ScannerManager::AcquireData() { - // was unused, now because of i99835: "Scanning interface not SANE API compliant" - // delete all SaneHolder to get Sane Dtor called - int i; - for ( i = allSanes.Count(); i > 0; i-- ) - { - SaneHolder *pSaneHolder = allSanes.GetObject(i-1); - if ( pSaneHolder ) delete pSaneHolder; - } + vos::OGuard aGuard( theSaneProtector::get() ); + theSanes::get().acquire(); +} + +void ScannerManager::ReleaseData() +{ + vos::OGuard aGuard( theSaneProtector::get() ); + theSanes::get().release(); } // ----------------------------------------------------------------------------- @@ -224,17 +254,14 @@ SEQ( sal_Int8 ) ScannerManager::getDIB() throw() SEQ( ScannerContext ) ScannerManager::getAvailableScanners() throw() { - vos::OGuard aGuard( aSaneProtector ); + vos::OGuard aGuard( theSaneProtector::get() ); + sanevec &rSanes = theSanes::get().m_aSanes; - if( ! allSanes.Count() ) + if( rSanes.empty() ) { - SaneHolder* pSaneHolder = new SaneHolder; - pSaneHolder->m_nError = ScanError_ScanErrorNone; - pSaneHolder->m_bBusy = false; + boost::shared_ptr<SaneHolder> pSaneHolder(new SaneHolder); if( Sane::IsSane() ) - allSanes.Insert( pSaneHolder ); - else - delete pSaneHolder; + rSanes.push_back( pSaneHolder ); } if( Sane::IsSane() ) @@ -252,20 +279,21 @@ SEQ( ScannerContext ) ScannerManager::getAvailableScanners() throw() BOOL ScannerManager::configureScanner( ScannerContext& scanner_context ) throw( ScannerException ) { - vos::OGuard aGuard( aSaneProtector ); + vos::OGuard aGuard( theSaneProtector::get() ); + sanevec &rSanes = theSanes::get().m_aSanes; #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "ScannerManager::configureScanner\n" ); #endif - if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= allSanes.Count() ) + if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= rSanes.size() ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner does not exist" ), REF( XScannerManager )( this ), ScanError_InvalidContext ); - SaneHolder* pHolder = allSanes.GetObject( scanner_context.InternalData ); + boost::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData]; if( pHolder->m_bBusy ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner is busy" ), @@ -286,19 +314,20 @@ BOOL ScannerManager::configureScanner( ScannerContext& scanner_context ) throw( void ScannerManager::startScan( const ScannerContext& scanner_context, const REF( com::sun::star::lang::XEventListener )& listener ) throw( ScannerException ) { - vos::OGuard aGuard( aSaneProtector ); + vos::OGuard aGuard( theSaneProtector::get() ); + sanevec &rSanes = theSanes::get().m_aSanes; #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "ScannerManager::startScan\n" ); #endif - if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= allSanes.Count() ) + if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= rSanes.size() ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner does not exist" ), REF( XScannerManager )( this ), ScanError_InvalidContext ); - SaneHolder* pHolder = allSanes.GetObject( scanner_context.InternalData ); + boost::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData]; if( pHolder->m_bBusy ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner is busy" ), @@ -315,16 +344,17 @@ void ScannerManager::startScan( const ScannerContext& scanner_context, ScanError ScannerManager::getError( const ScannerContext& scanner_context ) throw( ScannerException ) { - vos::OGuard aGuard( aSaneProtector ); + vos::OGuard aGuard( theSaneProtector::get() ); + sanevec &rSanes = theSanes::get().m_aSanes; - if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= allSanes.Count() ) + if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= rSanes.size() ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner does not exist" ), REF( XScannerManager )( this ), ScanError_InvalidContext ); - SaneHolder* pHolder = allSanes.GetObject( scanner_context.InternalData ); + boost::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData]; return pHolder->m_nError; } @@ -333,15 +363,16 @@ ScanError ScannerManager::getError( const ScannerContext& scanner_context ) thro REF( AWT::XBitmap ) ScannerManager::getBitmap( const ScannerContext& scanner_context ) throw( ScannerException ) { - vos::OGuard aGuard( aSaneProtector ); + vos::OGuard aGuard( theSaneProtector::get() ); + sanevec &rSanes = theSanes::get().m_aSanes; - if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= allSanes.Count() ) + if( scanner_context.InternalData < 0 || (ULONG)scanner_context.InternalData >= rSanes.size() ) throw ScannerException( ::rtl::OUString::createFromAscii( "Scanner does not exist" ), REF( XScannerManager )( this ), ScanError_InvalidContext ); - SaneHolder* pHolder = allSanes.GetObject( scanner_context.InternalData ); + boost::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData]; vos::OGuard aProtGuard( pHolder->m_aProtector ); diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx index e14fffa87d0c..f245cc95d1f6 100644 --- a/extensions/source/scanner/scanwin.cxx +++ b/extensions/source/scanner/scanwin.cxx @@ -74,10 +74,7 @@ using namespace ::com::sun::star; #define FIXTODOUBLE( nFix ) ((double)nFix.Whole+(double)nFix.Frac/65536.) #define FIXTOLONG( nFix ) ((long)floor(FIXTODOUBLE(nFix)+0.5)) -#if defined WIN -#define TWAIN_LIBNAME "TWAIN.DLL" -#define TWAIN_FUNCNAME "DSM_Entry" -#elif defined WNT +#if defined WNT #define TWAIN_LIBNAME "TWAIN_32.DLL" #define TWAIN_FUNCNAME "DSM_Entry" #endif @@ -109,7 +106,7 @@ class ImpTwain : public ::cppu::WeakImplHelper1< util::XCloseListener > TW_IDENTITY aSrcIdent; Link aNotifyLink; DSMENTRYPROC pDSM; - NAMESPACE_VOS( OModule )* pMod; + vos:: OModule * pMod; ULONG nCurState; HWND hTwainWnd; HHOOK hTwainHook; @@ -887,7 +884,11 @@ static Twain aTwain; // - ScannerManager - // ------------------ -void ScannerManager::DestroyData() +void ScannerManager::AcquireData() +{ +} + +void ScannerManager::ReleaseData() { if( mpData ) { @@ -979,7 +980,7 @@ SEQ( sal_Int8 ) ScannerManager::getDIB() throw() } GlobalUnlock( hDIB ); - DestroyData(); + ReleaseData(); } return aRet; @@ -1009,7 +1010,7 @@ BOOL SAL_CALL ScannerManager::configureScanner( ScannerContext& rContext ) if( rContext.InternalData != 0 || rContext.ScannerName != ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TWAIN" ) ) ) throw ScannerException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Scanner does not exist" ) ), xThis, ScanError_InvalidContext ); - DestroyData(); + ReleaseData(); return aTwain.SelectSource( *this ); } @@ -1025,7 +1026,7 @@ void SAL_CALL ScannerManager::startScan( const ScannerContext& rContext, const u if( rContext.InternalData != 0 || rContext.ScannerName != ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TWAIN" ) ) ) throw ScannerException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Scanner does not exist" ) ), xThis, ScanError_InvalidContext ); - DestroyData(); + ReleaseData(); aTwain.PerformTransfer( *this, rxListener ); } diff --git a/extensions/source/scanner/scn.component b/extensions/source/scanner/scn.component new file mode 100644 index 000000000000..d7daf3ae36d4 --- /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 e7c125fe1cae..e96522002b9a 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/scanner/twain.cxx b/extensions/source/scanner/twain.cxx index b11f2725501e..d0fcaf411d6a 100644 --- a/extensions/source/scanner/twain.cxx +++ b/extensions/source/scanner/twain.cxx @@ -31,7 +31,7 @@ #include <string.h> #include <math.h> -#if defined( WNT ) || defined (WIN) +#if defined( WNT ) #include <tools/svwin.h> #endif #ifdef OS2 @@ -52,10 +52,7 @@ #define FIXTODOUBLE( nFix ) ((double)nFix.Whole+(double)nFix.Frac/65536.) #define FIXTOLONG( nFix ) ((long)floor(FIXTODOUBLE(nFix)+0.5)) -#if defined WIN -#define TWAIN_LIBNAME "TWAIN.DLL" -#define TWAIN_FUNCNAME "DSM_Entry" -#elif defined WNT +#if defined WNT #define TWAIN_LIBNAME "TWAIN_32.DLL" #define TWAIN_FUNCNAME "DSM_Entry" #elif defined OS2 @@ -242,7 +239,7 @@ void ImpTwain::ImplOpenSourceManager() { if( 1 == nCurState ) { - pMod = new NAMESPACE_VOS( OModule )(); + pMod = new vos:: OModule (); if( pMod->load( TWAIN_LIBNAME ) ) { diff --git a/extensions/source/scanner/twain.hxx b/extensions/source/scanner/twain.hxx index 7599f86d7813..6f4605f5f796 100644 --- a/extensions/source/scanner/twain.hxx +++ b/extensions/source/scanner/twain.hxx @@ -57,7 +57,7 @@ class ImpTwain Link aNotifyLink; Bitmap aBitmap; DSMENTRYPROC pDSM; - NAMESPACE_VOS( OModule )* pMod; + vos:: OModule * pMod; ULONG nCurState; void ImplCreate(); diff --git a/extensions/source/svg/svguno.cxx b/extensions/source/svg/svguno.cxx index cb76e80d9319..5e4281ca2e28 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 9f5f544102dd..47da869ea11e 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/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx index 2444637515d4..9a87779e0999 100644..100755 --- a/extensions/source/update/check/updatecheckjob.cxx +++ b/extensions/source/update/check/updatecheckjob.cxx @@ -327,13 +327,14 @@ void SAL_CALL UpdateCheckJob::queryTermination( lang::EventObject const & ) } //------------------------------------------------------------------------------ -void SAL_CALL UpdateCheckJob::notifyTermination( lang::EventObject const & rEvt ) +void SAL_CALL UpdateCheckJob::notifyTermination( lang::EventObject const & ) throw ( uno::RuntimeException ) { if ( m_pInitThread.get() != 0 ) + { m_pInitThread->setTerminating(); - - disposing( rEvt ); + m_pInitThread->join(); + } } } // anonymous namespace @@ -387,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 bb38c34a0b4e..581c6d81c6fa 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/updchk.uno.component b/extensions/source/update/check/updchk.uno.component new file mode 100644 index 000000000000..b1eb32917eaf --- /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 7e12970ddef1..6361f20bdd73 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 000000000000..2d53ff5f9398 --- /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 e5eb490e29a2..12af008ee853 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 c4826efba9ca..5ea6994d3d22 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 a2a8c31908fc..a6fe8fb27d32 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -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 000000000000..bd533e30d1f3 --- /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 0a021027f4b4..fa54df738b58 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 000000000000..456ff33b6c06 --- /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 ba4044a54e6b..98d11238fb73 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*/ ) { |