summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviewsj.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view/drviewsj.cxx')
-rw-r--r--sd/source/ui/view/drviewsj.cxx57
1 files changed, 24 insertions, 33 deletions
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index 0706bcdd4e58..4adee9e9a632 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -1,31 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
+/*
+ * This file is part of the LibreOffice project.
*
- * This file is part of OpenOffice.org.
+ * 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/.
*
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
+ * 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 .
+ */
#include "DrawViewShell.hxx"
#include <com/sun/star/embed/EmbedMisc.hpp>
@@ -123,22 +113,22 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_TEXTATTR_DLG ) )
{
const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj);
+ const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(pObj);
sal_uInt32 nInv = pObj->GetObjInventor();
sal_uInt16 nId = pObj->GetObjIdentifier();
SdrObjTransformInfoRec aInfoRec;
pObj->TakeObjInfo( aInfoRec );
-
// don't show original size entry if not possible
- if ( pObj->ISA( SdrOle2Obj ) )
+ if(pSdrOle2Obj)
{
- SdrOle2Obj* pOleObj = PTR_CAST(SdrOle2Obj, pObj);
- if (pOleObj->GetObjRef().is() &&
- ((pOleObj->GetObjRef()->getStatus( pOleObj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) ) )
+ if (pSdrOle2Obj->GetObjRef().is() &&
+ ((pSdrOle2Obj->GetObjRef()->getStatus( pSdrOle2Obj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) ) )
rSet.DisableItem(SID_ORIGINAL_SIZE);
}
- if ( !( pObj->ISA( SdrGrafObj ) ) )
+ if(!pSdrGrafObj)
{
rSet.DisableItem(SID_SAVE_GRAPHIC);
rSet.DisableItem(SID_COMPRESS_GRAPHIC);
@@ -158,9 +148,10 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
{
rSet.DisableItem(SID_UNGROUP);
}
- if (!pObj->ISA(SdrGrafObj) ||
- ((SdrGrafObj*) pObj)->GetGraphicType() != GRAPHIC_BITMAP ||
- ((SdrGrafObj*) pObj)->IsLinkedGraphic())
+ if(!pSdrGrafObj ||
+ pSdrGrafObj->GetGraphicType() != GRAPHIC_BITMAP ||
+ pSdrGrafObj->IsLinkedGraphic() ||
+ pSdrGrafObj->isEmbeddedSvg())
{
rSet.DisableItem(SID_CONVERT_TO_1BIT_THRESHOLD);
rSet.DisableItem(SID_CONVERT_TO_1BIT_MATRIX);