diff options
author | Ocke Janssen <oj@openoffice.org> | 2002-05-28 07:08:11 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2002-05-28 07:08:11 +0000 |
commit | 0aee7e5d6ffab67e517922d43b1c9dbb8e04a311 (patch) | |
tree | d01e6e7fa909542f676ebda07670d0840c276bde /dbaccess/source/ui | |
parent | 06f536986686db7ebddfd3836fdea2187e8122df (diff) |
#96792# new methods for pasting tables
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 11 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/DExport.hxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/TokenWriter.hxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/unodatbr.hxx | 34 |
4 files changed, 42 insertions, 19 deletions
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index a2a1c3b53c96..bed6fe8bfc51 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unodatbr.cxx,v $ * - * $Revision: 1.132 $ + * $Revision: 1.133 $ * - * last change: $Author: fs $ $Date: 2002-05-23 12:35:02 $ + * last change: $Author: oj $ $Date: 2002-05-28 08:08:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1656,11 +1656,6 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const break; case ID_BROWSER_PASTE: - aReturn.aState = makeAny( (sal_Bool)sal_False ); - // since fixing 99030, this is defined as meaning "please do not display a drop down - // menu for the clipboard formats to paste". - // 22.05.2002 - 99030 - fs@openoffice.org - // first look which side is active if(m_pTreeView->HasChildPathFocus()) { @@ -3910,7 +3905,7 @@ sal_Bool SbaTableQueryBrowser::requestContextMenu( const CommandEvent& _rEvent ) case ID_TREE_QUERY_PASTE: { TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(getView())); - implPasteQuery( pEntry, aTransferData ); + implPasteQuery( pEntry, ODataAccessObjectTransferable::extractObjectDescriptor(aTransferData) ); } break; diff --git a/dbaccess/source/ui/inc/DExport.hxx b/dbaccess/source/ui/inc/DExport.hxx index 3354c6b79947..00b15f5ef5cd 100644 --- a/dbaccess/source/ui/inc/DExport.hxx +++ b/dbaccess/source/ui/inc/DExport.hxx @@ -2,9 +2,9 @@ * * $RCSfile: DExport.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: oj $ $Date: 2002-05-23 11:07:09 $ + * last change: $Author: oj $ $Date: 2002-05-28 08:05:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -156,6 +156,7 @@ namespace dbaui sal_Bool m_bDontAskAgain;// Falls beim Einf"ugen ein Fehler auftritt, soll die Fehlermeldung nicht sal_Bool m_bIsAutoIncrement; // if PKey is set by user sal_Bool m_bFoundTable; // set to true when a table was found + sal_Bool m_bCheckOnly; virtual sal_Bool CreateTable(int nToken) = 0; @@ -197,6 +198,9 @@ namespace dbaui void SetColumnTypes(const TColumnVector* rList,const OTypeInfoMap* _pInfoMap); String ShortenFieldName( const String& rName, xub_StrLen nNewLength, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& rDestList ); virtual void release() = 0; + + void enableCheckOnly() { m_bCheckOnly = sal_True; } + sal_Bool isCheckEnabled() const { return m_bCheckOnly; } }; } diff --git a/dbaccess/source/ui/inc/TokenWriter.hxx b/dbaccess/source/ui/inc/TokenWriter.hxx index a5c1eeda7027..b9bc3de6aed3 100644 --- a/dbaccess/source/ui/inc/TokenWriter.hxx +++ b/dbaccess/source/ui/inc/TokenWriter.hxx @@ -2,9 +2,9 @@ * * $RCSfile: TokenWriter.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: oj $ $Date: 2001-11-23 14:51:40 $ + * last change: $Author: oj $ $Date: 2002-05-28 08:02:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -132,6 +132,7 @@ namespace dbaui ODatabaseExport* m_pReader; sal_Int32* m_pRowMarker; // wenn gesetzt, dann nur diese Rows kopieren sal_Bool m_bInInitialize; + sal_Bool m_bCheckOnly; // export data ODatabaseImportExport( const ::svx::ODataAccessDescriptor& _aDataDescriptor, @@ -153,6 +154,9 @@ namespace dbaui virtual void initialize(); virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); + + void enableCheckOnly() { m_bCheckOnly = sal_True; } + sal_Bool isCheckEnabled() const { return m_bCheckOnly; } }; // ========================================================================= diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx index 7218a14209ee..d21a859f4634 100644 --- a/dbaccess/source/ui/inc/unodatbr.hxx +++ b/dbaccess/source/ui/inc/unodatbr.hxx @@ -2,9 +2,9 @@ * * $RCSfile: unodatbr.hxx,v $ * - * $Revision: 1.44 $ + * $Revision: 1.45 $ * - * last change: $Author: oj $ $Date: 2002-04-29 08:23:25 $ + * last change: $Author: oj $ $Date: 2002-05-28 08:02:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -99,6 +99,9 @@ #ifndef _SVX_DATACCESSDESCRIPTOR_HXX_ #include <svx/dataaccessdescriptor.hxx> #endif +#ifndef _SOT_STORAGE_HXX +#include <sot/storage.hxx> +#endif // ========================================================================= class SvLBoxEntry; @@ -134,9 +137,13 @@ namespace dbaui struct DropDescriptor { - TransferableDataHelper aDroppedData; - SvLBoxEntry* pDroppedAt; - sal_Bool bTable; + ::svx::ODataAccessDescriptor aDroppedData; + String aUrl; + SotStorageStreamRef aHtmlRtfStorage; + SvLBoxEntry* pDroppedAt; + sal_Bool bTable; + sal_Bool bHtml; + sal_Bool bError; DropDescriptor() : pDroppedAt(NULL), bTable(sal_True) { } }; @@ -351,8 +358,21 @@ namespace dbaui void implRemoveQuery( SvLBoxEntry* _pApplyTo ); void implDropTable( SvLBoxEntry* _pApplyTo ); void implRenameEntry( SvLBoxEntry* _pApplyTo ); - void implPasteTable( SvLBoxEntry* _pApplyTo, const TransferableDataHelper& _rPasteData ); - void implPasteQuery( SvLBoxEntry* _pApplyTo, const TransferableDataHelper& _rPasteData ); + + /** copies a table, either if it is a common table or comes from html,rtf (opens a dialog) + @param _pApplyTo to which this opertion applies + @param _rTransData the data to transfer + */ + void implPasteTable( SvLBoxEntry* _pApplyTo, const TransferableDataHelper& _rTransData ); + void implPasteTable( SvLBoxEntry* _pApplyTo, const ::svx::ODataAccessDescriptor& _rPasteData ); + void implPasteQuery( SvLBoxEntry* _pApplyTo, const ::svx::ODataAccessDescriptor& _rPasteData ); + + /** copies a html or rtf table. + @param _rDesc information about the source to copy + @param _bCheck when set to <TRUE/> only a check is performed, no dialog is shown, otherwise a dialog appears + @return <TRUE/> when the stream contains a table otherwise <FALSE/> + */ + sal_Bool copyHtmlRtfTable(DropDescriptor& _rDesc, sal_Bool _bCheck); TransferableHelper* implCopyObject( SvLBoxEntry* _pApplyTo, sal_Int32 _nCommandType, sal_Bool _bAllowConnection = sal_True ); |