[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Mar 20 08:51:37 UTC 2019


 sw/source/uibase/inc/condedit.hxx   |   21 ------------
 sw/source/uibase/utlui/condedit.cxx |   61 ------------------------------------
 2 files changed, 82 deletions(-)

New commits:
commit abfbd191a8b7b404128e74f621f8b84f5d7d4312
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Mar 19 21:21:08 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Mar 20 09:51:10 2019 +0100

    ConditionEdit is now unused
    
    Change-Id: Ibede37194a6ae67032db68d64f51d58c8c48446b
    Reviewed-on: https://gerrit.libreoffice.org/69444
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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)


More information about the Libreoffice-commits mailing list