summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2015-10-09 16:37:54 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2015-10-09 14:22:41 +0000
commit3e23ee076ae6b46af617c0692998b22459a43dde (patch)
treee45d96d86f3c848c377dafde3b0fe8c569446f25 /sc
parentfb62052d5ac069d700a5410db35d6949a4c4008b (diff)
tdf#94910 sc: Fix drawing tools
Regression of: commit 89d39bc100aabf5dccbe77c0b5c0c85736e85b39 Author: Oliver Specht <oliver.specht@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@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/drawattr.hxx47
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx6
2 files changed, 3 insertions, 50 deletions
diff --git a/sc/inc/drawattr.hxx b/sc/inc/drawattr.hxx
deleted file mode 100644
index de40d49aefa0..000000000000
--- 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 60e811e2f5c4..9080743d5f9b 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;