diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-03-19 21:21:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-03-20 09:51:10 +0100 |
commit | abfbd191a8b7b404128e74f621f8b84f5d7d4312 (patch) | |
tree | 54da8435d3650478d1f45e669a945ad9adccc298 | |
parent | 63f67b0b62e68728a554c5a76c531ad8542c4212 (diff) |
ConditionEdit is now unused
Change-Id: Ibede37194a6ae67032db68d64f51d58c8c48446b
Reviewed-on: https://gerrit.libreoffice.org/69444
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/uibase/inc/condedit.hxx | 21 | ||||
-rw-r--r-- | sw/source/uibase/utlui/condedit.cxx | 61 |
2 files changed, 0 insertions, 82 deletions
diff --git a/sw/source/uibase/inc/condedit.hxx b/sw/source/uibase/inc/condedit.hxx index 5c41e115cc28..35e2ca4b63b6 100644 --- a/sw/source/uibase/inc/condedit.hxx +++ b/sw/source/uibase/inc/condedit.hxx @@ -24,27 +24,6 @@ #include <vcl/weld.hxx> #include <swdllapi.h> -class SW_DLLPUBLIC ConditionEdit : public Edit, public DropTargetHelper -{ - bool bBrackets, bEnableDrop; - - SAL_DLLPRIVATE virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override; - SAL_DLLPRIVATE virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override; - -public: - ConditionEdit(vcl::Window* pParent, WinBits nStyle); - - void ShowBrackets(bool bShow) - { - bBrackets = bShow; - } - - void SetDropEnable(bool bFlag) - { - bEnableDrop = bFlag; - } -}; - class SwConditionEdit; class SW_DLLPUBLIC SwConditionEditDropTarget : public DropTargetHelper diff --git a/sw/source/uibase/utlui/condedit.cxx b/sw/source/uibase/utlui/condedit.cxx index f1a77a2a740a..573d26d9a0e3 100644 --- a/sw/source/uibase/utlui/condedit.cxx +++ b/sw/source/uibase/utlui/condedit.cxx @@ -26,67 +26,6 @@ using namespace ::svx; using namespace ::com::sun::star::uno; -ConditionEdit::ConditionEdit(vcl::Window* pParent, WinBits nStyle) - : Edit(pParent, nStyle) - , DropTargetHelper(this) - , bBrackets(true) - , bEnableDrop(true) -{ -} - -extern "C" SAL_DLLPUBLIC_EXPORT void makeConditionEdit(VclPtr<vcl::Window> & rRet, VclPtr<vcl::Window> & pParent, VclBuilder::stringmap & rMap) -{ - BuilderUtils::ensureDefaultWidthChars(rMap); - rRet = VclPtr<ConditionEdit>::Create(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK); -} - -// Drop possible, respectively format known? - -sal_Int8 ConditionEdit::AcceptDrop( const AcceptDropEvent& /*rEvt*/ ) -{ - return OColumnTransferable::canExtractColumnDescriptor - ( GetDataFlavorExVector(), - ColumnTransferFormatFlags::COLUMN_DESCRIPTOR ) - ? DND_ACTION_COPY - : DND_ACTION_NONE; -} - -sal_Int8 ConditionEdit::ExecuteDrop( const ExecuteDropEvent& rEvt ) -{ - sal_Int8 nRet = DND_ACTION_NONE; - if( bEnableDrop ) - { - TransferableDataHelper aData( rEvt.maDropEvent.Transferable ); - - const DataFlavorExVector& rVector = aData.GetDataFlavorExVector(); - if(OColumnTransferable::canExtractColumnDescriptor(rVector, ColumnTransferFormatFlags::COLUMN_DESCRIPTOR)) - { - ODataAccessDescriptor aColDesc = OColumnTransferable::extractColumnDescriptor( - aData); - OUString sDBName; - if (bBrackets) - sDBName += "["; - OUString sTmp; - sTmp = aColDesc.getDataSource(); - sDBName += sTmp; - sDBName += "."; - - aColDesc[DataAccessDescriptorProperty::Command] >>= sTmp; - sDBName += sTmp; - sDBName += "."; - - aColDesc[DataAccessDescriptorProperty::ColumnName] >>= sTmp; - sDBName += sTmp; - if (bBrackets) - sDBName += "]"; - - SetText( sDBName ); - nRet = DND_ACTION_COPY; - } - } - return nRet; -} - SwConditionEdit::SwConditionEdit(std::unique_ptr<weld::Entry> xControl) : m_xControl(std::move(xControl)) , m_aDropTargetHelper(*this) |