2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-21 22:06:52 +00:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2007-04-11 14:44:00 +00:00
|
|
|
|
2013-10-23 19:08:11 +02:00
|
|
|
#ifndef INCLUDED_SVX_DBAOBJECTEX_HXX
|
|
|
|
#define INCLUDED_SVX_DBAOBJECTEX_HXX
|
2007-04-11 14:44:00 +00:00
|
|
|
|
|
|
|
#include <svtools/transfer.hxx>
|
|
|
|
#include <com/sun/star/beans/XPropertySet.hpp>
|
|
|
|
#include <com/sun/star/sdbc/XConnection.hpp>
|
|
|
|
#include <com/sun/star/ucb/XContent.hpp>
|
|
|
|
#include <svx/dataaccessdescriptor.hxx>
|
|
|
|
#include <com/sun/star/uno/Sequence.hxx>
|
2013-11-09 15:28:54 -06:00
|
|
|
#include <svx/svxdllapi.h>
|
2007-04-11 14:44:00 +00:00
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2007-04-11 14:44:00 +00:00
|
|
|
namespace svx
|
|
|
|
{
|
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
|
|
|
|
2007-04-11 14:44:00 +00:00
|
|
|
//= OComponentTransferable
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2015-04-15 16:44:06 +01:00
|
|
|
class SVX_DLLPUBLIC SAL_WARN_UNUSED OComponentTransferable : public TransferableHelper
|
2007-04-11 14:44:00 +00:00
|
|
|
{
|
|
|
|
protected:
|
|
|
|
ODataAccessDescriptor m_aDescriptor;
|
|
|
|
|
|
|
|
public:
|
|
|
|
/** construct the transferable
|
|
|
|
*/
|
|
|
|
OComponentTransferable(
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& _rDatasourceOrLocation
|
2007-04-11 14:44:00 +00:00
|
|
|
,const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent
|
|
|
|
);
|
|
|
|
|
|
|
|
/** checks whether or not a component descriptor can be extracted from the data flavor vector given
|
|
|
|
@param _rFlavors
|
|
|
|
available flavors
|
|
|
|
*/
|
2014-03-04 11:37:37 +02:00
|
|
|
static bool canExtractComponentDescriptor(const DataFlavorExVector& _rFlavors, bool _bForm );
|
2007-04-11 14:44:00 +00:00
|
|
|
|
|
|
|
/** extracts a component descriptor from the transferable given
|
|
|
|
*/
|
|
|
|
static ODataAccessDescriptor
|
|
|
|
extractComponentDescriptor(const TransferableDataHelper& _rData);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// TransferableHelper overridables
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual void AddSupportedFormats() SAL_OVERRIDE;
|
2014-06-13 11:12:50 -04:00
|
|
|
virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE;
|
2007-04-11 14:44:00 +00:00
|
|
|
|
2015-03-12 14:53:28 +02:00
|
|
|
static SotClipboardFormatId getDescriptorFormatId(bool _bExtractForm);
|
2007-04-11 14:44:00 +00:00
|
|
|
};
|
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2015-05-15 13:27:19 +02:00
|
|
|
}
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2007-04-11 14:44:00 +00:00
|
|
|
|
2013-10-23 19:08:11 +02:00
|
|
|
#endif // INCLUDED_SVX_DBAOBJECTEX_HXX
|
2007-04-11 14:44:00 +00:00
|
|
|
|
2010-10-27 13:11:31 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|