You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2011/12/01 17:26:53 UTC
svn commit: r1209140 [3/11] - in
/incubator/ooo/branches/alg/svgreplacement/main: ./
basegfx/inc/basegfx/matrix/ basegfx/inc/basegfx/polygon/
basegfx/source/polygon/ cppcanvas/source/mtfrenderer/ drawinglayer/
drawinglayer/inc/drawinglayer/primitive2d/...
Modified: incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx Thu Dec 1 16:25:17 2011
@@ -210,7 +210,6 @@ namespace drawinglayer
case PRIMITIVE2D_ID_MARKERARRAYPRIMITIVE2D :
case PRIMITIVE2D_ID_POINTARRAYPRIMITIVE2D :
case PRIMITIVE2D_ID_BITMAPPRIMITIVE2D :
- case PRIMITIVE2D_ID_RENDERGRAPHICPRIMITIVE2D :
case PRIMITIVE2D_ID_METAFILEPRIMITIVE2D :
case PRIMITIVE2D_ID_MASKPRIMITIVE2D :
{
Modified: incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx Thu Dec 1 16:25:17 2011
@@ -34,7 +34,6 @@
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
-#include <drawinglayer/primitive2d/rendergraphicprimitive2d.hxx>
#include <drawinglayer/primitive2d/metafileprimitive2d.hxx>
#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
#include <basegfx/polygon/b2dpolygonclipper.hxx>
@@ -1284,12 +1283,6 @@ namespace drawinglayer
RenderBitmapPrimitive2D(static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate));
break;
}
- case PRIMITIVE2D_ID_RENDERGRAPHICPRIMITIVE2D :
- {
- // direct draw of transformed RenderGraphic primitive; use default processing
- RenderRenderGraphicPrimitive2D(static_cast< const primitive2d::RenderGraphicPrimitive2D& >(rCandidate));
- break;
- }
case PRIMITIVE2D_ID_POLYPOLYGONBITMAPPRIMITIVE2D :
{
// need to handle PolyPolygonBitmapPrimitive2D here to support XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END
@@ -1657,7 +1650,8 @@ namespace drawinglayer
// the ClipRegion is built from the Polygon. A AdaptiveSubdivide on the source polygon was missing there
mpOutputDevice->Push(PUSH_CLIPREGION);
//mpOutputDevice->SetClipRegion(Region(PolyPolygon(basegfx::tools::adaptiveSubdivideByAngle(maClipPolyPolygon))));
- mpOutputDevice->SetClipRegion(Region(PolyPolygon(maClipPolyPolygon)));
+ //mpOutputDevice->SetClipRegion(Region(PolyPolygon(maClipPolyPolygon)));
+ mpOutputDevice->SetClipRegion(Region(maClipPolyPolygon));
}
// recursively paint content
Modified: incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx Thu Dec 1 16:25:17 2011
@@ -31,7 +31,6 @@
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
-#include <drawinglayer/primitive2d/rendergraphicprimitive2d.hxx>
#include <drawinglayer/primitive2d/fillbitmapprimitive2d.hxx>
#include <drawinglayer/primitive2d/metafileprimitive2d.hxx>
#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
@@ -190,12 +189,6 @@ namespace drawinglayer
RenderBitmapPrimitive2D(static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate));
break;
}
- case PRIMITIVE2D_ID_RENDERGRAPHICPRIMITIVE2D :
- {
- // direct draw of transformed BitmapEx primitive
- RenderRenderGraphicPrimitive2D(static_cast< const primitive2d::RenderGraphicPrimitive2D& >(rCandidate));
- break;
- }
case PRIMITIVE2D_ID_FILLBITMAPPRIMITIVE2D :
{
// direct draw of fillBitmapPrimitive
Modified: incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/vclprocessor2d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/vclprocessor2d.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/vclprocessor2d.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor2d/vclprocessor2d.cxx Thu Dec 1 16:25:17 2011
@@ -31,7 +31,6 @@
#include <vcl/outdev.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
-#include <drawinglayer/primitive2d/rendergraphicprimitive2d.hxx>
#include <vclhelperbitmaptransform.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <vclhelperbitmaprender.hxx>
@@ -57,7 +56,6 @@
#include <vcl/metric.hxx>
#include <drawinglayer/primitive2d/textenumsprimitive2d.hxx>
#include <drawinglayer/primitive2d/epsprimitive2d.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
//////////////////////////////////////////////////////////////////////////////
// control support
@@ -419,75 +417,6 @@ namespace drawinglayer
}
}
- void VclProcessor2D::RenderRenderGraphicPrimitive2D(const primitive2d::RenderGraphicPrimitive2D& rRenderGraphicCandidate)
- {
- // create local transform
- basegfx::B2DHomMatrix aLocalTransform(maCurrentTransformation * rRenderGraphicCandidate.getTransform());
- vcl::RenderGraphic aRenderGraphic(rRenderGraphicCandidate.getRenderGraphic());
- bool bPainted(false);
-
- if(maBColorModifierStack.count())
- {
- // !!! TODO
- // aRenderGraphic = impModifyRenderGraphic(maBColorModifierStack, aRenderGraphic);
-
- if(aRenderGraphic.IsEmpty())
- {
- // color gets completely replaced, get it
- const basegfx::BColor aModifiedColor(maBColorModifierStack.getModifiedColor(basegfx::BColor()));
- basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon());
- aPolygon.transform(aLocalTransform);
-
- mpOutputDevice->SetFillColor(Color(aModifiedColor));
- mpOutputDevice->SetLineColor();
- mpOutputDevice->DrawPolygon(aPolygon);
-
- bPainted = true;
- }
- }
-
- if(!bPainted)
- {
- // decompose matrix to check for shear, rotate and mirroring
- basegfx::B2DVector aScale, aTranslate;
- double fRotate, fShearX;
- aLocalTransform.decompose(aScale, aTranslate, fRotate, fShearX);
-
- basegfx::B2DRange aOutlineRange(0.0, 0.0, 1.0, 1.0);
-
- if( basegfx::fTools::equalZero( fRotate ) )
- {
- aOutlineRange.transform( aLocalTransform );
- }
- else
- {
- // !!! TODO
- // if rotated, create the unrotated output rectangle for the GraphicManager paint
- /*
- const basegfx::B2DHomMatrix aSimpleObjectMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix(
- fabs(aScale.getX()), fabs(aScale.getY()),
- aTranslate.getX(), aTranslate.getY()));
-
- aOutlineRange.transform(aSimpleObjectMatrix);
- */
- }
-
- // prepare dest coordinates
- const Point aPoint( basegfx::fround(aOutlineRange.getMinX() ),
- basegfx::fround(aOutlineRange.getMinY() ) );
- const Size aSize( basegfx::fround(aOutlineRange.getWidth() ),
- basegfx::fround(aOutlineRange.getHeight() ) );
- const Size aSizePixel( mpOutputDevice->LogicToPixel( aSize ) );
- const vcl::RenderGraphicRasterizer aRasterizer( aRenderGraphic );
- const BitmapEx aBitmapEx( aRasterizer.Rasterize( aSizePixel, fRotate, fShearX ) );
-
- if( !aBitmapEx.IsEmpty() )
- {
- mpOutputDevice->DrawBitmapEx( aPoint, aSize, aBitmapEx );
- }
- }
- }
-
void VclProcessor2D::RenderFillBitmapPrimitive2D(const primitive2d::FillBitmapPrimitive2D& rFillBitmapCandidate)
{
const attribute::FillBitmapAttribute& rFillBitmapAttribute(rFillBitmapCandidate.getFillBitmap());
Modified: incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor3d/shadow3dextractor.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor3d/shadow3dextractor.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor3d/shadow3dextractor.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/processor3d/shadow3dextractor.cxx Thu Dec 1 16:25:17 2011
@@ -47,25 +47,6 @@ namespace drawinglayer
{
namespace processor3d
{
- /// helper to convert from BasePrimitive2DVector to primitive2d::Primitive2DSequence
- const primitive2d::Primitive2DSequence Shadow3DExtractingProcessor::getPrimitive2DSequenceFromBasePrimitive2DVector(
- const BasePrimitive2DVector& rVector) const
- {
- const sal_uInt32 nCount(rVector.size());
- primitive2d::Primitive2DSequence aRetval(nCount);
-
- for(sal_uInt32 a(0); a < nCount; a++)
- {
- aRetval[a] = rVector[a];
- }
-
- // all entries taken over; no need to delete entries, just reset to
- // mark as empty
- const_cast< BasePrimitive2DVector& >(rVector).clear();
-
- return aRetval;
- }
-
// as tooling, the process() implementation takes over API handling and calls this
// virtual render method when the primitive implementation is BasePrimitive3D-based.
void Shadow3DExtractingProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate)
@@ -79,8 +60,8 @@ namespace drawinglayer
const primitive3d::ShadowPrimitive3D& rPrimitive = static_cast< const primitive3d::ShadowPrimitive3D& >(rCandidate);
// set new target
- BasePrimitive2DVector aNewSubList;
- BasePrimitive2DVector* pLastTargetSequence = mpPrimitive2DSequence;
+ primitive2d::Primitive2DVector aNewSubList;
+ primitive2d::Primitive2DVector* pLastTargetSequence = mpPrimitive2DSequence;
mpPrimitive2DSequence = &aNewSubList;
// activate convert
@@ -104,7 +85,7 @@ namespace drawinglayer
primitive2d::BasePrimitive2D* pNew = new primitive2d::ShadowPrimitive2D(
rPrimitive.getShadowTransform(),
rPrimitive.getShadowColor(),
- getPrimitive2DSequenceFromBasePrimitive2DVector(aNewSubList));
+ primitive2d::Primitive2DVectorToPrimitive2DSequence(aNewSubList));
if(basegfx::fTools::more(rPrimitive.getShadowTransparence(), 0.0))
{
@@ -328,7 +309,7 @@ namespace drawinglayer
const primitive2d::Primitive2DSequence Shadow3DExtractingProcessor::getPrimitive2DSequence() const
{
- return getPrimitive2DSequenceFromBasePrimitive2DVector(maPrimitive2DSequence);
+ return Primitive2DVectorToPrimitive2DSequence(maPrimitive2DSequence);
}
} // end of namespace processor3d
Added: incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/tools/converters.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/tools/converters.cxx?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/tools/converters.cxx (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/drawinglayer/source/tools/converters.cxx Thu Dec 1 16:25:17 2011
@@ -0,0 +1,148 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_drawinglayer.hxx"
+
+#include <drawinglayer/tools/converters.hxx>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+#include <drawinglayer/processor2d/vclpixelprocessor2d.hxx>
+#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
+#include <vcl/virdev.hxx>
+
+#ifdef DBG_UTIL
+#include <tools/stream.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace tools
+ {
+ BitmapEx DRAWINGLAYER_DLLPUBLIC convertToBitmapEx(
+ const drawinglayer::primitive2d::Primitive2DSequence& rSeq,
+ const geometry::ViewInformation2D& rViewInformation2D,
+ sal_uInt32 nDiscreteWidth,
+ sal_uInt32 nDiscreteHeight,
+ sal_uInt32 nMaxQuadratPixels)
+ {
+ BitmapEx aRetval;
+
+ if(rSeq.hasElements() && nDiscreteWidth && nDiscreteHeight)
+ {
+ // get destination size in pixels
+ const MapMode aMapModePixel(MAP_PIXEL);
+ const sal_uInt32 nViewVisibleArea(nDiscreteWidth * nDiscreteHeight);
+ double fReduceFactor(1.0);
+ drawinglayer::primitive2d::Primitive2DSequence aSequence(rSeq);
+
+ if(nViewVisibleArea > nMaxQuadratPixels)
+ {
+ // reduce render size
+ fReduceFactor = sqrt((double)nMaxQuadratPixels / (double)nViewVisibleArea);
+ nDiscreteWidth = basegfx::fround((double)nDiscreteWidth * fReduceFactor);
+ nDiscreteHeight = basegfx::fround((double)nDiscreteHeight * fReduceFactor);
+
+ const drawinglayer::primitive2d::Primitive2DReference aEmbed(
+ new drawinglayer::primitive2d::TransformPrimitive2D(
+ basegfx::tools::createScaleB2DHomMatrix(fReduceFactor, fReduceFactor),
+ rSeq));
+
+ aSequence = drawinglayer::primitive2d::Primitive2DSequence(&aEmbed, 1);
+ }
+
+ const Point aEmptyPoint;
+ const Size aSizePixel(nDiscreteWidth, nDiscreteHeight);
+ geometry::ViewInformation2D aViewInformation2D(rViewInformation2D);
+ Bitmap aContent;
+ AlphaMask aAlphaMask;
+
+ {
+ // prepare vdev
+ VirtualDevice maContent;
+
+ maContent.SetOutputSizePixel(aSizePixel, false);
+ maContent.SetMapMode(aMapModePixel);
+ maContent.SetAntialiasing(true);
+
+ // render content
+ processor2d::VclPixelProcessor2D aContentProcessor(aViewInformation2D, maContent);
+ aContentProcessor.process(aSequence);
+
+ // get content pixels
+ maContent.EnableMapMode(false);
+ aContent = maContent.GetBitmap(aEmptyPoint, aSizePixel);
+ }
+
+ {
+ // prepare vdev
+ VirtualDevice maAlpha;
+
+ maAlpha.SetOutputSizePixel(aSizePixel, false);
+ maAlpha.SetMapMode(aMapModePixel);
+ maAlpha.SetAntialiasing(true);
+
+ // set alöpha to all white (fully transparent)
+ maAlpha.SetBackground(Wallpaper(Color(COL_WHITE)));
+ maAlpha.Erase();
+
+ // embed primitives to paint them black
+ const primitive2d::Primitive2DReference xRef(
+ new primitive2d::ModifiedColorPrimitive2D(
+ aSequence,
+ basegfx::BColorModifier(
+ basegfx::BColor(0.0, 0.0, 0.0),
+ 0.5,
+ basegfx::BCOLORMODIFYMODE_REPLACE)));
+ const primitive2d::Primitive2DSequence xSeq(&xRef, 1);
+
+ // render
+ processor2d::VclPixelProcessor2D aAlphaProcessor(aViewInformation2D, maAlpha);
+ aAlphaProcessor.process(xSeq);
+
+ // get alpha cahannel from vdev
+ maAlpha.EnableMapMode(false);
+ aAlphaMask = maAlpha.GetBitmap(aEmptyPoint, aSizePixel);
+ }
+
+ aRetval = BitmapEx(aContent, aAlphaMask);
+ }
+
+#ifdef DBG_UTIL
+ static bool bDoSaveForVisualControl(false);
+ if(bDoSaveForVisualControl)
+ {
+ SvFileStream aNew((const String&)String(ByteString( "c:\\test.png" ), RTL_TEXTENCODING_UTF8), STREAM_WRITE|STREAM_TRUNC);
+ aNew << aRetval;
+ }
+#endif
+
+ return aRetval;
+ }
+
+ } // end of namespace tools
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
Modified: incubator/ooo/branches/alg/svgreplacement/main/editeng/inc/editeng/unoprnms.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/editeng/inc/editeng/unoprnms.hxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/editeng/inc/editeng/unoprnms.hxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/editeng/inc/editeng/unoprnms.hxx Thu Dec 1 16:25:17 2011
@@ -176,6 +176,7 @@
#define UNO_NAME_GRAPHOBJ_FILLBITMAP "GraphicObjectFillBitmap"
#define UNO_NAME_GRAPHOBJ_GRAFURL "GraphicURL"
+#define UNO_NAME_GRAPHOBJ_REPLACEMENTGRAFURL "ReplacementGraphicURL"
#define UNO_NAME_GRAPHOBJ_GRAFSTREAMURL "GraphicStreamURL"
#define UNO_NAME_GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:"
#define UNO_NAME_GRAPHOBJ_URLPKGPREFIX "vnd.sun.star.Package:"
Modified: incubator/ooo/branches/alg/svgreplacement/main/filter/source/flash/swfwriter1.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/filter/source/flash/swfwriter1.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/filter/source/flash/swfwriter1.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/filter/source/flash/swfwriter1.cxx Thu Dec 1 16:25:17 2011
@@ -36,7 +36,6 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <svtools/filter.hxx>
#include <vcl/graphictools.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
#ifndef _ZLIB_H
#ifdef SYSTEM_ZLIB
@@ -1887,19 +1886,6 @@ void Writer::Impl_writeActions( const GD
}
break;
- case( META_RENDERGRAPHIC_ACTION ):
- {
- const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pAction;
- const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() );
- const Point aPointPixel;
- const Size aSizePixel( mpVDev->LogicToPixel( pA->GetSize() ) );
- const BitmapEx aBmpEx( aRasterizer.Rasterize( aSizePixel ) );
-
- Impl_writeImage( aBmpEx, pA->GetPoint(), pA->GetSize(),
- aPointPixel, aBmpEx.GetSizePixel(), clipRect, 1 == bMap );
- }
- break;
-
case( META_MAPMODE_ACTION ):
{
// const MetaMapModeAction *pA = (const MetaMapModeAction*) pAction;
Modified: incubator/ooo/branches/alg/svgreplacement/main/filter/source/graphicfilter/eos2met/eos2met.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/filter/source/graphicfilter/eos2met/eos2met.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/filter/source/graphicfilter/eos2met/eos2met.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/filter/source/graphicfilter/eos2met/eos2met.cxx Thu Dec 1 16:25:17 2011
@@ -40,7 +40,6 @@
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
#include <vcl/msgbox.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
#include <svl/solar.hrc>
@@ -323,7 +322,6 @@ void METWriter::CountActionsAndBitmaps(c
case META_BMPEX_ACTION:
case META_BMPEXSCALE_ACTION:
case META_BMPEXSCALEPART_ACTION:
- case META_RENDERGRAPHIC_ACTION:
nNumberOfBitmaps++;
break;
}
@@ -797,16 +795,6 @@ void METWriter::WriteImageObjects(const
}
break;
- case( META_RENDERGRAPHIC_ACTION ):
- {
- const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pMA;
- const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() );
- const BitmapEx aBmpEx( aRasterizer.Rasterize( pCompDev->LogicToPixel( pA->GetSize() ) ) );
-
- METSetMix( eGDIRasterOp );
- WriteImageObject( Graphic( aBmpEx ).GetBitmap() );
- }
- break;
}
if (bStatus==sal_False)
@@ -2355,14 +2343,6 @@ void METWriter::WriteOrders( const GDIMe
}
break;
- case( META_RENDERGRAPHIC_ACTION ):
- {
- const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pMA;
-
- METSetMix( eGDIRasterOp );
- METBitBlt( pA->GetPoint(), pA->GetSize(), pCompDev->LogicToPixel( pA->GetSize(), pMTF->GetPrefMapMode() ) );
- }
- break;
}
nWrittenActions++;
Modified: incubator/ooo/branches/alg/svgreplacement/main/filter/source/graphicfilter/epict/epict.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/filter/source/graphicfilter/epict/epict.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/filter/source/graphicfilter/epict/epict.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/filter/source/graphicfilter/epict/epict.cxx Thu Dec 1 16:25:17 2011
@@ -42,7 +42,6 @@
#include <vcl/svapp.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/gdimtf.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
#include <tools/bigint.hxx>
@@ -223,7 +222,6 @@ void PictWriter::CountActionsAndBitmaps(
case META_BMPEX_ACTION:
case META_BMPEXSCALE_ACTION:
case META_BMPEXSCALEPART_ACTION:
- case META_RENDERGRAPHIC_ACTION:
nNumberOfBitmaps++;
break;
}
@@ -2153,17 +2151,6 @@ void PictWriter::WriteOpcodes( const GDI
}
break;
- case( META_RENDERGRAPHIC_ACTION ):
- {
- const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pMA;
- const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() );
- VirtualDevice aVirDev;
- const Bitmap aBmp( Graphic( aRasterizer.Rasterize(
- aVirDev.LogicToPixel( pA->GetSize() ) ) ).GetBitmap() );
-
- WriteOpcode_BitsRect( pA->GetPoint(), pA->GetSize(), aBmp );
- }
- break;
}
nWrittenActions++;
Modified: incubator/ooo/branches/alg/svgreplacement/main/filter/source/graphicfilter/eps/eps.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/filter/source/graphicfilter/eps/eps.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/filter/source/graphicfilter/eps/eps.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/filter/source/graphicfilter/eps/eps.cxx Thu Dec 1 16:25:17 2011
@@ -43,7 +43,6 @@
#include <svtools/fltcall.hxx>
#include <svtools/FilterConfigItem.hxx>
#include <vcl/graphictools.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
#include "strings.hrc"
#include <math.h>
@@ -1336,7 +1335,6 @@ void PSWriter::ImplWriteActions( const G
case META_BMPSCALEPART_ACTION :
case META_BMPEXSCALE_ACTION :
case META_BMPEXSCALEPART_ACTION :
- case META_RENDERGRAPHIC_ACTION :
{
nBitmapCount++;
nBitmapAction = nCurAction;
@@ -1396,22 +1394,6 @@ void PSWriter::ImplWriteActions( const G
}
break;
- case( META_RENDERGRAPHIC_ACTION ):
- {
- const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pMA;
- const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() );
- const BitmapEx aBmpEx( aRasterizer.Rasterize( rVDev.LogicToPixel( pA->GetSize() ) ) );
- Bitmap aBmp( aBmpEx.GetBitmap() );
-
- if ( mbGrayScale )
- aBmp.Convert( BMP_CONVERSION_8BIT_GREYS );
-
- Bitmap aMask( aBmpEx.GetMask() );
- Size aSize( pA->GetSize() );
-
- ImplBmp( &aBmp, &aMask, pA->GetPoint(), aSize.Width(), aSize.Height() );
- }
- break;
}
}
}
Modified: incubator/ooo/branches/alg/svgreplacement/main/filter/source/svg/svgwriter.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/filter/source/svg/svgwriter.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/filter/source/svg/svgwriter.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/filter/source/svg/svgwriter.cxx Thu Dec 1 16:25:17 2011
@@ -1658,24 +1658,6 @@ void SVGActionWriter::ImplWriteActions(
}
break;
- case( META_RENDERGRAPHIC_ACTION ):
- {
- if( nWriteFlags & SVGWRITER_WRITE_FILL )
- {
- // TODO KA: try to embed the native data in case the RenderGraphic
- // contains valid SVG data (MimeType "image/svg+xml")
- // => incorporate 'use' or 'image' element (KA 01/2011)
- const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pAction;
- const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() );
- const Point aPointPixel;
- const Size aSizePixel( mpVDev->LogicToPixel( pA->GetSize() ) );
- const BitmapEx aBmpEx( aRasterizer.Rasterize( aSizePixel ) );
-
- ImplWriteBmp( aBmpEx, pA->GetPoint(), pA->GetSize(), aPointPixel, aBmpEx.GetSizePixel() );
- }
- }
- break;
-
case( META_CLIPREGION_ACTION ):
case( META_ISECTRECTCLIPREGION_ACTION ):
case( META_ISECTREGIONCLIPREGION_ACTION ):
Modified: incubator/ooo/branches/alg/svgreplacement/main/filter/source/svg/svgwriter.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/filter/source/svg/svgwriter.hxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/filter/source/svg/svgwriter.hxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/filter/source/svg/svgwriter.hxx Thu Dec 1 16:25:17 2011
@@ -50,7 +50,6 @@
#include <vcl/cvtgrf.hxx>
#endif
#include <vcl/graphictools.hxx>
-#include <vcl/rendergraphicrasterizer.hxx>
#include <xmloff/xmlexp.hxx>
#include <xmloff/nmspmap.hxx>
Added: incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/Primitive2DTools.idl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/Primitive2DTools.idl?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/Primitive2DTools.idl (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/Primitive2DTools.idl Thu Dec 1 16:25:17 2011
@@ -0,0 +1,43 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef com_sun_star_graphic_Primitive2DTools_idl
+#define com_sun_star_graphic_Primitive2DTools_idl
+
+#include <com/sun/star/graphic/XPrimitive2DRenderer.idl>
+
+module com { module sun { module star { module graphic
+{
+
+/** Service that describes the necessary interfaces and properties
+ for tooling involved with XPrimitive2D interfaces
+ */
+
+service Primitive2DTools
+{
+ /** Interface to render B2DPrimitives to a XBitmap
+ */
+ interface ::com::sun::star::graphic::XPrimitive2DRenderer;
+};
+
+} ; } ; } ; } ;
+
+#endif
Added: incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/SvgTools.idl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/SvgTools.idl?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/SvgTools.idl (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/SvgTools.idl Thu Dec 1 16:25:17 2011
@@ -0,0 +1,44 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef com_sun_star_graphic_SvgTools_idl
+#define com_sun_star_graphic_SvgTools_idl
+
+#include <com/sun/star/graphic/XSvgParser.idl>
+
+module com { module sun { module star { module graphic
+{
+
+/** Service that describes the necessary interfaces and properties
+ to handle svg files
+ */
+
+service SvgTools
+{
+ /** Interface to parse a svg file to a sequence of
+ B2DPrimitives for internal usage
+ */
+ interface ::com::sun::star::graphic::XSvgParser;
+};
+
+} ; } ; } ; } ;
+
+#endif
Added: incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/XPrimitive2DRenderer.idl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/XPrimitive2DRenderer.idl?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/XPrimitive2DRenderer.idl (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/XPrimitive2DRenderer.idl Thu Dec 1 16:25:17 2011
@@ -0,0 +1,80 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+#ifndef __com_sun_star_graphic_XPrimitive2DRenderer_idl__
+#define __com_sun_star_graphic_XPrimitive2DRenderer_idl__
+
+#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/rendering/XBitmap.idl>
+#include <com/sun/star/beans/PropertyValue.idl>
+#include <com/sun/star/geometry/RealRectangle2D.idl>
+
+module com { module sun { module star { module graphic {
+
+interface XPrimitive2D;
+
+/** XPrimitive2DRenderer interface
+
+ This interface allows to convert from a sequence of XPrimitive2Ds
+ to a XBitmap
+ */
+interface XPrimitive2DRenderer : ::com::sun::star::uno::XInterface
+{
+ /** return rasterized version of given XPrimitive2D
+
+ @param Primitive2DSequence
+ The graphic content description
+
+ @param aViewInformationSequence
+ The ViewInformation2D
+
+ @param DPI_X
+ The horizontal resolution of the callers device in pixel per inch. This
+ value is needed to calculate the correct dimensions of the graphic to be
+ rasterized. If a value of <value>0</value> is given, a horizontal default
+ resolution of 72 DPI is used.
+
+ @param DPI_Y
+ The vertical resolution of the callers device in pixel per inch. This
+ value is needed to calculate the correct dimensions of the graphic to be
+ rasterized. If a value of <value>0</value> is given, a vertical default
+ resolution of 72 DPI is used.
+
+ @param Range
+ The range in 1/100th mm of the graphic to be rasterized
+
+ @param MaximumQuadraticPixels
+ The maximum allowed number of pixels to be used to allow limiting the
+ possible size of used pixels. The AspectRatio is preserved, the result
+ gets limited to given number. If a value of 0 is given, a default of
+ 500000 is used.
+ */
+ com::sun::star::rendering::XBitmap rasterize(
+ [in] sequence< XPrimitive2D > Primitive2DSequence,
+ [in] sequence< ::com::sun::star::beans::PropertyValue > aViewInformationSequence,
+ [in] unsigned long DPI_X,
+ [in] unsigned long DPI_Y,
+ [in] ::com::sun::star::geometry::RealRectangle2D Range,
+ [in] unsigned long MaximumQuadraticPixels);
+};
+
+}; }; }; };
+
+#endif
Added: incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/XSvgParser.idl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/XSvgParser.idl?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/XSvgParser.idl (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/XSvgParser.idl Thu Dec 1 16:25:17 2011
@@ -0,0 +1,48 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+#ifndef __com_sun_star_graphic_XSvgParser_idl__
+#define __com_sun_star_graphic_XSvgParser_idl__
+
+#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/io/XInputStream.idl>
+
+module com { module sun { module star { module graphic {
+
+interface XPrimitive2D;
+
+/** XSvgParser interface
+
+ This interface allows to parse a SVG stream in form of a sequence of bytes
+ to be parsed into a sequence of XPrimitive2Ds
+ */
+interface XSvgParser : ::com::sun::star::uno::XInterface
+{
+ /** Retrieve decomposed list of simpler primitives
+
+ @param xSvgStream
+ The file containing the SVG XML data
+ */
+ sequence< XPrimitive2D > getDecomposition( [in] io::XInputStream xSvgStream );
+};
+
+}; }; }; };
+
+#endif
Modified: incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/makefile.mk?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/makefile.mk (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/offapi/com/sun/star/graphic/makefile.mk Thu Dec 1 16:25:17 2011
@@ -48,6 +48,8 @@ IDLFILES= \
GraphicRendererVCL.idl \
GraphicType.idl \
MediaProperties.idl \
+ Primitive2DTools.idl \
+ SvgTools.idl \
XPrimitive2D.idl \
XPrimitive3D.idl \
XPrimitiveFactory2D.idl \
@@ -56,7 +58,9 @@ IDLFILES= \
XGraphicRasterizer.idl \
XGraphicRenderer.idl \
XGraphicObject.idl \
- XGraphicTransformer.idl
+ XGraphicTransformer.idl \
+ XPrimitive2DRenderer.idl \
+ XSvgParser.idl
# --- Targets ------------------------------------------------------
Modified: incubator/ooo/branches/alg/svgreplacement/main/postprocess/packcomponents/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/postprocess/packcomponents/makefile.mk?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/postprocess/packcomponents/makefile.mk (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/postprocess/packcomponents/makefile.mk Thu Dec 1 16:25:17 2011
@@ -55,12 +55,14 @@ my_components = \
charttools \
chartview \
component/comphelper/util/comphelp \
+ component/drawinglayer/drawinglayer \
component/framework/util/fwk \
component/framework/util/fwl \
component/framework/util/fwm \
component/vbahelper/util/msforms \
component/sfx2/util/sfx \
component/sot/util/sot \
+ component/svgio/svgio \
component/svl/source/fsstor/fsstorage \
component/svl/source/passwordcontainer/passwordcontainer \
component/svl/util/svl \
Modified: incubator/ooo/branches/alg/svgreplacement/main/scp2/source/ooo/file_library_ooo.scp
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/scp2/source/ooo/file_library_ooo.scp?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/scp2/source/ooo/file_library_ooo.scp (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/scp2/source/ooo/file_library_ooo.scp Thu Dec 1 16:25:17 2011
@@ -393,6 +393,7 @@ End
#endif
STD_LIB_FILE(gid_File_Lib_Drawinglayer,drawinglayer)
+STD_LIB_FILE(gid_File_Lib_SvgIo,svgio)
SPECIAL_LIB_FILE(gid_File_Lib_Embobj,embobj)
Modified: incubator/ooo/branches/alg/svgreplacement/main/scp2/source/ooo/module_hidden_ooo.scp
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/scp2/source/ooo/module_hidden_ooo.scp?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/scp2/source/ooo/module_hidden_ooo.scp (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/scp2/source/ooo/module_hidden_ooo.scp Thu Dec 1 16:25:17 2011
@@ -173,6 +173,7 @@ Module gid_Module_Root_Files_4
gid_File_Lib_Dbt,
gid_File_Lib_Dbfile,
gid_File_Lib_Drawinglayer,
+ gid_File_Lib_SvgIo,
gid_File_Lib_Editeng,
gid_File_Lib_Flat,
gid_File_Lib_For,
Modified: incubator/ooo/branches/alg/svgreplacement/main/sd/source/ui/view/drviews6.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/sd/source/ui/view/drviews6.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/sd/source/ui/view/drviews6.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/sd/source/ui/view/drviews6.cxx Thu Dec 1 16:25:17 2011
@@ -446,7 +446,7 @@ void DrawViewShell::GetBmpMaskState( Sfx
// valid graphic object?
if( pObj && pObj->ISA( SdrGrafObj ) &&
- !( ((SdrGrafObj*) pObj)->IsEPS() || ((SdrGrafObj*) pObj)->IsRenderGraphic() ) &&
+ !((SdrGrafObj*) pObj)->IsEPS() &&
!mpDrawView->IsTextEdit() )
{
bEnable = sal_True;
Modified: incubator/ooo/branches/alg/svgreplacement/main/sd/source/ui/view/sdview3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/sd/source/ui/view/sdview3.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/sd/source/ui/view/sdview3.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/sd/source/ui/view/sdview3.cxx Thu Dec 1 16:25:17 2011
@@ -219,7 +219,6 @@ if( aPreviewSizePixel.Width() && aPrevie
case META_GRADIENTEX_ACTION:
case META_BMPSCALEPART_ACTION:
case META_BMPEXSCALEPART_ACTION:
- case META_RENDERGRAPHIC_ACTION:
bVector = true;
break;
case META_BMP_ACTION:
Modified: incubator/ooo/branches/alg/svgreplacement/main/sd/source/ui/view/sdview4.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/sd/source/ui/view/sdview4.cxx?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/sd/source/ui/view/sdview4.cxx (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/sd/source/ui/view/sdview4.cxx Thu Dec 1 16:25:17 2011
@@ -395,8 +395,10 @@ IMPL_LINK( View, DropInsertFileHdl, Time
const bool bLink = ( ( nTempAction & DND_ACTION_LINK ) != 0 );
SdrGrafObj* pGrafObj = InsertGraphic( aGraphic, nTempAction, maDropPos, NULL, NULL );
- if( pGrafObj && bLink )
- pGrafObj->SetGraphicLink( aCurrentDropFile, String() );
+ if(pGrafObj && bLink)
+ {
+ pGrafObj->SetGraphicLink( aCurrentDropFile, String() );
+ }
// return action from first inserted graphic
if( aIter == maDropFileVector.begin() )
Modified: incubator/ooo/branches/alg/svgreplacement/main/solenv/inc/libs.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/solenv/inc/libs.mk?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/solenv/inc/libs.mk (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/solenv/inc/libs.mk Thu Dec 1 16:25:17 2011
@@ -139,6 +139,7 @@ VCLLIB=-lvcl$(DLLPOSTFIX)
OOXLIB=-loox$(DLLPOSTFIX)
BASEGFXLIB=-lbasegfx$(DLLPOSTFIX)
DRAWINGLAYERLIB=-ldrawinglayer$(DLLPOSTFIX)
+SVGIOLIB=-lsvgio$(DLLPOSTFIX)
BASEBMPLIB=-lbasebmp$(DLLPOSTFIX)
CANVASTOOLSLIB=-lcanvastools$(DLLPOSTFIX)
CPPCANVASLIB=-lcppcanvas$(DLLPOSTFIX)
@@ -469,6 +470,7 @@ VCLLIB=ivcl.lib
OOXLIB=ioox.lib
BASEGFXLIB=ibasegfx.lib
DRAWINGLAYERLIB=idrawinglayer.lib
+SVGIOLIB=isvgio.lib
BASEBMPLIB=ibasebmp.lib
CANVASTOOLSLIB=icanvastools.lib
CPPCANVASLIB=icppcanvas.lib
Modified: incubator/ooo/branches/alg/svgreplacement/main/splitbuild/framework.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/splitbuild/framework.lst?rev=1209140&r1=1209139&r2=1209140&view=diff
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/splitbuild/framework.lst (original)
+++ incubator/ooo/branches/alg/svgreplacement/main/splitbuild/framework.lst Thu Dec 1 16:25:17 2011
@@ -1 +1 @@
-automation avmedia basic basctl cui desktop drawinglayer extensions forms formula framework idl scripting sfx2 svx xmlsecurity vbahelper
+automation avmedia basic basctl cui desktop drawinglayer svgio extensions forms formula framework idl scripting sfx2 svx xmlsecurity vbahelper
Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/Library_svgio.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/Library_svgio.mk?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svgio/Library_svgio.mk (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/svgio/Library_svgio.mk Thu Dec 1 16:25:17 2011
@@ -0,0 +1,86 @@
+#/**************************************************************
+# *
+# * 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
+# *
+# * Unless required by applicable law or agreed to in writing,
+# * software distributed under the License is distributed on an
+# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# * KIND, either express or implied. See the License for the
+# * specific language governing permissions and limitations
+# * under the License.
+# *
+# *************************************************************/
+
+$(eval $(call gb_Library_Library,svgio))
+
+$(eval $(call gb_Library_set_componentfile,svgio,svgio/svgio))
+
+$(eval $(call gb_Library_add_package_headers,svgio,svgio_inc))
+
+$(eval $(call gb_Library_add_precompiled_header,svgio,$(SRCDIR)/svgio/inc/pch/precompiled_svgio))
+
+$(eval $(call gb_Library_set_include,svgio,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/svgio/inc \
+ -I$(SRCDIR)/svgio/inc/pch \
+ -I$(SRCDIR)/solenv/inc \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_set_defs,svgio,\
+ $$(DEFS) \
+ -DSVGIO_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_add_linked_libs,svgio,\
+ basegfx \
+ drawinglayer \
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ stl \
+ tl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,svgio,\
+ svgio/source/svgreader/svgcharacternode \
+ svgio/source/svgreader/svgcirclenode \
+ svgio/source/svgreader/svgdocument \
+ svgio/source/svgreader/svgdocumenthandler \
+ svgio/source/svgreader/svgellipsenode \
+ svgio/source/svgreader/svggnode \
+ svgio/source/svgreader/svggradientnode \
+ svgio/source/svgreader/svggradientstopnode \
+ svgio/source/svgreader/svgimagenode \
+ svgio/source/svgreader/svglinenode \
+ svgio/source/svgreader/svgnode \
+ svgio/source/svgreader/svgpaint \
+ svgio/source/svgreader/svgpathnode \
+ svgio/source/svgreader/svgpolynode \
+ svgio/source/svgreader/svgrectnode \
+ svgio/source/svgreader/svgstyleattributes \
+ svgio/source/svgreader/svgstylenode \
+ svgio/source/svgreader/svgsvgnode \
+ svgio/source/svgreader/svgsymbolnode \
+ svgio/source/svgreader/svgtextnode \
+ svgio/source/svgreader/svgtoken \
+ svgio/source/svgreader/svgtrefnode \
+ svgio/source/svgreader/svgtools \
+ svgio/source/svgreader/svgtextpathnode \
+ svgio/source/svgreader/svgtspannode \
+ svgio/source/svgreader/svgusenode \
+ svgio/source/svguno/svguno \
+ svgio/source/svguno/xsvgparser \
+))
+
+# vim: set noet sw=4 ts=4:
Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/Makefile
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/Makefile?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svgio/Makefile (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/svgio/Makefile Thu Dec 1 16:25:17 2011
@@ -0,0 +1,32 @@
+#/**************************************************************
+# *
+# * 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
+# *
+# * Unless required by applicable law or agreed to in writing,
+# * software distributed under the License is distributed on an
+# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# * KIND, either express or implied. See the License for the
+# * specific language governing permissions and limitations
+# * under the License.
+# *
+# *************************************************************/
+
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
+
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
+
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
+
+# vim: set noet sw=4 ts=4:
Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/Module_svgio.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/Module_svgio.mk?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svgio/Module_svgio.mk (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/svgio/Module_svgio.mk Thu Dec 1 16:25:17 2011
@@ -0,0 +1,29 @@
+#/**************************************************************
+# *
+# * 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
+# *
+# * Unless required by applicable law or agreed to in writing,
+# * software distributed under the License is distributed on an
+# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# * KIND, either express or implied. See the License for the
+# * specific language governing permissions and limitations
+# * under the License.
+# *
+# *************************************************************/
+
+$(eval $(call gb_Module_Module,svgio))
+
+$(eval $(call gb_Module_add_targets,svgio,\
+ Library_svgio \
+ Package_inc \
+))
+
+# vim: set noet ts=4 sw=4:
Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/Package_inc.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/Package_inc.mk?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svgio/Package_inc.mk (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/svgio/Package_inc.mk Thu Dec 1 16:25:17 2011
@@ -0,0 +1,49 @@
+#/**************************************************************
+# *
+# * 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
+# *
+# * Unless required by applicable law or agreed to in writing,
+# * software distributed under the License is distributed on an
+# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# * KIND, either express or implied. See the License for the
+# * specific language governing permissions and limitations
+# * under the License.
+# *
+# *************************************************************/
+
+$(eval $(call gb_Package_Package,svgio_inc,$(SRCDIR)/svgio/inc))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgiodllapi.h,svgio/svgiodllapi.h))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgcharacternode.hxx,svgio/svgreader/svgcharacternode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgcirclenode.hxx,svgio/svgreader/svgcirclenode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgdocument.hxx,svgio/svgreader/svgdocument.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgdocumenthandler.hxx,svgio/svgreader/svgdocumenthandler.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgellipsenode.hxx,svgio/svgreader/svgellipsenode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svggnode.hxx,svgio/svgreader/svggnode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svggradientnode.hxx,svgio/svgreader/svggradientnode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svggradientstopnode.hxx,svgio/svgreader/svggradientstopnode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgimagenode.hxx,svgio/svgreader/svgimagenode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svglinenode.hxx,svgio/svgreader/svglinenode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgnode.hxx,svgio/svgreader/svgnode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgpaint.hxx,svgio/svgreader/svgpaint.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgpathnode.hxx,svgio/svgreader/svgpathnode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgpolynode.hxx,svgio/svgreader/svgpolynode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgrectnode.hxx,svgio/svgreader/svgrectnode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgstyleattributes.hxx,svgio/svgreader/svgstyleattributes.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgstylenode.hxx,svgio/svgreader/svgstylenode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgsvgnode.hxx,svgio/svgreader/svgsvgnode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgsymbolnode.hxx,svgio/svgreader/svgsymbolnode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgtextnode.hxx,svgio/svgreader/svgtextnode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgtoken.hxx,svgio/svgreader/svgtoken.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgtrefnode.hxx,svgio/svgreader/svgtrefnode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgtools.hxx,svgio/svgreader/svgtools.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgtextpathnode.hxx,svgio/svgreader/svgtextpathnode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgtspannode.hxx,svgio/svgreader/svgtspannode.hxx))
+$(eval $(call gb_Package_add_file,svgio_inc,inc/svgio/svgreader/svgusenode.hxx,svgio/svgreader/svgusenode.hxx))
Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/makefile.mk?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/makefile.mk (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/makefile.mk Thu Dec 1 16:25:17 2011
@@ -0,0 +1,41 @@
+#/**************************************************************
+# *
+# * 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
+# *
+# * Unless required by applicable law or agreed to in writing,
+# * software distributed under the License is distributed on an
+# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# * KIND, either express or implied. See the License for the
+# * specific language governing permissions and limitations
+# * under the License.
+# *
+# *************************************************************/
+PRJ=..
+
+PRJNAME=svgio
+TARGET=inc
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Files --------------------------------------------------------
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.IF "$(ENABLE_PCH)"!=""
+ALLTAR : \
+ $(SLO)$/precompiled.pch \
+ $(SLO)$/precompiled_ex.pch
+
+.ENDIF # "$(ENABLE_PCH)"!=""
+
Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/pch/precompiled_svgio.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/pch/precompiled_svgio.cxx?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/pch/precompiled_svgio.cxx (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/pch/precompiled_svgio.cxx Thu Dec 1 16:25:17 2011
@@ -0,0 +1,23 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "precompiled_svgio.hxx"
+
Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/pch/precompiled_svgio.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/pch/precompiled_svgio.hxx?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/pch/precompiled_svgio.hxx (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/pch/precompiled_svgio.hxx Thu Dec 1 16:25:17 2011
@@ -0,0 +1,26 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+// MARKER(update_precomp.py): Generated on 2006-09-01 17:49:30.796084
+
+#ifdef PRECOMPILED_HEADERS
+#endif
+
Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgiodllapi.h
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgiodllapi.h?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgiodllapi.h (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgiodllapi.h Thu Dec 1 16:25:17 2011
@@ -0,0 +1,33 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+#ifndef INCLUDED_SVGIODLLAPI_H
+#define INCLUDED_SVGIODLLAPI_H
+
+#include "sal/types.h"
+
+#if defined(SVGIO_DLLIMPLEMENTATION)
+#define SVGIO_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define SVGIO_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+#define SVGIO_DLLPRIVATE SAL_DLLPRIVATE
+
+#endif /* INCLUDED_SVGIODLLAPI_H */
Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgcharacternode.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgcharacternode.hxx?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgcharacternode.hxx (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgcharacternode.hxx Thu Dec 1 16:25:17 2011
@@ -0,0 +1,184 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef INCLUDED_SVGIO_SVGREADER_SVGCHARACTERNODE_HXX
+#define INCLUDED_SVGIO_SVGREADER_SVGCHARACTERNODE_HXX
+
+#include <svgio/svgiodllapi.h>
+#include <svgio/svgreader/svgnode.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace drawinglayer { namespace primitive2d { class TextSimplePortionPrimitive2D; }}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace svgio
+{
+ namespace svgreader
+ {
+ class SvgTextPositions
+ {
+ private:
+ SvgNumberVector maX;
+ SvgNumberVector maY;
+ SvgNumberVector maDx;
+ SvgNumberVector maDy;
+ SvgNumberVector maRotate;
+ SvgNumber maTextLength;
+
+ /// bitfield
+ bool mbLengthAdjust : 1; // true = spacing, false = spacingAndGlyphs
+
+ public:
+ SvgTextPositions();
+
+ void parseTextPositionAttributes(const rtl::OUString& rTokenName, SVGToken aSVGToken, const rtl::OUString& aContent);
+
+ /// X content
+ const SvgNumberVector& getX() const { return maX; }
+ void setX(const SvgNumberVector& aX) { maX = aX; }
+
+ /// Y content
+ const SvgNumberVector& getY() const { return maY; }
+ void setY(const SvgNumberVector& aY) { maY = aY; }
+
+ /// Dx content
+ const SvgNumberVector& getDx() const { return maDx; }
+ void setDx(const SvgNumberVector& aDx) { maDx = aDx; }
+
+ /// Dy content
+ const SvgNumberVector& getDy() const { return maDy; }
+ void setDy(const SvgNumberVector& aDy) { maDy = aDy; }
+
+ /// Rotate content
+ const SvgNumberVector& getRotate() const { return maRotate; }
+ void setRotate(const SvgNumberVector& aRotate) { maRotate = aRotate; }
+
+ /// TextLength content
+ const SvgNumber& getTextLength() const { return maTextLength; }
+ void setTextLength(const SvgNumber& rTextLength = SvgNumber()) { maTextLength = rTextLength; }
+
+ /// LengthAdjust content
+ bool getLengthAdjust() const { return mbLengthAdjust; }
+ void setLengthAdjust(bool bNew) { mbLengthAdjust = bNew; }
+ };
+ } // end of namespace svgreader
+} // end of namespace svgio
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace svgio
+{
+ namespace svgreader
+ {
+ class SvgTextPosition
+ {
+ private:
+ SvgTextPosition* mpParent;
+ ::std::vector< double > maX;
+ ::std::vector< double > maY;
+ ::std::vector< double > maRotate;
+ double mfTextLength;
+
+ // absolute, current, advancing position
+ basegfx::B2DPoint maPosition;
+
+ // advancing rotation index
+ sal_uInt32 mnRotationIndex;
+
+ /// bitfield
+ bool mbLengthAdjust : 1; // true = spacing, false = spacingAndGlyphs
+ bool mbAbsoluteX : 1;
+ bool mbAbsoluteY : 1;
+
+ public:
+ SvgTextPosition(
+ SvgTextPosition* pParent,
+ const InfoProvider& rInfoProvider,
+ const SvgTextPositions& rSvgTextPositions);
+
+ // data read access
+ const SvgTextPosition* getParent() const { return mpParent; }
+ const ::std::vector< double >& getX() const { return maX; }
+ const ::std::vector< double >& getY() const { return maY; }
+ double getTextLength() const { return mfTextLength; }
+ bool getLengthAdjust() const { return mbLengthAdjust; }
+ bool getAbsoluteX() const { return mbAbsoluteX; }
+ bool getAbsoluteY() const { return mbAbsoluteY; }
+
+ // get/set absolute, current, advancing position
+ const basegfx::B2DPoint& getPosition() const { return maPosition; }
+ void setPosition(const basegfx::B2DPoint& rNew) { maPosition = rNew; }
+
+ // rotation handling
+ bool isRotated() const;
+ double consumeRotation();
+ };
+ } // end of namespace svgreader
+} // end of namespace svgio
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace svgio
+{
+ namespace svgreader
+ {
+ class SvgCharacterNode : public SvgNode
+ {
+ private:
+ /// the string data
+ rtl::OUString maText;
+
+ /// local helpers
+ drawinglayer::primitive2d::TextSimplePortionPrimitive2D* createSimpleTextPrimitive(
+ SvgTextPosition& rSvgTextPosition,
+ const SvgStyleAttributes& rSvgStyleAttributes) const;
+ void decomposeTextWithStyle(
+ drawinglayer::primitive2d::Primitive2DVector& rTarget,
+ SvgTextPosition& rSvgTextPosition,
+ const SvgStyleAttributes& rSvgStyleAttributes) const;
+
+ public:
+ SvgCharacterNode(
+ SvgDocument& rDocument,
+ SvgNode* pParent,
+ const rtl::OUString& rText);
+ virtual ~SvgCharacterNode();
+
+ virtual const SvgStyleAttributes* getSvgStyleAttributes() const;
+ virtual void decomposeText(drawinglayer::primitive2d::Primitive2DVector& rTarget, SvgTextPosition& rSvgTextPosition) const;
+ void whiteSpaceHandling();
+ void addGap();
+ void concatenate(const rtl::OUString& rText);
+
+ /// Text content
+ const rtl::OUString& getText() const { return maText; }
+ };
+ } // end of namespace svgreader
+} // end of namespace svgio
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_SVGIO_SVGREADER_SVGCHARACTERNODE_HXX
+
+// eof
Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgcirclenode.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgcirclenode.hxx?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgcirclenode.hxx (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgcirclenode.hxx Thu Dec 1 16:25:17 2011
@@ -0,0 +1,80 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef INCLUDED_SVGIO_SVGREADER_SVGCIRCLENODE_HXX
+#define INCLUDED_SVGIO_SVGREADER_SVGCIRCLENODE_HXX
+
+#include <svgio/svgiodllapi.h>
+#include <svgio/svgreader/svgnode.hxx>
+#include <svgio/svgreader/svgstyleattributes.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace svgio
+{
+ namespace svgreader
+ {
+ class SvgCircleNode : public SvgNode
+ {
+ private:
+ /// use styles
+ SvgStyleAttributes maSvgStyleAttributes;
+
+ /// variable scan values, dependent of given XAttributeList
+ SvgNumber maCx;
+ SvgNumber maCy;
+ SvgNumber maR;
+ basegfx::B2DHomMatrix* mpaTransform;
+
+ public:
+ SvgCircleNode(
+ SvgDocument& rDocument,
+ SvgNode* pParent);
+ virtual ~SvgCircleNode();
+
+ virtual const SvgStyleAttributes* getSvgStyleAttributes() const;
+ virtual void parseAttribute(const rtl::OUString& rTokenName, SVGToken aSVGToken, const rtl::OUString& aContent);
+ virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DVector& rTarget, bool bReferenced) const;
+
+ /// Cx content, set if found in current context
+ const SvgNumber& getCx() const { return maCx; }
+ void setCx(const SvgNumber& rCx = SvgNumber()) { maCx = rCx; }
+
+ /// Cy content, set if found in current context
+ const SvgNumber& getCy() const { return maCy; }
+ void setCy(const SvgNumber& rCy = SvgNumber()) { maCy = rCy; }
+
+ /// R content, set if found in current context
+ const SvgNumber& getR() const { return maR; }
+ void setR(const SvgNumber& rR = SvgNumber()) { maR = rR; }
+
+ /// transform content, set if found in current context
+ const basegfx::B2DHomMatrix* getTransform() const { return mpaTransform; }
+ void setTransform(const basegfx::B2DHomMatrix* pMatrix = 0) { if(mpaTransform) delete mpaTransform; mpaTransform = 0; if(pMatrix) mpaTransform = new basegfx::B2DHomMatrix(*pMatrix); }
+ };
+ } // end of namespace svgreader
+} // end of namespace svgio
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_SVGIO_SVGREADER_SVGCIRCLENODE_HXX
+
+// eof
Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgdocument.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgdocument.hxx?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgdocument.hxx (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgdocument.hxx Thu Dec 1 16:25:17 2011
@@ -0,0 +1,84 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef INCLUDED_SVGIO_SVGREADER_SVGDOCUMENT_HXX
+#define INCLUDED_SVGIO_SVGREADER_SVGDOCUMENT_HXX
+
+#include <svgio/svgiodllapi.h>
+#include <boost/utility.hpp>
+#include <svgio/svgreader/svgnode.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace svgio
+{
+ namespace svgreader
+ {
+ class SvgDocument : private boost::noncopyable
+ {
+ private:
+ /// the document hierarchy with all root nodes
+ SvgNodeVector maNodes;
+
+ /// hash mapper to find nodes by their id
+ typedef std::hash_map< const rtl::OUString, const SvgNode*, rtl::OUStringHash > IdTokenMapper;
+ typedef std::pair< const rtl::OUString, const SvgNode* > IdTokenValueType;
+ IdTokenMapper maIdTokenMapperList;
+
+ /// hash mapper to find css styles by their id
+ typedef std::hash_map< const rtl::OUString, const SvgStyleAttributes*, rtl::OUStringHash > IdStyleTokenMapper;
+ typedef std::pair< const rtl::OUString, const SvgStyleAttributes* > IdStyleTokenValueType;
+ IdStyleTokenMapper maIdStyleTokenMapperList;
+
+ public:
+ SvgDocument();
+ ~SvgDocument();
+
+ /// append anopther root node, ownership changes
+ void appendNode(SvgNode* pNode);
+
+ /// add/remove nodes with Id to mapper
+ void addSvgNodeToMapper(const rtl::OUString& rStr, const SvgNode& rNode);
+ void removeSvgNodeFromMapper(const rtl::OUString& rStr);
+
+ /// find a node by it's Id
+ bool hasSvgNodesById() const { return !maIdTokenMapperList.empty(); }
+ const SvgNode* findSvgNodeById(const rtl::OUString& rStr) const;
+
+ /// add/remove styles to mapper
+ void addSvgStyleAttributesToMapper(const rtl::OUString& rStr, const SvgStyleAttributes& rSvgStyleAttributes);
+ void removeSvgStyleAttributesFromMapper(const rtl::OUString& rStr);
+
+ /// find a style by it's Id
+ bool hasSvgStyleAttributesById() const { return !maIdStyleTokenMapperList.empty(); }
+ const SvgStyleAttributes* findSvgStyleAttributesById(const rtl::OUString& rStr) const;
+
+ /// data read access
+ const SvgNodeVector& getSvgNodeVector() const { return maNodes; }
+ };
+ } // end of namespace svgreader
+} // end of namespace svgio
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_SVGIO_SVGREADER_SVGDOCUMENT_HXX
+
+// eof
Added: incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgdocumenthandler.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgdocumenthandler.hxx?rev=1209140&view=auto
==============================================================================
--- incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgdocumenthandler.hxx (added)
+++ incubator/ooo/branches/alg/svgreplacement/main/svgio/inc/svgio/svgreader/svgdocumenthandler.hxx Thu Dec 1 16:25:17 2011
@@ -0,0 +1,75 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef INCLUDED_SVGIO_SVGREADER_SVGDOCUMENTHANDLER_HXX
+#define INCLUDED_SVGIO_SVGREADER_SVGDOCUMENTHANDLER_HXX
+
+#include <svgio/svgiodllapi.h>
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <svgio/svgreader/svgdocument.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace svgio { namespace svgreader { class SvgCharacterNode; }}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace svgio
+{
+ namespace svgreader
+ {
+ class SvgDocHdl : public cppu::WeakImplHelper1< com::sun::star::xml::sax::XDocumentHandler >
+ {
+ private:
+ // the complete SVG Document
+ SvgDocument maDocument;
+
+ // current node for parsing
+ SvgNode* mpTarget;
+
+ /// bitfield
+ bool mbValidToken : 1;
+
+ public:
+ SvgDocHdl();
+ ~SvgDocHdl();
+
+ // Methods XDocumentHandler
+ virtual void SAL_CALL startDocument( ) throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL endDocument( ) throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL startElement( const ::rtl::OUString& aName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttribs ) throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL endElement( const ::rtl::OUString& aName ) throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL characters( const ::rtl::OUString& aChars ) throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL ignorableWhitespace( const ::rtl::OUString& aWhitespaces ) throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL processingInstruction( const ::rtl::OUString& aTarget, const ::rtl::OUString& aData ) throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDocumentLocator( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XLocator >& xLocator ) throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
+
+ const SvgDocument& getSvgDocument() const { return maDocument; }
+ };
+ } // end of namespace svgreader
+} // end of namespace svgio
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_SVGIO_SVGREADER_SVGDOCUMENTHANDLER_HXX
+
+// eof