svdfmtf.hxx (47a7c0c1) | svdfmtf.hxx (8718d260) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 26 unchanged lines hidden (view full) --- 35class SfxItemSet; 36class SdrObjList; 37class SdrModel; 38class SdrPage; 39class SdrObject; 40class SvdProgressInfo; 41 42//************************************************************ | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 26 unchanged lines hidden (view full) --- 35class SfxItemSet; 36class SdrObjList; 37class SdrModel; 38class SdrPage; 39class SdrObject; 40class SvdProgressInfo; 41 42//************************************************************ |
43// Hilfsklasse SdrObjRefList 44//************************************************************ 45 46class SdrObjRefList 47{ 48 Container aList; 49public: 50 51 SdrObjRefList() 52 : aList(1024,64,64) 53 {} 54 55 void Clear() { aList.Clear(); } 56 sal_uLong GetObjCount() const { return aList.Count(); } 57 SdrObject* GetObj(sal_uLong nNum) const { return (SdrObject*)aList.GetObject(nNum); } 58 SdrObject* operator[](sal_uLong nNum) const { return (SdrObject*)aList.GetObject(nNum); } 59 void InsertObject(SdrObject* pObj, sal_uLong nPos=CONTAINER_APPEND) { aList.Insert(pObj,nPos); } 60 void RemoveObject(sal_uLong nPos) { aList.Remove(nPos); } 61}; 62 63//************************************************************ | |
64// Hilfsklasse ImpSdrGDIMetaFileImport 65//************************************************************ 66 67class ImpSdrGDIMetaFileImport 68{ 69protected: | 43// Hilfsklasse ImpSdrGDIMetaFileImport 44//************************************************************ 45 46class ImpSdrGDIMetaFileImport 47{ 48protected: |
70 SdrObjRefList aTmpList; 71 VirtualDevice aVD; 72 Rectangle aScaleRect; 73 sal_uLong nMapScalingOfs; // ab hier nocht nicht mit MapScaling bearbeitet 74 SfxItemSet* pLineAttr; 75 SfxItemSet* pFillAttr; 76 SfxItemSet* pTextAttr; 77 SdrPage* pPage; 78 SdrModel* pModel; 79 SdrLayerID nLayer; 80 Color aOldLineColor; 81 sal_Int32 nLineWidth; | 49 ::std::vector< SdrObject* > maTmpList; 50 VirtualDevice maVD; 51 Rectangle maScaleRect; 52 sal_uLong mnMapScalingOfs; // ab hier nocht nicht mit MapScaling bearbeitet 53 SfxItemSet* mpLineAttr; 54 SfxItemSet* mpFillAttr; 55 SfxItemSet* mpTextAttr; 56 SdrModel* mpModel; 57 SdrLayerID mnLayer; 58 Color maOldLineColor; 59 sal_Int32 mnLineWidth; |
82 basegfx::B2DLineJoin maLineJoin; 83 com::sun::star::drawing::LineCap maLineCap; 84 XDash maDash; 85 | 60 basegfx::B2DLineJoin maLineJoin; 61 com::sun::star::drawing::LineCap maLineCap; 62 XDash maDash; 63 |
86 sal_Bool bMov; 87 sal_Bool bSize; 88 Point aOfs; 89 double fScaleX; 90 double fScaleY; 91 Fraction aScaleX; 92 Fraction aScaleY; | 64 bool mbMov; 65 bool mbSize; 66 Point maOfs; 67 double mfScaleX; 68 double mfScaleY; 69 Fraction maScaleX; 70 Fraction maScaleY; |
93 | 71 |
94 sal_Bool bFntDirty; | 72 bool mbFntDirty; |
95 96 // fuer Optimierung von (PenNULL,Brush,DrawPoly),(Pen,BrushNULL,DrawPoly) -> aus 2 mach ein | 73 74 // fuer Optimierung von (PenNULL,Brush,DrawPoly),(Pen,BrushNULL,DrawPoly) -> aus 2 mach ein |
97 sal_Bool bLastObjWasPolyWithoutLine; 98 sal_Bool bNoLine; 99 sal_Bool bNoFill; | 75 bool mbLastObjWasPolyWithoutLine; 76 bool mbNoLine; 77 bool mbNoFill; |
100 101 // fuer Optimierung mehrerer Linien zu einer Polyline | 78 79 // fuer Optimierung mehrerer Linien zu einer Polyline |
102 sal_Bool bLastObjWasLine; | 80 bool mbLastObjWasLine; |
103 104 // clipregion 105 basegfx::B2DPolyPolygon maClip; 106 107protected: 108 // ckeck for clip and evtl. fill maClip 109 void checkClip(); 110 bool isClip() const; --- 16 unchanged lines hidden (view full) --- 127 void DoAction(MetaStretchTextAction & rAct); 128 void DoAction(MetaBmpAction & rAct); 129 void DoAction(MetaBmpScaleAction & rAct); 130 void DoAction(MetaBmpExAction & rAct); 131 void DoAction(MetaBmpExScaleAction & rAct); 132 void DoAction(MetaHatchAction & rAct); 133 void DoAction(MetaLineColorAction & rAct); 134 void DoAction(MetaMapModeAction & rAct); | 81 82 // clipregion 83 basegfx::B2DPolyPolygon maClip; 84 85protected: 86 // ckeck for clip and evtl. fill maClip 87 void checkClip(); 88 bool isClip() const; --- 16 unchanged lines hidden (view full) --- 105 void DoAction(MetaStretchTextAction & rAct); 106 void DoAction(MetaBmpAction & rAct); 107 void DoAction(MetaBmpScaleAction & rAct); 108 void DoAction(MetaBmpExAction & rAct); 109 void DoAction(MetaBmpExScaleAction & rAct); 110 void DoAction(MetaHatchAction & rAct); 111 void DoAction(MetaLineColorAction & rAct); 112 void DoAction(MetaMapModeAction & rAct); |
135 void DoAction(MetaFillColorAction & rAct) { rAct.Execute(&aVD); } 136 void DoAction(MetaTextColorAction & rAct) { rAct.Execute(&aVD); } 137 void DoAction(MetaTextFillColorAction & rAct) { rAct.Execute(&aVD); } 138 void DoAction(MetaFontAction & rAct) { rAct.Execute(&aVD); bFntDirty=sal_True; } 139 void DoAction(MetaTextAlignAction & rAct) { rAct.Execute(&aVD); bFntDirty=sal_True; } 140 void DoAction(MetaClipRegionAction & rAct) { rAct.Execute(&aVD); checkClip(); } 141 void DoAction(MetaRasterOpAction & rAct) { rAct.Execute(&aVD); } 142 void DoAction(MetaPushAction & rAct) { rAct.Execute(&aVD); checkClip(); } 143 void DoAction(MetaPopAction & rAct) { rAct.Execute(&aVD); bFntDirty=sal_True; checkClip(); } 144 void DoAction(MetaMoveClipRegionAction & rAct) { rAct.Execute(&aVD); checkClip(); } 145 void DoAction(MetaISectRectClipRegionAction& rAct) { rAct.Execute(&aVD); checkClip(); } 146 void DoAction(MetaISectRegionClipRegionAction& rAct) { rAct.Execute(&aVD); checkClip(); } | 113 void DoAction(MetaFillColorAction & rAct) { rAct.Execute(&maVD); } 114 void DoAction(MetaTextColorAction & rAct) { rAct.Execute(&maVD); } 115 void DoAction(MetaTextFillColorAction & rAct) { rAct.Execute(&maVD); } 116 void DoAction(MetaFontAction & rAct) { rAct.Execute(&maVD); mbFntDirty = true; } 117 void DoAction(MetaTextAlignAction & rAct) { rAct.Execute(&maVD); mbFntDirty = true; } 118 void DoAction(MetaClipRegionAction & rAct) { rAct.Execute(&maVD); checkClip(); } 119 void DoAction(MetaRasterOpAction & rAct) { rAct.Execute(&maVD); } 120 void DoAction(MetaPushAction & rAct) { rAct.Execute(&maVD); checkClip(); } 121 void DoAction(MetaPopAction & rAct) { rAct.Execute(&maVD); mbFntDirty = true; checkClip(); } 122 void DoAction(MetaMoveClipRegionAction & rAct) { rAct.Execute(&maVD); checkClip(); } 123 void DoAction(MetaISectRectClipRegionAction& rAct) { rAct.Execute(&maVD); checkClip(); } 124 void DoAction(MetaISectRegionClipRegionAction& rAct) { rAct.Execute(&maVD); checkClip(); } |
147 void DoAction(MetaCommentAction& rAct, GDIMetaFile* pMtf); 148 | 125 void DoAction(MetaCommentAction& rAct, GDIMetaFile* pMtf); 126 |
149 void ImportText( const Point& rPos, const XubString& rStr, const MetaAction& rAct ); 150 void SetAttributes(SdrObject* pObj, FASTBOOL bForceTextAttr=sal_False); 151 void InsertObj( SdrObject* pObj, sal_Bool bScale = sal_True ); | 127 // missing actions added 128 void DoAction(MetaTextRectAction& rAct); 129 void DoAction(MetaBmpScalePartAction& rAct); 130 void DoAction(MetaBmpExScalePartAction& rAct); 131 void DoAction(MetaMaskAction& rAct); 132 void DoAction(MetaMaskScaleAction& rAct); 133 void DoAction(MetaMaskScalePartAction& rAct); 134 void DoAction(MetaGradientAction& rAct); 135 void DoAction(MetaWallpaperAction& rAct); 136 void DoAction(MetaTransparentAction& rAct); 137 void DoAction(MetaEPSAction& rAct); 138 void DoAction(MetaRefPointAction& rAct) { rAct.Execute(&maVD); } 139 void DoAction(MetaTextLineColorAction& rAct) { rAct.Execute(&maVD); mbFntDirty = true; } 140 void DoAction(MetaTextLineAction& rAct); 141 void DoAction(MetaFloatTransparentAction& rAct); 142 void DoAction(MetaGradientExAction& rAct); 143 void DoAction(MetaLayoutModeAction& rAct) { rAct.Execute(&maVD); mbFntDirty = true; } 144 void DoAction(MetaTextLanguageAction& rAct) { rAct.Execute(&maVD); mbFntDirty = true; } 145 void DoAction(MetaOverlineColorAction& rAct) { rAct.Execute(&maVD); mbFntDirty = true; } 146 147 void ImportText(const Point& rPos, const XubString& rStr, const MetaAction& rAct); 148 void SetAttributes(SdrObject* pObj, bool bForceTextAttr = false); 149 void InsertObj(SdrObject* pObj, bool bScale = true); |
152 void MapScaling(); 153 154 // #i73407# reformulation to use new B2DPolygon classes 155 bool CheckLastLineMerge(const basegfx::B2DPolygon& rSrcPoly); 156 bool CheckLastPolyLineAndFillMerge(const basegfx::B2DPolyPolygon& rPolyPolygon); | 150 void MapScaling(); 151 152 // #i73407# reformulation to use new B2DPolygon classes 153 bool CheckLastLineMerge(const basegfx::B2DPolygon& rSrcPoly); 154 bool CheckLastPolyLineAndFillMerge(const basegfx::B2DPolyPolygon& rPolyPolygon); |
155 156 void DoLoopActions(GDIMetaFile& rMtf, SvdProgressInfo* pProgrInfo, sal_uInt32* pActionsToReport); |
|
157 158public: | 157 158public: |
159 ImpSdrGDIMetaFileImport(SdrModel& rModel); | 159 ImpSdrGDIMetaFileImport( 160 SdrModel& rModel, 161 SdrLayerID nLay, 162 const Rectangle& rRect); |
160 ~ImpSdrGDIMetaFileImport(); | 163 ~ImpSdrGDIMetaFileImport(); |
161 sal_uLong DoImport(const GDIMetaFile& rMtf, SdrObjList& rDestList, sal_uLong nInsPos=CONTAINER_APPEND, SvdProgressInfo *pProgrInfo = NULL); 162 void SetLayer(SdrLayerID nLay) { nLayer=nLay; } 163 SdrLayerID GetLayer() const { return nLayer; } 164 void SetScaleRect(const Rectangle& rRect) { aScaleRect=rRect; } 165 const Rectangle& GetScaleRect() const { return aScaleRect; } | 164 165 sal_uInt32 DoImport( 166 const GDIMetaFile& rMtf, 167 SdrObjList& rDestList, 168 sal_uInt32 nInsPos = CONTAINER_APPEND, 169 SvdProgressInfo* pProgrInfo = 0); |
166}; 167 168//////////////////////////////////////////////////////////////////////////////////////////////////// 169 170#endif //_SVDFMTF_HXX 171// eof | 170}; 171 172//////////////////////////////////////////////////////////////////////////////////////////////////// 173 174#endif //_SVDFMTF_HXX 175// eof |