[ooo-build-commit] .: 2 commits - patches/dev300
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Wed Oct 6 14:47:24 PDT 2010
patches/dev300/apply | 3
patches/dev300/docx-vml-import.diff | 391 ---------------------------------
patches/dev300/ww8-image-position.diff | 272 ----------------------
3 files changed, 666 deletions(-)
New commits:
commit b8320a7fad92e1385d5dc4c69eea560402a7c16c
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Wed Oct 6 23:37:33 2010 +0200
docx-vml-import.diff: applied to LibreOffice sources
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 57c3781..1c75dce 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1548,7 +1548,6 @@ win32-installer-register-moox-types.diff
writerfilter-module-writer.diff #disabled
writerfilter-source-dmapper-domainmapper-debug.diff
-docx-vml-import.diff, cbosdo
# Ugly temporary fix
docx-ugly-fix.diff, n#548701, cbosdo
diff --git a/patches/dev300/docx-vml-import.diff b/patches/dev300/docx-vml-import.diff
deleted file mode 100644
index cae4e7c..0000000
--- a/patches/dev300/docx-vml-import.diff
+++ /dev/null
@@ -1,391 +0,0 @@
---- oox/inc/oox/helper/helper.hxx.old 2010-07-22 13:12:44.000000000 +0200
-+++ oox/inc/oox/helper/helper.hxx 2010-07-29 21:03:38.000000000 +0200
-@@ -94,8 +94,8 @@ const sal_uInt8 WINDOWS_CHARSET_OEM
- // ----------------------------------------------------------------------------
-
- const sal_Int32 API_RGB_TRANSPARENT = -1; /// Transparent color for API calls.
--const sal_Int32 API_RGB_BLACK = 0x00000; /// Black color for API calls.
--const sal_Int32 API_RGB_WHITE = 0xFFFFF; /// White color for API calls.
-+const sal_Int32 API_RGB_BLACK = 0x000000; /// Black color for API calls.
-+const sal_Int32 API_RGB_WHITE = 0xFFFFFF; /// White color for API calls.
-
- const sal_Int16 API_LINE_NONE = 0;
- const sal_Int16 API_LINE_HAIR = 2;
---- oox/inc/oox/vml/vmlshape.hxx.old 2010-07-22 13:12:44.000000000 +0200
-+++ oox/inc/oox/vml/vmlshape.hxx 2010-07-29 21:03:38.000000000 +0200
-@@ -209,6 +209,8 @@ class SimpleShape : public ShapeBase
- public:
- explicit SimpleShape( Drawing& rDrawing, const ::rtl::OUString& rService );
-
-+ void setService( rtl::OUString aService ) { maService = aService; }
-+
- protected:
- /** Creates the corresponding XShape and inserts it into the passed container. */
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >
---- oox/inc/oox/vml/vmlshapecontainer.hxx.old 2010-07-22 13:12:44.000000000 +0200
-+++ oox/inc/oox/vml/vmlshapecontainer.hxx 2010-07-29 21:03:38.000000000 +0200
-@@ -95,6 +95,8 @@ public:
- const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes,
- const ShapeParentAnchor* pParentAnchor = 0 ) const;
-
-+ inline void clearShapes( ) { maShapes.clear( ); }
-+
- private:
- typedef RefVector< ShapeType > ShapeTypeVector;
- typedef RefVector< ShapeBase > ShapeVector;
---- oox/inc/oox/vml/vmlshapecontext.hxx.old 2010-07-22 13:12:44.000000000 +0200
-+++ oox/inc/oox/vml/vmlshapecontext.hxx 2010-07-29 21:03:38.000000000 +0200
-@@ -40,6 +40,7 @@ struct ShapeClientData;
- struct ShapeModel;
- class ShapeBase;
- class GroupShape;
-+class RectangleShape;
-
- class ShapeContainer;
-
-@@ -118,6 +119,9 @@ private:
- /** Processes the 'points' attribute. */
- void setPoints( const ::rtl::OUString& rPoints );
-
-+protected:
-+ ShapeBase& mrShape;
-+
- private:
- ShapeModel& mrShapeModel;
- };
-@@ -141,6 +145,19 @@ private:
-
- // ============================================================================
-
-+class RectangleShapeContext : public ShapeContext
-+{
-+public:
-+ explicit RectangleShapeContext(
-+ ::oox::core::ContextHandler2Helper& rParent,
-+ const AttributeList& rAttribs,
-+ RectangleShape& rShape );
-+
-+ virtual ::oox::core::ContextHandlerRef
-+ onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
-+};
-+// ============================================================================
-+
- } // namespace vml
- } // namespace oox
-
---- oox/source/shape/ShapeContextHandler.cxx.old 2010-07-22 13:12:44.000000000 +0200
-+++ oox/source/shape/ShapeContextHandler.cxx 2010-07-29 21:03:38.000000000 +0200
-@@ -226,7 +226,10 @@ ShapeContextHandler::getShape() throw (u
- {
- mpDrawing->finalizeFragmentImport();
- if( const ::oox::vml::ShapeBase* pShape = mpDrawing->getShapes().getFirstShape() )
-+ {
-+ mpDrawing->getShapes( ).clearShapes( );
- xResult = pShape->convertAndInsert( xShapes );
-+ }
- }
- else if (mpShape.get() != NULL)
- {
---- oox/source/vml/vmldrawingfragment.cxx.old 2010-07-22 13:12:44.000000000 +0200
-+++ oox/source/vml/vmldrawingfragment.cxx 2010-07-29 21:03:38.000000000 +0200
-@@ -60,7 +60,7 @@ ContextHandlerRef DrawingFragment::onCre
- {
- // DOCX filter handles plain shape elements with this fragment handler
- case VMLDRAWING_WORD:
-- if( isRootElement() )
-+ if ( getNamespace( nElement ) == NMSP_VML )
- return ShapeContextBase::createShapeContext( *this, nElement, rAttribs, mrDrawing.getShapes() );
- break;
-
---- oox/source/vml/vmlshape.cxx.old 2010-07-22 13:12:44.000000000 +0200
-+++ oox/source/vml/vmlshape.cxx 2010-07-29 21:03:38.000000000 +0200
-@@ -29,12 +29,20 @@
- #include <rtl/math.hxx>
- #include <com/sun/star/lang/XMultiServiceFactory.hpp>
- #include <com/sun/star/beans/PropertyValues.hpp>
-+#include <com/sun/star/beans/XPropertySet.hpp>
- #include <com/sun/star/awt/XControlModel.hpp>
- #include <com/sun/star/drawing/PointSequenceSequence.hpp>
- #include <com/sun/star/drawing/XControlShape.hpp>
- #include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
- #include <com/sun/star/drawing/XShapes.hpp>
- #include <com/sun/star/graphic/XGraphic.hpp>
-+#include <com/sun/star/text/HoriOrientation.hpp>
-+#include <com/sun/star/text/RelOrientation.hpp>
-+#include <com/sun/star/text/SizeType.hpp>
-+#include <com/sun/star/text/VertOrientation.hpp>
-+#include <com/sun/star/text/XTextContent.hpp>
-+#include <com/sun/star/text/XTextDocument.hpp>
-+#include <com/sun/star/text/XTextFrame.hpp>
- #include "properties.hxx"
- #include "oox/helper/graphichelper.hxx"
- #include "oox/helper/propertymap.hxx"
-@@ -47,6 +55,8 @@
- #include "oox/vml/vmlshapecontainer.hxx"
-
- using ::rtl::OUString;
-+using ::com::sun::star::beans::XPropertySet;
-+using ::com::sun::star::uno::Any;
- using ::com::sun::star::uno::Exception;
- using ::com::sun::star::uno::Reference;
- using ::com::sun::star::uno::UNO_QUERY;
-@@ -65,6 +75,8 @@ using ::com::sun::star::drawing::XShape;
- using ::com::sun::star::drawing::XShapes;
- using ::oox::core::XmlFilterBase;
-
-+using namespace ::com::sun::star::text;
-+
- namespace oox {
- namespace vml {
-
-@@ -124,13 +136,62 @@ void lclInsertXShape( const Reference< X
- }
- }
-
-+void lclInsertTextFrame( const XmlFilterBase& rFilter, const Reference< XShape >& rxShape )
-+{
-+ OSL_ENSURE( rxShape.is(), "lclInsertTextFrame - missing XShape" );
-+ if ( rxShape.is( ) )
-+ {
-+ try
-+ {
-+ Reference< XTextDocument > xDoc( rFilter.getModel( ), UNO_QUERY_THROW );
-+ Reference< XTextContent > xCtnt( rxShape, UNO_QUERY_THROW );
-+ xCtnt->attach( xDoc->getText( )->getStart( ) );
-+ }
-+ catch( Exception& )
-+ {
-+ }
-+ }
-+}
-+
- void lclSetXShapeRect( const Reference< XShape >& rxShape, const Rectangle& rShapeRect )
- {
- OSL_ENSURE( rxShape.is(), "lclSetXShapeRect - missing XShape" );
- if( rxShape.is() )
- {
-- rxShape->setPosition( Point( rShapeRect.X, rShapeRect.Y ) );
-- rxShape->setSize( Size( rShapeRect.Width, rShapeRect.Height ) );
-+ Reference< XTextFrame > xTextFrame( rxShape, UNO_QUERY );
-+ if ( !xTextFrame.is( ) )
-+ {
-+ rxShape->setPosition( Point( rShapeRect.X, rShapeRect.Y ) );
-+ rxShape->setSize( Size( rShapeRect.Width, rShapeRect.Height ) );
-+ }
-+ else
-+ {
-+ Reference< XPropertySet > xProps( xTextFrame, UNO_QUERY_THROW );
-+ try
-+ {
-+ // The size
-+ xProps->setPropertyValue( OUString::createFromAscii( "SizeType" ), Any( SizeType::FIX ) );
-+ xProps->setPropertyValue( OUString::createFromAscii( "FrameIsAutomaticHeight" ), Any( sal_False ) );
-+ xProps->setPropertyValue( OUString::createFromAscii( "Height" ), Any( rShapeRect.Height ) );
-+ xProps->setPropertyValue( OUString::createFromAscii( "Width" ), Any( rShapeRect.Width ) );
-+
-+ // The position
-+ xProps->setPropertyValue( OUString::createFromAscii( "HoriOrientPosition" ), Any( rShapeRect.X ) );
-+ xProps->setPropertyValue( OUString::createFromAscii( "HoriOrientRelation" ),
-+ Any( RelOrientation::FRAME ) );
-+ xProps->setPropertyValue( OUString::createFromAscii( "HoriOrient" ),
-+ Any( HoriOrientation::NONE ) );
-+
-+ xProps->setPropertyValue( OUString::createFromAscii( "VertOrientPosition" ), Any( rShapeRect.Y ) );
-+ xProps->setPropertyValue( OUString::createFromAscii( "VertOrientRelation" ),
-+ Any( RelOrientation::FRAME ) );
-+ xProps->setPropertyValue( OUString::createFromAscii( "VertOrient" ),
-+ Any( VertOrientation::NONE ) );
-+ }
-+ catch ( Exception& )
-+ {
-+ }
-+ }
- }
- }
-
-@@ -138,8 +199,12 @@ Reference< XShape > lclCreateAndInsertXS
- const Reference< XShapes >& rxShapes, const OUString& rService, const Rectangle& rShapeRect )
- {
- Reference< XShape > xShape = lclCreateXShape( rFilter, rService );
-- lclInsertXShape( rxShapes, xShape );
-+ if ( rService.equalsAscii( "com.sun.star.text.TextFrame" ) )
-+ lclInsertTextFrame( rFilter, xShape );
-+ else
-+ lclInsertXShape( rxShapes, xShape );
- lclSetXShapeRect( xShape, rShapeRect );
-+
- return xShape;
- }
-
-@@ -197,11 +262,19 @@ Rectangle ShapeType::getRectangle( const
- Rectangle ShapeType::getAbsRectangle() const
- {
- const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper();
-+
-+ sal_Int32 nWidth = ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maWidth, 0, true, true );
-+ if ( nWidth == 0 )
-+ nWidth = 1;
-+
-+ sal_Int32 nHeight = ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maHeight, 0, true, true );
-+ if ( nHeight == 0 )
-+ nHeight = 1;
-+
- return Rectangle(
- ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maLeft, 0, true, true ) + ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maMarginLeft, 0, true, true ),
- ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maTop, 0, false, true ) + ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maMarginTop, 0, false, true ),
-- ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maWidth, 0, true, true ),
-- ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maHeight, 0, false, true ) );
-+ nWidth, nHeight );
- }
-
- Rectangle ShapeType::getRelRectangle() const
---- oox/source/vml/vmlshapecontext.cxx.old 2010-07-22 13:12:44.000000000 +0200
-+++ oox/source/vml/vmlshapecontext.cxx 2010-07-29 21:03:38.000000000 +0200
-@@ -155,6 +155,7 @@ ShapeContextBase::ShapeContextBase( Cont
- case VML_TOKEN( shape ):
- return new ShapeContext( rParent, rAttribs, rShapes.createShape< ComplexShape >() );
- case VML_TOKEN( rect ):
-+ return new RectangleShapeContext( rParent, rAttribs, rShapes.createShape< RectangleShape >() );
- case VML_TOKEN( roundrect ):
- return new ShapeContext( rParent, rAttribs, rShapes.createShape< RectangleShape >() );
- case VML_TOKEN( oval ):
-@@ -278,6 +279,7 @@ void ShapeTypeContext::setStyle( const O
-
- ShapeContext::ShapeContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, ShapeBase& rShape ) :
- ShapeTypeContext( rParent, rAttribs, rShape ),
-+ mrShape( rShape ),
- mrShapeModel( rShape.getShapeModel() )
- {
- // collect shape specific attributes
-@@ -288,6 +290,11 @@ ShapeContext::ShapeContext( ContextHandl
-
- ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
- {
-+ // Custom shape in Writer with a textbox are transformed into a frame
-+ if ( nElement == ( NMSP_VML + XML_textbox ) )
-+ dynamic_cast<SimpleShape&>( mrShape ).setService(
-+ OUString::createFromAscii( "com.sun.star.text.TextFrame" ) );
-+
- // Excel specific shape client data
- if( isRootElement() && (nElement == VMLX_TOKEN( ClientData )) )
- return new ShapeClientDataContext( *this, rAttribs, mrShapeModel.createClientData() );
-@@ -325,6 +332,22 @@ ContextHandlerRef GroupShapeContext::onC
-
- // ============================================================================
-
-+RectangleShapeContext::RectangleShapeContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, RectangleShape& rShape ) :
-+ ShapeContext( rParent, rAttribs, rShape )
-+{
-+}
-+
-+ContextHandlerRef RectangleShapeContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
-+{
-+ if ( nElement == ( NMSP_VML + XML_textbox ) )
-+ dynamic_cast< SimpleShape &>( mrShape ).setService(
-+ OUString::createFromAscii( "com.sun.star.text.TextFrame" ) );
-+
-+ // The parent class's context is fine
-+ return ShapeContext::onCreateContext( nElement, rAttribs );
-+}
-+// ============================================================================
-+
- } // namespace vml
- } // namespace oox
-
---- writerfilter/inc/ooxml/OOXMLDocument.hxx.old 2010-07-22 13:12:44.000000000 +0200
-+++ writerfilter/inc/ooxml/OOXMLDocument.hxx 2010-07-29 21:03:38.000000000 +0200
-@@ -41,6 +41,7 @@
- #include <com/sun/star/xml/sax/XParser.hpp>
- #include <com/sun/star/xml/sax/XFastParser.hpp>
- #include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
-+#include <com/sun/star/xml/sax/XFastShapeContextHandler.hpp>
- #include <com/sun/star/frame/XModel.hpp>
- #include <com/sun/star/drawing/XDrawPage.hpp>
-
-@@ -250,6 +251,8 @@ public:
- virtual void setXNoteType(const Id & nId) = 0;
- virtual const Id & getXNoteType() const = 0;
- virtual const ::rtl::OUString & getTarget() const = 0;
-+ virtual uno::Reference<xml::sax::XFastShapeContextHandler> getShapeContext( ) = 0;
-+ virtual void setShapeContext( uno::Reference<xml::sax::XFastShapeContextHandler> xContext ) = 0;
- };
-
-
---- writerfilter/source/dmapper/OLEHandler.cxx.old 2010-07-22 13:12:44.000000000 +0200
-+++ writerfilter/source/dmapper/OLEHandler.cxx 2010-07-29 21:03:38.000000000 +0200
-@@ -54,7 +54,7 @@ using namespace ::com::sun::star;
- OLEHandler::OLEHandler() :
- m_nDxaOrig(0),
- m_nDyaOrig(0),
-- m_nWrapMode(0)
-+ m_nWrapMode(1)
- {
- }
- /*-- 23.04.2008 10:46:14---------------------------------------------------
---- writerfilter/source/ooxml/OOXMLDocumentImpl.cxx.old 2010-07-22 13:12:44.000000000 +0200
-+++ writerfilter/source/ooxml/OOXMLDocumentImpl.cxx 2010-07-29 21:03:38.000000000 +0200
-@@ -396,6 +396,16 @@ uno::Reference<io::XInputStream> OOXMLDo
- return mpStream->getStorageStream();
- }
-
-+void OOXMLDocumentImpl::setShapeContext( uno::Reference<xml::sax::XFastShapeContextHandler> xContext )
-+{
-+ mxShapeContext = xContext;
-+}
-+
-+uno::Reference<xml::sax::XFastShapeContextHandler> OOXMLDocumentImpl::getShapeContext( )
-+{
-+ return mxShapeContext;
-+}
-+
- OOXMLDocument *
- OOXMLDocumentFactory::createDocument
- (OOXMLStream::Pointer_t pStream)
---- writerfilter/source/ooxml/OOXMLDocumentImpl.hxx.old 2010-07-22 13:12:44.000000000 +0200
-+++ writerfilter/source/ooxml/OOXMLDocumentImpl.hxx 2010-07-29 21:03:38.000000000 +0200
-@@ -49,6 +49,7 @@ class OOXMLDocumentImpl : public OOXMLDo
-
- uno::Reference<frame::XModel> mxModel;
- uno::Reference<drawing::XDrawPage> mxDrawPage;
-+ uno::Reference<xml::sax::XFastShapeContextHandler> mxShapeContext;
-
- bool mbIsSubstream;
-
-@@ -111,6 +112,8 @@ public:
- virtual void setXNoteType(const Id & rId);
- virtual const Id & getXNoteType() const;
- virtual const ::rtl::OUString & getTarget() const;
-+ virtual uno::Reference<xml::sax::XFastShapeContextHandler> getShapeContext( );
-+ virtual void setShapeContext( uno::Reference<xml::sax::XFastShapeContextHandler> xContext );
- };
- }}
- #endif // OOXML_DOCUMENT_IMPL_HXX
---- writerfilter/source/ooxml/OOXMLFastContextHandler.cxx.old 2010-07-22 13:12:44.000000000 +0200
-+++ writerfilter/source/ooxml/OOXMLFastContextHandler.cxx 2010-07-29 21:03:38.000000000 +0200
-@@ -2057,13 +2057,19 @@ OOXMLFastContextHandlerShape::OOXMLFastC
- uno::Reference<XMultiComponentFactory> rServiceManager
- (xContext->getServiceManager());
-
-- mrShapeContext.set
-- (rServiceManager->
-- createInstanceWithContext
-- (::rtl::OUString
-- (RTL_CONSTASCII_USTRINGPARAM
-- ("com.sun.star.xml.sax.FastShapeContextHandler")), xContext),
-- uno::UNO_QUERY);
-+ mrShapeContext.set( getDocument( )->getShapeContext( ) );
-+ if ( !mrShapeContext.is( ) )
-+ {
-+ // Define the shape context for the whole document
-+ mrShapeContext.set
-+ (rServiceManager->
-+ createInstanceWithContext
-+ (::rtl::OUString
-+ (RTL_CONSTASCII_USTRINGPARAM
-+ ("com.sun.star.xml.sax.FastShapeContextHandler")), xContext),
-+ uno::UNO_QUERY);
-+ getDocument()->setShapeContext( mrShapeContext );
-+ }
-
- if (mrShapeContext.is())
- {
commit 0da7810d563e44e2be498243ce0c08a9338929f3
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Wed Oct 6 23:31:14 2010 +0200
ww8-image-position.diff: applied on git repos
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 9479edc..57c3781 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2460,8 +2460,6 @@ system-lpsolve-rpath.diff, rengelha
system-lpsolve-rpath.diff, rengelha
[ Fixes ]
-ww8-image-position.diff
-
# add missing patch to upstreamed ppt gradient fix
ppt-customshape-shading-fix.diff, i#102797, thorsten
diff --git a/patches/dev300/ww8-image-position.diff b/patches/dev300/ww8-image-position.diff
deleted file mode 100644
index 0baba71..0000000
--- a/patches/dev300/ww8-image-position.diff
+++ /dev/null
@@ -1,272 +0,0 @@
----
- filter/inc/filter/msfilter/msdffimp.hxx | 8 ++++-
- filter/source/msfilter/msdffimp.cxx | 36 +++++++++++++++++++----
- sw/source/filter/ww8/ww8graf.cxx | 48 +++++++++++++++++++++---------
- sw/source/filter/ww8/ww8par.cxx | 14 ++++++++-
- 4 files changed, 81 insertions(+), 25 deletions(-)
-
-diff --git filter/inc/filter/msfilter/msdffimp.hxx filter/inc/filter/msfilter/msdffimp.hxx
-index 68c4b22..67571fb 100644
---- filter/inc/filter/msfilter/msdffimp.hxx
-+++ filter/inc/filter/msfilter/msdffimp.hxx
-@@ -257,6 +257,8 @@ struct MSDffTxId
-
- struct MSFILTER_DLLPUBLIC SvxMSDffImportRec
- {
-+ static const int RELTO_DEFAULT = 2;
-+
- SdrObject* pObj;
- Polygon* pWrapPolygon;
- char* pClientAnchorBuffer;
-@@ -264,9 +266,9 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec
- char* pClientDataBuffer;
- UINT32 nClientDataLen;
- UINT32 nXAlign;
-- UINT32 nXRelTo;
-+ UINT32 *pXRelTo;
- UINT32 nYAlign;
-- UINT32 nYRelTo;
-+ UINT32 *pYRelTo;
- UINT32 nLayoutInTableCell;
- UINT32 nFlags;
- long nTextRotationAngle;
-@@ -303,6 +305,8 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec
- { return nShapeId == rEntry.nShapeId; }
- BOOL operator<( const SvxMSDffImportRec& rEntry ) const
- { return nShapeId < rEntry.nShapeId; }
-+private:
-+ SvxMSDffImportRec &operator=(const SvxMSDffImportRec&);
- };
- typedef SvxMSDffImportRec* MSDffImportRec_Ptr;
-
-diff --git filter/source/msfilter/msdffimp.cxx filter/source/msfilter/msdffimp.cxx
-index c9fece2..48309b1 100644
---- filter/source/msfilter/msdffimp.cxx
-+++ filter/source/msfilter/msdffimp.cxx
-@@ -5608,9 +5608,19 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
- switch( nPID )
- {
- case 0x038F: pImpRec->nXAlign = nUDData; break;
-- case 0x0390: pImpRec->nXRelTo = nUDData; break;
-+ case 0x0390:
-+ if (pImpRec->pXRelTo)
-+ delete pImpRec->pXRelTo;
-+ pImpRec->pXRelTo = new UINT32;
-+ *(pImpRec->pXRelTo) = nUDData;
-+ break;
- case 0x0391: pImpRec->nYAlign = nUDData; break;
-- case 0x0392: pImpRec->nYRelTo = nUDData; break;
-+ case 0x0392:
-+ if (pImpRec->pYRelTo)
-+ delete pImpRec->pYRelTo;
-+ pImpRec->pYRelTo = new UINT32;
-+ *(pImpRec->pYRelTo) = nUDData;
-+ break;
- case 0x03BF: pImpRec->nLayoutInTableCell = nUDData; break;
- }
- if ( rSt.GetError() != 0 )
-@@ -8029,9 +8039,9 @@ SvxMSDffImportRec::SvxMSDffImportRec()
- pClientDataBuffer( 0 ),
- nClientDataLen( 0 ),
- nXAlign( 0 ), // position n cm from left
-- nXRelTo( 2 ), // relative to column
-+ pXRelTo( NULL ), // relative to column
- nYAlign( 0 ), // position n cm below
-- nYRelTo( 2 ), // relative to paragraph
-+ pYRelTo( NULL ), // relative to paragraph
- nLayoutInTableCell( 0 ), // element is laid out in table cell
- nTextRotationAngle( 0 ),
- nDxTextLeft( 144 ),
-@@ -8066,9 +8076,9 @@ SvxMSDffImportRec::SvxMSDffImportRec()
- SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy)
- : pObj( rCopy.pObj ),
- nXAlign( rCopy.nXAlign ),
-- nXRelTo( rCopy.nXRelTo ),
-+ pXRelTo( NULL ),
- nYAlign( rCopy.nYAlign ),
-- nYRelTo( rCopy.nYRelTo ),
-+ pYRelTo( NULL ),
- nLayoutInTableCell( rCopy.nLayoutInTableCell ),
- nTextRotationAngle( rCopy.nTextRotationAngle ),
- nDxTextLeft( rCopy.nDxTextLeft ),
-@@ -8088,6 +8098,16 @@ SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy)
- nShapeId( rCopy.nShapeId ),
- eShapeType( rCopy.eShapeType )
- {
-+ if (rCopy.pXRelTo)
-+ {
-+ pXRelTo = new UINT32;
-+ *pXRelTo = *(rCopy.pXRelTo);
-+ }
-+ if (rCopy.pYRelTo)
-+ {
-+ pYRelTo = new UINT32;
-+ *pYRelTo = *(rCopy.pYRelTo);
-+ }
- eLineStyle = rCopy.eLineStyle; // GPF-Bug #66227#
- bDrawHell = rCopy.bDrawHell;
- bHidden = rCopy.bHidden;
-@@ -8134,6 +8154,10 @@ SvxMSDffImportRec::~SvxMSDffImportRec()
- delete[] pClientDataBuffer;
- if (pWrapPolygon)
- delete pWrapPolygon;
-+ if (pXRelTo)
-+ delete pXRelTo;
-+ if (pYRelTo)
-+ delete pYRelTo;
- }
-
- void SvxMSDffManager::insertShapeId( sal_Int32 nShapeId, SdrObject* pShape )
-diff --git sw/source/filter/ww8/ww8graf.cxx sw/source/filter/ww8/ww8graf.cxx
-index 6a70ac1..648f558 100644
---- sw/source/filter/ww8/ww8graf.cxx
-+++ sw/source/filter/ww8/ww8graf.cxx
-@@ -1954,11 +1954,17 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
- void SwWW8ImplReader::AdjustLRWrapForWordMargins(
- const SvxMSDffImportRec &rRecord, SvxLRSpaceItem &rLR)
- {
-+ UINT32 nXRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
-+ if ( rRecord.pXRelTo )
-+ {
-+ nXRelTo = *(rRecord.pXRelTo);
-+ }
-+
- // Left adjustments - if horizontally aligned to left of
- // margin or column then remove the left wrapping
- if (rRecord.nXAlign == 1)
- {
-- if ((rRecord.nXRelTo == 0) || (rRecord.nXRelTo == 2))
-+ if ((nXRelTo == 0) || (nXRelTo == 2))
- rLR.SetLeft((USHORT)0);
- }
-
-@@ -1966,18 +1972,18 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
- // margin or column then remove the right wrapping
- if (rRecord.nXAlign == 3)
- {
-- if ((rRecord.nXRelTo == 0) || (rRecord.nXRelTo == 2))
-+ if ((nXRelTo == 0) || (nXRelTo == 2))
- rLR.SetRight((USHORT)0);
- }
-
- //Inside margin, remove left wrapping
-- if ((rRecord.nXAlign == 4) && (rRecord.nXRelTo == 0))
-+ if ((rRecord.nXAlign == 4) && (nXRelTo == 0))
- {
- rLR.SetLeft((USHORT)0);
- }
-
- //Outside margin, remove left wrapping
-- if ((rRecord.nXAlign == 5) && (rRecord.nXRelTo == 0))
-+ if ((rRecord.nXAlign == 5) && (nXRelTo == 0))
- {
- rLR.SetRight((USHORT)0);
- }
-@@ -1987,11 +1993,17 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
- void SwWW8ImplReader::AdjustULWrapForWordMargins(
- const SvxMSDffImportRec &rRecord, SvxULSpaceItem &rUL)
- {
-+ UINT32 nYRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
-+ if ( rRecord.pYRelTo )
-+ {
-+ nYRelTo = *(rRecord.pYRelTo);
-+ }
-+
- // Top adjustment - remove upper wrapping if aligned to page
- // printable area or to page
- if (rRecord.nYAlign == 1)
- {
-- if ((rRecord.nYRelTo == 0) || (rRecord.nYRelTo == 1))
-+ if ((nYRelTo == 0) || (nYRelTo == 1))
- rUL.SetUpper((USHORT)0);
- }
-
-@@ -1999,12 +2011,12 @@ void SwWW8ImplReader::AdjustULWrapForWordMargins(
- // printable area or to page
- if (rRecord.nYAlign == 3)
- {
-- if ((rRecord.nYRelTo == 0) || (rRecord.nYRelTo == 1))
-+ if ((nYRelTo == 0) || (nYRelTo == 1))
- rUL.SetLower((USHORT)0);
- }
-
- //Remove top margin if aligned vertically inside margin
-- if ((rRecord.nYAlign == 4) && (rRecord.nYRelTo == 0))
-+ if ((rRecord.nYAlign == 4) && (nYRelTo == 0))
- rUL.SetUpper((USHORT)0);
-
- /*
-@@ -2247,10 +2259,16 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
-
- SvxMSDffImportRec aRecordFromFSPA;
- if (!pRecord)
-- {
- pRecord = &aRecordFromFSPA;
-- pRecord->nXRelTo = pFSPA->nbx;
-- pRecord->nYRelTo = pFSPA->nby;
-+ if (!(pRecord->pXRelTo) && pFSPA)
-+ {
-+ pRecord->pXRelTo = new UINT32;
-+ *(pRecord->pXRelTo) = pFSPA->nbx;
-+ }
-+ if (!(pRecord->pYRelTo) && pFSPA)
-+ {
-+ pRecord->pYRelTo = new UINT32;
-+ *(pRecord->pYRelTo) = pFSPA->nby;
- }
-
- // nXAlign - abs. Position, Left, Centered, Right, Inside, Outside
-@@ -2279,19 +2297,19 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
- // is a hint that these values aren't set by the escher import - see
- // method <SwMSDffManager::ProcessObj(..)>. Then, check if for each
- // values, if it differs from the one in the FSPA.
-- if ( pRecord->nXRelTo == 2 && pRecord->nYRelTo == 2 )
-+ if ( *(pRecord->pXRelTo) == 2 && *(pRecord->pYRelTo) == 2 )
- {
- // if <nYRelTo> differs from <FSPA.nby> overwrite <nYRelTo>
-- if ( pFSPA->nby != pRecord->nYRelTo )
-+ if ( pFSPA->nby != *(pRecord->pYRelTo) )
- {
-- pRecord->nYRelTo = pFSPA->nby;
-+ *(pRecord->pYRelTo) = pFSPA->nby;
- }
- }
- // <--
- }
-
-- UINT32 nXRelTo = nCntRelTo > pRecord->nXRelTo ? pRecord->nXRelTo : 1;
-- UINT32 nYRelTo = nCntRelTo > pRecord->nYRelTo ? pRecord->nYRelTo : 1;
-+ UINT32 nXRelTo = nCntRelTo > *(pRecord->pXRelTo) ? *(pRecord->pXRelTo) : 1;
-+ UINT32 nYRelTo = nCntRelTo > *(pRecord->pYRelTo) ? *(pRecord->pYRelTo) : 1;
-
- // --> OD 2005-03-03 #i43718#
- RndStdIds eAnchor = IsInlineEscherHack() ? FLY_AS_CHAR : FLY_AT_CHAR;
-diff --git sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.cxx
-index a5292dd..74810c3 100644
---- sw/source/filter/ww8/ww8par.cxx
-+++ sw/source/filter/ww8/ww8par.cxx
-@@ -317,9 +317,19 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
- switch( nPID )
- {
- case 0x038F: pImpRec->nXAlign = nUDData; break;
-- case 0x0390: pImpRec->nXRelTo = nUDData; break;
-+ case 0x0390:
-+ if (pImpRec->pXRelTo)
-+ delete pImpRec->pXRelTo;
-+ pImpRec->pXRelTo = new UINT32;
-+ *(pImpRec->pXRelTo) = nUDData;
-+ break;
- case 0x0391: pImpRec->nYAlign = nUDData; break;
-- case 0x0392: pImpRec->nYRelTo = nUDData; break;
-+ case 0x0392:
-+ if (pImpRec->pYRelTo)
-+ delete pImpRec->pYRelTo;
-+ pImpRec->pYRelTo = new UINT32;
-+ *(pImpRec->pYRelTo) = nUDData;
-+ break;
- case 0x03BF: pImpRec->nLayoutInTableCell = nUDData; break;
- }
- if ( rSt.GetError() != 0 )
---
-1.7.0.1
-
More information about the ooo-build-commit
mailing list