tdf#125207 [API CHANGE] extend css.awt.PrinterServer: XPrinterServer2
Change-Id: Ic2df8ac676ae786d9c0ea2ab3619f9f9de087ca7 Reviewed-on: https://gerrit.libreoffice.org/72135 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
committed by
Stephan Bergmann
parent
c12922a584
commit
0f55127195
@@ -22,7 +22,7 @@
|
||||
|
||||
|
||||
#include <com/sun/star/awt/XPrinterPropertySet.hpp>
|
||||
#include <com/sun/star/awt/XPrinterServer.hpp>
|
||||
#include <com/sun/star/awt/XPrinterServer2.hpp>
|
||||
#include <com/sun/star/awt/XInfoPrinter.hpp>
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
|
||||
@@ -175,14 +175,15 @@ public:
|
||||
// class VCLXPrinterServer
|
||||
|
||||
|
||||
typedef ::cppu::WeakImplHelper < css::awt::XPrinterServer,
|
||||
typedef ::cppu::WeakImplHelper < css::awt::XPrinterServer2,
|
||||
css::lang::XServiceInfo
|
||||
> VCLXPrinterServer_Base;
|
||||
class VCLXPrinterServer : public VCLXPrinterServer_Base
|
||||
{
|
||||
public:
|
||||
// css::awt::XPrinterServer
|
||||
// css::awt::XPrinterServer2
|
||||
css::uno::Sequence< OUString > SAL_CALL getPrinterNames( ) override;
|
||||
OUString SAL_CALL getDefaultPrinterName() override;
|
||||
css::uno::Reference< css::awt::XPrinter > SAL_CALL createPrinter( const OUString& printerName ) override;
|
||||
css::uno::Reference< css::awt::XInfoPrinter > SAL_CALL createInfoPrinter( const OUString& printerName ) override;
|
||||
|
||||
|
@@ -1856,6 +1856,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/awt,\
|
||||
XPrinter \
|
||||
XPrinterPropertySet \
|
||||
XPrinterServer \
|
||||
XPrinterServer2 \
|
||||
XProgressBar \
|
||||
XProgressMonitor \
|
||||
XRadioButton \
|
||||
|
@@ -18,7 +18,7 @@ module com { module sun { module star { module awt {
|
||||
|
||||
@since LibreOffice 4.1
|
||||
*/
|
||||
service PrinterServer: com::sun::star::awt::XPrinterServer;
|
||||
service PrinterServer: com::sun::star::awt::XPrinterServer2;
|
||||
|
||||
}; }; }; };
|
||||
|
||||
|
49
offapi/com/sun/star/awt/XPrinterServer2.idl
Normal file
49
offapi/com/sun/star/awt/XPrinterServer2.idl
Normal file
@@ -0,0 +1,49 @@
|
||||
/* -*- 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_awt_XPrinterServer2_idl__
|
||||
#define __com_sun_star_awt_XPrinterServer2_idl__
|
||||
|
||||
#include <com/sun/star/awt/XPrinterServer.idl>
|
||||
|
||||
module com { module sun { module star { module awt {
|
||||
|
||||
/**
|
||||
extends printer server interface
|
||||
|
||||
@since LibreOffice 6.3
|
||||
*/
|
||||
|
||||
interface XPrinterServer2: ::com::sun::star::awt::XPrinterServer
|
||||
{
|
||||
|
||||
/** returns the current default printer name
|
||||
|
||||
@returns
|
||||
current default printer name
|
||||
*/
|
||||
string getDefaultPrinterName();
|
||||
|
||||
};
|
||||
|
||||
|
||||
}; }; }; };
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@@ -328,7 +328,7 @@ css::uno::Reference< css::awt::XDevice > VCLXInfoPrinter::createDevice( )
|
||||
// class VCLXPrinterServer
|
||||
// ----------------------------------------------------
|
||||
|
||||
// css::awt::XPrinterServer
|
||||
// css::awt::XPrinterServer2
|
||||
css::uno::Sequence< OUString > VCLXPrinterServer::getPrinterNames( )
|
||||
{
|
||||
const std::vector<OUString>& rQueues = Printer::GetPrinterQueues();
|
||||
@@ -341,6 +341,11 @@ css::uno::Sequence< OUString > VCLXPrinterServer::getPrinterNames( )
|
||||
return aNames;
|
||||
}
|
||||
|
||||
OUString VCLXPrinterServer::getDefaultPrinterName()
|
||||
{
|
||||
return Printer::GetDefaultPrinterName();
|
||||
}
|
||||
|
||||
css::uno::Reference< css::awt::XPrinter > VCLXPrinterServer::createPrinter( const OUString& rPrinterName )
|
||||
{
|
||||
css::uno::Reference< css::awt::XPrinter > xP = new VCLXPrinter( rPrinterName );
|
||||
|
Reference in New Issue
Block a user