summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/metaact.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi/metaact.cxx')
-rw-r--r--vcl/source/gdi/metaact.cxx123
1 files changed, 16 insertions, 107 deletions
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 7cfa2bc9f0c1..b1bc2bc334d1 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -1,31 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 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/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * 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.
- *
- * 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 <algorithm>
#include <string.h>
@@ -35,7 +25,7 @@
#include <vcl/outdev.hxx>
#include <vcl/metaact.hxx>
#include <vcl/graphictools.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
// ========================================================================
@@ -222,7 +212,6 @@ MetaAction* MetaAction::ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData
case( META_COMMENT_ACTION ): pAction = new MetaCommentAction; break;
case( META_LAYOUTMODE_ACTION ): pAction = new MetaLayoutModeAction; break;
case( META_TEXTLANGUAGE_ACTION ): pAction = new MetaTextLanguageAction; break;
- case( META_RENDERGRAPHIC_ACTION ): pAction = new MetaRenderGraphicAction; break;
default:
{
@@ -1973,7 +1962,7 @@ void MetaBmpExAction::Execute( OutputDevice* pOut )
MetaAction* MetaBmpExAction::Clone()
{
- MetaAction* pClone = (MetaAction*) new MetaBmpExAction( *this );
+ MetaBmpExAction* pClone = new MetaBmpExAction( *this );
pClone->ResetRefCount();
return pClone;
}
@@ -4269,84 +4258,4 @@ void MetaTextLanguageAction::Read( SvStream& rIStm, ImplMetaReadData* )
rIStm >> meTextLanguage;
}
-// ========================================================================
-
-IMPL_META_ACTION( RenderGraphic, META_RENDERGRAPHIC_ACTION )
-
-// ------------------------------------------------------------------------
-
-MetaRenderGraphicAction::MetaRenderGraphicAction( const Point& rPoint, const Size& rSize,
- const vcl::RenderGraphic& rRenderGraphic,
- double fRotateAngle, double fShearAngleX, double fShearAngleY ) :
- MetaAction( META_RENDERGRAPHIC_ACTION ),
- maRenderGraphic( rRenderGraphic ),
- maPoint( rPoint ),
- maSize( rSize ),
- mfRotateAngle( fRotateAngle ),
- mfShearAngleX( fShearAngleX ),
- mfShearAngleY( fShearAngleY )
-{
-}
-
-// ------------------------------------------------------------------------
-
-void MetaRenderGraphicAction::Execute( OutputDevice* pOut )
-{
- pOut->DrawRenderGraphic( maPoint, maSize, maRenderGraphic );
-}
-
-// ------------------------------------------------------------------------
-
-MetaAction* MetaRenderGraphicAction::Clone()
-{
- MetaAction* pClone = (MetaAction*) new MetaRenderGraphicAction( *this );
- pClone->ResetRefCount();
- return pClone;
-}
-
-// ------------------------------------------------------------------------
-
-void MetaRenderGraphicAction::Move( long nHorzMove, long nVertMove )
-{
- maPoint.Move( nHorzMove, nVertMove );
-}
-
-// ------------------------------------------------------------------------
-
-void MetaRenderGraphicAction::Scale( double fScaleX, double fScaleY )
-{
- Rectangle aRectangle( maPoint, maSize );
- ImplScaleRect( aRectangle, fScaleX, fScaleY );
- maPoint = aRectangle.TopLeft();
- maSize = aRectangle.GetSize();
-}
-
-// ------------------------------------------------------------------------
-
-sal_Bool MetaRenderGraphicAction::Compare( const MetaAction& rMetaAction ) const
-{
- return ( maRenderGraphic.IsEqual( ( (MetaRenderGraphicAction&) rMetaAction).maRenderGraphic ) &&
- ( maPoint == ( (MetaRenderGraphicAction&) rMetaAction).maPoint ) &&
- ( maSize == ( (MetaRenderGraphicAction&) rMetaAction).maSize ) &&
- ( mfRotateAngle == ( (MetaRenderGraphicAction&) rMetaAction).mfRotateAngle ) &&
- ( mfShearAngleX == ( (MetaRenderGraphicAction&) rMetaAction).mfShearAngleX ) &&
- ( mfShearAngleY == ( (MetaRenderGraphicAction&) rMetaAction).mfShearAngleY ) );
-}
-
-// ------------------------------------------------------------------------
-
-void MetaRenderGraphicAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
-{
- WRITE_BASE_COMPAT( rOStm, 1, pData );
- rOStm << maRenderGraphic << maPoint << maSize << mfRotateAngle << mfShearAngleX << mfShearAngleY;
-}
-
-// ------------------------------------------------------------------------
-
-void MetaRenderGraphicAction::Read( SvStream& rIStm, ImplMetaReadData* )
-{
- COMPAT( rIStm );
- rIStm >> maRenderGraphic >> maPoint >> maSize >> mfRotateAngle >> mfShearAngleX >> mfShearAngleY;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */