Kaydet (Commit) 4f26b7a6 authored tarafından Noel Grandin's avatar Noel Grandin

fdo#46808, Convert frame::Bibliography to new style

The service already existed, it just needed an IDL file

Change-Id: Iebbc5ede0a46ddf1e0830e2e1697f82df016922c
üst d93543f4
......@@ -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 \
......
/* -*- 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: */
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment