fdo#46808, Add service factory method to ucb::AnyCompareFactory

Change-Id: I18774fabdaf27376898ed661be21a72c6f52410d
This commit is contained in:
Noel Grandin
2012-12-20 13:42:46 +02:00
parent 6cc2ceadbb
commit 2e0d1719f2
2 changed files with 7 additions and 8 deletions

View File

@@ -20,6 +20,7 @@
#define __com_sun_star_ucb_AnyCompareFactory_idl__
#include <com/sun/star/ucb/XAnyCompareFactory.idl>
#include <com/sun/star/lang/Locale.idl>
module com { module sun { module star { module ucb {
@@ -28,7 +29,10 @@ module com { module sun { module star { module ucb {
@since OOo 1.1.2
*/
published service AnyCompareFactory : XAnyCompareFactory;
published service AnyCompareFactory : XAnyCompareFactory
{
createWithLocale([in] com::sun::star::lang::Locale aLocale);
};
}; }; }; };

View File

@@ -57,7 +57,7 @@
#include <com/sun/star/ucb/XCommandProcessor.hpp>
#include <com/sun/star/ucb/XContent.hpp>
#include <com/sun/star/ucb/XContentAccess.hpp>
#include <com/sun/star/ucb/XAnyCompareFactory.hpp>
#include <com/sun/star/ucb/AnyCompareFactory.hpp>
#include <com/sun/star/ucb/XAnyCompare.hpp>
#include <com/sun/star/ucb/NumberedSortingInfo.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
@@ -1625,12 +1625,7 @@ sal_Bool SfxDocTemplate_Impl::Construct( )
uno::Reference< XLocalizable > xLocalizable( mxTemplates, UNO_QUERY );
Sequence< Any > aCompareArg(1);
*(aCompareArg.getArray()) <<= xLocalizable->getLocale();
m_rCompareFactory = uno::Reference< XAnyCompareFactory >(
xFactory->createInstanceWithArguments( OUString("com.sun.star.ucb.AnyCompareFactory"),
aCompareArg ),
UNO_QUERY );
m_rCompareFactory = AnyCompareFactory::createWithLocale(xContext, xLocalizable->getLocale());
uno::Reference < XContent > aRootContent = mxTemplates->getContent();
uno::Reference < XCommandEnvironment > aCmdEnv;