sb132: merged in DEV300_m89
This commit is contained in:
commit
a77fe39fbb
@ -3,3 +3,4 @@
|
||||
..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl
|
||||
..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
|
||||
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
|
||||
..\%__SRC%\misc\ctl.component %_DEST%\xml%_EXT%\ctl.component
|
||||
|
@ -92,59 +92,6 @@ using namespace ::com::sun::star::registry ;
|
||||
return Reference< XInterface >( *(OWeakObject*)(new CLASS( rServiceManager )) ); \
|
||||
}
|
||||
|
||||
//******************************************************************************************************************************
|
||||
#define COMPONENT_INFO(CLASS) \
|
||||
\
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[start]\n" ) \
|
||||
try \
|
||||
{ \
|
||||
/* Set default result of follow operations !!! */ \
|
||||
bReturn = sal_False ; \
|
||||
\
|
||||
/* Do the follow only, if given key is valid ! */ \
|
||||
if ( xKey.is () ) \
|
||||
{ \
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txkey is valid ...\n" ) \
|
||||
/* Build new keyname */ \
|
||||
sKeyName = OUString::createFromAscii( "/" ) ; \
|
||||
sKeyName += CLASS::impl_getStaticImplementationName() ; \
|
||||
sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ); \
|
||||
\
|
||||
/* Create new key with new name. */ \
|
||||
xNewKey = xKey->createKey( sKeyName ); \
|
||||
\
|
||||
/* If this new key valid ... */ \
|
||||
if ( xNewKey.is () ) \
|
||||
{ \
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txNewkey is valid ...\n" ) \
|
||||
/* Get information about supported services. */ \
|
||||
seqServiceNames = CLASS::impl_getStaticSupportedServiceNames() ; \
|
||||
pArray = seqServiceNames.getArray() ; \
|
||||
nLength = seqServiceNames.getLength() ; \
|
||||
nCounter = 0 ; \
|
||||
\
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tloop ..." ) \
|
||||
/* Then set this information on this key. */ \
|
||||
for ( nCounter = 0; nCounter < nLength; ++nCounter ) \
|
||||
{ \
|
||||
xNewKey->createKey( pArray [nCounter] ); \
|
||||
} \
|
||||
AS_DBG_OUT ( " OK\n" ) \
|
||||
\
|
||||
/* Result of this operations = OK. */ \
|
||||
bReturn = sal_True ; \
|
||||
} \
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xNewKey\n" ) \
|
||||
} \
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xKey\n" ) \
|
||||
} \
|
||||
catch( InvalidRegistryException& ) \
|
||||
{ \
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tInvalidRegistryException detected!!!\n" ) \
|
||||
bReturn = sal_False ; \
|
||||
} \
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[end]\n" )
|
||||
|
||||
//******************************************************************************************************************************
|
||||
#define CREATEFACTORY_ONEINSTANCE(CLASS) \
|
||||
\
|
||||
@ -217,53 +164,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_
|
||||
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
|
||||
}
|
||||
|
||||
//______________________________________________________________________________________________________________
|
||||
// write component info to registry
|
||||
//______________________________________________________________________________________________________________
|
||||
|
||||
extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/ ,
|
||||
void* pRegistryKey )
|
||||
{
|
||||
AS_DBG_OUT ( "component_writeInfo():\t[start]\n" )
|
||||
|
||||
// Set default return value for this operation - if it failed.
|
||||
sal_Bool bReturn = sal_False ;
|
||||
|
||||
if ( pRegistryKey != NULL )
|
||||
{
|
||||
AS_DBG_OUT ( "component_writeInfo():\t\tpRegistryKey is valid ... enter scope\n" )
|
||||
|
||||
// Define variables for following macros!
|
||||
// bReturn is set automaticly.
|
||||
Reference< XRegistryKey > xKey( reinterpret_cast< XRegistryKey* >( pRegistryKey ) ) ;
|
||||
Reference< XRegistryKey > xNewKey ;
|
||||
Sequence< OUString > seqServiceNames ;
|
||||
const OUString* pArray ;
|
||||
sal_Int32 nLength ;
|
||||
sal_Int32 nCounter ;
|
||||
OUString sKeyName ;
|
||||
|
||||
//=============================================================================
|
||||
// Add new macro line to register new services.
|
||||
//
|
||||
// !!! ATTENTION !!!
|
||||
// Write no ";" at end of line! (see macro)
|
||||
//=============================================================================
|
||||
COMPONENT_INFO ( FrameControl )
|
||||
COMPONENT_INFO ( ProgressBar )
|
||||
COMPONENT_INFO ( ProgressMonitor )
|
||||
COMPONENT_INFO ( StatusIndicator )
|
||||
//=============================================================================
|
||||
|
||||
AS_DBG_OUT ( "component_writeInfo():\t\t... leave pRegistryKey scope\n" )
|
||||
}
|
||||
|
||||
AS_DBG_OUT ( "component_writeInfo():\t[end]\n" )
|
||||
|
||||
// Return with result of this operation.
|
||||
return bReturn ;
|
||||
}
|
||||
|
||||
//______________________________________________________________________________________________________________
|
||||
// create right component factory
|
||||
//______________________________________________________________________________________________________________
|
||||
|
43
UnoControls/util/ctl.component
Normal file
43
UnoControls/util/ctl.component
Normal file
@ -0,0 +1,43 @@
|
||||
<?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="stardiv.UnoControls.FrameControl">
|
||||
<service name="com.sun.star.frame.FrameControl"/>
|
||||
</implementation>
|
||||
<implementation name="stardiv.UnoControls.ProgressBar">
|
||||
<service name="com.sun.star.awt.XProgressBar"/>
|
||||
</implementation>
|
||||
<implementation name="stardiv.UnoControls.ProgressMonitor">
|
||||
<service name="com.sun.star.awt.XProgressMonitor"/>
|
||||
</implementation>
|
||||
<implementation name="stardiv.UnoControls.StatusIndicator">
|
||||
<service name="com.sun.star.task.XStatusIndicator"/>
|
||||
</implementation>
|
||||
</component>
|
@ -59,3 +59,11 @@ SHL1LIBS= $(LIB1TARGET)
|
||||
|
||||
# --- Targets ------------------------------------------------------
|
||||
.INCLUDE : target.mk
|
||||
|
||||
ALLTAR : $(MISC)/ctl.component
|
||||
|
||||
$(MISC)/ctl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
|
||||
ctl.component
|
||||
$(XSLTPROC) --nonet --stringparam uri \
|
||||
'$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
|
||||
$(SOLARENV)/bin/createcomponent.xslt ctl.component
|
||||
|
@ -142,11 +142,6 @@ public class AccessBridge {
|
||||
return xSingleServiceFactory;
|
||||
}
|
||||
|
||||
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
|
||||
return FactoryHelper.writeRegistryServiceInfo(AccessBridge.class.getName(),
|
||||
_AccessBridge._serviceName, regKey);
|
||||
}
|
||||
|
||||
static public class _AccessBridge implements XTopWindowListener,
|
||||
XInitialization, XComponent {
|
||||
static final String _serviceName = "com.sun.star.accessibility.AccessBridge";
|
||||
|
@ -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.Java2"
|
||||
xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation name="org.openoffice.accessibility.AccessBridge">
|
||||
<service name="com.sun.star.accessibility.AccessBridge"/>
|
||||
</implementation>
|
||||
</component>
|
@ -53,3 +53,10 @@ CUSTOMMANIFESTFILE = manifest
|
||||
|
||||
.INCLUDE : target.mk
|
||||
|
||||
ALLTAR : $(MISC)/java_uno_accessbridge.component
|
||||
|
||||
$(MISC)/java_uno_accessbridge.component .ERRREMOVE : \
|
||||
$(SOLARENV)/bin/createcomponent.xslt java_uno_accessbridge.component
|
||||
$(XSLTPROC) --nonet --stringparam uri \
|
||||
'$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \
|
||||
$(SOLARENV)/bin/createcomponent.xslt java_uno_accessbridge.component
|
||||
|
@ -5,4 +5,4 @@
|
||||
..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
|
||||
..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%
|
||||
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
|
||||
|
||||
..\%__SRC%\misc\java_uno_accessbridge.component %_DEST%\xml\java_uno_accessbridge.component
|
||||
|
@ -21,3 +21,4 @@ mkdir: %_DEST%\inc%_EXT%\basctl
|
||||
..\uiconfig\basicide\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\menubar\*.xml
|
||||
..\uiconfig\basicide\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\toolbar\*.xml
|
||||
..\uiconfig\basicide\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\statusbar\*.xml
|
||||
..\%__SRC%\misc\basctl.component %_DEST%\xml%_EXT%\basctl.component
|
||||
|
@ -52,28 +52,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
|
||||
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
|
||||
}
|
||||
|
||||
SAL_DLLPUBLIC_EXPORT
|
||||
sal_Bool SAL_CALL component_writeInfo( void* pServiceManager ,
|
||||
void* pRegistryKey )
|
||||
{
|
||||
(void)pServiceManager;
|
||||
|
||||
Reference< ::registry::XRegistryKey >
|
||||
xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ;
|
||||
|
||||
OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
|
||||
OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
|
||||
|
||||
sal_Int32 i;
|
||||
Reference< ::registry::XRegistryKey > xNewKey;
|
||||
xNewKey = xKey->createKey( aDelimiter + SIDEModel::getImplementationName_Static() + aUnoServices );
|
||||
Sequence< OUString > aServices = SIDEModel::getSupportedServiceNames_Static();
|
||||
for(i = 0; i < aServices.getLength(); i++ )
|
||||
xNewKey->createKey( aServices.getConstArray()[i] );
|
||||
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
SAL_DLLPUBLIC_EXPORT
|
||||
void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
|
||||
void* pServiceManager,
|
||||
|
34
basctl/util/basctl.component
Normal file
34
basctl/util/basctl.component
Normal file
@ -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.basic.BasicIDE">
|
||||
<service name="com.sun.star.script.BasicIDE"/>
|
||||
</implementation>
|
||||
</component>
|
@ -4,7 +4,6 @@ UDK_3_0_0 {
|
||||
basicide_macro_organizer;
|
||||
basicide_handle_basic_error;
|
||||
component_getImplementationEnvironment;
|
||||
component_writeInfo;
|
||||
component_getFactory;
|
||||
local:
|
||||
*;
|
||||
|
@ -103,3 +103,11 @@ RESLIB1SRSFILES= $(SRSFILELIST)
|
||||
|
||||
.ENDIF # "$(header)" == ""
|
||||
|
||||
|
||||
ALLTAR : $(MISC)/basctl.component
|
||||
|
||||
$(MISC)/basctl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
|
||||
basctl.component
|
||||
$(XSLTPROC) --nonet --stringparam uri \
|
||||
'$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
|
||||
$(SOLARENV)/bin/createcomponent.xslt basctl.component
|
||||
|
@ -129,12 +129,12 @@ static string trim_string( const string& rString )
|
||||
{
|
||||
string temp = rString;
|
||||
|
||||
while ( temp.length() && temp[0] == ' ' || temp[0] == '\t' )
|
||||
while ( temp.length() && (temp[0] == ' ' || temp[0] == '\t') )
|
||||
temp.erase( 0, 1 );
|
||||
|
||||
string::size_type len = temp.length();
|
||||
|
||||
while ( len && temp[len-1] == ' ' || temp[len-1] == '\t' )
|
||||
while ( len && (temp[len-1] == ' ' || temp[len-1] == '\t') )
|
||||
{
|
||||
temp.erase( len - 1, 1 );
|
||||
len = temp.length();
|
||||
|
@ -76,6 +76,8 @@ using namespace ::com::sun::star::uno;
|
||||
using namespace ::com::sun::star::beans;
|
||||
using namespace ::com::sun::star::linguistic2;
|
||||
|
||||
using ::rtl::OUString;
|
||||
|
||||
#define C2U(cChar) ::rtl::OUString::createFromAscii(cChar)
|
||||
// struct SpellDialog_Impl ---------------------------------------------
|
||||
|
||||
@ -930,7 +932,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
|
||||
-----------------------------------------------------------------------*/
|
||||
void SpellDialog::InitUserDicts()
|
||||
{
|
||||
sal_uInt16 nLang = aLanguageLB.GetSelectLanguage();
|
||||
const LanguageType nLang = aLanguageLB.GetSelectLanguage();
|
||||
|
||||
const Reference< XDictionary > *pDic = 0;
|
||||
|
||||
@ -948,51 +950,50 @@ void SpellDialog::InitUserDicts()
|
||||
pImpl->aDics = xDicList->getDictionaries();
|
||||
}
|
||||
|
||||
// Benutzerbuecher anzeigen
|
||||
SvtLinguConfig aCfg;
|
||||
const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
|
||||
|
||||
// list suitable dictionaries
|
||||
bool bEnable = false;
|
||||
const sal_Int32 nSize = pImpl->aDics.getLength();
|
||||
pDic = pImpl->aDics.getConstArray();
|
||||
sal_Int32 i;
|
||||
delete aAddToDictMB.GetPopupMenu();
|
||||
PopupMenu* pMenu = new PopupMenu;
|
||||
for (i = 0; i < nSize; ++i )
|
||||
pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
|
||||
USHORT nItemId = 1; // menu items should be enumerated from 1 and not 0
|
||||
for (sal_Int32 i = 0; i < nSize; ++i)
|
||||
{
|
||||
Reference< XDictionary > xDic( pDic[i], UNO_QUERY );
|
||||
if (!xDic.is() || SvxGetIgnoreAllList() == xDic)
|
||||
uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY );
|
||||
if (!xDicTmp.is() || SvxGetIgnoreAllList() == xDicTmp)
|
||||
continue;
|
||||
|
||||
// add only active and not read-only dictionaries to list
|
||||
// from which to choose from
|
||||
Reference< frame::XStorable > xStor( xDic, UNO_QUERY );
|
||||
if ( xDic->isActive() && (!xStor.is() || !xStor->isReadonly()) )
|
||||
uno::Reference< frame::XStorable > xStor( xDicTmp, uno::UNO_QUERY );
|
||||
LanguageType nActLanguage = SvxLocaleToLanguage( xDicTmp->getLocale() );
|
||||
if( xDicTmp->isActive()
|
||||
&& xDicTmp->getDictionaryType() != linguistic2::DictionaryType_NEGATIVE
|
||||
&& (nLang == nActLanguage || LANGUAGE_NONE == nActLanguage )
|
||||
&& (!xStor.is() || !xStor->isReadonly()) )
|
||||
{
|
||||
sal_Bool bNegativ = xDic->getDictionaryType() == DictionaryType_NEGATIVE;
|
||||
pMenu->InsertItem( (USHORT)i + 1, ::GetDicInfoStr( xDic->getName(),
|
||||
SvxLocaleToLanguage( xDic->getLocale() ), bNegativ ) );
|
||||
pMenu->InsertItem( nItemId, xDicTmp->getName() );
|
||||
bEnable = sal_True;
|
||||
|
||||
uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY );
|
||||
if (xSvcInfo.is())
|
||||
{
|
||||
OUString aDictionaryImageUrl( aCfg.GetSpellAndGrammarContextDictionaryImage(
|
||||
xSvcInfo->getImplementationName(), bHC) );
|
||||
if (aDictionaryImageUrl.getLength() > 0)
|
||||
{
|
||||
Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) );
|
||||
pMenu->SetItemImage( nItemId, aImage );
|
||||
}
|
||||
}
|
||||
|
||||
++nItemId;
|
||||
}
|
||||
}
|
||||
aAddToDictMB.SetPopupMenu(pMenu);
|
||||
|
||||
aAddToDictMB.Disable();
|
||||
|
||||
sal_uInt16 k;
|
||||
for ( k = 0; k < pMenu->GetItemCount(); ++k )
|
||||
{
|
||||
sal_uInt16 nId = pMenu->GetItemId(k) - 1;
|
||||
sal_Bool bFound = sal_False;
|
||||
|
||||
const sal_uInt16 nDicLang = SvxLocaleToLanguage( pDic[nId]->getLocale() );
|
||||
const sal_Bool bDicNegativ =
|
||||
pDic[nId]->getDictionaryType() == DictionaryType_NEGATIVE;
|
||||
// Stimmt die Sprache "uberein, dann enable
|
||||
if ((nDicLang == nLang || nDicLang == LANGUAGE_NONE) && !bDicNegativ)
|
||||
bFound = sal_True;
|
||||
|
||||
if (bFound)
|
||||
{
|
||||
aAddToDictMB.Enable();
|
||||
break;
|
||||
}
|
||||
}
|
||||
aAddToDictMB.Enable( bEnable );
|
||||
}
|
||||
/*-- 20.10.2003 15:31:06---------------------------------------------------
|
||||
|
||||
@ -1000,31 +1001,39 @@ void SpellDialog::InitUserDicts()
|
||||
IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton )
|
||||
{
|
||||
aSentenceED.UndoActionStart( SPELLUNDO_CHANGE_GROUP );
|
||||
USHORT nItem = pButton->GetCurItemId();
|
||||
|
||||
//GetErrorText() returns the current error even if the text is already
|
||||
//manually changed
|
||||
String sNewWord= aSentenceED.GetErrorText();
|
||||
const String aNewWord= aSentenceED.GetErrorText();
|
||||
|
||||
USHORT nItemId = pButton->GetCurItemId();
|
||||
PopupMenu *pMenu = pButton->GetPopupMenu();
|
||||
String aDicName ( pMenu->GetItemText( nItemId ) );
|
||||
|
||||
uno::Reference< linguistic2::XDictionary > xDic;
|
||||
uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
|
||||
if (xDicList.is())
|
||||
xDic = xDicList->getDictionaryByName( aDicName );
|
||||
|
||||
Reference< XDictionary > xDic( pImpl->aDics.getConstArray()[ nItem - 1 ], UNO_QUERY );
|
||||
sal_Int16 nAddRes = DIC_ERR_UNKNOWN;
|
||||
if (xDic.is())
|
||||
{
|
||||
String sTmpTxt( sNewWord );
|
||||
sal_Bool bNegEntry = xDic->getDictionaryType() == DictionaryType_NEGATIVE;
|
||||
nAddRes = linguistic::AddEntryToDic( xDic, sTmpTxt, bNegEntry,
|
||||
::rtl::OUString(), LANGUAGE_NONE );
|
||||
nAddRes = linguistic::AddEntryToDic( xDic, aNewWord, FALSE, OUString(), LANGUAGE_NONE );
|
||||
// save modified user-dictionary if it is persistent
|
||||
uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY );
|
||||
if (xSavDic.is())
|
||||
xSavDic->store();
|
||||
|
||||
if (nAddRes == DIC_ERR_NONE)
|
||||
{
|
||||
SpellUndoAction_Impl* pAction = new SpellUndoAction_Impl(
|
||||
SPELLUNDO_CHANGE_ADD_TO_DICTIONARY, aDialogUndoLink);
|
||||
pAction->SetDictionary( xDic );
|
||||
pAction->SetAddedWord(sTmpTxt);
|
||||
pAction->SetAddedWord( aNewWord );
|
||||
aSentenceED.AddUndoAction( pAction );
|
||||
}
|
||||
// failed because there is already an entry?
|
||||
if (DIC_ERR_NONE != nAddRes && xDic->getEntry( sTmpTxt ).is())
|
||||
if (DIC_ERR_NONE != nAddRes && xDic->getEntry( aNewWord ).is())
|
||||
nAddRes = DIC_ERR_NONE;
|
||||
}
|
||||
if (DIC_ERR_NONE != nAddRes)
|
||||
@ -1032,8 +1041,6 @@ IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton )
|
||||
SvxDicError( this, nAddRes );
|
||||
return 0; // Nicht weitermachen
|
||||
}
|
||||
// nach dem Aufnehmen ggf. '='-Zeichen entfernen
|
||||
sNewWord.EraseAllChars( sal_Unicode( '=' ) );
|
||||
|
||||
// go on
|
||||
SpellContinue_Impl();
|
||||
|
@ -57,6 +57,7 @@
|
||||
#include <i18npool/mslangid.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <osl/file.hxx>
|
||||
#include <svl/lngmisc.hxx>
|
||||
|
||||
|
||||
#include <stack>
|
||||
@ -73,36 +74,6 @@ using ::rtl::OUString;
|
||||
#define A2S(x) String::CreateFromAscii( x )
|
||||
|
||||
|
||||
|
||||
// GetReplaceEditString -------------------------------
|
||||
|
||||
static void GetReplaceEditString( String &rText )
|
||||
{
|
||||
// The strings returned by the thesaurus saometimes have some
|
||||
// explanation text put in between '(' and ')' or a trailing '*'.
|
||||
// These parts should not be put in the ReplaceEdit Text that may get
|
||||
// inserted into the document. Thus we strip them from the text.
|
||||
|
||||
xub_StrLen nPos = rText.Search( sal_Unicode('(') );
|
||||
while (STRING_NOTFOUND != nPos)
|
||||
{
|
||||
xub_StrLen nEnd = rText.Search( sal_Unicode(')'), nPos );
|
||||
if (STRING_NOTFOUND != nEnd)
|
||||
rText.Erase( nPos, nEnd-nPos+1 );
|
||||
else
|
||||
break;
|
||||
nPos = rText.Search( sal_Unicode('(') );
|
||||
}
|
||||
|
||||
nPos = rText.Search( sal_Unicode('*') );
|
||||
if (STRING_NOTFOUND != nPos)
|
||||
rText.Erase( nPos );
|
||||
|
||||
// remove any possible remaining ' ' that may confuse the thesaurus
|
||||
// when it gets called with the text
|
||||
rText.EraseLeadingAndTrailingChars( sal_Unicode(' ') );
|
||||
}
|
||||
|
||||
// class LookUpComboBox_Impl --------------------------------------------------
|
||||
|
||||
LookUpComboBox_Impl::LookUpComboBox_Impl(
|
||||
@ -488,7 +459,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, WordSelectHdl_Impl, ComboBox *, pBox )
|
||||
{
|
||||
USHORT nPos = pBox->GetSelectEntryPos();
|
||||
String aStr( pBox->GetEntry( nPos ) );
|
||||
GetReplaceEditString( aStr );
|
||||
aStr = linguistic::GetThesaurusReplaceText( aStr );
|
||||
aWordCB.SetText( aStr );
|
||||
LookUp_Impl();
|
||||
}
|
||||
@ -507,7 +478,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl, SvxCheckListBox
|
||||
if (pData && !pData->IsHeader())
|
||||
{
|
||||
aStr = pData->GetText();
|
||||
GetReplaceEditString( aStr );
|
||||
aStr = linguistic::GetThesaurusReplaceText( aStr );
|
||||
}
|
||||
aReplaceEdit.SetText( aStr );
|
||||
}
|
||||
@ -525,7 +496,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckLis
|
||||
if (pData && !pData->IsHeader())
|
||||
{
|
||||
aStr = pData->GetText();
|
||||
GetReplaceEditString( aStr );
|
||||
aStr = linguistic::GetThesaurusReplaceText( aStr );
|
||||
}
|
||||
|
||||
aWordCB.SetText( aStr );
|
||||
|
6
cui/source/options/webconninfo.cxx
Normal file → Executable file
6
cui/source/options/webconninfo.cxx
Normal file → Executable file
@ -311,10 +311,8 @@ IMPL_LINK( WebConnectionInfoDialog, ChangePasswordHdl, PushButton*, EMPTYARG )
|
||||
::rtl::OUString aURL = m_aPasswordsLB.GetEntryText( pEntry, 0 );
|
||||
::rtl::OUString aUserName = m_aPasswordsLB.GetEntryText( pEntry, 1 );
|
||||
|
||||
::comphelper::DocPasswordRequest* pPasswordRequest
|
||||
= new ::comphelper::DocPasswordRequest(
|
||||
::comphelper::DocPasswordRequestType_STANDARD,
|
||||
task::PasswordRequestMode_PASSWORD_CREATE, aURL );
|
||||
::comphelper::SimplePasswordRequest* pPasswordRequest
|
||||
= new ::comphelper::SimplePasswordRequest( task::PasswordRequestMode_PASSWORD_CREATE );
|
||||
uno::Reference< task::XInteractionRequest > rRequest( pPasswordRequest );
|
||||
|
||||
uno::Reference< task::XInteractionHandler > xInteractionHandler(
|
||||
|
@ -1 +1,2 @@
|
||||
..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
|
||||
..\%__SRC%\misc\emser.component %_DEST%\xml%_EXT%\emser.component
|
||||
|
@ -95,34 +95,6 @@ void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServic
|
||||
return pRet;
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey )
|
||||
{
|
||||
if (pRegistryKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
uno::Reference< registry::XRegistryKey > xKey( reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ) );
|
||||
|
||||
uno::Reference< registry::XRegistryKey > xNewKey;
|
||||
|
||||
xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) +
|
||||
EmbedServer_getImplementationName() +
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) );
|
||||
|
||||
uno::Sequence< ::rtl::OUString > rServices = EmbedServer_getSupportedServiceNames();
|
||||
for( sal_Int32 ind = 0; ind < rServices.getLength(); ind++ )
|
||||
xNewKey->createKey( rServices.getConstArray()[ind] );
|
||||
|
||||
return sal_True;
|
||||
}
|
||||
catch (registry::InvalidRegistryException &)
|
||||
{
|
||||
OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
|
||||
}
|
||||
}
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
// Fix strange warnings about some
|
||||
|
34
embedserv/util/emser.component
Normal file
34
embedserv/util/emser.component
Normal file
@ -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.ole.EmbedServer">
|
||||
<service name="com.sun.star.document.OleEmbeddedServerRegistration"/>
|
||||
</implementation>
|
||||
</component>
|
@ -1,3 +1,2 @@
|
||||
component_getImplementationEnvironment
|
||||
component_writeInfo
|
||||
component_getFactory
|
||||
|
@ -94,3 +94,11 @@ DEF1EXPORTFILE= exports.dxp
|
||||
.INCLUDE : target.mk
|
||||
|
||||
|
||||
|
||||
ALLTAR : $(MISC)/emser.component
|
||||
|
||||
$(MISC)/emser.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
|
||||
emser.component
|
||||
$(XSLTPROC) --nonet --stringparam uri \
|
||||
'$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
|
||||
$(SOLARENV)/bin/createcomponent.xslt emser.component
|
||||
|
@ -22,6 +22,7 @@ mkdir: %_DEST%\bin%_EXT%\so
|
||||
..\%__SRC%\bin\npsoplugin_so.dll %_DEST%\bin%_EXT%\so\npsoplugin.dll
|
||||
..\%__SRC%\bin\x64\so_activex.dll %_DEST%\bin%_EXT%\so_activex_x64.dll
|
||||
..\%__SRC%\bin\mdibundle.zip %_DEST%\bin%_EXT%\mdibundle.zip
|
||||
..\%__SRC%\misc\oleautobridge.component %_DEST%\xml%_EXT%\oleautobridge.component
|
||||
|
||||
..\source\bibliography\uiconfig\sbibliography\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sbibliography\menubar\*.xml
|
||||
|
||||
@ -39,3 +40,19 @@ mkdir: %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\Logging
|
||||
..\%__SRC%\misc\registry\spool\org\openoffice\Office\Logging\*.xcu %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\Logging
|
||||
|
||||
..\%__SRC%\bin\*.oxt %_DEST%\pck%_EXT%\*
|
||||
..\%__SRC%\misc\abp.component %_DEST%\xml%_EXT%\abp.component
|
||||
..\%__SRC%\misc\bib.component %_DEST%\xml%_EXT%\bib.component
|
||||
..\%__SRC%\misc\dbp.component %_DEST%\xml%_EXT%\dbp.component
|
||||
..\%__SRC%\misc\ldapbe2.component %_DEST%\xml%_EXT%\ldapbe2.component
|
||||
..\%__SRC%\misc\log.component %_DEST%\xml%_EXT%\log.component
|
||||
..\%__SRC%\misc\oooimprovecore.component %_DEST%\xml%_EXT%\oooimprovecore.component
|
||||
..\%__SRC%\misc\oooimprovement.component %_DEST%\xml%_EXT%\oooimprovement.component
|
||||
..\%__SRC%\misc\pcr.component %_DEST%\xml%_EXT%\pcr.component
|
||||
..\%__SRC%\misc\pl.component %_DEST%\xml%_EXT%\pl.component
|
||||
..\%__SRC%\misc\preload.component %_DEST%\xml%_EXT%\preload.component
|
||||
..\%__SRC%\misc\res.component %_DEST%\xml%_EXT%\res.component
|
||||
..\%__SRC%\misc\scn.component %_DEST%\xml%_EXT%\scn.component
|
||||
..\%__SRC%\misc\updatefeed.component %_DEST%\xml%_EXT%\updatefeed.component
|
||||
..\%__SRC%\misc\updchk.component %_DEST%\xml%_EXT%\updchk.component
|
||||
..\%__SRC%\misc\updchk.uno.component %_DEST%\xml%_EXT%\updchk.uno.component
|
||||
..\%__SRC%\misc\xmx.component %_DEST%\xml%_EXT%\xmx.component
|
||||
|
34
extensions/source/abpilot/abp.component
Normal file
34
extensions/source/abpilot/abp.component
Normal file
@ -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>
|
@ -65,27 +65,6 @@ component_getImplementationEnvironment(
|
||||
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
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,
|
||||
|
@ -1,3 +1,2 @@
|
||||
component_getImplementationEnvironment
|
||||
component_writeInfo
|
||||
component_getFactory
|
||||
|
@ -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
|
||||
|
35
extensions/source/bibliography/bib.component
Normal file
35
extensions/source/bibliography/bib.component
Normal file
@ -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>
|
@ -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*/ )
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -1,3 +1,2 @@
|
||||
component_getImplementationEnvironment
|
||||
component_writeInfo
|
||||
component_getFactory
|
||||
|
34
extensions/source/config/ldap/ldapbe2.component
Normal file
34
extensions/source/config/ldap/ldapbe2.component
Normal file
@ -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>
|
@ -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
|
||||
|
40
extensions/source/dbpilots/dbp.component
Normal file
40
extensions/source/dbpilots/dbp.component
Normal file
@ -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>
|
@ -69,27 +69,6 @@ component_getImplementationEnvironment(
|
||||
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
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,
|
||||
|
@ -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
|
||||
|
@ -237,54 +237,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,
|
||||
|
@ -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
|
||||
|
47
extensions/source/logging/log.component
Normal file
47
extensions/source/logging/log.component
Normal file
@ -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>
|
@ -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
|
||||
|
@ -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
|
||||
|
46
extensions/source/ole/oleautobridge.component
Normal file
46
extensions/source/ole/oleautobridge.component
Normal file
@ -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>
|
@ -1,4 +1,3 @@
|
||||
component_writeInfo @100
|
||||
component_getFactory @101
|
||||
component_getImplementationEnvironment @102
|
||||
component_canUnload @103
|
||||
|
@ -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*/ )
|
||||
{
|
||||
|
@ -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
|
||||
|
34
extensions/source/oooimprovecore/oooimprovecore.component
Normal file
34
extensions/source/oooimprovecore/oooimprovecore.component
Normal file
@ -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>
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -223,7 +223,7 @@ namespace oooimprovement
|
||||
Sequence<OUString> SAL_CALL OnLogRotateJob::getSupportedServiceNames_static()
|
||||
{
|
||||
Sequence<OUString> aServiceNames(1);
|
||||
aServiceNames[0] = OUString::createFromAscii("com.sun.star.task.XAsyncJob");
|
||||
aServiceNames[0] = OUString::createFromAscii("com.sun.star.task.AsyncJob");
|
||||
return aServiceNames;
|
||||
}
|
||||
|
||||
|
38
extensions/source/oooimprovement/oooimprovement.component
Normal file
38
extensions/source/oooimprovement/oooimprovement.component
Normal file
@ -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>
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
37
extensions/source/plugin/util/pl.component
Normal file
37
extensions/source/plugin/util/pl.component
Normal file
@ -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>
|
@ -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
|
||||
|
34
extensions/source/preload/preload.component
Normal file
34
extensions/source/preload/preload.component
Normal file
@ -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>
|
@ -65,27 +65,6 @@ component_getImplementationEnvironment(
|
||||
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
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,
|
||||
|
@ -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
|
||||
|
91
extensions/source/propctrlr/pcr.component
Normal file
91
extensions/source/propctrlr/pcr.component
Normal file
@ -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>
|
@ -103,27 +103,6 @@ component_getImplementationEnvironment(
|
||||
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
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,
|
||||
|
@ -1,3 +1,2 @@
|
||||
component_writeInfo
|
||||
component_getImplementationEnvironment
|
||||
component_getFactory
|
||||
|
@ -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
|
||||
|
38
extensions/source/resource/res.component
Normal file
38
extensions/source/resource/res.component
Normal file
@ -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>
|
@ -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*/ )
|
||||
{
|
||||
|
@ -1,3 +1,2 @@
|
||||
component_getImplementationEnvironment
|
||||
component_writeInfo
|
||||
component_getFactory
|
||||
|
@ -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
|
||||
|
34
extensions/source/scanner/scn.component
Normal file
34
extensions/source/scanner/scn.component
Normal file
@ -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>
|
@ -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 -
|
||||
// ------------------------
|
||||
|
@ -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 -
|
||||
// ------------------------
|
||||
|
@ -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
|
||||
|
@ -388,18 +388,6 @@ component_getImplementationEnvironment( const sal_Char **aEnvTypeName, uno_Envir
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
extern "C" sal_Bool SAL_CALL
|
||||
component_writeInfo(void *pServiceManager, void *pRegistryKey)
|
||||
{
|
||||
return cppu::component_writeInfoHelper(
|
||||
pServiceManager,
|
||||
pRegistryKey,
|
||||
kImplementations_entries
|
||||
);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
extern "C" void *
|
||||
component_getFactory(const sal_Char *pszImplementationName, void *pServiceManager, void *pRegistryKey)
|
||||
{
|
||||
|
37
extensions/source/update/check/updchk.uno.component
Normal file
37
extensions/source/update/check/updchk.uno.component
Normal file
@ -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>
|
@ -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
|
||||
|
34
extensions/source/update/feed/updatefeed.component
Normal file
34
extensions/source/update/feed/updatefeed.component
Normal file
@ -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>
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
34
extensions/source/update/ui/updchk.component
Normal file
34
extensions/source/update/ui/updchk.component
Normal file
@ -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>
|
@ -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
|
||||
|
34
extensions/source/xmlextract/xmx.component
Normal file
34
extensions/source/xmlextract/xmx.component
Normal file
@ -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>
|
@ -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*/ )
|
||||
{
|
||||
|
@ -5,3 +5,4 @@
|
||||
..\%__SRC%\bin\*.bin %_DEST%\bin%_EXT%\*.bin
|
||||
..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
|
||||
..\util\*.xml %_DEST%\xml%_EXT%\*.xml
|
||||
..\%__SRC%\misc\frm.component %_DEST%\xml%_EXT%\frm.component
|
||||
|
@ -101,21 +101,6 @@ namespace FORMS_MODULE_NAMESPACE
|
||||
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
|
||||
|
@ -106,54 +106,6 @@ namespace FORMS_MODULE_NAMESPACE
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
sal_Bool OFormsModule::writeComponentInfos(
|
||||
const Reference< XMultiServiceFactory >& /*_rxServiceManager*/,
|
||||
const Reference< XRegistryKey >& _rxRootKey)
|
||||
{
|
||||
OSL_ENSURE(_rxRootKey.is(), "OFormsModule::writeComponentInfos : invalid argument !");
|
||||
|
||||
if (!s_pImplementationNames)
|
||||
{
|
||||
OSL_ASSERT("OFormsModule::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,
|
||||
"OFormsModule::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()),
|
||||
"OFormsModule::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("OFormsModule::writeComponentInfos : something went wrong while creating the keys !");
|
||||
return sal_False;
|
||||
}
|
||||
}
|
||||
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
Reference< XInterface > OFormsModule::getComponentFactory(
|
||||
const ::rtl::OUString& _rImplementationName,
|
||||
|
@ -283,22 +283,6 @@ void ensureClassInfos()
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
void registerServiceProvider(const ::rtl::OUString& _rServiceImplName, const Sequence< ::rtl::OUString >& _rServices, XRegistryKey* _pKey)
|
||||
{
|
||||
::rtl::OUString sMainKeyName = ::rtl::OUString::createFromAscii("/");
|
||||
sMainKeyName += _rServiceImplName;
|
||||
sMainKeyName += ::rtl::OUString::createFromAscii("/UNO/SERVICES");
|
||||
Reference< XRegistryKey > xNewKey = _pKey->createKey(sMainKeyName);
|
||||
OSL_ENSURE(xNewKey.is(), "forms::registerProvider : could not create a registry key !");
|
||||
if (!xNewKey.is())
|
||||
return;
|
||||
|
||||
const ::rtl::OUString* pSupportedServices = _rServices.getConstArray();
|
||||
for (sal_Int32 i=0; i<_rServices.getLength(); ++i, ++pSupportedServices)
|
||||
xNewKey->createKey(*pSupportedServices);
|
||||
}
|
||||
|
||||
//=======================================================================================
|
||||
extern "C"
|
||||
{
|
||||
@ -341,57 +325,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const
|
||||
*_ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void* _pServiceManager, XRegistryKey* _pRegistryKey)
|
||||
{
|
||||
if (_pRegistryKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
// ========================================================================
|
||||
// the real way - use the OModule
|
||||
createRegistryInfo_FORMS();
|
||||
if ( !::frm::OFormsModule::writeComponentInfos(
|
||||
static_cast<XMultiServiceFactory*>( _pServiceManager ),
|
||||
static_cast<XRegistryKey*>( _pRegistryKey ) )
|
||||
)
|
||||
return sal_False;
|
||||
|
||||
// ========================================================================
|
||||
// a lot of stuff which is implemented "manually" here in this file
|
||||
|
||||
// collect the class infos
|
||||
ensureClassInfos();
|
||||
|
||||
// both our static sequences should have the same length ...
|
||||
sal_Int32 nClasses = s_aClassImplementationNames.getLength();
|
||||
OSL_ENSURE(s_aClassServiceNames.getLength() == nClasses,
|
||||
"forms::component_writeInfo : invalid class infos !");
|
||||
|
||||
// loop through the sequences and register the service providers
|
||||
const ::rtl::OUString* pClasses = s_aClassImplementationNames.getConstArray();
|
||||
const Sequence< ::rtl::OUString >* pServices = s_aClassServiceNames.getConstArray();
|
||||
|
||||
for (sal_Int32 i=0; i<nClasses; ++i, ++pClasses, ++pServices)
|
||||
registerServiceProvider(*pClasses, *pServices, _pRegistryKey);
|
||||
|
||||
s_aClassImplementationNames.realloc(0);
|
||||
s_aClassServiceNames.realloc(0);
|
||||
s_aFactories.realloc(0);
|
||||
|
||||
return sal_True;
|
||||
}
|
||||
catch ( InvalidRegistryException& )
|
||||
{
|
||||
OSL_ENSURE(sal_False, "forms::component_writeInfo : InvalidRegistryException !");
|
||||
}
|
||||
}
|
||||
s_aClassImplementationNames.realloc(0);
|
||||
s_aClassServiceNames.realloc(0);
|
||||
s_aFactories.realloc(0);
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* _pImplName, XMultiServiceFactory* _pServiceManager, void* /*_pRegistryKey*/)
|
||||
{
|
||||
|
255
forms/util/frm.component
Normal file
255
forms/util/frm.component
Normal file
@ -0,0 +1,255 @@
|
||||
<?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.form.ONavigationBarControl">
|
||||
<service name="com.sun.star.form.control.NavigationToolBar"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.form.ONavigationBarModel">
|
||||
<service name="com.sun.star.form.FormComponent"/>
|
||||
<service name="com.sun.star.form.FormControlModel"/>
|
||||
<service name="com.sun.star.form.component.NavigationToolBar"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.form.ORichTextControl">
|
||||
<service name="com.sun.star.form.control.RichTextControl"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.forms.FormOperations">
|
||||
<service name="com.sun.star.form.runtime.FormOperations"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.forms.ODatabaseForm">
|
||||
<service name="com.sun.star.form.FormComponent"/>
|
||||
<service name="com.sun.star.form.FormComponents"/>
|
||||
<service name="com.sun.star.form.component.DataForm"/>
|
||||
<service name="com.sun.star.form.component.Form"/>
|
||||
<service name="com.sun.star.form.component.HTMLForm"/>
|
||||
<service name="stardiv.one.form.component.Form"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.forms.OFilterControl">
|
||||
<service name="com.sun.star.awt.UnoControl"/>
|
||||
<service name="com.sun.star.form.control.FilterControl"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.forms.OFormattedFieldWrapper_ForcedFormatted">
|
||||
<service name="com.sun.star.form.binding.BindableDatabaseFormattedField"/>
|
||||
<service name="com.sun.star.form.component.DatabaseFormattedField"/>
|
||||
<service name="com.sun.star.form.component.FormattedField"/>
|
||||
<service name="stardiv.one.form.component.FormattedField"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.forms.ORichTextModel">
|
||||
<service name="com.sun.star.form.FormComponent"/>
|
||||
<service name="com.sun.star.form.FormControlModel"/>
|
||||
<service name="com.sun.star.form.component.RichTextControl"/>
|
||||
<service name="com.sun.star.style.CharacterProperties"/>
|
||||
<service name="com.sun.star.style.CharacterPropertiesAsian"/>
|
||||
<service name="com.sun.star.style.CharacterPropertiesComplex"/>
|
||||
<service name="com.sun.star.style.ParagraphProperties"/>
|
||||
<service name="com.sun.star.style.ParagraphPropertiesComplex"/>
|
||||
<service name="com.sun.star.text.TextRange"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.forms.OScrollBarModel">
|
||||
<service name="com.sun.star.form.FormComponent"/>
|
||||
<service name="com.sun.star.form.FormControlModel"/>
|
||||
<service name="com.sun.star.form.binding.BindableIntegerValueRange"/>
|
||||
<service name="com.sun.star.form.component.ScrollBar"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.forms.OSpinButtonModel">
|
||||
<service name="com.sun.star.form.FormComponent"/>
|
||||
<service name="com.sun.star.form.FormControlModel"/>
|
||||
<service name="com.sun.star.form.binding.BindableIntegerValueRange"/>
|
||||
<service name="com.sun.star.form.component.SpinButton"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.xml.xpath.XFormsExtension">
|
||||
<service name="com.sun.star.xml.xpath.XPathExtension"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.ImageProducer">
|
||||
<service name="com.sun.star.awt.ImageProducer"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.Model">
|
||||
<service name="com.sun.star.xforms.Model"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OButtonControl">
|
||||
<service name="com.sun.star.form.control.CommandButton"/>
|
||||
<service name="stardiv.one.form.control.CommandButton"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OButtonModel">
|
||||
<service name="com.sun.star.form.component.CommandButton"/>
|
||||
<service name="stardiv.one.form.component.CommandButton"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OCheckBoxControl">
|
||||
<service name="com.sun.star.form.control.CheckBox"/>
|
||||
<service name="stardiv.one.form.control.CheckBox"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OCheckBoxModel">
|
||||
<service name="com.sun.star.form.binding.BindableDatabaseCheckBox"/>
|
||||
<service name="com.sun.star.form.component.CheckBox"/>
|
||||
<service name="com.sun.star.form.component.DatabaseCheckBox"/>
|
||||
<service name="stardiv.one.form.component.CheckBox"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OComboBoxControl">
|
||||
<service name="com.sun.star.form.control.ComboBox"/>
|
||||
<service name="stardiv.one.form.control.ComboBox"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OComboBoxModel">
|
||||
<service name="com.sun.star.form.binding.BindableDatabaseComboBox"/>
|
||||
<service name="com.sun.star.form.component.ComboBox"/>
|
||||
<service name="com.sun.star.form.component.DatabaseComboBox"/>
|
||||
<service name="stardiv.one.form.component.ComboBox"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OCurrencyControl">
|
||||
<service name="com.sun.star.form.control.CurrencyField"/>
|
||||
<service name="stardiv.one.form.control.CurrencyField"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OCurrencyModel">
|
||||
<service name="com.sun.star.form.component.CurrencyField"/>
|
||||
<service name="com.sun.star.form.component.DatabaseCurrencyField"/>
|
||||
<service name="stardiv.one.form.component.CurrencyField"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.ODateControl">
|
||||
<service name="com.sun.star.form.control.DateField"/>
|
||||
<service name="stardiv.one.form.control.DateField"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.ODateModel">
|
||||
<service name="com.sun.star.form.component.DatabaseDateField"/>
|
||||
<service name="com.sun.star.form.component.DateField"/>
|
||||
<service name="stardiv.one.form.component.DateField"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OEditControl">
|
||||
<service name="com.sun.star.form.control.TextField"/>
|
||||
<service name="stardiv.one.form.control.Edit"/>
|
||||
<service name="stardiv.one.form.control.TextField"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OEditModel">
|
||||
<service name="com.sun.star.form.binding.BindableDatabaseTextField"/>
|
||||
<service name="com.sun.star.form.component.DatabaseTextField"/>
|
||||
<service name="com.sun.star.form.component.TextField"/>
|
||||
<service name="stardiv.one.form.component.TextField"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OFileControlModel">
|
||||
<service name="com.sun.star.form.component.FileControl"/>
|
||||
<service name="stardiv.one.form.component.FileControl"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OFixedTextModel">
|
||||
<service name="com.sun.star.form.component.FixedText"/>
|
||||
<service name="stardiv.one.form.component.FixedText"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OFormattedControl">
|
||||
<service name="com.sun.star.form.control.FormattedField"/>
|
||||
<service name="stardiv.one.form.control.FormattedField"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OFormattedFieldWrapper">
|
||||
<service name="stardiv.one.form.component.Edit"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OFormsCollection">
|
||||
<service name="com.sun.star.form.Forms"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OGridControlModel">
|
||||
<service name="com.sun.star.form.component.GridControl"/>
|
||||
<service name="stardiv.one.form.component.Grid"/>
|
||||
<service name="stardiv.one.form.component.GridControl"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OGroupBoxControl">
|
||||
<service name="com.sun.star.form.control.GroupBox"/>
|
||||
<service name="stardiv.one.form.control.GroupBox"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OGroupBoxModel">
|
||||
<service name="com.sun.star.form.component.GroupBox"/>
|
||||
<service name="stardiv.one.form.component.GroupBox"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OHiddenModel">
|
||||
<service name="com.sun.star.form.component.HiddenControl"/>
|
||||
<service name="stardiv.one.form.component.Hidden"/>
|
||||
<service name="stardiv.one.form.component.HiddenControl"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OImageButtonControl">
|
||||
<service name="com.sun.star.form.control.ImageButton"/>
|
||||
<service name="stardiv.one.form.control.ImageButton"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OImageButtonModel">
|
||||
<service name="com.sun.star.form.component.ImageButton"/>
|
||||
<service name="stardiv.one.form.component.ImageButton"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OImageControlControl">
|
||||
<service name="com.sun.star.form.control.ImageControl"/>
|
||||
<service name="stardiv.one.form.control.ImageControl"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OImageControlModel">
|
||||
<service name="com.sun.star.form.component.DatabaseImageControl"/>
|
||||
<service name="stardiv.one.form.component.ImageControl"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OListBoxControl">
|
||||
<service name="com.sun.star.form.control.ListBox"/>
|
||||
<service name="stardiv.one.form.control.ListBox"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OListBoxModel">
|
||||
<service name="com.sun.star.form.binding.BindableDatabaseListBox"/>
|
||||
<service name="com.sun.star.form.component.DatabaseListBox"/>
|
||||
<service name="com.sun.star.form.component.ListBox"/>
|
||||
<service name="stardiv.one.form.component.ListBox"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.ONumericControl">
|
||||
<service name="com.sun.star.form.control.NumericField"/>
|
||||
<service name="stardiv.one.form.control.NumericField"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.ONumericModel">
|
||||
<service name="com.sun.star.form.binding.BindableDatabaseNumericField"/>
|
||||
<service name="com.sun.star.form.component.DatabaseNumericField"/>
|
||||
<service name="com.sun.star.form.component.NumericField"/>
|
||||
<service name="stardiv.one.form.component.NumericField"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OPatternControl">
|
||||
<service name="com.sun.star.form.control.PatternField"/>
|
||||
<service name="stardiv.one.form.control.PatternField"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OPatternModel">
|
||||
<service name="com.sun.star.form.component.DatabasePatternField"/>
|
||||
<service name="com.sun.star.form.component.PatternField"/>
|
||||
<service name="stardiv.one.form.component.PatternField"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.ORadioButtonControl">
|
||||
<service name="com.sun.star.form.control.RadioButton"/>
|
||||
<service name="stardiv.one.form.control.RadioButton"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.ORadioButtonModel">
|
||||
<service name="com.sun.star.form.binding.BindableDatabaseRadioButton"/>
|
||||
<service name="com.sun.star.form.component.DatabaseRadioButton"/>
|
||||
<service name="com.sun.star.form.component.RadioButton"/>
|
||||
<service name="stardiv.one.form.component.RadioButton"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OTimeControl">
|
||||
<service name="com.sun.star.form.control.TimeField"/>
|
||||
<service name="stardiv.one.form.control.TimeField"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.OTimeModel">
|
||||
<service name="com.sun.star.form.component.DatabaseTimeField"/>
|
||||
<service name="com.sun.star.form.component.TimeField"/>
|
||||
<service name="stardiv.one.form.component.TimeField"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.form.XForms">
|
||||
<service name="com.sun.star.xforms.XForms"/>
|
||||
</implementation>
|
||||
</component>
|
@ -1,3 +1,2 @@
|
||||
component_writeInfo
|
||||
component_getImplementationEnvironment
|
||||
component_getFactory
|
||||
|
@ -112,3 +112,11 @@ $(MISC)$/$(SHL1TARGET).flt: makefile.mk
|
||||
@echo NavigationToolBar >>$@
|
||||
@echo ONavigationBar >>$@
|
||||
|
||||
|
||||
ALLTAR : $(MISC)/frm.component
|
||||
|
||||
$(MISC)/frm.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
|
||||
frm.component
|
||||
$(XSLTPROC) --nonet --stringparam uri \
|
||||
'$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
|
||||
$(SOLARENV)/bin/createcomponent.xslt frm.component
|
||||
|
@ -76,6 +76,7 @@ public class InstallData
|
||||
static private boolean useRtl = false;
|
||||
static private boolean installedProductMinorSet = false;
|
||||
static private boolean isDebianSystem = false;
|
||||
static private boolean useForceDebian = false; /* --force-debian */
|
||||
static private boolean debianInvestigated = false;
|
||||
static private String installType; /* custom or typical installation */
|
||||
static private String osType; /* Linux, SunOS, ... */
|
||||
@ -667,6 +668,14 @@ public class InstallData
|
||||
isDebianSystem = value;
|
||||
}
|
||||
|
||||
public boolean useForceDebian() {
|
||||
return useForceDebian;
|
||||
}
|
||||
|
||||
public void setUseForceDebian(boolean value) {
|
||||
useForceDebian = value;
|
||||
}
|
||||
|
||||
public boolean databaseQueried() {
|
||||
return databaseQueried;
|
||||
}
|
||||
|
@ -202,12 +202,13 @@ public class LinuxInstaller extends Installer {
|
||||
}
|
||||
|
||||
if ( data.isDebianSystem() ) {
|
||||
forceDebianString = "--force-debian";
|
||||
nodepsString = "--nodeps";
|
||||
|
||||
if ( data.useForceDebian() ) {
|
||||
forceDebianString = "--force-debian";
|
||||
}
|
||||
}
|
||||
|
||||
String rpmCommand = "";
|
||||
String[] rpmCommandArray;
|
||||
String databasePath = null;
|
||||
String databaseString = "";
|
||||
boolean useLocalDatabase = false;
|
||||
@ -225,130 +226,57 @@ public class LinuxInstaller extends Installer {
|
||||
useLocalDatabase = true;
|
||||
}
|
||||
|
||||
// Defining a Vector that contains the full rpm command. Then the string array can be
|
||||
// created dynamically. Otherwise there would be too many different scenarios.
|
||||
|
||||
Vector rpmVector = new Vector();
|
||||
|
||||
rpmVector.add("rpm");
|
||||
rpmVector.add("--upgrade");
|
||||
rpmVector.add("--ignoresize");
|
||||
|
||||
if ( useForce ) {
|
||||
if (useLocalDatabase) {
|
||||
rpmVector.add("--force");
|
||||
}
|
||||
|
||||
if ( ! forceDebianString.equals("") ) {
|
||||
rpmVector.add(forceDebianString);
|
||||
}
|
||||
|
||||
if ( ! nodepsString.equals("") ) {
|
||||
rpmVector.add(nodepsString);
|
||||
}
|
||||
|
||||
rpmVector.add("-vh");
|
||||
|
||||
if ( relocations != null ) {
|
||||
rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " +
|
||||
"--relocate " + relocations + " " + databaseString +
|
||||
" " + databasePath + " " + packageName;
|
||||
rpmCommandArray = new String[12];
|
||||
rpmCommandArray[0] = "rpm";
|
||||
rpmCommandArray[1] = "--upgrade";
|
||||
rpmCommandArray[2] = "--ignoresize";
|
||||
rpmCommandArray[3] = "--force";
|
||||
rpmCommandArray[4] = forceDebianString;
|
||||
rpmCommandArray[5] = nodepsString;
|
||||
rpmCommandArray[6] = "-vh";
|
||||
rpmCommandArray[7] = "--relocate";
|
||||
rpmCommandArray[8] = relocations;
|
||||
rpmCommandArray[9] = databaseString;
|
||||
rpmCommandArray[10] = databasePath;
|
||||
rpmCommandArray[11] = packageName;
|
||||
} else {
|
||||
rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " +
|
||||
databaseString + " " + databasePath + " " + packageName;
|
||||
rpmCommandArray = new String[10];
|
||||
rpmCommandArray[0] = "rpm";
|
||||
rpmCommandArray[1] = "--upgrade";
|
||||
rpmCommandArray[2] = "--ignoresize";
|
||||
rpmCommandArray[3] = "--force";
|
||||
rpmCommandArray[4] = forceDebianString;
|
||||
rpmCommandArray[5] = nodepsString;
|
||||
rpmCommandArray[6] = "-vh";
|
||||
rpmCommandArray[7] = databaseString;
|
||||
rpmCommandArray[8] = databasePath;
|
||||
rpmCommandArray[9] = packageName;
|
||||
rpmVector.add("--relocate");
|
||||
rpmVector.add(relocations);
|
||||
}
|
||||
} else {
|
||||
if ( relocations != null )
|
||||
{
|
||||
rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " +
|
||||
"--relocate " + relocations + " " + packageName;
|
||||
rpmCommandArray = new String[10];
|
||||
rpmCommandArray[0] = "rpm";
|
||||
rpmCommandArray[1] = "--upgrade";
|
||||
rpmCommandArray[2] = "--ignoresize";
|
||||
rpmCommandArray[3] = "--force";
|
||||
rpmCommandArray[4] = forceDebianString;
|
||||
rpmCommandArray[5] = nodepsString;
|
||||
rpmCommandArray[6] = "-vh";
|
||||
rpmCommandArray[7] = "--relocate";
|
||||
rpmCommandArray[8] = relocations;
|
||||
rpmCommandArray[9] = packageName;
|
||||
} else {
|
||||
rpmCommand = "rpm --upgrade --ignoresize --force " + forceDebianString + " " + nodepsString + " -vh " + packageName;
|
||||
rpmCommandArray = new String[8];
|
||||
rpmCommandArray[0] = "rpm";
|
||||
rpmCommandArray[1] = "--upgrade";
|
||||
rpmCommandArray[2] = "--ignoresize";
|
||||
rpmCommandArray[3] = "--force";
|
||||
rpmCommandArray[4] = forceDebianString;
|
||||
rpmCommandArray[5] = nodepsString;
|
||||
rpmCommandArray[6] = "-vh";
|
||||
rpmCommandArray[7] = packageName;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
if ( useLocalDatabase ) {
|
||||
if ( relocations != null ) {
|
||||
rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " +
|
||||
"--relocate " + relocations + " " + databaseString +
|
||||
" " + databasePath + " " + packageName;
|
||||
rpmCommandArray = new String[11];
|
||||
rpmCommandArray[0] = "rpm";
|
||||
rpmCommandArray[1] = "--upgrade";
|
||||
rpmCommandArray[2] = "--ignoresize";
|
||||
rpmCommandArray[3] = forceDebianString;
|
||||
rpmCommandArray[4] = nodepsString;
|
||||
rpmCommandArray[5] = "-vh";
|
||||
rpmCommandArray[6] = "--relocate";
|
||||
rpmCommandArray[7] = relocations;
|
||||
rpmCommandArray[8] = databaseString;
|
||||
rpmCommandArray[9] = databasePath;
|
||||
rpmCommandArray[10] = packageName;
|
||||
} else {
|
||||
rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " +
|
||||
databaseString + " " + databasePath + " " + packageName;
|
||||
rpmCommandArray = new String[9];
|
||||
rpmCommandArray[0] = "rpm";
|
||||
rpmCommandArray[1] = "--upgrade";
|
||||
rpmCommandArray[2] = "--ignoresize";
|
||||
rpmCommandArray[3] = forceDebianString;
|
||||
rpmCommandArray[4] = nodepsString;
|
||||
rpmCommandArray[5] = "-vh";
|
||||
rpmCommandArray[6] = databaseString;
|
||||
rpmCommandArray[7] = databasePath;
|
||||
rpmCommandArray[8] = packageName;
|
||||
}
|
||||
} else {
|
||||
if ( relocations != null )
|
||||
{
|
||||
rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " +
|
||||
"--relocate " + relocations + " " + packageName;
|
||||
rpmCommandArray = new String[9];
|
||||
rpmCommandArray[0] = "rpm";
|
||||
rpmCommandArray[1] = "--upgrade";
|
||||
rpmCommandArray[2] = "--ignoresize";
|
||||
rpmCommandArray[3] = forceDebianString;
|
||||
rpmCommandArray[4] = nodepsString;
|
||||
rpmCommandArray[5] = "-vh";
|
||||
rpmCommandArray[6] = "--relocate";
|
||||
rpmCommandArray[7] = relocations;
|
||||
rpmCommandArray[8] = packageName;
|
||||
} else {
|
||||
rpmCommand = "rpm --upgrade --ignoresize " + forceDebianString + " " + nodepsString + " -vh " + packageName;
|
||||
rpmCommandArray = new String[7];
|
||||
rpmCommandArray[0] = "rpm";
|
||||
rpmCommandArray[1] = "--upgrade";
|
||||
rpmCommandArray[2] = "--ignoresize";
|
||||
rpmCommandArray[3] = forceDebianString;
|
||||
rpmCommandArray[4] = nodepsString;
|
||||
rpmCommandArray[5] = "-vh";
|
||||
rpmCommandArray[6] = packageName;
|
||||
}
|
||||
rpmVector.add(databaseString);
|
||||
rpmVector.add(databasePath);
|
||||
}
|
||||
|
||||
rpmVector.add(packageName);
|
||||
|
||||
// Creating String and StringArray for rpm command
|
||||
|
||||
int capacity = rpmVector.size();
|
||||
|
||||
String rpmCommand = "";
|
||||
String[] rpmCommandArray = new String[capacity];
|
||||
|
||||
for (int i = 0; i < rpmVector.size(); i++) {
|
||||
rpmCommandArray[i] = (String)rpmVector.get(i);
|
||||
rpmCommand = rpmCommand + " " + (String)rpmVector.get(i);
|
||||
}
|
||||
|
||||
rpmCommand = rpmCommand.trim();
|
||||
|
||||
// Staring rpm process
|
||||
|
||||
Vector returnVector = new Vector();
|
||||
Vector returnErrorVector = new Vector();
|
||||
// int returnValue = SystemManager.executeProcessReturnVector(rpmCommand, returnVector, returnErrorVector);
|
||||
@ -407,8 +335,6 @@ public class LinuxInstaller extends Installer {
|
||||
String databasePath = data.getDatabasePath();
|
||||
String databaseString = "";
|
||||
boolean useLocalDatabase = false;
|
||||
String rpmCommand;
|
||||
String[] rpmCommandArray;
|
||||
|
||||
if (( databasePath != null ) && (! databasePath.equalsIgnoreCase("null"))) {
|
||||
databaseString = "--dbpath";
|
||||
@ -427,52 +353,53 @@ public class LinuxInstaller extends Installer {
|
||||
}
|
||||
|
||||
if ( data.isDebianSystem() ) {
|
||||
forceDebianString = "--force-debian";
|
||||
nodepsString = "--nodeps";
|
||||
|
||||
if ( data.useForceDebian() ) {
|
||||
forceDebianString = "--force-debian";
|
||||
}
|
||||
}
|
||||
|
||||
// Code duplication for isDebianSystem is necessary, because there is no valid position
|
||||
// for forceDebianString, if it is empty. This is no problem in installPackage.
|
||||
// Defining a Vector that contains the full rpm command. Then the string array can be
|
||||
// created dynamically. Otherwise there would be too many different scenarios.
|
||||
|
||||
if ( data.isDebianSystem() ) {
|
||||
Vector rpmVector = new Vector();
|
||||
|
||||
rpmVector.add("rpm");
|
||||
|
||||
if ( ! forceDebianString.equals("") ) {
|
||||
rpmVector.add(forceDebianString);
|
||||
}
|
||||
|
||||
if ( ! nodepsString.equals("") ) {
|
||||
rpmVector.add(nodepsString);
|
||||
}
|
||||
|
||||
rpmVector.add("-ev");
|
||||
|
||||
if ( useLocalDatabase ) {
|
||||
rpmCommand = "rpm " + forceDebianString + " " + nodepsString + " -ev" + " " + databaseString + " " + databasePath + " " + packageName;
|
||||
rpmCommandArray = new String[7];
|
||||
rpmCommandArray[0] = "rpm";
|
||||
rpmCommandArray[1] = forceDebianString;
|
||||
rpmCommandArray[2] = nodepsString;
|
||||
rpmCommandArray[3] = "-ev";
|
||||
rpmCommandArray[4] = databaseString;
|
||||
rpmCommandArray[5] = databasePath;
|
||||
rpmCommandArray[6] = packageName;
|
||||
} else {
|
||||
rpmCommand = "rpm " + forceDebianString + " " + nodepsString + " -ev" + " " + packageName;
|
||||
rpmCommandArray = new String[5];
|
||||
rpmCommandArray[0] = "rpm";
|
||||
rpmCommandArray[1] = forceDebianString;
|
||||
rpmCommandArray[2] = nodepsString;
|
||||
rpmCommandArray[3] = "-ev";
|
||||
rpmCommandArray[4] = packageName;
|
||||
}
|
||||
} else {
|
||||
if (useLocalDatabase) {
|
||||
rpmCommand = "rpm -ev" + " " + databaseString + " " + databasePath + " " + packageName;
|
||||
rpmCommandArray = new String[5];
|
||||
rpmCommandArray[0] = "rpm";
|
||||
rpmCommandArray[1] = "-ev";
|
||||
rpmCommandArray[2] = databaseString;
|
||||
rpmCommandArray[3] = databasePath;
|
||||
rpmCommandArray[4] = packageName;
|
||||
} else {
|
||||
rpmCommand = "rpm -ev" + " " + packageName;
|
||||
rpmCommandArray = new String[3];
|
||||
rpmCommandArray[0] = "rpm";
|
||||
rpmCommandArray[1] = "-ev";
|
||||
rpmCommandArray[2] = packageName;
|
||||
rpmVector.add(databaseString);
|
||||
rpmVector.add(databasePath);
|
||||
}
|
||||
|
||||
rpmVector.add(packageName);
|
||||
|
||||
// Creating String and StringArray for rpm command
|
||||
|
||||
int capacity = rpmVector.size();
|
||||
|
||||
String rpmCommand = "";
|
||||
String[] rpmCommandArray = new String[capacity];
|
||||
|
||||
for (int i = 0; i < rpmVector.size(); i++) {
|
||||
rpmCommandArray[i] = (String)rpmVector.get(i);
|
||||
rpmCommand = rpmCommand + " " + (String)rpmVector.get(i);
|
||||
}
|
||||
|
||||
rpmCommand = rpmCommand.trim();
|
||||
|
||||
// Starting rpm process
|
||||
|
||||
Vector returnVector = new Vector();
|
||||
Vector returnErrorVector = new Vector();
|
||||
int returnValue = ExecuteProcess.executeProcessReturnVector(rpmCommandArray, returnVector, returnErrorVector);
|
||||
|
@ -383,6 +383,17 @@ import java.util.Vector;public class LinuxHelper {
|
||||
|
||||
public void investigateDebian(InstallData data) {
|
||||
|
||||
// First check: Is this a Debian system?
|
||||
|
||||
String dpkgFile = "/usr/bin/dpkg";
|
||||
|
||||
if ( new File(dpkgFile).exists() ) {
|
||||
|
||||
data.setIsDebianSystem(true);
|
||||
|
||||
// Second check: If this is a Debian system, is "--force-debian" required? Older
|
||||
// versions do not support "--force-debian".
|
||||
|
||||
// String rpmQuery = "rpm --help;
|
||||
String[] rpmQueryArray = new String[2];
|
||||
rpmQueryArray[0] = "rpm";
|
||||
@ -397,7 +408,8 @@ import java.util.Vector;public class LinuxHelper {
|
||||
for (int i = 0; i < returnVector.size(); i++) {
|
||||
String line = (String) returnVector.get(i);
|
||||
if ( line.indexOf("force-debian") > -1 ) {
|
||||
data.setIsDebianSystem(true);
|
||||
data.setUseForceDebian(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,3 +46,8 @@ mkdir: %_DEST%\xml%_EXT%\registry\data\org\openoffice
|
||||
mkdir: %_DEST%\xml%_EXT%\registry\data\org\openoffice\Office
|
||||
..\config\*.xcu %_DEST%\xml%_EXT%\registry\data\org\openoffice\Office\*.xcu
|
||||
|
||||
..\%__SRC%\misc\MacOSXSpell.component %_DEST%\xml%_EXT%\MacOSXSpell.component
|
||||
..\%__SRC%\misc\guesslang.component %_DEST%\xml%_EXT%\guesslang.component
|
||||
..\%__SRC%\misc\hyphen.component %_DEST%\xml%_EXT%\hyphen.component
|
||||
..\%__SRC%\misc\lnth.component %_DEST%\xml%_EXT%\lnth.component
|
||||
..\%__SRC%\misc\spell.component %_DEST%\xml%_EXT%\spell.component
|
||||
|
@ -1,3 +1,2 @@
|
||||
component_getFactory
|
||||
component_getImplementationEnvironment
|
||||
component_writeInfo
|
||||
|
@ -42,9 +42,6 @@ using namespace com::sun::star::registry;
|
||||
// declaration of external RegEntry-functions defined by the service objects
|
||||
//
|
||||
|
||||
extern sal_Bool SAL_CALL Hyphenator_writeInfo(
|
||||
void * /*pServiceManager*/, XRegistryKey * pRegistryKey );
|
||||
|
||||
extern void * SAL_CALL Hyphenator_getFactory(
|
||||
const sal_Char * pImplName,
|
||||
XMultiServiceFactory * pServiceManager,
|
||||
@ -57,12 +54,6 @@ extern void * SAL_CALL Hyphenator_getFactory(
|
||||
extern "C"
|
||||
{
|
||||
|
||||
sal_Bool SAL_CALL component_writeInfo(
|
||||
void * pServiceManager, XRegistryKey * pRegistryKey )
|
||||
{
|
||||
return Hyphenator_writeInfo( pServiceManager, pRegistryKey );
|
||||
}
|
||||
|
||||
void SAL_CALL component_getImplementationEnvironment(
|
||||
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
|
||||
{
|
||||
|
@ -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.lingu.LibHnjHyphenator">
|
||||
<service name="com.sun.star.linguistic2.Hyphenator"/>
|
||||
</implementation>
|
||||
</component>
|
@ -32,7 +32,6 @@
|
||||
#include <com/sun/star/uno/Reference.h>
|
||||
#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
|
||||
|
||||
//#include <com/sun/star/linguistic2/SpellFailure.hpp>
|
||||
#include <cppuhelper/factory.hxx> // helper for factories
|
||||
#include <com/sun/star/registry/XRegistryKey.hpp>
|
||||
#include <i18npool/mslangid.hxx>
|
||||
@ -43,15 +42,12 @@
|
||||
#include <osl/mutex.hxx>
|
||||
|
||||
#include <hyphen.h>
|
||||
|
||||
#ifndef _HYPHENIMP_HXX
|
||||
#include <hyphenimp.hxx>
|
||||
#endif
|
||||
|
||||
#include <linguistic/hyphdta.hxx>
|
||||
#include <rtl/ustring.hxx>
|
||||
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <rtl/textenc.h>
|
||||
|
||||
#include <linguistic/lngprops.hxx>
|
||||
#include <unotools/pathoptions.hxx>
|
||||
@ -99,7 +95,6 @@ Hyphenator::Hyphenator() :
|
||||
pPropHelper = NULL;
|
||||
aDicts = NULL;
|
||||
numdict = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -108,8 +103,10 @@ Hyphenator::~Hyphenator()
|
||||
if (pPropHelper)
|
||||
pPropHelper->RemoveAsPropListener();
|
||||
|
||||
if ((numdict) && (aDicts)) {
|
||||
for (int i=0; i < numdict; i++) {
|
||||
if ((numdict) && (aDicts))
|
||||
{
|
||||
for (int i=0; i < numdict; i++)
|
||||
{
|
||||
if (aDicts[i].apCC) delete aDicts[i].apCC;
|
||||
aDicts[i].apCC = NULL;
|
||||
}
|
||||
@ -122,7 +119,6 @@ Hyphenator::~Hyphenator()
|
||||
|
||||
PropertyHelper_Hyphen & Hyphenator::GetPropHelper_Impl()
|
||||
{
|
||||
|
||||
if (!pPropHelper)
|
||||
{
|
||||
Reference< XPropertySet > xPropSet( GetLinguProperties(), UNO_QUERY );
|
||||
@ -212,12 +208,7 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
|
||||
|
||||
// add dictionary information
|
||||
aDicts = new HDInfo[numdict];
|
||||
/*
|
||||
aTEncs = new rtl_TextEncoding [numdict];
|
||||
aTLocs = new Locale [numdict];
|
||||
aTNames = new OUString [numdict];
|
||||
aCharSetInfo = new CharClass* [numdict];
|
||||
*/
|
||||
|
||||
k = 0;
|
||||
for (aDictIt = aDics.begin(); aDictIt != aDics.end(); ++aDictIt)
|
||||
{
|
||||
@ -233,7 +224,7 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
|
||||
for (sal_Int32 i = 0; i < nLocales; ++i)
|
||||
{
|
||||
aDicts[k].aPtr = NULL;
|
||||
aDicts[k].aEnc = 0;
|
||||
aDicts[k].eEnc = RTL_TEXTENCODING_DONTKNOW;
|
||||
aDicts[k].aLoc = MsLangId::convertLanguageToLocale(
|
||||
MsLangId::convertIsoStringToLanguage( aDictIt->aLocaleNames[i] ));
|
||||
aDicts[k].apCC = new CharClass( aDicts[k].aLoc );
|
||||
@ -288,13 +279,11 @@ sal_Bool SAL_CALL Hyphenator::hasLocale(const Locale& rLocale)
|
||||
}
|
||||
|
||||
|
||||
Reference< XHyphenatedWord > SAL_CALL
|
||||
Hyphenator::hyphenate( const ::rtl::OUString& aWord,
|
||||
Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const ::rtl::OUString& aWord,
|
||||
const ::com::sun::star::lang::Locale& aLocale,
|
||||
sal_Int16 nMaxLeading,
|
||||
const ::com::sun::star::beans::PropertyValues& aProperties )
|
||||
throw (com::sun::star::uno::RuntimeException,
|
||||
com::sun::star::lang::IllegalArgumentException)
|
||||
throw (com::sun::star::uno::RuntimeException, com::sun::star::lang::IllegalArgumentException)
|
||||
{
|
||||
int nHyphenationPos = -1;
|
||||
int nHyphenationPosAlt = -1;
|
||||
@ -311,22 +300,24 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord,
|
||||
sal_Int16 minLen = rHelper.GetMinWordLength();
|
||||
|
||||
HyphenDict *dict = NULL;
|
||||
rtl_TextEncoding aEnc = 0;
|
||||
rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
|
||||
CharClass * pCC = NULL;
|
||||
|
||||
Reference< XHyphenatedWord > xRes;
|
||||
|
||||
k = -1;
|
||||
for (int j = 0; j < numdict; j++)
|
||||
if (aLocale == aDicts[j].aLoc) k = j;
|
||||
|
||||
{
|
||||
if (aLocale == aDicts[j].aLoc)
|
||||
k = j;
|
||||
}
|
||||
|
||||
// if we have a hyphenation dictionary matching this locale
|
||||
if (k != -1) {
|
||||
|
||||
if (k != -1)
|
||||
{
|
||||
// if this dictinary has not been loaded yet do that
|
||||
if (!aDicts[k].aPtr) {
|
||||
|
||||
if (!aDicts[k].aPtr)
|
||||
{
|
||||
OUString DictFN = aDicts[k].aName + A2OU(".dic");
|
||||
OUString dictpath;
|
||||
|
||||
@ -347,21 +338,22 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord,
|
||||
return NULL;
|
||||
}
|
||||
aDicts[k].aPtr = dict;
|
||||
aDicts[k].aEnc = rtl_getTextEncodingFromUnixCharset(dict->cset);
|
||||
if (aDicts[k].aEnc == RTL_TEXTENCODING_DONTKNOW) {
|
||||
if (strcmp("ISCII-DEVANAGARI", dict->cset) == 0) {
|
||||
aDicts[k].aEnc = RTL_TEXTENCODING_ISCII_DEVANAGARI;
|
||||
} else if (strcmp("UTF-8", dict->cset) == 0) {
|
||||
aDicts[k].aEnc = RTL_TEXTENCODING_UTF8;
|
||||
}
|
||||
}
|
||||
aDicts[k].eEnc = getTextEncodingFromCharset(dict->cset);
|
||||
}
|
||||
|
||||
// other wise hyphenate the word with that dictionary
|
||||
dict = aDicts[k].aPtr;
|
||||
aEnc = aDicts[k].aEnc;
|
||||
eEnc = aDicts[k].eEnc;
|
||||
pCC = aDicts[k].apCC;
|
||||
|
||||
// we don't want to work with a default text encoding since following incorrect
|
||||
// results may occur only for specific text and thus may be hard to notice.
|
||||
// Thus better always make a clean exit here if the text encoding is in question.
|
||||
// Hopefully something not working at all will raise proper attention quickly. ;-)
|
||||
DBG_ASSERT( eEnc != RTL_TEXTENCODING_DONTKNOW, "failed to get text encoding! (maybe incorrect encoding string in file)" );
|
||||
if (eEnc == RTL_TEXTENCODING_DONTKNOW)
|
||||
return NULL;
|
||||
|
||||
sal_uInt16 ct = CAPTYPE_UNKNOWN;
|
||||
ct = capitalType(aWord, pCC);
|
||||
|
||||
@ -369,10 +361,13 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord,
|
||||
OUStringBuffer rBuf(aWord);
|
||||
sal_Int32 nc = rBuf.getLength();
|
||||
sal_Unicode ch;
|
||||
for (sal_Int32 ix=0; ix < nc; ix++) {
|
||||
for (sal_Int32 ix=0; ix < nc; ix++)
|
||||
{
|
||||
ch = rBuf.charAt(ix);
|
||||
if ((ch == 0x201C) || (ch == 0x201D)) rBuf.setCharAt(ix,(sal_Unicode)0x0022);
|
||||
if ((ch == 0x2018) || (ch == 0x2019)) rBuf.setCharAt(ix,(sal_Unicode)0x0027);
|
||||
if ((ch == 0x201C) || (ch == 0x201D))
|
||||
rBuf.setCharAt(ix,(sal_Unicode)0x0022);
|
||||
if ((ch == 0x2018) || (ch == 0x2019))
|
||||
rBuf.setCharAt(ix,(sal_Unicode)0x0027);
|
||||
}
|
||||
OUString nWord(rBuf.makeStringAndClear());
|
||||
|
||||
@ -380,7 +375,7 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord,
|
||||
OUString nTerm(makeLowerCase(nWord, pCC));
|
||||
|
||||
// now convert word to needed encoding
|
||||
OString encWord(OU2ENC(nTerm,aEnc));
|
||||
OString encWord(OU2ENC(nTerm,eEnc));
|
||||
|
||||
wordlen = encWord.getLength();
|
||||
lcword = new char[wordlen + 1];
|
||||
@ -395,18 +390,24 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord,
|
||||
|
||||
// now strip off any ending periods
|
||||
int n = wordlen-1;
|
||||
while((n >=0) && (lcword[n] == '.')) n--;
|
||||
while((n >=0) && (lcword[n] == '.'))
|
||||
n--;
|
||||
n++;
|
||||
if (n > 0) {
|
||||
if (hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL, &rep, &pos, &cut,
|
||||
minLead, minTrail, Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))),
|
||||
Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2)))))
|
||||
if (n > 0)
|
||||
{
|
||||
const bool bFailed = 0 != hnj_hyphen_hyphenate3( dict, lcword, n, hyphens, NULL,
|
||||
&rep, &pos, &cut, minLead, minTrail,
|
||||
Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))),
|
||||
Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2))) );
|
||||
if (bFailed)
|
||||
{
|
||||
//whoops something did not work
|
||||
delete[] hyphens;
|
||||
delete[] lcword;
|
||||
if (rep) {
|
||||
for(int j = 0; j < n; j++) {
|
||||
if (rep)
|
||||
{
|
||||
for(int j = 0; j < n; j++)
|
||||
{
|
||||
if (rep[j]) free(rep[j]);
|
||||
}
|
||||
free(rep);
|
||||
@ -427,44 +428,60 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord,
|
||||
{
|
||||
int leftrep = 0;
|
||||
BOOL hit = (n >= minLen);
|
||||
if (!rep || !rep[i] || (i >= n)) {
|
||||
if (!rep || !rep[i] || (i >= n))
|
||||
{
|
||||
hit = hit && (hyphens[i]&1) && (i < Leading);
|
||||
hit = hit && (i >= (minLead-1) );
|
||||
hit = hit && ((n - i - 1) >= minTrail);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// calculate change character length before hyphenation point signed with '='
|
||||
for (char * c = rep[i]; *c && (*c != '='); c++) {
|
||||
if (aEnc == RTL_TEXTENCODING_UTF8) {
|
||||
if (((unsigned char) *c) >> 6 != 2) leftrep++;
|
||||
} else leftrep++;
|
||||
for (char * c = rep[i]; *c && (*c != '='); c++)
|
||||
{
|
||||
if (eEnc == RTL_TEXTENCODING_UTF8)
|
||||
{
|
||||
if (((unsigned char) *c) >> 6 != 2)
|
||||
leftrep++;
|
||||
}
|
||||
else
|
||||
leftrep++;
|
||||
}
|
||||
hit = hit && (hyphens[i]&1) && ((i + leftrep - pos[i]) < Leading);
|
||||
hit = hit && ((i + leftrep - pos[i]) >= (minLead-1) );
|
||||
hit = hit && ((n - i - 1 + sal::static_int_cast< sal_sSize >(strlen(rep[i])) - leftrep - 1) >= minTrail);
|
||||
}
|
||||
if (hit) {
|
||||
if (hit)
|
||||
{
|
||||
nHyphenationPos = i;
|
||||
if (rep && (i < n) && rep[i]) {
|
||||
if (rep && (i < n) && rep[i])
|
||||
{
|
||||
nHyphenationPosAlt = i - pos[i];
|
||||
nHyphenationPosAltHyph = i + leftrep - pos[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (nHyphenationPos == -1) {
|
||||
if (nHyphenationPos == -1)
|
||||
{
|
||||
xRes = NULL;
|
||||
} else {
|
||||
if (rep && rep[nHyphenationPos]) {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rep && rep[nHyphenationPos])
|
||||
{
|
||||
// remove equal sign
|
||||
char * s = rep[nHyphenationPos];
|
||||
int eq = 0;
|
||||
for (; *s; s++) {
|
||||
for (; *s; s++)
|
||||
{
|
||||
if (*s == '=') eq = 1;
|
||||
if (eq) *s = *(s + 1);
|
||||
}
|
||||
OUString repHyphlow(rep[nHyphenationPos], strlen(rep[nHyphenationPos]), aEnc);
|
||||
OUString repHyphlow(rep[nHyphenationPos], strlen(rep[nHyphenationPos]), eEnc);
|
||||
OUString repHyph;
|
||||
switch (ct) {
|
||||
switch (ct)
|
||||
{
|
||||
case CAPTYPE_ALLCAP:
|
||||
{
|
||||
repHyph = makeUpperCase(repHyphlow, pCC);
|
||||
@ -472,11 +489,10 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord,
|
||||
}
|
||||
case CAPTYPE_INITCAP:
|
||||
{
|
||||
if (nHyphenationPosAlt == 0) {
|
||||
if (nHyphenationPosAlt == 0)
|
||||
repHyph = makeInitCap(repHyphlow, pCC);
|
||||
} else {
|
||||
else
|
||||
repHyph = repHyphlow;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -493,7 +509,9 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord,
|
||||
xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ), nPos,
|
||||
aWord.replaceAt(nHyphenationPosAlt + 1, cut[nHyphenationPos], repHyph),
|
||||
(INT16) nHyphenationPosAltHyph);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ),
|
||||
(INT16)nHyphenationPos, aWord, (INT16) nHyphenationPos);
|
||||
}
|
||||
@ -501,8 +519,10 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord,
|
||||
|
||||
delete[] lcword;
|
||||
delete[] hyphens;
|
||||
if (rep) {
|
||||
for(int j = 0; j < n; j++) {
|
||||
if (rep)
|
||||
{
|
||||
for(int j = 0; j < n; j++)
|
||||
{
|
||||
if (rep[j]) free(rep[j]);
|
||||
}
|
||||
free(rep);
|
||||
@ -515,13 +535,12 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord,
|
||||
}
|
||||
|
||||
|
||||
Reference < XHyphenatedWord > SAL_CALL
|
||||
Hyphenator::queryAlternativeSpelling( const ::rtl::OUString& /*aWord*/,
|
||||
Reference < XHyphenatedWord > SAL_CALL Hyphenator::queryAlternativeSpelling(
|
||||
const ::rtl::OUString& /*aWord*/,
|
||||
const ::com::sun::star::lang::Locale& /*aLocale*/,
|
||||
sal_Int16 /*nIndex*/,
|
||||
const ::com::sun::star::beans::PropertyValues& /*aProperties*/ )
|
||||
throw(::com::sun::star::lang::IllegalArgumentException,
|
||||
::com::sun::star::uno::RuntimeException)
|
||||
throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
/* alternative spelling isn't supported by tex dictionaries */
|
||||
/* XXX: OOo's extended libhjn algorithm can support alternative spellings with extended TeX dic. */
|
||||
@ -529,13 +548,10 @@ Reference < XHyphenatedWord > SAL_CALL
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference< XPossibleHyphens > SAL_CALL
|
||||
Hyphenator::createPossibleHyphens( const ::rtl::OUString& aWord,
|
||||
Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const ::rtl::OUString& aWord,
|
||||
const ::com::sun::star::lang::Locale& aLocale,
|
||||
const ::com::sun::star::beans::PropertyValues& aProperties )
|
||||
throw(::com::sun::star::lang::IllegalArgumentException,
|
||||
::com::sun::star::uno::RuntimeException)
|
||||
|
||||
throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
|
||||
{
|
||||
int wordlen;
|
||||
char *hyphens;
|
||||
@ -548,22 +564,23 @@ Reference< XPossibleHyphens > SAL_CALL
|
||||
sal_Int16 minLead = rHelper.GetMinLeading();
|
||||
|
||||
HyphenDict *dict = NULL;
|
||||
rtl_TextEncoding aEnc = 0;
|
||||
rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
|
||||
CharClass* pCC = NULL;
|
||||
|
||||
Reference< XPossibleHyphens > xRes;
|
||||
|
||||
k = -1;
|
||||
for (int j = 0; j < numdict; j++)
|
||||
{
|
||||
if (aLocale == aDicts[j].aLoc) k = j;
|
||||
|
||||
}
|
||||
|
||||
// if we have a hyphenation dictionary matching this locale
|
||||
if (k != -1) {
|
||||
|
||||
if (k != -1)
|
||||
{
|
||||
// if this dictioanry has not been loaded yet do that
|
||||
if (!aDicts[k].aPtr) {
|
||||
|
||||
if (!aDicts[k].aPtr)
|
||||
{
|
||||
OUString DictFN = aDicts[k].aName + A2OU(".dic");
|
||||
OUString dictpath;
|
||||
|
||||
@ -584,29 +601,33 @@ Reference< XPossibleHyphens > SAL_CALL
|
||||
return NULL;
|
||||
}
|
||||
aDicts[k].aPtr = dict;
|
||||
aDicts[k].aEnc = rtl_getTextEncodingFromUnixCharset(dict->cset);
|
||||
if (aDicts[k].aEnc == RTL_TEXTENCODING_DONTKNOW) {
|
||||
if (strcmp("ISCII-DEVANAGARI", dict->cset) == 0) {
|
||||
aDicts[k].aEnc = RTL_TEXTENCODING_ISCII_DEVANAGARI;
|
||||
} else if (strcmp("UTF-8", dict->cset) == 0) {
|
||||
aDicts[k].aEnc = RTL_TEXTENCODING_UTF8;
|
||||
}
|
||||
}
|
||||
aDicts[k].eEnc = getTextEncodingFromCharset(dict->cset);
|
||||
}
|
||||
|
||||
// other wise hyphenate the word with that dictionary
|
||||
dict = aDicts[k].aPtr;
|
||||
aEnc = aDicts[k].aEnc;
|
||||
eEnc = aDicts[k].eEnc;
|
||||
pCC = aDicts[k].apCC;
|
||||
|
||||
// we don't want to work with a default text encoding since following incorrect
|
||||
// results may occur only for specific text and thus may be hard to notice.
|
||||
// Thus better always make a clean exit here if the text encoding is in question.
|
||||
// Hopefully something not working at all will raise proper attention quickly. ;-)
|
||||
DBG_ASSERT( eEnc != RTL_TEXTENCODING_DONTKNOW, "failed to get text encoding! (maybe incorrect encoding string in file)" );
|
||||
if (eEnc == RTL_TEXTENCODING_DONTKNOW)
|
||||
return NULL;
|
||||
|
||||
// first handle smart quotes both single and double
|
||||
OUStringBuffer rBuf(aWord);
|
||||
sal_Int32 nc = rBuf.getLength();
|
||||
sal_Unicode ch;
|
||||
for (sal_Int32 ix=0; ix < nc; ix++) {
|
||||
for (sal_Int32 ix=0; ix < nc; ix++)
|
||||
{
|
||||
ch = rBuf.charAt(ix);
|
||||
if ((ch == 0x201C) || (ch == 0x201D)) rBuf.setCharAt(ix,(sal_Unicode)0x0022);
|
||||
if ((ch == 0x2018) || (ch == 0x2019)) rBuf.setCharAt(ix,(sal_Unicode)0x0027);
|
||||
if ((ch == 0x201C) || (ch == 0x201D))
|
||||
rBuf.setCharAt(ix,(sal_Unicode)0x0022);
|
||||
if ((ch == 0x2018) || (ch == 0x2019))
|
||||
rBuf.setCharAt(ix,(sal_Unicode)0x0027);
|
||||
}
|
||||
OUString nWord(rBuf.makeStringAndClear());
|
||||
|
||||
@ -614,7 +635,7 @@ Reference< XPossibleHyphens > SAL_CALL
|
||||
OUString nTerm(makeLowerCase(nWord, pCC));
|
||||
|
||||
// now convert word to needed encoding
|
||||
OString encWord(OU2ENC(nTerm,aEnc));
|
||||
OString encWord(OU2ENC(nTerm,eEnc));
|
||||
|
||||
wordlen = encWord.getLength();
|
||||
lcword = new char[wordlen+1];
|
||||
@ -628,19 +649,25 @@ Reference< XPossibleHyphens > SAL_CALL
|
||||
|
||||
// first remove any trailing periods
|
||||
int n = wordlen-1;
|
||||
while((n >=0) && (lcword[n] == '.')) n--;
|
||||
while((n >=0) && (lcword[n] == '.'))
|
||||
n--;
|
||||
n++;
|
||||
// fprintf(stderr,"hyphenate... %s\n",lcword); fflush(stderr);
|
||||
if (n > 0) {
|
||||
if (hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL, &rep, &pos, &cut,
|
||||
minLead, minTrail, Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))),
|
||||
Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2)))))
|
||||
if (n > 0)
|
||||
{
|
||||
const bool bFailed = 0 != hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL,
|
||||
&rep, &pos, &cut, minLead, minTrail,
|
||||
Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))),
|
||||
Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2))) );
|
||||
if (bFailed)
|
||||
{
|
||||
delete[] hyphens;
|
||||
delete[] lcword;
|
||||
|
||||
if (rep) {
|
||||
for(int j = 0; j < n; j++) {
|
||||
if (rep)
|
||||
{
|
||||
for(int j = 0; j < n; j++)
|
||||
{
|
||||
if (rep[j]) free(rep[j]);
|
||||
}
|
||||
free(rep);
|
||||
@ -652,7 +679,8 @@ Reference< XPossibleHyphens > SAL_CALL
|
||||
}
|
||||
}
|
||||
// now backfill hyphens[] for any removed periods
|
||||
for (int c = n; c < wordlen; c++) hyphens[c] = '0';
|
||||
for (int c = n; c < wordlen; c++)
|
||||
hyphens[c] = '0';
|
||||
hyphens[wordlen] = '\0';
|
||||
// fprintf(stderr,"... %s\n",hyphens); fflush(stderr);
|
||||
|
||||
@ -660,8 +688,10 @@ Reference< XPossibleHyphens > SAL_CALL
|
||||
INT16 i;
|
||||
|
||||
for ( i = 0; i < encWord.getLength(); i++)
|
||||
{
|
||||
if (hyphens[i]&1 && (!rep || !rep[i]))
|
||||
nHyphCount++;
|
||||
}
|
||||
|
||||
Sequence< INT16 > aHyphPos(nHyphCount);
|
||||
INT16 *pPos = aHyphPos.getArray();
|
||||
@ -669,10 +699,12 @@ Reference< XPossibleHyphens > SAL_CALL
|
||||
OUString hyphenatedWord;
|
||||
nHyphCount = 0;
|
||||
|
||||
for (i = 0; i < nWord.getLength(); i++) {
|
||||
for (i = 0; i < nWord.getLength(); i++)
|
||||
{
|
||||
hyphenatedWordBuffer.append(aWord[i]);
|
||||
// hyphenation position (not alternative)
|
||||
if (hyphens[i]&1 && (!rep || !rep[i])) {
|
||||
if (hyphens[i]&1 && (!rep || !rep[i]))
|
||||
{
|
||||
pPos[nHyphCount] = i;
|
||||
hyphenatedWordBuffer.append(sal_Unicode('='));
|
||||
nHyphCount++;
|
||||
@ -689,8 +721,10 @@ Reference< XPossibleHyphens > SAL_CALL
|
||||
delete[] hyphens;
|
||||
delete[] lcword;
|
||||
|
||||
if (rep) {
|
||||
for(int j = 0; j < n; j++) {
|
||||
if (rep)
|
||||
{
|
||||
for(int j = 0; j < n; j++)
|
||||
{
|
||||
if (rep[j]) free(rep[j]);
|
||||
}
|
||||
free(rep);
|
||||
@ -702,26 +736,26 @@ Reference< XPossibleHyphens > SAL_CALL
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
sal_uInt16 SAL_CALL Hyphenator::capitalType(const OUString& aTerm, CharClass * pCC)
|
||||
{
|
||||
sal_Int32 tlen = aTerm.getLength();
|
||||
if ((pCC) && (tlen)) {
|
||||
if ((pCC) && (tlen))
|
||||
{
|
||||
String aStr(aTerm);
|
||||
sal_Int32 nc = 0;
|
||||
for (xub_StrLen tindex = 0; tindex < tlen; tindex++) {
|
||||
if (pCC->getCharacterType(aStr,tindex) &
|
||||
::com::sun::star::i18n::KCharacterType::UPPER) nc++;
|
||||
for (xub_StrLen tindex = 0; tindex < tlen; tindex++)
|
||||
{
|
||||
if (pCC->getCharacterType(aStr,tindex) & ::com::sun::star::i18n::KCharacterType::UPPER)
|
||||
nc++;
|
||||
}
|
||||
|
||||
if (nc == 0) return (sal_uInt16) CAPTYPE_NOCAP;
|
||||
|
||||
if (nc == tlen) return (sal_uInt16) CAPTYPE_ALLCAP;
|
||||
|
||||
if ((nc == 1) && (pCC->getCharacterType(aStr,0) &
|
||||
::com::sun::star::i18n::KCharacterType::UPPER))
|
||||
if (nc == 0)
|
||||
return (sal_uInt16) CAPTYPE_NOCAP;
|
||||
if (nc == tlen)
|
||||
return (sal_uInt16) CAPTYPE_ALLCAP;
|
||||
if ((nc == 1) && (pCC->getCharacterType(aStr,0) & ::com::sun::star::i18n::KCharacterType::UPPER))
|
||||
return (sal_uInt16) CAPTYPE_INITCAP;
|
||||
|
||||
return (sal_uInt16) CAPTYPE_MIXED;
|
||||
@ -747,11 +781,11 @@ OUString SAL_CALL Hyphenator::makeUpperCase(const OUString& aTerm, CharClass * p
|
||||
OUString SAL_CALL Hyphenator::makeInitCap(const OUString& aTerm, CharClass * pCC)
|
||||
{
|
||||
sal_Int32 tlen = aTerm.getLength();
|
||||
if ((pCC) && (tlen)) {
|
||||
if ((pCC) && (tlen))
|
||||
{
|
||||
OUString bTemp = aTerm.copy(0,1);
|
||||
if (tlen > 1)
|
||||
return ( pCC->toUpper_rtl(bTemp, 0, 1)
|
||||
+ pCC->toLower_rtl(aTerm,1,(tlen-1)) );
|
||||
return ( pCC->toUpper_rtl(bTemp, 0, 1) + pCC->toLower_rtl(aTerm,1,(tlen-1)) );
|
||||
|
||||
return pCC->toUpper_rtl(bTemp, 0, 1);
|
||||
}
|
||||
@ -759,20 +793,16 @@ OUString SAL_CALL Hyphenator::makeInitCap(const OUString& aTerm, CharClass * pCC
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference< XInterface > SAL_CALL Hyphenator_CreateInstance(
|
||||
const Reference< XMultiServiceFactory > & /*rSMgr*/ )
|
||||
throw(Exception)
|
||||
{
|
||||
|
||||
Reference< XInterface > xService = (cppu::OWeakObject*) new Hyphenator;
|
||||
return xService;
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL
|
||||
Hyphenator::addLinguServiceEventListener(
|
||||
sal_Bool SAL_CALL Hyphenator::addLinguServiceEventListener(
|
||||
const Reference< XLinguServiceEventListener >& rxLstnr )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@ -787,8 +817,7 @@ sal_Bool SAL_CALL
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL
|
||||
Hyphenator::removeLinguServiceEventListener(
|
||||
sal_Bool SAL_CALL Hyphenator::removeLinguServiceEventListener(
|
||||
const Reference< XLinguServiceEventListener >& rxLstnr )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@ -804,8 +833,7 @@ sal_Bool SAL_CALL
|
||||
}
|
||||
|
||||
|
||||
OUString SAL_CALL
|
||||
Hyphenator::getServiceDisplayName( const Locale& /*rLocale*/ )
|
||||
OUString SAL_CALL Hyphenator::getServiceDisplayName( const Locale& /*rLocale*/ )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
MutexGuard aGuard( GetLinguMutex() );
|
||||
@ -813,8 +841,7 @@ OUString SAL_CALL
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL
|
||||
Hyphenator::initialize( const Sequence< Any >& rArguments )
|
||||
void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments )
|
||||
throw(Exception, RuntimeException)
|
||||
{
|
||||
MutexGuard aGuard( GetLinguMutex() );
|
||||
@ -836,16 +863,15 @@ void SAL_CALL
|
||||
xPropHelper = pPropHelper;
|
||||
pPropHelper->AddAsPropListener(); //! after a reference is established
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
DBG_ERROR( "wrong number of arguments in sequence" );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL
|
||||
Hyphenator::dispose()
|
||||
void SAL_CALL Hyphenator::dispose()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
MutexGuard aGuard( GetLinguMutex() );
|
||||
@ -859,8 +885,7 @@ void SAL_CALL
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL
|
||||
Hyphenator::addEventListener( const Reference< XEventListener >& rxListener )
|
||||
void SAL_CALL Hyphenator::addEventListener( const Reference< XEventListener >& rxListener )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
MutexGuard aGuard( GetLinguMutex() );
|
||||
@ -870,8 +895,7 @@ void SAL_CALL
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL
|
||||
Hyphenator::removeEventListener( const Reference< XEventListener >& rxListener )
|
||||
void SAL_CALL Hyphenator::removeEventListener( const Reference< XEventListener >& rxListener )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
MutexGuard aGuard( GetLinguMutex() );
|
||||
@ -927,32 +951,6 @@ Sequence< OUString > Hyphenator::getSupportedServiceNames_Static()
|
||||
return aSNS;
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL Hyphenator_writeInfo(
|
||||
void * /*pServiceManager*/, registry::XRegistryKey * pRegistryKey )
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
String aImpl( '/' );
|
||||
aImpl += Hyphenator::getImplementationName_Static().getStr();
|
||||
aImpl.AppendAscii( "/UNO/SERVICES" );
|
||||
Reference< registry::XRegistryKey > xNewKey =
|
||||
pRegistryKey->createKey( aImpl );
|
||||
Sequence< OUString > aServices =
|
||||
Hyphenator::getSupportedServiceNames_Static();
|
||||
for( INT32 i = 0; i < aServices.getLength(); i++ )
|
||||
xNewKey->createKey( aServices.getConstArray()[i] );
|
||||
|
||||
return sal_True;
|
||||
}
|
||||
catch(Exception &)
|
||||
{
|
||||
return sal_False;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void * SAL_CALL Hyphenator_getFactory( const sal_Char * pImplName,
|
||||
XMultiServiceFactory * pServiceManager, void * )
|
||||
{
|
||||
|
86
lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
Normal file → Executable file
86
lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
Normal file → Executable file
@ -65,7 +65,7 @@ struct HDInfo {
|
||||
HyphenDict * aPtr;
|
||||
OUString aName;
|
||||
Locale aLoc;
|
||||
rtl_TextEncoding aEnc;
|
||||
rtl_TextEncoding eEnc;
|
||||
CharClass * apCC;
|
||||
};
|
||||
|
||||
@ -108,87 +108,37 @@ public:
|
||||
virtual ~Hyphenator();
|
||||
|
||||
// XSupportedLocales (for XHyphenator)
|
||||
virtual Sequence< Locale > SAL_CALL getLocales()
|
||||
throw(RuntimeException);
|
||||
virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale )
|
||||
throw(RuntimeException);
|
||||
virtual Sequence< Locale > SAL_CALL getLocales() throw(RuntimeException);
|
||||
virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale ) throw(RuntimeException);
|
||||
|
||||
// XHyphenator
|
||||
virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > SAL_CALL
|
||||
hyphenate( const ::rtl::OUString& aWord,
|
||||
const ::com::sun::star::lang::Locale& aLocale,
|
||||
sal_Int16 nMaxLeading,
|
||||
const ::com::sun::star::beans::PropertyValues& aProperties )
|
||||
throw(::com::sun::star::lang::IllegalArgumentException,
|
||||
::com::sun::star::uno::RuntimeException);
|
||||
|
||||
virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > SAL_CALL
|
||||
queryAlternativeSpelling( const ::rtl::OUString& aWord,
|
||||
const ::com::sun::star::lang::Locale& aLocale,
|
||||
sal_Int16 nIndex,
|
||||
const ::com::sun::star::beans::PropertyValues& aProperties )
|
||||
throw(::com::sun::star::lang::IllegalArgumentException,
|
||||
::com::sun::star::uno::RuntimeException);
|
||||
|
||||
virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XPossibleHyphens > SAL_CALL
|
||||
createPossibleHyphens( const ::rtl::OUString& aWord,
|
||||
const ::com::sun::star::lang::Locale& aLocale,
|
||||
const ::com::sun::star::beans::PropertyValues& aProperties )
|
||||
throw(::com::sun::star::lang::IllegalArgumentException,
|
||||
::com::sun::star::uno::RuntimeException);
|
||||
virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > SAL_CALL hyphenate( const ::rtl::OUString& aWord, const ::com::sun::star::lang::Locale& aLocale, sal_Int16 nMaxLeading, const ::com::sun::star::beans::PropertyValues& aProperties ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
|
||||
virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenatedWord > SAL_CALL queryAlternativeSpelling( const ::rtl::OUString& aWord, const ::com::sun::star::lang::Locale& aLocale, sal_Int16 nIndex, const ::com::sun::star::beans::PropertyValues& aProperties ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
|
||||
virtual ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XPossibleHyphens > SAL_CALL createPossibleHyphens( const ::rtl::OUString& aWord, const ::com::sun::star::lang::Locale& aLocale, const ::com::sun::star::beans::PropertyValues& aProperties ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
|
||||
|
||||
// XLinguServiceEventBroadcaster
|
||||
virtual sal_Bool SAL_CALL
|
||||
addLinguServiceEventListener(
|
||||
const Reference< XLinguServiceEventListener >& rxLstnr )
|
||||
throw(RuntimeException);
|
||||
virtual sal_Bool SAL_CALL
|
||||
removeLinguServiceEventListener(
|
||||
const Reference< XLinguServiceEventListener >& rxLstnr )
|
||||
throw(RuntimeException);
|
||||
virtual sal_Bool SAL_CALL addLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) throw(RuntimeException);
|
||||
virtual sal_Bool SAL_CALL removeLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) throw(RuntimeException);
|
||||
|
||||
// XServiceDisplayName
|
||||
virtual OUString SAL_CALL
|
||||
getServiceDisplayName( const Locale& rLocale )
|
||||
throw(RuntimeException);
|
||||
virtual OUString SAL_CALL getServiceDisplayName( const Locale& rLocale ) throw(RuntimeException);
|
||||
|
||||
// XInitialization
|
||||
virtual void SAL_CALL
|
||||
initialize( const Sequence< Any >& rArguments )
|
||||
throw(Exception, RuntimeException);
|
||||
virtual void SAL_CALL initialize( const Sequence< Any >& rArguments ) throw(Exception, RuntimeException);
|
||||
|
||||
// XComponent
|
||||
virtual void SAL_CALL
|
||||
dispose()
|
||||
throw(RuntimeException);
|
||||
virtual void SAL_CALL
|
||||
addEventListener( const Reference< XEventListener >& rxListener )
|
||||
throw(RuntimeException);
|
||||
virtual void SAL_CALL
|
||||
removeEventListener( const Reference< XEventListener >& rxListener )
|
||||
throw(RuntimeException);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Service specific part
|
||||
//
|
||||
virtual void SAL_CALL dispose() throw(RuntimeException);
|
||||
virtual void SAL_CALL addEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
|
||||
virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& rxListener ) throw(RuntimeException);
|
||||
|
||||
// XServiceInfo
|
||||
virtual OUString SAL_CALL
|
||||
getImplementationName()
|
||||
throw(RuntimeException);
|
||||
virtual sal_Bool SAL_CALL
|
||||
supportsService( const OUString& rServiceName )
|
||||
throw(RuntimeException);
|
||||
virtual Sequence< OUString > SAL_CALL
|
||||
getSupportedServiceNames()
|
||||
throw(RuntimeException);
|
||||
virtual OUString SAL_CALL getImplementationName() throw(RuntimeException);
|
||||
virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
|
||||
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
|
||||
|
||||
|
||||
static inline OUString
|
||||
getImplementationName_Static() throw();
|
||||
static Sequence< OUString >
|
||||
getSupportedServiceNames_Static() throw();
|
||||
|
||||
static inline OUString getImplementationName_Static() throw();
|
||||
static Sequence< OUString > getSupportedServiceNames_Static() throw();
|
||||
|
||||
|
||||
private:
|
||||
|
@ -91,3 +91,11 @@ DEF1EXPORTFILE= exports.dxp
|
||||
|
||||
.INCLUDE : target.mk
|
||||
|
||||
|
||||
ALLTAR : $(MISC)/hyphen.component
|
||||
|
||||
$(MISC)/hyphen.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
|
||||
hyphen.component
|
||||
$(XSLTPROC) --nonet --stringparam uri \
|
||||
'$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
|
||||
$(SOLARENV)/bin/createcomponent.xslt hyphen.component
|
||||
|
34
lingucomponent/source/languageguessing/guesslang.component
Normal file
34
lingucomponent/source/languageguessing/guesslang.component
Normal file
@ -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.lingu2.LanguageGuessing">
|
||||
<service name="com.sun.star.linguistic2.LanguageGuessing"/>
|
||||
</implementation>
|
||||
</component>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user