diff options
author | Noel Grandin <noel@peralex.com> | 2013-03-08 12:47:37 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-03-20 07:32:50 +0200 |
commit | 4f26b7a6d1524e2feccd6d5fe8f70ea8c1bed80e (patch) | |
tree | d98b44397ff8aec4d65f883c7ae7586b4b3062eb | |
parent | d93543f495b71ddc0536b86a4cc3fb1410418b61 (diff) |
fdo#46808, Convert frame::Bibliography to new style
The service already existed, it just needed an IDL file
Change-Id: Iebbc5ede0a46ddf1e0830e2e1697f82df016922c
-rw-r--r-- | offapi/UnoApi_offapi.mk | 1 | ||||
-rw-r--r-- | offapi/com/sun/star/frame/Bibliography.idl | 37 | ||||
-rw-r--r-- | sw/source/ui/index/swuiidxmrk.cxx | 9 |
3 files changed, 43 insertions, 4 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 4e2d13383509..d77807466d5e 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -151,6 +151,7 @@ $(eval $(call gb_ZipUnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/form/ru )) $(eval $(call gb_ZipUnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/frame,\ AutoRecovery \ + Bibliography \ Desktop \ DispatchHelper \ DispatchRecorder \ diff --git a/offapi/com/sun/star/frame/Bibliography.idl b/offapi/com/sun/star/frame/Bibliography.idl new file mode 100644 index 000000000000..fe52b91313c0 --- /dev/null +++ b/offapi/com/sun/star/frame/Bibliography.idl @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_frame_Bibliography_idl__ +#define __com_sun_star_frame_Bibliography_idl__ + +#include <com/sun/star/container/XNameAccess.idl> + + + module com { module sun { module star { module frame { + +/** + @since LibreOffice 4.1 + */ +published service Bibliography : com::sun::star::container::XNameAccess; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index d8661ced23d5..f9831bc717e3 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -24,10 +24,11 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/util/SearchOptions.hpp> -#include <com/sun/star/util/SearchFlags.hpp> +#include <com/sun/star/frame/Bibliography.hpp> #include <com/sun/star/i18n/TransliterationModules.hpp> #include <com/sun/star/i18n/IndexEntrySupplier.hpp> +#include <com/sun/star/util/SearchOptions.hpp> +#include <com/sun/star/util/SearchFlags.hpp> #include <svl/stritem.hxx> #include <vcl/msgbox.hxx> #include <sfx2/dispatch.hxx> @@ -1349,8 +1350,8 @@ IMPL_LINK(SwAuthorMarkPane, ChangeSourceHdl, RadioButton*, pButton) { if(!bBibAccessInitialized) { - uno::Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory(); - xBibAccess = uno::Reference< container::XNameAccess > (xMSF->createInstance( "com.sun.star.frame.Bibliography"), uno::UNO_QUERY ); + uno::Reference< uno::XComponentContext > xContext = getProcessComponentContext(); + xBibAccess = frame::Bibliography::create( xContext ); uno::Reference< beans::XPropertySet > xPropSet(xBibAccess, uno::UNO_QUERY); OUString uPropName("BibliographyDataFieldNames"); if(xPropSet.is() && xPropSet->getPropertySetInfo()->hasPropertyByName(uPropName)) |