[Libreoffice-commits] core.git: sc/inc sc/source

Maxim Monastirsky momonasmon at gmail.com
Fri Oct 9 07:23:07 PDT 2015


 sc/inc/drawattr.hxx            |   47 -----------------------------------------
 sc/source/ui/view/tabvwsh2.cxx |    6 ++---
 2 files changed, 3 insertions(+), 50 deletions(-)

New commits:
commit 3e23ee076ae6b46af617c0692998b22459a43dde
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Fri Oct 9 16:37:54 2015 +0300

    tdf#94910 sc: Fix drawing tools
    
    Regression of:
    
    commit 89d39bc100aabf5dccbe77c0b5c0c85736e85b39
    Author: Oliver Specht <oliver.specht at cib.de>
    Date:   Wed Sep 30 16:10:07 2015 +0200
    
            tdf#94559: 4th step to remove rtti.hxx
    
    Change-Id: I94408dafde0f2dbea6c3a112963468c593adfc2d
    Reviewed-on: https://gerrit.libreoffice.org/19276
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>

diff --git a/sc/inc/drawattr.hxx b/sc/inc/drawattr.hxx
deleted file mode 100644
index de40d49..0000000
--- a/sc/inc/drawattr.hxx
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- 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 INCLUDED_SC_INC_DRAWATTR_HXX
-#define INCLUDED_SC_INC_DRAWATTR_HXX
-
-#include <svl/eitem.hxx>
-#include <editeng/svxenum.hxx>
-
-class SvxDrawToolItem : public SfxEnumItem
-{
-public:
-
-        SvxDrawToolItem( const SvxDrawToolItem& rDrawToolItem ) :
-                                SfxEnumItem( rDrawToolItem ){}
-
-        SvxDrawToolItem(sal_uInt16 nWhichP) : SfxEnumItem(nWhichP){}
-
-    virtual sal_uInt16              GetValueCount() const SAL_OVERRIDE
-                                    {return((sal_uInt16)SVX_SNAP_DRAW_TEXT);}
-
-    inline SvxDrawToolItem& operator=(const  SvxDrawToolItem&
-                                                        rDrawTool)
-            {
-                SetValue( rDrawTool.GetValue() );
-                return *this;
-
-            }
-};
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 60e811e..9080743 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -26,7 +26,6 @@
 #include <sfx2/dispatch.hxx>
 
 #include "tabvwsh.hxx"
-#include "drawattr.hxx"
 #include "drawsh.hxx"
 #include "drawview.hxx"
 #include "fupoor.hxx"
@@ -101,10 +100,11 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
     if (nNewId == SID_INSERT_DRAW && pArgs)
     {
         const SfxPoolItem* pItem;
+        const SfxAllEnumItem* pEnumItem = nullptr;
         if ( pArgs->GetItemState( SID_INSERT_DRAW, true, &pItem ) == SfxItemState::SET &&
-             dynamic_cast<const SvxDrawToolItem*>( pItem) !=  nullptr )
+             ( pEnumItem = dynamic_cast<const SfxAllEnumItem*>( pItem ) ) )
         {
-            SvxDrawToolEnum eSel = (SvxDrawToolEnum)static_cast<const SvxDrawToolItem*>(pItem)->GetValue();
+            SvxDrawToolEnum eSel = (SvxDrawToolEnum)pEnumItem->GetValue();
             switch (eSel)
             {
                 case SVX_SNAP_DRAW_SELECT:          nNewId = SID_OBJECT_SELECT;         break;


More information about the Libreoffice-commits mailing list