From a38342aa7ff93dbf1e3432d42afecac778eb80a1 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 15 Sep 2009 16:06:13 +0200 Subject: #i97509# seperated base and buffered classes for 2D and 3D, adapted aqll usages --- .../primitive2d/animatedprimitive2d.hxx | 6 +- .../primitive2d/backgroundcolorprimitive2d.hxx | 4 +- .../drawinglayer/primitive2d/baseprimitive2d.hxx | 210 ++++++++++++++++----- .../drawinglayer/primitive2d/bitmapprimitive2d.hxx | 2 +- .../primitive2d/borderlineprimitive2d.hxx | 4 +- .../primitive2d/controlprimitive2d.hxx | 6 +- .../primitive2d/embedded3dprimitive2d.hxx | 4 +- .../primitive2d/fillbitmapprimitive2d.hxx | 4 +- .../primitive2d/fillgradientprimitive2d.hxx | 4 +- .../primitive2d/fillhatchprimitive2d.hxx | 4 +- .../primitive2d/graphicprimitive2d.hxx | 4 +- .../drawinglayer/primitive2d/gridprimitive2d.hxx | 4 +- .../drawinglayer/primitive2d/groupprimitive2d.hxx | 4 +- .../primitive2d/helplineprimitive2d.hxx | 4 +- .../primitive2d/hittestprimitive2d.hxx | 2 +- .../primitive2d/markerarrayprimitive2d.hxx | 4 +- .../drawinglayer/primitive2d/mediaprimitive2d.hxx | 4 +- .../primitive2d/metafileprimitive2d.hxx | 2 +- .../primitive2d/pagepreviewprimitive2d.hxx | 2 +- .../primitive2d/pointarrayprimitive2d.hxx | 2 +- .../primitive2d/polygonprimitive2d.hxx | 14 +- .../primitive2d/polypolygonprimitive2d.hxx | 22 +-- .../drawinglayer/primitive2d/primitivetools2d.hxx | 20 +- .../drawinglayer/primitive2d/sceneprimitive2d.hxx | 6 +- .../drawinglayer/primitive2d/shadowprimitive2d.hxx | 2 +- .../primitive2d/textdecoratedprimitive2d.hxx | 2 +- .../primitive2d/texteffectprimitive2d.hxx | 2 +- .../drawinglayer/primitive2d/textprimitive2d.hxx | 4 +- .../primitive2d/unifiedalphaprimitive2d.hxx | 2 +- .../primitive2d/wrongspellprimitive2d.hxx | 4 +- .../drawinglayer/primitive3d/baseprimitive3d.hxx | 134 ++++++++----- .../drawinglayer/primitive3d/groupprimitive3d.hxx | 4 +- .../primitive3d/hatchtextureprimitive3d.hxx | 2 +- .../primitive3d/hittestprimitive3d.hxx | 2 +- .../primitive3d/polygonprimitive3d.hxx | 6 +- .../primitive3d/polygontubeprimitive3d.hxx | 2 +- .../primitive3d/polypolygonprimitive3d.hxx | 2 +- .../primitive3d/sdrcubeprimitive3d.hxx | 2 +- .../primitive3d/sdrextrudeprimitive3d.hxx | 2 +- .../primitive3d/sdrlatheprimitive3d.hxx | 2 +- .../primitive3d/sdrpolypolygonprimitive3d.hxx | 2 +- .../drawinglayer/primitive3d/sdrprimitive3d.hxx | 2 +- .../primitive3d/sdrsphereprimitive3d.hxx | 2 +- .../primitive3d/textureprimitive3d.hxx | 6 +- .../drawinglayer/processor2d/baseprocessor2d.hxx | 2 +- .../drawinglayer/processor2d/canvasprocessor.hxx | 2 +- .../drawinglayer/processor3d/baseprocessor3d.hxx | 2 +- .../processor3d/geometry2dextractor.hxx | 2 +- .../drawinglayer/processor3d/shadow3dextractor.hxx | 2 +- .../source/primitive2d/animatedprimitive2d.cxx | 16 +- .../primitive2d/backgroundcolorprimitive2d.cxx | 14 +- .../source/primitive2d/baseprimitive2d.cxx | 60 ++++-- .../source/primitive2d/bitmapprimitive2d.cxx | 4 +- .../source/primitive2d/borderlineprimitive2d.cxx | 6 +- .../source/primitive2d/controlprimitive2d.cxx | 16 +- .../source/primitive2d/embedded3dprimitive2d.cxx | 6 +- .../source/primitive2d/fillbitmapprimitive2d.cxx | 6 +- .../source/primitive2d/fillgradientprimitive2d.cxx | 6 +- .../source/primitive2d/fillhatchprimitive2d.cxx | 6 +- .../source/primitive2d/graphicprimitive2d.cxx | 8 +- .../source/primitive2d/gridprimitive2d.cxx | 14 +- .../source/primitive2d/groupprimitive2d.cxx | 6 +- .../source/primitive2d/helplineprimitive2d.cxx | 16 +- .../source/primitive2d/hittestprimitive2d.cxx | 2 +- .../source/primitive2d/markerarrayprimitive2d.cxx | 6 +- .../source/primitive2d/mediaprimitive2d.cxx | 6 +- .../source/primitive2d/metafileprimitive2d.cxx | 4 +- .../source/primitive2d/pagepreviewprimitive2d.cxx | 2 +- .../source/primitive2d/pointarrayprimitive2d.cxx | 4 +- .../source/primitive2d/polygonprimitive2d.cxx | 34 ++-- .../source/primitive2d/polypolygonprimitive2d.cxx | 34 ++-- .../source/primitive2d/primitivetools2d.cxx | 16 +- .../source/primitive2d/sceneprimitive2d.cxx | 14 +- .../source/primitive2d/shadowprimitive2d.cxx | 2 +- .../primitive2d/textdecoratedprimitive2d.cxx | 6 +- .../source/primitive2d/texteffectprimitive2d.cxx | 10 +- .../source/primitive2d/textprimitive2d.cxx | 6 +- .../source/primitive2d/unifiedalphaprimitive2d.cxx | 2 +- .../source/primitive2d/wrongspellprimitive2d.cxx | 6 +- .../source/primitive3d/baseprimitive3d.cxx | 60 ++++-- .../source/primitive3d/groupprimitive3d.cxx | 6 +- .../source/primitive3d/hatchtextureprimitive3d.cxx | 10 +- .../source/primitive3d/hittestprimitive3d.cxx | 2 +- .../source/primitive3d/polygonprimitive3d.cxx | 12 +- .../source/primitive3d/polygontubeprimitive3d.cxx | 12 +- .../source/primitive3d/polypolygonprimitive3d.cxx | 4 +- .../source/primitive3d/sdrcubeprimitive3d.cxx | 2 +- .../source/primitive3d/sdrdecompositiontools3d.cxx | 2 +- .../source/primitive3d/sdrextrudeprimitive3d.cxx | 6 +- .../source/primitive3d/sdrlatheprimitive3d.cxx | 6 +- .../primitive3d/sdrpolypolygonprimitive3d.cxx | 2 +- drawinglayer/source/primitive3d/sdrprimitive3d.cxx | 4 +- .../source/primitive3d/sdrsphereprimitive3d.cxx | 2 +- .../source/primitive3d/textureprimitive3d.cxx | 6 +- .../source/processor2d/baseprocessor2d.cxx | 6 +- .../source/processor2d/canvasprocessor.cxx | 4 +- .../source/processor2d/contourextractor2d.cxx | 2 +- .../source/processor2d/hittestprocessor2d.cxx | 2 +- .../source/processor2d/linegeometryextractor2d.cxx | 2 +- .../processor2d/textaspolygonextractor2d.cxx | 2 +- .../source/processor2d/vclmetafileprocessor2d.cxx | 6 +- .../source/processor2d/vclpixelprocessor2d.cxx | 4 +- .../source/processor3d/baseprocessor3d.cxx | 4 +- .../source/processor3d/defaultprocessor3d.cxx | 4 +- .../source/processor3d/geometry2dextractor.cxx | 4 +- .../source/processor3d/shadow3dextractor.cxx | 6 +- .../source/processor3d/zbufferprocessor3d.cxx | 4 +- svx/inc/svx/sdr/overlay/overlaytools.hxx | 10 +- .../svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx | 4 +- .../sdr/primitive2d/sdrconnectorprimitive2d.hxx | 4 +- .../sdr/primitive2d/sdrcustomshapeprimitive2d.hxx | 4 +- .../svx/sdr/primitive2d/sdrellipseprimitive2d.hxx | 6 +- svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx | 4 +- .../svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx | 4 +- svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx | 2 +- .../sdr/primitive2d/sdrolecontentprimitive2d.hxx | 4 +- svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx | 4 +- .../sdr/primitive2d/sdrrectangleprimitive2d.hxx | 4 +- svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx | 10 +- svx/source/engine3d/helperhittest3d.cxx | 6 +- svx/source/engine3d/helperminimaldepth3d.cxx | 6 +- .../sdr/contact/viewcontactofsdrcaptionobj.cxx | 2 +- svx/source/sdr/contact/viewobjectcontact.cxx | 4 +- .../sdr/contact/viewobjectcontactofpageobj.cxx | 2 +- .../sdr/contact/viewobjectcontactofunocontrol.cxx | 12 +- svx/source/sdr/overlay/overlaytools.cxx | 10 +- .../sdr/primitive2d/sdrcaptionprimitive2d.cxx | 6 +- .../sdr/primitive2d/sdrconnectorprimitive2d.cxx | 6 +- .../sdr/primitive2d/sdrcustomshapeprimitive2d.cxx | 6 +- .../sdr/primitive2d/sdrdecompositiontools.cxx | 4 +- .../sdr/primitive2d/sdrellipseprimitive2d.cxx | 8 +- svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx | 6 +- .../sdr/primitive2d/sdrmeasureprimitive2d.cxx | 8 +- svx/source/sdr/primitive2d/sdrole2primitive2d.cxx | 4 +- .../sdr/primitive2d/sdrolecontentprimitive2d.cxx | 6 +- svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx | 6 +- .../sdr/primitive2d/sdrrectangleprimitive2d.cxx | 6 +- svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx | 20 +- svx/source/svdraw/svdotextdecomposition.cxx | 16 +- svx/source/svdraw/svdotextpathdecomposition.cxx | 20 +- svx/source/table/viewcontactoftableobj.cxx | 20 +- 141 files changed, 752 insertions(+), 554 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx index 41ae18b30fc9..6811b6ba857b 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx @@ -70,7 +70,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: AnimatedSwitchPrimitive2D( @@ -110,7 +110,7 @@ namespace drawinglayer { protected: // create local decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: AnimatedBlinkPrimitive2D( @@ -174,7 +174,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: AnimatedInterpolatePrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx index 65977cfd4241..47cebbca87e4 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class BackgroundColorPrimitive2D : public BasePrimitive2D + class BackgroundColorPrimitive2D : public BufDecPrimitive2D { private: basegfx::BColor maBColor; @@ -56,7 +56,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: BackgroundColorPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx index b05c60394ecd..f33b9697bff8 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx @@ -43,16 +43,17 @@ #include ////////////////////////////////////////////////////////////////////////////// -// defines for DeclPrimitrive2DIDBlock and ImplPrimitrive2DIDBlock -// Added to be able to simply change identification stuff later, e.g. add -// a identification string and/or ID to the interface and to the implementation -// ATM used to delclare implement getPrimitiveID() +/** defines for DeclPrimitrive2DIDBlock and ImplPrimitrive2DIDBlock + Added to be able to simply change identification stuff later, e.g. add + a identification string and/or ID to the interface and to the implementation + ATM used to delclare implement getPrimitive2DID() +*/ #define DeclPrimitrive2DIDBlock() \ - virtual sal_uInt32 getPrimitiveID() const; + virtual sal_uInt32 getPrimitive2DID() const; #define ImplPrimitrive2DIDBlock(TheClass, TheID) \ - sal_uInt32 TheClass::getPrimitiveID() const { return TheID; } + sal_uInt32 TheClass::getPrimitive2DID() const { return TheID; } ////////////////////////////////////////////////////////////////////////////// // predefines @@ -61,6 +62,13 @@ namespace drawinglayer { namespace geometry { class ViewInformation2D; }} +namespace drawinglayer { namespace primitive2d { + /// typedefs for basePrimitive2DImplBase, Primitive2DSequence and Primitive2DReference + typedef cppu::WeakComponentImplHelper1< ::com::sun::star::graphic::XPrimitive2D > BasePrimitive2DImplBase; + typedef ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XPrimitive2D > Primitive2DReference; + typedef ::com::sun::star::uno::Sequence< Primitive2DReference > Primitive2DSequence; +}} + ////////////////////////////////////////////////////////////////////////////// // basePrimitive2D class @@ -68,77 +76,181 @@ namespace drawinglayer { namespace primitive2d { - // typedefs for basePrimitive2DImplBase, Primitive2DSequence and Primitive2DReference - typedef cppu::WeakComponentImplHelper1< ::com::sun::star::graphic::XPrimitive2D > BasePrimitive2DImplBase; - typedef ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XPrimitive2D > Primitive2DReference; - typedef ::com::sun::star::uno::Sequence< Primitive2DReference > Primitive2DSequence; - - // base class for all C++ implementations of com::sun::star::graphic::XPrimitive2D. This class - // is strongly virtual due to the lack of getPrimitiveID() implementation. This is by purpose, this - // base class shall not be incarnated and be used directly as a XPrimitive2D. + /** Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D + + This class is strongly virtual due to the lack of getPrimitiveID() implementation. + This is by purpose, this base class shall not be incarnated and be used directly as + a XPrimitive2D. + + Is is derived from boost::noncopyable to make clear that a primitive is a read-only + instance and copying or changing values is not intended. The idea is to hold all data + needed for visualisation of this primitive in unchangeable form. + + It is derived from comphelper::OBaseMutex to have a Mutex at hand; in a base + implementation this may not be needed, but e.g. when buffering at last decomposition + in a local member, multiple threads may try to decompose at the same time, so locking + is needed to avoid race conditions seen from the UNO object implementation. + + A method to get a simplified representation is provided by get2DDecomposition. The + default implementation returns an empty sequence. The idea is that processors + using this primitive and do not know it, may get the decomposition and process + these instead. An example is e.g. a fat line, who's decomposition may contain + the geometric representation of that line using filled polygon prmimitives. When + the renderer knows how to handle fat lines, he may proccess this primitive directly; + if not he can use the decomposition. With this functionality, renderers may operate by + knowing only a small set of primitives. + + When a primitive does not implement get2DDecomposition, it is called a 'Basic Primitive' and + belongs to the set of primitives which a processor should be able to handle. Practice + will define this minimal sets of primitives. When defined and the concept is prooved, + unique UNO APIs may be defined/implemented for these set to allow more intense work + with primitives using UNO. + + Current Basic Primitives are: + (add list here) + + To support getting the geometric BoundRect, getB2DRange is used. The default + implementation will use the get2DDecomposition result and merge a range from the + entries. Thus, an implementation is only necessary for the Basic Primitives, but + of course speedups are possible (and are used) by implementing the method at higher-level + primitives. + + For primitive identification, getPrimitiveID is used currently in this implementations + to allow a fast switch/case processing. This needs a unique identifier mechanism which + currently uses defines (see drawinglayer_primitivetypes2d.hxx). For UNO prmitive API + it will be needed to add a unique descriptor (Name?) later to the API. + + This base implementation provides mappings from the methods from XPrimitive2D + (getDecomposition/getRange) to the appropriate methods in the C++ implementations + (get2DDecomposition/getB2DRange). The PropertyValue ViewParameters is converted to + the appropriate C++ implementation class ViewInformation2D. + + This base class does not implement any buffering; e.g. buffering the decompositon + and/or the range. These may be buffered anytime since the definition is that the primitive + is read-only and thus unchangeable. This implies that the decomposition and/or getting + the range will lead to the same result as last time, under the precondition that + the parameter ViewInformation2D is the same as the last one. This is usually the case + for view-independent primitives which are defined by not using ViewInformation2D + in their get2DDecomposition/getB2DRange implementations. + */ class BasePrimitive2D : private boost::noncopyable, protected comphelper::OBaseMutex, public BasePrimitive2DImplBase { private: - // a sequence used for buffering the last createLocalDecomposition() result. Use - // the protected access methods to change. Only implementations of getDecomposition() - // should make use. - Primitive2DSequence maLocalDecomposition; - protected: - // access methods to maLocalDecomposition. The usage of this methods may allow - // later thread-safe stuff to be added if needed. Only to be used by getDecomposition() - // implementations for buffering the last decomposition. - const Primitive2DSequence& getLocalDecomposition() const { return maLocalDecomposition; } - void setLocalDecomposition(const Primitive2DSequence& rNew) { maLocalDecomposition = rNew; } - - // method which is to be used to implement the local decomposition of a 2D primitive. The default - // implementation will just return an empty decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - public: - // constructor + // constructor/destructor BasePrimitive2D(); + virtual ~BasePrimitive2D(); - // the ==operator is mainly needed to allow testing newly-created primitives against their last - // incarnation which buffers/holds the made decompositions. The default implementation - // uses getPrimitiveID()-calls to test if it's the same ID at last. Overloaded implementation are then - // based on this implementation + /** the ==operator is mainly needed to allow testing newly-created primitives against their last + incarnation which buffers/holds the made decompositions. The default implementation + uses getPrimitive2DID()-calls to test if it's the same ID at last. Overloaded implementation are then + based on this implementation + */ virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; bool operator!=( const BasePrimitive2D& rPrimitive ) const { return !operator==(rPrimitive); } - // The default implementation will use getDecomposition results to create the range + /// The default implementation will use getDecomposition results to create the range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID for fast identifying of known primitive implementations in renderers. These use - // the the defines from primitivetypes2d.hxx to define unique IDs. - // This method is normally defined using DeclPrimitrive2DIDBlock() - virtual sal_uInt32 getPrimitiveID() const = 0; + /** provide unique ID for fast identifying of known primitive implementations in renderers. These use + the the defines from primitivetypes2d.hxx to define unique IDs. + This method is normally defined using DeclPrimitrive2DIDBlock() + */ + virtual sal_uInt32 getPrimitive2DID() const = 0; - // The getDecomposition default implementation will on demand use createLocalDecomposition() if maLocalDecomposition is empty. - // It will set maLocalDecomposition to this obtained decomposition to buffer it. - // If the decomposition is also ViewInformation2D-dependent, this method needs to be overloaded and the - // ViewInformation2D for the last decomposition need to be remembered, too, and be used in the next call to decide if - // the buffered decomposition may be reused or not. + /// The default implementation will return an empty sequence virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; // // Methods from XPrimitive2D // - // The getDecomposition implementation for UNO API will use getDecomposition from this implementation. It - // will construct a ViewInformation2D from the ViewParameters for that purpose + /** The getDecomposition implementation for UNO API will use getDecomposition from this implementation. It + will construct a ViewInformation2D from the ViewParameters for that purpose + */ virtual Primitive2DSequence SAL_CALL getDecomposition( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rViewParameters ) throw ( ::com::sun::star::uno::RuntimeException ); - // The getRange implementation for UNO API will use getRange from this implementation. It - // will construct a ViewInformation2D from the ViewParameters for that purpose + /** The getRange implementation for UNO API will use getRange from this implementation. It + will construct a ViewInformation2D from the ViewParameters for that purpose + */ virtual ::com::sun::star::geometry::RealRectangle2D SAL_CALL getRange( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rViewParameters ) throw ( ::com::sun::star::uno::RuntimeException ); }; } // end of namespace primitive2d } // end of namespace drawinglayer +////////////////////////////////////////////////////////////////////////////// +// BufDecPrimitive2D class + +namespace drawinglayer +{ + namespace primitive2d + { + /** Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D + which want to buffer the decomoposition result + + Buffering the decomposition is the most-used buffering and is thus used my most + primitive implementations which support a decomposition as base class. + + The buffering is done by holding the last decomposition in the local parameter + maLocal2DDecomposition. The default implementation of get2DDecomposition checks + if maLocal2DDecomposition is empty. If yes, it uses createLocal2DDecomposition + to create the content. In all cases, maLocal2DDecomposition is returned. + + For view-dependent primitives derived from Primitive2DBufferDecomposition more needs + to be done when the decomposition depends on parts of the parameter ViewInformation2D. + This defines a standard method for processing these: + + Implement a view-dependent get2DDecomposition doing te following steps: + (a) Locally extract needed parameters from ViewInformation2D to new, local parameters + (this may be a complete local copy of ViewInformation2D) + (b) If a buffered decomposition exists, ckeck if one of the new local parameters + differs from the corresponding locally remembered (as member) ones. If yes, + clear maLocal2DDecomposition + (d) call baseclass::get2DDecomposition which will use createLocal2DDecomposition + to fill maLocal2DDecomposition if it's empty + (e) copy the new local parameters to the corresponding locally remembered ones + to identify if a new decomposition is needed at the next call + (f) return maLocal2DDecomposition + */ + class BufDecPrimitive2D + : public BasePrimitive2D + { + private: + /// a sequence used for buffering the last createLocal2DDecomposition() result + Primitive2DSequence maLocal2DDecomposition; + + protected: + /** access methods to maLocal2DDecomposition. The usage of this methods may allow + later thread-safe stuff to be added if needed. Only to be used by getDecomposition() + implementations for buffering the last decomposition. + */ + const Primitive2DSequence& getLocal2DDecomposition() const { return maLocal2DDecomposition; } + void setLocal2DDecomposition(const Primitive2DSequence& rNew) { maLocal2DDecomposition = rNew; } + + /** method which is to be used to implement the local decomposition of a 2D primitive. The default + implementation will just return an empty decomposition + */ + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + + public: + // constructor/destructor + BufDecPrimitive2D(); + + /** The getDecomposition default implementation will on demand use createLocal2DDecomposition() if + maLocal2DDecomposition is empty. It will set maLocal2DDecomposition to this obtained decomposition + to buffer it. If the decomposition is also ViewInformation2D-dependent, this method needs to be + overloaded and the ViewInformation2D for the last decomposition need to be remembered, too, and + be used in the next call to decide if the buffered decomposition may be reused or not. + */ + virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + ////////////////////////////////////////////////////////////////////////////// // tooling @@ -152,7 +264,7 @@ namespace drawinglayer // get B2DRange from a given Primitive2DSequence basegfx::B2DRange getB2DRangeFromPrimitive2DSequence(const Primitive2DSequence& rCandidate, const geometry::ViewInformation2D& aViewInformation); - // compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D) + // compare two Primitive2DReferences for equality, including trying to get implementations (BufDecPrimitive2D) // and using compare operator bool arePrimitive2DReferencesEqual(const Primitive2DReference& rA, const Primitive2DReference& rB); diff --git a/drawinglayer/inc/drawinglayer/primitive2d/bitmapprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/bitmapprimitive2d.hxx index d295c6ab4b89..4a1244126b6b 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/bitmapprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/bitmapprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class BitmapPrimitive2D : public BasePrimitive2D + class BitmapPrimitive2D : public BufDecPrimitive2D { private: BitmapEx maBitmapEx; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx index 504ada20f8ac..f7e66e367478 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class BorderLinePrimitive2D : public BasePrimitive2D + class BorderLinePrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DPoint maStart; @@ -107,7 +107,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: BorderLinePrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx index 0e69cb7bdfc0..9902fbfa04d7 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class ControlPrimitive2D : public BasePrimitive2D + class ControlPrimitive2D : public BufDecPrimitive2D { private: // object's base data @@ -64,13 +64,13 @@ namespace drawinglayer // and from thereon always used and returned by getXControl() void createXControl(); - // single local decompositions, used from createLocalDecomposition() + // single local decompositions, used from createLocal2DDecomposition() Primitive2DReference createBitmapDecomposition(const geometry::ViewInformation2D& rViewInformation) const; Primitive2DReference createPlaceholderDecomposition(const geometry::ViewInformation2D& rViewInformation) const; protected: // local decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: ControlPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx index e0da8a36c3f5..f81c91374969 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx @@ -48,7 +48,7 @@ namespace drawinglayer { namespace primitive2d { - class Embedded3DPrimitive2D : public BasePrimitive2D + class Embedded3DPrimitive2D : public BufDecPrimitive2D { private: // the sequence of 3d primitives @@ -85,7 +85,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: Embedded3DPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx index 1811b9bfaad9..0689ff8d6bcc 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class FillBitmapPrimitive2D : public BasePrimitive2D + class FillBitmapPrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DHomMatrix maTransformation; @@ -55,7 +55,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: FillBitmapPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx index ef5a52c6ddcf..cc05f0fc0b07 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class FillGradientPrimitive2D : public BasePrimitive2D + class FillGradientPrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DRange maObjectRange; @@ -54,7 +54,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: FillGradientPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx index 04410429d4a3..9d3ca6feef99 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class FillHatchPrimitive2D : public BasePrimitive2D + class FillHatchPrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DRange maObjectRange; @@ -55,7 +55,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: FillHatchPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx index 6d3826e7ee22..5057a3c63261 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class GraphicPrimitive2D : public BasePrimitive2D + class GraphicPrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DHomMatrix maTransform; @@ -55,7 +55,7 @@ namespace drawinglayer protected: // local decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: GraphicPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx index f0aad415bfce..cf2bd35ba57c 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx @@ -48,7 +48,7 @@ namespace drawinglayer { namespace primitive2d { - class GridPrimitive2D : public BasePrimitive2D + class GridPrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DHomMatrix maTransform; @@ -68,7 +68,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: GridPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx index 855e65ba98f8..80187efb3b78 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx @@ -45,7 +45,7 @@ namespace drawinglayer { namespace primitive2d { - class GroupPrimitive2D : public BasePrimitive2D + class GroupPrimitive2D : public BufDecPrimitive2D { private: // the children. Declared private since this shall never be changed at all after construction @@ -53,7 +53,7 @@ namespace drawinglayer protected: // local decomposition. Implementation will just return children - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: // constructor diff --git a/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx index 4e8357a3eac1..28262adacf80 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx @@ -53,7 +53,7 @@ namespace drawinglayer HELPLINESTYLE2D_LINE }; - class HelplinePrimitive2D : public BasePrimitive2D + class HelplinePrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DPoint maPosition; @@ -70,7 +70,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: HelplinePrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx index 2bbcad315eb3..5c964fdc4ecb 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx @@ -57,7 +57,7 @@ namespace drawinglayer protected: // local decomposition. Implementation will return empty Primitive2DSequence // since this is no visualisation data - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: HitTestPrimitive2D(const Primitive2DSequence& rChildren); diff --git a/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx index 350471f4aff3..ad6a0b565980 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class MarkerArrayPrimitive2D : public BasePrimitive2D + class MarkerArrayPrimitive2D : public BufDecPrimitive2D { private: std::vector< basegfx::B2DPoint > maPositions; @@ -55,7 +55,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: MarkerArrayPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx index 019fdc69bd3f..b3baa0334edd 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class MediaPrimitive2D : public BasePrimitive2D + class MediaPrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DHomMatrix maTransform; @@ -56,7 +56,7 @@ namespace drawinglayer protected: // local decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: MediaPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx index 23eb5dd1b36e..9104fbf7c83e 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class MetafilePrimitive2D : public BasePrimitive2D + class MetafilePrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DHomMatrix maMetaFileTransform; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx index edba5455ff0a..bbe05fcf9cb1 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx @@ -72,7 +72,7 @@ namespace drawinglayer protected: // local decomposition. Implementation will just return children - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PagePreviewPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx index bdd4142b0584..474921086138 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class PointArrayPrimitive2D : public BasePrimitive2D + class PointArrayPrimitive2D : public BufDecPrimitive2D { private: std::vector< basegfx::B2DPoint > maPositions; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx index 48ec5e80aa09..8c22fa299167 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx @@ -49,7 +49,7 @@ namespace drawinglayer { namespace primitive2d { - class PolygonHairlinePrimitive2D : public BasePrimitive2D + class PolygonHairlinePrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DPolygon maPolygon; @@ -81,7 +81,7 @@ namespace drawinglayer { namespace primitive2d { - class PolygonMarkerPrimitive2D : public BasePrimitive2D + class PolygonMarkerPrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DPolygon maPolygon; @@ -94,7 +94,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolygonMarkerPrimitive2D( @@ -131,7 +131,7 @@ namespace drawinglayer { namespace primitive2d { - class PolygonStrokePrimitive2D : public BasePrimitive2D + class PolygonStrokePrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DPolygon maPolygon; @@ -140,7 +140,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolygonStrokePrimitive2D( @@ -184,7 +184,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolygonWavePrimitive2D( @@ -231,7 +231,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolygonStrokeArrowPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx index 9991a3109e10..6f63ff5d18bc 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx @@ -51,7 +51,7 @@ namespace drawinglayer { namespace primitive2d { - class PolyPolygonHairlinePrimitive2D : public BasePrimitive2D + class PolyPolygonHairlinePrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DPolyPolygon maPolyPolygon; @@ -59,7 +59,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonHairlinePrimitive2D(const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor); @@ -87,7 +87,7 @@ namespace drawinglayer { namespace primitive2d { - class PolyPolygonMarkerPrimitive2D : public BasePrimitive2D + class PolyPolygonMarkerPrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DPolyPolygon maPolyPolygon; @@ -97,7 +97,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonMarkerPrimitive2D( @@ -131,7 +131,7 @@ namespace drawinglayer { namespace primitive2d { - class PolyPolygonStrokePrimitive2D : public BasePrimitive2D + class PolyPolygonStrokePrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DPolyPolygon maPolyPolygon; @@ -140,7 +140,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonStrokePrimitive2D( @@ -184,7 +184,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonStrokeArrowPrimitive2D( @@ -223,7 +223,7 @@ namespace drawinglayer { namespace primitive2d { - class PolyPolygonColorPrimitive2D : public BasePrimitive2D + class PolyPolygonColorPrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DPolyPolygon maPolyPolygon; @@ -264,7 +264,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonGradientPrimitive2D( @@ -298,7 +298,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonHatchPrimitive2D( @@ -332,7 +332,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonBitmapPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx index bd561cbab21a..04b4de88c449 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx @@ -39,26 +39,26 @@ #include ////////////////////////////////////////////////////////////////////////////// -// tooling class for BasePrimitive2D baseed classes which are view-dependent +// tooling class for BufDecPrimitive2D baseed classes which are view-dependent // regarding the size of a discrete unit. The implementation of get2DDecomposition -// guards the buffered local decomposition and ensures that a createLocalDecomposition +// guards the buffered local decomposition and ensures that a createLocal2DDecomposition // implementation may use an up-to-date DiscreteUnit accessible using getDiscreteUnit() namespace drawinglayer { namespace primitive2d { - class DiscreteMetricDependentPrimitive2D : public BasePrimitive2D + class DiscreteMetricDependentPrimitive2D : public BufDecPrimitive2D { private: // the last used fDiscreteUnit definitions for decomposition. Since this // is checked and updated from get2DDecomposition() it will be current and - // usable in createLocalDecomposition() + // usable in createLocal2DDecomposition() double mfDiscreteUnit; public: DiscreteMetricDependentPrimitive2D() - : BasePrimitive2D(), + : BufDecPrimitive2D(), mfDiscreteUnit(0.0) { } @@ -73,26 +73,26 @@ namespace drawinglayer } // end of namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// -// tooling class for BasePrimitive2D baseed classes which are view-dependent +// tooling class for BufDecPrimitive2D baseed classes which are view-dependent // regarding the viewport. The implementation of get2DDecomposition -// guards the buffered local decomposition and ensures that a createLocalDecomposition +// guards the buffered local decomposition and ensures that a createLocal2DDecomposition // implementation may use an up-to-date Viewport accessible using getViewport() namespace drawinglayer { namespace primitive2d { - class ViewportDependentPrimitive2D : public BasePrimitive2D + class ViewportDependentPrimitive2D : public BufDecPrimitive2D { private: // the last used Viewport definition for decomposition. Since this // is checked and updated from get2DDecomposition() it will be current and - // usable in createLocalDecomposition() + // usable in createLocal2DDecomposition() basegfx::B2DRange maViewport; public: ViewportDependentPrimitive2D() - : BasePrimitive2D(), + : BufDecPrimitive2D(), maViewport() { } diff --git a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx index d7fbfd4deaee..76783abb5372 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx @@ -48,7 +48,7 @@ namespace drawinglayer { namespace primitive2d { - class ScenePrimitive2D : public BasePrimitive2D + class ScenePrimitive2D : public BufDecPrimitive2D { private: primitive3d::Primitive3DSequence mxChildren3D; // the 3d sub-primitives @@ -80,11 +80,11 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: // public helpers - // Geometry extractor. Shadow will be added as in createLocalDecomposition, but + // Geometry extractor. Shadow will be added as in createLocal2DDecomposition, but // the 3D content is not converted to a bitmap visualisation but to projected 2D gemetry. This // helper is useful e.g. for Contour extraction or HitTests. Primitive2DSequence getGeometry2D(const geometry::ViewInformation2D& rViewInformation) const; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx index b749000ee566..b30d96edcfca 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx @@ -54,7 +54,7 @@ namespace drawinglayer protected: // create decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: ShadowPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx index 69023873760a..5328b29e963a 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx @@ -151,7 +151,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: TextDecoratedPortionPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx index 128b1ea5a210..aa4d41349f14 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx @@ -68,7 +68,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: TextEffectPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx index 9515fcc22ee8..51bb93a41e91 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx @@ -123,7 +123,7 @@ namespace drawinglayer { namespace primitive2d { - class TextSimplePortionPrimitive2D : public BasePrimitive2D + class TextSimplePortionPrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DHomMatrix maTextTransform; // text range transformation from unit range ([0.0 .. 1.0]) to text range @@ -140,7 +140,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: TextSimplePortionPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx index 44f3f738b67e..0ed1900ae14f 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx @@ -51,7 +51,7 @@ namespace drawinglayer protected: // create decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: UnifiedAlphaPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx index 8bd739298059..d2e108e2844a 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class WrongSpellPrimitive2D : public BasePrimitive2D + class WrongSpellPrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DHomMatrix maTransformation; @@ -57,7 +57,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: WrongSpellPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx index faeac28b0c0c..5f4bef5a02af 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx @@ -43,16 +43,17 @@ #include ////////////////////////////////////////////////////////////////////////////// -// defines for DeclPrimitrive3DIDBlock and ImplPrimitrive3DIDBlock -// Added to be able to simply change identification stuff later, e.g. add -// a identification string and/or ID to the interface and to the implementation -// ATM used to delclare implement getPrimitiveID() +/** defines for DeclPrimitrive3DIDBlock and ImplPrimitrive3DIDBlock + Added to be able to simply change identification stuff later, e.g. add + a identification string and/or ID to the interface and to the implementation + ATM used to delclare implement getPrimitive3DID() + */ #define DeclPrimitrive3DIDBlock() \ - virtual sal_uInt32 getPrimitiveID() const; + virtual sal_uInt32 getPrimitive3DID() const; #define ImplPrimitrive3DIDBlock(TheClass, TheID) \ - sal_uInt32 TheClass::getPrimitiveID() const { return TheID; } + sal_uInt32 TheClass::getPrimitive3DID() const { return TheID; } ////////////////////////////////////////////////////////////////////////////// // predefines @@ -61,6 +62,13 @@ namespace drawinglayer { namespace geometry { class ViewInformation3D; }} +namespace drawinglayer { namespace primitive3d { + /// typedefs for basePrimitive3DImplBase, Primitive3DSequence and Primitive3DReference + typedef cppu::WeakComponentImplHelper1< ::com::sun::star::graphic::XPrimitive3D > BasePrimitive3DImplBase; + typedef ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XPrimitive3D > Primitive3DReference; + typedef ::com::sun::star::uno::Sequence< Primitive3DReference > Primitive3DSequence; +}} + ////////////////////////////////////////////////////////////////////////////// // basePrimitive3D class @@ -68,75 +76,109 @@ namespace drawinglayer { namespace primitive3d { - // typedefs for basePrimitive3DImplBase, Primitive3DSequence and Primitive3DReference - typedef cppu::WeakComponentImplHelper1< ::com::sun::star::graphic::XPrimitive3D > BasePrimitive3DImplBase; - typedef ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XPrimitive3D > Primitive3DReference; - typedef ::com::sun::star::uno::Sequence< Primitive3DReference > Primitive3DSequence; + /** Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D + The description/functionality is identical with the 2D case in baseprimitive2d.hxx, + please see there for detailed information + */ class BasePrimitive3D : private boost::noncopyable, protected comphelper::OBaseMutex, public BasePrimitive3DImplBase { private: - // a sequence used for buffering the last createLocalDecomposition() result. Use - // the protected access methods to change. Only implementations of getDecomposition() - // should make use. - Primitive3DSequence maLocalDecomposition; - protected: - // access methods to maLocalDecomposition. The usage of this methods may allow - // later thread-safe stuff to be added if needed. Only to be used by getDecomposition() - // implementations for buffering the last decomposition. - const Primitive3DSequence& getLocalDecomposition() const { return maLocalDecomposition; } - void setLocalDecomposition(const Primitive3DSequence& rNew) { maLocalDecomposition = rNew; } - - // method which is to be used to implement the local decomposition of a 2D primitive. The default - // implementation will just return an empty decomposition - virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - public: - // constructor + // constructor/destructor BasePrimitive3D(); + virtual ~BasePrimitive3D(); - // the ==operator is mainly needed to allow testing newly-created high level primitives against their last - // incarnation which buffers/holds the decompositionsThe default implementation - // uses getPrimitiveID()-calls to test if it's the same ID at last. Overloaded implementation are then - // based on this implementation + /** the ==operator is mainly needed to allow testing newly-created high level primitives against their last + incarnation which buffers/holds the decompositionsThe default implementation + uses getPrimitive3DID()-calls to test if it's the same ID at last. Overloaded implementation are then + based on this implementation + */ virtual bool operator==( const BasePrimitive3D& rPrimitive ) const; bool operator!=( const BasePrimitive3D& rPrimitive ) const { return !operator==(rPrimitive); } - // This method is for places where using the C++ implementation directly is possible. The subprocessing - // and range merging is more efficient when working directly on basegfx::B3DRange. The default implementation - // will use getDecomposition results to create the range + /** This method is for places where using the C++ implementation directly is possible. The subprocessing + and range merging is more efficient when working directly on basegfx::B3DRange. The default implementation + will use getDecomposition results to create the range + */ virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const; - // provide unique ID for fast identifying of known primitive implementations in renderers. These use - // the the defines from primitivetypes3d.hxx to define unique IDs. - virtual sal_uInt32 getPrimitiveID() const = 0; + /** provide unique ID for fast identifying of known primitive implementations in renderers. These use + the the defines from primitivetypes3d.hxx to define unique IDs. + */ + virtual sal_uInt32 getPrimitive3DID() const = 0; - // The getDecomposition default implementation will on demand use createLocalDecomposition() if maLocalDecomposition is empty. - // It will set maLocalDecomposition to this obtained decomposition to buffer it. - // If the decomposition is also ViewInformation-dependent, this method needs to be overloaded and the - // ViewInformation for the last decomposition needs to be remembered, too, and be used in the next call to decide if - // the buffered decomposition may be reused or not. + /// The default implementation returns an empty sequence virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; // // Methods from XPrimitive3D // - // The getDecomposition implementation for UNO API will use getDecomposition from this implementation. It - // will get the ViewInformation from the ViewParameters for that purpose + /** The getDecomposition implementation for UNO API will use getDecomposition from this implementation. It + will get the ViewInformation from the ViewParameters for that purpose + */ virtual Primitive3DSequence SAL_CALL getDecomposition( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rViewParameters ) throw ( ::com::sun::star::uno::RuntimeException ); - // the getRange default implemenation will use getDecomposition to create the range information from merging - // getRange results from the single local decomposition primitives. + /** the getRange default implemenation will use getDecomposition to create the range information from merging + getRange results from the single local decomposition primitives. + */ virtual ::com::sun::star::geometry::RealRectangle3D SAL_CALL getRange( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rViewParameters ) throw ( ::com::sun::star::uno::RuntimeException ); }; } // end of namespace primitive3d } // end of namespace drawinglayer +////////////////////////////////////////////////////////////////////////////// +// BufDecPrimitive3D class + +namespace drawinglayer +{ + namespace primitive3d + { + /** Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D + + The description/functionality is identical with the 2D case in baseprimitive2d.hxx, + please see there for detailed information + */ + class BufDecPrimitive3D + : public BasePrimitive3D + { + private: + /// a sequence used for buffering the last createLocal3DDecomposition() result + Primitive3DSequence maLocal3DDecomposition; + + protected: + /** access methods to maLocal3DDecomposition. The usage of this methods may allow + later thread-safe stuff to be added if needed. Only to be used by getDecomposition() + implementations for buffering the last decomposition. + */ + const Primitive3DSequence& getLocal3DDecomposition() const { return maLocal3DDecomposition; } + void setLocal3DDecomposition(const Primitive3DSequence& rNew) { maLocal3DDecomposition = rNew; } + + /** method which is to be used to implement the local decomposition of a 2D primitive. The default + implementation will just return an empty decomposition + */ + virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + + public: + // constructor + BufDecPrimitive3D(); + + /** The getDecomposition default implementation will on demand use createLocal3DDecomposition() if + maLocal3DDecomposition is empty. It will set maLocal3DDecomposition to this obtained decomposition + to buffer it. If the decomposition is also ViewInformation-dependent, this method needs to be + overloaded and the ViewInformation for the last decomposition needs to be remembered, too, and + be used in the next call to decide if the buffered decomposition may be reused or not. + */ + virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + }; + } // end of namespace primitive3d +} // end of namespace drawinglayer + ////////////////////////////////////////////////////////////////////////////// // tooling @@ -150,7 +192,7 @@ namespace drawinglayer // get range3D from a given Primitive3DSequence basegfx::B3DRange getB3DRangeFromPrimitive3DSequence(const Primitive3DSequence& rCandidate, const geometry::ViewInformation3D& aViewInformation); - // compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D) + // compare two Primitive2DReferences for equality, including trying to get implementations (BufDecPrimitive2D) // and using compare operator bool arePrimitive3DReferencesEqual(const Primitive3DReference& rA, const Primitive3DReference& rB); diff --git a/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx index 029b4c664fe2..93ca09af8e93 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx @@ -44,7 +44,7 @@ namespace drawinglayer { namespace primitive3d { - class GroupPrimitive3D : public BasePrimitive3D + class GroupPrimitive3D : public BufDecPrimitive3D { private: // the children. Declared private since this shall never be changed at all after construction @@ -52,7 +52,7 @@ namespace drawinglayer protected: // local decomposition. Implementation will just return children - virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: // constructor diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx index c1feccaaa10c..a8ce982f3560 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx @@ -51,7 +51,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: HatchTexturePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx index 28029f223b1b..f79fe21dd920 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx @@ -59,7 +59,7 @@ namespace drawinglayer protected: // local decomposition. Implementation will return empty Primitive3DSequence // since this is no visualisation data - virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: HitTestPrimitive3D(const Primitive3DSequence& rChildren); diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx index 9de2dc5949e7..b54f5e6c6119 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx @@ -48,7 +48,7 @@ namespace drawinglayer { namespace primitive3d { - class PolygonHairlinePrimitive3D : public BasePrimitive3D + class PolygonHairlinePrimitive3D : public BufDecPrimitive3D { private: basegfx::B3DPolygon maPolygon; @@ -81,7 +81,7 @@ namespace drawinglayer { namespace primitive3d { - class PolygonStrokePrimitive3D : public BasePrimitive3D + class PolygonStrokePrimitive3D : public BufDecPrimitive3D { private: basegfx::B3DPolygon maPolygon; @@ -90,7 +90,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: PolygonStrokePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx index 8a9b293a8c5e..1fa43c0e27fc 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx @@ -62,7 +62,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: PolygonTubePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx index 1c5b9e400bbb..2069ab08cdb2 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive3d { - class PolyPolygonMaterialPrimitive3D : public BasePrimitive3D + class PolyPolygonMaterialPrimitive3D : public BufDecPrimitive3D { private: basegfx::B3DPolyPolygon maPolyPolygon; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx index 57f31a46a557..13ccc8d80411 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx @@ -48,7 +48,7 @@ namespace drawinglayer { protected: // local decomposition. - virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrCubePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx index a6d386bf194a..e3b96a1b0d3e 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx @@ -77,7 +77,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrExtrudePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx index 99d06e256431..0925d798a52a 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx @@ -91,7 +91,7 @@ namespace drawinglayer const basegfx::B2DPoint& rEnd) const; // local decomposition. - virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrLathePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx index 4eec829afeb5..bd020022f12f 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx @@ -52,7 +52,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrPolyPolygonPrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx index 6b381445716e..729de313267a 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx @@ -49,7 +49,7 @@ namespace drawinglayer { namespace primitive3d { - class SdrPrimitive3D : public BasePrimitive3D + class SdrPrimitive3D : public BufDecPrimitive3D { private: basegfx::B3DHomMatrix maTransform; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx index 358298e30456..38a0f94ee07b 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx @@ -52,7 +52,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrSpherePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx index 15b8e1265709..c351fcd0aff0 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx @@ -90,7 +90,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: UnifiedAlphaTexturePrimitive3D( @@ -122,7 +122,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: GradientTexturePrimitive3D( @@ -157,7 +157,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: BitmapTexturePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx index fceae8dbeb31..c9e31eecba91 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx @@ -57,7 +57,7 @@ namespace drawinglayer } // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BasePrimitive2D-based. + // virtual render method when the primitive implementation is BufDecPrimitive2D-based. // Default implementation does nothing virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate); diff --git a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx index 0c356e731169..a100d2bae5c0 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx @@ -103,7 +103,7 @@ namespace drawinglayer LanguageType meLang; // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BasePrimitive2D-based. + // virtual render method when the primitive implementation is BufDecPrimitive2D-based. virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate); // direct primitive renderer support diff --git a/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx index effc509d9981..8e2023c7e1bc 100644 --- a/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx +++ b/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx @@ -57,7 +57,7 @@ namespace drawinglayer } // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BasePrimitive3D-based. + // virtual render method when the primitive implementation is BufDecPrimitive3D-based. // Default implementation does nothing virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); diff --git a/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx b/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx index 457ede952ccd..e43fc0d7d8b3 100644 --- a/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx +++ b/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx @@ -61,7 +61,7 @@ namespace drawinglayer basegfx::BColorModifierStack maBColorModifierStack; // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BasePrimitive3D-based. + // virtual render method when the primitive implementation is BufDecPrimitive3D-based. virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); public: diff --git a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx index abb92693a037..ddb1d0179073 100644 --- a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx +++ b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx @@ -89,7 +89,7 @@ namespace drawinglayer basegfx::B2DPolyPolygon impDoShadowProjection(const basegfx::B3DPolyPolygon& rSource); // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BasePrimitive3D-based. + // virtual render method when the primitive implementation is BufDecPrimitive3D-based. virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); public: diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx index 13f1f699f1ab..efa6df7c5e35 100644 --- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx @@ -52,7 +52,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence AnimatedSwitchPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence AnimatedSwitchPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { if(getChildren().hasElements()) { @@ -107,13 +107,13 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(getLocalDecomposition().hasElements() && mfDecomposeViewTime != rViewInformation.getViewTime()) + if(getLocal2DDecomposition().hasElements() && mfDecomposeViewTime != rViewInformation.getViewTime()) { // conditions of last local decomposition have changed, delete - const_cast< AnimatedSwitchPrimitive2D* >(this)->setLocalDecomposition(Primitive2DSequence()); + const_cast< AnimatedSwitchPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); } - if(!getLocalDecomposition().hasElements()) + if(!getLocal2DDecomposition().hasElements()) { // remember time const_cast< AnimatedSwitchPrimitive2D* >(this)->mfDecomposeViewTime = rViewInformation.getViewTime(); @@ -126,8 +126,8 @@ namespace drawinglayer basegfx::B2DRange AnimatedSwitchPrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewInformation) const { // to get range from decomposition and not from group content, call implementation from - // BasePrimitive2D here - return BasePrimitive2D::getB2DRange(rViewInformation); + // BufDecPrimitive2D here + return BufDecPrimitive2D::getB2DRange(rViewInformation); } // provide unique ID @@ -142,7 +142,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence AnimatedBlinkPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence AnimatedBlinkPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { if(getChildren().hasElements()) { @@ -206,7 +206,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence AnimatedInterpolatePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence AnimatedInterpolatePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { const sal_uInt32 nSize(maMatrixStack.size()); diff --git a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx index cff797451954..68527b93d9cb 100644 --- a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx @@ -54,7 +54,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence BackgroundColorPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence BackgroundColorPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { if(!rViewInformation.getViewport().isEmpty()) { @@ -70,7 +70,7 @@ namespace drawinglayer BackgroundColorPrimitive2D::BackgroundColorPrimitive2D( const basegfx::BColor& rBColor) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maBColor(rBColor), maLastViewport() { @@ -78,7 +78,7 @@ namespace drawinglayer bool BackgroundColorPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const BackgroundColorPrimitive2D& rCompare = (BackgroundColorPrimitive2D&)rPrimitive; @@ -98,20 +98,20 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(getLocalDecomposition().hasElements() && (maLastViewport != rViewInformation.getViewport())) + if(getLocal2DDecomposition().hasElements() && (maLastViewport != rViewInformation.getViewport())) { // conditions of last local decomposition have changed, delete - const_cast< BackgroundColorPrimitive2D* >(this)->setLocalDecomposition(Primitive2DSequence()); + const_cast< BackgroundColorPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); } - if(!getLocalDecomposition().hasElements()) + if(!getLocal2DDecomposition().hasElements()) { // remember ViewRange const_cast< BackgroundColorPrimitive2D* >(this)->maLastViewport = rViewInformation.getViewport(); } // use parent implementation - return BasePrimitive2D::get2DDecomposition(rViewInformation); + return BufDecPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx index 63941512bfb0..3ac7253a42a3 100644 --- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx @@ -50,20 +50,18 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence BasePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + BasePrimitive2D::BasePrimitive2D() + : BasePrimitive2DImplBase(m_aMutex) { - return Primitive2DSequence(); } - BasePrimitive2D::BasePrimitive2D() - : BasePrimitive2DImplBase(m_aMutex), - maLocalDecomposition() + BasePrimitive2D::~BasePrimitive2D() { } bool BasePrimitive2D::operator==( const BasePrimitive2D& rPrimitive ) const { - return (getPrimitiveID() == rPrimitive.getPrimitiveID()); + return (getPrimitive2DID() == rPrimitive.getPrimitive2DID()); } basegfx::B2DRange BasePrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewInformation) const @@ -71,17 +69,9 @@ namespace drawinglayer return getB2DRangeFromPrimitive2DSequence(get2DDecomposition(rViewInformation), rViewInformation); } - Primitive2DSequence BasePrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence BasePrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { - ::osl::MutexGuard aGuard( m_aMutex ); - - if(!getLocalDecomposition().hasElements()) - { - const Primitive2DSequence aNewSequence(createLocalDecomposition(rViewInformation)); - const_cast< BasePrimitive2D* >(this)->setLocalDecomposition(aNewSequence); - } - - return getLocalDecomposition(); + return Primitive2DSequence(); } Primitive2DSequence SAL_CALL BasePrimitive2D::getDecomposition( const uno::Sequence< beans::PropertyValue >& rViewParameters ) throw ( uno::RuntimeException ) @@ -98,6 +88,38 @@ namespace drawinglayer } // end of namespace primitive2d } // end of namespace drawinglayer +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + Primitive2DSequence BufDecPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + return Primitive2DSequence(); + } + + BufDecPrimitive2D::BufDecPrimitive2D() + : BasePrimitive2D(), + maLocal2DDecomposition() + { + } + + Primitive2DSequence BufDecPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + { + ::osl::MutexGuard aGuard( m_aMutex ); + + if(!getLocal2DDecomposition().hasElements()) + { + const Primitive2DSequence aNewSequence(createLocal2DDecomposition(rViewInformation)); + const_cast< BufDecPrimitive2D* >(this)->setLocal2DDecomposition(aNewSequence); + } + + return getLocal2DDecomposition(); + } + } // end of namespace primitive2d +} // end of namespace drawinglayer + ////////////////////////////////////////////////////////////////////////////// // tooling @@ -113,7 +135,7 @@ namespace drawinglayer if(rCandidate.is()) { // try to get C++ implementation base - const BasePrimitive2D* pCandidate(dynamic_cast< BasePrimitive2D* >(rCandidate.get())); + const BufDecPrimitive2D* pCandidate(dynamic_cast< BufDecPrimitive2D* >(rCandidate.get())); if(pCandidate) { @@ -163,8 +185,8 @@ namespace drawinglayer return true; } - const BasePrimitive2D* pA(dynamic_cast< const BasePrimitive2D* >(rxA.get())); - const BasePrimitive2D* pB(dynamic_cast< const BasePrimitive2D* >(rxB.get())); + const BufDecPrimitive2D* pA(dynamic_cast< const BufDecPrimitive2D* >(rxA.get())); + const BufDecPrimitive2D* pB(dynamic_cast< const BufDecPrimitive2D* >(rxB.get())); const bool bAEqualZero(pA == 0L); if(bAEqualZero != (pB == 0L)) diff --git a/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx index 5900900bcf06..67e8dc800b12 100644 --- a/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer BitmapPrimitive2D::BitmapPrimitive2D( const BitmapEx& rBitmapEx, const basegfx::B2DHomMatrix& rTransform) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maBitmapEx(rBitmapEx), maTransform(rTransform) { @@ -61,7 +61,7 @@ namespace drawinglayer bool BitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const BitmapPrimitive2D& rCompare = (BitmapPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx index ba73f920cb08..c2c4e46464a0 100644 --- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx @@ -49,7 +49,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence BorderLinePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence BorderLinePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence xRetval; @@ -194,7 +194,7 @@ namespace drawinglayer bool bCreateInside, bool bCreateOutside, const basegfx::BColor& rRGBColor) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maStart(rStart), maEnd(rEnd), mfLeftWidth(fLeftWidth), @@ -212,7 +212,7 @@ namespace drawinglayer bool BorderLinePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const BorderLinePrimitive2D& rCompare = (BorderLinePrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx index 6241eeb2fa73..ecc05621f075 100644 --- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx @@ -266,7 +266,7 @@ namespace drawinglayer return xRetval; } - Primitive2DSequence ControlPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence ControlPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { // try to create a bitmap decomposition. If that fails for some reason, // at least create a replacement decomposition. @@ -283,7 +283,7 @@ namespace drawinglayer ControlPrimitive2D::ControlPrimitive2D( const basegfx::B2DHomMatrix& rTransform, const uno::Reference< awt::XControlModel >& rxControlModel) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransform(rTransform), mxControlModel(rxControlModel), mxXControl(), @@ -295,7 +295,7 @@ namespace drawinglayer const basegfx::B2DHomMatrix& rTransform, const uno::Reference< awt::XControlModel >& rxControlModel, const uno::Reference< awt::XControl >& rxXControl) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransform(rTransform), mxControlModel(rxControlModel), mxXControl(rxXControl), @@ -316,7 +316,7 @@ namespace drawinglayer bool ControlPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { // use base class compare operator - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const ControlPrimitive2D& rCompare = (ControlPrimitive2D&)rPrimitive; @@ -365,23 +365,23 @@ namespace drawinglayer ::osl::MutexGuard aGuard( m_aMutex ); const basegfx::B2DVector aNewScaling(rViewInformation.getObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0)); - if(getLocalDecomposition().hasElements()) + if(getLocal2DDecomposition().hasElements()) { if(!maLastViewScaling.equal(aNewScaling)) { // conditions of last local decomposition have changed, delete - const_cast< ControlPrimitive2D* >(this)->setLocalDecomposition(Primitive2DSequence()); + const_cast< ControlPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); } } - if(!getLocalDecomposition().hasElements()) + if(!getLocal2DDecomposition().hasElements()) { // remember ViewTransformation const_cast< ControlPrimitive2D* >(this)->maLastViewScaling = aNewScaling; } // use parent implementation - return BasePrimitive2D::get2DDecomposition(rViewInformation); + return BufDecPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx b/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx index 5805c02a61ed..f2c8dd5c4d98 100644 --- a/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx @@ -84,7 +84,7 @@ namespace drawinglayer return maShadowPrimitives.hasElements(); } - Primitive2DSequence Embedded3DPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence Embedded3DPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { // use info to create a yellow 2d rectangle, similar to empty 3d scenes and/or groups const basegfx::B2DRange aLocal2DRange(getB2DRange(rViewInformation)); @@ -102,7 +102,7 @@ namespace drawinglayer const basegfx::B3DVector& rLightNormal, double fShadowSlant, const basegfx::B3DRange& rScene3DRange) - : BasePrimitive2D(), + : BufDecPrimitive2D(), mxChildren3D(rxChildren3D), maObjectTransformation(rObjectTransformation), maViewInformation3D(rViewInformation3D), @@ -118,7 +118,7 @@ namespace drawinglayer bool Embedded3DPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const Embedded3DPrimitive2D& rCompare = static_cast< const Embedded3DPrimitive2D& >(rPrimitive); diff --git a/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx index 125c2cb42193..a35bf6eeffe9 100644 --- a/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx @@ -54,7 +54,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence FillBitmapPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence FillBitmapPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const Size aTileSizePixel(getFillBitmap().getBitmap().GetSizePixel()); Primitive2DSequence aRetval; @@ -105,7 +105,7 @@ namespace drawinglayer FillBitmapPrimitive2D::FillBitmapPrimitive2D( const basegfx::B2DHomMatrix& rTransformation, const attribute::FillBitmapAttribute& rFillBitmap) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransformation(rTransformation), maFillBitmap(rFillBitmap) { @@ -113,7 +113,7 @@ namespace drawinglayer bool FillBitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const FillBitmapPrimitive2D& rCompare = static_cast< const FillBitmapPrimitive2D& >(rPrimitive); diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx index ff0c031b38a1..8e820f61fbb2 100644 --- a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx @@ -54,7 +54,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence FillGradientPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence FillGradientPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const attribute::GradientStyle aGradientStyle(maFillGradient.getStyle()); ::std::vector< basegfx::B2DHomMatrix > aMatrices; @@ -167,7 +167,7 @@ namespace drawinglayer FillGradientPrimitive2D::FillGradientPrimitive2D( const basegfx::B2DRange& rObjectRange, const attribute::FillGradientAttribute& rFillGradient) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maObjectRange(rObjectRange), maFillGradient(rFillGradient) { @@ -175,7 +175,7 @@ namespace drawinglayer bool FillGradientPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const FillGradientPrimitive2D& rCompare = (FillGradientPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx index 06d04111686d..42b8483fe172 100644 --- a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx @@ -55,7 +55,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence FillHatchPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence FillHatchPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // create hatch const basegfx::BColor aHatchColor(maFillHatch.getColor()); @@ -125,7 +125,7 @@ namespace drawinglayer const basegfx::B2DRange& rObjectRange, const basegfx::BColor& rBColor, const attribute::FillHatchAttribute& rFillHatch) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maObjectRange(rObjectRange), maFillHatch(rFillHatch), maBColor(rBColor) @@ -134,7 +134,7 @@ namespace drawinglayer bool FillHatchPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const FillHatchPrimitive2D& rCompare = (FillHatchPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index ffceaf8ce04a..94bd7befcda6 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -211,7 +211,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence GraphicPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence GraphicPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; @@ -379,7 +379,7 @@ namespace drawinglayer const basegfx::B2DHomMatrix& rTransform, const GraphicObject& rGraphicObject, const GraphicAttr& rGraphicAttr) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransform(rTransform), maGraphicObject(rGraphicObject), maGraphicAttr(rGraphicAttr) @@ -389,7 +389,7 @@ namespace drawinglayer GraphicPrimitive2D::GraphicPrimitive2D( const basegfx::B2DHomMatrix& rTransform, const GraphicObject& rGraphicObject) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransform(rTransform), maGraphicObject(rGraphicObject), maGraphicAttr() @@ -398,7 +398,7 @@ namespace drawinglayer bool GraphicPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const GraphicPrimitive2D& rCompare = (GraphicPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/gridprimitive2d.cxx b/drawinglayer/source/primitive2d/gridprimitive2d.cxx index df4171309389..75ba4102da0b 100644 --- a/drawinglayer/source/primitive2d/gridprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/gridprimitive2d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence GridPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence GridPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence aRetval; @@ -248,7 +248,7 @@ namespace drawinglayer sal_uInt32 nSubdivisionsY, const basegfx::BColor& rBColor, const BitmapEx& rCrossMarker) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransform(rTransform), mfWidth(fWidth), mfHeight(fHeight), @@ -265,7 +265,7 @@ namespace drawinglayer bool GridPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const GridPrimitive2D& rCompare = (GridPrimitive2D&)rPrimitive; @@ -299,16 +299,16 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(getLocalDecomposition().hasElements()) + if(getLocal2DDecomposition().hasElements()) { if(maLastViewport != rViewInformation.getViewport() || maLastObjectToViewTransformation != rViewInformation.getObjectToViewTransformation()) { // conditions of last local decomposition have changed, delete - const_cast< GridPrimitive2D* >(this)->setLocalDecomposition(Primitive2DSequence()); + const_cast< GridPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); } } - if(!getLocalDecomposition().hasElements()) + if(!getLocal2DDecomposition().hasElements()) { // remember ViewRange and ViewTransformation const_cast< GridPrimitive2D* >(this)->maLastObjectToViewTransformation = rViewInformation.getObjectToViewTransformation(); @@ -316,7 +316,7 @@ namespace drawinglayer } // use parent implementation - return BasePrimitive2D::get2DDecomposition(rViewInformation); + return BufDecPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/drawinglayer/source/primitive2d/groupprimitive2d.cxx b/drawinglayer/source/primitive2d/groupprimitive2d.cxx index ae899af6e84d..018c786dff64 100644 --- a/drawinglayer/source/primitive2d/groupprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/groupprimitive2d.cxx @@ -50,13 +50,13 @@ namespace drawinglayer namespace primitive2d { /// default: just return children, so all renderers not supporting group will use it's content - Primitive2DSequence GroupPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence GroupPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { return getChildren(); } GroupPrimitive2D::GroupPrimitive2D( const Primitive2DSequence& rChildren ) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maChildren(rChildren) { } @@ -67,7 +67,7 @@ namespace drawinglayer */ bool GroupPrimitive2D::operator==( const BasePrimitive2D& rPrimitive ) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const GroupPrimitive2D& rCompare = static_cast< const GroupPrimitive2D& >(rPrimitive); diff --git a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx index 3232e635b561..e676bc9764f8 100644 --- a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx @@ -54,9 +54,9 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence HelplinePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence HelplinePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { - std::vector< BasePrimitive2D* > aTempPrimitiveTarget; + std::vector< BufDecPrimitive2D* > aTempPrimitiveTarget; if(!rViewInformation.getViewport().isEmpty() && !getDirection().equalZero()) { @@ -167,7 +167,7 @@ namespace drawinglayer const basegfx::BColor& rRGBColA, const basegfx::BColor& rRGBColB, double fDiscreteDashLength) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maPosition(rPosition), maDirection(rDirection), meStyle(eStyle), @@ -181,7 +181,7 @@ namespace drawinglayer bool HelplinePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const HelplinePrimitive2D& rCompare = (HelplinePrimitive2D&)rPrimitive; @@ -200,16 +200,16 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(getLocalDecomposition().hasElements()) + if(getLocal2DDecomposition().hasElements()) { if(maLastViewport != rViewInformation.getViewport() || maLastObjectToViewTransformation != rViewInformation.getObjectToViewTransformation()) { // conditions of last local decomposition have changed, delete - const_cast< HelplinePrimitive2D* >(this)->setLocalDecomposition(Primitive2DSequence()); + const_cast< HelplinePrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); } } - if(!getLocalDecomposition().hasElements()) + if(!getLocal2DDecomposition().hasElements()) { // remember ViewRange and ViewTransformation const_cast< HelplinePrimitive2D* >(this)->maLastObjectToViewTransformation = rViewInformation.getObjectToViewTransformation(); @@ -217,7 +217,7 @@ namespace drawinglayer } // use parent implementation - return BasePrimitive2D::get2DDecomposition(rViewInformation); + return BufDecPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/drawinglayer/source/primitive2d/hittestprimitive2d.cxx b/drawinglayer/source/primitive2d/hittestprimitive2d.cxx index daf65abd81d4..ba48e7097bbe 100644 --- a/drawinglayer/source/primitive2d/hittestprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/hittestprimitive2d.cxx @@ -49,7 +49,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence HitTestPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence HitTestPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // return empty sequence return Primitive2DSequence(); diff --git a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx index 5737b9ef6cec..0a6ce405e9a1 100644 --- a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx @@ -55,7 +55,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence MarkerArrayPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence MarkerArrayPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval; const std::vector< basegfx::B2DPoint >& rPositions = getPositions(); @@ -100,7 +100,7 @@ namespace drawinglayer MarkerArrayPrimitive2D::MarkerArrayPrimitive2D( const std::vector< basegfx::B2DPoint >& rPositions, const BitmapEx& rMarker) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maPositions(rPositions), maMarker(rMarker) { @@ -108,7 +108,7 @@ namespace drawinglayer bool MarkerArrayPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const MarkerArrayPrimitive2D& rCompare = (MarkerArrayPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx index 7799b8e66d0e..a4ad85d6c016 100644 --- a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence MediaPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence MediaPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval(1); @@ -114,7 +114,7 @@ namespace drawinglayer const rtl::OUString& rURL, const basegfx::BColor& rBackgroundColor, sal_uInt32 nDiscreteBorder) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransform(rTransform), maURL(rURL), maBackgroundColor(rBackgroundColor), @@ -124,7 +124,7 @@ namespace drawinglayer bool MediaPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const MediaPrimitive2D& rCompare = (MediaPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 2d1c0428a6a3..411d2155e4c7 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer MetafilePrimitive2D::MetafilePrimitive2D( const basegfx::B2DHomMatrix& rMetaFileTransform, const GDIMetaFile& rMetaFile) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maMetaFileTransform(rMetaFileTransform), maMetaFile(rMetaFile) { @@ -61,7 +61,7 @@ namespace drawinglayer bool MetafilePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const MetafilePrimitive2D& rCompare = (MetafilePrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx index 01a82299682d..0ef988e7eb44 100644 --- a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PagePreviewPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence PagePreviewPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval; Primitive2DSequence aContent(getChildren()); diff --git a/drawinglayer/source/primitive2d/pointarrayprimitive2d.cxx b/drawinglayer/source/primitive2d/pointarrayprimitive2d.cxx index d144fd7030e6..e5cbaf9721a0 100644 --- a/drawinglayer/source/primitive2d/pointarrayprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/pointarrayprimitive2d.cxx @@ -52,7 +52,7 @@ namespace drawinglayer PointArrayPrimitive2D::PointArrayPrimitive2D( const std::vector< basegfx::B2DPoint >& rPositions, const basegfx::BColor& rRGBColor) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maPositions(rPositions), maRGBColor(rRGBColor), maB2DRange() @@ -61,7 +61,7 @@ namespace drawinglayer bool PointArrayPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const PointArrayPrimitive2D& rCompare = (PointArrayPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx index b5212da54688..10d153362e6e 100644 --- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx @@ -57,7 +57,7 @@ namespace drawinglayer PolygonHairlinePrimitive2D::PolygonHairlinePrimitive2D( const basegfx::B2DPolygon& rPolygon, const basegfx::BColor& rBColor) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maPolygon(rPolygon), maBColor(rBColor) { @@ -65,7 +65,7 @@ namespace drawinglayer bool PolygonHairlinePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const PolygonHairlinePrimitive2D& rCompare = (PolygonHairlinePrimitive2D&)rPrimitive; @@ -110,7 +110,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolygonMarkerPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence PolygonMarkerPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { // calculate logic DashLength const basegfx::B2DVector aDashVector(rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(getDiscreteDashLength(), 0.0)); @@ -147,7 +147,7 @@ namespace drawinglayer const basegfx::BColor& rRGBColorA, const basegfx::BColor& rRGBColorB, double fDiscreteDashLength) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maPolygon(rPolygon), maRGBColorA(rRGBColorA), maRGBColorB(rRGBColorB), @@ -158,7 +158,7 @@ namespace drawinglayer bool PolygonMarkerPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const PolygonMarkerPrimitive2D& rCompare = (PolygonMarkerPrimitive2D&)rPrimitive; @@ -198,7 +198,7 @@ namespace drawinglayer ::osl::MutexGuard aGuard( m_aMutex ); bool bNeedNewDecomposition(false); - if(getLocalDecomposition().hasElements()) + if(getLocal2DDecomposition().hasElements()) { if(rViewInformation.getInverseObjectToViewTransformation() != maLastInverseObjectToViewTransformation) { @@ -209,10 +209,10 @@ namespace drawinglayer if(bNeedNewDecomposition) { // conditions of last local decomposition have changed, delete - const_cast< PolygonMarkerPrimitive2D* >(this)->setLocalDecomposition(Primitive2DSequence()); + const_cast< PolygonMarkerPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); } - if(!getLocalDecomposition().hasElements()) + if(!getLocal2DDecomposition().hasElements()) { // remember last used InverseObjectToViewTransformation PolygonMarkerPrimitive2D* pThat = const_cast< PolygonMarkerPrimitive2D* >(this); @@ -220,7 +220,7 @@ namespace drawinglayer } // use parent implementation - return BasePrimitive2D::get2DDecomposition(rViewInformation); + return BufDecPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID @@ -235,7 +235,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolygonStrokePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolygonStrokePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { if(getB2DPolygon().count()) { @@ -307,7 +307,7 @@ namespace drawinglayer const basegfx::B2DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maPolygon(rPolygon), maLineAttribute(rLineAttribute), maStrokeAttribute(rStrokeAttribute) @@ -317,7 +317,7 @@ namespace drawinglayer PolygonStrokePrimitive2D::PolygonStrokePrimitive2D( const basegfx::B2DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maPolygon(rPolygon), maLineAttribute(rLineAttribute), maStrokeAttribute() @@ -326,7 +326,7 @@ namespace drawinglayer bool PolygonStrokePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const PolygonStrokePrimitive2D& rCompare = (PolygonStrokePrimitive2D&)rPrimitive; @@ -348,7 +348,7 @@ namespace drawinglayer { // if line is mitered, use parent call since mitered line // geometry may use more space than the geometry grown by half line width - aRetval = BasePrimitive2D::getB2DRange(rViewInformation); + aRetval = BufDecPrimitive2D::getB2DRange(rViewInformation); } else { @@ -392,7 +392,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolygonWavePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolygonWavePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; @@ -505,7 +505,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolygonStrokeArrowPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolygonStrokeArrowPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // copy local polygon, it may be changed basegfx::B2DPolygon aLocalPolygon(getB2DPolygon()); @@ -614,7 +614,7 @@ namespace drawinglayer if(getStart().isActive() || getEnd().isActive()) { // use decomposition when line start/end is used - return BasePrimitive2D::getB2DRange(rViewInformation); + return BufDecPrimitive2D::getB2DRange(rViewInformation); } else { diff --git a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx index 9dd14aeb11e3..9c728cec4f56 100644 --- a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx @@ -57,7 +57,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonHairlinePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonHairlinePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon()); const sal_uInt32 nCount(aPolyPolygon.count()); @@ -80,7 +80,7 @@ namespace drawinglayer } PolyPolygonHairlinePrimitive2D::PolyPolygonHairlinePrimitive2D(const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maPolyPolygon(rPolyPolygon), maBColor(rBColor) { @@ -88,7 +88,7 @@ namespace drawinglayer bool PolyPolygonHairlinePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const PolyPolygonHairlinePrimitive2D& rCompare = (PolyPolygonHairlinePrimitive2D&)rPrimitive; @@ -117,7 +117,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonMarkerPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonMarkerPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon()); const sal_uInt32 nCount(aPolyPolygon.count()); @@ -144,7 +144,7 @@ namespace drawinglayer const basegfx::BColor& rRGBColorA, const basegfx::BColor& rRGBColorB, double fDiscreteDashLength) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maPolyPolygon(rPolyPolygon), maRGBColorA(rRGBColorA), maRGBColorB(rRGBColorB), @@ -154,7 +154,7 @@ namespace drawinglayer bool PolyPolygonMarkerPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const PolyPolygonMarkerPrimitive2D& rCompare = (PolyPolygonMarkerPrimitive2D&)rPrimitive; @@ -185,7 +185,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonStrokePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonStrokePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon()); const sal_uInt32 nCount(aPolyPolygon.count()); @@ -211,7 +211,7 @@ namespace drawinglayer const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maPolyPolygon(rPolyPolygon), maLineAttribute(rLineAttribute), maStrokeAttribute(rStrokeAttribute) @@ -221,7 +221,7 @@ namespace drawinglayer PolyPolygonStrokePrimitive2D::PolyPolygonStrokePrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::LineAttribute& rLineAttribute) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maPolyPolygon(rPolyPolygon), maLineAttribute(rLineAttribute), maStrokeAttribute() @@ -230,7 +230,7 @@ namespace drawinglayer bool PolyPolygonStrokePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const PolyPolygonStrokePrimitive2D& rCompare = (PolyPolygonStrokePrimitive2D&)rPrimitive; @@ -268,7 +268,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonStrokeArrowPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonStrokeArrowPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon()); const sal_uInt32 nCount(aPolyPolygon.count()); @@ -343,7 +343,7 @@ namespace drawinglayer if(getStart().isActive() || getEnd().isActive()) { // use decomposition when line start/end is used - return BasePrimitive2D::getB2DRange(rViewInformation); + return BufDecPrimitive2D::getB2DRange(rViewInformation); } else { @@ -367,7 +367,7 @@ namespace drawinglayer PolyPolygonColorPrimitive2D::PolyPolygonColorPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maPolyPolygon(rPolyPolygon), maBColor(rBColor) { @@ -375,7 +375,7 @@ namespace drawinglayer bool PolyPolygonColorPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const PolyPolygonColorPrimitive2D& rCompare = (PolyPolygonColorPrimitive2D&)rPrimitive; @@ -404,7 +404,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonGradientPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonGradientPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // create SubSequence with FillGradientPrimitive2D const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange()); @@ -451,7 +451,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonHatchPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonHatchPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // create SubSequence with FillHatchPrimitive2D const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange()); @@ -498,7 +498,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonBitmapPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonBitmapPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // create SubSequence with FillBitmapPrimitive2D const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange()); diff --git a/drawinglayer/source/primitive2d/primitivetools2d.cxx b/drawinglayer/source/primitive2d/primitivetools2d.cxx index d288a697d729..2f8a1edcd5c5 100644 --- a/drawinglayer/source/primitive2d/primitivetools2d.cxx +++ b/drawinglayer/source/primitive2d/primitivetools2d.cxx @@ -53,20 +53,20 @@ namespace drawinglayer // get the current DiscreteUnit const double fDiscreteUnit((rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0)).getLength()); - if(getLocalDecomposition().hasElements() && !basegfx::fTools::equal(fDiscreteUnit, getDiscreteUnit())) + if(getLocal2DDecomposition().hasElements() && !basegfx::fTools::equal(fDiscreteUnit, getDiscreteUnit())) { // conditions of last local decomposition have changed, delete - const_cast< DiscreteMetricDependentPrimitive2D* >(this)->setLocalDecomposition(Primitive2DSequence()); + const_cast< DiscreteMetricDependentPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); } - if(!getLocalDecomposition().hasElements()) + if(!getLocal2DDecomposition().hasElements()) { // remember new valid DiscreteUnit const_cast< DiscreteMetricDependentPrimitive2D* >(this)->mfDiscreteUnit = fDiscreteUnit; } // call base implementation - return BasePrimitive2D::get2DDecomposition(rViewInformation); + return BufDecPrimitive2D::get2DDecomposition(rViewInformation); } } // end of namespace primitive2d } // end of namespace drawinglayer @@ -84,20 +84,20 @@ namespace drawinglayer // get the current Viewport const basegfx::B2DRange& rViewport = rViewInformation.getViewport(); - if(getLocalDecomposition().hasElements() && !rViewport.equal(getViewport())) + if(getLocal2DDecomposition().hasElements() && !rViewport.equal(getViewport())) { // conditions of last local decomposition have changed, delete - const_cast< ViewportDependentPrimitive2D* >(this)->setLocalDecomposition(Primitive2DSequence()); + const_cast< ViewportDependentPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); } - if(!getLocalDecomposition().hasElements()) + if(!getLocal2DDecomposition().hasElements()) { // remember new valid DiscreteUnit const_cast< ViewportDependentPrimitive2D* >(this)->maViewport = rViewport; } // call base implementation - return BasePrimitive2D::get2DDecomposition(rViewInformation); + return BufDecPrimitive2D::get2DDecomposition(rViewInformation); } } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx index f52af2da6a6d..ba5f747c2dce 100644 --- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx @@ -158,7 +158,7 @@ namespace drawinglayer } } - Primitive2DSequence ScenePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence ScenePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence aRetval; @@ -298,7 +298,7 @@ namespace drawinglayer const attribute::SdrLightingAttribute& rSdrLightingAttribute, const basegfx::B2DHomMatrix& rObjectTransformation, const geometry::ViewInformation3D& rViewInformation3D) - : BasePrimitive2D(), + : BufDecPrimitive2D(), mxChildren3D(rxChildren3D), maSdrSceneAttribute(rSdrSceneAttribute), maSdrLightingAttribute(rSdrLightingAttribute), @@ -314,7 +314,7 @@ namespace drawinglayer bool ScenePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const ScenePrimitive2D& rCompare = (ScenePrimitive2D&)rPrimitive; @@ -365,7 +365,7 @@ namespace drawinglayer bool bNeedNewDecomposition(false); bool bDiscreteSizesAreCalculated(false); - if(getLocalDecomposition().hasElements()) + if(getLocal2DDecomposition().hasElements()) { basegfx::B2DRange aVisibleDiscreteRange; calculateDsicreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); @@ -392,10 +392,10 @@ namespace drawinglayer if(bNeedNewDecomposition) { // conditions of last local decomposition have changed, delete - const_cast< ScenePrimitive2D* >(this)->setLocalDecomposition(Primitive2DSequence()); + const_cast< ScenePrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); } - if(!getLocalDecomposition().hasElements()) + if(!getLocal2DDecomposition().hasElements()) { if(!bDiscreteSizesAreCalculated) { @@ -411,7 +411,7 @@ namespace drawinglayer } // use parent implementation - return BasePrimitive2D::get2DDecomposition(rViewInformation); + return BufDecPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx index 5681f7f98d7e..e0f987c70958 100644 --- a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx @@ -55,7 +55,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence ShadowPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence ShadowPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx index 94e92a149e50..a78acd6bde31 100644 --- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx @@ -602,7 +602,7 @@ namespace drawinglayer } } - Primitive2DSequence TextDecoratedPortionPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence TextDecoratedPortionPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { std::vector< Primitive2DReference > aNewPrimitives; basegfx::DecomposedB2DHomMatrixContainer aDecTrans(getTextTransform()); @@ -822,10 +822,10 @@ namespace drawinglayer if(bDecoratedIsNeeded) { - // decoration is used, fallback to BasePrimitive2D::getB2DRange which uses + // decoration is used, fallback to BufDecPrimitive2D::getB2DRange which uses // the own local decomposition for computation and thus creates all necessary // geometric objects - return BasePrimitive2D::getB2DRange(rViewInformation); + return BufDecPrimitive2D::getB2DRange(rViewInformation); } else { diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx index c1963f4ba2a4..9d4b01270369 100644 --- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx @@ -50,7 +50,7 @@ namespace drawinglayer { static double fDiscreteSize(1.1); - Primitive2DSequence TextEffectPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence TextEffectPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence aRetval; @@ -216,23 +216,23 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(getLocalDecomposition().hasElements()) + if(getLocal2DDecomposition().hasElements()) { if(maLastObjectToViewTransformation != rViewInformation.getObjectToViewTransformation()) { // conditions of last local decomposition have changed, delete - const_cast< TextEffectPrimitive2D* >(this)->setLocalDecomposition(Primitive2DSequence()); + const_cast< TextEffectPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); } } - if(!getLocalDecomposition().hasElements()) + if(!getLocal2DDecomposition().hasElements()) { // remember ViewRange and ViewTransformation const_cast< TextEffectPrimitive2D* >(this)->maLastObjectToViewTransformation = rViewInformation.getObjectToViewTransformation(); } // use parent implementation - return BasePrimitive2D::get2DDecomposition(rViewInformation); + return BufDecPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx index 7c62c235c21d..e14f3fd714df 100644 --- a/drawinglayer/source/primitive2d/textprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx @@ -181,7 +181,7 @@ namespace drawinglayer } } - Primitive2DSequence TextSimplePortionPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence TextSimplePortionPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; @@ -241,7 +241,7 @@ namespace drawinglayer const FontAttributes& rFontAttributes, const ::com::sun::star::lang::Locale& rLocale, const basegfx::BColor& rFontColor) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTextTransform(rNewTransform), maText(rText), maTextPosition(aTextPosition), @@ -268,7 +268,7 @@ namespace drawinglayer bool TextSimplePortionPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const TextSimplePortionPrimitive2D& rCompare = (TextSimplePortionPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/unifiedalphaprimitive2d.cxx b/drawinglayer/source/primitive2d/unifiedalphaprimitive2d.cxx index 49039e1a6e5c..a17431597356 100644 --- a/drawinglayer/source/primitive2d/unifiedalphaprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/unifiedalphaprimitive2d.cxx @@ -55,7 +55,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence UnifiedAlphaPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence UnifiedAlphaPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { if(0.0 == getAlpha()) { diff --git a/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx b/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx index 93a51d5379b3..756a52ea7d2b 100644 --- a/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx @@ -48,7 +48,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence WrongSpellPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence WrongSpellPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // ATM this decompose is view-independent, what the original VCL-Display is not. To mimic // the old behaviour here if wanted it is necessary to add get2DDecomposition and implement @@ -97,7 +97,7 @@ namespace drawinglayer double fStart, double fStop, const basegfx::BColor& rColor) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransformation(rTransformation), mfStart(fStart), mfStop(fStop), @@ -107,7 +107,7 @@ namespace drawinglayer bool WrongSpellPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const WrongSpellPrimitive2D& rCompare = (WrongSpellPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive3d/baseprimitive3d.cxx b/drawinglayer/source/primitive3d/baseprimitive3d.cxx index 032ae068003b..57a016851af9 100644 --- a/drawinglayer/source/primitive3d/baseprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/baseprimitive3d.cxx @@ -50,20 +50,18 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence BasePrimitive3D::createLocalDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + BasePrimitive3D::BasePrimitive3D() + : BasePrimitive3DImplBase(m_aMutex) { - return Primitive3DSequence(); } - BasePrimitive3D::BasePrimitive3D() - : BasePrimitive3DImplBase(m_aMutex), - maLocalDecomposition() + BasePrimitive3D::~BasePrimitive3D() { } bool BasePrimitive3D::operator==( const BasePrimitive3D& rPrimitive ) const { - return (getPrimitiveID() == rPrimitive.getPrimitiveID()); + return (getPrimitive3DID() == rPrimitive.getPrimitive3DID()); } basegfx::B3DRange BasePrimitive3D::getB3DRange(const geometry::ViewInformation3D& rViewInformation) const @@ -71,17 +69,9 @@ namespace drawinglayer return getB3DRangeFromPrimitive3DSequence(get3DDecomposition(rViewInformation), rViewInformation); } - Primitive3DSequence BasePrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const + Primitive3DSequence BasePrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { - ::osl::MutexGuard aGuard( m_aMutex ); - - if(!getLocalDecomposition().hasElements()) - { - const Primitive3DSequence aNewSequence(createLocalDecomposition(rViewInformation)); - const_cast< BasePrimitive3D* >(this)->setLocalDecomposition(aNewSequence); - } - - return getLocalDecomposition(); + return Primitive3DSequence(); } Primitive3DSequence SAL_CALL BasePrimitive3D::getDecomposition( const uno::Sequence< beans::PropertyValue >& rViewParameters ) throw ( uno::RuntimeException ) @@ -98,6 +88,38 @@ namespace drawinglayer } // end of namespace primitive3d } // end of namespace drawinglayer +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive3d + { + Primitive3DSequence BufDecPrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + { + return Primitive3DSequence(); + } + + BufDecPrimitive3D::BufDecPrimitive3D() + : BasePrimitive3D(), + maLocal3DDecomposition() + { + } + + Primitive3DSequence BufDecPrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const + { + ::osl::MutexGuard aGuard( m_aMutex ); + + if(!getLocal3DDecomposition().hasElements()) + { + const Primitive3DSequence aNewSequence(createLocal3DDecomposition(rViewInformation)); + const_cast< BufDecPrimitive3D* >(this)->setLocal3DDecomposition(aNewSequence); + } + + return getLocal3DDecomposition(); + } + } // end of namespace primitive3d +} // end of namespace drawinglayer + ////////////////////////////////////////////////////////////////////////////// // tooling @@ -113,7 +135,7 @@ namespace drawinglayer if(rCandidate.is()) { // try to get C++ implementation base - const BasePrimitive3D* pCandidate(dynamic_cast< BasePrimitive3D* >(rCandidate.get())); + const BufDecPrimitive3D* pCandidate(dynamic_cast< BufDecPrimitive3D* >(rCandidate.get())); if(pCandidate) { @@ -163,8 +185,8 @@ namespace drawinglayer return true; } - const BasePrimitive3D* pA(dynamic_cast< const BasePrimitive3D* >(rxA.get())); - const BasePrimitive3D* pB(dynamic_cast< const BasePrimitive3D* >(rxB.get())); + const BufDecPrimitive3D* pA(dynamic_cast< const BufDecPrimitive3D* >(rxA.get())); + const BufDecPrimitive3D* pB(dynamic_cast< const BufDecPrimitive3D* >(rxB.get())); const bool bAEqualZero(pA == 0L); if(bAEqualZero != (pB == 0L)) diff --git a/drawinglayer/source/primitive3d/groupprimitive3d.cxx b/drawinglayer/source/primitive3d/groupprimitive3d.cxx index b8ed86ee952a..ae2a6fa8c75a 100644 --- a/drawinglayer/source/primitive3d/groupprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/groupprimitive3d.cxx @@ -50,13 +50,13 @@ namespace drawinglayer namespace primitive3d { /// default: just return children, so all renderers not supporting group will use it's content - Primitive3DSequence GroupPrimitive3D::createLocalDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence GroupPrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { return getChildren(); } GroupPrimitive3D::GroupPrimitive3D( const Primitive3DSequence& rChildren ) - : BasePrimitive3D(), + : BufDecPrimitive3D(), maChildren(rChildren) { } @@ -67,7 +67,7 @@ namespace drawinglayer */ bool GroupPrimitive3D::operator==( const BasePrimitive3D& rPrimitive ) const { - if(BasePrimitive3D::operator==(rPrimitive)) + if(BufDecPrimitive3D::operator==(rPrimitive)) { const GroupPrimitive3D& rCompare = static_cast< const GroupPrimitive3D& >(rPrimitive); diff --git a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx index dd49f99b751c..3e723008148e 100644 --- a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx @@ -59,7 +59,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence HatchTexturePrimitive3D::createLocalDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence HatchTexturePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { Primitive3DSequence aRetval; @@ -76,14 +76,14 @@ namespace drawinglayer if(xReference.is()) { - // try to cast to BasePrimitive2D implementation - const BasePrimitive3D* pBasePrimitive = dynamic_cast< const BasePrimitive3D* >(xReference.get()); + // try to cast to BufDecPrimitive2D implementation + const BufDecPrimitive3D* pBasePrimitive = dynamic_cast< const BufDecPrimitive3D* >(xReference.get()); if(pBasePrimitive) { - // it is a BasePrimitive3D implementation, use getPrimitiveID() call for switch + // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch // not all content is needed, remove transparencies and ModifiedColorPrimitives - switch(pBasePrimitive->getPrimitiveID()) + switch(pBasePrimitive->getPrimitive3DID()) { case PRIMITIVE3D_ID_POLYPOLYGONMATERIALPRIMITIVE3D : { diff --git a/drawinglayer/source/primitive3d/hittestprimitive3d.cxx b/drawinglayer/source/primitive3d/hittestprimitive3d.cxx index 50616ab1548b..9288b3a79219 100644 --- a/drawinglayer/source/primitive3d/hittestprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/hittestprimitive3d.cxx @@ -49,7 +49,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence HitTestPrimitive3D::createLocalDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence HitTestPrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { // return empty sequence return Primitive3DSequence(); diff --git a/drawinglayer/source/primitive3d/polygonprimitive3d.cxx b/drawinglayer/source/primitive3d/polygonprimitive3d.cxx index b89499091dd0..9fba5c97cd93 100644 --- a/drawinglayer/source/primitive3d/polygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygonprimitive3d.cxx @@ -56,7 +56,7 @@ namespace drawinglayer PolygonHairlinePrimitive3D::PolygonHairlinePrimitive3D( const basegfx::B3DPolygon& rPolygon, const basegfx::BColor& rBColor) - : BasePrimitive3D(), + : BufDecPrimitive3D(), maPolygon(rPolygon), maBColor(rBColor) { @@ -64,7 +64,7 @@ namespace drawinglayer bool PolygonHairlinePrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const { - if(BasePrimitive3D::operator==(rPrimitive)) + if(BufDecPrimitive3D::operator==(rPrimitive)) { const PolygonHairlinePrimitive3D& rCompare = (PolygonHairlinePrimitive3D&)rPrimitive; @@ -92,7 +92,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence PolygonStrokePrimitive3D::createLocalDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence PolygonStrokePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { Primitive3DSequence aRetval; @@ -145,7 +145,7 @@ namespace drawinglayer const basegfx::B3DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute) - : BasePrimitive3D(), + : BufDecPrimitive3D(), maPolygon(rPolygon), maLineAttribute(rLineAttribute), maStrokeAttribute(rStrokeAttribute) @@ -155,7 +155,7 @@ namespace drawinglayer PolygonStrokePrimitive3D::PolygonStrokePrimitive3D( const basegfx::B3DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute) - : BasePrimitive3D(), + : BufDecPrimitive3D(), maPolygon(rPolygon), maLineAttribute(rLineAttribute), maStrokeAttribute() @@ -164,7 +164,7 @@ namespace drawinglayer bool PolygonStrokePrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const { - if(BasePrimitive3D::operator==(rPrimitive)) + if(BufDecPrimitive3D::operator==(rPrimitive)) { const PolygonStrokePrimitive3D& rCompare = (PolygonStrokePrimitive3D&)rPrimitive; diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx index 09c4acdcaed5..5ce26203a703 100644 --- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx @@ -178,7 +178,7 @@ namespace drawinglayer { // nSegments is for whole circle, adapt to half circle const sal_uInt32 nVerSeg(nSegments >> 1L); - std::vector< BasePrimitive3D* > aResultVector; + std::vector< BufDecPrimitive3D* > aResultVector; if(nVerSeg) { @@ -196,7 +196,7 @@ namespace drawinglayer { const basegfx::B3DPolygon aPartPolygon(aSphere.getB3DPolygon(a)); const basegfx::B3DPolyPolygon aPartPolyPolygon(aPartPolygon); - BasePrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aPartPolyPolygon, rMaterial, false); + BufDecPrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aPartPolyPolygon, rMaterial, false); aResultVector.push_back(pNew); } } @@ -345,7 +345,7 @@ namespace drawinglayer if(aNewPolygon.count()) { const basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon); - BasePrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aNewPolyPolygon, rMaterial, false); + BufDecPrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aNewPolyPolygon, rMaterial, false); aResultVector.push_back(pNew); } @@ -359,7 +359,7 @@ namespace drawinglayer // create primitive const basegfx::B3DPolyPolygon aMiterPolyPolygon(aMiterPolygon); - BasePrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aMiterPolyPolygon, rMaterial, false); + BufDecPrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aMiterPolyPolygon, rMaterial, false); aResultVector.push_back(pNew); } @@ -417,10 +417,10 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence PolygonTubePrimitive3D::createLocalDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence PolygonTubePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { const sal_uInt32 nPointCount(getB3DPolygon().count()); - std::vector< BasePrimitive3D* > aResultVector; + std::vector< BufDecPrimitive3D* > aResultVector; if(0L != nPointCount) { diff --git a/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx b/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx index f05a85869cbf..a80d757ee4a0 100644 --- a/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx @@ -55,7 +55,7 @@ namespace drawinglayer const basegfx::B3DPolyPolygon& rPolyPolygon, const attribute::MaterialAttribute3D& rMaterial, bool bDoubleSided) - : BasePrimitive3D(), + : BufDecPrimitive3D(), maPolyPolygon(rPolyPolygon), maMaterial(rMaterial), mbDoubleSided(bDoubleSided) @@ -64,7 +64,7 @@ namespace drawinglayer bool PolyPolygonMaterialPrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const { - if(BasePrimitive3D::operator==(rPrimitive)) + if(BufDecPrimitive3D::operator==(rPrimitive)) { const PolyPolygonMaterialPrimitive3D& rCompare = (PolyPolygonMaterialPrimitive3D&)rPrimitive; diff --git a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx index 341d2907a53d..1d5401533e00 100644 --- a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx @@ -56,7 +56,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrCubePrimitive3D::createLocalDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence SdrCubePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { const basegfx::B3DRange aUnitRange(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); Primitive3DSequence aRetval; diff --git a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx index df682ab04e6f..00a53b2f6578 100644 --- a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx +++ b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx @@ -221,7 +221,7 @@ namespace drawinglayer { bool bModulate(::com::sun::star::drawing::TextureMode_MODULATE == aSdr3DObjectAttribute.getTextureMode()); bool bFilter(aSdr3DObjectAttribute.getTextureFilter()); - BasePrimitive3D* pNewTexturePrimitive3D = 0L; + BufDecPrimitive3D* pNewTexturePrimitive3D = 0L; if(rFill.isGradient()) { diff --git a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx index e9ef154c95f3..bc99bab20740 100644 --- a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx @@ -57,7 +57,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrExtrudePrimitive3D::createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const + Primitive3DSequence SdrExtrudePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const { Primitive3DSequence aRetval; @@ -510,14 +510,14 @@ namespace drawinglayer if(getSdr3DObjectAttribute().getReducedLineGeometry()) { if(!mpLastRLGViewInformation || - (getLocalDecomposition().hasElements() + (getLocal3DDecomposition().hasElements() && *mpLastRLGViewInformation != rViewInformation)) { // conditions of last local decomposition with reduced lines have changed. Remember // new one and clear current decompositiopn ::osl::Mutex m_mutex; SdrExtrudePrimitive3D* pThat = const_cast< SdrExtrudePrimitive3D* >(this); - pThat->setLocalDecomposition(Primitive3DSequence()); + pThat->setLocal3DDecomposition(Primitive3DSequence()); delete pThat->mpLastRLGViewInformation; pThat->mpLastRLGViewInformation = new geometry::ViewInformation3D(rViewInformation); } diff --git a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx index 33008e762c0a..852a08642375 100644 --- a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx @@ -57,7 +57,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrLathePrimitive3D::createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const + Primitive3DSequence SdrLathePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const { Primitive3DSequence aRetval; @@ -369,14 +369,14 @@ namespace drawinglayer if(getSdr3DObjectAttribute().getReducedLineGeometry()) { if(!mpLastRLGViewInformation || - (getLocalDecomposition().hasElements() + (getLocal3DDecomposition().hasElements() && *mpLastRLGViewInformation != rViewInformation)) { // conditions of last local decomposition with reduced lines have changed. Remember // new one and clear current decompositiopn ::osl::Mutex m_mutex; SdrLathePrimitive3D* pThat = const_cast< SdrLathePrimitive3D* >(this); - pThat->setLocalDecomposition(Primitive3DSequence()); + pThat->setLocal3DDecomposition(Primitive3DSequence()); delete pThat->mpLastRLGViewInformation; pThat->mpLastRLGViewInformation = new geometry::ViewInformation3D(rViewInformation); } diff --git a/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx index a0813d3202a8..5a12bc35a454 100644 --- a/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrPolyPolygonPrimitive3D::createLocalDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence SdrPolyPolygonPrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { Primitive3DSequence aRetval; diff --git a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx index dc93d0c0f339..dcef40ac3cdc 100644 --- a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx @@ -103,7 +103,7 @@ namespace drawinglayer const basegfx::B2DVector& rTextureSize, const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute, const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute) - : BasePrimitive3D(), + : BufDecPrimitive3D(), maTransform(rTransform), maTextureSize(rTextureSize), maSdrLFSAttribute(rSdrLFSAttribute), @@ -113,7 +113,7 @@ namespace drawinglayer bool SdrPrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const { - if(BasePrimitive3D::operator==(rPrimitive)) + if(BufDecPrimitive3D::operator==(rPrimitive)) { const SdrPrimitive3D& rCompare = static_cast< const SdrPrimitive3D& >(rPrimitive); diff --git a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx index e7149c611dd9..61d14181a8e8 100644 --- a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx @@ -56,7 +56,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrSpherePrimitive3D::createLocalDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence SdrSpherePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { Primitive3DSequence aRetval; const basegfx::B3DRange aUnitRange(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); diff --git a/drawinglayer/source/primitive3d/textureprimitive3d.cxx b/drawinglayer/source/primitive3d/textureprimitive3d.cxx index 3393346d0b2d..b5195811472b 100644 --- a/drawinglayer/source/primitive3d/textureprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/textureprimitive3d.cxx @@ -81,7 +81,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence UnifiedAlphaTexturePrimitive3D::createLocalDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence UnifiedAlphaTexturePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { if(0.0 == getTransparence()) { @@ -135,7 +135,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence GradientTexturePrimitive3D::createLocalDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence GradientTexturePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { return getChildren(); } @@ -175,7 +175,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence BitmapTexturePrimitive3D::createLocalDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence BitmapTexturePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { return getChildren(); } diff --git a/drawinglayer/source/processor2d/baseprocessor2d.cxx b/drawinglayer/source/processor2d/baseprocessor2d.cxx index 76f66b85c9fa..d20eca83fc7e 100644 --- a/drawinglayer/source/processor2d/baseprocessor2d.cxx +++ b/drawinglayer/source/processor2d/baseprocessor2d.cxx @@ -74,12 +74,12 @@ namespace drawinglayer if(xReference.is()) { - // try to cast to BasePrimitive2D implementation - const primitive2d::BasePrimitive2D* pBasePrimitive = dynamic_cast< const primitive2d::BasePrimitive2D* >(xReference.get()); + // try to cast to BufDecPrimitive2D implementation + const primitive2d::BufDecPrimitive2D* pBasePrimitive = dynamic_cast< const primitive2d::BufDecPrimitive2D* >(xReference.get()); if(pBasePrimitive) { - // it is a BasePrimitive2D implementation, use local processor + // it is a BufDecPrimitive2D implementation, use local processor processBasePrimitive2D(*pBasePrimitive); } else diff --git a/drawinglayer/source/processor2d/canvasprocessor.cxx b/drawinglayer/source/processor2d/canvasprocessor.cxx index a60162de6ee0..9285102cbb80 100644 --- a/drawinglayer/source/processor2d/canvasprocessor.cxx +++ b/drawinglayer/source/processor2d/canvasprocessor.cxx @@ -1883,7 +1883,7 @@ namespace drawinglayer const primitive2d::Primitive2DReference xReference(rChildren[0]); const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = dynamic_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(xReference.get()); - if(pPoPoColor && PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D == pPoPoColor->getPrimitiveID()) + if(pPoPoColor && PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D == pPoPoColor->getPrimitive2DID()) { // direct draw of PolyPolygon with color and transparence const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(pPoPoColor->getBColor())); @@ -1922,7 +1922,7 @@ namespace drawinglayer void canvasProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) { - switch(rCandidate.getPrimitiveID()) + switch(rCandidate.getPrimitive2DID()) { case PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D : { diff --git a/drawinglayer/source/processor2d/contourextractor2d.cxx b/drawinglayer/source/processor2d/contourextractor2d.cxx index b7931aed5c27..2813b8081584 100644 --- a/drawinglayer/source/processor2d/contourextractor2d.cxx +++ b/drawinglayer/source/processor2d/contourextractor2d.cxx @@ -70,7 +70,7 @@ namespace drawinglayer void ContourExtractor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) { - switch(rCandidate.getPrimitiveID()) + switch(rCandidate.getPrimitive2DID()) { case PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D : { diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx index 8a2d732cbb2f..808ea70155a9 100644 --- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx +++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx @@ -172,7 +172,7 @@ namespace drawinglayer return; } - switch(rCandidate.getPrimitiveID()) + switch(rCandidate.getPrimitive2DID()) { case PRIMITIVE2D_ID_TRANSFORMPRIMITIVE2D : { diff --git a/drawinglayer/source/processor2d/linegeometryextractor2d.cxx b/drawinglayer/source/processor2d/linegeometryextractor2d.cxx index 5f0ab63ee1b3..cc474b7c0736 100644 --- a/drawinglayer/source/processor2d/linegeometryextractor2d.cxx +++ b/drawinglayer/source/processor2d/linegeometryextractor2d.cxx @@ -66,7 +66,7 @@ namespace drawinglayer void LineGeometryExtractor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) { - switch(rCandidate.getPrimitiveID()) + switch(rCandidate.getPrimitive2DID()) { case PRIMITIVE2D_ID_POLYGONSTROKEPRIMITIVE2D : case PRIMITIVE2D_ID_POLYGONSTROKEARROWPRIMITIVE2D : diff --git a/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx b/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx index 9358c7f39c57..ce53d1e86399 100644 --- a/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx +++ b/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx @@ -51,7 +51,7 @@ namespace drawinglayer { void TextAsPolygonExtractor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) { - switch(rCandidate.getPrimitiveID()) + switch(rCandidate.getPrimitive2DID()) { case PRIMITIVE2D_ID_TEXTDECORATEDPORTIONPRIMITIVE2D : { diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 24f54d3ddc58..fb252d4676e7 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -589,7 +589,7 @@ namespace drawinglayer void VclMetafileProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) { - switch(rCandidate.getPrimitiveID()) + switch(rCandidate.getPrimitive2DID()) { case PRIMITIVE2D_ID_WRONGSPELLPRIMITIVE2D : { @@ -1453,7 +1453,7 @@ namespace drawinglayer // PolyPolygonGradientPrimitive2D, PolyPolygonHatchPrimitive2D and // PolyPolygonBitmapPrimitive2D are derived from PolyPolygonColorPrimitive2D. // Check also for correct ID to exclude derived implementations - if(pPoPoColor && PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D == pPoPoColor->getPrimitiveID()) + if(pPoPoColor && PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D == pPoPoColor->getPrimitive2DID()) { // single transparent PolyPolygon identified, use directly const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(pPoPoColor->getBColor())); @@ -1561,7 +1561,7 @@ namespace drawinglayer } // Check also for correct ID to exclude derived implementations - if(pFiGradient && PRIMITIVE2D_ID_FILLGRADIENTPRIMITIVE2D == pFiGradient->getPrimitiveID()) + if(pFiGradient && PRIMITIVE2D_ID_FILLGRADIENTPRIMITIVE2D == pFiGradient->getPrimitive2DID()) { // various content, create content-metafile GDIMetaFile aContentMetafile; diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 8e2f89bb82a6..549e44ece967 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -111,7 +111,7 @@ namespace drawinglayer void VclPixelProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) { - switch(rCandidate.getPrimitiveID()) + switch(rCandidate.getPrimitive2DID()) { case PRIMITIVE2D_ID_WRONGSPELLPRIMITIVE2D : { @@ -274,7 +274,7 @@ namespace drawinglayer const primitive2d::Primitive2DReference xReference(rContent[0]); const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = dynamic_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(xReference.get()); - if(pPoPoColor && PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D == pPoPoColor->getPrimitiveID()) + if(pPoPoColor && PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D == pPoPoColor->getPrimitive2DID()) { // single transparent PolyPolygon identified, use directly const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(pPoPoColor->getBColor())); diff --git a/drawinglayer/source/processor3d/baseprocessor3d.cxx b/drawinglayer/source/processor3d/baseprocessor3d.cxx index 7d630f2522be..532b792379a2 100644 --- a/drawinglayer/source/processor3d/baseprocessor3d.cxx +++ b/drawinglayer/source/processor3d/baseprocessor3d.cxx @@ -74,8 +74,8 @@ namespace drawinglayer if(xReference.is()) { - // try to cast to BasePrimitive3D implementation - const primitive3d::BasePrimitive3D* pBasePrimitive = dynamic_cast< const primitive3d::BasePrimitive3D* >(xReference.get()); + // try to cast to BufDecPrimitive3D implementation + const primitive3d::BufDecPrimitive3D* pBasePrimitive = dynamic_cast< const primitive3d::BufDecPrimitive3D* >(xReference.get()); if(pBasePrimitive) { diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx index d9194ca4b5eb..d5658b966fe8 100644 --- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx +++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx @@ -468,8 +468,8 @@ namespace drawinglayer void DefaultProcessor3D::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rBasePrimitive) { - // it is a BasePrimitive3D implementation, use getPrimitiveID() call for switch - switch(rBasePrimitive.getPrimitiveID()) + // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + switch(rBasePrimitive.getPrimitive3DID()) { case PRIMITIVE3D_ID_GRADIENTTEXTUREPRIMITIVE3D : { diff --git a/drawinglayer/source/processor3d/geometry2dextractor.cxx b/drawinglayer/source/processor3d/geometry2dextractor.cxx index 8c19a4a2e3b8..c2e1c73b5181 100644 --- a/drawinglayer/source/processor3d/geometry2dextractor.cxx +++ b/drawinglayer/source/processor3d/geometry2dextractor.cxx @@ -62,8 +62,8 @@ namespace drawinglayer // virtual render method when the primitive implementation is BasePrimitive3D-based. void Geometry2DExtractingProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) { - // it is a BasePrimitive3D implementation, use getPrimitiveID() call for switch - switch(rCandidate.getPrimitiveID()) + // it is a BasePrimitive3D implementation, use getPrimitive3DID() call for switch + switch(rCandidate.getPrimitive3DID()) { case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D : { diff --git a/drawinglayer/source/processor3d/shadow3dextractor.cxx b/drawinglayer/source/processor3d/shadow3dextractor.cxx index 66d3c073854f..166620666300 100644 --- a/drawinglayer/source/processor3d/shadow3dextractor.cxx +++ b/drawinglayer/source/processor3d/shadow3dextractor.cxx @@ -60,11 +60,11 @@ namespace drawinglayer namespace processor3d { // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BasePrimitive3D-based. + // virtual render method when the primitive implementation is BufDecPrimitive3D-based. void Shadow3DExtractingProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) { - // it is a BasePrimitive3D implementation, use getPrimitiveID() call for switch - switch(rCandidate.getPrimitiveID()) + // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + switch(rCandidate.getPrimitive3DID()) { case PRIMITIVE3D_ID_SHADOWPRIMITIVE3D : { diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx index b5a59e10a119..f8f1056fbaac 100644 --- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx +++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx @@ -486,8 +486,8 @@ namespace drawinglayer // the processing method for a single, known primitive void ZBufferProcessor3D::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rBasePrimitive) { - // it is a BasePrimitive3D implementation, use getPrimitiveID() call for switch - switch(rBasePrimitive.getPrimitiveID()) + // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + switch(rBasePrimitive.getPrimitive3DID()) { case PRIMITIVE3D_ID_ALPHATEXTUREPRIMITIVE3D : { diff --git a/svx/inc/svx/sdr/overlay/overlaytools.hxx b/svx/inc/svx/sdr/overlay/overlaytools.hxx index d9a1b34dd8f6..f02cf44297f9 100644 --- a/svx/inc/svx/sdr/overlay/overlaytools.hxx +++ b/svx/inc/svx/sdr/overlay/overlaytools.hxx @@ -58,7 +58,7 @@ namespace drawinglayer sal_uInt16 mnCenterY; protected: - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: OverlayBitmapExPrimitive( @@ -99,7 +99,7 @@ namespace drawinglayer double mfDiscreteDashLength; protected: - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: OverlayCrosshairPrimitive( @@ -148,7 +148,7 @@ namespace drawinglayer double mfRotation; protected: - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: OverlayHatchRectanglePrimitive( @@ -206,7 +206,7 @@ namespace drawinglayer double mfDiscreteDashLength; protected: - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: OverlayHelplineStripedPrimitive( @@ -251,7 +251,7 @@ namespace drawinglayer double mfDiscreteDashLength; protected: - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: OverlayRollingRectanglePrimitive( diff --git a/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx index 01bb7794e9f3..d7beffc7cd8c 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrCaptionPrimitive2D : public BasePrimitive2D + class SdrCaptionPrimitive2D : public BufDecPrimitive2D { private: ::basegfx::B2DHomMatrix maTransform; @@ -57,7 +57,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrCaptionPrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx index ba7cc7fed9c8..a6bf4b9b090e 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx @@ -45,7 +45,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrConnectorPrimitive2D : public BasePrimitive2D + class SdrConnectorPrimitive2D : public BufDecPrimitive2D { private: attribute::SdrLineShadowTextAttribute maSdrLSTAttribute; @@ -53,7 +53,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrConnectorPrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx index a29ecb890df6..aeb435f57a48 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx @@ -45,7 +45,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrCustomShapePrimitive2D : public BasePrimitive2D + class SdrCustomShapePrimitive2D : public BufDecPrimitive2D { private: attribute::SdrShadowTextAttribute maSdrSTAttribute; @@ -59,7 +59,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrCustomShapePrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx index 1ef6d0864a3a..a274bd3cc77b 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx @@ -45,7 +45,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrEllipsePrimitive2D : public BasePrimitive2D + class SdrEllipsePrimitive2D : public BufDecPrimitive2D { private: ::basegfx::B2DHomMatrix maTransform; @@ -53,7 +53,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrEllipsePrimitive2D( @@ -91,7 +91,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrEllipseSegmentPrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx index df2114437015..3735598179a7 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrGrafPrimitive2D : public BasePrimitive2D + class SdrGrafPrimitive2D : public BufDecPrimitive2D { private: ::basegfx::B2DHomMatrix maTransform; @@ -57,7 +57,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrGrafPrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx index 1e68a61432a0..6b50b82e82e6 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx @@ -59,7 +59,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrMeasurePrimitive2D : public BasePrimitive2D + class SdrMeasurePrimitive2D : public BufDecPrimitive2D { private: attribute::SdrLineShadowTextAttribute maSdrLSTAttribute; @@ -88,7 +88,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrMeasurePrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx index 7c7081720034..ff0b0e75b6a4 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx @@ -54,7 +54,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrOle2Primitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx index 70e28d599a44..93d674b34fcf 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrOleContentPrimitive2D : public BasePrimitive2D + class SdrOleContentPrimitive2D : public BufDecPrimitive2D { private: SdrObjectWeakRef mpSdrOle2Obj; @@ -58,7 +58,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrOleContentPrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx index 97b12b72d4a5..744b512a3efa 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrPathPrimitive2D : public BasePrimitive2D + class SdrPathPrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DHomMatrix maTransform; @@ -55,7 +55,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrPathPrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx index 650cc1a882c5..316840ecedfc 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrRectanglePrimitive2D : public BasePrimitive2D + class SdrRectanglePrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DHomMatrix maTransform; @@ -61,7 +61,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrRectanglePrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx index 6dd60b45d2d5..5f1cf3ebf251 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx @@ -51,7 +51,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrTextPrimitive2D : public BasePrimitive2D + class SdrTextPrimitive2D : public BufDecPrimitive2D { private: // The text model data; this sould later just be the OutlinerParaObject or @@ -138,7 +138,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrContourTextPrimitive2D( @@ -180,7 +180,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrPathTextPrimitive2D( @@ -224,7 +224,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrBlockTextPrimitive2D( @@ -267,7 +267,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrStretchTextPrimitive2D( diff --git a/svx/source/engine3d/helperhittest3d.cxx b/svx/source/engine3d/helperhittest3d.cxx index 821c0ba07c32..c2729e95dc93 100644 --- a/svx/source/engine3d/helperhittest3d.cxx +++ b/svx/source/engine3d/helperhittest3d.cxx @@ -100,7 +100,7 @@ namespace drawinglayer basegfx::B3DHomMatrix maCombinedTransform; // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BasePrimitive3D-based. + // virtual render method when the primitive implementation is BufDecPrimitive3D-based. virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); public: @@ -120,8 +120,8 @@ namespace drawinglayer void CutFindProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) { - // it is a BasePrimitive3D implementation, use getPrimitiveID() call for switch - switch(rCandidate.getPrimitiveID()) + // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + switch(rCandidate.getPrimitive3DID()) { case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D : { diff --git a/svx/source/engine3d/helperminimaldepth3d.cxx b/svx/source/engine3d/helperminimaldepth3d.cxx index 85ba97f1a826..965343009b21 100644 --- a/svx/source/engine3d/helperminimaldepth3d.cxx +++ b/svx/source/engine3d/helperminimaldepth3d.cxx @@ -55,7 +55,7 @@ namespace drawinglayer double mfMinimalDepth; // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BasePrimitive3D-based. + // virtual render method when the primitive implementation is BufDecPrimitive3D-based. virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); public: @@ -70,8 +70,8 @@ namespace drawinglayer void MinimalDephInViewExtractor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) { - // it is a BasePrimitive3D implementation, use getPrimitiveID() call for switch - switch(rCandidate.getPrimitiveID()) + // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + switch(rCandidate.getPrimitive3DID()) { case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D : { diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx index 309e554b0329..381b86f0f4c5 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx @@ -164,7 +164,7 @@ namespace sdr const sal_uInt32 nYDist(((SdrShadowYDistItem&)(rItemSet.Get(SDRATTR_SHADOWYDIST))).GetValue()); aObjectMatrix.translate(nXDist, nYDist); - // create unit outline polygon as geometry (see SdrCaptionPrimitive2D::createLocalDecomposition) + // create unit outline polygon as geometry (see SdrCaptionPrimitive2D::createLocal2DDecomposition) basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0), fCornerRadiusX, fCornerRadiusY)); // create the specialized shadow primitive diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx index af222889a253..57f8afb08a05 100644 --- a/svx/source/sdr/contact/viewobjectcontact.cxx +++ b/svx/source/sdr/contact/viewobjectcontact.cxx @@ -78,7 +78,7 @@ namespace unsigned mbGraphicAnimationAllowed : 1; // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BasePrimitive2D-based. + // virtual render method when the primitive implementation is BufDecPrimitive2D-based. virtual void processBasePrimitive2D(const drawinglayer::primitive2d::BasePrimitive2D& rCandidate); public: @@ -112,7 +112,7 @@ namespace void AnimatedExtractingProcessor2D::processBasePrimitive2D(const drawinglayer::primitive2d::BasePrimitive2D& rCandidate) { // known implementation, access directly - switch(rCandidate.getPrimitiveID()) + switch(rCandidate.getPrimitive2DID()) { // add and accept animated primitives directly, no need to decompose case PRIMITIVE2D_ID_ANIMATEDSWITCHPRIMITIVE2D : diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx index 34fddf088c98..cb410cb7ef5f 100644 --- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx @@ -153,7 +153,7 @@ namespace sdr // would be possible, but would require the internal transformation // which maps between the page visualisation object and the page // content, including the aspect ratios (for details see in - // PagePreviewPrimitive2D::createLocalDecomposition) + // PagePreviewPrimitive2D::createLocal2DDecomposition) basegfx::B2DRange(), GetXDrawPageForSdrPage(const_cast< SdrPage* >(pStartPage)), diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 92003865fde0..37ae3200d338 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -778,10 +778,10 @@ namespace sdr { namespace contact { //==================================================================== //= LazyControlCreationPrimitive2D //==================================================================== - class LazyControlCreationPrimitive2D : public ::drawinglayer::primitive2d::BasePrimitive2D + class LazyControlCreationPrimitive2D : public ::drawinglayer::primitive2d::BufDecPrimitive2D { private: - typedef ::drawinglayer::primitive2d::BasePrimitive2D BasePrimitive2D; + typedef ::drawinglayer::primitive2d::BufDecPrimitive2D BufDecPrimitive2D; protected: virtual ::drawinglayer::primitive2d::Primitive2DSequence @@ -790,7 +790,7 @@ namespace sdr { namespace contact { ) const; virtual ::drawinglayer::primitive2d::Primitive2DSequence - createLocalDecomposition( + createLocal2DDecomposition( const ::drawinglayer::geometry::ViewInformation2D& rViewInformation ) const; @@ -1432,7 +1432,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- bool LazyControlCreationPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if ( !BasePrimitive2D::operator==( rPrimitive ) ) + if ( !BufDecPrimitive2D::operator==( rPrimitive ) ) return false; const LazyControlCreationPrimitive2D* pRHS = dynamic_cast< const LazyControlCreationPrimitive2D* >( &rPrimitive ); @@ -1482,11 +1482,11 @@ namespace sdr { namespace contact { { if ( m_pVOCImpl->hasControl() ) m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() ); - return BasePrimitive2D::get2DDecomposition( _rViewInformation ); + return BufDecPrimitive2D::get2DDecomposition( _rViewInformation ); } //-------------------------------------------------------------------- - ::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::createLocalDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const + ::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::createLocal2DDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const { // force control here to make it a VCL ChildWindow. Will be fetched // and used below by getExistentControl() diff --git a/svx/source/sdr/overlay/overlaytools.cxx b/svx/source/sdr/overlay/overlaytools.cxx index 664c487c7e43..7abb56785666 100644 --- a/svx/source/sdr/overlay/overlaytools.cxx +++ b/svx/source/sdr/overlay/overlaytools.cxx @@ -59,7 +59,7 @@ namespace drawinglayer mnCenterY(nCenterY) {} - Primitive2DSequence OverlayBitmapExPrimitive::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence OverlayBitmapExPrimitive::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; const Size aBitmapSize(getBitmapEx().GetSizePixel()); @@ -129,7 +129,7 @@ namespace drawinglayer mfDiscreteDashLength(fDiscreteDashLength) {} - Primitive2DSequence OverlayCrosshairPrimitive::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence OverlayCrosshairPrimitive::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // use the prepared Viewport information accessible using getViewport() Primitive2DSequence aRetval; @@ -208,7 +208,7 @@ namespace drawinglayer mfRotation(fRotation) {} - Primitive2DSequence OverlayHatchRectanglePrimitive::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence OverlayHatchRectanglePrimitive::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; @@ -301,7 +301,7 @@ namespace drawinglayer mfDiscreteDashLength(fDiscreteDashLength) {} - Primitive2DSequence OverlayHelplineStripedPrimitive::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence OverlayHelplineStripedPrimitive::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { // use the prepared Viewport information accessible using getViewport() Primitive2DSequence aRetval; @@ -417,7 +417,7 @@ namespace drawinglayer mfDiscreteDashLength(fDiscreteDashLength) {} - Primitive2DSequence OverlayRollingRectanglePrimitive::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence OverlayRollingRectanglePrimitive::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // use the prepared Viewport information accessible using getViewport() Primitive2DSequence aRetval; diff --git a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx index 3c8feb7ff2b2..41016688ee54 100644 --- a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrCaptionPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrCaptionPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; Primitive2DSequence aHitTestContent; @@ -141,7 +141,7 @@ namespace drawinglayer const basegfx::B2DPolygon& rTail, double fCornerRadiusX, double fCornerRadiusY) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransform(rTransform), maSdrLFSTAttribute(rSdrLFSTAttribute), maTail(rTail), @@ -159,7 +159,7 @@ namespace drawinglayer bool SdrCaptionPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const SdrCaptionPrimitive2D& rCompare = (SdrCaptionPrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx index 0edbe1a35046..96f476315efa 100644 --- a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrConnectorPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrConnectorPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; @@ -87,7 +87,7 @@ namespace drawinglayer SdrConnectorPrimitive2D::SdrConnectorPrimitive2D( const attribute::SdrLineShadowTextAttribute& rSdrLSTAttribute, const ::basegfx::B2DPolygon& rUnitPolygon) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maSdrLSTAttribute(rSdrLSTAttribute), maUnitPolygon(rUnitPolygon) { @@ -95,7 +95,7 @@ namespace drawinglayer bool SdrConnectorPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const SdrConnectorPrimitive2D& rCompare = (SdrConnectorPrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx index c8847624bcdd..bc7e13f8afe2 100644 --- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrCustomShapePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrCustomShapePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval(getSubPrimitives()); @@ -73,7 +73,7 @@ namespace drawinglayer const Primitive2DSequence& rSubPrimitives, const basegfx::B2DHomMatrix& rTextBox, bool bWordWrap) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maSdrSTAttribute(rSdrSTAttribute), maSubPrimitives(rSubPrimitives), maTextBox(rTextBox), @@ -83,7 +83,7 @@ namespace drawinglayer bool SdrCustomShapePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const SdrCustomShapePrimitive2D& rCompare = (SdrCustomShapePrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 9666bd2c1ac1..4140373c8e86 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -75,7 +75,7 @@ namespace drawinglayer // prepare fully scaled polygon basegfx::B2DPolyPolygon aScaledPolyPolygon(rUnitPolyPolygon); aScaledPolyPolygon.transform(rObjectTransform); - BasePrimitive2D* pNewFillPrimitive = 0L; + BufDecPrimitive2D* pNewFillPrimitive = 0L; if(rFill.isGradient()) { @@ -137,7 +137,7 @@ namespace drawinglayer // create line and stroke attribute const attribute::LineAttribute aLineAttribute(rLine.getColor(), rLine.getWidth(), rLine.getJoin()); const attribute::StrokeAttribute aStrokeAttribute(rLine.getDotDashArray(), rLine.getFullDotDashLen()); - BasePrimitive2D* pNewLinePrimitive = 0L; + BufDecPrimitive2D* pNewLinePrimitive = 0L; if(!rUnitPolygon.isClosed() && pStroke) { diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx index ed3062184f1a..674eaa0ea9c2 100644 --- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx @@ -50,7 +50,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrEllipsePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrEllipsePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; @@ -109,7 +109,7 @@ namespace drawinglayer SdrEllipsePrimitive2D::SdrEllipsePrimitive2D( const ::basegfx::B2DHomMatrix& rTransform, const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransform(rTransform), maSdrLFSTAttribute(rSdrLFSTAttribute) { @@ -117,7 +117,7 @@ namespace drawinglayer bool SdrEllipsePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const SdrEllipsePrimitive2D& rCompare = (SdrEllipsePrimitive2D&)rPrimitive; @@ -140,7 +140,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrEllipseSegmentPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrEllipseSegmentPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx index f5f2f4e876dc..2ffc70d5ebc7 100644 --- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx @@ -44,7 +44,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrGrafPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrGrafPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; @@ -121,7 +121,7 @@ namespace drawinglayer const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, const GraphicObject& rGraphicObject, const GraphicAttr& rGraphicAttr) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransform(rTransform), maSdrLFSTAttribute(rSdrLFSTAttribute), maGraphicObject(rGraphicObject), @@ -133,7 +133,7 @@ namespace drawinglayer bool SdrGrafPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const SdrGrafPrimitive2D& rCompare = (SdrGrafPrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index f515b9b6a5e9..5b4a69f4a548 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -83,7 +83,7 @@ namespace drawinglayer return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), &aLineStartEnd); } - Primitive2DSequence SdrMeasurePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const + Primitive2DSequence SdrMeasurePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; SdrBlockTextPrimitive2D* pBlockText = 0L; @@ -424,7 +424,7 @@ namespace drawinglayer // apply to existing text primitive SdrTextPrimitive2D* pNewBlockText = pBlockText->createTransformedClone(aChange); - OSL_ENSURE(pNewBlockText, "SdrMeasurePrimitive2D::createLocalDecomposition: Could not create transformed clone of text primitive (!)"); + OSL_ENSURE(pNewBlockText, "SdrMeasurePrimitive2D::createLocal2DDecomposition: Could not create transformed clone of text primitive (!)"); delete pBlockText; // add to local primitives @@ -454,7 +454,7 @@ namespace drawinglayer bool bBelow, bool bTextRotation, bool bTextAutoAngle) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maSdrLSTAttribute(rSdrLSTAttribute), maStart(rStart), maEnd(rEnd), @@ -473,7 +473,7 @@ namespace drawinglayer bool SdrMeasurePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const SdrMeasurePrimitive2D& rCompare = (SdrMeasurePrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx index ab5d23962719..7e96ef32772e 100644 --- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx @@ -46,9 +46,9 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrOle2Primitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrOle2Primitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { - // to take care of getSdrLFSTAttribute() later, the same as in SdrGrafPrimitive2D::createLocalDecomposition + // to take care of getSdrLFSTAttribute() later, the same as in SdrGrafPrimitive2D::createLocal2DDecomposition // should happen. For the moment we only need the OLE itself // Added complete primitive preparation using getSdrLFSTAttribute() now. To not do stuff which is not needed now, it // may be supressed by using a static bool. The paint version only supported text. diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx index 67fee9215b73..97468bc6da2f 100644 --- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrOleContentPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrOleContentPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; const SdrOle2Obj* pSource = (mpSdrOle2Obj.is() ? static_cast< SdrOle2Obj* >(mpSdrOle2Obj.get()) : 0); @@ -158,7 +158,7 @@ namespace drawinglayer const SdrOle2Obj& rSdrOle2Obj, const basegfx::B2DHomMatrix& rObjectTransform, bool bHighContrast) - : BasePrimitive2D(), + : BufDecPrimitive2D(), mpSdrOle2Obj(const_cast< SdrOle2Obj* >(&rSdrOle2Obj)), maObjectTransform(rObjectTransform), mbHighContrast(bHighContrast) @@ -167,7 +167,7 @@ namespace drawinglayer bool SdrOleContentPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const SdrOleContentPrimitive2D& rCompare = (SdrOleContentPrimitive2D&)rPrimitive; const bool bBothNot(!mpSdrOle2Obj.is() && !rCompare.mpSdrOle2Obj.is()); diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx index 91ed0bd2adce..5174cad712e8 100644 --- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrPathPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrPathPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; @@ -105,7 +105,7 @@ namespace drawinglayer const basegfx::B2DHomMatrix& rTransform, const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, const basegfx::B2DPolyPolygon& rUnitPolyPolygon) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransform(rTransform), maSdrLFSTAttribute(rSdrLFSTAttribute), maUnitPolyPolygon(rUnitPolyPolygon) @@ -114,7 +114,7 @@ namespace drawinglayer bool SdrPathPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const SdrPathPrimitive2D& rCompare = (SdrPathPrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx index 64ac716b40e9..2f91466d1d2f 100644 --- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrRectanglePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrRectanglePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; Primitive2DSequence aHitTestContent; @@ -128,7 +128,7 @@ namespace drawinglayer double fCornerRadiusX, double fCornerRadiusY, bool bTextFrame) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransform(rTransform), maSdrLFSTAttribute(rSdrLFSTAttribute), mfCornerRadiusX(fCornerRadiusX), @@ -139,7 +139,7 @@ namespace drawinglayer bool SdrRectanglePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const SdrRectanglePrimitive2D& rCompare = (SdrRectanglePrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index 0cad266f69d1..08944592f028 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -109,7 +109,7 @@ namespace drawinglayer SdrTextPrimitive2D::SdrTextPrimitive2D( const SdrText* pSdrText, const OutlinerParaObject& rOutlinerParaObject) - : BasePrimitive2D(), + : BufDecPrimitive2D(), mrSdrText(const_cast< SdrText* >(pSdrText)), maOutlinerParaObject(rOutlinerParaObject), mxLastVisualizingPage(), @@ -133,7 +133,7 @@ namespace drawinglayer bool SdrTextPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const SdrTextPrimitive2D& rCompare = (SdrTextPrimitive2D&)rPrimitive; @@ -155,7 +155,7 @@ namespace drawinglayer sal_Int16 nCurrentlyValidPageNumber(0); sal_Int16 nCurrentlyValidPageCount(0); - if(getLocalDecomposition().hasElements()) + if(getLocal2DDecomposition().hasElements()) { bool bDoDelete(getLastSpellCheck() != bCurrentSpellCheck); @@ -209,11 +209,11 @@ namespace drawinglayer if(bDoDelete) { - const_cast< SdrTextPrimitive2D* >(this)->setLocalDecomposition(Primitive2DSequence()); + const_cast< SdrTextPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); } } - if(!getLocalDecomposition().hasElements()) + if(!getLocal2DDecomposition().hasElements()) { if(!bCurrentlyVisualizingPageIsSet && mbContainsPageField) { @@ -244,7 +244,7 @@ namespace drawinglayer } // call parent - return BasePrimitive2D::get2DDecomposition(rViewInformation); + return BufDecPrimitive2D::get2DDecomposition(rViewInformation); } } // end of namespace primitive2d } // end of namespace drawinglayer @@ -255,7 +255,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrContourTextPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const + Primitive2DSequence SdrContourTextPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; const bool bCurrentSpellCheck(getSdrText() @@ -316,7 +316,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrPathTextPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const + Primitive2DSequence SdrPathTextPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; const bool bCurrentSpellCheck(getSdrText() @@ -380,7 +380,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrBlockTextPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const + Primitive2DSequence SdrBlockTextPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; const bool bCurrentSpellCheck(getSdrText() @@ -449,7 +449,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrStretchTextPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const + Primitive2DSequence SdrStretchTextPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; const bool bCurrentSpellCheck(getSdrText() diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 76c29de8d480..484bca5157c4 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -66,7 +66,7 @@ namespace { - drawinglayer::primitive2d::Primitive2DSequence impConvertVectorToPrimitive2DSequence(const std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rPrimitiveVector) + drawinglayer::primitive2d::Primitive2DSequence impConvertVectorToPrimitive2DSequence(const std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* >& rPrimitiveVector) { const sal_Int32 nCount(rPrimitiveVector.size()); drawinglayer::primitive2d::Primitive2DSequence aRetval(nCount); @@ -108,9 +108,9 @@ namespace class impTextBreakupHandler { private: - std::vector< drawinglayer::primitive2d::BasePrimitive2D* > maTextPortionPrimitives; - std::vector< drawinglayer::primitive2d::BasePrimitive2D* > maLinePrimitives; - std::vector< drawinglayer::primitive2d::BasePrimitive2D* > maParagraphPrimitives; + std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* > maTextPortionPrimitives; + std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* > maLinePrimitives; + std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* > maParagraphPrimitives; SdrOutliner& mrOutliner; basegfx::B2DHomMatrix maNewTransformA; @@ -129,7 +129,7 @@ namespace bool impIsUnderlineAbove(const Font& rFont) const; void impCreateTextPortionPrimitive(const DrawPortionInfo& rInfo); - drawinglayer::primitive2d::BasePrimitive2D* impCheckFieldPrimitive(drawinglayer::primitive2d::BasePrimitive2D* pPrimitive, const DrawPortionInfo& rInfo) const; + drawinglayer::primitive2d::BufDecPrimitive2D* impCheckFieldPrimitive(drawinglayer::primitive2d::BufDecPrimitive2D* pPrimitive, const DrawPortionInfo& rInfo) const; void impFlushTextPortionPrimitivesToLinePrimitives(); void impFlushLinePrimitivesToParagraphPrimitives(); void impHandleDrawPortionInfo(const DrawPortionInfo& rInfo); @@ -288,7 +288,7 @@ namespace const basegfx::BColor aBFontColor(aFontColor.getBColor()); // prepare new primitive - drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = 0; + drawinglayer::primitive2d::BufDecPrimitive2D* pNewPrimitive = 0; const bool bDecoratedIsNeeded( UNDERLINE_NONE != rInfo.mrFont.GetOverline() || UNDERLINE_NONE != rInfo.mrFont.GetUnderline() @@ -467,7 +467,7 @@ namespace } } - drawinglayer::primitive2d::BasePrimitive2D* impTextBreakupHandler::impCheckFieldPrimitive(drawinglayer::primitive2d::BasePrimitive2D* pPrimitive, const DrawPortionInfo& rInfo) const + drawinglayer::primitive2d::BufDecPrimitive2D* impTextBreakupHandler::impCheckFieldPrimitive(drawinglayer::primitive2d::BufDecPrimitive2D* pPrimitive, const DrawPortionInfo& rInfo) const { if(rInfo.mpFieldData) { @@ -566,7 +566,7 @@ namespace // embed in TextHierarchyBulletPrimitive2D const drawinglayer::primitive2d::Primitive2DSequence aNewSequence(&aNewReference, 1); - drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = new drawinglayer::primitive2d::TextHierarchyBulletPrimitive2D(aNewSequence); + drawinglayer::primitive2d::BufDecPrimitive2D* pNewPrimitive = new drawinglayer::primitive2d::TextHierarchyBulletPrimitive2D(aNewSequence); // add to output maTextPortionPrimitives.push_back(pNewPrimitive); diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index f3bdeeb4811c..68c16ecf3007 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -231,8 +231,8 @@ namespace class impPolygonParagraphHandler { const drawinglayer::attribute::SdrFormTextAttribute& mrSdrFormTextAttribute; // FormText parameters - std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& mrDecomposition; // destination primitive list - std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& mrShadowDecomposition; // destination primitive list for shadow + std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* >& mrDecomposition; // destination primitive list + std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* >& mrShadowDecomposition; // destination primitive list for shadow Reference < com::sun::star::i18n::XBreakIterator > mxBreak; // break iterator double getParagraphTextLength(const ::std::vector< const impPathTextPortion* >& rTextPortions) @@ -271,8 +271,8 @@ namespace public: impPolygonParagraphHandler( const drawinglayer::attribute::SdrFormTextAttribute& rSdrFormTextAttribute, - std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rDecomposition, - std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rShadowDecomposition) + std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* >& rDecomposition, + std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* >& rShadowDecomposition) : mrSdrFormTextAttribute(rSdrFormTextAttribute), mrDecomposition(rDecomposition), mrShadowDecomposition(rShadowDecomposition) @@ -571,7 +571,7 @@ namespace const basegfx::B2DHomMatrix& rTransform, const drawinglayer::attribute::LineAttribute& rLineAttribute, const drawinglayer::attribute::StrokeAttribute& rStrokeAttribute, - std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rTarget) + std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* >& rTarget) { for(basegfx::B2DPolyPolygonVector::const_iterator aPolygon(rB2DPolyPolyVector.begin()); aPolygon != rB2DPolyPolyVector.end(); aPolygon++) { @@ -591,10 +591,10 @@ namespace } drawinglayer::primitive2d::Primitive2DSequence impAddPathTextOutlines( - const std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rSource, + const std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* >& rSource, const drawinglayer::attribute::SdrFormTextOutlineAttribute& rOutlineAttribute) { - std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aNewPrimitives; + std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* > aNewPrimitives; for(sal_uInt32 a(0L); a < rSource.size(); a++) { @@ -611,7 +611,7 @@ namespace if(aB2DPolyPolyVector.size()) { // create stroke primitives - std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aStrokePrimitives; + std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* > aStrokePrimitives; impAddPolygonStrokePrimitives( aB2DPolyPolyVector, aPolygonTransform, @@ -710,8 +710,8 @@ bool SdrTextObj::impDecomposePathTextPrimitive( if(nLoopCount) { // prepare common decomposition stuff - std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aRegularDecomposition; - std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aShadowDecomposition; + std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* > aRegularDecomposition; + std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* > aShadowDecomposition; impPolygonParagraphHandler aPolygonParagraphHandler( rFormTextAttribute, aRegularDecomposition, aShadowDecomposition); sal_uInt32 a; diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index 45a24211f7b2..197d71c65b45 100644 --- a/svx/source/table/viewcontactoftableobj.cxx +++ b/svx/source/table/viewcontactoftableobj.cxx @@ -64,7 +64,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrCellPrimitive2D : public BasePrimitive2D + class SdrCellPrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DHomMatrix maTransform; @@ -72,13 +72,13 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrCellPrimitive2D( const basegfx::B2DHomMatrix& rTransform, const attribute::SdrFillTextAttribute& rSdrFTAttribute) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransform(rTransform), maSdrFTAttribute(rSdrFTAttribute) { @@ -95,7 +95,7 @@ namespace drawinglayer DeclPrimitrive2DIDBlock() }; - Primitive2DSequence SdrCellPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrCellPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; @@ -132,7 +132,7 @@ namespace drawinglayer bool SdrCellPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const SdrCellPrimitive2D& rCompare = (SdrCellPrimitive2D&)rPrimitive; @@ -155,7 +155,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrBorderlinePrimitive2D : public BasePrimitive2D + class SdrBorderlinePrimitive2D : public BufDecPrimitive2D { private: basegfx::B2DHomMatrix maTransform; @@ -173,7 +173,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrBorderlinePrimitive2D( @@ -187,7 +187,7 @@ namespace drawinglayer bool bRightIsOutside, bool bTopIsOutside, bool bInTwips) - : BasePrimitive2D(), + : BufDecPrimitive2D(), maTransform(rTransform), maLeftLine(rLeftLine), maBottomLine(rBottomLine), @@ -282,7 +282,7 @@ namespace drawinglayer return (double)nValue; } - Primitive2DSequence SdrBorderlinePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrBorderlinePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence xRetval(4); sal_uInt32 nInsert(0); @@ -462,7 +462,7 @@ namespace drawinglayer bool SdrBorderlinePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const SdrBorderlinePrimitive2D& rCompare = (SdrBorderlinePrimitive2D&)rPrimitive; -- cgit From b653cd4479611658c45e70af135eb31c97a1605e Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 15 Sep 2009 16:06:13 +0200 Subject: #i97509# seperated base and buffered classes for 2D and 3D, adapted aqll usages --- .../view/SlsPageObjectViewObjectContact.cxx | 52 +++++++++++----------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx index 92a0abb72762..9cf09d6451a3 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx @@ -256,7 +256,7 @@ namespace sd { namespace slidesorter { namespace view { // class for all derived SdPageObjectPrimitives. The SdPageObjectBasePrimitive itself // is pure virtual -class SdPageObjectBasePrimitive : public drawinglayer::primitive2d::BasePrimitive2D +class SdPageObjectBasePrimitive : public drawinglayer::primitive2d::BufDecPrimitive2D { private: // the inner range of the SdPageObject visualisation @@ -271,11 +271,11 @@ public: const basegfx::B2DRange& getPageObjectRange() const { return maRange; } // compare operator - virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const; }; SdPageObjectBasePrimitive::SdPageObjectBasePrimitive(const basegfx::B2DRange& rRange) -: drawinglayer::primitive2d::BasePrimitive2D(), +: drawinglayer::primitive2d::BufDecPrimitive2D(), maRange(rRange) { } @@ -284,9 +284,9 @@ SdPageObjectBasePrimitive::~SdPageObjectBasePrimitive() { } -bool SdPageObjectBasePrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const +bool SdPageObjectBasePrimitive::operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const { - if(drawinglayer::primitive2d::BasePrimitive2D::operator==(rPrimitive)) + if(drawinglayer::primitive2d::BufDecPrimitive2D::operator==(rPrimitive)) { const SdPageObjectBasePrimitive& rCompare = static_cast< const SdPageObjectBasePrimitive& >(rPrimitive); return (getPageObjectRange() == rCompare.getPageObjectRange()); @@ -306,7 +306,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -319,13 +319,13 @@ public: const BitmapEx& getBitmapEx() const { return maBitmapEx; } // compare operator - virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const; // provide unique ID DeclPrimitrive2DIDBlock() }; -Primitive2DSequence SdPageObjectPageBitmapPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectPageBitmapPrimitive::createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { // add bitmap primitive // to avoid scaling, use the Bitmap pixel size as primitive size @@ -358,7 +358,7 @@ SdPageObjectPageBitmapPrimitive::~SdPageObjectPageBitmapPrimitive() { } -bool SdPageObjectPageBitmapPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const +bool SdPageObjectPageBitmapPrimitive::operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const { if(SdPageObjectBasePrimitive::operator==(rPrimitive)) { @@ -385,7 +385,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -399,7 +399,7 @@ public: const sal_Int32 SdPageObjectSelectPrimitive::mnSelectionIndicatorOffset(1); const sal_Int32 SdPageObjectSelectPrimitive::mnSelectionIndicatorThickness(3); -Primitive2DSequence SdPageObjectSelectPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectSelectPrimitive::createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval(2); @@ -470,7 +470,7 @@ class SdPageObjectBorderPrimitive : public SdPageObjectBasePrimitive { protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -481,7 +481,7 @@ public: DeclPrimitrive2DIDBlock() }; -Primitive2DSequence SdPageObjectBorderPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectBorderPrimitive::createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { // since old Width/Height calculations always added a single pixel value, // it is necessary to create a inner range which is one display unit less @@ -523,7 +523,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -536,7 +536,7 @@ public: const sal_Int32 SdPageObjectFocusPrimitive::mnFocusIndicatorOffset(2); -Primitive2DSequence SdPageObjectFocusPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectFocusPrimitive::createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval(2); @@ -618,7 +618,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -641,7 +641,7 @@ public: bool getExcluded() const { return mbExcluded; } // compare operator - virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const; // provide unique ID DeclPrimitrive2DIDBlock() @@ -666,7 +666,7 @@ const BitmapEx& SdPageObjectFadeNameNumberPrimitive::getFadeEffectIconBitmap() c return *mpFadeEffectIconBitmap; } -Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { const xub_StrLen nTextLength(getPageName().Len()); const sal_uInt32 nCount( @@ -866,7 +866,7 @@ SdPageObjectFadeNameNumberPrimitive::~SdPageObjectFadeNameNumberPrimitive() { } -bool SdPageObjectFadeNameNumberPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const +bool SdPageObjectFadeNameNumberPrimitive::operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const { if(SdPageObjectBasePrimitive::operator==(rPrimitive)) { @@ -1150,7 +1150,7 @@ void PageObjectViewObjectContact::ActionChanged (void) // Very simple primitive which just remembers the discrete data and applies // it at decomposition time. -class MouseOverEffectPrimitive : public drawinglayer::primitive2d::BasePrimitive2D +class MouseOverEffectPrimitive : public drawinglayer::primitive2d::BufDecPrimitive2D { private: basegfx::B2DRange maLogicRange; @@ -1159,7 +1159,7 @@ private: basegfx::BColor maRGBColor; protected: - virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition( + virtual drawinglayer::primitive2d::Primitive2DSequence createLocal2DDecomposition( const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: @@ -1168,7 +1168,7 @@ public: sal_uInt32 nDiscreteOffset, sal_uInt32 nDiscreteWidth, const basegfx::BColor& rRGBColor) - : drawinglayer::primitive2d::BasePrimitive2D(), + : drawinglayer::primitive2d::BufDecPrimitive2D(), maLogicRange(rLogicRange), mnDiscreteOffset(nDiscreteOffset), mnDiscreteWidth(nDiscreteWidth), @@ -1181,12 +1181,12 @@ public: sal_uInt32 getDiscreteWidth() const { return mnDiscreteWidth; } const basegfx::BColor& getRGBColor() const { return maRGBColor; } - virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const; DeclPrimitrive2DIDBlock() }; -drawinglayer::primitive2d::Primitive2DSequence MouseOverEffectPrimitive::createLocalDecomposition( +drawinglayer::primitive2d::Primitive2DSequence MouseOverEffectPrimitive::createLocal2DDecomposition( const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { // get logic sizes in object coordinate system @@ -1214,9 +1214,9 @@ drawinglayer::primitive2d::Primitive2DSequence MouseOverEffectPrimitive::createL return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } -bool MouseOverEffectPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const +bool MouseOverEffectPrimitive::operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const { - if(drawinglayer::primitive2d::BasePrimitive2D::operator==(rPrimitive)) + if(drawinglayer::primitive2d::BufDecPrimitive2D::operator==(rPrimitive)) { const MouseOverEffectPrimitive& rCompare = static_cast< const MouseOverEffectPrimitive& >(rPrimitive); -- cgit From dac4275c1bb031c2f52b5069493bea2100a12701 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 15 Sep 2009 16:06:13 +0200 Subject: #i97509# seperated base and buffered classes for 2D and 3D, adapted aqll usages --- sw/source/core/draw/dflyobj.cxx | 12 ++++++------ sw/source/ui/docvw/postit.cxx | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index 15ca46ca2456..e1033aa3d818 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -196,7 +196,7 @@ namespace drawinglayer { namespace primitive2d { - class SwVirtFlyDrawObjPrimitive : public BasePrimitive2D + class SwVirtFlyDrawObjPrimitive : public BufDecPrimitive2D { private: const SwVirtFlyDrawObj& mrSwVirtFlyDrawObj; @@ -204,13 +204,13 @@ namespace drawinglayer protected: // method which is to be used to implement the local decomposition of a 2D primitive - virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: SwVirtFlyDrawObjPrimitive( const SwVirtFlyDrawObj& rSwVirtFlyDrawObj, const basegfx::B2DRange &rOuterRange) - : BasePrimitive2D(), + : BufDecPrimitive2D(), mrSwVirtFlyDrawObj(rSwVirtFlyDrawObj), maOuterRange(rOuterRange) { @@ -239,7 +239,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SwVirtFlyDrawObjPrimitive::createLocalDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence SwVirtFlyDrawObjPrimitive::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; @@ -269,7 +269,7 @@ namespace drawinglayer bool SwVirtFlyDrawObjPrimitive::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufDecPrimitive2D::operator==(rPrimitive)) { const SwVirtFlyDrawObjPrimitive& rCompare = (SwVirtFlyDrawObjPrimitive&)rPrimitive; @@ -295,7 +295,7 @@ namespace drawinglayer getSwVirtFlyDrawObj().wrap_DoPaintObject(); // call parent - return BasePrimitive2D::get2DDecomposition(rViewInformation); + return BufDecPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx index a9809e07e496..c2754f18acd0 100644 --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -1990,7 +1990,7 @@ private: ShadowState maShadowState; protected: - virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition( + virtual drawinglayer::primitive2d::Primitive2DSequence createLocal2DDecomposition( const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: @@ -2009,12 +2009,12 @@ public: const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; } ShadowState getShadowState() const { return maShadowState; } - virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const; DeclPrimitrive2DIDBlock() }; -drawinglayer::primitive2d::Primitive2DSequence SwPostItShadowPrimitive::createLocalDecomposition( +drawinglayer::primitive2d::Primitive2DSequence SwPostItShadowPrimitive::createLocal2DDecomposition( const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const { // get logic sizes in object coordinate system @@ -2095,7 +2095,7 @@ drawinglayer::primitive2d::Primitive2DSequence SwPostItShadowPrimitive::createLo return xRetval; } -bool SwPostItShadowPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const +bool SwPostItShadowPrimitive::operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const { if(drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::operator==(rPrimitive)) { @@ -2177,7 +2177,7 @@ private: bool mbLineSolid : 1; protected: - virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition( + virtual drawinglayer::primitive2d::Primitive2DSequence createLocal2DDecomposition( const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: @@ -2211,12 +2211,12 @@ public: bool getShadow() const { return mbShadow; } bool getLineSolid() const { return mbLineSolid; } - virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const; DeclPrimitrive2DIDBlock() }; -drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkorPrimitive::createLocalDecomposition( +drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkorPrimitive::createLocal2DDecomposition( const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const { drawinglayer::primitive2d::Primitive2DSequence aRetval; @@ -2331,7 +2331,7 @@ drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkorPrimitive::createLoc return aRetval; } -bool SwPostItAnkorPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const +bool SwPostItAnkorPrimitive::operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const { if(drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::operator==(rPrimitive)) { -- cgit From 52ddaac170a54bcbc5505e73a4e8ca93a19a8913 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 15 Sep 2009 19:08:28 +0200 Subject: #i97509# changed base classes for primitives which need no buffering --- .../primitive2d/animatedprimitive2d.hxx | 11 ----- .../primitive2d/backgroundcolorprimitive2d.hxx | 2 +- .../drawinglayer/primitive2d/baseprimitive2d.hxx | 30 ++++++++++--- .../drawinglayer/primitive2d/bitmapprimitive2d.hxx | 2 +- .../primitive2d/borderlineprimitive2d.hxx | 2 +- .../primitive2d/controlprimitive2d.hxx | 2 +- .../primitive2d/embedded3dprimitive2d.hxx | 2 +- .../primitive2d/fillbitmapprimitive2d.hxx | 2 +- .../primitive2d/fillgradientprimitive2d.hxx | 2 +- .../primitive2d/fillhatchprimitive2d.hxx | 2 +- .../primitive2d/graphicprimitive2d.hxx | 2 +- .../drawinglayer/primitive2d/gridprimitive2d.hxx | 2 +- .../drawinglayer/primitive2d/groupprimitive2d.hxx | 28 +++++++++--- .../primitive2d/helplineprimitive2d.hxx | 2 +- .../primitive2d/hittestprimitive2d.hxx | 9 ++-- .../primitive2d/markerarrayprimitive2d.hxx | 2 +- .../drawinglayer/primitive2d/mediaprimitive2d.hxx | 2 +- .../primitive2d/metafileprimitive2d.hxx | 2 +- .../primitive2d/pagepreviewprimitive2d.hxx | 12 +++-- .../primitive2d/pointarrayprimitive2d.hxx | 4 +- .../primitive2d/polygonprimitive2d.hxx | 6 +-- .../primitive2d/polypolygonprimitive2d.hxx | 8 ++-- .../drawinglayer/primitive2d/primitivetools2d.hxx | 12 ++--- .../drawinglayer/primitive2d/sceneprimitive2d.hxx | 2 +- .../drawinglayer/primitive2d/shadowprimitive2d.hxx | 7 ++- .../primitive2d/texteffectprimitive2d.hxx | 10 +++-- .../drawinglayer/primitive2d/textprimitive2d.hxx | 2 +- .../primitive2d/unifiedalphaprimitive2d.hxx | 7 ++- .../primitive2d/wrongspellprimitive2d.hxx | 2 +- .../drawinglayer/primitive3d/baseprimitive3d.hxx | 2 +- .../drawinglayer/processor2d/baseprocessor2d.hxx | 2 +- .../drawinglayer/processor2d/canvasprocessor.hxx | 2 +- .../source/primitive2d/animatedprimitive2d.cxx | 52 +++++----------------- .../primitive2d/backgroundcolorprimitive2d.cxx | 6 +-- .../source/primitive2d/baseprimitive2d.cxx | 14 +++--- .../source/primitive2d/bitmapprimitive2d.cxx | 4 +- .../source/primitive2d/borderlineprimitive2d.cxx | 4 +- .../source/primitive2d/controlprimitive2d.cxx | 8 ++-- .../source/primitive2d/embedded3dprimitive2d.cxx | 4 +- .../source/primitive2d/fillbitmapprimitive2d.cxx | 4 +- .../source/primitive2d/fillgradientprimitive2d.cxx | 4 +- .../source/primitive2d/fillhatchprimitive2d.cxx | 4 +- .../source/primitive2d/graphicprimitive2d.cxx | 6 +-- .../source/primitive2d/gridprimitive2d.cxx | 6 +-- .../source/primitive2d/groupprimitive2d.cxx | 16 +++---- .../source/primitive2d/helplineprimitive2d.cxx | 8 ++-- .../source/primitive2d/hittestprimitive2d.cxx | 12 ++--- .../source/primitive2d/markerarrayprimitive2d.cxx | 4 +- .../source/primitive2d/mediaprimitive2d.cxx | 4 +- .../source/primitive2d/metafileprimitive2d.cxx | 4 +- .../source/primitive2d/pagepreviewprimitive2d.cxx | 10 +++-- .../source/primitive2d/pointarrayprimitive2d.cxx | 4 +- .../source/primitive2d/polygonprimitive2d.cxx | 20 ++++----- .../source/primitive2d/polypolygonprimitive2d.cxx | 20 ++++----- .../source/primitive2d/primitivetools2d.cxx | 4 +- .../source/primitive2d/sceneprimitive2d.cxx | 6 +-- .../source/primitive2d/shadowprimitive2d.cxx | 40 ++++++++--------- .../primitive2d/textdecoratedprimitive2d.cxx | 4 +- .../source/primitive2d/texteffectprimitive2d.cxx | 40 +++++++++-------- .../source/primitive2d/textprimitive2d.cxx | 4 +- .../source/primitive2d/unifiedalphaprimitive2d.cxx | 42 ++++++++--------- .../source/primitive2d/wrongspellprimitive2d.cxx | 4 +- .../source/primitive3d/hatchtextureprimitive3d.cxx | 2 +- .../source/processor2d/baseprocessor2d.cxx | 6 +-- .../svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx | 2 +- .../sdr/primitive2d/sdrconnectorprimitive2d.hxx | 2 +- .../sdr/primitive2d/sdrcustomshapeprimitive2d.hxx | 2 +- .../svx/sdr/primitive2d/sdrellipseprimitive2d.hxx | 2 +- svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx | 2 +- .../svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx | 2 +- svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx | 14 +++--- .../sdr/primitive2d/sdrolecontentprimitive2d.hxx | 2 +- svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx | 2 +- .../sdr/primitive2d/sdrrectangleprimitive2d.hxx | 2 +- svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx | 2 +- svx/source/sdr/contact/viewobjectcontact.cxx | 2 +- .../sdr/contact/viewobjectcontactofunocontrol.cxx | 8 ++-- .../sdr/primitive2d/sdrcaptionprimitive2d.cxx | 4 +- .../sdr/primitive2d/sdrconnectorprimitive2d.cxx | 4 +- .../sdr/primitive2d/sdrcustomshapeprimitive2d.cxx | 4 +- .../sdr/primitive2d/sdrdecompositiontools.cxx | 4 +- .../sdr/primitive2d/sdrellipseprimitive2d.cxx | 4 +- svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx | 4 +- .../sdr/primitive2d/sdrmeasureprimitive2d.cxx | 4 +- svx/source/sdr/primitive2d/sdrole2primitive2d.cxx | 14 +++--- .../sdr/primitive2d/sdrolecontentprimitive2d.cxx | 4 +- svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx | 4 +- .../sdr/primitive2d/sdrrectangleprimitive2d.cxx | 4 +- svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx | 6 +-- svx/source/svdraw/svdotextdecomposition.cxx | 16 +++---- svx/source/svdraw/svdotextpathdecomposition.cxx | 20 ++++----- svx/source/table/viewcontactoftableobj.cxx | 12 ++--- 92 files changed, 358 insertions(+), 348 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx index 6811b6ba857b..296d56efe6d8 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx @@ -59,19 +59,11 @@ namespace drawinglayer // definition and is owned by this implementation animation::AnimationEntry* mpAnimationEntry; - // the last remembered decompose time, created and used by getDecomposition() for - // buffering purposes - double mfDecomposeViewTime; - // bitfield // flag if this is a text or graphic animation. Necessary since SdrViews need to differentiate // between both types if they are on/off unsigned mbIsTextAnimation : 1; - protected: - // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - public: AnimatedSwitchPrimitive2D( const animation::AnimationEntry& rAnimationEntry, @@ -87,9 +79,6 @@ namespace drawinglayer // compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range - virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID DeclPrimitrive2DIDBlock() diff --git a/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx index 47cebbca87e4..5731a1e45ee6 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class BackgroundColorPrimitive2D : public BufDecPrimitive2D + class BackgroundColorPrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::BColor maBColor; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx index f33b9697bff8..416fdd2d9816 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx @@ -106,8 +106,26 @@ namespace drawinglayer unique UNO APIs may be defined/implemented for these set to allow more intense work with primitives using UNO. - Current Basic Primitives are: - (add list here) + Current five Basic Primitives are: + + - BitmapPrimitive2D (bitmap data, evtl. with alpha) + - MetafilePrimitive2D (VCL Metafile, currently no decomposition, but planned, so may vanish) + - PointArrayPrimitive2D (single points) + - PolygonHairlinePrimitive2D (hairline curves/polygons) + - PolyPolygonColorPrimitive2D (colored polygons) + + All other implemented primitives have a defined decomposition and can thus be + decomposed downt to this small set. + + A renderer implementing support for this minimal set of primitives can completely + render primitive-based visualisations. Of course, he also has to take states into account + which are representated by the following GroupPrimitive2D derivations: + + - AlphaPrimitive2D (objects with freely defined transparence) + - InvertPrimitive2D (for XOR) + - MaskPrimitive2D (for masking) + - ModifiedColorPrimitive2D (for a stack of color modifications) + - TransformPrimitive2D (for a transformation stack) To support getting the geometric BoundRect, getB2DRange is used. The default implementation will use the get2DDecomposition result and merge a range from the @@ -183,7 +201,7 @@ namespace drawinglayer } // end of namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// -// BufDecPrimitive2D class +// BufferedDecompositionPrimitive2D class namespace drawinglayer { @@ -216,7 +234,7 @@ namespace drawinglayer to identify if a new decomposition is needed at the next call (f) return maLocal2DDecomposition */ - class BufDecPrimitive2D + class BufferedDecompositionPrimitive2D : public BasePrimitive2D { private: @@ -238,7 +256,7 @@ namespace drawinglayer public: // constructor/destructor - BufDecPrimitive2D(); + BufferedDecompositionPrimitive2D(); /** The getDecomposition default implementation will on demand use createLocal2DDecomposition() if maLocal2DDecomposition is empty. It will set maLocal2DDecomposition to this obtained decomposition @@ -264,7 +282,7 @@ namespace drawinglayer // get B2DRange from a given Primitive2DSequence basegfx::B2DRange getB2DRangeFromPrimitive2DSequence(const Primitive2DSequence& rCandidate, const geometry::ViewInformation2D& aViewInformation); - // compare two Primitive2DReferences for equality, including trying to get implementations (BufDecPrimitive2D) + // compare two Primitive2DReferences for equality, including trying to get implementations (BufferedDecompositionPrimitive2D) // and using compare operator bool arePrimitive2DReferencesEqual(const Primitive2DReference& rA, const Primitive2DReference& rB); diff --git a/drawinglayer/inc/drawinglayer/primitive2d/bitmapprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/bitmapprimitive2d.hxx index 4a1244126b6b..d295c6ab4b89 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/bitmapprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/bitmapprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class BitmapPrimitive2D : public BufDecPrimitive2D + class BitmapPrimitive2D : public BasePrimitive2D { private: BitmapEx maBitmapEx; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx index f7e66e367478..88ca4c02935b 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class BorderLinePrimitive2D : public BufDecPrimitive2D + class BorderLinePrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DPoint maStart; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx index 9902fbfa04d7..591407302a37 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class ControlPrimitive2D : public BufDecPrimitive2D + class ControlPrimitive2D : public BufferedDecompositionPrimitive2D { private: // object's base data diff --git a/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx index f81c91374969..aef3c0173b43 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx @@ -48,7 +48,7 @@ namespace drawinglayer { namespace primitive2d { - class Embedded3DPrimitive2D : public BufDecPrimitive2D + class Embedded3DPrimitive2D : public BufferedDecompositionPrimitive2D { private: // the sequence of 3d primitives diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx index 0689ff8d6bcc..012824f187bd 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class FillBitmapPrimitive2D : public BufDecPrimitive2D + class FillBitmapPrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DHomMatrix maTransformation; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx index cc05f0fc0b07..fbf4e7c34a3f 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class FillGradientPrimitive2D : public BufDecPrimitive2D + class FillGradientPrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DRange maObjectRange; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx index 9d3ca6feef99..10cb9a622140 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class FillHatchPrimitive2D : public BufDecPrimitive2D + class FillHatchPrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DRange maObjectRange; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx index 5057a3c63261..cfc29ac8d06e 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class GraphicPrimitive2D : public BufDecPrimitive2D + class GraphicPrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DHomMatrix maTransform; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx index cf2bd35ba57c..1b1325c4b4f9 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx @@ -48,7 +48,7 @@ namespace drawinglayer { namespace primitive2d { - class GridPrimitive2D : public BufDecPrimitive2D + class GridPrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DHomMatrix maTransform; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx index 80187efb3b78..bf30efb66311 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx @@ -45,16 +45,31 @@ namespace drawinglayer { namespace primitive2d { - class GroupPrimitive2D : public BufDecPrimitive2D + /** Baseclass for all grouping 2D primitives + + The grouping primitive in it's basic form is capable of holding + a child primitive content and returns it on decomposition on default. + It is used for two main purposes, but more may apply: + + - to transport extended information, e.g. for text classification, + see e.g. TextHierarchy*Primitive2D implementations. Since they + decompose to their child content, renderers not aware/interested + in that extra information will just ignore these primitives + + - to encapsulate common geometry, e.g. the ShadowPrimitive2D implements + applying a generic shadow to a child sequence by adding the needed + offset and color stuff in the decomposition + + In most cases the decomposition is straightforward, so by default + this primitive will not buffer the result and is not derived from + BufferedDecompositionPrimitive2D, but from BasePrimitive2D. + */ + class GroupPrimitive2D : public BasePrimitive2D { private: // the children. Declared private since this shall never be changed at all after construction Primitive2DSequence maChildren; - protected: - // local decomposition. Implementation will just return children - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - public: // constructor GroupPrimitive2D(const Primitive2DSequence& rChildren); @@ -65,6 +80,9 @@ namespace drawinglayer // compare operator virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; + // local decomposition. Implementation will just return children + virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + // provide unique ID DeclPrimitrive2DIDBlock() }; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx index 28262adacf80..53abdfa133c8 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx @@ -53,7 +53,7 @@ namespace drawinglayer HELPLINESTYLE2D_LINE }; - class HelplinePrimitive2D : public BufDecPrimitive2D + class HelplinePrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DPoint maPosition; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx index 5c964fdc4ecb..1df9ca2111af 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx @@ -54,11 +54,6 @@ namespace drawinglayer // (and maybe BoundRect extractors) will use it and it's children subcontent. class HitTestPrimitive2D : public GroupPrimitive2D { - protected: - // local decomposition. Implementation will return empty Primitive2DSequence - // since this is no visualisation data - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - public: HitTestPrimitive2D(const Primitive2DSequence& rChildren); @@ -67,6 +62,10 @@ namespace drawinglayer // the local implementation will return the children's range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; + // local decomposition. Implementation will return empty Primitive2DSequence + // since this is no visualisation data + virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + // provide unique ID DeclPrimitrive2DIDBlock() }; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx index ad6a0b565980..02f254368bc1 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class MarkerArrayPrimitive2D : public BufDecPrimitive2D + class MarkerArrayPrimitive2D : public BufferedDecompositionPrimitive2D { private: std::vector< basegfx::B2DPoint > maPositions; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx index b3baa0334edd..f5d21fa40e3e 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class MediaPrimitive2D : public BufDecPrimitive2D + class MediaPrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DHomMatrix maTransform; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx index 9104fbf7c83e..23eb5dd1b36e 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class MetafilePrimitive2D : public BufDecPrimitive2D + class MetafilePrimitive2D : public BasePrimitive2D { private: basegfx::B2DHomMatrix maMetaFileTransform; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx index bbe05fcf9cb1..f44de611d609 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx @@ -36,7 +36,7 @@ #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PAGEPREVIEWPRIMITIVE2D_HXX #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PAGEPREVIEWPRIMITIVE2D_HXX -#include +#include #include #include @@ -47,11 +47,11 @@ namespace drawinglayer namespace primitive2d { // This primitive is needed to have the correct XDrawPage as ViewInformation for decomposing - // the page contents (given as childs of the GroupPrimitive2D here) if these contain e.g. + // the page contents (given as PageContent here) if these contain e.g. // view-dependent (in this case XDrawPage-dependent) text fields like PageNumber. If You want // those primitives to be visualized correctly, Your renderer needs to locally correct it's // ViewInformation2D to reference the new XDrawPage. - class PagePreviewPrimitive2D : public GroupPrimitive2D + class PagePreviewPrimitive2D : public BufferedDecompositionPrimitive2D { private: // the XDrawPage visualized by this primitive. When we go forward with primitives @@ -59,6 +59,9 @@ namespace drawinglayer // graphic attribute context, but also to completely create the page's sub-content. const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > mxDrawPage; + // the PageContent + Primitive2DSequence maPageContent; + // the own geometry basegfx::B2DHomMatrix maTransform; @@ -80,11 +83,12 @@ namespace drawinglayer const basegfx::B2DHomMatrix& rTransform, double fContentWidth, double fContentHeight, - const Primitive2DSequence& rChildren, + const Primitive2DSequence& rPageContent, bool bKeepAspectRatio); // get data const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& getXDrawPage() const { return mxDrawPage; } + const Primitive2DSequence& getPageContent() const { return maPageContent; } const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } double getContentWidth() const { return mfContentWidth; } double getContentHeight() const { return mfContentHeight; } diff --git a/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx index 474921086138..7e82f53c2401 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx @@ -46,14 +46,14 @@ namespace drawinglayer { namespace primitive2d { - class PointArrayPrimitive2D : public BufDecPrimitive2D + class PointArrayPrimitive2D : public BasePrimitive2D { private: std::vector< basegfx::B2DPoint > maPositions; basegfx::BColor maRGBColor; // #i96669# add simple range buffering for this primitive - basegfx::B2DRange maB2DRange; + basegfx::B2DRange maB2DRange; public: PointArrayPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx index 8c22fa299167..c82f54fdfab0 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx @@ -49,7 +49,7 @@ namespace drawinglayer { namespace primitive2d { - class PolygonHairlinePrimitive2D : public BufDecPrimitive2D + class PolygonHairlinePrimitive2D : public BasePrimitive2D { private: basegfx::B2DPolygon maPolygon; @@ -81,7 +81,7 @@ namespace drawinglayer { namespace primitive2d { - class PolygonMarkerPrimitive2D : public BufDecPrimitive2D + class PolygonMarkerPrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DPolygon maPolygon; @@ -131,7 +131,7 @@ namespace drawinglayer { namespace primitive2d { - class PolygonStrokePrimitive2D : public BufDecPrimitive2D + class PolygonStrokePrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DPolygon maPolygon; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx index 6f63ff5d18bc..d152b962de25 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx @@ -51,7 +51,7 @@ namespace drawinglayer { namespace primitive2d { - class PolyPolygonHairlinePrimitive2D : public BufDecPrimitive2D + class PolyPolygonHairlinePrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DPolyPolygon maPolyPolygon; @@ -87,7 +87,7 @@ namespace drawinglayer { namespace primitive2d { - class PolyPolygonMarkerPrimitive2D : public BufDecPrimitive2D + class PolyPolygonMarkerPrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DPolyPolygon maPolyPolygon; @@ -131,7 +131,7 @@ namespace drawinglayer { namespace primitive2d { - class PolyPolygonStrokePrimitive2D : public BufDecPrimitive2D + class PolyPolygonStrokePrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DPolyPolygon maPolyPolygon; @@ -223,7 +223,7 @@ namespace drawinglayer { namespace primitive2d { - class PolyPolygonColorPrimitive2D : public BufDecPrimitive2D + class PolyPolygonColorPrimitive2D : public BasePrimitive2D { private: basegfx::B2DPolyPolygon maPolyPolygon; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx index 04b4de88c449..3a0977003915 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx @@ -39,7 +39,7 @@ #include ////////////////////////////////////////////////////////////////////////////// -// tooling class for BufDecPrimitive2D baseed classes which are view-dependent +// tooling class for BufferedDecompositionPrimitive2D baseed classes which are view-dependent // regarding the size of a discrete unit. The implementation of get2DDecomposition // guards the buffered local decomposition and ensures that a createLocal2DDecomposition // implementation may use an up-to-date DiscreteUnit accessible using getDiscreteUnit() @@ -48,7 +48,7 @@ namespace drawinglayer { namespace primitive2d { - class DiscreteMetricDependentPrimitive2D : public BufDecPrimitive2D + class DiscreteMetricDependentPrimitive2D : public BufferedDecompositionPrimitive2D { private: // the last used fDiscreteUnit definitions for decomposition. Since this @@ -58,7 +58,7 @@ namespace drawinglayer public: DiscreteMetricDependentPrimitive2D() - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), mfDiscreteUnit(0.0) { } @@ -73,7 +73,7 @@ namespace drawinglayer } // end of namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// -// tooling class for BufDecPrimitive2D baseed classes which are view-dependent +// tooling class for BufferedDecompositionPrimitive2D baseed classes which are view-dependent // regarding the viewport. The implementation of get2DDecomposition // guards the buffered local decomposition and ensures that a createLocal2DDecomposition // implementation may use an up-to-date Viewport accessible using getViewport() @@ -82,7 +82,7 @@ namespace drawinglayer { namespace primitive2d { - class ViewportDependentPrimitive2D : public BufDecPrimitive2D + class ViewportDependentPrimitive2D : public BufferedDecompositionPrimitive2D { private: // the last used Viewport definition for decomposition. Since this @@ -92,7 +92,7 @@ namespace drawinglayer public: ViewportDependentPrimitive2D() - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maViewport() { } diff --git a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx index 76783abb5372..0f8e55492688 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx @@ -48,7 +48,7 @@ namespace drawinglayer { namespace primitive2d { - class ScenePrimitive2D : public BufDecPrimitive2D + class ScenePrimitive2D : public BufferedDecompositionPrimitive2D { private: primitive3d::Primitive3DSequence mxChildren3D; // the 3d sub-primitives diff --git a/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx index b30d96edcfca..3da621f5f174 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx @@ -52,10 +52,6 @@ namespace drawinglayer basegfx::B2DHomMatrix maShadowTransform; basegfx::BColor maShadowColor; - protected: - // create decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - public: ShadowPrimitive2D( const basegfx::B2DHomMatrix& rShadowTransform, @@ -72,6 +68,9 @@ namespace drawinglayer // get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; + // create decomposition + virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + // provide unique ID DeclPrimitrive2DIDBlock() }; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx index aa4d41349f14..2a9c890b2b3d 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx @@ -36,7 +36,7 @@ #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTEFFECTPRIMITIVE2D_HXX #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTEFFECTPRIMITIVE2D_HXX -#include +#include #include ////////////////////////////////////////////////////////////////////////////// @@ -54,9 +54,12 @@ namespace drawinglayer TEXTEFFECTSTYLE2D_OUTLINE }; - class TextEffectPrimitive2D : public GroupPrimitive2D + class TextEffectPrimitive2D : public BufferedDecompositionPrimitive2D { private: + // the text content + Primitive2DSequence maTextContent; + // the style to apply, the direction and the rotation center const basegfx::B2DPoint maRotationCenter; double mfDirection; @@ -72,12 +75,13 @@ namespace drawinglayer public: TextEffectPrimitive2D( - const Primitive2DSequence& rChildren, + const Primitive2DSequence& rTextContent, const basegfx::B2DPoint& rRotationCenter, double fDirection, TextEffectStyle2D eTextEffectStyle2D); // get data + const Primitive2DSequence& getTextContent() const { return maTextContent; } const basegfx::B2DPoint& getRotationCenter() const { return maRotationCenter; } double getDirection() const { return mfDirection; } TextEffectStyle2D getTextEffectStyle2D() const { return meTextEffectStyle2D; } diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx index 51bb93a41e91..775fa2bd36e5 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx @@ -123,7 +123,7 @@ namespace drawinglayer { namespace primitive2d { - class TextSimplePortionPrimitive2D : public BufDecPrimitive2D + class TextSimplePortionPrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DHomMatrix maTextTransform; // text range transformation from unit range ([0.0 .. 1.0]) to text range diff --git a/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx index 0ed1900ae14f..d7ca69129e02 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx @@ -49,10 +49,6 @@ namespace drawinglayer private: double mfAlpha; // unified transparence - protected: - // create decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - public: UnifiedAlphaPrimitive2D( const Primitive2DSequence& rChildren, @@ -64,6 +60,9 @@ namespace drawinglayer // compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + // create decomposition + virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + // provide unique ID DeclPrimitrive2DIDBlock() }; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx index d2e108e2844a..bddb951bea9c 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class WrongSpellPrimitive2D : public BufDecPrimitive2D + class WrongSpellPrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DHomMatrix maTransformation; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx index 5f4bef5a02af..4dc5a7da4acb 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx @@ -192,7 +192,7 @@ namespace drawinglayer // get range3D from a given Primitive3DSequence basegfx::B3DRange getB3DRangeFromPrimitive3DSequence(const Primitive3DSequence& rCandidate, const geometry::ViewInformation3D& aViewInformation); - // compare two Primitive2DReferences for equality, including trying to get implementations (BufDecPrimitive2D) + // compare two Primitive2DReferences for equality, including trying to get implementations (BufferedDecompositionPrimitive2D) // and using compare operator bool arePrimitive3DReferencesEqual(const Primitive3DReference& rA, const Primitive3DReference& rB); diff --git a/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx index c9e31eecba91..5139b4d72119 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx @@ -57,7 +57,7 @@ namespace drawinglayer } // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufDecPrimitive2D-based. + // virtual render method when the primitive implementation is BufferedDecompositionPrimitive2D-based. // Default implementation does nothing virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate); diff --git a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx index a100d2bae5c0..ac15ec5f12cf 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx @@ -103,7 +103,7 @@ namespace drawinglayer LanguageType meLang; // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufDecPrimitive2D-based. + // virtual render method when the primitive implementation is BufferedDecompositionPrimitive2D-based. virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate); // direct primitive renderer support diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx index efa6df7c5e35..d2b824962fbf 100644 --- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx @@ -52,33 +52,12 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence AnimatedSwitchPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const - { - if(getChildren().hasElements()) - { - const double fState(getAnimationEntry().getStateAtTime(rViewInformation.getViewTime())); - const sal_uInt32 nLen(getChildren().getLength()); - sal_uInt32 nIndex(basegfx::fround(fState * (double)nLen)); - - if(nIndex >= nLen) - { - nIndex = nLen - 1L; - } - - const Primitive2DReference xRef(getChildren()[nIndex], uno::UNO_QUERY_THROW); - return Primitive2DSequence(&xRef, 1L); - } - - return Primitive2DSequence(); - } - AnimatedSwitchPrimitive2D::AnimatedSwitchPrimitive2D( const animation::AnimationEntry& rAnimationEntry, const Primitive2DSequence& rChildren, bool bIsTextAnimation) : GroupPrimitive2D(rChildren), mpAnimationEntry(0), - mfDecomposeViewTime(0.0), mbIsTextAnimation(bIsTextAnimation) { // clone given animation description @@ -105,29 +84,22 @@ namespace drawinglayer Primitive2DSequence AnimatedSwitchPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { - ::osl::MutexGuard aGuard( m_aMutex ); - - if(getLocal2DDecomposition().hasElements() && mfDecomposeViewTime != rViewInformation.getViewTime()) + if(getChildren().hasElements()) { - // conditions of last local decomposition have changed, delete - const_cast< AnimatedSwitchPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); - } + const double fState(getAnimationEntry().getStateAtTime(rViewInformation.getViewTime())); + const sal_uInt32 nLen(getChildren().getLength()); + sal_uInt32 nIndex(basegfx::fround(fState * (double)nLen)); - if(!getLocal2DDecomposition().hasElements()) - { - // remember time - const_cast< AnimatedSwitchPrimitive2D* >(this)->mfDecomposeViewTime = rViewInformation.getViewTime(); - } + if(nIndex >= nLen) + { + nIndex = nLen - 1L; + } - // use parent implementation - return GroupPrimitive2D::get2DDecomposition(rViewInformation); - } + const Primitive2DReference xRef(getChildren()[nIndex], uno::UNO_QUERY_THROW); + return Primitive2DSequence(&xRef, 1L); + } - basegfx::B2DRange AnimatedSwitchPrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewInformation) const - { - // to get range from decomposition and not from group content, call implementation from - // BufDecPrimitive2D here - return BufDecPrimitive2D::getB2DRange(rViewInformation); + return Primitive2DSequence(); } // provide unique ID diff --git a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx index 68527b93d9cb..723a684c51ec 100644 --- a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx @@ -70,7 +70,7 @@ namespace drawinglayer BackgroundColorPrimitive2D::BackgroundColorPrimitive2D( const basegfx::BColor& rBColor) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maBColor(rBColor), maLastViewport() { @@ -78,7 +78,7 @@ namespace drawinglayer bool BackgroundColorPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const BackgroundColorPrimitive2D& rCompare = (BackgroundColorPrimitive2D&)rPrimitive; @@ -111,7 +111,7 @@ namespace drawinglayer } // use parent implementation - return BufDecPrimitive2D::get2DDecomposition(rViewInformation); + return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx index 3ac7253a42a3..db391ab1b548 100644 --- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx @@ -94,25 +94,25 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence BufDecPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence BufferedDecompositionPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { return Primitive2DSequence(); } - BufDecPrimitive2D::BufDecPrimitive2D() + BufferedDecompositionPrimitive2D::BufferedDecompositionPrimitive2D() : BasePrimitive2D(), maLocal2DDecomposition() { } - Primitive2DSequence BufDecPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence BufferedDecompositionPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { ::osl::MutexGuard aGuard( m_aMutex ); if(!getLocal2DDecomposition().hasElements()) { const Primitive2DSequence aNewSequence(createLocal2DDecomposition(rViewInformation)); - const_cast< BufDecPrimitive2D* >(this)->setLocal2DDecomposition(aNewSequence); + const_cast< BufferedDecompositionPrimitive2D* >(this)->setLocal2DDecomposition(aNewSequence); } return getLocal2DDecomposition(); @@ -135,7 +135,7 @@ namespace drawinglayer if(rCandidate.is()) { // try to get C++ implementation base - const BufDecPrimitive2D* pCandidate(dynamic_cast< BufDecPrimitive2D* >(rCandidate.get())); + const BufferedDecompositionPrimitive2D* pCandidate(dynamic_cast< BufferedDecompositionPrimitive2D* >(rCandidate.get())); if(pCandidate) { @@ -185,8 +185,8 @@ namespace drawinglayer return true; } - const BufDecPrimitive2D* pA(dynamic_cast< const BufDecPrimitive2D* >(rxA.get())); - const BufDecPrimitive2D* pB(dynamic_cast< const BufDecPrimitive2D* >(rxB.get())); + const BufferedDecompositionPrimitive2D* pA(dynamic_cast< const BufferedDecompositionPrimitive2D* >(rxA.get())); + const BufferedDecompositionPrimitive2D* pB(dynamic_cast< const BufferedDecompositionPrimitive2D* >(rxB.get())); const bool bAEqualZero(pA == 0L); if(bAEqualZero != (pB == 0L)) diff --git a/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx index 67e8dc800b12..5900900bcf06 100644 --- a/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer BitmapPrimitive2D::BitmapPrimitive2D( const BitmapEx& rBitmapEx, const basegfx::B2DHomMatrix& rTransform) - : BufDecPrimitive2D(), + : BasePrimitive2D(), maBitmapEx(rBitmapEx), maTransform(rTransform) { @@ -61,7 +61,7 @@ namespace drawinglayer bool BitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BasePrimitive2D::operator==(rPrimitive)) { const BitmapPrimitive2D& rCompare = (BitmapPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx index c2c4e46464a0..205f11d688b0 100644 --- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx @@ -194,7 +194,7 @@ namespace drawinglayer bool bCreateInside, bool bCreateOutside, const basegfx::BColor& rRGBColor) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maStart(rStart), maEnd(rEnd), mfLeftWidth(fLeftWidth), @@ -212,7 +212,7 @@ namespace drawinglayer bool BorderLinePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const BorderLinePrimitive2D& rCompare = (BorderLinePrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx index ecc05621f075..46392106f410 100644 --- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx @@ -283,7 +283,7 @@ namespace drawinglayer ControlPrimitive2D::ControlPrimitive2D( const basegfx::B2DHomMatrix& rTransform, const uno::Reference< awt::XControlModel >& rxControlModel) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransform(rTransform), mxControlModel(rxControlModel), mxXControl(), @@ -295,7 +295,7 @@ namespace drawinglayer const basegfx::B2DHomMatrix& rTransform, const uno::Reference< awt::XControlModel >& rxControlModel, const uno::Reference< awt::XControl >& rxXControl) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransform(rTransform), mxControlModel(rxControlModel), mxXControl(rxXControl), @@ -316,7 +316,7 @@ namespace drawinglayer bool ControlPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { // use base class compare operator - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const ControlPrimitive2D& rCompare = (ControlPrimitive2D&)rPrimitive; @@ -381,7 +381,7 @@ namespace drawinglayer } // use parent implementation - return BufDecPrimitive2D::get2DDecomposition(rViewInformation); + return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx b/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx index f2c8dd5c4d98..c796048a4bf3 100644 --- a/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx @@ -102,7 +102,7 @@ namespace drawinglayer const basegfx::B3DVector& rLightNormal, double fShadowSlant, const basegfx::B3DRange& rScene3DRange) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), mxChildren3D(rxChildren3D), maObjectTransformation(rObjectTransformation), maViewInformation3D(rViewInformation3D), @@ -118,7 +118,7 @@ namespace drawinglayer bool Embedded3DPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const Embedded3DPrimitive2D& rCompare = static_cast< const Embedded3DPrimitive2D& >(rPrimitive); diff --git a/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx index a35bf6eeffe9..636c798f448c 100644 --- a/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx @@ -105,7 +105,7 @@ namespace drawinglayer FillBitmapPrimitive2D::FillBitmapPrimitive2D( const basegfx::B2DHomMatrix& rTransformation, const attribute::FillBitmapAttribute& rFillBitmap) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransformation(rTransformation), maFillBitmap(rFillBitmap) { @@ -113,7 +113,7 @@ namespace drawinglayer bool FillBitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const FillBitmapPrimitive2D& rCompare = static_cast< const FillBitmapPrimitive2D& >(rPrimitive); diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx index 8e820f61fbb2..283123621cee 100644 --- a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx @@ -167,7 +167,7 @@ namespace drawinglayer FillGradientPrimitive2D::FillGradientPrimitive2D( const basegfx::B2DRange& rObjectRange, const attribute::FillGradientAttribute& rFillGradient) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maObjectRange(rObjectRange), maFillGradient(rFillGradient) { @@ -175,7 +175,7 @@ namespace drawinglayer bool FillGradientPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const FillGradientPrimitive2D& rCompare = (FillGradientPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx index 42b8483fe172..1446e5677cdf 100644 --- a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx @@ -125,7 +125,7 @@ namespace drawinglayer const basegfx::B2DRange& rObjectRange, const basegfx::BColor& rBColor, const attribute::FillHatchAttribute& rFillHatch) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maObjectRange(rObjectRange), maFillHatch(rFillHatch), maBColor(rBColor) @@ -134,7 +134,7 @@ namespace drawinglayer bool FillHatchPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const FillHatchPrimitive2D& rCompare = (FillHatchPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index 94bd7befcda6..8f1e138d4ca4 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -379,7 +379,7 @@ namespace drawinglayer const basegfx::B2DHomMatrix& rTransform, const GraphicObject& rGraphicObject, const GraphicAttr& rGraphicAttr) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransform(rTransform), maGraphicObject(rGraphicObject), maGraphicAttr(rGraphicAttr) @@ -389,7 +389,7 @@ namespace drawinglayer GraphicPrimitive2D::GraphicPrimitive2D( const basegfx::B2DHomMatrix& rTransform, const GraphicObject& rGraphicObject) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransform(rTransform), maGraphicObject(rGraphicObject), maGraphicAttr() @@ -398,7 +398,7 @@ namespace drawinglayer bool GraphicPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const GraphicPrimitive2D& rCompare = (GraphicPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/gridprimitive2d.cxx b/drawinglayer/source/primitive2d/gridprimitive2d.cxx index 75ba4102da0b..083b5adefa9c 100644 --- a/drawinglayer/source/primitive2d/gridprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/gridprimitive2d.cxx @@ -248,7 +248,7 @@ namespace drawinglayer sal_uInt32 nSubdivisionsY, const basegfx::BColor& rBColor, const BitmapEx& rCrossMarker) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransform(rTransform), mfWidth(fWidth), mfHeight(fHeight), @@ -265,7 +265,7 @@ namespace drawinglayer bool GridPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const GridPrimitive2D& rCompare = (GridPrimitive2D&)rPrimitive; @@ -316,7 +316,7 @@ namespace drawinglayer } // use parent implementation - return BufDecPrimitive2D::get2DDecomposition(rViewInformation); + return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/drawinglayer/source/primitive2d/groupprimitive2d.cxx b/drawinglayer/source/primitive2d/groupprimitive2d.cxx index 018c786dff64..c9e2a1ea1438 100644 --- a/drawinglayer/source/primitive2d/groupprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/groupprimitive2d.cxx @@ -49,14 +49,8 @@ namespace drawinglayer { namespace primitive2d { - /// default: just return children, so all renderers not supporting group will use it's content - Primitive2DSequence GroupPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const - { - return getChildren(); - } - GroupPrimitive2D::GroupPrimitive2D( const Primitive2DSequence& rChildren ) - : BufDecPrimitive2D(), + : BasePrimitive2D(), maChildren(rChildren) { } @@ -67,7 +61,7 @@ namespace drawinglayer */ bool GroupPrimitive2D::operator==( const BasePrimitive2D& rPrimitive ) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BasePrimitive2D::operator==(rPrimitive)) { const GroupPrimitive2D& rCompare = static_cast< const GroupPrimitive2D& >(rPrimitive); @@ -77,6 +71,12 @@ namespace drawinglayer return false; } + /// default: just return children, so all renderers not supporting group will use it's content + Primitive2DSequence GroupPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + return getChildren(); + } + // provide unique ID ImplPrimitrive2DIDBlock(GroupPrimitive2D, PRIMITIVE2D_ID_GROUPPRIMITIVE2D) diff --git a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx index e676bc9764f8..3b67c7714796 100644 --- a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx @@ -56,7 +56,7 @@ namespace drawinglayer { Primitive2DSequence HelplinePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { - std::vector< BufDecPrimitive2D* > aTempPrimitiveTarget; + std::vector< BufferedDecompositionPrimitive2D* > aTempPrimitiveTarget; if(!rViewInformation.getViewport().isEmpty() && !getDirection().equalZero()) { @@ -167,7 +167,7 @@ namespace drawinglayer const basegfx::BColor& rRGBColA, const basegfx::BColor& rRGBColB, double fDiscreteDashLength) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maPosition(rPosition), maDirection(rDirection), meStyle(eStyle), @@ -181,7 +181,7 @@ namespace drawinglayer bool HelplinePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const HelplinePrimitive2D& rCompare = (HelplinePrimitive2D&)rPrimitive; @@ -217,7 +217,7 @@ namespace drawinglayer } // use parent implementation - return BufDecPrimitive2D::get2DDecomposition(rViewInformation); + return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/drawinglayer/source/primitive2d/hittestprimitive2d.cxx b/drawinglayer/source/primitive2d/hittestprimitive2d.cxx index ba48e7097bbe..137f8cf8ad5c 100644 --- a/drawinglayer/source/primitive2d/hittestprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/hittestprimitive2d.cxx @@ -49,12 +49,6 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence HitTestPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const - { - // return empty sequence - return Primitive2DSequence(); - } - HitTestPrimitive2D::HitTestPrimitive2D( const Primitive2DSequence& rChildren) : GroupPrimitive2D(rChildren) @@ -66,6 +60,12 @@ namespace drawinglayer return getB2DRangeFromPrimitive2DSequence(getChildren(), rViewInformation); } + Primitive2DSequence HitTestPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + // return empty sequence + return Primitive2DSequence(); + } + // provide unique ID ImplPrimitrive2DIDBlock(HitTestPrimitive2D, PRIMITIVE2D_ID_HITTESTPRIMITIVE2D) diff --git a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx index 0a6ce405e9a1..b61f5df4bb5f 100644 --- a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx @@ -100,7 +100,7 @@ namespace drawinglayer MarkerArrayPrimitive2D::MarkerArrayPrimitive2D( const std::vector< basegfx::B2DPoint >& rPositions, const BitmapEx& rMarker) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maPositions(rPositions), maMarker(rMarker) { @@ -108,7 +108,7 @@ namespace drawinglayer bool MarkerArrayPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const MarkerArrayPrimitive2D& rCompare = (MarkerArrayPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx index a4ad85d6c016..df95b7a87c29 100644 --- a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx @@ -114,7 +114,7 @@ namespace drawinglayer const rtl::OUString& rURL, const basegfx::BColor& rBackgroundColor, sal_uInt32 nDiscreteBorder) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransform(rTransform), maURL(rURL), maBackgroundColor(rBackgroundColor), @@ -124,7 +124,7 @@ namespace drawinglayer bool MediaPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const MediaPrimitive2D& rCompare = (MediaPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 411d2155e4c7..2d1c0428a6a3 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer MetafilePrimitive2D::MetafilePrimitive2D( const basegfx::B2DHomMatrix& rMetaFileTransform, const GDIMetaFile& rMetaFile) - : BufDecPrimitive2D(), + : BasePrimitive2D(), maMetaFileTransform(rMetaFileTransform), maMetaFile(rMetaFile) { @@ -61,7 +61,7 @@ namespace drawinglayer bool MetafilePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BasePrimitive2D::operator==(rPrimitive)) { const MetafilePrimitive2D& rCompare = (MetafilePrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx index 0ef988e7eb44..496415efdba4 100644 --- a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx @@ -56,7 +56,7 @@ namespace drawinglayer Primitive2DSequence PagePreviewPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval; - Primitive2DSequence aContent(getChildren()); + Primitive2DSequence aContent(getPageContent()); if(aContent.hasElements() && basegfx::fTools::more(getContentWidth(), 0.0) @@ -139,10 +139,11 @@ namespace drawinglayer const basegfx::B2DHomMatrix& rTransform, double fContentWidth, double fContentHeight, - const Primitive2DSequence& rChildren, + const Primitive2DSequence& rPageContent, bool bKeepAspectRatio) - : GroupPrimitive2D(rChildren), + : BufferedDecompositionPrimitive2D(), mxDrawPage(rxDrawPage), + maPageContent(rPageContent), maTransform(rTransform), mfContentWidth(fContentWidth), mfContentHeight(fContentHeight), @@ -152,11 +153,12 @@ namespace drawinglayer bool PagePreviewPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(GroupPrimitive2D::operator==(rPrimitive)) + if(BasePrimitive2D::operator==(rPrimitive)) { const PagePreviewPrimitive2D& rCompare = static_cast< const PagePreviewPrimitive2D& >(rPrimitive); return (getXDrawPage() == rCompare.getXDrawPage() + && getPageContent() == rCompare.getPageContent() && getTransform() == rCompare.getTransform() && getContentWidth() == rCompare.getContentWidth() && getContentHeight() == rCompare.getContentHeight() diff --git a/drawinglayer/source/primitive2d/pointarrayprimitive2d.cxx b/drawinglayer/source/primitive2d/pointarrayprimitive2d.cxx index e5cbaf9721a0..d144fd7030e6 100644 --- a/drawinglayer/source/primitive2d/pointarrayprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/pointarrayprimitive2d.cxx @@ -52,7 +52,7 @@ namespace drawinglayer PointArrayPrimitive2D::PointArrayPrimitive2D( const std::vector< basegfx::B2DPoint >& rPositions, const basegfx::BColor& rRGBColor) - : BufDecPrimitive2D(), + : BasePrimitive2D(), maPositions(rPositions), maRGBColor(rRGBColor), maB2DRange() @@ -61,7 +61,7 @@ namespace drawinglayer bool PointArrayPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BasePrimitive2D::operator==(rPrimitive)) { const PointArrayPrimitive2D& rCompare = (PointArrayPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx index 10d153362e6e..4a3678645571 100644 --- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx @@ -57,7 +57,7 @@ namespace drawinglayer PolygonHairlinePrimitive2D::PolygonHairlinePrimitive2D( const basegfx::B2DPolygon& rPolygon, const basegfx::BColor& rBColor) - : BufDecPrimitive2D(), + : BasePrimitive2D(), maPolygon(rPolygon), maBColor(rBColor) { @@ -65,7 +65,7 @@ namespace drawinglayer bool PolygonHairlinePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BasePrimitive2D::operator==(rPrimitive)) { const PolygonHairlinePrimitive2D& rCompare = (PolygonHairlinePrimitive2D&)rPrimitive; @@ -147,7 +147,7 @@ namespace drawinglayer const basegfx::BColor& rRGBColorA, const basegfx::BColor& rRGBColorB, double fDiscreteDashLength) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maPolygon(rPolygon), maRGBColorA(rRGBColorA), maRGBColorB(rRGBColorB), @@ -158,7 +158,7 @@ namespace drawinglayer bool PolygonMarkerPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const PolygonMarkerPrimitive2D& rCompare = (PolygonMarkerPrimitive2D&)rPrimitive; @@ -220,7 +220,7 @@ namespace drawinglayer } // use parent implementation - return BufDecPrimitive2D::get2DDecomposition(rViewInformation); + return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID @@ -307,7 +307,7 @@ namespace drawinglayer const basegfx::B2DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maPolygon(rPolygon), maLineAttribute(rLineAttribute), maStrokeAttribute(rStrokeAttribute) @@ -317,7 +317,7 @@ namespace drawinglayer PolygonStrokePrimitive2D::PolygonStrokePrimitive2D( const basegfx::B2DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maPolygon(rPolygon), maLineAttribute(rLineAttribute), maStrokeAttribute() @@ -326,7 +326,7 @@ namespace drawinglayer bool PolygonStrokePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const PolygonStrokePrimitive2D& rCompare = (PolygonStrokePrimitive2D&)rPrimitive; @@ -348,7 +348,7 @@ namespace drawinglayer { // if line is mitered, use parent call since mitered line // geometry may use more space than the geometry grown by half line width - aRetval = BufDecPrimitive2D::getB2DRange(rViewInformation); + aRetval = BufferedDecompositionPrimitive2D::getB2DRange(rViewInformation); } else { @@ -614,7 +614,7 @@ namespace drawinglayer if(getStart().isActive() || getEnd().isActive()) { // use decomposition when line start/end is used - return BufDecPrimitive2D::getB2DRange(rViewInformation); + return BufferedDecompositionPrimitive2D::getB2DRange(rViewInformation); } else { diff --git a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx index 9c728cec4f56..163c3a8691aa 100644 --- a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx @@ -80,7 +80,7 @@ namespace drawinglayer } PolyPolygonHairlinePrimitive2D::PolyPolygonHairlinePrimitive2D(const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maPolyPolygon(rPolyPolygon), maBColor(rBColor) { @@ -88,7 +88,7 @@ namespace drawinglayer bool PolyPolygonHairlinePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const PolyPolygonHairlinePrimitive2D& rCompare = (PolyPolygonHairlinePrimitive2D&)rPrimitive; @@ -144,7 +144,7 @@ namespace drawinglayer const basegfx::BColor& rRGBColorA, const basegfx::BColor& rRGBColorB, double fDiscreteDashLength) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maPolyPolygon(rPolyPolygon), maRGBColorA(rRGBColorA), maRGBColorB(rRGBColorB), @@ -154,7 +154,7 @@ namespace drawinglayer bool PolyPolygonMarkerPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const PolyPolygonMarkerPrimitive2D& rCompare = (PolyPolygonMarkerPrimitive2D&)rPrimitive; @@ -211,7 +211,7 @@ namespace drawinglayer const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maPolyPolygon(rPolyPolygon), maLineAttribute(rLineAttribute), maStrokeAttribute(rStrokeAttribute) @@ -221,7 +221,7 @@ namespace drawinglayer PolyPolygonStrokePrimitive2D::PolyPolygonStrokePrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::LineAttribute& rLineAttribute) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maPolyPolygon(rPolyPolygon), maLineAttribute(rLineAttribute), maStrokeAttribute() @@ -230,7 +230,7 @@ namespace drawinglayer bool PolyPolygonStrokePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const PolyPolygonStrokePrimitive2D& rCompare = (PolyPolygonStrokePrimitive2D&)rPrimitive; @@ -343,7 +343,7 @@ namespace drawinglayer if(getStart().isActive() || getEnd().isActive()) { // use decomposition when line start/end is used - return BufDecPrimitive2D::getB2DRange(rViewInformation); + return BufferedDecompositionPrimitive2D::getB2DRange(rViewInformation); } else { @@ -367,7 +367,7 @@ namespace drawinglayer PolyPolygonColorPrimitive2D::PolyPolygonColorPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor) - : BufDecPrimitive2D(), + : BasePrimitive2D(), maPolyPolygon(rPolyPolygon), maBColor(rBColor) { @@ -375,7 +375,7 @@ namespace drawinglayer bool PolyPolygonColorPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BasePrimitive2D::operator==(rPrimitive)) { const PolyPolygonColorPrimitive2D& rCompare = (PolyPolygonColorPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/primitivetools2d.cxx b/drawinglayer/source/primitive2d/primitivetools2d.cxx index 2f8a1edcd5c5..b441bb1b89ff 100644 --- a/drawinglayer/source/primitive2d/primitivetools2d.cxx +++ b/drawinglayer/source/primitive2d/primitivetools2d.cxx @@ -66,7 +66,7 @@ namespace drawinglayer } // call base implementation - return BufDecPrimitive2D::get2DDecomposition(rViewInformation); + return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation); } } // end of namespace primitive2d } // end of namespace drawinglayer @@ -97,7 +97,7 @@ namespace drawinglayer } // call base implementation - return BufDecPrimitive2D::get2DDecomposition(rViewInformation); + return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation); } } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx index ba5f747c2dce..935b5a14c2d9 100644 --- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx @@ -298,7 +298,7 @@ namespace drawinglayer const attribute::SdrLightingAttribute& rSdrLightingAttribute, const basegfx::B2DHomMatrix& rObjectTransformation, const geometry::ViewInformation3D& rViewInformation3D) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), mxChildren3D(rxChildren3D), maSdrSceneAttribute(rSdrSceneAttribute), maSdrLightingAttribute(rSdrLightingAttribute), @@ -314,7 +314,7 @@ namespace drawinglayer bool ScenePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const ScenePrimitive2D& rCompare = (ScenePrimitive2D&)rPrimitive; @@ -411,7 +411,7 @@ namespace drawinglayer } // use parent implementation - return BufDecPrimitive2D::get2DDecomposition(rViewInformation); + return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx index e0f987c70958..b6ce7dc3248d 100644 --- a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx @@ -55,25 +55,6 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence ShadowPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const - { - Primitive2DSequence aRetval; - - if(getChildren().hasElements()) - { - // create a modifiedColorPrimitive containing the shadow color and the content - const basegfx::BColorModifier aBColorModifier(getShadowColor()); - const Primitive2DReference xRefA(new ModifiedColorPrimitive2D(getChildren(), aBColorModifier)); - const Primitive2DSequence aSequenceB(&xRefA, 1L); - - // build transformed primitiveVector with shadow offset and add to target - const Primitive2DReference xRefB(new TransformPrimitive2D(getShadowTransform(), aSequenceB)); - aRetval = Primitive2DSequence(&xRefB, 1L); - } - - return aRetval; - } - ShadowPrimitive2D::ShadowPrimitive2D( const basegfx::B2DHomMatrix& rShadowTransform, const basegfx::BColor& rShadowColor, @@ -86,7 +67,7 @@ namespace drawinglayer bool ShadowPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(GroupPrimitive2D::operator==(rPrimitive)) + if(BasePrimitive2D::operator==(rPrimitive)) { const ShadowPrimitive2D& rCompare = static_cast< const ShadowPrimitive2D& >(rPrimitive); @@ -104,6 +85,25 @@ namespace drawinglayer return aRetval; } + Primitive2DSequence ShadowPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + Primitive2DSequence aRetval; + + if(getChildren().hasElements()) + { + // create a modifiedColorPrimitive containing the shadow color and the content + const basegfx::BColorModifier aBColorModifier(getShadowColor()); + const Primitive2DReference xRefA(new ModifiedColorPrimitive2D(getChildren(), aBColorModifier)); + const Primitive2DSequence aSequenceB(&xRefA, 1L); + + // build transformed primitiveVector with shadow offset and add to target + const Primitive2DReference xRefB(new TransformPrimitive2D(getShadowTransform(), aSequenceB)); + aRetval = Primitive2DSequence(&xRefB, 1L); + } + + return aRetval; + } + // provide unique ID ImplPrimitrive2DIDBlock(ShadowPrimitive2D, PRIMITIVE2D_ID_SHADOWPRIMITIVE2D) diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx index a78acd6bde31..695c92d2b951 100644 --- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx @@ -822,10 +822,10 @@ namespace drawinglayer if(bDecoratedIsNeeded) { - // decoration is used, fallback to BufDecPrimitive2D::getB2DRange which uses + // decoration is used, fallback to BufferedDecompositionPrimitive2D::getB2DRange which uses // the own local decomposition for computation and thus creates all necessary // geometric objects - return BufDecPrimitive2D::getB2DRange(rViewInformation); + return BufferedDecompositionPrimitive2D::getB2DRange(rViewInformation); } else { diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx index 9d4b01270369..22e51ae6f630 100644 --- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx @@ -104,22 +104,22 @@ namespace drawinglayer { // emboss/engrave in black, original forced to white const basegfx::BColorModifier aBColorModifierToGray(basegfx::BColor(0.0)); - const Primitive2DReference xModifiedColor(new ModifiedColorPrimitive2D(getChildren(), aBColorModifierToGray)); + const Primitive2DReference xModifiedColor(new ModifiedColorPrimitive2D(getTextContent(), aBColorModifierToGray)); aRetval[0] = Primitive2DReference(new TransformPrimitive2D(aTransform, Primitive2DSequence(&xModifiedColor, 1))); // add original, too const basegfx::BColorModifier aBColorModifierToWhite(basegfx::BColor(1.0)); - aRetval[1] = Primitive2DReference(new ModifiedColorPrimitive2D(getChildren(), aBColorModifierToWhite)); + aRetval[1] = Primitive2DReference(new ModifiedColorPrimitive2D(getTextContent(), aBColorModifierToWhite)); } else { // emboss/engrave in gray, keep original's color const basegfx::BColorModifier aBColorModifierToGray(basegfx::BColor(0.75)); // 192 - const Primitive2DReference xModifiedColor(new ModifiedColorPrimitive2D(getChildren(), aBColorModifierToGray)); + const Primitive2DReference xModifiedColor(new ModifiedColorPrimitive2D(getTextContent(), aBColorModifierToGray)); aRetval[0] = Primitive2DReference(new TransformPrimitive2D(aTransform, Primitive2DSequence(&xModifiedColor, 1))); // add original, too - aRetval[1] = Primitive2DReference(new GroupPrimitive2D(getChildren())); + aRetval[1] = Primitive2DReference(new GroupPrimitive2D(getTextContent())); } break; @@ -132,39 +132,39 @@ namespace drawinglayer aTransform.set(0, 2, aDistance.getX()); aTransform.set(1, 2, 0.0); - aRetval[0] = Primitive2DReference(new TransformPrimitive2D(aTransform, getChildren())); + aRetval[0] = Primitive2DReference(new TransformPrimitive2D(aTransform, getTextContent())); aTransform.set(0, 2, aDiagonalDistance.getX()); aTransform.set(1, 2, aDiagonalDistance.getY()); - aRetval[1] = Primitive2DReference(new TransformPrimitive2D(aTransform, getChildren())); + aRetval[1] = Primitive2DReference(new TransformPrimitive2D(aTransform, getTextContent())); aTransform.set(0, 2, 0.0); aTransform.set(1, 2, aDistance.getY()); - aRetval[2] = Primitive2DReference(new TransformPrimitive2D(aTransform, getChildren())); + aRetval[2] = Primitive2DReference(new TransformPrimitive2D(aTransform, getTextContent())); aTransform.set(0, 2, -aDiagonalDistance.getX()); aTransform.set(1, 2, aDiagonalDistance.getY()); - aRetval[3] = Primitive2DReference(new TransformPrimitive2D(aTransform, getChildren())); + aRetval[3] = Primitive2DReference(new TransformPrimitive2D(aTransform, getTextContent())); aTransform.set(0, 2, -aDistance.getX()); aTransform.set(1, 2, 0.0); - aRetval[4] = Primitive2DReference(new TransformPrimitive2D(aTransform, getChildren())); + aRetval[4] = Primitive2DReference(new TransformPrimitive2D(aTransform, getTextContent())); aTransform.set(0, 2, -aDiagonalDistance.getX()); aTransform.set(1, 2, -aDiagonalDistance.getY()); - aRetval[5] = Primitive2DReference(new TransformPrimitive2D(aTransform, getChildren())); + aRetval[5] = Primitive2DReference(new TransformPrimitive2D(aTransform, getTextContent())); aTransform.set(0, 2, 0.0); aTransform.set(1, 2, -aDistance.getY()); - aRetval[6] = Primitive2DReference(new TransformPrimitive2D(aTransform, getChildren())); + aRetval[6] = Primitive2DReference(new TransformPrimitive2D(aTransform, getTextContent())); aTransform.set(0, 2, aDiagonalDistance.getX()); aTransform.set(1, 2, -aDiagonalDistance.getY()); - aRetval[7] = Primitive2DReference(new TransformPrimitive2D(aTransform, getChildren())); + aRetval[7] = Primitive2DReference(new TransformPrimitive2D(aTransform, getTextContent())); // at last, place original over it, but force to white const basegfx::BColorModifier aBColorModifierToWhite(basegfx::BColor(1.0, 1.0, 1.0)); - aRetval[8] = Primitive2DReference(new ModifiedColorPrimitive2D(getChildren(), aBColorModifierToWhite)); + aRetval[8] = Primitive2DReference(new ModifiedColorPrimitive2D(getTextContent(), aBColorModifierToWhite)); break; } @@ -174,11 +174,12 @@ namespace drawinglayer } TextEffectPrimitive2D::TextEffectPrimitive2D( - const Primitive2DSequence& rChildren, + const Primitive2DSequence& rTextContent, const basegfx::B2DPoint& rRotationCenter, double fDirection, TextEffectStyle2D eTextEffectStyle2D) - : GroupPrimitive2D(rChildren), + : BufferedDecompositionPrimitive2D(), + maTextContent(rTextContent), maRotationCenter(rRotationCenter), mfDirection(fDirection), meTextEffectStyle2D(eTextEffectStyle2D) @@ -187,11 +188,12 @@ namespace drawinglayer bool TextEffectPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(GroupPrimitive2D::operator==(rPrimitive)) + if(BasePrimitive2D::operator==(rPrimitive)) { const TextEffectPrimitive2D& rCompare = (TextEffectPrimitive2D&)rPrimitive; - return (getRotationCenter() == rCompare.getRotationCenter() + return (getTextContent() == rCompare.getTextContent() + && getRotationCenter() == rCompare.getRotationCenter() && getDirection() == rCompare.getDirection() && getTextEffectStyle2D() == rCompare.getTextEffectStyle2D()); } @@ -206,7 +208,7 @@ namespace drawinglayer // then will ask 9 times at nearly the same content. This may even be refined here using the // TextEffectStyle information, e.g. for TEXTEFFECTSTYLE2D_RELIEF the grow needs only to // be in two directions - basegfx::B2DRange aRetval(getB2DRangeFromPrimitive2DSequence(getChildren(), rViewInformation)); + basegfx::B2DRange aRetval(getB2DRangeFromPrimitive2DSequence(getTextContent(), rViewInformation)); aRetval.grow(fDiscreteSize); return aRetval; @@ -232,7 +234,7 @@ namespace drawinglayer } // use parent implementation - return BufDecPrimitive2D::get2DDecomposition(rViewInformation); + return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx index e14f3fd714df..b74c4eabf898 100644 --- a/drawinglayer/source/primitive2d/textprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx @@ -241,7 +241,7 @@ namespace drawinglayer const FontAttributes& rFontAttributes, const ::com::sun::star::lang::Locale& rLocale, const basegfx::BColor& rFontColor) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTextTransform(rNewTransform), maText(rText), maTextPosition(aTextPosition), @@ -268,7 +268,7 @@ namespace drawinglayer bool TextSimplePortionPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const TextSimplePortionPrimitive2D& rCompare = (TextSimplePortionPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/unifiedalphaprimitive2d.cxx b/drawinglayer/source/primitive2d/unifiedalphaprimitive2d.cxx index a17431597356..a66ac0f3a539 100644 --- a/drawinglayer/source/primitive2d/unifiedalphaprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/unifiedalphaprimitive2d.cxx @@ -55,7 +55,27 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence UnifiedAlphaPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + UnifiedAlphaPrimitive2D::UnifiedAlphaPrimitive2D( + const Primitive2DSequence& rChildren, + double fAlpha) + : GroupPrimitive2D(rChildren), + mfAlpha(fAlpha) + { + } + + bool UnifiedAlphaPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const + { + if(GroupPrimitive2D::operator==(rPrimitive)) + { + const UnifiedAlphaPrimitive2D& rCompare = (UnifiedAlphaPrimitive2D&)rPrimitive; + + return (getAlpha() == rCompare.getAlpha()); + } + + return false; + } + + Primitive2DSequence UnifiedAlphaPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { if(0.0 == getAlpha()) { @@ -99,26 +119,6 @@ namespace drawinglayer } } - UnifiedAlphaPrimitive2D::UnifiedAlphaPrimitive2D( - const Primitive2DSequence& rChildren, - double fAlpha) - : GroupPrimitive2D(rChildren), - mfAlpha(fAlpha) - { - } - - bool UnifiedAlphaPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const - { - if(GroupPrimitive2D::operator==(rPrimitive)) - { - const UnifiedAlphaPrimitive2D& rCompare = (UnifiedAlphaPrimitive2D&)rPrimitive; - - return (getAlpha() == rCompare.getAlpha()); - } - - return false; - } - // provide unique ID ImplPrimitrive2DIDBlock(UnifiedAlphaPrimitive2D, PRIMITIVE2D_ID_UNIFIEDALPHAPRIMITIVE2D) diff --git a/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx b/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx index 756a52ea7d2b..07022229bfa8 100644 --- a/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx @@ -97,7 +97,7 @@ namespace drawinglayer double fStart, double fStop, const basegfx::BColor& rColor) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransformation(rTransformation), mfStart(fStart), mfStop(fStop), @@ -107,7 +107,7 @@ namespace drawinglayer bool WrongSpellPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const WrongSpellPrimitive2D& rCompare = (WrongSpellPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx index 3e723008148e..a0d202dc9dbe 100644 --- a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx @@ -76,7 +76,7 @@ namespace drawinglayer if(xReference.is()) { - // try to cast to BufDecPrimitive2D implementation + // try to cast to BufferedDecompositionPrimitive2D implementation const BufDecPrimitive3D* pBasePrimitive = dynamic_cast< const BufDecPrimitive3D* >(xReference.get()); if(pBasePrimitive) diff --git a/drawinglayer/source/processor2d/baseprocessor2d.cxx b/drawinglayer/source/processor2d/baseprocessor2d.cxx index d20eca83fc7e..28023c8b253f 100644 --- a/drawinglayer/source/processor2d/baseprocessor2d.cxx +++ b/drawinglayer/source/processor2d/baseprocessor2d.cxx @@ -74,12 +74,12 @@ namespace drawinglayer if(xReference.is()) { - // try to cast to BufDecPrimitive2D implementation - const primitive2d::BufDecPrimitive2D* pBasePrimitive = dynamic_cast< const primitive2d::BufDecPrimitive2D* >(xReference.get()); + // try to cast to BufferedDecompositionPrimitive2D implementation + const primitive2d::BufferedDecompositionPrimitive2D* pBasePrimitive = dynamic_cast< const primitive2d::BufferedDecompositionPrimitive2D* >(xReference.get()); if(pBasePrimitive) { - // it is a BufDecPrimitive2D implementation, use local processor + // it is a BufferedDecompositionPrimitive2D implementation, use local processor processBasePrimitive2D(*pBasePrimitive); } else diff --git a/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx index d7beffc7cd8c..26ce0fc0673a 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrCaptionPrimitive2D : public BufDecPrimitive2D + class SdrCaptionPrimitive2D : public BufferedDecompositionPrimitive2D { private: ::basegfx::B2DHomMatrix maTransform; diff --git a/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx index a6bf4b9b090e..a7465c1c7a4a 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx @@ -45,7 +45,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrConnectorPrimitive2D : public BufDecPrimitive2D + class SdrConnectorPrimitive2D : public BufferedDecompositionPrimitive2D { private: attribute::SdrLineShadowTextAttribute maSdrLSTAttribute; diff --git a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx index aeb435f57a48..64716b479ce7 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx @@ -45,7 +45,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrCustomShapePrimitive2D : public BufDecPrimitive2D + class SdrCustomShapePrimitive2D : public BufferedDecompositionPrimitive2D { private: attribute::SdrShadowTextAttribute maSdrSTAttribute; diff --git a/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx index a274bd3cc77b..bcaf0aa22ea0 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx @@ -45,7 +45,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrEllipsePrimitive2D : public BufDecPrimitive2D + class SdrEllipsePrimitive2D : public BufferedDecompositionPrimitive2D { private: ::basegfx::B2DHomMatrix maTransform; diff --git a/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx index 3735598179a7..c3cdf4080f84 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrGrafPrimitive2D : public BufDecPrimitive2D + class SdrGrafPrimitive2D : public BufferedDecompositionPrimitive2D { private: ::basegfx::B2DHomMatrix maTransform; diff --git a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx index 6b50b82e82e6..7244e4d2a743 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx @@ -59,7 +59,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrMeasurePrimitive2D : public BufDecPrimitive2D + class SdrMeasurePrimitive2D : public BufferedDecompositionPrimitive2D { private: attribute::SdrLineShadowTextAttribute maSdrLSTAttribute; diff --git a/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx index ff0b0e75b6a4..7fcde5221f87 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx @@ -32,7 +32,7 @@ #ifndef INCLUDED_SDR_PRIMITIVE2D_SDROLE2PRIMITIVE2D_HXX #define INCLUDED_SDR_PRIMITIVE2D_SDROLE2PRIMITIVE2D_HXX -#include +#include #include #include #include @@ -46,10 +46,11 @@ namespace drawinglayer { namespace primitive2d { - class SdrOle2Primitive2D : public GroupPrimitive2D + class SdrOle2Primitive2D : public BasePrimitive2D { private: - ::basegfx::B2DHomMatrix maTransform; + Primitive2DSequence maOLEContent; + basegfx::B2DHomMatrix maTransform; attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; protected: @@ -58,12 +59,13 @@ namespace drawinglayer public: SdrOle2Primitive2D( - const Primitive2DSequence& rChildren, - const ::basegfx::B2DHomMatrix& rTransform, + const Primitive2DSequence& rOLEContent, + const basegfx::B2DHomMatrix& rTransform, const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute); // data access - const ::basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + const Primitive2DSequence& getOLEContent() const { return maOLEContent; } + const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } const attribute::SdrLineFillShadowTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } // compare operator diff --git a/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx index 93d674b34fcf..c6349fe7d39c 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrOleContentPrimitive2D : public BufDecPrimitive2D + class SdrOleContentPrimitive2D : public BufferedDecompositionPrimitive2D { private: SdrObjectWeakRef mpSdrOle2Obj; diff --git a/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx index 744b512a3efa..bb0731cea3d1 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrPathPrimitive2D : public BufDecPrimitive2D + class SdrPathPrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DHomMatrix maTransform; diff --git a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx index 316840ecedfc..1a34d4b35a28 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrRectanglePrimitive2D : public BufDecPrimitive2D + class SdrRectanglePrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DHomMatrix maTransform; diff --git a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx index 5f1cf3ebf251..35b0f42eaa6e 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx @@ -51,7 +51,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrTextPrimitive2D : public BufDecPrimitive2D + class SdrTextPrimitive2D : public BufferedDecompositionPrimitive2D { private: // The text model data; this sould later just be the OutlinerParaObject or diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx index 57f8afb08a05..6b6e4e5e641a 100644 --- a/svx/source/sdr/contact/viewobjectcontact.cxx +++ b/svx/source/sdr/contact/viewobjectcontact.cxx @@ -78,7 +78,7 @@ namespace unsigned mbGraphicAnimationAllowed : 1; // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufDecPrimitive2D-based. + // virtual render method when the primitive implementation is BufferedDecompositionPrimitive2D-based. virtual void processBasePrimitive2D(const drawinglayer::primitive2d::BasePrimitive2D& rCandidate); public: diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 37ae3200d338..652b9f5ee56f 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -778,10 +778,10 @@ namespace sdr { namespace contact { //==================================================================== //= LazyControlCreationPrimitive2D //==================================================================== - class LazyControlCreationPrimitive2D : public ::drawinglayer::primitive2d::BufDecPrimitive2D + class LazyControlCreationPrimitive2D : public ::drawinglayer::primitive2d::BufferedDecompositionPrimitive2D { private: - typedef ::drawinglayer::primitive2d::BufDecPrimitive2D BufDecPrimitive2D; + typedef ::drawinglayer::primitive2d::BufferedDecompositionPrimitive2D BufferedDecompositionPrimitive2D; protected: virtual ::drawinglayer::primitive2d::Primitive2DSequence @@ -1432,7 +1432,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- bool LazyControlCreationPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if ( !BufDecPrimitive2D::operator==( rPrimitive ) ) + if ( !BufferedDecompositionPrimitive2D::operator==( rPrimitive ) ) return false; const LazyControlCreationPrimitive2D* pRHS = dynamic_cast< const LazyControlCreationPrimitive2D* >( &rPrimitive ); @@ -1482,7 +1482,7 @@ namespace sdr { namespace contact { { if ( m_pVOCImpl->hasControl() ) m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() ); - return BufDecPrimitive2D::get2DDecomposition( _rViewInformation ); + return BufferedDecompositionPrimitive2D::get2DDecomposition( _rViewInformation ); } //-------------------------------------------------------------------- diff --git a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx index 41016688ee54..8fb3ba8790bc 100644 --- a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx @@ -141,7 +141,7 @@ namespace drawinglayer const basegfx::B2DPolygon& rTail, double fCornerRadiusX, double fCornerRadiusY) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransform(rTransform), maSdrLFSTAttribute(rSdrLFSTAttribute), maTail(rTail), @@ -159,7 +159,7 @@ namespace drawinglayer bool SdrCaptionPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SdrCaptionPrimitive2D& rCompare = (SdrCaptionPrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx index 96f476315efa..406ddc4986e5 100644 --- a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx @@ -87,7 +87,7 @@ namespace drawinglayer SdrConnectorPrimitive2D::SdrConnectorPrimitive2D( const attribute::SdrLineShadowTextAttribute& rSdrLSTAttribute, const ::basegfx::B2DPolygon& rUnitPolygon) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maSdrLSTAttribute(rSdrLSTAttribute), maUnitPolygon(rUnitPolygon) { @@ -95,7 +95,7 @@ namespace drawinglayer bool SdrConnectorPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SdrConnectorPrimitive2D& rCompare = (SdrConnectorPrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx index bc7e13f8afe2..01002e133f84 100644 --- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx @@ -73,7 +73,7 @@ namespace drawinglayer const Primitive2DSequence& rSubPrimitives, const basegfx::B2DHomMatrix& rTextBox, bool bWordWrap) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maSdrSTAttribute(rSdrSTAttribute), maSubPrimitives(rSubPrimitives), maTextBox(rTextBox), @@ -83,7 +83,7 @@ namespace drawinglayer bool SdrCustomShapePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SdrCustomShapePrimitive2D& rCompare = (SdrCustomShapePrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 4140373c8e86..639ec09f6a34 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -75,7 +75,7 @@ namespace drawinglayer // prepare fully scaled polygon basegfx::B2DPolyPolygon aScaledPolyPolygon(rUnitPolyPolygon); aScaledPolyPolygon.transform(rObjectTransform); - BufDecPrimitive2D* pNewFillPrimitive = 0L; + BasePrimitive2D* pNewFillPrimitive = 0; if(rFill.isGradient()) { @@ -137,7 +137,7 @@ namespace drawinglayer // create line and stroke attribute const attribute::LineAttribute aLineAttribute(rLine.getColor(), rLine.getWidth(), rLine.getJoin()); const attribute::StrokeAttribute aStrokeAttribute(rLine.getDotDashArray(), rLine.getFullDotDashLen()); - BufDecPrimitive2D* pNewLinePrimitive = 0L; + BufferedDecompositionPrimitive2D* pNewLinePrimitive = 0L; if(!rUnitPolygon.isClosed() && pStroke) { diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx index 674eaa0ea9c2..8aa644da938e 100644 --- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx @@ -109,7 +109,7 @@ namespace drawinglayer SdrEllipsePrimitive2D::SdrEllipsePrimitive2D( const ::basegfx::B2DHomMatrix& rTransform, const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransform(rTransform), maSdrLFSTAttribute(rSdrLFSTAttribute) { @@ -117,7 +117,7 @@ namespace drawinglayer bool SdrEllipsePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SdrEllipsePrimitive2D& rCompare = (SdrEllipsePrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx index 2ffc70d5ebc7..3cc4e7b865d4 100644 --- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx @@ -121,7 +121,7 @@ namespace drawinglayer const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, const GraphicObject& rGraphicObject, const GraphicAttr& rGraphicAttr) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransform(rTransform), maSdrLFSTAttribute(rSdrLFSTAttribute), maGraphicObject(rGraphicObject), @@ -133,7 +133,7 @@ namespace drawinglayer bool SdrGrafPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SdrGrafPrimitive2D& rCompare = (SdrGrafPrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index 5b4a69f4a548..1fcd1047c5ef 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -454,7 +454,7 @@ namespace drawinglayer bool bBelow, bool bTextRotation, bool bTextAutoAngle) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maSdrLSTAttribute(rSdrLSTAttribute), maStart(rStart), maEnd(rEnd), @@ -473,7 +473,7 @@ namespace drawinglayer bool SdrMeasurePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SdrMeasurePrimitive2D& rCompare = (SdrMeasurePrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx index 7e96ef32772e..78978202f20b 100644 --- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx @@ -104,7 +104,7 @@ namespace drawinglayer } // add graphic content - appendPrimitive2DSequenceToPrimitive2DSequence(aRetval, getChildren()); + appendPrimitive2DSequenceToPrimitive2DSequence(aRetval, getOLEContent()); // add text, no need to supress to stay compatible since text was // always supported by the old paints, too @@ -123,10 +123,11 @@ namespace drawinglayer } SdrOle2Primitive2D::SdrOle2Primitive2D( - const Primitive2DSequence& rChildren, - const ::basegfx::B2DHomMatrix& rTransform, + const Primitive2DSequence& rOLEContent, + const basegfx::B2DHomMatrix& rTransform, const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute) - : GroupPrimitive2D(rChildren), + : BasePrimitive2D(), + maOLEContent(rOLEContent), maTransform(rTransform), maSdrLFSTAttribute(rSdrLFSTAttribute) { @@ -134,11 +135,12 @@ namespace drawinglayer bool SdrOle2Primitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(GroupPrimitive2D::operator==(rPrimitive)) + if(BasePrimitive2D::operator==(rPrimitive)) { const SdrOle2Primitive2D& rCompare = (SdrOle2Primitive2D&)rPrimitive; - if(getTransform() == rCompare.getTransform() + if(getOLEContent() == rCompare.getOLEContent() + && getTransform() == rCompare.getTransform() && getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute()) { return true; diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx index 97468bc6da2f..a2039e1923fa 100644 --- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx @@ -158,7 +158,7 @@ namespace drawinglayer const SdrOle2Obj& rSdrOle2Obj, const basegfx::B2DHomMatrix& rObjectTransform, bool bHighContrast) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), mpSdrOle2Obj(const_cast< SdrOle2Obj* >(&rSdrOle2Obj)), maObjectTransform(rObjectTransform), mbHighContrast(bHighContrast) @@ -167,7 +167,7 @@ namespace drawinglayer bool SdrOleContentPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SdrOleContentPrimitive2D& rCompare = (SdrOleContentPrimitive2D&)rPrimitive; const bool bBothNot(!mpSdrOle2Obj.is() && !rCompare.mpSdrOle2Obj.is()); diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx index 5174cad712e8..7e18afafb5f2 100644 --- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx @@ -105,7 +105,7 @@ namespace drawinglayer const basegfx::B2DHomMatrix& rTransform, const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, const basegfx::B2DPolyPolygon& rUnitPolyPolygon) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransform(rTransform), maSdrLFSTAttribute(rSdrLFSTAttribute), maUnitPolyPolygon(rUnitPolyPolygon) @@ -114,7 +114,7 @@ namespace drawinglayer bool SdrPathPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SdrPathPrimitive2D& rCompare = (SdrPathPrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx index 2f91466d1d2f..04e02be419fa 100644 --- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx @@ -128,7 +128,7 @@ namespace drawinglayer double fCornerRadiusX, double fCornerRadiusY, bool bTextFrame) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransform(rTransform), maSdrLFSTAttribute(rSdrLFSTAttribute), mfCornerRadiusX(fCornerRadiusX), @@ -139,7 +139,7 @@ namespace drawinglayer bool SdrRectanglePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SdrRectanglePrimitive2D& rCompare = (SdrRectanglePrimitive2D&)rPrimitive; diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index 08944592f028..012928fec8d0 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -109,7 +109,7 @@ namespace drawinglayer SdrTextPrimitive2D::SdrTextPrimitive2D( const SdrText* pSdrText, const OutlinerParaObject& rOutlinerParaObject) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), mrSdrText(const_cast< SdrText* >(pSdrText)), maOutlinerParaObject(rOutlinerParaObject), mxLastVisualizingPage(), @@ -133,7 +133,7 @@ namespace drawinglayer bool SdrTextPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SdrTextPrimitive2D& rCompare = (SdrTextPrimitive2D&)rPrimitive; @@ -244,7 +244,7 @@ namespace drawinglayer } // call parent - return BufDecPrimitive2D::get2DDecomposition(rViewInformation); + return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation); } } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 484bca5157c4..76c29de8d480 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -66,7 +66,7 @@ namespace { - drawinglayer::primitive2d::Primitive2DSequence impConvertVectorToPrimitive2DSequence(const std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* >& rPrimitiveVector) + drawinglayer::primitive2d::Primitive2DSequence impConvertVectorToPrimitive2DSequence(const std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rPrimitiveVector) { const sal_Int32 nCount(rPrimitiveVector.size()); drawinglayer::primitive2d::Primitive2DSequence aRetval(nCount); @@ -108,9 +108,9 @@ namespace class impTextBreakupHandler { private: - std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* > maTextPortionPrimitives; - std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* > maLinePrimitives; - std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* > maParagraphPrimitives; + std::vector< drawinglayer::primitive2d::BasePrimitive2D* > maTextPortionPrimitives; + std::vector< drawinglayer::primitive2d::BasePrimitive2D* > maLinePrimitives; + std::vector< drawinglayer::primitive2d::BasePrimitive2D* > maParagraphPrimitives; SdrOutliner& mrOutliner; basegfx::B2DHomMatrix maNewTransformA; @@ -129,7 +129,7 @@ namespace bool impIsUnderlineAbove(const Font& rFont) const; void impCreateTextPortionPrimitive(const DrawPortionInfo& rInfo); - drawinglayer::primitive2d::BufDecPrimitive2D* impCheckFieldPrimitive(drawinglayer::primitive2d::BufDecPrimitive2D* pPrimitive, const DrawPortionInfo& rInfo) const; + drawinglayer::primitive2d::BasePrimitive2D* impCheckFieldPrimitive(drawinglayer::primitive2d::BasePrimitive2D* pPrimitive, const DrawPortionInfo& rInfo) const; void impFlushTextPortionPrimitivesToLinePrimitives(); void impFlushLinePrimitivesToParagraphPrimitives(); void impHandleDrawPortionInfo(const DrawPortionInfo& rInfo); @@ -288,7 +288,7 @@ namespace const basegfx::BColor aBFontColor(aFontColor.getBColor()); // prepare new primitive - drawinglayer::primitive2d::BufDecPrimitive2D* pNewPrimitive = 0; + drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = 0; const bool bDecoratedIsNeeded( UNDERLINE_NONE != rInfo.mrFont.GetOverline() || UNDERLINE_NONE != rInfo.mrFont.GetUnderline() @@ -467,7 +467,7 @@ namespace } } - drawinglayer::primitive2d::BufDecPrimitive2D* impTextBreakupHandler::impCheckFieldPrimitive(drawinglayer::primitive2d::BufDecPrimitive2D* pPrimitive, const DrawPortionInfo& rInfo) const + drawinglayer::primitive2d::BasePrimitive2D* impTextBreakupHandler::impCheckFieldPrimitive(drawinglayer::primitive2d::BasePrimitive2D* pPrimitive, const DrawPortionInfo& rInfo) const { if(rInfo.mpFieldData) { @@ -566,7 +566,7 @@ namespace // embed in TextHierarchyBulletPrimitive2D const drawinglayer::primitive2d::Primitive2DSequence aNewSequence(&aNewReference, 1); - drawinglayer::primitive2d::BufDecPrimitive2D* pNewPrimitive = new drawinglayer::primitive2d::TextHierarchyBulletPrimitive2D(aNewSequence); + drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = new drawinglayer::primitive2d::TextHierarchyBulletPrimitive2D(aNewSequence); // add to output maTextPortionPrimitives.push_back(pNewPrimitive); diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index 68c16ecf3007..05c21c606711 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -231,8 +231,8 @@ namespace class impPolygonParagraphHandler { const drawinglayer::attribute::SdrFormTextAttribute& mrSdrFormTextAttribute; // FormText parameters - std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* >& mrDecomposition; // destination primitive list - std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* >& mrShadowDecomposition; // destination primitive list for shadow + std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* >& mrDecomposition; // destination primitive list + std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* >& mrShadowDecomposition; // destination primitive list for shadow Reference < com::sun::star::i18n::XBreakIterator > mxBreak; // break iterator double getParagraphTextLength(const ::std::vector< const impPathTextPortion* >& rTextPortions) @@ -271,8 +271,8 @@ namespace public: impPolygonParagraphHandler( const drawinglayer::attribute::SdrFormTextAttribute& rSdrFormTextAttribute, - std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* >& rDecomposition, - std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* >& rShadowDecomposition) + std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* >& rDecomposition, + std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* >& rShadowDecomposition) : mrSdrFormTextAttribute(rSdrFormTextAttribute), mrDecomposition(rDecomposition), mrShadowDecomposition(rShadowDecomposition) @@ -571,7 +571,7 @@ namespace const basegfx::B2DHomMatrix& rTransform, const drawinglayer::attribute::LineAttribute& rLineAttribute, const drawinglayer::attribute::StrokeAttribute& rStrokeAttribute, - std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* >& rTarget) + std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* >& rTarget) { for(basegfx::B2DPolyPolygonVector::const_iterator aPolygon(rB2DPolyPolyVector.begin()); aPolygon != rB2DPolyPolyVector.end(); aPolygon++) { @@ -591,10 +591,10 @@ namespace } drawinglayer::primitive2d::Primitive2DSequence impAddPathTextOutlines( - const std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* >& rSource, + const std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* >& rSource, const drawinglayer::attribute::SdrFormTextOutlineAttribute& rOutlineAttribute) { - std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* > aNewPrimitives; + std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aNewPrimitives; for(sal_uInt32 a(0L); a < rSource.size(); a++) { @@ -611,7 +611,7 @@ namespace if(aB2DPolyPolyVector.size()) { // create stroke primitives - std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* > aStrokePrimitives; + std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* > aStrokePrimitives; impAddPolygonStrokePrimitives( aB2DPolyPolyVector, aPolygonTransform, @@ -710,8 +710,8 @@ bool SdrTextObj::impDecomposePathTextPrimitive( if(nLoopCount) { // prepare common decomposition stuff - std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* > aRegularDecomposition; - std::vector< drawinglayer::primitive2d::BufDecPrimitive2D* > aShadowDecomposition; + std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* > aRegularDecomposition; + std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* > aShadowDecomposition; impPolygonParagraphHandler aPolygonParagraphHandler( rFormTextAttribute, aRegularDecomposition, aShadowDecomposition); sal_uInt32 a; diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index 197d71c65b45..c6a572928892 100644 --- a/svx/source/table/viewcontactoftableobj.cxx +++ b/svx/source/table/viewcontactoftableobj.cxx @@ -64,7 +64,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrCellPrimitive2D : public BufDecPrimitive2D + class SdrCellPrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DHomMatrix maTransform; @@ -78,7 +78,7 @@ namespace drawinglayer SdrCellPrimitive2D( const basegfx::B2DHomMatrix& rTransform, const attribute::SdrFillTextAttribute& rSdrFTAttribute) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransform(rTransform), maSdrFTAttribute(rSdrFTAttribute) { @@ -132,7 +132,7 @@ namespace drawinglayer bool SdrCellPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SdrCellPrimitive2D& rCompare = (SdrCellPrimitive2D&)rPrimitive; @@ -155,7 +155,7 @@ namespace drawinglayer { namespace primitive2d { - class SdrBorderlinePrimitive2D : public BufDecPrimitive2D + class SdrBorderlinePrimitive2D : public BufferedDecompositionPrimitive2D { private: basegfx::B2DHomMatrix maTransform; @@ -187,7 +187,7 @@ namespace drawinglayer bool bRightIsOutside, bool bTopIsOutside, bool bInTwips) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), maTransform(rTransform), maLeftLine(rLeftLine), maBottomLine(rBottomLine), @@ -462,7 +462,7 @@ namespace drawinglayer bool SdrBorderlinePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SdrBorderlinePrimitive2D& rCompare = (SdrBorderlinePrimitive2D&)rPrimitive; -- cgit From 9c198f356d0a55e96fe4f96384afcdd7d3a8cb87 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 15 Sep 2009 19:08:28 +0200 Subject: #i97509# changed base classes for primitives which need no buffering --- .../view/SlsPageObjectViewObjectContact.cxx | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx index 9cf09d6451a3..7908b4730eac 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx @@ -256,7 +256,7 @@ namespace sd { namespace slidesorter { namespace view { // class for all derived SdPageObjectPrimitives. The SdPageObjectBasePrimitive itself // is pure virtual -class SdPageObjectBasePrimitive : public drawinglayer::primitive2d::BufDecPrimitive2D +class SdPageObjectBasePrimitive : public drawinglayer::primitive2d::BufferedDecompositionPrimitive2D { private: // the inner range of the SdPageObject visualisation @@ -271,11 +271,11 @@ public: const basegfx::B2DRange& getPageObjectRange() const { return maRange; } // compare operator - virtual bool operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const; }; SdPageObjectBasePrimitive::SdPageObjectBasePrimitive(const basegfx::B2DRange& rRange) -: drawinglayer::primitive2d::BufDecPrimitive2D(), +: drawinglayer::primitive2d::BufferedDecompositionPrimitive2D(), maRange(rRange) { } @@ -284,9 +284,9 @@ SdPageObjectBasePrimitive::~SdPageObjectBasePrimitive() { } -bool SdPageObjectBasePrimitive::operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const +bool SdPageObjectBasePrimitive::operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const { - if(drawinglayer::primitive2d::BufDecPrimitive2D::operator==(rPrimitive)) + if(drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SdPageObjectBasePrimitive& rCompare = static_cast< const SdPageObjectBasePrimitive& >(rPrimitive); return (getPageObjectRange() == rCompare.getPageObjectRange()); @@ -319,7 +319,7 @@ public: const BitmapEx& getBitmapEx() const { return maBitmapEx; } // compare operator - virtual bool operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const; // provide unique ID DeclPrimitrive2DIDBlock() @@ -358,7 +358,7 @@ SdPageObjectPageBitmapPrimitive::~SdPageObjectPageBitmapPrimitive() { } -bool SdPageObjectPageBitmapPrimitive::operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const +bool SdPageObjectPageBitmapPrimitive::operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const { if(SdPageObjectBasePrimitive::operator==(rPrimitive)) { @@ -641,7 +641,7 @@ public: bool getExcluded() const { return mbExcluded; } // compare operator - virtual bool operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const; // provide unique ID DeclPrimitrive2DIDBlock() @@ -866,7 +866,7 @@ SdPageObjectFadeNameNumberPrimitive::~SdPageObjectFadeNameNumberPrimitive() { } -bool SdPageObjectFadeNameNumberPrimitive::operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const +bool SdPageObjectFadeNameNumberPrimitive::operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const { if(SdPageObjectBasePrimitive::operator==(rPrimitive)) { @@ -1150,7 +1150,7 @@ void PageObjectViewObjectContact::ActionChanged (void) // Very simple primitive which just remembers the discrete data and applies // it at decomposition time. -class MouseOverEffectPrimitive : public drawinglayer::primitive2d::BufDecPrimitive2D +class MouseOverEffectPrimitive : public drawinglayer::primitive2d::BufferedDecompositionPrimitive2D { private: basegfx::B2DRange maLogicRange; @@ -1168,7 +1168,7 @@ public: sal_uInt32 nDiscreteOffset, sal_uInt32 nDiscreteWidth, const basegfx::BColor& rRGBColor) - : drawinglayer::primitive2d::BufDecPrimitive2D(), + : drawinglayer::primitive2d::BufferedDecompositionPrimitive2D(), maLogicRange(rLogicRange), mnDiscreteOffset(nDiscreteOffset), mnDiscreteWidth(nDiscreteWidth), @@ -1181,7 +1181,7 @@ public: sal_uInt32 getDiscreteWidth() const { return mnDiscreteWidth; } const basegfx::BColor& getRGBColor() const { return maRGBColor; } - virtual bool operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const; DeclPrimitrive2DIDBlock() }; @@ -1214,9 +1214,9 @@ drawinglayer::primitive2d::Primitive2DSequence MouseOverEffectPrimitive::createL return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } -bool MouseOverEffectPrimitive::operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const +bool MouseOverEffectPrimitive::operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const { - if(drawinglayer::primitive2d::BufDecPrimitive2D::operator==(rPrimitive)) + if(drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const MouseOverEffectPrimitive& rCompare = static_cast< const MouseOverEffectPrimitive& >(rPrimitive); -- cgit From 795cd663c621fdecd0f313f76afe06ce3342bb12 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 15 Sep 2009 19:08:28 +0200 Subject: #i97509# changed base classes for primitives which need no buffering --- sw/source/core/draw/dflyobj.cxx | 8 ++++---- sw/source/ui/docvw/postit.cxx | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index e1033aa3d818..7d25656de299 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -196,7 +196,7 @@ namespace drawinglayer { namespace primitive2d { - class SwVirtFlyDrawObjPrimitive : public BufDecPrimitive2D + class SwVirtFlyDrawObjPrimitive : public BufferedDecompositionPrimitive2D { private: const SwVirtFlyDrawObj& mrSwVirtFlyDrawObj; @@ -210,7 +210,7 @@ namespace drawinglayer SwVirtFlyDrawObjPrimitive( const SwVirtFlyDrawObj& rSwVirtFlyDrawObj, const basegfx::B2DRange &rOuterRange) - : BufDecPrimitive2D(), + : BufferedDecompositionPrimitive2D(), mrSwVirtFlyDrawObj(rSwVirtFlyDrawObj), maOuterRange(rOuterRange) { @@ -269,7 +269,7 @@ namespace drawinglayer bool SwVirtFlyDrawObjPrimitive::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufDecPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SwVirtFlyDrawObjPrimitive& rCompare = (SwVirtFlyDrawObjPrimitive&)rPrimitive; @@ -295,7 +295,7 @@ namespace drawinglayer getSwVirtFlyDrawObj().wrap_DoPaintObject(); // call parent - return BufDecPrimitive2D::get2DDecomposition(rViewInformation); + return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation); } // provide unique ID diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx index c2754f18acd0..7d421b49b867 100644 --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -2009,7 +2009,7 @@ public: const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; } ShadowState getShadowState() const { return maShadowState; } - virtual bool operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const; DeclPrimitrive2DIDBlock() }; @@ -2095,7 +2095,7 @@ drawinglayer::primitive2d::Primitive2DSequence SwPostItShadowPrimitive::createLo return xRetval; } -bool SwPostItShadowPrimitive::operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const +bool SwPostItShadowPrimitive::operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const { if(drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::operator==(rPrimitive)) { @@ -2211,7 +2211,7 @@ public: bool getShadow() const { return mbShadow; } bool getLineSolid() const { return mbLineSolid; } - virtual bool operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const; DeclPrimitrive2DIDBlock() }; @@ -2331,7 +2331,7 @@ drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkorPrimitive::createLoc return aRetval; } -bool SwPostItAnkorPrimitive::operator==( const drawinglayer::primitive2d::BufDecPrimitive2D& rPrimitive ) const +bool SwPostItAnkorPrimitive::operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const { if(drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::operator==(rPrimitive)) { -- cgit From a0f979d5bf4428f0110c408cc32d1ba670394f07 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 17 Sep 2009 17:20:13 +0200 Subject: #i97509# added base class for 3d primitive, re-structured group primitives, added documentation --- .../primitive2d/animatedprimitive2d.hxx | 4 +- .../primitive2d/backgroundcolorprimitive2d.hxx | 2 +- .../drawinglayer/primitive2d/baseprimitive2d.hxx | 42 ++++++++--------- .../primitive2d/borderlineprimitive2d.hxx | 2 +- .../primitive2d/controlprimitive2d.hxx | 4 +- .../primitive2d/embedded3dprimitive2d.hxx | 2 +- .../primitive2d/fillbitmapprimitive2d.hxx | 2 +- .../primitive2d/fillgradientprimitive2d.hxx | 2 +- .../primitive2d/fillhatchprimitive2d.hxx | 2 +- .../primitive2d/graphicprimitive2d.hxx | 2 +- .../drawinglayer/primitive2d/gridprimitive2d.hxx | 2 +- .../drawinglayer/primitive2d/groupprimitive2d.hxx | 11 +++++ .../primitive2d/helplineprimitive2d.hxx | 2 +- .../primitive2d/markerarrayprimitive2d.hxx | 2 +- .../drawinglayer/primitive2d/mediaprimitive2d.hxx | 2 +- .../primitive2d/pagepreviewprimitive2d.hxx | 2 +- .../primitive2d/polygonprimitive2d.hxx | 8 ++-- .../primitive2d/polypolygonprimitive2d.hxx | 14 +++--- .../drawinglayer/primitive2d/primitivetools2d.hxx | 8 ++-- .../drawinglayer/primitive2d/sceneprimitive2d.hxx | 4 +- .../primitive2d/textdecoratedprimitive2d.hxx | 2 +- .../primitive2d/texteffectprimitive2d.hxx | 2 +- .../drawinglayer/primitive2d/textprimitive2d.hxx | 2 +- .../primitive2d/wrongspellprimitive2d.hxx | 2 +- .../drawinglayer/primitive3d/baseprimitive3d.hxx | 33 ++++++++------ .../drawinglayer/primitive3d/groupprimitive3d.hxx | 26 ++++++++--- .../primitive3d/hatchtextureprimitive3d.hxx | 17 ++++++- .../primitive3d/hittestprimitive3d.hxx | 9 ++-- .../primitive3d/polygonprimitive3d.hxx | 6 +-- .../primitive3d/polygontubeprimitive3d.hxx | 2 +- .../primitive3d/polypolygonprimitive3d.hxx | 2 +- .../primitive3d/sdrcubeprimitive3d.hxx | 2 +- .../primitive3d/sdrextrudeprimitive3d.hxx | 2 +- .../primitive3d/sdrlatheprimitive3d.hxx | 2 +- .../primitive3d/sdrpolypolygonprimitive3d.hxx | 2 +- .../drawinglayer/primitive3d/sdrprimitive3d.hxx | 6 ++- .../primitive3d/sdrsphereprimitive3d.hxx | 2 +- .../primitive3d/textureprimitive3d.hxx | 15 ++----- .../drawinglayer/processor2d/baseprocessor2d.hxx | 2 +- .../drawinglayer/processor2d/canvasprocessor.hxx | 2 +- .../drawinglayer/processor3d/baseprocessor3d.hxx | 2 +- .../processor3d/geometry2dextractor.hxx | 2 +- .../drawinglayer/processor3d/shadow3dextractor.hxx | 2 +- .../source/primitive2d/animatedprimitive2d.cxx | 4 +- .../primitive2d/backgroundcolorprimitive2d.cxx | 8 ++-- .../source/primitive2d/baseprimitive2d.cxx | 18 ++++---- .../source/primitive2d/borderlineprimitive2d.cxx | 2 +- .../source/primitive2d/controlprimitive2d.cxx | 8 ++-- .../source/primitive2d/embedded3dprimitive2d.cxx | 2 +- .../source/primitive2d/fillbitmapprimitive2d.cxx | 2 +- .../source/primitive2d/fillgradientprimitive2d.cxx | 2 +- .../source/primitive2d/fillhatchprimitive2d.cxx | 2 +- .../source/primitive2d/graphicprimitive2d.cxx | 2 +- .../source/primitive2d/gridprimitive2d.cxx | 8 ++-- .../source/primitive2d/helplineprimitive2d.cxx | 10 ++--- .../source/primitive2d/markerarrayprimitive2d.cxx | 2 +- .../source/primitive2d/mediaprimitive2d.cxx | 2 +- .../source/primitive2d/pagepreviewprimitive2d.cxx | 2 +- .../source/primitive2d/polygonprimitive2d.cxx | 14 +++--- .../source/primitive2d/polypolygonprimitive2d.cxx | 14 +++--- .../source/primitive2d/primitivetools2d.cxx | 12 ++--- .../source/primitive2d/sceneprimitive2d.cxx | 8 ++-- .../primitive2d/textdecoratedprimitive2d.cxx | 2 +- .../source/primitive2d/texteffectprimitive2d.cxx | 8 ++-- .../source/primitive2d/textprimitive2d.cxx | 2 +- .../source/primitive2d/wrongspellprimitive2d.cxx | 2 +- .../source/primitive3d/baseprimitive3d.cxx | 22 ++++----- .../source/primitive3d/groupprimitive3d.cxx | 16 +++---- .../source/primitive3d/hatchtextureprimitive3d.cxx | 24 +++++++--- .../source/primitive3d/hittestprimitive3d.cxx | 12 ++--- .../source/primitive3d/polygonprimitive3d.cxx | 12 ++--- .../source/primitive3d/polygontubeprimitive3d.cxx | 12 ++--- .../source/primitive3d/polypolygonprimitive3d.cxx | 4 +- .../source/primitive3d/sdrcubeprimitive3d.cxx | 2 +- .../source/primitive3d/sdrdecompositiontools3d.cxx | 2 +- .../source/primitive3d/sdrextrudeprimitive3d.cxx | 6 +-- .../source/primitive3d/sdrlatheprimitive3d.cxx | 6 +-- .../primitive3d/sdrpolypolygonprimitive3d.cxx | 2 +- drawinglayer/source/primitive3d/sdrprimitive3d.cxx | 4 +- .../source/primitive3d/sdrsphereprimitive3d.cxx | 2 +- .../source/primitive3d/textureprimitive3d.cxx | 52 +++++++++------------- .../source/processor2d/baseprocessor2d.cxx | 6 +-- .../source/processor3d/baseprocessor3d.cxx | 4 +- .../source/processor3d/defaultprocessor3d.cxx | 2 +- .../source/processor3d/shadow3dextractor.cxx | 4 +- .../source/processor3d/zbufferprocessor3d.cxx | 2 +- svx/inc/svx/sdr/overlay/overlaytools.hxx | 10 ++--- .../svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx | 2 +- .../sdr/primitive2d/sdrconnectorprimitive2d.hxx | 2 +- .../sdr/primitive2d/sdrcustomshapeprimitive2d.hxx | 2 +- .../svx/sdr/primitive2d/sdrellipseprimitive2d.hxx | 4 +- svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx | 2 +- .../svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx | 2 +- svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx | 2 +- .../sdr/primitive2d/sdrolecontentprimitive2d.hxx | 2 +- svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx | 2 +- .../sdr/primitive2d/sdrrectangleprimitive2d.hxx | 2 +- svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx | 8 ++-- svx/source/engine3d/helperhittest3d.cxx | 4 +- svx/source/engine3d/helperminimaldepth3d.cxx | 4 +- .../sdr/contact/viewcontactofsdrcaptionobj.cxx | 2 +- svx/source/sdr/contact/viewobjectcontact.cxx | 2 +- .../sdr/contact/viewobjectcontactofpageobj.cxx | 2 +- .../sdr/contact/viewobjectcontactofunocontrol.cxx | 4 +- svx/source/sdr/overlay/overlaytools.cxx | 10 ++--- .../sdr/primitive2d/sdrcaptionprimitive2d.cxx | 2 +- .../sdr/primitive2d/sdrconnectorprimitive2d.cxx | 2 +- .../sdr/primitive2d/sdrcustomshapeprimitive2d.cxx | 2 +- .../sdr/primitive2d/sdrdecompositiontools.cxx | 2 +- .../sdr/primitive2d/sdrellipseprimitive2d.cxx | 4 +- svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx | 2 +- .../sdr/primitive2d/sdrmeasureprimitive2d.cxx | 4 +- svx/source/sdr/primitive2d/sdrole2primitive2d.cxx | 4 +- .../sdr/primitive2d/sdrolecontentprimitive2d.cxx | 2 +- svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx | 2 +- .../sdr/primitive2d/sdrrectangleprimitive2d.cxx | 2 +- svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx | 14 +++--- svx/source/svdraw/svdotextpathdecomposition.cxx | 18 ++++---- svx/source/table/viewcontactoftableobj.cxx | 8 ++-- 119 files changed, 384 insertions(+), 347 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx index 296d56efe6d8..1fcde759ed68 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx @@ -99,7 +99,7 @@ namespace drawinglayer { protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: AnimatedBlinkPrimitive2D( @@ -163,7 +163,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: AnimatedInterpolatePrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx index 5731a1e45ee6..7b998fd3e749 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx @@ -56,7 +56,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: BackgroundColorPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx index 416fdd2d9816..f41863f36992 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx @@ -106,7 +106,7 @@ namespace drawinglayer unique UNO APIs may be defined/implemented for these set to allow more intense work with primitives using UNO. - Current five Basic Primitives are: + Current Basic 2D Primitives are: - BitmapPrimitive2D (bitmap data, evtl. with alpha) - MetafilePrimitive2D (VCL Metafile, currently no decomposition, but planned, so may vanish) @@ -119,13 +119,7 @@ namespace drawinglayer A renderer implementing support for this minimal set of primitives can completely render primitive-based visualisations. Of course, he also has to take states into account - which are representated by the following GroupPrimitive2D derivations: - - - AlphaPrimitive2D (objects with freely defined transparence) - - InvertPrimitive2D (for XOR) - - MaskPrimitive2D (for masking) - - ModifiedColorPrimitive2D (for a stack of color modifications) - - TransformPrimitive2D (for a transformation stack) + which are representated by GroupPrimitive2D derivations, see groupprimitive2d.hxx To support getting the geometric BoundRect, getB2DRange is used. The default implementation will use the get2DDecomposition result and merge a range from the @@ -214,9 +208,9 @@ namespace drawinglayer primitive implementations which support a decomposition as base class. The buffering is done by holding the last decomposition in the local parameter - maLocal2DDecomposition. The default implementation of get2DDecomposition checks - if maLocal2DDecomposition is empty. If yes, it uses createLocal2DDecomposition - to create the content. In all cases, maLocal2DDecomposition is returned. + maBuffered2DDecomposition. The default implementation of get2DDecomposition checks + if maBuffered2DDecomposition is empty. If yes, it uses create2DDecomposition + to create the content. In all cases, maBuffered2DDecomposition is returned. For view-dependent primitives derived from Primitive2DBufferDecomposition more needs to be done when the decomposition depends on parts of the parameter ViewInformation2D. @@ -227,39 +221,39 @@ namespace drawinglayer (this may be a complete local copy of ViewInformation2D) (b) If a buffered decomposition exists, ckeck if one of the new local parameters differs from the corresponding locally remembered (as member) ones. If yes, - clear maLocal2DDecomposition - (d) call baseclass::get2DDecomposition which will use createLocal2DDecomposition - to fill maLocal2DDecomposition if it's empty + clear maBuffered2DDecomposition + (d) call baseclass::get2DDecomposition which will use create2DDecomposition + to fill maBuffered2DDecomposition if it's empty (e) copy the new local parameters to the corresponding locally remembered ones to identify if a new decomposition is needed at the next call - (f) return maLocal2DDecomposition + (f) return maBuffered2DDecomposition */ class BufferedDecompositionPrimitive2D : public BasePrimitive2D { private: - /// a sequence used for buffering the last createLocal2DDecomposition() result - Primitive2DSequence maLocal2DDecomposition; + /// a sequence used for buffering the last create2DDecomposition() result + Primitive2DSequence maBuffered2DDecomposition; protected: - /** access methods to maLocal2DDecomposition. The usage of this methods may allow + /** access methods to maBuffered2DDecomposition. The usage of this methods may allow later thread-safe stuff to be added if needed. Only to be used by getDecomposition() implementations for buffering the last decomposition. */ - const Primitive2DSequence& getLocal2DDecomposition() const { return maLocal2DDecomposition; } - void setLocal2DDecomposition(const Primitive2DSequence& rNew) { maLocal2DDecomposition = rNew; } + const Primitive2DSequence& getBuffered2DDecomposition() const { return maBuffered2DDecomposition; } + void setBuffered2DDecomposition(const Primitive2DSequence& rNew) { maBuffered2DDecomposition = rNew; } /** method which is to be used to implement the local decomposition of a 2D primitive. The default implementation will just return an empty decomposition */ - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: // constructor/destructor BufferedDecompositionPrimitive2D(); - /** The getDecomposition default implementation will on demand use createLocal2DDecomposition() if - maLocal2DDecomposition is empty. It will set maLocal2DDecomposition to this obtained decomposition + /** The getDecomposition default implementation will on demand use create2DDecomposition() if + maBuffered2DDecomposition is empty. It will set maBuffered2DDecomposition to this obtained decomposition to buffer it. If the decomposition is also ViewInformation2D-dependent, this method needs to be overloaded and the ViewInformation2D for the last decomposition need to be remembered, too, and be used in the next call to decide if the buffered decomposition may be reused or not. @@ -282,7 +276,7 @@ namespace drawinglayer // get B2DRange from a given Primitive2DSequence basegfx::B2DRange getB2DRangeFromPrimitive2DSequence(const Primitive2DSequence& rCandidate, const geometry::ViewInformation2D& aViewInformation); - // compare two Primitive2DReferences for equality, including trying to get implementations (BufferedDecompositionPrimitive2D) + // compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D) // and using compare operator bool arePrimitive2DReferencesEqual(const Primitive2DReference& rA, const Primitive2DReference& rB); diff --git a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx index 88ca4c02935b..209b0ed17e40 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx @@ -107,7 +107,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: BorderLinePrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx index 591407302a37..974faf506da8 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx @@ -64,13 +64,13 @@ namespace drawinglayer // and from thereon always used and returned by getXControl() void createXControl(); - // single local decompositions, used from createLocal2DDecomposition() + // single local decompositions, used from create2DDecomposition() Primitive2DReference createBitmapDecomposition(const geometry::ViewInformation2D& rViewInformation) const; Primitive2DReference createPlaceholderDecomposition(const geometry::ViewInformation2D& rViewInformation) const; protected: // local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: ControlPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx index aef3c0173b43..86540d53e325 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx @@ -85,7 +85,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: Embedded3DPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx index 012824f187bd..c2d305b78c11 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx @@ -55,7 +55,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: FillBitmapPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx index fbf4e7c34a3f..f995bb487b33 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx @@ -54,7 +54,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: FillGradientPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx index 10cb9a622140..6181630e948d 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx @@ -55,7 +55,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: FillHatchPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx index cfc29ac8d06e..33923eebc259 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx @@ -55,7 +55,7 @@ namespace drawinglayer protected: // local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: GraphicPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx index 1b1325c4b4f9..d2b90e271cda 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx @@ -68,7 +68,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: GridPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx index bf30efb66311..cd6efef472bb 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx @@ -63,6 +63,17 @@ namespace drawinglayer In most cases the decomposition is straightforward, so by default this primitive will not buffer the result and is not derived from BufferedDecompositionPrimitive2D, but from BasePrimitive2D. + + A renderer has to take GroupPrimitive2D derivations into account which + are used to hold a state. + + Current Basic 2D StatePrimitives are: + + - AlphaPrimitive2D (objects with freely defined transparence) + - InvertPrimitive2D (for XOR) + - MaskPrimitive2D (for masking) + - ModifiedColorPrimitive2D (for a stack of color modifications) + - TransformPrimitive2D (for a transformation stack) */ class GroupPrimitive2D : public BasePrimitive2D { diff --git a/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx index 53abdfa133c8..0ba83b2c383a 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx @@ -70,7 +70,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: HelplinePrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx index 02f254368bc1..77f450403302 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx @@ -55,7 +55,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: MarkerArrayPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx index f5d21fa40e3e..da8e49b644c6 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx @@ -56,7 +56,7 @@ namespace drawinglayer protected: // local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: MediaPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx index f44de611d609..52ed2435f5e7 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx @@ -75,7 +75,7 @@ namespace drawinglayer protected: // local decomposition. Implementation will just return children - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PagePreviewPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx index c82f54fdfab0..4e04786fb2e5 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx @@ -94,7 +94,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolygonMarkerPrimitive2D( @@ -140,7 +140,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolygonStrokePrimitive2D( @@ -184,7 +184,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolygonWavePrimitive2D( @@ -231,7 +231,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolygonStrokeArrowPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx index d152b962de25..516210a6a081 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx @@ -59,7 +59,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonHairlinePrimitive2D(const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor); @@ -97,7 +97,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonMarkerPrimitive2D( @@ -140,7 +140,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonStrokePrimitive2D( @@ -184,7 +184,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonStrokeArrowPrimitive2D( @@ -264,7 +264,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonGradientPrimitive2D( @@ -298,7 +298,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonHatchPrimitive2D( @@ -332,7 +332,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonBitmapPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx index 3a0977003915..f7e9b1dcac0b 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx @@ -41,7 +41,7 @@ ////////////////////////////////////////////////////////////////////////////// // tooling class for BufferedDecompositionPrimitive2D baseed classes which are view-dependent // regarding the size of a discrete unit. The implementation of get2DDecomposition -// guards the buffered local decomposition and ensures that a createLocal2DDecomposition +// guards the buffered local decomposition and ensures that a create2DDecomposition // implementation may use an up-to-date DiscreteUnit accessible using getDiscreteUnit() namespace drawinglayer @@ -53,7 +53,7 @@ namespace drawinglayer private: // the last used fDiscreteUnit definitions for decomposition. Since this // is checked and updated from get2DDecomposition() it will be current and - // usable in createLocal2DDecomposition() + // usable in create2DDecomposition() double mfDiscreteUnit; public: @@ -75,7 +75,7 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // tooling class for BufferedDecompositionPrimitive2D baseed classes which are view-dependent // regarding the viewport. The implementation of get2DDecomposition -// guards the buffered local decomposition and ensures that a createLocal2DDecomposition +// guards the buffered local decomposition and ensures that a create2DDecomposition // implementation may use an up-to-date Viewport accessible using getViewport() namespace drawinglayer @@ -87,7 +87,7 @@ namespace drawinglayer private: // the last used Viewport definition for decomposition. Since this // is checked and updated from get2DDecomposition() it will be current and - // usable in createLocal2DDecomposition() + // usable in create2DDecomposition() basegfx::B2DRange maViewport; public: diff --git a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx index 0f8e55492688..f190c3e6c1e1 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx @@ -80,11 +80,11 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: // public helpers - // Geometry extractor. Shadow will be added as in createLocal2DDecomposition, but + // Geometry extractor. Shadow will be added as in create2DDecomposition, but // the 3D content is not converted to a bitmap visualisation but to projected 2D gemetry. This // helper is useful e.g. for Contour extraction or HitTests. Primitive2DSequence getGeometry2D(const geometry::ViewInformation2D& rViewInformation) const; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx index 5328b29e963a..536b267f2fbd 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx @@ -151,7 +151,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: TextDecoratedPortionPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx index 2a9c890b2b3d..19f910f3444d 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx @@ -71,7 +71,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: TextEffectPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx index 775fa2bd36e5..14b44f80dbfe 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx @@ -140,7 +140,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: TextSimplePortionPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx index bddb951bea9c..6bf84a401891 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx @@ -57,7 +57,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: WrongSpellPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx index 4dc5a7da4acb..73d28c82ebda 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx @@ -79,7 +79,12 @@ namespace drawinglayer /** Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D The description/functionality is identical with the 2D case in baseprimitive2d.hxx, - please see there for detailed information + please see there for detailed information. + + Current Basic 3D Primitives are: + + - PolygonHairlinePrimitive3D (for 3D hairlines) + - PolyPolygonMaterialPrimitive3D (for 3D filled plane polygons) */ class BasePrimitive3D : private boost::noncopyable, @@ -96,7 +101,7 @@ namespace drawinglayer /** the ==operator is mainly needed to allow testing newly-created high level primitives against their last incarnation which buffers/holds the decompositionsThe default implementation uses getPrimitive3DID()-calls to test if it's the same ID at last. Overloaded implementation are then - based on this implementation + based on this implementation. */ virtual bool operator==( const BasePrimitive3D& rPrimitive ) const; bool operator!=( const BasePrimitive3D& rPrimitive ) const { return !operator==(rPrimitive); } @@ -133,7 +138,7 @@ namespace drawinglayer } // end of namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// -// BufDecPrimitive3D class +// BufferedDecompositionPrimitive3D class namespace drawinglayer { @@ -144,32 +149,32 @@ namespace drawinglayer The description/functionality is identical with the 2D case in baseprimitive2d.hxx, please see there for detailed information */ - class BufDecPrimitive3D + class BufferedDecompositionPrimitive3D : public BasePrimitive3D { private: - /// a sequence used for buffering the last createLocal3DDecomposition() result - Primitive3DSequence maLocal3DDecomposition; + /// a sequence used for buffering the last create3DDecomposition() result + Primitive3DSequence maBuffered3DDecomposition; protected: - /** access methods to maLocal3DDecomposition. The usage of this methods may allow + /** access methods to maBuffered3DDecomposition. The usage of this methods may allow later thread-safe stuff to be added if needed. Only to be used by getDecomposition() implementations for buffering the last decomposition. */ - const Primitive3DSequence& getLocal3DDecomposition() const { return maLocal3DDecomposition; } - void setLocal3DDecomposition(const Primitive3DSequence& rNew) { maLocal3DDecomposition = rNew; } + const Primitive3DSequence& getBuffered3DDecomposition() const { return maBuffered3DDecomposition; } + void setBuffered3DDecomposition(const Primitive3DSequence& rNew) { maBuffered3DDecomposition = rNew; } /** method which is to be used to implement the local decomposition of a 2D primitive. The default implementation will just return an empty decomposition */ - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: // constructor - BufDecPrimitive3D(); + BufferedDecompositionPrimitive3D(); - /** The getDecomposition default implementation will on demand use createLocal3DDecomposition() if - maLocal3DDecomposition is empty. It will set maLocal3DDecomposition to this obtained decomposition + /** The getDecomposition default implementation will on demand use create3DDecomposition() if + maBuffered3DDecomposition is empty. It will set maBuffered3DDecomposition to this obtained decomposition to buffer it. If the decomposition is also ViewInformation-dependent, this method needs to be overloaded and the ViewInformation for the last decomposition needs to be remembered, too, and be used in the next call to decide if the buffered decomposition may be reused or not. @@ -192,7 +197,7 @@ namespace drawinglayer // get range3D from a given Primitive3DSequence basegfx::B3DRange getB3DRangeFromPrimitive3DSequence(const Primitive3DSequence& rCandidate, const geometry::ViewInformation3D& aViewInformation); - // compare two Primitive2DReferences for equality, including trying to get implementations (BufferedDecompositionPrimitive2D) + // compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D) // and using compare operator bool arePrimitive3DReferencesEqual(const Primitive3DReference& rA, const Primitive3DReference& rB); diff --git a/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx index 93ca09af8e93..6912ff25b04d 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx @@ -44,16 +44,29 @@ namespace drawinglayer { namespace primitive3d { - class GroupPrimitive3D : public BufDecPrimitive3D + /** Baseclass for all grouping 3D primitives + + The description/functionality is identical with the 2D case in groupprimitive2d.hxx, + please see there for detailed information. + + Current Basic 3D StatePrimitives are: + + - ModifiedColorPrimitive3D (for a stack of color modifications) + - ShadowPrimitive3D (for 3D objects with shadow; this is a special case + since the shadow of a 3D primitive is a 2D primitive set) + - TexturePrimitive3D (with the following variations) + - GradientTexturePrimitive3D (for 3D gradient fill) + - BitmapTexturePrimitive3D (for 3D Bitmap fill) + - AlphaTexturePrimitive3D (for 3D transparence) + - HatchTexturePrimitive3D (for 3D hatch fill) + - TransformPrimitive3D (for a transformation stack) + */ + class GroupPrimitive3D : public BasePrimitive3D { private: // the children. Declared private since this shall never be changed at all after construction Primitive3DSequence maChildren; - protected: - // local decomposition. Implementation will just return children - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - public: // constructor GroupPrimitive3D(const Primitive3DSequence& rChildren); @@ -64,6 +77,9 @@ namespace drawinglayer // compare operator virtual bool operator==( const BasePrimitive3D& rPrimitive ) const; + // local decomposition. Implementation will just return children + virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + // provide unique ID DeclPrimitrive3DIDBlock() }; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx index a8ce982f3560..2e1d7e0b5fe4 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx @@ -44,14 +44,24 @@ namespace drawinglayer { namespace primitive3d { + /** HatchTexturePrimitive3D is derived from GroupPrimitive3D, but implements + a decomposition which is complicated enough for buffering. Since the group + primitive has no default buffering, it is necessary here to add a local + buffering mechanism for the decomposition + */ class HatchTexturePrimitive3D : public TexturePrimitive3D { private: attribute::FillHatchAttribute maHatch; + Primitive3DSequence maBuffered3DDecomposition; protected: - // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + /// helper: local decomposition + Primitive3DSequence impCreate3DDecomposition() const; + + /// local access methods to maBufferedDecomposition + const Primitive3DSequence& getBuffered3DDecomposition() const { return maBuffered3DDecomposition; } + void setBuffered3DDecomposition(const Primitive3DSequence& rNew) { maBuffered3DDecomposition = rNew; } public: HatchTexturePrimitive3D( @@ -67,6 +77,9 @@ namespace drawinglayer // compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; + // local decomposition. + virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + // provide unique ID DeclPrimitrive3DIDBlock() }; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx index f79fe21dd920..0c5082699e8d 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx @@ -56,11 +56,6 @@ namespace drawinglayer // use it and it's children subcontent. class HitTestPrimitive3D : public GroupPrimitive3D { - protected: - // local decomposition. Implementation will return empty Primitive3DSequence - // since this is no visualisation data - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - public: HitTestPrimitive3D(const Primitive3DSequence& rChildren); @@ -69,6 +64,10 @@ namespace drawinglayer // the local implementation will return the children's range virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const; + // local decomposition. Implementation will return empty Primitive3DSequence + // since this is no visualisation data + virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + // provide unique ID DeclPrimitrive3DIDBlock() }; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx index b54f5e6c6119..9b97f60d3642 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx @@ -48,7 +48,7 @@ namespace drawinglayer { namespace primitive3d { - class PolygonHairlinePrimitive3D : public BufDecPrimitive3D + class PolygonHairlinePrimitive3D : public BasePrimitive3D { private: basegfx::B3DPolygon maPolygon; @@ -81,7 +81,7 @@ namespace drawinglayer { namespace primitive3d { - class PolygonStrokePrimitive3D : public BufDecPrimitive3D + class PolygonStrokePrimitive3D : public BufferedDecompositionPrimitive3D { private: basegfx::B3DPolygon maPolygon; @@ -90,7 +90,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: PolygonStrokePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx index 1fa43c0e27fc..5ce81e8c7ad6 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx @@ -62,7 +62,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: PolygonTubePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx index 2069ab08cdb2..1c5b9e400bbb 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive3d { - class PolyPolygonMaterialPrimitive3D : public BufDecPrimitive3D + class PolyPolygonMaterialPrimitive3D : public BasePrimitive3D { private: basegfx::B3DPolyPolygon maPolyPolygon; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx index 13ccc8d80411..42a9ab94f327 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx @@ -48,7 +48,7 @@ namespace drawinglayer { protected: // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrCubePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx index e3b96a1b0d3e..a5975b050797 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx @@ -77,7 +77,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrExtrudePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx index 0925d798a52a..7d80cbde015c 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx @@ -91,7 +91,7 @@ namespace drawinglayer const basegfx::B2DPoint& rEnd) const; // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrLathePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx index bd020022f12f..b0d7cc5c26a2 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx @@ -52,7 +52,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrPolyPolygonPrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx index 729de313267a..d2296968a000 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx @@ -47,9 +47,13 @@ namespace drawinglayer { + /** base class for the more complicated geometric primitives, so + derive from buffered primitive to allow overloading of + create3DDecomposition there + */ namespace primitive3d { - class SdrPrimitive3D : public BufDecPrimitive3D + class SdrPrimitive3D : public BufferedDecompositionPrimitive3D { private: basegfx::B3DHomMatrix maTransform; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx index 38a0f94ee07b..3e6349df0bb9 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx @@ -52,7 +52,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrSpherePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx index c351fcd0aff0..a0c18f34788e 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx @@ -88,10 +88,6 @@ namespace drawinglayer private: double mfTransparence; - protected: - // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - public: UnifiedAlphaTexturePrimitive3D( double fTransparence, @@ -103,6 +99,9 @@ namespace drawinglayer // compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; + // local decomposition. + virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + // provide unique ID DeclPrimitrive3DIDBlock() }; @@ -120,10 +119,6 @@ namespace drawinglayer private: attribute::FillGradientAttribute maGradient; - protected: - // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - public: GradientTexturePrimitive3D( const attribute::FillGradientAttribute& rGradient, @@ -155,10 +150,6 @@ namespace drawinglayer private: attribute::FillBitmapAttribute maBitmap; - protected: - // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - public: BitmapTexturePrimitive3D( const attribute::FillBitmapAttribute& rBitmap, diff --git a/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx index 5139b4d72119..fceae8dbeb31 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx @@ -57,7 +57,7 @@ namespace drawinglayer } // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufferedDecompositionPrimitive2D-based. + // virtual render method when the primitive implementation is BasePrimitive2D-based. // Default implementation does nothing virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate); diff --git a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx index ac15ec5f12cf..0c356e731169 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx @@ -103,7 +103,7 @@ namespace drawinglayer LanguageType meLang; // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufferedDecompositionPrimitive2D-based. + // virtual render method when the primitive implementation is BasePrimitive2D-based. virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate); // direct primitive renderer support diff --git a/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx index 8e2023c7e1bc..effc509d9981 100644 --- a/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx +++ b/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx @@ -57,7 +57,7 @@ namespace drawinglayer } // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufDecPrimitive3D-based. + // virtual render method when the primitive implementation is BasePrimitive3D-based. // Default implementation does nothing virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); diff --git a/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx b/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx index e43fc0d7d8b3..457ede952ccd 100644 --- a/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx +++ b/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx @@ -61,7 +61,7 @@ namespace drawinglayer basegfx::BColorModifierStack maBColorModifierStack; // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufDecPrimitive3D-based. + // virtual render method when the primitive implementation is BasePrimitive3D-based. virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); public: diff --git a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx index ddb1d0179073..abb92693a037 100644 --- a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx +++ b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx @@ -89,7 +89,7 @@ namespace drawinglayer basegfx::B2DPolyPolygon impDoShadowProjection(const basegfx::B3DPolyPolygon& rSource); // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufDecPrimitive3D-based. + // virtual render method when the primitive implementation is BasePrimitive3D-based. virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); public: diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx index d2b824962fbf..b99168d1cb1e 100644 --- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx @@ -114,7 +114,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence AnimatedBlinkPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence AnimatedBlinkPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { if(getChildren().hasElements()) { @@ -178,7 +178,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence AnimatedInterpolatePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence AnimatedInterpolatePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { const sal_uInt32 nSize(maMatrixStack.size()); diff --git a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx index 723a684c51ec..d425b1ea3138 100644 --- a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx @@ -54,7 +54,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence BackgroundColorPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence BackgroundColorPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { if(!rViewInformation.getViewport().isEmpty()) { @@ -98,13 +98,13 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(getLocal2DDecomposition().hasElements() && (maLastViewport != rViewInformation.getViewport())) + if(getBuffered2DDecomposition().hasElements() && (maLastViewport != rViewInformation.getViewport())) { // conditions of last local decomposition have changed, delete - const_cast< BackgroundColorPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< BackgroundColorPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember ViewRange const_cast< BackgroundColorPrimitive2D* >(this)->maLastViewport = rViewInformation.getViewport(); diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx index db391ab1b548..dffde631b8c3 100644 --- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx @@ -94,14 +94,14 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence BufferedDecompositionPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence BufferedDecompositionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { return Primitive2DSequence(); } BufferedDecompositionPrimitive2D::BufferedDecompositionPrimitive2D() : BasePrimitive2D(), - maLocal2DDecomposition() + maBuffered2DDecomposition() { } @@ -109,13 +109,13 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { - const Primitive2DSequence aNewSequence(createLocal2DDecomposition(rViewInformation)); - const_cast< BufferedDecompositionPrimitive2D* >(this)->setLocal2DDecomposition(aNewSequence); + const Primitive2DSequence aNewSequence(create2DDecomposition(rViewInformation)); + const_cast< BufferedDecompositionPrimitive2D* >(this)->setBuffered2DDecomposition(aNewSequence); } - return getLocal2DDecomposition(); + return getBuffered2DDecomposition(); } } // end of namespace primitive2d } // end of namespace drawinglayer @@ -135,7 +135,7 @@ namespace drawinglayer if(rCandidate.is()) { // try to get C++ implementation base - const BufferedDecompositionPrimitive2D* pCandidate(dynamic_cast< BufferedDecompositionPrimitive2D* >(rCandidate.get())); + const BasePrimitive2D* pCandidate(dynamic_cast< BasePrimitive2D* >(rCandidate.get())); if(pCandidate) { @@ -185,8 +185,8 @@ namespace drawinglayer return true; } - const BufferedDecompositionPrimitive2D* pA(dynamic_cast< const BufferedDecompositionPrimitive2D* >(rxA.get())); - const BufferedDecompositionPrimitive2D* pB(dynamic_cast< const BufferedDecompositionPrimitive2D* >(rxB.get())); + const BasePrimitive2D* pA(dynamic_cast< const BasePrimitive2D* >(rxA.get())); + const BasePrimitive2D* pB(dynamic_cast< const BasePrimitive2D* >(rxB.get())); const bool bAEqualZero(pA == 0L); if(bAEqualZero != (pB == 0L)) diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx index 205f11d688b0..1341a22f0d89 100644 --- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx @@ -49,7 +49,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence BorderLinePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence BorderLinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence xRetval; diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx index 46392106f410..d3ddf3c8657f 100644 --- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx @@ -266,7 +266,7 @@ namespace drawinglayer return xRetval; } - Primitive2DSequence ControlPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence ControlPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { // try to create a bitmap decomposition. If that fails for some reason, // at least create a replacement decomposition. @@ -365,16 +365,16 @@ namespace drawinglayer ::osl::MutexGuard aGuard( m_aMutex ); const basegfx::B2DVector aNewScaling(rViewInformation.getObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0)); - if(getLocal2DDecomposition().hasElements()) + if(getBuffered2DDecomposition().hasElements()) { if(!maLastViewScaling.equal(aNewScaling)) { // conditions of last local decomposition have changed, delete - const_cast< ControlPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< ControlPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember ViewTransformation const_cast< ControlPrimitive2D* >(this)->maLastViewScaling = aNewScaling; diff --git a/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx b/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx index c796048a4bf3..0c0a863733de 100644 --- a/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx @@ -84,7 +84,7 @@ namespace drawinglayer return maShadowPrimitives.hasElements(); } - Primitive2DSequence Embedded3DPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence Embedded3DPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { // use info to create a yellow 2d rectangle, similar to empty 3d scenes and/or groups const basegfx::B2DRange aLocal2DRange(getB2DRange(rViewInformation)); diff --git a/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx index 636c798f448c..57d5d7c00c7c 100644 --- a/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx @@ -54,7 +54,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence FillBitmapPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence FillBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const Size aTileSizePixel(getFillBitmap().getBitmap().GetSizePixel()); Primitive2DSequence aRetval; diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx index 283123621cee..2bc280b577fd 100644 --- a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx @@ -54,7 +54,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence FillGradientPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence FillGradientPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const attribute::GradientStyle aGradientStyle(maFillGradient.getStyle()); ::std::vector< basegfx::B2DHomMatrix > aMatrices; diff --git a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx index 1446e5677cdf..9e6e69516d43 100644 --- a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx @@ -55,7 +55,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence FillHatchPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence FillHatchPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // create hatch const basegfx::BColor aHatchColor(maFillHatch.getColor()); diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index 8f1e138d4ca4..b28bc2147187 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -211,7 +211,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence GraphicPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence GraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; diff --git a/drawinglayer/source/primitive2d/gridprimitive2d.cxx b/drawinglayer/source/primitive2d/gridprimitive2d.cxx index 083b5adefa9c..a449fa396c68 100644 --- a/drawinglayer/source/primitive2d/gridprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/gridprimitive2d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence GridPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence GridPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence aRetval; @@ -299,16 +299,16 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(getLocal2DDecomposition().hasElements()) + if(getBuffered2DDecomposition().hasElements()) { if(maLastViewport != rViewInformation.getViewport() || maLastObjectToViewTransformation != rViewInformation.getObjectToViewTransformation()) { // conditions of last local decomposition have changed, delete - const_cast< GridPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< GridPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember ViewRange and ViewTransformation const_cast< GridPrimitive2D* >(this)->maLastObjectToViewTransformation = rViewInformation.getObjectToViewTransformation(); diff --git a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx index 3b67c7714796..251ac110acd6 100644 --- a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx @@ -54,9 +54,9 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence HelplinePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence HelplinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { - std::vector< BufferedDecompositionPrimitive2D* > aTempPrimitiveTarget; + std::vector< BasePrimitive2D* > aTempPrimitiveTarget; if(!rViewInformation.getViewport().isEmpty() && !getDirection().equalZero()) { @@ -200,16 +200,16 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(getLocal2DDecomposition().hasElements()) + if(getBuffered2DDecomposition().hasElements()) { if(maLastViewport != rViewInformation.getViewport() || maLastObjectToViewTransformation != rViewInformation.getObjectToViewTransformation()) { // conditions of last local decomposition have changed, delete - const_cast< HelplinePrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< HelplinePrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember ViewRange and ViewTransformation const_cast< HelplinePrimitive2D* >(this)->maLastObjectToViewTransformation = rViewInformation.getObjectToViewTransformation(); diff --git a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx index b61f5df4bb5f..acb2335c0d1f 100644 --- a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx @@ -55,7 +55,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence MarkerArrayPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence MarkerArrayPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval; const std::vector< basegfx::B2DPoint >& rPositions = getPositions(); diff --git a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx index df95b7a87c29..ba8f81448968 100644 --- a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence MediaPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence MediaPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval(1); diff --git a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx index 496415efdba4..ba879d9056c9 100644 --- a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PagePreviewPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence PagePreviewPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval; Primitive2DSequence aContent(getPageContent()); diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx index 4a3678645571..69cbd046efd2 100644 --- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx @@ -110,7 +110,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolygonMarkerPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence PolygonMarkerPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { // calculate logic DashLength const basegfx::B2DVector aDashVector(rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(getDiscreteDashLength(), 0.0)); @@ -198,7 +198,7 @@ namespace drawinglayer ::osl::MutexGuard aGuard( m_aMutex ); bool bNeedNewDecomposition(false); - if(getLocal2DDecomposition().hasElements()) + if(getBuffered2DDecomposition().hasElements()) { if(rViewInformation.getInverseObjectToViewTransformation() != maLastInverseObjectToViewTransformation) { @@ -209,10 +209,10 @@ namespace drawinglayer if(bNeedNewDecomposition) { // conditions of last local decomposition have changed, delete - const_cast< PolygonMarkerPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< PolygonMarkerPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember last used InverseObjectToViewTransformation PolygonMarkerPrimitive2D* pThat = const_cast< PolygonMarkerPrimitive2D* >(this); @@ -235,7 +235,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolygonStrokePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolygonStrokePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { if(getB2DPolygon().count()) { @@ -392,7 +392,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolygonWavePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolygonWavePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; @@ -505,7 +505,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolygonStrokeArrowPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolygonStrokeArrowPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // copy local polygon, it may be changed basegfx::B2DPolygon aLocalPolygon(getB2DPolygon()); diff --git a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx index 163c3a8691aa..7c8688fed31f 100644 --- a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx @@ -57,7 +57,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonHairlinePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonHairlinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon()); const sal_uInt32 nCount(aPolyPolygon.count()); @@ -117,7 +117,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonMarkerPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonMarkerPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon()); const sal_uInt32 nCount(aPolyPolygon.count()); @@ -185,7 +185,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonStrokePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonStrokePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon()); const sal_uInt32 nCount(aPolyPolygon.count()); @@ -268,7 +268,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonStrokeArrowPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonStrokeArrowPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon()); const sal_uInt32 nCount(aPolyPolygon.count()); @@ -404,7 +404,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonGradientPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonGradientPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // create SubSequence with FillGradientPrimitive2D const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange()); @@ -451,7 +451,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonHatchPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonHatchPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // create SubSequence with FillHatchPrimitive2D const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange()); @@ -498,7 +498,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonBitmapPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // create SubSequence with FillBitmapPrimitive2D const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange()); diff --git a/drawinglayer/source/primitive2d/primitivetools2d.cxx b/drawinglayer/source/primitive2d/primitivetools2d.cxx index b441bb1b89ff..30af3a998daf 100644 --- a/drawinglayer/source/primitive2d/primitivetools2d.cxx +++ b/drawinglayer/source/primitive2d/primitivetools2d.cxx @@ -53,13 +53,13 @@ namespace drawinglayer // get the current DiscreteUnit const double fDiscreteUnit((rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0)).getLength()); - if(getLocal2DDecomposition().hasElements() && !basegfx::fTools::equal(fDiscreteUnit, getDiscreteUnit())) + if(getBuffered2DDecomposition().hasElements() && !basegfx::fTools::equal(fDiscreteUnit, getDiscreteUnit())) { // conditions of last local decomposition have changed, delete - const_cast< DiscreteMetricDependentPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< DiscreteMetricDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember new valid DiscreteUnit const_cast< DiscreteMetricDependentPrimitive2D* >(this)->mfDiscreteUnit = fDiscreteUnit; @@ -84,13 +84,13 @@ namespace drawinglayer // get the current Viewport const basegfx::B2DRange& rViewport = rViewInformation.getViewport(); - if(getLocal2DDecomposition().hasElements() && !rViewport.equal(getViewport())) + if(getBuffered2DDecomposition().hasElements() && !rViewport.equal(getViewport())) { // conditions of last local decomposition have changed, delete - const_cast< ViewportDependentPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< ViewportDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember new valid DiscreteUnit const_cast< ViewportDependentPrimitive2D* >(this)->maViewport = rViewport; diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx index 935b5a14c2d9..cfeb5e35edc5 100644 --- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx @@ -158,7 +158,7 @@ namespace drawinglayer } } - Primitive2DSequence ScenePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence ScenePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence aRetval; @@ -365,7 +365,7 @@ namespace drawinglayer bool bNeedNewDecomposition(false); bool bDiscreteSizesAreCalculated(false); - if(getLocal2DDecomposition().hasElements()) + if(getBuffered2DDecomposition().hasElements()) { basegfx::B2DRange aVisibleDiscreteRange; calculateDsicreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); @@ -392,10 +392,10 @@ namespace drawinglayer if(bNeedNewDecomposition) { // conditions of last local decomposition have changed, delete - const_cast< ScenePrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< ScenePrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { if(!bDiscreteSizesAreCalculated) { diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx index 695c92d2b951..787e221c406f 100644 --- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx @@ -602,7 +602,7 @@ namespace drawinglayer } } - Primitive2DSequence TextDecoratedPortionPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence TextDecoratedPortionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { std::vector< Primitive2DReference > aNewPrimitives; basegfx::DecomposedB2DHomMatrixContainer aDecTrans(getTextTransform()); diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx index 22e51ae6f630..a2bbdb90889a 100644 --- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx @@ -50,7 +50,7 @@ namespace drawinglayer { static double fDiscreteSize(1.1); - Primitive2DSequence TextEffectPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence TextEffectPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence aRetval; @@ -218,16 +218,16 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(getLocal2DDecomposition().hasElements()) + if(getBuffered2DDecomposition().hasElements()) { if(maLastObjectToViewTransformation != rViewInformation.getObjectToViewTransformation()) { // conditions of last local decomposition have changed, delete - const_cast< TextEffectPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< TextEffectPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember ViewRange and ViewTransformation const_cast< TextEffectPrimitive2D* >(this)->maLastObjectToViewTransformation = rViewInformation.getObjectToViewTransformation(); diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx index b74c4eabf898..819f94759ae0 100644 --- a/drawinglayer/source/primitive2d/textprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx @@ -181,7 +181,7 @@ namespace drawinglayer } } - Primitive2DSequence TextSimplePortionPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence TextSimplePortionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; diff --git a/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx b/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx index 07022229bfa8..4d50cb78da06 100644 --- a/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx @@ -48,7 +48,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence WrongSpellPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence WrongSpellPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // ATM this decompose is view-independent, what the original VCL-Display is not. To mimic // the old behaviour here if wanted it is necessary to add get2DDecomposition and implement diff --git a/drawinglayer/source/primitive3d/baseprimitive3d.cxx b/drawinglayer/source/primitive3d/baseprimitive3d.cxx index 57a016851af9..c30545e4f7c3 100644 --- a/drawinglayer/source/primitive3d/baseprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/baseprimitive3d.cxx @@ -94,28 +94,28 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence BufDecPrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence BufferedDecompositionPrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { return Primitive3DSequence(); } - BufDecPrimitive3D::BufDecPrimitive3D() + BufferedDecompositionPrimitive3D::BufferedDecompositionPrimitive3D() : BasePrimitive3D(), - maLocal3DDecomposition() + maBuffered3DDecomposition() { } - Primitive3DSequence BufDecPrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const + Primitive3DSequence BufferedDecompositionPrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const { ::osl::MutexGuard aGuard( m_aMutex ); - if(!getLocal3DDecomposition().hasElements()) + if(!getBuffered3DDecomposition().hasElements()) { - const Primitive3DSequence aNewSequence(createLocal3DDecomposition(rViewInformation)); - const_cast< BufDecPrimitive3D* >(this)->setLocal3DDecomposition(aNewSequence); + const Primitive3DSequence aNewSequence(create3DDecomposition(rViewInformation)); + const_cast< BufferedDecompositionPrimitive3D* >(this)->setBuffered3DDecomposition(aNewSequence); } - return getLocal3DDecomposition(); + return getBuffered3DDecomposition(); } } // end of namespace primitive3d } // end of namespace drawinglayer @@ -135,7 +135,7 @@ namespace drawinglayer if(rCandidate.is()) { // try to get C++ implementation base - const BufDecPrimitive3D* pCandidate(dynamic_cast< BufDecPrimitive3D* >(rCandidate.get())); + const BasePrimitive3D* pCandidate(dynamic_cast< BasePrimitive3D* >(rCandidate.get())); if(pCandidate) { @@ -185,8 +185,8 @@ namespace drawinglayer return true; } - const BufDecPrimitive3D* pA(dynamic_cast< const BufDecPrimitive3D* >(rxA.get())); - const BufDecPrimitive3D* pB(dynamic_cast< const BufDecPrimitive3D* >(rxB.get())); + const BasePrimitive3D* pA(dynamic_cast< const BasePrimitive3D* >(rxA.get())); + const BasePrimitive3D* pB(dynamic_cast< const BasePrimitive3D* >(rxB.get())); const bool bAEqualZero(pA == 0L); if(bAEqualZero != (pB == 0L)) diff --git a/drawinglayer/source/primitive3d/groupprimitive3d.cxx b/drawinglayer/source/primitive3d/groupprimitive3d.cxx index ae2a6fa8c75a..17736a276b38 100644 --- a/drawinglayer/source/primitive3d/groupprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/groupprimitive3d.cxx @@ -49,14 +49,8 @@ namespace drawinglayer { namespace primitive3d { - /// default: just return children, so all renderers not supporting group will use it's content - Primitive3DSequence GroupPrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const - { - return getChildren(); - } - GroupPrimitive3D::GroupPrimitive3D( const Primitive3DSequence& rChildren ) - : BufDecPrimitive3D(), + : BasePrimitive3D(), maChildren(rChildren) { } @@ -67,7 +61,7 @@ namespace drawinglayer */ bool GroupPrimitive3D::operator==( const BasePrimitive3D& rPrimitive ) const { - if(BufDecPrimitive3D::operator==(rPrimitive)) + if(BasePrimitive3D::operator==(rPrimitive)) { const GroupPrimitive3D& rCompare = static_cast< const GroupPrimitive3D& >(rPrimitive); @@ -77,6 +71,12 @@ namespace drawinglayer return false; } + /// default: just return children, so all renderers not supporting group will use it's content + Primitive3DSequence GroupPrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + { + return getChildren(); + } + // provide unique ID ImplPrimitrive3DIDBlock(GroupPrimitive3D, PRIMITIVE3D_ID_GROUPPRIMITIVE3D) diff --git a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx index a0d202dc9dbe..381b70d4f6cc 100644 --- a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx @@ -59,7 +59,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence HatchTexturePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence HatchTexturePrimitive3D::impCreate3DDecomposition() const { Primitive3DSequence aRetval; @@ -76,12 +76,12 @@ namespace drawinglayer if(xReference.is()) { - // try to cast to BufferedDecompositionPrimitive2D implementation - const BufDecPrimitive3D* pBasePrimitive = dynamic_cast< const BufDecPrimitive3D* >(xReference.get()); + // try to cast to BasePrimitive2D implementation + const BasePrimitive3D* pBasePrimitive = dynamic_cast< const BasePrimitive3D* >(xReference.get()); if(pBasePrimitive) { - // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + // it is a BasePrimitive3D implementation, use getPrimitive3DID() call for switch // not all content is needed, remove transparencies and ModifiedColorPrimitives switch(pBasePrimitive->getPrimitive3DID()) { @@ -287,7 +287,8 @@ namespace drawinglayer bool bModulate, bool bFilter) : TexturePrimitive3D(rChildren, rTextureSize, bModulate, bFilter), - maHatch(rHatch) + maHatch(rHatch), + maBuffered3DDecomposition() { } @@ -303,6 +304,19 @@ namespace drawinglayer return false; } + Primitive3DSequence HatchTexturePrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + { + ::osl::MutexGuard aGuard( m_aMutex ); + + if(!getBuffered3DDecomposition().hasElements()) + { + const Primitive3DSequence aNewSequence(impCreate3DDecomposition()); + const_cast< HatchTexturePrimitive3D* >(this)->setBuffered3DDecomposition(aNewSequence); + } + + return getBuffered3DDecomposition(); + } + // provide unique ID ImplPrimitrive3DIDBlock(HatchTexturePrimitive3D, PRIMITIVE3D_ID_HATCHTEXTUREPRIMITIVE3D) diff --git a/drawinglayer/source/primitive3d/hittestprimitive3d.cxx b/drawinglayer/source/primitive3d/hittestprimitive3d.cxx index 9288b3a79219..65aede8142aa 100644 --- a/drawinglayer/source/primitive3d/hittestprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/hittestprimitive3d.cxx @@ -49,12 +49,6 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence HitTestPrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const - { - // return empty sequence - return Primitive3DSequence(); - } - HitTestPrimitive3D::HitTestPrimitive3D( const Primitive3DSequence& rChildren) : GroupPrimitive3D(rChildren) @@ -66,6 +60,12 @@ namespace drawinglayer return getB3DRangeFromPrimitive3DSequence(getChildren(), rViewInformation); } + Primitive3DSequence HitTestPrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + { + // return empty sequence + return Primitive3DSequence(); + } + // provide unique ID ImplPrimitrive3DIDBlock(HitTestPrimitive3D, PRIMITIVE3D_ID_HITTESTPRIMITIVE3D) diff --git a/drawinglayer/source/primitive3d/polygonprimitive3d.cxx b/drawinglayer/source/primitive3d/polygonprimitive3d.cxx index 9fba5c97cd93..ee38b8782cff 100644 --- a/drawinglayer/source/primitive3d/polygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygonprimitive3d.cxx @@ -56,7 +56,7 @@ namespace drawinglayer PolygonHairlinePrimitive3D::PolygonHairlinePrimitive3D( const basegfx::B3DPolygon& rPolygon, const basegfx::BColor& rBColor) - : BufDecPrimitive3D(), + : BasePrimitive3D(), maPolygon(rPolygon), maBColor(rBColor) { @@ -64,7 +64,7 @@ namespace drawinglayer bool PolygonHairlinePrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const { - if(BufDecPrimitive3D::operator==(rPrimitive)) + if(BasePrimitive3D::operator==(rPrimitive)) { const PolygonHairlinePrimitive3D& rCompare = (PolygonHairlinePrimitive3D&)rPrimitive; @@ -92,7 +92,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence PolygonStrokePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence PolygonStrokePrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { Primitive3DSequence aRetval; @@ -145,7 +145,7 @@ namespace drawinglayer const basegfx::B3DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute) - : BufDecPrimitive3D(), + : BufferedDecompositionPrimitive3D(), maPolygon(rPolygon), maLineAttribute(rLineAttribute), maStrokeAttribute(rStrokeAttribute) @@ -155,7 +155,7 @@ namespace drawinglayer PolygonStrokePrimitive3D::PolygonStrokePrimitive3D( const basegfx::B3DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute) - : BufDecPrimitive3D(), + : BufferedDecompositionPrimitive3D(), maPolygon(rPolygon), maLineAttribute(rLineAttribute), maStrokeAttribute() @@ -164,7 +164,7 @@ namespace drawinglayer bool PolygonStrokePrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const { - if(BufDecPrimitive3D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive3D::operator==(rPrimitive)) { const PolygonStrokePrimitive3D& rCompare = (PolygonStrokePrimitive3D&)rPrimitive; diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx index 5ce26203a703..d95473a27805 100644 --- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx @@ -178,7 +178,7 @@ namespace drawinglayer { // nSegments is for whole circle, adapt to half circle const sal_uInt32 nVerSeg(nSegments >> 1L); - std::vector< BufDecPrimitive3D* > aResultVector; + std::vector< BasePrimitive3D* > aResultVector; if(nVerSeg) { @@ -196,7 +196,7 @@ namespace drawinglayer { const basegfx::B3DPolygon aPartPolygon(aSphere.getB3DPolygon(a)); const basegfx::B3DPolyPolygon aPartPolyPolygon(aPartPolygon); - BufDecPrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aPartPolyPolygon, rMaterial, false); + BasePrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aPartPolyPolygon, rMaterial, false); aResultVector.push_back(pNew); } } @@ -345,7 +345,7 @@ namespace drawinglayer if(aNewPolygon.count()) { const basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon); - BufDecPrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aNewPolyPolygon, rMaterial, false); + BasePrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aNewPolyPolygon, rMaterial, false); aResultVector.push_back(pNew); } @@ -359,7 +359,7 @@ namespace drawinglayer // create primitive const basegfx::B3DPolyPolygon aMiterPolyPolygon(aMiterPolygon); - BufDecPrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aMiterPolyPolygon, rMaterial, false); + BasePrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aMiterPolyPolygon, rMaterial, false); aResultVector.push_back(pNew); } @@ -417,10 +417,10 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence PolygonTubePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence PolygonTubePrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { const sal_uInt32 nPointCount(getB3DPolygon().count()); - std::vector< BufDecPrimitive3D* > aResultVector; + std::vector< BasePrimitive3D* > aResultVector; if(0L != nPointCount) { diff --git a/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx b/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx index a80d757ee4a0..f05a85869cbf 100644 --- a/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx @@ -55,7 +55,7 @@ namespace drawinglayer const basegfx::B3DPolyPolygon& rPolyPolygon, const attribute::MaterialAttribute3D& rMaterial, bool bDoubleSided) - : BufDecPrimitive3D(), + : BasePrimitive3D(), maPolyPolygon(rPolyPolygon), maMaterial(rMaterial), mbDoubleSided(bDoubleSided) @@ -64,7 +64,7 @@ namespace drawinglayer bool PolyPolygonMaterialPrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const { - if(BufDecPrimitive3D::operator==(rPrimitive)) + if(BasePrimitive3D::operator==(rPrimitive)) { const PolyPolygonMaterialPrimitive3D& rCompare = (PolyPolygonMaterialPrimitive3D&)rPrimitive; diff --git a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx index 1d5401533e00..739914562071 100644 --- a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx @@ -56,7 +56,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrCubePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence SdrCubePrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { const basegfx::B3DRange aUnitRange(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); Primitive3DSequence aRetval; diff --git a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx index 00a53b2f6578..df682ab04e6f 100644 --- a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx +++ b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx @@ -221,7 +221,7 @@ namespace drawinglayer { bool bModulate(::com::sun::star::drawing::TextureMode_MODULATE == aSdr3DObjectAttribute.getTextureMode()); bool bFilter(aSdr3DObjectAttribute.getTextureFilter()); - BufDecPrimitive3D* pNewTexturePrimitive3D = 0L; + BasePrimitive3D* pNewTexturePrimitive3D = 0L; if(rFill.isGradient()) { diff --git a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx index bc99bab20740..3554e9266ec1 100644 --- a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx @@ -57,7 +57,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrExtrudePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const + Primitive3DSequence SdrExtrudePrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const { Primitive3DSequence aRetval; @@ -510,14 +510,14 @@ namespace drawinglayer if(getSdr3DObjectAttribute().getReducedLineGeometry()) { if(!mpLastRLGViewInformation || - (getLocal3DDecomposition().hasElements() + (getBuffered3DDecomposition().hasElements() && *mpLastRLGViewInformation != rViewInformation)) { // conditions of last local decomposition with reduced lines have changed. Remember // new one and clear current decompositiopn ::osl::Mutex m_mutex; SdrExtrudePrimitive3D* pThat = const_cast< SdrExtrudePrimitive3D* >(this); - pThat->setLocal3DDecomposition(Primitive3DSequence()); + pThat->setBuffered3DDecomposition(Primitive3DSequence()); delete pThat->mpLastRLGViewInformation; pThat->mpLastRLGViewInformation = new geometry::ViewInformation3D(rViewInformation); } diff --git a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx index 852a08642375..5e6c34e644de 100644 --- a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx @@ -57,7 +57,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrLathePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const + Primitive3DSequence SdrLathePrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const { Primitive3DSequence aRetval; @@ -369,14 +369,14 @@ namespace drawinglayer if(getSdr3DObjectAttribute().getReducedLineGeometry()) { if(!mpLastRLGViewInformation || - (getLocal3DDecomposition().hasElements() + (getBuffered3DDecomposition().hasElements() && *mpLastRLGViewInformation != rViewInformation)) { // conditions of last local decomposition with reduced lines have changed. Remember // new one and clear current decompositiopn ::osl::Mutex m_mutex; SdrLathePrimitive3D* pThat = const_cast< SdrLathePrimitive3D* >(this); - pThat->setLocal3DDecomposition(Primitive3DSequence()); + pThat->setBuffered3DDecomposition(Primitive3DSequence()); delete pThat->mpLastRLGViewInformation; pThat->mpLastRLGViewInformation = new geometry::ViewInformation3D(rViewInformation); } diff --git a/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx index 5a12bc35a454..69049fb7b24d 100644 --- a/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrPolyPolygonPrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence SdrPolyPolygonPrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { Primitive3DSequence aRetval; diff --git a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx index dcef40ac3cdc..f8489b6418ff 100644 --- a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx @@ -103,7 +103,7 @@ namespace drawinglayer const basegfx::B2DVector& rTextureSize, const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute, const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute) - : BufDecPrimitive3D(), + : BufferedDecompositionPrimitive3D(), maTransform(rTransform), maTextureSize(rTextureSize), maSdrLFSAttribute(rSdrLFSAttribute), @@ -113,7 +113,7 @@ namespace drawinglayer bool SdrPrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const { - if(BufDecPrimitive3D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive3D::operator==(rPrimitive)) { const SdrPrimitive3D& rCompare = static_cast< const SdrPrimitive3D& >(rPrimitive); diff --git a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx index 61d14181a8e8..663ae6ad0d37 100644 --- a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx @@ -56,7 +56,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrSpherePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence SdrSpherePrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { Primitive3DSequence aRetval; const basegfx::B3DRange aUnitRange(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); diff --git a/drawinglayer/source/primitive3d/textureprimitive3d.cxx b/drawinglayer/source/primitive3d/textureprimitive3d.cxx index b5195811472b..16f33435a38b 100644 --- a/drawinglayer/source/primitive3d/textureprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/textureprimitive3d.cxx @@ -81,7 +81,27 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence UnifiedAlphaTexturePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + UnifiedAlphaTexturePrimitive3D::UnifiedAlphaTexturePrimitive3D( + double fTransparence, + const Primitive3DSequence& rChildren) + : TexturePrimitive3D(rChildren, basegfx::B2DVector(), false, false), + mfTransparence(fTransparence) + { + } + + bool UnifiedAlphaTexturePrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const + { + if(TexturePrimitive3D::operator==(rPrimitive)) + { + const UnifiedAlphaTexturePrimitive3D& rCompare = (UnifiedAlphaTexturePrimitive3D&)rPrimitive; + + return (getTransparence() == rCompare.getTransparence()); + } + + return false; + } + + Primitive3DSequence UnifiedAlphaTexturePrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { if(0.0 == getTransparence()) { @@ -103,26 +123,6 @@ namespace drawinglayer } } - UnifiedAlphaTexturePrimitive3D::UnifiedAlphaTexturePrimitive3D( - double fTransparence, - const Primitive3DSequence& rChildren) - : TexturePrimitive3D(rChildren, basegfx::B2DVector(), false, false), - mfTransparence(fTransparence) - { - } - - bool UnifiedAlphaTexturePrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const - { - if(TexturePrimitive3D::operator==(rPrimitive)) - { - const UnifiedAlphaTexturePrimitive3D& rCompare = (UnifiedAlphaTexturePrimitive3D&)rPrimitive; - - return (getTransparence() == rCompare.getTransparence()); - } - - return false; - } - // provide unique ID ImplPrimitrive3DIDBlock(UnifiedAlphaTexturePrimitive3D, PRIMITIVE3D_ID_UNIFIEDALPHATEXTUREPRIMITIVE3D) @@ -135,11 +135,6 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence GradientTexturePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const - { - return getChildren(); - } - GradientTexturePrimitive3D::GradientTexturePrimitive3D( const attribute::FillGradientAttribute& rGradient, const Primitive3DSequence& rChildren, @@ -175,11 +170,6 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence BitmapTexturePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const - { - return getChildren(); - } - BitmapTexturePrimitive3D::BitmapTexturePrimitive3D( const attribute::FillBitmapAttribute& rBitmap, const Primitive3DSequence& rChildren, diff --git a/drawinglayer/source/processor2d/baseprocessor2d.cxx b/drawinglayer/source/processor2d/baseprocessor2d.cxx index 28023c8b253f..76f66b85c9fa 100644 --- a/drawinglayer/source/processor2d/baseprocessor2d.cxx +++ b/drawinglayer/source/processor2d/baseprocessor2d.cxx @@ -74,12 +74,12 @@ namespace drawinglayer if(xReference.is()) { - // try to cast to BufferedDecompositionPrimitive2D implementation - const primitive2d::BufferedDecompositionPrimitive2D* pBasePrimitive = dynamic_cast< const primitive2d::BufferedDecompositionPrimitive2D* >(xReference.get()); + // try to cast to BasePrimitive2D implementation + const primitive2d::BasePrimitive2D* pBasePrimitive = dynamic_cast< const primitive2d::BasePrimitive2D* >(xReference.get()); if(pBasePrimitive) { - // it is a BufferedDecompositionPrimitive2D implementation, use local processor + // it is a BasePrimitive2D implementation, use local processor processBasePrimitive2D(*pBasePrimitive); } else diff --git a/drawinglayer/source/processor3d/baseprocessor3d.cxx b/drawinglayer/source/processor3d/baseprocessor3d.cxx index 532b792379a2..7d630f2522be 100644 --- a/drawinglayer/source/processor3d/baseprocessor3d.cxx +++ b/drawinglayer/source/processor3d/baseprocessor3d.cxx @@ -74,8 +74,8 @@ namespace drawinglayer if(xReference.is()) { - // try to cast to BufDecPrimitive3D implementation - const primitive3d::BufDecPrimitive3D* pBasePrimitive = dynamic_cast< const primitive3d::BufDecPrimitive3D* >(xReference.get()); + // try to cast to BasePrimitive3D implementation + const primitive3d::BasePrimitive3D* pBasePrimitive = dynamic_cast< const primitive3d::BasePrimitive3D* >(xReference.get()); if(pBasePrimitive) { diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx index d5658b966fe8..5f35960323fe 100644 --- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx +++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx @@ -468,7 +468,7 @@ namespace drawinglayer void DefaultProcessor3D::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rBasePrimitive) { - // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + // it is a BasePrimitive3D implementation, use getPrimitive3DID() call for switch switch(rBasePrimitive.getPrimitive3DID()) { case PRIMITIVE3D_ID_GRADIENTTEXTUREPRIMITIVE3D : diff --git a/drawinglayer/source/processor3d/shadow3dextractor.cxx b/drawinglayer/source/processor3d/shadow3dextractor.cxx index 166620666300..5e6678fc3a8e 100644 --- a/drawinglayer/source/processor3d/shadow3dextractor.cxx +++ b/drawinglayer/source/processor3d/shadow3dextractor.cxx @@ -60,10 +60,10 @@ namespace drawinglayer namespace processor3d { // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufDecPrimitive3D-based. + // virtual render method when the primitive implementation is BasePrimitive3D-based. void Shadow3DExtractingProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) { - // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + // it is a BasePrimitive3D implementation, use getPrimitive3DID() call for switch switch(rCandidate.getPrimitive3DID()) { case PRIMITIVE3D_ID_SHADOWPRIMITIVE3D : diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx index f8f1056fbaac..48c1bee86575 100644 --- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx +++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx @@ -486,7 +486,7 @@ namespace drawinglayer // the processing method for a single, known primitive void ZBufferProcessor3D::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rBasePrimitive) { - // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + // it is a BasePrimitive3D implementation, use getPrimitive3DID() call for switch switch(rBasePrimitive.getPrimitive3DID()) { case PRIMITIVE3D_ID_ALPHATEXTUREPRIMITIVE3D : diff --git a/svx/inc/svx/sdr/overlay/overlaytools.hxx b/svx/inc/svx/sdr/overlay/overlaytools.hxx index f02cf44297f9..830f3dc12586 100644 --- a/svx/inc/svx/sdr/overlay/overlaytools.hxx +++ b/svx/inc/svx/sdr/overlay/overlaytools.hxx @@ -58,7 +58,7 @@ namespace drawinglayer sal_uInt16 mnCenterY; protected: - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: OverlayBitmapExPrimitive( @@ -99,7 +99,7 @@ namespace drawinglayer double mfDiscreteDashLength; protected: - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: OverlayCrosshairPrimitive( @@ -148,7 +148,7 @@ namespace drawinglayer double mfRotation; protected: - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: OverlayHatchRectanglePrimitive( @@ -206,7 +206,7 @@ namespace drawinglayer double mfDiscreteDashLength; protected: - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: OverlayHelplineStripedPrimitive( @@ -251,7 +251,7 @@ namespace drawinglayer double mfDiscreteDashLength; protected: - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: OverlayRollingRectanglePrimitive( diff --git a/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx index 26ce0fc0673a..177c42bfff17 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx @@ -57,7 +57,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrCaptionPrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx index a7465c1c7a4a..5523480f1f51 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrconnectorprimitive2d.hxx @@ -53,7 +53,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrConnectorPrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx index 64716b479ce7..feedfefc0fe6 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx @@ -59,7 +59,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrCustomShapePrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx index bcaf0aa22ea0..1d11c27ede71 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrellipseprimitive2d.hxx @@ -53,7 +53,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrEllipsePrimitive2D( @@ -91,7 +91,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrEllipseSegmentPrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx index c3cdf4080f84..787c230d7b3d 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrgrafprimitive2d.hxx @@ -57,7 +57,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrGrafPrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx index 7244e4d2a743..7cc0f6dde9a5 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx @@ -88,7 +88,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrMeasurePrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx index 7fcde5221f87..d1b473bd4f5a 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx @@ -55,7 +55,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrOle2Primitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx index c6349fe7d39c..fb14a6192873 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx @@ -58,7 +58,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrOleContentPrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx index bb0731cea3d1..d6de666d901f 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx @@ -55,7 +55,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrPathPrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx index 1a34d4b35a28..2f4bd690d8de 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx @@ -61,7 +61,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrRectanglePrimitive2D( diff --git a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx index 35b0f42eaa6e..d1bdfdfc5038 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx @@ -138,7 +138,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrContourTextPrimitive2D( @@ -180,7 +180,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrPathTextPrimitive2D( @@ -224,7 +224,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrBlockTextPrimitive2D( @@ -267,7 +267,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrStretchTextPrimitive2D( diff --git a/svx/source/engine3d/helperhittest3d.cxx b/svx/source/engine3d/helperhittest3d.cxx index c2729e95dc93..e2bbe430987d 100644 --- a/svx/source/engine3d/helperhittest3d.cxx +++ b/svx/source/engine3d/helperhittest3d.cxx @@ -100,7 +100,7 @@ namespace drawinglayer basegfx::B3DHomMatrix maCombinedTransform; // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufDecPrimitive3D-based. + // virtual render method when the primitive implementation is BasePrimitive3D-based. virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); public: @@ -120,7 +120,7 @@ namespace drawinglayer void CutFindProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) { - // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + // it is a BasePrimitive3D implementation, use getPrimitive3DID() call for switch switch(rCandidate.getPrimitive3DID()) { case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D : diff --git a/svx/source/engine3d/helperminimaldepth3d.cxx b/svx/source/engine3d/helperminimaldepth3d.cxx index 965343009b21..35ebb4dec0f6 100644 --- a/svx/source/engine3d/helperminimaldepth3d.cxx +++ b/svx/source/engine3d/helperminimaldepth3d.cxx @@ -55,7 +55,7 @@ namespace drawinglayer double mfMinimalDepth; // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufDecPrimitive3D-based. + // virtual render method when the primitive implementation is BasePrimitive3D-based. virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); public: @@ -70,7 +70,7 @@ namespace drawinglayer void MinimalDephInViewExtractor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) { - // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + // it is a BasePrimitive3D implementation, use getPrimitive3DID() call for switch switch(rCandidate.getPrimitive3DID()) { case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D : diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx index 381b86f0f4c5..e8aace40eac5 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx @@ -164,7 +164,7 @@ namespace sdr const sal_uInt32 nYDist(((SdrShadowYDistItem&)(rItemSet.Get(SDRATTR_SHADOWYDIST))).GetValue()); aObjectMatrix.translate(nXDist, nYDist); - // create unit outline polygon as geometry (see SdrCaptionPrimitive2D::createLocal2DDecomposition) + // create unit outline polygon as geometry (see SdrCaptionPrimitive2D::create2DDecomposition) basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0), fCornerRadiusX, fCornerRadiusY)); // create the specialized shadow primitive diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx index 6b6e4e5e641a..f265af141ef1 100644 --- a/svx/source/sdr/contact/viewobjectcontact.cxx +++ b/svx/source/sdr/contact/viewobjectcontact.cxx @@ -78,7 +78,7 @@ namespace unsigned mbGraphicAnimationAllowed : 1; // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufferedDecompositionPrimitive2D-based. + // virtual render method when the primitive implementation is BasePrimitive2D-based. virtual void processBasePrimitive2D(const drawinglayer::primitive2d::BasePrimitive2D& rCandidate); public: diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx index cb410cb7ef5f..f81824c1012c 100644 --- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx @@ -153,7 +153,7 @@ namespace sdr // would be possible, but would require the internal transformation // which maps between the page visualisation object and the page // content, including the aspect ratios (for details see in - // PagePreviewPrimitive2D::createLocal2DDecomposition) + // PagePreviewPrimitive2D::create2DDecomposition) basegfx::B2DRange(), GetXDrawPageForSdrPage(const_cast< SdrPage* >(pStartPage)), diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 652b9f5ee56f..b50426f7b65d 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -790,7 +790,7 @@ namespace sdr { namespace contact { ) const; virtual ::drawinglayer::primitive2d::Primitive2DSequence - createLocal2DDecomposition( + create2DDecomposition( const ::drawinglayer::geometry::ViewInformation2D& rViewInformation ) const; @@ -1486,7 +1486,7 @@ namespace sdr { namespace contact { } //-------------------------------------------------------------------- - ::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::createLocal2DDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const + ::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::create2DDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const { // force control here to make it a VCL ChildWindow. Will be fetched // and used below by getExistentControl() diff --git a/svx/source/sdr/overlay/overlaytools.cxx b/svx/source/sdr/overlay/overlaytools.cxx index 7abb56785666..6755d09fb34b 100644 --- a/svx/source/sdr/overlay/overlaytools.cxx +++ b/svx/source/sdr/overlay/overlaytools.cxx @@ -59,7 +59,7 @@ namespace drawinglayer mnCenterY(nCenterY) {} - Primitive2DSequence OverlayBitmapExPrimitive::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence OverlayBitmapExPrimitive::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; const Size aBitmapSize(getBitmapEx().GetSizePixel()); @@ -129,7 +129,7 @@ namespace drawinglayer mfDiscreteDashLength(fDiscreteDashLength) {} - Primitive2DSequence OverlayCrosshairPrimitive::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence OverlayCrosshairPrimitive::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // use the prepared Viewport information accessible using getViewport() Primitive2DSequence aRetval; @@ -208,7 +208,7 @@ namespace drawinglayer mfRotation(fRotation) {} - Primitive2DSequence OverlayHatchRectanglePrimitive::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence OverlayHatchRectanglePrimitive::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; @@ -301,7 +301,7 @@ namespace drawinglayer mfDiscreteDashLength(fDiscreteDashLength) {} - Primitive2DSequence OverlayHelplineStripedPrimitive::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence OverlayHelplineStripedPrimitive::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { // use the prepared Viewport information accessible using getViewport() Primitive2DSequence aRetval; @@ -417,7 +417,7 @@ namespace drawinglayer mfDiscreteDashLength(fDiscreteDashLength) {} - Primitive2DSequence OverlayRollingRectanglePrimitive::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence OverlayRollingRectanglePrimitive::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // use the prepared Viewport information accessible using getViewport() Primitive2DSequence aRetval; diff --git a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx index 8fb3ba8790bc..174320380432 100644 --- a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrCaptionPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrCaptionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; Primitive2DSequence aHitTestContent; diff --git a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx index 406ddc4986e5..ceb05c758887 100644 --- a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrConnectorPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrConnectorPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx index 01002e133f84..aacfca368e0d 100644 --- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrCustomShapePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrCustomShapePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval(getSubPrimitives()); diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 639ec09f6a34..3fbcc15dd473 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -137,7 +137,7 @@ namespace drawinglayer // create line and stroke attribute const attribute::LineAttribute aLineAttribute(rLine.getColor(), rLine.getWidth(), rLine.getJoin()); const attribute::StrokeAttribute aStrokeAttribute(rLine.getDotDashArray(), rLine.getFullDotDashLen()); - BufferedDecompositionPrimitive2D* pNewLinePrimitive = 0L; + BasePrimitive2D* pNewLinePrimitive = 0L; if(!rUnitPolygon.isClosed() && pStroke) { diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx index 8aa644da938e..1c2cc70842d2 100644 --- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx @@ -50,7 +50,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrEllipsePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrEllipsePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; @@ -140,7 +140,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrEllipseSegmentPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrEllipseSegmentPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx index 3cc4e7b865d4..5d37483d4e2a 100644 --- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx @@ -44,7 +44,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrGrafPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrGrafPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index 1fcd1047c5ef..4623182ace23 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -83,7 +83,7 @@ namespace drawinglayer return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), &aLineStartEnd); } - Primitive2DSequence SdrMeasurePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const + Primitive2DSequence SdrMeasurePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; SdrBlockTextPrimitive2D* pBlockText = 0L; @@ -424,7 +424,7 @@ namespace drawinglayer // apply to existing text primitive SdrTextPrimitive2D* pNewBlockText = pBlockText->createTransformedClone(aChange); - OSL_ENSURE(pNewBlockText, "SdrMeasurePrimitive2D::createLocal2DDecomposition: Could not create transformed clone of text primitive (!)"); + OSL_ENSURE(pNewBlockText, "SdrMeasurePrimitive2D::create2DDecomposition: Could not create transformed clone of text primitive (!)"); delete pBlockText; // add to local primitives diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx index 78978202f20b..d16b6d813c62 100644 --- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx @@ -46,9 +46,9 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrOle2Primitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrOle2Primitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { - // to take care of getSdrLFSTAttribute() later, the same as in SdrGrafPrimitive2D::createLocal2DDecomposition + // to take care of getSdrLFSTAttribute() later, the same as in SdrGrafPrimitive2D::create2DDecomposition // should happen. For the moment we only need the OLE itself // Added complete primitive preparation using getSdrLFSTAttribute() now. To not do stuff which is not needed now, it // may be supressed by using a static bool. The paint version only supported text. diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx index a2039e1923fa..57e685313586 100644 --- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrOleContentPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrOleContentPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; const SdrOle2Obj* pSource = (mpSdrOle2Obj.is() ? static_cast< SdrOle2Obj* >(mpSdrOle2Obj.get()) : 0); diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx index 7e18afafb5f2..3e9976cac83a 100644 --- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrPathPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrPathPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx index 04e02be419fa..42fc8beabc8c 100644 --- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx @@ -47,7 +47,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrRectanglePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrRectanglePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; Primitive2DSequence aHitTestContent; diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index 012928fec8d0..a39fb2d6c2a1 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -155,7 +155,7 @@ namespace drawinglayer sal_Int16 nCurrentlyValidPageNumber(0); sal_Int16 nCurrentlyValidPageCount(0); - if(getLocal2DDecomposition().hasElements()) + if(getBuffered2DDecomposition().hasElements()) { bool bDoDelete(getLastSpellCheck() != bCurrentSpellCheck); @@ -209,11 +209,11 @@ namespace drawinglayer if(bDoDelete) { - const_cast< SdrTextPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< SdrTextPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { if(!bCurrentlyVisualizingPageIsSet && mbContainsPageField) { @@ -255,7 +255,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrContourTextPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const + Primitive2DSequence SdrContourTextPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; const bool bCurrentSpellCheck(getSdrText() @@ -316,7 +316,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrPathTextPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const + Primitive2DSequence SdrPathTextPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; const bool bCurrentSpellCheck(getSdrText() @@ -380,7 +380,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrBlockTextPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const + Primitive2DSequence SdrBlockTextPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; const bool bCurrentSpellCheck(getSdrText() @@ -449,7 +449,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrStretchTextPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const + Primitive2DSequence SdrStretchTextPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; const bool bCurrentSpellCheck(getSdrText() diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index 05c21c606711..f3bdeeb4811c 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -231,8 +231,8 @@ namespace class impPolygonParagraphHandler { const drawinglayer::attribute::SdrFormTextAttribute& mrSdrFormTextAttribute; // FormText parameters - std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* >& mrDecomposition; // destination primitive list - std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* >& mrShadowDecomposition; // destination primitive list for shadow + std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& mrDecomposition; // destination primitive list + std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& mrShadowDecomposition; // destination primitive list for shadow Reference < com::sun::star::i18n::XBreakIterator > mxBreak; // break iterator double getParagraphTextLength(const ::std::vector< const impPathTextPortion* >& rTextPortions) @@ -271,8 +271,8 @@ namespace public: impPolygonParagraphHandler( const drawinglayer::attribute::SdrFormTextAttribute& rSdrFormTextAttribute, - std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* >& rDecomposition, - std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* >& rShadowDecomposition) + std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rDecomposition, + std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rShadowDecomposition) : mrSdrFormTextAttribute(rSdrFormTextAttribute), mrDecomposition(rDecomposition), mrShadowDecomposition(rShadowDecomposition) @@ -571,7 +571,7 @@ namespace const basegfx::B2DHomMatrix& rTransform, const drawinglayer::attribute::LineAttribute& rLineAttribute, const drawinglayer::attribute::StrokeAttribute& rStrokeAttribute, - std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* >& rTarget) + std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rTarget) { for(basegfx::B2DPolyPolygonVector::const_iterator aPolygon(rB2DPolyPolyVector.begin()); aPolygon != rB2DPolyPolyVector.end(); aPolygon++) { @@ -591,7 +591,7 @@ namespace } drawinglayer::primitive2d::Primitive2DSequence impAddPathTextOutlines( - const std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* >& rSource, + const std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rSource, const drawinglayer::attribute::SdrFormTextOutlineAttribute& rOutlineAttribute) { std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aNewPrimitives; @@ -611,7 +611,7 @@ namespace if(aB2DPolyPolyVector.size()) { // create stroke primitives - std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* > aStrokePrimitives; + std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aStrokePrimitives; impAddPolygonStrokePrimitives( aB2DPolyPolyVector, aPolygonTransform, @@ -710,8 +710,8 @@ bool SdrTextObj::impDecomposePathTextPrimitive( if(nLoopCount) { // prepare common decomposition stuff - std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* > aRegularDecomposition; - std::vector< drawinglayer::primitive2d::BufferedDecompositionPrimitive2D* > aShadowDecomposition; + std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aRegularDecomposition; + std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aShadowDecomposition; impPolygonParagraphHandler aPolygonParagraphHandler( rFormTextAttribute, aRegularDecomposition, aShadowDecomposition); sal_uInt32 a; diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index c6a572928892..a8396e4eff16 100644 --- a/svx/source/table/viewcontactoftableobj.cxx +++ b/svx/source/table/viewcontactoftableobj.cxx @@ -72,7 +72,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrCellPrimitive2D( @@ -95,7 +95,7 @@ namespace drawinglayer DeclPrimitrive2DIDBlock() }; - Primitive2DSequence SdrCellPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrCellPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; @@ -173,7 +173,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrBorderlinePrimitive2D( @@ -282,7 +282,7 @@ namespace drawinglayer return (double)nValue; } - Primitive2DSequence SdrBorderlinePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + Primitive2DSequence SdrBorderlinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence xRetval(4); sal_uInt32 nInsert(0); -- cgit From 5cd6a50c1e2783b21340b7d6ee89e4e42221ffe7 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 17 Sep 2009 17:20:13 +0200 Subject: #i97509# added base class for 3d primitive, re-structured group primitives, added documentation --- .../view/SlsPageObjectViewObjectContact.cxx | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx index 7908b4730eac..e3215ebd8c9e 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx @@ -271,7 +271,7 @@ public: const basegfx::B2DRange& getPageObjectRange() const { return maRange; } // compare operator - virtual bool operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; }; SdPageObjectBasePrimitive::SdPageObjectBasePrimitive(const basegfx::B2DRange& rRange) @@ -284,7 +284,7 @@ SdPageObjectBasePrimitive::~SdPageObjectBasePrimitive() { } -bool SdPageObjectBasePrimitive::operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const +bool SdPageObjectBasePrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const { if(drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { @@ -306,7 +306,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -319,13 +319,13 @@ public: const BitmapEx& getBitmapEx() const { return maBitmapEx; } // compare operator - virtual bool operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; // provide unique ID DeclPrimitrive2DIDBlock() }; -Primitive2DSequence SdPageObjectPageBitmapPrimitive::createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectPageBitmapPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { // add bitmap primitive // to avoid scaling, use the Bitmap pixel size as primitive size @@ -358,7 +358,7 @@ SdPageObjectPageBitmapPrimitive::~SdPageObjectPageBitmapPrimitive() { } -bool SdPageObjectPageBitmapPrimitive::operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const +bool SdPageObjectPageBitmapPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const { if(SdPageObjectBasePrimitive::operator==(rPrimitive)) { @@ -385,7 +385,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -399,7 +399,7 @@ public: const sal_Int32 SdPageObjectSelectPrimitive::mnSelectionIndicatorOffset(1); const sal_Int32 SdPageObjectSelectPrimitive::mnSelectionIndicatorThickness(3); -Primitive2DSequence SdPageObjectSelectPrimitive::createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectSelectPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval(2); @@ -470,7 +470,7 @@ class SdPageObjectBorderPrimitive : public SdPageObjectBasePrimitive { protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -481,7 +481,7 @@ public: DeclPrimitrive2DIDBlock() }; -Primitive2DSequence SdPageObjectBorderPrimitive::createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectBorderPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { // since old Width/Height calculations always added a single pixel value, // it is necessary to create a inner range which is one display unit less @@ -523,7 +523,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -536,7 +536,7 @@ public: const sal_Int32 SdPageObjectFocusPrimitive::mnFocusIndicatorOffset(2); -Primitive2DSequence SdPageObjectFocusPrimitive::createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectFocusPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval(2); @@ -618,7 +618,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -641,7 +641,7 @@ public: bool getExcluded() const { return mbExcluded; } // compare operator - virtual bool operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; // provide unique ID DeclPrimitrive2DIDBlock() @@ -666,7 +666,7 @@ const BitmapEx& SdPageObjectFadeNameNumberPrimitive::getFadeEffectIconBitmap() c return *mpFadeEffectIconBitmap; } -Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::createLocal2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { const xub_StrLen nTextLength(getPageName().Len()); const sal_uInt32 nCount( @@ -866,7 +866,7 @@ SdPageObjectFadeNameNumberPrimitive::~SdPageObjectFadeNameNumberPrimitive() { } -bool SdPageObjectFadeNameNumberPrimitive::operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const +bool SdPageObjectFadeNameNumberPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const { if(SdPageObjectBasePrimitive::operator==(rPrimitive)) { @@ -1159,7 +1159,7 @@ private: basegfx::BColor maRGBColor; protected: - virtual drawinglayer::primitive2d::Primitive2DSequence createLocal2DDecomposition( + virtual drawinglayer::primitive2d::Primitive2DSequence create2DDecomposition( const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: @@ -1181,12 +1181,12 @@ public: sal_uInt32 getDiscreteWidth() const { return mnDiscreteWidth; } const basegfx::BColor& getRGBColor() const { return maRGBColor; } - virtual bool operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; DeclPrimitrive2DIDBlock() }; -drawinglayer::primitive2d::Primitive2DSequence MouseOverEffectPrimitive::createLocal2DDecomposition( +drawinglayer::primitive2d::Primitive2DSequence MouseOverEffectPrimitive::create2DDecomposition( const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { // get logic sizes in object coordinate system @@ -1214,7 +1214,7 @@ drawinglayer::primitive2d::Primitive2DSequence MouseOverEffectPrimitive::createL return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } -bool MouseOverEffectPrimitive::operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const +bool MouseOverEffectPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const { if(drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { -- cgit From 290947b519dc9a3ac89406075d7988f4e772c10d Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 17 Sep 2009 17:20:13 +0200 Subject: #i97509# added base class for 3d primitive, re-structured group primitives, added documentation --- sw/source/core/draw/dflyobj.cxx | 4 ++-- sw/source/ui/docvw/postit.cxx | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index 7d25656de299..cda428f124eb 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -204,7 +204,7 @@ namespace drawinglayer protected: // method which is to be used to implement the local decomposition of a 2D primitive - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: SwVirtFlyDrawObjPrimitive( @@ -239,7 +239,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SwVirtFlyDrawObjPrimitive::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence SwVirtFlyDrawObjPrimitive::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; diff --git a/sw/source/ui/docvw/postit.cxx b/sw/source/ui/docvw/postit.cxx index 7d421b49b867..c306e73ba695 100644 --- a/sw/source/ui/docvw/postit.cxx +++ b/sw/source/ui/docvw/postit.cxx @@ -1990,7 +1990,7 @@ private: ShadowState maShadowState; protected: - virtual drawinglayer::primitive2d::Primitive2DSequence createLocal2DDecomposition( + virtual drawinglayer::primitive2d::Primitive2DSequence create2DDecomposition( const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: @@ -2009,12 +2009,12 @@ public: const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; } ShadowState getShadowState() const { return maShadowState; } - virtual bool operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; DeclPrimitrive2DIDBlock() }; -drawinglayer::primitive2d::Primitive2DSequence SwPostItShadowPrimitive::createLocal2DDecomposition( +drawinglayer::primitive2d::Primitive2DSequence SwPostItShadowPrimitive::create2DDecomposition( const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const { // get logic sizes in object coordinate system @@ -2095,7 +2095,7 @@ drawinglayer::primitive2d::Primitive2DSequence SwPostItShadowPrimitive::createLo return xRetval; } -bool SwPostItShadowPrimitive::operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const +bool SwPostItShadowPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const { if(drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::operator==(rPrimitive)) { @@ -2177,7 +2177,7 @@ private: bool mbLineSolid : 1; protected: - virtual drawinglayer::primitive2d::Primitive2DSequence createLocal2DDecomposition( + virtual drawinglayer::primitive2d::Primitive2DSequence create2DDecomposition( const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: @@ -2211,12 +2211,12 @@ public: bool getShadow() const { return mbShadow; } bool getLineSolid() const { return mbLineSolid; } - virtual bool operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const; + virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const; DeclPrimitrive2DIDBlock() }; -drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkorPrimitive::createLocal2DDecomposition( +drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkorPrimitive::create2DDecomposition( const drawinglayer::geometry::ViewInformation2D& /*rViewInformation*/) const { drawinglayer::primitive2d::Primitive2DSequence aRetval; @@ -2331,7 +2331,7 @@ drawinglayer::primitive2d::Primitive2DSequence SwPostItAnkorPrimitive::createLoc return aRetval; } -bool SwPostItAnkorPrimitive::operator==( const drawinglayer::primitive2d::BufferedDecompositionPrimitive2D& rPrimitive ) const +bool SwPostItAnkorPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const { if(drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::operator==(rPrimitive)) { -- cgit From 256427a28d4ba3de573c81d64b5fbbe1cb354b01 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 22 Sep 2009 18:14:05 +0200 Subject: #i97509# continued matrix tooling and adapting the usages now to all the ooo code --- .../drawinglayer/primitive2d/alphaprimitive2d.hxx | 22 +++++++-- .../primitive2d/animatedprimitive2d.hxx | 39 +-------------- .../drawinglayer/primitive2d/bitmapprimitive2d.hxx | 21 ++++++-- .../primitive2d/polypolygonprimitive2d.hxx | 18 ++++--- .../primitive2d/textdecoratedprimitive2d.hxx | 12 ++--- .../source/primitive2d/animatedprimitive2d.cxx | 51 ++++--------------- .../source/primitive2d/controlprimitive2d.cxx | 9 ++-- .../source/primitive2d/graphicprimitive2d.cxx | 18 ++++--- .../source/primitive2d/gridprimitive2d.cxx | 7 ++- .../source/primitive2d/pagepreviewprimitive2d.cxx | 7 +-- .../source/primitive2d/polypolygonprimitive2d.cxx | 25 +++++----- .../primitive2d/textdecoratedprimitive2d.cxx | 29 +++++------ .../source/primitive2d/texteffectprimitive2d.cxx | 8 +-- .../source/primitive2d/textprimitive2d.cxx | 16 ++---- .../source/processor2d/canvasprocessor.cxx | 29 +++++------ .../source/processor2d/vclhelperbitmaprender.cxx | 20 ++++---- .../source/processor2d/vclpixelprocessor2d.cxx | 16 ++---- drawinglayer/source/processor2d/vclprocessor2d.cxx | 37 +++++++++----- drawinglayer/source/texture/texture.cxx | 6 +-- svx/source/cui/tplneend.cxx | 9 ++-- svx/source/engine3d/view3d.cxx | 11 ++--- svx/source/sdr/contact/viewcontactofgraphic.cxx | 37 +++++--------- .../sdr/contact/viewcontactofsdrcaptionobj.cxx | 28 +++-------- svx/source/sdr/contact/viewcontactofsdrcircobj.cxx | 28 +++-------- .../sdr/contact/viewcontactofsdrobjcustomshape.cxx | 18 +++---- svx/source/sdr/contact/viewcontactofsdrole2obj.cxx | 10 ++-- svx/source/sdr/contact/viewcontactofsdrpathobj.cxx | 33 ++++++------- svx/source/sdr/contact/viewcontactofsdrrectobj.cxx | 28 +++-------- svx/source/sdr/overlay/overlaytools.cxx | 8 ++- .../sdr/primitive2d/sdrdecompositiontools.cxx | 33 ++++++------- .../sdr/primitive2d/sdrellipseprimitive2d.cxx | 10 ++-- .../sdr/primitive2d/sdrmeasureprimitive2d.cxx | 7 ++- .../sdr/primitive2d/sdrolecontentprimitive2d.cxx | 12 ++--- svx/source/svdraw/gradtrns.cxx | 25 ++-------- svx/source/svdraw/svddrgmt.cxx | 34 +++++-------- svx/source/svdraw/svdfmtf.cxx | 34 +++---------- svx/source/svdraw/svdoashp.cxx | 31 +++--------- svx/source/svdraw/svdobj.cxx | 24 +-------- svx/source/svdraw/svdocirc.cxx | 36 +++++--------- svx/source/svdraw/svdomeas.cxx | 13 +---- svx/source/svdraw/svdopath.cxx | 57 ++++++---------------- svx/source/svdraw/svdotext.cxx | 39 +++------------ svx/source/svdraw/svdotextdecomposition.cxx | 35 +++++-------- svx/source/svdraw/svdovirt.cxx | 5 +- svx/source/unodraw/unoshape.cxx | 11 ++--- 45 files changed, 351 insertions(+), 655 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx index 6fdf3200543c..79518eb82358 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx @@ -44,23 +44,37 @@ namespace drawinglayer { namespace primitive2d { + /** AlphaPrimitive2D class + + This is the basic primitive for applying freely defined transparence + to freely defined content. The basic idea is to associate a content + which is defined as a sequence of primitives and hold as child content + in the GroupPrimitive2D with an alpha channel also defined as a sequence + of primitives and hold in the Alpha member. + + The basic definition is to use the Alpha content as Alpha-Mask by + interpreting the Alpha-content not as RGB, but as Luminance alpha mask + using the common RGB_to_luminance definition as e.g. used by VCL + */ class AlphaPrimitive2D : public GroupPrimitive2D { private: - Primitive2DSequence maAlpha; // transparence sequence + /// The Alpha-Mask who's RGB-Values are interpreted as Luminance + Primitive2DSequence maAlpha; public: + /// constructor AlphaPrimitive2D( const Primitive2DSequence& rChildren, const Primitive2DSequence& rAlpha); - // get data + /// data read access const Primitive2DSequence& getAlpha() const { return maAlpha; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx index 1fcde759ed68..e505594b2a76 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx @@ -38,6 +38,7 @@ #include #include +#include ////////////////////////////////////////////////////////////////////////////// // predefines @@ -113,42 +114,6 @@ namespace drawinglayer } // end of namespace primitive2d } // end of namespace drawinglayer -////////////////////////////////////////////////////////////////////////////// -// helper class for AnimatedInterpolatePrimitive2D - -namespace drawinglayer -{ - namespace primitive2d - { - class BufferedMatrixDecompose - { - private: - // the matrix itself - basegfx::B2DHomMatrix maB2DHomMatrix; - - // the decomposition - basegfx::B2DVector maScale; - basegfx::B2DVector maTranslate; - double mfRotate; - double mfShearX; - - // flag if already decomposed, used by ensureDecompose() - bool mbDecomposed; - - public: - BufferedMatrixDecompose(const basegfx::B2DHomMatrix& rMatrix); - void ensureDecompose() const; - - // data access - const basegfx::B2DHomMatrix& getB2DHomMatrix() const { return maB2DHomMatrix; } - const basegfx::B2DVector& getScale() const { return maScale; } - const basegfx::B2DVector& getTranslate() const { return maTranslate; } - double getRotate() const { return mfRotate; } - double getShearX() const { return mfShearX; } - }; - } // end of anonymous namespace -} // end of namespace drawinglayer - ////////////////////////////////////////////////////////////////////////////// namespace drawinglayer @@ -159,7 +124,7 @@ namespace drawinglayer { private: // the transformations - std::vector< BufferedMatrixDecompose > maMatrixStack; + std::vector< basegfx::tools::B2DHomMatrixBufferedDecompose > maMatrixStack; protected: // create local decomposition diff --git a/drawinglayer/inc/drawinglayer/primitive2d/bitmapprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/bitmapprimitive2d.hxx index d295c6ab4b89..f5de130febf9 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/bitmapprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/bitmapprimitive2d.hxx @@ -47,28 +47,41 @@ namespace drawinglayer { namespace primitive2d { + /** BitmapPrimitive2D class + + This class is the central primitive for Bitmap-based primitives. + It provides RGBA-based bitmaps, currently using a BitmapEx from VCL. + This may change in the future to any other, maybe more general base + class providing 24bit RGBA. + */ class BitmapPrimitive2D : public BasePrimitive2D { private: + /// the RGBA Bitmap-data BitmapEx maBitmapEx; + + /** the object transformation from unit coordinates, defining + size, shear, rotate and position + */ basegfx::B2DHomMatrix maTransform; public: + /// constructor BitmapPrimitive2D( const BitmapEx& rBitmapEx, const basegfx::B2DHomMatrix& rTransform); - // get data + /// data read access const BitmapEx& getBitmapEx() const { return maBitmapEx; } const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx index 516210a6a081..0a288cd2ac65 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx @@ -257,9 +257,10 @@ namespace drawinglayer { namespace primitive2d { - class PolyPolygonGradientPrimitive2D : public PolyPolygonColorPrimitive2D + class PolyPolygonGradientPrimitive2D : public BufferedDecompositionPrimitive2D { private: + basegfx::B2DPolyPolygon maPolyPolygon; attribute::FillGradientAttribute maFillGradient; protected: @@ -269,10 +270,10 @@ namespace drawinglayer public: PolyPolygonGradientPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, - const basegfx::BColor& rBColor, const attribute::FillGradientAttribute& rFillGradient); // get data + const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; } const attribute::FillGradientAttribute& getFillGradient() const { return maFillGradient; } // compare operator @@ -291,10 +292,12 @@ namespace drawinglayer { namespace primitive2d { - class PolyPolygonHatchPrimitive2D : public PolyPolygonColorPrimitive2D + class PolyPolygonHatchPrimitive2D : public BufferedDecompositionPrimitive2D { private: + basegfx::B2DPolyPolygon maPolyPolygon; attribute::FillHatchAttribute maFillHatch; + basegfx::BColor maBackgroundColor; protected: // local decomposition. @@ -303,10 +306,12 @@ namespace drawinglayer public: PolyPolygonHatchPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, - const basegfx::BColor& rBColor, + const basegfx::BColor& rBackgroundColor, const attribute::FillHatchAttribute& rFillHatch); // get data + const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; } + const basegfx::BColor& getBackgroundColor() const { return maBackgroundColor; } const attribute::FillHatchAttribute& getFillHatch() const { return maFillHatch; } // compare operator @@ -325,9 +330,10 @@ namespace drawinglayer { namespace primitive2d { - class PolyPolygonBitmapPrimitive2D : public PolyPolygonColorPrimitive2D + class PolyPolygonBitmapPrimitive2D : public BufferedDecompositionPrimitive2D { private: + basegfx::B2DPolyPolygon maPolyPolygon; attribute::FillBitmapAttribute maFillBitmap; protected: @@ -337,10 +343,10 @@ namespace drawinglayer public: PolyPolygonBitmapPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, - const basegfx::BColor& rBColor, const attribute::FillBitmapAttribute& rFillBitmap); // get data + const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; } const attribute::FillBitmapAttribute& getFillBitmap() const { return maFillBitmap; } // compare operator diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx index 536b267f2fbd..fb72500fcb38 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx @@ -41,9 +41,9 @@ ////////////////////////////////////////////////////////////////////////////// // predeclarations -namespace basegfx { - class DecomposedB2DHomMatrixContainer; -} // end of namespace basegfx +namespace basegfx { namespace tools { + class B2DHomMatrixBufferedOnDemandDecompose; +}} namespace com { namespace sun { namespace star { namespace i18n { struct Boundary; @@ -125,7 +125,7 @@ namespace drawinglayer // helper methods void impCreateTextLine( std::vector< Primitive2DReference >& rTarget, - basegfx::DecomposedB2DHomMatrixContainer& rDecTrans, + basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans, const basegfx::B2DHomMatrix &rUnscaledTransform, FontUnderline eLineStyle, double fLineOffset, @@ -135,7 +135,7 @@ namespace drawinglayer void impCreateGeometryContent( std::vector< Primitive2DReference >& rTarget, - basegfx::DecomposedB2DHomMatrixContainer& rDecTrans, + basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans, const String& rText, xub_StrLen aTextPosition, xub_StrLen aTextLength, @@ -147,7 +147,7 @@ namespace drawinglayer void impSplitSingleWords( std::vector< Primitive2DReference >& rTarget, - basegfx::DecomposedB2DHomMatrixContainer& rDecTrans) const; + basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans) const; protected: // local decomposition. diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx index b99168d1cb1e..402fe45126cd 100644 --- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx @@ -143,35 +143,6 @@ namespace drawinglayer } // end of namespace primitive2d } // end of namespace drawinglayer -////////////////////////////////////////////////////////////////////////////// -// helper class for AnimatedInterpolatePrimitive2D - -namespace drawinglayer -{ - namespace primitive2d - { - BufferedMatrixDecompose::BufferedMatrixDecompose(const basegfx::B2DHomMatrix& rMatrix) - : maB2DHomMatrix(rMatrix), - maScale(0.0, 0.0), - maTranslate(0.0, 0.0), - mfRotate(0.0), - mfShearX(0.0), - mbDecomposed(false) - { - } - - void BufferedMatrixDecompose::ensureDecompose() const - { - if(!mbDecomposed) - { - BufferedMatrixDecompose* pThis = const_cast< BufferedMatrixDecompose* >(this); - maB2DHomMatrix.decompose(pThis->maScale, pThis->maTranslate, pThis->mfRotate, pThis->mfShearX); - pThis->mbDecomposed = true; - } - } - } // end of anonymous namespace -} // end of namespace drawinglayer - ////////////////////////////////////////////////////////////////////////////// namespace drawinglayer @@ -199,21 +170,18 @@ namespace drawinglayer const sal_uInt32 nIndA(sal_uInt32(floor(fIndex))); const double fOffset(fIndex - (double)nIndA); basegfx::B2DHomMatrix aTargetTransform; + std::vector< basegfx::tools::B2DHomMatrixBufferedDecompose >::const_iterator aMatA(maMatrixStack.begin() + nIndA); if(basegfx::fTools::equalZero(fOffset)) { // use matrix from nIndA directly - aTargetTransform = maMatrixStack[nIndA].getB2DHomMatrix(); + aTargetTransform = aMatA->getB2DHomMatrix(); } else { - // interpolate. Get involved matrices and ensure they are decomposed + // interpolate. Get involved buffered decomposed matrices const sal_uInt32 nIndB((nIndA + 1L) % nSize); - std::vector< BufferedMatrixDecompose >::const_iterator aMatA(maMatrixStack.begin() + nIndA); - std::vector< BufferedMatrixDecompose >::const_iterator aMatB(maMatrixStack.begin() + nIndB); - - aMatA->ensureDecompose(); - aMatB->ensureDecompose(); + std::vector< basegfx::tools::B2DHomMatrixBufferedDecompose >::const_iterator aMatB(maMatrixStack.begin() + nIndB); // interpolate for fOffset [0.0 .. 1.0[ const basegfx::B2DVector aScale(basegfx::interpolate(aMatA->getScale(), aMatB->getScale(), fOffset)); @@ -222,10 +190,8 @@ namespace drawinglayer const double fShearX(((aMatB->getShearX() - aMatA->getShearX()) * fOffset) + aMatA->getShearX()); // build matrix for state - aTargetTransform.scale(aScale.getX(), aScale.getY()); - aTargetTransform.shearX(fShearX); - aTargetTransform.rotate(fRotate); - aTargetTransform.translate(aTranslate.getX(), aTranslate.getY()); + aTargetTransform = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aScale, fShearX, fRotate, aTranslate); } // create new transform primitive reference, return new sequence @@ -246,12 +212,13 @@ namespace drawinglayer : AnimatedSwitchPrimitive2D(rAnimationEntry, rChildren, bIsTextAnimation), maMatrixStack() { - // copy matrices + // copy matrices to locally pre-decomposed matrix stack const sal_uInt32 nCount(rmMatrixStack.size()); + maMatrixStack.reserve(nCount); for(sal_uInt32 a(0L); a < nCount; a++) { - maMatrixStack.push_back(BufferedMatrixDecompose(rmMatrixStack[a])); + maMatrixStack.push_back(basegfx::tools::B2DHomMatrixBufferedDecompose(rmMatrixStack[a])); } } diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx index d3ddf3c8657f..5d536fa8812f 100644 --- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx @@ -54,6 +54,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -230,12 +231,8 @@ namespace drawinglayer } // short form for scale and translate transformation - basegfx::B2DHomMatrix aBitmapTransform; - - aBitmapTransform.set(0L, 0L, aBitmapSizeLogic.getX()); - aBitmapTransform.set(1L, 1L, aBitmapSizeLogic.getY()); - aBitmapTransform.set(0L, 2L, aTranslate.getX()); - aBitmapTransform.set(1L, 2L, aTranslate.getY()); + const basegfx::B2DHomMatrix aBitmapTransform(basegfx::tools::createScaleTranslateB2DHomMatrix( + aBitmapSizeLogic.getX(), aBitmapSizeLogic.getY(), aTranslate.getX(), aTranslate.getY())); // create primitive xRetval = new BitmapPrimitive2D(BitmapEx(aContent), aBitmapTransform); diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index b28bc2147187..9b2b305f069b 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -288,7 +288,9 @@ namespace drawinglayer getTransform().decompose(aScale, aTranslate, fRotate, fShearX); // create ranges. The current object range is just scale and translate - const basegfx::B2DRange aCurrent(aTranslate.getX(), aTranslate.getY(), aTranslate.getX() + aScale.getX(), aTranslate.getY() + aScale.getY()); + const basegfx::B2DRange aCurrent( + aTranslate.getX(), aTranslate.getY(), + aTranslate.getX() + aScale.getX(), aTranslate.getY() + aScale.getY()); // calculate scalings between real image size and logic object size. This // is necessary since the crop values are relative to original bitmap size @@ -338,11 +340,15 @@ namespace drawinglayer // build new object transformation for transform primitive which contains xPrimitive basegfx::B2DHomMatrix aNewObjectTransform(getTransform()); aNewObjectTransform.invert(); - aNewObjectTransform.scale(aCropped.getWidth(), aCropped.getHeight()); - aNewObjectTransform.translate(aCropped.getMinX() - aCurrent.getMinX(), aCropped.getMinY() - aCurrent.getMinY()); - aNewObjectTransform.shearX(fShearX); - aNewObjectTransform.rotate(fRotate); - aNewObjectTransform.translate(aTranslate.getX(), aTranslate.getY()); + aNewObjectTransform = basegfx::tools::createScaleTranslateB2DHomMatrix( + aCropped.getWidth(), aCropped.getHeight(), + aCropped.getMinX() - aCurrent.getMinX(), aCropped.getMinY() - aCurrent.getMinY()) + * aNewObjectTransform; + + // add shear, rotate and translate using combined matrix to speedup + const basegfx::B2DHomMatrix aCombinedMatrix(basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); + aNewObjectTransform = aCombinedMatrix * aNewObjectTransform; // prepare TransformPrimitive2D with xPrimitive const Primitive2DReference xTransformPrimitive(new TransformPrimitive2D(aNewObjectTransform, Primitive2DSequence(&xPrimitive, 1L))); diff --git a/drawinglayer/source/primitive2d/gridprimitive2d.cxx b/drawinglayer/source/primitive2d/gridprimitive2d.cxx index a449fa396c68..d2bd4b9d5243 100644 --- a/drawinglayer/source/primitive2d/gridprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/gridprimitive2d.cxx @@ -42,6 +42,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -65,10 +66,8 @@ namespace drawinglayer getTransform().decompose(aScale, aTranslate, fRotate, fShearX); // create grid matrix which transforms from scaled logic to view - basegfx::B2DHomMatrix aRST; - aRST.shearX(fShearX); - aRST.rotate(fRotate); - aRST.translate(aTranslate.getX(), aTranslate.getY()); + basegfx::B2DHomMatrix aRST(basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); aRST *= rViewInformation.getObjectToViewTransformation(); // get step widths diff --git a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx index ba879d9056c9..b747c79ee0c7 100644 --- a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx @@ -42,6 +42,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -112,9 +113,9 @@ namespace drawinglayer } // add the missing object transformation aspects - aPageTrans.shearX(fShearX); - aPageTrans.rotate(fRotate); - aPageTrans.translate(aTranslate.getX(), aTranslate.getY()); + const basegfx::B2DHomMatrix aCombined(basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); + aPageTrans = aCombined * aPageTrans; } else { diff --git a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx index 7c8688fed31f..55c334434c70 100644 --- a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx @@ -420,16 +420,16 @@ namespace drawinglayer PolyPolygonGradientPrimitive2D::PolyPolygonGradientPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, - const basegfx::BColor& rBColor, const attribute::FillGradientAttribute& rFillGradient) - : PolyPolygonColorPrimitive2D(rPolyPolygon, rBColor), + : BufferedDecompositionPrimitive2D(), + maPolyPolygon(rPolyPolygon), maFillGradient(rFillGradient) { } bool PolyPolygonGradientPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(PolyPolygonColorPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const PolyPolygonGradientPrimitive2D& rCompare = (PolyPolygonGradientPrimitive2D&)rPrimitive; @@ -455,7 +455,7 @@ namespace drawinglayer { // create SubSequence with FillHatchPrimitive2D const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange()); - FillHatchPrimitive2D* pNewHatch = new FillHatchPrimitive2D(aPolyPolygonRange, getBColor(), getFillHatch()); + FillHatchPrimitive2D* pNewHatch = new FillHatchPrimitive2D(aPolyPolygonRange, getBackgroundColor(), getFillHatch()); const Primitive2DReference xSubRef(pNewHatch); const Primitive2DSequence aSubSequence(&xSubRef, 1L); @@ -467,20 +467,23 @@ namespace drawinglayer PolyPolygonHatchPrimitive2D::PolyPolygonHatchPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, - const basegfx::BColor& rBColor, + const basegfx::BColor& rBackgroundColor, const attribute::FillHatchAttribute& rFillHatch) - : PolyPolygonColorPrimitive2D(rPolyPolygon, rBColor), + : BufferedDecompositionPrimitive2D(), + maPolyPolygon(rPolyPolygon), + maBackgroundColor(rBackgroundColor), maFillHatch(rFillHatch) { } bool PolyPolygonHatchPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(PolyPolygonColorPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const PolyPolygonHatchPrimitive2D& rCompare = (PolyPolygonHatchPrimitive2D&)rPrimitive; - return (getFillHatch() == rCompare.getFillHatch()); + return (getBackgroundColor() == rCompare.getBackgroundColor() + && getFillHatch() == rCompare.getFillHatch()); } return false; @@ -519,16 +522,16 @@ namespace drawinglayer PolyPolygonBitmapPrimitive2D::PolyPolygonBitmapPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, - const basegfx::BColor& rBColor, const attribute::FillBitmapAttribute& rFillBitmap) - : PolyPolygonColorPrimitive2D(rPolyPolygon, rBColor), + : BufferedDecompositionPrimitive2D(), + maPolyPolygon(rPolyPolygon), maFillBitmap(rFillBitmap) { } bool PolyPolygonBitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(PolyPolygonColorPrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const PolyPolygonBitmapPrimitive2D& rCompare = (PolyPolygonBitmapPrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx index 787e221c406f..d06bac973a18 100644 --- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx @@ -57,7 +57,7 @@ namespace drawinglayer { void TextDecoratedPortionPrimitive2D::impCreateTextLine( std::vector< Primitive2DReference >& rTarget, - basegfx::DecomposedB2DHomMatrixContainer& rDecTrans, + basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans, const basegfx::B2DHomMatrix &rUnscaledTransform, FontUnderline eLineStyle, double fLineOffset, @@ -248,10 +248,9 @@ namespace drawinglayer fLineDist = 6.3 * fLineHeight; } - basegfx::B2DHomMatrix aTransform; - // move base point of text to 0.0 and de-rotate - aTransform.translate(-rDecTrans.getTranslate().getX(), -rDecTrans.getTranslate().getY()); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + -rDecTrans.getTranslate().getX(), -rDecTrans.getTranslate().getY())); aTransform.rotate(-rDecTrans.getRotate()); // translate in Y by offset @@ -269,7 +268,7 @@ namespace drawinglayer void TextDecoratedPortionPrimitive2D::impCreateGeometryContent( std::vector< Primitive2DReference >& rTarget, - basegfx::DecomposedB2DHomMatrixContainer& rDecTrans, + basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans, const String& rText, xub_StrLen aTextPosition, xub_StrLen aTextLength, @@ -295,13 +294,11 @@ namespace drawinglayer if(bUnderlineUsed || bStrikeoutUsed || bOverlineUsed) { // common preparations - basegfx::B2DHomMatrix aUnscaledTransform; TextLayouterDevice aTextLayouter; // unscaled is needed since scale contains already the font size - aUnscaledTransform.shearX(rDecTrans.getShearX()); - aUnscaledTransform.rotate(rDecTrans.getRotate()); - aUnscaledTransform.translate(rDecTrans.getTranslate().getX(), rDecTrans.getTranslate().getY()); + const basegfx::B2DHomMatrix aUnscaledTransform(basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + rDecTrans.getShearX(), rDecTrans.getRotate(), rDecTrans.getTranslate())); // TextLayouterDevice is needed to get metrics for text decorations like // underline/strikeout/emphasis marks from it. For setup, the font size is needed @@ -416,10 +413,10 @@ namespace drawinglayer // double line, create 2nd primitive with offset using TransformPrimitive based on // already created NewPrimitive const double fLineDist(2.0 * fStrikeoutHeight); - basegfx::B2DHomMatrix aTransform; // move base point of text to 0.0 and de-rotate - aTransform.translate(-rDecTrans.getTranslate().getX(), -rDecTrans.getTranslate().getY()); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + -rDecTrans.getTranslate().getX(), -rDecTrans.getTranslate().getY())); aTransform.rotate(-rDecTrans.getRotate()); // translate in Y by offset @@ -469,7 +466,7 @@ namespace drawinglayer void TextDecoratedPortionPrimitive2D::impSplitSingleWords( std::vector< Primitive2DReference >& rTarget, - basegfx::DecomposedB2DHomMatrixContainer& rDecTrans) const + basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans) const { // break iterator support // made static so it only needs to be fetched once, even with many single @@ -586,7 +583,7 @@ namespace drawinglayer // create geometry content for the single word. Do not forget // to use the new transformation - basegfx::DecomposedB2DHomMatrixContainer aDecTrans(aNewTransform); + basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose aDecTrans(aNewTransform); impCreateGeometryContent(rTarget, aDecTrans, getText(), nNewTextStart, nNewTextEnd - nNewTextStart, aNewDXArray, aNewFontAttributes); @@ -605,7 +602,7 @@ namespace drawinglayer Primitive2DSequence TextDecoratedPortionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { std::vector< Primitive2DReference > aNewPrimitives; - basegfx::DecomposedB2DHomMatrixContainer aDecTrans(getTextTransform()); + basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose aDecTrans(getTextTransform()); Primitive2DSequence aRetval; // create basic geometry such as SimpleTextPrimitive, Overline, Underline, @@ -669,8 +666,8 @@ namespace drawinglayer static basegfx::BColor aShadowColor(0.3, 0.3, 0.3); // preapare shadow transform matrix - basegfx::B2DHomMatrix aShadowTransform; - aShadowTransform.translate(fTextShadowOffset, fTextShadowOffset); + const basegfx::B2DHomMatrix aShadowTransform(basegfx::tools::createTranslateB2DHomMatrix( + fTextShadowOffset, fTextShadowOffset)); // create shadow primitive aShadow = Primitive2DReference(new ShadowPrimitive2D( diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx index a2bbdb90889a..5e98a9d6d34b 100644 --- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx @@ -41,6 +41,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -68,13 +69,12 @@ namespace drawinglayer case TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED_DEFAULT: { // prepare transform of sub-group back to (0,0) and align to X-Axis - basegfx::B2DHomMatrix aBackTransform; - aBackTransform.translate(-getRotationCenter().getX(), -getRotationCenter().getY()); + basegfx::B2DHomMatrix aBackTransform(basegfx::tools::createTranslateB2DHomMatrix( + -getRotationCenter().getX(), -getRotationCenter().getY())); aBackTransform.rotate(-getDirection()); // prepare transform of sub-group back to it's position and rotation - basegfx::B2DHomMatrix aForwardTransform; - aForwardTransform.rotate(getDirection()); + basegfx::B2DHomMatrix aForwardTransform(basegfx::tools::createRotateB2DHomMatrix(getDirection())); aForwardTransform.translate(getRotationCenter().getX(), getRotationCenter().getY()); // create transformation for one discrete unit diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx index 819f94759ae0..c60aadd63ac0 100644 --- a/drawinglayer/source/primitive2d/textprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx @@ -42,6 +42,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -171,11 +172,8 @@ namespace drawinglayer if(nCount) { // prepare object transformation for polygons - rTransformation.identity(); - rTransformation.scale(aScale.getX(), aScale.getY()); - rTransformation.shearX(fShearX); - rTransformation.rotate(fRotate); - rTransformation.translate(aTranslate.getX(), aTranslate.getY()); + rTransformation = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aScale, fShearX, fRotate, aTranslate); } } } @@ -324,12 +322,8 @@ namespace drawinglayer } #endif // prepare object transformation for range - basegfx::B2DHomMatrix aRangeTransformation; - - aRangeTransformation.scale(aScale.getX(), aScale.getY()); - aRangeTransformation.shearX(fShearX); - aRangeTransformation.rotate(fRotate); - aRangeTransformation.translate(aTranslate.getX(), aTranslate.getY()); + const basegfx::B2DHomMatrix aRangeTransformation(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aScale, fShearX, fRotate, aTranslate)); // apply range transformation to it aNewRange.transform(aRangeTransformation); diff --git a/drawinglayer/source/processor2d/canvasprocessor.cxx b/drawinglayer/source/processor2d/canvasprocessor.cxx index 9285102cbb80..20d07add629c 100644 --- a/drawinglayer/source/processor2d/canvasprocessor.cxx +++ b/drawinglayer/source/processor2d/canvasprocessor.cxx @@ -76,6 +76,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -1341,10 +1342,9 @@ namespace drawinglayer // prepare discrete offset for XBitmap, do not forget that the buffer bitmap // may be truncated to discrete visible pixels - basegfx::B2DHomMatrix aDiscreteOffset; - aDiscreteOffset.translate( + const basegfx::B2DHomMatrix aDiscreteOffset(basegfx::tools::createTranslateB2DHomMatrix( aDiscreteRange.getMinX() > 0.0 ? -aDiscreteRange.getMinX() : 0.0, - aDiscreteRange.getMinY() > 0.0 ? -aDiscreteRange.getMinY() : 0.0); + aDiscreteRange.getMinY() > 0.0 ? -aDiscreteRange.getMinY() : 0.0)); // create new local ViewInformation2D with new transformation const geometry::ViewInformation2D aViewInformation2D( @@ -1600,16 +1600,14 @@ namespace drawinglayer // adapt object's transformation to the correct scale basegfx::B2DVector aScale, aTranslate; double fRotate, fShearX; - basegfx::B2DHomMatrix aNewMatrix; const Size aSizePixel(aModifiedBitmapEx.GetSizePixel()); if(0 != aSizePixel.Width() && 0 != aSizePixel.Height()) { rBitmapCandidate.getTransform().decompose(aScale, aTranslate, fRotate, fShearX); - aNewMatrix.scale(aScale.getX() / aSizePixel.Width(), aScale.getY() / aSizePixel.Height()); - aNewMatrix.shearX(fShearX); - aNewMatrix.rotate(fRotate); - aNewMatrix.translate(aTranslate.getX(), aTranslate.getY()); + const basegfx::B2DHomMatrix aNewMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aScale.getX() / aSizePixel.Width(), aScale.getY() / aSizePixel.Height(), + fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); canvas::tools::setRenderStateTransform(maRenderState, getViewInformation2D().getObjectTransformation() * aNewMatrix); @@ -1658,10 +1656,9 @@ namespace drawinglayer // prepare discrete offset for XBitmap, do not forget that the buffer bitmap // may be truncated to discrete visible pixels - basegfx::B2DHomMatrix aDiscreteOffset; - aDiscreteOffset.translate( + const basegfx::B2DHomMatrix aDiscreteOffset(basegfx::tools::createTranslateB2DHomMatrix( aDiscreteRange.getMinX() > 0.0 ? -aDiscreteRange.getMinX() : 0.0, - aDiscreteRange.getMinY() > 0.0 ? -aDiscreteRange.getMinY() : 0.0); + aDiscreteRange.getMinY() > 0.0 ? -aDiscreteRange.getMinY() : 0.0)); // create new local ViewInformation2D with new transformation const geometry::ViewInformation2D aViewInformation2D( @@ -1821,13 +1818,9 @@ namespace drawinglayer { // create texture matrix from texture to object (where object is unit square here), // so use values directly - basegfx::B2DHomMatrix aTextureMatrix; - aTextureMatrix.scale( - rFillBitmapAttribute.getSize().getX(), - rFillBitmapAttribute.getSize().getY()); - aTextureMatrix.translate( - rFillBitmapAttribute.getTopLeft().getX(), - rFillBitmapAttribute.getTopLeft().getY()); + const basegfx::B2DHomMatrix aTextureMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix( + rFillBitmapAttribute.getSize().getX(), rFillBitmapAttribute.getSize().getY(), + rFillBitmapAttribute.getTopLeft().getX(), rFillBitmapAttribute.getTopLeft().getY())); // create and fill texture rendering::Texture aTexture; diff --git a/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx b/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx index 1488cd4fd054..216139653692 100644 --- a/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx +++ b/drawinglayer/source/processor2d/vclhelperbitmaprender.cxx @@ -43,6 +43,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// // support for different kinds of bitmap rendering using vcl @@ -84,10 +85,9 @@ namespace drawinglayer else { // if rotated, create the unrotated output rectangle for the GraphicManager paint - basegfx::B2DHomMatrix aSimpleObjectMatrix; - - aSimpleObjectMatrix.scale(fabs(aScale.getX()), fabs(aScale.getY())); - aSimpleObjectMatrix.translate(aTranslate.getX(), aTranslate.getY()); + const basegfx::B2DHomMatrix aSimpleObjectMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix( + fabs(aScale.getX()), fabs(aScale.getY()), + aTranslate.getX(), aTranslate.getY())); aOutlineRange.transform(aSimpleObjectMatrix); } @@ -190,11 +190,11 @@ namespace drawinglayer } // build transform from pixel in aDestination to pixel in rBitmapEx - basegfx::B2DHomMatrix aTransform; - // from relative in aCroppedRectPixel to relative in aDestRectPixel // No need to take bNeedToReduce into account, TopLeft is unchanged - aTransform.translate(aCroppedRectPixel.Left() - aDestRectPixel.Left(), aCroppedRectPixel.Top() - aDestRectPixel.Top()); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + aCroppedRectPixel.Left() - aDestRectPixel.Left(), + aCroppedRectPixel.Top() - aDestRectPixel.Top())); // from relative in aDestRectPixel to absolute Logic. Here it // is essential to adapt to reduce factor (if used) @@ -207,8 +207,10 @@ namespace drawinglayer fAdaptedDRPHeight *= fReduceFactor; } - aTransform.scale(aDestRectLogic.getWidth() / fAdaptedDRPWidth, aDestRectLogic.getHeight() / fAdaptedDRPHeight); - aTransform.translate(aDestRectLogic.Left(), aDestRectLogic.Top()); + aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix( + aDestRectLogic.getWidth() / fAdaptedDRPWidth, aDestRectLogic.getHeight() / fAdaptedDRPHeight, + aDestRectLogic.Left(), aDestRectLogic.Top()) + * aTransform; // from absolute in Logic to unified object coordinates (0.0 .. 1.0 in x and y) basegfx::B2DHomMatrix aInvBitmapTransform(rTransform); diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 549e44ece967..540c28d685d4 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -67,6 +67,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -204,18 +205,8 @@ namespace drawinglayer } case PRIMITIVE2D_ID_POLYPOLYGONGRADIENTPRIMITIVE2D : { - if(getOptionsDrawinglayer().IsAntiAliasing()) - { - // For AA, direct render has to be avoided since it uses XOR maskings which will not - // work with AA. Instead, the decompose which uses MaskPrimitive2D with fillings is - // used - process(rCandidate.get2DDecomposition(getViewInformation2D())); - } - else - { - // direct draw of gradient - RenderPolyPolygonGradientPrimitive2D(static_cast< const primitive2d::PolyPolygonGradientPrimitive2D& >(rCandidate)); - } + // direct draw of gradient + RenderPolyPolygonGradientPrimitive2D(static_cast< const primitive2d::PolyPolygonGradientPrimitive2D& >(rCandidate)); break; } case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D : @@ -522,7 +513,6 @@ namespace drawinglayer // restore AA setting mpOutputDevice->SetAntialiasing(nOriginalAA); - break; } case PRIMITIVE2D_ID_TEXTHIERARCHYEDITPRIMITIVE2D : diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index adc33c4d676d..fc57e5299662 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -596,21 +596,32 @@ namespace drawinglayer basegfx::BColor aStartColor(maBColorModifierStack.getModifiedColor(rGradient.getStartColor())); basegfx::BColor aEndColor(maBColorModifierStack.getModifiedColor(rGradient.getEndColor())); basegfx::B2DPolyPolygon aLocalPolyPolygon(rPolygonCandidate.getB2DPolyPolygon()); - aLocalPolyPolygon.transform(maCurrentTransformation); - if(aStartColor == aEndColor) - { - // no gradient at all, draw as polygon - mpOutputDevice->SetLineColor(); - mpOutputDevice->SetFillColor(Color(aStartColor)); - mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon); - } - else + if(aLocalPolyPolygon.count()) { - impDrawGradientToOutDev( - *mpOutputDevice, aLocalPolyPolygon, rGradient.getStyle(), rGradient.getSteps(), - aStartColor, aEndColor, rGradient.getBorder(), - -rGradient.getAngle(), rGradient.getOffsetX(), rGradient.getOffsetY(), false); + aLocalPolyPolygon.transform(maCurrentTransformation); + + if(aStartColor == aEndColor) + { + // no gradient at all, draw as polygon in AA and non-AA case + mpOutputDevice->SetLineColor(); + mpOutputDevice->SetFillColor(Color(aStartColor)); + mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon); + } + else if(getOptionsDrawinglayer().IsAntiAliasing()) + { + // For AA, direct render has to be avoided since it uses XOR maskings which will not + // work with AA. Instead, the decompose which uses MaskPrimitive2D with fillings is + // used + process(rPolygonCandidate.get2DDecomposition(getViewInformation2D())); + } + else + { + impDrawGradientToOutDev( + *mpOutputDevice, aLocalPolyPolygon, rGradient.getStyle(), rGradient.getSteps(), + aStartColor, aEndColor, rGradient.getBorder(), + -rGradient.getAngle(), rGradient.getOffsetX(), rGradient.getOffsetY(), false); + } } } diff --git a/drawinglayer/source/texture/texture.cxx b/drawinglayer/source/texture/texture.cxx index 4f784c71897f..1cc6730da33c 100644 --- a/drawinglayer/source/texture/texture.cxx +++ b/drawinglayer/source/texture/texture.cxx @@ -39,6 +39,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -596,9 +597,8 @@ namespace drawinglayer basegfx::B2DPoint aCenter(0.5, 0.5); aCenter *= maTextureTransform; - maTextureTransform.translate(-aCenter.getX(), -aCenter.getY()); - maTextureTransform.rotate(fAngle); - maTextureTransform.translate(aCenter.getX(), aCenter.getY()); + maTextureTransform = basegfx::tools::createRotateAroundPoint(aCenter, fAngle) + * maTextureTransform; } // add object translate diff --git a/svx/source/cui/tplneend.cxx b/svx/source/cui/tplneend.cxx index c83a88956273..c55914e125a4 100644 --- a/svx/source/cui/tplneend.cxx +++ b/svx/source/cui/tplneend.cxx @@ -51,9 +51,6 @@ #include "tabline.hrc" #include "helpid.hrc" - - - #include #include #include "drawitem.hxx" @@ -69,6 +66,7 @@ #include #include #include +#include #define DLGWIN this->GetParent()->GetParent() @@ -465,9 +463,8 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG ) basegfx::B2DRange aNewRange(basegfx::tools::getRange(aNewPolyPolygon)); // Normalisieren - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate(-aNewRange.getMinX(), -aNewRange.getMinY()); - aNewPolyPolygon.transform(aMatrix); + aNewPolyPolygon.transform(basegfx::tools::createTranslateB2DHomMatrix( + -aNewRange.getMinX(), -aNewRange.getMinY())); // Loeschen des angelegten PolyObjektes SdrObject::Free( pConvPolyObj ); diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index 06d4cf5bbe95..3f89d202b6ba 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -77,6 +77,7 @@ #include #include #include +#include #define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue() @@ -185,9 +186,8 @@ void Impl3DMirrorConstructOverlay::SetMirrorAxis(Point aMirrorAxisA, Point aMirr // buld transfoprmation: translate and rotate so that given edge is // on x axis, them mirror in y and translate back const basegfx::B2DVector aEdge(aMirrorAxisB.X() - aMirrorAxisA.X(), aMirrorAxisB.Y() - aMirrorAxisA.Y()); - basegfx::B2DHomMatrix aMatrixTransform; - - aMatrixTransform.translate(-aMirrorAxisA.X(), -aMirrorAxisA.Y()); + basegfx::B2DHomMatrix aMatrixTransform(basegfx::tools::createTranslateB2DHomMatrix( + -aMirrorAxisA.X(), -aMirrorAxisA.Y())); aMatrixTransform.rotate(-atan2(aEdge.getY(), aEdge.getX())); aMatrixTransform.scale(1.0, -1.0); aMatrixTransform.rotate(atan2(aEdge.getY(), aEdge.getX())); @@ -932,9 +932,8 @@ void E3dView::ConvertMarkedObjTo3D(BOOL bExtrude, basegfx::B2DPoint aPnt1, baseg if(fRot3D != 0.0) { - aLatheMat.translate(-aPnt2.getX(), -aPnt2.getY()); - aLatheMat.rotate(-fRot3D); - aLatheMat.translate(aPnt2.getX(), aPnt2.getY()); + aLatheMat = basegfx::tools::createRotateAroundPoint(aPnt2, -fRot3D) + * aLatheMat; } } diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index b083a1014299..0733c85e1135 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -52,18 +52,16 @@ #include "svdstr.hrc" #include #include - #include #include #include #include #include #include - #include #include #include -//#include +#include ////////////////////////////////////////////////////////////////////////////// @@ -148,11 +146,9 @@ namespace sdr { // create the EmptyPresObj fallback visualisation. The fallback graphic // is already provided in rGraphicObject in this case, use it - aSmallerMatrix.scale(aPrefSize.getWidth(), aPrefSize.getHeight()); - aSmallerMatrix.translate(fOffsetX, fOffsetY); - aSmallerMatrix.shearX(fShearX); - aSmallerMatrix.rotate(fRotate); - aSmallerMatrix.translate(aTranslate.getX(), aTranslate.getY()); + aSmallerMatrix = basegfx::tools::createScaleTranslateB2DHomMatrix(aPrefSize.getWidth(), aPrefSize.getHeight(), fOffsetX, fOffsetY); + aSmallerMatrix = basegfx::tools::createShearXRotateTranslateB2DHomMatrix(fShearX, fRotate, aTranslate) + * aSmallerMatrix; const GraphicObject& rGraphicObject = GetGrafObject().GetGraphicObject(false); const drawinglayer::attribute::SdrLineFillShadowTextAttribute aEmptyAttributes(0, 0, 0, 0, 0, 0); @@ -241,12 +237,8 @@ namespace sdr && basegfx::fTools::lessOrEqual(fWidth, aScale.getX()) && basegfx::fTools::lessOrEqual(fHeight, aScale.getY())) { - basegfx::B2DHomMatrix aBitmapMatrix; - - aBitmapMatrix.scale(fWidth, fHeight); - aBitmapMatrix.shearX(fShearX); - aBitmapMatrix.rotate(fRotate); - aBitmapMatrix.translate(aTranslate.getX(), aTranslate.getY()); + const basegfx::B2DHomMatrix aBitmapMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + fWidth, fHeight, fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, drawinglayer::primitive2d::Primitive2DReference( @@ -293,12 +285,8 @@ namespace sdr if(pSdrText && pOPO) { // directly use the remaining space as TextRangeTransform - basegfx::B2DHomMatrix aTextRangeTransform; - - aTextRangeTransform.scale(aScale.getX(), aScale.getY()); - aTextRangeTransform.shearX(fShearX); - aTextRangeTransform.rotate(fRotate); - aTextRangeTransform.translate(aTranslate.getX(), aTranslate.getY()); + const basegfx::B2DHomMatrix aTextRangeTransform(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aScale, fShearX, fRotate, aTranslate)); // directly create temp SdrBlockTextPrimitive2D drawinglayer::primitive2d::SdrBlockTextPrimitive2D aBlockTextPrimitive( @@ -376,7 +364,6 @@ namespace sdr // which will use the primitive data we just create in the near future const Rectangle& rRectangle = GetGrafObject().GetGeoRect(); const ::basegfx::B2DRange aObjectRange(rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom()); - basegfx::B2DHomMatrix aObjectMatrix; // look for mirroring const GeoStat& rGeoStat(GetGrafObject().GetGeoStat()); @@ -407,10 +394,10 @@ namespace sdr // fill object matrix const double fShearX(rGeoStat.nShearWink ? tan((36000 - rGeoStat.nShearWink) * F_PI18000) : 0.0); const double fRotate(nDrehWink ? (36000 - nDrehWink) * F_PI18000 : 0.0); - aObjectMatrix.scale(aObjectRange.getWidth(), aObjectRange.getHeight()); - aObjectMatrix.shearX(fShearX); - aObjectMatrix.rotate(fRotate); - aObjectMatrix.translate(aObjectRange.getMinX(), aObjectRange.getMinY()); + const basegfx::B2DHomMatrix aObjectMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aObjectRange.getWidth(), aObjectRange.getHeight(), + fShearX, fRotate, + aObjectRange.getMinX(), aObjectRange.getMinY())); // get the current, unchenged graphic obect from SdrGrafObj const GraphicObject& rGraphicObject = GetGrafObject().GetGraphicObject(false); diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx index e8aace40eac5..edf5295461da 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx @@ -37,6 +37,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// // includes for special text box shadow (SC) @@ -83,30 +84,13 @@ namespace sdr const Rectangle& rRectangle = rCaptionObj.GetGeoRect(); const ::basegfx::B2DRange aObjectRange(rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom()); const GeoStat& rGeoStat(rCaptionObj.GetGeoStat()); - ::basegfx::B2DHomMatrix aObjectMatrix; // fill object matrix - if(!::basegfx::fTools::equalZero(aObjectRange.getWidth())) - { - aObjectMatrix.set(0, 0, aObjectRange.getWidth()); - } - - if(!::basegfx::fTools::equalZero(aObjectRange.getHeight())) - { - aObjectMatrix.set(1, 1, aObjectRange.getHeight()); - } - - if(rGeoStat.nShearWink) - { - aObjectMatrix.shearX(tan((36000 - rGeoStat.nShearWink) * F_PI18000)); - } - - if(rGeoStat.nDrehWink) - { - aObjectMatrix.rotate((36000 - rGeoStat.nDrehWink) * F_PI18000); - } - - aObjectMatrix.translate(aObjectRange.getMinX(), aObjectRange.getMinY()); + basegfx::B2DHomMatrix aObjectMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aObjectRange.getWidth(), aObjectRange.getHeight(), + rGeoStat.nShearWink ? tan((36000 - rGeoStat.nShearWink) * F_PI18000) : 0.0, + rGeoStat.nDrehWink ? (36000 - rGeoStat.nDrehWink) * F_PI18000 : 0.0, + aObjectRange.getMinX(), aObjectRange.getMinY())); // calculate corner radius double fCornerRadiusX; diff --git a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx index 1366ed26ca1a..24f1625065c9 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx @@ -39,6 +39,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -73,30 +74,13 @@ namespace sdr const Rectangle& rRectangle = GetCircObj().GetGeoRect(); const ::basegfx::B2DRange aObjectRange(rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom()); const GeoStat& rGeoStat(GetCircObj().GetGeoStat()); - ::basegfx::B2DHomMatrix aObjectMatrix; // fill object matrix - if(!::basegfx::fTools::equalZero(aObjectRange.getWidth())) - { - aObjectMatrix.set(0, 0, aObjectRange.getWidth()); - } - - if(!::basegfx::fTools::equalZero(aObjectRange.getHeight())) - { - aObjectMatrix.set(1, 1, aObjectRange.getHeight()); - } - - if(rGeoStat.nShearWink) - { - aObjectMatrix.shearX(tan((36000 - rGeoStat.nShearWink) * F_PI18000)); - } - - if(rGeoStat.nDrehWink) - { - aObjectMatrix.rotate((36000 - rGeoStat.nDrehWink) * F_PI18000); - } - - aObjectMatrix.translate(aObjectRange.getMinX(), aObjectRange.getMinY()); + const basegfx::B2DHomMatrix aObjectMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aObjectRange.getWidth(), aObjectRange.getHeight(), + rGeoStat.nShearWink ? tan((36000 - rGeoStat.nShearWink) * F_PI18000) : 0.0, + rGeoStat.nDrehWink ? (36000 - rGeoStat.nDrehWink) * F_PI18000 : 0.0, + aObjectRange.getMinX(), aObjectRange.getMinY())); // create primitive data const sal_uInt16 nIdentifier(GetCircObj().GetObjIdentifier()); diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index 0f4716e2d513..4850b91ca2a1 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -39,6 +39,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -82,18 +83,11 @@ namespace sdr basegfx::B2DHomMatrix aRotMatrix; aRotMatrix.translate(-aObjectRange.getMinimum().getX(), -aObjectRange.getMinimum().getY()); - - if(rGeoStat.nShearWink) - { - aRotMatrix.shearX(tan((36000 - rGeoStat.nShearWink) * F_PI18000)); - } - - if(rGeoStat.nDrehWink) - { - aRotMatrix.rotate((36000 - rGeoStat.nDrehWink) * F_PI18000); - } - - aRotMatrix.translate(aObjectRange.getMinimum().getX(), aObjectRange.getMinimum().getY()); + aRotMatrix = basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + rGeoStat.nShearWink ? tan((36000 - rGeoStat.nShearWink) * F_PI18000) : 0.0, + rGeoStat.nDrehWink ? (36000 - rGeoStat.nDrehWink) * F_PI18000 : 0.0, + aObjectRange.getMinimum().getX(), aObjectRange.getMinimum().getY()) + * aRotMatrix; aRotObjectRange.transform(aRotMatrix); // add negative translation part diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx index 3c239b12113c..c3c08a7a0dc1 100644 --- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx @@ -46,6 +46,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -88,12 +89,9 @@ namespace sdr const GeoStat& rGeoStat(GetOle2Obj().GetGeoStat()); const double fShearX(rGeoStat.nShearWink ? tan((36000 - rGeoStat.nShearWink) * F_PI18000) : 0.0); const double fRotate(rGeoStat.nDrehWink ? (36000 - rGeoStat.nDrehWink) * F_PI18000 : 0.0); - basegfx::B2DHomMatrix aObjectMatrix; - - aObjectMatrix.scale(aObjectRange.getWidth(), aObjectRange.getHeight()); - aObjectMatrix.shearX(fShearX); - aObjectMatrix.rotate(fRotate); - aObjectMatrix.translate(aObjectRange.getMinX(), aObjectRange.getMinY()); + const basegfx::B2DHomMatrix aObjectMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aObjectRange.getWidth(), aObjectRange.getHeight(), fShearX, fRotate, + aObjectRange.getMinX(), aObjectRange.getMinY())); // Prepare attribute settings, will be used soon anyways const SfxItemSet& rItemSet = GetOle2Obj().GetMergedItemSet(); diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx index 0f818ff40f7a..3c8449bae7f6 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx @@ -38,6 +38,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -98,9 +99,11 @@ namespace sdr aUnitPolyPolygon.setB2DPolygon(0, aNewPolygon); // #i102548# fill objectMatrix with rotation and offset (no shear for lines) - aObjectMatrix.scale(aLine.getLength(), 1.0); - aObjectMatrix.rotate(atan2(aLine.getY(), aLine.getX())); - aObjectMatrix.translate(aStart.getX(), aStart.getY()); + aObjectMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aLine.getLength(), 1.0, + 0.0, + atan2(aLine.getY(), aLine.getX()), + aStart.getX(), aStart.getY()); } else { @@ -110,22 +113,14 @@ namespace sdr const GeoStat& rGeoStat(GetPathObj().GetGeoStat()); const double fWidth(aObjectRange.getWidth()); const double fHeight(aObjectRange.getHeight()); - - aObjectMatrix.scale( - basegfx::fTools::equalZero(fWidth) ? 1.0 : fWidth, - basegfx::fTools::equalZero(fHeight) ? 1.0 : fHeight); - - if(rGeoStat.nShearWink) - { - aObjectMatrix.shearX(tan((36000 - rGeoStat.nShearWink) * F_PI18000)); - } - - if(rGeoStat.nDrehWink) - { - aObjectMatrix.rotate((36000 - rGeoStat.nDrehWink) * F_PI18000); - } - - aObjectMatrix.translate(aObjectRange.getMinX(), aObjectRange.getMinY()); + const double fScaleX(basegfx::fTools::equalZero(fWidth) ? 1.0 : fWidth); + const double fScaleY(basegfx::fTools::equalZero(fHeight) ? 1.0 : fHeight); + + aObjectMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + fScaleX, fScaleY, + rGeoStat.nShearWink ? tan((36000 - rGeoStat.nShearWink) * F_PI18000) : 0.0, + rGeoStat.nDrehWink ? (36000 - rGeoStat.nDrehWink) * F_PI18000 : 0.0, + aObjectRange.getMinX(), aObjectRange.getMinY()); // ceate unit polygon from object's absolute path basegfx::B2DHomMatrix aInverse(aObjectMatrix); diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx index 8ba8ae8ab4c9..fa2717052368 100644 --- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx @@ -39,6 +39,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -73,30 +74,13 @@ namespace sdr const Rectangle& rRectangle = GetRectObj().GetGeoRect(); const ::basegfx::B2DRange aObjectRange(rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom()); const GeoStat& rGeoStat(GetRectObj().GetGeoStat()); - ::basegfx::B2DHomMatrix aObjectMatrix; // fill object matrix - if(!::basegfx::fTools::equalZero(aObjectRange.getWidth())) - { - aObjectMatrix.set(0, 0, aObjectRange.getWidth()); - } - - if(!::basegfx::fTools::equalZero(aObjectRange.getHeight())) - { - aObjectMatrix.set(1, 1, aObjectRange.getHeight()); - } - - if(rGeoStat.nShearWink) - { - aObjectMatrix.shearX(tan((36000 - rGeoStat.nShearWink) * F_PI18000)); - } - - if(rGeoStat.nDrehWink) - { - aObjectMatrix.rotate((36000 - rGeoStat.nDrehWink) * F_PI18000); - } - - aObjectMatrix.translate(aObjectRange.getMinX(), aObjectRange.getMinY()); + basegfx::B2DHomMatrix aObjectMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aObjectRange.getWidth(), aObjectRange.getHeight(), + rGeoStat.nShearWink ? tan((36000 - rGeoStat.nShearWink) * F_PI18000) : 0.0, + rGeoStat.nDrehWink ? (36000 - rGeoStat.nDrehWink) * F_PI18000 : 0.0, + aObjectRange.getMinX(), aObjectRange.getMinY())); // calculate corner radius sal_uInt32 nCornerRadius(((SdrEckenradiusItem&)(rItemSet.Get(SDRATTR_ECKENRADIUS))).GetValue()); diff --git a/svx/source/sdr/overlay/overlaytools.cxx b/svx/source/sdr/overlay/overlaytools.cxx index 6755d09fb34b..22b273a2a0e4 100644 --- a/svx/source/sdr/overlay/overlaytools.cxx +++ b/svx/source/sdr/overlay/overlaytools.cxx @@ -40,6 +40,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -230,11 +231,8 @@ namespace drawinglayer if(!basegfx::fTools::equalZero(getRotation())) { - basegfx::B2DHomMatrix aTransform; - - aTransform.translate(-getObjectRange().getMinX(), -getObjectRange().getMinY()); - aTransform.rotate(getRotation()); - aTransform.translate(getObjectRange().getMinX(), getObjectRange().getMinY()); + const basegfx::B2DHomMatrix aTransform(basegfx::tools::createRotateAroundPoint( + getObjectRange().getMinX(), getObjectRange().getMinY(), getRotation())); aHatchPolyPolygon.transform(aTransform); } diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 3fbcc15dd473..1edf702f083e 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -79,7 +79,7 @@ namespace drawinglayer if(rFill.isGradient()) { - pNewFillPrimitive = new PolyPolygonGradientPrimitive2D(aScaledPolyPolygon, rFill.getColor(), *rFill.getGradient()); + pNewFillPrimitive = new PolyPolygonGradientPrimitive2D(aScaledPolyPolygon, *rFill.getGradient()); } else if(rFill.isHatch()) { @@ -88,7 +88,7 @@ namespace drawinglayer else if(rFill.isBitmap()) { const basegfx::B2DRange aRange(basegfx::tools::getRange(aScaledPolyPolygon)); - pNewFillPrimitive = new PolyPolygonBitmapPrimitive2D(aScaledPolyPolygon, rFill.getColor(), rFill.getBitmap()->getFillBitmapAttribute(aRange)); + pNewFillPrimitive = new PolyPolygonBitmapPrimitive2D(aScaledPolyPolygon, rFill.getBitmap()->getFillBitmapAttribute(aRange)); } else { @@ -191,19 +191,17 @@ namespace drawinglayer // scale outline to object's size to allow growing with value relative to that size // and also to keep aspect ratio - basegfx::B2DHomMatrix aScaleTransform; - aScaleTransform.set(0, 0, fabs(aScale.getX())); - aScaleTransform.set(1, 1, fabs(aScale.getY())); basegfx::B2DPolyPolygon aScaledUnitPolyPolygon(rUnitPolyPolygon); - aScaledUnitPolyPolygon.transform(aScaleTransform); + aScaledUnitPolyPolygon.transform(basegfx::tools::createScaleB2DHomMatrix( + fabs(aScale.getX()), fabs(aScale.getY()))); // grow the polygon. To shrink, use negative value (half width) aScaledUnitPolyPolygon = basegfx::tools::growInNormalDirection(aScaledUnitPolyPolygon, -(pStroke->getWidth() * 0.5)); // scale back to unit polygon - aScaleTransform.set(0, 0, 0.0 != aScale.getX() ? 1.0 / aScale.getX() : 1.0); - aScaleTransform.set(1, 1, 0.0 != aScale.getY() ? 1.0 / aScale.getY() : 1.0); - aScaledUnitPolyPolygon.transform(aScaleTransform); + aScaledUnitPolyPolygon.transform(basegfx::tools::createScaleB2DHomMatrix( + 0.0 != aScale.getX() ? 1.0 / aScale.getX() : 1.0, + 0.0 != aScale.getY() ? 1.0 / aScale.getY() : 1.0)); // create with unit polygon pNew = new SdrContourTextPrimitive2D( @@ -264,17 +262,16 @@ namespace drawinglayer aTextAnchorRange.expand(aBottomRight); // now create a transformation from this basic range (aTextAnchorRange) - aAnchorTransform.identity(); - aAnchorTransform.scale(aTextAnchorRange.getWidth(), aTextAnchorRange.getHeight()); - aAnchorTransform.translate(aTextAnchorRange.getMinX(), aTextAnchorRange.getMinY()); + aAnchorTransform = basegfx::tools::createScaleTranslateB2DHomMatrix( + aTextAnchorRange.getWidth(), aTextAnchorRange.getHeight(), + aTextAnchorRange.getMinX(), aTextAnchorRange.getMinY()); // apply mirroring aAnchorTransform.scale(bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0); // apply object's other transforms - aAnchorTransform.shearX(fShearX); - aAnchorTransform.rotate(fRotate); - aAnchorTransform.translate(aTranslate.getX(), aTranslate.getY()); + aAnchorTransform = basegfx::tools::createShearXRotateTranslateB2DHomMatrix(fShearX, fRotate, aTranslate) + * aAnchorTransform; if(rText.isFitToSize()) { @@ -336,10 +333,8 @@ namespace drawinglayer aAnchorTransform.decompose(aScale, aTranslate, fRotate, fShearX); // build transform from scaled only to full AnchorTransform and inverse - basegfx::B2DHomMatrix aSRT; - aSRT.shearX(fShearX); - aSRT.rotate(fRotate); - aSRT.translate(aTranslate.getX(), aTranslate.getY()); + const basegfx::B2DHomMatrix aSRT(basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + fShearX, fRotate, aTranslate)); basegfx::B2DHomMatrix aISRT(aSRT); aISRT.invert(); diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx index 1c2cc70842d2..5cc259d3092c 100644 --- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx @@ -39,6 +39,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -61,11 +62,7 @@ namespace drawinglayer ::basegfx::B2DPolygon aUnitOutline(::basegfx::tools::createPolygonFromUnitCircle(1)); // scale and move UnitEllipse to UnitObject (-1,-1 1,1) -> (0,0 1,1) - ::basegfx::B2DHomMatrix aUnitCorrectionMatrix; - aUnitCorrectionMatrix.set(0, 0, 0.5); - aUnitCorrectionMatrix.set(1, 1, 0.5); - aUnitCorrectionMatrix.set(0, 2, 0.5); - aUnitCorrectionMatrix.set(1, 2, 0.5); + const basegfx::B2DHomMatrix aUnitCorrectionMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); // apply to the geometry aUnitOutline.transform(aUnitCorrectionMatrix); @@ -146,7 +143,6 @@ namespace drawinglayer // create unit outline polygon ::basegfx::B2DPolygon aUnitOutline(::basegfx::tools::createPolygonFromUnitEllipseSegment(mfStartAngle, mfEndAngle)); - ::basegfx::B2DHomMatrix aUnitCorrectionMatrix; if(mbCloseSegment) { @@ -161,7 +157,7 @@ namespace drawinglayer } // move and scale UnitEllipse to UnitObject (-1,-1 1,1) -> (0,0 1,1) - aUnitCorrectionMatrix.translate(1.0, 1.0); + basegfx::B2DHomMatrix aUnitCorrectionMatrix(basegfx::tools::createTranslateB2DHomMatrix(1.0, 1.0)); aUnitCorrectionMatrix.scale(0.5, 0.5); // apply to the geometry diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index 4623182ace23..bbb08654baa2 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -40,6 +40,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -95,10 +96,8 @@ namespace drawinglayer const double fAngle(atan2(aLine.getY(), aLine.getX())); bool bAutoUpsideDown(false); const attribute::SdrTextAttribute* pTextAttribute = getSdrLSTAttribute().getText(); - - basegfx::B2DHomMatrix aObjectMatrix; - aObjectMatrix.rotate(fAngle); - aObjectMatrix.translate(getStart().getX(), getStart().getY()); + const basegfx::B2DHomMatrix aObjectMatrix( + basegfx::tools::createShearXRotateTranslateB2DHomMatrix(0.0, fAngle, getStart())); if(pTextAttribute) { diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx index 57e685313586..97d309f0f0e7 100644 --- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx @@ -39,6 +39,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -105,13 +106,10 @@ namespace drawinglayer if(basegfx::fTools::moreOrEqual(fOffsetX, 0.0) && basegfx::fTools::moreOrEqual(fOffsetY, 0.0)) { // if content fits into frame, create it - basegfx::B2DHomMatrix aInnerObjectMatrix; - - aInnerObjectMatrix.scale(aPrefSize.getWidth(), aPrefSize.getHeight()); - aInnerObjectMatrix.translate(fOffsetX, fOffsetY); - aInnerObjectMatrix.shearX(fShearX); - aInnerObjectMatrix.rotate(fRotate); - aInnerObjectMatrix.translate(aTranslate.getX(), aTranslate.getY()); + basegfx::B2DHomMatrix aInnerObjectMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix( + aPrefSize.getWidth(), aPrefSize.getHeight(), fOffsetX, fOffsetY)); + aInnerObjectMatrix = basegfx::tools::createShearXRotateTranslateB2DHomMatrix(fShearX, fRotate, aTranslate) + * aInnerObjectMatrix; const drawinglayer::primitive2d::Primitive2DReference aGraphicPrimitive( new drawinglayer::primitive2d::GraphicPrimitive2D( diff --git a/svx/source/svdraw/gradtrns.cxx b/svx/source/svdraw/gradtrns.cxx index 0e62aa9ed75f..5f607cd20bb6 100644 --- a/svx/source/svdraw/gradtrns.cxx +++ b/svx/source/svdraw/gradtrns.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include // FRound ////////////////////////////////////////////////////////////////////////////// @@ -81,11 +82,7 @@ void GradTransformer::GradToVec(GradTransGradient& rG, GradTransVector& rV, cons if(rG.aGradient.GetAngle()) { const double fAngle = (double)rG.aGradient.GetAngle() * (F_PI180 / 10.0); - basegfx::B2DHomMatrix aTransformation; - - aTransformation.translate(-aCenter.getX(), -aCenter.getY()); - aTransformation.rotate(-fAngle); - aTransformation.translate(aCenter.getX(), aCenter.getY()); + const basegfx::B2DHomMatrix aTransformation(basegfx::tools::createRotateAroundPoint(aCenter, -fAngle)); aStartPos *= aTransformation; aEndPos *= aTransformation; @@ -108,11 +105,7 @@ void GradTransformer::GradToVec(GradTransGradient& rG, GradTransVector& rV, cons if(rG.aGradient.GetAngle()) { const double fAngle = (double)rG.aGradient.GetAngle() * (F_PI180 / 10.0); - basegfx::B2DHomMatrix aTransformation; - - aTransformation.translate(-aCenter.getX(), -aCenter.getY()); - aTransformation.rotate(-fAngle); - aTransformation.translate(aCenter.getX(), aCenter.getY()); + const basegfx::B2DHomMatrix aTransformation(basegfx::tools::createRotateAroundPoint(aCenter, -fAngle)); aStartPos *= aTransformation; aEndPos *= aTransformation; @@ -136,11 +129,7 @@ void GradTransformer::GradToVec(GradTransGradient& rG, GradTransVector& rV, cons if(rG.aGradient.GetAngle()) { const double fAngle = (double)rG.aGradient.GetAngle() * (F_PI180 / 10.0); - basegfx::B2DHomMatrix aTransformation; - - aTransformation.translate(-aEndPos.getX(), -aEndPos.getY()); - aTransformation.rotate(-fAngle); - aTransformation.translate(aEndPos.getX(), aEndPos.getY()); + const basegfx::B2DHomMatrix aTransformation(basegfx::tools::createRotateAroundPoint(aEndPos, -fAngle)); aStartPos *= aTransformation; aEndPos *= aTransformation; @@ -175,11 +164,7 @@ void GradTransformer::GradToVec(GradTransGradient& rG, GradTransVector& rV, cons if(rG.aGradient.GetAngle()) { const double fAngle = (double)rG.aGradient.GetAngle() * (F_PI180 / 10.0); - basegfx::B2DHomMatrix aTransformation; - - aTransformation.translate(-aEndPos.getX(), -aEndPos.getY()); - aTransformation.rotate(-fAngle); - aTransformation.translate(aEndPos.getX(), aEndPos.getY()); + const basegfx::B2DHomMatrix aTransformation(basegfx::tools::createRotateAroundPoint(aEndPos, -fAngle)); aStartPos *= aTransformation; aEndPos *= aTransformation; diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index e427e42d80ab..254e5daa741f 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -84,6 +84,7 @@ #include #include #include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -575,9 +576,8 @@ void SdrDragMethod::applyCurrentTransformationToSdrObject(SdrObject& rTarget) const double fScaleY(fabs(aScale.getY()) / (basegfx::fTools::equalZero(aPolyRange.getHeight()) ? 1.0 : aPolyRange.getHeight())); // prepare transform matrix for polygon - basegfx::B2DHomMatrix aPolyTransform; - - aPolyTransform.translate(-aPolyRange.getMinX(), -aPolyRange.getMinY()); + basegfx::B2DHomMatrix aPolyTransform(basegfx::tools::createTranslateB2DHomMatrix( + -aPolyRange.getMinX(), -aPolyRange.getMinY())); aPolyTransform.scale(fScaleX, fScaleY); // normally the poly should be moved back, but the translation is in the object @@ -1392,11 +1392,7 @@ bool SdrDragMove::BeginSdrDrag() basegfx::B2DHomMatrix SdrDragMove::getCurrentTransformation() { - basegfx::B2DHomMatrix aRetval; - - aRetval.translate(DragStat().GetDX(), DragStat().GetDY()); - - return aRetval; + return basegfx::tools::createTranslateB2DHomMatrix(DragStat().GetDX(), DragStat().GetDY()); } void SdrDragMove::ImpCheckSnap(const Point& rPt) @@ -1721,9 +1717,8 @@ bool SdrDragResize::BeginSdrDrag() basegfx::B2DHomMatrix SdrDragResize::getCurrentTransformation() { - basegfx::B2DHomMatrix aRetval; - - aRetval.translate(-DragStat().Ref1().X(), -DragStat().Ref1().Y()); + basegfx::B2DHomMatrix aRetval(basegfx::tools::createTranslateB2DHomMatrix( + -DragStat().Ref1().X(), -DragStat().Ref1().Y())); aRetval.scale(aXFact, aYFact); aRetval.translate(DragStat().Ref1().X(), DragStat().Ref1().Y()); @@ -2007,13 +2002,9 @@ bool SdrDragRotate::BeginSdrDrag() basegfx::B2DHomMatrix SdrDragRotate::getCurrentTransformation() { - basegfx::B2DHomMatrix aRetval; - - aRetval.translate(-DragStat().GetRef1().X(), -DragStat().GetRef1().Y()); - aRetval.rotate(-atan2(nSin, nCos)); - aRetval.translate(DragStat().GetRef1().X(), DragStat().GetRef1().Y()); - - return aRetval; + return basegfx::tools::createRotateAroundPoint( + DragStat().GetRef1().X(), DragStat().GetRef1().Y(), + -atan2(nSin, nCos)); } void SdrDragRotate::MoveSdrDrag(const Point& rPnt_) @@ -2163,9 +2154,8 @@ bool SdrDragShear::BeginSdrDrag() basegfx::B2DHomMatrix SdrDragShear::getCurrentTransformation() { - basegfx::B2DHomMatrix aRetval; - - aRetval.translate(-DragStat().GetRef1().X(), -DragStat().GetRef1().Y()); + basegfx::B2DHomMatrix aRetval(basegfx::tools::createTranslateB2DHomMatrix( + -DragStat().GetRef1().X(), -DragStat().GetRef1().Y())); if (bResize) { @@ -2463,7 +2453,7 @@ basegfx::B2DHomMatrix SdrDragMirror::getCurrentTransformation() const double fDeltaY(DragStat().GetRef2().Y() - DragStat().GetRef1().Y()); const double fRotation(atan2(fDeltaY, fDeltaX)); - aRetval.translate(-DragStat().GetRef1().X(), -DragStat().GetRef1().Y()); + aRetval = basegfx::tools::createTranslateB2DHomMatrix(-DragStat().GetRef1().X(), -DragStat().GetRef1().Y()); aRetval.rotate(-fRotation); aRetval.scale(1.0, -1.0); aRetval.rotate(fRotation); diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 30c3ff62531a..0cc1e347c949 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -46,7 +46,6 @@ #include #include #include - #include #include #include @@ -55,9 +54,7 @@ #include #include #include - #include - #include #include #include @@ -73,9 +70,8 @@ #include #include #include // FRound - -// #i73407# #include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -385,12 +381,10 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaLineAction& rAct) if(!aStart.equal(aEnd)) { basegfx::B2DPolygon aLine; - basegfx::B2DHomMatrix aTransform; + const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(fScaleX, fScaleY, aOfs.X(), aOfs.Y())); aLine.append(aStart); aLine.append(aEnd); - aTransform.scale(fScaleX, fScaleY); - aTransform.translate(aOfs.X(), aOfs.Y()); aLine.transform(aTransform); const LineInfo& rLineInfo = rAct.GetLineInfo(); @@ -581,10 +575,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaPolyLineAction& rAct ) if(aSource.count()) { - basegfx::B2DHomMatrix aTransform; - - aTransform.scale(fScaleX, fScaleY); - aTransform.translate(aOfs.X(), aOfs.Y()); + const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(fScaleX, fScaleY, aOfs.X(), aOfs.Y())); aSource.transform(aTransform); } @@ -618,10 +609,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaPolygonAction& rAct ) if(aSource.count()) { - basegfx::B2DHomMatrix aTransform; - - aTransform.scale(fScaleX, fScaleY); - aTransform.translate(aOfs.X(), aOfs.Y()); + const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(fScaleX, fScaleY, aOfs.X(), aOfs.Y())); aSource.transform(aTransform); if(!bLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(basegfx::B2DPolyPolygon(aSource))) @@ -643,10 +631,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaPolyPolygonAction& rAct) if(aSource.count()) { - basegfx::B2DHomMatrix aTransform; - - aTransform.scale(fScaleX, fScaleY); - aTransform.translate(aOfs.X(), aOfs.Y()); + const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(fScaleX, fScaleY, aOfs.X(), aOfs.Y())); aSource.transform(aTransform); if(!bLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(aSource)) @@ -791,9 +776,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaHatchAction& rAct ) if(aSource.count()) { - basegfx::B2DHomMatrix aTransform; - aTransform.scale(fScaleX, fScaleY); - aTransform.translate(aOfs.X(), aOfs.Y()); + const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(fScaleX, fScaleY, aOfs.X(), aOfs.Y())); aSource.transform(aTransform); if(!bLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(aSource)) @@ -886,10 +869,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM if(aSource.count()) { - basegfx::B2DHomMatrix aTransform; - - aTransform.scale(fScaleX, fScaleY); - aTransform.translate(aOfs.X(), aOfs.Y()); + const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(fScaleX, fScaleY, aOfs.X(), aOfs.Y())); aSource.transform(aTransform); if(!bLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(aSource)) diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index dab855fa6f41..4f0dc646376f 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -94,6 +94,7 @@ #include #include #include +#include // #104018# replace macros above with type-safe methods inline double ImplTwipsToMM(double fVal) { return (fVal * (127.0 / 72.0)); } @@ -3438,31 +3439,11 @@ sal_Bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, ba } // build matrix - rMatrix.identity(); - - if(!basegfx::fTools::equal(aScale.getX(), 1.0) || !basegfx::fTools::equal(aScale.getY(), 1.0)) - { - rMatrix.scale(aScale.getX(), aScale.getY()); - } - - if(!basegfx::fTools::equalZero(fShearX)) - { - rMatrix.shearX(tan(fShearX)); - } - - if(!basegfx::fTools::equalZero(fRotate)) - { - // #i78696# - // fRotate is from the old GeoStat struct and thus mathematically wrong orientated. For - // the linear combination of matrices it needed to be fixed in the API, so it needs to - // be mirrored here - rMatrix.rotate(-fRotate); - } - - if(!aTranslate.equalZero()) - { - rMatrix.translate(aTranslate.getX(), aTranslate.getY()); - } + rMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aScale, + basegfx::fTools::equalZero(fShearX) ? 0.0 : tan(fShearX), + basegfx::fTools::equalZero(fRotate) ? 0.0 : -fRotate, + aTranslate); return sal_False; } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 7ba4aec3e565..293317cf2a93 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -68,9 +68,6 @@ #include // NotPersistItems #include #include - -//////////////////////////////////////////////////////////////////////////////////////////////////// - #include #include #include @@ -98,8 +95,6 @@ #include #include // FRound #include - -// #97849# #include #include #include @@ -107,8 +102,6 @@ #include #include #include - -// #110094# #include #include #include @@ -120,7 +113,6 @@ #include #include #include - #include #include #include @@ -128,10 +120,8 @@ #include "svx/svdotable.hxx" #include "svx/shapepropertynotifier.hxx" #include - -// --> OD 2009-07-10 #i73249# #include -// <-- +#include using namespace ::com::sun::star; @@ -3056,17 +3046,7 @@ sal_Bool SdrObject::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B } // build matrix - rMatrix.identity(); - - if(1.0 != aScale.getX() || 1.0 != aScale.getY()) - { - rMatrix.scale(aScale.getX(), aScale.getY()); - } - - if(0.0 != aTranslate.getX() || 0.0 != aTranslate.getY()) - { - rMatrix.translate(aTranslate.getX(), aTranslate.getY()); - } + rMatrix = basegfx::tools::createScaleTranslateB2DHomMatrix(aScale, aTranslate); return sal_False; } diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 6af31224ee45..88cab2851359 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -61,6 +61,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -238,11 +239,10 @@ basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, c aCircPolygon.removeDoublePoints(); // needs own scaling and translation from unit circle to target size - basegfx::B2DHomMatrix aMatrix; const basegfx::B2DPoint aCenter(aRange.getCenter()); - - aMatrix.scale(aRange.getWidth() / 2.0, aRange.getHeight() / 2.0); - aMatrix.translate(aCenter.getX(), aCenter.getY()); + const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix( + aRange.getWidth() / 2.0, aRange.getHeight() / 2.0, + aCenter.getX(), aCenter.getY())); aCircPolygon.transform(aMatrix); } else @@ -277,26 +277,16 @@ basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, c // #i76950# if(aGeo.nShearWink || aGeo.nDrehWink) { - const basegfx::B2DPoint aTopLeft(aRange.getMinimum()); - basegfx::B2DHomMatrix aMatrix; - // translate top left to (0,0) - aMatrix.translate(-aTopLeft.getX(), -aTopLeft.getY()); - - // shear (if needed) - if(aGeo.nShearWink) - { - aMatrix.shearX(tan((36000 - aGeo.nShearWink) * F_PI18000)); - } - - // rotate (if needed) - if(aGeo.nDrehWink) - { - aMatrix.rotate((36000 - aGeo.nDrehWink) * F_PI18000); - } - - // back to top left - aMatrix.translate(aTopLeft.getX(), aTopLeft.getY()); + const basegfx::B2DPoint aTopLeft(aRange.getMinimum()); + basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix( + -aTopLeft.getX(), -aTopLeft.getY())); + + // shear, rotate and back to top left (if needed) + aMatrix = basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + aGeo.nShearWink ? tan((36000 - aGeo.nShearWink) * F_PI18000) : 0.0, + aGeo.nDrehWink ? (36000 - aGeo.nDrehWink) * F_PI18000 : 0.0, + aTopLeft) * aMatrix; // apply transformation aCircPolygon.transform(aMatrix); diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index 330b7f5c37f6..90f3870c058e 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -71,6 +71,7 @@ #include #include #include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1456,17 +1457,7 @@ sal_Bool SdrMeasureObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf } // build return value matrix - rMatrix.identity(); - - if(!basegfx::fTools::equal(aScale.getX(), 1.0) || !basegfx::fTools::equal(aScale.getY(), 1.0)) - { - rMatrix.scale(aScale.getX(), aScale.getY()); - } - - if(!aTranslate.equalZero()) - { - rMatrix.translate(aTranslate.getX(), aTranslate.getY()); - } + rMatrix = basegfx::tools::createScaleTranslateB2DHomMatrix(aScale, aTranslate); return sal_True; } diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 1e9c9b57c52d..e30b0aacf75d 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -56,7 +56,6 @@ #include #include #include - #include #include #include // FRound @@ -77,10 +76,9 @@ inline double ImplMMToTwips(double fVal) { return (fVal * (72.0 / 127.0)); } #include #include #include - -// #i89784# #include #include +#include using namespace sdr; @@ -2291,9 +2289,7 @@ Pointer SdrPathObj::GetCreatePointer() const void SdrPathObj::NbcMove(const Size& rSiz) { - basegfx::B2DHomMatrix aTrans; - aTrans.translate(rSiz.Width(), rSiz.Height()); - maPathPolygon.transform(aTrans); + maPathPolygon.transform(basegfx::tools::createTranslateB2DHomMatrix(rSiz.Width(), rSiz.Height())); // #i19871# first modify locally, then call parent (to get correct SnapRect with GluePoints) SdrTextObj::NbcMove(rSiz); @@ -2301,10 +2297,9 @@ void SdrPathObj::NbcMove(const Size& rSiz) void SdrPathObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { - basegfx::B2DHomMatrix aTrans; - aTrans.translate(-rRef.X(), -rRef.Y()); - aTrans.scale(double(xFact), double(yFact)); - aTrans.translate(rRef.X(), rRef.Y()); + basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-rRef.X(), -rRef.Y())); + aTrans = basegfx::tools::createScaleTranslateB2DHomMatrix( + double(xFact), double(yFact), rRef.X(), rRef.Y()) * aTrans; maPathPolygon.transform(aTrans); // #i19871# first modify locally, then call parent (to get correct SnapRect with GluePoints) @@ -2313,10 +2308,8 @@ void SdrPathObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract void SdrPathObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs) { - basegfx::B2DHomMatrix aTrans; - aTrans.translate(-rRef.X(), -rRef.Y()); - aTrans.rotate(-nWink * nPi180); // Thank JOE, the angles are defined mirrored to the mathematical meanings - aTrans.translate(rRef.X(), rRef.Y()); + // Thank JOE, the angles are defined mirrored to the mathematical meanings + const basegfx::B2DHomMatrix aTrans(basegfx::tools::createRotateAroundPoint(rRef.X(), rRef.Y(), -nWink * nPi180)); maPathPolygon.transform(aTrans); // #i19871# first modify locally, then call parent (to get correct SnapRect with GluePoints) @@ -2325,8 +2318,7 @@ void SdrPathObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs) void SdrPathObj::NbcShear(const Point& rRefPnt, long nAngle, double fTan, FASTBOOL bVShear) { - basegfx::B2DHomMatrix aTrans; - aTrans.translate(-rRefPnt.X(), -rRefPnt.Y()); + basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-rRefPnt.X(), -rRefPnt.Y())); if(bVShear) { @@ -2347,11 +2339,10 @@ void SdrPathObj::NbcShear(const Point& rRefPnt, long nAngle, double fTan, FASTBO void SdrPathObj::NbcMirror(const Point& rRefPnt1, const Point& rRefPnt2) { - basegfx::B2DHomMatrix aTrans; const double fDiffX(rRefPnt2.X() - rRefPnt1.X()); const double fDiffY(rRefPnt2.Y() - rRefPnt1.Y()); const double fRot(atan2(fDiffY, fDiffX)); - aTrans.translate(-rRefPnt1.X(), -rRefPnt1.Y()); + basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-rRefPnt1.X(), -rRefPnt1.Y())); aTrans.rotate(-fRot); aTrans.scale(1.0, -1.0); aTrans.rotate(fRot); @@ -2935,31 +2926,11 @@ sal_Bool SdrPathObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx:: } // build return value matrix - rMatrix.identity(); - - if(!basegfx::fTools::equal(aScale.getX(), 1.0) || !basegfx::fTools::equal(aScale.getY(), 1.0)) - { - rMatrix.scale(aScale.getX(), aScale.getY()); - } - - if(!basegfx::fTools::equalZero(fShearX)) - { - rMatrix.shearX(tan(fShearX)); - } - - if(!basegfx::fTools::equalZero(fRotate)) - { - // #i78696# - // fRotate is from the old GeoStat and thus mathematically wrong orientated. For - // the linear combination of matrices it needed to be fixed in the API, so it needs to - // be mirrored here - rMatrix.rotate(-fRotate); - } - - if(!aTranslate.equalZero()) - { - rMatrix.translate(aTranslate.getX(), aTranslate.getY()); - } + rMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aScale, + basegfx::fTools::equalZero(fShearX) ? 0.0 : tan(fShearX), + basegfx::fTools::equalZero(fRotate) ? 0.0 : -fRotate, + aTranslate); return sal_True; } diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 6b2f02299d4a..a6f15ab27802 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -63,17 +63,14 @@ #include #include #include - -// #110496# #include - -// #111111# #include #include #include #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -737,9 +734,9 @@ void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAncho { basegfx::B2DPolyPolygon aXorPolyPolygon(TakeXorPoly()); basegfx::B2DPolyPolygon* pContourPolyPolygon = 0L; - basegfx::B2DHomMatrix aMatrix; + basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix( + -rAnchorRect.Left(), -rAnchorRect.Top())); - aMatrix.translate(-rAnchorRect.Left(), -rAnchorRect.Top()); if(aGeo.nDrehWink) { // Unrotate! @@ -1735,31 +1732,11 @@ sal_Bool SdrTextObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx:: } // build matrix - rMatrix.identity(); - - if(!basegfx::fTools::equal(aScale.getX(), 1.0) || !basegfx::fTools::equal(aScale.getY(), 1.0)) - { - rMatrix.scale(aScale.getX(), aScale.getY()); - } - - if(!basegfx::fTools::equalZero(fShearX)) - { - rMatrix.shearX(tan(fShearX)); - } - - if(!basegfx::fTools::equalZero(fRotate)) - { - // #i78696# - // fRotate is from the old GeoStat and thus mathematically wrong orientated. For - // the linear combination of matrices it needed to be fixed in the API, so it needs to - // be mirrored here - rMatrix.rotate(-fRotate); - } - - if(!aTranslate.equalZero()) - { - rMatrix.translate(aTranslate.getX(), aTranslate.getY()); - } + rMatrix = basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aScale, + basegfx::fTools::equalZero(fShearX) ? 0.0 : tan(fShearX), + basegfx::fTools::equalZero(fRotate) ? 0.0 : -fRotate, + aTranslate); return sal_False; } diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 76c29de8d480..a10d2c258fb7 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -60,6 +60,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// // helpers @@ -676,9 +677,7 @@ bool SdrTextObj::impDecomposeContourTextPrimitive( // prepare contour polygon, force to non-mirrored for layouting basegfx::B2DPolyPolygon aPolyPolygon(rSdrContourTextPrimitive.getUnitPolyPolygon()); - basegfx::B2DHomMatrix aTransform; - aTransform.scale(fabs(aScale.getX()), fabs(aScale.getY())); - aPolyPolygon.transform(aTransform); + aPolyPolygon.transform(basegfx::tools::createScaleB2DHomMatrix(fabs(aScale.getX()), fabs(aScale.getY()))); // prepare outliner SdrOutliner& rOutliner = ImpGetDrawOutliner(); @@ -693,19 +692,17 @@ bool SdrTextObj::impDecomposeContourTextPrimitive( // prepare matrices to apply to newly created primitives basegfx::B2DHomMatrix aNewTransformA; - basegfx::B2DHomMatrix aNewTransformB; // mirroring. We are now in the polygon sizes. When mirroring in X and Y, // move the null point which was top left to bottom right. const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0)); const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0)); - aNewTransformB.scale(bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0); // in-between the translations of the single primitives will take place. Afterwards, // the object's transformations need to be applied - aNewTransformB.shearX(fShearX); - aNewTransformB.rotate(fRotate); - aNewTransformB.translate(aTranslate.getX(), aTranslate.getY()); + const basegfx::B2DHomMatrix aNewTransformB(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0, + fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); // now break up text primitives. impTextBreakupHandler aConverter(rOutliner); @@ -882,26 +879,22 @@ bool SdrTextObj::impDecomposeBlockTextPrimitive( // prepare matrices to apply to newly created primitives. aNewTransformA // will get coordinates in aOutlinerScale size and positive in X, Y. - basegfx::B2DHomMatrix aNewTransformA; - basegfx::B2DHomMatrix aNewTransformB; - - // translate relative to given primitive to get same rotation and shear + // Translate relative to given primitive to get same rotation and shear // as the master shape we are working on. For vertical, use the top-right // corner const double fStartInX(bVerticalWritintg ? aAdjustTranslate.getX() + aOutlinerScale.getX() : aAdjustTranslate.getX()); - aNewTransformA.translate(fStartInX, aAdjustTranslate.getY()); + basegfx::B2DHomMatrix aNewTransformA(basegfx::tools::createTranslateB2DHomMatrix(fStartInX, aAdjustTranslate.getY())); // mirroring. We are now in aAnchorTextRange sizes. When mirroring in X and Y, // move the null point which was top left to bottom right. const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0)); const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0)); - aNewTransformB.scale(bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0); // in-between the translations of the single primitives will take place. Afterwards, // the object's transformations need to be applied - aNewTransformB.shearX(fShearX); - aNewTransformB.rotate(fRotate); - aNewTransformB.translate(aTranslate.getX(), aTranslate.getY()); + const basegfx::B2DHomMatrix aNewTransformB(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0, + fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); // now break up text primitives. impTextBreakupHandler aConverter(rOutliner); @@ -956,7 +949,6 @@ bool SdrTextObj::impDecomposeStretchTextPrimitive( // prepare matrices to apply to newly created primitives basegfx::B2DHomMatrix aNewTransformA; - basegfx::B2DHomMatrix aNewTransformB; // #i101957# Check for vertical text. If used, aNewTransformA // needs to translate the text initially around object width to orient @@ -978,13 +970,12 @@ bool SdrTextObj::impDecomposeStretchTextPrimitive( // move the null point which was top left to bottom right. const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0)); const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0)); - aNewTransformB.scale(bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0); // in-between the translations of the single primitives will take place. Afterwards, // the object's transformations need to be applied - aNewTransformB.shearX(fShearX); - aNewTransformB.rotate(fRotate); - aNewTransformB.translate(aTranslate.getX(), aTranslate.getY()); + const basegfx::B2DHomMatrix aNewTransformB(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0, + fShearX, fRotate, aTranslate.getX(), aTranslate.getY())); // now break up text primitives. impTextBreakupHandler aConverter(rOutliner); diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx index 18840cde18e0..523eb6b4b2c3 100644 --- a/svx/source/svdraw/svdovirt.cxx +++ b/svx/source/svdraw/svdovirt.cxx @@ -40,6 +40,7 @@ #include #include #include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -216,9 +217,7 @@ basegfx::B2DPolyPolygon SdrVirtObj::TakeXorPoly() const if(aAnchor.X() || aAnchor.Y()) { - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate(aAnchor.X(), aAnchor.Y()); - aPolyPolygon.transform(aMatrix); + aPolyPolygon.transform(basegfx::tools::createTranslateB2DHomMatrix(aAnchor.X(), aAnchor.Y())); } return aPolyPolygon; diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 3f7f58a1e9ad..b83253968601 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -98,6 +98,7 @@ #include "unomaster.hxx" #include #include +#include #include @@ -2516,10 +2517,7 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper if( mpModel->IsWriter() ) { Point aPoint( mpObj->GetAnchorPos() ); - - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate( aPoint.X(), aPoint.Y() ); - aNewPolyPolygon.transform( aMatrix ); + aNewPolyPolygon.transform(basegfx::tools::createTranslateB2DHomMatrix(aPoint.X(), aPoint.Y())); } pEdgeObj->SetEdgeTrackPath( aNewPolyPolygon ); return true; @@ -2952,10 +2950,7 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper if( mpModel->IsWriter() ) { Point aPoint( mpObj->GetAnchorPos() ); - - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate( -aPoint.X(), -aPoint.Y() ); - aPolyPoly.transform( aMatrix ); + aPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(-aPoint.X(), -aPoint.Y())); } drawing::PolyPolygonBezierCoords aRetval; SvxConvertB2DPolyPolygonToPolyPolygonBezier( aPolyPoly, aRetval); -- cgit From 7857f07d09265f58b2c17c4f619f4aad81b1c43d Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 22 Sep 2009 18:14:05 +0200 Subject: #i97509# continued matrix tooling and adapting the usages now to all the ooo code --- basegfx/inc/basegfx/matrix/b2dhommatrix.hxx | 10 + basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx | 205 +++++++++++-- basegfx/source/matrix/b2dhommatrix.cxx | 174 ++--------- basegfx/source/matrix/b2dhommatrixtools.cxx | 324 +++++++++++++++++++++ basegfx/source/polygon/b2dlinegeometry.cxx | 9 +- basegfx/source/polygon/b2dpolygonclipper.cxx | 7 +- basegfx/source/polygon/b2dpolygontools.cxx | 54 +--- basegfx/source/polygon/b2dsvgpolypolygon.cxx | 6 +- basegfx/source/tools/gradienttools.cxx | 17 +- basegfx/source/tools/unopolypolygon.cxx | 6 +- canvas/source/directx/dx_canvashelper.cxx | 13 +- .../source/directx/dx_canvashelper_texturefill.cxx | 4 +- canvas/source/simplecanvas/simplecanvasimpl.cxx | 11 +- canvas/source/tools/canvastools.cxx | 11 +- canvas/source/tools/surface.cxx | 11 +- cppcanvas/source/mtfrenderer/bitmapaction.cxx | 19 +- cppcanvas/source/mtfrenderer/implrenderer.cxx | 27 +- cppcanvas/source/mtfrenderer/mtftools.cxx | 11 +- cppcanvas/source/mtfrenderer/textaction.cxx | 5 +- vcl/aqua/source/gdi/salgdi.cxx | 4 +- vcl/os2/source/gdi/salgdi3.cxx | 6 +- vcl/source/gdi/region.cxx | 9 +- vcl/source/gdi/sallayout.cxx | 7 +- vcl/source/glyphs/gcach_ftyp.cxx | 4 +- vcl/unx/source/gdi/salgdi.cxx | 8 +- vcl/win/source/gdi/salgdi3.cxx | 6 +- 26 files changed, 614 insertions(+), 354 deletions(-) diff --git a/basegfx/inc/basegfx/matrix/b2dhommatrix.hxx b/basegfx/inc/basegfx/matrix/b2dhommatrix.hxx index c7c79d0cd6e9..10b023c5f68c 100644 --- a/basegfx/inc/basegfx/matrix/b2dhommatrix.hxx +++ b/basegfx/inc/basegfx/matrix/b2dhommatrix.hxx @@ -52,12 +52,22 @@ namespace basegfx B2DHomMatrix(const B2DHomMatrix& rMat); ~B2DHomMatrix(); + /** constructor to allow setting all needed values for a 3x2 matrix at once. The + parameter f_0x1 e.g. is the same as using set(0, 1, f) + */ + B2DHomMatrix(double f_0x0, double f_0x1, double f_0x2, double f_1x0, double f_1x1, double f_1x2); + /// unshare this matrix with all internally shared instances void makeUnique(); double get(sal_uInt16 nRow, sal_uInt16 nColumn) const; void set(sal_uInt16 nRow, sal_uInt16 nColumn, double fValue); + /** allow setting all needed values for a 3x2 matrix in one call. The + parameter f_0x1 e.g. is the same as using set(0, 1, f) + */ + void set3x2(double f_0x0, double f_0x1, double f_0x2, double f_1x0, double f_1x1, double f_1x2); + // test if last line is default to see if last line needs to be // involved in calculations bool isLastLineDefault() const; diff --git a/basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx b/basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx index 0b200b812bed..c90f673a8194 100644 --- a/basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx +++ b/basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx @@ -40,45 +40,190 @@ namespace basegfx { - class DecomposedB2DHomMatrixContainer + namespace tools { - private: - B2DHomMatrix maB2DHomMatrix; - B2DVector maScale; - B2DVector maTranslate; - double mfRotate; - double mfShearX; + /** If the rotation angle is an approximate multiple of pi/2, + force fSin/fCos to -1/0/1, to maintain orthogonality (which + might also be advantageous for the other cases, but: for + multiples of pi/2, the exact values _can_ be attained. It + would be largely unintuitive, if a 180 degrees rotation + would introduce slight roundoff errors, instead of exactly + mirroring the coordinate system) + */ + void createSinCosOrthogonal(double& o_rSin, double& rCos, double fRadiant); - // bitfield - unsigned mbDecomposed : 1; + /** Tooling methods for on-the-fly matrix generation e.g. for inline + multiplications + */ + B2DHomMatrix createScaleB2DHomMatrix(double fScaleX, double fScaleY); + B2DHomMatrix createShearXB2DHomMatrix(double fShearX); + B2DHomMatrix createShearYB2DHomMatrix(double fShearY); + B2DHomMatrix createRotateB2DHomMatrix(double fRadiant); + B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY); - void impCheckDecompose() + /// inline versions for parameters as tuples + inline B2DHomMatrix createScaleB2DHomMatrix(const B2DTuple& rScale) { - if(!mbDecomposed) - { - maB2DHomMatrix.decompose(maScale, maTranslate, mfRotate, mfShearX); - mbDecomposed = true; - } + return createScaleB2DHomMatrix(rScale.getX(), rScale.getY()); + } + + inline B2DHomMatrix createTranslateB2DHomMatrix(const B2DTuple& rTranslate) + { + return createTranslateB2DHomMatrix(rTranslate.getX(), rTranslate.getY()); + } + + /** Tooling methods for faster completely combined matrix creation + when scale, shearX, rotation and translation needs to be done in + exactly that order. It's faster since it direcly calculates + each matrix value based on a symbolic calculation of the three + matrix multiplications. + Inline versions for parameters as tuples added, too. + */ + B2DHomMatrix createScaleShearXRotateTranslateB2DHomMatrix( + double fScaleX, double fScaleY, + double fShearX, + double fRadiant, + double fTranslateX, double fTranslateY); + inline B2DHomMatrix createScaleShearXRotateTranslateB2DHomMatrix( + const B2DTuple& rScale, + double fShearX, + double fRadiant, + const B2DTuple& rTranslate) + { + return createScaleShearXRotateTranslateB2DHomMatrix( + rScale.getX(), rScale.getY(), + fShearX, + fRadiant, + rTranslate.getX(), rTranslate.getY()); + } + + B2DHomMatrix createShearXRotateTranslateB2DHomMatrix( + double fShearX, + double fRadiant, + double fTranslateX, double fTranslateY); + inline B2DHomMatrix createShearXRotateTranslateB2DHomMatrix( + double fShearX, + double fRadiant, + const B2DTuple& rTranslate) + { + return createShearXRotateTranslateB2DHomMatrix( + fShearX, + fRadiant, + rTranslate.getX(), rTranslate.getY()); } - public: - DecomposedB2DHomMatrixContainer(const B2DHomMatrix& rB2DHomMatrix) - : maB2DHomMatrix(rB2DHomMatrix), - maScale(), - maTranslate(), - mfRotate(0.0), - mfShearX(0.0), - mbDecomposed(false) + B2DHomMatrix createScaleTranslateB2DHomMatrix( + double fScaleX, double fScaleY, + double fTranslateX, double fTranslateY); + inline B2DHomMatrix createScaleTranslateB2DHomMatrix( + const B2DTuple& rScale, + const B2DTuple& rTranslate) { + return createScaleTranslateB2DHomMatrix( + rScale.getX(), rScale.getY(), + rTranslate.getX(), rTranslate.getY()); } - // data access - const B2DHomMatrix& getB2DHomMatrix() const { return maB2DHomMatrix; } - const B2DVector& getScale() const { const_cast< DecomposedB2DHomMatrixContainer* >(this)->impCheckDecompose(); return maScale; } - const B2DVector& getTranslate() const { const_cast< DecomposedB2DHomMatrixContainer* >(this)->impCheckDecompose(); return maTranslate; } - double getRotate() const { const_cast< DecomposedB2DHomMatrixContainer* >(this)->impCheckDecompose(); return mfRotate; } - double getShearX() const { const_cast< DecomposedB2DHomMatrixContainer* >(this)->impCheckDecompose(); return mfShearX; } - }; + /// special for the often used case of rotation around a point + B2DHomMatrix createRotateAroundPoint( + double fPointX, double fPointY, + double fRadiant); + inline B2DHomMatrix createRotateAroundPoint( + const B2DTuple& rPoint, + double fRadiant) + { + return createRotateAroundPoint( + rPoint.getX(), rPoint.getY(), + fRadiant); + } + } // end of namespace tools +} // end of namespace basegfx + +/////////////////////////////////////////////////////////////////////////////// + +namespace basegfx +{ + namespace tools + { + class B2DHomMatrixBufferedDecompose + { + private: + B2DVector maScale; + B2DVector maTranslate; + double mfRotate; + double mfShearX; + + public: + B2DHomMatrixBufferedDecompose(const B2DHomMatrix& rB2DHomMatrix) + : maScale(), + maTranslate(), + mfRotate(0.0), + mfShearX(0.0) + { + rB2DHomMatrix.decompose(maScale, maTranslate, mfRotate, mfShearX); + } + + // data access + B2DHomMatrix getB2DHomMatrix() const + { + return createScaleShearXRotateTranslateB2DHomMatrix( + maScale, mfShearX, mfRotate, maTranslate); + } + + const B2DVector& getScale() const { return maScale; } + const B2DVector& getTranslate() const { return maTranslate; } + double getRotate() const { return mfRotate; } + double getShearX() const { return mfShearX; } + }; + } // end of namespace tools +} // end of namespace basegfx + +/////////////////////////////////////////////////////////////////////////////// + +namespace basegfx +{ + namespace tools + { + class B2DHomMatrixBufferedOnDemandDecompose + { + private: + B2DHomMatrix maB2DHomMatrix; + B2DVector maScale; + B2DVector maTranslate; + double mfRotate; + double mfShearX; + + // bitfield + unsigned mbDecomposed : 1; + + void impCheckDecompose() + { + if(!mbDecomposed) + { + maB2DHomMatrix.decompose(maScale, maTranslate, mfRotate, mfShearX); + mbDecomposed = true; + } + } + + public: + B2DHomMatrixBufferedOnDemandDecompose(const B2DHomMatrix& rB2DHomMatrix) + : maB2DHomMatrix(rB2DHomMatrix), + maScale(), + maTranslate(), + mfRotate(0.0), + mfShearX(0.0), + mbDecomposed(false) + { + } + + // data access + const B2DHomMatrix& getB2DHomMatrix() const { return maB2DHomMatrix; } + const B2DVector& getScale() const { const_cast< B2DHomMatrixBufferedOnDemandDecompose* >(this)->impCheckDecompose(); return maScale; } + const B2DVector& getTranslate() const { const_cast< B2DHomMatrixBufferedOnDemandDecompose* >(this)->impCheckDecompose(); return maTranslate; } + double getRotate() const { const_cast< B2DHomMatrixBufferedOnDemandDecompose* >(this)->impCheckDecompose(); return mfRotate; } + double getShearX() const { const_cast< B2DHomMatrixBufferedOnDemandDecompose* >(this)->impCheckDecompose(); return mfShearX; } + }; + } // end of namespace tools } // end of namespace basegfx /////////////////////////////////////////////////////////////////////////////// diff --git a/basegfx/source/matrix/b2dhommatrix.cxx b/basegfx/source/matrix/b2dhommatrix.cxx index 352113fa8ed3..a7777352effb 100644 --- a/basegfx/source/matrix/b2dhommatrix.cxx +++ b/basegfx/source/matrix/b2dhommatrix.cxx @@ -36,6 +36,9 @@ #include #include #include +#include + +/////////////////////////////////////////////////////////////////////////////// namespace basegfx { @@ -60,6 +63,17 @@ namespace basegfx { } + B2DHomMatrix::B2DHomMatrix(double f_0x0, double f_0x1, double f_0x2, double f_1x0, double f_1x1, double f_1x2) + : mpImpl( IdentityMatrix::get() ) // use common identity matrix, will be made unique with 1st set-call + { + mpImpl->set(0, 0, f_0x0); + mpImpl->set(0, 1, f_0x1); + mpImpl->set(0, 2, f_0x2); + mpImpl->set(1, 0, f_1x0); + mpImpl->set(1, 1, f_1x1); + mpImpl->set(1, 2, f_1x2); + } + B2DHomMatrix& B2DHomMatrix::operator=(const B2DHomMatrix& rMat) { mpImpl = rMat.mpImpl; @@ -81,6 +95,16 @@ namespace basegfx mpImpl->set(nRow, nColumn, fValue); } + void B2DHomMatrix::set3x2(double f_0x0, double f_0x1, double f_0x2, double f_1x0, double f_1x1, double f_1x2) + { + mpImpl->set(0, 0, f_0x0); + mpImpl->set(0, 1, f_0x1); + mpImpl->set(0, 2, f_0x2); + mpImpl->set(1, 0, f_1x0); + mpImpl->set(1, 1, f_1x1); + mpImpl->set(1, 2, f_1x2); + } + bool B2DHomMatrix::isLastLineDefault() const { return mpImpl->isLastLineDefault(); @@ -206,56 +230,9 @@ namespace basegfx if(!fTools::equalZero(fRadiant)) { double fSin(0.0); - double fCos(0.0); - - // is the rotation angle an approximate multiple of pi/2? - // If yes, force fSin/fCos to -1/0/1, to maintain - // orthogonality (which might also be advantageous for the - // other cases, but: for multiples of pi/2, the exact - // values _can_ be attained. It would be largely - // unintuitive, if a 180 degrees rotation would introduce - // slight roundoff errors, instead of exactly mirroring - // the coordinate system). - if( fTools::equalZero( fmod( fRadiant, F_PI2 ) ) ) - { - // determine quadrant - const sal_Int32 nQuad( - (4 + fround( 4/F_2PI*fmod( fRadiant, F_2PI ) )) % 4 ); - switch( nQuad ) - { - case 0: // -2pi,0,2pi - fSin = 0.0; - fCos = 1.0; - break; - - case 1: // -3/2pi,1/2pi - fSin = 1.0; - fCos = 0.0; - break; - - case 2: // -pi,pi - fSin = 0.0; - fCos = -1.0; - break; - - case 3: // -1/2pi,3/2pi - fSin = -1.0; - fCos = 0.0; - break; - - default: - OSL_ENSURE( false, - "B2DHomMatrix::rotate(): Impossible case reached" ); - } - } - else - { - // TODO(P1): Maybe use glibc's sincos here (though - // that's kinda non-portable...) - fSin = sin(fRadiant); - fCos = cos(fRadiant); - } + double fCos(1.0); + tools::createSinCosOrthogonal(fSin, fCos, fRadiant); Impl2DHomMatrix aRotMat; aRotMat.set(0, 0, fCos); @@ -474,104 +451,7 @@ namespace basegfx return true; } - -/* Old version: Used 3D decompose when shaer was involved and also a determinant test - (but only in that case). Keeping as comment since it also worked and to allow a - fallback in case the new version makes trouble somehow. Definitely missing in the 2nd - case is the sign correction for Y-Scale, this would need to be added following the above - pattern - - bool B2DHomMatrix::decompose(B2DTuple& rScale, B2DTuple& rTranslate, double& rRotate, double& rShearX) const - { - // when perspective is used, decompose is not made here - if(!mpImpl->isLastLineDefault()) - return false; - - // test for rotation and shear - if(fTools::equalZero(get(0, 1)) - && fTools::equalZero(get(1, 0))) - { - // no rotation and shear, direct value extraction - rRotate = rShearX = 0.0; - - // copy scale values - rScale.setX(get(0, 0)); - rScale.setY(get(1, 1)); - - // copy translation values - rTranslate.setX(get(0, 2)); - rTranslate.setY(get(1, 2)); - - return true; - } - else - { - // test if shear is zero. That's the case, if the unit vectors in the matrix - // are perpendicular -> scalar is zero - const ::basegfx::B2DVector aUnitVecX(get(0, 0), get(1, 0)); - const ::basegfx::B2DVector aUnitVecY(get(0, 1), get(1, 1)); - - if(fTools::equalZero(aUnitVecX.scalar(aUnitVecY))) - { - // no shear, direct value extraction - rShearX = 0.0; - - // calculate rotation - rShearX = 0.0; - rRotate = atan2(aUnitVecX.getY(), aUnitVecX.getX()); - - // calculate scale values - rScale.setX(aUnitVecX.getLength()); - rScale.setY(aUnitVecY.getLength()); - - // copy translation values - rTranslate.setX(get(0, 2)); - rTranslate.setY(get(1, 2)); - - return true; - } - else - { - // If determinant is zero, decomposition is not possible - if(0.0 == determinant()) - return false; - - // copy 2x2 matrix and translate vector to 3x3 matrix - ::basegfx::B3DHomMatrix a3DHomMat; - - a3DHomMat.set(0, 0, get(0, 0)); - a3DHomMat.set(0, 1, get(0, 1)); - a3DHomMat.set(1, 0, get(1, 0)); - a3DHomMat.set(1, 1, get(1, 1)); - a3DHomMat.set(0, 3, get(0, 2)); - a3DHomMat.set(1, 3, get(1, 2)); - - ::basegfx::B3DTuple r3DScale, r3DTranslate, r3DRotate, r3DShear; - - if(a3DHomMat.decompose(r3DScale, r3DTranslate, r3DRotate, r3DShear)) - { - // copy scale values - rScale.setX(r3DScale.getX()); - rScale.setY(r3DScale.getY()); - - // copy shear - rShearX = r3DShear.getX(); - - // copy rotate - rRotate = r3DRotate.getZ(); - - // copy translate - rTranslate.setX(r3DTranslate.getX()); - rTranslate.setY(r3DTranslate.getY()); - - return true; - } - } - } - - return false; - } */ - } // end of namespace basegfx +/////////////////////////////////////////////////////////////////////////////// // eof diff --git a/basegfx/source/matrix/b2dhommatrixtools.cxx b/basegfx/source/matrix/b2dhommatrixtools.cxx index 59a1ff432fc7..c9c3180d3e4a 100644 --- a/basegfx/source/matrix/b2dhommatrixtools.cxx +++ b/basegfx/source/matrix/b2dhommatrixtools.cxx @@ -38,6 +38,330 @@ namespace basegfx { + namespace tools + { + void createSinCosOrthogonal(double& o_rSin, double& o_rCos, double fRadiant) + { + if( fTools::equalZero( fmod( fRadiant, F_PI2 ) ) ) + { + // determine quadrant + const sal_Int32 nQuad( + (4 + fround( 4/F_2PI*fmod( fRadiant, F_2PI ) )) % 4 ); + switch( nQuad ) + { + case 0: // -2pi,0,2pi + o_rSin = 0.0; + o_rCos = 1.0; + break; + + case 1: // -3/2pi,1/2pi + o_rSin = 1.0; + o_rCos = 0.0; + break; + + case 2: // -pi,pi + o_rSin = 0.0; + o_rCos = -1.0; + break; + + case 3: // -1/2pi,3/2pi + o_rSin = -1.0; + o_rCos = 0.0; + break; + + default: + OSL_ENSURE( false, "createSinCos: Impossible case reached" ); + } + } + else + { + // TODO(P1): Maybe use glibc's sincos here (though + // that's kinda non-portable...) + o_rSin = sin(fRadiant); + o_rCos = cos(fRadiant); + } + } + + B2DHomMatrix createScaleB2DHomMatrix(double fScaleX, double fScaleY) + { + B2DHomMatrix aRetval; + const double fOne(1.0); + + if(!fTools::equal(fScaleX, fOne)) + { + aRetval.set(0, 0, fScaleX); + } + + if(!fTools::equal(fScaleY, fOne)) + { + aRetval.set(1, 1, fScaleY); + } + + return aRetval; + } + + B2DHomMatrix createShearXB2DHomMatrix(double fShearX) + { + B2DHomMatrix aRetval; + + if(!fTools::equalZero(fShearX)) + { + aRetval.set(0, 1, fShearX); + } + + return aRetval; + } + + B2DHomMatrix createShearYB2DHomMatrix(double fShearY) + { + B2DHomMatrix aRetval; + + if(!fTools::equalZero(fShearY)) + { + aRetval.set(1, 0, fShearY); + } + + return aRetval; + } + + B2DHomMatrix createRotateB2DHomMatrix(double fRadiant) + { + B2DHomMatrix aRetval; + + if(!fTools::equalZero(fRadiant)) + { + double fSin(0.0); + double fCos(1.0); + + createSinCosOrthogonal(fSin, fCos, fRadiant); + aRetval.set(0, 0, fCos); + aRetval.set(1, 1, fCos); + aRetval.set(1, 0, fSin); + aRetval.set(0, 1, -fSin); + } + + return aRetval; + } + + B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY) + { + B2DHomMatrix aRetval; + + if(!(fTools::equalZero(fTranslateX) && fTools::equalZero(fTranslateY))) + { + aRetval.set(0, 2, fTranslateX); + aRetval.set(1, 2, fTranslateY); + } + + return aRetval; + } + + B2DHomMatrix createScaleShearXRotateTranslateB2DHomMatrix( + double fScaleX, double fScaleY, + double fShearX, + double fRadiant, + double fTranslateX, double fTranslateY) + { + const double fOne(1.0); + + if(fTools::equal(fScaleX, fOne) && fTools::equal(fScaleY, fOne)) + { + /// no scale, take shortcut + return createShearXRotateTranslateB2DHomMatrix(fShearX, fRadiant, fTranslateX, fTranslateY); + } + else + { + /// scale used + if(fTools::equalZero(fShearX)) + { + /// no shear + if(fTools::equalZero(fRadiant)) + { + /// no rotate, take shortcut + return createScaleTranslateB2DHomMatrix(fScaleX, fScaleY, fTranslateX, fTranslateY); + } + else + { + /// rotate and scale used, no shear + double fSin(0.0); + double fCos(1.0); + + createSinCosOrthogonal(fSin, fCos, fRadiant); + + B2DHomMatrix aRetval( + /* Row 0, Column 0 */ fCos * fScaleX, + /* Row 0, Column 1 */ fScaleY * -fSin, + /* Row 0, Column 2 */ fTranslateX, + /* Row 1, Column 0 */ fSin * fScaleX, + /* Row 1, Column 1 */ fScaleY * fCos, + /* Row 1, Column 2 */ fTranslateY); + + return aRetval; + } + } + else + { + /// scale and shear used + if(fTools::equalZero(fRadiant)) + { + /// scale and shear, but no rotate + B2DHomMatrix aRetval( + /* Row 0, Column 0 */ fScaleX, + /* Row 0, Column 1 */ fScaleY * fShearX, + /* Row 0, Column 2 */ fTranslateX, + /* Row 1, Column 0 */ 0.0, + /* Row 1, Column 1 */ fScaleY, + /* Row 1, Column 2 */ fTranslateY); + + return aRetval; + } + else + { + /// scale, shear and rotate used + double fSin(0.0); + double fCos(1.0); + + createSinCosOrthogonal(fSin, fCos, fRadiant); + + B2DHomMatrix aRetval( + /* Row 0, Column 0 */ fCos * fScaleX, + /* Row 0, Column 1 */ fScaleY * ((fCos * fShearX) - fSin), + /* Row 0, Column 2 */ fTranslateX, + /* Row 1, Column 0 */ fSin * fScaleX, + /* Row 1, Column 1 */ fScaleY * ((fSin * fShearX) + fCos), + /* Row 1, Column 2 */ fTranslateY); + + return aRetval; + } + } + } + } + + B2DHomMatrix createShearXRotateTranslateB2DHomMatrix( + double fShearX, + double fRadiant, + double fTranslateX, double fTranslateY) + { + if(fTools::equalZero(fShearX)) + { + /// no shear + if(fTools::equalZero(fRadiant)) + { + /// no shear, no rotate, take shortcut + return createTranslateB2DHomMatrix(fTranslateX, fTranslateY); + } + else + { + /// no shear, but rotate used + double fSin(0.0); + double fCos(1.0); + + createSinCosOrthogonal(fSin, fCos, fRadiant); + + B2DHomMatrix aRetval( + /* Row 0, Column 0 */ fCos, + /* Row 0, Column 1 */ -fSin, + /* Row 0, Column 2 */ fTranslateX, + /* Row 1, Column 0 */ fSin, + /* Row 1, Column 1 */ fCos, + /* Row 1, Column 2 */ fTranslateY); + + return aRetval; + } + } + else + { + /// shear used + if(fTools::equalZero(fRadiant)) + { + /// no rotate, but shear used + B2DHomMatrix aRetval( + /* Row 0, Column 0 */ 1.0, + /* Row 0, Column 1 */ fShearX, + /* Row 0, Column 2 */ fTranslateX, + /* Row 1, Column 0 */ 0.0, + /* Row 1, Column 1 */ 1.0, + /* Row 1, Column 2 */ fTranslateY); + + return aRetval; + } + else + { + /// shear and rotate used + double fSin(0.0); + double fCos(1.0); + + createSinCosOrthogonal(fSin, fCos, fRadiant); + + B2DHomMatrix aRetval( + /* Row 0, Column 0 */ fCos, + /* Row 0, Column 1 */ (fCos * fShearX) - fSin, + /* Row 0, Column 2 */ fTranslateX, + /* Row 1, Column 0 */ fSin, + /* Row 1, Column 1 */ (fSin * fShearX) + fCos, + /* Row 1, Column 2 */ fTranslateY); + + return aRetval; + } + } + } + + B2DHomMatrix createScaleTranslateB2DHomMatrix( + double fScaleX, double fScaleY, + double fTranslateX, double fTranslateY) + { + const double fOne(1.0); + + if(fTools::equal(fScaleX, fOne) && fTools::equal(fScaleY, fOne)) + { + /// no scale, take shortcut + return createTranslateB2DHomMatrix(fTranslateX, fTranslateY); + } + else + { + /// scale used + if(fTools::equalZero(fTranslateX) && fTools::equalZero(fTranslateY)) + { + /// no translate, but scale. + B2DHomMatrix aRetval; + + aRetval.set(0, 0, fScaleX); + aRetval.set(1, 1, fScaleY); + + return aRetval; + } + else + { + /// translate and scale + B2DHomMatrix aRetval( + /* Row 0, Column 0 */ fScaleX, + /* Row 0, Column 1 */ 0.0, + /* Row 0, Column 2 */ fTranslateX, + /* Row 1, Column 0 */ 0.0, + /* Row 1, Column 1 */ fScaleY, + /* Row 1, Column 2 */ fTranslateY); + + return aRetval; + } + } + } + + B2DHomMatrix createRotateAroundPoint( + double fPointX, double fPointY, + double fRadiant) + { + B2DHomMatrix aRetval; + + if(!fTools::equalZero(fRadiant)) + { + aRetval = createTranslateB2DHomMatrix(-fPointX, -fPointY); + aRetval.rotate(fRadiant); + aRetval.translate(fPointX, fPointY); + } + + return aRetval; + } + } // end of namespace tools } // end of namespace basegfx /////////////////////////////////////////////////////////////////////////////// diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx b/basegfx/source/polygon/b2dlinegeometry.cxx index 1a9264ab769e..c22b5ea94011 100644 --- a/basegfx/source/polygon/b2dlinegeometry.cxx +++ b/basegfx/source/polygon/b2dlinegeometry.cxx @@ -40,6 +40,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -85,11 +86,9 @@ namespace basegfx // get size of the arrow const B2DRange aArrowSize(getRange(rArrow)); - // build ArrowTransform - B2DHomMatrix aArrowTransform; - - // center in X, align with axis in Y - aArrowTransform.translate(-aArrowSize.getCenter().getX(), -aArrowSize.getMinimum().getY()); + // build ArrowTransform; center in X, align with axis in Y + B2DHomMatrix aArrowTransform(basegfx::tools::createTranslateB2DHomMatrix( + -aArrowSize.getCenter().getX(), -aArrowSize.getMinimum().getY())); // scale to target size const double fArrowScale(fWidth / (aArrowSize.getRange().getX())); diff --git a/basegfx/source/polygon/b2dpolygonclipper.cxx b/basegfx/source/polygon/b2dpolygonclipper.cxx index f0d325942c07..87e44ed3d063 100644 --- a/basegfx/source/polygon/b2dpolygonclipper.cxx +++ b/basegfx/source/polygon/b2dpolygonclipper.cxx @@ -40,6 +40,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -361,11 +362,10 @@ namespace basegfx else if(rCandidate.count()) { const B2DVector aEdge(rPointB - rPointA); - B2DHomMatrix aMatrixTransform; B2DPolygon aCandidate(rCandidate); // translate and rotate polygon so that given edge is on x axis - aMatrixTransform.translate(-rPointA.getX(), -rPointA.getY()); + B2DHomMatrix aMatrixTransform(basegfx::tools::createTranslateB2DHomMatrix(-rPointA.getX(), -rPointA.getY())); aMatrixTransform.rotate(-atan2(aEdge.getY(), aEdge.getX())); aCandidate.transform(aMatrixTransform); @@ -395,11 +395,10 @@ namespace basegfx else if(rCandidate.count()) { const B2DVector aEdge(rPointB - rPointA); - B2DHomMatrix aMatrixTransform; B2DPolyPolygon aCandidate(rCandidate); // translate and rotate polygon so that given edge is on x axis - aMatrixTransform.translate(-rPointA.getX(), -rPointA.getY()); + B2DHomMatrix aMatrixTransform(basegfx::tools::createTranslateB2DHomMatrix(-rPointA.getX(), -rPointA.getY())); aMatrixTransform.rotate(-atan2(aEdge.getY(), aEdge.getX())); aCandidate.transform(aMatrixTransform); diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx index c1e5dc80d8c4..6e288786df6d 100644 --- a/basegfx/source/polygon/b2dpolygontools.cxx +++ b/basegfx/source/polygon/b2dpolygontools.cxx @@ -34,7 +34,6 @@ #include #include #include - #include #include #include @@ -44,6 +43,7 @@ #include #include #include +#include #include #include @@ -1887,29 +1887,10 @@ namespace basegfx B2DPolygon createPolygonFromEllipse( const B2DPoint& rCenter, double fRadiusX, double fRadiusY ) { - const double fOne(1.0); B2DPolygon aRetval(createPolygonFromUnitCircle()); + const B2DHomMatrix aMatrix(createScaleTranslateB2DHomMatrix(fRadiusX, fRadiusY, rCenter.getX(), rCenter.getY())); - // transformation necessary? - const sal_Bool bScale(!fTools::equal(fRadiusX, fOne) || !fTools::equal(fRadiusY, fOne)); - const sal_Bool bTranslate(!rCenter.equalZero()); - - if(bScale || bTranslate) - { - B2DHomMatrix aMatrix; - - if(bScale) - { - aMatrix.scale(fRadiusX, fRadiusY); - } - - if(bTranslate) - { - aMatrix.translate(rCenter.getX(), rCenter.getY()); - } - - aRetval.transform(aMatrix); - } + aRetval.transform(aMatrix); return aRetval; } @@ -2050,28 +2031,9 @@ namespace basegfx B2DPolygon createPolygonFromEllipseSegment( const B2DPoint& rCenter, double fRadiusX, double fRadiusY, double fStart, double fEnd ) { B2DPolygon aRetval(createPolygonFromUnitEllipseSegment(fStart, fEnd)); + const B2DHomMatrix aMatrix(createScaleTranslateB2DHomMatrix(fRadiusX, fRadiusY, rCenter.getX(), rCenter.getY())); - // transformation necessary? - const double fOne(1.0); - const sal_Bool bScale(!fTools::equal(fRadiusX, fOne) || !fTools::equal(fRadiusY, fOne)); - const sal_Bool bTranslate(!rCenter.equalZero()); - - if(bScale || bTranslate) - { - B2DHomMatrix aMatrix; - - if(bScale) - { - aMatrix.scale(fRadiusX, fRadiusY); - } - - if(bTranslate) - { - aMatrix.translate(rCenter.getX(), rCenter.getY()); - } - - aRetval.transform(aMatrix); - } + aRetval.transform(aMatrix); return aRetval; } @@ -2701,11 +2663,7 @@ namespace basegfx if(nPointCount) { - B2DHomMatrix aMatrix; - - aMatrix.translate(-rCenter.getX(), -rCenter.getY()); - aMatrix.rotate(fAngle); - aMatrix.translate(rCenter.getX(), rCenter.getY()); + const B2DHomMatrix aMatrix(basegfx::tools::createRotateAroundPoint(rCenter, fAngle)); aRetval.transform(aMatrix); } diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx index 2247c237d90f..e38ec3809fb1 100644 --- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx +++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -705,7 +706,7 @@ namespace basegfx // |y1'| = |-sin phi cos phi| |(y1 - y2)/2| const B2DPoint p1(nLastX, nLastY); const B2DPoint p2(nX, nY); - B2DHomMatrix aTransform; aTransform.rotate(-fPhi*M_PI/180); + B2DHomMatrix aTransform(basegfx::tools::createRotateB2DHomMatrix(-fPhi*M_PI/180)); const B2DPoint p1_prime( aTransform * B2DPoint(((p1-p2)/2.0)) ); @@ -797,8 +798,7 @@ namespace basegfx fTheta1, fTheta2 )); // transform ellipse by rotation & move to final center - aTransform.identity(); - aTransform.scale(fRX,fRY); + aTransform = basegfx::tools::createScaleB2DHomMatrix(fRX, fRY); aTransform.translate(aCenter_prime.getX(), aCenter_prime.getY()); aTransform.rotate(fPhi*M_PI/180); diff --git a/basegfx/source/tools/gradienttools.cxx b/basegfx/source/tools/gradienttools.cxx index 9e78039cd590..51989899ebf4 100644 --- a/basegfx/source/tools/gradienttools.cxx +++ b/basegfx/source/tools/gradienttools.cxx @@ -32,9 +32,9 @@ #include "precompiled_basegfx.hxx" #include - #include #include +#include namespace basegfx { @@ -79,9 +79,8 @@ namespace basegfx B2DPoint aCenter(0.5, 0.5); aCenter *= o_rGradientInfo.maTextureTransform; - o_rGradientInfo.maTextureTransform.translate(-aCenter.getX(), -aCenter.getY()); - o_rGradientInfo.maTextureTransform.rotate(fAngle); - o_rGradientInfo.maTextureTransform.translate(aCenter.getX(), aCenter.getY()); + o_rGradientInfo.maTextureTransform = basegfx::tools::createRotateAroundPoint(aCenter, fAngle) + * o_rGradientInfo.maTextureTransform; } // add object translate @@ -158,9 +157,8 @@ namespace basegfx B2DPoint aCenter(0.5, 0.5); aCenter *= o_rGradientInfo.maTextureTransform; - o_rGradientInfo.maTextureTransform.translate(-aCenter.getX(), -aCenter.getY()); - o_rGradientInfo.maTextureTransform.rotate(fAngle); - o_rGradientInfo.maTextureTransform.translate(aCenter.getX(), aCenter.getY()); + o_rGradientInfo.maTextureTransform = basegfx::tools::createRotateAroundPoint(aCenter, fAngle) + * o_rGradientInfo.maTextureTransform; } } @@ -232,9 +230,8 @@ namespace basegfx B2DPoint aCenter(0.5, 0.5); aCenter *= o_rGradientInfo.maTextureTransform; - o_rGradientInfo.maTextureTransform.translate(-aCenter.getX(), -aCenter.getY()); - o_rGradientInfo.maTextureTransform.rotate(fAngle); - o_rGradientInfo.maTextureTransform.translate(aCenter.getX(), aCenter.getY()); + o_rGradientInfo.maTextureTransform = basegfx::tools::createRotateAroundPoint(aCenter, fAngle) + * o_rGradientInfo.maTextureTransform; } // add defined offsets after rotation diff --git a/basegfx/source/tools/unopolypolygon.cxx b/basegfx/source/tools/unopolypolygon.cxx index 6d8fcd83edb0..05dbe5b1c823 100755 --- a/basegfx/source/tools/unopolypolygon.cxx +++ b/basegfx/source/tools/unopolypolygon.cxx @@ -44,8 +44,8 @@ #include #include #include - #include +#include using namespace ::com::sun::star; @@ -138,9 +138,7 @@ namespace unotools if( !aOffset.equalZero() ) { - B2DHomMatrix aTranslate; - aTranslate.translate( aOffset.getX(), aOffset.getY() ); - + const B2DHomMatrix aTranslate(tools::createTranslateB2DHomMatrix(aOffset)); aSrcPoly.transform( aTranslate ); } diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx index 0642b6c50efb..dcb65c94ae3c 100755 --- a/canvas/source/directx/dx_canvashelper.cxx +++ b/canvas/source/directx/dx_canvashelper.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -733,10 +734,8 @@ namespace dxcanvas // add output offset if( !maOutputOffset.equalZero() ) { - ::basegfx::B2DHomMatrix aOutputOffset; - aOutputOffset.translate( maOutputOffset.getX(), - maOutputOffset.getY() ); - + const basegfx::B2DHomMatrix aOutputOffset(basegfx::tools::createTranslateB2DHomMatrix( + maOutputOffset.getX(), maOutputOffset.getY())); aTransform = aOutputOffset * aTransform; } @@ -774,10 +773,8 @@ namespace dxcanvas // add output offset if( !maOutputOffset.equalZero() ) { - ::basegfx::B2DHomMatrix aOutputOffset; - aOutputOffset.translate( maOutputOffset.getX(), - maOutputOffset.getY() ); - + const basegfx::B2DHomMatrix aOutputOffset(basegfx::tools::createTranslateB2DHomMatrix( + maOutputOffset.getX(), maOutputOffset.getY())); aTransform = aOutputOffset * aTransform; } diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx index f291d197c4de..73a2d49bfb62 100755 --- a/canvas/source/directx/dx_canvashelper_texturefill.cxx +++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx @@ -43,6 +43,7 @@ #include #include #include +#include #include @@ -452,8 +453,7 @@ namespace dxcanvas aFillBrush.SetColor( aFillColor ); const double nCurrScale( (nStepCount-i)/(double)nStepCount ); - aScaleMatrix.identity(); - aScaleMatrix.translate( -0.5, -0.5 ); + aScaleMatrix = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); // handle anisotrophic polygon scaling if( rValues.mnAspectRatio < 1.0 ) diff --git a/canvas/source/simplecanvas/simplecanvasimpl.cxx b/canvas/source/simplecanvas/simplecanvasimpl.cxx index 185979b0220e..7ca251458d22 100644 --- a/canvas/source/simplecanvas/simplecanvasimpl.cxx +++ b/canvas/source/simplecanvas/simplecanvasimpl.cxx @@ -46,6 +46,7 @@ #include #include +#include #include "canvas/canvastools.hxx" @@ -287,10 +288,7 @@ namespace ::sal_Int8 nTextDirection ) throw (uno::RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); - - basegfx::B2DHomMatrix offsetTransform; - offsetTransform.translate(aOutPos.X,aOutPos.Y); - + const basegfx::B2DHomMatrix offsetTransform(basegfx::tools::createTranslateB2DHomMatrix(aOutPos.X,aOutPos.Y)); rendering::RenderState aRenderState( createStrokingRenderState() ); tools::appendToRenderState(aRenderState, offsetTransform); @@ -305,10 +303,7 @@ namespace const geometry::RealPoint2D& aLeftTop ) throw (uno::RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); - - basegfx::B2DHomMatrix offsetTransform; - offsetTransform.translate(aLeftTop.X,aLeftTop.Y); - + const basegfx::B2DHomMatrix offsetTransform(basegfx::tools::createTranslateB2DHomMatrix(aLeftTop.X,aLeftTop.Y)); rendering::RenderState aRenderState( createStrokingRenderState() ); tools::appendToRenderState(aRenderState, offsetTransform); diff --git a/canvas/source/tools/canvastools.cxx b/canvas/source/tools/canvastools.cxx index 23d6124e4cb8..278789637c72 100644 --- a/canvas/source/tools/canvastools.cxx +++ b/canvas/source/tools/canvastools.cxx @@ -63,6 +63,7 @@ #include #include #include +#include #include #include @@ -679,9 +680,8 @@ namespace canvas i_transformation ); // now move resulting left,top point of bounds to (0,0) - ::basegfx::B2DHomMatrix aCorrectedTransform; - aCorrectedTransform.translate( -aTransformedRect.getMinX(), - -aTransformedRect.getMinY() ); + const basegfx::B2DHomMatrix aCorrectedTransform(basegfx::tools::createTranslateB2DHomMatrix( + -aTransformedRect.getMinX(), -aTransformedRect.getMinY())); // prepend to original transformation o_transform = aCorrectedTransform * i_transformation; @@ -745,9 +745,8 @@ namespace canvas transformation ); // now move resulting left,top point of bounds to (0,0) - ::basegfx::B2DHomMatrix aCorrectedTransform; - aCorrectedTransform.translate( -aTransformedRect.getMinX(), - -aTransformedRect.getMinY() ); + basegfx::B2DHomMatrix aCorrectedTransform(basegfx::tools::createTranslateB2DHomMatrix( + -aTransformedRect.getMinX(), -aTransformedRect.getMinY())); // scale to match outRect const double xDenom( aTransformedRect.getWidth() ); diff --git a/canvas/source/tools/surface.cxx b/canvas/source/tools/surface.cxx index c3161758ea3e..96162f6d78af 100644 --- a/canvas/source/tools/surface.cxx +++ b/canvas/source/tools/surface.cxx @@ -33,6 +33,7 @@ #include "surface.hxx" #include +#include #include #include @@ -150,9 +151,8 @@ namespace canvas // 4) scale to normalized device coordinates // 5) flip y-axis // 6) translate to account for viewport transform - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate(maSourceOffset.getX(), - maSourceOffset.getY()); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + maSourceOffset.getX(), maSourceOffset.getY())); aTransform = aTransform * rTransform; aTransform.translate(::basegfx::fround(rPos.getX()), ::basegfx::fround(rPos.getY())); @@ -277,8 +277,7 @@ namespace canvas // 1) offset of surface subarea // 2) surface transform // 3) translation to output position [rPos] - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate(aPos1.getX(),aPos1.getY()); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(aPos1.getX(), aPos1.getY())); aTransform = aTransform * rTransform; aTransform.translate(::basegfx::fround(rPos.getX()), ::basegfx::fround(rPos.getY())); @@ -380,7 +379,7 @@ namespace canvas // be transformed by the overall transform and uv coordinates will // be calculated from the result, and this is why we need to use // integer coordinates here... - ::basegfx::B2DHomMatrix aTransform; + basegfx::B2DHomMatrix aTransform; aTransform = aTransform * rTransform; aTransform.translate(::basegfx::fround(rPos.getX()), ::basegfx::fround(rPos.getY())); diff --git a/cppcanvas/source/mtfrenderer/bitmapaction.cxx b/cppcanvas/source/mtfrenderer/bitmapaction.cxx index 355dd336e2c5..4f54b10c4879 100644 --- a/cppcanvas/source/mtfrenderer/bitmapaction.cxx +++ b/cppcanvas/source/mtfrenderer/bitmapaction.cxx @@ -35,25 +35,21 @@ #include #include #include - #include #include #include - #include - #include #include #include #include #include - #include - #include "cachedprimitivebase.hxx" #include "bitmapaction.hxx" #include "outdevstate.hxx" #include "mtftools.hxx" +#include using namespace ::com::sun::star; @@ -112,9 +108,7 @@ namespace cppcanvas // Setup transformation such that the next render call is // moved rPoint away. - ::basegfx::B2DHomMatrix aLocalTransformation; - aLocalTransformation.translate( rDstPoint.getX(), - rDstPoint.getY() ); + const basegfx::B2DHomMatrix aLocalTransformation(basegfx::tools::createTranslateB2DHomMatrix(rDstPoint)); ::canvas::tools::appendToRenderState( maState, aLocalTransformation ); @@ -144,15 +138,12 @@ namespace cppcanvas // moved rPoint away, and scaled according to the ratio // given by src and dst size. const ::Size aBmpSize( rBmpEx.GetSizePixel() ); - ::basegfx::B2DHomMatrix aLocalTransformation; const ::basegfx::B2DVector aScale( rDstSize.getX() / aBmpSize.Width(), rDstSize.getY() / aBmpSize.Height() ); - aLocalTransformation.scale( aScale.getX(), aScale.getY() ); - aLocalTransformation.translate( rDstPoint.getX(), - rDstPoint.getY() ); - ::canvas::tools::appendToRenderState( maState, - aLocalTransformation ); + const basegfx::B2DHomMatrix aLocalTransformation(basegfx::tools::createScaleTranslateB2DHomMatrix( + aScale, rDstPoint)); + ::canvas::tools::appendToRenderState( maState, aLocalTransformation ); // correct clip (which is relative to original transform) tools::modifyClip( maState, diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index c6f9a295b332..9af540b889ea 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -34,19 +34,14 @@ #include #include #include - #include #include #include - #include - #include #include #include - #include - #include #include #include @@ -59,7 +54,6 @@ #include #include #include - #include #include #include @@ -73,7 +67,6 @@ #include #include #include - #include #include #include @@ -84,11 +77,9 @@ #include #include #include - #include #include #include - #include #include #include @@ -96,15 +87,13 @@ #include #include #include - #include #include #include - #include - #include "mtftools.hxx" #include "outdevstate.hxx" +#include using namespace ::com::sun::star; @@ -729,12 +718,11 @@ namespace cppcanvas fabs( aBounds.getHeight()*sin(nRotation) ) + fabs( aBounds.getWidth()*cos(nRotation) ))); - aTextureTransformation.scale( nScale, nScale ); - - // translate back origin to center of + // scale and translate back origin to center of // primitive - aTextureTransformation.translate( 0.5*aBounds.getWidth(), - 0.5*aBounds.getHeight() ); + aTextureTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix( + nScale, nScale, 0.5*aBounds.getWidth(), 0.5*aBounds.getHeight()) + * aTextureTransformation; } break; @@ -856,9 +844,8 @@ namespace cppcanvas aTextureTransformation.scale( nScaleX, nScaleY ); // rotate texture according to gradient rotation - aTextureTransformation.translate( -0.5*nScaleX, -0.5*nScaleY ); - aTextureTransformation.rotate( nRotation ); - aTextureTransformation.translate( 0.5*nScaleX, 0.5*nScaleY ); + aTextureTransformation = basegfx::tools::createRotateAroundPoint(0.5*nScaleX, 0.5*nScaleY, nRotation) + * aTextureTransformation; aTextureTransformation.translate( nOffsetX, nOffsetY ); } diff --git a/cppcanvas/source/mtfrenderer/mtftools.cxx b/cppcanvas/source/mtfrenderer/mtftools.cxx index e4e227955da6..b6a548aa49be 100644 --- a/cppcanvas/source/mtfrenderer/mtftools.cxx +++ b/cppcanvas/source/mtfrenderer/mtftools.cxx @@ -34,10 +34,8 @@ #include #include #include - #include #include - #include #include #include @@ -45,16 +43,15 @@ #include #include #include - #include #include #include #include #include - #include "mtftools.hxx" #include "outdevstate.hxx" #include "polypolyaction.hxx" +#include @@ -111,9 +108,9 @@ namespace cppcanvas const ::Size aSizePixel( rVDev.LogicToPixel( aSizeLogic ) ); - o_rMatrix.identity(); - o_rMatrix.scale( aSizePixel.Width() / (double)aSizeLogic.Width(), - aSizePixel.Height() / (double)aSizeLogic.Height() ); + o_rMatrix = basegfx::tools::createScaleB2DHomMatrix( + aSizePixel.Width() / (double)aSizeLogic.Width(), + aSizePixel.Height() / (double)aSizeLogic.Height() ); return o_rMatrix; } diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx index f1191e6e57f3..038b68c3008e 100644 --- a/cppcanvas/source/mtfrenderer/textaction.cxx +++ b/cppcanvas/source/mtfrenderer/textaction.cxx @@ -48,6 +48,7 @@ #include #include #include +#include #include #include @@ -93,9 +94,7 @@ namespace cppcanvas NULL, &rState.fontRotation ); - ::basegfx::B2DHomMatrix aLocalTransformation; - - aLocalTransformation.rotate( rState.fontRotation ); + basegfx::B2DHomMatrix aLocalTransformation(basegfx::tools::createRotateB2DHomMatrix(rState.fontRotation)); aLocalTransformation.translate( rStartPoint.getX(), rStartPoint.getY() ); ::canvas::tools::appendToRenderState( o_rRenderState, diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx index e0905fe1d377..8d57d56a3667 100644 --- a/vcl/aqua/source/gdi/salgdi.cxx +++ b/vcl/aqua/source/gdi/salgdi.cxx @@ -1753,9 +1753,7 @@ BOOL AquaSalGraphics::GetGlyphOutline( long nGlyphId, basegfx::B2DPolyPolygon& r GgoClosePathProc( &aGgoData ); if( mfFontScale != 1.0 ) { - basegfx::B2DHomMatrix aScale; - aScale.scale( +mfFontScale, +mfFontScale ); - rPolyPoly.transform( aScale ); + rPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix(+mfFontScale, +mfFontScale)); } return true; } diff --git a/vcl/os2/source/gdi/salgdi3.cxx b/vcl/os2/source/gdi/salgdi3.cxx index 573fa7336fb0..b25feee266e4 100644 --- a/vcl/os2/source/gdi/salgdi3.cxx +++ b/vcl/os2/source/gdi/salgdi3.cxx @@ -1361,10 +1361,8 @@ BOOL Os2SalGraphics::GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& rB // rescaling needed for the PolyPolygon conversion if( rB2DPolyPoly.count() ) { - ::basegfx::B2DHomMatrix aMatrix; - aMatrix.scale( 1.0/256, 1.0/256 ); - aMatrix.scale( mfFontScale, mfFontScale ); - rB2DPolyPoly.transform( aMatrix ); + const double fFactor((1.0/256) * mfFontScale); + rB2DPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix(fFactor, fFactor)); } return bRet; diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index b98712419cf1..9cced7de3651 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -49,6 +49,7 @@ #include #include #include +#include // ======================================================================= // @@ -1300,9 +1301,7 @@ void Region::Move( long nHorzMove, long nVertMove ) mpImplRegion->mpPolyPoly->Move( nHorzMove, nVertMove ); else if( mpImplRegion->mpB2DPolyPoly ) { - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( nHorzMove, nVertMove ); - mpImplRegion->mpB2DPolyPoly->transform( aTransform ); + mpImplRegion->mpB2DPolyPoly->transform(basegfx::tools::createTranslateB2DHomMatrix(nHorzMove, nVertMove)); } else { @@ -1343,9 +1342,7 @@ void Region::Scale( double fScaleX, double fScaleY ) mpImplRegion->mpPolyPoly->Scale( fScaleX, fScaleY ); else if( mpImplRegion->mpB2DPolyPoly ) { - ::basegfx::B2DHomMatrix aTransform; - aTransform.scale( fScaleX, fScaleY ); - mpImplRegion->mpB2DPolyPoly->transform( aTransform ); + mpImplRegion->mpB2DPolyPoly->transform(basegfx::tools::createScaleB2DHomMatrix(fScaleX, fScaleY)); } else { diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 21ac05a498fc..b69a9c365f08 100755 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #ifndef _TL_DEBUG_HXX @@ -891,10 +892,8 @@ bool SalLayout::GetOutline( SalGraphics& rSalGraphics, { if( aPos.X() || aPos.Y() ) { - ::basegfx::B2DHomMatrix aMatrix; - aMatrix.translate( aPos.X(), aPos.Y() ); - aGlyphOutline.transform( aMatrix ); - } + aGlyphOutline.transform(basegfx::tools::createTranslateB2DHomMatrix(aPos.X(), aPos.Y())); + } // insert outline at correct position rVector.push_back( aGlyphOutline ); diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx index 712c2334b35c..820f3f0d74a9 100644 --- a/vcl/source/glyphs/gcach_ftyp.cxx +++ b/vcl/source/glyphs/gcach_ftyp.cxx @@ -2280,9 +2280,7 @@ bool FreetypeServerFont::GetGlyphOutline( int nGlyphIndex, // convert to basegfx polypolygon // TODO: get rid of the intermediate tools polypolygon rB2DPolyPoly = aToolPolyPolygon.getB2DPolyPolygon(); - ::basegfx::B2DHomMatrix aMatrix; - aMatrix.scale( +1.0/(1<<6), -1.0/(1<<6) ); - rB2DPolyPoly.transform( aMatrix ); + rB2DPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix( +1.0/(1<<6), -1.0/(1<<6) )); return true; } diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx index 4d3e40840a7b..d140610f7875 100644 --- a/vcl/unx/source/gdi/salgdi.cxx +++ b/vcl/unx/source/gdi/salgdi.cxx @@ -1506,9 +1506,7 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const : && !basegfx::fTools::equalZero( rLineWidth.getY() ) ) { // prepare for createAreaGeometry() with anisotropic linewidth - basegfx::B2DHomMatrix aAnisoMatrix; - aAnisoMatrix.scale( 1.0, rLineWidth.getX() / rLineWidth.getY() ); - aPolygon.transform( aAnisoMatrix ); + aPolygon.transform(basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getX() / rLineWidth.getY())); } // AW: reSegment no longer needed; new createAreaGeometry will remove exteme positions @@ -1523,9 +1521,7 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const : && !basegfx::fTools::equalZero( rLineWidth.getX() ) ) { // postprocess createAreaGeometry() for anisotropic linewidth - basegfx::B2DHomMatrix aAnisoMatrix; - aAnisoMatrix.scale( 1.0, rLineWidth.getY() / rLineWidth.getX() ); - aPolygon.transform( aAnisoMatrix ); + aPolygon.transform(basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getY() / rLineWidth.getX())); } // temporarily adjust brush color to pen color diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index 73f4d8320acc..0da51ccc2de9 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -65,6 +65,7 @@ #include "basegfx/polygon/b2dpolygon.hxx" #include "basegfx/polygon/b2dpolypolygon.hxx" #include "basegfx/matrix/b2dhommatrix.hxx" +#include #include "sft.hxx" @@ -2480,9 +2481,8 @@ BOOL WinSalGraphics::GetGlyphOutline( long nIndex, // rescaling needed for the PolyPolygon conversion if( rB2DPolyPoly.count() ) { - ::basegfx::B2DHomMatrix aMatrix; - aMatrix.scale( mfFontScale/256, mfFontScale/256 ); - rB2DPolyPoly.transform( aMatrix ); + const double fFactor(mfFontScale/256); + rB2DPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix(fFactor, fFactor)); } return bRet; -- cgit From 602841adb34579bcc9bb1ae3ec961753b8bd97f9 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 22 Sep 2009 18:14:05 +0200 Subject: #i97509# continued matrix tooling and adapting the usages now to all the ooo code --- sd/source/core/CustomAnimationEffect.cxx | 19 ++++-------- sd/source/ui/animations/motionpathtag.cxx | 8 ++--- sd/source/ui/func/fumorph.cxx | 16 +++++----- sd/source/ui/slideshow/slideshowviewimpl.cxx | 12 +++----- sd/source/ui/slidesorter/view/SlsViewOverlay.cxx | 5 +-- sd/source/ui/view/PrintManager.cxx | 7 +++-- sd/source/ui/view/sdview.cxx | 10 +++--- .../source/engine/shapes/viewbackgroundshape.cxx | 8 ++--- slideshow/source/engine/shapes/viewshape.cxx | 6 ++-- slideshow/source/engine/slidebitmap.cxx | 5 ++- slideshow/source/engine/tools.cxx | 8 ++--- .../source/engine/transitions/barndoorwipe.cxx | 7 ++--- .../source/engine/transitions/clippingfunctor.cxx | 14 ++++----- slideshow/source/engine/transitions/clockwipe.cxx | 5 ++- .../source/engine/transitions/combtransition.cxx | 23 ++++---------- slideshow/source/engine/transitions/fanwipe.cxx | 20 +++++------- slideshow/source/engine/transitions/figurewipe.cxx | 6 ++-- .../source/engine/transitions/fourboxwipe.cxx | 20 ++++++------ slideshow/source/engine/transitions/iriswipe.cxx | 8 ++--- .../source/engine/transitions/pinwheelwipe.cxx | 11 ++----- slideshow/source/engine/transitions/randomwipe.cxx | 5 ++- .../source/engine/transitions/slidechangebase.cxx | 6 ++-- slideshow/source/engine/transitions/snakewipe.cxx | 36 +++++++++++++--------- slideshow/source/engine/transitions/spiralwipe.cxx | 7 ++--- slideshow/source/engine/transitions/sweepwipe.cxx | 21 ++++++++----- .../source/engine/transitions/transitiontools.cxx | 11 ++----- .../source/engine/transitions/waterfallwipe.cxx | 5 ++- slideshow/source/engine/transitions/zigzagwipe.cxx | 9 +++--- slideshow/test/demoshow.cxx | 9 ++---- 29 files changed, 147 insertions(+), 180 deletions(-) diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 23a04bf9d5ee..040bc7c0a78c 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -69,6 +69,7 @@ #include #include #include +#include #include @@ -1715,21 +1716,16 @@ void CustomAnimationEffect::updateSdrPathObjFromPath( SdrPathObj& rPathObj ) SdrObject* pObj = GetSdrObjectFromXShape( getTargetShape() ); if( pObj ) { - ::basegfx::B2DHomMatrix aTransform; - SdrPage* pPage = pObj->GetPage(); if( pPage ) { const Size aPageSize( pPage->GetSize() ); - aTransform.scale( (double)aPageSize.Width(), (double)aPageSize.Height() ); - xPolyPoly.transform( aTransform ); - aTransform.identity(); + xPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix((double)aPageSize.Width(), (double)aPageSize.Height())); } const Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); const Point aCenter( aBoundRect.Center() ); - aTransform.translate( aCenter.X(), aCenter.Y() ); - xPolyPoly.transform( aTransform ); + xPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(aCenter.X(), aCenter.Y())); } } @@ -1748,17 +1744,14 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj const Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); const Point aCenter( aBoundRect.Center() ); - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( -aCenter.X(), -aCenter.Y() ); - xPolyPoly.transform( aTransform ); + xPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(-aCenter.X(), -aCenter.Y())); SdrPage* pPage = pObj->GetPage(); if( pPage ) { - aTransform.identity(); const Size aPageSize( pPage->GetSize() ); - aTransform.scale( 1.0 / (double)aPageSize.Width(), 1.0 / (double)aPageSize.Height() ); - xPolyPoly.transform( aTransform ); + xPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix( + 1.0 / (double)aPageSize.Width(), 1.0 / (double)aPageSize.Height())); } } diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index 887c6014f29c..4fc0ec0dc80e 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -36,6 +36,7 @@ #include #include +#include #include #include @@ -196,9 +197,8 @@ bool PathDragResize::EndSdrDrag(bool /*bCopy*/) SdrPathObj* pPathObj = mxTag->getPathObj(); if( pPathObj ) { - basegfx::B2DHomMatrix aTrans; const Point aRef( DragStat().Ref1() ); - aTrans.translate(-aRef.X(), -aRef.Y()); + basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-aRef.X(), -aRef.Y())); aTrans.scale(double(aXFact), double(aYFact)); aTrans.translate(aRef.X(), aRef.Y()); basegfx::B2DPolyPolygon aDragPoly(pPathObj->GetPathPoly()); @@ -966,8 +966,8 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList ) ::com::sun::star::awt::Point aPos( mxOrigin->getPosition() ); if( (aPos.X != maOriginPos.X) || (aPos.Y != maOriginPos.Y) ) { - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( aPos.X - maOriginPos.X, aPos.Y - maOriginPos.Y ); + const basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + aPos.X - maOriginPos.X, aPos.Y - maOriginPos.Y)); mxPolyPoly.transform( aTransform ); mpPathObj->SetPathPoly( mxPolyPoly ); maOriginPos = aPos; diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx index 83851db28cae..db1dc120e478 100644 --- a/sd/source/ui/func/fumorph.cxx +++ b/sd/source/ui/func/fumorph.cxx @@ -42,13 +42,13 @@ #include #include - #include "View.hxx" #include "ViewShell.hxx" #include "Window.hxx" #include #include #include +#include #include "strings.hrc" #include "sdresid.hxx" @@ -264,9 +264,8 @@ void FuMorph::ImpEqualizePolyPointCount(::basegfx::B2DPolygon& rSmall, const ::b const ::basegfx::B2DPoint aSrcPos(aSrcSize.getCenter()); const ::basegfx::B2DRange aDstSize(::basegfx::tools::getRange(rSmall)); const ::basegfx::B2DPoint aDstPos(aDstSize.getCenter()); - ::basegfx::B2DHomMatrix aTrans; - aTrans.translate(-aSrcPos.getX(), -aSrcPos.getY()); + basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-aSrcPos.getX(), -aSrcPos.getY())); aTrans.scale(aDstSize.getWidth() / aSrcSize.getWidth(), aDstSize.getHeight() / aSrcSize.getHeight()); aTrans.translate(aDstPos.getX(), aDstPos.getY()); @@ -499,16 +498,15 @@ sal_Bool FuMorph::ImpMorphPolygons( for(sal_uInt16 i(0); i < nSteps; i++) { fValue += fFactor; - ::basegfx::B2DPolyPolygon* pNewPolyPoly3D = ImpCreateMorphedPolygon(rPolyPoly1, rPolyPoly2, fValue); + ::basegfx::B2DPolyPolygon* pNewPolyPoly2D = ImpCreateMorphedPolygon(rPolyPoly1, rPolyPoly2, fValue); - const ::basegfx::B2DRange aNewPolySize(::basegfx::tools::getRange(*pNewPolyPoly3D)); + const ::basegfx::B2DRange aNewPolySize(::basegfx::tools::getRange(*pNewPolyPoly2D)); const ::basegfx::B2DPoint aNewS(aNewPolySize.getCenter()); const ::basegfx::B2DPoint aRealS(aStartCenter + (aDelta * fValue)); - ::basegfx::B2DHomMatrix aTrans; const ::basegfx::B2DPoint aDiff(aRealS - aNewS); - aTrans.translate(aDiff.getX(), aDiff.getY()); - pNewPolyPoly3D->transform(aTrans); - rPolyPolyList3D.Insert(pNewPolyPoly3D, LIST_APPEND); + + pNewPolyPoly2D->transform(basegfx::tools::createTranslateB2DHomMatrix(aDiff)); + rPolyPolyList3D.Insert(pNewPolyPoly2D, LIST_APPEND); } } return TRUE; diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx index f4de77f03394..69190f68a0aa 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.cxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx @@ -38,6 +38,8 @@ #include #include +#include + #include #include @@ -384,16 +386,12 @@ geometry::AffineMatrix2D SAL_CALL SlideShowView::getTransformation( ) throw (Ru Point aOutputOffset( ( aWindowSize.Width() - aOutputSize.Width() ) >> 1, ( aWindowSize.Height() - aOutputSize.Height() ) >> 1 ); - ::basegfx::B2DHomMatrix aMatrix; - maPresentationArea = Rectangle( aOutputOffset, aOutputSize ); mrOutputWindow.SetPresentationArea( maPresentationArea ); - // scale presentation into available window rect (minus 10%) - aMatrix.scale( aOutputSize.Width(), aOutputSize.Height() ); - - // center in the window - aMatrix.translate( aOutputOffset.X(), aOutputOffset.Y() ); + // scale presentation into available window rect (minus 10%); center in the window + const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix( + aOutputSize.Width(), aOutputSize.Height(), aOutputOffset.X(), aOutputOffset.Y())); geometry::AffineMatrix2D aRes; diff --git a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx b/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx index 5e338480e236..7d9887d9b8b1 100644 --- a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx +++ b/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx @@ -55,6 +55,8 @@ #include #include #include +#include + #include #include #include @@ -245,8 +247,7 @@ void SubstitutionOverlay::Clear (void) void SubstitutionOverlay::Move (const Point& rOffset) { - basegfx::B2DHomMatrix aTranslation; - aTranslation.translate(rOffset.X(), rOffset.Y()); + const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createTranslateB2DHomMatrix(rOffset.X(), rOffset.Y())); maShapes.transform(aTranslation); maPosition += rOffset; diff --git a/sd/source/ui/view/PrintManager.cxx b/sd/source/ui/view/PrintManager.cxx index 34e3c780d14e..667ef7419cbc 100644 --- a/sd/source/ui/view/PrintManager.cxx +++ b/sd/source/ui/view/PrintManager.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include "PrintManager.hxx" @@ -1775,10 +1776,10 @@ void PrintManager::InitHandoutTemplate( PrintInfo& /*rInfo*/, USHORT nSlidesPerH aPoly.insert(0, basegfx::B2DPoint( aRect.Left(), aRect.Top() ) ); aPoly.insert(1, basegfx::B2DPoint( aRect.Right(), aRect.Top() ) ); - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate( 0.0, static_cast< double >( aRect.GetHeight() / 7 ) ); - + const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix( + 0.0, static_cast< double >( aRect.GetHeight() / 7 ))); basegfx::B2DPolyPolygon aPathPoly; + for( sal_uInt16 nLine = 0; nLine < 7; nLine++ ) { aPoly.transform( aMatrix ); diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 9a63afc03479..a387e7b6450d 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -99,6 +99,7 @@ #include #include #include +#include #include @@ -454,12 +455,9 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP false)); // fill text matrix - basegfx::B2DHomMatrix aTextMatrix; - - aTextMatrix.scale(aSize.getX(), aSize.getY()); - aTextMatrix.shearX(fShearX); - aTextMatrix.rotate(fRotate); - aTextMatrix.translate(fPosX, fPosY); + const basegfx::B2DHomMatrix aTextMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aSize.getX(), aSize.getY(), + fShearX, fRotate, fPosX, fPosY)); // create DXTextArray (can be empty one) const ::std::vector< double > aDXArray; diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.cxx b/slideshow/source/engine/shapes/viewbackgroundshape.cxx index 8e6db547cb85..5826f752cbec 100644 --- a/slideshow/source/engine/shapes/viewbackgroundshape.cxx +++ b/slideshow/source/engine/shapes/viewbackgroundshape.cxx @@ -48,6 +48,7 @@ #include #include #include +#include #include @@ -120,10 +121,9 @@ namespace slideshow aLinearTransform.set( 1, 2, 0.0 ); pBitmapCanvas->setTransformation( aLinearTransform ); - ::basegfx::B2DHomMatrix aShapeTransform; - - aShapeTransform.scale( maBounds.getWidth(), maBounds.getHeight() ); - aShapeTransform.translate( maBounds.getMinX(), maBounds.getMinY() ); + const basegfx::B2DHomMatrix aShapeTransform(basegfx::tools::createScaleTranslateB2DHomMatrix( + maBounds.getWidth(), maBounds.getHeight(), + maBounds.getMinX(), maBounds.getMinY())); ::cppcanvas::RendererSharedPtr pRenderer( ::cppcanvas::VCLFactory::getInstance().createRenderer( diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index fb2246309343..4e9c255c86ea 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -51,6 +51,7 @@ #include #include #include +#include #include #include @@ -713,9 +714,8 @@ namespace slideshow aBitmapTransform.invert(); - ::basegfx::B2DHomMatrix aTranslation; - aTranslation.translate( aTmpRect.getMinX(), - aTmpRect.getMinY() ); + const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createTranslateB2DHomMatrix( + aTmpRect.getMinX(), aTmpRect.getMinY())); aBitmapTransform = aBitmapTransform * aTranslation; pBitmap->setTransformation( aBitmapTransform ); diff --git a/slideshow/source/engine/slidebitmap.cxx b/slideshow/source/engine/slidebitmap.cxx index 9cc6f042cdb2..c06cc0786865 100644 --- a/slideshow/source/engine/slidebitmap.cxx +++ b/slideshow/source/engine/slidebitmap.cxx @@ -42,6 +42,7 @@ #include #include +#include #include #include @@ -78,9 +79,7 @@ namespace slideshow rendering::RenderState aRenderState; ::canvas::tools::initRenderState( aRenderState ); - ::basegfx::B2DHomMatrix aTranslation; - aTranslation.translate( maOutputPos.getX(), - maOutputPos.getY() ); + const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createTranslateB2DHomMatrix(maOutputPos)); ::canvas::tools::setRenderStateTransform( aRenderState, aTranslation ); try diff --git a/slideshow/source/engine/tools.cxx b/slideshow/source/engine/tools.cxx index b2c179647db3..136e70743916 100644 --- a/slideshow/source/engine/tools.cxx +++ b/slideshow/source/engine/tools.cxx @@ -51,6 +51,7 @@ #include #include #include +#include #include @@ -524,10 +525,9 @@ namespace slideshow { if( !pAttr ) { - ::basegfx::B2DHomMatrix aTransform; - - aTransform.scale( rShapeBounds.getWidth(), rShapeBounds.getHeight() ); - aTransform.translate( rShapeBounds.getMinX(), rShapeBounds.getMinY() ); + const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix( + rShapeBounds.getWidth(), rShapeBounds.getHeight(), + rShapeBounds.getMinX(), rShapeBounds.getMinY())); return aTransform; } diff --git a/slideshow/source/engine/transitions/barndoorwipe.cxx b/slideshow/source/engine/transitions/barndoorwipe.cxx index fb9388ff9ee8..be226c2c560d 100644 --- a/slideshow/source/engine/transitions/barndoorwipe.cxx +++ b/slideshow/source/engine/transitions/barndoorwipe.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include "barndoorwipe.hxx" @@ -45,8 +46,7 @@ namespace internal { if (m_doubled) t /= 2.0; - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( -0.5, -0.5 ); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); aTransform.scale( ::basegfx::pruneScaleValue(t), 1.0 ); aTransform.translate( 0.5, 0.5 ); ::basegfx::B2DPolygon poly( m_unitRect ); @@ -54,8 +54,7 @@ namespace internal { ::basegfx::B2DPolyPolygon res(poly); if (m_doubled) { - aTransform.identity(); - aTransform.translate( -0.5, -0.5 ); + aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); aTransform.rotate( M_PI_2 ); aTransform.translate( 0.5, 0.5 ); poly.transform( aTransform ); diff --git a/slideshow/source/engine/transitions/clippingfunctor.cxx b/slideshow/source/engine/transitions/clippingfunctor.cxx index 97bb7fbd688f..58a50815b3ce 100644 --- a/slideshow/source/engine/transitions/clippingfunctor.cxx +++ b/slideshow/source/engine/transitions/clippingfunctor.cxx @@ -40,6 +40,7 @@ #include #include #include +#include namespace slideshow { @@ -134,20 +135,19 @@ namespace slideshow break; case TransitionInfo::REVERSEMETHOD_ROTATE_180: - maStaticTransformation.translate( -0.5, -0.5 ); - maStaticTransformation.rotate( M_PI ); - maStaticTransformation.translate( 0.5, 0.5 ); + maStaticTransformation = basegfx::tools::createRotateAroundPoint(0.5, 0.5, M_PI) + * maStaticTransformation; break; case TransitionInfo::REVERSEMETHOD_FLIP_X: - maStaticTransformation.scale( -1.0, 1.0 ); - maStaticTransformation.translate( 1.0, 0.0 ); + maStaticTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix(-1.0, 1.0, 1.0, 0.0) + * maStaticTransformation; mbFlip = true; break; case TransitionInfo::REVERSEMETHOD_FLIP_Y: - maStaticTransformation.scale( 1.0, -1.0 ); - maStaticTransformation.translate( 0.0, 1.0 ); + maStaticTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix(1.0, -1.0, 0.0, 1.0) + * maStaticTransformation; mbFlip = true; break; } diff --git a/slideshow/source/engine/transitions/clockwipe.cxx b/slideshow/source/engine/transitions/clockwipe.cxx index 16088f1954d0..5beef1efcbd9 100644 --- a/slideshow/source/engine/transitions/clockwipe.cxx +++ b/slideshow/source/engine/transitions/clockwipe.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include "clockwipe.hxx" @@ -66,9 +67,7 @@ namespace internal { ::basegfx::B2DPolyPolygon ClockWipe::operator () ( double t ) { - ::basegfx::B2DHomMatrix aTransform; - aTransform.scale( 0.5, 0.5 ); - aTransform.translate( 0.5, 0.5 ); + const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); ::basegfx::B2DPolygon poly( calcCenteredClock(t) ); poly.transform( aTransform ); return ::basegfx::B2DPolyPolygon(poly); diff --git a/slideshow/source/engine/transitions/combtransition.cxx b/slideshow/source/engine/transitions/combtransition.cxx index a222592b7d8d..93238162cadb 100644 --- a/slideshow/source/engine/transitions/combtransition.cxx +++ b/slideshow/source/engine/transitions/combtransition.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include @@ -70,11 +71,7 @@ basegfx::B2DPolyPolygon createClipPolygon( // rotate polygons, such that the strips are parallel to // the given direction vector const ::basegfx::B2DVector aUpVec(0.0, 1.0); - ::basegfx::B2DHomMatrix aMatrix; - - aMatrix.translate( -0.5, -0.5 ); - aMatrix.rotate( aUpVec.angle( rDirection ) ); - aMatrix.translate( 0.5, 0.5 ); + basegfx::B2DHomMatrix aMatrix(basegfx::tools::createRotateAroundPoint(0.5, 0.5, aUpVec.angle( rDirection ))); // blow up clip polygon to slide size aMatrix.scale( rSlideSize.getX(), @@ -129,7 +126,6 @@ void CombTransition::renderComb( double t, // change transformation on cloned canvas to be in // device pixel cppcanvas::CanvasSharedPtr pCanvas( pCanvas_->clone() ); - basegfx::B2DHomMatrix transform; basegfx::B2DPoint p; // TODO(Q2): Use basegfx bitmaps here @@ -156,17 +152,14 @@ void CombTransition::renderComb( double t, pLeavingBitmap->clip( aClipPolygon1 ); // don't modify bitmap object (no move!): p = basegfx::B2DPoint( pageOrigin + (t * aPushDirection) ); - transform.translate( p.getX(), p.getY() ); - pCanvas->setTransformation( transform ); + pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); pLeavingBitmap->draw( pCanvas ); // render even strips: pLeavingBitmap->clip( aClipPolygon2 ); // don't modify bitmap object (no move!): - transform.identity(); p = basegfx::B2DPoint( pageOrigin - (t * aPushDirection) ); - transform.translate( p.getX(), p.getY() ); - pCanvas->setTransformation( transform ); + pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); pLeavingBitmap->draw( pCanvas ); } @@ -176,19 +169,15 @@ void CombTransition::renderComb( double t, // render odd strips: pEnteringBitmap->clip( aClipPolygon1 ); // don't modify bitmap object (no move!): - transform.identity(); p = basegfx::B2DPoint( pageOrigin + ((t - 1.0) * aPushDirection) ); - transform.translate( p.getX(), p.getY() ); - pCanvas->setTransformation( transform ); + pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); pEnteringBitmap->draw( pCanvas ); // render even strips: pEnteringBitmap->clip( aClipPolygon2 ); // don't modify bitmap object (no move!): - transform.identity(); p = basegfx::B2DPoint( pageOrigin + ((1.0 - t) * aPushDirection) ); - transform.translate( p.getX(), p.getY() ); - pCanvas->setTransformation( transform ); + pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); pEnteringBitmap->draw( pCanvas ); } diff --git a/slideshow/source/engine/transitions/fanwipe.cxx b/slideshow/source/engine/transitions/fanwipe.cxx index 286d2a6b57de..220aa108c3f6 100644 --- a/slideshow/source/engine/transitions/fanwipe.cxx +++ b/slideshow/source/engine/transitions/fanwipe.cxx @@ -33,6 +33,7 @@ #include #include +#include #include "transitiontools.hxx" #include "clockwipe.hxx" #include "fanwipe.hxx" @@ -50,26 +51,21 @@ namespace internal { res.append( poly ); // flip on y-axis: - ::basegfx::B2DHomMatrix aTransform; - aTransform.scale( -1.0, 1.0 ); - poly.transform( aTransform ); + poly.transform(basegfx::tools::createScaleB2DHomMatrix(-1.0, 1.0)); poly.flip(); res.append( poly ); - aTransform.identity(); - if (m_center) { - aTransform.scale( 0.5, 0.5 ); - aTransform.translate( 0.5, 0.5 ); - res.transform( aTransform ); + if (m_center) + { + res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); if (! m_single) res.append( flipOnXAxis(res) ); } - else { + else + { OSL_ASSERT( ! m_fanIn ); - aTransform.scale( 0.5, 1.0 ); - aTransform.translate( 0.5, 1.0 ); - res.transform( aTransform ); + res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 1.0, 0.5, 1.0)); } return res; } diff --git a/slideshow/source/engine/transitions/figurewipe.cxx b/slideshow/source/engine/transitions/figurewipe.cxx index d4f4a2d2fe52..9c0576905877 100644 --- a/slideshow/source/engine/transitions/figurewipe.cxx +++ b/slideshow/source/engine/transitions/figurewipe.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include "transitiontools.hxx" #include "figurewipe.hxx" @@ -45,10 +46,7 @@ namespace internal { ::basegfx::B2DPolyPolygon FigureWipe::operator () ( double t ) { ::basegfx::B2DPolyPolygon res(m_figure); - ::basegfx::B2DHomMatrix aTransform; - aTransform.scale( t, t ); - aTransform.translate( 0.5, 0.5 ); - res.transform( aTransform ); + res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(t, t, 0.5, 0.5)); return res; } diff --git a/slideshow/source/engine/transitions/fourboxwipe.cxx b/slideshow/source/engine/transitions/fourboxwipe.cxx index 61793eaa5a6b..96895cf44b10 100644 --- a/slideshow/source/engine/transitions/fourboxwipe.cxx +++ b/slideshow/source/engine/transitions/fourboxwipe.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include "fourboxwipe.hxx" @@ -45,13 +46,15 @@ namespace internal { { ::basegfx::B2DHomMatrix aTransform; const double d = ::basegfx::pruneScaleValue( t / 2.0 ); - if (m_cornersOut) { - aTransform.translate( -0.5, -0.5 ); - aTransform.scale( d, d ); - aTransform.translate( -0.25, -0.25 ); - } else { - aTransform.scale( d, d ); - aTransform.translate( -0.5, -0.5 ); + if (m_cornersOut) + { + aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); + aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(d, d, -0.25, -0.25) + * aTransform; + } + else + { + aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(d, d, -0.5, -0.5); } // top left: @@ -76,8 +79,7 @@ namespace internal { square4.flip(); // flip direction res.append( square4 ); - aTransform.identity(); - aTransform.translate( 0.5, 0.5 ); + aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.5, 0.5); res.transform( aTransform ); return res; } diff --git a/slideshow/source/engine/transitions/iriswipe.cxx b/slideshow/source/engine/transitions/iriswipe.cxx index 757108ada909..e58a8363e3f8 100644 --- a/slideshow/source/engine/transitions/iriswipe.cxx +++ b/slideshow/source/engine/transitions/iriswipe.cxx @@ -33,6 +33,7 @@ #include #include +#include #include "iriswipe.hxx" @@ -41,11 +42,10 @@ namespace internal { ::basegfx::B2DPolyPolygon IrisWipe::operator () ( double t ) { - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( -0.5, -0.5 ); const double d = ::basegfx::pruneScaleValue(t); - aTransform.scale( d, d ); - aTransform.translate( 0.5, 0.5 ); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); + aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(d, d, 0.5, 0.5) * aTransform; + ::basegfx::B2DPolyPolygon res( m_unitRect ); res.transform( aTransform ); return res; diff --git a/slideshow/source/engine/transitions/pinwheelwipe.cxx b/slideshow/source/engine/transitions/pinwheelwipe.cxx index 7e0ec35dff21..d959abb72a4d 100644 --- a/slideshow/source/engine/transitions/pinwheelwipe.cxx +++ b/slideshow/source/engine/transitions/pinwheelwipe.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include "clockwipe.hxx" #include "pinwheelwipe.hxx" @@ -43,23 +44,17 @@ namespace internal { ::basegfx::B2DPolyPolygon PinWheelWipe::operator () ( double t ) { - ::basegfx::B2DHomMatrix aTransform; ::basegfx::B2DPolygon poly( ClockWipe::calcCenteredClock( t / m_blades, 2.0 /* max edge when rotating */ ) ); ::basegfx::B2DPolyPolygon res; for ( sal_Int32 i = m_blades; i--; ) { - aTransform.identity(); - aTransform.rotate( (i * 2.0 * M_PI) / m_blades ); ::basegfx::B2DPolygon p(poly); - p.transform( aTransform ); + p.transform(basegfx::tools::createRotateB2DHomMatrix((i * 2.0 * M_PI) / m_blades)); res.append( p ); } - aTransform.identity(); - aTransform.scale( 0.5, 0.5 ); - aTransform.translate( 0.5, 0.5 ); - res.transform( aTransform ); + res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); return res; } diff --git a/slideshow/source/engine/transitions/randomwipe.cxx b/slideshow/source/engine/transitions/randomwipe.cxx index 94d73d613845..875ec1b3daa0 100644 --- a/slideshow/source/engine/transitions/randomwipe.cxx +++ b/slideshow/source/engine/transitions/randomwipe.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include "randomwipe.hxx" #include "tools.hxx" @@ -85,11 +86,9 @@ RandomWipe::RandomWipe( sal_Int32 nElements, bool randomBars ) ::basegfx::B2DPolyPolygon res; for ( sal_Int32 pos = static_cast(t * m_nElements); pos--; ) { - ::basegfx::B2DHomMatrix aTransform; ::basegfx::B2DPoint const & point = m_positions[ pos ]; - aTransform.translate( point.getX(), point.getY() ); ::basegfx::B2DPolygon poly( m_rect ); - poly.transform( aTransform ); + poly.transform(basegfx::tools::createTranslateB2DHomMatrix(point.getX(), point.getY())); res.append( poly ); } return res; diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx index c8b5cc4a4970..d855b7114ec6 100644 --- a/slideshow/source/engine/transitions/slidechangebase.cxx +++ b/slideshow/source/engine/transitions/slidechangebase.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include "slidechangebase.hxx" @@ -179,9 +180,10 @@ void SlideChangeBase::renderBitmap( viewTransform * basegfx::B2DPoint() ); const cppcanvas::CanvasSharedPtr pDevicePixelCanvas( pCanvas->clone() ); - basegfx::B2DHomMatrix transform; + // render at output position, don't modify bitmap object (no move!): - transform.translate( pageOrigin.getX(), pageOrigin.getY() ); + const basegfx::B2DHomMatrix transform(basegfx::tools::createTranslateB2DHomMatrix( + pageOrigin.getX(), pageOrigin.getY())); pDevicePixelCanvas->setTransformation( transform ); pSlideBitmap->draw( pDevicePixelCanvas ); diff --git a/slideshow/source/engine/transitions/snakewipe.cxx b/slideshow/source/engine/transitions/snakewipe.cxx index 496eaa559a6a..a8050a1b0e9a 100644 --- a/slideshow/source/engine/transitions/snakewipe.cxx +++ b/slideshow/source/engine/transitions/snakewipe.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include "snakewipe.hxx" #include "transitiontools.hxx" @@ -121,16 +122,20 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) poly.append( ::basegfx::B2DPoint( len + a, 0.0 ) ); poly.setClosed(true); ::basegfx::B2DHomMatrix aTransform; - if ((static_cast(sqrtArea2) & 1) == 1) { + + if ((static_cast(sqrtArea2) & 1) == 1) + { // odd line - aTransform.rotate( M_PI_2 + M_PI_4 ); - aTransform.translate( edge + m_elementEdge, 0.0 ); + aTransform = basegfx::tools::createRotateB2DHomMatrix(M_PI_2 + M_PI_4); + aTransform.translate(edge + m_elementEdge, 0.0); } - else { - aTransform.translate( -a, 0.0 ); + else + { + aTransform = basegfx::tools::createTranslateB2DHomMatrix(-a, 0.0); aTransform.rotate( -M_PI_4 ); aTransform.translate( 0.0, edge ); } + poly.transform( aTransform ); res.append(poly); } @@ -161,14 +166,17 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) poly.append( ::basegfx::B2DPoint( len + a, 0.0 ) ); poly.setClosed(true); ::basegfx::B2DHomMatrix aTransform; - if ((static_cast(sqrtArea2) & 1) == 1) { + + if ((static_cast(sqrtArea2) & 1) == 1) + { // odd line - aTransform.translate( 0.0, -height ); + aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.0, -height); aTransform.rotate( M_PI_2 + M_PI_4 ); aTransform.translate( 1.0, edge ); } - else { - aTransform.rotate( -M_PI_4 ); + else + { + aTransform = basegfx::tools::createRotateB2DHomMatrix(-M_PI_4); aTransform.translate( edge, 1.0 ); } poly.transform( aTransform ); @@ -205,17 +213,16 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) ::basegfx::B2DPolyPolygon half( calcHalfDiagonalSnake( t, false /* out */ ) ); // flip on x axis and rotate 90 degrees: - ::basegfx::B2DHomMatrix aTransform; - aTransform.scale( 1.0, -1.0 ); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleB2DHomMatrix(1.0, -1.0)); aTransform.translate( -0.5, 0.5 ); aTransform.rotate( M_PI_2 ); aTransform.translate( 0.5, 0.5 ); half.transform( aTransform ); half.flip(); res.append( half ); + // rotate 180 degrees: - aTransform.identity(); - aTransform.translate( -0.5, -0.5 ); + aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); aTransform.rotate( M_PI ); aTransform.translate( 0.5, 0.5 ); half.transform( aTransform ); @@ -225,8 +232,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) { ::basegfx::B2DPolyPolygon half( calcSnake( t / 2.0 ) ); // rotate 90 degrees: - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( -0.5, -0.5 ); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); aTransform.rotate( M_PI_2 ); aTransform.translate( 0.5, 0.5 ); half.transform( aTransform ); diff --git a/slideshow/source/engine/transitions/spiralwipe.cxx b/slideshow/source/engine/transitions/spiralwipe.cxx index f02c360a2628..5b8463ad9eea 100644 --- a/slideshow/source/engine/transitions/spiralwipe.cxx +++ b/slideshow/source/engine/transitions/spiralwipe.cxx @@ -38,6 +38,7 @@ #include #include #include +#include namespace slideshow { @@ -57,8 +58,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis ) const double e = (sqrt(area) / 2.0); const sal_Int32 edge = (static_cast(e) * 2); - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( -0.5, -0.5 ); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); const double edge_ = ::basegfx::pruneScaleValue( static_cast(edge) / m_sqrtElements ); aTransform.scale( edge_, edge_ ); @@ -75,8 +75,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis ) const sal_Int32 alen = (len > edge1 ? edge1 : len); len -= alen; poly = createUnitRect(); - aTransform.identity(); - aTransform.scale( + aTransform = basegfx::tools::createScaleB2DHomMatrix( ::basegfx::pruneScaleValue( static_cast(alen) / m_sqrtElements ), ::basegfx::pruneScaleValue( 1.0 / m_sqrtElements ) ); aTransform.translate( diff --git a/slideshow/source/engine/transitions/sweepwipe.cxx b/slideshow/source/engine/transitions/sweepwipe.cxx index 17a3d8933797..ae6bd8a21f82 100644 --- a/slideshow/source/engine/transitions/sweepwipe.cxx +++ b/slideshow/source/engine/transitions/sweepwipe.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include "clockwipe.hxx" #include "sweepwipe.hxx" #include "transitiontools.hxx" @@ -52,22 +53,26 @@ namespace internal { ::basegfx::B2DPolygon poly( ClockWipe::calcCenteredClock( 0.25 + t ) ); ::basegfx::B2DHomMatrix aTransform; - if (m_center) { - aTransform.translate( 0.5, 0.0 ); + + if (m_center) + { + aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.5, 0.0); poly.transform( aTransform ); } ::basegfx::B2DPolyPolygon res(poly); - if (! m_single) { - aTransform.identity(); - if (m_oppositeVertical) { - aTransform.scale( 1.0, -1.0 ); + if (! m_single) + { + if (m_oppositeVertical) + { + aTransform = basegfx::tools::createScaleB2DHomMatrix(1.0, -1.0); aTransform.translate( 0.0, 1.0 ); poly.transform( aTransform ); poly.flip(); } - else { - aTransform.translate( -0.5, -0.5 ); + else + { + aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); aTransform.rotate( M_PI ); aTransform.translate( 0.5, 0.5 ); poly.transform( aTransform ); diff --git a/slideshow/source/engine/transitions/transitiontools.cxx b/slideshow/source/engine/transitions/transitiontools.cxx index 6197e24514e0..c09bd12ef43d 100644 --- a/slideshow/source/engine/transitions/transitiontools.cxx +++ b/slideshow/source/engine/transitions/transitiontools.cxx @@ -36,6 +36,7 @@ #include #include #include +#include namespace slideshow { @@ -53,10 +54,7 @@ namespace internal { ::basegfx::B2DPolyPolygon const & polypoly ) { ::basegfx::B2DPolyPolygon res(polypoly); - ::basegfx::B2DHomMatrix aTransform; - aTransform.scale( -1.0, 1.0 ); - aTransform.translate( 1.0, 0.0 ); - res.transform( aTransform ); + res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(-1.0, 1.0, 1.0, 0.0)); res.flip(); return res; } @@ -65,10 +63,7 @@ namespace internal { ::basegfx::B2DPolyPolygon const & polypoly ) { ::basegfx::B2DPolyPolygon res(polypoly); - ::basegfx::B2DHomMatrix aTransform; - aTransform.scale( 1.0, -1.0 ); - aTransform.translate( 0.0, 1.0 ); - res.transform( aTransform ); + res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(1.0, -1.0, 0.0, 1.0)); res.flip(); return res; } diff --git a/slideshow/source/engine/transitions/waterfallwipe.cxx b/slideshow/source/engine/transitions/waterfallwipe.cxx index 7a86edff5c67..c81cf2c68433 100644 --- a/slideshow/source/engine/transitions/waterfallwipe.cxx +++ b/slideshow/source/engine/transitions/waterfallwipe.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include "waterfallwipe.hxx" #include "transitiontools.hxx" @@ -67,9 +68,7 @@ WaterfallWipe::WaterfallWipe( sal_Int32 nElements, bool flipOnYAxis ) ::basegfx::B2DPolyPolygon WaterfallWipe::operator () ( double t ) { ::basegfx::B2DPolygon poly( m_waterfall ); - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( 0.0, ::basegfx::pruneScaleValue( 2.0 * t ) ); - poly.transform( aTransform ); + poly.transform(basegfx::tools::createTranslateB2DHomMatrix(0.0, ::basegfx::pruneScaleValue(2.0 * t))); poly.setB2DPoint( 0, ::basegfx::B2DPoint( 0.0, -1.0 ) ); poly.setB2DPoint( poly.count()-1, ::basegfx::B2DPoint( 1.0, -1.0 ) ); diff --git a/slideshow/source/engine/transitions/zigzagwipe.cxx b/slideshow/source/engine/transitions/zigzagwipe.cxx index edc16099f843..8fa22c15c052 100644 --- a/slideshow/source/engine/transitions/zigzagwipe.cxx +++ b/slideshow/source/engine/transitions/zigzagwipe.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include "transitiontools.hxx" #include "zigzagwipe.hxx" @@ -58,10 +59,8 @@ ZigZagWipe::ZigZagWipe( sal_Int32 nZigs ) : m_zigEdge( 1.0 / nZigs ) ::basegfx::B2DPolyPolygon ZigZagWipe::operator () ( double t ) { - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( (1.0 + m_zigEdge) * t, 0.0 ); ::basegfx::B2DPolyPolygon res(m_stdZigZag); - res.transform( aTransform ); + res.transform(basegfx::tools::createTranslateB2DHomMatrix((1.0 + m_zigEdge) * t, 0.0)); return res; } @@ -70,8 +69,8 @@ ZigZagWipe::ZigZagWipe( sal_Int32 nZigs ) : m_zigEdge( 1.0 / nZigs ) ::basegfx::B2DPolyPolygon res( createUnitRect() ); ::basegfx::B2DPolygon poly( m_stdZigZag ); poly.flip(); - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( (1.0 + m_zigEdge) * (1.0 - t) / 2.0, 0.0 ); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + (1.0 + m_zigEdge) * (1.0 - t) / 2.0, 0.0)); poly.transform( aTransform ); res.append( poly ); aTransform.scale( -1.0, 1.0 ); diff --git a/slideshow/test/demoshow.cxx b/slideshow/test/demoshow.cxx index da7b4bfe3d3a..f860644dd5ac 100644 --- a/slideshow/test/demoshow.cxx +++ b/slideshow/test/demoshow.cxx @@ -100,12 +100,9 @@ public: void resize( const ::Size& rNewSize ) { maSize = rNewSize; - maTransform.identity(); - const sal_Int32 nSize( std::min( rNewSize.Width(), - rNewSize.Height() ) - 10 ); - maTransform.scale( nSize, nSize ); - maTransform.translate( (rNewSize.Width() - nSize) / 2, - (rNewSize.Height() - nSize) / 2 ); + const sal_Int32 nSize( std::min( rNewSize.Width(), rNewSize.Height() ) - 10); + maTransform = basegfx::tools::createScaleTranslateB2DHomMatrix( + nSize, nSize, (rNewSize.Width() - nSize) / 2, (rNewSize.Height() - nSize) / 2); lang::EventObject aEvent( *this ); maTransformationListeners.notifyEach( &util::XModifyListener::modified, -- cgit From aaa083c6e2e05f697723a8ce057eb5e103e42149 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 22 Sep 2009 18:14:05 +0200 Subject: #i97509# continued matrix tooling and adapting the usages now to all the ooo code --- filter/source/flash/swfwriter.cxx | 13 +++++++++---- filter/source/flash/swfwriter1.cxx | 6 ++---- filter/source/flash/swfwriter2.cxx | 6 ++---- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx index 0ec6e6d3cb4a..968c7b513ea5 100644 --- a/filter/source/flash/swfwriter.cxx +++ b/filter/source/flash/swfwriter.cxx @@ -33,6 +33,7 @@ #include "swfwriter.hxx" #include #include +#include using namespace ::swf; using namespace ::std; @@ -248,8 +249,10 @@ void Writer::placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int mpTag->addUI16( nDepth ); // depth mpTag->addUI16( nID ); // character Id - ::basegfx::B2DHomMatrix aMatrix; // #i73264# - aMatrix.translate( _Int16(static_cast(map100thmm(x)*mnDocXScale)), _Int16(static_cast(map100thmm(y)*mnDocYScale))); + // #i73264# + const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix( + _Int16(static_cast(map100thmm(x)*mnDocXScale)), + _Int16(static_cast(map100thmm(y)*mnDocYScale)))); mpTag->addMatrix( aMatrix ); // transformation matrix if( pName ) @@ -280,8 +283,10 @@ void Writer::moveShape( sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y ) mpTag->addBits( aBits ); mpTag->addUI16( nDepth ); // depth - ::basegfx::B2DHomMatrix aMatrix; // #i73264# - aMatrix.translate( _Int16(static_cast(map100thmm(x)*mnDocXScale)), _Int16(static_cast(map100thmm(y)*mnDocYScale))); + // #i73264# + const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix( + _Int16(static_cast(map100thmm(x)*mnDocXScale)), + _Int16(static_cast(map100thmm(y)*mnDocYScale)))); mpTag->addMatrix( aMatrix ); // transformation matrix endTag(); diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 6718cc4be8be..cf5453e397d4 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -41,6 +41,7 @@ #include #include #include +#include #include @@ -640,9 +641,6 @@ void Writer::Impl_writeText( const Point& rPos, const String& rText, const sal_I // CL: This is still a hack until we figure out how to calculate a correct bound rect // for rotatet text Rectangle textBounds( 0, 0, static_cast(mnDocWidth*mnDocXScale), static_cast(mnDocHeight*mnDocYScale) ); - - ::basegfx::B2DHomMatrix m; // #i73264# - double scale = 1.0; // scale width if we have a stretched text @@ -660,7 +658,7 @@ void Writer::Impl_writeText( const Point& rPos, const String& rText, const sal_I scale = (double)n1 / (double)n2; } - m.rotate( static_cast(nOrientation) * F_PI1800 ); + basegfx::B2DHomMatrix m(basegfx::tools::createRotateB2DHomMatrix(static_cast(nOrientation) * F_PI1800)); m.translate( double(aPt.X() / scale), double(aPt.Y()) ); m.scale( scale, scale ); diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx index bbc5746cf2cd..891439668c91 100644 --- a/filter/source/flash/swfwriter2.cxx +++ b/filter/source/flash/swfwriter2.cxx @@ -32,6 +32,7 @@ #include "precompiled_filter.hxx" #include "swfwriter.hxx" #include +#include #include @@ -608,10 +609,7 @@ struct GradRecord void FillStyle::Impl_addGradient( Tag* pTag ) const { vector< struct GradRecord > aGradientRecords; - - ::basegfx::B2DHomMatrix m; // #i73264# - - m.rotate( (maGradient.GetAngle() - 900) * F_PI1800 ); + basegfx::B2DHomMatrix m(basegfx::tools::createRotateB2DHomMatrix((maGradient.GetAngle() - 900) * F_PI1800)); switch( maGradient.GetStyle() ) { -- cgit From b0a85159e5f99baee901adad447a157f65e507b4 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 22 Sep 2009 18:14:05 +0200 Subject: #i97509# continued matrix tooling and adapting the usages now to all the ooo code --- sw/source/core/draw/dcontact.cxx | 29 +++++------------------------ sw/source/core/unocore/unodraw.cxx | 15 ++++----------- 2 files changed, 9 insertions(+), 35 deletions(-) diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index aa20281038da..5d9b90a2f9e0 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -44,7 +44,6 @@ #include #include #include -// AW, OD 2004-04-30 #i28501# #include #include #include @@ -69,31 +68,17 @@ #include #include #include - -// OD 2004-02-11 #110582#-2 #include - -// OD 18.06.2003 #108784# -#include -// OD 2004-05-24 #i28701# #include #include - -// AW: For VCOfDrawVirtObj and stuff -#ifndef _SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX +#include #include -#endif - -#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSFORMPRIMITIVE2D_HXX #include -#endif - -#ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFSDROBJ_HXX #include -#endif - #include +#include + using namespace ::com::sun::star; @@ -2605,9 +2590,7 @@ void SwDrawVirtObj::RecalcBoundRect() basegfx::B2DPolyPolygon SwDrawVirtObj::TakeXorPoly() const { basegfx::B2DPolyPolygon aRetval(rRefObj.TakeXorPoly()); - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate(GetOffset().X(), GetOffset().Y()); - aRetval.transform(aMatrix); + aRetval.transform(basegfx::tools::createTranslateB2DHomMatrix(GetOffset().X(), GetOffset().Y())); return aRetval; } @@ -2615,9 +2598,7 @@ basegfx::B2DPolyPolygon SwDrawVirtObj::TakeXorPoly() const basegfx::B2DPolyPolygon SwDrawVirtObj::TakeContour() const { basegfx::B2DPolyPolygon aRetval(rRefObj.TakeContour()); - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate(GetOffset().X(), GetOffset().Y()); - aRetval.transform(aMatrix); + aRetval.transform(basegfx::tools::createTranslateB2DHomMatrix(GetOffset().X(), GetOffset().Y())); return aRetval; } diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 1989c74df6ed..c75e4b691b51 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -75,19 +75,12 @@ #include #include #include -// OD 2004-05-05 #i28701# +#include #include -// --> OD 2004-11-10 #i35007# #include -// <-- -// --> OD 2005-03-10 #i44334#, #i44681# -// --> OD 2007-01-03 #i73079# - use correct matrix type #include -// <-- -// --> OD 2009-01-16 #i59051 +#include #include -// <-- - #include #include #include @@ -2844,8 +2837,8 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition ) // apply translation difference to PolyPolygonBezier. if ( aTranslateDiff.X != 0 || aTranslateDiff.Y != 0 ) { - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate( aTranslateDiff.X, aTranslateDiff.Y ); + const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix( + aTranslateDiff.X, aTranslateDiff.Y)); const sal_Int32 nOuterSequenceCount(aConvertedPath.Coordinates.getLength()); drawing::PointSequence* pInnerSequence = aConvertedPath.Coordinates.getArray(); -- cgit From c4c61d816976edd6c68ee5d4ef3b371c53e88c43 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 22 Sep 2009 18:14:05 +0200 Subject: #i97509# continued matrix tooling and adapting the usages now to all the ooo code --- sdext/source/pdfimport/tree/pdfiprocessor.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx index 2a025430b722..997ede16f454 100644 --- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx +++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx @@ -51,6 +51,7 @@ #include #include #include +#include #include #include @@ -502,8 +503,7 @@ GraphicsContext& PDFIProcessor::getTransformGlyphContext( CharGlyph& rGlyph ) FontAttributes aFontAttrs = m_aIdToFont[ rGlyph.getGC().FontId ]; // add transformation to GC - basegfx::B2DHomMatrix aFontTransform; - aFontTransform.translate( -rRect.X1, -rRect.Y1 ); + basegfx::B2DHomMatrix aFontTransform(basegfx::tools::createTranslateB2DHomMatrix(-rRect.X1, -rRect.Y1)); aFontTransform *= aFontMatrix; aFontTransform.translate( rRect.X1, rRect.Y1 ); -- cgit From 44ca2c9d87a7686f4e88c62043f7c9c2fc06dc07 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 24 Sep 2009 12:38:31 +0200 Subject: #i105323# shadow shall not be set at 3D model objects for the generation of visualisation objects --- svx/source/customshapes/EnhancedCustomShape3d.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index 2beab9adbe7a..3bfa7afb7f6a 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -323,7 +323,13 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con Point aCenter( aSnapRect.Center() ); SfxItemSet aSet( pCustomShape->GetMergedItemSet() ); - aSet.ClearItem( SDRATTR_TEXTDIRECTION ); //SJ: vertical writing is not required, by removing this item no outliner is created + + //SJ: vertical writing is not required, by removing this item no outliner is created + aSet.ClearItem( SDRATTR_TEXTDIRECTION ); + + // For primitive rendering, shadow handling is done completely based on the geometry, so i removed it here + aSet.ClearItem(SDRATTR_SHADOW); + std::vector< E3dCompoundObject* > aPlaceholderObjectList; double fExtrusionBackward, fExtrusionForward; -- cgit From 56fba7ddfd5f3527aacd92dfac254c3312cf5f14 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 24 Sep 2009 14:07:59 +0200 Subject: #i97509# optimized createRotateAroundPoint --- basegfx/source/matrix/b2dhommatrixtools.cxx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/basegfx/source/matrix/b2dhommatrixtools.cxx b/basegfx/source/matrix/b2dhommatrixtools.cxx index c9c3180d3e4a..2c71193f6352 100644 --- a/basegfx/source/matrix/b2dhommatrixtools.cxx +++ b/basegfx/source/matrix/b2dhommatrixtools.cxx @@ -354,9 +354,18 @@ namespace basegfx if(!fTools::equalZero(fRadiant)) { - aRetval = createTranslateB2DHomMatrix(-fPointX, -fPointY); - aRetval.rotate(fRadiant); - aRetval.translate(fPointX, fPointY); + double fSin(0.0); + double fCos(1.0); + + createSinCosOrthogonal(fSin, fCos, fRadiant); + + aRetval.set3x2( + /* Row 0, Column 0 */ fCos, + /* Row 0, Column 1 */ -fSin, + /* Row 0, Column 2 */ (fPointX * (1.0 - fCos)) + (fSin * fPointY), + /* Row 1, Column 0 */ fSin, + /* Row 1, Column 1 */ fCos, + /* Row 1, Column 2 */ (fPointY * (1.0 - fCos)) - (fSin * fPointX)); } return aRetval; -- cgit From 587b6e8b1d91468a47fea62c49044ac72f2c2a01 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 24 Sep 2009 14:08:37 +0200 Subject: #i97509# corrected comment --- svx/inc/svx/sdr/contact/objectcontact.hxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/svx/inc/svx/sdr/contact/objectcontact.hxx b/svx/inc/svx/sdr/contact/objectcontact.hxx index 3990c48695a3..c0388f152643 100644 --- a/svx/inc/svx/sdr/contact/objectcontact.hxx +++ b/svx/inc/svx/sdr/contact/objectcontact.hxx @@ -90,8 +90,7 @@ namespace sdr sdr::event::TimerEventHandler* mpEventHandler; // The redirector. If set it is used to pipe all supported calls - // to the redirector. When one is set at the ViewContact too, the one at - // the ViewContact will win. + // to the redirector ViewObjectContactRedirector* mpViewObjectContactRedirector; // the Primitive2DParameters containing view information -- cgit From 6a29332498a5c01bbeddaded08395412b3da63d6 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 24 Sep 2009 14:09:17 +0200 Subject: #i105304# corrected destructors for OverlayBase derivations --- .../ui/slidesorter/inc/view/SlsViewOverlay.hxx | 3 +++ sd/source/ui/slidesorter/view/SlsViewOverlay.cxx | 31 +++++++++++++++++++--- sd/source/ui/unoidl/unopage.cxx | 17 +++++++++++- 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx b/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx index 1d99584bec4b..93798e095871 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx @@ -89,6 +89,7 @@ protected: OverlayManager. This registration is done on demand. */ void EnsureRegistration (void); + void RemoveRegistration(); }; @@ -147,6 +148,7 @@ class SelectionRectangleOverlay { public: SelectionRectangleOverlay (ViewOverlay& rViewOverlay); + virtual ~SelectionRectangleOverlay(); void Start (const Point& rAnchor); void Update (const Point& rSecondCorner); @@ -176,6 +178,7 @@ class InsertionIndicatorOverlay { public: InsertionIndicatorOverlay (ViewOverlay& rViewOverlay); + virtual ~InsertionIndicatorOverlay(); /** Given a position in model coordinates this method calculates the insertion marker both as an index in the document and as a rectangle diff --git a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx b/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx index 7d9887d9b8b1..0cad1985ce35 100644 --- a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx +++ b/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx @@ -167,9 +167,7 @@ OverlayBase::OverlayBase (ViewOverlay& rViewOverlay) OverlayBase::~OverlayBase (void) { - OverlayManager* pOverlayManager = getOverlayManager(); - if (pOverlayManager != NULL) - pOverlayManager->remove(*this); + OSL_ENSURE(!getOverlayManager(), "Please call RemoveRegistration() in the derived class; it's too late to call it in the base class since virtual methods will be missing when called in the destructor."); } @@ -188,6 +186,16 @@ void OverlayBase::EnsureRegistration (void) +void OverlayBase::RemoveRegistration() +{ + OverlayManager* pOverlayManager = getOverlayManager(); + if (pOverlayManager != NULL) + pOverlayManager->remove(*this); +} + + + + //===== SubstitutionOverlay ================================================= SubstitutionOverlay::SubstitutionOverlay (ViewOverlay& rViewOverlay) @@ -202,6 +210,7 @@ SubstitutionOverlay::SubstitutionOverlay (ViewOverlay& rViewOverlay) SubstitutionOverlay::~SubstitutionOverlay (void) { + RemoveRegistration(); } @@ -317,6 +326,13 @@ SelectionRectangleOverlay::SelectionRectangleOverlay (ViewOverlay& rViewOverlay) +SelectionRectangleOverlay::~SelectionRectangleOverlay() +{ + RemoveRegistration(); +} + + + Rectangle SelectionRectangleOverlay::GetSelectionRectangle (void) { @@ -392,6 +408,14 @@ InsertionIndicatorOverlay::InsertionIndicatorOverlay (ViewOverlay& rViewOverlay) +InsertionIndicatorOverlay::~InsertionIndicatorOverlay() +{ + RemoveRegistration(); +} + + + + void InsertionIndicatorOverlay::SetPositionAndSize (const Rectangle& aNewBoundingBox) { EnsureRegistration(); @@ -510,6 +534,7 @@ MouseOverIndicatorOverlay::MouseOverIndicatorOverlay (ViewOverlay& rViewOverlay) MouseOverIndicatorOverlay::~MouseOverIndicatorOverlay (void) { + RemoveRegistration(); } diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 4a01c995544b..44d1ecea9031 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -316,6 +316,7 @@ const SvxItemPropertySet* ImplGetMasterPagePropertySet( PageKind ePageKind ) { MAP_CHAR_LEN(UNO_NAME_PAGE_TOP), WID_PAGE_TOP, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_PAGE_HEIGHT), WID_PAGE_HEIGHT, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_PAGE_ORIENTATION), WID_PAGE_ORIENT, &::getCppuType((const view::PaperOrientation*)0),0, 0}, + { MAP_CHAR_LEN(UNO_NAME_PAGE_NUMBER), WID_PAGE_NUMBER, &::getCppuType((const sal_Int16*)0), beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_PAGE_WIDTH), WID_PAGE_WIDTH, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_PAGE_LAYOUT), WID_PAGE_LAYOUT, &::getCppuType((const sal_Int16*)0), 0, 0}, { MAP_CHAR_LEN(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, &::getCppuType((const Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, @@ -991,7 +992,21 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) aAny <<= (sal_Int16)( GetPage()->GetAutoLayout() ); break; case WID_PAGE_NUMBER: - aAny <<= (sal_Int16)((sal_uInt16)((GetPage()->GetPageNum()-1)>>1) + 1); + { + const sal_uInt16 nPageNumber(GetPage()->GetPageNum()); + + if(nPageNumber > 0) + { + // for all other pages calculate the number + aAny <<= (sal_Int16)((sal_uInt16)((nPageNumber-1)>>1) + 1); + } + else + { + // for pages with number 0 (Handout Master, Handout page) + // return 0 + aAny <<= (sal_Int16)0; + } + } break; case WID_PAGE_DURATION: aAny <<= (sal_Int32)(GetPage()->GetTime()); -- cgit From 2d634e6084547875a170d8350850110238b9e55c Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 29 Sep 2009 15:35:35 +0200 Subject: #i105323# speedup of 3D handling mostly for CustomShapes; HitTest and interactions optimized --- .../drawinglayer/geometry/viewinformation2d.hxx | 7 + .../drawinglayer/primitive2d/sceneprimitive2d.hxx | 3 +- .../processor2d/hittestprocessor2d.hxx | 2 + .../drawinglayer/processor2d/vclprocessor2d.hxx | 2 + .../processor3d/cutfindprocessor3d.hxx | 86 +++++++++ drawinglayer/prj/d.lst | 2 + drawinglayer/source/geometry/viewinformation2d.cxx | 40 ++++- .../source/primitive2d/sceneprimitive2d.cxx | 42 +++-- .../source/processor2d/contourextractor2d.cxx | 9 +- .../source/processor2d/hittestprocessor2d.cxx | 131 ++++++++++++-- .../source/processor2d/vclpixelprocessor2d.cxx | 6 + drawinglayer/source/processor2d/vclprocessor2d.cxx | 92 ++++++++++ .../source/processor3d/cutfindprocessor3d.cxx | 199 +++++++++++++++++++++ drawinglayer/source/processor3d/makefile.mk | 1 + .../sdr/primitive2d/sdrcustomshapeprimitive2d.hxx | 8 +- .../svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx | 25 +-- svx/source/customshapes/EnhancedCustomShape2d.cxx | 11 +- svx/source/customshapes/EnhancedCustomShape3d.cxx | 8 +- svx/source/engine3d/helperhittest3d.cxx | 183 +------------------ .../sdr/contact/viewcontactofsdrobjcustomshape.cxx | 14 +- svx/source/sdr/overlay/overlaymanager.cxx | 16 ++ .../sdr/primitive2d/sdrcustomshapeprimitive2d.cxx | 24 ++- .../sdr/primitive2d/sdrmeasureprimitive2d.cxx | 28 +-- 23 files changed, 692 insertions(+), 247 deletions(-) create mode 100644 drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx create mode 100644 drawinglayer/source/processor3d/cutfindprocessor3d.cxx diff --git a/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx b/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx index 94a5623a2a77..0a87b268c8b1 100644 --- a/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx +++ b/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx @@ -149,6 +149,13 @@ namespace drawinglayer /// On-demand prepared Viewport in discrete units for convenience const basegfx::B2DRange& getDiscreteViewport() const; + /** support reduced DisplayQuality, PropertyName is 'ReducedDisplayQuality'. This + is used e.g. to allow to lower display quality for OverlayPrimitives and + may lead to simpler decompositions in the local create2DDecomposition + implementations of the primitives + */ + bool getReducedDisplayQuality() const; + /** Get the uno::Sequence< beans::PropertyValue > which contains all ViewInformation Use this call if You need to extract all contained ViewInformation. The ones diff --git a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx index f190c3e6c1e1..1cb433e6bff1 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx @@ -87,7 +87,8 @@ namespace drawinglayer // Geometry extractor. Shadow will be added as in create2DDecomposition, but // the 3D content is not converted to a bitmap visualisation but to projected 2D gemetry. This // helper is useful e.g. for Contour extraction or HitTests. - Primitive2DSequence getGeometry2D(const geometry::ViewInformation2D& rViewInformation) const; + Primitive2DSequence getGeometry2D() const; + Primitive2DSequence getShadow2D(const geometry::ViewInformation2D& rViewInformation) const; // constructor/destructor ScenePrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx index 1eeaefd2dade..c0ab33052883 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx @@ -43,6 +43,7 @@ namespace basegfx { class B2DPolygon; } namespace basegfx { class B2DPolyPolygon; } +namespace drawinglayer { namespace primitive2d { class ScenePrimitive2D; }} ////////////////////////////////////////////////////////////////////////////// @@ -80,6 +81,7 @@ namespace drawinglayer bool checkFillHitWithTolerance( const basegfx::B2DPolyPolygon& rPolyPolygon, double fDiscreteHitTolerance); + void check3DHit(const primitive2d::ScenePrimitive2D& rCandidate); public: HitTestProcessor2D( diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx index e29b413190ab..66ca140c2e56 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx @@ -51,6 +51,7 @@ namespace drawinglayer { namespace primitive2d { class BitmapPrimitive2D; class FillBitmapPrimitive2D; class PolyPolygonGradientPrimitive2D; + class PolyPolygonBitmapPrimitive2D; class PolyPolygonColorPrimitive2D; class MetafilePrimitive2D; class MaskPrimitive2D; @@ -100,6 +101,7 @@ namespace drawinglayer void RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate); void RenderFillBitmapPrimitive2D(const primitive2d::FillBitmapPrimitive2D& rFillBitmapCandidate); void RenderPolyPolygonGradientPrimitive2D(const primitive2d::PolyPolygonGradientPrimitive2D& rPolygonCandidate); + void RenderPolyPolygonBitmapPrimitive2D(const primitive2d::PolyPolygonBitmapPrimitive2D& rPolygonCandidate); void RenderPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate); void RenderMetafilePrimitive2D(const primitive2d::MetafilePrimitive2D& rPolygonCandidate); void RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate); diff --git a/drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx new file mode 100644 index 000000000000..8a800d6d24b1 --- /dev/null +++ b/drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx @@ -0,0 +1,86 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: zbufferprocessor3d.hxx,v $ + * + * $Revision: 1.4 $ + * + * last change: $Author: aw $ $Date: 2008-06-24 15:30:18 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX +#define INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX + +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace processor3d + { + class CutFindProcessor : public BaseProcessor3D + { + private: + // the start and stop point for the cut vector + basegfx::B3DPoint maFront; + basegfx::B3DPoint maBack; + + // the found cut points + ::std::vector< basegfx::B3DPoint > maResult; + + // #i102956# the transformation change from TransformPrimitive3D processings + // needs to be remembered to be able to transform found cuts to the + // basic coordinate system the processor starts with + basegfx::B3DHomMatrix maCombinedTransform; + + // bitfield + bool mbAnyHit : 1; + + // as tooling, the process() implementation takes over API handling and calls this + // virtual render method when the primitive implementation is BasePrimitive3D-based. + virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); + + public: + CutFindProcessor(const geometry::ViewInformation3D& rViewInformation, + const basegfx::B3DPoint& rFront, + const basegfx::B3DPoint& rBack, + bool bAnyHit); + + // data access + const ::std::vector< basegfx::B3DPoint >& getCutPoints() const { return maResult; } + bool getAnyHit() const { return mbAnyHit; } + }; + } // end of namespace processor3d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX + +// eof diff --git a/drawinglayer/prj/d.lst b/drawinglayer/prj/d.lst index 0068b32c24ae..1ba3c2e7b614 100644 --- a/drawinglayer/prj/d.lst +++ b/drawinglayer/prj/d.lst @@ -90,6 +90,8 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\processor2d mkdir: %_DEST%\inc%_EXT%\drawinglayer\processor3d ..\inc\drawinglayer\processor3d\baseprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\baseprocessor3d.hxx +..\inc\drawinglayer\processor3d\cutfindprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\cutfindprocessor3d.hxx +..\inc\drawinglayer\processor3d\defaultprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\defaultprocessor3d.hxx ..\inc\drawinglayer\processor3d\zbufferprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\zbufferprocessor3d.hxx ..\inc\drawinglayer\processor3d\tbufferprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\tbufferprocessor3d.hxx diff --git a/drawinglayer/source/geometry/viewinformation2d.cxx b/drawinglayer/source/geometry/viewinformation2d.cxx index 372de9936935..e03c946edf9e 100644 --- a/drawinglayer/source/geometry/viewinformation2d.cxx +++ b/drawinglayer/source/geometry/viewinformation2d.cxx @@ -81,12 +81,18 @@ namespace drawinglayer basegfx::B2DRange maDiscreteViewport; // the DrawPage which is target of visualisation. This is needed e.g. for - // the view-dependent decomposition of PageNumber TextFields + // the view-dependent decomposition of PageNumber TextFields. + // This parameter is buffered here, but mainly resides in mxExtendedInformation, + // so it will be interpreted, but held there. It will also not be added + // to mxExtendedInformation in impFillViewInformationFromContent (it's there already) uno::Reference< drawing::XDrawPage > mxVisualizedPage; // the point in time double mfViewTime; + // bitfield + bool mbReducedDisplayQuality : 1; + // the complete PropertyValue representation (if already created) uno::Sequence< beans::PropertyValue > mxViewInformation; @@ -125,6 +131,12 @@ namespace drawinglayer return s_sNameProperty; } + const ::rtl::OUString& getNamePropertyReducedDisplayQuality() + { + static ::rtl::OUString s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("ReducedDisplayQuality")); + return s_sNameProperty; + } + void impInterpretPropertyValues(const uno::Sequence< beans::PropertyValue >& rViewParameters) { if(rViewParameters.hasElements()) @@ -139,7 +151,17 @@ namespace drawinglayer { const beans::PropertyValue& rProp = rViewParameters[a]; - if(rProp.Name == getNamePropertyObjectTransformation()) + if(rProp.Name == getNamePropertyReducedDisplayQuality()) + { + // extra information; add to filtered information + mxExtendedInformation[nExtendedInsert++] = rProp; + + // for performance reasons, also cache content locally + sal_Bool bSalBool; + rProp.Value >>= bSalBool; + mbReducedDisplayQuality = bSalBool; + } + else if(rProp.Name == getNamePropertyObjectTransformation()) { com::sun::star::geometry::AffineMatrix2D aAffineMatrix2D; rProp.Value >>= aAffineMatrix2D; @@ -185,6 +207,7 @@ namespace drawinglayer const bool bViewportUsed(!maViewport.isEmpty()); const bool bTimeUsed(0.0 < mfViewTime); const bool bVisualizedPageUsed(mxVisualizedPage.is()); + const bool bReducedDisplayQualityUsed(true == mbReducedDisplayQuality); const bool bExtraInformation(mxExtendedInformation.hasElements()); sal_uInt32 nIndex(0); const sal_uInt32 nCount( @@ -193,6 +216,7 @@ namespace drawinglayer (bViewportUsed ? 1 : 0) + (bTimeUsed ? 1 : 0) + (bVisualizedPageUsed ? 1 : 0) + + (bReducedDisplayQualityUsed ? 1 : 0) + (bExtraInformation ? mxExtendedInformation.getLength() : 0)); mxViewInformation.realloc(nCount); @@ -265,6 +289,7 @@ namespace drawinglayer maDiscreteViewport(), mxVisualizedPage(rxDrawPage), mfViewTime(fViewTime), + mbReducedDisplayQuality(false), mxViewInformation(), mxExtendedInformation() { @@ -281,6 +306,7 @@ namespace drawinglayer maDiscreteViewport(), mxVisualizedPage(), mfViewTime(), + mbReducedDisplayQuality(false), mxViewInformation(rViewParameters), mxExtendedInformation() { @@ -355,6 +381,11 @@ namespace drawinglayer return mxVisualizedPage; } + bool getReducedDisplayQuality() const + { + return mbReducedDisplayQuality; + } + const uno::Sequence< beans::PropertyValue >& getViewInformationSequence() const { if(!mxViewInformation.hasElements()) @@ -501,6 +532,11 @@ namespace drawinglayer return mpViewInformation2D->getDiscreteViewport(); } + bool ViewInformation2D::getReducedDisplayQuality() const + { + return mpViewInformation2D->getReducedDisplayQuality(); + } + const uno::Sequence< beans::PropertyValue >& ViewInformation2D::getViewInformationSequence() const { return mpViewInformation2D->getViewInformationSequence(); diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx index cfeb5e35edc5..7fa9fdec336c 100644 --- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx @@ -200,6 +200,17 @@ namespace drawinglayer fViewSizeY *= fReduceFactor; } + if(rViewInformation.getReducedDisplayQuality()) + { + // when reducing the visualisation is allowed (e.g. an OverlayObject + // only needed for dragging), reduce resolution extra + // to speed up dragging interactions (1/4th currently) + const double fReducedVisualisationFactor(0.25); + fReduceFactor *= fReducedVisualisationFactor; + fViewSizeX *= fReducedVisualisationFactor; + fViewSizeY *= fReducedVisualisationFactor; + } + // calculate logic render size in world coordinates for usage in renderer basegfx::B2DVector aLogicRenderSize( aDiscreteRange.getWidth() * fReduceFactor, @@ -207,9 +218,8 @@ namespace drawinglayer aLogicRenderSize *= rViewInformation.getInverseObjectToViewTransformation(); // determine the oversample value - static bool bDoOversample(false); static sal_uInt16 nDefaultOversampleValue(3); - const sal_uInt16 nOversampleValue((bDoOversample || aDrawinglayerOpt.IsAntiAliasing()) ? nDefaultOversampleValue : 0); + const sal_uInt16 nOversampleValue(aDrawinglayerOpt.IsAntiAliasing() ? nDefaultOversampleValue : 0); // use default 3D primitive processor to create BitmapEx for aUnitVisiblePart and process processor3d::ZBufferProcessor3D aZBufferProcessor3D( @@ -262,17 +272,10 @@ namespace drawinglayer return aRetval; } - Primitive2DSequence ScenePrimitive2D::getGeometry2D(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence ScenePrimitive2D::getGeometry2D() const { Primitive2DSequence aRetval; - // create 2D shadows from contained 3D primitives - if(impGetShadow3D(rViewInformation)) - { - // add extracted 2d shadows (before 3d scene creations itself) - aRetval = maShadowPrimitives; - } - // create 2D projected geometry from 3D geometry if(getChildren3D().hasElements()) { @@ -284,9 +287,22 @@ namespace drawinglayer // process local primitives aGeometryProcessor.process(getChildren3D()); - // fetch result and append - Primitive2DSequence a2DExtractedPrimitives(aGeometryProcessor.getPrimitive2DSequence()); - appendPrimitive2DSequenceToPrimitive2DSequence(aRetval, a2DExtractedPrimitives); + // fetch result + aRetval = aGeometryProcessor.getPrimitive2DSequence(); + } + + return aRetval; + } + + Primitive2DSequence ScenePrimitive2D::getShadow2D(const geometry::ViewInformation2D& rViewInformation) const + { + Primitive2DSequence aRetval; + + // create 2D shadows from contained 3D primitives + if(impGetShadow3D(rViewInformation)) + { + // add extracted 2d shadows (before 3d scene creations itself) + aRetval = maShadowPrimitives; } return aRetval; diff --git a/drawinglayer/source/processor2d/contourextractor2d.cxx b/drawinglayer/source/processor2d/contourextractor2d.cxx index 2813b8081584..3225651a6754 100644 --- a/drawinglayer/source/processor2d/contourextractor2d.cxx +++ b/drawinglayer/source/processor2d/contourextractor2d.cxx @@ -162,7 +162,8 @@ namespace drawinglayer { // 2D Scene primitive containing 3D stuff; extract 2D contour in world coordinates const primitive2d::ScenePrimitive2D& rScenePrimitive2DCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate)); - const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D(getViewInformation2D())); + const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D()); + const primitive2d::Primitive2DSequence xExtracted2DSceneShadow(rScenePrimitive2DCandidate.getShadow2D(getViewInformation2D())); // proccess content if(xExtracted2DSceneGeometry.hasElements()) @@ -170,6 +171,12 @@ namespace drawinglayer process(xExtracted2DSceneGeometry); } + // proccess content + if(xExtracted2DSceneShadow.hasElements()) + { + process(xExtracted2DSceneShadow); + } + break; } case PRIMITIVE2D_ID_WRONGSPELLPRIMITIVE2D : diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx index 808ea70155a9..98bbe2a82cb8 100644 --- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx +++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx @@ -48,6 +48,8 @@ #include #include #include +#include +#include ////////////////////////////////////////////////////////////////////////////// @@ -164,6 +166,108 @@ namespace drawinglayer return bRetval; } + void HitTestProcessor2D::check3DHit(const primitive2d::ScenePrimitive2D& rCandidate) + { + // calculate relative point in unified 2D scene + const basegfx::B2DPoint aLogicHitPosition(getViewInformation2D().getInverseObjectToViewTransformation() * getDiscreteHitPosition()); + basegfx::B2DHomMatrix aInverseSceneTransform(rCandidate.getObjectTransformation()); + aInverseSceneTransform.invert(); + const basegfx::B2DPoint aRelativePoint(aInverseSceneTransform * aLogicHitPosition); + + // check if test point is inside scene's unified area at all + if(aRelativePoint.getX() >= 0.0 && aRelativePoint.getX() <= 1.0 + && aRelativePoint.getY() >= 0.0 && aRelativePoint.getY() <= 1.0) + { + // get 3D view information + const geometry::ViewInformation3D& rObjectViewInformation3D = rCandidate.getViewInformation3D(); + + // create HitPoint Front and Back, transform to object coordinates + basegfx::B3DHomMatrix aViewToObject(rObjectViewInformation3D.getObjectToView()); + aViewToObject.invert(); + const basegfx::B3DPoint aFront(aViewToObject * basegfx::B3DPoint(aRelativePoint.getX(), aRelativePoint.getY(), 0.0)); + const basegfx::B3DPoint aBack(aViewToObject * basegfx::B3DPoint(aRelativePoint.getX(), aRelativePoint.getY(), 1.0)); + + if(!aFront.equal(aBack)) + { + const primitive3d::Primitive3DSequence& rPrimitives = rCandidate.getChildren3D(); + + if(rPrimitives.hasElements()) + { + // make BoundVolume empty and overlapping test for speedup + const basegfx::B3DRange aObjectRange( + drawinglayer::primitive3d::getB3DRangeFromPrimitive3DSequence( + rPrimitives, rObjectViewInformation3D)); + + if(!aObjectRange.isEmpty()) + { + const basegfx::B3DRange aFrontBackRange(aFront, aBack); + + if(aObjectRange.overlaps(aFrontBackRange)) + { + // bound volumes hit, geometric cut tests needed + drawinglayer::processor3d::CutFindProcessor aCutFindProcessor( + rObjectViewInformation3D, + aFront, + aBack, + true); + aCutFindProcessor.process(rPrimitives); + + mbHit = (0 != aCutFindProcessor.getCutPoints().size()); + } + } + } + } + } + + // This is needed to check hit with 3D shadows, too. HitTest is without shadow + // to keep compatible with previous versions. Keeping here as reference + // + // if(!getHit()) + // { + // // if scene has shadow, check hit with shadow, too + // const primitive2d::Primitive2DSequence xExtracted2DSceneShadow(rCandidate.getShadow2D(getViewInformation2D())); + // + // if(xExtracted2DSceneShadow.hasElements()) + // { + // // proccess extracted 2D content + // process(xExtracted2DSceneShadow); + // } + // } + + if(!getHit()) + { + // empty 3D scene; Check for border hit + basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0))); + aOutline.transform(rCandidate.getObjectTransformation()); + + mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); + } + + // This is what the previous version did. Keeping it here for reference + // + // // 2D Scene primitive containing 3D stuff; extract 2D contour in world coordinates + // // This may be refined later to an own 3D HitTest renderer which processes the 3D + // // geometry directly + // const primitive2d::ScenePrimitive2D& rScenePrimitive2DCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate)); + // const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D()); + // const primitive2d::Primitive2DSequence xExtracted2DSceneShadow(rScenePrimitive2DCandidate.getShadow2D(getViewInformation2D())); + // + // if(xExtracted2DSceneGeometry.hasElements() || xExtracted2DSceneShadow.hasElements()) + // { + // // proccess extracted 2D content + // process(xExtracted2DSceneGeometry); + // process(xExtracted2DSceneShadow); + // } + // else + // { + // // empty 3D scene; Check for border hit + // const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D())); + // basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + // + // mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); + // } + } + void HitTestProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) { if(getHit()) @@ -334,25 +438,8 @@ namespace drawinglayer { if(!getHitTextOnly()) { - // 2D Scene primitive containing 3D stuff; extract 2D contour in world coordinates - // This may be refined later to an own 3D HitTest renderer which processes the 3D - // geometry directly - const primitive2d::ScenePrimitive2D& rScenePrimitive2DCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate)); - const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D(getViewInformation2D())); - - if(xExtracted2DSceneGeometry.hasElements()) - { - // proccess extracted 2D content - process(xExtracted2DSceneGeometry); - } - else - { - // empty 3D scene; Check for border hit - const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D())); - basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); - - mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); - } + const primitive2d::ScenePrimitive2D& rCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate)); + check3DHit(rCandidate); } break; @@ -365,6 +452,12 @@ namespace drawinglayer // ignorable primitives break; } + case PRIMITIVE2D_ID_SHADOWPRIMITIVE2D : + { + // Ignore shadows; we do not want to have shadows hittable. + // Remove this one to make shadows hittable on demand. + break; + } case PRIMITIVE2D_ID_TEXTSIMPLEPORTIONPRIMITIVE2D : case PRIMITIVE2D_ID_TEXTDECORATEDPORTIONPRIMITIVE2D : { diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 540c28d685d4..b1d91ebc86fc 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -209,6 +209,12 @@ namespace drawinglayer RenderPolyPolygonGradientPrimitive2D(static_cast< const primitive2d::PolyPolygonGradientPrimitive2D& >(rCandidate)); break; } + case PRIMITIVE2D_ID_POLYPOLYGONBITMAPPRIMITIVE2D : + { + // direct draw of bitmap + RenderPolyPolygonBitmapPrimitive2D(static_cast< const primitive2d::PolyPolygonBitmapPrimitive2D& >(rCandidate)); + break; + } case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D : { // direct draw of PolyPolygon with color diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index fc57e5299662..16ef4cb2feb3 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -625,6 +625,98 @@ namespace drawinglayer } } + // direct draw of bitmap + void VclProcessor2D::RenderPolyPolygonBitmapPrimitive2D(const primitive2d::PolyPolygonBitmapPrimitive2D& rPolygonCandidate) + { + bool bDone(false); + const basegfx::B2DPolyPolygon& rPolyPolygon = rPolygonCandidate.getB2DPolyPolygon(); + + if(rPolyPolygon.count()) + { + const attribute::FillBitmapAttribute& rFillBitmapAttribute = rPolygonCandidate.getFillBitmap(); + const Bitmap& rBitmap = rFillBitmapAttribute.getBitmap(); + + if(rBitmap.IsEmpty()) + { + // empty bitmap, done + bDone = true; + } + else + { + // try to catch cases where the bitmap will be color-modified to a single + // color (e.g. shadow). This would NOT be optimizable with an alpha channel + // at the Bitmap which we do not have here. When this should change, this + // optimization has to be reworked accordingly. + const sal_uInt32 nBColorModifierStackCount(maBColorModifierStack.count()); + + if(nBColorModifierStackCount) + { + const basegfx::BColorModifier& rTopmostModifier = maBColorModifierStack.getBColorModifier(nBColorModifierStackCount - 1); + + if(basegfx::BCOLORMODIFYMODE_REPLACE == rTopmostModifier.getMode()) + { + // the bitmap fill is in unified color, so we can replace it with + // a single polygon fill. The form of the fill depends on tiling + if(rFillBitmapAttribute.getTiling()) + { + // with tiling, fill the whole PolyPolygon with the modifier color + basegfx::B2DPolyPolygon aLocalPolyPolygon(rPolyPolygon); + + aLocalPolyPolygon.transform(maCurrentTransformation); + mpOutputDevice->SetLineColor(); + mpOutputDevice->SetFillColor(Color(rTopmostModifier.getBColor())); + mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon); + } + else + { + // without tiling, only the area common to the bitmap tile and the + // PolyPolygon is filled. Create the bitmap tile area in object + // coordinates. For this, the object transformation needs to be created + // from the already scaled PolyPolygon. The tile area in object + // coordinates wil always be non-rotated, so it's not necessary to + // work with a polygon here + basegfx::B2DRange aTileRange(rFillBitmapAttribute.getTopLeft(), + rFillBitmapAttribute.getTopLeft() + rFillBitmapAttribute.getSize()); + const basegfx::B2DRange aPolyPolygonRange(rPolyPolygon.getB2DRange()); + basegfx::B2DHomMatrix aNewObjectTransform; + + aNewObjectTransform.set(0, 0, aPolyPolygonRange.getWidth()); + aNewObjectTransform.set(1, 1, aPolyPolygonRange.getHeight()); + aNewObjectTransform.set(0, 2, aPolyPolygonRange.getMinX()); + aNewObjectTransform.set(1, 2, aPolyPolygonRange.getMinY()); + aTileRange.transform(aNewObjectTransform); + + // now clip the object polyPolygon against the tile range + // to get the common area (OR) + basegfx::B2DPolyPolygon aTarget = basegfx::tools::clipPolyPolygonOnRange(rPolyPolygon, aTileRange, true, false); + + if(aTarget.count()) + { + aTarget.transform(maCurrentTransformation); + mpOutputDevice->SetLineColor(); + mpOutputDevice->SetFillColor(Color(rTopmostModifier.getBColor())); + mpOutputDevice->DrawPolyPolygon(aTarget); + } + } + + bDone = true; + } + } + } + } + else + { + // empty polyPolygon, done + bDone = true; + } + + if(!bDone) + { + // use default decomposition + process(rPolygonCandidate.get2DDecomposition(getViewInformation2D())); + } + } + // direct draw of PolyPolygon with color void VclProcessor2D::RenderPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate) { diff --git a/drawinglayer/source/processor3d/cutfindprocessor3d.cxx b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx new file mode 100644 index 000000000000..42e2e1565803 --- /dev/null +++ b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx @@ -0,0 +1,199 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: zbufferprocessor3d.cxx,v $ + * + * $Revision: 1.5 $ + * + * last change: $Author: aw $ $Date: 2008-06-24 15:31:09 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_drawinglayer.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace processor3d + { + CutFindProcessor::CutFindProcessor(const geometry::ViewInformation3D& rViewInformation, + const basegfx::B3DPoint& rFront, + const basegfx::B3DPoint& rBack, + bool bAnyHit) + : BaseProcessor3D(rViewInformation), + maFront(rFront), + maBack(rBack), + maResult(), + maCombinedTransform(), + mbAnyHit(bAnyHit) + { + } + + void CutFindProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) + { + if(getAnyHit() && maResult.size()) + { + // stop processing as soon as a hit was recognized + return; + } + + // it is a BasePrimitive3D implementation, use getPrimitive3DID() call for switch + switch(rCandidate.getPrimitive3DID()) + { + case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D : + { + // transform group. + const primitive3d::TransformPrimitive3D& rPrimitive = static_cast< const primitive3d::TransformPrimitive3D& >(rCandidate); + + // remember old and transform front, back to object coordinates + const basegfx::B3DPoint aLastFront(maFront); + const basegfx::B3DPoint aLastBack(maBack); + basegfx::B3DHomMatrix aInverseTrans(rPrimitive.getTransformation()); + aInverseTrans.invert(); + maFront *= aInverseTrans; + maBack *= aInverseTrans; + + // remember current and create new transformation; add new object transform from right side + const geometry::ViewInformation3D aLastViewInformation3D(getViewInformation3D()); + const geometry::ViewInformation3D aNewViewInformation3D( + aLastViewInformation3D.getObjectTransformation() * rPrimitive.getTransformation(), + aLastViewInformation3D.getOrientation(), + aLastViewInformation3D.getProjection(), + aLastViewInformation3D.getDeviceToView(), + aLastViewInformation3D.getViewTime(), + aLastViewInformation3D.getExtendedInformationSequence()); + updateViewInformation(aNewViewInformation3D); + + // #i102956# remember needed back-transform for found cuts (combine from right side) + const basegfx::B3DHomMatrix aLastCombinedTransform(maCombinedTransform); + maCombinedTransform = maCombinedTransform * rPrimitive.getTransformation(); + + // let break down + process(rPrimitive.getChildren()); + + // restore transformations and front, back + maCombinedTransform = aLastCombinedTransform; + updateViewInformation(aLastViewInformation3D); + maFront = aLastFront; + maBack = aLastBack; + break; + } + case PRIMITIVE3D_ID_POLYGONHAIRLINEPRIMITIVE3D : + { + // PolygonHairlinePrimitive3D, not used for hit test with planes, ignore. This + // means that also thick line expansion will not be hit-tested as + // PolyPolygonMaterialPrimitive3D + break; + } + case PRIMITIVE3D_ID_HATCHTEXTUREPRIMITIVE3D : + { + // #i97321# + // For HatchTexturePrimitive3D, do not use the decomposition since it will produce + // clipped hatch lines in 3D. It can be used when the hatch also has a filling, but for + // simplicity, just use the children which are the PolyPolygonMaterialPrimitive3D + // which define the hatched areas anyways; for HitTest this is more than adequate + const primitive3d::HatchTexturePrimitive3D& rPrimitive = static_cast< const primitive3d::HatchTexturePrimitive3D& >(rCandidate); + process(rPrimitive.getChildren()); + break; + } + case PRIMITIVE3D_ID_HITTESTPRIMITIVE3D : + { + // HitTestPrimitive3D, force usage due to we are doing a hit test and this + // primitive only gets generated on 3d objects without fill, exactly for this + // purpose + const primitive3d::HitTestPrimitive3D& rPrimitive = static_cast< const primitive3d::HitTestPrimitive3D& >(rCandidate); + process(rPrimitive.getChildren()); + break; + } + case PRIMITIVE3D_ID_POLYPOLYGONMATERIALPRIMITIVE3D : + { + // PolyPolygonMaterialPrimitive3D + const primitive3d::PolyPolygonMaterialPrimitive3D& rPrimitive = static_cast< const primitive3d::PolyPolygonMaterialPrimitive3D& >(rCandidate); + + if(!maFront.equal(maBack)) + { + const basegfx::B3DPolyPolygon& rPolyPolygon = rPrimitive.getB3DPolyPolygon(); + const sal_uInt32 nPolyCount(rPolyPolygon.count()); + + if(nPolyCount) + { + const basegfx::B3DPolygon aPolygon(rPolyPolygon.getB3DPolygon(0)); + const sal_uInt32 nPointCount(aPolygon.count()); + + if(nPointCount > 2) + { + const basegfx::B3DVector aPlaneNormal(aPolygon.getNormal()); + + if(!aPlaneNormal.equalZero()) + { + const basegfx::B3DPoint aPointOnPlane(aPolygon.getB3DPoint(0)); + double fCut(0.0); + + if(basegfx::tools::getCutBetweenLineAndPlane(aPlaneNormal, aPointOnPlane, maFront, maBack, fCut)) + { + const basegfx::B3DPoint aCutPoint(basegfx::interpolate(maFront, maBack, fCut)); + + if(basegfx::tools::isInside(rPolyPolygon, aCutPoint, false)) + { + // #i102956# add result. Do not forget to do this in the coordinate + // system the processor get started with, so use the collected + // combined transformation from processed TransformPrimitive3D's + maResult.push_back(maCombinedTransform * aCutPoint); + } + } + } + } + } + } + + break; + } + default : + { + // process recursively + process(rCandidate.get3DDecomposition(getViewInformation3D())); + break; + } + } + } + } // end of namespace processor3d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/source/processor3d/makefile.mk b/drawinglayer/source/processor3d/makefile.mk index 8ca0097c435a..2ae2ae52f2f2 100644 --- a/drawinglayer/source/processor3d/makefile.mk +++ b/drawinglayer/source/processor3d/makefile.mk @@ -46,6 +46,7 @@ ENABLE_EXCEPTIONS=TRUE SLOFILES= \ $(SLO)$/baseprocessor3d.obj \ + $(SLO)$/cutfindprocessor3d.obj \ $(SLO)$/defaultprocessor3d.obj \ $(SLO)$/shadow3dextractor.obj \ $(SLO)$/geometry2dextractor.obj \ diff --git a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx index feedfefc0fe6..033d5c0160e1 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx @@ -57,6 +57,10 @@ namespace drawinglayer // that the text needs to be block formatted unsigned mbWordWrap : 1; + // defines that the object contains/is a 3D AutoShape. Needed for + // making exceptions with shadow generation + unsigned mb3DShape : 1; + protected: // local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; @@ -66,13 +70,15 @@ namespace drawinglayer const attribute::SdrShadowTextAttribute& rSdrSTAttribute, const Primitive2DSequence& rSubPrimitives, const basegfx::B2DHomMatrix& rTextBox, - bool bWordWrap); + bool bWordWrap, + bool b3DShape); // data access const attribute::SdrShadowTextAttribute& getSdrSTAttribute() const { return maSdrSTAttribute; } const Primitive2DSequence& getSubPrimitives() const { return maSubPrimitives; } const basegfx::B2DHomMatrix& getTextBox() const { return maTextBox; } bool getWordWrap() const { return mbWordWrap; } + bool get3DShape() const { return mb3DShape; } // compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; diff --git a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx index 7cc0f6dde9a5..3e998f23fd2b 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx @@ -39,19 +39,19 @@ ////////////////////////////////////////////////////////////////////////////// // predefines -namespace drawinglayer -{ - namespace primitive2d +namespace drawinglayer { namespace primitive2d { + enum MeasureTextPosition { - enum MeasureTextPosition - { - MEASURETEXTPOSITION_AUTOMATIC, - MEASURETEXTPOSITION_NEGATIVE, - MEASURETEXTPOSITION_CENTERED, - MEASURETEXTPOSITION_POSITIVE - }; - } // end of namespace primitive2d -} // end of namespace drawinglayer + MEASURETEXTPOSITION_AUTOMATIC, + MEASURETEXTPOSITION_NEGATIVE, + MEASURETEXTPOSITION_CENTERED, + MEASURETEXTPOSITION_POSITIVE + }; +}} + +namespace drawinglayer { namespace attribute { + class SdrLineAttribute; +}} ////////////////////////////////////////////////////////////////////////////// @@ -80,6 +80,7 @@ namespace drawinglayer // internal decomposition helper Primitive2DReference impCreatePart( + const attribute::SdrLineAttribute& rLineAttribute, const basegfx::B2DHomMatrix& rObjectMatrix, const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd, diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index f066cd6a4729..450d82d9f61f 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -689,7 +689,16 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : ClearItem( SDRATTR_TEXTDIRECTION ); //SJ: vertical writing is not required, by removing this item no outliner is created - // For primitive rendering, shadow handling is done completely based on the geometry, so i removed it here + // #i105323# For 2D AtoShapes, the shadow attirbute does not need to be applied to any + // of the constucted helper SdrObjects. This would lead to problems since the shadow + // of one helper object would fall on one helper object behind it (e.g. with the + // eyes of the smiley shape). This is not wanted; instead a single shadow 'behind' + // the AutoShape visualisation is wanted. This is done with primitive functionailty + // now in SdrCustomShapePrimitive2D::create2DDecomposition, but only for 2D objects + // (see there and in EnhancedCustomShape3d::Create3DObject to read more). + // This exception may be removed later when AutoShapes will create primitives directly. + // So, currently remove the ShadowAttribute from the ItemSet to not apply it to any + // 2D helper shape. ClearItem(SDRATTR_SHADOW); Point aP( pCustomShapeObj->GetSnapRect().Center() ); diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index 3bfa7afb7f6a..07f7c2ab6bea 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -327,8 +327,12 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con //SJ: vertical writing is not required, by removing this item no outliner is created aSet.ClearItem( SDRATTR_TEXTDIRECTION ); - // For primitive rendering, shadow handling is done completely based on the geometry, so i removed it here - aSet.ClearItem(SDRATTR_SHADOW); + // #i105323# For 3D AutoShapes, the shadow attribute has to be applied to each + // created visualisation helper model shape individually. The shadow itself + // will then be rendered from the 3D renderer correctly for the whole 3D scene + // (and thus behind all objects of which the visualisation may be built). So, + // dio NOT remove it from the ItemSet here. + // aSet.ClearItem(SDRATTR_SHADOW); std::vector< E3dCompoundObject* > aPlaceholderObjectList; diff --git a/svx/source/engine3d/helperhittest3d.cxx b/svx/source/engine3d/helperhittest3d.cxx index e2bbe430987d..ad70d3399c8f 100644 --- a/svx/source/engine3d/helperhittest3d.cxx +++ b/svx/source/engine3d/helperhittest3d.cxx @@ -36,18 +36,10 @@ #include #include #include -#include -#include -#include -#include -#include +#include #include #include -#include -#include -#include #include -#include ////////////////////////////////////////////////////////////////////////////// @@ -80,176 +72,13 @@ public: ////////////////////////////////////////////////////////////////////////////// -namespace drawinglayer -{ - namespace processor3d - { - class CutFindProcessor : public BaseProcessor3D - { - private: - // the start and stop point for the cut vector - basegfx::B3DPoint maFront; - basegfx::B3DPoint maBack; - - // the found cut points - ::std::vector< basegfx::B3DPoint > maResult; - - // #i102956# the transformation change from TransformPrimitive3D processings - // needs to be remembered to be able to transform found cuts to the - // basic coordinate system the processor starts with - basegfx::B3DHomMatrix maCombinedTransform; - - // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BasePrimitive3D-based. - virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); - - public: - CutFindProcessor(const geometry::ViewInformation3D& rViewInformation, - const basegfx::B3DPoint& rFront, - const basegfx::B3DPoint& rBack) - : BaseProcessor3D(rViewInformation), - maFront(rFront), - maBack(rBack), - maResult(), - maCombinedTransform() - {} - - // data access - const ::std::vector< basegfx::B3DPoint >& getCutPoints() const { return maResult; } - }; - - void CutFindProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) - { - // it is a BasePrimitive3D implementation, use getPrimitive3DID() call for switch - switch(rCandidate.getPrimitive3DID()) - { - case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D : - { - // transform group. - const primitive3d::TransformPrimitive3D& rPrimitive = static_cast< const primitive3d::TransformPrimitive3D& >(rCandidate); - - // remember old and transform front, back to object coordinates - const basegfx::B3DPoint aLastFront(maFront); - const basegfx::B3DPoint aLastBack(maBack); - basegfx::B3DHomMatrix aInverseTrans(rPrimitive.getTransformation()); - aInverseTrans.invert(); - maFront *= aInverseTrans; - maBack *= aInverseTrans; - - // remember current and create new transformation; add new object transform from right side - const geometry::ViewInformation3D aLastViewInformation3D(getViewInformation3D()); - const geometry::ViewInformation3D aNewViewInformation3D( - aLastViewInformation3D.getObjectTransformation() * rPrimitive.getTransformation(), - aLastViewInformation3D.getOrientation(), - aLastViewInformation3D.getProjection(), - aLastViewInformation3D.getDeviceToView(), - aLastViewInformation3D.getViewTime(), - aLastViewInformation3D.getExtendedInformationSequence()); - updateViewInformation(aNewViewInformation3D); - - // #i102956# remember needed back-transform for found cuts (combine from right side) - const basegfx::B3DHomMatrix aLastCombinedTransform(maCombinedTransform); - maCombinedTransform = maCombinedTransform * rPrimitive.getTransformation(); - - // let break down - process(rPrimitive.getChildren()); - - // restore transformations and front, back - maCombinedTransform = aLastCombinedTransform; - updateViewInformation(aLastViewInformation3D); - maFront = aLastFront; - maBack = aLastBack; - break; - } - case PRIMITIVE3D_ID_POLYGONHAIRLINEPRIMITIVE3D : - { - // PolygonHairlinePrimitive3D, not used for hit test with planes, ignore. This - // means that also thick line expansion will not be hit-tested as - // PolyPolygonMaterialPrimitive3D - break; - } - case PRIMITIVE3D_ID_HATCHTEXTUREPRIMITIVE3D : - { - // #i97321# - // For HatchTexturePrimitive3D, do not use the decomposition since it will produce - // clipped hatch lines in 3D. It can be used when the hatch also has a filling, but for - // simplicity, just use the children which are the PolyPolygonMaterialPrimitive3D - // which define the hatched areas anyways; for HitTest this is more than adequate - const primitive3d::HatchTexturePrimitive3D& rPrimitive = static_cast< const primitive3d::HatchTexturePrimitive3D& >(rCandidate); - process(rPrimitive.getChildren()); - break; - } - case PRIMITIVE3D_ID_HITTESTPRIMITIVE3D : - { - // HitTestPrimitive3D, force usage due to we are doing a hit test and this - // primitive only gets generated on 3d objects without fill, exactly for this - // purpose - const primitive3d::HitTestPrimitive3D& rPrimitive = static_cast< const primitive3d::HitTestPrimitive3D& >(rCandidate); - process(rPrimitive.getChildren()); - break; - } - case PRIMITIVE3D_ID_POLYPOLYGONMATERIALPRIMITIVE3D : - { - // PolyPolygonMaterialPrimitive3D - const primitive3d::PolyPolygonMaterialPrimitive3D& rPrimitive = static_cast< const primitive3d::PolyPolygonMaterialPrimitive3D& >(rCandidate); - - if(!maFront.equal(maBack)) - { - const basegfx::B3DPolyPolygon& rPolyPolygon = rPrimitive.getB3DPolyPolygon(); - const sal_uInt32 nPolyCount(rPolyPolygon.count()); - - if(nPolyCount) - { - const basegfx::B3DPolygon aPolygon(rPolyPolygon.getB3DPolygon(0)); - const sal_uInt32 nPointCount(aPolygon.count()); - - if(nPointCount > 2) - { - const basegfx::B3DVector aPlaneNormal(aPolygon.getNormal()); - - if(!aPlaneNormal.equalZero()) - { - const basegfx::B3DPoint aPointOnPlane(aPolygon.getB3DPoint(0)); - double fCut(0.0); - - if(basegfx::tools::getCutBetweenLineAndPlane(aPlaneNormal, aPointOnPlane, maFront, maBack, fCut)) - { - const basegfx::B3DPoint aCutPoint(basegfx::interpolate(maFront, maBack, fCut)); - - if(basegfx::tools::isInside(rPolyPolygon, aCutPoint, false)) - { - // #i102956# add result. Do not forget to do this in the coordinate - // system the processor get started with, so use the collected - // combined transformation from processed TransformPrimitive3D's - maResult.push_back(maCombinedTransform * aCutPoint); - } - } - } - } - } - } - - break; - } - default : - { - // process recursively - process(rCandidate.get3DDecomposition(getViewInformation3D())); - break; - } - } - } - } // end of namespace processor3d -} // end of namespace drawinglayer - -////////////////////////////////////////////////////////////////////////////// - void getAllHit3DObjectWithRelativePoint( const basegfx::B3DPoint& rFront, const basegfx::B3DPoint& rBack, const E3dCompoundObject& rObject, const drawinglayer::geometry::ViewInformation3D& rObjectViewInformation3D, - ::std::vector< basegfx::B3DPoint >& o_rResult) + ::std::vector< basegfx::B3DPoint >& o_rResult, + bool bAnyHit) { o_rResult.clear(); @@ -271,7 +100,7 @@ void getAllHit3DObjectWithRelativePoint( if(aObjectRange.overlaps(aFrontBackRange)) { // bound volumes hit, geometric cut tests needed - drawinglayer::processor3d::CutFindProcessor aCutFindProcessor(rObjectViewInformation3D, rFront, rBack); + drawinglayer::processor3d::CutFindProcessor aCutFindProcessor(rObjectViewInformation3D, rFront, rBack, bAnyHit); aCutFindProcessor.process(aPrimitives); o_rResult = aCutFindProcessor.getCutPoints(); } @@ -388,7 +217,7 @@ SVX_DLLPUBLIC void getAllHit3DObjectsSortedFrontToBack( { // get all hit points with object ::std::vector< basegfx::B3DPoint > aHitsWithObject; - getAllHit3DObjectWithRelativePoint(aFront, aBack, *pCandidate, aViewInfo3D, aHitsWithObject); + getAllHit3DObjectWithRelativePoint(aFront, aBack, *pCandidate, aViewInfo3D, aHitsWithObject, false); for(sal_uInt32 a(0); a < aHitsWithObject.size(); a++) { @@ -452,7 +281,7 @@ bool checkHitSingle3DObject( { // get all hit points with object ::std::vector< basegfx::B3DPoint > aHitsWithObject; - getAllHit3DObjectWithRelativePoint(aFront, aBack, rCandidate, aViewInfo3D, aHitsWithObject); + getAllHit3DObjectWithRelativePoint(aFront, aBack, rCandidate, aViewInfo3D, aHitsWithObject, true); if(aHitsWithObject.size()) { diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index 4850b91ca2a1..09bbe11bd780 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -40,6 +40,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -122,6 +123,7 @@ namespace sdr // create Primitive2DSequence from sub-geometry const SdrObject* pSdrObjRepresentation = GetCustomShapeObj().GetSdrObjectFromCustomShape(); + bool b3DShape(false); if(pSdrObjRepresentation) { @@ -130,6 +132,12 @@ namespace sdr while(aIterator.IsMore()) { SdrObject& rCandidate = *aIterator.Next(); + + if(!b3DShape && dynamic_cast< E3dObject* >(&rCandidate)) + { + b3DShape = true; + } + const drawinglayer::primitive2d::Primitive2DSequence xNew(rCandidate.GetViewContact().getViewIndependentPrimitive2DSequence()); drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xGroup, xNew); } @@ -204,7 +212,11 @@ namespace sdr // create primitive const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::SdrCustomShapePrimitive2D( - *pAttribute, xGroup, aTextBoxMatrix, bWordWrap)); + *pAttribute, + xGroup, + aTextBoxMatrix, + bWordWrap, + b3DShape)); xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx index 79d493b6d9d0..24a5fb56a8cf 100644 --- a/svx/source/sdr/overlay/overlaymanager.cxx +++ b/svx/source/sdr/overlay/overlaymanager.cxx @@ -44,6 +44,10 @@ ////////////////////////////////////////////////////////////////////////////// +using namespace com::sun::star; + +////////////////////////////////////////////////////////////////////////////// + namespace sdr { namespace overlay @@ -140,6 +144,18 @@ namespace sdr maViewInformation2D(0), mfDiscreteOne(0.0) { + // set Property 'ReducedDisplayQuality' to true to allow simpler interaction + // visualisations + static bool bUseReducedDisplayQualityForDrag(true); + + if(bUseReducedDisplayQualityForDrag) + { + uno::Sequence< beans::PropertyValue > xProperties(1); + xProperties[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedDisplayQuality")); + xProperties[0].Value <<= true; + maViewInformation2D = drawinglayer::geometry::ViewInformation2D(xProperties); + } + if(pOldOverlayManager) { // take over OverlayObjects from given OverlayManager. Copy diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx index aacfca368e0d..029d29f22468 100644 --- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx @@ -62,7 +62,20 @@ namespace drawinglayer // add shadow if(aRetval.hasElements() && getSdrSTAttribute().getShadow()) { - aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow()); + // #i105323# add generic shadow only for 2D shapes. For + // 3D shapes shadow will be set at the individual created + // visualisation objects and be visualized by the 3d renderer + // as a single shadow. + // + // The shadow for AutoShapes could be handled uniformely by not setting any + // shadow items at the helper model objects and only adding shadow here for + // 2D and 3D (and it works, too), but this would lead to two 3D scenes for + // the 3D object; one for the shadow aond one for the content. The one for the + // shadow will be correct (using ColorModifierStack), but expensive. + if(!get3DShape()) + { + aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow()); + } } return aRetval; @@ -72,12 +85,14 @@ namespace drawinglayer const attribute::SdrShadowTextAttribute& rSdrSTAttribute, const Primitive2DSequence& rSubPrimitives, const basegfx::B2DHomMatrix& rTextBox, - bool bWordWrap) + bool bWordWrap, + bool b3DShape) : BufferedDecompositionPrimitive2D(), maSdrSTAttribute(rSdrSTAttribute), maSubPrimitives(rSubPrimitives), maTextBox(rTextBox), - mbWordWrap(bWordWrap) + mbWordWrap(bWordWrap), + mb3DShape(b3DShape) { } @@ -90,7 +105,8 @@ namespace drawinglayer return (getSdrSTAttribute() == rCompare.getSdrSTAttribute() && getSubPrimitives() == rCompare.getSubPrimitives() && getTextBox() == rCompare.getTextBox() - && getWordWrap() == rCompare.getWordWrap()); + && getWordWrap() == rCompare.getWordWrap() + && get3DShape() == rCompare.get3DShape()); } return false; diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index bbb08654baa2..8397f6a47c7c 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -53,27 +53,29 @@ namespace drawinglayer namespace primitive2d { Primitive2DReference SdrMeasurePrimitive2D::impCreatePart( + const attribute::SdrLineAttribute& rLineAttribute, const basegfx::B2DHomMatrix& rObjectMatrix, const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd, bool bLeftActive, bool bRightActive) const { + const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd(); basegfx::B2DPolygon aPolygon; + aPolygon.append(rStart); aPolygon.append(rEnd); - if(!getSdrLSTAttribute().getLineStartEnd() || (!bLeftActive && !bRightActive)) + if(!pLineStartEnd || (!bLeftActive && !bRightActive)) { - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), 0L); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, 0); } if(bLeftActive && bRightActive) { - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), getSdrLSTAttribute().getLineStartEnd()); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, pLineStartEnd); } - const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd(); const basegfx::B2DPolyPolygon aEmpty; const attribute::SdrLineStartEndAttribute aLineStartEnd( bLeftActive ? pLineStartEnd->getStartPolyPolygon() : aEmpty, bRightActive ? pLineStartEnd->getEndPolyPolygon() : aEmpty, @@ -81,7 +83,7 @@ namespace drawinglayer bLeftActive ? pLineStartEnd->isStartActive() : false, bRightActive ? pLineStartEnd->isEndActive() : false, bLeftActive ? pLineStartEnd->isStartCentered() : false, bRightActive? pLineStartEnd->isEndCentered() : false); - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), &aLineStartEnd); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, &aLineStartEnd); } Primitive2DSequence SdrMeasurePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const @@ -273,12 +275,12 @@ namespace drawinglayer const basegfx::B2DPoint aMainLeftLeft(aMainLeft.getX() - fLenLeft, aMainLeft.getY()); const basegfx::B2DPoint aMainRightRight(aMainRight.getX() + fLenRight, aMainRight.getY()); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeftLeft, aMainLeft, false, true)); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainRight, aMainRightRight, true, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeftLeft, aMainLeft, false, true)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainRight, aMainRightRight, true, false)); if(!bMainLineSplitted || MEASURETEXTPOSITION_CENTERED != eHorizontal) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainRight, false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(* pLineAttribute, aObjectMatrix, aMainLeft, aMainRight, false, false)); } } else @@ -289,12 +291,12 @@ namespace drawinglayer const basegfx::B2DPoint aMainInnerLeft(aMainLeft.getX() + fHalfLength, aMainLeft.getY()); const basegfx::B2DPoint aMainInnerRight(aMainRight.getX() - fHalfLength, aMainRight.getY()); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainInnerLeft, true, false)); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainInnerRight, aMainRight, false, true)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeft, aMainInnerLeft, true, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainInnerRight, aMainRight, false, true)); } else { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainRight, true, true)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeft, aMainRight, true, true)); } } @@ -307,13 +309,13 @@ namespace drawinglayer const basegfx::B2DPoint aLeftUp(0.0, fTopEdge); const basegfx::B2DPoint aLeftDown(0.0, fBottomLeft); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aLeftDown, aLeftUp, false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aLeftDown, aLeftUp, false, false)); // right help line const basegfx::B2DPoint aRightUp(fDistance, fTopEdge); const basegfx::B2DPoint aRightDown(fDistance, fBottomRight); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aRightDown, aRightUp, false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aRightDown, aRightUp, false, false)); // text horizontal position if(MEASURETEXTPOSITION_NEGATIVE == eHorizontal) -- cgit From 9d16cddca24d8734f60e2b9836cba9202ee90bdb Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 29 Sep 2009 15:35:35 +0200 Subject: #i105323# speedup of 3D handling mostly for CustomShapes; HitTest and interactions optimized --- basegfx/source/polygon/b3dpolygontools.cxx | 167 ++++++++++++++++++++++------- 1 file changed, 131 insertions(+), 36 deletions(-) diff --git a/basegfx/source/polygon/b3dpolygontools.cxx b/basegfx/source/polygon/b3dpolygontools.cxx index ea303886dd88..52e0f0fcc36f 100644 --- a/basegfx/source/polygon/b3dpolygontools.cxx +++ b/basegfx/source/polygon/b3dpolygontools.cxx @@ -875,52 +875,147 @@ namespace basegfx } else { + bool bRetval(false); const B3DVector aPlaneNormal(rCandidate.getNormal()); if(!aPlaneNormal.equalZero()) { - const double fAbsX(fabs(aPlaneNormal.getX())); - const double fAbsY(fabs(aPlaneNormal.getY())); - const double fAbsZ(fabs(aPlaneNormal.getZ())); + const sal_uInt32 nPointCount(rCandidate.count()); - if(fAbsX > fAbsY && fAbsX > fAbsZ) + if(nPointCount) { - // normal points mostly in X-Direction, use YZ-Polygon projection for check - B3DHomMatrix aTrans; + B3DPoint aCurrentPoint(rCandidate.getB3DPoint(nPointCount - 1)); + const double fAbsX(fabs(aPlaneNormal.getX())); + const double fAbsY(fabs(aPlaneNormal.getY())); + const double fAbsZ(fabs(aPlaneNormal.getZ())); - aTrans.set(0, 0, 0.0); - aTrans.set(0, 1, 1.0); - aTrans.set(1, 1, 0.0); - aTrans.set(1, 2, 1.0); - - const B2DPolygon aYZ(createB2DPolygonFromB3DPolygon(rCandidate, aTrans)); - - return isInside(aYZ, B2DPoint(rPoint.getY(), rPoint.getZ()), bWithBorder); - } - else if(fAbsY > fAbsX && fAbsY > fAbsZ) - { - // normal points mostly in Y-Direction, use XZ-Polygon projection for check - B3DHomMatrix aTrans; - - aTrans.set(1, 1, 0.0); - aTrans.set(1, 2, 1.0); - - const B2DPolygon aXZ(createB2DPolygonFromB3DPolygon(rCandidate, aTrans)); - - return isInside(aXZ, B2DPoint(rPoint.getX(), rPoint.getZ()), bWithBorder); - } - else - { - // normal points mostly in Z-Direction, use XY-Polygon projection for check - B3DHomMatrix aTrans; - - const B2DPolygon aXY(createB2DPolygonFromB3DPolygon(rCandidate, aTrans)); - - return isInside(aXY, B2DPoint(rPoint.getX(), rPoint.getY()), bWithBorder); + if(fAbsX > fAbsY && fAbsX > fAbsZ) + { + // normal points mostly in X-Direction, use YZ-Polygon projection for check + // x -> y, y -> z + for(sal_uInt32 a(0); a < nPointCount; a++) + { + const B3DPoint aPreviousPoint(aCurrentPoint); + aCurrentPoint = rCandidate.getB3DPoint(a); + + // cross-over in Z? + const bool bCompZA(fTools::more(aPreviousPoint.getZ(), rPoint.getZ())); + const bool bCompZB(fTools::more(aCurrentPoint.getZ(), rPoint.getZ())); + + if(bCompZA != bCompZB) + { + // cross-over in Y? + const bool bCompYA(fTools::more(aPreviousPoint.getY(), rPoint.getY())); + const bool bCompYB(fTools::more(aCurrentPoint.getY(), rPoint.getY())); + + if(bCompYA == bCompYB) + { + if(bCompYA) + { + bRetval = !bRetval; + } + } + else + { + const double fCompare( + aCurrentPoint.getY() - (aCurrentPoint.getZ() - rPoint.getZ()) * + (aPreviousPoint.getY() - aCurrentPoint.getY()) / + (aPreviousPoint.getZ() - aCurrentPoint.getZ())); + + if(fTools::more(fCompare, rPoint.getY())) + { + bRetval = !bRetval; + } + } + } + } + } + else if(fAbsY > fAbsX && fAbsY > fAbsZ) + { + // normal points mostly in Y-Direction, use XZ-Polygon projection for check + // x -> x, y -> z + for(sal_uInt32 a(0); a < nPointCount; a++) + { + const B3DPoint aPreviousPoint(aCurrentPoint); + aCurrentPoint = rCandidate.getB3DPoint(a); + + // cross-over in Z? + const bool bCompZA(fTools::more(aPreviousPoint.getZ(), rPoint.getZ())); + const bool bCompZB(fTools::more(aCurrentPoint.getZ(), rPoint.getZ())); + + if(bCompZA != bCompZB) + { + // cross-over in X? + const bool bCompXA(fTools::more(aPreviousPoint.getX(), rPoint.getX())); + const bool bCompXB(fTools::more(aCurrentPoint.getX(), rPoint.getX())); + + if(bCompXA == bCompXB) + { + if(bCompXA) + { + bRetval = !bRetval; + } + } + else + { + const double fCompare( + aCurrentPoint.getX() - (aCurrentPoint.getZ() - rPoint.getZ()) * + (aPreviousPoint.getX() - aCurrentPoint.getX()) / + (aPreviousPoint.getZ() - aCurrentPoint.getZ())); + + if(fTools::more(fCompare, rPoint.getX())) + { + bRetval = !bRetval; + } + } + } + } + } + else + { + // normal points mostly in Z-Direction, use XY-Polygon projection for check + // x -> x, y -> y + for(sal_uInt32 a(0); a < nPointCount; a++) + { + const B3DPoint aPreviousPoint(aCurrentPoint); + aCurrentPoint = rCandidate.getB3DPoint(a); + + // cross-over in Y? + const bool bCompYA(fTools::more(aPreviousPoint.getY(), rPoint.getY())); + const bool bCompYB(fTools::more(aCurrentPoint.getY(), rPoint.getY())); + + if(bCompYA != bCompYB) + { + // cross-over in X? + const bool bCompXA(fTools::more(aPreviousPoint.getX(), rPoint.getX())); + const bool bCompXB(fTools::more(aCurrentPoint.getX(), rPoint.getX())); + + if(bCompXA == bCompXB) + { + if(bCompXA) + { + bRetval = !bRetval; + } + } + else + { + const double fCompare( + aCurrentPoint.getX() - (aCurrentPoint.getY() - rPoint.getY()) * + (aPreviousPoint.getX() - aCurrentPoint.getX()) / + (aPreviousPoint.getY() - aCurrentPoint.getY())); + + if(fTools::more(fCompare, rPoint.getX())) + { + bRetval = !bRetval; + } + } + } + } + } } } - return false; + return bRetval; } } -- cgit From 78fb1283ea0f5a059740790e3933fe60b520c7cf Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 29 Sep 2009 18:33:34 +0200 Subject: #i97509# corrected usage of create/get/2D/3DDecomposition for all derivations --- .../primitive2d/animatedprimitive2d.hxx | 12 ++--- .../primitive3d/polygontubeprimitive3d.hxx | 18 ++++++- .../source/primitive2d/animatedprimitive2d.cxx | 56 ++++++++++----------- .../source/primitive3d/polygontubeprimitive3d.cxx | 16 +++++- svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx | 7 ++- svx/source/sdr/primitive2d/sdrole2primitive2d.cxx | 58 +++++++++++----------- 6 files changed, 98 insertions(+), 69 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx index e505594b2a76..c42853fe54b2 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx @@ -99,15 +99,15 @@ namespace drawinglayer class AnimatedBlinkPrimitive2D : public AnimatedSwitchPrimitive2D { protected: - // create local decomposition - virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - public: AnimatedBlinkPrimitive2D( const animation::AnimationEntry& rAnimationEntry, const Primitive2DSequence& rChildren, bool bIsTextAnimation); + // create local decomposition + virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + // provide unique ID DeclPrimitrive2DIDBlock() }; @@ -127,9 +127,6 @@ namespace drawinglayer std::vector< basegfx::tools::B2DHomMatrixBufferedDecompose > maMatrixStack; protected: - // create local decomposition - virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - public: AnimatedInterpolatePrimitive2D( const std::vector< basegfx::B2DHomMatrix >& rmMatrixStack, @@ -137,6 +134,9 @@ namespace drawinglayer const Primitive2DSequence& rChildren, bool bIsTextAnimation); + // create local decomposition + virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + // provide unique ID DeclPrimitrive2DIDBlock() }; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx index 5ce81e8c7ad6..695d16ec7cf5 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx @@ -55,14 +55,25 @@ namespace drawinglayer class PolygonTubePrimitive3D : public PolygonHairlinePrimitive3D { private: + // hold the last decompositon since it's expensive + Primitive3DSequence maLast3DDecomposition; + + // visualisation parameters double mfRadius; double mfDegreeStepWidth; double mfMiterMinimumAngle; basegfx::B2DLineJoin maLineJoin; protected: + /** access methods to maLast3DDecomposition. The usage of this methods may allow + later thread-safe stuff to be added if needed. Only to be used by getDecomposition() + implementations for buffering the last decomposition. + */ + const Primitive3DSequence& getLast3DDecomposition() const { return maLast3DDecomposition; } + void setLast3DDecomposition(const Primitive3DSequence& rNew) { maLast3DDecomposition = rNew; } + // local decomposition. - virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + Primitive3DSequence impCreate3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: PolygonTubePrimitive3D( @@ -81,6 +92,11 @@ namespace drawinglayer // compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; + /** local decomposition. Use own buffering since we are not derived from + BufferedDecompositionPrimitive3D + */ + virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + // provide unique ID DeclPrimitrive3DIDBlock() }; diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx index 402fe45126cd..df38c627ec9f 100644 --- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx @@ -114,7 +114,15 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence AnimatedBlinkPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + AnimatedBlinkPrimitive2D::AnimatedBlinkPrimitive2D( + const animation::AnimationEntry& rAnimationEntry, + const Primitive2DSequence& rChildren, + bool bIsTextAnimation) + : AnimatedSwitchPrimitive2D(rAnimationEntry, rChildren, bIsTextAnimation) + { + } + + Primitive2DSequence AnimatedBlinkPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { if(getChildren().hasElements()) { @@ -129,14 +137,6 @@ namespace drawinglayer return Primitive2DSequence(); } - AnimatedBlinkPrimitive2D::AnimatedBlinkPrimitive2D( - const animation::AnimationEntry& rAnimationEntry, - const Primitive2DSequence& rChildren, - bool bIsTextAnimation) - : AnimatedSwitchPrimitive2D(rAnimationEntry, rChildren, bIsTextAnimation) - { - } - // provide unique ID ImplPrimitrive2DIDBlock(AnimatedBlinkPrimitive2D, PRIMITIVE2D_ID_ANIMATEDBLINKPRIMITIVE2D) @@ -149,7 +149,25 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence AnimatedInterpolatePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + AnimatedInterpolatePrimitive2D::AnimatedInterpolatePrimitive2D( + const std::vector< basegfx::B2DHomMatrix >& rmMatrixStack, + const animation::AnimationEntry& rAnimationEntry, + const Primitive2DSequence& rChildren, + bool bIsTextAnimation) + : AnimatedSwitchPrimitive2D(rAnimationEntry, rChildren, bIsTextAnimation), + maMatrixStack() + { + // copy matrices to locally pre-decomposed matrix stack + const sal_uInt32 nCount(rmMatrixStack.size()); + maMatrixStack.reserve(nCount); + + for(sal_uInt32 a(0L); a < nCount; a++) + { + maMatrixStack.push_back(basegfx::tools::B2DHomMatrixBufferedDecompose(rmMatrixStack[a])); + } + } + + Primitive2DSequence AnimatedInterpolatePrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { const sal_uInt32 nSize(maMatrixStack.size()); @@ -204,24 +222,6 @@ namespace drawinglayer } } - AnimatedInterpolatePrimitive2D::AnimatedInterpolatePrimitive2D( - const std::vector< basegfx::B2DHomMatrix >& rmMatrixStack, - const animation::AnimationEntry& rAnimationEntry, - const Primitive2DSequence& rChildren, - bool bIsTextAnimation) - : AnimatedSwitchPrimitive2D(rAnimationEntry, rChildren, bIsTextAnimation), - maMatrixStack() - { - // copy matrices to locally pre-decomposed matrix stack - const sal_uInt32 nCount(rmMatrixStack.size()); - maMatrixStack.reserve(nCount); - - for(sal_uInt32 a(0L); a < nCount; a++) - { - maMatrixStack.push_back(basegfx::tools::B2DHomMatrixBufferedDecompose(rmMatrixStack[a])); - } - } - // provide unique ID ImplPrimitrive2DIDBlock(AnimatedInterpolatePrimitive2D, PRIMITIVE2D_ID_ANIMATEDINTERPOLATEPRIMITIVE2D) diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx index d95473a27805..de28e3ad74e5 100644 --- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx @@ -417,7 +417,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence PolygonTubePrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence PolygonTubePrimitive3D::impCreate3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { const sal_uInt32 nPointCount(getB3DPolygon().count()); std::vector< BasePrimitive3D* > aResultVector; @@ -541,6 +541,7 @@ namespace drawinglayer double fDegreeStepWidth, double fMiterMinimumAngle) : PolygonHairlinePrimitive3D(rPolygon, rBColor), + maLast3DDecomposition(), mfRadius(fRadius), mfDegreeStepWidth(fDegreeStepWidth), mfMiterMinimumAngle(fMiterMinimumAngle), @@ -563,6 +564,19 @@ namespace drawinglayer return false; } + Primitive3DSequence PolygonTubePrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const + { + ::osl::MutexGuard aGuard( m_aMutex ); + + if(!getLast3DDecomposition().hasElements()) + { + const Primitive3DSequence aNewSequence(impCreate3DDecomposition(rViewInformation)); + const_cast< PolygonTubePrimitive3D* >(this)->setLast3DDecomposition(aNewSequence); + } + + return getLast3DDecomposition(); + } + // provide unique ID ImplPrimitrive3DIDBlock(PolygonTubePrimitive3D, PRIMITIVE3D_ID_POLYGONTUBEPRIMITIVE3D) diff --git a/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx index d1b473bd4f5a..2deaf474e12e 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrole2primitive2d.hxx @@ -53,10 +53,6 @@ namespace drawinglayer basegfx::B2DHomMatrix maTransform; attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; - protected: - // local decomposition. - virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; - public: SdrOle2Primitive2D( const Primitive2DSequence& rOLEContent, @@ -71,6 +67,9 @@ namespace drawinglayer // compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + // local decomposition. + virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + // provide unique ID DeclPrimitrive2DIDBlock() }; diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx index d16b6d813c62..86f7f0990de8 100644 --- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx @@ -46,7 +46,35 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence SdrOle2Primitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + SdrOle2Primitive2D::SdrOle2Primitive2D( + const Primitive2DSequence& rOLEContent, + const basegfx::B2DHomMatrix& rTransform, + const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute) + : BasePrimitive2D(), + maOLEContent(rOLEContent), + maTransform(rTransform), + maSdrLFSTAttribute(rSdrLFSTAttribute) + { + } + + bool SdrOle2Primitive2D::operator==(const BasePrimitive2D& rPrimitive) const + { + if(BasePrimitive2D::operator==(rPrimitive)) + { + const SdrOle2Primitive2D& rCompare = (SdrOle2Primitive2D&)rPrimitive; + + if(getOLEContent() == rCompare.getOLEContent() + && getTransform() == rCompare.getTransform() + && getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute()) + { + return true; + } + } + + return false; + } + + Primitive2DSequence SdrOle2Primitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { // to take care of getSdrLFSTAttribute() later, the same as in SdrGrafPrimitive2D::create2DDecomposition // should happen. For the moment we only need the OLE itself @@ -122,34 +150,6 @@ namespace drawinglayer return aRetval; } - SdrOle2Primitive2D::SdrOle2Primitive2D( - const Primitive2DSequence& rOLEContent, - const basegfx::B2DHomMatrix& rTransform, - const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute) - : BasePrimitive2D(), - maOLEContent(rOLEContent), - maTransform(rTransform), - maSdrLFSTAttribute(rSdrLFSTAttribute) - { - } - - bool SdrOle2Primitive2D::operator==(const BasePrimitive2D& rPrimitive) const - { - if(BasePrimitive2D::operator==(rPrimitive)) - { - const SdrOle2Primitive2D& rCompare = (SdrOle2Primitive2D&)rPrimitive; - - if(getOLEContent() == rCompare.getOLEContent() - && getTransform() == rCompare.getTransform() - && getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute()) - { - return true; - } - } - - return false; - } - // provide unique ID ImplPrimitrive2DIDBlock(SdrOle2Primitive2D, PRIMITIVE2D_ID_SDROLE2PRIMITIVE2D) -- cgit -- cgit -- cgit From a6d693d98547c8aa172b5044c36b71160f8ad8f7 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 7 Oct 2009 14:25:40 +0200 Subject: #i105323# added FastPath for 3D scene HitTest for 3d CustomShapes by re-using the buffered last render result from the ScenePrimitive2D --- vcl/inc/vcl/bitmapex.hxx | 13 ++++++++ vcl/source/gdi/bitmapex.cxx | 73 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/vcl/inc/vcl/bitmapex.hxx b/vcl/inc/vcl/bitmapex.hxx index 3da80ce8c2f1..e5ddf50f1efa 100644 --- a/vcl/inc/vcl/bitmapex.hxx +++ b/vcl/inc/vcl/bitmapex.hxx @@ -381,6 +381,19 @@ public: const BmpFilterParam* pFilterParam = NULL, const Link* pProgress = NULL ); + /** Get transparency at given position + + @param nX + integer X-Position in Bitmap + + @param nY + integer Y-Position in Bitmap + + @return transparency value in the range of [0 .. 255] where + 0 is not transparent, 255 is fully transparent + */ + sal_uInt8 GetTransparency(sal_Int32 nX, sal_Int32 nY) const; + public: friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const BitmapEx& rBitmapEx ); diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index cfcac8851089..6626a12d29a2 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -47,6 +47,7 @@ #include #endif #include +#include // ------------ // - BitmapEx - @@ -761,6 +762,78 @@ void BitmapEx::Draw( OutputDevice* pOutDev, // ------------------------------------------------------------------ +sal_uInt8 BitmapEx::GetTransparency(sal_Int32 nX, sal_Int32 nY) const +{ + sal_uInt8 nTransparency(0xff); + + if(!aBitmap.IsEmpty()) + { + if(nX >= 0 && nX < aBitmapSize.Width() && nY >= 0 && nY < aBitmapSize.Height()) + { + switch(eTransparent) + { + case TRANSPARENT_NONE: + { + // not transparent, ergo all covered + nTransparency = 0x00; + break; + } + case TRANSPARENT_COLOR: + { + Bitmap aTestBitmap(aBitmap); + BitmapReadAccess* pRead = aTestBitmap.AcquireReadAccess(); + + if(pRead) + { + const Color aColor(Color(pRead->GetColor(nY, nX))); + + // if color is not equal to TransparentColor, we are not transparent + if(aColor != aTransparentColor) + { + nTransparency = 0x00; + } + + aTestBitmap.ReleaseAccess(pRead); + } + break; + } + case TRANSPARENT_BITMAP: + { + if(!aMask.IsEmpty()) + { + Bitmap aTestBitmap(aMask); + BitmapReadAccess* pRead = aTestBitmap.AcquireReadAccess(); + + if(pRead) + { + const BitmapColor aBitmapColor(pRead->GetPixel(nY, nX)); + + if(bAlpha) + { + nTransparency = aBitmapColor.GetIndex(); + } + else + { + if(0x00 != aBitmapColor.GetIndex()) + { + nTransparency = 0x00; + } + } + + aTestBitmap.ReleaseAccess(pRead); + } + } + break; + } + } + } + } + + return nTransparency; +} + +// ------------------------------------------------------------------ + SvStream& operator<<( SvStream& rOStm, const BitmapEx& rBitmapEx ) { rBitmapEx.aBitmap.Write( rOStm ); -- cgit From 407f7ae14844d0e55b9f0f87a19a7208762b05ed Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 7 Oct 2009 14:25:40 +0200 Subject: #i105323# added FastPath for 3D scene HitTest for 3d CustomShapes by re-using the buffered last render result from the ScenePrimitive2D --- .../drawinglayer/primitive2d/sceneprimitive2d.hxx | 17 ++- .../source/primitive2d/sceneprimitive2d.cxx | 116 +++++++++----- .../source/processor2d/hittestprocessor2d.cxx | 169 +++++++++++---------- svx/inc/svx/svddrgmt.hxx | 20 +++ svx/source/svdraw/svddrgmt.cxx | 50 +++++- 5 files changed, 255 insertions(+), 117 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx index 1cb433e6bff1..a86e32adca26 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx @@ -41,6 +41,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -70,9 +71,13 @@ namespace drawinglayer double mfOldDiscreteSizeY; basegfx::B2DRange maOldUnitVisiblePart; + // the last created BitmapEx, e.g. for fast HitTest. This does not really need + // memory since BitmapEx is internally RefCounted + BitmapEx maOldRenderedBitmap; + // private helpers bool impGetShadow3D(const geometry::ViewInformation2D& rViewInformation) const; - void calculateDsicreteSizes( + void calculateDiscreteSizes( const geometry::ViewInformation2D& rViewInformation, basegfx::B2DRange& rDiscreteRange, basegfx::B2DRange& rVisibleDiscreteRange, @@ -90,6 +95,16 @@ namespace drawinglayer Primitive2DSequence getGeometry2D() const; Primitive2DSequence getShadow2D(const geometry::ViewInformation2D& rViewInformation) const; + // Fast HitTest which uses the last buffered BitmapEx from the last + // rendered area if available. The return value describes if the check + // could be done with the current information, so do NOT use o_rResult + // when it returns false. o_rResult will be changed on return true and + // then contains a definitive answer if content of this scene is hit or + // not. On return false, it is normally necessary to use the geometric + // HitTest (see CutFindProcessor usages). The given HitPoint + // has to be in logic coordinates in scene's ObjectCoordinateSystem. + bool tryToCheckLastVisualisationDirectHit(const basegfx::B2DPoint& rLogicHitPoint, bool& o_rResult) const; + // constructor/destructor ScenePrimitive2D( const primitive3d::Primitive3DSequence& rxChildren3D, diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx index 7fa9fdec336c..6b346d5abdc0 100644 --- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx @@ -100,7 +100,7 @@ namespace drawinglayer return maShadowPrimitives.hasElements(); } - void ScenePrimitive2D::calculateDsicreteSizes( + void ScenePrimitive2D::calculateDiscreteSizes( const geometry::ViewInformation2D& rViewInformation, basegfx::B2DRange& rDiscreteRange, basegfx::B2DRange& rVisibleDiscreteRange, @@ -110,23 +110,12 @@ namespace drawinglayer rDiscreteRange = basegfx::B2DRange(0.0, 0.0, 1.0, 1.0); rDiscreteRange.transform(rViewInformation.getObjectToViewTransformation() * getObjectTransformation()); - // force to discrete expanded bounds (it grows, so expanding works perfectly well) - rDiscreteRange.expand(basegfx::B2DTuple(floor(rDiscreteRange.getMinX()), floor(rDiscreteRange.getMinY()))); - rDiscreteRange.expand(basegfx::B2DTuple(ceil(rDiscreteRange.getMaxX()), ceil(rDiscreteRange.getMaxY()))); - // clip it against discrete Viewport (if set) rVisibleDiscreteRange = rDiscreteRange; if(!rViewInformation.getViewport().isEmpty()) { rVisibleDiscreteRange.intersect(rViewInformation.getDiscreteViewport()); - - if(!rVisibleDiscreteRange.isEmpty()) - { - // force to discrete expanded bounds, too - rVisibleDiscreteRange.expand(basegfx::B2DTuple(floor(rVisibleDiscreteRange.getMinX()), floor(rVisibleDiscreteRange.getMinY()))); - rVisibleDiscreteRange.expand(basegfx::B2DTuple(ceil(rVisibleDiscreteRange.getMaxX()), ceil(rVisibleDiscreteRange.getMaxY()))); - } } if(rVisibleDiscreteRange.isEmpty()) @@ -177,11 +166,11 @@ namespace drawinglayer } } - // get the involved ranges (see helper method calculateDsicreteSizes for details) + // get the involved ranges (see helper method calculateDiscreteSizes for details) basegfx::B2DRange aDiscreteRange; basegfx::B2DRange aVisibleDiscreteRange; basegfx::B2DRange aUnitVisibleRange; - calculateDsicreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); + calculateDiscreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); if(!aVisibleDiscreteRange.isEmpty()) { @@ -204,11 +193,25 @@ namespace drawinglayer { // when reducing the visualisation is allowed (e.g. an OverlayObject // only needed for dragging), reduce resolution extra - // to speed up dragging interactions (1/4th currently) - const double fReducedVisualisationFactor(0.25); - fReduceFactor *= fReducedVisualisationFactor; - fViewSizeX *= fReducedVisualisationFactor; - fViewSizeY *= fReducedVisualisationFactor; + // to speed up dragging interactions + const double fArea(fViewSizeX * fViewSizeY); + double fReducedVisualisationFactor(1.0 / (sqrt(fArea) * (1.0 / 170.0))); + + if(fReducedVisualisationFactor > 1.0) + { + fReducedVisualisationFactor = 1.0; + } + else if(fReducedVisualisationFactor < 0.20) + { + fReducedVisualisationFactor = 0.20; + } + + if(fReducedVisualisationFactor != 1.0) + { + fReduceFactor *= fReducedVisualisationFactor; + fViewSizeX *= fReducedVisualisationFactor; + fViewSizeY *= fReducedVisualisationFactor; + } } // calculate logic render size in world coordinates for usage in renderer @@ -234,18 +237,16 @@ namespace drawinglayer aZBufferProcessor3D.processNonTransparent(getChildren3D()); aZBufferProcessor3D.processTransparent(getChildren3D()); - const BitmapEx aNewBitmap(aZBufferProcessor3D.getBitmapEx()); - const Size aBitmapSizePixel(aNewBitmap.GetSizePixel()); + const_cast< ScenePrimitive2D* >(this)->maOldRenderedBitmap = aZBufferProcessor3D.getBitmapEx(); + const Size aBitmapSizePixel(maOldRenderedBitmap.GetSizePixel()); if(aBitmapSizePixel.getWidth() && aBitmapSizePixel.getHeight()) { // create transform for the created bitmap in discrete coordinates first. - // #i97772# Do not forget to apply evtl. render size reduction to scaling basegfx::B2DHomMatrix aNew2DTransform; - const double fSizeReductionFactor(1.0 / fReduceFactor); - aNew2DTransform.set(0, 0, (double)(aBitmapSizePixel.getWidth() - 1) * fSizeReductionFactor); - aNew2DTransform.set(1, 1, (double)(aBitmapSizePixel.getHeight() - 1) * fSizeReductionFactor); + aNew2DTransform.set(0, 0, aVisibleDiscreteRange.getWidth()); + aNew2DTransform.set(1, 1, aVisibleDiscreteRange.getHeight()); aNew2DTransform.set(0, 2, aVisibleDiscreteRange.getMinX()); aNew2DTransform.set(1, 2, aVisibleDiscreteRange.getMinY()); @@ -253,7 +254,7 @@ namespace drawinglayer aNew2DTransform *= rViewInformation.getInverseObjectToViewTransformation(); // create bitmap primitive and add - const Primitive2DReference xRef(new BitmapPrimitive2D(aNewBitmap, aNew2DTransform)); + const Primitive2DReference xRef(new BitmapPrimitive2D(maOldRenderedBitmap, aNew2DTransform)); appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, xRef); // test: Allow to add an outline in the debugger when tests are needed @@ -308,6 +309,47 @@ namespace drawinglayer return aRetval; } + bool ScenePrimitive2D::tryToCheckLastVisualisationDirectHit(const basegfx::B2DPoint& rLogicHitPoint, bool& o_rResult) const + { + if(!maOldRenderedBitmap.IsEmpty() && !maOldUnitVisiblePart.isEmpty()) + { + basegfx::B2DHomMatrix aInverseSceneTransform(getObjectTransformation()); + aInverseSceneTransform.invert(); + const basegfx::B2DPoint aRelativePoint(aInverseSceneTransform * rLogicHitPoint); + + if(maOldUnitVisiblePart.isInside(aRelativePoint)) + { + // calculate coordinates relative to visualized part + double fDivisorX(maOldUnitVisiblePart.getWidth()); + double fDivisorY(maOldUnitVisiblePart.getHeight()); + + if(basegfx::fTools::equalZero(fDivisorX)) + { + fDivisorX = 1.0; + } + + if(basegfx::fTools::equalZero(fDivisorY)) + { + fDivisorY = 1.0; + } + + const double fRelativeX((aRelativePoint.getX() - maOldUnitVisiblePart.getMinX()) / fDivisorX); + const double fRelativeY((aRelativePoint.getY() - maOldUnitVisiblePart.getMinY()) / fDivisorY); + + // combine with real BitmapSizePixel to get bitmap coordinates + const Size aBitmapSizePixel(maOldRenderedBitmap.GetSizePixel()); + const sal_Int32 nX(basegfx::fround(fRelativeX * aBitmapSizePixel.Width())); + const sal_Int32 nY(basegfx::fround(fRelativeY * aBitmapSizePixel.Height())); + + // try to get a statement about transparency in that pixel + o_rResult = (0xff != maOldRenderedBitmap.GetTransparency(nX, nY)); + return true; + } + } + + return false; + } + ScenePrimitive2D::ScenePrimitive2D( const primitive3d::Primitive3DSequence& rxChildren3D, const attribute::SdrSceneAttribute& rSdrSceneAttribute, @@ -324,7 +366,8 @@ namespace drawinglayer mbShadow3DChecked(false), mfOldDiscreteSizeX(0.0), mfOldDiscreteSizeY(0.0), - maOldUnitVisiblePart() + maOldUnitVisiblePart(), + maOldRenderedBitmap() { } @@ -375,7 +418,7 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - // get the involved ranges (see helper method calculateDsicreteSizes for details) + // get the involved ranges (see helper method calculateDiscreteSizes for details) basegfx::B2DRange aDiscreteRange; basegfx::B2DRange aUnitVisibleRange; bool bNeedNewDecomposition(false); @@ -384,21 +427,22 @@ namespace drawinglayer if(getBuffered2DDecomposition().hasElements()) { basegfx::B2DRange aVisibleDiscreteRange; - calculateDsicreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); + calculateDiscreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); bDiscreteSizesAreCalculated = true; - // display has changed and cannot be reused when resolution did change - if(!basegfx::fTools::equal(aDiscreteRange.getWidth(), mfOldDiscreteSizeX) || - !basegfx::fTools::equal(aDiscreteRange.getHeight(), mfOldDiscreteSizeY)) + // needs to be painted when the new part is not part of the last + // decomposition + if(!maOldUnitVisiblePart.isInside(aUnitVisibleRange)) { bNeedNewDecomposition = true; } + // display has changed and cannot be reused when resolution got bigger. It + // can be reused when resolution got smaller, though. if(!bNeedNewDecomposition) { - // needs to be painted when the new part is not part of the last - // decomposition - if(!maOldUnitVisiblePart.isInside(aUnitVisibleRange)) + if(basegfx::fTools::more(aDiscreteRange.getWidth(), mfOldDiscreteSizeX) || + basegfx::fTools::more(aDiscreteRange.getHeight(), mfOldDiscreteSizeY)) { bNeedNewDecomposition = true; } @@ -416,7 +460,7 @@ namespace drawinglayer if(!bDiscreteSizesAreCalculated) { basegfx::B2DRange aVisibleDiscreteRange; - calculateDsicreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); + calculateDiscreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); } // remember last used NewDiscreteSize and NewUnitVisiblePart diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx index 98bbe2a82cb8..09eb6e3e71f6 100644 --- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx +++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx @@ -170,102 +170,113 @@ namespace drawinglayer { // calculate relative point in unified 2D scene const basegfx::B2DPoint aLogicHitPosition(getViewInformation2D().getInverseObjectToViewTransformation() * getDiscreteHitPosition()); - basegfx::B2DHomMatrix aInverseSceneTransform(rCandidate.getObjectTransformation()); - aInverseSceneTransform.invert(); - const basegfx::B2DPoint aRelativePoint(aInverseSceneTransform * aLogicHitPosition); - // check if test point is inside scene's unified area at all - if(aRelativePoint.getX() >= 0.0 && aRelativePoint.getX() <= 1.0 - && aRelativePoint.getY() >= 0.0 && aRelativePoint.getY() <= 1.0) - { - // get 3D view information - const geometry::ViewInformation3D& rObjectViewInformation3D = rCandidate.getViewInformation3D(); + // use bitmap check in ScenePrimitive2D + bool bTryFastResult(false); - // create HitPoint Front and Back, transform to object coordinates - basegfx::B3DHomMatrix aViewToObject(rObjectViewInformation3D.getObjectToView()); - aViewToObject.invert(); - const basegfx::B3DPoint aFront(aViewToObject * basegfx::B3DPoint(aRelativePoint.getX(), aRelativePoint.getY(), 0.0)); - const basegfx::B3DPoint aBack(aViewToObject * basegfx::B3DPoint(aRelativePoint.getX(), aRelativePoint.getY(), 1.0)); + if(rCandidate.tryToCheckLastVisualisationDirectHit(aLogicHitPosition, bTryFastResult)) + { + mbHit = bTryFastResult; + } + else + { + basegfx::B2DHomMatrix aInverseSceneTransform(rCandidate.getObjectTransformation()); + aInverseSceneTransform.invert(); + const basegfx::B2DPoint aRelativePoint(aInverseSceneTransform * aLogicHitPosition); - if(!aFront.equal(aBack)) + // check if test point is inside scene's unified area at all + if(aRelativePoint.getX() >= 0.0 && aRelativePoint.getX() <= 1.0 + && aRelativePoint.getY() >= 0.0 && aRelativePoint.getY() <= 1.0) { - const primitive3d::Primitive3DSequence& rPrimitives = rCandidate.getChildren3D(); + // get 3D view information + const geometry::ViewInformation3D& rObjectViewInformation3D = rCandidate.getViewInformation3D(); + + // create HitPoint Front and Back, transform to object coordinates + basegfx::B3DHomMatrix aViewToObject(rObjectViewInformation3D.getObjectToView()); + aViewToObject.invert(); + const basegfx::B3DPoint aFront(aViewToObject * basegfx::B3DPoint(aRelativePoint.getX(), aRelativePoint.getY(), 0.0)); + const basegfx::B3DPoint aBack(aViewToObject * basegfx::B3DPoint(aRelativePoint.getX(), aRelativePoint.getY(), 1.0)); - if(rPrimitives.hasElements()) + if(!aFront.equal(aBack)) { - // make BoundVolume empty and overlapping test for speedup - const basegfx::B3DRange aObjectRange( - drawinglayer::primitive3d::getB3DRangeFromPrimitive3DSequence( - rPrimitives, rObjectViewInformation3D)); + const primitive3d::Primitive3DSequence& rPrimitives = rCandidate.getChildren3D(); - if(!aObjectRange.isEmpty()) + if(rPrimitives.hasElements()) { - const basegfx::B3DRange aFrontBackRange(aFront, aBack); + // make BoundVolume empty and overlapping test for speedup + const basegfx::B3DRange aObjectRange( + drawinglayer::primitive3d::getB3DRangeFromPrimitive3DSequence( + rPrimitives, rObjectViewInformation3D)); - if(aObjectRange.overlaps(aFrontBackRange)) + if(!aObjectRange.isEmpty()) { - // bound volumes hit, geometric cut tests needed - drawinglayer::processor3d::CutFindProcessor aCutFindProcessor( - rObjectViewInformation3D, - aFront, - aBack, - true); - aCutFindProcessor.process(rPrimitives); - - mbHit = (0 != aCutFindProcessor.getCutPoints().size()); + const basegfx::B3DRange aFrontBackRange(aFront, aBack); + + if(aObjectRange.overlaps(aFrontBackRange)) + { + // bound volumes hit, geometric cut tests needed + drawinglayer::processor3d::CutFindProcessor aCutFindProcessor( + rObjectViewInformation3D, + aFront, + aBack, + true); + aCutFindProcessor.process(rPrimitives); + + mbHit = (0 != aCutFindProcessor.getCutPoints().size()); + } } } } } - } - // This is needed to check hit with 3D shadows, too. HitTest is without shadow - // to keep compatible with previous versions. Keeping here as reference - // - // if(!getHit()) - // { - // // if scene has shadow, check hit with shadow, too - // const primitive2d::Primitive2DSequence xExtracted2DSceneShadow(rCandidate.getShadow2D(getViewInformation2D())); - // - // if(xExtracted2DSceneShadow.hasElements()) - // { - // // proccess extracted 2D content - // process(xExtracted2DSceneShadow); - // } - // } - - if(!getHit()) - { - // empty 3D scene; Check for border hit - basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0))); - aOutline.transform(rCandidate.getObjectTransformation()); + // This is needed to check hit with 3D shadows, too. HitTest is without shadow + // to keep compatible with previous versions. Keeping here as reference + // + // if(!getHit()) + // { + // // if scene has shadow, check hit with shadow, too + // const primitive2d::Primitive2DSequence xExtracted2DSceneShadow(rCandidate.getShadow2D(getViewInformation2D())); + // + // if(xExtracted2DSceneShadow.hasElements()) + // { + // // proccess extracted 2D content + // process(xExtracted2DSceneShadow); + // } + // } + + if(!getHit()) + { + // empty 3D scene; Check for border hit + basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0))); + aOutline.transform(rCandidate.getObjectTransformation()); - mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); - } + mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); + } - // This is what the previous version did. Keeping it here for reference - // - // // 2D Scene primitive containing 3D stuff; extract 2D contour in world coordinates - // // This may be refined later to an own 3D HitTest renderer which processes the 3D - // // geometry directly - // const primitive2d::ScenePrimitive2D& rScenePrimitive2DCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate)); - // const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D()); - // const primitive2d::Primitive2DSequence xExtracted2DSceneShadow(rScenePrimitive2DCandidate.getShadow2D(getViewInformation2D())); - // - // if(xExtracted2DSceneGeometry.hasElements() || xExtracted2DSceneShadow.hasElements()) - // { - // // proccess extracted 2D content - // process(xExtracted2DSceneGeometry); - // process(xExtracted2DSceneShadow); - // } - // else - // { - // // empty 3D scene; Check for border hit - // const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D())); - // basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); - // - // mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); - // } + // This is what the previous version did. Keeping it here for reference + // + // // 2D Scene primitive containing 3D stuff; extract 2D contour in world coordinates + // // This may be refined later to an own 3D HitTest renderer which processes the 3D + // // geometry directly + // const primitive2d::ScenePrimitive2D& rScenePrimitive2DCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate)); + // const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D()); + // const primitive2d::Primitive2DSequence xExtracted2DSceneShadow(rScenePrimitive2DCandidate.getShadow2D(getViewInformation2D())); + // + // if(xExtracted2DSceneGeometry.hasElements() || xExtracted2DSceneShadow.hasElements()) + // { + // // proccess extracted 2D content + // process(xExtracted2DSceneGeometry); + // process(xExtracted2DSceneShadow); + // } + // else + // { + // // empty 3D scene; Check for border hit + // const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D())); + // basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + // + // mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); + // } + } } void HitTestProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) diff --git a/svx/inc/svx/svddrgmt.hxx b/svx/inc/svx/svddrgmt.hxx index fa4e09c9a324..91112a7dd287 100644 --- a/svx/inc/svx/svddrgmt.hxx +++ b/svx/inc/svx/svddrgmt.hxx @@ -107,6 +107,22 @@ public: ////////////////////////////////////////////////////////////////////////////// +class SdrDragEntryPrimitive2DSequence : public SdrDragEntry +{ +private: + drawinglayer::primitive2d::Primitive2DSequence maPrimitive2DSequence; + +public: + SdrDragEntryPrimitive2DSequence( + const drawinglayer::primitive2d::Primitive2DSequence& rSequence, + bool bAddToTransparent); + virtual ~SdrDragEntryPrimitive2DSequence(); + + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod); +}; + +////////////////////////////////////////////////////////////////////////////// + class SdrDragEntryPointGlueDrag : public SdrDragEntry { private: @@ -138,6 +154,7 @@ protected: void clearSdrDragEntries() { for(sal_uInt32 a(0); a < maSdrDragEntries.size(); a++) { delete maSdrDragEntries[a]; } maSdrDragEntries.clear(); } void addSdrDragEntry(SdrDragEntry* pNew) { if(pNew) { maSdrDragEntries.push_back(pNew); }} virtual void createSdrDragEntries(); + virtual void createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool bModify); // access for derivated classes to maOverlayObjectList void clearOverlayObjectList() { maOverlayObjectList.clear(); } @@ -236,6 +253,9 @@ private: void ImpCheckSnap(const Point& rPt); +protected: + virtual void createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool bModify); + public: TYPEINFO(); SdrDragMove(SdrDragView& rNewView); diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 254e5daa741f..b953e68a753d 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -207,6 +207,32 @@ drawinglayer::primitive2d::Primitive2DSequence SdrDragEntrySdrObject::createPrim //////////////////////////////////////////////////////////////////////////////////////////////////// +SdrDragEntryPrimitive2DSequence::SdrDragEntryPrimitive2DSequence( + const drawinglayer::primitive2d::Primitive2DSequence& rSequence, + bool bAddToTransparent) +: SdrDragEntry(), + maPrimitive2DSequence(rSequence) +{ + // add parts to transparent overlay stuff eventually + setAddToTransparent(bAddToTransparent); +} + +SdrDragEntryPrimitive2DSequence::~SdrDragEntryPrimitive2DSequence() +{ +} + +drawinglayer::primitive2d::Primitive2DSequence SdrDragEntryPrimitive2DSequence::createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) +{ + drawinglayer::primitive2d::Primitive2DReference aTransformPrimitive2D( + new drawinglayer::primitive2d::TransformPrimitive2D( + rDragMethod.getCurrentTransformation(), + maPrimitive2DSequence)); + + return drawinglayer::primitive2d::Primitive2DSequence(&aTransformPrimitive2D, 1); +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// + SdrDragEntryPointGlueDrag::SdrDragEntryPointGlueDrag(const std::vector< basegfx::B2DPoint >& rPositions, bool bIsPointDrag) : maPositions(rPositions), mbIsPointDrag(bIsPointDrag) @@ -319,6 +345,13 @@ void SdrDragMethod::createSdrDragEntries() } } +void SdrDragMethod::createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool bModify) +{ + // add full obejct drag; Clone() at the object has to work + // for this + addSdrDragEntry(new SdrDragEntrySdrObject(rOriginal, rObjectContact, bModify)); +} + void SdrDragMethod::createSdrDragEntries_SolidDrag() { const sal_uInt32 nMarkAnz(getSdrDragView().GetMarkedObjectCount()); @@ -360,7 +393,7 @@ void SdrDragMethod::createSdrDragEntries_SolidDrag() { // add full obejct drag; Clone() at the object has to work // for this - addSdrDragEntry(new SdrDragEntrySdrObject(*pCandidate, rOC, true)); + createSdrDragEntryForSdrObject(*pCandidate, rOC, true); } if(bAddWireframe) @@ -1349,6 +1382,21 @@ Pointer SdrDragObjOwn::GetSdrDragPointer() const TYPEINIT1(SdrDragMove,SdrDragMethod); +void SdrDragMove::createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool /*bModify*/) +{ + // for SdrDragMove, use current Primitive2DSequence of SdrObject visualisation + // in given ObjectContact directly + sdr::contact::ViewContact& rVC = rOriginal.GetViewContact(); + sdr::contact::ViewObjectContact& rVOC = rVC.GetViewObjectContact(rObjectContact); + sdr::contact::DisplayInfo aDisplayInfo; + + // Do not use the last ViewPort set at the OC from the last ProcessDisplay(), + // here we want the complete primitive sequence without visibility clippings + rObjectContact.resetViewPort(); + + addSdrDragEntry(new SdrDragEntryPrimitive2DSequence(rVOC.getPrimitive2DSequenceHierarchy(aDisplayInfo), true)); +} + void SdrDragMove::applyCurrentTransformationToSdrObject(SdrObject& rTarget) { rTarget.Move(Size(DragStat().GetDX(), DragStat().GetDY())); -- cgit From f678fbae66d80e762faa29e7ab0fe3703f005275 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 8 Oct 2009 17:35:07 +0200 Subject: #i105459# enhanced circles/ellipes for more mathematical correctness --- basegfx/inc/basegfx/polygon/b2dpolygontools.hxx | 61 ------ basegfx/source/polygon/b2dpolygontools.cxx | 265 ++++++++++++------------ 2 files changed, 136 insertions(+), 190 deletions(-) diff --git a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx index 5eff6b0b9cc1..47ff41b75e70 100644 --- a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx +++ b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx @@ -288,14 +288,6 @@ namespace basegfx */ B2DPolygon createPolygonFromCircle( const B2DPoint& rCenter, double fRadius ); - /** append a unit circle with one point and the control vectors to the given polygon - */ - void appendUnitCircleQuadrant(B2DPolygon& rPolygon, sal_uInt32 nQuadrant, bool bEndPoint); - - /** append a segment of unit circle with one point and the control vectors to the given polygon - */ - void appendUnitCircleQuadrantSegment(B2DPolygon& rPolygon, sal_uInt32 nQuadrant, double fStart, double fEnd, bool bEndPoint); - /** create a polygon which describes the unit circle and close it @param nStartQuadrant @@ -325,59 +317,6 @@ namespace basegfx */ B2DPolygon createPolygonFromEllipse( const B2DPoint& rCenter, double fRadiusX, double fRadiusY ); - /** append a unit circle with one point and the control vectors to the given polygon - */ - void appendUnitCircleQuadrant(B2DPolygon& rPolygon, sal_uInt32 nQuadrant); - - /** append a segment of unit circle with start point, the control vectors and end point to the given polygon - */ - void appendUnitCircleQuadrantSegment(B2DPolygon& rPolygon, sal_uInt32 nQuadrant, double fStart, double fEnd); - - /** Create an ellipse polygon with given radii. - - This method creates an ellipse approximation consisting of - four cubic bezier segments, which approximate the given - ellipse with an error of less than 0.5 percent. - - @param rCenter - Center point of the circle - - @param fRadiusX - Radius of the ellipse in X direction - - @param fRadiusY - Radius of the ellipse in Y direction - - @param fStart - Start angle where the ellipe segment starts in the range [0.0 .. 2PI[ - - @param fEnd - End angle where the ellipe segment ends in the range [0.0 .. 2PI[ - */ - B2DPolygon createPolygonFromEllipse( const B2DPoint& rCenter, double fRadiusX, double fRadiusY ); - - /** Create an ellipse polygon with given radii and the given angles, from start to end - - This method creates an ellipse approximation consisting of - four cubic bezier segments, which approximate the given - ellipse with an error of less than 0.5 percent. - - @param rCenter - Center point of the circle - - @param fRadiusX - Radius of the ellipse in X direction - - @param fRadiusY - Radius of the ellipse in Y direction - - @param fStart - Start angle where the ellipe segment starts in the range [0.0 .. 2PI[ - - @param fEnd - End angle where the ellipe segment ends in the range [0.0 .. 2PI[ - */ - /** Create an unit ellipse polygon with the given angles, from start to end */ B2DPolygon createPolygonFromEllipseSegment( const B2DPoint& rCenter, double fRadiusX, double fRadiusY, double fStart, double fEnd ); diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx index 6e288786df6d..da3fa202c2a4 100644 --- a/basegfx/source/polygon/b2dpolygontools.cxx +++ b/basegfx/source/polygon/b2dpolygontools.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -55,6 +56,7 @@ #ifdef DBG_UTIL static double fAngleBoundStartValue = ANGLE_BOUND_START_VALUE; #endif +#define STEPSPERQUARTER (3) ////////////////////////////////////////////////////////////////////////////// @@ -1832,126 +1834,106 @@ namespace basegfx return createPolygonFromEllipse( rCenter, fRadius, fRadius ); } - void appendUnitCircleQuadrant(B2DPolygon& rPolygon, sal_uInt32 nQuadrant) + B2DPolygon impCreateUnitCircle(sal_uInt32 nStartQuadrant) { - const double fZero(0.0); - const double fOne(1.0); + B2DPolygon aUnitCircle; const double fKappa((M_SQRT2 - 1.0) * 4.0 / 3.0); + const double fScaledKappa(fKappa * (1.0 / STEPSPERQUARTER)); + const B2DHomMatrix aRotateMatrix(createRotateB2DHomMatrix(F_PI2 / STEPSPERQUARTER)); + + B2DPoint aPoint(1.0, 0.0); + B2DPoint aForward(1.0, fScaledKappa); + B2DPoint aBackward(1.0, -fScaledKappa); - // create closed unit-circle with 4 segments - switch(nQuadrant) + if(0 != nStartQuadrant) { - case 0 : // first quadrant - { - rPolygon.append(B2DPoint(fOne, fZero)); - rPolygon.appendBezierSegment(B2DPoint(fOne, fKappa), B2DPoint(fKappa, fOne), B2DPoint(fZero, fOne)); - break; - } - case 1 : // second quadrant - { - rPolygon.append(B2DPoint(fZero, fOne)); - rPolygon.appendBezierSegment(B2DPoint(-fKappa, fOne), B2DPoint(-fOne, fKappa), B2DPoint(-fOne, fZero)); - break; - } - case 2 : // third quadrant - { - rPolygon.append(B2DPoint(-fOne, fZero)); - rPolygon.appendBezierSegment(B2DPoint(-fOne, -fKappa), B2DPoint(-fKappa, -fOne), B2DPoint(fZero, -fOne)); - break; - } - default : // last quadrant - { - rPolygon.append(B2DPoint(fZero, -fOne)); - rPolygon.appendBezierSegment(B2DPoint(fKappa, -fOne), B2DPoint(fOne, -fKappa), B2DPoint(fOne, fZero)); - break; - } + const B2DHomMatrix aQuadrantMatrix(createRotateB2DHomMatrix(F_PI2 * (nStartQuadrant % 4))); + aPoint *= aQuadrantMatrix; + aBackward *= aQuadrantMatrix; + aForward *= aQuadrantMatrix; } - } - - B2DPolygon createPolygonFromUnitCircle(sal_uInt32 nStartQuadrant) - { - B2DPolygon aRetval; - - // create unit-circle with all 4 segments, close it - appendUnitCircleQuadrant(aRetval, nStartQuadrant % 4); nStartQuadrant++; - appendUnitCircleQuadrant(aRetval, nStartQuadrant % 4); nStartQuadrant++; - appendUnitCircleQuadrant(aRetval, nStartQuadrant % 4); nStartQuadrant++; - appendUnitCircleQuadrant(aRetval, nStartQuadrant % 4); nStartQuadrant++; - aRetval.setClosed(true); - // remove double points between segments created by segmented creation - aRetval.removeDoublePoints(); - - return aRetval; - } + aUnitCircle.append(aPoint); - B2DPolygon createPolygonFromEllipse( const B2DPoint& rCenter, double fRadiusX, double fRadiusY ) - { - B2DPolygon aRetval(createPolygonFromUnitCircle()); - const B2DHomMatrix aMatrix(createScaleTranslateB2DHomMatrix(fRadiusX, fRadiusY, rCenter.getX(), rCenter.getY())); + for(sal_uInt32 a(0); a < STEPSPERQUARTER * 4; a++) + { + aPoint *= aRotateMatrix; + aBackward *= aRotateMatrix; + aUnitCircle.appendBezierSegment(aForward, aBackward, aPoint); + aForward *= aRotateMatrix; + } - aRetval.transform(aMatrix); + aUnitCircle.setClosed(true); + aUnitCircle.removeDoublePoints(); - return aRetval; + return aUnitCircle; } - void appendUnitCircleQuadrantSegment(B2DPolygon& rPolygon, sal_uInt32 nQuadrant, double fStart, double fEnd) + B2DPolygon createPolygonFromUnitCircle(sal_uInt32 nStartQuadrant) { - OSL_ENSURE(fStart >= 0.0 && fStart <= 1.0, "appendUnitCircleQuadrantSegment: Access out of range (!)"); - OSL_ENSURE(fEnd >= 0.0 && fEnd <= 1.0, "appendUnitCircleQuadrantSegment: Access out of range (!)"); - OSL_ENSURE(fEnd >= fStart, "appendUnitCircleQuadrantSegment: Access out of range (!)"); - const double fOne(1.0); - const bool bStartIsZero(fTools::equalZero(fStart)); - const bool bEndIsOne(fTools::equal(fEnd, fOne)); - - if(bStartIsZero && bEndIsOne) + switch(nStartQuadrant % 4) { - // add completely - appendUnitCircleQuadrant(rPolygon, nQuadrant); - } - else - { - // split and add - B2DPolygon aQuadrant; - appendUnitCircleQuadrant(aQuadrant, nQuadrant); - const bool bStartEndEqual(fTools::equal(fStart, fEnd)); - - if(bStartEndEqual) + case 1 : { - if(bStartIsZero) + static B2DPolygon aUnitCircleStartQuadrantOne; + + if(!aUnitCircleStartQuadrantOne.count()) { - // both zero, add start point - rPolygon.append(aQuadrant.getB2DPoint(0L)); + ::osl::Mutex m_mutex; + aUnitCircleStartQuadrantOne = impCreateUnitCircle(1); } - else if(bEndIsOne) + + return aUnitCircleStartQuadrantOne; + } + case 2 : + { + static B2DPolygon aUnitCircleStartQuadrantTwo; + + if(!aUnitCircleStartQuadrantTwo.count()) { - // both one, add end point - rPolygon.append(aQuadrant.getB2DPoint(1L)); + ::osl::Mutex m_mutex; + aUnitCircleStartQuadrantTwo = impCreateUnitCircle(2); } - else - { - // both equal but not zero, add split point - B2DCubicBezier aCubicBezier( - aQuadrant.getB2DPoint(0L), aQuadrant.getNextControlPoint(0L), - aQuadrant.getPrevControlPoint(1L), aQuadrant.getB2DPoint(1L)); - aCubicBezier.split(fStart, &aCubicBezier, 0); - rPolygon.append(aCubicBezier.getEndPoint()); + return aUnitCircleStartQuadrantTwo; + } + case 3 : + { + static B2DPolygon aUnitCircleStartQuadrantThree; + + if(!aUnitCircleStartQuadrantThree.count()) + { + ::osl::Mutex m_mutex; + aUnitCircleStartQuadrantThree = impCreateUnitCircle(3); } + + return aUnitCircleStartQuadrantThree; } - else + default : // case 0 : { - B2DCubicBezier aCubicBezier( - aQuadrant.getB2DPoint(0L), aQuadrant.getNextControlPoint(0L), - aQuadrant.getPrevControlPoint(1L), aQuadrant.getB2DPoint(1L)); + static B2DPolygon aUnitCircleStartQuadrantZero; - aCubicBezier = aCubicBezier.snippet(fStart, fEnd); - rPolygon.append(aCubicBezier.getStartPoint()); - rPolygon.appendBezierSegment(aCubicBezier.getControlPointA(), aCubicBezier.getControlPointB(), aCubicBezier.getEndPoint()); + if(!aUnitCircleStartQuadrantZero.count()) + { + ::osl::Mutex m_mutex; + aUnitCircleStartQuadrantZero = impCreateUnitCircle(0); + } + + return aUnitCircleStartQuadrantZero; } } } + B2DPolygon createPolygonFromEllipse( const B2DPoint& rCenter, double fRadiusX, double fRadiusY ) + { + B2DPolygon aRetval(createPolygonFromUnitCircle()); + const B2DHomMatrix aMatrix(createScaleTranslateB2DHomMatrix(fRadiusX, fRadiusY, rCenter.getX(), rCenter.getY())); + + aRetval.transform(aMatrix); + + return aRetval; + } + B2DPolygon createPolygonFromUnitEllipseSegment( double fStart, double fEnd ) { B2DPolygon aRetval; @@ -1978,49 +1960,74 @@ namespace basegfx fEnd = 0.0; } - const sal_uInt32 nQuadrantStart(sal_uInt32(fStart / F_PI2) % 4L); - const sal_uInt32 nQuadrantEnd(sal_uInt32(fEnd / F_PI2) % 4L); - sal_uInt32 nCurrentQuadrant(nQuadrantStart); - bool bStartDone(false); - bool bEndDone(false); - - do + if(fTools::equal(fStart, fEnd)) { - if(!bStartDone && nQuadrantStart == nCurrentQuadrant) - { - if(nQuadrantStart == nQuadrantEnd && fTools::moreOrEqual(fEnd, fStart)) - { - // both in one quadrant and defining the complete segment, create start to end - double fSplitOffsetStart((fStart - (nCurrentQuadrant * F_PI2)) / F_PI2); - double fSplitOffsetEnd((fEnd - (nCurrentQuadrant * F_PI2)) / F_PI2); - appendUnitCircleQuadrantSegment(aRetval, nCurrentQuadrant, fSplitOffsetStart, fSplitOffsetEnd); - bStartDone = bEndDone = true; - } - else - { - // create start to quadrant end - const double fSplitOffsetStart((fStart - (nCurrentQuadrant * F_PI2)) / F_PI2); - appendUnitCircleQuadrantSegment(aRetval, nCurrentQuadrant, fSplitOffsetStart, 1.0); - bStartDone = true; - } - } - else if(!bEndDone && nQuadrantEnd == nCurrentQuadrant) + // same start and end angle, add single point + aRetval.append(B2DPoint(cos(fStart), sin(fStart))); + } + else + { + const sal_uInt32 nSegments(STEPSPERQUARTER * 4); + const double fAnglePerSegment(F_PI2 / STEPSPERQUARTER); + const sal_uInt32 nStartSegment(sal_uInt32(fStart / fAnglePerSegment) % nSegments); + const sal_uInt32 nEndSegment(sal_uInt32(fEnd / fAnglePerSegment) % nSegments); + const double fKappa((M_SQRT2 - 1.0) * 4.0 / 3.0); + const double fScaledKappa(fKappa * (1.0 / STEPSPERQUARTER)); + + B2DPoint aSegStart(cos(fStart), sin(fStart)); + aRetval.append(aSegStart); + + if(nStartSegment == nEndSegment && fTools::more(fEnd, fStart)) { - // create quadrant start to end - const double fSplitOffsetEnd((fEnd - (nCurrentQuadrant * F_PI2)) / F_PI2); - appendUnitCircleQuadrantSegment(aRetval, nCurrentQuadrant, 0.0, fSplitOffsetEnd); - bEndDone = true; + // start and end in one sector and in the right order, create in one segment + const B2DPoint aSegEnd(cos(fEnd), sin(fEnd)); + const double fFactor(fScaledKappa * ((fEnd - fStart) / fAnglePerSegment)); + + aRetval.appendBezierSegment( + aSegStart + (B2DPoint(-aSegStart.getY(), aSegStart.getX()) * fFactor), + aSegEnd - (B2DPoint(-aSegEnd.getY(), aSegEnd.getX()) * fFactor), + aSegEnd); } else { - // add quadrant completely - appendUnitCircleQuadrant(aRetval, nCurrentQuadrant); - } + double fSegEndRad((nStartSegment + 1) * fAnglePerSegment); + double fFactor(fScaledKappa * ((fSegEndRad - fStart) / fAnglePerSegment)); + B2DPoint aSegEnd(cos(fSegEndRad), sin(fSegEndRad)); + + aRetval.appendBezierSegment( + aSegStart + (B2DPoint(-aSegStart.getY(), aSegStart.getX()) * fFactor), + aSegEnd - (B2DPoint(-aSegEnd.getY(), aSegEnd.getX()) * fFactor), + aSegEnd); + + sal_uInt32 nSegment((nStartSegment + 1) % nSegments); + aSegStart = aSegEnd; + + while(nSegment != nEndSegment) + { + // No end in this sector, add full sector. + fSegEndRad = (nSegment + 1) * fAnglePerSegment; + aSegEnd = B2DPoint(cos(fSegEndRad), sin(fSegEndRad)); - // next step - nCurrentQuadrant = (nCurrentQuadrant + 1L) % 4L; + aRetval.appendBezierSegment( + aSegStart + (B2DPoint(-aSegStart.getY(), aSegStart.getX()) * fScaledKappa), + aSegEnd - (B2DPoint(-aSegEnd.getY(), aSegEnd.getX()) * fScaledKappa), + aSegEnd); + + nSegment = (nSegment + 1) % nSegments; + aSegStart = aSegEnd; + } + + // End in this sector + const double fSegStartRad(nSegment * fAnglePerSegment); + fFactor = fScaledKappa * ((fEnd - fSegStartRad) / fAnglePerSegment); + aSegEnd = B2DPoint(cos(fEnd), sin(fEnd)); + + aRetval.appendBezierSegment( + aSegStart + (B2DPoint(-aSegStart.getY(), aSegStart.getX()) * fFactor), + aSegEnd - (B2DPoint(-aSegEnd.getY(), aSegEnd.getX()) * fFactor), + aSegEnd); + } } - while(!(bStartDone && bEndDone)); // remove double points between segments created by segmented creation aRetval.removeDoublePoints(); -- cgit From d31f8767523a22e5038bf7bc26e1f7d9ce25d16c Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 8 Oct 2009 17:35:07 +0200 Subject: #i105459# enhanced circles/ellipes for more mathematical correctness --- svx/source/svdraw/svdocirc.cxx | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 88cab2851359..0b7f9c4b49d8 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -226,19 +226,13 @@ basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, c if(OBJ_CIRC == eCicrleKind) { - // create full circle. Do not use createPolygonFromEllipse, but the single - // calls to appendUnitCircleQuadrant() to get the start point to the bottom of the - // circle to keep compatible to old geometry creation - basegfx::tools::appendUnitCircleQuadrant(aCircPolygon, 1); - basegfx::tools::appendUnitCircleQuadrant(aCircPolygon, 2); - basegfx::tools::appendUnitCircleQuadrant(aCircPolygon, 3); - basegfx::tools::appendUnitCircleQuadrant(aCircPolygon, 0); - aCircPolygon.setClosed(true); - - // remove double points between segments created by segmented creation - aCircPolygon.removeDoublePoints(); - - // needs own scaling and translation from unit circle to target size + // create full circle. Do not use createPolygonFromEllipse; it's necessary + // to get the start point to the bottom of the circle to keep compatible to + // old geometry creation + aCircPolygon = basegfx::tools::createPolygonFromUnitCircle(1); + + // needs own scaling and translation from unit circle to target size (same as + // would be in createPolygonFromEllipse) const basegfx::B2DPoint aCenter(aRange.getCenter()); const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix( aRange.getWidth() / 2.0, aRange.getHeight() / 2.0, @@ -252,7 +246,9 @@ basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, c const double fEnd(((36000 - nStart) % 36000) * F_PI18000); // create circle segment. This is not closed by default - aCircPolygon = basegfx::tools::createPolygonFromEllipseSegment(aRange.getCenter(), aRange.getWidth() / 2.0, aRange.getHeight() / 2.0, fStart, fEnd); + aCircPolygon = basegfx::tools::createPolygonFromEllipseSegment( + aRange.getCenter(), aRange.getWidth() / 2.0, aRange.getHeight() / 2.0, + fStart, fEnd); // check closing states const bool bCloseSegment(OBJ_CARC != eCicrleKind); -- cgit From d280fada4056f6e1a9db7b4f6adf58c547864270 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 13 Oct 2009 13:03:26 +0200 Subject: #i105639# made two functions const (patch by cmc) --- sal/inc/osl/thread.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sal/inc/osl/thread.hxx b/sal/inc/osl/thread.hxx index 0df24e07587a..b770120c167e 100644 --- a/sal/inc/osl/thread.hxx +++ b/sal/inc/osl/thread.hxx @@ -117,7 +117,7 @@ public: osl_joinWithThread(m_hThread); } - sal_Bool SAL_CALL isRunning() + sal_Bool SAL_CALL isRunning() const { return osl_isThreadRunning(m_hThread); } @@ -128,7 +128,7 @@ public: osl_setThreadPriority(m_hThread, Priority); } - oslThreadPriority SAL_CALL getPriority() + oslThreadPriority SAL_CALL getPriority() const { return m_hThread ? osl_getThreadPriority(m_hThread) : osl_Thread_PriorityUnknown; } -- cgit From a27762592f7f86d935275ab3dbaa673c701aaaa9 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 13 Oct 2009 13:05:09 +0200 Subject: #i105803# removed reference to obsolete com.sun.star.tools.uno package (patch by cmc) --- odk/pack/gendocu/makefile.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/odk/pack/gendocu/makefile.mk b/odk/pack/gendocu/makefile.mk index 5b070ca043f6..1970acebda7a 100644 --- a/odk/pack/gendocu/makefile.mk +++ b/odk/pack/gendocu/makefile.mk @@ -52,7 +52,6 @@ JAVA_PACKAGES=\ com.sun.star.comp.helper \ com.sun.star.lib.uno.helper \ com.sun.star.lib.unoloader \ - com.sun.star.tools.uno \ com.sun.star.uno \ $(JAVA_SRC_DIR)$/com$/sun$/star$/lib$/util$/UrlToFileMapper.java # com.sun.star.beans \ -- cgit From d763f15f1f81872d6fd0f9a10d10b90238ed2b23 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 13 Oct 2009 13:09:45 +0200 Subject: #i105348# get rid of LinuxThread-specific code (NPTL define) --- configure | 3 --- configure.in | 3 --- solenv/config/sdev300.ini | 2 -- solenv/config/ssolar.cmn | 1 - solenv/inc/unxlng.mk | 2 +- 5 files changed, 1 insertion(+), 10 deletions(-) diff --git a/configure b/configure index 06ed74cb9b58..2c97394a4275 100755 --- a/configure +++ b/configure @@ -4498,9 +4498,6 @@ $as_echo "$as_me: error: only sparc and i386 processors are supported" >&2;} test_cups=yes test_randr=yes test_freetype=yes - if getconf GNU_LIBPTHREAD_VERSION |grep -q NPTL; then - PTHREAD_CFLAGS="-DNPTL" - fi _os=Linux ;; gnu) diff --git a/configure.in b/configure.in index aff65d6d1583..b22ec11fe289 100644 --- a/configure.in +++ b/configure.in @@ -937,9 +937,6 @@ case "$build_os" in test_cups=yes test_randr=yes test_freetype=yes - if getconf GNU_LIBPTHREAD_VERSION |grep -q NPTL; then - PTHREAD_CFLAGS="-DNPTL" - fi _os=Linux ;; gnu) diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini index 8b65e8b111e9..afe5aac44201 100644 --- a/solenv/config/sdev300.ini +++ b/solenv/config/sdev300.ini @@ -1000,7 +1000,6 @@ unxlngx6 DEVROOT %SOLAR_ENV_ROOT% PERL %SOLAR_ENV_ROOT%/bt_linux_libc2.11/%WORK_STAMP%/bin/perl PKGFORMAT rpm - PTHREAD_CFLAGS -DNPTL SHARED_SOLARENV %SOLAR_SOURCE_ROOT%/%WORK_STAMP%/src%UPDMINOREXT%/solenv SHARED_SOLARVERSION %SOLAR_SOURCE_ROOT%/%WORK_STAMP% SOLARENV %SOLAR_SOURCE_ROOT%/%WORK_STAMP%/src%UPDMINOREXT%/solenv @@ -2529,7 +2528,6 @@ unxubti8 PAM_LINK NO PERL /usr/bin/perl PKGFORMAT deb - PTHREAD_CFLAGS -DNPTL SOLARENV %SOLAR_SOURCE_ROOT%/%WORK_STAMP%/src%UPDMINOREXT%/solenv SOLARROOT %SOLAR_ENV_ROOT% SOLARVER %SOLAR_SOURCE_ROOT%/%WORK_STAMP% diff --git a/solenv/config/ssolar.cmn b/solenv/config/ssolar.cmn index dca20cc902b1..039bdcfcc898 100644 --- a/solenv/config/ssolar.cmn +++ b/solenv/config/ssolar.cmn @@ -169,7 +169,6 @@ common PROFILE profile PROSWITCH - PTHREAD_CFLAGS REMOTE_BUILD_FLAG RES_ARAB RES_CHINSIM diff --git a/solenv/inc/unxlng.mk b/solenv/inc/unxlng.mk index a79d3e47c6cf..b496da7917da 100644 --- a/solenv/inc/unxlng.mk +++ b/solenv/inc/unxlng.mk @@ -47,7 +47,7 @@ JAVAFLAGSDEBUG=-g #LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" # _PTHREADS is needed for the stl -CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) +CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) # enable visibility define in "sal/types.h" .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -- cgit From 4e9db26ac86b8e140cc90094d0ab38cfed964e15 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 13 Oct 2009 13:09:45 +0200 Subject: #i105348# get rid of LinuxThread-specific code (NPTL define) --- sal/osl/unx/process.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index a1f47cdf76a5..7966651bed86 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -490,11 +490,6 @@ static void ChildStatusProc(void *pData) for (i = 0; data.m_pszEnv[i] != NULL; i++) putenv(data.m_pszEnv[i]); -#if defined(LINUX) && !defined(NPTL) - /* mfe: linux likes to have just one thread when the exec family is called */ - /* this np function has this purpose ... */ - pthread_kill_other_threads_np(); -#endif OSL_TRACE("ChildStatusProc : starting '%s'",data.m_pszArgs[0]); /* Connect std IO to pipe ends */ -- cgit From 877d9928899d6818c262843f626d2783bd888561 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Tue, 13 Oct 2009 13:30:56 +0200 Subject: #i105738# - corrected check for system credentials availability logic. --- ucb/source/ucp/webdav/NeonSession.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index b455ffebbb9b..ac581fcf7581 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -329,8 +329,8 @@ extern "C" int NeonSession_NeonAuth( void * inUserData, #ifdef NE_FEATURE_SSPI bCanUseSystemCreds = (attempt == 0) && // avoid endless loops ne_has_support( NE_FEATURE_SSPI ) && // Windows-only feature. - ( ne_strcasecmp( inAuthProtocol, "NTLM" ) == 0 ) || - ( ne_strcasecmp( inAuthProtocol, "Negotiate" ) == 0 ); + ( ( ne_strcasecmp( inAuthProtocol, "NTLM" ) == 0 ) || + ( ne_strcasecmp( inAuthProtocol, "Negotiate" ) == 0 ) ); #endif // #i97003# (tkr): Ask XMasterPasswordHandling if we should store the -- cgit From d02b19b2ffddfba220cbbfee4da15093ede10d84 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 13 Oct 2009 14:03:56 +0200 Subject: #i105059# removed PYTHONPATH from build environment --- set_soenv.in | 13 +------------ solenv/config/ssolar.cmn | 1 - 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/set_soenv.in b/set_soenv.in index 71f6d6bf90df..2296f1d41020 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -90,7 +90,7 @@ my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAVA_HOME, $JDK, $JAVAFLAGS, $SHELL, $COMMON_BUILD_TOOLS, $WIN_GREP, $WIN_FIND, $WIN_LS, $WIN_GNUCOPY, $WIN_TOUCH, $STLPORT4, $MOZILLA_VERSION, $MOZILLA_TOOLKIT, $PREBUILD_MOZAB, $MOZILLABUILD, $PROEXT, - $SYSTEM_PYTHON, $PYTHONPATH, $SYSTEM_MOZILLA, $EPM_FLAGS); + $SYSTEM_PYTHON, $SYSTEM_MOZILLA, $EPM_FLAGS); # #------------------------------------------- # IId. Declaring the aliases. @@ -1506,14 +1506,6 @@ else { AddWarning( "set_soenv", "$platform not configured for system dependant include dir" ); } -if ($SYSTEM_PYTHON eq "NO") { - $PYTHONPATH = '.'.$wps.$SOLARVER.$ds.$INPATH.$ds.'lib'.$wps.$SOLARVER.$ds.$INPATH.$ds.'lib'.$ds.'python'.$wps.$SOLARVER.$ds.$INPATH.$ds.'lib'.$ds.'python'.$ds.'lib-dynload'.$wps.$SOLARVER.$ds.$INPATH.$ds.'lib'.$ds.'pyuno'.$wps.$SOLARVER.$ds.$INPATH.$ds.'bin'.$ds.'pyuno'; - if ($GUIBASE eq "WIN") { - # PYTHONPATH need to use '\' directory seperators; - $PYTHONPATH = WinPath( $PYTHONPATH, ";" ); - } -} - # print "done\n"; @@ -2000,9 +1992,6 @@ ToFile( "MKOUT", $perlpre."mkout.pl", "e" ); ToFile( "ZIPDEP", $perlpre."zipdep.pl", "e" ); ToFile( "USE_SHELL", '@USE_SHELL@', "e" ); -if ($SYSTEM_PYTHON eq "NO") { - ToFile( "PYTHONPATH", $PYTHONPATH, "e" ); -} # # Writing the aliases to file. diff --git a/solenv/config/ssolar.cmn b/solenv/config/ssolar.cmn index 039bdcfcc898..622ff9390de7 100644 --- a/solenv/config/ssolar.cmn +++ b/solenv/config/ssolar.cmn @@ -268,7 +268,6 @@ common NO_HIDS PAM_LINK PAM - PYTHONPATH SOLAR_PLUGIN URE_BOOTSTRAP USE_FT_EMBOLDEN -- cgit From 727411be78c3ac7300caa688f8085a9952e7c85d Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 14 Oct 2009 13:55:31 +0200 Subject: #i105655# commiting changes so far for preparing linux version --- canvas/source/cairo/cairo_canvashelper.cxx | 50 +++++++++++++++++-- canvas/source/cairo/cairo_canvashelper.hxx | 1 + canvas/source/directx/dx_canvashelper.cxx | 11 ++-- canvas/source/directx/dx_impltools.cxx | 67 ++++++++++++++++++++----- canvas/source/directx/dx_impltools.hxx | 15 ++++-- canvas/source/directx/dx_linepolypolygon.cxx | 4 +- canvas/source/directx/dx_linepolypolygon.hxx | 2 +- cppcanvas/source/mtfrenderer/implrenderer.cxx | 19 ++++++- vcl/inc/vcl/cvtsvm.hxx | 2 + vcl/inc/vcl/lineinfo.hxx | 23 +++++---- vcl/source/gdi/cvtsvm.cxx | 38 +++++++++++++- vcl/source/gdi/lineinfo.cxx | 30 +++++++++-- vcl/source/gdi/outdev.cxx | 27 ++++++---- vcl/win/source/gdi/salgdi_gdiplus.cxx | 72 +++++++++++++++++++++++++-- 14 files changed, 303 insertions(+), 58 deletions(-) diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx index 9cf2dd978759..5469010f2745 100644 --- a/canvas/source/cairo/cairo_canvashelper.cxx +++ b/canvas/source/cairo/cairo_canvashelper.cxx @@ -958,6 +958,7 @@ namespace cairocanvas void CanvasHelper::doPolyPolygonPath( const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon, Operation aOperation, + bool bNoLineJoin, const uno::Sequence< rendering::Texture >* pTextures, Cairo* pCairo ) const { @@ -967,10 +968,46 @@ namespace cairocanvas if( !pCairo ) pCairo = mpCairo.get(); - doPolyPolygonImplementation( rPolyPoly, aOperation, - pCairo, pTextures, - mpSurfaceProvider, - xPolyPolygon->getFillRule() ); + if(bNoLineJoin && Stroke == aOperation) + { + // emulate rendering::PathJoinType::NONE by painting single edges + for(sal_uInt32 a(0); a < rPolyPoly.count(); a++) + { + const basegfx::B2DPolygon aCandidate(rPolyPoly.getB2DPolygon(a)); + const sal_uInt32 nPointCount(aCandidate.count()); + + if(nPointCount) + { + const sal_uInt32 nEdgeCount(aCandidate.isClosed() ? nPointCount + 1: nPointCount); + basegfx::B2DPolygon aEdge; + aEdge.append(aCandidate.getB2DPoint(0)); + aEdge.append(basegfx::B2DPoint(0.0, 0.0)); + + for(sal_uInt32 a(0); a < nEdgeCount; a++) + { + const sal_uInt32 nNextIndex((a + 1) % nPointCount); + aEdge.setB2DPoint(1, aCandidate.getB2DPoint(nNextIndex)); + aEdge.setNextControlPoint(0, aCandidate.getNextControlPoint(a)); + aEdge.setPrevControlPoint(1, aCandidate.getPrevControlPoint(nNextIndex)); + + doPolyPolygonImplementation( aEdge, aOperation, + pCairo, pTextures, + mpSurfaceProvider, + xPolyPolygon->getFillRule() ); + + // prepare next step + aEdge.setB2DPoint(0, aEdge.getB2DPoint(1)); + } + } + } + } + else + { + doPolyPolygonImplementation( rPolyPoly, aOperation, + pCairo, pTextures, + mpSurfaceProvider, + xPolyPolygon->getFillRule() ); + } } uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawPolyPolygon( const rendering::XCanvas* , @@ -1039,9 +1076,12 @@ namespace cairocanvas break; } + bool bNoLineJoin(false); + switch( strokeAttributes.JoinType ) { // cairo doesn't have join type NONE so we use MITER as it's pretty close case rendering::PathJoinType::NONE: + bNoLineJoin = true; case rendering::PathJoinType::MITER: cairo_set_line_join( mpCairo.get(), CAIRO_LINE_JOIN_MITER ); break; @@ -1063,7 +1103,7 @@ namespace cairocanvas // TODO(rodo) use LineArray of strokeAttributes - doPolyPolygonPath( xPolyPolygon, Stroke ); + doPolyPolygonPath( xPolyPolygon, Stroke, bNoLineJoin ); cairo_restore( mpCairo.get() ); } else diff --git a/canvas/source/cairo/cairo_canvashelper.hxx b/canvas/source/cairo/cairo_canvashelper.hxx index 1e69a9f41e5b..90d365d63b3c 100644 --- a/canvas/source/cairo/cairo_canvashelper.hxx +++ b/canvas/source/cairo/cairo_canvashelper.hxx @@ -276,6 +276,7 @@ namespace cairocanvas void doPolyPolygonPath( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon, Operation aOperation, + bool bNoLineJoin = false, const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::Texture >* pTextures=NULL, ::cairo::Cairo* pCairo=NULL ) const; diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx index dcb65c94ae3c..607f7c076e21 100755 --- a/canvas/source/directx/dx_canvashelper.cxx +++ b/canvas/source/directx/dx_canvashelper.cxx @@ -368,7 +368,11 @@ namespace dxcanvas pGraphics->GetPixelOffsetMode() ); pGraphics->SetPixelOffsetMode( Gdiplus::PixelOffsetModeNone ); - aPen.SetMiterLimit( static_cast< Gdiplus::REAL >(strokeAttributes.MiterLimit) ); + const bool bIsMiter(rendering::PathJoinType::MITER == strokeAttributes.JoinType); + const bool bIsNone(rendering::PathJoinType::NONE == strokeAttributes.JoinType); + + if(bIsMiter) + aPen.SetMiterLimit( static_cast< Gdiplus::REAL >(strokeAttributes.MiterLimit) ); const ::std::vector< Gdiplus::REAL >& rDashArray( ::comphelper::sequenceToContainer< ::std::vector< Gdiplus::REAL > >( @@ -381,9 +385,10 @@ namespace dxcanvas aPen.SetLineCap( gdiCapFromCap(strokeAttributes.StartCapType), gdiCapFromCap(strokeAttributes.EndCapType), Gdiplus::DashCapFlat ); - aPen.SetLineJoin( gdiJoinFromJoin(strokeAttributes.JoinType) ); + if(!bIsNone) + aPen.SetLineJoin( gdiJoinFromJoin(strokeAttributes.JoinType) ); - GraphicsPathSharedPtr pPath( tools::graphicsPathFromXPolyPolygon2D( xPolyPolygon ) ); + GraphicsPathSharedPtr pPath( tools::graphicsPathFromXPolyPolygon2D( xPolyPolygon, bIsNone ) ); // TODO(E1): Return value Gdiplus::Status hr = pGraphics->DrawPath( &aPen, pPath.get() ); diff --git a/canvas/source/directx/dx_impltools.cxx b/canvas/source/directx/dx_impltools.cxx index 40164c9a1d87..4f5b92d6bcb5 100755 --- a/canvas/source/directx/dx_impltools.cxx +++ b/canvas/source/directx/dx_impltools.cxx @@ -194,7 +194,8 @@ namespace dxcanvas void graphicsPathFromB2DPolygon( GraphicsPathSharedPtr& rOutput, ::std::vector< Gdiplus::PointF >& rPoints, - const ::basegfx::B2DPolygon& rPoly ) + const ::basegfx::B2DPolygon& rPoly, + bool bNoLineJoin) { const sal_uInt32 nPoints( rPoly.count() ); @@ -241,7 +242,18 @@ namespace dxcanvas rPoints[nCurrOutput++] = Gdiplus::PointF( static_cast(rPoint.getX()), static_cast(rPoint.getY()) ); - rOutput->AddBeziers( &rPoints[0], nCurrOutput ); + if(bNoLineJoin && nCurrOutput > 7) + { + for(sal_uInt32 a(3); a < nCurrOutput; a+=3) + { + rOutput->StartFigure(); + rOutput->AddBezier(rPoints[a - 3], rPoints[a - 2], rPoints[a - 1], rPoints[a]); + } + } + else + { + rOutput->AddBeziers( &rPoints[0], nCurrOutput ); + } } else { @@ -251,7 +263,20 @@ namespace dxcanvas // Therefore, simply don't pass the last two // points here. if( nCurrOutput > 3 ) - rOutput->AddBeziers( &rPoints[0], nCurrOutput-2 ); + { + if(bNoLineJoin && nCurrOutput > 7) + { + for(sal_uInt32 a(3); a < nCurrOutput; a+=3) + { + rOutput->StartFigure(); + rOutput->AddBezier(rPoints[a - 3], rPoints[a - 2], rPoints[a - 1], rPoints[a]); + } + } + else + { + rOutput->AddBeziers( &rPoints[0], nCurrOutput-2 ); + } + } } } else @@ -267,10 +292,27 @@ namespace dxcanvas static_cast(rPoint.getY()) ); } - rOutput->AddLines( &rPoints[0], nPoints ); + if(bNoLineJoin && nPoints > 2) + { + for(sal_uInt32 a(1); a < nPoints; a++) + { + rOutput->StartFigure(); + rOutput->AddLine(rPoints[a - 1], rPoints[a]); + } + + if(bClosedPolygon) + { + rOutput->StartFigure(); + rOutput->AddLine(rPoints[nPoints - 1], rPoints[0]); + } + } + else + { + rOutput->AddLines( &rPoints[0], nPoints ); + } } - if( bClosedPolygon ) + if( bClosedPolygon && !bNoLineJoin ) rOutput->CloseFigure(); } } @@ -426,17 +468,17 @@ namespace dxcanvas return pRes; } - GraphicsPathSharedPtr graphicsPathFromB2DPolygon( const ::basegfx::B2DPolygon& rPoly ) + GraphicsPathSharedPtr graphicsPathFromB2DPolygon( const ::basegfx::B2DPolygon& rPoly, bool bNoLineJoin ) { GraphicsPathSharedPtr pRes( new Gdiplus::GraphicsPath() ); ::std::vector< Gdiplus::PointF > aPoints; - graphicsPathFromB2DPolygon( pRes, aPoints, rPoly ); + graphicsPathFromB2DPolygon( pRes, aPoints, rPoly, bNoLineJoin ); return pRes; } - GraphicsPathSharedPtr graphicsPathFromB2DPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly ) + GraphicsPathSharedPtr graphicsPathFromB2DPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly, bool bNoLineJoin ) { GraphicsPathSharedPtr pRes( new Gdiplus::GraphicsPath() ); ::std::vector< Gdiplus::PointF > aPoints; @@ -446,24 +488,25 @@ namespace dxcanvas { graphicsPathFromB2DPolygon( pRes, aPoints, - rPoly.getB2DPolygon( nCurrPoly ) ); + rPoly.getB2DPolygon( nCurrPoly ), + bNoLineJoin); } return pRes; } - GraphicsPathSharedPtr graphicsPathFromXPolyPolygon2D( const uno::Reference< rendering::XPolyPolygon2D >& xPoly ) + GraphicsPathSharedPtr graphicsPathFromXPolyPolygon2D( const uno::Reference< rendering::XPolyPolygon2D >& xPoly, bool bNoLineJoin ) { LinePolyPolygon* pPolyImpl = dynamic_cast< LinePolyPolygon* >( xPoly.get() ); if( pPolyImpl ) { - return pPolyImpl->getGraphicsPath(); + return pPolyImpl->getGraphicsPath( bNoLineJoin ); } else { return tools::graphicsPathFromB2DPolyPolygon( - polyPolygonFromXPolyPolygon2D( xPoly ) ); + polyPolygonFromXPolyPolygon2D( xPoly ), bNoLineJoin ); } } diff --git a/canvas/source/directx/dx_impltools.hxx b/canvas/source/directx/dx_impltools.hxx index 072d1063235d..222b1a927305 100755 --- a/canvas/source/directx/dx_impltools.hxx +++ b/canvas/source/directx/dx_impltools.hxx @@ -107,11 +107,18 @@ namespace dxcanvas GraphicsPathSharedPtr graphicsPathFromRealPoint2DSequence( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > >& ); - GraphicsPathSharedPtr graphicsPathFromB2DPolygon( const ::basegfx::B2DPolygon& rPoly ); - GraphicsPathSharedPtr graphicsPathFromB2DPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly ); + GraphicsPathSharedPtr graphicsPathFromB2DPolygon( + const ::basegfx::B2DPolygon& rPoly, + bool bNoLineJoin = false); + + GraphicsPathSharedPtr graphicsPathFromB2DPolyPolygon( + const ::basegfx::B2DPolyPolygon& rPoly, + bool bNoLineJoin = false); + + GraphicsPathSharedPtr graphicsPathFromXPolyPolygon2D( + const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >&, + bool bNoLineJoin = false ); - GraphicsPathSharedPtr graphicsPathFromXPolyPolygon2D( const ::com::sun::star::uno::Reference< - ::com::sun::star::rendering::XPolyPolygon2D >& ); bool drawGdiPlusBitmap( const GraphicsSharedPtr& rGraphics, const BitmapSharedPtr& rBitmap ); bool drawDIBits( const ::boost::shared_ptr< Gdiplus::Graphics >& rGraphics, diff --git a/canvas/source/directx/dx_linepolypolygon.cxx b/canvas/source/directx/dx_linepolypolygon.cxx index e63adc3dc613..9a5569384eae 100755 --- a/canvas/source/directx/dx_linepolypolygon.cxx +++ b/canvas/source/directx/dx_linepolypolygon.cxx @@ -46,14 +46,14 @@ namespace dxcanvas { } - GraphicsPathSharedPtr LinePolyPolygon::getGraphicsPath() const + GraphicsPathSharedPtr LinePolyPolygon::getGraphicsPath( bool bNoLineJoin ) const { // generate GraphicsPath only on demand (gets deleted as soon // as any of the modifying methods above touches the // B2DPolyPolygon). if( !mpPath ) { - mpPath = tools::graphicsPathFromB2DPolyPolygon( getPolyPolygonUnsafe() ); + mpPath = tools::graphicsPathFromB2DPolyPolygon( getPolyPolygonUnsafe(), bNoLineJoin ); mpPath->SetFillMode( const_cast(this)->getFillRule() == rendering::FillRule_EVEN_ODD ? Gdiplus::FillModeAlternate : Gdiplus::FillModeWinding ); } diff --git a/canvas/source/directx/dx_linepolypolygon.hxx b/canvas/source/directx/dx_linepolypolygon.hxx index 431cd1b87b4f..3e061d76e768 100755 --- a/canvas/source/directx/dx_linepolypolygon.hxx +++ b/canvas/source/directx/dx_linepolypolygon.hxx @@ -45,7 +45,7 @@ namespace dxcanvas public: explicit LinePolyPolygon( const ::basegfx::B2DPolyPolygon& ); - GraphicsPathSharedPtr getGraphicsPath() const; + GraphicsPathSharedPtr getGraphicsPath( bool bNoLineJoin = false) const; private: // overridden, to clear mpPath diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 9af540b889ea..8ea2ae453a97 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -275,10 +275,25 @@ namespace (getState( rParms.mrStates ).mapModeTransform * aWidth).getX(); // setup reasonable defaults - o_rStrokeAttributes.MiterLimit = 1.0; + o_rStrokeAttributes.MiterLimit = 15.0; // 1.0 was no good default; GDI+'s limit is 10.0, our's is 15.0 o_rStrokeAttributes.StartCapType = rendering::PathCapType::BUTT; o_rStrokeAttributes.EndCapType = rendering::PathCapType::BUTT; - o_rStrokeAttributes.JoinType = rendering::PathJoinType::MITER; + + switch(rLineInfo.GetLineJoin()) + { + default: // B2DLINEJOIN_NONE, B2DLINEJOIN_MIDDLE + o_rStrokeAttributes.JoinType = rendering::PathJoinType::NONE; + break; + case basegfx::B2DLINEJOIN_BEVEL: + o_rStrokeAttributes.JoinType = rendering::PathJoinType::BEVEL; + break; + case basegfx::B2DLINEJOIN_MITER: + o_rStrokeAttributes.JoinType = rendering::PathJoinType::MITER; + break; + case basegfx::B2DLINEJOIN_ROUND: + o_rStrokeAttributes.JoinType = rendering::PathJoinType::ROUND; + break; + } if( LINE_DASH == rLineInfo.GetStyle() ) { diff --git a/vcl/inc/vcl/cvtsvm.hxx b/vcl/inc/vcl/cvtsvm.hxx index 8a17015d99cf..cf4f3117a6ed 100644 --- a/vcl/inc/vcl/cvtsvm.hxx +++ b/vcl/inc/vcl/cvtsvm.hxx @@ -85,6 +85,8 @@ #define GDI_COMMENT_COMMENT 1031 #define GDI_UNICODE_COMMENT 1032 +#define GDI_LINEJOIN_ACTION 1033 + // ---------------- // - SVMConverter - // ---------------- diff --git a/vcl/inc/vcl/lineinfo.hxx b/vcl/inc/vcl/lineinfo.hxx index 60fdc3a3a0b0..a57513b2826b 100644 --- a/vcl/inc/vcl/lineinfo.hxx +++ b/vcl/inc/vcl/lineinfo.hxx @@ -32,9 +32,9 @@ #define _SV_LINEINFO_HXX #include - #include #include +#include // ---------------- // - ImplLineInfo - @@ -44,14 +44,16 @@ class SvStream; struct ImplLineInfo { - ULONG mnRefCount; - LineStyle meStyle; - long mnWidth; - USHORT mnDashCount; - long mnDashLen; - USHORT mnDotCount; - long mnDotLen; - long mnDistance; + ULONG mnRefCount; + LineStyle meStyle; + long mnWidth; + USHORT mnDashCount; + long mnDashLen; + USHORT mnDotCount; + long mnDotLen; + long mnDistance; + + basegfx::B2DLineJoin meLineJoin; ImplLineInfo(); ImplLineInfo( const ImplLineInfo& rImplLineInfo ); @@ -107,6 +109,9 @@ public: void SetDistance( long nDistance ); long GetDistance() const { return mpImplLineInfo->mnDistance; } + void SetLineJoin(basegfx::B2DLineJoin eLineJoin); + basegfx::B2DLineJoin GetLineJoin() const { return mpImplLineInfo->meLineJoin; } + BOOL IsDefault() const { return( !mpImplLineInfo->mnWidth && ( LINE_SOLID == mpImplLineInfo->meStyle ) ); } friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, LineInfo& rLineInfo ); diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index c1c02b673658..86d7d6bb39ee 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -483,6 +483,14 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) } break; + case (GDI_LINEJOIN_ACTION) : + { + INT16 nLineJoin(0); + rIStm >> nLineJoin; + aLineInfo.SetLineJoin((basegfx::B2DLineJoin)nLineJoin); + } + break; + case( GDI_RECT_ACTION ): { ImplReadRect( rIStm, aRect ); @@ -1247,12 +1255,20 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { MetaLineAction* pAct = (MetaLineAction*) pAction; const LineInfo& rInfo = pAct->GetLineInfo(); - const BOOL bFatLine = ( !rInfo.IsDefault() && ( LINE_NONE != rInfo.GetStyle() ) ); + const bool bFatLine(!rInfo.IsDefault() && (LINE_NONE != rInfo.GetStyle())); + const bool bLineJoin(bFatLine && basegfx::B2DLINEJOIN_ROUND != rInfo.GetLineJoin()); if( bFatLine ) { ImplWritePushAction( rOStm ); ImplWriteLineColor( rOStm, rLineCol, 1, rInfo.GetWidth() ); + + if(bLineJoin) + { + rOStm << (INT16) GDI_LINEJOIN_ACTION; + rOStm << (INT32) 6; + rOStm << (INT16) rInfo.GetLineJoin(); + } } rOStm << (INT16) GDI_LINE_ACTION; @@ -1265,6 +1281,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { ImplWritePopAction( rOStm ); nCount += 3; + + if(bLineJoin) + { + nCount += 1; + } } } break; @@ -1356,12 +1377,20 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, const Polygon& rPoly = pAct->GetPolygon(); const LineInfo& rInfo = pAct->GetLineInfo(); const USHORT nPoints = rPoly.GetSize(); - const BOOL bFatLine = ( !rInfo.IsDefault() && ( LINE_NONE != rInfo.GetStyle() ) ); + const bool bFatLine(!rInfo.IsDefault() && (LINE_NONE != rInfo.GetStyle())); + const bool bLineJoin(bFatLine && basegfx::B2DLINEJOIN_ROUND != rInfo.GetLineJoin()); if( bFatLine ) { ImplWritePushAction( rOStm ); ImplWriteLineColor( rOStm, rLineCol, 1, rInfo.GetWidth() ); + + if(bLineJoin) + { + rOStm << (INT16) GDI_LINEJOIN_ACTION; + rOStm << (INT32) 6; + rOStm << (INT16) rInfo.GetLineJoin(); + } } rOStm << (INT16) GDI_POLYLINE_ACTION; @@ -1377,6 +1406,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { ImplWritePopAction( rOStm ); nCount += 3; + + if(bLineJoin) + { + nCount += 1; + } } } break; diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx index 98f16713a145..85a48f2b0f5e 100644 --- a/vcl/source/gdi/lineinfo.cxx +++ b/vcl/source/gdi/lineinfo.cxx @@ -49,7 +49,8 @@ ImplLineInfo::ImplLineInfo() : mnDashLen ( 0 ), mnDotCount ( 0 ), mnDotLen ( 0 ), - mnDistance ( 0 ) + mnDistance ( 0 ), + meLineJoin ( basegfx::B2DLINEJOIN_ROUND ) { } @@ -63,7 +64,8 @@ ImplLineInfo::ImplLineInfo( const ImplLineInfo& rImplLineInfo ) : mnDashLen ( rImplLineInfo.mnDashLen ), mnDotCount ( rImplLineInfo.mnDotCount ), mnDotLen ( rImplLineInfo.mnDotLen ), - mnDistance ( rImplLineInfo.mnDistance ) + mnDistance ( rImplLineInfo.mnDistance ), + meLineJoin ( rImplLineInfo.meLineJoin ) { } @@ -209,6 +211,19 @@ void LineInfo::SetDistance( long nDistance ) // ----------------------------------------------------------------------- +void LineInfo::SetLineJoin(basegfx::B2DLineJoin eLineJoin) +{ + DBG_CHKTHIS( LineInfo, NULL ); + + if(eLineJoin != mpImplLineInfo->meLineJoin) + { + ImplMakeUnique(); + mpImplLineInfo->meLineJoin = eLineJoin; + } +} + +// ----------------------------------------------------------------------- + SvStream& operator>>( SvStream& rIStm, ImplLineInfo& rImplLineInfo ) { VersionCompat aCompat( rIStm, STREAM_READ ); @@ -225,6 +240,12 @@ SvStream& operator>>( SvStream& rIStm, ImplLineInfo& rImplLineInfo ) rIStm >> rImplLineInfo.mnDistance; } + if( aCompat.GetVersion() >= 3 ) + { + // version 3 + rIStm >> nTmp16; rImplLineInfo.meLineJoin = (basegfx::B2DLineJoin) nTmp16; + } + return rIStm; } @@ -232,7 +253,7 @@ SvStream& operator>>( SvStream& rIStm, ImplLineInfo& rImplLineInfo ) SvStream& operator<<( SvStream& rOStm, const ImplLineInfo& rImplLineInfo ) { - VersionCompat aCompat( rOStm, STREAM_WRITE, 2 ); + VersionCompat aCompat( rOStm, STREAM_WRITE, 3 ); // version 1 rOStm << (UINT16) rImplLineInfo.meStyle << rImplLineInfo.mnWidth; @@ -242,6 +263,9 @@ SvStream& operator<<( SvStream& rOStm, const ImplLineInfo& rImplLineInfo ) rOStm << rImplLineInfo.mnDotCount << rImplLineInfo.mnDotLen; rOStm << rImplLineInfo.mnDistance; + // since version3 + rOStm << (UINT16) rImplLineInfo.meLineJoin; + return rOStm; } diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index 5b543258cb0b..e86256bc4830 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -2541,7 +2541,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly, const LineInfo& rLineInfo if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) && LINE_SOLID == rLineInfo.GetStyle()) { - DrawPolyLine(rPoly.getB2DPolygon(), (double)rLineInfo.GetWidth(), basegfx::B2DLINEJOIN_ROUND); + DrawPolyLine(rPoly.getB2DPolygon(), (double)rLineInfo.GetWidth(), rLineInfo.GetLineJoin()); return; } @@ -3042,7 +3042,12 @@ void OutputDevice::DrawPolyLine( SetFillColor(aOldLineColor); ImplInitFillColor(); - ImpDrawPolyPolygonWithB2DPolyPolygon(aAreaPolyPolygon); + // draw usig a loop; else the topology will paint a PolyPolygon + for(sal_uInt32 a(0); a < aAreaPolyPolygon.count(); a++) + { + ImpDrawPolyPolygonWithB2DPolyPolygon( + basegfx::B2DPolyPolygon(aAreaPolyPolygon.getB2DPolygon(a))); + } SetLineColor(aOldLineColor); ImplInitLineColor(); @@ -3059,14 +3064,16 @@ void OutputDevice::DrawPolyLine( } } } - - // fallback to old polygon drawing if needed. This will really - // use ImplLineConverter, but still try to AA lines - const Polygon aToolsPolygon( rB2DPolygon ); - LineInfo aLineInfo; - if( fLineWidth != 0.0 ) - aLineInfo.SetWidth( static_cast(fLineWidth+0.5) ); - ImpDrawPolyLineWithLineInfo( aToolsPolygon, aLineInfo ); + else + { + // fallback to old polygon drawing if needed. This will really + // use ImplLineConverter, but still try to AA lines + const Polygon aToolsPolygon( rB2DPolygon ); + LineInfo aLineInfo; + if( fLineWidth != 0.0 ) + aLineInfo.SetWidth( static_cast(fLineWidth+0.5) ); + ImpDrawPolyLineWithLineInfo( aToolsPolygon, aLineInfo ); + } } // ----------------------------------------------------------------------- diff --git a/vcl/win/source/gdi/salgdi_gdiplus.cxx b/vcl/win/source/gdi/salgdi_gdiplus.cxx index 5c00c786e22d..a9d346e74476 100644 --- a/vcl/win/source/gdi/salgdi_gdiplus.cxx +++ b/vcl/win/source/gdi/salgdi_gdiplus.cxx @@ -62,9 +62,9 @@ // ----------------------------------------------------------------------- -void impAddB2DPolygonToGDIPlusGraphicsPath(Gdiplus::GraphicsPath& rPath, const basegfx::B2DPolygon& rPolygon) +void impAddB2DPolygonToGDIPlusGraphicsPathReal(Gdiplus::GraphicsPath& rPath, const basegfx::B2DPolygon& rPolygon, bool bNoLineJoin) { - const sal_uInt32 nCount(rPolygon.count()); + sal_uInt32 nCount(rPolygon.count()); if(nCount) { @@ -97,8 +97,58 @@ void impAddB2DPolygonToGDIPlusGraphicsPath(Gdiplus::GraphicsPath& rPath, const b if(a + 1 < nEdgeCount) { - aCurr = aNext; aFCurr = aFNext; + + if(bNoLineJoin) + { + rPath.StartFigure(); + } + } + } + } +} + +void impAddB2DPolygonToGDIPlusGraphicsPathInteger(Gdiplus::GraphicsPath& rPath, const basegfx::B2DPolygon& rPolygon, bool bNoLineJoin) +{ + sal_uInt32 nCount(rPolygon.count()); + + if(nCount) + { + const sal_uInt32 nEdgeCount(rPolygon.isClosed() ? nCount : nCount - 1); + const bool bControls(rPolygon.areControlPointsUsed()); + basegfx::B2DPoint aCurr(rPolygon.getB2DPoint(0)); + Gdiplus::Point aICurr(INT(aCurr.getX()), INT(aCurr.getY())); + + for(sal_uInt32 a(0); a < nEdgeCount; a++) + { + const sal_uInt32 nNextIndex((a + 1) % nCount); + const basegfx::B2DPoint aNext(rPolygon.getB2DPoint(nNextIndex)); + const Gdiplus::Point aINext(INT(aNext.getX()), INT(aNext.getY())); + + if(bControls && (rPolygon.isNextControlPointUsed(a) || rPolygon.isPrevControlPointUsed(nNextIndex))) + { + const basegfx::B2DPoint aCa(rPolygon.getNextControlPoint(a)); + const basegfx::B2DPoint aCb(rPolygon.getPrevControlPoint(nNextIndex)); + + rPath.AddBezier( + aICurr, + Gdiplus::Point(INT(aCa.getX()), INT(aCa.getY())), + Gdiplus::Point(INT(aCb.getX()), INT(aCb.getY())), + aINext); + } + else + { + rPath.AddLine(aICurr, aINext); + } + + if(a + 1 < nEdgeCount) + { + aICurr = aINext; + + if(bNoLineJoin) + { + rPath.StartFigure(); + } } } } @@ -123,7 +173,7 @@ bool WinSalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPoly aPath.StartFigure(); // #i101491# not needed for first run } - impAddB2DPolygonToGDIPlusGraphicsPath(aPath, rPolyPolygon.getB2DPolygon(a)); + impAddB2DPolygonToGDIPlusGraphicsPathReal(aPath, rPolyPolygon.getB2DPolygon(a), false); aPath.CloseFigure(); } @@ -152,11 +202,16 @@ bool WinSalGraphics::drawPolyLine(const basegfx::B2DPolygon& rPolygon, const bas Gdiplus::Color aTestColor(255, SALCOLOR_RED(maLineColor), SALCOLOR_GREEN(maLineColor), SALCOLOR_BLUE(maLineColor)); Gdiplus::Pen aTestPen(aTestColor, Gdiplus::REAL(rLineWidths.getX())); Gdiplus::GraphicsPath aPath; + bool bNoLineJoin(false); switch(eLineJoin) { default : // basegfx::B2DLINEJOIN_NONE : { + if(basegfx::fTools::more(rLineWidths.getX(), 0.0)) + { + bNoLineJoin = true; + } break; } case basegfx::B2DLINEJOIN_BEVEL : @@ -179,7 +234,14 @@ bool WinSalGraphics::drawPolyLine(const basegfx::B2DPolygon& rPolygon, const bas } } - impAddB2DPolygonToGDIPlusGraphicsPath(aPath, rPolygon); + if(nCount > 250 && basegfx::fTools::more(rLineWidths.getX(), 1.5)) + { + impAddB2DPolygonToGDIPlusGraphicsPathInteger(aPath, rPolygon, bNoLineJoin); + } + else + { + impAddB2DPolygonToGDIPlusGraphicsPathReal(aPath, rPolygon, bNoLineJoin); + } if(rPolygon.isClosed()) { -- cgit From bbe3fead695d76d107d9b2a84d53b5c1db72428b Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 14 Oct 2009 13:55:31 +0200 Subject: #i105655# commiting changes so far for preparing linux version --- .../source/processor2d/vclmetafileprocessor2d.cxx | 113 +++++++++++++++------ 1 file changed, 82 insertions(+), 31 deletions(-) diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index fb252d4676e7..3fb875448663 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -1005,26 +1005,12 @@ namespace drawinglayer SvtGraphicStroke* pSvtGraphicStroke = impTryToCreateSvtGraphicStroke(rStrokePrimitive.getB2DPolygon(), 0, &rStrokePrimitive.getLineAttribute(), &rStrokePrimitive.getStrokeAttribute(), 0, 0); - // Adapt OutDev's DrawMode if special ones were used - const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode()); - adaptLineToFillDrawMode(); - - impStartSvtGraphicStroke(pSvtGraphicStroke); - - // #i101491# - // Change default of fat line generation for MetaFiles: Create MetaPolyLineAction - // instead of decomposing all geometries when the polygon has more than given amount of - // points; else the decomposition will get too expensive quiclky. OTOH - // the decomposition provides the better quality e.g. taking edge roundings - // into account which will NOT be taken into account with LineInfo-based actions - const sal_uInt32 nSubPolygonCount(rStrokePrimitive.getB2DPolygon().count()); - bool bDone(0 == nSubPolygonCount); - - if(!bDone && nSubPolygonCount > 1000) + if(true) { - // create MetaPolyLineActions, but without LINE_DASH + impStartSvtGraphicStroke(pSvtGraphicStroke); const attribute::LineAttribute& rLine = rStrokePrimitive.getLineAttribute(); + // create MetaPolyLineActions, but without LINE_DASH if(basegfx::fTools::more(rLine.getWidth(), 0.0)) { const attribute::StrokeAttribute& rStroke = rStrokePrimitive.getStrokeAttribute(); @@ -1044,10 +1030,9 @@ namespace drawinglayer const basegfx::BColor aHairlineColor(maBColorModifierStack.getModifiedColor(rLine.getColor())); mpOutputDevice->SetLineColor(Color(aHairlineColor)); mpOutputDevice->SetFillColor(); - aHairLinePolyPolygon.transform(maCurrentTransformation); - - const LineInfo aLineInfo(LINE_SOLID, basegfx::fround(rLine.getWidth())); + LineInfo aLineInfo(LINE_SOLID, basegfx::fround(rLine.getWidth())); + aLineInfo.SetLineJoin(rLine.getLineJoin()); for(sal_uInt32 a(0); a < aHairLinePolyPolygon.count(); a++) { @@ -1060,22 +1045,88 @@ namespace drawinglayer mrMetaFile.AddAction(new MetaPolyLineAction(aToolsPolygon, aLineInfo)); } } - - bDone = true; } - } + else + { + process(rCandidate.get2DDecomposition(getViewInformation2D())); + } - if(!bDone) - { - // use decomposition (creates line geometry as filled polygon - // geometry) - process(rCandidate.get2DDecomposition(getViewInformation2D())); + impEndSvtGraphicStroke(pSvtGraphicStroke); } + else + { + // Adapt OutDev's DrawMode if special ones were used + const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode()); + adaptLineToFillDrawMode(); + + impStartSvtGraphicStroke(pSvtGraphicStroke); + + // #i101491# + // Change default of fat line generation for MetaFiles: Create MetaPolyLineAction + // instead of decomposing all geometries when the polygon has more than given amount of + // points; else the decomposition will get too expensive quiclky. OTOH + // the decomposition provides the better quality e.g. taking edge roundings + // into account which will NOT be taken into account with LineInfo-based actions + const sal_uInt32 nSubPolygonCount(rStrokePrimitive.getB2DPolygon().count()); + bool bDone(0 == nSubPolygonCount); + + if(!bDone && nSubPolygonCount > 1000) + { + // create MetaPolyLineActions, but without LINE_DASH + const attribute::LineAttribute& rLine = rStrokePrimitive.getLineAttribute(); - impEndSvtGraphicStroke(pSvtGraphicStroke); + if(basegfx::fTools::more(rLine.getWidth(), 0.0)) + { + const attribute::StrokeAttribute& rStroke = rStrokePrimitive.getStrokeAttribute(); + basegfx::B2DPolyPolygon aHairLinePolyPolygon; - // restore DrawMode - mpOutputDevice->SetDrawMode(nOriginalDrawMode); + if(0.0 == rStroke.getFullDotDashLen()) + { + aHairLinePolyPolygon.append(rStrokePrimitive.getB2DPolygon()); + } + else + { + basegfx::tools::applyLineDashing( + rStrokePrimitive.getB2DPolygon(), rStroke.getDotDashArray(), + &aHairLinePolyPolygon, 0, rStroke.getFullDotDashLen()); + } + + const basegfx::BColor aHairlineColor(maBColorModifierStack.getModifiedColor(rLine.getColor())); + mpOutputDevice->SetLineColor(Color(aHairlineColor)); + mpOutputDevice->SetFillColor(); + + aHairLinePolyPolygon.transform(maCurrentTransformation); + + const LineInfo aLineInfo(LINE_SOLID, basegfx::fround(rLine.getWidth())); + + for(sal_uInt32 a(0); a < aHairLinePolyPolygon.count(); a++) + { + const basegfx::B2DPolygon aCandidate(aHairLinePolyPolygon.getB2DPolygon(a)); + + if(aCandidate.count() > 1) + { + const Polygon aToolsPolygon(aCandidate); + + mrMetaFile.AddAction(new MetaPolyLineAction(aToolsPolygon, aLineInfo)); + } + } + + bDone = true; + } + } + + if(!bDone) + { + // use decomposition (creates line geometry as filled polygon + // geometry) + process(rCandidate.get2DDecomposition(getViewInformation2D())); + } + + impEndSvtGraphicStroke(pSvtGraphicStroke); + + // restore DrawMode + mpOutputDevice->SetDrawMode(nOriginalDrawMode); + } break; } -- cgit From 5b2480b968b3f375e0d9e43becb54c6897d0820d Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 15 Oct 2009 14:27:12 +0200 Subject: #i105655# commiting changes2 so far for preparing linux version --- basegfx/test/basegfx2d.cxx | 2 +- vcl/inc/vcl/outdev.hxx | 3 + vcl/source/gdi/implncvt.cxx | 577 -------------------------------------- vcl/source/gdi/implncvt.hxx | 78 ------ vcl/source/gdi/makefile.mk | 1 - vcl/source/gdi/outdev.cxx | 256 ++++++++++------- vcl/source/gdi/pdfwriter_impl.cxx | 4 +- vcl/source/gdi/salgdilayout.cxx | 1 - vcl/unx/source/gdi/salgdi.cxx | 3 + 9 files changed, 166 insertions(+), 759 deletions(-) delete mode 100644 vcl/source/gdi/implncvt.cxx delete mode 100644 vcl/source/gdi/implncvt.hxx diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx index 8b732e465a51..07d6eb4c54e5 100644 --- a/basegfx/test/basegfx2d.cxx +++ b/basegfx/test/basegfx2d.cxx @@ -483,7 +483,7 @@ public: while ( nIndex >= 0 ); CPPUNIT_ASSERT_MESSAGE("exporting to circle does not produce the expected number of coordinates", - nCount==18); + nCount==50); const B2DPolygon aRect( tools::createPolygonFromRect( B2DRange(0.0,0.0,4000.0,4000.0) )); diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx index f4e42846dd5e..f824151737d2 100644 --- a/vcl/inc/vcl/outdev.hxx +++ b/vcl/inc/vcl/outdev.hxx @@ -577,6 +577,9 @@ public: // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool. Contains no AA check. SAL_DLLPRIVATE bool ImpTryDrawPolyLineDirect(const basegfx::B2DPolygon& rB2DPolygon, double fLineWidth, basegfx::B2DLineJoin eLineJoin); + // Helper for line geometry paint with support for graphic expansion (pattern and fat_to_area) + void impPaintLineGeometryWithEvtlExpand(const LineInfo& rInfo, basegfx::B2DPolyPolygon aLinePolyPolygon); + protected: OutputDevice(); diff --git a/vcl/source/gdi/implncvt.cxx b/vcl/source/gdi/implncvt.cxx deleted file mode 100644 index e59fde15b5be..000000000000 --- a/vcl/source/gdi/implncvt.cxx +++ /dev/null @@ -1,577 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: implncvt.cxx,v $ - * $Revision: 1.10.136.1 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_vcl.hxx" -#include -#ifndef _SV_IMPLNCVT_HXX -#include "implncvt.hxx" -#endif - -// ----------- -// - Defines - -// ----------- - -#define CURVE_LEFT 1 -#define CURVE_RIGHT 2 -#define CURVE_STRAIGHTON 3 - -// ----------------- -// - ImplFloatPoint -// ----------------- - -struct ImplFloatPoint -{ - double fX; - double fY; - - inline ImplFloatPoint() {} - inline ImplFloatPoint( const Point& rPoint ) { fX = rPoint.X(); fY = rPoint.Y(); } - inline ImplFloatPoint( double _fX, double _fY ) { fX = _fX; fY = _fY; } - inline ImplFloatPoint( const ImplFloatPoint& rPoint ) { fX = rPoint.fX; fY = rPoint.fY; } - inline ~ImplFloatPoint() {} - - void operator+=( const ImplFloatPoint& rPoint ) { fX += rPoint.fX; fY += rPoint.fY; } - void operator-=( const ImplFloatPoint& rPoint ) { fX -= rPoint.fX; fY -= rPoint.fY; } - void operator*=( const double& rD ) { fX *= rD; fY *= rD; } - BOOL operator==( const ImplFloatPoint& rPoint ) const { return ( ( rPoint.fX == fX ) && ( rPoint.fY == fY ) ); } - void operator=( const Point& rPoint ) { fX = rPoint.X(); fY = rPoint.Y(); } - - ImplFloatPoint GetOVec( const ImplFloatPoint& rPoint ) const; - ImplFloatPoint GetNVec( const ImplFloatPoint& rPoint ) const; -}; - -// ----------------------------------------------------------------------------- - -ImplFloatPoint ImplFloatPoint::GetOVec( const ImplFloatPoint& rPoint ) const -{ - double fxt = rPoint.fX - fX; - double fyt = rPoint.fY - fY; - double fL; - - if( fyt != 0.0 ) - { - fyt = -fxt / fyt; - fL = sqrt( 1 + fyt * fyt ); - - return ImplFloatPoint( 1.0 / fL, fyt / fL ); - } - else - return ImplFloatPoint( fyt, ( fxt > 0.0 ) ? 1.0 : -1.0 ); -}; - -// ----------------------------------------------------------------------------- - -ImplFloatPoint ImplFloatPoint::GetNVec( const ImplFloatPoint& rPoint ) const -{ - const double fxt = rPoint.fX - fX; - const double fyt = rPoint.fY - fY; - const double fL = hypot( fxt, fyt ); - - return ImplFloatPoint( fxt / fL, fyt / fL ); -}; - -// -------------------- -// - ImplLineConverter -// -------------------- - -ImplLineConverter::ImplLineConverter( const Polygon& rPolygon, const LineInfo& rLineInfo, const Point* pRefPoint ) : - mbRefPoint ( FALSE ), - mfWidthHalf ( rLineInfo.GetWidth() >> 1 ), - maLineInfo ( rLineInfo ), - mpFloat0 ( new ImplFloatPoint[ 6 ] ), - mpFloat1 ( new ImplFloatPoint[ 6 ] ), - mnLines ( 0 ), - mpFloatPoint ( NULL ) -{ - UINT16 nIndex, nPolySize = rPolygon.GetSize(); - if ( nPolySize ) - { - if( rPolygon.GetFlags( 0 ) == POLY_NORMAL ) - { - mpFloatPoint = new ImplFloatPoint[ nPolySize ]; - mpFloatPoint[ 0 ] = rPolygon[ 0 ]; - - nIndex = 0; - - while( ++nIndex < nPolySize ) // doppelte Punkte eliminieren und ein FloatPointArray anlegen - { - if( rPolygon.GetFlags( nIndex ) == POLY_NORMAL ) - { - double nxt = mpFloatPoint[ mnLines ].fX; - double nyt = mpFloatPoint[ mnLines ].fY; - - if ( ( nxt == rPolygon[ nIndex ].X() ) && ( nyt == rPolygon[ nIndex ].Y() ) ) - continue; - - mpFloatPoint[ ++mnLines ] = rPolygon[ nIndex ]; - } - else - { - DBG_ERROR( "Bezier points not supported!" ); - } - } - mbClosed = ( mpFloatPoint[ 0 ] == mpFloatPoint[ mnLines ] ) ; - - if ( ( mnLines == 1 ) && ( maLineInfo.GetStyle() == LINE_DASH ) ) - { - BOOL bX = mpFloatPoint[ 0 ].fY == mpFloatPoint[ 1 ].fY; - BOOL bY = mpFloatPoint[ 0 ].fX == mpFloatPoint[ 1 ].fX; - mbRefPoint = pRefPoint && ( bX || bY ); - if ( mbRefPoint ) - { - if ( !maLineInfo.GetDashCount() ) - { - maLineInfo.SetDashCount( maLineInfo.GetDotCount() ); - maLineInfo.SetDashLen( maLineInfo.GetDotLen() ); - maLineInfo.SetDotCount( 0 ); - } - INT32 nDistance = maLineInfo.GetDistance(); - INT32 nDashLen = maLineInfo.GetDashCount() * ( maLineInfo.GetDashLen() + nDistance ); - INT32 nDotLen = maLineInfo.GetDotCount() * ( maLineInfo.GetDotLen() + nDistance ); - if ( bX ) - { - if ( mpFloatPoint[ 1 ].fX > mpFloatPoint[ 0 ].fX ) - { - ImplFloatPoint aFloat = mpFloatPoint[ 0 ]; - mpFloatPoint[ 0 ] = mpFloatPoint[ 1 ]; - mpFloatPoint[ 1 ] = aFloat; - } - mnRefDistance = (INT32)mpFloatPoint[ mnLines ].fX - pRefPoint->X(); - } - else - { - if ( mpFloatPoint[ 1 ].fY > mpFloatPoint[ 0 ].fY ) - { - ImplFloatPoint aFloat = mpFloatPoint[ 0 ]; - mpFloatPoint[ 0 ] = mpFloatPoint[ 1 ]; - mpFloatPoint[ 1 ] = aFloat; - } - mnRefDistance = (INT32)mpFloatPoint[ mnLines ].fY - pRefPoint->Y(); - } - -// mnRefDistance = ( (INT32)mpFloatPoint[ mnLines ].fX - pRefPoint->X() ) + -// ( (INT32)mpFloatPoint[ mnLines ].fY - pRefPoint->Y() ); - - mnRefDistance = mnRefDistance % ( nDashLen + nDotLen ); - if ( mnRefDistance < 0 ) - mnRefDistance = ( nDashLen + nDotLen ) + mnRefDistance; - } - } - } - } -}; - -//------------------------------------------------------------------------ - -ImplLineConverter::~ImplLineConverter() -{ - delete[] mpFloat0; - delete[] mpFloat1; - delete[] mpFloatPoint; -}; - -//------------------------------------------------------------------------ - -const Polygon* ImplLineConverter::ImplGetFirst() -{ - mnFloat1Points = 0; - mnLinesAvailable = mnLines; - - if ( mnLines ) - { - if ( maLineInfo.GetStyle() == LINE_DASH ) - { - mnDashCount = maLineInfo.GetDashCount(); - mnDotCount = maLineInfo.GetDotCount(); - mfDashDotLenght = mnDashCount ? maLineInfo.GetDashLen() : maLineInfo.GetDotLen(); - - if ( mbRefPoint ) - { - INT32 nDistance = maLineInfo.GetDistance(); - INT32 nDashLen = maLineInfo.GetDashLen() + nDistance; - INT32 nDashesLen = maLineInfo.GetDashCount() * nDashLen; - INT32 nDotLen = maLineInfo.GetDotLen() + nDistance; - - if ( mnRefDistance >= nDashesLen ) - { - // get dotcount - if ( nDotLen ) - { - INT32 nLen = ( mnRefDistance - nDashesLen ) % nDotLen; - if ( nLen >= maLineInfo.GetDotLen() ) - { - mnDotCount -= 1 + ( mnRefDistance - nDashesLen ) / nDotLen; - if ( mnDotCount ) - mnDashCount = 0; - else - mnDotCount = maLineInfo.GetDotCount(); - mfDashDotLenght = 0.0; - mfDistanceLenght = ( maLineInfo.GetDotLen() + nDistance ) - nLen; - } - else - { - mnDashCount = 0; - mfDashDotLenght = maLineInfo.GetDotLen() - nLen; - mnDotCount -= ( mnRefDistance - nDashesLen ) / nDotLen; - } - } - } - else - { - if ( nDashLen ) - { - // get dashcount - INT32 nLen = mnRefDistance % nDashLen; - if ( nLen >= maLineInfo.GetDashLen() ) - { - mfDashDotLenght = 0.0; - mfDistanceLenght = ( maLineInfo.GetDashLen() + nDistance ) - nLen; - mnDashCount -= 1 + ( mnRefDistance / nDashLen ); - } - else - { - mfDashDotLenght = maLineInfo.GetDashLen() - nLen; - mnDashCount -= ( mnRefDistance / nDashLen ); - } - } - } - if ( ! ( mnDashCount | mnDotCount ) ) - { - mnDashCount = maLineInfo.GetDashCount(); - mnDotCount = maLineInfo.GetDotCount(); - } - if ( ( mfDashDotLenght == 0.0 ) && ( mfDistanceLenght == 0.0 ) ) - mfDistanceLenght = maLineInfo.GetDistance(); - } - } - } - return ImplGetNext(); -}; - -//------------------------------------------------------------------------ - -const Polygon* ImplLineConverter::ImplGetNext() -{ - while( mnFloat1Points || mnLinesAvailable ) - { - if ( maLineInfo.GetWidth() > 1 ) - { - if ( !mnFloat1Points ) - { - ImplFloatPoint aPointA( mpFloatPoint[ mnLinesAvailable-- ] ); - ImplFloatPoint aPointB( mpFloatPoint[ mnLinesAvailable ] ); - ImplFloatPoint aOVecAB( aPointA.GetOVec( aPointB ) ); - ImplFloatPoint aN1Vec( aPointA.GetNVec( aPointB ) ); - aN1Vec *= mfWidthHalf; - - if ( !mbClosed && ( ( mnLinesAvailable + 1 ) == mnLines ) ) - aPointA -= aN1Vec; - - aOVecAB *= mfWidthHalf; - mpFloat0[ 0 ] = aPointA; - mpFloat0[ 0 ] -= aOVecAB; - mpFloat0[ 3 ] = aPointA; - mpFloat0[ 3 ] += aOVecAB; - mpFloat0[ 1 ] = aPointB; - mpFloat0[ 1 ] -= aOVecAB; - mpFloat0[ 2 ] = aPointB; - mpFloat0[ 2 ] += aOVecAB; - - double f1D = ( aN1Vec.fX == 0 ) ? 1 : ( aN1Vec.fY / aN1Vec.fX ); - double f2D = -f1D; - - mnFloat0Points = 4; - - int nDirection; - - BOOL bContinues = ( mnLinesAvailable || mbClosed ); - if ( bContinues ) - { - ImplFloatPoint aPointC; - - if ( mnLinesAvailable ) - aPointC = mpFloatPoint[ mnLinesAvailable - 1 ]; - else - aPointC = mpFloatPoint[ mnLines - 1 ]; - - ImplFloatPoint aOVecBC( aPointB.GetOVec( aPointC ) ); - aOVecBC *= mfWidthHalf; - ImplFloatPoint aPointR0( aPointB ); - aPointR0 -= aOVecBC; - ImplFloatPoint aPointR1( aPointB ); - aPointR1 += aOVecBC; - ImplFloatPoint aN2Vec( aPointB.GetNVec( aPointC ) ); - aN2Vec *= mfWidthHalf; - - f2D = ( fabs( aN2Vec.fX ) < 0.00000001 ) ? 1 : ( aN2Vec.fY / aN2Vec.fX ); - if ( fabs( f1D - f2D ) < 0.00000001 ) - nDirection = CURVE_STRAIGHTON; - else - { - if ( ( aN1Vec.fX * aN2Vec.fY - aN1Vec.fY * aN2Vec.fX ) > 0 ) - nDirection = CURVE_LEFT; - else - nDirection = CURVE_RIGHT; - } - if ( nDirection != CURVE_STRAIGHTON ) - { - double fWidth; - ImplFloatPoint aDestPoint; - if ( hypot( aPointR0.fX - aPointA.fX, aPointR0.fY - aPointA.fY ) > hypot( aPointR1.fX - aPointA.fX, aPointR1.fY - aPointA.fY ) ) - aDestPoint = aPointR0; - else - aDestPoint = aPointR1; - - UINT16 nFirst = 0; - if ( aN1Vec.fY > 0 ) - { - if ( nDirection != CURVE_RIGHT ) - nFirst++; - } - else - { - if ( nDirection == CURVE_RIGHT ) - nFirst++; - } - fWidth = hypot( mpFloat0[ 1 + nFirst ].fX - aDestPoint.fX, mpFloat0[ 1 + nFirst ].fY - aDestPoint.fY ); - fWidth = sqrt( fWidth * fWidth / 2 ); - if ( fWidth > mfWidthHalf ) - { - // Spitzer Winkel : - mnFloat0Points = 6; - mpFloat0[ (4 + nFirst) ^ 1 ] = aDestPoint; - aDestPoint -= aN2Vec; - mpFloat0[ 4 + nFirst ] = aDestPoint; - mpFloat0[ 1 + nFirst ] += aN1Vec; - } - else - { - // Stumpferwinkel : Schnittpunkt wird berechnet - mnFloat0Points = 5; - ImplFloatPoint aSourcePoint; - double fX = 0; - double fY; - double fBDest = 0; - double fBSource = 0; - aSourcePoint = mpFloat0[ 1 + nFirst ]; - - int nValid = 0; - - if ( fabs( aN2Vec.fX ) < 0.00000001 ) - { - fX = aDestPoint.fX; - nValid = 1; - } - else - fBDest = aDestPoint.fY - ( aN2Vec.fY / aN2Vec.fX * aDestPoint.fX ); - - if ( fabs( aN1Vec.fX ) < 0.000000001 ) - { - fX = aSourcePoint.fX; - nValid = 2; - } - else - fBSource = aSourcePoint.fY - ( aN1Vec.fY / aN1Vec.fX * aSourcePoint.fX ); - - if ( !nValid ) - fX = ( fBSource - fBDest ) / ( aN2Vec.fY / aN2Vec.fX - aN1Vec.fY / aN1Vec.fX ); - if ( nValid < 2 ) - fY = aN1Vec.fY / aN1Vec.fX * fX + fBSource; - else - fY = aN2Vec.fY / aN2Vec.fX * fX + fBDest; - - mpFloat0[ 1 + nFirst ].fX = fX; - mpFloat0[ 1 + nFirst ].fY = fY; - mpFloat0[ 4 ] = aDestPoint; - } - } - else if ( ( aN1Vec.fX - aN2Vec.fX + aN1Vec.fY - aN2Vec.fY ) != 0 ) // besitzt zweiter Richtungsvektor die gleiche Steigung aber andere - bContinues = FALSE; // Richtung, dann wird hinten noch eine halbe Linienbreite angehaengt - } - if ( !bContinues ) - { - mpFloat0[ 1 ] += aN1Vec; - mpFloat0[ 2 ] += aN1Vec; - } - } - else - { - mnFloat0Points = mnFloat1Points; - ImplFloatPoint* pTemp = mpFloat1; - mpFloat1 = mpFloat0; - mpFloat0 = pTemp; - } - if ( maLineInfo.GetStyle() == LINE_DASH ) - { - double fLenghtDone = 0; - double fLenght = ( mfDashDotLenght > 0.0 ) ? mfDashDotLenght : mfDistanceLenght; - - double fDistance; - - fDistance = hypot( mpFloat0[ 0 ].fX - mpFloat0[ 1 ].fX, mpFloat0[ 0 ].fY - mpFloat0[ 1 ].fY ); - if ( mnFloat0Points == 5 ) - { - double fDist = hypot( mpFloat0[ 2 ].fX - mpFloat0[ 3 ].fX, mpFloat0[ 2 ].fY - mpFloat0[ 3 ].fY ); - if ( fDist < fDistance ) - fDistance = fDist; - } - - if ( fDistance > fLenght ) - { - fLenghtDone = fLenght; - - ImplFloatPoint aNVec( mpFloat0[ 0 ].GetNVec( mpFloat0[ 1 ] ) ); - aNVec *= fLenght; - mnFloat1Points = mnFloat0Points; - ImplFloatPoint* pTemp = mpFloat1; - mpFloat1 = mpFloat0; - mpFloat0 = pTemp; - mnFloat0Points = 4; - mpFloat0[ 0 ] = mpFloat0[ 1 ] = mpFloat1[ 0 ]; - mpFloat0[ 1 ] += aNVec; - mpFloat0[ 2 ] = mpFloat0[ 3 ] = mpFloat1[ 3 ]; - mpFloat0[ 2 ] += aNVec; - - mpFloat1[ 0 ] = mpFloat0[ 1 ]; - mpFloat1[ 3 ] = mpFloat0[ 2 ]; - } - else - { - mnFloat1Points = 0; - fLenghtDone = fDistance; - } - - if ( mfDashDotLenght > 0.0 ) - { // Ein Dash oder Dot wurde erzeugt - mfDashDotLenght -= fLenghtDone; - if ( mfDashDotLenght == 0.0 ) - { // Komplett erzeugt - if ( mnDashCount ) - mnDashCount--; - else - mnDotCount--; - - if ( ! ( mnDashCount | mnDotCount ) ) - { - mnDashCount = maLineInfo.GetDashCount(); - mnDotCount = maLineInfo.GetDotCount(); - } - mfDistanceLenght = maLineInfo.GetDistance(); - } - } - else - { // Das erzeugte Polygon muessen wir ignorieren - mfDistanceLenght -= fLenghtDone; - if ( mfDistanceLenght == 0.0 ) - mfDashDotLenght = ( mnDashCount ) ? maLineInfo.GetDashLen() : maLineInfo.GetDotLen(); - continue; - } - } - maPolygon.SetSize( (UINT16)mnFloat0Points ); - UINT16 i = 0; - maPolygon[ i++ ] = Point( FRound( mpFloat0[ 0 ].fX ), FRound( mpFloat0[ 0 ].fY ) ); - maPolygon[ i++ ] = Point( FRound( mpFloat0[ 1 ].fX ), FRound( mpFloat0[ 1 ].fY ) ); - if ( mnFloat0Points > 4 ) - maPolygon[ i++ ] = Point( FRound( mpFloat0[ 4 ].fX ), FRound( mpFloat0[ 4 ].fY ) ); - if ( mnFloat0Points > 5 ) - maPolygon[ i++ ] = Point( FRound( mpFloat0[ 5 ].fX ), FRound( mpFloat0[ 5 ].fY ) ); - maPolygon[ i++ ] = Point( FRound( mpFloat0[ 2 ].fX ), FRound( mpFloat0[ 2 ].fY ) ); - maPolygon[ i ] = Point( FRound( mpFloat0[ 3 ].fX ), FRound( mpFloat0[ 3 ].fY ) ); - - } - else - { - if ( !mnFloat1Points ) - { - mpFloat0[ 0 ] = mpFloatPoint[ mnLinesAvailable-- ]; - mpFloat0[ 1 ] = mpFloatPoint[ mnLinesAvailable ]; - } - else - { - mpFloat0[ 0 ] = mpFloat1[ 0 ]; - mpFloat0[ 1 ] = mpFloat1[ 1 ]; - } - if ( maLineInfo.GetStyle() == LINE_DASH ) - { - double fLenghtDone = 0; - double fLenght = ( mfDashDotLenght > 0.0 ) ? mfDashDotLenght : mfDistanceLenght; - double fDistance; - fDistance = hypot( mpFloat0[ 0 ].fX - mpFloat0[ 1 ].fX, mpFloat0[ 0 ].fY - mpFloat0[ 1 ].fY ); - if ( fDistance > fLenght ) - { - fLenghtDone = fLenght; - ImplFloatPoint aNVec( mpFloat0[ 0 ].GetNVec( mpFloat0[ 1 ] ) ); - aNVec *= fLenght; - mpFloat1[ 1 ] = mpFloat0[ 1 ]; - mpFloat0[ 1 ] = mpFloat0[ 0 ]; - mpFloat0[ 1 ] += aNVec; - mpFloat1[ 0 ] = mpFloat0[ 1 ]; - mnFloat1Points = 2; - } - else - { - mnFloat1Points = 0; - fLenghtDone = fDistance; - } - if ( mfDashDotLenght > 0.0 ) - { // Ein Dash oder Dot wurde erzeugt - mfDashDotLenght -= fLenghtDone; - if ( mfDashDotLenght == 0.0 ) - { // Komplett erzeugt - if ( mnDashCount ) - mnDashCount--; - else - mnDotCount--; - - if ( ! ( mnDashCount | mnDotCount ) ) - { - mnDashCount = maLineInfo.GetDashCount(); - mnDotCount = maLineInfo.GetDotCount(); - } - mfDistanceLenght = maLineInfo.GetDistance(); - } - } - else - { // Das erzeugte Polygon muessen wir ignorieren - mfDistanceLenght -= fLenghtDone; - if ( mfDistanceLenght == 0.0 ) - mfDashDotLenght = ( mnDashCount ) ? maLineInfo.GetDashLen() : maLineInfo.GetDotLen(); - continue; - } - } - maPolygon.SetSize( 2 ); - maPolygon[ 0 ] = Point( (long)mpFloat0[ 0 ].fX, (long)mpFloat0[ 0 ].fY ); - maPolygon[ 1 ] = Point( (long)mpFloat0[ 1 ].fX, (long)mpFloat0[ 1 ].fY ); - } - return &maPolygon; - } - return NULL; -}; diff --git a/vcl/source/gdi/implncvt.hxx b/vcl/source/gdi/implncvt.hxx deleted file mode 100644 index 2d369d12f253..000000000000 --- a/vcl/source/gdi/implncvt.hxx +++ /dev/null @@ -1,78 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: implncvt.hxx,v $ - * $Revision: 1.5 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_LINECONV_HXX -#define _SV_LINECONV_HXX - -#include -#include - -// -------------------- -// - ImplLineConverter -// -------------------- - -struct ImplFloatPoint; - -class ImplLineConverter -{ - BOOL mbClosed; - BOOL mbRefPoint; - INT32 mnRefDistance; - - double mfWidthHalf; - LineInfo maLineInfo; - - double mfDashDotLenght; - double mfDistanceLenght; - - UINT32 mnDashCount; - UINT32 mnDotCount; - - Polygon maPolygon; - UINT32 mnFloat0Points; - ImplFloatPoint* mpFloat0; - UINT32 mnFloat1Points; - ImplFloatPoint* mpFloat1; - - UINT32 mnLinesAvailable; - UINT32 mnLines; - - ImplFloatPoint* mpFloatPoint; - - public: - - ImplLineConverter( const Polygon& rPoly, const LineInfo& rLineInfo, const Point* pRefPoint ); - ~ImplLineConverter(); - - const Polygon* ImplGetFirst(); - const Polygon* ImplGetNext(); -}; - -#endif diff --git a/vcl/source/gdi/makefile.mk b/vcl/source/gdi/makefile.mk index a09ae92dcb5e..bdc08118979a 100644 --- a/vcl/source/gdi/makefile.mk +++ b/vcl/source/gdi/makefile.mk @@ -81,7 +81,6 @@ SLOFILES= $(SLO)$/salmisc.obj \ $(SLO)$/imagerepository.obj \ $(SLO)$/impprn.obj \ $(SLO)$/impvect.obj \ - $(SLO)$/implncvt.obj \ $(SLO)$/jobset.obj \ $(SLO)$/lineinfo.obj \ $(SLO)$/mapmod.obj \ diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index e86256bc4830..7352f5ed45d9 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -56,7 +56,6 @@ #include #include #include -#include #include #include #include @@ -77,6 +76,8 @@ #include #include +#include + using namespace ::com::sun::star; DBG_NAME( OutputDevice ) @@ -2325,6 +2326,130 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) // ----------------------------------------------------------------------- +void OutputDevice::impPaintLineGeometryWithEvtlExpand( + const LineInfo& rInfo, + basegfx::B2DPolyPolygon aLinePolyPolygon) +{ + const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) + && mpGraphics->supportsOperation(OutDevSupport_B2DDraw) + && ROP_OVERPAINT == GetRasterOp() + && IsLineColor()); + basegfx::B2DPolyPolygon aFillPolyPolygon; + const bool bDashUsed(LINE_DASH == rInfo.GetStyle()); + const bool bLineWidthUsed(rInfo.GetWidth() > 1); + + if(bDashUsed && aLinePolyPolygon.count()) + { + ::std::vector< double > fDotDashArray; + const double fDashLen(rInfo.GetDashLen()); + const double fDotLen(rInfo.GetDotLen()); + const double fDistance(rInfo.GetDistance()); + + for(sal_uInt16 a(0); a < rInfo.GetDashCount(); a++) + { + fDotDashArray.push_back(fDashLen); + fDotDashArray.push_back(fDistance); + } + + for(sal_uInt16 b(0); b < rInfo.GetDotCount(); b++) + { + fDotDashArray.push_back(fDotLen); + fDotDashArray.push_back(fDistance); + } + + const double fAccumulated(::std::accumulate(fDotDashArray.begin(), fDotDashArray.end(), 0.0)); + + if(fAccumulated > 0.0) + { + basegfx::B2DPolyPolygon aResult; + + for(sal_uInt32 c(0); c < aLinePolyPolygon.count(); c++) + { + basegfx::B2DPolyPolygon aLineTraget; + basegfx::tools::applyLineDashing( + aLinePolyPolygon.getB2DPolygon(c), + fDotDashArray, + &aLineTraget); + aResult.append(aLineTraget); + } + + aLinePolyPolygon = aResult; + } + } + + if(bLineWidthUsed && aLinePolyPolygon.count()) + { + const double fHalfLineWidth((rInfo.GetWidth() * 0.5) + 0.5); + + for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) + { + aFillPolyPolygon.append(basegfx::tools::createAreaGeometry( + aLinePolyPolygon.getB2DPolygon(a), + fHalfLineWidth, + rInfo.GetLineJoin())); + } + + aLinePolyPolygon.clear(); + } + + GDIMetaFile* pOldMetaFile = mpMetaFile; + mpMetaFile = NULL; + + if(aLinePolyPolygon.count()) + { + for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) + { + const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); + bool bDone(false); + + if(bTryAA) + { + bDone = mpGraphics->DrawPolyLine(aCandidate, basegfx::B2DVector(1.0, 1.0), basegfx::B2DLINEJOIN_NONE, this); + } + + if(!bDone) + { + const Polygon aPolygon(aCandidate); + mpGraphics->DrawPolyLine(aPolygon.GetSize(), (const SalPoint*)aPolygon.GetConstPointAry(), this); + } + } + } + + if(aFillPolyPolygon.count()) + { + const Color aOldLineColor( maLineColor ); + const Color aOldFillColor( maFillColor ); + + SetLineColor(); + ImplInitLineColor(); + SetFillColor( aOldLineColor ); + ImplInitFillColor(); + + bool bDone(false); + + if(bTryAA) + { + bDone = mpGraphics->DrawPolyPolygon(aFillPolyPolygon, 0.0, this); + } + + if(!bDone) + { + for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) + { + const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); + mpGraphics->DrawPolygon(aPolygon.GetSize(), (const SalPoint*)aPolygon.GetConstPointAry(), this); + } + } + + SetFillColor( aOldFillColor ); + SetLineColor( aOldLineColor ); + } + + mpMetaFile = pOldMetaFile; +} + +// ----------------------------------------------------------------------- + void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt, const LineInfo& rLineInfo ) { @@ -2352,47 +2477,22 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt, if ( mbOutputClipped ) return; + const Point aStartPt( ImplLogicToDevicePixel( rStartPt ) ); + const Point aEndPt( ImplLogicToDevicePixel( rEndPt ) ); const LineInfo aInfo( ImplLogicToDevicePixel( rLineInfo ) ); + const bool bDashUsed(LINE_DASH == aInfo.GetStyle()); + const bool bLineWidthUsed(aInfo.GetWidth() > 1); - if( ( aInfo.GetWidth() > 1L ) || ( LINE_DASH == aInfo.GetStyle() ) ) + if(bDashUsed || bLineWidthUsed) { - Polygon aPoly( 2 ); aPoly[ 0 ] = rStartPt; aPoly[ 1 ] = rEndPt; - GDIMetaFile* pOldMetaFile = mpMetaFile; - ImplLineConverter aLineCvt( ImplLogicToDevicePixel( aPoly ), aInfo, ( mbRefPoint ) ? &maRefPoint : NULL ); - - mpMetaFile = NULL; - - if ( aInfo.GetWidth() > 1 ) - { - const Color aOldLineColor( maLineColor ); - const Color aOldFillColor( maFillColor ); - - SetLineColor(); - ImplInitLineColor(); - SetFillColor( aOldLineColor ); - ImplInitFillColor(); - - for( const Polygon* pPoly = aLineCvt.ImplGetFirst(); pPoly; pPoly = aLineCvt.ImplGetNext() ) - mpGraphics->DrawPolygon( pPoly->GetSize(), (const SalPoint*) pPoly->GetConstPointAry(), this ); + basegfx::B2DPolygon aLinePolygon; + aLinePolygon.append(basegfx::B2DPoint(aStartPt.X(), aStartPt.Y())); + aLinePolygon.append(basegfx::B2DPoint(aEndPt.X(), aEndPt.Y())); - SetFillColor( aOldFillColor ); - SetLineColor( aOldLineColor ); - } - else - { - if ( mbInitLineColor ) - ImplInitLineColor(); - - for ( const Polygon* pPoly = aLineCvt.ImplGetFirst(); pPoly; pPoly = aLineCvt.ImplGetNext() ) - mpGraphics->DrawLine( (*pPoly)[ 0 ].X(), (*pPoly)[ 0 ].Y(), (*pPoly)[ 1 ].X(), (*pPoly)[ 1 ].Y(), this ); - } - mpMetaFile = pOldMetaFile; + impPaintLineGeometryWithEvtlExpand(aInfo, basegfx::B2DPolyPolygon(aLinePolygon)); } else { - const Point aStartPt( ImplLogicToDevicePixel( rStartPt ) ); - const Point aEndPt( ImplLogicToDevicePixel( rEndPt ) ); - if ( mbInitLineColor ) ImplInitLineColor(); @@ -2553,7 +2653,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly, const LineInfo& rLineInfo void OutputDevice::ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineInfo& rLineInfo) { - USHORT nPoints = rPoly.GetSize(); + const USHORT nPoints(rPoly.GetSize()); if ( !IsDeviceOutputNecessary() || !mbLineColor || ( nPoints < 2 ) || ( LINE_NONE == rLineInfo.GetStyle() ) || ImplIsRecordLayout() ) return; @@ -2561,11 +2661,19 @@ void OutputDevice::ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineI Polygon aPoly = ImplLogicToDevicePixel( rPoly ); // #100127# LineInfo is not curve-safe, subdivide always - if( aPoly.HasFlags() ) - { - aPoly = ImplSubdivideBezier( aPoly ); - nPoints = aPoly.GetSize(); - } + // + // What shall this mean? It's wrong to subdivide here when the + // polygon is a fat line. In that case, the painted geometry + // WILL be much different. + // I also have no idea how this could be related to the given ID + // which reads 'consolidate boost versions' in the task description. + // Removing. + // + //if( aPoly.HasFlags() ) + //{ + // aPoly = ImplSubdivideBezier( aPoly ); + // nPoints = aPoly.GetSize(); + //} // we need a graphics if ( !mpGraphics && !ImplGetGraphics() ) @@ -2577,67 +2685,20 @@ void OutputDevice::ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineI if ( mbOutputClipped ) return; - const LineInfo aInfo( ImplLogicToDevicePixel( rLineInfo ) ); - const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) - && mpGraphics->supportsOperation(OutDevSupport_B2DDraw) - && ROP_OVERPAINT == GetRasterOp() - && IsLineColor()); - - if( aInfo.GetWidth() > 1L ) - { - const Color aOldLineColor( maLineColor ); - const Color aOldFillColor( maFillColor ); - GDIMetaFile* pOldMetaFile = mpMetaFile; - ImplLineConverter aLineCvt( aPoly, aInfo, ( mbRefPoint ) ? &maRefPoint : NULL ); - - mpMetaFile = NULL; - SetLineColor(); + if ( mbInitLineColor ) ImplInitLineColor(); - SetFillColor( aOldLineColor ); - ImplInitFillColor(); - bool bDone(false); - - if(bTryAA) - { - // #i101491# try AAed version - // Use old on-the-fly geometry preparation, combine with AA - bool bSuccess(true); - - for(const Polygon* pPoly = aLineCvt.ImplGetFirst(); bSuccess && pPoly; pPoly = aLineCvt.ImplGetNext()) - { - bSuccess = mpGraphics->DrawPolyPolygon(basegfx::B2DPolyPolygon(pPoly->getB2DPolygon()), 0.0, this); - } - if(bSuccess) - { - bDone = true; - } - } - - if(!bDone) - { - for( const Polygon* pPoly = aLineCvt.ImplGetFirst(); pPoly; pPoly = aLineCvt.ImplGetNext() ) - { - mpGraphics->DrawPolygon( pPoly->GetSize(), (const SalPoint*) pPoly->GetConstPointAry(), this ); - } - } + const LineInfo aInfo( ImplLogicToDevicePixel( rLineInfo ) ); + const bool bDashUsed(LINE_DASH == aInfo.GetStyle()); + const bool bLineWidthUsed(aInfo.GetWidth() > 1); - SetLineColor( aOldLineColor ); - SetFillColor( aOldFillColor ); - mpMetaFile = pOldMetaFile; + if(bDashUsed || bLineWidthUsed) + { + impPaintLineGeometryWithEvtlExpand(aInfo, basegfx::B2DPolyPolygon(aPoly.getB2DPolygon())); } else { - if ( mbInitLineColor ) - ImplInitLineColor(); - if ( LINE_DASH == aInfo.GetStyle() ) - { - ImplLineConverter aLineCvt( aPoly, aInfo, ( mbRefPoint ) ? &maRefPoint : NULL ); - for( const Polygon* pPoly = aLineCvt.ImplGetFirst(); pPoly; pPoly = aLineCvt.ImplGetNext() ) - mpGraphics->DrawPolyLine( pPoly->GetSize(), (const SalPoint*)pPoly->GetConstPointAry(), this ); - } - else - mpGraphics->DrawPolyLine( nPoints, (const SalPoint*) aPoly.GetConstPointAry(), this ); + mpGraphics->DrawPolyLine(nPoints, (const SalPoint*)aPoly.GetConstPointAry(), this); } if( mpAlphaVDev ) @@ -3066,8 +3127,7 @@ void OutputDevice::DrawPolyLine( } else { - // fallback to old polygon drawing if needed. This will really - // use ImplLineConverter, but still try to AA lines + // fallback to old polygon drawing if needed const Polygon aToolsPolygon( rB2DPolygon ); LineInfo aLineInfo; if( fLineWidth != 0.0 ) diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 2cbebf6f23e2..9d68b13553eb 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -61,11 +61,9 @@ #include #include #include - -#include "implncvt.hxx" - #include "cppuhelper/implbase1.hxx" #include +#include using namespace vcl; using namespace rtl; diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 1e9572887e0b..c1f987377c67 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -52,7 +52,6 @@ #include #include #include -#include #include #include #include diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx index d140610f7875..e128b7d150fa 100644 --- a/vcl/unx/source/gdi/salgdi.cxx +++ b/vcl/unx/source/gdi/salgdi.cxx @@ -1494,6 +1494,9 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const : // the used basegfx::tools::createAreaGeometry is simply too // expensive with very big polygons; fallback to caller (who // should use ImplLineConverter normally) + // AW: ImplLineConverter had to be removed since it does not even + // know LineJoins, so the fallback will now prepare the line geometry + // the same way. return false; } const XRenderPeer& rRenderPeer = XRenderPeer::GetInstance(); -- cgit From 4324965f99217790136cb79160f8449f18ff3975 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 15 Oct 2009 14:27:12 +0200 Subject: #i105655# commiting changes2 so far for preparing linux version --- filter/source/flash/swfwriter.hxx | 3 + filter/source/flash/swfwriter1.cxx | 128 +++++++++++++++++++++++++++++++++++-- filter/source/pdf/pdfexport.cxx | 37 +++++++++-- 3 files changed, 159 insertions(+), 9 deletions(-) diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx index d91410c36b98..e8c75b8095b6 100644 --- a/filter/source/flash/swfwriter.hxx +++ b/filter/source/flash/swfwriter.hxx @@ -63,6 +63,8 @@ class PolyPolygon; class Gradient; class SvtGraphicFill; class SvtGraphicStroke; +class LineInfo; +namespace basegfx { class B2DPolygon; } inline sal_uInt16 _uInt16( sal_Int32 nValue ) { @@ -363,6 +365,7 @@ private: void Impl_writeBmp( sal_uInt16 nBitmapId, sal_uInt32 width, sal_uInt32 height, sal_uInt8 *pCompressed, sal_uInt32 compressed_size ); void Impl_writeImage( const BitmapEx& rBmpEx, const Point& rPt, const Size& rSz, const Point& rSrcPt, const Size& rSrcSz, const Rectangle& rClipRect, bool bMap ); void Impl_writeJPEG(sal_uInt16 nBitmapId, const sal_uInt8* pJpgData, sal_uInt32 nJpgDataLength, sal_uInt8 *pCompressed, sal_uInt32 compressed_size ); + void Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); void Impl_writeActions( const GDIMetaFile& rMtf ); void Impl_writePolygon( const Polygon& rPoly, sal_Bool bFilled ); void Impl_writePolygon( const Polygon& rPoly, sal_Bool bFilled, const Color& rFillColor, const Color& rLineColor ); diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index cf5453e397d4..8038abb2f268 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -33,7 +33,6 @@ #include #include - #include #include "swfwriter.hxx" #include @@ -42,10 +41,11 @@ #include #include #include - - +#include +#include #include #include +#include #ifndef _ZLIB_H #ifdef SYSTEM_ZLIB @@ -1238,6 +1238,12 @@ bool Writer::Impl_writeStroke( SvtGraphicStroke& rStroke ) Rectangle aNewRect( aPolyPolygon.GetBoundRect() ); + // as log as not LINESTYLE2 and DefineShape4 is used (which + // added support for LineJoin), only round LineJoins are + // supported. Fallback to META_POLYLINE_ACTION and META_LINE_ACTION + if(SvtGraphicStroke::joinRound != rStroke.getJoinType()) + return false; + PolyPolygon aStartArrow; rStroke.getStartArrow( aStartArrow ); if( 0 != aStartArrow.Count() ) @@ -1393,6 +1399,97 @@ bool Writer::Impl_writePageField( Rectangle& rTextBounds ) // ----------------------------------------------------------------------------- +void Writer::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon) +{ + basegfx::B2DPolyPolygon aLinePolyPolygon(rLinePolygon); + basegfx::B2DPolyPolygon aFillPolyPolygon; + const bool bDashUsed(LINE_DASH == rInfo.GetStyle()); + const bool bLineWidthUsed(rInfo.GetWidth() > 1); + + if(bDashUsed && aLinePolyPolygon.count()) + { + ::std::vector< double > fDotDashArray; + const double fDashLen(rInfo.GetDashLen()); + const double fDotLen(rInfo.GetDotLen()); + const double fDistance(rInfo.GetDistance()); + + for(sal_uInt16 a(0); a < rInfo.GetDashCount(); a++) + { + fDotDashArray.push_back(fDashLen); + fDotDashArray.push_back(fDistance); + } + + for(sal_uInt16 b(0); b < rInfo.GetDotCount(); b++) + { + fDotDashArray.push_back(fDotLen); + fDotDashArray.push_back(fDistance); + } + + const double fAccumulated(::std::accumulate(fDotDashArray.begin(), fDotDashArray.end(), 0.0)); + + if(fAccumulated > 0.0) + { + basegfx::B2DPolyPolygon aResult; + + for(sal_uInt32 c(0); c < aLinePolyPolygon.count(); c++) + { + basegfx::B2DPolyPolygon aLineTraget; + basegfx::tools::applyLineDashing( + aLinePolyPolygon.getB2DPolygon(c), + fDotDashArray, + &aLineTraget); + aResult.append(aLineTraget); + } + + aLinePolyPolygon = aResult; + } + } + + if(bLineWidthUsed && aLinePolyPolygon.count()) + { + const double fHalfLineWidth((rInfo.GetWidth() * 0.5) + 0.5); + + for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) + { + aFillPolyPolygon.append(basegfx::tools::createAreaGeometry( + aLinePolyPolygon.getB2DPolygon(a), + fHalfLineWidth, + rInfo.GetLineJoin())); + } + + aLinePolyPolygon.clear(); + } + + if(aLinePolyPolygon.count()) + { + for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) + { + const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); + Impl_writePolygon(Polygon(aCandidate), sal_False ); + } + } + + if(aFillPolyPolygon.count()) + { + const Color aOldLineColor(mpVDev->GetLineColor()); + const Color aOldFillColor(mpVDev->GetFillColor()); + + mpVDev->SetLineColor(); + mpVDev->SetFillColor(aOldLineColor); + + for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) + { + const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); + Impl_writePolyPolygon(PolyPolygon(Polygon(aPolygon)), sal_True ); + } + + mpVDev->SetLineColor(aOldLineColor); + mpVDev->SetFillColor(aOldFillColor); + } +} + +// ----------------------------------------------------------------------------- + void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) { Rectangle clipRect; @@ -1424,7 +1521,18 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) { const MetaLineAction* pA = (const MetaLineAction*) pAction; - Impl_writeLine( pA->GetStartPoint(), pA->GetEndPoint() ); + if(pA->GetLineInfo().IsDefault()) + { + Impl_writeLine( pA->GetStartPoint(), pA->GetEndPoint() ); + } + else + { + // LineInfo used; handle Dash/Dot and fat lines + basegfx::B2DPolygon aPolygon; + aPolygon.append(basegfx::B2DPoint(pA->GetStartPoint().X(), pA->GetStartPoint().Y())); + aPolygon.append(basegfx::B2DPoint(pA->GetEndPoint().X(), pA->GetEndPoint().Y())); + Impl_handleLineInfoPolyPolygons(pA->GetLineInfo(), aPolygon); + } } break; @@ -1499,7 +1607,17 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) const Polygon& rPoly = pA->GetPolygon(); if( rPoly.GetSize() ) - Impl_writePolygon( rPoly, sal_False ); + { + if(pA->GetLineInfo().IsDefault()) + { + Impl_writePolygon( rPoly, sal_False ); + } + else + { + // LineInfo used; handle Dash/Dot and fat lines + Impl_handleLineInfoPolyPolygons(pA->GetLineInfo(), rPoly.getB2DPolygon()); + } + } } break; diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index ceff18507db9..ca40914b076f 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -1351,7 +1351,6 @@ sal_Bool PDFExport::ImplWriteActions( PDFWriter& rWriter, PDFExtOutDevData* pPDF PolyPolygon aEndArrow; double fTransparency( aStroke.getTransparency() ); double fStrokeWidth( aStroke.getStrokeWidth() ); - SvtGraphicStroke::JoinType eJT( aStroke.getJoinType() ); SvtGraphicStroke::DashArray aDashArray; aStroke.getStartArrow( aStartArrow ); @@ -1361,8 +1360,6 @@ sal_Bool PDFExport::ImplWriteActions( PDFWriter& rWriter, PDFExtOutDevData* pPDF bSkipSequence = sal_True; if ( aStartArrow.Count() || aEndArrow.Count() ) bSkipSequence = sal_False; - if ( (sal_uInt32)eJT > 2 ) - bSkipSequence = sal_False; if ( aDashArray.size() && ( fStrokeWidth != 0.0 ) && ( fTransparency == 0.0 ) ) bSkipSequence = sal_False; if ( bSkipSequence ) @@ -1390,7 +1387,39 @@ sal_Bool PDFExport::ImplWriteActions( PDFWriter& rWriter, PDFExtOutDevData* pPDF break; } aInfo.m_aDashArray = aDashArray; - rWriter.DrawPolyLine( aPath, aInfo ); + + if(SvtGraphicStroke::joinNone == aStroke.getJoinType()) + { + // emulate no edge rounding by handling single edges + const sal_uInt16 nPoints(aPath.GetSize()); + const bool bCurve(aPath.HasFlags()); + + for(sal_uInt16 a(0); a + 1 < nPoints; a++) + { + if(bCurve + && POLY_NORMAL != aPath.GetFlags(a + 1) + && a + 2 < nPoints + && POLY_NORMAL != aPath.GetFlags(a + 2) + && a + 3 < nPoints) + { + const Polygon aSnippet(4, + aPath.GetConstPointAry() + a, + aPath.GetConstFlagAry() + a); + rWriter.DrawPolyLine( aSnippet, aInfo ); + a += 2; + } + else + { + const Polygon aSnippet(2, + aPath.GetConstPointAry() + a); + rWriter.DrawPolyLine( aSnippet, aInfo ); + } + } + } + else + { + rWriter.DrawPolyLine( aPath, aInfo ); + } } } else if ( pA->GetComment().Equals( "XPATHFILL_SEQ_BEGIN" ) ) -- cgit From 28e6a67615184ee13a032e662d17d535e4822fa7 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 20 Oct 2009 15:26:49 +0200 Subject: #i106074# silence extra warnings with GCC Fortify Source (patch by cmc) --- sal/osl/unx/process.c | 50 +++++++++++++++++++++++++++----------------------- sal/osl/unx/profile.c | 12 +++++------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index 7966651bed86..6745c8ba543c 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -432,9 +432,8 @@ oslSocket osl_receiveResourcePipe(oslPipe pPipe) static void ChildStatusProc(void *pData) { int i; -/* int first = 0;*/ - pid_t pid; -/* int status;*/ + pid_t pid = -1; + int status = 0; int channel[2]; ProcessData data; ProcessData *pdata; @@ -447,23 +446,26 @@ static void ChildStatusProc(void *pData) in our child process */ memcpy(&data, pData, sizeof(data)); - socketpair(AF_UNIX, SOCK_STREAM, 0, channel); + if (socketpair(AF_UNIX, SOCK_STREAM, 0, channel) == -1) + status = errno; fcntl(channel[0], F_SETFD, FD_CLOEXEC); fcntl(channel[1], F_SETFD, FD_CLOEXEC); /* Create redirected IO pipes */ + if ( status == 0 && data.m_pInputWrite ) + if (pipe( stdInput ) == -1) + status = errno; - if ( data.m_pInputWrite ) - pipe( stdInput ); + if ( status == 0 && data.m_pOutputRead ) + if (pipe( stdOutput ) == -1) + status = errno; - if ( data.m_pOutputRead ) - pipe( stdOutput ); + if ( status == 0 && data.m_pErrorRead ) + if (pipe( stdError ) == -1) + status = errno; - if ( data.m_pErrorRead ) - pipe( stdError ); - - if ((pid = fork()) == 0) + if ( (status == 0) && ((pid = fork()) == 0) ) { /* Child */ if (channel[0] != -1) close(channel[0]); @@ -481,12 +483,12 @@ static void ChildStatusProc(void *pData) #endif } - if ((data.m_uid == (uid_t)-1) || ((data.m_uid == getuid()) && (data.m_gid == getgid()))) + int chstatus = 0; + if (data.m_pszDir) + chstatus = chdir(data.m_pszDir); + if (chstatus == 0 && ((data.m_uid == (uid_t)-1) || ((data.m_uid == getuid()) && (data.m_gid == getgid())))) { - if (data.m_pszDir) - chdir(data.m_pszDir); - for (i = 0; data.m_pszEnv[i] != NULL; i++) putenv(data.m_pszEnv[i]); @@ -532,7 +534,9 @@ static void ChildStatusProc(void *pData) OSL_TRACE("ChildStatusProc : starting '%s' failed",data.m_pszArgs[0]); /* if we reach here, something went wrong */ - write(channel[1], &errno, sizeof(errno)); + sal_Int32 nWrote = write(channel[1], &errno, sizeof(errno)); + if (nWrote != sizeof(errno)) + OSL_TRACE("sendFdPipe : sending failed (%s)",strerror(errno)); if (channel[1] != -1) close(channel[1]); @@ -540,8 +544,6 @@ static void ChildStatusProc(void *pData) } else { /* Parent */ - int status; - if (channel[1] != -1) close(channel[1]); /* Close unused pipe ends */ @@ -549,15 +551,17 @@ static void ChildStatusProc(void *pData) if (stdOutput[1] != -1) close( stdOutput[1] ); if (stdError[1] != -1) close( stdError[1] ); - while (((i = read(channel[0], &status, sizeof(status))) < 0)) + if (pid > 0) { - if (errno != EINTR) - break; + while (((i = read(channel[0], &status, sizeof(status))) < 0)) + { + if (errno != EINTR) + break; + } } if (channel[0] != -1) close(channel[0]); - if ((pid > 0) && (i == 0)) { pid_t child_pid; diff --git a/sal/osl/unx/profile.c b/sal/osl/unx/profile.c index a01d292e23b6..a0ea4c59ffdd 100644 --- a/sal/osl/unx/profile.c +++ b/sal/osl/unx/profile.c @@ -263,12 +263,9 @@ static oslProfile SAL_CALL osl_psz_openProfile(const sal_Char *pszProfileName, o pProfile->m_Stamp = OslProfile_getFileStamp(pFile); bRet=loadProfile(pFile, pProfile); + bRet &= realpath(pszProfileName, pProfile->m_FileName) != NULL; OSL_ASSERT(bRet); - /* #109261# using osl profiles is deprecated */ - /* OSL_VERIFY(NULL != realpath(pszProfileName, pProfile->m_FileName)); */ - realpath(pszProfileName, pProfile->m_FileName); - if (pProfile->m_pFile == NULL) closeFileImpl(pFile,pProfile->m_Flags); @@ -1338,6 +1335,7 @@ static osl_TStamp closeFileImpl(osl_TFile* pFile, oslProfileOption Flags) static sal_Bool OslProfile_rewindFile(osl_TFile* pFile, sal_Bool bTruncate) { + sal_Bool bRet = sal_True; #ifdef TRACE_OSL_PROFILE OSL_TRACE("In osl_OslProfile_rewindFile\n"); #endif @@ -1349,14 +1347,14 @@ static sal_Bool OslProfile_rewindFile(osl_TFile* pFile, sal_Bool bTruncate) #ifdef DEBUG_OSL_PROFILE OSL_TRACE("rewinding\n"); #endif - lseek(pFile->m_Handle, SEEK_SET, 0L); + bRet = (lseek(pFile->m_Handle, SEEK_SET, 0L) == 0L); if (bTruncate) { #ifdef DEBUG_OSL_PROFILE OSL_TRACE("truncating\n"); #endif - ftruncate(pFile->m_Handle, 0L); + bRet &= (ftruncate(pFile->m_Handle, 0L) == 0); } } @@ -1364,7 +1362,7 @@ static sal_Bool OslProfile_rewindFile(osl_TFile* pFile, sal_Bool bTruncate) #ifdef TRACE_OSL_PROFILE OSL_TRACE("Out osl_OslProfile_rewindFile [ok]\n"); #endif - return (sal_True); + return bRet; } -- cgit From 40a156995c9a39cd5de0efaa0ddcc163515bf70a Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 20 Oct 2009 15:32:17 +0200 Subject: #i106074# silence warning about potentially uninitialized variable in previous change --- sal/osl/unx/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index 6745c8ba543c..453d00091c63 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -431,7 +431,6 @@ oslSocket osl_receiveResourcePipe(oslPipe pPipe) static void ChildStatusProc(void *pData) { - int i; pid_t pid = -1; int status = 0; int channel[2]; @@ -489,6 +488,7 @@ static void ChildStatusProc(void *pData) if (chstatus == 0 && ((data.m_uid == (uid_t)-1) || ((data.m_uid == getuid()) && (data.m_gid == getgid())))) { + int i; for (i = 0; data.m_pszEnv[i] != NULL; i++) putenv(data.m_pszEnv[i]); @@ -544,6 +544,7 @@ static void ChildStatusProc(void *pData) } else { /* Parent */ + int i = -1; if (channel[1] != -1) close(channel[1]); /* Close unused pipe ends */ -- cgit From 4f4c2a6790faa8255e390cd85f93adebe2440020 Mon Sep 17 00:00:00 2001 From: Mikhail Voitenko Date: Tue, 20 Oct 2009 13:38:21 +0000 Subject: #i105758# ODF icons for windows --- desktop/util/verinfo.rc | 60 ++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/desktop/util/verinfo.rc b/desktop/util/verinfo.rc index 8f1840afbed9..cd7d4996e882 100644 --- a/desktop/util/verinfo.rc +++ b/desktop/util/verinfo.rc @@ -101,42 +101,42 @@ VS_VERSION_INFO versioninfo } } -2 ICON "icons\\so9_writer_doc.ico" -3 ICON "icons\\so9_writer_tem.ico" -4 ICON "icons\\so9_calc_doc.ico" -5 ICON "icons\\so9_calc_tem.ico" -6 ICON "icons\\so9_draw_doc.ico" -7 ICON "icons\\so9_draw_tem.ico" -8 ICON "icons\\so9_impress_doc.ico" -9 ICON "icons\\so9_impress_tem.ico" -10 ICON "icons\\so9_impress_doc.ico" -11 ICON "icons\\so9_global_doc.ico" -12 ICON "icons\\so9_html_doc.ico" -13 ICON "icons\\so9_chart_doc.ico" -14 ICON "icons\\so9_base_doc.ico" -15 ICON "icons\\so9_math_doc.ico" -16 ICON "icons\\so9_empty_tem.ico" -17 ICON "icons\\so9_macro_doc.ico" +2 ICON "icons\\oasis-writer.ico" +3 ICON "icons\\oasis-writer-template.ico" +4 ICON "icons\\oasis-spreadsheet.ico" +5 ICON "icons\\oasis-spreadsheet-template.ico" +6 ICON "icons\\oasis-drawing.ico" +7 ICON "icons\\oasis-drawing-template.ico" +8 ICON "icons\\oasis-presentation.ico" +9 ICON "icons\\oasis-presentation-template.ico" +10 ICON "icons\\oasis-presentation-template.ico" +11 ICON "icons\\oasis-master-document.ico" +12 ICON "icons\\oasis-web-template.ico" +13 ICON "icons\\oasis-empty-document.ico" +14 ICON "icons\\oasis-database.ico" +15 ICON "icons\\oasis-formula.ico" +16 ICON "icons\\oasis-empty-template.ico" +17 ICON "icons\\empty-document.ico" 18 ICON "icons\\so8-configuration.ico" 19 ICON "icons\\so8-open.ico" -20 ICON "icons\\so8-image-doc.ico" +20 ICON "icons\\empty-document.ico" 21 ICON "icons\\so9_writer_app.ico" 22 ICON "icons\\so9_calc_app.ico" 23 ICON "icons\\so9_draw_app.ico" 24 ICON "icons\\so9_impress_app.ico" 25 ICON "icons\\so9_math_app.ico" 26 ICON "icons\\so9_base_app.ico" -27 ICON "icons\\so9_empty_doc.ico" -28 ICON "icons\\so7-writer-doc.ico" -29 ICON "icons\\so7-writer-tem.ico" -30 ICON "icons\\so7-calc-doc.ico" -31 ICON "icons\\so7-calc-tem.ico" -32 ICON "icons\\so7-draw-doc.ico" -33 ICON "icons\\so7-draw-tem.ico" -34 ICON "icons\\so7-impress-doc.ico" -35 ICON "icons\\so7-impress-tem.ico" -36 ICON "icons\\so7-master-doc.ico" -37 ICON "icons\\so7-chart-doc.ico" -38 ICON "icons\\so7-base-doc.ico" -39 ICON "icons\\so7-math-doc.ico" +27 ICON "icons\\oasis-empty-document.ico" +28 ICON "icons\\writer.ico" +29 ICON "icons\\writer-template.ico" +30 ICON "icons\\spreadsheet.ico" +31 ICON "icons\\spreadsheet-template.ico" +32 ICON "icons\\drawing.ico" +33 ICON "icons\\drawing-template.ico" +34 ICON "icons\\presentation.ico" +35 ICON "icons\\presentation-template.ico" +36 ICON "icons\\master-document.ico" +37 ICON "icons\\empty-document.ico" +38 ICON "icons\\database.ico" +39 ICON "icons\\formula.ico" 40 ICON "icons\\oxt-extension.ico" -- cgit From 86154d116ab9cc9bb1ad3f6c2498545253d91479 Mon Sep 17 00:00:00 2001 From: Mikhail Voitenko Date: Tue, 20 Oct 2009 15:40:10 +0000 Subject: #i105758# new ODF-Icons --- desktop/util/verinfo.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/util/verinfo.rc b/desktop/util/verinfo.rc index cd7d4996e882..9b0dcff88379 100644 --- a/desktop/util/verinfo.rc +++ b/desktop/util/verinfo.rc @@ -115,7 +115,7 @@ VS_VERSION_INFO versioninfo 13 ICON "icons\\oasis-empty-document.ico" 14 ICON "icons\\oasis-database.ico" 15 ICON "icons\\oasis-formula.ico" -16 ICON "icons\\oasis-empty-template.ico" +16 ICON "icons\\empty-template.ico" 17 ICON "icons\\empty-document.ico" 18 ICON "icons\\so8-configuration.ico" 19 ICON "icons\\so8-open.ico" -- cgit From ae379e35cf1a254fc1edbc16c1269cbbb671defe Mon Sep 17 00:00:00 2001 From: Mikhail Voitenko Date: Tue, 20 Oct 2009 16:24:19 +0000 Subject: #i105758# new ODF-Icons --- desktop/util/verinfo.rc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop/util/verinfo.rc b/desktop/util/verinfo.rc index 9b0dcff88379..105933ff130d 100644 --- a/desktop/util/verinfo.rc +++ b/desktop/util/verinfo.rc @@ -101,8 +101,8 @@ VS_VERSION_INFO versioninfo } } -2 ICON "icons\\oasis-writer.ico" -3 ICON "icons\\oasis-writer-template.ico" +2 ICON "icons\\oasis-text.ico" +3 ICON "icons\\oasis-text-template.ico" 4 ICON "icons\\oasis-spreadsheet.ico" 5 ICON "icons\\oasis-spreadsheet-template.ico" 6 ICON "icons\\oasis-drawing.ico" @@ -127,8 +127,8 @@ VS_VERSION_INFO versioninfo 25 ICON "icons\\so9_math_app.ico" 26 ICON "icons\\so9_base_app.ico" 27 ICON "icons\\oasis-empty-document.ico" -28 ICON "icons\\writer.ico" -29 ICON "icons\\writer-template.ico" +28 ICON "icons\\text.ico" +29 ICON "icons\\text-template.ico" 30 ICON "icons\\spreadsheet.ico" 31 ICON "icons\\spreadsheet-template.ico" 32 ICON "icons\\drawing.ico" -- cgit From 88355430b706d2a16fef7ec237e22de946c869ae Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 22 Oct 2009 11:10:27 +0200 Subject: #i105655# most changes for MetaFile consumers done --- goodies/source/filter.vcl/epict/epict.cxx | 120 +++++++++-- goodies/source/filter.vcl/epict/makefile.mk | 2 +- goodies/source/filter.vcl/eps/eps.cxx | 60 +++++- svtools/source/filter.vcl/wmf/emfwr.cxx | 93 +++++++-- svtools/source/filter.vcl/wmf/emfwr.hxx | 4 + svtools/source/filter.vcl/wmf/wmfwr.cxx | 84 +++++++- svtools/source/filter.vcl/wmf/wmfwr.hxx | 4 + svtools/util/makefile.mk | 1 + vcl/inc/vcl/cvtsvm.hxx | 2 + vcl/inc/vcl/lineinfo.hxx | 14 ++ vcl/source/gdi/cvtsvm.cxx | 310 +++++++++++++++++++++++++--- vcl/source/gdi/lineinfo.cxx | 79 +++++++ vcl/win/source/gdi/salgdi_gdiplus.cxx | 2 +- 13 files changed, 707 insertions(+), 68 deletions(-) diff --git a/goodies/source/filter.vcl/epict/epict.cxx b/goodies/source/filter.vcl/epict/epict.cxx index 4df7abea01fc..123aaa5e98c7 100644 --- a/goodies/source/filter.vcl/epict/epict.cxx +++ b/goodies/source/filter.vcl/epict/epict.cxx @@ -55,6 +55,9 @@ #include "dlgepct.hrc" #include "dlgepct.hxx" +#include +#include + //============================== PictWriter =================================== struct PictWriterAttrStackMember { @@ -77,7 +80,6 @@ struct PictPattern { sal_uInt32 nLo, nHi; }; - class PictWriter { private: @@ -178,6 +180,7 @@ private: void WriteTextArray(Point & rPoint, const String& rString, const sal_Int32 * pDXAry); + void HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); void WriteOpcodes(const GDIMetaFile & rMTF); void WriteHeader(const GDIMetaFile & rMTF); @@ -1371,6 +1374,65 @@ void PictWriter::WriteTextArray(Point & rPoint, const String& rString, const sal } } +void PictWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon) +{ + if(rLinePolygon.count()) + { + basegfx::B2DPolyPolygon aLinePolyPolygon(rLinePolygon); + basegfx::B2DPolyPolygon aFillPolyPolygon; + + rInfo.applyToB2DPolyPolygon(aLinePolyPolygon, aFillPolyPolygon); + + if(aLinePolyPolygon.count()) + { + aLinePolyPolygon = aLinePolyPolygon.getDefaultAdaptiveSubdivision(); + const sal_uInt32 nPolyCount(aLinePolyPolygon.count()); + SetAttrForFrame(); + + for(sal_uInt32 a(0); a < nPolyCount; a++) + { + const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); + const sal_uInt32 nPointCount(aCandidate.count()); + + if(nPointCount) + { + const sal_uInt32 nEdgeCount(aCandidate.isClosed() ? nPointCount + 1 : nPointCount); + const basegfx::B2DPoint aCurr(aCandidate.getB2DPoint(0)); + Point nCurr(basegfx::fround(aCurr.getX()), basegfx::fround(aCurr.getY())); + + for(sal_uInt32 b(0); b < nEdgeCount; b++) + { + const sal_uInt32 nNextIndex((b + 1) % nPointCount); + const basegfx::B2DPoint aNext(aCandidate.getB2DPoint(nNextIndex)); + const Point nNext(basegfx::fround(aNext.getX()), basegfx::fround(aNext.getY())); + + WriteOpcode_Line(nCurr, nNext); + nCurr = nNext; + } + } + } + } + + if(aFillPolyPolygon.count()) + { + const Color aOldLineColor(aLineColor); + const Color aOldFillColor(aFillColor); + + aLineColor = Color( COL_TRANSPARENT ); + aFillColor = aOldLineColor; + SetAttrForPaint(); + + for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) + { + const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a).getDefaultAdaptiveSubdivision()); + WriteOpcode_Poly(PDM_PAINT, aPolygon); + } + + aLineColor = aOldLineColor; + aFillColor = aOldFillColor; + } + } +} void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) { @@ -1417,8 +1479,19 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) if( aLineColor != Color( COL_TRANSPARENT ) ) { - SetAttrForFrame(); - WriteOpcode_Line( pA->GetStartPoint(),pA->GetEndPoint() ); + if(pA->GetLineInfo().IsDefault()) + { + SetAttrForFrame(); + WriteOpcode_Line( pA->GetStartPoint(),pA->GetEndPoint() ); + } + else + { + // LineInfo used; handle Dash/Dot and fat lines + basegfx::B2DPolygon aPolygon; + aPolygon.append(basegfx::B2DPoint(pA->GetStartPoint().X(), pA->GetStartPoint().Y())); + aPolygon.append(basegfx::B2DPoint(pA->GetEndPoint().X(), pA->GetEndPoint().Y())); + HandleLineInfoPolyPolygons(pA->GetLineInfo(), aPolygon); + } } break; } @@ -1571,24 +1644,35 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) { const Polygon& rPoly = pA->GetPolygon(); - Polygon aSimplePoly; - if ( rPoly.HasFlags() ) - rPoly.GetSimple( aSimplePoly ); - else - aSimplePoly = rPoly; - - const USHORT nSize = aSimplePoly.GetSize(); - Point aLast; - - if ( nSize ) + if( rPoly.GetSize() ) { - SetAttrForFrame(); - aLast = aSimplePoly[0]; + if(pA->GetLineInfo().IsDefault()) + { + Polygon aSimplePoly; + if ( rPoly.HasFlags() ) + rPoly.GetSimple( aSimplePoly ); + else + aSimplePoly = rPoly; - for ( USHORT i = 1; i < nSize; i++ ) + const USHORT nSize = aSimplePoly.GetSize(); + Point aLast; + + if ( nSize ) + { + SetAttrForFrame(); + aLast = aSimplePoly[0]; + + for ( USHORT i = 1; i < nSize; i++ ) + { + WriteOpcode_Line( aLast, aSimplePoly[i] ); + aLast = aSimplePoly[i]; + } + } + } + else { - WriteOpcode_Line( aLast, aSimplePoly[i] ); - aLast = aSimplePoly[i]; + // LineInfo used; handle Dash/Dot and fat lines + HandleLineInfoPolyPolygons(pA->GetLineInfo(), rPoly.getB2DPolygon()); } } } diff --git a/goodies/source/filter.vcl/epict/makefile.mk b/goodies/source/filter.vcl/epict/makefile.mk index 33af96f1fb85..43a489dea78c 100644 --- a/goodies/source/filter.vcl/epict/makefile.mk +++ b/goodies/source/filter.vcl/epict/makefile.mk @@ -61,7 +61,7 @@ RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs SHL1TARGET= ept$(DLLPOSTFIX) SHL1IMPLIB= epict -SHL1STDLIBS= $(TOOLSLIB) $(VCLLIB) $(SVTOOLLIB) $(CPPULIB) $(SALLIB) +SHL1STDLIBS= $(TOOLSLIB) $(VCLLIB) $(SVTOOLLIB) $(CPPULIB) $(SALLIB) $(BASEGFXLIB) SHL1LIBS= $(SLB)$/epict.lib diff --git a/goodies/source/filter.vcl/eps/eps.cxx b/goodies/source/filter.vcl/eps/eps.cxx index 8a163659050a..b66c118dbf8a 100644 --- a/goodies/source/filter.vcl/eps/eps.cxx +++ b/goodies/source/filter.vcl/eps/eps.cxx @@ -701,7 +701,40 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) Polygon aPoly( ( (const MetaPolyLineAction*) pMA )->GetPolygon() ); const LineInfo& rLineInfo = ( ( const MetaPolyLineAction*)pMA )->GetLineInfo(); ImplWriteLineInfo( rLineInfo ); - ImplPolyLine( aPoly ); + + if(basegfx::B2DLINEJOIN_NONE == rLineInfo.GetLineJoin() + && rLineInfo.GetWidth() > 1) + { + // emulate B2DLINEJOIN_NONE by creating single edges + const sal_uInt16 nPoints(aPoly.GetSize()); + const bool bCurve(aPoly.HasFlags()); + + for(sal_uInt16 a(0); a + 1 < nPoints; a++) + { + if(bCurve + && POLY_NORMAL != aPoly.GetFlags(a + 1) + && a + 2 < nPoints + && POLY_NORMAL != aPoly.GetFlags(a + 2) + && a + 3 < nPoints) + { + const Polygon aSnippet(4, + aPoly.GetConstPointAry() + a, + aPoly.GetConstFlagAry() + a); + ImplPolyLine(aSnippet); + a += 2; + } + else + { + const Polygon aSnippet(2, + aPoly.GetConstPointAry() + a); + ImplPolyLine(aSnippet); + } + } + } + else + { + ImplPolyLine( aPoly ); + } } break; @@ -2343,8 +2376,29 @@ void PSWriter::ImplWriteLineInfo( const LineInfo& rLineInfo ) SvtGraphicStroke::DashArray l_aDashArray; if ( rLineInfo.GetStyle() == LINE_DASH ) l_aDashArray.push_back( 2 ); - double fLWidth = ( ( rLineInfo.GetWidth() + 1 ) + ( rLineInfo.GetWidth() + 1 ) ) * 0.5; - ImplWriteLineInfo( fLWidth, 10.0, SvtGraphicStroke::capButt, SvtGraphicStroke::joinMiter, l_aDashArray ); + const double fLWidth(( ( rLineInfo.GetWidth() + 1 ) + ( rLineInfo.GetWidth() + 1 ) ) * 0.5); + const double fMiterLimit(15.0); + SvtGraphicStroke::JoinType aJoinType(SvtGraphicStroke::joinMiter); + + switch(rLineInfo.GetLineJoin()) + { + default: // B2DLINEJOIN_NONE, B2DLINEJOIN_MIDDLE + // do NOT use SvtGraphicStroke::joinNone here + // since it will be written as numerical value directly + // and is NOT a valid EPS value + break; + case basegfx::B2DLINEJOIN_MITER: + aJoinType = SvtGraphicStroke::joinMiter; + break; + case basegfx::B2DLINEJOIN_BEVEL: + aJoinType = SvtGraphicStroke::joinBevel; + break; + case basegfx::B2DLINEJOIN_ROUND: + aJoinType = SvtGraphicStroke::joinRound; + break; + } + + ImplWriteLineInfo( fLWidth, fMiterLimit, SvtGraphicStroke::capButt, aJoinType, l_aDashArray ); } //--------------------------------------------------------------------------------- diff --git a/svtools/source/filter.vcl/wmf/emfwr.cxx b/svtools/source/filter.vcl/wmf/emfwr.cxx index df56afc4a250..f516c2eefbd0 100644 --- a/svtools/source/filter.vcl/wmf/emfwr.cxx +++ b/svtools/source/filter.vcl/wmf/emfwr.cxx @@ -33,6 +33,8 @@ #include "emfwr.hxx" #include +#include +#include // ----------- // - Defines - @@ -829,6 +831,46 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, cons // ----------------------------------------------------------------------------- +void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon) +{ + if(rLinePolygon.count()) + { + basegfx::B2DPolyPolygon aLinePolyPolygon(rLinePolygon); + basegfx::B2DPolyPolygon aFillPolyPolygon; + + rInfo.applyToB2DPolyPolygon(aLinePolyPolygon, aFillPolyPolygon); + + if(aLinePolyPolygon.count()) + { + for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) + { + const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); + ImplWritePolygonRecord( Polygon(aCandidate), FALSE ); + } + } + + if(aFillPolyPolygon.count()) + { + const Color aOldLineColor(maVDev.GetLineColor()); + const Color aOldFillColor(maVDev.GetFillColor()); + + maVDev.SetLineColor(); + maVDev.SetFillColor(aOldLineColor); + + for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) + { + const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); + ImplWritePolyPolygonRecord(PolyPolygon(Polygon(aPolygon))); + } + + maVDev.SetLineColor(aOldLineColor); + maVDev.SetFillColor(aOldFillColor); + } + } +} + +// ----------------------------------------------------------------------------- + void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) { for( ULONG j = 0, nActionCount = rMtf.GetActionCount(); j < nActionCount; j++ ) @@ -871,20 +913,31 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) { const MetaLineAction* pA = (const MetaLineAction*) pAction; - ImplCheckLineAttr(); + if(pA->GetLineInfo().IsDefault()) + { + ImplCheckLineAttr(); - ImplBeginRecord( WIN_EMR_MOVETOEX ); - ImplWritePoint( pA->GetStartPoint() ); - ImplEndRecord(); + ImplBeginRecord( WIN_EMR_MOVETOEX ); + ImplWritePoint( pA->GetStartPoint() ); + ImplEndRecord(); - ImplBeginRecord( WIN_EMR_LINETO ); - ImplWritePoint( pA->GetEndPoint() ); - ImplEndRecord(); + ImplBeginRecord( WIN_EMR_LINETO ); + ImplWritePoint( pA->GetEndPoint() ); + ImplEndRecord(); - ImplBeginRecord( WIN_EMR_SETPIXELV ); - ImplWritePoint( pA->GetEndPoint() ); - ImplWriteColor( maVDev.GetLineColor() ); - ImplEndRecord(); + ImplBeginRecord( WIN_EMR_SETPIXELV ); + ImplWritePoint( pA->GetEndPoint() ); + ImplWriteColor( maVDev.GetLineColor() ); + ImplEndRecord(); + } + else + { + // LineInfo used; handle Dash/Dot and fat lines + basegfx::B2DPolygon aPolygon; + aPolygon.append(basegfx::B2DPoint(pA->GetStartPoint().X(), pA->GetStartPoint().Y())); + aPolygon.append(basegfx::B2DPoint(pA->GetEndPoint().X(), pA->GetEndPoint().Y())); + Impl_handleLineInfoPolyPolygons(pA->GetLineInfo(), aPolygon); + } } } break; @@ -983,7 +1036,23 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case( META_POLYLINE_ACTION ): { if( maVDev.IsLineColor() ) - ImplWritePolygonRecord( ( (const MetaPolyLineAction*) pAction )->GetPolygon(), FALSE ); + { + const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pAction; + const Polygon& rPoly = pA->GetPolygon(); + + if( rPoly.GetSize() ) + { + if(pA->GetLineInfo().IsDefault()) + { + ImplWritePolygonRecord( rPoly, FALSE ); + } + else + { + // LineInfo used; handle Dash/Dot and fat lines + Impl_handleLineInfoPolyPolygons(pA->GetLineInfo(), rPoly.getB2DPolygon()); + } + } + } } break; diff --git a/svtools/source/filter.vcl/wmf/emfwr.hxx b/svtools/source/filter.vcl/wmf/emfwr.hxx index 150aa1692ade..2d3c8801ba49 100644 --- a/svtools/source/filter.vcl/wmf/emfwr.hxx +++ b/svtools/source/filter.vcl/wmf/emfwr.hxx @@ -42,6 +42,9 @@ // - EMFWriter - // ------------- +class LineInfo; +namespace basegfx { class B2DPolygon; } + class EMFWriter { private: @@ -86,6 +89,7 @@ private: void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, UINT32 nROP ); void ImplWriteTextRecord( const Point& rPos, const String rText, const sal_Int32* pDXArray, sal_uInt32 nWidth ); + void Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); void ImplWrite( const GDIMetaFile& rMtf ); public: diff --git a/svtools/source/filter.vcl/wmf/wmfwr.cxx b/svtools/source/filter.vcl/wmf/wmfwr.cxx index 3c3ca09692af..9b712e6f020c 100644 --- a/svtools/source/filter.vcl/wmf/wmfwr.cxx +++ b/svtools/source/filter.vcl/wmf/wmfwr.cxx @@ -42,8 +42,9 @@ #include //unicode::getUnicodeScriptType #endif - #include +#include +#include //====================== MS-Windows-defines =============================== @@ -1145,6 +1146,49 @@ void WMFWriter::SetAllAttr() } +void WMFWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon) +{ + if(rLinePolygon.count()) + { + basegfx::B2DPolyPolygon aLinePolyPolygon(rLinePolygon); + basegfx::B2DPolyPolygon aFillPolyPolygon; + + rInfo.applyToB2DPolyPolygon(aLinePolyPolygon, aFillPolyPolygon); + + if(aLinePolyPolygon.count()) + { + aSrcLineInfo = rInfo; + SetLineAndFillAttr(); + + for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) + { + const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); + WMFRecord_PolyLine(Polygon(aCandidate)); + } + } + + if(aFillPolyPolygon.count()) + { + const Color aOldLineColor(aSrcLineColor); + const Color aOldFillColor(aSrcFillColor); + + aSrcLineColor = Color( COL_TRANSPARENT ); + aSrcFillColor = aOldLineColor; + SetLineAndFillAttr(); + + for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) + { + const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); + WMFRecord_Polygon(Polygon(aPolygon)); + } + + aSrcLineColor = aOldLineColor; + aSrcFillColor = aOldFillColor; + SetLineAndFillAttr(); + } + } +} + void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) { ULONG nA, nACount; @@ -1185,10 +1229,21 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) case META_LINE_ACTION: { const MetaLineAction* pA = (const MetaLineAction *) pMA; - aSrcLineInfo = pA->GetLineInfo(); - SetLineAndFillAttr(); - WMFRecord_MoveTo( pA->GetStartPoint() ); - WMFRecord_LineTo( pA->GetEndPoint() ); + if(pA->GetLineInfo().IsDefault()) + { + aSrcLineInfo = pA->GetLineInfo(); + SetLineAndFillAttr(); + WMFRecord_MoveTo( pA->GetStartPoint() ); + WMFRecord_LineTo( pA->GetEndPoint() ); + } + else + { + // LineInfo used; handle Dash/Dot and fat lines + basegfx::B2DPolygon aPolygon; + aPolygon.append(basegfx::B2DPoint(pA->GetStartPoint().X(), pA->GetStartPoint().Y())); + aPolygon.append(basegfx::B2DPoint(pA->GetEndPoint().X(), pA->GetEndPoint().Y())); + HandleLineInfoPolyPolygons(pA->GetLineInfo(), aPolygon); + } } break; @@ -1250,9 +1305,22 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) case META_POLYLINE_ACTION: { const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pMA; - aSrcLineInfo = pA->GetLineInfo(); - SetLineAndFillAttr(); - WMFRecord_PolyLine( pA->GetPolygon() ); + const Polygon& rPoly = pA->GetPolygon(); + + if( rPoly.GetSize() ) + { + if(pA->GetLineInfo().IsDefault()) + { + aSrcLineInfo = pA->GetLineInfo(); + SetLineAndFillAttr(); + WMFRecord_PolyLine( rPoly ); + } + else + { + // LineInfo used; handle Dash/Dot and fat lines + HandleLineInfoPolyPolygons(pA->GetLineInfo(), rPoly.getB2DPolygon()); + } + } } break; diff --git a/svtools/source/filter.vcl/wmf/wmfwr.hxx b/svtools/source/filter.vcl/wmf/wmfwr.hxx index 48986a280404..03ca14e7633f 100644 --- a/svtools/source/filter.vcl/wmf/wmfwr.hxx +++ b/svtools/source/filter.vcl/wmf/wmfwr.hxx @@ -65,6 +65,9 @@ struct WMFWriterAttrStackMember // ------------- class StarSymbolToMSMultiFont; +class LineInfo; +namespace basegfx { class B2DPolygon; } + class WMFWriter { private: @@ -202,6 +205,7 @@ private: void SetLineAndFillAttr(); void SetAllAttr(); + void HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); void WriteRecords(const GDIMetaFile & rMTF); void WriteHeader(const GDIMetaFile & rMTF, BOOL bPlaceable); diff --git a/svtools/util/makefile.mk b/svtools/util/makefile.mk index 80596d23e866..e95c55706549 100644 --- a/svtools/util/makefile.mk +++ b/svtools/util/makefile.mk @@ -140,6 +140,7 @@ SHL1STDLIBS+= \ $(VCLLIB) \ $(SVLLIB) \ $(SOTLIB) \ + $(BASEGFXLIB) \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ $(I18NISOLANGLIB) \ diff --git a/vcl/inc/vcl/cvtsvm.hxx b/vcl/inc/vcl/cvtsvm.hxx index cf4f3117a6ed..c6f4f2c9a126 100644 --- a/vcl/inc/vcl/cvtsvm.hxx +++ b/vcl/inc/vcl/cvtsvm.hxx @@ -86,6 +86,8 @@ #define GDI_UNICODE_COMMENT 1032 #define GDI_LINEJOIN_ACTION 1033 +#define GDI_EXTENDEDPOLYGON_ACTION 1034 +#define GDI_LINEDASHDOT_ACTION 1035 // ---------------- // - SVMConverter - diff --git a/vcl/inc/vcl/lineinfo.hxx b/vcl/inc/vcl/lineinfo.hxx index a57513b2826b..33758046c41e 100644 --- a/vcl/inc/vcl/lineinfo.hxx +++ b/vcl/inc/vcl/lineinfo.hxx @@ -41,6 +41,7 @@ // ---------------- class SvStream; +namespace basegfx { class B2DPolyPolygon; } struct ImplLineInfo { @@ -116,6 +117,19 @@ public: friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, LineInfo& rLineInfo ); friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const LineInfo& rLineInfo ); + + // helper to check if line width or DashDot is used + bool isDashDotOrFatLineUsed() const; + + // helper to get decomposed polygon data with the LineInfo applied. The source + // hairline polygon is given in io_rLinePolyPolygon. Both given polygons may + // contain results; e.g. when no fat line but DasDot is defined, the resut will + // be in io_rLinePolyPolygon while o_rFillPolyPolygon will be empty. When fat line + // is defined, it will be vice-versa. If none is defined, io_rLinePolyPolygon will + // not be changed (but o_rFillPolyPolygon will be freed) + void applyToB2DPolyPolygon( + basegfx::B2DPolyPolygon& io_rLinePolyPolygon, + basegfx::B2DPolyPolygon& o_rFillPolyPolygon) const; }; #endif // _SV_LINEINFO_HXX diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index 86d7d6bb39ee..27ce6630116c 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -88,18 +88,6 @@ void ImplReadPoly( SvStream& rIStm, Polygon& rPoly ) // ------------------------------------------------------------------------ -void ImplWritePoly( SvStream& rOStm, const Polygon& rPoly ) -{ - INT32 nSize = rPoly.GetSize(); - - rOStm << nSize; - - for( INT32 i = 0; i < nSize; i++ ) - rOStm << rPoly[ (USHORT) i ]; -} - -// ------------------------------------------------------------------------ - void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly ) { Polygon aPoly; @@ -131,13 +119,15 @@ void ImplWritePolyPolyAction( SvStream& rOStm, const PolyPolygon& rPolyPoly ) for( n = 0; n < nPoly; n++ ) { - const Polygon& rPoly = rPolyPoly[ n ]; - const USHORT nSize = rPoly.GetSize(); + // #i102224# + Polygon aSimplePoly; + rPolyPoly[n].AdaptiveSubdivide(aSimplePoly); + const USHORT nSize(aSimplePoly.GetSize()); rOStm << (INT32) nSize; for( USHORT j = 0; j < nSize; j++ ) - rOStm << rPoly[ j ]; + rOStm << aSimplePoly[ j ]; } } @@ -378,6 +368,128 @@ void ImplSkipActions( SvStream& rIStm, ULONG nSkipCount ) } } +// ------------------------------------------------------------------------ + +bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPolyPolygon, bool bOnlyWhenCurve) +{ + const sal_uInt16 nPolygonCount(rPolyPolygon.Count()); + + if(nPolygonCount) + { + sal_uInt32 nAllPolygonCount(0); + sal_uInt32 nAllPointCount(0); + sal_uInt32 nAllFlagCount(0); + sal_uInt16 a(0); + + for(a = 0; a < nPolygonCount; a++) + { + const Polygon& rCandidate = rPolyPolygon.GetObject(a); + const sal_uInt16 nPointCount(rCandidate.GetSize()); + + if(nPointCount) + { + nAllPolygonCount++; + nAllPointCount += nPointCount; + + if(rCandidate.HasFlags()) + { + nAllFlagCount += nPointCount; + } + } + } + + if((bOnlyWhenCurve && nAllFlagCount) || (!bOnlyWhenCurve && nAllPointCount)) + { + rOStm << (INT16) GDI_EXTENDEDPOLYGON_ACTION; + + const sal_Int32 nActionSize( + 4 + // Action size + 2 + // PolygonCount + (nAllPolygonCount * 2) + // Points per polygon + (nAllPointCount << 3) + // Points themselves + nAllPolygonCount + // Bool if (when poly has points) it has flags, too + nAllFlagCount); // Flags themselves + + rOStm << nActionSize; + rOStm << (sal_uInt16)nAllPolygonCount; + + for(a = 0; a < nPolygonCount; a++) + { + const Polygon& rCandidate = rPolyPolygon.GetObject(a); + const sal_uInt16 nPointCount(rCandidate.GetSize()); + + if(nPointCount) + { + rOStm << nPointCount; + + for(sal_uInt16 b(0); b < nPointCount; b++) + { + rOStm << rCandidate[b]; + } + + if(rCandidate.HasFlags()) + { + rOStm << (BYTE)true; + + for(sal_uInt16 c(0); c < nPointCount; c++) + { + rOStm << (BYTE)rCandidate.GetFlags(c); + } + } + else + { + rOStm << (BYTE)false; + } + } + } + + return true; + } + } + + return false; +} + +// ------------------------------------------------------------------------ + +void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, PolyPolygon& rPolyPoly) +{ + rPolyPoly.Clear(); + sal_uInt16 nPolygonCount(0); + rIStm >> nPolygonCount; + + for(sal_uInt16 a(0); a < nPolygonCount; a++) + { + sal_uInt16 nPointCount(0); + rIStm >> nPointCount; + Polygon aCandidate(nPointCount); + + if(nPointCount) + { + for(sal_uInt16 b(0); b < nPointCount; b++) + { + rIStm >> aCandidate[b]; + } + + BYTE bHasFlags(false); + rIStm >> bHasFlags; + + if(bHasFlags) + { + BYTE aPolyFlags(0); + + for(sal_uInt16 c(0); c < nPointCount; c++) + { + rIStm >> aPolyFlags; + aCandidate.SetFlags(c, (PolyFlags)aPolyFlags); + } + } + } + + rPolyPoly.Insert(aCandidate); + } +} + // ---------------- // - SVMConverter - // ---------------- @@ -450,6 +562,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) rMtf.SetPrefSize( aPrefSz ); rMtf.SetPrefMapMode( aMapMode ); + sal_uInt32 nLastPolygonAction(0); for( INT32 i = 0L; i < nActions; i++ ) { @@ -491,6 +604,91 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) } break; + case (GDI_LINEDASHDOT_ACTION) : + { + INT16 a(0); + INT32 b(0); + + rIStm >> a; aLineInfo.SetDashCount(a); + rIStm >> b; aLineInfo.SetDashLen(b); + rIStm >> a; aLineInfo.SetDotCount(a); + rIStm >> b; aLineInfo.SetDotLen(b); + rIStm >> b; aLineInfo.SetDistance(b); + + if(((aLineInfo.GetDashCount() && aLineInfo.GetDashLen()) + || (aLineInfo.GetDotCount() && aLineInfo.GetDotLen())) + && aLineInfo.GetDistance()) + { + aLineInfo.SetStyle(LINE_DASH); + } + } + break; + + case (GDI_EXTENDEDPOLYGON_ACTION) : + { + // read the PolyPolygon in every case + PolyPolygon aInputPolyPolygon; + ImplReadExtendedPolyPolygonAction(rIStm, aInputPolyPolygon); + + // now check if it can be set somewhere + if(nLastPolygonAction < rMtf.GetActionCount()) + { + MetaPolyLineAction* pPolyLineAction = dynamic_cast< MetaPolyLineAction* >(rMtf.GetAction(nLastPolygonAction)); + + if(pPolyLineAction) + { + // replace MetaPolyLineAction when we have a single polygon. Do not rely on the + // same point count; the originally written GDI_POLYLINE_ACTION may have been + // Subdivided for better quality for older usages + if(1 == aInputPolyPolygon.Count()) + { + rMtf.ReplaceAction( + new MetaPolyLineAction( + aInputPolyPolygon.GetObject(0), + pPolyLineAction->GetLineInfo()), + nLastPolygonAction); + pPolyLineAction->Delete(); + } + } + else + { + MetaPolyPolygonAction* pPolyPolygonAction = dynamic_cast< MetaPolyPolygonAction* >(rMtf.GetAction(nLastPolygonAction)); + + if(pPolyPolygonAction) + { + // replace MetaPolyPolygonAction when we have a curved polygon. Do rely on the + // same sub-polygon count + if(pPolyPolygonAction->GetPolyPolygon().Count() == aInputPolyPolygon.Count()) + { + rMtf.ReplaceAction( + new MetaPolyPolygonAction( + aInputPolyPolygon), + nLastPolygonAction); + pPolyPolygonAction->Delete(); + } + } + else + { + MetaPolygonAction* pPolygonAction = dynamic_cast< MetaPolygonAction* >(rMtf.GetAction(nLastPolygonAction)); + + if(pPolygonAction) + { + // replace MetaPolygonAction + if(1 == aInputPolyPolygon.Count()) + { + rMtf.ReplaceAction( + new MetaPolygonAction( + aInputPolyPolygon.GetObject(0)), + nLastPolygonAction); + pPolygonAction->Delete(); + } + } + } + } + } + } + break; + case( GDI_RECT_ACTION ): { ImplReadRect( rIStm, aRect ); @@ -581,6 +779,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case( GDI_POLYLINE_ACTION ): { ImplReadPoly( rIStm, aActionPoly ); + nLastPolygonAction = rMtf.GetActionCount(); if( bFatLine ) rMtf.AddAction( new MetaPolyLineAction( aActionPoly, aLineInfo ) ); @@ -602,7 +801,10 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) rMtf.AddAction( new MetaPolyLineAction( aActionPoly, aLineInfo ) ); } else + { + nLastPolygonAction = rMtf.GetActionCount(); rMtf.AddAction( new MetaPolygonAction( aActionPoly ) ); + } } break; @@ -623,7 +825,10 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) rMtf.AddAction( new MetaPolyLineAction( aPolyPoly[ nPoly ], aLineInfo ) ); } else + { + nLastPolygonAction = rMtf.GetActionCount(); rMtf.AddAction( new MetaPolyPolygonAction( aPolyPoly ) ); + } } break; @@ -1257,6 +1462,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, const LineInfo& rInfo = pAct->GetLineInfo(); const bool bFatLine(!rInfo.IsDefault() && (LINE_NONE != rInfo.GetStyle())); const bool bLineJoin(bFatLine && basegfx::B2DLINEJOIN_ROUND != rInfo.GetLineJoin()); + const bool bLineDashDot(LINE_DASH == rInfo.GetStyle()); if( bFatLine ) { @@ -1269,6 +1475,17 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, rOStm << (INT32) 6; rOStm << (INT16) rInfo.GetLineJoin(); } + + if(bLineDashDot) + { + rOStm << (INT16) GDI_LINEDASHDOT_ACTION; + rOStm << (INT32) 4 + 16; + rOStm << (INT16)rInfo.GetDashCount(); + rOStm << (INT32)rInfo.GetDashLen(); + rOStm << (INT16)rInfo.GetDotCount(); + rOStm << (INT32)rInfo.GetDotLen(); + rOStm << (INT32)rInfo.GetDistance(); + } } rOStm << (INT16) GDI_LINE_ACTION; @@ -1286,6 +1503,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { nCount += 1; } + + if(bLineDashDot) + { + nCount += 1; + } } } break; @@ -1366,19 +1588,21 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, for( USHORT n = 0; n < nPoints; n++ ) rOStm << aChordPoly[ n ]; - nCount++; } break; case( META_POLYLINE_ACTION ): { + // #i102224# MetaPolyLineAction* pAct = (MetaPolyLineAction*) pAction; - const Polygon& rPoly = pAct->GetPolygon(); - const LineInfo& rInfo = pAct->GetLineInfo(); - const USHORT nPoints = rPoly.GetSize(); + Polygon aSimplePoly; + pAct->GetPolygon().AdaptiveSubdivide(aSimplePoly); + const LineInfo& rInfo = pAct->GetLineInfo(); + const USHORT nPoints(aSimplePoly.GetSize()); const bool bFatLine(!rInfo.IsDefault() && (LINE_NONE != rInfo.GetStyle())); const bool bLineJoin(bFatLine && basegfx::B2DLINEJOIN_ROUND != rInfo.GetLineJoin()); + const bool bLineDashDot(LINE_DASH == rInfo.GetStyle()); if( bFatLine ) { @@ -1391,6 +1615,17 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, rOStm << (INT32) 6; rOStm << (INT16) rInfo.GetLineJoin(); } + + if(bLineDashDot) + { + rOStm << (INT16) GDI_LINEDASHDOT_ACTION; + rOStm << (INT32) 4 + 16; + rOStm << (INT16)rInfo.GetDashCount(); + rOStm << (INT32)rInfo.GetDashLen(); + rOStm << (INT16)rInfo.GetDotCount(); + rOStm << (INT32)rInfo.GetDotLen(); + rOStm << (INT32)rInfo.GetDistance(); + } } rOStm << (INT16) GDI_POLYLINE_ACTION; @@ -1398,10 +1633,18 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, rOStm << (INT32) nPoints; for( USHORT n = 0; n < nPoints; n++ ) - rOStm << rPoly[ n ]; + { + rOStm << aSimplePoly[ n ]; + } nCount++; + const PolyPolygon aPolyPolygon(pAct->GetPolygon()); + if(ImplWriteExtendedPolyPolygonAction(rOStm, aPolyPolygon, true)) + { + nCount++; + } + if( bFatLine ) { ImplWritePopAction( rOStm ); @@ -1411,24 +1654,36 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { nCount += 1; } + + if(bLineDashDot) + { + nCount += 1; + } } } break; case( META_POLYGON_ACTION ): { - MetaPolygonAction* pAct = (MetaPolygonAction*) pAction; - const Polygon& rPoly = pAct->GetPolygon(); - const USHORT nPoints = rPoly.GetSize(); + // #i102224# + MetaPolygonAction* pAct = (MetaPolygonAction*)pAction; + Polygon aSimplePoly; + pAct->GetPolygon().AdaptiveSubdivide(aSimplePoly); + const USHORT nPoints(aSimplePoly.GetSize()); rOStm << (INT16) GDI_POLYGON_ACTION; rOStm << (INT32) ( 8 + ( nPoints << 3 ) ); rOStm << (INT32) nPoints; for( USHORT n = 0; n < nPoints; n++ ) - rOStm << rPoly[ n ]; - + rOStm << aSimplePoly[ n ]; nCount++; + + const PolyPolygon aPolyPolygon(pAct->GetPolygon()); + if(ImplWriteExtendedPolyPolygonAction(rOStm, aPolyPolygon, true)) + { + nCount++; + } } break; @@ -1437,6 +1692,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, MetaPolyPolygonAction* pAct = (MetaPolyPolygonAction*) pAction; ImplWritePolyPolyAction( rOStm, pAct->GetPolyPolygon() ); nCount++; + + if(ImplWriteExtendedPolyPolygonAction(rOStm, pAct->GetPolyPolygon(), true)) + { + nCount++; + } } break; diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx index 85a48f2b0f5e..7aa50811106b 100644 --- a/vcl/source/gdi/lineinfo.cxx +++ b/vcl/source/gdi/lineinfo.cxx @@ -34,6 +34,10 @@ #include #include #include +#include +#include +#include +#include DBG_NAME( LineInfo ) @@ -283,3 +287,78 @@ SvStream& operator<<( SvStream& rOStm, const LineInfo& rLineInfo ) { return( rOStm << *rLineInfo.mpImplLineInfo ); } + +// ----------------------------------------------------------------------- + +bool LineInfo::isDashDotOrFatLineUsed() const +{ + return (LINE_DASH == GetStyle() || GetWidth() > 1); +} + +// ----------------------------------------------------------------------- + +void LineInfo::applyToB2DPolyPolygon( + basegfx::B2DPolyPolygon& io_rLinePolyPolygon, + basegfx::B2DPolyPolygon& o_rFillPolyPolygon) const +{ + o_rFillPolyPolygon.clear(); + + if(io_rLinePolyPolygon.count()) + { + if(LINE_DASH == GetStyle()) + { + ::std::vector< double > fDotDashArray; + const double fDashLen(GetDashLen()); + const double fDotLen(GetDotLen()); + const double fDistance(GetDistance()); + + for(sal_uInt16 a(0); a < GetDashCount(); a++) + { + fDotDashArray.push_back(fDashLen); + fDotDashArray.push_back(fDistance); + } + + for(sal_uInt16 b(0); b < GetDotCount(); b++) + { + fDotDashArray.push_back(fDotLen); + fDotDashArray.push_back(fDistance); + } + + const double fAccumulated(::std::accumulate(fDotDashArray.begin(), fDotDashArray.end(), 0.0)); + + if(fAccumulated > 0.0) + { + basegfx::B2DPolyPolygon aResult; + + for(sal_uInt32 c(0); c < io_rLinePolyPolygon.count(); c++) + { + basegfx::B2DPolyPolygon aLineTraget; + basegfx::tools::applyLineDashing( + io_rLinePolyPolygon.getB2DPolygon(c), + fDotDashArray, + &aLineTraget); + aResult.append(aLineTraget); + } + + io_rLinePolyPolygon = aResult; + } + } + + if(GetWidth() > 1 && io_rLinePolyPolygon.count()) + { + const double fHalfLineWidth((GetWidth() * 0.5) + 0.5); + + for(sal_uInt32 a(0); a < io_rLinePolyPolygon.count(); a++) + { + o_rFillPolyPolygon.append(basegfx::tools::createAreaGeometry( + io_rLinePolyPolygon.getB2DPolygon(a), + fHalfLineWidth, + GetLineJoin())); + } + + io_rLinePolyPolygon.clear(); + } + } +} + +// ----------------------------------------------------------------------- diff --git a/vcl/win/source/gdi/salgdi_gdiplus.cxx b/vcl/win/source/gdi/salgdi_gdiplus.cxx index a9d346e74476..29e4ff1d801e 100644 --- a/vcl/win/source/gdi/salgdi_gdiplus.cxx +++ b/vcl/win/source/gdi/salgdi_gdiplus.cxx @@ -243,7 +243,7 @@ bool WinSalGraphics::drawPolyLine(const basegfx::B2DPolygon& rPolygon, const bas impAddB2DPolygonToGDIPlusGraphicsPathReal(aPath, rPolygon, bNoLineJoin); } - if(rPolygon.isClosed()) + if(rPolygon.isClosed() && !bNoLineJoin) { // #i101491# needed to create the correct line joins aPath.CloseFigure(); -- cgit From ece6eb1ab43ca851cb4c9e4cda848ecdcda9d0b0 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 22 Oct 2009 11:10:27 +0200 Subject: #i105655# most changes for MetaFile consumers done --- svx/source/svdraw/svdfmtf.cxx | 61 +++++++++++++++++++++++++++++++++++++++---- svx/source/svdraw/svdfmtf.hxx | 2 ++ 2 files changed, 58 insertions(+), 5 deletions(-) diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 0cc1e347c949..94d62794a397 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -72,6 +72,8 @@ #include // FRound #include #include +#include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -80,6 +82,8 @@ ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport(SdrModel& rModel): pLineAttr(NULL),pFillAttr(NULL),pTextAttr(NULL), pPage(NULL),pModel(NULL),nLayer(0), nLineWidth(0), + maLineJoin(basegfx::B2DLINEJOIN_NONE), + maDash(XDASH_RECT, 0, 0, 0, 0, 0), bFntDirty(TRUE), bLastObjWasPolyWithoutLine(FALSE),bNoLine(FALSE),bNoFill(FALSE),bLastObjWasLine(FALSE) { @@ -273,6 +277,9 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, FASTBOOL bForceText { if ( nLineWidth ) pLineAttr->Put( XLineWidthItem( nLineWidth ) ); + else + pLineAttr->Put( XLineWidthItem( 0 ) ); + aOldLineColor = aVD.GetLineColor(); if( aVD.IsLineColor() ) { @@ -281,6 +288,34 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, FASTBOOL bForceText } else pLineAttr->Put(XLineStyleItem(XLINE_NONE)); + + switch(maLineJoin) + { + default : // basegfx::B2DLINEJOIN_NONE + pLineAttr->Put(XLineJointItem(XLINEJOINT_NONE)); + break; + case basegfx::B2DLINEJOIN_MIDDLE: + pLineAttr->Put(XLineJointItem(XLINEJOINT_MIDDLE)); + break; + case basegfx::B2DLINEJOIN_BEVEL: + pLineAttr->Put(XLineJointItem(XLINEJOINT_BEVEL)); + break; + case basegfx::B2DLINEJOIN_MITER: + pLineAttr->Put(XLineJointItem(XLINEJOINT_MITER)); + break; + case basegfx::B2DLINEJOIN_ROUND: + pLineAttr->Put(XLineJointItem(XLINEJOINT_ROUND)); + break; + } + + if(((maDash.GetDots() && maDash.GetDotLen()) || (maDash.GetDashes() && maDash.GetDashLen())) && maDash.GetDistance()) + { + pLineAttr->Put(XLineDashItem(String(), maDash)); + } + else + { + pLineAttr->Put(XLineDashItem(String(), XDash(XDASH_RECT))); + } } else bNoLine = TRUE; @@ -396,12 +431,19 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaLineAction& rAct) bCreateLineObject = false; } - nLineWidth = nNewLineWidth; - if(bCreateLineObject) { SdrPathObj* pPath = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aLine)); + nLineWidth = nNewLineWidth; + maLineJoin = rLineInfo.GetLineJoin(); + maDash = XDash(XDASH_RECT, + rLineInfo.GetDotCount(), rLineInfo.GetDotLen(), + rLineInfo.GetDashCount(), rLineInfo.GetDashLen(), + rLineInfo.GetDistance()); SetAttributes(pPath); + nLineWidth = 0; + maLineJoin = basegfx::B2DLINEJOIN_NONE; + maDash = XDash(); InsertObj(pPath, false); } } @@ -592,12 +634,21 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaPolyLineAction& rAct ) bCreateLineObject = false; } - nLineWidth = nNewLineWidth; - if(bCreateLineObject) { - SdrPathObj* pPath = new SdrPathObj(OBJ_PLIN, basegfx::B2DPolyPolygon(aSource)); + SdrPathObj* pPath = new SdrPathObj( + aSource.isClosed() ? OBJ_POLY : OBJ_PLIN, + basegfx::B2DPolyPolygon(aSource)); + nLineWidth = nNewLineWidth; + maLineJoin = rLineInfo.GetLineJoin(); + maDash = XDash(XDASH_RECT, + rLineInfo.GetDotCount(), rLineInfo.GetDotLen(), + rLineInfo.GetDashCount(), rLineInfo.GetDashLen(), + rLineInfo.GetDistance()); SetAttributes(pPath); + nLineWidth = 0; + maLineJoin = basegfx::B2DLINEJOIN_NONE; + maDash = XDash(); InsertObj(pPath, false); } } diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx index b4d583e6c506..84f2b30b6a15 100644 --- a/svx/source/svdraw/svdfmtf.hxx +++ b/svx/source/svdraw/svdfmtf.hxx @@ -86,6 +86,8 @@ protected: SdrLayerID nLayer; Color aOldLineColor; sal_Int32 nLineWidth; + basegfx::B2DLineJoin maLineJoin; + XDash maDash; sal_Bool bMov; sal_Bool bSize; -- cgit From 6016d7a2007f3f09e10c17b61b7aa979391cc3b7 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 22 Oct 2009 11:10:27 +0200 Subject: #i105655# most changes for MetaFile consumers done --- filter/source/flash/swfwriter1.cxx | 97 +++++---------------- filter/source/pdf/pdfexport.cxx | 3 +- filter/source/svg/svgwriter.cxx | 170 +++++++++++++++++++++++++++++++++++-- filter/source/svg/svgwriter.hxx | 5 +- 4 files changed, 191 insertions(+), 84 deletions(-) diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 8038abb2f268..ffe26c35699b 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -41,11 +41,8 @@ #include #include #include -#include -#include #include #include -#include #ifndef _ZLIB_H #ifdef SYSTEM_ZLIB @@ -54,7 +51,10 @@ #include #endif #endif + #include +#include +#include using namespace ::swf; using namespace ::std; @@ -1401,90 +1401,39 @@ bool Writer::Impl_writePageField( Rectangle& rTextBounds ) void Writer::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon) { - basegfx::B2DPolyPolygon aLinePolyPolygon(rLinePolygon); - basegfx::B2DPolyPolygon aFillPolyPolygon; - const bool bDashUsed(LINE_DASH == rInfo.GetStyle()); - const bool bLineWidthUsed(rInfo.GetWidth() > 1); - - if(bDashUsed && aLinePolyPolygon.count()) + if(rLinePolygon.count()) { - ::std::vector< double > fDotDashArray; - const double fDashLen(rInfo.GetDashLen()); - const double fDotLen(rInfo.GetDotLen()); - const double fDistance(rInfo.GetDistance()); + basegfx::B2DPolyPolygon aLinePolyPolygon(rLinePolygon); + basegfx::B2DPolyPolygon aFillPolyPolygon; - for(sal_uInt16 a(0); a < rInfo.GetDashCount(); a++) - { - fDotDashArray.push_back(fDashLen); - fDotDashArray.push_back(fDistance); - } + rInfo.applyToB2DPolyPolygon(aLinePolyPolygon, aFillPolyPolygon); - for(sal_uInt16 b(0); b < rInfo.GetDotCount(); b++) + if(aLinePolyPolygon.count()) { - fDotDashArray.push_back(fDotLen); - fDotDashArray.push_back(fDistance); - } - - const double fAccumulated(::std::accumulate(fDotDashArray.begin(), fDotDashArray.end(), 0.0)); - - if(fAccumulated > 0.0) - { - basegfx::B2DPolyPolygon aResult; - - for(sal_uInt32 c(0); c < aLinePolyPolygon.count(); c++) + for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) { - basegfx::B2DPolyPolygon aLineTraget; - basegfx::tools::applyLineDashing( - aLinePolyPolygon.getB2DPolygon(c), - fDotDashArray, - &aLineTraget); - aResult.append(aLineTraget); + const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); + Impl_writePolygon(Polygon(aCandidate), sal_False ); } - - aLinePolyPolygon = aResult; - } - } - - if(bLineWidthUsed && aLinePolyPolygon.count()) - { - const double fHalfLineWidth((rInfo.GetWidth() * 0.5) + 0.5); - - for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) - { - aFillPolyPolygon.append(basegfx::tools::createAreaGeometry( - aLinePolyPolygon.getB2DPolygon(a), - fHalfLineWidth, - rInfo.GetLineJoin())); } - aLinePolyPolygon.clear(); - } - - if(aLinePolyPolygon.count()) - { - for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) + if(aFillPolyPolygon.count()) { - const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); - Impl_writePolygon(Polygon(aCandidate), sal_False ); - } - } + const Color aOldLineColor(mpVDev->GetLineColor()); + const Color aOldFillColor(mpVDev->GetFillColor()); - if(aFillPolyPolygon.count()) - { - const Color aOldLineColor(mpVDev->GetLineColor()); - const Color aOldFillColor(mpVDev->GetFillColor()); + mpVDev->SetLineColor(); + mpVDev->SetFillColor(aOldLineColor); - mpVDev->SetLineColor(); - mpVDev->SetFillColor(aOldLineColor); + for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) + { + const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); + Impl_writePolyPolygon(PolyPolygon(Polygon(aPolygon)), sal_True ); + } - for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) - { - const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); - Impl_writePolyPolygon(PolyPolygon(Polygon(aPolygon)), sal_True ); + mpVDev->SetLineColor(aOldLineColor); + mpVDev->SetFillColor(aOldFillColor); } - - mpVDev->SetLineColor(aOldLineColor); - mpVDev->SetFillColor(aOldFillColor); } } diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index ca40914b076f..14b7ab29219d 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -1388,7 +1388,8 @@ sal_Bool PDFExport::ImplWriteActions( PDFWriter& rWriter, PDFExtOutDevData* pPDF } aInfo.m_aDashArray = aDashArray; - if(SvtGraphicStroke::joinNone == aStroke.getJoinType()) + if(SvtGraphicStroke::joinNone == aStroke.getJoinType() + && fStrokeWidth > 0.0) { // emulate no edge rounding by handling single edges const sal_uInt16 nPoints(aPath.GetSize()); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 08f2ffb856f2..466d494ae445 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -330,7 +330,7 @@ NMSP_RTL::OUString SVGAttributeWriter::GetFontStyle( const Font& rFont ) // ----------------------------------------------------------------------------- -NMSP_RTL::OUString SVGAttributeWriter::GetPaintStyle( const Color& rLineColor, const Color& rFillColor ) +NMSP_RTL::OUString SVGAttributeWriter::GetPaintStyle( const Color& rLineColor, const Color& rFillColor, const LineInfo* pLineInfo ) { FastString aStyle; @@ -357,6 +357,68 @@ NMSP_RTL::OUString SVGAttributeWriter::GetPaintStyle( const Color& rLineColor, c aStyle += B2UCONST( "stroke-opacity:" ); aStyle += NMSP_RTL::OUString::valueOf( ( 255 - (double) rLineColor.GetTransparency() ) / 255.0 ); } + + if(pLineInfo) + { + // more infos for line needed + if(pLineInfo->GetWidth() > 1) + { + aStyle += B2UCONST( ";" ); + aStyle += B2UCONST( "stroke-width:" ); + aStyle += NMSP_RTL::OUString::valueOf(pLineInfo->GetWidth()); + } + + if(LINE_DASH == pLineInfo->GetStyle()) + { + aStyle += B2UCONST( ";" ); + aStyle += B2UCONST( "stroke-dasharray:" ); + const long nDashLen(pLineInfo->GetDashLen()); + const long nDotLen(pLineInfo->GetDotLen()); + const long nDistance(pLineInfo->GetDistance()); + bool bIsFirst(true); + + for(sal_uInt16 a(0); a < pLineInfo->GetDashCount(); a++) + { + if(bIsFirst) + aStyle += B2UCONST(" "), bIsFirst = false; + else + aStyle += B2UCONST(","); + aStyle += NMSP_RTL::OUString::valueOf(nDashLen); + aStyle += B2UCONST(","); + aStyle += NMSP_RTL::OUString::valueOf(nDistance); + } + + for(sal_uInt16 b(0); b < pLineInfo->GetDotCount(); b++) + { + if(bIsFirst) + aStyle += B2UCONST(" "), bIsFirst = false; + else + aStyle += B2UCONST(","); + aStyle += NMSP_RTL::OUString::valueOf(nDotLen); + aStyle += B2UCONST(","); + aStyle += NMSP_RTL::OUString::valueOf(nDistance); + } + } + + if(basegfx::B2DLINEJOIN_MITER != pLineInfo->GetLineJoin()) + { + aStyle += B2UCONST( ";" ); + aStyle += B2UCONST( "stroke-linejoin:" ); + + switch(pLineInfo->GetLineJoin()) + { + default: // B2DLINEJOIN_NONE, B2DLINEJOIN_MIDDLE, B2DLINEJOIN_MITER + aStyle += B2UCONST( "miter" ); + break; + case basegfx::B2DLINEJOIN_ROUND: + aStyle += B2UCONST( "round" ); + break; + case basegfx::B2DLINEJOIN_BEVEL: + aStyle += B2UCONST( "bevel" ); + break; + } + } + } } // fill color @@ -403,12 +465,12 @@ void SVGAttributeWriter::SetFontAttr( const Font& rFont ) // ----------------------------------------------------------------------------- -void SVGAttributeWriter::SetPaintAttr( const Color& rLineColor, const Color& rFillColor ) +void SVGAttributeWriter::SetPaintAttr( const Color& rLineColor, const Color& rFillColor, const LineInfo* pLineInfo ) { if( !mpElemPaint || ( rLineColor != maCurLineColor ) || ( rFillColor != maCurFillColor ) ) { delete mpElemPaint; - mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, GetPaintStyle( maCurLineColor = rLineColor, maCurFillColor = rFillColor ) ); + mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStyle, GetPaintStyle( maCurLineColor = rLineColor, maCurFillColor = rFillColor, pLineInfo ) ); mpElemPaint = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemG, TRUE, TRUE ); } } @@ -460,6 +522,48 @@ Size SVGActionWriter::ImplMap( const Size& rSz ) const // ----------------------------------------------------------------------------- +LineInfo SVGActionWriter::ImplMap( const LineInfo& rLineInfo ) const +{ + LineInfo aInfo(rLineInfo); + long aTemp(0); + + if(aInfo.GetStyle() == LINE_DASH) + { + if(aInfo.GetDotCount() && aInfo.GetDotLen()) + { + aTemp = aInfo.GetDotLen(); + mpVDev->LogicToLogic(&aTemp, 1, &mpVDev->GetMapMode(), &maTargetMapMode); + aInfo.SetDotLen(Max(aTemp, 1L)); + } + else + aInfo.SetDotCount(0); + + if(aInfo.GetDashCount() && aInfo.GetDashLen()) + { + aTemp = aInfo.GetDashLen(); + mpVDev->LogicToLogic(&aTemp, 1, &mpVDev->GetMapMode(), &maTargetMapMode); + aInfo.SetDashLen(Max(aTemp, 1L)); + } + else + aInfo.SetDashCount(0); + + aTemp = aInfo.GetDistance(); + mpVDev->LogicToLogic(&aTemp, 1, &mpVDev->GetMapMode(), &maTargetMapMode); + aInfo.SetDistance(aTemp); + + if((!aInfo.GetDashCount() && !aInfo.GetDotCount()) || !aInfo.GetDistance()) + aInfo.SetStyle(LINE_SOLID); + } + + aTemp = aInfo.GetWidth(); + mpVDev->LogicToLogic(&aTemp, 1, &mpVDev->GetMapMode(), &maTargetMapMode); + aInfo.SetWidth(aTemp); + + return aInfo; +} + +// ----------------------------------------------------------------------------- + NMSP_RTL::OUString SVGActionWriter::GetValueString( sal_Int32 nVal ) { return ::rtl::OUString::valueOf( nVal ); @@ -620,7 +724,7 @@ void SVGActionWriter::ImplWritePolyPolygon( const PolyPolygon& rPolyPoly, sal_Bo { const Polygon& rPoly = rPolyPoly[ i ]; const USHORT nSize = rPoly.GetSize(); - Polygon aMappedPoly( nSize ); + Polygon aMappedPoly(rPoly); // do copy the flag values, too for( USHORT n = 0; n < nSize; n++ ) aMappedPoly[ n ] = ImplMap( rPoly[ n ] ); @@ -1009,7 +1113,16 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { const MetaLineAction* pA = (const MetaLineAction*) pAction; - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor() ); + if(pA->GetLineInfo().IsDefault()) + { + mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor() ); + } + else + { + const LineInfo aMappedLineInfo(ImplMap(pA->GetLineInfo())); + mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetLineColor(), &aMappedLineInfo ); + } + ImplWriteLine( pA->GetStartPoint(), pA->GetEndPoint(), NULL, pStyle ); } } @@ -1105,8 +1218,51 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, if( rPoly.GetSize() ) { - mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); - ImplWritePolyPolygon( rPoly, sal_True, pStyle ); + bool bNoLineJoin(false); + + if(pA->GetLineInfo().IsDefault()) + { + mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor() ); + } + else + { + const LineInfo aMappedLineInfo(ImplMap(pA->GetLineInfo())); + bNoLineJoin = basegfx::B2DLINEJOIN_NONE == aMappedLineInfo.GetLineJoin(); + mpContext->SetPaintAttr( mpVDev->GetLineColor(), mpVDev->GetFillColor(), &aMappedLineInfo ); + } + + if(bNoLineJoin) + { + // emulate B2DLINEJOIN_NONE by creating single edges + const sal_uInt16 nPoints(rPoly.GetSize()); + const bool bCurve(rPoly.HasFlags()); + + for(sal_uInt16 a(0); a + 1 < nPoints; a++) + { + if(bCurve + && POLY_NORMAL != rPoly.GetFlags(a + 1) + && a + 2 < nPoints + && POLY_NORMAL != rPoly.GetFlags(a + 2) + && a + 3 < nPoints) + { + const Polygon aSnippet(4, + rPoly.GetConstPointAry() + a, + rPoly.GetConstFlagAry() + a); + ImplWritePolyPolygon( aSnippet, sal_True, pStyle ); + a += 2; + } + else + { + const Polygon aSnippet(2, + rPoly.GetConstPointAry() + a); + ImplWritePolyPolygon( aSnippet, sal_True, pStyle ); + } + } + } + else + { + ImplWritePolyPolygon( rPoly, sal_True, pStyle ); + } } } } diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx index 2a1e5a9ee514..658fc19b0322 100644 --- a/filter/source/svg/svgwriter.hxx +++ b/filter/source/svg/svgwriter.hxx @@ -156,10 +156,10 @@ public: virtual ~SVGAttributeWriter(); ::rtl::OUString GetFontStyle( const Font& rFont ); - ::rtl::OUString GetPaintStyle( const Color& rLineColor, const Color& rFillColor ); + ::rtl::OUString GetPaintStyle( const Color& rLineColor, const Color& rFillColor, const LineInfo* pLineInfo ); void SetFontAttr( const Font& rFont ); - void SetPaintAttr( const Color& rLineColor, const Color& rFillColor ); + void SetPaintAttr( const Color& rLineColor, const Color& rFillColor, const LineInfo* pLineInfo = 0); }; // ------------------- @@ -192,6 +192,7 @@ private: long ImplMap( sal_Int32 nVal ) const; Point ImplMap( const Point& rPt ) const; Size ImplMap( const Size& rSz ) const; + LineInfo ImplMap( const LineInfo& rLineInfo ) const; inline Rectangle ImplMap( const Rectangle& rRect ) const { return Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) ); } void ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = NULL, const ::rtl::OUString* pStyle = NULL ); -- cgit From 5de3269dcd48cd653837de3d576d7be3df679927 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 22 Oct 2009 13:19:51 +0200 Subject: #i105655# Last MetaFile changes; moved GDI_LINEDASHDOT_ACTION to the more common part in SVM export to also have it available for non-fat lines --- vcl/source/gdi/cvtsvm.cxx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index 27ce6630116c..07b1a391adf4 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -1615,17 +1615,17 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, rOStm << (INT32) 6; rOStm << (INT16) rInfo.GetLineJoin(); } + } - if(bLineDashDot) - { - rOStm << (INT16) GDI_LINEDASHDOT_ACTION; - rOStm << (INT32) 4 + 16; - rOStm << (INT16)rInfo.GetDashCount(); - rOStm << (INT32)rInfo.GetDashLen(); - rOStm << (INT16)rInfo.GetDotCount(); - rOStm << (INT32)rInfo.GetDotLen(); - rOStm << (INT32)rInfo.GetDistance(); - } + if(bLineDashDot) + { + rOStm << (INT16) GDI_LINEDASHDOT_ACTION; + rOStm << (INT32) 4 + 16; + rOStm << (INT16)rInfo.GetDashCount(); + rOStm << (INT32)rInfo.GetDashLen(); + rOStm << (INT16)rInfo.GetDotCount(); + rOStm << (INT32)rInfo.GetDotLen(); + rOStm << (INT32)rInfo.GetDistance(); } rOStm << (INT16) GDI_POLYLINE_ACTION; @@ -1654,11 +1654,11 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { nCount += 1; } + } - if(bLineDashDot) - { - nCount += 1; - } + if(bLineDashDot) + { + nCount += 1; } } break; -- cgit From 3efb06e835112a82bb38d3687b28fd20450a6471 Mon Sep 17 00:00:00 2001 From: Mikhail Voitenko Date: Tue, 27 Oct 2009 16:02:47 +0000 Subject: #i10000# do not build StarOffice build for OpenOffice --- desktop/util/makefile.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desktop/util/makefile.mk b/desktop/util/makefile.mk index 05f129b3c5fc..12cde0b8649c 100644 --- a/desktop/util/makefile.mk +++ b/desktop/util/makefile.mk @@ -79,6 +79,7 @@ RESLIB1SRSFILES= $(SRS)$/desktop.srs \ $(SRS)$/wizard.srs .IF "$(L10N_framework)"=="" +.IF "$(LINK_SO)"=="TRUE" .IF "$(GUI)" != "OS2" APP1TARGET=so$/$(TARGET) APP1NOSAL=TRUE @@ -143,6 +144,8 @@ APP1STACK=10000000 .ENDIF # "$(GUI)" != "OS2" +.ENDIF # "$(LINK_SO)"=="TRUE" + APP5TARGET=soffice APP5NOSAL=TRUE APP5RPATH=BRAND -- cgit From 8a0d1b11477b9bc647cc4d490cfdf2828be3071c Mon Sep 17 00:00:00 2001 From: Mikhail Voitenko Date: Tue, 27 Oct 2009 16:45:40 +0000 Subject: #i10000# separate SO build for windows --- desktop/util/makefile.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/desktop/util/makefile.mk b/desktop/util/makefile.mk index 12cde0b8649c..4dec3cd738ba 100644 --- a/desktop/util/makefile.mk +++ b/desktop/util/makefile.mk @@ -209,6 +209,7 @@ APP5LINKRES=$(MISC)$/ooffice.res .ENDIF # OS2 .IF "$(GUI)" == "WNT" +.IF "$(LINK_SO)"=="TRUE" APP6TARGET=so$/officeloader APP6RES=$(RES)$/soloader.res APP6NOSAL=TRUE @@ -221,6 +222,7 @@ APP6OBJS = \ $(OBJ)$/officeloader.obj \ $(SOLARLIBDIR)$/pathutils-obj.obj STDLIB6=$(ADVAPI32LIB) $(SHELL32LIB) $(SHLWAPILIB) +.ENDIF # "$(LINK_SO)"=="TRUE" APP7TARGET=officeloader APP7RES=$(RES)$/ooloader.res @@ -268,7 +270,9 @@ $(APP6TARGETN) : $(MISC)$/binso_created.flg ALLTAR: $(MISC)$/$(TARGET).exe.manifest ALLTAR: $(MISC)$/$(TARGET).bin.manifest ALLTAR: $(BIN)$/$(TARGET).bin +.IF "$(LINK_SO)"=="TRUE" ALLTAR: $(BIN)$/so$/$(TARGET).bin +.ENDIF # "$(LINK_SO)"=="TRUE" .ENDIF # WNT .IF "$(GUI)" == "OS2" @@ -279,11 +283,14 @@ $(BIN)$/soffice_oo$(EXECPOST) : $(APP5TARGETN) $(COPY) $< $@ .IF "$(GUI)" != "OS2" +.IF "$(LINK_SO)"=="TRUE" $(BIN)$/so$/soffice_so$(EXECPOST) : $(APP1TARGETN) $(COPY) $< $@ ALLTAR : $(BIN)$/so$/soffice_so$(EXECPOST) $(BIN)$/soffice_oo$(EXECPOST) - +.ELSE +ALLTAR : $(BIN)$/soffice_oo$(EXECPOST) +.ENDIF # "$(LINK_SO)"=="TRUE" .ENDIF .IF "$(OS)" == "MACOSX" -- cgit From 95ccca996e41c0ff9fa70fb5007f06796a98bc1c Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 28 Oct 2009 16:56:00 +0100 Subject: #i105323# added documentation to primitives --- .../drawinglayer/primitive2d/alphaprimitive2d.hxx | 19 ++- .../primitive2d/animatedprimitive2d.hxx | 67 ++++++--- .../primitive2d/backgroundcolorprimitive2d.hxx | 27 +++- .../drawinglayer/primitive2d/baseprimitive2d.hxx | 23 +-- .../primitive2d/borderlineprimitive2d.hxx | 29 +++- .../drawinglayer/primitive2d/chartprimitive2d.hxx | 6 + .../primitive2d/controlprimitive2d.hxx | 47 +++--- .../primitive2d/embedded3dprimitive2d.hxx | 53 ++++--- .../primitive2d/fillbitmapprimitive2d.hxx | 27 +++- .../primitive2d/fillgradientprimitive2d.hxx | 22 ++- .../primitive2d/fillhatchprimitive2d.hxx | 27 +++- .../primitive2d/graphicprimitive2d.hxx | 31 +++- .../drawinglayer/primitive2d/gridprimitive2d.hxx | 34 +++-- .../drawinglayer/primitive2d/groupprimitive2d.hxx | 16 ++- .../primitive2d/helplineprimitive2d.hxx | 34 ++++- .../primitive2d/hittestprimitive2d.hxx | 34 +++-- .../drawinglayer/primitive2d/invertprimitive2d.hxx | 13 +- .../primitive2d/markerarrayprimitive2d.hxx | 29 +++- .../drawinglayer/primitive2d/maskprimitive2d.hxx | 22 ++- .../drawinglayer/primitive2d/mediaprimitive2d.hxx | 27 +++- .../primitive2d/metafileprimitive2d.hxx | 32 ++++- .../primitive2d/modifiedcolorprimitive2d.hxx | 25 +++- .../primitive2d/pagepreviewprimitive2d.hxx | 41 +++--- .../primitive2d/pointarrayprimitive2d.hxx | 26 +++- .../primitive2d/polygonprimitive2d.hxx | 113 +++++++++++---- .../primitive2d/polypolygonprimitive2d.hxx | 158 ++++++++++++++++----- .../drawinglayer/primitive2d/primitivetools2d.hxx | 46 +++--- .../drawinglayer/primitive2d/sceneprimitive2d.hxx | 93 +++++++----- .../drawinglayer/primitive2d/shadowprimitive2d.hxx | 28 +++- .../primitive2d/structuretagprimitive2d.hxx | 28 ++-- .../primitive2d/textdecoratedprimitive2d.hxx | 36 +++-- .../primitive2d/texteffectprimitive2d.hxx | 34 +++-- .../primitive2d/texthierarchyprimitive2d.hxx | 94 ++++++++---- .../drawinglayer/primitive2d/textlayoutdevice.hxx | 31 ++-- .../drawinglayer/primitive2d/textprimitive2d.hxx | 77 +++++++--- .../primitive2d/transformprimitive2d.hxx | 29 +++- .../primitive2d/unifiedalphaprimitive2d.hxx | 21 ++- .../primitive2d/wrongspellprimitive2d.hxx | 26 +++- .../drawinglayer/primitive3d/baseprimitive3d.hxx | 25 ++-- .../drawinglayer/primitive3d/groupprimitive3d.hxx | 16 ++- .../primitive3d/hatchtextureprimitive3d.hxx | 16 ++- .../primitive3d/hittestprimitive3d.hxx | 38 ++--- .../primitive3d/modifiedcolorprimitive3d.hxx | 15 +- .../primitive3d/polygonprimitive3d.hxx | 41 ++++-- .../primitive3d/polygontubeprimitive3d.hxx | 20 ++- .../primitive3d/polypolygonprimitive3d.hxx | 22 ++- .../primitive3d/sdrcubeprimitive3d.hxx | 15 +- .../primitive3d/sdrdecompositiontools3d.hxx | 1 + .../primitive3d/sdrextrudelathetools3d.hxx | 10 +- .../primitive3d/sdrextrudeprimitive3d.hxx | 36 +++-- .../primitive3d/sdrlatheprimitive3d.hxx | 38 +++-- .../primitive3d/sdrpolypolygonprimitive3d.hxx | 23 ++- .../drawinglayer/primitive3d/sdrprimitive3d.hxx | 22 +-- .../primitive3d/sdrsphereprimitive3d.hxx | 18 ++- .../drawinglayer/primitive3d/shadowprimitive3d.hxx | 20 ++- .../primitive3d/textureprimitive3d.hxx | 74 +++++++--- .../primitive3d/transformprimitive3d.hxx | 19 ++- 57 files changed, 1447 insertions(+), 547 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx index 79518eb82358..10288b70bd1b 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx @@ -54,7 +54,12 @@ namespace drawinglayer The basic definition is to use the Alpha content as Alpha-Mask by interpreting the Alpha-content not as RGB, but as Luminance alpha mask - using the common RGB_to_luminance definition as e.g. used by VCL + using the common RGB_to_luminance definition as e.g. used by VCL. + + The defining geometry is the Range of the child primitive sequence, + this means the renderers will/shall use this geometric information for + rendering, not the alpha one. The alpha one should/will be clipped + accordingly. */ class AlphaPrimitive2D : public GroupPrimitive2D { @@ -63,7 +68,17 @@ namespace drawinglayer Primitive2DSequence maAlpha; public: - /// constructor + /** constructor + + @param rChildren + The content which is defined to have a transparency. The + range of this primitive is defined by this content + + @param rAlpha + The definition of the Alpha-channel for this primitive. It + will be interpreted as mask by interpreting as gray values + using the common RGB_to_luminance definitions + */ AlphaPrimitive2D( const Primitive2DSequence& rChildren, const Primitive2DSequence& rAlpha); diff --git a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx index c42853fe54b2..cd6133dc54d8 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx @@ -52,39 +52,59 @@ namespace drawinglayer { namespace primitive2d { + /** AnimatedSwitchPrimitive2D class + + This is the basic class for simple, animated primitives. The basic idea + is to have an animation definition (AnimationEntry) who's basic + functionality is to return a state value for any given animation time in + the range of [0.0 .. 1.0]. Depending on the state, the decomposition + calculates an index, which of the members of the child vector is to + be visualized. + + An example: For blinking, the Child vector should exist of two entries; + for values of [0.0 .. 0.5] the first, else the last entry will be used. + This mechanism is not limited to two entries, though. + */ class AnimatedSwitchPrimitive2D : public GroupPrimitive2D { private: - // the animation definition which allows translation of a point in time - // to an animation state [0.0 .. 1.0]. This member contains a cloned - // definition and is owned by this implementation + /** + The animation definition which allows translation of a point in time + to an animation state [0.0 .. 1.0]. This member contains a cloned + definition and is owned by this implementation. + */ animation::AnimationEntry* mpAnimationEntry; - // bitfield - // flag if this is a text or graphic animation. Necessary since SdrViews need to differentiate - // between both types if they are on/off + /// bitfield + /** flag if this is a text or graphic animation. Necessary since SdrViews need to differentiate + between both types if they are on/off + */ unsigned mbIsTextAnimation : 1; public: + /// constructor AnimatedSwitchPrimitive2D( const animation::AnimationEntry& rAnimationEntry, const Primitive2DSequence& rChildren, bool bIsTextAnimation); + + /// destructor - needed due to mpAnimationEntry virtual ~AnimatedSwitchPrimitive2D(); - // get data + /// data read access const animation::AnimationEntry& getAnimationEntry() const { return *mpAnimationEntry; } bool isTextAnimation() const { return mbIsTextAnimation; } bool isGraphicAnimation() const { return !isTextAnimation(); } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() - // The getDecomposition is overloaded here since the decompose is dependent of the point in time, - // so the default implementation is nut useful here, it needs to be handled locally + /** The getDecomposition is overloaded here since the decompose is dependent of the point in time, + so the default implementation is nut useful here, it needs to be handled locally + */ virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; }; } // end of namespace primitive2d @@ -96,19 +116,26 @@ namespace drawinglayer { namespace primitive2d { + /** AnimatedBlinkPrimitive2D class + + Basically the same mechanism as in AnimatedSwitchPrimitive2D, but the + decomposition is specialized in delivering the children in the + range [0.0.. 0.5] and an empty sequence else + */ class AnimatedBlinkPrimitive2D : public AnimatedSwitchPrimitive2D { protected: public: + /// constructor AnimatedBlinkPrimitive2D( const animation::AnimationEntry& rAnimationEntry, const Primitive2DSequence& rChildren, bool bIsTextAnimation); - // create local decomposition + /// create local decomposition virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -120,24 +147,32 @@ namespace drawinglayer { namespace primitive2d { + /** AnimatedInterpolatePrimitive2D class + + Specialized on multi-step animations based on matrix transformations. The + Child sequelce will be embedded in a matrix transformation. That transformation + will be linearly combined from the decomposed values and the animation value + to allow a smooth animation. + */ class AnimatedInterpolatePrimitive2D : public AnimatedSwitchPrimitive2D { private: - // the transformations + /// the transformations std::vector< basegfx::tools::B2DHomMatrixBufferedDecompose > maMatrixStack; protected: public: + /// constructor AnimatedInterpolatePrimitive2D( const std::vector< basegfx::B2DHomMatrix >& rmMatrixStack, const animation::AnimationEntry& rAnimationEntry, const Primitive2DSequence& rChildren, bool bIsTextAnimation); - // create local decomposition + /// create local decomposition virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx index 7b998fd3e749..82a568fc9ea1 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx @@ -46,35 +46,48 @@ namespace drawinglayer { namespace primitive2d { + /** AnimatedInterpolatePrimitive2D class + + This primitive is defined to fill the whole visible Viewport with + the given color (and thus decomposes to a filled polygon). This + makes it a view-depnendent primitive by definition. It only has + a valid decomposition if a valid Viewport is given in the + ViewInformation2D at decomposition time. + + It will try to buffer it's last decomposition using maLastViewport + to detect changes in the get2DDecomposition call. + */ class BackgroundColorPrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the fill color to use basegfx::BColor maBColor; - // the last used viewInformation, used from getDecomposition for buffering + /// the last used viewInformation, used from getDecomposition for buffering basegfx::B2DRange maLastViewport; protected: - // create local decomposition + /// create local decomposition virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor BackgroundColorPrimitive2D( const basegfx::BColor& rBColor); - // get data + /// data read access const basegfx::BColor& getBColor() const { return maBColor; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get 2d range + /// get B2Drange virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() - // Overload standard getDecomposition call to be view-dependent here + /// Overload standard getDecomposition call to be view-dependent here virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx index f41863f36992..6cf45ffefe54 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx @@ -76,7 +76,9 @@ namespace drawinglayer { namespace primitive2d { - /** Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D + /** BasePrimitive2D class + + Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D This class is strongly virtual due to the lack of getPrimitiveID() implementation. This is by purpose, this base class shall not be incarnated and be used directly as @@ -201,7 +203,9 @@ namespace drawinglayer { namespace primitive2d { - /** Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D + /** BufferedDecompositionPrimitive2D class + + Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D which want to buffer the decomoposition result Buffering the decomposition is the most-used buffering and is thus used my most @@ -270,23 +274,24 @@ namespace drawinglayer { namespace primitive2d { - // get B2DRange from a given Primitive2DReference + /// get B2DRange from a given Primitive2DReference basegfx::B2DRange getB2DRangeFromPrimitive2DReference(const Primitive2DReference& rCandidate, const geometry::ViewInformation2D& aViewInformation); - // get B2DRange from a given Primitive2DSequence + /// get B2DRange from a given Primitive2DSequence basegfx::B2DRange getB2DRangeFromPrimitive2DSequence(const Primitive2DSequence& rCandidate, const geometry::ViewInformation2D& aViewInformation); - // compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D) - // and using compare operator + /** compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D) + and using compare operator + */ bool arePrimitive2DReferencesEqual(const Primitive2DReference& rA, const Primitive2DReference& rB); - // compare two Primitive2DReferences for equality, uses arePrimitive2DReferencesEqual internally + /// compare two Primitive2DReferences for equality, uses arePrimitive2DReferencesEqual internally bool arePrimitive2DSequencesEqual(const Primitive2DSequence& rA, const Primitive2DSequence& rB); - // concatenate sequence + /// concatenate sequence void appendPrimitive2DSequenceToPrimitive2DSequence(Primitive2DSequence& rDest, const Primitive2DSequence& rSource); - // concatenate single Primitive2D + /// concatenate single Primitive2D void appendPrimitive2DReferenceToPrimitive2DSequence(Primitive2DSequence& rDest, const Primitive2DReference& rSource); } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx index 209b0ed17e40..b13528184f3b 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx @@ -46,25 +46,41 @@ namespace drawinglayer { namespace primitive2d { + /** BorderLinePrimitive2D class + + This is the basic primitive to build frames around objects, e.g. tables. + It defines a single or double line from Start to nd using the LeftWidth, + Distance and RightWidth definitions. + The LineStart/End overlap is defined by the Extend(Inner|Outer)(Start|End) + definitions. + */ class BorderLinePrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the line definition basegfx::B2DPoint maStart; basegfx::B2DPoint maEnd; + + /// the widths of single/double line double mfLeftWidth; double mfDistance; double mfRightWidth; + + /// edge overlap sizes double mfExtendInnerStart; double mfExtendInnerEnd; double mfExtendOuterStart; double mfExtendOuterEnd; + + /// the line color basegfx::BColor maRGBColor; - // bitfield + /// bitfield + /// flags to influence inside/outside creation unsigned mbCreateInside : 1; unsigned mbCreateOutside : 1; - // helpers + /// local helpers double getCorrectedLeftWidth() const { return basegfx::fTools::equal(1.0, mfLeftWidth) ? 0.0 : mfLeftWidth; @@ -106,10 +122,11 @@ namespace drawinglayer } protected: - // create local decomposition + /// create local decomposition virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor BorderLinePrimitive2D( const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd, @@ -124,7 +141,7 @@ namespace drawinglayer bool bCreateOutside, const basegfx::BColor& rRGBColor); - // get data + /// data read access const basegfx::B2DPoint& getStart() const { return maStart; } const basegfx::B2DPoint& getEnd() const { return maEnd; } double getLeftWidth() const { return mfLeftWidth; } @@ -138,10 +155,10 @@ namespace drawinglayer bool getCreateOutside() const { return mbCreateOutside; } const basegfx::BColor& getRGBColor() const { return maRGBColor; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/chartprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/chartprimitive2d.hxx index 95c53347debb..b153e04ee1cb 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/chartprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/chartprimitive2d.hxx @@ -46,6 +46,12 @@ namespace drawinglayer { namespace primitive2d { + /** ChartPrimitive2D class + + This is a helper primitive which decomposes to the ChartMetaFile + visualisation. It is used to allow specific renderers to do something + direct for visualising the chart. + */ class ChartPrimitive2D : public GroupPrimitive2D { private: diff --git a/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx index 974faf506da8..5dd55405adf7 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx @@ -47,63 +47,74 @@ namespace drawinglayer { namespace primitive2d { + /** ControlPrimitive2D class + + Base class for ControlPrimitive handling. It decoposes to a + graphical representation (Bitmap data) of the control. This + representation is limited to a quadratic pixel maximum defined + in the applicatin settings. + */ class ControlPrimitive2D : public BufferedDecompositionPrimitive2D { private: - // object's base data + /// object's base data basegfx::B2DHomMatrix maTransform; com::sun::star::uno::Reference< com::sun::star::awt::XControlModel > mxControlModel; - // the created an cached awt::XControl + /// the created an cached awt::XControl com::sun::star::uno::Reference< com::sun::star::awt::XControl > mxXControl; - // the last used scaling, used from getDecomposition for buffering + /// the last used scaling, used from getDecomposition for buffering basegfx::B2DVector maLastViewScaling; - // used from getXControl() to create a local awt::XControl which is remembered in mxXControl - // and from thereon always used and returned by getXControl() + /** used from getXControl() to create a local awt::XControl which is remembered in mxXControl + and from thereon always used and returned by getXControl() + */ void createXControl(); - // single local decompositions, used from create2DDecomposition() + /// single local decompositions, used from create2DDecomposition() Primitive2DReference createBitmapDecomposition(const geometry::ViewInformation2D& rViewInformation) const; Primitive2DReference createPlaceholderDecomposition(const geometry::ViewInformation2D& rViewInformation) const; protected: - // local decomposition + /// local decomposition virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor ControlPrimitive2D( const basegfx::B2DHomMatrix& rTransform, const com::sun::star::uno::Reference< com::sun::star::awt::XControlModel >& rxControlModel); - // constructor with an additional XControl as parameter to allow to hand it over at incarnation time - // if it exists. This will avoid to create a 2nd one on demand in createXControl() - // and thus double the XControls. + /** constructor with an additional XControl as parameter to allow to hand it over at incarnation time + if it exists. This will avoid to create a 2nd one on demand in createXControl() + and thus double the XControls. + */ ControlPrimitive2D( const basegfx::B2DHomMatrix& rTransform, const com::sun::star::uno::Reference< com::sun::star::awt::XControlModel >& rxControlModel, const com::sun::star::uno::Reference< com::sun::star::awt::XControl >& rxXControl); - // get data + /// data read access const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } const com::sun::star::uno::Reference< com::sun::star::awt::XControlModel >& getControlModel() const { return mxControlModel; } - // mxControl access. This will on demand create the awt::XControl using createXControl() - // if it does not exist. It may already have been created or even handed over at - // incarnation + /** mxControl access. This will on demand create the awt::XControl using createXControl() + if it does not exist. It may already have been created or even handed over at + incarnation + */ const com::sun::star::uno::Reference< com::sun::star::awt::XControl >& getXControl() const; - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() - // Overload standard getDecomposition call to be view-dependent here + /// Overload standard getDecomposition call to be view-dependent here virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx index 86540d53e325..c27b6874891f 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx @@ -42,52 +42,65 @@ #include ////////////////////////////////////////////////////////////////////////////// -// BackgroundColorPrimitive2D class +// Embedded3DPrimitive2D class namespace drawinglayer { namespace primitive2d { + /** Embedded3DPrimitive2D class + + This is a helper primitive which allows embedding of single 3D + primitives to the 2D primitive logic. It will get the scene it's + involved and thus the 3D transformation. With this information it + is able to provide 2D range data for a 3D primitive. + + This primitive will not be visualized and decomposes to a yellow + 2D rectangle to visualize that this should never be visualized + */ class Embedded3DPrimitive2D : public BufferedDecompositionPrimitive2D { private: - // the sequence of 3d primitives + /// the sequence of 3d primitives primitive3d::Primitive3DSequence mxChildren3D; - // the 2D scene object transformation + /// the 2D scene object transformation basegfx::B2DHomMatrix maObjectTransformation; - // the 3D transformations + /// the 3D transformations geometry::ViewInformation3D maViewInformation3D; - // if the embedded 3D primitives contain shadow, these parameters are needed - // to extract the shadow wich is a sequence od 2D primitives and may expand - // the 2D range. Since every single 3D object in a scene may individually - // have shadow or not, these values need to be provided and prepared. The shadow - // distance itself (a 2D transformation) is part of the 3D shadow definition + /** if the embedded 3D primitives contain shadow, these parameters are needed + to extract the shadow wich is a sequence od 2D primitives and may expand + the 2D range. Since every single 3D object in a scene may individually + have shadow or not, these values need to be provided and prepared. The shadow + distance itself (a 2D transformation) is part of the 3D shadow definition + */ basegfx::B3DVector maLightNormal; double mfShadowSlant; basegfx::B3DRange maScene3DRange; - // the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked) + /// the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked) Primitive2DSequence maShadowPrimitives; - // #i96669# add simple range buffering for this primitive + /// #i96669# add simple range buffering for this primitive basegfx::B2DRange maB2DRange; - // bitfield - // flag if given 3D geometry is already cheched for shadow definitions and 2d shadows - // are created in maShadowPrimitives + /// bitfield + /** flag if given 3D geometry is already cheched for shadow definitions and 2d shadows + are created in maShadowPrimitives + */ unsigned mbShadow3DChecked : 1; - // private helpers + /// private helpers bool impGetShadow3D(const geometry::ViewInformation2D& rViewInformation) const; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor Embedded3DPrimitive2D( const primitive3d::Primitive3DSequence& rxChildren3D, const basegfx::B2DHomMatrix& rObjectTransformation, @@ -96,7 +109,7 @@ namespace drawinglayer double fShadowSlant, const basegfx::B3DRange& rScene3DRange); - // get data + /// get data const primitive3d::Primitive3DSequence& getChildren3D() const { return mxChildren3D; } const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; } const geometry::ViewInformation3D& getViewInformation3D() const { return maViewInformation3D; } @@ -104,13 +117,13 @@ namespace drawinglayer double getShadowSlant() const { return mfShadowSlant; } const basegfx::B3DRange& getScene3DRange() const { return maScene3DRange; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx index c2d305b78c11..7d2b084a9356 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx @@ -47,32 +47,49 @@ namespace drawinglayer { namespace primitive2d { + /** FillBitmapPrimitive2D class + + This class defines a bitmap filling for a rectangular area. The + Range is defined by the Transformation, the fill by the FillBitmapAttribute. + There, the fill consists of a Bitmap (not transparent) defining the fill data + and a Point/Vector pair defining the relative position/size [0.0 .. 1.0] + inside the area where the bitmap is positioned. A flag defines then if this + is tiled or not. + + Renderers should handle this primitive; it has a geometrically correct + decomposition, but on pixel oututs the areas where the tiled pieces are + aligned tend to show up (one overlapping or empty pixel) + */ class FillBitmapPrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the geometric definition basegfx::B2DHomMatrix maTransformation; + + /// the fill attributes attribute::FillBitmapAttribute maFillBitmap; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor FillBitmapPrimitive2D( const basegfx::B2DHomMatrix& rTransformation, const attribute::FillBitmapAttribute& rFillBitmap); - // get data + /// data read access const basegfx::B2DHomMatrix& getTransformation() const { return maTransformation; } const attribute::FillBitmapAttribute& getFillBitmap() const { return maFillBitmap; } - // compare operator + /// compare operator virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx index f995bb487b33..d6853e69b149 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx @@ -46,32 +46,44 @@ namespace drawinglayer { namespace primitive2d { + /** FillGradientPrimitive2D class + + This class defines a gradient filling for a rectangular area. The + Range is defined by the Transformation, the gradient by the FillGradientAttribute. + + The decomposition will deliver the decomposed gradient, e.g. for an ellipse + gradient the various ellipses in various color steps will be created. + */ class FillGradientPrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the geometric definition basegfx::B2DRange maObjectRange; + + /// the gradient definition attribute::FillGradientAttribute maFillGradient; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor FillGradientPrimitive2D( const basegfx::B2DRange& rObjectRange, const attribute::FillGradientAttribute& rFillGradient); - // get data + /// data read access const basegfx::B2DRange& getObjectRange() const { return maObjectRange; } const attribute::FillGradientAttribute& getFillGradient() const { return maFillGradient; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx index 6181630e948d..1df3bb103eb0 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx @@ -40,41 +40,56 @@ #include ////////////////////////////////////////////////////////////////////////////// -// FillbitmapPrimitive2D class +// FillHatchPrimitive2D class namespace drawinglayer { namespace primitive2d { + /** FillHatchPrimitive2D class + + This class defines a hatch filling for a rectangular area. The + Range is defined by the Transformation, the hatch by the FillHatchAttribute. + If the background is to be filled, a flag in FillHatchAttribute is set and + the BColor defines the background color. + + The decomposition will deliver the hatch lines. + */ class FillHatchPrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the geometric definition basegfx::B2DRange maObjectRange; + + /// the hatch definition attribute::FillHatchAttribute maFillHatch; + + /// hatch background color (if used) basegfx::BColor maBColor; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor FillHatchPrimitive2D( const basegfx::B2DRange& rObjectRange, const basegfx::BColor& rBColor, const attribute::FillHatchAttribute& rFillHatch); - // get data + /// data read access const basegfx::B2DRange& getObjectRange() const { return maObjectRange; } const attribute::FillHatchAttribute& getFillHatch() const { return maFillHatch; } const basegfx::BColor& getBColor() const { return maBColor; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx index 33923eebc259..e6adcacc97e0 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx @@ -46,18 +46,39 @@ namespace drawinglayer { namespace primitive2d { + /** GraphicPrimitive2D class + + Primitive to hold graphics defined by GraphicObject and GraphicAttr + combination. This includes MetaFiles and diverse pixel-oriented graphic + formats. It even includes animated GIFs, Croppings and other changes + defined in GraphicAttr. + + This makes the decomposition contain a wide variety of possibilites, + too. From a simple BitmapPrimitive over AnimatedSwitchPrimitive2D, + MetafilePrimitive2D (with and without embedding in a masking when e.g. + the Metafile is bigger than the geometry) and embeddings in + TransformPrimitive2D and MaskPrimitive2D for croppings. + + The primitive geometry area is defined by Transform. + */ class GraphicPrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the geometric definition basegfx::B2DHomMatrix maTransform; + + /// the GraphicObject with all it's content possibilities GraphicObject maGraphicObject; + + /// The GraphicAttr with all it's modification possibilities GraphicAttr maGraphicAttr; protected: - // local decomposition + /// local decomposition virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor(s) GraphicPrimitive2D( const basegfx::B2DHomMatrix& rTransform, const GraphicObject& rGraphicObject, @@ -66,19 +87,19 @@ namespace drawinglayer const basegfx::B2DHomMatrix& rTransform, const GraphicObject& rGraphicObject); - // get data + /// data read access const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } const GraphicObject& getGraphicObject() const { return maGraphicObject; } const GraphicAttr& getGraphicAttr() const { return maGraphicAttr; } bool isTransparent() const; - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx index d2b90e271cda..4ba83fc75c88 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx @@ -48,29 +48,47 @@ namespace drawinglayer { namespace primitive2d { + /** GridPrimitive2D class + + This primitive is specialized to Grid visualisation. The graphic definition + (Transform) contains the whole grid area, but will of course be combined + with the visible area (Viewport) when decomposed. Also a reolution-dependent + point reduction is used to not create too much grid visualisation data. This + makes this primitive highly view-dependent and it dynamically buffers + the last decomposition dependent from the Viewport used. + */ class GridPrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// The geometry definition for the grid area basegfx::B2DHomMatrix maTransform; + + /// grid layout definitions double mfWidth; double mfHeight; double mfSmallestViewDistance; double mfSmallestSubdivisionViewDistance; sal_uInt32 mnSubdivisionsX; sal_uInt32 mnSubdivisionsY; + + /// Grid color for single-pixel grid points basegfx::BColor maBColor; + + /// The Bitmap (with alpha) for grid cross points BitmapEx maCrossMarker; - // the last used object to view transformtion and the last Viewport, - // used from getDecomposition for decide buffering + /** the last used object to view transformtion and the last Viewport, + used from getDecomposition for decide buffering + */ basegfx::B2DHomMatrix maLastObjectToViewTransformation; basegfx::B2DRange maLastViewport; protected: - // create local decomposition + /// create local decomposition virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor GridPrimitive2D( const basegfx::B2DHomMatrix& rTransform, double fWidth, @@ -82,7 +100,7 @@ namespace drawinglayer const basegfx::BColor& rBColor, const BitmapEx& rCrossMarker); - // get data + /// data read access const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } double getWidth() const { return mfWidth; } double getHeight() const { return mfHeight; } @@ -93,16 +111,16 @@ namespace drawinglayer const basegfx::BColor& getBColor() const { return maBColor; } const BitmapEx& getCrossMarker() const { return maCrossMarker; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get 2d range + /// get 2d range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() - // Overload standard getDecomposition call to be view-dependent here + /// Overload standard getDecomposition call to be view-dependent here virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx index cd6efef472bb..89b49420a3e7 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx @@ -45,7 +45,9 @@ namespace drawinglayer { namespace primitive2d { - /** Baseclass for all grouping 2D primitives + /** GroupPrimitive2D class + + Baseclass for all grouping 2D primitives The grouping primitive in it's basic form is capable of holding a child primitive content and returns it on decomposition on default. @@ -78,23 +80,23 @@ namespace drawinglayer class GroupPrimitive2D : public BasePrimitive2D { private: - // the children. Declared private since this shall never be changed at all after construction + /// the children. Declared private since this shall never be changed at all after construction Primitive2DSequence maChildren; public: - // constructor + /// constructor GroupPrimitive2D(const Primitive2DSequence& rChildren); - // data access + /// data read access const Primitive2DSequence& getChildren() const { return maChildren; } - // compare operator + /// compare operator virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; - // local decomposition. Implementation will just return children + /// local decomposition. Implementation will just return children virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx index 0ba83b2c383a..a1171cb846e0 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx @@ -47,32 +47,52 @@ namespace drawinglayer { namespace primitive2d { + /** HelplineStyle2D definition + + The available styles of Helplines + */ enum HelplineStyle2D { HELPLINESTYLE2D_POINT, HELPLINESTYLE2D_LINE }; + /** HelplinePrimitive2D class + + This primitive provides a view-dependent helpline definition. The Helpline + is defined by a line equation (Point and vector) and a style. When the style + is a line, dependent from Viewport the visible part of that Helpline is + constructed. For Point, a cross is constructed. This primitive is highly + view-dependent. + + The visualisation uses the two given colors to create a dashed line with + the given dash length. + */ class HelplinePrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// Helpline geometry definition basegfx::B2DPoint maPosition; basegfx::B2DVector maDirection; HelplineStyle2D meStyle; + + /// Helpline style definition basegfx::BColor maRGBColA; basegfx::BColor maRGBColB; double mfDiscreteDashLength; - // the last used object to view transformtion and the last Viewport, - // used from getDecomposition for decide buffering + /** the last used object to view transformtion and the last Viewport, + used from getDecomposition for decide buffering + */ basegfx::B2DHomMatrix maLastObjectToViewTransformation; basegfx::B2DRange maLastViewport; protected: - // create local decomposition + /// create local decomposition virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor HelplinePrimitive2D( const basegfx::B2DPoint& rPosition, const basegfx::B2DVector& rDirection, @@ -81,7 +101,7 @@ namespace drawinglayer const basegfx::BColor& aRGBColB, double fDiscreteDashLength); - // get data + /// data read access const basegfx::B2DPoint getPosition() const { return maPosition; } const basegfx::B2DVector getDirection() const { return maDirection; } HelplineStyle2D getStyle() const { return meStyle; } @@ -89,13 +109,13 @@ namespace drawinglayer const basegfx::BColor& getRGBColB() const { return maRGBColB; } double getDiscreteDashLength() const { return mfDiscreteDashLength; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() - // Overload standard getDecomposition call to be view-dependent here + /// Overload standard getDecomposition call to be view-dependent here virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx index 1df9ca2111af..3b69c685c985 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx @@ -44,29 +44,35 @@ namespace drawinglayer { namespace primitive2d { - // This primitive is used to represent geometry for non-visible objects, - // e.g. a PresObj's outline. To still be able to use primitives for HitTest - // functionality, the 2d decompositions will produce an as much as possible - // simplified line geometry encapsulated in this primtive when there is no - // line geometry. In a further enchanced version this may change to 'if neither - // filled nor lines' creation criteria. The whole primitive decomposes to nothing, - // so no one not knowing it will be influenced. Only helper processors for hit test - // (and maybe BoundRect extractors) will use it and it's children subcontent. + /** HitTestPrimitive2D class + + This primitive is used to represent geometry for non-visible objects, + e.g. a PresObj's outline. To still be able to use primitives for HitTest + functionality, the 2d decompositions will produce an as much as possible + simplified line geometry encapsulated in this primtive when there is no + line geometry. In a further enchanced version this may change to 'if neither + filled nor lines' creation criteria. The whole primitive decomposes to nothing, + so no one not knowing it will be influenced. Only helper processors for hit test + (and maybe BoundRect extractors) will use it and it's children subcontent. + */ class HitTestPrimitive2D : public GroupPrimitive2D { public: + /// constructor HitTestPrimitive2D(const Primitive2DSequence& rChildren); - // despite returning an empty decomposition since it's no visualisation data, - // range calculation is intended to use invisible replacement geometry, so - // the local implementation will return the children's range + /** despite returning an empty decomposition since it's no visualisation data, + range calculation is intended to use invisible replacement geometry, so + the local implementation will return the children's range + */ virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // local decomposition. Implementation will return empty Primitive2DSequence - // since this is no visualisation data + /** local decomposition. Implementation will return empty Primitive2DSequence + since this is no visualisation data + */ virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/invertprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/invertprimitive2d.hxx index ae7a316e03da..9ba7e7796395 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/invertprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/invertprimitive2d.hxx @@ -44,12 +44,23 @@ namespace drawinglayer { namespace primitive2d { + /** HitTestPrimitive2D class + + This is a helper class which encapsulates geometry that should be + painted XOR, e.g. old cursor visualisations. It decomposes to + it's content, so when not supporting it, the contained geometry + will be visualized normally. + Unfortunately this is still needed, but hard to support on various + systems. XOR painting needs read access to the target, so modern + graphic systems tend to not support it anymore. + */ class InvertPrimitive2D : public GroupPrimitive2D { public: + /// constructor InvertPrimitive2D(const Primitive2DSequence& rChildren); - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx index 77f450403302..cc4c054f8bb3 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx @@ -41,38 +41,55 @@ #include ////////////////////////////////////////////////////////////////////////////// -// MarkerPrimitive2D class +// MarkerArrayPrimitive2D class namespace drawinglayer { namespace primitive2d { + /** MarkerArrayPrimitive2D class + + This primtive defines an array of markers. Their size is defined + in pixels and independent from the view transformation which makes + this primitive highly view-dependent. It is also transformation + invariant, so that the bitmap is always visualized unscaled and + unrotated. + It is used e.g. for grid position visualisation. The given Bitmap + (with alpha) is defined to be visible centered at each of the given + positions. + It decomposes to the needed number of BitmapPrimitive2D's, so it would + be efficient to handle it directly in a renderer. + */ class MarkerArrayPrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the positions for the marker std::vector< basegfx::B2DPoint > maPositions; + + /// the marker definintion to visualize BitmapEx maMarker; protected: - // create local decomposition + /// create local decomposition virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor MarkerArrayPrimitive2D( const std::vector< basegfx::B2DPoint >& rPositions, const BitmapEx& rMarker); - // get data + /// data read access const std::vector< basegfx::B2DPoint >& getPositions() const { return maPositions; } const BitmapEx& getMarker() const { return maMarker; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/maskprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/maskprimitive2d.hxx index 9be17376941e..72d5bd3b9b6b 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/maskprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/maskprimitive2d.hxx @@ -45,23 +45,39 @@ namespace drawinglayer { namespace primitive2d { + /** MaskPrimitive2D class + + This is the central masking primitive. It's a grouping + primitive and contains a PolyPolygon which defines the visible + area. Only visualisation parts of the Child primitive sequence + inside of the mask PolyPolygon is defined to be visible. + + This primitive should be handled by a renderer. If it is not handled, + it decomposes to it's Child content, and thus the visualisation would + contaiun no clips. + + The geometrc range of this primitive is completely defined by the Mask + PolyPolygon since by definition nothing outside of the mask is visible. + */ class MaskPrimitive2D : public GroupPrimitive2D { private: + /// the mask PolyPolygon basegfx::B2DPolyPolygon maMask; public: + /// constructor MaskPrimitive2D( const basegfx::B2DPolyPolygon& rMask, const Primitive2DSequence& rChildren); - // get data + /// data read access const basegfx::B2DPolyPolygon& getMask() const { return maMask; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx index da8e49b644c6..e5f884f09294 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx @@ -46,38 +46,55 @@ namespace drawinglayer { namespace primitive2d { + /** MediaPrimitive2D class + + This is a unified primitive for Media visualisation, e.g. animations + or sounds. It's geometry is defined by Transform. For conveinience, + it also contains a discrete border size (aka Pixels) which will be added + if used. This makes it a view-dependent primitive. It also gets a filled + background and the decomposition will try to create a graphic representation + if te content (defined by the URL), e.g. a still frome for animated stuff. + */ class MediaPrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the geometry definition basegfx::B2DHomMatrix maTransform; + + /// the content definition rtl::OUString maURL; + + /// style: background color basegfx::BColor maBackgroundColor; + + /// discrete border (in 'pixels') sal_uInt32 mnDiscreteBorder; protected: - // local decomposition + /// local decomposition virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor MediaPrimitive2D( const basegfx::B2DHomMatrix& rTransform, const rtl::OUString& rURL, const basegfx::BColor& rBackgroundColor, sal_uInt32 nDiscreteBorder); - // get data + /// data read access const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } const rtl::OUString& getURL() const { return maURL; } const basegfx::BColor& getBackgroundColor() const { return maBackgroundColor; } sal_uInt32 getDiscreteBorder() const { return mnDiscreteBorder; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx index 23eb5dd1b36e..039db9387024 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx @@ -47,28 +47,52 @@ namespace drawinglayer { namespace primitive2d { + /** MediaPrimitive2D class + + This is the MetaFile representing primitive. It's geometry is defined + by MetaFileTransform. The content (defined by MetaFile) will be scaled + to the geometric definiton by using PrefMapMode and PrefSize of the + Metafile. + + It has shown that this not always guarantees that all Metafile content + is inside the geometric definition, but this primitive defines that this + is the case to allow a getB2DRange implementation. If it cannot be + guaranteed that the Metafile is inside the geometric definition, it should + be embedded to a MaskPrimitive2D. + + This primitive has no decomposition yet, so when not supported by a renderer, + it will not be visualized. + + In the future, a decomposition implementation would be appreciated and would + have many advantages; Metafile would no longer have to be rendered by + sub-systems and a standard way for converting Metafiles would exist. + */ class MetafilePrimitive2D : public BasePrimitive2D { private: + /// the geometry definition basegfx::B2DHomMatrix maMetaFileTransform; + + /// the content definition GDIMetaFile maMetaFile; public: + /// constructor MetafilePrimitive2D( const basegfx::B2DHomMatrix& rMetaFileTransform, const GDIMetaFile& rMetaFile); - // get data + /// data read access const basegfx::B2DHomMatrix& getTransform() const { return maMetaFileTransform; } const GDIMetaFile& getMetaFile() const { return maMetaFile; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx index 903ba89c9a5b..e93dd523e0b7 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx @@ -45,23 +45,42 @@ namespace drawinglayer { namespace primitive2d { + /** ModifiedColorPrimitive2D class + + This primitive is a grouping primitive and allows to define + how the colors of it's child content shall be modified for + visualisation. This can be (and is) used e.g. for generic shadow + visualisation by forcing all color usages of the contained + sub-content to the shadow color. + + For the possibilities of color modifications, please refer + to the basegfx::BColorModifier definitions in basegfx. For + processing there is tooling in basegfx to build a stack of + BColorModifiers to always be able to proccess the correct + colors. + + If a renderer does not handle this primitive, the content will + be visualized unchanged. + */ class ModifiedColorPrimitive2D : public GroupPrimitive2D { private: + /// The ColorModifier to use basegfx::BColorModifier maColorModifier; public: + /// constructor ModifiedColorPrimitive2D( const Primitive2DSequence& rChildren, const basegfx::BColorModifier& rColorModifier); - // get data + /// data read access const basegfx::BColorModifier& getColorModifier() const { return maColorModifier; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx index 52ed2435f5e7..5eca0ac2ab13 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx @@ -46,38 +46,43 @@ namespace drawinglayer { namespace primitive2d { - // This primitive is needed to have the correct XDrawPage as ViewInformation for decomposing - // the page contents (given as PageContent here) if these contain e.g. - // view-dependent (in this case XDrawPage-dependent) text fields like PageNumber. If You want - // those primitives to be visualized correctly, Your renderer needs to locally correct it's - // ViewInformation2D to reference the new XDrawPage. + /** PagePreviewPrimitive2D class + + This primitive is needed to have the correct XDrawPage as ViewInformation for decomposing + the page contents (given as PageContent here) if these contain e.g. + view-dependent (in this case XDrawPage-dependent) text fields like PageNumber. If You want + those primitives to be visualized correctly, Your renderer needs to locally correct it's + ViewInformation2D to reference the new XDrawPage. + */ class PagePreviewPrimitive2D : public BufferedDecompositionPrimitive2D { private: - // the XDrawPage visualized by this primitive. When we go forward with primitives - // this will not only be used by the renderers to provide the correct decompose - // graphic attribute context, but also to completely create the page's sub-content. + /** the XDrawPage visualized by this primitive. When we go forward with primitives + this will not only be used by the renderers to provide the correct decompose + graphic attribute context, but also to completely create the page's sub-content. + */ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > mxDrawPage; - // the PageContent + /// the PageContent Primitive2DSequence maPageContent; - // the own geometry + /// the own geometry basegfx::B2DHomMatrix maTransform; - // content width and height + /// content width and height double mfContentWidth; double mfContentHeight; - // bitfield - // flag to allow keeping the aspect ratio + /// bitfield + /// flag to allow keeping the aspect ratio unsigned mbKeepAspectRatio : 1; protected: - // local decomposition. Implementation will just return children + /// local decomposition. Implementation will just return children virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor PagePreviewPrimitive2D( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& rxDrawPage, const basegfx::B2DHomMatrix& rTransform, @@ -86,7 +91,7 @@ namespace drawinglayer const Primitive2DSequence& rPageContent, bool bKeepAspectRatio); - // get data + /// data read access const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& getXDrawPage() const { return mxDrawPage; } const Primitive2DSequence& getPageContent() const { return maPageContent; } const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } @@ -94,13 +99,13 @@ namespace drawinglayer double getContentHeight() const { return mfContentHeight; } bool getKeepAspectRatio() const { return mbKeepAspectRatio; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // own getB2DRange + /// own getB2DRange virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx index 7e82f53c2401..793c96444bac 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx @@ -40,37 +40,51 @@ #include ////////////////////////////////////////////////////////////////////////////// -// MarkerPrimitive2D class +// PointArrayPrimitive2D class namespace drawinglayer { namespace primitive2d { + /** PointArrayPrimitive2D class + + This primitive defines single,discrete 'pixels' for the given + positions in the given color. This makes it view-dependent since + the logic size of a 'pixel' depends on the view transformation. + + This is one of the non-decomposable primitives, so a renderer + should proccess it (Currently it is only used for grid visualisation, + but this may change). + */ class PointArrayPrimitive2D : public BasePrimitive2D { private: + /// the array of positions std::vector< basegfx::B2DPoint > maPositions; + + /// the color to use basegfx::BColor maRGBColor; - // #i96669# add simple range buffering for this primitive + /// #i96669# add simple range buffering for this primitive basegfx::B2DRange maB2DRange; public: + /// constructor PointArrayPrimitive2D( const std::vector< basegfx::B2DPoint >& rPositions, const basegfx::BColor& rRGBColor); - // get data + /// data read access const std::vector< basegfx::B2DPoint >& getPositions() const { return maPositions; } const basegfx::BColor& getRGBColor() const { return maRGBColor; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx index 4e04786fb2e5..4c6f5b49bf01 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx @@ -49,26 +49,40 @@ namespace drawinglayer { namespace primitive2d { + /** PolygonHairlinePrimitive2D class + + This primitive defines a Hairline. Since hairlines are view-dependent, + this primitive is view-dependent, too. + + This is one of the non-decomposable primitives, so a renderer + should proccess it. + */ class PolygonHairlinePrimitive2D : public BasePrimitive2D { private: + /// the hairline geometry basegfx::B2DPolygon maPolygon; + + /// the hairline color basegfx::BColor maBColor; public: - PolygonHairlinePrimitive2D(const basegfx::B2DPolygon& rPolygon, const basegfx::BColor& rBColor); + /// constructor + PolygonHairlinePrimitive2D( + const basegfx::B2DPolygon& rPolygon, + const basegfx::BColor& rBColor); - // get data + /// data read access const basegfx::B2DPolygon& getB2DPolygon() const { return maPolygon; } const basegfx::BColor& getBColor() const { return maBColor; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -81,44 +95,59 @@ namespace drawinglayer { namespace primitive2d { + /** PolygonMarkerPrimitive2D class + + This primitive defines a two-colored marker hairline which is + dashed with the given dash length. Since hairlines are view-dependent, + this primitive is view-dependent, too. + + It will be decomposed to the needed PolygonHairlinePrimitive2D if + not handled directly by a renderer. + */ class PolygonMarkerPrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the marker hairline geometry basegfx::B2DPolygon maPolygon; + + /// the two colors basegfx::BColor maRGBColorA; basegfx::BColor maRGBColorB; + + /// the dash distance in 'pixels' double mfDiscreteDashLength; - // decomposition is view-dependent, remember last InverseObjectToViewTransformation + /// decomposition is view-dependent, remember last InverseObjectToViewTransformation basegfx::B2DHomMatrix maLastInverseObjectToViewTransformation; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor PolygonMarkerPrimitive2D( const basegfx::B2DPolygon& rPolygon, const basegfx::BColor& rRGBColorA, const basegfx::BColor& rRGBColorB, double fDiscreteDashLength); - // get data + /// data read access const basegfx::B2DPolygon& getB2DPolygon() const { return maPolygon; } const basegfx::BColor& getRGBColorA() const { return maRGBColorA; } const basegfx::BColor& getRGBColorB() const { return maRGBColorB; } double getDiscreteDashLength() const { return mfDiscreteDashLength; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // get local decomposition. Overloaded since this decomposition is view-dependent + /// get local decomposition. Overloaded since this decomposition is view-dependent virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -131,39 +160,52 @@ namespace drawinglayer { namespace primitive2d { + /** PolygonStrokePrimitive2D class + + This primitive defines a line with line width, line join, line color + and stroke attributes. It will be decomposed dependent on the definition + to the needed primitives, e.g. filled PolyPolygons for fat lines. + */ class PolygonStrokePrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the line geometry basegfx::B2DPolygon maPolygon; + + /// the line attributes like width, join and color attribute::LineAttribute maLineAttribute; + + /// the line stroking (if used) attribute::StrokeAttribute maStrokeAttribute; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor PolygonStrokePrimitive2D( const basegfx::B2DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute); + /// constructor without stroking PolygonStrokePrimitive2D( const basegfx::B2DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute); - // get data + /// data read access basegfx::B2DPolygon getB2DPolygon() const { return maPolygon; } const attribute::LineAttribute& getLineAttribute() const { return maLineAttribute; } const attribute::StrokeAttribute& getStrokeAttribute() const { return maStrokeAttribute; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -176,17 +218,24 @@ namespace drawinglayer { namespace primitive2d { + /** PolygonWavePrimitive2D class + + This primitive defines a waveline based on a PolygonStrokePrimitive2D + where the wave is defined by wave width and wave length. + */ class PolygonWavePrimitive2D : public PolygonStrokePrimitive2D { private: + /// wave definition double mfWaveWidth; double mfWaveHeight; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor PolygonWavePrimitive2D( const basegfx::B2DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute, @@ -194,23 +243,24 @@ namespace drawinglayer double fWaveWidth, double fWaveHeight); + /// constructor without stroking PolygonWavePrimitive2D( const basegfx::B2DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute, double fWaveWidth, double fWaveHeight); - // get data + /// data read access double getWaveWidth() const { return mfWaveWidth; } double getWaveHeight() const { return mfWaveHeight; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -223,17 +273,25 @@ namespace drawinglayer { namespace primitive2d { + /** PolygonStrokeArrowPrimitive2D class + + This primitive defines a PolygonStrokePrimitive2D which is extended + eventually by start and end definitions which are normally used for + arrows. + */ class PolygonStrokeArrowPrimitive2D : public PolygonStrokePrimitive2D { private: + /// geometric definitions for line start and end attribute::LineStartEndAttribute maStart; attribute::LineStartEndAttribute maEnd; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor PolygonStrokeArrowPrimitive2D( const basegfx::B2DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute, @@ -241,23 +299,24 @@ namespace drawinglayer const attribute::LineStartEndAttribute& rStart, const attribute::LineStartEndAttribute& rEnd); + /// constructor without stroking PolygonStrokeArrowPrimitive2D( const basegfx::B2DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute, const attribute::LineStartEndAttribute& rStart, const attribute::LineStartEndAttribute& rEnd); - // get data + /// data read access const attribute::LineStartEndAttribute& getStart() const { return maStart; } const attribute::LineStartEndAttribute& getEnd() const { return maEnd; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx index 0a288cd2ac65..8c0512402120 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx @@ -51,30 +51,40 @@ namespace drawinglayer { namespace primitive2d { + /** PolyPolygonHairlinePrimitive2D class + + This primitive defines a multi-PolygonHairlinePrimitive2D and is + just for convenience. The definition is not different from the single + defined PolygonHairlinePrimitive2Ds. + */ class PolyPolygonHairlinePrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the hairline geometry basegfx::B2DPolyPolygon maPolyPolygon; + + /// the hairline color basegfx::BColor maBColor; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor PolyPolygonHairlinePrimitive2D(const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor); - // get data + /// data read access basegfx::B2DPolyPolygon getB2DPolyPolygon() const { return maPolyPolygon; } const basegfx::BColor& getBColor() const { return maBColor; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -87,38 +97,50 @@ namespace drawinglayer { namespace primitive2d { + /** PolyPolygonMarkerPrimitive2D class + + This primitive defines a multi-PolygonMarkerPrimitive2D and is + just for convenience. The definition is not different from the single + defined PolygonMarkerPrimitive2Ds. + */ class PolyPolygonMarkerPrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the marker hairline geometry basegfx::B2DPolyPolygon maPolyPolygon; + + /// the two colors basegfx::BColor maRGBColorA; basegfx::BColor maRGBColorB; + + /// the dash distance in 'pixels' double mfDiscreteDashLength; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor PolyPolygonMarkerPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rRGBColorA, const basegfx::BColor& rRGBColorB, double fDiscreteDashLength); - // get data + // data read access basegfx::B2DPolyPolygon getB2DPolyPolygon() const { return maPolyPolygon; } const basegfx::BColor& getRGBColorA() const { return maRGBColorA; } const basegfx::BColor& getRGBColorB() const { return maRGBColorB; } double getDiscreteDashLength() const { return mfDiscreteDashLength; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -131,39 +153,52 @@ namespace drawinglayer { namespace primitive2d { + /** PolyPolygonStrokePrimitive2D class + + This primitive defines a multi-PolygonStrokePrimitive2D and is + just for convenience. The definition is not different from the single + defined PolygonStrokePrimitive2Ds. + */ class PolyPolygonStrokePrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the line geometry basegfx::B2DPolyPolygon maPolyPolygon; + + /// the line attributes like width, join and color attribute::LineAttribute maLineAttribute; + + /// the line stroking (if used) attribute::StrokeAttribute maStrokeAttribute; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor PolyPolygonStrokePrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute); + /// constructor without stroking PolyPolygonStrokePrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::LineAttribute& rLineAttribute); - // get data + /// data read access basegfx::B2DPolyPolygon getB2DPolyPolygon() const { return maPolyPolygon; } const attribute::LineAttribute& getLineAttribute() const { return maLineAttribute; } const attribute::StrokeAttribute& getStrokeAttribute() const { return maStrokeAttribute; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -176,17 +211,25 @@ namespace drawinglayer { namespace primitive2d { + /** PolyPolygonStrokePrimitive2D class + + This primitive defines a multi-PolygonStrokeArrowPrimitive2D and is + just for convenience. The definition is not different from the single + defined PolygonStrokeArrowPrimitive2Ds. + */ class PolyPolygonStrokeArrowPrimitive2D : public PolyPolygonStrokePrimitive2D { private: + /// geometric definitions for line start and end attribute::LineStartEndAttribute maStart; attribute::LineStartEndAttribute maEnd; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor PolyPolygonStrokeArrowPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::LineAttribute& rLineAttribute, @@ -194,23 +237,24 @@ namespace drawinglayer const attribute::LineStartEndAttribute& rStart, const attribute::LineStartEndAttribute& rEnd); + /// constructor without stroking PolyPolygonStrokeArrowPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::LineAttribute& rLineAttribute, const attribute::LineStartEndAttribute& rStart, const attribute::LineStartEndAttribute& rEnd); - // get data + /// data read access const attribute::LineStartEndAttribute& getStart() const { return maStart; } const attribute::LineStartEndAttribute& getEnd() const { return maEnd; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -223,28 +267,38 @@ namespace drawinglayer { namespace primitive2d { + /** PolyPolygonColorPrimitive2D class + + This primitive defines a PolyPolygon filled with a single color. + This is one of the non-decomposable primitives, so a renderer + should proccess it. + */ class PolyPolygonColorPrimitive2D : public BasePrimitive2D { private: + /// the PolyPolygon geometry basegfx::B2DPolyPolygon maPolyPolygon; + + /// the polygon fill color basegfx::BColor maBColor; public: + /// constructor PolyPolygonColorPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor); - // get data + /// data read access const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; } const basegfx::BColor& getBColor() const { return maBColor; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -257,29 +311,39 @@ namespace drawinglayer { namespace primitive2d { + /** PolyPolygonColorPrimitive2D class + + This primitive defines a PolyPolygon filled with a gradient. The + decomosition will create a MaskPrimitive2D containing a + FillGradientPrimitive2D. + */ class PolyPolygonGradientPrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the PolyPolygon geometry basegfx::B2DPolyPolygon maPolyPolygon; + + /// the gradient definition attribute::FillGradientAttribute maFillGradient; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor PolyPolygonGradientPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::FillGradientAttribute& rFillGradient); - // get data + /// data read access const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; } const attribute::FillGradientAttribute& getFillGradient() const { return maFillGradient; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -292,32 +356,44 @@ namespace drawinglayer { namespace primitive2d { + /** PolyPolygonHatchPrimitive2D class + + This primitive defines a PolyPolygon filled with a hatch. The + decomosition will create a MaskPrimitive2D containing a + FillHatchPrimitive2D. + */ class PolyPolygonHatchPrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the PolyPolygon geometry basegfx::B2DPolyPolygon maPolyPolygon; + + /// the hatch definition attribute::FillHatchAttribute maFillHatch; + + /// the hatch background color (if used) basegfx::BColor maBackgroundColor; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor PolyPolygonHatchPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBackgroundColor, const attribute::FillHatchAttribute& rFillHatch); - // get data + /// data read access const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; } const basegfx::BColor& getBackgroundColor() const { return maBackgroundColor; } const attribute::FillHatchAttribute& getFillHatch() const { return maFillHatch; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -330,29 +406,39 @@ namespace drawinglayer { namespace primitive2d { + /** PolyPolygonBitmapPrimitive2D class + + This primitive defines a PolyPolygon filled with bitmap data + (including alpha). The decomosition will create a MaskPrimitive2D + containing a FillBitmapPrimitive2D. + */ class PolyPolygonBitmapPrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// the PolyPolygon geometry basegfx::B2DPolyPolygon maPolyPolygon; + + /// the bitmap fill definition (may include tiling) attribute::FillBitmapAttribute maFillBitmap; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor PolyPolygonBitmapPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, const attribute::FillBitmapAttribute& rFillBitmap); - // get data + /// data read access const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; } const attribute::FillBitmapAttribute& getFillBitmap() const { return maFillBitmap; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx index f7e9b1dcac0b..77d56ca8026f 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx @@ -39,68 +39,78 @@ #include ////////////////////////////////////////////////////////////////////////////// -// tooling class for BufferedDecompositionPrimitive2D baseed classes which are view-dependent -// regarding the size of a discrete unit. The implementation of get2DDecomposition -// guards the buffered local decomposition and ensures that a create2DDecomposition -// implementation may use an up-to-date DiscreteUnit accessible using getDiscreteUnit() namespace drawinglayer { namespace primitive2d { + /** DiscreteMetricDependentPrimitive2D class + + tooling class for BufferedDecompositionPrimitive2D baseed classes which are view-dependent + regarding the size of a discrete unit. The implementation of get2DDecomposition + guards the buffered local decomposition and ensures that a create2DDecomposition + implementation may use an up-to-date DiscreteUnit accessible using getDiscreteUnit() + */ class DiscreteMetricDependentPrimitive2D : public BufferedDecompositionPrimitive2D { private: - // the last used fDiscreteUnit definitions for decomposition. Since this - // is checked and updated from get2DDecomposition() it will be current and - // usable in create2DDecomposition() + /** the last used fDiscreteUnit definitions for decomposition. Since this + is checked and updated from get2DDecomposition() it will be current and + usable in create2DDecomposition() + */ double mfDiscreteUnit; public: + /// constructor DiscreteMetricDependentPrimitive2D() : BufferedDecompositionPrimitive2D(), mfDiscreteUnit(0.0) { } - // data access + /// data read access double getDiscreteUnit() const { return mfDiscreteUnit; } - // get local decomposition. Overloaded since this decomposition is view-dependent + /// get local decomposition. Overloaded since this decomposition is view-dependent virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; }; } // end of namespace primitive2d } // end of namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// -// tooling class for BufferedDecompositionPrimitive2D baseed classes which are view-dependent -// regarding the viewport. The implementation of get2DDecomposition -// guards the buffered local decomposition and ensures that a create2DDecomposition -// implementation may use an up-to-date Viewport accessible using getViewport() namespace drawinglayer { namespace primitive2d { + /** ViewportDependentPrimitive2D class + + tooling class for BufferedDecompositionPrimitive2D baseed classes which are view-dependent + regarding the viewport. The implementation of get2DDecomposition + guards the buffered local decomposition and ensures that a create2DDecomposition + implementation may use an up-to-date Viewport accessible using getViewport() + */ class ViewportDependentPrimitive2D : public BufferedDecompositionPrimitive2D { private: - // the last used Viewport definition for decomposition. Since this - // is checked and updated from get2DDecomposition() it will be current and - // usable in create2DDecomposition() + /** the last used Viewport definition for decomposition. Since this + is checked and updated from get2DDecomposition() it will be current and + usable in create2DDecomposition() + */ basegfx::B2DRange maViewport; public: + /// constructor ViewportDependentPrimitive2D() : BufferedDecompositionPrimitive2D(), maViewport() { } - // data access + /// data read access const basegfx::B2DRange& getViewport() const { return maViewport; } - // get local decomposition. Overloaded since this decomposition is view-dependent + /// get local decomposition. Overloaded since this decomposition is view-dependent virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx index a86e32adca26..65d2bdf67f92 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx @@ -49,33 +49,60 @@ namespace drawinglayer { namespace primitive2d { + /** ScenePrimitive2D class + + This primitive defines a 3D scene as a 2D primitive and is the anchor point + for a 3D visualisation. The decomposition is view-dependent and will try to + re-use already rendered 3D content. + + The rendering is done using the default-3D renderer from basegfx which supports + AntiAliasing. + + The 2D primitive's geometric range is defined completely by the + ObjectTransformation combined with evtl. 2D shadows from the 3D objects. The + shadows of 3D objects are 2D polygons, projected with the 3D transformation. + + This is the class a renderer may process directly when he wants to implement + an own (e.g. system-specific) 3D renderer. + */ class ScenePrimitive2D : public BufferedDecompositionPrimitive2D { private: - primitive3d::Primitive3DSequence mxChildren3D; // the 3d sub-primitives - attribute::SdrSceneAttribute maSdrSceneAttribute; // 3d scene attribute set - attribute::SdrLightingAttribute maSdrLightingAttribute; // lighting attribute set - basegfx::B2DHomMatrix maObjectTransformation; // object transformation for scene for 2d definition - geometry::ViewInformation3D maViewInformation3D; // scene transformation set and object transformation + /// the 3D geometry definition + primitive3d::Primitive3DSequence mxChildren3D; + + /// 3D scene attribute set + attribute::SdrSceneAttribute maSdrSceneAttribute; + + /// lighting attribute set + attribute::SdrLightingAttribute maSdrLightingAttribute; + + /// object transformation for scene for 2D definition + basegfx::B2DHomMatrix maObjectTransformation; + + /// scene transformation set and object transformation + geometry::ViewInformation3D maViewInformation3D; - // the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked) + /// the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked) Primitive2DSequence maShadowPrimitives; - // bitfield - // flag if given 3D geometry is already cheched for shadow definitions and 2d shadows - // are created in maShadowPrimitives + /// bitfield + /** flag if given 3D geometry is already cheched for shadow definitions and 2d shadows + are created in maShadowPrimitives + */ unsigned mbShadow3DChecked : 1; - // the last used NewDiscreteSize and NewUnitVisiblePart definitions for decomposition + /// the last used NewDiscreteSize and NewUnitVisiblePart definitions for decomposition double mfOldDiscreteSizeX; double mfOldDiscreteSizeY; basegfx::B2DRange maOldUnitVisiblePart; - // the last created BitmapEx, e.g. for fast HitTest. This does not really need - // memory since BitmapEx is internally RefCounted + /** the last created BitmapEx, e.g. for fast HitTest. This does not really need + memory since BitmapEx is internally RefCounted + */ BitmapEx maOldRenderedBitmap; - // private helpers + /// private helpers bool impGetShadow3D(const geometry::ViewInformation2D& rViewInformation) const; void calculateDiscreteSizes( const geometry::ViewInformation2D& rViewInformation, @@ -84,28 +111,30 @@ namespace drawinglayer basegfx::B2DRange& rUnitVisibleRange) const; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: - // public helpers - // Geometry extractor. Shadow will be added as in create2DDecomposition, but - // the 3D content is not converted to a bitmap visualisation but to projected 2D gemetry. This - // helper is useful e.g. for Contour extraction or HitTests. + /// public helpers + /** Geometry extractor. Shadow will be added as in create2DDecomposition, but + the 3D content is not converted to a bitmap visualisation but to projected 2D gemetry. This + helper is useful e.g. for Contour extraction or HitTests. + */ Primitive2DSequence getGeometry2D() const; Primitive2DSequence getShadow2D(const geometry::ViewInformation2D& rViewInformation) const; - // Fast HitTest which uses the last buffered BitmapEx from the last - // rendered area if available. The return value describes if the check - // could be done with the current information, so do NOT use o_rResult - // when it returns false. o_rResult will be changed on return true and - // then contains a definitive answer if content of this scene is hit or - // not. On return false, it is normally necessary to use the geometric - // HitTest (see CutFindProcessor usages). The given HitPoint - // has to be in logic coordinates in scene's ObjectCoordinateSystem. + /** Fast HitTest which uses the last buffered BitmapEx from the last + rendered area if available. The return value describes if the check + could be done with the current information, so do NOT use o_rResult + when it returns false. o_rResult will be changed on return true and + then contains a definitive answer if content of this scene is hit or + not. On return false, it is normally necessary to use the geometric + HitTest (see CutFindProcessor usages). The given HitPoint + has to be in logic coordinates in scene's ObjectCoordinateSystem. + */ bool tryToCheckLastVisualisationDirectHit(const basegfx::B2DPoint& rLogicHitPoint, bool& o_rResult) const; - // constructor/destructor + /// constructor ScenePrimitive2D( const primitive3d::Primitive3DSequence& rxChildren3D, const attribute::SdrSceneAttribute& rSdrSceneAttribute, @@ -113,23 +142,23 @@ namespace drawinglayer const basegfx::B2DHomMatrix& rObjectTransformation, const geometry::ViewInformation3D& rViewInformation3D); - // get data + /// data ead access const primitive3d::Primitive3DSequence& getChildren3D() const { return mxChildren3D; } const attribute::SdrSceneAttribute& getSdrSceneAttribute() const { return maSdrSceneAttribute; } const attribute::SdrLightingAttribute& getSdrLightingAttribute() const { return maSdrLightingAttribute; } const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; } const geometry::ViewInformation3D& getViewInformation3D() const { return maViewInformation3D; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() - // get local decomposition. Overloaded since this decomposition is view-dependent + /// get local decomposition. Overloaded since this decomposition is view-dependent virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx index 3da621f5f174..0e3f7258441a 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx @@ -46,32 +46,50 @@ namespace drawinglayer { namespace primitive2d { + /** ShadowPrimitive2D class + + This primitive defines a generic shadow geometry construction + for 2D objects. It decomposes to a TransformPrimitive2D embedded + into a ModifiedColorPrimitive2D. + + It's for primtive usage convenience, so that not everyone has + to implement the generic shadow construction by himself. + + The same geometry as sequence of primitives is used as geometry and + as shadow. Since these are RefCounted Uno-Api objects, no extra objects + are needed for the shadow itself; all the local decompositions of the + original geometry can be reused from the renderer for shadow visualisation. + */ class ShadowPrimitive2D : public GroupPrimitive2D { private: + /// the shadow transformation, normally just an offset basegfx::B2DHomMatrix maShadowTransform; + + /// the shadow color to which all geometry is to be forced basegfx::BColor maShadowColor; public: + /// constructor ShadowPrimitive2D( const basegfx::B2DHomMatrix& rShadowTransform, const basegfx::BColor& rShadowColor, const Primitive2DSequence& rChildren); - // get data + /// data read access const basegfx::B2DHomMatrix& getShadowTransform() const { return maShadowTransform; } const basegfx::BColor& getShadowColor() const { return maShadowColor; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // create decomposition + /// create decomposition virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/structuretagprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/structuretagprimitive2d.hxx index 9ccb91e7bebd..c86e4c91bb86 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/structuretagprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/structuretagprimitive2d.hxx @@ -45,30 +45,34 @@ namespace drawinglayer { namespace primitive2d { - // This class is used to provode simple support for adding grouped - // pdf writer structured element information like used in sd from - // unomodel.cxx where a ViewObjectContactRedirector is used to add - // such information for diverse objects. - // This primitive encapsulates these and the VCLPdfRenderer uses it - // to apply the needed infos directly to the pdf export in a compatible - // way. - // If a renderer ignores this, it just decomposes to it's child - // content. + /** StructureTagPrimitive2D class + + This class is used to provode simple support for adding grouped + pdf writer structured element information like used in sd from + unomodel.cxx where a ViewObjectContactRedirector is used to add + such information for diverse objects. + This primitive encapsulates these and the VCLPdfRenderer uses it + to apply the needed infos directly to the pdf export in a compatible + way. + If a renderer ignores this, it just decomposes to it's child + content. + */ class StructureTagPrimitive2D : public GroupPrimitive2D { private: - // the PDF structure element this grouping represents + /// the PDF structure element this grouping represents vcl::PDFWriter::StructElement maStructureElement; public: + /// constructor StructureTagPrimitive2D( const vcl::PDFWriter::StructElement& rStructureElement, const Primitive2DSequence& rChildren); - // data access + /// data read access const vcl::PDFWriter::StructElement& getStructureElement() const { return maStructureElement; } - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx index fb72500fcb38..4f33c8a7d48b 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx @@ -55,7 +55,10 @@ namespace drawinglayer { namespace primitive2d { - // This is used for both underline and overline + /** FontUnderline definition + + This is used for both underline and overline + */ enum FontUnderline { FONT_UNDERLINE_NONE, @@ -78,6 +81,7 @@ namespace drawinglayer FONT_UNDERLINE_BOLDWAVE }; + /** FontStrikeout definition */ enum FontStrikeout { FONT_STRIKEOUT_NONE, @@ -88,6 +92,7 @@ namespace drawinglayer FONT_STRIKEOUT_X }; + /** FontEmphasisMark definition */ enum FontEmphasisMark { FONT_EMPHASISMARK_NONE, @@ -97,6 +102,7 @@ namespace drawinglayer FONT_EMPHASISMARK_ACCENT }; + /** FontRelief definition */ enum FontRelief { FONT_RELIEF_NONE, @@ -104,9 +110,17 @@ namespace drawinglayer FONT_RELIEF_ENGRAVED }; + /** TextDecoratedPortionPrimitive2D class + + This primitive expands the TextSimplePortionPrimitive2D by common + decorations used in the office. It can be decomposed and will create + a TextSimplePortionPrimitive2D and all the contained decorations (if used) + as geometry. + */ class TextDecoratedPortionPrimitive2D : public TextSimplePortionPrimitive2D { private: + /// decoration definitions basegfx::BColor maOverlineColor; basegfx::BColor maTextlineColor; FontUnderline meFontOverline; @@ -115,14 +129,14 @@ namespace drawinglayer FontEmphasisMark meFontEmphasisMark; FontRelief meFontRelief; - // bitfield + /// bitfield unsigned mbUnderlineAbove : 1; unsigned mbWordLineMode : 1; unsigned mbEmphasisMarkAbove : 1; unsigned mbEmphasisMarkBelow : 1; unsigned mbShadow : 1; - // helper methods + /// helper methods void impCreateTextLine( std::vector< Primitive2DReference >& rTarget, basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans, @@ -150,13 +164,14 @@ namespace drawinglayer basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans) const; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor TextDecoratedPortionPrimitive2D( - // TextSimplePortionPrimitive2D parameters + /// TextSimplePortionPrimitive2D parameters const basegfx::B2DHomMatrix& rNewTransform, const String& rText, xub_StrLen aTextPosition, @@ -166,7 +181,7 @@ namespace drawinglayer const ::com::sun::star::lang::Locale& rLocale, const basegfx::BColor& rFontColor, - // local parameters + /// local parameters const basegfx::BColor& rOverlineColor, const basegfx::BColor& rTextlineColor, FontUnderline eFontOverline = FONT_UNDERLINE_NONE, @@ -180,7 +195,7 @@ namespace drawinglayer FontRelief eFontRelief = FONT_RELIEF_NONE, bool bShadow = false); - // get data + /// data read access FontUnderline getFontOverline() const { return meFontOverline; } FontUnderline getFontUnderline() const { return meFontUnderline; } FontStrikeout getFontStrikeout() const { return meFontStrikeout; } @@ -188,20 +203,19 @@ namespace drawinglayer FontRelief getFontRelief() const { return meFontRelief; } basegfx::BColor getOverlineColor() const { return maOverlineColor; } basegfx::BColor getTextlineColor() const { return maTextlineColor; } - bool getUnderlineAbove() const { return mbUnderlineAbove; } bool getWordLineMode() const { return mbWordLineMode; } bool getEmphasisMarkAbove() const { return mbEmphasisMarkAbove; } bool getEmphasisMarkBelow() const { return mbEmphasisMarkBelow; } bool getShadow() const { return mbShadow; } - // compare operator + /// compare operator virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx index 19f910f3444d..77b64d16ea24 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx @@ -45,6 +45,7 @@ namespace drawinglayer { namespace primitive2d { + /** TextEffectStyle2D definition */ enum TextEffectStyle2D { TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED_DEFAULT, @@ -54,50 +55,59 @@ namespace drawinglayer TEXTEFFECTSTYLE2D_OUTLINE }; + /** TextEffectPrimitive2D class + + This primitive embeds text primitives (normally, as can be seen can + also be used for any other primitives) which have some TextEffect applied + and create the needed geometry and embedding on decomposition. + */ class TextEffectPrimitive2D : public BufferedDecompositionPrimitive2D { private: - // the text content + /// the text (or other) content Primitive2DSequence maTextContent; - // the style to apply, the direction and the rotation center + /// the style to apply, the direction and the rotation center const basegfx::B2DPoint maRotationCenter; double mfDirection; TextEffectStyle2D meTextEffectStyle2D; - // the last used object to view transformtion used from getDecomposition - // for decide buffering + /** the last used object to view transformtion used from getDecomposition + for decide buffering + */ basegfx::B2DHomMatrix maLastObjectToViewTransformation; protected: - // create local decomposition + /// create local decomposition virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// construcor TextEffectPrimitive2D( const Primitive2DSequence& rTextContent, const basegfx::B2DPoint& rRotationCenter, double fDirection, TextEffectStyle2D eTextEffectStyle2D); - // get data + /// data read access const Primitive2DSequence& getTextContent() const { return maTextContent; } const basegfx::B2DPoint& getRotationCenter() const { return maRotationCenter; } double getDirection() const { return mfDirection; } TextEffectStyle2D getTextEffectStyle2D() const { return meTextEffectStyle2D; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // own get range implementation to solve more effective. Content is by definition displaced - // by a fixed discrete unit, thus the contained geometry needs only once be asked for it's - // own basegfx::B2DRange + /** own get range implementation to solve more effective. Content is by definition displaced + by a fixed discrete unit, thus the contained geometry needs only once be asked for it's + own basegfx::B2DRange + */ virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() - // Overload standard getDecomposition call to be view-dependent here + /// Overload standard getDecomposition call to be view-dependent here virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx index 1160704c0fa3..3f9c02b6e9bd 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx @@ -45,17 +45,23 @@ namespace drawinglayer { namespace primitive2d { - // text format hierarchy helper class. It decomposes to it's - // content, so all direct renderers may ignore it. If You need - // to know more about line hierarchies You may react on it and - // also need to take care that the source of data uses it. + /** TextHierarchyLinePrimitive2D class + + Text format hierarchy helper class. It decomposes to it's + content, so all direct renderers may ignore it. If You need + to know more about line hierarchies You may react on it and + also need to take care that the source of data uses it. + + This primitive encapsulates text lines. + */ class TextHierarchyLinePrimitive2D : public GroupPrimitive2D { private: public: + /// constructor TextHierarchyLinePrimitive2D(const Primitive2DSequence& rChildren); - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -67,14 +73,18 @@ namespace drawinglayer { namespace primitive2d { - // see TextHierarchyLinePrimitive2D comment + /** TextHierarchyBulletPrimitive2D class + + This primitive encapsulates text bullets. + */ class TextHierarchyBulletPrimitive2D : public GroupPrimitive2D { private: public: + /// constructor TextHierarchyBulletPrimitive2D(const Primitive2DSequence& rChildren); - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -86,14 +96,18 @@ namespace drawinglayer { namespace primitive2d { - // see TextHierarchyLinePrimitive2D comment + /** TextHierarchyParagraphPrimitive2D class + + This primitive encapsulates text paragraphs. + */ class TextHierarchyParagraphPrimitive2D : public GroupPrimitive2D { private: public: + /// constructor TextHierarchyParagraphPrimitive2D(const Primitive2DSequence& rChildren); - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -105,14 +119,18 @@ namespace drawinglayer { namespace primitive2d { - // see TextHierarchyLinePrimitive2D comment + /** TextHierarchyBlockPrimitive2D class + + This primitive encapsulates text blocks. + */ class TextHierarchyBlockPrimitive2D : public GroupPrimitive2D { private: public: + /// constructor TextHierarchyBlockPrimitive2D(const Primitive2DSequence& rChildren); - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -124,19 +142,28 @@ namespace drawinglayer { namespace primitive2d { - // type enum + /** FieldType definition */ enum FieldType { - FIELD_TYPE_COMMON, // unspecified. If more info is needed for a FieldType, - // create a new type and it's handling - FIELD_TYPE_PAGE, // uses "FIELD_SEQ_BEGIN;PageField" -> special handling - FIELD_TYPE_URL // uses URL as string -> special handling + /** unspecified. If more info is needed for a FieldType, + create a new type and it's handling + */ + FIELD_TYPE_COMMON, + + /** uses "FIELD_SEQ_BEGIN;PageField" -> special handling */ + FIELD_TYPE_PAGE, + + /** uses URL as string -> special handling */ + FIELD_TYPE_URL }; - // see TextHierarchyLinePrimitive2D comment. - // Also: This type uses a type enum to transport the encapsulated field - // type. Also added is a String which is type-dependent. E.g. for URL - // fields, it contains the URL. + /** TextHierarchyFieldPrimitive2D class + + This primitive encapsulates text fields. + Also: This type uses a type enum to transport the encapsulated field + type. Also added is a String which is type-dependent. E.g. for URL + fields, it contains the URL. + */ class TextHierarchyFieldPrimitive2D : public GroupPrimitive2D { private: @@ -144,19 +171,20 @@ namespace drawinglayer rtl::OUString maString; public: + /// constructor TextHierarchyFieldPrimitive2D( const Primitive2DSequence& rChildren, const FieldType& rFieldType, const rtl::OUString& rString); - // get data + /// data read access FieldType getType() const { return meType; } const rtl::OUString& getString() const { return maString; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d @@ -168,20 +196,24 @@ namespace drawinglayer { namespace primitive2d { - // #i97628# - // Primitive to encapsulate text from an active text edit; some - // renderers need to suppress this output due to painting the - // edited text in e.g. an OutlinerEditView. It's derived from - // GroupPrimitive2D, so the implicit decomposition will use the - // content. To suppress, this primitive needs to be parsed by - // the renderer without taking any action + /** TextHierarchyEditPrimitive2D class + + #i97628# + Primitive to encapsulate text from an active text edit; some + renderers need to suppress this output due to painting the + edited text in e.g. an OutlinerEditView. It's derived from + GroupPrimitive2D, so the implicit decomposition will use the + content. To suppress, this primitive needs to be parsed by + the renderer without taking any action. + */ class TextHierarchyEditPrimitive2D : public GroupPrimitive2D { private: public: + /// constructor TextHierarchyEditPrimitive2D(const Primitive2DSequence& rChildren); - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx index df09718a7582..e0e2b6bbc4cb 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx @@ -66,15 +66,24 @@ namespace drawinglayer { namespace primitive2d { + /** TextLayouterDevice class + + This helper class exists to isolate all accesses to VCL + text formatting/handling functionality for primitive implementations. + When in the future FontHandling may move to an own library independent + from VCL, primitives will be prepared. + */ class TextLayouterDevice { - // internally used VirtualDevice + /// internally used VirtualDevice VirtualDevice& mrDevice; public: + /// constructor/destructor TextLayouterDevice(); ~TextLayouterDevice(); + /// tooling methods void setFont(const Font& rFont); void setFontAttributes( const FontAttributes& rFontAttributes, @@ -116,11 +125,12 @@ namespace drawinglayer { namespace primitive2d { - // Create a VCL-Font based on the definitions in FontAttributes - // and the given FontScaling. The FontScaling defines the FontHeight - // (fFontScaleY) and the FontWidth (fFontScaleX). The combination of - // both defines FontStretching, where no stretching happens at - // fFontScaleY == fFontScaleX + /** Create a VCL-Font based on the definitions in FontAttributes + and the given FontScaling. The FontScaling defines the FontHeight + (fFontScaleY) and the FontWidth (fFontScaleX). The combination of + both defines FontStretching, where no stretching happens at + fFontScaleY == fFontScaleX + */ Font getVclFontFromFontAttributes( const FontAttributes& rFontAttributes, double fFontScaleX, @@ -128,10 +138,11 @@ namespace drawinglayer double fFontRotation, const ::com::sun::star::lang::Locale & rLocale); - // Generate FontAttributes DataSet derived from the given VCL-Font. - // The FontScaling with fFontScaleY, fFontScaleX relationship (see - // above) will be set in return parameter o_rSize to allow further - // processing + /** Generate FontAttributes DataSet derived from the given VCL-Font. + The FontScaling with fFontScaleY, fFontScaleX relationship (see + above) will be set in return parameter o_rSize to allow further + processing + */ FontAttributes getFontAttributesFromVclFont( basegfx::B2DVector& o_rSize, const Font& rFont, diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx index 25b11d7cbf29..43e06ecc3b53 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx @@ -60,15 +60,20 @@ namespace drawinglayer { namespace primitive2d { + /** FontAttributes class + + This attribute class is able to hold all parameters needed/used + to completely define the parametrisation of a text portion. + */ class FontAttributes { private: - // core data + /// core data String maFamilyName; // Font Family Name String maStyleName; // Font Style Name sal_uInt16 mnWeight; // Font weight - // bitfield + /// bitfield unsigned mbSymbol : 1; // Symbol Font Flag unsigned mbVertical : 1; // Vertical Text Flag unsigned mbItalic : 1; // Italic Flag @@ -78,6 +83,7 @@ namespace drawinglayer // TODO: pair kerning and CJK kerning public: + /// constructor FontAttributes( const String& rFamilyName, const String& rStyleName, @@ -100,10 +106,10 @@ namespace drawinglayer { } - // compare operator + /// compare operator bool operator==(const FontAttributes& rCompare) const; - // data access + /// data read access const String& getFamilyName() const { return maFamilyName; } const String& getStyleName() const { return maStyleName; } sal_uInt16 getWeight() const { return mnWeight; } @@ -123,26 +129,52 @@ namespace drawinglayer { namespace primitive2d { + /** TextSimplePortionPrimitive2D class + + This is the basic primitive for representing a text portion. It contains + all needed information. If it is not handled by a renderer, it's decomposition + will provide the text PolyPolygon outlines as filled polygons, correctly + transformed. + + To get better text quality, it is suggested to handle tis primitive directly + in a renderer. In that case, e.g. hintings on the system can be supported. + */ class TextSimplePortionPrimitive2D : public BufferedDecompositionPrimitive2D { private: - basegfx::B2DHomMatrix maTextTransform; // text range transformation from unit range ([0.0 .. 1.0]) to text range - String maText; // the text, used from maTextPosition up to maTextPosition + maTextLength - xub_StrLen maTextPosition; // the index from where on maText is used - xub_StrLen maTextLength; // the length for maText usage, starting from maTextPosition - ::std::vector< double > maDXArray; // the DX array scale-independent in unit coordinates - FontAttributes maFontAttributes; // the font to use - ::com::sun::star::lang::Locale maLocale; // the Locale for the text - basegfx::BColor maFontColor; // font color - - // #i96669# add simple range buffering for this primitive + /// text range transformation from unit range ([0.0 .. 1.0]) to text range + basegfx::B2DHomMatrix maTextTransform; + + /// The text, used from maTextPosition up to maTextPosition + maTextLength + String maText; + + /// The index from where on maText is used + xub_StrLen maTextPosition; + + /// The length for maText usage, starting from maTextPosition + xub_StrLen maTextLength; + + /// The DX array scale-independent in unit coordinates + ::std::vector< double > maDXArray; + + /// The font to use + FontAttributes maFontAttributes; + + /// The Locale for the text + ::com::sun::star::lang::Locale maLocale; + + /// font color + basegfx::BColor maFontColor; + + /// #i96669# add simple range buffering for this primitive basegfx::B2DRange maB2DRange; protected: - // local decomposition. + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor TextSimplePortionPrimitive2D( const basegfx::B2DHomMatrix& rNewTransform, const String& rText, @@ -153,12 +185,13 @@ namespace drawinglayer const ::com::sun::star::lang::Locale& rLocale, const basegfx::BColor& rFontColor); - // helpers - // get text outlines as polygons and their according ObjectTransformation. Handles all - // the necessary VCL outline extractins, scaling adaptions and other stuff. + /// helpers + /** get text outlines as polygons and their according ObjectTransformation. Handles all + the necessary VCL outline extractins, scaling adaptions and other stuff. + */ void getTextOutlinesAndTransformation(basegfx::B2DPolyPolygonVector& rTarget, basegfx::B2DHomMatrix& rTransformation) const; - // get data + /// data read access const basegfx::B2DHomMatrix& getTextTransform() const { return maTextTransform; } const String& getText() const { return maText; } xub_StrLen getTextPosition() const { return maTextPosition; } @@ -168,13 +201,13 @@ namespace drawinglayer const ::com::sun::star::lang::Locale& getLocale() const { return maLocale; } const basegfx::BColor& getFontColor() const { return maFontColor; } - // compare operator + /// compare operator virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/transformprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/transformprimitive2d.hxx index 1646667342af..1723cc708ea8 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/transformprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/transformprimitive2d.hxx @@ -45,26 +45,47 @@ namespace drawinglayer { namespace primitive2d { + /** TransformPrimitive2D class + + This is one of the basic grouping primitives and it provides + embedding a sequence of primitives (a geometry) into a + transformation. All renderers have to handle this, usually by + building a current transformation stack (linear combination) + and applying this to all to-be-rendered geometry. If not handling + this, the output will be mostly wrong since this primitive is + widely used. + + It does transform by embedding an existing geometry into a + transformation as Child-content. This allows re-usage of the + refcounted Uno-Api primitives and their existung, buffered + decompositions. + + It could e.g. be used to show a single object geometry in 1000 + different, transformed states without the need to create those + thousand primitive contents. + */ class TransformPrimitive2D : public GroupPrimitive2D { private: + // the transformation to apply to the child geometry basegfx::B2DHomMatrix maTransformation; public: + /// constructor TransformPrimitive2D( const basegfx::B2DHomMatrix& rTransformation, const Primitive2DSequence& rChildren); - // get data + /// data read access const basegfx::B2DHomMatrix& getTransformation() const { return maTransformation; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // get range + /// get range virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx index d7ca69129e02..6e8970e7bee5 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx @@ -44,26 +44,37 @@ namespace drawinglayer { namespace primitive2d { + /** UnifiedAlphaPrimitive2D class + + This primitive encapsualtes a child hierarchy and defines + that it shall be visualized with the given transparency. That + transparency is unique for all contained geometry, so that + e.g. overlapping polygons in the child geometry will not show + regions of combined transparency, but be all rendered with the + defined, single transparency. + */ class UnifiedAlphaPrimitive2D : public GroupPrimitive2D { private: - double mfAlpha; // unified transparence + /// the unified alpha transparence + double mfAlpha; public: + /// constructor UnifiedAlphaPrimitive2D( const Primitive2DSequence& rChildren, double fAlpha); - // get data + /// data read access double getAlpha() const { return mfAlpha; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // create decomposition + /// create decomposition virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx index 6bf84a401891..3ceae01ed3b2 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx @@ -47,35 +47,53 @@ namespace drawinglayer { namespace primitive2d { + /** WrongSpellPrimitive2D class + + This is a helper primitive to hold evtl. WrongSpell visualisations + in the sequence of primitives. The primitive holds this information + separated form the TextPortions to where it belongs to tot expand the + TextSimplePortionPrimitive2D more as needed. + + A renderer who does not want to visualize this (if contained at all) + can detect and ignore this primitive. If it's decomposition is used, + it will be visualized as red wavelines. + + The geometric definition defines a line on the X-Axis (no Y-coordinates) + which will when transformed by Transformation, create the coordinate data. + */ class WrongSpellPrimitive2D : public BufferedDecompositionPrimitive2D { private: + /// geometry definition basegfx::B2DHomMatrix maTransformation; double mfStart; double mfStop; + + /// color (usually red) basegfx::BColor maColor; protected: - // create local decomposition + /// create local decomposition virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: + /// constructor WrongSpellPrimitive2D( const basegfx::B2DHomMatrix& rTransformation, double fStart, double fStop, const basegfx::BColor& rColor); - // get data + /// data read access const basegfx::B2DHomMatrix& getTransformation() const { return maTransformation; } double getStart() const { return mfStart; } double getStop() const { return mfStop; } const basegfx::BColor& getColor() const { return maColor; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive2DIDBlock() }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx index 73d28c82ebda..9bf56edb2c53 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx @@ -76,7 +76,9 @@ namespace drawinglayer { namespace primitive3d { - /** Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D + /** BasePrimitive3D class + + Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D The description/functionality is identical with the 2D case in baseprimitive2d.hxx, please see there for detailed information. @@ -85,6 +87,8 @@ namespace drawinglayer - PolygonHairlinePrimitive3D (for 3D hairlines) - PolyPolygonMaterialPrimitive3D (for 3D filled plane polygons) + + That's all for 3D! */ class BasePrimitive3D : private boost::noncopyable, @@ -144,7 +148,9 @@ namespace drawinglayer { namespace primitive3d { - /** Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D + /** BufferedDecompositionPrimitive3D class + + Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D The description/functionality is identical with the 2D case in baseprimitive2d.hxx, please see there for detailed information @@ -191,23 +197,24 @@ namespace drawinglayer { namespace primitive3d { - // get B3DRange from a given Primitive3DReference + /// get B3DRange from a given Primitive3DReference basegfx::B3DRange getB3DRangeFromPrimitive3DReference(const Primitive3DReference& rCandidate, const geometry::ViewInformation3D& aViewInformation); - // get range3D from a given Primitive3DSequence + /// get range3D from a given Primitive3DSequence basegfx::B3DRange getB3DRangeFromPrimitive3DSequence(const Primitive3DSequence& rCandidate, const geometry::ViewInformation3D& aViewInformation); - // compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D) - // and using compare operator + /** compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D) + and using compare operator + */ bool arePrimitive3DReferencesEqual(const Primitive3DReference& rA, const Primitive3DReference& rB); - // compare two Primitive3DReferences for equality, uses arePrimitive3DReferencesEqual internally + /// compare two Primitive3DReferences for equality, uses arePrimitive3DReferencesEqual internally bool arePrimitive3DSequencesEqual(const Primitive3DSequence& rA, const Primitive3DSequence& rB); - // concatenate sequence + /// concatenate sequence void appendPrimitive3DSequenceToPrimitive3DSequence(Primitive3DSequence& rDest, const Primitive3DSequence& rSource); - // concatenate single Primitive3D + /// concatenate single Primitive3D void appendPrimitive3DReferenceToPrimitive3DSequence(Primitive3DSequence& rDest, const Primitive3DReference& rSource); } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx index 6912ff25b04d..69e406c75d67 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx @@ -44,7 +44,9 @@ namespace drawinglayer { namespace primitive3d { - /** Baseclass for all grouping 3D primitives + /** GroupPrimitive3D class + + Baseclass for all grouping 3D primitives The description/functionality is identical with the 2D case in groupprimitive2d.hxx, please see there for detailed information. @@ -64,23 +66,23 @@ namespace drawinglayer class GroupPrimitive3D : public BasePrimitive3D { private: - // the children. Declared private since this shall never be changed at all after construction + /// the children. Declared private since this shall never be changed at all after construction Primitive3DSequence maChildren; public: - // constructor + /// constructor GroupPrimitive3D(const Primitive3DSequence& rChildren); - // data access + /// data read access Primitive3DSequence getChildren() const { return maChildren; } - // compare operator + /// compare operator virtual bool operator==( const BasePrimitive3D& rPrimitive ) const; - // local decomposition. Implementation will just return children + /// local decomposition. Implementation will just return children virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx index 2e1d7e0b5fe4..2675a1284779 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx @@ -44,7 +44,9 @@ namespace drawinglayer { namespace primitive3d { - /** HatchTexturePrimitive3D is derived from GroupPrimitive3D, but implements + /** HatchTexturePrimitive3D class + + HatchTexturePrimitive3D is derived from GroupPrimitive3D, but implements a decomposition which is complicated enough for buffering. Since the group primitive has no default buffering, it is necessary here to add a local buffering mechanism for the decomposition @@ -52,7 +54,10 @@ namespace drawinglayer class HatchTexturePrimitive3D : public TexturePrimitive3D { private: + /// the hatch definition attribute::FillHatchAttribute maHatch; + + /// the buffered decomposed hatch Primitive3DSequence maBuffered3DDecomposition; protected: @@ -64,6 +69,7 @@ namespace drawinglayer void setBuffered3DDecomposition(const Primitive3DSequence& rNew) { maBuffered3DDecomposition = rNew; } public: + /// constructor HatchTexturePrimitive3D( const attribute::FillHatchAttribute& rHatch, const Primitive3DSequence& rChildren, @@ -71,16 +77,16 @@ namespace drawinglayer bool bModulate, bool bFilter); - // get data + /// data read access const attribute::FillHatchAttribute& getHatch() const { return maHatch; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // local decomposition. + /// local decomposition. virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx index 0c5082699e8d..4779241033b0 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx @@ -44,31 +44,37 @@ namespace drawinglayer { namespace primitive3d { - // This primitive is used to represent geometry for non-visible objects, - // e.g. a 3D cube without fill attributes. To still be able to use - // primitives for HitTest functionality, the 3d decompositions produce - // an as much as possible simplified fill geometry encapsulated in this - // primtive when there is no fill geometry. Currently, the 3d hit test - // uses only areas, so maybe in a further enchanced version this will change - // to 'if neither filled nor lines' creation criteria. The whole primitive - // decomposes to nothing, so no one not knowing it will be influenced. Only - // helper processors for hit test (and maybe BoundRect extractors) will - // use it and it's children subcontent. + /** HitTestPrimitive3D class + + This primitive is used to represent geometry for non-visible objects, + e.g. a 3D cube without fill attributes. To still be able to use + primitives for HitTest functionality, the 3d decompositions produce + an as much as possible simplified fill geometry encapsulated in this + primtive when there is no fill geometry. Currently, the 3d hit test + uses only areas, so maybe in a further enchanced version this will change + to 'if neither filled nor lines' creation criteria. The whole primitive + decomposes to nothing, so no one not knowing it will be influenced. Only + helper processors for hit test (and maybe BoundRect extractors) will + use it and it's children subcontent. + */ class HitTestPrimitive3D : public GroupPrimitive3D { public: + /// constructor HitTestPrimitive3D(const Primitive3DSequence& rChildren); - // despite returning an empty decomposition since it's no visualisation data, - // range calculation is intended to use invisible replacement geometry, so - // the local implementation will return the children's range + /** despite returning an empty decomposition since it's no visualisation data, + range calculation is intended to use invisible replacement geometry, so + the local implementation will return the children's range + */ virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const; - // local decomposition. Implementation will return empty Primitive3DSequence - // since this is no visualisation data + /** local decomposition. Implementation will return empty Primitive3DSequence + since this is no visualisation data + */ virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx index 0771e8117fc5..3840bf71a397 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx @@ -45,23 +45,32 @@ namespace drawinglayer { namespace primitive3d { + /** ModifiedColorPrimitive3D class + + This primitive is a grouping primitive and allows to define + how the colors of it's child content shall be modified for + visualisation. Please see the ModifiedColorPrimitive2D + description for more info. + */ class ModifiedColorPrimitive3D : public GroupPrimitive3D { private: + /// The ColorModifier to use basegfx::BColorModifier maColorModifier; public: + /// constructor ModifiedColorPrimitive3D( const Primitive3DSequence& rChildren, const basegfx::BColorModifier& rColorModifier); - // get data + /// data read access const basegfx::BColorModifier& getColorModifier() const { return maColorModifier; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx index 9b97f60d3642..c73850e4f794 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx @@ -48,28 +48,40 @@ namespace drawinglayer { namespace primitive3d { + /** PolygonHairlinePrimitive3D class + + This primitive defines a Hairline in 3D. Since hairlines are view-dependent, + this primitive is view-dependent, too. + + This is one of the non-decomposable 3D primitives, so a renderer + should proccess it. + */ class PolygonHairlinePrimitive3D : public BasePrimitive3D { private: + /// the hairline geometry basegfx::B3DPolygon maPolygon; + + /// the hairline color basegfx::BColor maBColor; public: + /// constructor PolygonHairlinePrimitive3D( const basegfx::B3DPolygon& rPolygon, const basegfx::BColor& rBColor); - // get data + /// data read access const basegfx::B3DPolygon& getB3DPolygon() const { return maPolygon; } const basegfx::BColor& getBColor() const { return maBColor; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // get range + /// get range virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d @@ -81,36 +93,49 @@ namespace drawinglayer { namespace primitive3d { + /** PolygonStrokePrimitive3D class + + This primitive defines a 3D line with line width, line join, line color + and stroke attributes. It will be decomposed dependent on the definition + to the needed primitives, e.g. filled Tubes for fat lines. + */ class PolygonStrokePrimitive3D : public BufferedDecompositionPrimitive3D { private: + /// the line geometry basegfx::B3DPolygon maPolygon; + + /// the line attributes like width, join and color attribute::LineAttribute maLineAttribute; + + /// the line stroking (if used) attribute::StrokeAttribute maStrokeAttribute; protected: - // local decomposition. + /// local decomposition. virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: + /// constructor PolygonStrokePrimitive3D( const basegfx::B3DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute); + /// constructor without stroking PolygonStrokePrimitive3D( const basegfx::B3DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute); - // get data + /// data read access basegfx::B3DPolygon getB3DPolygon() const { return maPolygon; } const attribute::LineAttribute& getLineAttribute() const { return maLineAttribute; } const attribute::StrokeAttribute& getStrokeAttribute() const { return maStrokeAttribute; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx index 695d16ec7cf5..f5d45f7c1639 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx @@ -52,13 +52,20 @@ namespace drawinglayer { namespace primitive3d { + /** PolygonStrokePrimitive3D class + + This 3D primitive extends a 3D hairline to a 3D tube which is + e.g. used for fat lines in 3D. It's decomposition will create all + 3D objects needed for the line tubes and the edge roundings + in full 3D. + */ class PolygonTubePrimitive3D : public PolygonHairlinePrimitive3D { private: - // hold the last decompositon since it's expensive + /// hold the last decompositon since it's expensive Primitive3DSequence maLast3DDecomposition; - // visualisation parameters + /// visualisation parameters double mfRadius; double mfDegreeStepWidth; double mfMiterMinimumAngle; @@ -72,10 +79,11 @@ namespace drawinglayer const Primitive3DSequence& getLast3DDecomposition() const { return maLast3DDecomposition; } void setLast3DDecomposition(const Primitive3DSequence& rNew) { maLast3DDecomposition = rNew; } - // local decomposition. + /// local decomposition. Primitive3DSequence impCreate3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: + /// constructor PolygonTubePrimitive3D( const basegfx::B3DPolygon& rPolygon, const basegfx::BColor& rBColor, @@ -83,13 +91,13 @@ namespace drawinglayer double fDegreeStepWidth = 10.0 * F_PI180, double fMiterMinimumAngle = 15.0 * F_PI180); - // get data + /// data read access double getRadius() const { return mfRadius; } double getDegreeStepWidth() const { return mfDegreeStepWidth; } double getMiterMinimumAngle() const { return mfMiterMinimumAngle; } basegfx::B2DLineJoin getLineJoin() const { return maLineJoin; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; /** local decomposition. Use own buffering since we are not derived from @@ -97,7 +105,7 @@ namespace drawinglayer */ virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx index 1c5b9e400bbb..091e8181e38f 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx @@ -46,33 +46,45 @@ namespace drawinglayer { namespace primitive3d { + /** PolyPolygonMaterialPrimitive3D class + + This primitive defines a planar 3D PolyPolygon filled with a single color. + This is one of the non-decomposable primitives, so a renderer + should proccess it. + + It is assumed here that the PolyPolgon is a single plane in 3D. + */ class PolyPolygonMaterialPrimitive3D : public BasePrimitive3D { private: + /// the PolyPolygon geometry basegfx::B3DPolyPolygon maPolyPolygon; + + /// the fill parameters attribute::MaterialAttribute3D maMaterial; - // bitfield + /// bitfield unsigned mbDoubleSided : 1; public: + /// constructor PolyPolygonMaterialPrimitive3D( const basegfx::B3DPolyPolygon& rPolyPolygon, const attribute::MaterialAttribute3D& rMaterial, bool bDoubleSided); - // get data + /// data read access const basegfx::B3DPolyPolygon& getB3DPolyPolygon() const { return maPolyPolygon; } const attribute::MaterialAttribute3D& getMaterial() const { return maMaterial; } bool getDoubleSided() const { return mbDoubleSided; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // get range + /// get range virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx index 42a9ab94f327..b3a57f2677dc 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx @@ -44,26 +44,33 @@ namespace drawinglayer { namespace primitive3d { + /** SdrCubePrimitive3D class + + This 3D primitive expands the SdrPrimitive3D to a 3D cube definition. + The cube is implicitely in unit coordinates and the given transformation + defines it's geometry in space. + */ class SdrCubePrimitive3D : public SdrPrimitive3D { protected: - // local decomposition. + /// local decomposition. virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: + /// constructor SdrCubePrimitive3D( const basegfx::B3DHomMatrix& rTransform, const basegfx::B2DVector& rTextureSize, const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute, const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute); - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // get range + /// get range virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx index 772e030781fe..5b793a6928f8 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx @@ -42,6 +42,7 @@ ////////////////////////////////////////////////////////////////////////////// // predefines + namespace basegfx { class B3DPolygon; class B3DPolyPolygon; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx index 43ae13d4625f..b80198d127d2 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx @@ -53,7 +53,7 @@ namespace drawinglayer { namespace primitive3d { - // Slice3D types + /** SliceType3D definition */ enum SliceType3D { SLICETYPE3D_REGULAR, // normal geoemtry Slice3D @@ -61,7 +61,7 @@ namespace drawinglayer SLICETYPE3D_BACKCAP // back cap }; - // class to hold one Slice3D + /// class to hold one Slice3D class Slice3D { protected: @@ -92,10 +92,10 @@ namespace drawinglayer SliceType3D getSliceType() const { return maSliceType; } }; - // typedef for a group of Slice3Ds + /// typedef for a group of Slice3Ds typedef ::std::vector< Slice3D > Slice3DVector; - // helpers for creation + /// helpers for creation void createLatheSlices( Slice3DVector& rSliceVector, const basegfx::B2DPolyPolygon& rSource, @@ -117,7 +117,7 @@ namespace drawinglayer bool bCloseFront, bool bCloseBack); - // helpers for geometry extraction + /// helpers for geometry extraction basegfx::B3DPolyPolygon extractHorizontalLinesFromSlice(const Slice3DVector& rSliceVector, bool bCloseHorLines); basegfx::B3DPolyPolygon extractVerticalLinesFromSlice(const Slice3DVector& rSliceVector); diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx index a5975b050797..a810e0f5ec8e 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx @@ -45,23 +45,34 @@ namespace drawinglayer { namespace primitive3d { + /** SdrExtrudePrimitive3D class + + This 3D primitive expands the SdrPrimitive3D to a 3D extrude definition. + The given 2D PolyPolygon geometry is imagined as lying on the XY-plane in 3D + and gets extruded in Z-Direction by Depth. + + Various possibilities e.g. for creating diagonals (edge roudings in 3D) + and similar are given. + + The decomposition will create all necessary 3D planes for visualisation. + */ class SdrExtrudePrimitive3D : public SdrPrimitive3D { private: - // geometry helper for slices + /// geometry helper for slices basegfx::B2DPolyPolygon maCorrectedPolyPolygon; Slice3DVector maSlices; - // primitive data + /// primitive geometry data basegfx::B2DPolyPolygon maPolyPolygon; double mfDepth; double mfDiagonal; double mfBackScale; - // decomposition data when ReducedLineGeometry is used, see get3DDecomposition + /// decomposition data when ReducedLineGeometry is used, see get3DDecomposition geometry::ViewInformation3D* mpLastRLGViewInformation; - // bitfield + /// bitfield unsigned mbSmoothNormals : 1; // Plane self unsigned mbSmoothHorizontalNormals : 1; // always unsigned mbSmoothLids : 1; // Front/back @@ -69,17 +80,18 @@ namespace drawinglayer unsigned mbCloseFront : 1; unsigned mbCloseBack : 1; - // create slices + /// create slices void impCreateSlices(); - // get (evtl. create) slices + /// get (evtl. create) slices const Slice3DVector& getSlices() const; protected: - // local decomposition. + /// local decomposition. virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: + /// constructor SdrExtrudePrimitive3D( const basegfx::B3DHomMatrix& rTransform, const basegfx::B2DVector& rTextureSize, @@ -97,7 +109,7 @@ namespace drawinglayer bool bCloseBack); virtual ~SdrExtrudePrimitive3D(); - // data access + /// data read access const basegfx::B2DPolyPolygon& getPolyPolygon() const { return maPolyPolygon; } double getDepth() const { return mfDepth; } double getDiagonal() const { return mfDiagonal; } @@ -109,16 +121,16 @@ namespace drawinglayer bool getCloseFront() const { return mbCloseFront; } bool getCloseBack() const { return mbCloseBack; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // get range + /// get range virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const; - // Overloaded to allow for reduced line mode to decide if to buffer decomposition or not + /// Overloaded to allow for reduced line mode to decide if to buffer decomposition or not virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx index 7d80cbde015c..084ce5bce35e 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx @@ -45,14 +45,25 @@ namespace drawinglayer { namespace primitive3d { + /** SdrLathePrimitive3D class + + This 3D primitive expands the SdrPrimitive3D to a 3D rotation definition. + The given 2D PolyPolygon geometry is imagined as lying on the XY-plane in 3D + and gets rotated around the Y-Axis. + + Various possibilities e.g. for creating diagonals (edge roudings in 3D) + and similar are given. + + The decomposition will create all necessary 3D planes for visualisation. + */ class SdrLathePrimitive3D : public SdrPrimitive3D { private: - // geometry helper for slices + /// geometry helper for slices basegfx::B2DPolyPolygon maCorrectedPolyPolygon; Slice3DVector maSlices; - // primitive data + /// primitive geometry data basegfx::B2DPolyPolygon maPolyPolygon; sal_uInt32 mnHorizontalSegments; sal_uInt32 mnVerticalSegments; @@ -60,10 +71,10 @@ namespace drawinglayer double mfBackScale; double mfRotation; - // decomposition data when ReducedLineGeometry is used, see get3DDecomposition + /// decomposition data when ReducedLineGeometry is used, see get3DDecomposition geometry::ViewInformation3D* mpLastRLGViewInformation; - // bitfield + /// bitfield unsigned mbSmoothNormals : 1; // Plane self unsigned mbSmoothHorizontalNormals : 1; // always unsigned mbSmoothLids : 1; // Front/back @@ -71,14 +82,14 @@ namespace drawinglayer unsigned mbCloseFront : 1; unsigned mbCloseBack : 1; - // create slices + /// create slices void impCreateSlices(); - // get (evtl. create) slices + /// get (evtl. create) slices const Slice3DVector& getSlices() const; protected: - // local helpers + /// local helpers void impCreateOutlines( const geometry::ViewInformation3D& rViewInformation, const basegfx::B3DPolygon& rLoopA, @@ -90,10 +101,11 @@ namespace drawinglayer const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd) const; - // local decomposition. + /// local decomposition. virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: + /// constructor SdrLathePrimitive3D( const basegfx::B3DHomMatrix& rTransform, const basegfx::B2DVector& rTextureSize, @@ -113,7 +125,7 @@ namespace drawinglayer bool bCloseBack); virtual ~SdrLathePrimitive3D(); - // data access + /// data read access const basegfx::B2DPolyPolygon& getPolyPolygon() const { return maPolyPolygon; } sal_uInt32 getHorizontalSegments() const { return mnHorizontalSegments; } sal_uInt32 getVerticalSegments() const { return mnVerticalSegments; } @@ -127,16 +139,16 @@ namespace drawinglayer bool getCloseFront() const { return mbCloseFront; } bool getCloseBack() const { return mbCloseBack; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // get range + /// get range virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const; - // Overloaded to allow for reduced line mode to decide if to buffer decomposition or not + /// Overloaded to allow for reduced line mode to decide if to buffer decomposition or not virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx index b0d7cc5c26a2..a6c68bd16da8 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx @@ -44,17 +44,28 @@ namespace drawinglayer { namespace primitive3d { + /** SdrPolyPolygonPrimitive3D class + + This 3D primitive defines a PolyPolgon in space which may have + Line- and FillStyles and extra 3D surface attributes. It is assumed + that the given 3D PolyPolgon (which may contain texture and normal + information) is planar in 3D. + + The decomposition will include all needed 3D data for visualisation, + including FatLines and fill styles. + */ class SdrPolyPolygonPrimitive3D : public SdrPrimitive3D { private: - // the polyPolygon evtl with normals and texture coordinates + /// the planar polyPolygon evtl with normals and texture coordinates basegfx::B3DPolyPolygon maPolyPolygon3D; protected: - // local decomposition. + /// local decomposition. virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: + /// constructor SdrPolyPolygonPrimitive3D( const basegfx::B3DPolyPolygon& rPolyPolygon3D, const basegfx::B3DHomMatrix& rTransform, @@ -62,16 +73,16 @@ namespace drawinglayer const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute, const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute); - // data access + /// data access const basegfx::B3DPolyPolygon& getPolyPolygon3D() const { return maPolyPolygon3D; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // get range + /// get range virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx index d2296968a000..4dd620848387 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx @@ -47,43 +47,49 @@ namespace drawinglayer { - /** base class for the more complicated geometric primitives, so + /** SdrPrimitive3D class + + Base class for the more complicated geometric primitives, so derive from buffered primitive to allow overloading of - create3DDecomposition there + create3DDecomposition there. */ namespace primitive3d { class SdrPrimitive3D : public BufferedDecompositionPrimitive3D { private: + /// object surface attributes basegfx::B3DHomMatrix maTransform; basegfx::B2DVector maTextureSize; attribute::SdrLineFillShadowAttribute maSdrLFSAttribute; attribute::Sdr3DObjectAttribute maSdr3DObjectAttribute; protected: - // Standard implementation for primitive3D which - // will use maTransform as range and expand by evtl. line width / 2 + /** Standard implementation for primitive3D which + will use maTransform as range and expand by evtl. line width / 2 + */ basegfx::B3DRange getStandard3DRange() const; - // implementation for primitive3D which - // will use given Slice3Ds and expand by evtl. line width / 2 + /** implementation for primitive3D which + will use given Slice3Ds and expand by evtl. line width / 2 + */ basegfx::B3DRange get3DRangeFromSlices(const Slice3DVector& rSlices) const; public: + /// constructor SdrPrimitive3D( const basegfx::B3DHomMatrix& rTransform, const basegfx::B2DVector& rTextureSize, const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute, const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute); - // data access + /// data read access const basegfx::B3DHomMatrix& getTransform() const { return maTransform; } const basegfx::B2DVector& getTextureSize() const { return maTextureSize; } const attribute::SdrLineFillShadowAttribute& getSdrLFSAttribute() const { return maSdrLFSAttribute; } const attribute::Sdr3DObjectAttribute getSdr3DObjectAttribute() const { return maSdr3DObjectAttribute; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx index 3e6349df0bb9..52e646e6b4dc 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx @@ -44,17 +44,25 @@ namespace drawinglayer { namespace primitive3d { + /** SdrSpherePrimitive3D class + + This 3D primitive expands the SdrPrimitive3D to a 3D sphere definition. + The sphere is implicitely in unit coordinates and the given transformation + defines it's geometry in space. + */ class SdrSpherePrimitive3D : public SdrPrimitive3D { private: + /// additional geometry definitions sal_uInt32 mnHorizontalSegments; sal_uInt32 mnVerticalSegments; protected: - // local decomposition. + /// local decomposition. virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: + /// constructor SdrSpherePrimitive3D( const basegfx::B3DHomMatrix& rTransform, const basegfx::B2DVector& rTextureSize, @@ -63,17 +71,17 @@ namespace drawinglayer sal_uInt32 nHorizontalSegments, sal_uInt32 nVerticalSegments); - // data access + /// data read access sal_uInt32 getHorizontalSegments() const { return mnHorizontalSegments; } sal_uInt32 getVerticalSegments() const { return mnVerticalSegments; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // get range + /// get range virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx index d511c89a9998..cb8e9cd385d0 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx @@ -46,17 +46,29 @@ namespace drawinglayer { namespace primitive3d { + /** ShadowPrimitive3D class + + This 3D grouping primitive is used to define a shadow for + 3d geometry by embedding it. The shadow of 3D objects are + 2D polygons, so the shadow transformation is a 2D transformation. + + If the Shadow3D flag is set, the shadow definition has to be + combined with the scene and camera definition to create the correct + projected shadow 2D-Polygons. + */ class ShadowPrimitive3D : public GroupPrimitive3D { protected: + /// 2D shadow definition basegfx::B2DHomMatrix maShadowTransform; basegfx::BColor maShadowColor; double mfShadowTransparence; - // bitfield + /// bitfield unsigned mbShadow3D : 1; public: + /// constructor ShadowPrimitive3D( const basegfx::B2DHomMatrix& rShadowTransform, const basegfx::BColor& rShadowColor, @@ -64,16 +76,16 @@ namespace drawinglayer bool bShadow3D, const Primitive3DSequence& rChildren); - // get data + /// data read access const basegfx::B2DHomMatrix& getShadowTransform() const { return maShadowTransform; } const basegfx::BColor& getShadowColor() const { return maShadowColor; } double getShadowTransparence() const { return mfShadowTransparence; } bool getShadow3D() const { return mbShadow3D; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx index a0c18f34788e..052d42f7290e 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx @@ -47,31 +47,39 @@ namespace drawinglayer { namespace primitive3d { + /** TexturePrimitive3D class + + This 3D grouping primitive is used to define a texture for + 3d geometry by embedding it. It is used as bae class for + extended texture definitions + */ class TexturePrimitive3D : public GroupPrimitive3D { private: + /// texture geometry definition basegfx::B2DVector maTextureSize; - // bitfield - // flag if texture shall be modulated with white interpolated color + /// bitfield + /// flag if texture shall be modulated with white interpolated color unsigned mbModulate : 1; - // flag if texture shall be filtered + /// flag if texture shall be filtered unsigned mbFilter : 1; public: + /// constructor TexturePrimitive3D( const Primitive3DSequence& rChildren, const basegfx::B2DVector& rTextureSize, bool bModulate, bool bFilter); - // get data + /// data read access const basegfx::B2DVector& getTextureSize() const { return maTextureSize; } bool getModulate() const { return mbModulate; } bool getFilter() const { return mbFilter; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; }; } // end of namespace primitive3d @@ -83,26 +91,34 @@ namespace drawinglayer { namespace primitive3d { + /** UnifiedAlphaTexturePrimitive3D class + + This 3D primitive expands TexturePrimitive3D to a unified + alpha (transparence) texture definition. All 3D primitives + embedded here will be shown with the given transparency. + */ class UnifiedAlphaTexturePrimitive3D : public TexturePrimitive3D { private: + /// transparency definition double mfTransparence; public: + /// constructor UnifiedAlphaTexturePrimitive3D( double fTransparence, const Primitive3DSequence& rChildren); - // get data + /// data read access double getTransparence() const { return mfTransparence; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // local decomposition. + /// local decomposition. virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d @@ -114,12 +130,20 @@ namespace drawinglayer { namespace primitive3d { + /** GradientTexturePrimitive3D class + + This 3D primitive expands TexturePrimitive3D to a gradient texture + definition. All 3D primitives embedded here will be shown with the + defined gradient. + */ class GradientTexturePrimitive3D : public TexturePrimitive3D { private: + /// the gradient definition attribute::FillGradientAttribute maGradient; public: + /// constructor GradientTexturePrimitive3D( const attribute::FillGradientAttribute& rGradient, const Primitive3DSequence& rChildren, @@ -127,13 +151,13 @@ namespace drawinglayer bool bModulate, bool bFilter); - // get data + /// data read access const attribute::FillGradientAttribute& getGradient() const { return maGradient; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d @@ -145,12 +169,20 @@ namespace drawinglayer { namespace primitive3d { + /** BitmapTexturePrimitive3D class + + This 3D primitive expands TexturePrimitive3D to a bitmap texture + definition. All 3D primitives embedded here will be shown with the + defined bitmap (maybe tiled if defined). + */ class BitmapTexturePrimitive3D : public TexturePrimitive3D { private: + /// bitmap fill attribute attribute::FillBitmapAttribute maBitmap; public: + /// constructor BitmapTexturePrimitive3D( const attribute::FillBitmapAttribute& rBitmap, const Primitive3DSequence& rChildren, @@ -158,13 +190,13 @@ namespace drawinglayer bool bModulate, bool bFilter); - // get data + /// data read access const attribute::FillBitmapAttribute& getBitmap() const { return maBitmap; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d @@ -176,18 +208,26 @@ namespace drawinglayer { namespace primitive3d { + /** AlphaTexturePrimitive3D class + + This 3D primitive expands TexturePrimitive3D to a alpha texture + definition. For alpha definition, a gradient is used. The values in + that gradient will be interpreted as luminance Alpha-Values. All 3D + primitives embedded here will be shown with the defined transparence. + */ class AlphaTexturePrimitive3D : public GradientTexturePrimitive3D { public: + /// constructor AlphaTexturePrimitive3D( const attribute::FillGradientAttribute& rGradient, const Primitive3DSequence& rChildren, const basegfx::B2DVector& rTextureSize); - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d diff --git a/drawinglayer/inc/drawinglayer/primitive3d/transformprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/transformprimitive3d.hxx index 720f28445dec..bbf2b8444969 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/transformprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/transformprimitive3d.hxx @@ -45,26 +45,37 @@ namespace drawinglayer { namespace primitive3d { + /** TransformPrimitive3D class + + This is one of the basic grouping 3D primitives and it provides + embedding a sequence of primitives (a geometry) into a + 3D transformation. + + Please see the description for TransformPrimitive2D since these + primitives are pretty similar. + */ class TransformPrimitive3D : public GroupPrimitive3D { private: + // the 3D transformation to apply basegfx::B3DHomMatrix maTransformation; public: + /// constructor TransformPrimitive3D( const basegfx::B3DHomMatrix& rTransformation, const Primitive3DSequence& rChildren); - // get data + /// data read access const basegfx::B3DHomMatrix& getTransformation() const { return maTransformation; } - // compare operator + /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; - // get range + /// get range virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const; - // provide unique ID + /// provide unique ID DeclPrimitrive3DIDBlock() }; } // end of namespace primitive3d -- cgit From 925a3a281e9fe4bc6d1f62d8c1ade83e46bf87f9 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 29 Oct 2009 15:48:48 +0100 Subject: sb116: #i106384# avoid GCC warnings produced if -fno-strict-aliasing were removed (patch by cmc) --- sal/inc/rtl/math.hxx | 23 ++++++++++++++++++----- sal/osl/unx/process.c | 4 ++-- sal/osl/unx/socket.c | 19 ++++++++++--------- sal/rtl/source/bootstrap.cxx | 4 ++-- sal/rtl/source/math.cxx | 9 +++++++-- 5 files changed, 39 insertions(+), 20 deletions(-) diff --git a/sal/inc/rtl/math.hxx b/sal/inc/rtl/math.hxx index 5760340cc6a4..dbd4a2172246 100644 --- a/sal/inc/rtl/math.hxx +++ b/sal/inc/rtl/math.hxx @@ -357,17 +357,30 @@ inline bool isSignBitSet(double d) */ inline void setInf(double * pd, bool bNegative) { - reinterpret_cast< sal_math_Double * >(pd)->w32_parts.msw - = bNegative ? 0xFFF00000 : 0x7FF00000; - reinterpret_cast< sal_math_Double * >(pd)->w32_parts.lsw = 0; + union + { + double sd; + sal_math_Double md; + }; + sd = *pd; + md.w32_parts.msw = bNegative ? 0xFFF00000 : 0x7FF00000; + md.w32_parts.lsw = 0; + *pd = sd; } /** Set a QNAN. */ inline void setNan(double * pd) { - reinterpret_cast< sal_math_Double * >(pd)->w32_parts.msw = 0x7FFFFFFF; - reinterpret_cast< sal_math_Double * >(pd)->w32_parts.lsw = 0xFFFFFFFF; + union + { + double sd; + sal_math_Double md; + }; + sd = *pd; + md.w32_parts.msw = 0x7FFFFFFF; + md.w32_parts.lsw = 0xFFFFFFFF; + *pd = sd; } /** If a value is a valid argument for sin(), cos(), tan(). diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index 453d00091c63..abda0b73d856 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -269,7 +269,7 @@ static sal_Bool sendFdPipe(int PipeFD, int SocketFD) cmptr->cmsg_level = SOL_SOCKET; cmptr->cmsg_type = SCM_RIGHTS; cmptr->cmsg_len = CONTROLLEN; - *(int*)CMSG_DATA(cmptr) = SocketFD; + memcpy(CMSG_DATA(cmptr), &SocketFD, sizeof(int)); #endif @@ -360,7 +360,7 @@ static oslSocket receiveFdPipe(int PipeFD) ( msghdr.msg_controllen == CONTROLLEN ) ) { OSL_TRACE("receiveFdPipe : received '%i' bytes\n",nRead); - newfd = *(int*)CMSG_DATA(cmptr); + memcpy(&newfd, CMSG_DATA(cmptr), sizeof(int)); } #endif else diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c index 310dd57592f5..4306347af873 100644 --- a/sal/osl/unx/socket.c +++ b/sal/osl/unx/socket.c @@ -1869,10 +1869,13 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket) if ( pSocket->m_bIsAccepting == sal_True ) { int nConnFD; - struct sockaddr aSockAddr; - socklen_t nSockLen = sizeof(aSockAddr); + union { + struct sockaddr aSockAddr; + struct sockaddr_in aSockAddrIn; + } s; + socklen_t nSockLen = sizeof(s.aSockAddr); - nRet = getsockname(nFD, &aSockAddr, &nSockLen); + nRet = getsockname(nFD, &s.aSockAddr, &nSockLen); #if OSL_DEBUG_LEVEL > 1 if ( nRet < 0 ) { @@ -1880,13 +1883,11 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket) } #endif /* OSL_DEBUG_LEVEL */ - if ( aSockAddr.sa_family == AF_INET ) + if ( s.aSockAddr.sa_family == AF_INET ) { - struct sockaddr_in* pSockAddrIn = (struct sockaddr_in*) &aSockAddr; - - if ( pSockAddrIn->sin_addr.s_addr == htonl(INADDR_ANY) ) + if ( s.aSockAddrIn.sin_addr.s_addr == htonl(INADDR_ANY) ) { - pSockAddrIn->sin_addr.s_addr = htonl(INADDR_LOOPBACK); + s.aSockAddrIn.sin_addr.s_addr = htonl(INADDR_LOOPBACK); } nConnFD = socket(AF_INET, SOCK_STREAM, 0); @@ -1897,7 +1898,7 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket) } #endif /* OSL_DEBUG_LEVEL */ - nRet = connect(nConnFD, &aSockAddr, sizeof(aSockAddr)); + nRet = connect(nConnFD, &s.aSockAddr, sizeof(s.aSockAddr)); #if OSL_DEBUG_LEVEL > 1 if ( nRet < 0 ) { diff --git a/sal/rtl/source/bootstrap.cxx b/sal/rtl/source/bootstrap.cxx index 23dab839d558..769251a6c4ec 100644 --- a/sal/rtl/source/bootstrap.cxx +++ b/sal/rtl/source/bootstrap.cxx @@ -820,8 +820,8 @@ void SAL_CALL rtl_bootstrap_set ( rtl_uString * pValue ) SAL_THROW_EXTERN_C() { - OUString const & name = *reinterpret_cast< OUString const * >( &pName ); - OUString const & value = *reinterpret_cast< OUString const * >( &pValue ); + const OUString name( pName ); + const OUString value( pValue ); osl::MutexGuard guard( osl::Mutex::getGlobalMutex() ); diff --git a/sal/rtl/source/math.cxx b/sal/rtl/source/math.cxx index a255ca21b13a..012046c9e5c8 100644 --- a/sal/rtl/source/math.cxx +++ b/sal/rtl/source/math.cxx @@ -879,8 +879,13 @@ inline double stringToDouble(CharT const * pBegin, CharT const * pEnd, rtl::math::setNan( &fVal ); if (bSign) { - reinterpret_cast< sal_math_Double * >(&fVal)->w32_parts.msw - |= 0x80000000; // create negative NaN + union { + double sd; + sal_math_Double md; + } m; + m.sd = fVal; + m.md.w32_parts.msw |= 0x80000000; // create negative NaN + fVal = m.sd; bSign = false; // don't negate again } // Eat any further digits: -- cgit From a976c11bec7da351774b2a08de6a13ee32ea5c6b Mon Sep 17 00:00:00 2001 From: Mikhail Voitenko Date: Thu, 5 Nov 2009 16:05:18 +0000 Subject: #i106536# Integrate the patch from hjs --- desktop/source/pkgchk/unopkg/makefile.mk | 2 ++ desktop/util/makefile.mk | 13 ++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/desktop/source/pkgchk/unopkg/makefile.mk b/desktop/source/pkgchk/unopkg/makefile.mk index 3562fad961d9..4a1f409f4564 100644 --- a/desktop/source/pkgchk/unopkg/makefile.mk +++ b/desktop/source/pkgchk/unopkg/makefile.mk @@ -49,6 +49,7 @@ PRJINC += ..$/..$/deployment ..$/.. CFLAGS+=-DSYSTEM_DB -I$(DB_INCLUDES) .ENDIF +.IF "$(LINK_SO)"!="" APP1TARGET = so$/unopkg APP1OBJS = $(OBJFILES) APP1STDLIBS = $(SALLIB) $(UNOPKGAPPLIB) @@ -59,6 +60,7 @@ APP1RPATH = BRAND APP1ICON = $(SOLARRESDIR)$/icons/so9_main_app.ico APP1LINKRES = $(MISC)$/$(TARGET)1.res .ENDIF +.ENDIF # "$(LINK_SO)"!="" APP2TARGET = unopkg APP2OBJS = $(OBJFILES) diff --git a/desktop/util/makefile.mk b/desktop/util/makefile.mk index 4dec3cd738ba..78305523c493 100644 --- a/desktop/util/makefile.mk +++ b/desktop/util/makefile.mk @@ -287,22 +287,25 @@ $(BIN)$/soffice_oo$(EXECPOST) : $(APP5TARGETN) $(BIN)$/so$/soffice_so$(EXECPOST) : $(APP1TARGETN) $(COPY) $< $@ -ALLTAR : $(BIN)$/so$/soffice_so$(EXECPOST) $(BIN)$/soffice_oo$(EXECPOST) -.ELSE -ALLTAR : $(BIN)$/soffice_oo$(EXECPOST) +ALLTAR : $(BIN)$/so$/soffice_so$(EXECPOST) .ENDIF # "$(LINK_SO)"=="TRUE" +ALLTAR : $(BIN)$/soffice_oo$(EXECPOST) .ENDIF .IF "$(OS)" == "MACOSX" +.IF "$(LINK_SO)"=="TRUE" $(BIN)$/so$/soffice_mac$(EXECPOST) : $(APP1TARGETN) $(COPY) $< $@ +ALLTAR : $(BIN)$/so$/soffice_mac$(EXECPOST) +.ENDIF # "$(LINK_SO)"=="TRUE" + $(BIN)$/soffice_mac$(EXECPOST) : $(APP5TARGETN) $(COPY) $< $@ -ALLTAR : $(BIN)$/so$/soffice_mac$(EXECPOST) $(BIN)$/soffice_mac$(EXECPOST) +ALLTAR : $(BIN)$/soffice_mac$(EXECPOST) -.ENDIF +.ENDIF # "$(OS)" == "MACOSX" .IF "$(GUI)" == "WNT" -- cgit From 1351162b3c27354d3e08ad8c249d991012eaa9b6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 9 Nov 2009 08:38:31 +0000 Subject: pythonssldedux: #i105669# password/username must be ascii for CRAM-MD5 --- scripting/source/pyprov/mailmerge.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index 75d2db533708..c8f7b6765261 100644 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -85,8 +85,8 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): self.server.starttls() self.server.ehlo() - user = xAuthenticator.getUserName() - password = xAuthenticator.getPassword() + user = xAuthenticator.getUserName().encode('ascii') + password = xAuthenticator.getPassword().encode('ascii') if user != '': if dbg: print >> sys.stderr, 'Logging in, username of', user @@ -234,8 +234,8 @@ class PyMailIMAPService(unohelper.Base, XMailService): self.server = imaplib.IMAP4(server, port) print >> sys.stderr, "AFTER" - user = xAuthenticator.getUserName() - password = xAuthenticator.getPassword() + user = xAuthenticator.getUserName().encode('ascii') + password = xAuthenticator.getPassword().encode('ascii') if user != '': if dbg: print >> sys.stderr, 'Logging in, username of', user @@ -302,8 +302,8 @@ class PyMailPOP3Service(unohelper.Base, XMailService): self.server = poplib.POP3(server, port) print >> sys.stderr, "AFTER" - user = xAuthenticator.getUserName() - password = xAuthenticator.getPassword() + user = xAuthenticator.getUserName().encode('ascii') + password = xAuthenticator.getPassword().encode('ascii') if dbg: print >> sys.stderr, 'Logging in, username of', user self.server.user(user) -- cgit From 090fcf08e7f30171b6f9b277a0b2617b38aa7ba1 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 9 Nov 2009 08:39:23 +0000 Subject: pythonssldedux: #i106542# build python ssl module for ssl email support --- python/Python-2.6.1.patch | 14 ++-- python/Python-ssl.patch | 189 ++++++++++++++++++++++++++++++++++++++++++++++ python/makefile.mk | 4 +- python/prj/build.lst | 2 +- python/prj/d.lst | 1 + 5 files changed, 201 insertions(+), 9 deletions(-) create mode 100644 python/Python-ssl.patch diff --git a/python/Python-2.6.1.patch b/python/Python-2.6.1.patch index 781889d84e3f..661334cae3bb 100644 --- a/python/Python-2.6.1.patch +++ b/python/Python-2.6.1.patch @@ -56,13 +56,13 @@ +# {A1A295E5-463C-437F-81CA-1F32367685DA} = {A1A295E5-463C-437F-81CA-1F32367685DA} +# EndProjectSection +#EndProject -+#Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}" -+# ProjectSection(ProjectDependencies) = postProject -+# {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} -+# {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480} -+# {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} -+# EndProjectSection -+#EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}" ++ ProjectSection(ProjectDependencies) = postProject ++ {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} ++ {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480} ++ {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} ++ EndProjectSection ++EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}" ProjectSection(ProjectDependencies) = postProject {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} diff --git a/python/Python-ssl.patch b/python/Python-ssl.patch new file mode 100644 index 000000000000..a2a70a064029 --- /dev/null +++ b/python/Python-ssl.patch @@ -0,0 +1,189 @@ +--- misc/Python-2.6.1/PCbuild/build_ssl.py 2009-11-02 08:24:35.140625000 +0000 ++++ misc/build/Python-2.6.1/PCbuild/build_ssl.py 2009-11-02 08:25:11.750000000 +0000 +@@ -255,4 +255,4 @@ + sys.exit(rc) + + if __name__=='__main__': +- main() ++ sys.exit(0) +--- misc/Python-2.6.1/PCbuild/_ssl.vcproj 2009-11-02 08:24:35.140625000 +0000 ++++ misc/build/Python-2.6.1/PCbuild/_ssl.vcproj 2009-11-02 08:24:35.140625000 +0000 +@@ -43,7 +43,7 @@ + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Date: Thu, 12 Nov 2009 11:26:43 +0100 Subject: aw078 #i106541# commited in-between stable version with already advanced metafile decomposition for security reasons --- .../drawinglayer/attribute/fillbitmapattribute.hxx | 12 +- .../inc/drawinglayer/attribute/fontattribute.hxx | 116 + .../primitive2d/discretebitmapprimitive2d.hxx | 93 + .../primitive2d/drawinglayer_primitivetypes2d.hxx | 5 + .../primitive2d/fillgradientprimitive2d.hxx | 29 +- .../drawinglayer/primitive2d/invertprimitive2d.hxx | 2 +- .../primitive2d/metafileprimitive2d.hxx | 5 +- .../drawinglayer/primitive2d/primitivetools2d.hxx | 83 + .../primitive2d/textdecoratedprimitive2d.hxx | 82 +- .../primitive2d/textenumsprimitive2d.hxx | 110 + .../drawinglayer/primitive2d/textlayoutdevice.hxx | 21 +- .../primitive2d/textlineprimitive2d.hxx | 99 + .../drawinglayer/primitive2d/textprimitive2d.hxx | 80 +- .../primitive2d/textstrikeoutprimitive2d.hxx | 167 ++ .../primitive2d/wallpaperprimitive2d.hxx | 102 + .../primitive3d/textureprimitive3d.hxx | 6 +- .../processor2d/vclmetafileprocessor2d.hxx | 2 +- drawinglayer/prj/d.lst | 2 + .../source/attribute/fillbitmapattribute.cxx | 16 +- drawinglayer/source/attribute/fontattribute.cxx | 63 + drawinglayer/source/attribute/makefile.mk | 1 + .../source/attribute/sdrfillbitmapattribute.cxx | 2 +- .../source/primitive2d/bitmapprimitive2d.cxx | 4 +- .../primitive2d/discretebitmapprimitive2d.cxx | 124 + .../source/primitive2d/fillbitmapprimitive2d.cxx | 6 +- .../source/primitive2d/fillgradientprimitive2d.cxx | 174 +- .../source/primitive2d/graphicprimitive2d.cxx | 504 +++- drawinglayer/source/primitive2d/makefile.mk | 4 + .../source/primitive2d/metafileprimitive2d.cxx | 2485 +++++++++++++++++++- .../source/primitive2d/primitivetools2d.cxx | 72 + .../primitive2d/textdecoratedprimitive2d.cxx | 403 +--- .../source/primitive2d/textlayoutdevice.cxx | 48 +- .../source/primitive2d/textlineprimitive2d.cxx | 317 +++ .../source/primitive2d/textprimitive2d.cxx | 41 +- .../primitive2d/textstrikeoutprimitive2d.cxx | 294 +++ .../source/primitive2d/wallpaperprimitive2d.cxx | 276 +++ .../source/primitive3d/textureprimitive3d.cxx | 6 +- .../source/processor2d/canvasprocessor.cxx | 18 +- .../source/processor2d/vclmetafileprocessor2d.cxx | 52 +- .../source/processor2d/vclpixelprocessor2d.cxx | 25 +- drawinglayer/source/processor2d/vclprocessor2d.cxx | 61 +- .../source/processor3d/defaultprocessor3d.cxx | 6 +- svx/source/sdr/overlay/overlayselection.cxx | 11 +- svx/source/svdraw/svdfmtf.cxx | 18 +- svx/source/svdraw/svdograf.cxx | 2 +- svx/source/svdraw/svdotextdecomposition.cxx | 65 +- svx/source/svdraw/svdotextpathdecomposition.cxx | 8 +- 47 files changed, 5363 insertions(+), 759 deletions(-) create mode 100644 drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx create mode 100644 drawinglayer/inc/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx create mode 100644 drawinglayer/inc/drawinglayer/primitive2d/textenumsprimitive2d.hxx create mode 100644 drawinglayer/inc/drawinglayer/primitive2d/textlineprimitive2d.hxx create mode 100644 drawinglayer/inc/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx create mode 100644 drawinglayer/inc/drawinglayer/primitive2d/wallpaperprimitive2d.hxx create mode 100644 drawinglayer/source/attribute/fontattribute.cxx create mode 100644 drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx create mode 100644 drawinglayer/source/primitive2d/textlineprimitive2d.cxx create mode 100644 drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx create mode 100644 drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx diff --git a/drawinglayer/inc/drawinglayer/attribute/fillbitmapattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/fillbitmapattribute.hxx index 4e316232bd81..376e1d626927 100644 --- a/drawinglayer/inc/drawinglayer/attribute/fillbitmapattribute.hxx +++ b/drawinglayer/inc/drawinglayer/attribute/fillbitmapattribute.hxx @@ -36,7 +36,7 @@ #ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLBITMAPATTRIBUTE_HXX #define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLBITMAPATTRIBUTE_HXX -#include +#include #include #include @@ -56,7 +56,7 @@ namespace drawinglayer { class FillBitmapAttribute { - Bitmap maBitmap; + BitmapEx maBitmapEx; basegfx::B2DPoint maTopLeft; basegfx::B2DVector maSize; @@ -64,11 +64,15 @@ namespace drawinglayer unsigned mbTiling : 1; public: - FillBitmapAttribute(const Bitmap& rBitmap, const basegfx::B2DPoint& rTopLeft, const basegfx::B2DVector& rSize, bool bTiling); + FillBitmapAttribute( + const BitmapEx& rBitmapEx, + const basegfx::B2DPoint& rTopLeft, + const basegfx::B2DVector& rSize, + bool bTiling); bool operator==(const FillBitmapAttribute& rCandidate) const; // data access - const Bitmap& getBitmap() const { return maBitmap; } + const BitmapEx& getBitmapEx() const { return maBitmapEx; } const basegfx::B2DPoint& getTopLeft() const { return maTopLeft; } const basegfx::B2DVector& getSize() const { return maSize; } bool getTiling() const { return mbTiling; } diff --git a/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx new file mode 100644 index 000000000000..f34ee913418f --- /dev/null +++ b/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx @@ -0,0 +1,116 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: strokeattribute.hxx,v $ + * + * $Revision: 1.5 $ + * + * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FONTATTRIBUTE_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FONTATTRIBUTE_HXX + +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace attribute + { + /** FontAttribute class + + This attribute class is able to hold all parameters needed/used + to completely define the parametrisation of a text portion. + */ + class FontAttribute + { + private: + /// core data + String maFamilyName; // Font Family Name + String maStyleName; // Font Style Name + sal_uInt16 mnWeight; // Font weight + + /// bitfield + unsigned mbSymbol : 1; // Symbol Font Flag + unsigned mbVertical : 1; // Vertical Text Flag + unsigned mbItalic : 1; // Italic Flag + unsigned mbOutline : 1; // Outline Flag + unsigned mbRTL : 1; // RTL Flag + unsigned mbBiDiStrong : 1; // BiDi Flag + // TODO: pair kerning and CJK kerning + + public: + /// constructor + FontAttribute( + const String& rFamilyName, + const String& rStyleName, + sal_uInt16 nWeight, + bool bSymbol = false, + bool bVertical = false, + bool bItalic = false, + bool bOutline = false, + bool bRTL = false, + bool bBiDiStrong = false) + : maFamilyName(rFamilyName), + maStyleName(rStyleName), + mnWeight(nWeight), + mbSymbol(bSymbol), + mbVertical(bVertical), + mbItalic(bItalic), + mbOutline(bOutline), + mbRTL(bRTL), + mbBiDiStrong(bBiDiStrong) + { + } + + /// compare operator + bool operator==(const FontAttribute& rCompare) const; + + /// data read access + const String& getFamilyName() const { return maFamilyName; } + const String& getStyleName() const { return maStyleName; } + sal_uInt16 getWeight() const { return mnWeight; } + bool getSymbol() const { return mbSymbol; } + bool getVertical() const { return mbVertical; } + bool getItalic() const { return mbItalic; } + bool getOutline() const { return mbOutline; } + bool getRTL() const { return mbRTL; } + bool getBiDiStrong() const { return mbBiDiStrong; } + }; + } // end of namespace attribute +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_FONTATTRIBUTE_HXX + +// eof diff --git a/drawinglayer/inc/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx new file mode 100644 index 000000000000..04ddb73460fa --- /dev/null +++ b/drawinglayer/inc/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx @@ -0,0 +1,93 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: bitmapprimitive2d.hxx,v $ + * + * $Revision: 1.4 $ + * + * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_DISCRETEBITMAPPRIMITIVE2D_HXX +#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_DISCRETEBITMAPPRIMITIVE2D_HXX + +#include +#include + +////////////////////////////////////////////////////////////////////////////// +// DiscreteBitmapPrimitive2D class + +namespace drawinglayer +{ + namespace primitive2d + { + /** DiscreteBitmapPrimitive2D class + + This class defines a view-dependent BitmapPrimitive which has a + logic position for the top-left position and is always to be + painted in 1:1 pixel resolution. It will never be sheared, rotated + or scaled with the view. + */ + class DiscreteBitmapPrimitive2D : public ObjectAndViewTransformationDependentPrimitive2D + { + private: + /// the RGBA Bitmap-data + BitmapEx maBitmapEx; + + /** the top-left object position */ + basegfx::B2DPoint maTopLeft; + + protected: + /// local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + + public: + /// constructor + DiscreteBitmapPrimitive2D( + const BitmapEx& rBitmapEx, + const basegfx::B2DPoint& rTopLeft); + + /// data read access + const BitmapEx& getBitmapEx() const { return maBitmapEx; } + const basegfx::B2DPoint& getTopLeft() const { return maTopLeft; } + + /// compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + /// provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif // INCLUDED_DRAWINGLAYER_PRIMITIVE2D_DISCRETEBITMAPPRIMITIVE2D_HXX + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx index 8d5d089f5800..477c3a19042a 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx @@ -103,6 +103,11 @@ #define PRIMITIVE2D_ID_POLYPOLYGONMARKERPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 52) #define PRIMITIVE2D_ID_HITTESTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 53) #define PRIMITIVE2D_ID_INVERTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 54) +#define PRIMITIVE2D_ID_DISCRETEBITMAPPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 55) +#define PRIMITIVE2D_ID_WALLPAPERBITMAPPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 56) +#define PRIMITIVE2D_ID_TEXTLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 57) +#define PRIMITIVE2D_ID_TEXTCHARACTERSTRIKEOUTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 58) +#define PRIMITIVE2D_ID_TEXTGEOMETRYSTRIKEOUTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 59) ////////////////////////////////////////////////////////////////////////////// diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx index d6853e69b149..0fd084c6fad0 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx @@ -40,7 +40,12 @@ #include ////////////////////////////////////////////////////////////////////////////// -// FillbitmapPrimitive2D class +// predefines + +namespace basegfx { class B2DPolygon; } + +////////////////////////////////////////////////////////////////////////////// +// FillGradientPrimitive2D class namespace drawinglayer { @@ -53,6 +58,12 @@ namespace drawinglayer The decomposition will deliver the decomposed gradient, e.g. for an ellipse gradient the various ellipses in various color steps will be created. + + I have added functionality to create both versions of filled decompositions: + Those who overlap and non-overlapping ones. The overlapping version is the + default one since it works with and without AntiAliasing. The non-overlapping + version is used in the MetafilePrimitive2D decomposition when the old XOR + paint was recorded. */ class FillGradientPrimitive2D : public BufferedDecompositionPrimitive2D { @@ -63,7 +74,23 @@ namespace drawinglayer /// the gradient definition attribute::FillGradientAttribute maFillGradient; + /// local helpers + void generateMatricesAndColors( + std::vector< basegfx::B2DHomMatrix >& rMatrices, + std::vector< basegfx::BColor >& rColors) const; + Primitive2DSequence createOverlappingFill( + const std::vector< basegfx::B2DHomMatrix >& rMatrices, + const std::vector< basegfx::BColor >& rColors, + const basegfx::B2DPolygon& rUnitPolygon) const; + Primitive2DSequence createNonOverlappingFill( + const std::vector< basegfx::B2DHomMatrix >& rMatrices, + const std::vector< basegfx::BColor >& rColors, + const basegfx::B2DPolygon& rUnitPolygon) const; + protected: + /// local helper + Primitive2DSequence createFill(bool bOverlapping) const; + /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/invertprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/invertprimitive2d.hxx index 9ba7e7796395..85f1c6510c5a 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/invertprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/invertprimitive2d.hxx @@ -44,7 +44,7 @@ namespace drawinglayer { namespace primitive2d { - /** HitTestPrimitive2D class + /** InvertPrimitive2D class This is a helper class which encapsulates geometry that should be painted XOR, e.g. old cursor visualisations. It decomposes to diff --git a/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx index 039db9387024..0cbd7e4628cb 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx @@ -67,7 +67,7 @@ namespace drawinglayer have many advantages; Metafile would no longer have to be rendered by sub-systems and a standard way for converting Metafiles would exist. */ - class MetafilePrimitive2D : public BasePrimitive2D + class MetafilePrimitive2D : public BufferedDecompositionPrimitive2D { private: /// the geometry definition @@ -76,6 +76,9 @@ namespace drawinglayer /// the content definition GDIMetaFile maMetaFile; + protected: + /// local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: /// constructor MetafilePrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx index 77d56ca8026f..a095c558ba12 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx @@ -37,6 +37,7 @@ #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PRIMITIVE2DTOOLS_HXX #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -118,6 +119,88 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// +namespace drawinglayer +{ + namespace primitive2d + { + /** ViewTransformationDependentPrimitive2D class + + tooling class for BufferedDecompositionPrimitive2D based classes which are view-dependent + regarding the complete Viewtransformation. The implementation of get2DDecomposition + guards the buffered local decomposition and ensures that a create2DDecomposition + implementation may use an up-to-date ViewTransformation accessible using getViewTransformation() + */ + class ViewTransformationDependentPrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + /** the last used ViewTransformation definition for decomposition. Since this + is checked and updated from get2DDecomposition() it will be current and + usable in create2DDecomposition() + */ + basegfx::B2DHomMatrix maViewTransformation; + + public: + /// constructor + ViewTransformationDependentPrimitive2D() + : BufferedDecompositionPrimitive2D(), + maViewTransformation() + { + } + + /// data read access + const basegfx::B2DHomMatrix& getViewTransformation() const { return maViewTransformation; } + + /// get local decomposition. Overloaded since this decomposition is view-dependent + virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + /** ObjectAndViewTransformationDependentPrimitive2D class + + tooling class for BufferedDecompositionPrimitive2D based classes which are view-dependent + and Object-Transform dependent. The implementation of get2DDecomposition + guards the buffered local decomposition and ensures that a create2DDecomposition + implementation may use an up-to-date ViewTransformation accessible using getViewTransformation() + and an object transformation via getObjectTransformation() + */ + class ObjectAndViewTransformationDependentPrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + /** the last used ViewTransformation and the last ObjectTransformation + definition for decomposition. Since this is checked and updated from + get2DDecomposition() it will be current and usable in create2DDecomposition() + */ + basegfx::B2DHomMatrix maViewTransformation; + basegfx::B2DHomMatrix maObjectTransformation; + + public: + /// constructor + ObjectAndViewTransformationDependentPrimitive2D() + : BufferedDecompositionPrimitive2D(), + maViewTransformation(), + maObjectTransformation() + { + } + + /// data read access + const basegfx::B2DHomMatrix& getViewTransformation() const { return maViewTransformation; } + const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; } + + /// get local decomposition. Overloaded since this decomposition is view-dependent + virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PRIMITIVE2DTOOLS_HXX ////////////////////////////////////////////////////////////////////////////// diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx index 4f33c8a7d48b..6c7ea8bd24c5 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx @@ -37,6 +37,7 @@ #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTDECORATEDPRIMITIVE2D_HXX #include +#include ////////////////////////////////////////////////////////////////////////////// // predeclarations @@ -55,61 +56,6 @@ namespace drawinglayer { namespace primitive2d { - /** FontUnderline definition - - This is used for both underline and overline - */ - enum FontUnderline - { - FONT_UNDERLINE_NONE, - FONT_UNDERLINE_SINGLE, - FONT_UNDERLINE_DOUBLE, - FONT_UNDERLINE_DOTTED, - FONT_UNDERLINE_DASH, - FONT_UNDERLINE_LONGDASH, - FONT_UNDERLINE_DASHDOT, - FONT_UNDERLINE_DASHDOTDOT, - FONT_UNDERLINE_SMALLWAVE, - FONT_UNDERLINE_WAVE, - FONT_UNDERLINE_DOUBLEWAVE, - FONT_UNDERLINE_BOLD, - FONT_UNDERLINE_BOLDDOTTED, - FONT_UNDERLINE_BOLDDASH, - FONT_UNDERLINE_BOLDLONGDASH, - FONT_UNDERLINE_BOLDDASHDOT, - FONT_UNDERLINE_BOLDDASHDOTDOT, - FONT_UNDERLINE_BOLDWAVE - }; - - /** FontStrikeout definition */ - enum FontStrikeout - { - FONT_STRIKEOUT_NONE, - FONT_STRIKEOUT_SINGLE, - FONT_STRIKEOUT_DOUBLE, - FONT_STRIKEOUT_BOLD, - FONT_STRIKEOUT_SLASH, - FONT_STRIKEOUT_X - }; - - /** FontEmphasisMark definition */ - enum FontEmphasisMark - { - FONT_EMPHASISMARK_NONE, - FONT_EMPHASISMARK_DOT, - FONT_EMPHASISMARK_CIRCLE, - FONT_EMPHASISMARK_DISC, - FONT_EMPHASISMARK_ACCENT - }; - - /** FontRelief definition */ - enum FontRelief - { - FONT_RELIEF_NONE, - FONT_RELIEF_EMBOSSED, - FONT_RELIEF_ENGRAVED - }; - /** TextDecoratedPortionPrimitive2D class This primitive expands the TextSimplePortionPrimitive2D by common @@ -123,8 +69,8 @@ namespace drawinglayer /// decoration definitions basegfx::BColor maOverlineColor; basegfx::BColor maTextlineColor; - FontUnderline meFontOverline; - FontUnderline meFontUnderline; + TextLine meFontOverline; + TextLine meFontUnderline; FontStrikeout meFontStrikeout; FontEmphasisMark meFontEmphasisMark; FontRelief meFontRelief; @@ -137,16 +83,6 @@ namespace drawinglayer unsigned mbShadow : 1; /// helper methods - void impCreateTextLine( - std::vector< Primitive2DReference >& rTarget, - basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans, - const basegfx::B2DHomMatrix &rUnscaledTransform, - FontUnderline eLineStyle, - double fLineOffset, - double fLineHeight, - double fLineWidth, - const basegfx::BColor& rLineColor) const; - void impCreateGeometryContent( std::vector< Primitive2DReference >& rTarget, basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans, @@ -154,7 +90,7 @@ namespace drawinglayer xub_StrLen aTextPosition, xub_StrLen aTextLength, const ::std::vector< double >& rDXArray, - const FontAttributes& rFontAttributes) const; + const attribute::FontAttribute& rFontAttribute) const; void impCorrectTextBoundary( ::com::sun::star::i18n::Boundary& rNextWordBoundary) const; @@ -177,15 +113,15 @@ namespace drawinglayer xub_StrLen aTextPosition, xub_StrLen aTextLength, const ::std::vector< double >& rDXArray, - const FontAttributes& rFontAttributes, + const attribute::FontAttribute& rFontAttribute, const ::com::sun::star::lang::Locale& rLocale, const basegfx::BColor& rFontColor, /// local parameters const basegfx::BColor& rOverlineColor, const basegfx::BColor& rTextlineColor, - FontUnderline eFontOverline = FONT_UNDERLINE_NONE, - FontUnderline eFontUnderline = FONT_UNDERLINE_NONE, + TextLine eFontOverline = TEXT_LINE_NONE, + TextLine eFontUnderline = TEXT_LINE_NONE, bool bUnderlineAbove = false, FontStrikeout eFontStrikeout = FONT_STRIKEOUT_NONE, bool bWordLineMode = false, @@ -196,8 +132,8 @@ namespace drawinglayer bool bShadow = false); /// data read access - FontUnderline getFontOverline() const { return meFontOverline; } - FontUnderline getFontUnderline() const { return meFontUnderline; } + TextLine getFontOverline() const { return meFontOverline; } + TextLine getFontUnderline() const { return meFontUnderline; } FontStrikeout getFontStrikeout() const { return meFontStrikeout; } FontEmphasisMark getFontEmphasisMark() const { return meFontEmphasisMark; } FontRelief getFontRelief() const { return meFontRelief; } diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textenumsprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textenumsprimitive2d.hxx new file mode 100644 index 000000000000..ec2f7e656b40 --- /dev/null +++ b/drawinglayer/inc/drawinglayer/primitive2d/textenumsprimitive2d.hxx @@ -0,0 +1,110 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: wrongspellprimitive2d.hxx,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: aw $ $Date: 2008-05-27 14:11:17 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTENUMSPRIMITIVE2D_HXX +#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTENUMSPRIMITIVE2D_HXX + +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + /** TextLine definition + + This is used for both underline and overline + */ + enum TextLine + { + TEXT_LINE_NONE, + TEXT_LINE_SINGLE, + TEXT_LINE_DOUBLE, + TEXT_LINE_DOTTED, + TEXT_LINE_DASH, + TEXT_LINE_LONGDASH, + TEXT_LINE_DASHDOT, + TEXT_LINE_DASHDOTDOT, + TEXT_LINE_SMALLWAVE, + TEXT_LINE_WAVE, + TEXT_LINE_DOUBLEWAVE, + TEXT_LINE_BOLD, + TEXT_LINE_BOLDDOTTED, + TEXT_LINE_BOLDDASH, + TEXT_LINE_BOLDLONGDASH, + TEXT_LINE_BOLDDASHDOT, + TEXT_LINE_BOLDDASHDOTDOT, + TEXT_LINE_BOLDWAVE + }; + + /** FontStrikeout definition */ + enum FontStrikeout + { + FONT_STRIKEOUT_NONE, + FONT_STRIKEOUT_SINGLE, + FONT_STRIKEOUT_DOUBLE, + FONT_STRIKEOUT_BOLD, + FONT_STRIKEOUT_SLASH, + FONT_STRIKEOUT_X + }; + + /** FontEmphasisMark definition */ + enum FontEmphasisMark + { + FONT_EMPHASISMARK_NONE, + FONT_EMPHASISMARK_DOT, + FONT_EMPHASISMARK_CIRCLE, + FONT_EMPHASISMARK_DISC, + FONT_EMPHASISMARK_ACCENT + }; + + /** FontRelief definition */ + enum FontRelief + { + FONT_RELIEF_NONE, + FONT_RELIEF_EMBOSSED, + FONT_RELIEF_ENGRAVED + }; + + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTENUMSPRIMITIVE2D_HXX + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx index e0e2b6bbc4cb..f454459211df 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx @@ -50,8 +50,8 @@ class Font; class String; class OutputDevice; -namespace drawinglayer { namespace primitive2d { - class FontAttributes; +namespace drawinglayer { namespace attribute { + class FontAttribute; }} namespace basegfx { @@ -85,8 +85,8 @@ namespace drawinglayer /// tooling methods void setFont(const Font& rFont); - void setFontAttributes( - const FontAttributes& rFontAttributes, + void setFontAttribute( + const attribute::FontAttribute& rFontAttribute, double fFontScaleX, double fFontScaleY, const ::com::sun::star::lang::Locale & rLocale); @@ -114,6 +114,9 @@ namespace drawinglayer const String& rText, xub_StrLen nIndex, xub_StrLen nLength) const; + + double getFontAscent() const; + double getFontDescent() const; }; } // end of namespace primitive2d } // end of namespace drawinglayer @@ -125,25 +128,25 @@ namespace drawinglayer { namespace primitive2d { - /** Create a VCL-Font based on the definitions in FontAttributes + /** Create a VCL-Font based on the definitions in FontAttribute and the given FontScaling. The FontScaling defines the FontHeight (fFontScaleY) and the FontWidth (fFontScaleX). The combination of both defines FontStretching, where no stretching happens at fFontScaleY == fFontScaleX */ - Font getVclFontFromFontAttributes( - const FontAttributes& rFontAttributes, + Font getVclFontFromFontAttribute( + const attribute::FontAttribute& rFontAttribute, double fFontScaleX, double fFontScaleY, double fFontRotation, const ::com::sun::star::lang::Locale & rLocale); - /** Generate FontAttributes DataSet derived from the given VCL-Font. + /** Generate FontAttribute DataSet derived from the given VCL-Font. The FontScaling with fFontScaleY, fFontScaleX relationship (see above) will be set in return parameter o_rSize to allow further processing */ - FontAttributes getFontAttributesFromVclFont( + attribute::FontAttribute getFontAttributeFromVclFont( basegfx::B2DVector& o_rSize, const Font& rFont, bool bRTL, diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textlineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textlineprimitive2d.hxx new file mode 100644 index 000000000000..a103d607e85f --- /dev/null +++ b/drawinglayer/inc/drawinglayer/primitive2d/textlineprimitive2d.hxx @@ -0,0 +1,99 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: textdecoratedprimitive2d.hxx,v $ + * + * $Revision: 1.6 $ + * + * last change: $Author: aw $ $Date: 2008-05-27 14:11:17 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTLINEPRIMITIVE2D_HXX +#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTLINEPRIMITIVE2D_HXX + +#include +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class TextLinePrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + /// geometric definitions + basegfx::B2DHomMatrix maObjectTransformation; + double mfWidth; + double mfOffset; + double mfHeight; + + /// decoration definitions + TextLine meTextLine; + basegfx::BColor maLineColor; + + protected: + /// local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + + public: + /// constructor + TextLinePrimitive2D( + const basegfx::B2DHomMatrix& rObjectTransformation, + double fWidth, + double fOffset, + double fHeight, + TextLine eTextLine, + const basegfx::BColor& rLineColor); + + /// data read access + const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; } + double getWidth() const { return mfWidth; } + double getOffset() const { return mfOffset; } + double getHeight() const { return mfHeight; } + TextLine getTextLine() const { return meTextLine; } + const basegfx::BColor& getLineColor() const { return maLineColor; } + + /// compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; + + /// provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTLINEPRIMITIVE2D_HXX + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx index 43e06ecc3b53..bbcd8e335e23 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx @@ -43,6 +43,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// // predefines @@ -56,75 +57,6 @@ class OutputDevice; ////////////////////////////////////////////////////////////////////////////// -namespace drawinglayer -{ - namespace primitive2d - { - /** FontAttributes class - - This attribute class is able to hold all parameters needed/used - to completely define the parametrisation of a text portion. - */ - class FontAttributes - { - private: - /// core data - String maFamilyName; // Font Family Name - String maStyleName; // Font Style Name - sal_uInt16 mnWeight; // Font weight - - /// bitfield - unsigned mbSymbol : 1; // Symbol Font Flag - unsigned mbVertical : 1; // Vertical Text Flag - unsigned mbItalic : 1; // Italic Flag - unsigned mbOutline : 1; // Outline Flag - unsigned mbRTL : 1; // RTL Flag - unsigned mbBiDiStrong : 1; // BiDi Flag - // TODO: pair kerning and CJK kerning - - public: - /// constructor - FontAttributes( - const String& rFamilyName, - const String& rStyleName, - sal_uInt16 nWeight, - bool bSymbol = false, - bool bVertical = false, - bool bItalic = false, - bool bOutline = false, - bool bRTL = false, - bool bBiDiStrong = false) - : maFamilyName(rFamilyName), - maStyleName(rStyleName), - mnWeight(nWeight), - mbSymbol(bSymbol), - mbVertical(bVertical), - mbItalic(bItalic), - mbOutline(bOutline), - mbRTL(bRTL), - mbBiDiStrong(bBiDiStrong) - { - } - - /// compare operator - bool operator==(const FontAttributes& rCompare) const; - - /// data read access - const String& getFamilyName() const { return maFamilyName; } - const String& getStyleName() const { return maStyleName; } - sal_uInt16 getWeight() const { return mnWeight; } - bool getSymbol() const { return mbSymbol; } - bool getVertical() const { return mbVertical; } - bool getItalic() const { return mbItalic; } - bool getOutline() const { return mbOutline; } - bool getRTL() const { return mbRTL; } - bool getBiDiStrong() const { return mbBiDiStrong; } - }; - } // end of namespace primitive2d -} // end of namespace drawinglayer - -////////////////////////////////////////////////////////////////////////////// - namespace drawinglayer { namespace primitive2d @@ -158,7 +90,7 @@ namespace drawinglayer ::std::vector< double > maDXArray; /// The font to use - FontAttributes maFontAttributes; + attribute::FontAttribute maFontAttribute; /// The Locale for the text ::com::sun::star::lang::Locale maLocale; @@ -181,7 +113,7 @@ namespace drawinglayer xub_StrLen aTextPosition, xub_StrLen aTextLength, const ::std::vector< double >& rDXArray, - const FontAttributes& rFontAttributes, + const attribute::FontAttribute& rFontAttribute, const ::com::sun::star::lang::Locale& rLocale, const basegfx::BColor& rFontColor); @@ -197,7 +129,7 @@ namespace drawinglayer xub_StrLen getTextPosition() const { return maTextPosition; } xub_StrLen getTextLength() const { return maTextLength; } const ::std::vector< double >& getDXArray() const { return maDXArray; } - const FontAttributes& getFontAttributes() const { return maFontAttributes; } + const attribute::FontAttribute& getFontAttribute() const { return maFontAttribute; } const ::com::sun::star::lang::Locale& getLocale() const { return maLocale; } const basegfx::BColor& getFontColor() const { return maFontColor; } @@ -210,6 +142,10 @@ namespace drawinglayer /// provide unique ID DeclPrimitrive2DIDBlock() }; + + /// small helper to have a compare operator for Locale + bool LocalesAreEqual(const ::com::sun::star::lang::Locale& rA, const ::com::sun::star::lang::Locale& rB); + } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx new file mode 100644 index 000000000000..562eb681ddae --- /dev/null +++ b/drawinglayer/inc/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx @@ -0,0 +1,167 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: textdecoratedprimitive2d.hxx,v $ + * + * $Revision: 1.6 $ + * + * last change: $Author: aw $ $Date: 2008-05-27 14:11:17 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTSTRIKEOUTPRIMITIVE2D_HXX +#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTSTRIKEOUTPRIMITIVE2D_HXX + +#include +#include +#include +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class BaseTextStrikeoutPrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + /// geometric definitions + basegfx::B2DHomMatrix maObjectTransformation; + double mfWidth; + + /// decoration definitions + basegfx::BColor maFontColor; + + public: + /// constructor + BaseTextStrikeoutPrimitive2D( + const basegfx::B2DHomMatrix& rObjectTransformation, + double fWidth, + const basegfx::BColor& rFontColor); + + /// data read access + const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; } + double getWidth() const { return mfWidth; } + const basegfx::BColor& getFontColor() const { return maFontColor; } + + /// compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class TextCharacterStrikeoutPrimitive2D : public BaseTextStrikeoutPrimitive2D + { + private: + sal_Unicode maStrikeoutChar; + attribute::FontAttribute maFontAttribute; + ::com::sun::star::lang::Locale maLocale; + + protected: + /// local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + + public: + /// constructor + TextCharacterStrikeoutPrimitive2D( + const basegfx::B2DHomMatrix& rObjectTransformation, + double fWidth, + const basegfx::BColor& rFontColor, + sal_Unicode aStrikeoutChar, + const attribute::FontAttribute& rFontAttribute, + const ::com::sun::star::lang::Locale& rLocale); + + /// data read access + sal_Unicode getStrikeoutChar() const { return maStrikeoutChar; } + const attribute::FontAttribute& getFontAttribute() const { return maFontAttribute; } + const ::com::sun::star::lang::Locale& getLocale() const { return maLocale; } + + /// compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; + + /// provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class TextGeometryStrikeoutPrimitive2D : public BaseTextStrikeoutPrimitive2D + { + private: + double mfHeight; + double mfOffset; + FontStrikeout meFontStrikeout; + + protected: + /// local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + + public: + /// constructor + TextGeometryStrikeoutPrimitive2D( + const basegfx::B2DHomMatrix& rObjectTransformation, + double fWidth, + const basegfx::BColor& rFontColor, + double fHeight, + double fOffset, + FontStrikeout eFontStrikeout); + + /// data read access + double getHeight() const { return mfHeight; } + double getOffset() const { return mfOffset; } + FontStrikeout getFontStrikeout() const { return meFontStrikeout; } + + /// compare operator + virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; + + /// provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTSTRIKEOUTPRIMITIVE2D_HXX + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/inc/drawinglayer/primitive2d/wallpaperprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/wallpaperprimitive2d.hxx new file mode 100644 index 000000000000..ffe47cfe1b72 --- /dev/null +++ b/drawinglayer/inc/drawinglayer/primitive2d/wallpaperprimitive2d.hxx @@ -0,0 +1,102 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: bitmapprimitive2d.hxx,v $ + * + * $Revision: 1.4 $ + * + * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_WALLPAPERPRIMITIVE2D_HXX +#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_WALLPAPERPRIMITIVE2D_HXX + +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + /** WallpaperBitmapPrimitive2D class + + This is a specialized primtive for the Wallpaper definitions included in + VCL and Metafiles. The extraordinary about the bitmap definition part of + the Wallpaper is that it uses PIXEL size of the given Bitmap and not + the logic and/or discrete size derived by PrefMapMode/PrefSize methods. + To emulate this, a ViewTransformation dependent primitive is needed which + takes over the correct scaling(s). + + Since a specialized primitive is needed anyways, i opted to also add the + layouting which is dependent from WallpaperStyle; thus it does not need + to be handled anywhere else in the future. + */ + class WallpaperBitmapPrimitive2D : public ViewTransformationDependentPrimitive2D + { + private: + basegfx::B2DRange maObjectRange; + BitmapEx maBitmapEx; + WallpaperStyle meWallpaperStyle; + + protected: + /// create local decomposition + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + + public: + /// constructor + WallpaperBitmapPrimitive2D( + const basegfx::B2DRange& rObjectRange, + const BitmapEx& rBitmapEx, + WallpaperStyle eWallpaperStyle); + + /// data read access + const basegfx::B2DRange& getLocalObjectRange() const { return maObjectRange; } + const BitmapEx& getBitmapEx() const { return maBitmapEx ; } + WallpaperStyle getWallpaperStyle() const { return meWallpaperStyle; } + + /// compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + /// get B2Drange + virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; + + /// provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif // INCLUDED_DRAWINGLAYER_PRIMITIVE2D_WALLPAPERPRIMITIVE2D_HXX + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx index 052d42f7290e..f8b81e357ea5 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx @@ -179,19 +179,19 @@ namespace drawinglayer { private: /// bitmap fill attribute - attribute::FillBitmapAttribute maBitmap; + attribute::FillBitmapAttribute maFillBitmapAttribute; public: /// constructor BitmapTexturePrimitive3D( - const attribute::FillBitmapAttribute& rBitmap, + const attribute::FillBitmapAttribute& rFillBitmapAttribute, const Primitive3DSequence& rChildren, const basegfx::B2DVector& rTextureSize, bool bModulate, bool bFilter); /// data read access - const attribute::FillBitmapAttribute& getBitmap() const { return maBitmap; } + const attribute::FillBitmapAttribute& getFillBitmapAttribute() const { return maFillBitmapAttribute; } /// compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx index f0d0ff881bc5..38e7e5143b8a 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx @@ -97,7 +97,7 @@ namespace drawinglayer basegfx::B2DPolyPolygon maClipPolyPolygon; // the target MetaFile - GDIMetaFile& mrMetaFile; + GDIMetaFile* mpMetaFile; // do not allow embedding SvtGraphicFills into each other, // use a counter to prevent that diff --git a/drawinglayer/prj/d.lst b/drawinglayer/prj/d.lst index 1ba3c2e7b614..ee5b96d98a03 100644 --- a/drawinglayer/prj/d.lst +++ b/drawinglayer/prj/d.lst @@ -39,6 +39,7 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\primitive2d ..\inc\drawinglayer\primitive2d\sceneprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\sceneprimitive2d.hxx ..\inc\drawinglayer\primitive2d\shadowprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\shadowprimitive2d.hxx ..\inc\drawinglayer\primitive2d\structuretagprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\structuretagprimitive2d.hxx +..\inc\drawinglayer\primitive2d\textenumsprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\textenumsprimitive2d.hxx ..\inc\drawinglayer\primitive2d\texteffectprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\texteffectprimitive2d.hxx ..\inc\drawinglayer\primitive2d\textlayoutdevice.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\textlayoutdevice.hxx ..\inc\drawinglayer\primitive2d\textprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\textprimitive2d.hxx @@ -98,6 +99,7 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\processor3d mkdir: %_DEST%\inc%_EXT%\drawinglayer\attribute ..\inc\drawinglayer\attribute\fillattribute.hxx %_DEST%\inc%_EXT%\drawinglayer\attribute\fillattribute.hxx ..\inc\drawinglayer\attribute\fillbitmapattribute.hxx %_DEST%\inc%_EXT%\drawinglayer\attribute\fillbitmapattribute.hxx +..\inc\drawinglayer\attribute\fontattribute.hxx %_DEST%\inc%_EXT%\drawinglayer\attribute\fontattribute.hxx ..\inc\drawinglayer\attribute\materialattribute3d.hxx %_DEST%\inc%_EXT%\drawinglayer\attribute\materialattribute3d.hxx ..\inc\drawinglayer\attribute\sdrallattribute3d.hxx %_DEST%\inc%_EXT%\drawinglayer\attribute\sdrallattribute3d.hxx ..\inc\drawinglayer\attribute\sdrattribute.hxx %_DEST%\inc%_EXT%\drawinglayer\attribute\sdrattribute.hxx diff --git a/drawinglayer/source/attribute/fillbitmapattribute.cxx b/drawinglayer/source/attribute/fillbitmapattribute.cxx index 539e85ab2733..99afb234bda5 100644 --- a/drawinglayer/source/attribute/fillbitmapattribute.cxx +++ b/drawinglayer/source/attribute/fillbitmapattribute.cxx @@ -44,8 +44,12 @@ namespace drawinglayer { namespace attribute { - FillBitmapAttribute::FillBitmapAttribute(const Bitmap& rBitmap, const basegfx::B2DPoint& rTopLeft, const basegfx::B2DVector& rSize, bool bTiling) - : maBitmap(rBitmap), + FillBitmapAttribute::FillBitmapAttribute( + const BitmapEx& rBitmapEx, + const basegfx::B2DPoint& rTopLeft, + const basegfx::B2DVector& rSize, + bool bTiling) + : maBitmapEx(rBitmapEx), maTopLeft(rTopLeft), maSize(rSize), mbTiling(bTiling) @@ -54,10 +58,10 @@ namespace drawinglayer bool FillBitmapAttribute::operator==(const FillBitmapAttribute& rCandidate) const { - return (maBitmap == rCandidate.maBitmap - && maTopLeft == rCandidate.maTopLeft - && maSize == rCandidate.maSize - && mbTiling == rCandidate.mbTiling); + return (getBitmapEx() == rCandidate.getBitmapEx() + && getTopLeft() == rCandidate.getTopLeft() + && getSize() == rCandidate.getSize() + && getTiling() == rCandidate.getTiling()); } } // end of namespace attribute } // end of namespace drawinglayer diff --git a/drawinglayer/source/attribute/fontattribute.cxx b/drawinglayer/source/attribute/fontattribute.cxx new file mode 100644 index 000000000000..5163e2f6a59a --- /dev/null +++ b/drawinglayer/source/attribute/fontattribute.cxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: strokeattribute.cxx,v $ + * + * $Revision: 1.3 $ + * + * last change: $Author: aw $ $Date: 2008-05-27 14:11:19 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_drawinglayer.hxx" + +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace attribute + { + bool FontAttribute::operator==(const FontAttribute& rCompare) const + { + return (getFamilyName() == rCompare.getFamilyName() + && getStyleName() == rCompare.getStyleName() + && getWeight() == rCompare.getWeight() + && getSymbol() == rCompare.getSymbol() + && getVertical() == rCompare.getVertical() + && getItalic() == rCompare.getItalic() + && getOutline() == rCompare.getOutline() + && getRTL() == rCompare.getRTL() + && getBiDiStrong() == rCompare.getBiDiStrong()); + } + } // end of namespace attribute +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/source/attribute/makefile.mk b/drawinglayer/source/attribute/makefile.mk index fa91224e64b6..65f899f67177 100644 --- a/drawinglayer/source/attribute/makefile.mk +++ b/drawinglayer/source/attribute/makefile.mk @@ -47,6 +47,7 @@ ENABLE_EXCEPTIONS=TRUE SLOFILES= \ $(SLO)$/fillattribute.obj \ $(SLO)$/fillbitmapattribute.obj \ + $(SLO)$/fontattribute.obj \ $(SLO)$/materialattribute3d.obj \ $(SLO)$/sdrallattribute3d.obj \ $(SLO)$/sdrattribute.obj \ diff --git a/drawinglayer/source/attribute/sdrfillbitmapattribute.cxx b/drawinglayer/source/attribute/sdrfillbitmapattribute.cxx index c35d0ba5c15f..d7e9090b0f62 100644 --- a/drawinglayer/source/attribute/sdrfillbitmapattribute.cxx +++ b/drawinglayer/source/attribute/sdrfillbitmapattribute.cxx @@ -228,7 +228,7 @@ namespace drawinglayer aBitmapSize.setY(aBitmapSize.getY() / fRangeHeight); } - return FillBitmapAttribute(aBitmap, aBitmapTopLeft, aBitmapSize, mbTiling); + return FillBitmapAttribute(BitmapEx(aBitmap), aBitmapTopLeft, aBitmapSize, mbTiling); } } // end of namespace attribute } // end of namespace drawinglayer diff --git a/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx index 5900900bcf06..43de0ef3b514 100644 --- a/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx @@ -65,8 +65,8 @@ namespace drawinglayer { const BitmapPrimitive2D& rCompare = (BitmapPrimitive2D&)rPrimitive; - return (maBitmapEx == rCompare.maBitmapEx - && maTransform == rCompare.maTransform); + return (getBitmapEx() == rCompare.getBitmapEx() + && getTransform() == rCompare.getTransform()); } return false; diff --git a/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx new file mode 100644 index 000000000000..6e3a5b8e516e --- /dev/null +++ b/drawinglayer/source/primitive2d/discretebitmapprimitive2d.cxx @@ -0,0 +1,124 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: bitmapprimitive2d.cxx,v $ + * + * $Revision: 1.5 $ + * + * last change: $Author: aw $ $Date: 2008-05-27 14:11:20 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_drawinglayer.hxx" + +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + Primitive2DSequence DiscreteBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + // use getViewTransformation() and getObjectTransformation() from + // ObjectAndViewTransformationDependentPrimitive2D to create a BitmapPrimitive2D + // with the correct mapping + Primitive2DSequence xRetval; + + if(!getBitmapEx().IsEmpty()) + { + // get discrete size + const Size& rSizePixel = getBitmapEx().GetSizePixel(); + const basegfx::B2DVector aDiscreteSize(rSizePixel.Width(), rSizePixel.Height()); + + // get inverse ViewTransformation + basegfx::B2DHomMatrix aInverseViewTransformation(getViewTransformation()); + aInverseViewTransformation.invert(); + + // get size and position in world coordinates + const basegfx::B2DVector aWorldSize(aInverseViewTransformation * aDiscreteSize); + const basegfx::B2DPoint aWorldTopLeft(getObjectTransformation() * getTopLeft()); + + // build object matrix in world coordinates so that the top-left + // position remains, but eventual transformations (e.g. rotations) + // in the ObjectToView stack remain and get correctly applied + basegfx::B2DHomMatrix aObjectTransform; + + aObjectTransform.set(0, 0, aWorldSize.getX()); + aObjectTransform.set(1, 1, aWorldSize.getY()); + aObjectTransform.set(0, 2, aWorldTopLeft.getX()); + aObjectTransform.set(1, 2, aWorldTopLeft.getY()); + + // get inverse ObjectTransformation + basegfx::B2DHomMatrix aInverseObjectTransformation(getObjectTransformation()); + aInverseObjectTransformation.invert(); + + // transform to object coordinate system + aObjectTransform = aInverseObjectTransformation * aObjectTransform; + + // create BitmapPrimitive2D with now object-local coordinate data + const Primitive2DReference xRef(new BitmapPrimitive2D(getBitmapEx(), aObjectTransform)); + xRetval = Primitive2DSequence(&xRef, 1); + } + + return xRetval; + } + + DiscreteBitmapPrimitive2D::DiscreteBitmapPrimitive2D( + const BitmapEx& rBitmapEx, + const basegfx::B2DPoint& rTopLeft) + : ObjectAndViewTransformationDependentPrimitive2D(), + maBitmapEx(rBitmapEx), + maTopLeft(rTopLeft) + { + } + + bool DiscreteBitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const + { + if(ObjectAndViewTransformationDependentPrimitive2D::operator==(rPrimitive)) + { + const DiscreteBitmapPrimitive2D& rCompare = (DiscreteBitmapPrimitive2D&)rPrimitive; + + return (getBitmapEx() == rCompare.getBitmapEx() + && getTopLeft() == rCompare.getTopLeft()); + } + + return false; + } + + // provide unique ID + ImplPrimitrive2DIDBlock(DiscreteBitmapPrimitive2D, PRIMITIVE2D_ID_DISCRETEBITMAPPRIMITIVE2D) + + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx index 57d5d7c00c7c..ab9e9d19f6d2 100644 --- a/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx @@ -56,7 +56,7 @@ namespace drawinglayer { Primitive2DSequence FillBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { - const Size aTileSizePixel(getFillBitmap().getBitmap().GetSizePixel()); + const Size aTileSizePixel(getFillBitmap().getBitmapEx().GetSizePixel()); Primitive2DSequence aRetval; // is there a tile with some size at all? @@ -79,7 +79,7 @@ namespace drawinglayer aNewMatrix *= getTransformation(); // create bitmap primitive and add to result - const Primitive2DReference xRef(new BitmapPrimitive2D(BitmapEx(getFillBitmap().getBitmap()), aNewMatrix)); + const Primitive2DReference xRef(new BitmapPrimitive2D(getFillBitmap().getBitmapEx(), aNewMatrix)); aRetval[a] = xRef; } } @@ -94,7 +94,7 @@ namespace drawinglayer aObjectTransform *= getTransformation(); // create bitmap primitive and add exclusive to decomposition (hand over ownership) - const Primitive2DReference xRef(new BitmapPrimitive2D(BitmapEx(getFillBitmap().getBitmap()), aObjectTransform)); + const Primitive2DReference xRef(new BitmapPrimitive2D(getFillBitmap().getBitmapEx(), aObjectTransform)); aRetval = Primitive2DSequence(&xRef, 1L); } } diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx index 2bc280b577fd..625dae6cb93a 100644 --- a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx @@ -54,37 +54,27 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence FillGradientPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + void FillGradientPrimitive2D::generateMatricesAndColors( + std::vector< basegfx::B2DHomMatrix >& rMatrices, + std::vector< basegfx::BColor >& rColors) const { - const attribute::GradientStyle aGradientStyle(maFillGradient.getStyle()); - ::std::vector< basegfx::B2DHomMatrix > aMatrices; - ::std::vector< basegfx::BColor > aColors; - basegfx::B2DPolygon aUnitPolygon; - sal_uInt32 nSteps(maFillGradient.getSteps()); - - if(attribute::GRADIENTSTYLE_RADIAL == aGradientStyle || attribute::GRADIENTSTYLE_ELLIPTICAL == aGradientStyle) - { - const basegfx::B2DPoint aCircleCenter(0.5, 0.5); - aUnitPolygon = basegfx::tools::createPolygonFromEllipse(aCircleCenter, 0.5, 0.5); - } - else - { - aUnitPolygon = basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0)); - } + rMatrices.clear(); + rColors.clear(); // make sure steps is not too high/low const basegfx::BColor aStart(maFillGradient.getStartColor()); const basegfx::BColor aEnd(maFillGradient.getEndColor()); const sal_uInt32 nMaxSteps(sal_uInt32((aStart.getMaximumDistance(aEnd) * 127.5) + 0.5)); + sal_uInt32 nSteps(maFillGradient.getSteps()); - if(nSteps == 0L) + if(nSteps == 0) { nSteps = nMaxSteps; } - if(nSteps < 2L) + if(nSteps < 2) { - nSteps = 2L; + nSteps = 2; } if(nSteps > nMaxSteps) @@ -92,78 +82,180 @@ namespace drawinglayer nSteps = nMaxSteps; } - switch(aGradientStyle) + switch(maFillGradient.getStyle()) { case attribute::GRADIENTSTYLE_LINEAR: { texture::GeoTexSvxGradientLinear aGradient(getObjectRange(), aStart, aEnd, nSteps, maFillGradient.getBorder(), -maFillGradient.getAngle()); - aGradient.appendTransformations(aMatrices); - aGradient.appendColors(aColors); + aGradient.appendTransformations(rMatrices); + aGradient.appendColors(rColors); break; } case attribute::GRADIENTSTYLE_AXIAL: { texture::GeoTexSvxGradientAxial aGradient(getObjectRange(), aStart, aEnd, nSteps, maFillGradient.getBorder(), -maFillGradient.getAngle()); - aGradient.appendTransformations(aMatrices); - aGradient.appendColors(aColors); + aGradient.appendTransformations(rMatrices); + aGradient.appendColors(rColors); break; } case attribute::GRADIENTSTYLE_RADIAL: { texture::GeoTexSvxGradientRadial aGradient(getObjectRange(), aStart, aEnd, nSteps, maFillGradient.getBorder(), maFillGradient.getOffsetX(), maFillGradient.getOffsetY()); - aGradient.appendTransformations(aMatrices); - aGradient.appendColors(aColors); + aGradient.appendTransformations(rMatrices); + aGradient.appendColors(rColors); break; } case attribute::GRADIENTSTYLE_ELLIPTICAL: { texture::GeoTexSvxGradientElliptical aGradient(getObjectRange(), aStart, aEnd, nSteps, maFillGradient.getBorder(), maFillGradient.getOffsetX(), maFillGradient.getOffsetY(), -maFillGradient.getAngle()); - aGradient.appendTransformations(aMatrices); - aGradient.appendColors(aColors); + aGradient.appendTransformations(rMatrices); + aGradient.appendColors(rColors); break; } case attribute::GRADIENTSTYLE_SQUARE: { texture::GeoTexSvxGradientSquare aGradient(getObjectRange(), aStart, aEnd, nSteps, maFillGradient.getBorder(), maFillGradient.getOffsetX(), maFillGradient.getOffsetY(), -maFillGradient.getAngle()); - aGradient.appendTransformations(aMatrices); - aGradient.appendColors(aColors); + aGradient.appendTransformations(rMatrices); + aGradient.appendColors(rColors); break; } case attribute::GRADIENTSTYLE_RECT: { texture::GeoTexSvxGradientRect aGradient(getObjectRange(), aStart, aEnd, nSteps, maFillGradient.getBorder(), maFillGradient.getOffsetX(), maFillGradient.getOffsetY(), -maFillGradient.getAngle()); - aGradient.appendTransformations(aMatrices); - aGradient.appendColors(aColors); + aGradient.appendTransformations(rMatrices); + aGradient.appendColors(rColors); break; } } + } + Primitive2DSequence FillGradientPrimitive2D::createOverlappingFill( + const std::vector< basegfx::B2DHomMatrix >& rMatrices, + const std::vector< basegfx::BColor >& rColors, + const basegfx::B2DPolygon& rUnitPolygon) const + { // prepare return value - Primitive2DSequence aRetval(aColors.size() ? aMatrices.size() + 1L : aMatrices.size()); + Primitive2DSequence aRetval(rColors.size() ? rMatrices.size() + 1 : rMatrices.size()); // create solid fill with start color - if(aColors.size()) + if(rColors.size()) { // create primitive - const Primitive2DReference xRef(new PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(getObjectRange())), aColors[0L])); - aRetval[0L] = xRef; + const Primitive2DReference xRef( + new PolyPolygonColorPrimitive2D( + basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(getObjectRange())), + rColors[0])); + aRetval[0] = xRef; } // create solid fill steps - for(sal_uInt32 a(0L); a < aMatrices.size(); a++) + for(sal_uInt32 a(0); a < rMatrices.size(); a++) { // create part polygon - basegfx::B2DPolygon aNewPoly(aUnitPolygon); - aNewPoly.transform(aMatrices[a]); + basegfx::B2DPolygon aNewPoly(rUnitPolygon); + aNewPoly.transform(rMatrices[a]); // create solid fill - const Primitive2DReference xRef(new PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aNewPoly), aColors[a + 1L])); - aRetval[a + 1L] = xRef; + const Primitive2DReference xRef( + new PolyPolygonColorPrimitive2D( + basegfx::B2DPolyPolygon(aNewPoly), + rColors[a + 1])); + aRetval[a + 1] = xRef; + } + + return aRetval; + } + + Primitive2DSequence FillGradientPrimitive2D::createNonOverlappingFill( + const std::vector< basegfx::B2DHomMatrix >& rMatrices, + const std::vector< basegfx::BColor >& rColors, + const basegfx::B2DPolygon& rUnitPolygon) const + { + // prepare return value + Primitive2DSequence aRetval; + const sal_uInt32 nMatricesSize(rMatrices.size()); + + if(nMatricesSize) + { + basegfx::B2DPolygon aOuterPoly(rUnitPolygon); + aOuterPoly.transform(rMatrices[0]); + basegfx::B2DPolyPolygon aCombinedPolyPoly(aOuterPoly); + const sal_uInt32 nEntryCount(rColors.size() ? rMatrices.size() + 1 : rMatrices.size()); + sal_uInt32 nIndex(0); + + aRetval.realloc(nEntryCount); + + if(rColors.size()) + { + basegfx::B2DRange aOuterPolyRange(aOuterPoly.getB2DRange()); + aOuterPolyRange.expand(getObjectRange()); + aCombinedPolyPoly.append(basegfx::tools::createPolygonFromRect(aOuterPolyRange)); + aRetval[nIndex++] = Primitive2DReference(new PolyPolygonColorPrimitive2D(aCombinedPolyPoly, rColors[0])); + aCombinedPolyPoly = basegfx::B2DPolyPolygon(aOuterPoly); + } + + for(sal_uInt32 a(1); a < nMatricesSize - 1; a++) + { + basegfx::B2DPolygon aInnerPoly(rUnitPolygon); + aInnerPoly.transform(rMatrices[a]); + aCombinedPolyPoly.append(aInnerPoly); + aRetval[nIndex++] = Primitive2DReference(new PolyPolygonColorPrimitive2D(aCombinedPolyPoly, rColors[a])); + aCombinedPolyPoly = basegfx::B2DPolyPolygon(aInnerPoly); + } + + if(rColors.size()) + { + aRetval[nIndex] = Primitive2DReference(new PolyPolygonColorPrimitive2D( + aCombinedPolyPoly, rColors[rColors.size() - 1])); + } } return aRetval; } + Primitive2DSequence FillGradientPrimitive2D::createFill(bool bOverlapping) const + { + // prepare shape of the Unit Polygon + basegfx::B2DPolygon aUnitPolygon; + + if(attribute::GRADIENTSTYLE_RADIAL == maFillGradient.getStyle() + || attribute::GRADIENTSTYLE_ELLIPTICAL == maFillGradient.getStyle()) + { + const basegfx::B2DPoint aCircleCenter(0.5, 0.5); + aUnitPolygon = basegfx::tools::createPolygonFromEllipse(aCircleCenter, 0.5, 0.5); + } + else + { + aUnitPolygon = basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0)); + } + + // get the transform matrices and colors (where colors + // will have one more entry that matrices) + std::vector< basegfx::B2DHomMatrix > aMatrices; + std::vector< basegfx::BColor > aColors; + generateMatricesAndColors(aMatrices, aColors); + + if(bOverlapping) + { + return createOverlappingFill(aMatrices, aColors, aUnitPolygon); + } + else + { + return createNonOverlappingFill(aMatrices, aColors, aUnitPolygon); + } + } + + Primitive2DSequence FillGradientPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + // default creates overlapping fill which works with AntiAliasing and without. + // The non-overlapping version does not create single filled polygons, but + // PolyPolygons where each one describes a 'ring' for the gradient such + // that the rings will not overlap. This is useful fir the old XOR-paint + // 'trick' of VCL which is recorded in Metafiles; so this version may be + // used from the MetafilePrimitive2D in it's decomposition. + return createFill(true); + } + FillGradientPrimitive2D::FillGradientPrimitive2D( const basegfx::B2DRange& rObjectRange, const attribute::FillGradientAttribute& rFillGradient) diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index d5282116d46f..eca68858cbb5 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -207,23 +207,54 @@ namespace ////////////////////////////////////////////////////////////////////////////// +#include +#include +#include + namespace drawinglayer { namespace primitive2d { - Primitive2DSequence GraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence GraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence aRetval; if(255L != getGraphicAttr().GetTransparency()) { - // get transformed graphic. Suppress rotation and cropping, only filtering is needed - // here (and may be replaced later on). Cropping is handled below as mask primitive (if set) + Primitive2DReference xPrimitive; + + // do not apply mirroring from GraphicAttr to the Metafile by calling + // GetTransformedGraphic, this will try to mirror the Metafile using Scale() + // at the Metafile. This again calls Scale at the single MetaFile actions, + // but this implementation never worked. I reworked that implementations, + // but for security reasons i will try not to use it. + basegfx::B2DHomMatrix aTransform(getTransform()); + + if(getGraphicAttr().IsMirrored()) + { + // content needs mirroring + const bool bHMirr(getGraphicAttr().GetMirrorFlags() & BMP_MIRROR_HORZ); + const bool bVMirr(getGraphicAttr().GetMirrorFlags() & BMP_MIRROR_VERT); + + // mirror by applying negative scale to the unit primitive and + // applying the object transformation on it. + aTransform = basegfx::tools::createScaleB2DHomMatrix( + bHMirr ? -1.0 : 1.0, + bVMirr ? -1.0 : 1.0); + aTransform.translate( + bHMirr ? 1.0 : 0.0, + bVMirr ? 1.0 : 0.0); + aTransform = getTransform() * aTransform; + } + + // Get transformed graphic. Suppress rotation and cropping, only filtering is needed + // here (and may be replaced later on). Cropping is handled below as mask primitive (if set). + // Also need to suppress mirroring, it is part of the transformation now (see above). GraphicAttr aSuppressGraphicAttr(getGraphicAttr()); - aSuppressGraphicAttr.SetCrop(0L, 0L, 0L, 0L); + aSuppressGraphicAttr.SetCrop(0, 0, 0, 0); aSuppressGraphicAttr.SetRotation(0); - Graphic aTransformedGraphic(getGraphicObject().GetTransformedGraphic(&aSuppressGraphicAttr)); - Primitive2DReference xPrimitive; + aSuppressGraphicAttr.SetMirrorFlags(0); + const Graphic aTransformedGraphic(getGraphicObject().GetTransformedGraphic(&aSuppressGraphicAttr)); switch(aTransformedGraphic.GetType()) { @@ -244,7 +275,7 @@ namespace drawinglayer { animation::AnimationEntryFixed aTime((double)aData.stepTime(a), (double)a / (double)aData.count()); aAnimationLoop.append(aTime); - const Primitive2DReference xRef(new BitmapPrimitive2D(aData.stepBitmapEx(a), getTransform())); + const Primitive2DReference xRef(new BitmapPrimitive2D(aData.stepBitmapEx(a), aTransform)); aBitmapPrimitives[a] = xRef; } @@ -258,7 +289,7 @@ namespace drawinglayer } else { - xPrimitive = Primitive2DReference(new BitmapPrimitive2D(aTransformedGraphic.GetBitmapEx(), getTransform())); + xPrimitive = Primitive2DReference(new BitmapPrimitive2D(aTransformedGraphic.GetBitmapEx(), aTransform)); } break; @@ -267,35 +298,440 @@ namespace drawinglayer case GRAPHIC_GDIMETAFILE : { // create MetafilePrimitive2D - const GDIMetaFile& rMetafile = aTransformedGraphic.GetGDIMetaFile(); - - xPrimitive = Primitive2DReference( - new MetafilePrimitive2D( - getTransform(), - rMetafile)); - - // #i100357# find out if clipping is needed for this primitive. Unfortunately, - // there exist Metafiles who's content is bigger than the proposed PrefSize set - // at them. This is an error, but we need to work around this - const Size aMetaFilePrefSize(rMetafile.GetPrefSize()); - const Size aMetaFileRealSize( - const_cast< GDIMetaFile& >(rMetafile).GetBoundRect( - *Application::GetDefaultDevice()).GetSize()); - - if(aMetaFileRealSize.getWidth() > aMetaFilePrefSize.getWidth() - || aMetaFileRealSize.getHeight() > aMetaFilePrefSize.getHeight()) + static bool bDoTest(false); + + if(bDoTest) + { + GDIMetaFile aMtf; + VirtualDevice aOut; + const basegfx::B2DRange aRange(getB2DRange(rViewInformation)); + const Rectangle aRectangle( + basegfx::fround(aRange.getMinX()), basegfx::fround(aRange.getMinY()), + basegfx::fround(aRange.getMaxX()), basegfx::fround(aRange.getMaxY())); + const Point aOrigin(aRectangle.TopLeft()); + const Fraction aScaleX(aRectangle.getWidth()); + const Fraction aScaleY(aRectangle.getHeight()); + MapMode aMapMode(MAP_100TH_MM, aOrigin, aScaleX, aScaleY); + + Size aDummySize(2, 2); + aOut.SetOutputSizePixel(aDummySize); + aOut.EnableOutput(FALSE); + aOut.SetMapMode(aMapMode); + + aMtf.Clear(); + aMtf.Record(&aOut); + + const Fraction aNeutralFraction(1, 1); + const MapMode aRelativeMapMode( + MAP_RELATIVE, + Point(-aRectangle.Left(), -aRectangle.Top()), + aNeutralFraction, aNeutralFraction); + aOut.SetMapMode(aRelativeMapMode); + + if(false) + { + const sal_Int32 nHor(aRectangle.getWidth() / 4); + const sal_Int32 nVer(aRectangle.getHeight() / 4); + const Rectangle aCenteredRectangle( + aRectangle.Left() + nHor, aRectangle.Top() + nVer, + aRectangle.Right() - nHor, aRectangle.Bottom() - nVer); + aOut.SetClipRegion(aCenteredRectangle); + } + + if(false) + { + const Rectangle aRightRectangle(aRectangle.TopCenter(), aRectangle.BottomRight()); + aOut.IntersectClipRegion(aRightRectangle); + } + + if(false) + { + const Rectangle aRightRectangle(aRectangle.TopCenter(), aRectangle.BottomRight()); + const Rectangle aBottomRectangle(aRectangle.LeftCenter(), aRectangle.BottomRight()); + Region aRegion(aRightRectangle); + aRegion.Intersect(aBottomRectangle); + aOut.IntersectClipRegion(aRegion); + } + + if(false) + { + const sal_Int32 nHor(aRectangle.getWidth() / 10); + const sal_Int32 nVer(aRectangle.getHeight() / 10); + aOut.MoveClipRegion(nHor, nVer); + } + + if(false) + { + Wallpaper aWallpaper(Color(COL_BLACK)); + aOut.DrawWallpaper(aRectangle, aWallpaper); + } + + if(false) + { + Wallpaper aWallpaper(Gradient(GRADIENT_LINEAR, Color(COL_RED), Color(COL_GREEN))); + aOut.DrawWallpaper(aRectangle, aWallpaper); + } + + if(false) + { + SvFileStream aRead((const String&)String(ByteString( "c:\\test.png" ), RTL_TEXTENCODING_UTF8), STREAM_READ); + vcl::PNGReader aPNGReader(aRead); + BitmapEx aBitmapEx(aPNGReader.Read()); + Wallpaper aWallpaper(aBitmapEx); + aOut.DrawWallpaper(aRectangle, aWallpaper); + } + + if(false) + { + const double fHor(aRectangle.getWidth()); + const double fVer(aRectangle.getHeight()); + Color aColor(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)); + + for(sal_uInt32 a(0); a < 5000; a++) + { + const Point aPoint( + aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)), + aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0))); + + if(!(a % 3)) + { + aColor = Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0)); + } + + aOut.DrawPixel(aPoint, aColor); + } + } + + if(false) + { + const double fHor(aRectangle.getWidth()); + const double fVer(aRectangle.getHeight()); + + aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.SetFillColor(); + + for(sal_uInt32 a(0); a < 5000; a++) + { + const Point aPoint( + aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)), + aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0))); + aOut.DrawPixel(aPoint); + } + } + + if(false) + { + const double fHor(aRectangle.getWidth()); + const double fVer(aRectangle.getHeight()); + + aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.SetFillColor(); + + Point aStart( + aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)), + aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0))); + Point aStop( + aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)), + aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0))); + + LineInfo aLineInfo(LINE_SOLID, basegfx::fround(fHor / 50.0)); + bool bUseLineInfo(false); + + for(sal_uInt32 a(0); a < 20; a++) + { + if(!(a%6)) + { + bUseLineInfo = !bUseLineInfo; + } + + if(!(a%4)) + { + aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + } + + if(a%3) + { + aStart = aStop; + aStop = Point( + aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)), + aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0))); + } + else + { + aStart = Point( + aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)), + aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0))); + aStop = Point( + aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)), + aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0))); + } + + if(bUseLineInfo) + { + aOut.DrawLine(aStart, aStop, aLineInfo); + } + else + { + aOut.DrawLine(aStart, aStop); + } + } + } + + if(false) + { + aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.DrawRect(aRectangle); + } + + if(false) + { + aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + const sal_uInt32 nHor(aRectangle.getWidth() / 10); + const sal_uInt32 nVer(aRectangle.getHeight() / 10); + aOut.DrawRect(aRectangle, nHor, nVer); + } + + if(false) + { + aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.DrawEllipse(aRectangle); + } + + if(false) + { + aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.DrawArc(aRectangle, aRectangle.TopLeft(), aRectangle.BottomCenter()); + } + + if(false) + { + aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.DrawPie(aRectangle, aRectangle.TopLeft(), aRectangle.BottomCenter()); + } + + if(false) + { + aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.DrawChord(aRectangle, aRectangle.TopLeft(), aRectangle.BottomCenter()); + } + + if(false) + { + const double fHor(aRectangle.getWidth()); + const double fVer(aRectangle.getHeight()); + + for(sal_uInt32 b(0); b < 5; b++) + { + const sal_uInt32 nCount(basegfx::fround(rand() * (20 / 32767.0))); + const bool bClose(basegfx::fround(rand() / 32767.0)); + Polygon aPolygon(nCount + (bClose ? 1 : 0)); + + for(sal_uInt32 a(0); a < nCount; a++) + { + const Point aPoint( + aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)), + aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0))); + aPolygon[a] = aPoint; + } + + if(bClose) + { + aPolygon[aPolygon.GetSize() - 1] = aPolygon[0]; + } + + aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + + if(!(b%2)) + { + const LineInfo aLineInfo(LINE_SOLID, basegfx::fround(fHor / 50.0)); + aOut.DrawPolyLine(aPolygon, aLineInfo); + } + else + { + aOut.DrawPolyLine(aPolygon); + } + } + } + + if(false) + { + const double fHor(aRectangle.getWidth()); + const double fVer(aRectangle.getHeight()); + + for(sal_uInt32 b(0); b < 5; b++) + { + const sal_uInt32 nCount(basegfx::fround(rand() * (20 / 32767.0))); + const bool bClose(basegfx::fround(rand() / 32767.0)); + Polygon aPolygon(nCount + (bClose ? 1 : 0)); + + for(sal_uInt32 a(0); a < nCount; a++) + { + const Point aPoint( + aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)), + aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0))); + aPolygon[a] = aPoint; + } + + if(bClose) + { + aPolygon[aPolygon.GetSize() - 1] = aPolygon[0]; + } + + aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.DrawPolygon(aPolygon); + } + } + + if(false) + { + const double fHor(aRectangle.getWidth()); + const double fVer(aRectangle.getHeight()); + PolyPolygon aPolyPolygon; + + for(sal_uInt32 b(0); b < 3; b++) + { + const sal_uInt32 nCount(basegfx::fround(rand() * (6 / 32767.0))); + const bool bClose(basegfx::fround(rand() / 32767.0)); + Polygon aPolygon(nCount + (bClose ? 1 : 0)); + + for(sal_uInt32 a(0); a < nCount; a++) + { + const Point aPoint( + aRectangle.Left() + basegfx::fround(rand() * (fHor / 32767.0)), + aRectangle.Top() + basegfx::fround(rand() * (fVer / 32767.0))); + aPolygon[a] = aPoint; + } + + if(bClose) + { + aPolygon[aPolygon.GetSize() - 1] = aPolygon[0]; + } + + aPolyPolygon.Insert(aPolygon); + } + + aOut.SetLineColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.SetFillColor(Color(basegfx::BColor(rand() / 32767.0, rand() / 32767.0, rand() / 32767.0))); + aOut.DrawPolyPolygon(aPolyPolygon); + } + + if(false) + { + SvFileStream aRead((const String&)String(ByteString( "c:\\test.png" ), RTL_TEXTENCODING_UTF8), STREAM_READ); + vcl::PNGReader aPNGReader(aRead); + BitmapEx aBitmapEx(aPNGReader.Read()); + aOut.DrawBitmapEx(aRectangle.TopLeft(), aBitmapEx); + } + + if(false) + { + SvFileStream aRead((const String&)String(ByteString( "c:\\test.png" ), RTL_TEXTENCODING_UTF8), STREAM_READ); + vcl::PNGReader aPNGReader(aRead); + BitmapEx aBitmapEx(aPNGReader.Read()); + aOut.DrawBitmapEx(aRectangle.TopLeft(), aRectangle.GetSize(), aBitmapEx); + } + + if(false) + { + SvFileStream aRead((const String&)String(ByteString( "c:\\test.png" ), RTL_TEXTENCODING_UTF8), STREAM_READ); + vcl::PNGReader aPNGReader(aRead); + BitmapEx aBitmapEx(aPNGReader.Read()); + const Size aSizePixel(aBitmapEx.GetSizePixel()); + aOut.DrawBitmapEx( + aRectangle.TopLeft(), + aRectangle.GetSize(), + Point(0, 0), + Size(aSizePixel.Width() /2, aSizePixel.Height() / 2), + aBitmapEx); + } + + if(false) + { + const double fHor(aRectangle.getWidth()); + const double fVer(aRectangle.getHeight()); + const Point aPointA( + aRectangle.Left() + basegfx::fround(fHor * 0.2), + aRectangle.Top() + basegfx::fround(fVer * 0.3)); + const Point aPointB( + aRectangle.Left() + basegfx::fround(fHor * 0.2), + aRectangle.Top() + basegfx::fround(fVer * 0.5)); + const Point aPointC( + aRectangle.Left() + basegfx::fround(fHor * 0.2), + aRectangle.Top() + basegfx::fround(fVer * 0.7)); + const String aText(ByteString("Hello, World!"), RTL_TEXTENCODING_UTF8); + + const String aFontName(ByteString("Comic Sans MS"), RTL_TEXTENCODING_UTF8); + Font aFont(aFontName, Size(0, 1000)); + aFont.SetAlign(ALIGN_BASELINE); + aFont.SetColor(COL_RED); + //sal_Int32* pDXArray = new sal_Int32[aText.Len()]; + + aFont.SetOutline(true); + aOut.SetFont(aFont); + aOut.DrawText(aPointA, aText, 0, aText.Len()); + + aFont.SetShadow(true); + aOut.SetFont(aFont); + aOut.DrawText(aPointB, aText, 0, aText.Len()); + + aFont.SetRelief(RELIEF_EMBOSSED); + aOut.SetFont(aFont); + aOut.DrawText(aPointC, aText, 0, aText.Len()); + + //delete pDXArray; + } + + aMtf.Stop(); + aMtf.WindStart(); + aMtf.SetPrefMapMode(MapMode(MAP_100TH_MM)); + aMtf.SetPrefSize(Size(aRectangle.getWidth(), aRectangle.getHeight())); + + xPrimitive = Primitive2DReference( + new MetafilePrimitive2D( + aTransform, + aMtf)); + } + else { - // clipping needed. Embed to MaskPrimitive2D. Create childs and mask polygon - const primitive2d::Primitive2DSequence aChildContent(&xPrimitive, 1); - basegfx::B2DPolygon aMaskPolygon( - basegfx::tools::createPolygonFromRect( - basegfx::B2DRange(0.0, 0.0, 1.0, 1.0))); - aMaskPolygon.transform(getTransform()); + const Graphic aGraphic(getGraphicObject().GetGraphic()); + const GDIMetaFile& rMetafile = aTransformedGraphic.GetGDIMetaFile(); xPrimitive = Primitive2DReference( - new MaskPrimitive2D( - basegfx::B2DPolyPolygon(aMaskPolygon), - aChildContent)); + new MetafilePrimitive2D( + aTransform, + rMetafile)); + + // #i100357# find out if clipping is needed for this primitive. Unfortunately, + // there exist Metafiles who's content is bigger than the proposed PrefSize set + // at them. This is an error, but we need to work around this + const Size aMetaFilePrefSize(rMetafile.GetPrefSize()); + const Size aMetaFileRealSize( + const_cast< GDIMetaFile& >(rMetafile).GetBoundRect( + *Application::GetDefaultDevice()).GetSize()); + + if(aMetaFileRealSize.getWidth() > aMetaFilePrefSize.getWidth() + || aMetaFileRealSize.getHeight() > aMetaFilePrefSize.getHeight()) + { + // clipping needed. Embed to MaskPrimitive2D. Create childs and mask polygon + const primitive2d::Primitive2DSequence aChildContent(&xPrimitive, 1); + basegfx::B2DPolygon aMaskPolygon( + basegfx::tools::createPolygonFromRect( + basegfx::B2DRange(0.0, 0.0, 1.0, 1.0))); + aMaskPolygon.transform(aTransform); + + xPrimitive = Primitive2DReference( + new MaskPrimitive2D( + basegfx::B2DPolyPolygon(aMaskPolygon), + aChildContent)); + } } break; diff --git a/drawinglayer/source/primitive2d/makefile.mk b/drawinglayer/source/primitive2d/makefile.mk index e10d1ddbcc71..5da4d9c35587 100644 --- a/drawinglayer/source/primitive2d/makefile.mk +++ b/drawinglayer/source/primitive2d/makefile.mk @@ -53,6 +53,7 @@ SLOFILES= \ $(SLO)$/borderlineprimitive2d.obj \ $(SLO)$/chartprimitive2d.obj \ $(SLO)$/controlprimitive2d.obj \ + $(SLO)$/discretebitmapprimitive2d.obj \ $(SLO)$/embedded3dprimitive2d.obj \ $(SLO)$/fillbitmapprimitive2d.obj \ $(SLO)$/fillgradientprimitive2d.obj \ @@ -78,11 +79,14 @@ SLOFILES= \ $(SLO)$/structuretagprimitive2d.obj \ $(SLO)$/texteffectprimitive2d.obj \ $(SLO)$/textlayoutdevice.obj \ + $(SLO)$/textlineprimitive2d.obj \ $(SLO)$/textprimitive2d.obj \ + $(SLO)$/textstrikeoutprimitive2d.obj \ $(SLO)$/textdecoratedprimitive2d.obj \ $(SLO)$/texthierarchyprimitive2d.obj \ $(SLO)$/transformprimitive2d.obj \ $(SLO)$/unifiedalphaprimitive2d.obj \ + $(SLO)$/wallpaperprimitive2d.obj \ $(SLO)$/wrongspellprimitive2d.obj # --- Targets ---------------------------------- diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 2d1c0428a6a3..a12172939e99 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -39,6 +39,36 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include ////////////////////////////////////////////////////////////////////////////// @@ -46,14 +76,2465 @@ using namespace com::sun::star; ////////////////////////////////////////////////////////////////////////////// +namespace +{ + class PropertyHolder + { + private: + basegfx::B2DHomMatrix maTransformation; + MapUnit maMapUnit; + + basegfx::BColor maLineColor; + basegfx::BColor maFillColor; + basegfx::BColor maTextColor; + basegfx::BColor maTextFillColor; + basegfx::BColor maTextLineColor; + basegfx::BColor maOverlineColor; + + Region maRegion; + Font maFont; + RasterOp maRasterOp; + sal_uInt32 mnLayoutMode; + LanguageType maLanguageType; + + /// bitfield + bool mbLineColor : 1; + bool mbFillColor : 1; + bool mbTextColor : 1; + bool mbTextFillColor : 1; + bool mbTextLineColor : 1; + bool mbOverlineColor : 1; + bool mbRegion : 1; + + public: + PropertyHolder() + : maTransformation(), + maMapUnit(MAP_100TH_MM), + maLineColor(), + maFillColor(), + maTextColor(COL_BLACK), + maTextFillColor(), + maTextLineColor(), + maOverlineColor(), + maRegion(), + maFont(), + maRasterOp(ROP_OVERPAINT), + mnLayoutMode(0), + maLanguageType(0), + mbLineColor(false), + mbFillColor(false), + mbTextColor(true), + mbTextFillColor(false), + mbTextLineColor(false), + mbOverlineColor(false), + mbRegion(false) + { + } + + ~PropertyHolder() + { + } + + const basegfx::B2DHomMatrix& getTransformation() const { return maTransformation; } + void setTransformation(const basegfx::B2DHomMatrix& rNew) { if(rNew != maTransformation) maTransformation = rNew; } + + MapUnit getMapUnit() const { return maMapUnit; } + void setMapUnit(MapUnit eNew) { if(eNew != maMapUnit) maMapUnit = eNew; } + + const basegfx::BColor& getLineColor() const { return maLineColor; } + void setLineColor(const basegfx::BColor& rNew) { if(rNew != maLineColor) maLineColor = rNew; } + bool getLineColorActive() const { return mbLineColor; } + void setLineColorActive(bool bNew) { if(bNew != mbLineColor) mbLineColor = bNew; } + + const basegfx::BColor& getFillColor() const { return maFillColor; } + void setFillColor(const basegfx::BColor& rNew) { if(rNew != maFillColor) maFillColor = rNew; } + bool getFillColorActive() const { return mbFillColor; } + void setFillColorActive(bool bNew) { if(bNew != mbFillColor) mbFillColor = bNew; } + + const basegfx::BColor& getTextColor() const { return maTextColor; } + void setTextColor(const basegfx::BColor& rNew) { if(rNew != maTextColor) maTextColor = rNew; } + bool getTextColorActive() const { return mbTextColor; } + void setTextColorActive(bool bNew) { if(bNew != mbTextColor) mbTextColor = bNew; } + + const basegfx::BColor& getTextFillColor() const { return maTextFillColor; } + void setTextFillColor(const basegfx::BColor& rNew) { if(rNew != maTextFillColor) maTextFillColor = rNew; } + bool getTextFillColorActive() const { return mbTextFillColor; } + void setTextFillColorActive(bool bNew) { if(bNew != mbTextFillColor) mbTextFillColor = bNew; } + + const basegfx::BColor& getTextLineColor() const { return maTextLineColor; } + void setTextLineColor(const basegfx::BColor& rNew) { if(rNew != maTextLineColor) maTextLineColor = rNew; } + bool getTextLineColorActive() const { return mbTextLineColor; } + void setTextLineColorActive(bool bNew) { if(bNew != mbTextLineColor) mbTextLineColor = bNew; } + + const basegfx::BColor& getOverlineColor() const { return maOverlineColor; } + void setOverlineColor(const basegfx::BColor& rNew) { if(rNew != maOverlineColor) maOverlineColor = rNew; } + bool getOverlineColorActive() const { return mbOverlineColor; } + void setOverlineColorActive(bool bNew) { if(bNew != mbOverlineColor) mbOverlineColor = bNew; } + + const Region& getRegion() const { return maRegion; } + void setRegion(const Region& rRegion) { if(rRegion != maRegion) maRegion = rRegion; } + bool getRegionActive() const { return mbRegion; } + void setRegionActive(bool bNew) { if(bNew != mbRegion) mbRegion = bNew; } + + const Font& getFont() const { return maFont; } + void setFont(const Font& rFont) { if(rFont != maFont) maFont = rFont; } + + const RasterOp& getRasterOp() const { return maRasterOp; } + void setRasterOp(const RasterOp& rRasterOp) { if(rRasterOp != maRasterOp) maRasterOp = rRasterOp; } + bool isRasterOpInvert() const { return (ROP_XOR == maRasterOp || ROP_INVERT == maRasterOp); } + bool isRasterOpForceBlack() const { return ROP_0 == maRasterOp; } + bool isRasterOpActive() const { return isRasterOpInvert() || isRasterOpForceBlack(); } + + sal_uInt32 getLayoutMode() const { return mnLayoutMode; } + void setLayoutMode(sal_uInt32 nNew) { if(nNew != mnLayoutMode) mnLayoutMode = nNew; } + + LanguageType getLanguageType() const { return maLanguageType; } + void setLanguageType(LanguageType aNew) { if(aNew != maLanguageType) maLanguageType = aNew; } + + bool getLineOrFillActive() const { return (mbLineColor || mbFillColor); } + }; +} // end of anonymous namespace + +////////////////////////////////////////////////////////////////////////////// + +namespace +{ + class PropertyHolders + { + private: + std::vector< PropertyHolder* > maPropertyHolders; + + public: + PropertyHolders() + { + maPropertyHolders.push_back(new PropertyHolder()); + } + + sal_uInt32 size() + { + return maPropertyHolders.size(); + } + + void Push() + { + OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: PUSH with no property holders (!)"); + maPropertyHolders.push_back(new PropertyHolder(*maPropertyHolders[maPropertyHolders.size() - 1])); + } + + void Pop() + { + OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: POP with no property holders (!)"); + if(maPropertyHolders.size()) + { + delete maPropertyHolders[maPropertyHolders.size() - 1]; + maPropertyHolders.pop_back(); + } + } + + PropertyHolder& Current() + { + OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: CURRENT with no property holders (!)"); + return *maPropertyHolders[maPropertyHolders.size() - 1]; + } + + ~PropertyHolders() + { + while(maPropertyHolders.size()) + { + Pop(); + } + } + }; +} // end of anonymous namespace + +////////////////////////////////////////////////////////////////////////////// + +namespace +{ + basegfx::B2DPolyPolygon getB2DPolyPolygonFromRegion(const Region& rRegion) + { + basegfx::B2DPolyPolygon aRetval; + + if(!rRegion.IsEmpty()) + { + Region aRegion(rRegion); + aRetval = aRegion.GetB2DPolyPolygon(); + + if(!aRetval.count()) + { + RegionHandle aRegionHandle(aRegion.BeginEnumRects()); + Rectangle aRegionRectangle; + + while(aRegion.GetEnumRects(aRegionHandle, aRegionRectangle)) + { + if(!aRegionRectangle.IsEmpty()) + { + const basegfx::B2DRange aRegionRange( + aRegionRectangle.Left(), aRegionRectangle.Top(), + aRegionRectangle.Right(), aRegionRectangle.Bottom()); + aRetval.append(basegfx::tools::createPolygonFromRect(aRegionRange)); + } + } + + aRegion.EndEnumRects(aRegionHandle); + } + } + + return aRetval; + } +} // end of anonymous namespace + +////////////////////////////////////////////////////////////////////////////// + +namespace +{ + class TargetHolder + { + private: + std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aTargets; + + public: + TargetHolder() + : aTargets() + { + } + + ~TargetHolder() + { + const sal_uInt32 nCount(aTargets.size()); + + for(sal_uInt32 a(0); a < nCount; a++) + { + delete aTargets[a]; + } + } + + sal_uInt32 size() + { + return aTargets.size(); + } + + void append(drawinglayer::primitive2d::BasePrimitive2D* pCandidate) + { + if(pCandidate) + { + aTargets.push_back(pCandidate); + } + } + + drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequence(const PropertyHolder& rPropertyHolder) + { + const sal_uInt32 nCount(aTargets.size()); + drawinglayer::primitive2d::Primitive2DSequence xRetval(nCount); + + for(sal_uInt32 a(0); a < nCount; a++) + { + xRetval[a] = aTargets[a]; + } + + // All Targets were pointers, but do not need to be deleted since they + // were converted to UNO API references now, so they stay as long as + // referenced. Do NOT delete the C++ implementation classes here, but clear + // the buffer to not delete them in the destructor. + aTargets.clear(); + + if(xRetval.hasElements() && rPropertyHolder.getRegionActive()) + { + const Region& rRegion = rPropertyHolder.getRegion(); + + if(!rRegion.IsEmpty()) + { + basegfx::B2DPolyPolygon aClipPolyPolygon(getB2DPolyPolygonFromRegion(rRegion)); + + if(aClipPolyPolygon.count()) + { + aClipPolyPolygon.transform(rPropertyHolder.getTransformation()); + + const drawinglayer::primitive2d::Primitive2DReference xMask( + new drawinglayer::primitive2d::MaskPrimitive2D( + aClipPolyPolygon, + xRetval)); + + xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xMask, 1); + } + } + } + + return xRetval; + } + }; +} // end of anonymous namespace + +////////////////////////////////////////////////////////////////////////////// + +namespace +{ + class TargetHolders + { + private: + std::vector< TargetHolder* > maTargetHolders; + + public: + TargetHolders() + { + maTargetHolders.push_back(new TargetHolder()); + } + + sal_uInt32 size() + { + return maTargetHolders.size(); + } + + void Push() + { + maTargetHolders.push_back(new TargetHolder()); + } + + void Pop() + { + OSL_ENSURE(maTargetHolders.size(), "TargetHolders: POP with no property holders (!)"); + if(maTargetHolders.size()) + { + delete maTargetHolders[maTargetHolders.size() - 1]; + maTargetHolders.pop_back(); + } + } + + TargetHolder& Current() + { + OSL_ENSURE(maTargetHolders.size(), "TargetHolders: CURRENT with no property holders (!)"); + return *maTargetHolders[maTargetHolders.size() - 1]; + } + + ~TargetHolders() + { + while(maTargetHolders.size()) + { + Pop(); + } + } + }; +} // end of anonymous namespace + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + /** NonOverlappingFillGradientPrimitive2D class + + This is a special version of the FillGradientPrimitive2D which decomposes + to a non-overlapping geometry version of the gradient. This needs to be + used to support the old XOR paint-'trick'. + + It does not need an own identifier since a renderer who wants to interpret + it itself may do so. It just overloads the decomposition of the C++ + implementation class to do an alternative decomposition. + */ + class NonOverlappingFillGradientPrimitive2D : public FillGradientPrimitive2D + { + protected: + /// local decomposition. + virtual Primitive2DSequence create2DDecomposition( + const geometry::ViewInformation2D& rViewInformation) const; + + public: + /// constructor + NonOverlappingFillGradientPrimitive2D( + const basegfx::B2DRange& rObjectRange, + const attribute::FillGradientAttribute& rFillGradient) + : FillGradientPrimitive2D(rObjectRange, rFillGradient) + { + } + }; + + Primitive2DSequence NonOverlappingFillGradientPrimitive2D::create2DDecomposition( + const geometry::ViewInformation2D& /*rViewInformation*/) const + { + return createFill(false); + } + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace +{ + basegfx::B2DHomMatrix getTransformFromMapMode(const MapMode& rMapMode) + { + basegfx::B2DHomMatrix aMapping; + const Fraction aNoScale(1, 1); + const Point& rOrigin(rMapMode.GetOrigin()); + + if(0 != rOrigin.X() || 0 != rOrigin.Y()) + { + aMapping.translate(rOrigin.X(), rOrigin.Y()); + } + + if(rMapMode.GetScaleX() != aNoScale || rMapMode.GetScaleY() != aNoScale) + { + aMapping.scale( + double(rMapMode.GetScaleX()), + double(rMapMode.GetScaleY())); + } + + return aMapping; + } + + void createPointArrayPrimitive( + const std::vector< basegfx::B2DPoint >& rPositions, + TargetHolder& rTarget, + PropertyHolder& rProperties, + basegfx::BColor aBColor) + { + if(rPositions.size()) + { + if(rProperties.getTransformation().isIdentity()) + { + rTarget.append( + new drawinglayer::primitive2d::PointArrayPrimitive2D( + rPositions, + aBColor)); + } + else + { + std::vector< basegfx::B2DPoint > aPositions(rPositions); + + for(sal_uInt32 a(0); a < aPositions.size(); a++) + { + aPositions[a] = rProperties.getTransformation() * aPositions[a]; + } + + rTarget.append( + new drawinglayer::primitive2d::PointArrayPrimitive2D( + aPositions, + aBColor)); + } + } + } + + void createHairlinePrimitive( + const basegfx::B2DPolygon& rLinePolygon, + TargetHolder& rTarget, + PropertyHolder& rProperties) + { + if(rLinePolygon.count()) + { + basegfx::B2DPolygon aLinePolygon(rLinePolygon); + aLinePolygon.transform(rProperties.getTransformation()); + rTarget.append( + new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( + aLinePolygon, + rProperties.getLineColor())); + } + } + + void createFillPrimitive( + const basegfx::B2DPolyPolygon& rFillPolyPolygon, + TargetHolder& rTarget, + PropertyHolder& rProperties) + { + if(rFillPolyPolygon.count()) + { + basegfx::B2DPolyPolygon aFillPolyPolygon(rFillPolyPolygon); + aFillPolyPolygon.transform(rProperties.getTransformation()); + rTarget.append( + new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( + aFillPolyPolygon, + rProperties.getFillColor())); + } + } + + void createLinePrimitive( + const basegfx::B2DPolygon& rLinePolygon, + const LineInfo& rLineInfo, + TargetHolder& rTarget, + PropertyHolder& rProperties) + { + if(rLinePolygon.count()) + { + const bool bDashDotUsed(LINE_DASH == rLineInfo.GetStyle()); + const bool bWidthUsed(rLineInfo.GetWidth() > 1); + + if(bDashDotUsed || bWidthUsed) + { + basegfx::B2DPolygon aLinePolygon(rLinePolygon); + aLinePolygon.transform(rProperties.getTransformation()); + const drawinglayer::attribute::LineAttribute aLineAttribute( + rProperties.getLineColor(), + bWidthUsed ? rLineInfo.GetWidth() : 0.0, + rLineInfo.GetLineJoin()); + + if(bDashDotUsed) + { + ::std::vector< double > fDotDashArray; + const double fDashLen(rLineInfo.GetDashLen()); + const double fDotLen(rLineInfo.GetDotLen()); + const double fDistance(rLineInfo.GetDistance()); + + for(sal_uInt16 a(0); a < rLineInfo.GetDashCount(); a++) + { + fDotDashArray.push_back(fDashLen); + fDotDashArray.push_back(fDistance); + } + + for(sal_uInt16 b(0); b < rLineInfo.GetDotCount(); b++) + { + fDotDashArray.push_back(fDotLen); + fDotDashArray.push_back(fDistance); + } + + const double fAccumulated(::std::accumulate(fDotDashArray.begin(), fDotDashArray.end(), 0.0)); + const drawinglayer::attribute::StrokeAttribute aStrokeAttribute( + fDotDashArray, + fAccumulated); + + rTarget.append( + new drawinglayer::primitive2d::PolygonStrokePrimitive2D( + aLinePolygon, + aLineAttribute, + aStrokeAttribute)); + } + else + { + rTarget.append( + new drawinglayer::primitive2d::PolygonStrokePrimitive2D( + aLinePolygon, + aLineAttribute)); + } + } + else + { + createHairlinePrimitive(rLinePolygon, rTarget, rProperties); + } + } + } + + void createHairlineAndFillPrimitive( + const basegfx::B2DPolygon& rPolygon, + TargetHolder& rTarget, + PropertyHolder& rProperties) + { + if(rProperties.getFillColorActive()) + { + createFillPrimitive(basegfx::B2DPolyPolygon(rPolygon), rTarget, rProperties); + } + + if(rProperties.getLineColorActive()) + { + createHairlinePrimitive(rPolygon, rTarget, rProperties); + } + } + + void createHairlineAndFillPrimitive( + const basegfx::B2DPolyPolygon& rPolyPolygon, + TargetHolder& rTarget, + PropertyHolder& rProperties) + { + if(rProperties.getFillColorActive()) + { + createFillPrimitive(rPolyPolygon, rTarget, rProperties); + } + + if(rProperties.getLineColorActive()) + { + for(sal_uInt32 a(0); a < rPolyPolygon.count(); a++) + { + createHairlinePrimitive(rPolyPolygon.getB2DPolygon(a), rTarget, rProperties); + } + } + } + + void createBitmapExPrimitive( + const BitmapEx& rBitmapEx, + const Point& rPoint, + TargetHolder& rTarget, + PropertyHolder& rProperties) + { + if(!rBitmapEx.IsEmpty()) + { + basegfx::B2DPoint aPoint(rPoint.X(), rPoint.Y()); + aPoint = rProperties.getTransformation() * aPoint; + + rTarget.append( + new drawinglayer::primitive2d::DiscreteBitmapPrimitive2D( + rBitmapEx, + aPoint)); + } + } + + void createBitmapExPrimitive( + const BitmapEx& rBitmapEx, + const Point& rPoint, + const Size& rSize, + TargetHolder& rTarget, + PropertyHolder& rProperties) + { + if(!rBitmapEx.IsEmpty()) + { + basegfx::B2DHomMatrix aObjectTransform; + + aObjectTransform.set(0, 0, rSize.Width()); + aObjectTransform.set(1, 1, rSize.Height()); + aObjectTransform.set(0, 2, rPoint.X()); + aObjectTransform.set(1, 2, rPoint.Y()); + + aObjectTransform = rProperties.getTransformation() * aObjectTransform; + + rTarget.append( + new drawinglayer::primitive2d::BitmapPrimitive2D( + rBitmapEx, + aObjectTransform)); + } + } + + BitmapEx createMaskBmpEx(const Bitmap& rBitmap, const Color& rMaskColor) + { + const Color aWhite(COL_WHITE); + BitmapPalette aBiLevelPalette(2); + + aBiLevelPalette[0] = aWhite; + aBiLevelPalette[1] = rMaskColor; + + Bitmap aMask(rBitmap.CreateMask(aWhite)); + Bitmap aSolid(rBitmap.GetSizePixel(), 1, &aBiLevelPalette); + + aSolid.Erase(rMaskColor); + + return BitmapEx(aSolid, aMask); + } + + drawinglayer::attribute::FillGradientAttribute createFillGradientAttribute(const Gradient& rGradient) + { + const Color aStartColor(rGradient.GetStartColor()); + const sal_uInt16 nStartIntens(rGradient.GetStartIntensity()); + basegfx::BColor aStart(aStartColor.getBColor()); + + if(nStartIntens != 100) + { + const basegfx::BColor aBlack; + aStart = interpolate(aBlack, aStart, (double)nStartIntens * 0.01); + } + + const Color aEndColor(rGradient.GetEndColor()); + const sal_uInt16 nEndIntens(rGradient.GetEndIntensity()); + basegfx::BColor aEnd(aEndColor.getBColor()); + + if(nEndIntens != 100) + { + const basegfx::BColor aBlack; + aEnd = interpolate(aBlack, aEnd, (double)nEndIntens * 0.01); + } + + drawinglayer::attribute::GradientStyle aGradientStyle(drawinglayer::attribute::GRADIENTSTYLE_RECT); + + switch(rGradient.GetStyle()) + { + case GRADIENT_LINEAR : + { + aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_LINEAR; + break; + } + case GRADIENT_AXIAL : + { + aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_AXIAL; + break; + } + case GRADIENT_RADIAL : + { + aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_RADIAL; + break; + } + case GRADIENT_ELLIPTICAL : + { + aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_ELLIPTICAL; + break; + } + case GRADIENT_SQUARE : + { + aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_SQUARE; + break; + } + default : // GRADIENT_RECT + { + aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_RECT; + break; + } + } + + return drawinglayer::attribute::FillGradientAttribute( + aGradientStyle, + (double)rGradient.GetBorder() * 0.01, + (double)rGradient.GetOfsX() * 0.01, + (double)rGradient.GetOfsY() * 0.01, + (double)rGradient.GetAngle() * F_PI1800, + aStart, + aEnd, + rGradient.GetSteps()); + } + + drawinglayer::attribute::FillHatchAttribute createFillHatchAttribute(const Hatch& rHatch) + { + drawinglayer::attribute::HatchStyle aHatchStyle(drawinglayer::attribute::HATCHSTYLE_SINGLE); + + switch(rHatch.GetStyle()) + { + default : // case HATCH_SINGLE : + { + aHatchStyle = drawinglayer::attribute::HATCHSTYLE_SINGLE; + } + case HATCH_DOUBLE : + { + aHatchStyle = drawinglayer::attribute::HATCHSTYLE_DOUBLE; + } + case HATCH_TRIPLE : + { + aHatchStyle = drawinglayer::attribute::HATCHSTYLE_TRIPLE; + } + } + + return drawinglayer::attribute::FillHatchAttribute( + aHatchStyle, + (double)rHatch.GetDistance(), + (double)rHatch.GetAngle() * F_PI1800, + rHatch.GetColor().getBColor(), + false); + } + + void HandleNewClipRegion( + const Region* pRegion, + TargetHolders& rTargetHolders, + PropertyHolders& rPropertyHolders) + { + // process evtl. created primitives which belong to the current region settings + if(rPropertyHolders.Current().getRegionActive() && rTargetHolders.size() > 1) + { + drawinglayer::primitive2d::Primitive2DSequence aSubContent; + + if(!rPropertyHolders.Current().getRegion().IsEmpty() && rTargetHolders.Current().size()) + { + aSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current()); + } + + rTargetHolders.Pop(); + + if(aSubContent.hasElements()) + { + rTargetHolders.Current().append( + new drawinglayer::primitive2d::GroupPrimitive2D( + aSubContent)); + } + } + + // apply new settings + const bool bNewActive(pRegion); + rPropertyHolders.Current().setRegionActive(bNewActive); + + if(bNewActive) + { + rPropertyHolders.Current().setRegion(*pRegion); + + // prepare new content holder for new active region + rTargetHolders.Push(); + } + } + + void HandleNewRasterOp( + RasterOp aRasterOp, + TargetHolders& rTargetHolders, + PropertyHolders& rPropertyHolders) + { + // check if currently active + if(rPropertyHolders.Current().isRasterOpActive() && rTargetHolders.size() > 1) + { + drawinglayer::primitive2d::Primitive2DSequence aSubContent; + + if(rTargetHolders.Current().size()) + { + aSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current()); + } + + rTargetHolders.Pop(); + + if(aSubContent.hasElements()) + { + if(rPropertyHolders.Current().isRasterOpForceBlack()) + { + // force content to black + rTargetHolders.Current().append( + new drawinglayer::primitive2d::ModifiedColorPrimitive2D( + aSubContent, + basegfx::BColorModifier(basegfx::BColor(0.0, 0.0, 0.0)))); + } + else // if(rPropertyHolders.Current().isRasterOpInvert()) + { + // invert content + rTargetHolders.Current().append( + new drawinglayer::primitive2d::InvertPrimitive2D( + aSubContent)); + } + } + } + + // apply new settings + rPropertyHolders.Current().setRasterOp(aRasterOp); + + // check if now active + if(rPropertyHolders.Current().isRasterOpActive()) + { + // prepare new content holder for new invert + rTargetHolders.Push(); + } + } + + drawinglayer::primitive2d::BasePrimitive2D* CreateColorWallpaper( + const basegfx::B2DRange& rRange, + const basegfx::BColor& rColor, + PropertyHolder& rPropertyHolder) + { + basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(rRange)); + aOutline.transform(rPropertyHolder.getTransformation()); + + return new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( + basegfx::B2DPolyPolygon(aOutline), + rColor); + } + + drawinglayer::primitive2d::BasePrimitive2D* CreateGradientWallpaper( + const basegfx::B2DRange& rRange, + const Gradient& rGradient, + PropertyHolder& rPropertyHolder) + { + const drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient)); + + if(aAttribute.getStartColor() == aAttribute.getEndColor()) + { + // not really a gradient. Create filled rectangle + return CreateColorWallpaper(rRange, aAttribute.getStartColor(), rPropertyHolder); + } + else + { + // really a gradient + drawinglayer::primitive2d::BasePrimitive2D* pRetval = + new drawinglayer::primitive2d::FillGradientPrimitive2D( + rRange, + aAttribute); + + if(!rPropertyHolder.getTransformation().isIdentity()) + { + const drawinglayer::primitive2d::Primitive2DReference xPrim(pRetval); + const drawinglayer::primitive2d::Primitive2DSequence xSeq(&xPrim, 1); + + pRetval = new drawinglayer::primitive2d::TransformPrimitive2D( + rPropertyHolder.getTransformation(), + xSeq); + } + + return pRetval; + } + } + + void CreateAndAppendBitmapWallpaper( + basegfx::B2DRange aWallpaperRange, + const Wallpaper& rWallpaper, + TargetHolder& rTarget, + PropertyHolder& rProperty) + { + const BitmapEx aBitmapEx(rWallpaper.GetBitmap()); + const WallpaperStyle eWallpaperStyle(rWallpaper.GetStyle()); + + // if bitmap visualisation is transparent, maybe background + // needs to be filled. Create background + if(aBitmapEx.IsTransparent() + || (WALLPAPER_TILE != eWallpaperStyle && WALLPAPER_SCALE != eWallpaperStyle)) + { + if(rWallpaper.IsGradient()) + { + rTarget.append( + CreateGradientWallpaper( + aWallpaperRange, + rWallpaper.GetGradient(), + rProperty)); + } + else if(!rWallpaper.GetColor().GetTransparency()) + { + rTarget.append( + CreateColorWallpaper( + aWallpaperRange, + rWallpaper.GetColor().getBColor(), + rProperty)); + } + } + + // use wallpaper rect if set + if(rWallpaper.IsRect() && !rWallpaper.GetRect().IsEmpty()) + { + aWallpaperRange = basegfx::B2DRange( + rWallpaper.GetRect().Left(), rWallpaper.GetRect().Top(), + rWallpaper.GetRect().Right(), rWallpaper.GetRect().Bottom()); + } + + drawinglayer::primitive2d::BasePrimitive2D* pBitmapWallpaperFill = + new drawinglayer::primitive2d::WallpaperBitmapPrimitive2D( + aWallpaperRange, + aBitmapEx, + eWallpaperStyle); + + if(rProperty.getTransformation().isIdentity()) + { + // add directly + rTarget.append(pBitmapWallpaperFill); + } + else + { + // when a transformation is set, embed to it + const drawinglayer::primitive2d::Primitive2DReference xPrim(pBitmapWallpaperFill); + + rTarget.append( + new drawinglayer::primitive2d::TransformPrimitive2D( + rProperty.getTransformation(), + drawinglayer::primitive2d::Primitive2DSequence(&xPrim, 1))); + } + } + + drawinglayer::primitive2d::TextLine mapTextLineStyle(FontUnderline eLineStyle) + { + switch(eLineStyle) + { + case UNDERLINE_SINGLE: return drawinglayer::primitive2d::TEXT_LINE_SINGLE; + case UNDERLINE_DOUBLE: return drawinglayer::primitive2d::TEXT_LINE_DOUBLE; + case UNDERLINE_DOTTED: return drawinglayer::primitive2d::TEXT_LINE_DOTTED; + case UNDERLINE_DASH: return drawinglayer::primitive2d::TEXT_LINE_DASH; + case UNDERLINE_LONGDASH: return drawinglayer::primitive2d::TEXT_LINE_LONGDASH; + case UNDERLINE_DASHDOT: return drawinglayer::primitive2d::TEXT_LINE_DASHDOT; + case UNDERLINE_DASHDOTDOT: return drawinglayer::primitive2d::TEXT_LINE_DASHDOTDOT; + case UNDERLINE_SMALLWAVE: return drawinglayer::primitive2d::TEXT_LINE_SMALLWAVE; + case UNDERLINE_WAVE: return drawinglayer::primitive2d::TEXT_LINE_WAVE; + case UNDERLINE_DOUBLEWAVE: return drawinglayer::primitive2d::TEXT_LINE_DOUBLEWAVE; + case UNDERLINE_BOLD: return drawinglayer::primitive2d::TEXT_LINE_BOLD; + case UNDERLINE_BOLDDOTTED: return drawinglayer::primitive2d::TEXT_LINE_BOLDDOTTED; + case UNDERLINE_BOLDDASH: return drawinglayer::primitive2d::TEXT_LINE_BOLDDASH; + case UNDERLINE_BOLDLONGDASH: return drawinglayer::primitive2d::TEXT_LINE_BOLDLONGDASH; + case UNDERLINE_BOLDDASHDOT: return drawinglayer::primitive2d::TEXT_LINE_BOLDDASHDOT; + case UNDERLINE_BOLDDASHDOTDOT: return drawinglayer::primitive2d::TEXT_LINE_BOLDDASHDOTDOT; + case UNDERLINE_BOLDWAVE: return drawinglayer::primitive2d::TEXT_LINE_BOLDWAVE; + // FontUnderline_FORCE_EQUAL_SIZE, UNDERLINE_DONTKNOW, UNDERLINE_NONE + default: return drawinglayer::primitive2d::TEXT_LINE_NONE; + } + } + + bool isUnderlineAbove(const Font& rFont) + { + if(!rFont.IsVertical()) + { + return false; + } + + if((LANGUAGE_JAPANESE == rFont.GetLanguage()) || (LANGUAGE_JAPANESE == rFont.GetCJKContextLanguage())) + { + // the underline is right for Japanese only + return true; + } + + return false; + } + + void proccessMetaTextAction( + const Point& rTextStartPosition, + const XubString& rText, + sal_uInt16 nTextStart, + sal_uInt16 nTextLength, + sal_Int32* pDXArray, + TargetHolder& rTarget, + PropertyHolder& rProperty) + { + drawinglayer::primitive2d::BasePrimitive2D* pResult = 0; + const Font& rFont = rProperty.getFont(); + std::vector< double > aDXArray; + + if(nTextLength) + { + // get current font and create FontScaling and FontAttribute + basegfx::B2DVector aFontScaling; + const drawinglayer::attribute::FontAttribute aFontAttribute( + drawinglayer::primitive2d::getFontAttributeFromVclFont( + aFontScaling, + rFont, + 0 != (rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_RTL), + 0 != (rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_STRONG))); + + // create TextTransform + basegfx::B2DHomMatrix aTextTransform; + + // add FontScaling + aTextTransform.scale(aFontScaling.getX(), aFontScaling.getY()); + + // take text align into account + if(ALIGN_BASELINE != rFont.GetAlign()) + { + drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice; + aTextLayouterDevice.setFont(rFont); + + if(ALIGN_TOP == rFont.GetAlign()) + { + aTextTransform.translate( + 0.0, + aTextLayouterDevice.getFontAscent()); + } + else // ALIGN_BOTTOM + { + aTextTransform.translate( + 0.0, + -aTextLayouterDevice.getFontDescent()); + } + } + + // add FontRotation (if used) + if(rFont.GetOrientation()) + { + aTextTransform.rotate(-rFont.GetOrientation() * F_PI1800); + } + + // add TextStartPosition + aTextTransform.translate(rTextStartPosition.X(), rTextStartPosition.Y()); + + // preapare DXArray (if used) + if(pDXArray && nTextLength) + { + aDXArray.reserve(nTextLength); + + for(xub_StrLen a(0); a < nTextLength; a++) + { + aDXArray.push_back((double)(*(pDXArray + a))); + } + } + + // prepare FontColor and Locale + const basegfx::BColor aFontColor(rProperty.getTextColor()); + const com::sun::star::lang::Locale aLocale(MsLangId::convertLanguageToLocale(rProperty.getLanguageType())); + const bool bWordLineMode(rFont.IsWordLineMode()); + + const bool bDecoratedIsNeeded( + UNDERLINE_NONE != rFont.GetOverline() + || UNDERLINE_NONE != rFont.GetUnderline() + || STRIKEOUT_NONE != rFont.GetStrikeout() + || EMPHASISMARK_NONE != (rFont.GetEmphasisMark() & EMPHASISMARK_STYLE) + || RELIEF_NONE != rFont.GetRelief() + || rFont.IsShadow() + || bWordLineMode); + + if(bDecoratedIsNeeded) + { + // prepare overline and underline data + const drawinglayer::primitive2d::TextLine eFontOverline(mapTextLineStyle(rFont.GetOverline())); + const drawinglayer::primitive2d::TextLine eFontUnderline(mapTextLineStyle(rFont.GetUnderline())); + + // check UndelineAbove + const bool bUnderlineAbove(drawinglayer::primitive2d::TEXT_LINE_NONE != eFontUnderline && isUnderlineAbove(rFont)); + + // prepare strikeout data + drawinglayer::primitive2d::FontStrikeout eFontStrikeout(drawinglayer::primitive2d::FONT_STRIKEOUT_NONE); + + switch(rFont.GetStrikeout()) + { + case STRIKEOUT_SINGLE: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_SINGLE; break; + case STRIKEOUT_DOUBLE: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_DOUBLE; break; + case STRIKEOUT_BOLD: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_BOLD; break; + case STRIKEOUT_SLASH: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_SLASH; break; + case STRIKEOUT_X: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_X; break; + default : break; // FontStrikeout_FORCE_EQUAL_SIZE, STRIKEOUT_NONE, STRIKEOUT_DONTKNOW + } + + // prepare emphasis mark data + drawinglayer::primitive2d::FontEmphasisMark eFontEmphasisMark(drawinglayer::primitive2d::FONT_EMPHASISMARK_NONE); + + switch(rFont.GetEmphasisMark() & EMPHASISMARK_STYLE) + { + case EMPHASISMARK_DOT : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_DOT; break; + case EMPHASISMARK_CIRCLE : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_CIRCLE; break; + case EMPHASISMARK_DISC : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_DISC; break; + case EMPHASISMARK_ACCENT : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_ACCENT; break; + } + + const bool bEmphasisMarkAbove(rFont.GetEmphasisMark() & EMPHASISMARK_POS_ABOVE); + const bool bEmphasisMarkBelow(rFont.GetEmphasisMark() & EMPHASISMARK_POS_BELOW); + + // prepare font relief data + drawinglayer::primitive2d::FontRelief eFontRelief(drawinglayer::primitive2d::FONT_RELIEF_NONE); + + switch(rFont.GetRelief()) + { + case RELIEF_EMBOSSED : eFontRelief = drawinglayer::primitive2d::FONT_RELIEF_EMBOSSED; break; + case RELIEF_ENGRAVED : eFontRelief = drawinglayer::primitive2d::FONT_RELIEF_ENGRAVED; break; + default : break; // RELIEF_NONE, FontRelief_FORCE_EQUAL_SIZE + } + + // prepare shadow/outline data + const bool bShadow(rFont.IsShadow()); + + // TextDecoratedPortionPrimitive2D is needed, create one + pResult = new drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D( + + // attributes for TextSimplePortionPrimitive2D + aTextTransform, + rText, + nTextStart, + nTextLength, + aDXArray, + aFontAttribute, + aLocale, + aFontColor, + + // attributes for TextDecoratedPortionPrimitive2D + rProperty.getOverlineColorActive() ? rProperty.getOverlineColor() : aFontColor, + rProperty.getTextLineColorActive() ? rProperty.getTextLineColor() : aFontColor, + eFontOverline, + eFontUnderline, + bUnderlineAbove, + eFontStrikeout, + bWordLineMode, + eFontEmphasisMark, + bEmphasisMarkAbove, + bEmphasisMarkBelow, + eFontRelief, + bShadow); + } + else + { + // TextSimplePortionPrimitive2D is enough + pResult = new drawinglayer::primitive2d::TextSimplePortionPrimitive2D( + aTextTransform, + rText, + nTextStart, + nTextLength, + aDXArray, + aFontAttribute, + aLocale, + aFontColor); + } + } + + if(pResult && rProperty.getTextFillColorActive()) + { + drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice; + const bool bRotated(rFont.GetOrientation()); + + if(bRotated) + { + // use unrotated font + Font aUnrotatedFont(rFont); + aUnrotatedFont.SetOrientation(0); + aTextLayouterDevice.setFont(aUnrotatedFont); + } + else + { + aTextLayouterDevice.setFont(rFont); + } + + // get base range + basegfx::B2DRange aTextRange( + aTextLayouterDevice.getTextBoundRect( + rText, nTextStart, nTextLength)); + + if(aDXArray.size()) + { + // use the last entry in DXArray to correct the width + aTextRange = basegfx::B2DRange( + aTextRange.getMinX(), + aTextRange.getMinY(), + aTextRange.getMinX() + aDXArray[aDXArray.size() - 1], + aTextRange.getMaxY()); + } + + // create Transform. Scale and Alignment are already applied. + basegfx::B2DHomMatrix aTextTransform; + + if(bRotated) + { + aTextTransform.rotate(-rFont.GetOrientation() * F_PI1800); + } + + aTextTransform.translate(rTextStartPosition.X(), rTextStartPosition.Y()); + + // prepare Primitive2DSequence, put text in foreground + drawinglayer::primitive2d::Primitive2DSequence aSequence(2); + aSequence[1] = drawinglayer::primitive2d::Primitive2DReference(pResult); + + // prepare filled polygon + basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aTextRange)); + aOutline.transform(aTextTransform); + + aSequence[0] = drawinglayer::primitive2d::Primitive2DReference( + new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( + basegfx::B2DPolyPolygon(aOutline), + rProperty.getTextFillColor())); + + // set as group at pResult + pResult = new drawinglayer::primitive2d::GroupPrimitive2D(aSequence); + } + + if(pResult) + { + // add created text primitive to target + if(rProperty.getTransformation().isIdentity()) + { + rTarget.append(pResult); + } + else + { + // when a transformation is set, embed to it + const drawinglayer::primitive2d::Primitive2DReference aReference(pResult); + + rTarget.append( + new drawinglayer::primitive2d::TransformPrimitive2D( + rProperty.getTransformation(), + drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1))); + } + } + } + + void interpretMetafile( + const GDIMetaFile& rMetaFile, + TargetHolders& rTargetHolders, + PropertyHolders& rPropertyHolders, + const drawinglayer::geometry::ViewInformation2D& rViewInformation) + { + const sal_uInt32 nCount(rMetaFile.GetActionCount()); + + for(sal_uInt32 a(0); a < nCount; a++) + { + MetaAction* pAction = rMetaFile.GetAction(a); + + switch(pAction->GetType()) + { + case META_NULL_ACTION : + { + /** SIMPLE, DONE */ + break; + } + case META_PIXEL_ACTION : + { + /** CHECKED, WORKS WELL */ + std::vector< basegfx::B2DPoint > aPositions; + Color aLastColor(COL_BLACK); + + while(META_PIXEL_ACTION == pAction->GetType() && a < nCount) + { + const MetaPixelAction* pA = (const MetaPixelAction*)pAction; + + if(pA->GetColor() != aLastColor) + { + if(aPositions.size()) + { + createPointArrayPrimitive(aPositions, rTargetHolders.Current(), rPropertyHolders.Current(), aLastColor.getBColor()); + aPositions.clear(); + } + + aLastColor = pA->GetColor(); + } + + const Point& rPoint = pA->GetPoint(); + aPositions.push_back(basegfx::B2DPoint(rPoint.X(), rPoint.Y())); + a++; if(a < nCount) pAction = rMetaFile.GetAction(a); + } + + a--; + + if(aPositions.size()) + { + createPointArrayPrimitive(aPositions, rTargetHolders.Current(), rPropertyHolders.Current(), aLastColor.getBColor()); + } + + break; + } + case META_POINT_ACTION : + { + /** CHECKED, WORKS WELL */ + if(rPropertyHolders.Current().getLineColorActive()) + { + std::vector< basegfx::B2DPoint > aPositions; + + while(META_POINT_ACTION == pAction->GetType() && a < nCount) + { + const MetaPointAction* pA = (const MetaPointAction*)pAction; + const Point& rPoint = pA->GetPoint(); + aPositions.push_back(basegfx::B2DPoint(rPoint.X(), rPoint.Y())); + a++; if(a < nCount) pAction = rMetaFile.GetAction(a); + } + + a--; + + if(aPositions.size()) + { + createPointArrayPrimitive(aPositions, rTargetHolders.Current(), rPropertyHolders.Current(), rPropertyHolders.Current().getLineColor()); + } + } + + break; + } + case META_LINE_ACTION : + { + /** CHECKED, WORKS WELL */ + if(rPropertyHolders.Current().getLineColorActive()) + { + basegfx::B2DPolygon aLinePolygon; + LineInfo aLineInfo; + + while(META_LINE_ACTION == pAction->GetType() && a < nCount) + { + const MetaLineAction* pA = (const MetaLineAction*)pAction; + const Point& rStartPoint = pA->GetStartPoint(); + const Point& rEndPoint = pA->GetEndPoint(); + const basegfx::B2DPoint aStart(rStartPoint.X(), rStartPoint.Y()); + const basegfx::B2DPoint aEnd(rEndPoint.X(), rEndPoint.Y()); + + if(aLinePolygon.count()) + { + if(pA->GetLineInfo() == aLineInfo + && aStart == aLinePolygon.getB2DPoint(aLinePolygon.count() - 1)) + { + aLinePolygon.append(aEnd); + } + else + { + aLineInfo.SetLineJoin(basegfx::B2DLINEJOIN_NONE); // It were lines; force to NONE + createLinePrimitive(aLinePolygon, aLineInfo, rTargetHolders.Current(), rPropertyHolders.Current()); + aLinePolygon.clear(); + aLineInfo = pA->GetLineInfo(); + aLinePolygon.append(aStart); + aLinePolygon.append(aEnd); + } + } + else + { + aLineInfo = pA->GetLineInfo(); + aLinePolygon.append(aStart); + aLinePolygon.append(aEnd); + } + + a++; if(a < nCount) pAction = rMetaFile.GetAction(a); + } + + a--; + + if(aLinePolygon.count()) + { + aLineInfo.SetLineJoin(basegfx::B2DLINEJOIN_NONE); // It were lines; force to NONE + createLinePrimitive(aLinePolygon, aLineInfo, rTargetHolders.Current(), rPropertyHolders.Current()); + } + } + + break; + } + case META_RECT_ACTION : + { + /** CHECKED, WORKS WELL */ + if(rPropertyHolders.Current().getLineOrFillActive()) + { + const MetaRectAction* pA = (const MetaRectAction*)pAction; + const Rectangle& rRectangle = pA->GetRect(); + + if(!rRectangle.IsEmpty()) + { + const basegfx::B2DRange aRange(rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom()); + + if(!aRange.isEmpty()) + { + const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); + } + } + } + + break; + } + case META_ROUNDRECT_ACTION : + { + /** CHECKED, WORKS WELL */ + /** The original OutputDevice::DrawRect paints nothing when nHor or nVer is zero; but just + because the tools::Polygon operator creating the rounding does produce nonsense. I assume + this an error and create an unrounded rectangle in that case (implicit in + createPolygonFromRect) + */ + if(rPropertyHolders.Current().getLineOrFillActive()) + { + const MetaRoundRectAction* pA = (const MetaRoundRectAction*)pAction; + const Rectangle& rRectangle = pA->GetRect(); + + if(!rRectangle.IsEmpty()) + { + const basegfx::B2DRange aRange(rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom()); + + if(!aRange.isEmpty()) + { + const sal_uInt32 nHor(pA->GetHorzRound()); + const sal_uInt32 nVer(pA->GetVertRound()); + basegfx::B2DPolygon aOutline; + + if(nHor || nVer) + { + double fRadiusX((nHor * 2.0) / (aRange.getWidth() > 0.0 ? aRange.getWidth() : 1.0)); + double fRadiusY((nVer * 2.0) / (aRange.getHeight() > 0.0 ? aRange.getHeight() : 1.0)); + fRadiusX = std::max(0.0, std::min(1.0, fRadiusX)); + fRadiusY = std::max(0.0, std::min(1.0, fRadiusY)); + + aOutline = basegfx::tools::createPolygonFromRect(aRange, fRadiusX, fRadiusY); + } + else + { + aOutline = basegfx::tools::createPolygonFromRect(aRange); + } + + createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); + } + } + } + + break; + } + case META_ELLIPSE_ACTION : + { + /** CHECKED, WORKS WELL */ + if(rPropertyHolders.Current().getLineOrFillActive()) + { + const MetaEllipseAction* pA = (const MetaEllipseAction*)pAction; + const Rectangle& rRectangle = pA->GetRect(); + + if(!rRectangle.IsEmpty()) + { + const basegfx::B2DRange aRange(rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom()); + + if(!aRange.isEmpty()) + { + const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromEllipse( + aRange.getCenter(), aRange.getWidth() * 0.5, aRange.getHeight() * 0.5)); + + createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); + } + } + } + + break; + } + case META_ARC_ACTION : + { + /** CHECKED, WORKS WELL */ + if(rPropertyHolders.Current().getLineColorActive()) + { + const MetaArcAction* pA = (const MetaArcAction*)pAction; + const Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC); + const basegfx::B2DPolygon aOutline(aToolsPoly.getB2DPolygon()); + + createHairlinePrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); + } + + break; + } + case META_PIE_ACTION : + { + /** CHECKED, WORKS WELL */ + if(rPropertyHolders.Current().getLineOrFillActive()) + { + const MetaPieAction* pA = (const MetaPieAction*)pAction; + const Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE); + const basegfx::B2DPolygon aOutline(aToolsPoly.getB2DPolygon()); + + createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); + } + + break; + } + case META_CHORD_ACTION : + { + /** CHECKED, WORKS WELL */ + if(rPropertyHolders.Current().getLineOrFillActive()) + { + const MetaChordAction* pA = (const MetaChordAction*)pAction; + const Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD); + const basegfx::B2DPolygon aOutline(aToolsPoly.getB2DPolygon()); + + createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); + } + + break; + } + case META_POLYLINE_ACTION : + { + /** CHECKED, WORKS WELL */ + if(rPropertyHolders.Current().getLineColorActive()) + { + const MetaPolyLineAction* pA = (const MetaPolyLineAction*)pAction; + createLinePrimitive(pA->GetPolygon().getB2DPolygon(), pA->GetLineInfo(), rTargetHolders.Current(), rPropertyHolders.Current()); + } + + break; + } + case META_POLYGON_ACTION : + { + /** CHECKED, WORKS WELL */ + if(rPropertyHolders.Current().getLineOrFillActive()) + { + const MetaPolygonAction* pA = (const MetaPolygonAction*)pAction; + basegfx::B2DPolygon aOutline(pA->GetPolygon().getB2DPolygon()); + + // the metafile play interprets the polygons from MetaPolygonAction + // always as closed and always paints an edge from last to first point, + // so force to closed here to emulate that + if(aOutline.count() > 1 && !aOutline.isClosed()) + { + aOutline.setClosed(true); + } + + createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); + } + + break; + } + case META_POLYPOLYGON_ACTION : + { + /** CHECKED, WORKS WELL */ + if(rPropertyHolders.Current().getLineOrFillActive()) + { + const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*)pAction; + basegfx::B2DPolyPolygon aPolyPolygonOutline(pA->GetPolyPolygon().getB2DPolyPolygon()); + + // the metafile play interprets the single polygons from MetaPolyPolygonAction + // always as closed and always paints an edge from last to first point, + // so force to closed here to emulate that + for(sal_uInt32 a(0); a < aPolyPolygonOutline.count(); a++) + { + basegfx::B2DPolygon aPolygonOutline(aPolyPolygonOutline.getB2DPolygon(a)); + + if(aPolygonOutline.count() > 1 && !aPolygonOutline.isClosed()) + { + aPolygonOutline.setClosed(true); + aPolyPolygonOutline.setB2DPolygon(a, aPolygonOutline); + } + } + + createHairlineAndFillPrimitive(aPolyPolygonOutline, rTargetHolders.Current(), rPropertyHolders.Current()); + } + + break; + } + case META_TEXT_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaTextAction* pA = (const MetaTextAction*)pAction; + + if(pA->GetLen() && rPropertyHolders.Current().getTextColorActive()) + { + proccessMetaTextAction( + pA->GetPoint(), + pA->GetText(), + pA->GetIndex(), + pA->GetLen(), + 0, + rTargetHolders.Current(), + rPropertyHolders.Current()); + } + + break; + } + case META_TEXTARRAY_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaTextArrayAction* pA = (const MetaTextArrayAction*)pAction; + + if(pA->GetLen() && rPropertyHolders.Current().getTextColorActive()) + { + proccessMetaTextAction( + pA->GetPoint(), + pA->GetText(), + pA->GetIndex(), + pA->GetLen(), + pA->GetDXArray(), + rTargetHolders.Current(), + rPropertyHolders.Current()); + } + + break; + } + case META_STRETCHTEXT_ACTION : + { + /** NEEDS IMPLEMENTATION */ + OSL_ENSURE(false, "META_STRETCHTEXT_ACTION requested (!)"); + // use OutputDevice::GetTextArray() to map the... + const MetaStretchTextAction* pA = (const MetaStretchTextAction*)pAction; + break; + } + case META_TEXTRECT_ACTION : + { + /** NEEDS IMPLEMENTATION */ + OSL_ENSURE(false, "META_TEXTRECT_ACTION requested (!)"); + const MetaTextRectAction* pA = (const MetaTextRectAction*)pAction; + break; + } + case META_BMP_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaBmpAction* pA = (const MetaBmpAction*)pAction; + const BitmapEx aBitmapEx(pA->GetBitmap()); + + createBitmapExPrimitive(aBitmapEx, pA->GetPoint(), rTargetHolders.Current(), rPropertyHolders.Current()); + + break; + } + case META_BMPSCALE_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*)pAction; + const Bitmap aBitmapEx(pA->GetBitmap()); + + createBitmapExPrimitive(aBitmapEx, pA->GetPoint(), pA->GetSize(), rTargetHolders.Current(), rPropertyHolders.Current()); + + break; + } + case META_BMPSCALEPART_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*)pAction; + const Bitmap& rBitmap = pA->GetBitmap(); + + if(!rBitmap.IsEmpty()) + { + Bitmap aCroppedBitmap(rBitmap); + const Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize()); + + if(!aCropRectangle.IsEmpty()) + { + aCroppedBitmap.Crop(aCropRectangle); + } + + const BitmapEx aCroppedBitmapEx(aCroppedBitmap); + createBitmapExPrimitive(aCroppedBitmapEx, pA->GetDestPoint(), pA->GetDestSize(), rTargetHolders.Current(), rPropertyHolders.Current()); + } + + break; + } + case META_BMPEX_ACTION : + { + /** CHECKED, WORKS WELL: Simply same as META_BMP_ACTION */ + const MetaBmpExAction* pA = (const MetaBmpExAction*)pAction; + const BitmapEx& rBitmapEx = pA->GetBitmapEx(); + + createBitmapExPrimitive(rBitmapEx, pA->GetPoint(), rTargetHolders.Current(), rPropertyHolders.Current()); + + break; + } + case META_BMPEXSCALE_ACTION : + { + /** CHECKED, WORKS WELL: Simply same as META_BMPSCALE_ACTION */ + const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*)pAction; + const BitmapEx& rBitmapEx = pA->GetBitmapEx(); + + createBitmapExPrimitive(rBitmapEx, pA->GetPoint(), pA->GetSize(), rTargetHolders.Current(), rPropertyHolders.Current()); + + break; + } + case META_BMPEXSCALEPART_ACTION : + { + /** CHECKED, WORKS WELL: Simply same as META_BMPSCALEPART_ACTION */ + const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*)pAction; + const BitmapEx& rBitmapEx = pA->GetBitmapEx(); + + if(!rBitmapEx.IsEmpty()) + { + BitmapEx aCroppedBitmapEx(rBitmapEx); + const Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize()); + + if(!aCropRectangle.IsEmpty()) + { + aCroppedBitmapEx.Crop(aCropRectangle); + } + + createBitmapExPrimitive(aCroppedBitmapEx, pA->GetDestPoint(), pA->GetDestSize(), rTargetHolders.Current(), rPropertyHolders.Current()); + } + + break; + } + case META_MASK_ACTION : + { + /** CHECKED, WORKS WELL: Simply same as META_BMP_ACTION */ + const MetaMaskAction* pA = (const MetaMaskAction*)pAction; + const BitmapEx aBitmapEx(createMaskBmpEx(pA->GetBitmap(), pA->GetColor())); + + createBitmapExPrimitive(aBitmapEx, pA->GetPoint(), rTargetHolders.Current(), rPropertyHolders.Current()); + + break; + } + case META_MASKSCALE_ACTION : + { + /** CHECKED, WORKS WELL: Simply same as META_BMPSCALE_ACTION */ + const MetaMaskScaleAction* pA = (const MetaMaskScaleAction*)pAction; + const BitmapEx aBitmapEx(createMaskBmpEx(pA->GetBitmap(), pA->GetColor())); + + createBitmapExPrimitive(aBitmapEx, pA->GetPoint(), pA->GetSize(), rTargetHolders.Current(), rPropertyHolders.Current()); + + break; + } + case META_MASKSCALEPART_ACTION : + { + /** CHECKED, WORKS WELL: Simply same as META_BMPSCALEPART_ACTION */ + const MetaMaskScalePartAction* pA = (const MetaMaskScalePartAction*)pAction; + const Bitmap& rBitmap = pA->GetBitmap(); + + if(!rBitmap.IsEmpty()) + { + Bitmap aCroppedBitmap(rBitmap); + const Rectangle aCropRectangle(pA->GetSrcPoint(), pA->GetSrcSize()); + + if(!aCropRectangle.IsEmpty()) + { + aCroppedBitmap.Crop(aCropRectangle); + } + + const BitmapEx aCroppedBitmapEx(createMaskBmpEx(aCroppedBitmap, pA->GetColor())); + createBitmapExPrimitive(aCroppedBitmapEx, pA->GetDestPoint(), pA->GetDestSize(), rTargetHolders.Current(), rPropertyHolders.Current()); + } + + break; + } + case META_GRADIENT_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaGradientAction* pA = (const MetaGradientAction*)pAction; + const Rectangle& rRectangle = pA->GetRect(); + + if(!rRectangle.IsEmpty()) + { + basegfx::B2DRange aRange(rRectangle.Left(), rRectangle.Top(), rRectangle.Right(), rRectangle.Bottom()); + + if(!aRange.isEmpty()) + { + const Gradient& rGradient = pA->GetGradient(); + const drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient)); + + if(aAttribute.getStartColor() == aAttribute.getEndColor()) + { + // not really a gradient. Create filled rectangle + const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + createFillPrimitive(basegfx::B2DPolyPolygon(aOutline), rTargetHolders.Current(), rPropertyHolders.Current()); + } + else + { + // really a gradient + aRange.transform(rPropertyHolders.Current().getTransformation()); + + if(rPropertyHolders.Current().isRasterOpInvert()) + { + // use a special version of FillGradientPrimitive2D which creates + // non-overlapping geometry on decomposition to makethe old XOR + // paint 'trick' work. + rTargetHolders.Current().append( + new drawinglayer::primitive2d::NonOverlappingFillGradientPrimitive2D( + aRange, + aAttribute)); + } + else + { + rTargetHolders.Current().append( + new drawinglayer::primitive2d::FillGradientPrimitive2D( + aRange, + aAttribute)); + } + } + } + } + + break; + } + case META_HATCH_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaHatchAction* pA = (const MetaHatchAction*)pAction; + basegfx::B2DPolyPolygon aOutline(pA->GetPolyPolygon().getB2DPolyPolygon()); + + if(aOutline.count()) + { + const Hatch& rHatch = pA->GetHatch(); + const drawinglayer::attribute::FillHatchAttribute aAttribute(createFillHatchAttribute(rHatch)); + + aOutline.transform(rPropertyHolders.Current().getTransformation()); + + const basegfx::B2DRange aObjectRange(aOutline.getB2DRange()); + const drawinglayer::primitive2d::Primitive2DReference aFillHatch( + new drawinglayer::primitive2d::FillHatchPrimitive2D( + aObjectRange, + basegfx::BColor(), + aAttribute)); + + rTargetHolders.Current().append( + new drawinglayer::primitive2d::MaskPrimitive2D( + aOutline, + drawinglayer::primitive2d::Primitive2DSequence(&aFillHatch, 1))); + } + + break; + } + case META_WALLPAPER_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaWallpaperAction* pA = (const MetaWallpaperAction*)pAction; + Rectangle aWallpaperRectangle(pA->GetRect()); + + if(!aWallpaperRectangle.IsEmpty()) + { + const Wallpaper& rWallpaper = pA->GetWallpaper(); + const WallpaperStyle eWallpaperStyle(rWallpaper.GetStyle()); + basegfx::B2DRange aWallpaperRange( + aWallpaperRectangle.Left(), aWallpaperRectangle.Top(), + aWallpaperRectangle.Right(), aWallpaperRectangle.Bottom()); + + if(WALLPAPER_NULL != eWallpaperStyle) + { + if(rWallpaper.IsBitmap()) + { + // create bitmap background + CreateAndAppendBitmapWallpaper( + aWallpaperRange, + rWallpaper, + rTargetHolders.Current(), + rPropertyHolders.Current()); + } + else if(rWallpaper.IsGradient()) + { + // create gradient background + rTargetHolders.Current().append( + CreateGradientWallpaper( + aWallpaperRange, + rWallpaper.GetGradient(), + rPropertyHolders.Current())); + } + else if(!rWallpaper.GetColor().GetTransparency()) + { + // create color background + rTargetHolders.Current().append( + CreateColorWallpaper( + aWallpaperRange, + rWallpaper.GetColor().getBColor(), + rPropertyHolders.Current())); + } + } + } + + break; + } + case META_CLIPREGION_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaClipRegionAction* pA = (const MetaClipRegionAction*)pAction; + + if(pA->IsClipping()) + { + // new clipping + HandleNewClipRegion(&pA->GetRegion(), rTargetHolders, rPropertyHolders); + } + else + { + // end clipping + HandleNewClipRegion(0, rTargetHolders, rPropertyHolders); + } + + break; + } + case META_ISECTRECTCLIPREGION_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaISectRectClipRegionAction* pA = (const MetaISectRectClipRegionAction*)pAction; + const Rectangle& rRectangle = pA->GetRect(); + + if(rRectangle.IsEmpty()) + { + // intersect with empty rectangle will always give empty + // region; start new clipping with empty region + const Region aNewRegion; + HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders); + } + else + { + if(rPropertyHolders.Current().getRegionActive()) + { + if(rPropertyHolders.Current().getRegion().IsEmpty()) + { + // nothing to do, empty active clip region will stay + // empty when intersecting + } + else + { + // AND existing region and new rectangle + const basegfx::B2DPolyPolygon aOriginalPolyPolygon( + getB2DPolyPolygonFromRegion(rPropertyHolders.Current().getRegion())); + basegfx::B2DPolyPolygon aClippedPolyPolygon; + + if(aOriginalPolyPolygon.count()) + { + const basegfx::B2DRange aIntersectRange( + rRectangle.Left(), rRectangle.Top(), + rRectangle.Right(), rRectangle.Bottom()); + + aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnRange( + aOriginalPolyPolygon, aIntersectRange, true, false); + } + + if(aClippedPolyPolygon != aOriginalPolyPolygon) + { + // start new clipping with intersected region + const Region aNewRegion(aClippedPolyPolygon); + HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders); + } + } + } + else + { + // start new clipping with rectangle + const Region aNewRegion(rRectangle); + HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders); + } + } + + break; + } + case META_ISECTREGIONCLIPREGION_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaISectRegionClipRegionAction* pA = (const MetaISectRegionClipRegionAction*)pAction; + const Region& rNewRegion = pA->GetRegion(); + + if(rNewRegion.IsEmpty()) + { + // intersect with empty region will always give empty + // region; start new clipping with empty region + const Region aNewRegion; + HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders); + } + else + { + if(rPropertyHolders.Current().getRegionActive()) + { + if(rPropertyHolders.Current().getRegion().IsEmpty()) + { + // nothing to do, empty active clip region will stay empty + // when intersecting with any region + } + else + { + // AND existing and new region + const basegfx::B2DPolyPolygon aOriginalPolyPolygon( + getB2DPolyPolygonFromRegion(rPropertyHolders.Current().getRegion())); + basegfx::B2DPolyPolygon aClippedPolyPolygon; + + if(aOriginalPolyPolygon.count()) + { + const basegfx::B2DPolyPolygon aClipPolyPolygon( + getB2DPolyPolygonFromRegion(rNewRegion)); + + if(aClipPolyPolygon.count()) + { + aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon( + aOriginalPolyPolygon, aClipPolyPolygon, true, false); + } + } + + if(aClippedPolyPolygon != aOriginalPolyPolygon) + { + // start new clipping with intersected region + const Region aNewRegion(aClippedPolyPolygon); + HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders); + } + } + } + else + { + // start new clipping with new region + HandleNewClipRegion(&rNewRegion, rTargetHolders, rPropertyHolders); + } + } + + break; + } + case META_MOVECLIPREGION_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaMoveClipRegionAction* pA = (const MetaMoveClipRegionAction*)pAction; + + if(rPropertyHolders.Current().getRegionActive()) + { + if(rPropertyHolders.Current().getRegion().IsEmpty()) + { + // nothing to do + } + else + { + // move using old interface + Region aRegion(rPropertyHolders.Current().getRegion()); + + const sal_Int32 nHor(pA->GetHorzMove()); + const sal_Int32 nVer(pA->GetVertMove()); + + if(0 != nHor || 0 != nVer) + { + aRegion.Move(nHor, nVer); + HandleNewClipRegion(&aRegion, rTargetHolders, rPropertyHolders); + } + } + } + + break; + } + case META_LINECOLOR_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaLineColorAction* pA = (const MetaLineColorAction*)pAction; + const bool bActive(pA->IsSetting()); + + rPropertyHolders.Current().setLineColorActive(bActive); + if(bActive) + rPropertyHolders.Current().setLineColor(pA->GetColor().getBColor()); + + break; + } + case META_FILLCOLOR_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaFillColorAction* pA = (const MetaFillColorAction*)pAction; + const bool bActive(pA->IsSetting()); + + rPropertyHolders.Current().setFillColorActive(bActive); + if(bActive) + rPropertyHolders.Current().setFillColor(pA->GetColor().getBColor()); + + break; + } + case META_TEXTCOLOR_ACTION : + { + /** SIMPLE, DONE */ + const MetaTextColorAction* pA = (const MetaTextColorAction*)pAction; + const bool bActivate(COL_TRANSPARENT != pA->GetColor().GetColor()); + + rPropertyHolders.Current().setTextColorActive(bActivate); + rPropertyHolders.Current().setTextColor(pA->GetColor().getBColor()); + + break; + } + case META_TEXTFILLCOLOR_ACTION : + { + /** SIMPLE, DONE */ + const MetaTextFillColorAction* pA = (const MetaTextFillColorAction*)pAction; + const bool bWithColorArgument(pA->IsSetting()); + + if(bWithColorArgument) + { + // emulate OutputDevice::SetTextFillColor(...) WITH argument + const Color& rFontFillColor = pA->GetColor(); + rPropertyHolders.Current().setTextFillColor(rFontFillColor.getBColor()); + rPropertyHolders.Current().setTextFillColorActive(COL_TRANSPARENT != rFontFillColor.GetColor()); + } + else + { + // emulate SetFillColor() <- NO argument (!) + rPropertyHolders.Current().setTextFillColorActive(false); + } + + break; + } + case META_TEXTALIGN_ACTION : + { + /** SIMPLE, DONE */ + const MetaTextAlignAction* pA = (const MetaTextAlignAction*)pAction; + const TextAlign aNewTextAlign = pA->GetTextAlign(); + + // TextAlign is applied to the current font (as in + // OutputDevice::SetTextAlign which would be used when + // playing the Metafile) + if(rPropertyHolders.Current().getFont().GetAlign() != aNewTextAlign) + { + Font aNewFont(rPropertyHolders.Current().getFont()); + aNewFont.SetAlign(aNewTextAlign); + rPropertyHolders.Current().setFont(aNewFont); + } + + break; + } + case META_MAPMODE_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaMapModeAction* pA = (const MetaMapModeAction*)pAction; + const MapMode& rMapMode = pA->GetMapMode(); + basegfx::B2DHomMatrix aMapping; + + if(MAP_RELATIVE == rMapMode.GetMapUnit()) + { + aMapping = getTransformFromMapMode(rMapMode); + } + else + { + switch(rMapMode.GetMapUnit()) + { + case MAP_100TH_MM : + { + if(MAP_TWIP == rPropertyHolders.Current().getMapUnit()) + { + // MAP_TWIP -> MAP_100TH_MM + const double fTwipTo100thMm(127.0 / 72.0); + aMapping.scale(fTwipTo100thMm, fTwipTo100thMm); + } + break; + } + case MAP_TWIP : + { + if(MAP_100TH_MM == rPropertyHolders.Current().getMapUnit()) + { + // MAP_100TH_MM -> MAP_TWIP + const double f100thMmToTwip(72.0 / 127.0); + aMapping.scale(f100thMmToTwip, f100thMmToTwip); + } + break; + } + default : + { + OSL_ENSURE(false, "interpretMetafile: META_MAPMODE_ACTION with unsupported MapUnit (!)"); + break; + } + } + + aMapping = getTransformFromMapMode(rMapMode) * aMapping; + rPropertyHolders.Current().setMapUnit(rMapMode.GetMapUnit()); + } + + if(!aMapping.isIdentity()) + { + aMapping = aMapping * rPropertyHolders.Current().getTransformation(); + rPropertyHolders.Current().setTransformation(aMapping); + } + + break; + } + case META_FONT_ACTION : + { + /** SIMPLE, DONE */ + const MetaFontAction* pA = (const MetaFontAction*)pAction; + rPropertyHolders.Current().setFont(pA->GetFont()); + + // older Metafiles have no META_TEXTCOLOR_ACTION which defines + // the FontColor now, so use the Font's color when not transparent + const Color& rFontColor = pA->GetFont().GetColor(); + const bool bActivate(COL_TRANSPARENT != rFontColor.GetColor()); + + if(bActivate) + { + rPropertyHolders.Current().setTextColor(rFontColor.getBColor()); + } + + // caution: do NOT decativate here on transparet, see + // OutputDevice::SetFont(..) for more info + // rPropertyHolders.Current().setTextColorActive(bActivate); + + // for fill color emulate a MetaTextFillColorAction with !transparent as bool, + // see OutputDevice::SetFont(..) the if(mpMetaFile) case + if(bActivate) + { + const Color& rFontFillColor = pA->GetFont().GetFillColor(); + rPropertyHolders.Current().setTextFillColor(rFontFillColor.getBColor()); + rPropertyHolders.Current().setTextFillColorActive(COL_TRANSPARENT != rFontFillColor.GetColor()); + } + else + { + rPropertyHolders.Current().setTextFillColorActive(false); + } + + break; + } + case META_PUSH_ACTION : + { + /** CHECKED, WORKS WELL */ + rPropertyHolders.Push(); + + break; + } + case META_POP_ACTION : + { + /** CHECKED, WORKS WELL */ + if(rPropertyHolders.Current().getRegionActive()) + { + // end clipping + HandleNewClipRegion(0, rTargetHolders, rPropertyHolders); + } + + if(rPropertyHolders.Current().isRasterOpActive()) + { + // end RasterOp + HandleNewRasterOp(ROP_OVERPAINT, rTargetHolders, rPropertyHolders); + } + + rPropertyHolders.Pop(); + + if(rPropertyHolders.Current().isRasterOpActive()) + { + // start RasterOp + HandleNewRasterOp(rPropertyHolders.Current().getRasterOp(), rTargetHolders, rPropertyHolders); + } + + if(rPropertyHolders.Current().getRegionActive()) + { + // start clipping + HandleNewClipRegion(&rPropertyHolders.Current().getRegion(), rTargetHolders, rPropertyHolders); + } + + break; + } + case META_RASTEROP_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaRasterOpAction* pA = (const MetaRasterOpAction*)pAction; + const RasterOp aRasterOp = pA->GetRasterOp(); + + HandleNewRasterOp(pA->GetRasterOp(), rTargetHolders, rPropertyHolders); + + break; + } + case META_TRANSPARENT_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaTransparentAction* pA = (const MetaTransparentAction*)pAction; + const basegfx::B2DPolyPolygon aOutline(pA->GetPolyPolygon().getB2DPolyPolygon()); + + if(aOutline.count()) + { + const sal_uInt16 nTransparence(pA->GetTransparence()); + + if(0 == nTransparence) + { + // not transparent + createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); + } + else if(nTransparence >= 100) + { + // fully or more than transparent + } + else + { + // transparent. Create new target + rTargetHolders.Push(); + + // create primitives there and get them + createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); + const drawinglayer::primitive2d::Primitive2DSequence aSubContent( + rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current())); + + // back to old target + rTargetHolders.Pop(); + + if(aSubContent.hasElements()) + { + rTargetHolders.Current().append( + new drawinglayer::primitive2d::UnifiedAlphaPrimitive2D( + aSubContent, + nTransparence * 0.01)); + } + } + } + + break; + } + case META_EPS_ACTION : + { + /** NEEDS IMPLEMENTATION */ + OSL_ENSURE(false, "META_EPS_ACTION requested (!)"); + const MetaEPSAction* pA = (const MetaEPSAction*)pAction; + break; + } + case META_REFPOINT_ACTION : + { + /** SIMPLE, DONE */ + // only used for hatch and line pattern offsets + // const MetaRefPointAction* pA = (const MetaRefPointAction*)pAction; + break; + } + case META_TEXTLINECOLOR_ACTION : + { + /** SIMPLE, DONE */ + const MetaTextLineColorAction* pA = (const MetaTextLineColorAction*)pAction; + const bool bActive(pA->IsSetting()); + + rPropertyHolders.Current().setTextLineColorActive(bActive); + if(bActive) + rPropertyHolders.Current().setTextLineColor(pA->GetColor().getBColor()); + + break; + } + case META_TEXTLINE_ACTION : + { + /** NEEDS IMPLEMENTATION */ + OSL_ENSURE(false, "META_TEXTLINE_ACTION requested (!)"); + // actually creates overline, underline and strikeouts, so + // these should be isolated from TextDecoratedPortionPrimitive2D + // to own primitives... + const MetaTextLineAction* pA = (const MetaTextLineAction*)pAction; + break; + } + case META_FLOATTRANSPARENT_ACTION : + { + /** CHECKED, WORKS WELL */ + const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*)pAction; + const Rectangle aTargetRectangle(pA->GetPoint(), pA->GetSize()); + + if(!aTargetRectangle.IsEmpty()) + { + const GDIMetaFile& rContent = pA->GetGDIMetaFile(); + + if(rContent.GetActionCount()) + { + // create the sub-content + drawinglayer::primitive2d::Primitive2DSequence xSubContent; + { + rTargetHolders.Push(); + interpretMetafile(rContent, rTargetHolders, rPropertyHolders, rViewInformation); + xSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current()); + rTargetHolders.Pop(); + } + + if(xSubContent.hasElements()) + { + // check if gradient is a real gradient + const Gradient& rGradient = pA->GetGradient(); + const drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient)); + + if(aAttribute.getStartColor() == aAttribute.getEndColor()) + { + // not really a gradient; create UnifiedAlphaPrimitive2D + rTargetHolders.Current().append( + new drawinglayer::primitive2d::UnifiedAlphaPrimitive2D( + xSubContent, + aAttribute.getStartColor().luminance())); + } + else + { + // really a gradient. Create gradient sub-content (with correct scaling) + basegfx::B2DRange aRange( + aTargetRectangle.Left(), aTargetRectangle.Top(), + aTargetRectangle.Right(), aTargetRectangle.Bottom()); + aRange.transform(rPropertyHolders.Current().getTransformation()); + + // prepare gradient for alpha content + const drawinglayer::primitive2d::Primitive2DReference xAlpha( + new drawinglayer::primitive2d::FillGradientPrimitive2D( + aRange, + aAttribute)); + + // create alpha primitive + rTargetHolders.Current().append( + new drawinglayer::primitive2d::AlphaPrimitive2D( + xSubContent, + drawinglayer::primitive2d::Primitive2DSequence(&xAlpha, 1))); + } + } + } + } + + break; + } + case META_GRADIENTEX_ACTION : + { + /** SIMPLE, DONE */ + // This is only a data holder which is interpreted inside comment actions + // const MetaGradientExAction* pA = (const MetaGradientExAction*)pAction; + break; + } + case META_LAYOUTMODE_ACTION : + { + /** SIMPLE, DONE */ + const MetaLayoutModeAction* pA = (const MetaLayoutModeAction*)pAction; + rPropertyHolders.Current().setLayoutMode(pA->GetLayoutMode()); + break; + } + case META_TEXTLANGUAGE_ACTION : + { + /** SIMPLE, DONE */ + const MetaTextLanguageAction* pA = (const MetaTextLanguageAction*)pAction; + rPropertyHolders.Current().setLanguageType(pA->GetTextLanguage()); + break; + } + case META_OVERLINECOLOR_ACTION : + { + /** SIMPLE, DONE */ + const MetaOverlineColorAction* pA = (const MetaOverlineColorAction*)pAction; + const bool bActive(pA->IsSetting()); + + rPropertyHolders.Current().setOverlineColorActive(bActive); + if(bActive) + rPropertyHolders.Current().setOverlineColor(pA->GetColor().getBColor()); + + break; + } + case META_COMMENT_ACTION : + { + /** NEEDS IMPLEMENTATION */ + OSL_ENSURE(false, "META_COMMENT_ACTION requested (!)"); + const MetaCommentAction* pA = (const MetaCommentAction*)pAction; + break; + } + default: + { + OSL_ENSURE(false, "Unknown MetaFile Action (!)"); + break; + } + } + } + } +} // end of anonymous namespace + +////////////////////////////////////////////////////////////////////////////// + namespace drawinglayer { namespace primitive2d { + Primitive2DSequence MetafilePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + { + TargetHolders aTargetHolders; + PropertyHolders aPropertyHolders; + + interpretMetafile(getMetaFile(), aTargetHolders, aPropertyHolders, rViewInformation); + Primitive2DSequence xRetval = aTargetHolders.Current().getPrimitive2DSequence(aPropertyHolders.Current()); + + if(xRetval.hasElements()) + { + Rectangle aMtfTarget(getMetaFile().GetPrefMapMode().GetOrigin(), getMetaFile().GetPrefSize()); + + if(MAP_PIXEL == getMetaFile().GetPrefMapMode().GetMapUnit()) + { + aMtfTarget = Application::GetDefaultDevice()->PixelToLogic(aMtfTarget, MAP_100TH_MM); + } + else + { + aMtfTarget = Application::GetDefaultDevice()->LogicToLogic(aMtfTarget, getMetaFile().GetPrefMapMode(), MAP_100TH_MM); + } + + basegfx::B2DHomMatrix aAdaptedTransform; + + aAdaptedTransform.translate(-aMtfTarget.Left(), -aMtfTarget.Top()); + aAdaptedTransform.scale( + aMtfTarget.getWidth() ? 1.0 / aMtfTarget.getWidth() : 1.0, + aMtfTarget.getHeight() ? 1.0 / aMtfTarget.getHeight() : 1.0); + aAdaptedTransform = getTransform() * aAdaptedTransform; + + const Primitive2DReference aEmbeddedTransform( + new TransformPrimitive2D( + aAdaptedTransform, + xRetval)); + + xRetval = Primitive2DSequence(&aEmbeddedTransform, 1); + } + + return xRetval; + } + MetafilePrimitive2D::MetafilePrimitive2D( const basegfx::B2DHomMatrix& rMetaFileTransform, const GDIMetaFile& rMetaFile) - : BasePrimitive2D(), + : BufferedDecompositionPrimitive2D(), maMetaFileTransform(rMetaFileTransform), maMetaFile(rMetaFile) { @@ -61,7 +2542,7 @@ namespace drawinglayer bool MetafilePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BasePrimitive2D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const MetafilePrimitive2D& rCompare = (MetafilePrimitive2D&)rPrimitive; diff --git a/drawinglayer/source/primitive2d/primitivetools2d.cxx b/drawinglayer/source/primitive2d/primitivetools2d.cxx index 30af3a998daf..2b25590bf1f4 100644 --- a/drawinglayer/source/primitive2d/primitivetools2d.cxx +++ b/drawinglayer/source/primitive2d/primitivetools2d.cxx @@ -102,5 +102,77 @@ namespace drawinglayer } // end of namespace primitive2d } // end of namespace drawinglayer +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + Primitive2DSequence ViewTransformationDependentPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + { + ::osl::MutexGuard aGuard( m_aMutex ); + + // get the current ViewTransformation + const basegfx::B2DHomMatrix& rViewTransformation = rViewInformation.getViewTransformation(); + + if(getBuffered2DDecomposition().hasElements() && rViewTransformation != getViewTransformation()) + { + // conditions of last local decomposition have changed, delete + const_cast< ViewTransformationDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); + } + + if(!getBuffered2DDecomposition().hasElements()) + { + // remember new valid ViewTransformation + const_cast< ViewTransformationDependentPrimitive2D* >(this)->maViewTransformation = rViewTransformation; + } + + // call base implementation + return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation); + } + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + Primitive2DSequence ObjectAndViewTransformationDependentPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + { + ::osl::MutexGuard aGuard( m_aMutex ); + + // get the current ViewTransfromation + const basegfx::B2DHomMatrix& rViewTransformation = rViewInformation.getViewTransformation(); + + if(getBuffered2DDecomposition().hasElements() && rViewTransformation != getViewTransformation()) + { + // conditions of last local decomposition have changed, delete + const_cast< ObjectAndViewTransformationDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); + } + + // get the current ObjectTransformation + const basegfx::B2DHomMatrix& rObjectTransformation = rViewInformation.getObjectTransformation(); + + if(getBuffered2DDecomposition().hasElements() && rObjectTransformation != getObjectTransformation()) + { + // conditions of last local decomposition have changed, delete + const_cast< ObjectAndViewTransformationDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); + } + + if(!getBuffered2DDecomposition().hasElements()) + { + // remember new valid ViewTransformation, and ObjectTransformation + const_cast< ObjectAndViewTransformationDependentPrimitive2D* >(this)->maViewTransformation = rViewTransformation; + const_cast< ObjectAndViewTransformationDependentPrimitive2D* >(this)->maObjectTransformation = rObjectTransformation; + } + + // call base implementation + return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation); + } + } // end of namespace primitive2d +} // end of namespace drawinglayer + ////////////////////////////////////////////////////////////////////////////// // eof diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx index 49ffab60778a..9403df5376aa 100644 --- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx @@ -48,6 +48,8 @@ #include #include #include +#include +#include ////////////////////////////////////////////////////////////////////////////// @@ -55,217 +57,6 @@ namespace drawinglayer { namespace primitive2d { - void TextDecoratedPortionPrimitive2D::impCreateTextLine( - std::vector< Primitive2DReference >& rTarget, - basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans, - const basegfx::B2DHomMatrix &rUnscaledTransform, - FontUnderline eLineStyle, - double fLineOffset, - double fLineHeight, - double fLineWidth, - const basegfx::BColor& rLineColor) const - { - bool bDoubleLine(false); - bool bWaveLine(false); - bool bBoldLine(false); - const int* pDotDashArray(0); - basegfx::B2DLineJoin eLineJoin(basegfx::B2DLINEJOIN_NONE); - - static const int aDottedArray[] = { 1, 1, 0}; // DOTTED LINE - static const int aDotDashArray[] = { 1, 1, 4, 1, 0}; // DASHDOT - static const int aDashDotDotArray[] = { 1, 1, 1, 1, 4, 1, 0}; // DASHDOTDOT - static const int aDashedArray[] = { 5, 2, 0}; // DASHED LINE - static const int aLongDashArray[] = { 7, 2, 0}; // LONGDASH - - switch(eLineStyle) - { - default: // case FONT_UNDERLINE_SINGLE: - { - break; - } - case FONT_UNDERLINE_DOUBLE: - { - bDoubleLine = true; - break; - } - case FONT_UNDERLINE_DOTTED: - { - pDotDashArray = aDottedArray; - break; - } - case FONT_UNDERLINE_DASH: - { - pDotDashArray = aDashedArray; - break; - } - case FONT_UNDERLINE_LONGDASH: - { - pDotDashArray = aLongDashArray; - break; - } - case FONT_UNDERLINE_DASHDOT: - { - pDotDashArray = aDotDashArray; - break; - } - case FONT_UNDERLINE_DASHDOTDOT: - { - pDotDashArray = aDashDotDotArray; - break; - } - case FONT_UNDERLINE_SMALLWAVE: - { - bWaveLine = true; - break; - } - case FONT_UNDERLINE_WAVE: - { - bWaveLine = true; - break; - } - case FONT_UNDERLINE_DOUBLEWAVE: - { - bDoubleLine = true; - bWaveLine = true; - break; - } - case FONT_UNDERLINE_BOLD: - { - bBoldLine = true; - break; - } - case FONT_UNDERLINE_BOLDDOTTED: - { - bBoldLine = true; - pDotDashArray = aDottedArray; - break; - } - case FONT_UNDERLINE_BOLDDASH: - { - bBoldLine = true; - pDotDashArray = aDashedArray; - break; - } - case FONT_UNDERLINE_BOLDLONGDASH: - { - bBoldLine = true; - pDotDashArray = aLongDashArray; - break; - } - case FONT_UNDERLINE_BOLDDASHDOT: - { - bBoldLine = true; - pDotDashArray = aDotDashArray; - break; - } - case FONT_UNDERLINE_BOLDDASHDOTDOT: - { - bBoldLine = true; - pDotDashArray = aDashDotDotArray; - break; - } - case FONT_UNDERLINE_BOLDWAVE: - { - bWaveLine = true; - bBoldLine = true; - break; - } - } - - if(bBoldLine) - { - fLineHeight *= 2.0; - } - - if(bDoubleLine) - { - fLineOffset -= 0.50 * fLineHeight; - fLineHeight *= 0.64; - } - - if(bWaveLine) - { - eLineJoin = basegfx::B2DLINEJOIN_ROUND; - fLineHeight *= 0.25; - } - - // prepare Line and Stroke Attributes - const attribute::LineAttribute aLineAttribute(rLineColor, fLineHeight, eLineJoin); - attribute::StrokeAttribute aStrokeAttribute; - - if(pDotDashArray) - { - ::std::vector< double > aDoubleArray; - - for(const int* p = pDotDashArray; *p; ++p) - { - aDoubleArray.push_back((double)(*p) * fLineHeight); - } - - aStrokeAttribute = attribute::StrokeAttribute(aDoubleArray); - } - - // create base polygon and new primitive - basegfx::B2DPolygon aLine; - Primitive2DReference aNewPrimitive; - - aLine.append(basegfx::B2DPoint(0.0, fLineOffset)); - aLine.append(basegfx::B2DPoint(fLineWidth, fLineOffset)); - aLine.transform(rUnscaledTransform); - - if(bWaveLine) - { - double fWaveWidth(10.6 * fLineHeight); - - if(FONT_UNDERLINE_SMALLWAVE == eLineStyle) - { - fWaveWidth *= 0.7; - } - else if(FONT_UNDERLINE_WAVE == eLineStyle) - { - // extra multiply to get the same WaveWidth as with the bold version - fWaveWidth *= 2.0; - } - - aNewPrimitive = Primitive2DReference(new PolygonWavePrimitive2D(aLine, aLineAttribute, aStrokeAttribute, fWaveWidth, fWaveWidth * 0.5)); - } - else - { - aNewPrimitive = Primitive2DReference(new PolygonStrokePrimitive2D(aLine, aLineAttribute, aStrokeAttribute)); - } - - // add primitive - rTarget.push_back(aNewPrimitive); - - if(bDoubleLine) - { - // double line, create 2nd primitive with offset using TransformPrimitive based on - // already created NewPrimitive - double fLineDist(2.3 * fLineHeight); - - if(bWaveLine) - { - fLineDist = 6.3 * fLineHeight; - } - - // move base point of text to 0.0 and de-rotate - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( - -rDecTrans.getTranslate().getX(), -rDecTrans.getTranslate().getY())); - aTransform.rotate(-rDecTrans.getRotate()); - - // translate in Y by offset - aTransform.translate(0.0, fLineDist); - - // move back and rotate - aTransform.rotate(rDecTrans.getRotate()); - aTransform.translate(rDecTrans.getTranslate().getX(), rDecTrans.getTranslate().getY()); - - // add transform primitive - const Primitive2DSequence aContent(&aNewPrimitive, 1); - rTarget.push_back(Primitive2DReference(new TransformPrimitive2D(aTransform, aContent))); - } - } - void TextDecoratedPortionPrimitive2D::impCreateGeometryContent( std::vector< Primitive2DReference >& rTarget, basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans, @@ -273,7 +64,7 @@ namespace drawinglayer xub_StrLen aTextPosition, xub_StrLen aTextLength, const ::std::vector< double >& rDXArray, - const FontAttributes& rFontAttributes) const + const attribute::FontAttribute& rFontAttribute) const { // create the SimpleTextPrimitive needed in any case rTarget.push_back(Primitive2DReference( @@ -283,13 +74,13 @@ namespace drawinglayer aTextPosition, aTextLength, rDXArray, - rFontAttributes, + rFontAttribute, getLocale(), getFontColor()))); // see if something else needs to be done - const bool bOverlineUsed(FONT_UNDERLINE_NONE != getFontOverline()); - const bool bUnderlineUsed(FONT_UNDERLINE_NONE != getFontUnderline()); + const bool bOverlineUsed(TEXT_LINE_NONE != getFontOverline()); + const bool bUnderlineUsed(TEXT_LINE_NONE != getFontUnderline()); const bool bStrikeoutUsed(FONT_STRIKEOUT_NONE != getFontStrikeout()); if(bUnderlineUsed || bStrikeoutUsed || bOverlineUsed) @@ -303,8 +94,8 @@ namespace drawinglayer // TextLayouterDevice is needed to get metrics for text decorations like // underline/strikeout/emphasis marks from it. For setup, the font size is needed - aTextLayouter.setFontAttributes( - getFontAttributes(), + aTextLayouter.setFontAttribute( + getFontAttribute(), rDecTrans.getScale().getX(), rDecTrans.getScale().getY(), getLocale()); @@ -332,15 +123,27 @@ namespace drawinglayer if(bOverlineUsed) { // create primitive geometry for overline - impCreateTextLine(rTarget, rDecTrans, aUnscaledTransform, getFontOverline(), aTextLayouter.getOverlineOffset(), - aTextLayouter.getOverlineHeight(), fTextWidth, getOverlineColor()); + rTarget.push_back(Primitive2DReference( + new TextLinePrimitive2D( + rDecTrans.getB2DHomMatrix(), + fTextWidth, + aTextLayouter.getOverlineOffset(), + aTextLayouter.getOverlineHeight(), + getFontOverline(), + getOverlineColor()))); } if(bUnderlineUsed) { // create primitive geometry for underline - impCreateTextLine(rTarget, rDecTrans, aUnscaledTransform, getFontUnderline(), aTextLayouter.getUnderlineOffset(), - aTextLayouter.getUnderlineHeight(), fTextWidth, getTextlineColor()); + rTarget.push_back(Primitive2DReference( + new TextLinePrimitive2D( + rDecTrans.getB2DHomMatrix(), + fTextWidth, + aTextLayouter.getUnderlineOffset(), + aTextLayouter.getUnderlineHeight(), + getFontUnderline(), + getTextlineColor()))); } if(bStrikeoutUsed) @@ -350,97 +153,27 @@ namespace drawinglayer { // strikeout with character const sal_Unicode aStrikeoutChar(FONT_STRIKEOUT_SLASH == getFontStrikeout() ? '/' : 'X'); - const String aSingleCharString(aStrikeoutChar); - const double fStrikeCharWidth(aTextLayouter.getTextWidth(aSingleCharString, 0, 1)); - const double fStrikeCharCount(fabs(fTextWidth/fStrikeCharWidth)); - const sal_uInt32 nStrikeCharCount(static_cast< sal_uInt32 >(fStrikeCharCount + 0.5)); - std::vector aDXArray(nStrikeCharCount); - String aStrikeoutString; - - for(sal_uInt32 a(0); a < nStrikeCharCount; a++) - { - aStrikeoutString += aSingleCharString; - aDXArray[a] = (a + 1) * fStrikeCharWidth; - } rTarget.push_back(Primitive2DReference( - new TextSimplePortionPrimitive2D( + new TextCharacterStrikeoutPrimitive2D( rDecTrans.getB2DHomMatrix(), - aStrikeoutString, - 0, - aStrikeoutString.Len(), - aDXArray, - rFontAttributes, - getLocale(), - getFontColor()))); + fTextWidth, + getFontColor(), + aStrikeoutChar, + getFontAttribute(), + getLocale()))); } else { // strikeout with geometry - double fStrikeoutHeight(aTextLayouter.getUnderlineHeight()); - double fStrikeoutOffset(aTextLayouter.getStrikeoutOffset()); - bool bDoubleLine(false); - - // set line attribute - switch(getFontStrikeout()) - { - default : // case primitive2d::FONT_STRIKEOUT_SINGLE: - { - break; - } - case primitive2d::FONT_STRIKEOUT_DOUBLE: - { - bDoubleLine = true; - break; - } - case primitive2d::FONT_STRIKEOUT_BOLD: - { - fStrikeoutHeight *= 2.0; - break; - } - } - - if(bDoubleLine) - { - fStrikeoutOffset -= 0.50 * fStrikeoutHeight; - fStrikeoutHeight *= 0.64; - } - - // create base polygon and new primitive - basegfx::B2DPolygon aStrikeoutLine; - - aStrikeoutLine.append(basegfx::B2DPoint(0.0, -fStrikeoutOffset)); - aStrikeoutLine.append(basegfx::B2DPoint(fTextWidth, -fStrikeoutOffset)); - aStrikeoutLine.transform(aUnscaledTransform); - - const attribute::LineAttribute aLineAttribute(getFontColor(), fStrikeoutHeight, basegfx::B2DLINEJOIN_NONE); - Primitive2DReference aNewPrimitive(new PolygonStrokePrimitive2D(aStrikeoutLine, aLineAttribute)); - - // add primitive - rTarget.push_back(aNewPrimitive); - - if(bDoubleLine) - { - // double line, create 2nd primitive with offset using TransformPrimitive based on - // already created NewPrimitive - const double fLineDist(2.0 * fStrikeoutHeight); - - // move base point of text to 0.0 and de-rotate - basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( - -rDecTrans.getTranslate().getX(), -rDecTrans.getTranslate().getY())); - aTransform.rotate(-rDecTrans.getRotate()); - - // translate in Y by offset - aTransform.translate(0.0, -fLineDist); - - // move back and rotate - aTransform.rotate(rDecTrans.getRotate()); - aTransform.translate(rDecTrans.getTranslate().getX(), rDecTrans.getTranslate().getY()); - - // add transform primitive - const Primitive2DSequence aContent(&aNewPrimitive, 1); - rTarget.push_back(Primitive2DReference(new TransformPrimitive2D(aTransform, aContent))); - } + rTarget.push_back(Primitive2DReference( + new TextGeometryStrikeoutPrimitive2D( + rDecTrans.getB2DHomMatrix(), + fTextWidth, + getFontColor(), + aTextLayouter.getUnderlineHeight(), + aTextLayouter.getStrikeoutOffset(), + getFontStrikeout()))); } } } @@ -507,21 +240,21 @@ namespace drawinglayer impCorrectTextBoundary(aNextWordBoundary); // prepare new font attributes WITHOUT outline - const FontAttributes aNewFontAttributes( - getFontAttributes().getFamilyName(), - getFontAttributes().getStyleName(), - getFontAttributes().getWeight(), - getFontAttributes().getSymbol(), - getFontAttributes().getVertical(), - getFontAttributes().getItalic(), + const attribute::FontAttribute aNewFontAttribute( + getFontAttribute().getFamilyName(), + getFontAttribute().getStyleName(), + getFontAttribute().getWeight(), + getFontAttribute().getSymbol(), + getFontAttribute().getVertical(), + getFontAttribute().getItalic(), false, // no outline anymore, handled locally - getFontAttributes().getRTL(), - getFontAttributes().getBiDiStrong()); + getFontAttribute().getRTL(), + getFontAttribute().getBiDiStrong()); if(aNextWordBoundary.startPos == getTextPosition() && aNextWordBoundary.endPos == getTextLength()) { // it IS only a single word, handle as one word - impCreateGeometryContent(rTarget, rDecTrans, getText(), getTextPosition(), getTextLength(), getDXArray(), aNewFontAttributes); + impCreateGeometryContent(rTarget, rDecTrans, getText(), getTextPosition(), getTextLength(), getDXArray(), aNewFontAttribute); } else { @@ -532,8 +265,8 @@ namespace drawinglayer if(bNoDXArray) { // ..but only completely when no DXArray - aTextLayouter.setFontAttributes( - getFontAttributes(), + aTextLayouter.setFontAttribute( + getFontAttribute(), rDecTrans.getScale().getX(), rDecTrans.getScale().getY(), getLocale()); @@ -612,7 +345,7 @@ namespace drawinglayer basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose aDecTrans(aNewTransform); impCreateGeometryContent(rTarget, aDecTrans, getText(), nNewTextStart, - nNewTextEnd - nNewTextStart, aNewDXArray, aNewFontAttributes); + nNewTextEnd - nNewTextStart, aNewDXArray, aNewFontAttribute); if(aNextWordBoundary.endPos >= getTextPosition() + getTextLength()) { @@ -659,19 +392,19 @@ namespace drawinglayer else { // prepare new font attributes WITHOUT outline - const FontAttributes aNewFontAttributes( - getFontAttributes().getFamilyName(), - getFontAttributes().getStyleName(), - getFontAttributes().getWeight(), - getFontAttributes().getSymbol(), - getFontAttributes().getVertical(), - getFontAttributes().getItalic(), + const attribute::FontAttribute aNewFontAttribute( + getFontAttribute().getFamilyName(), + getFontAttribute().getStyleName(), + getFontAttribute().getWeight(), + getFontAttribute().getSymbol(), + getFontAttribute().getVertical(), + getFontAttribute().getItalic(), false, // no outline anymore, handled locally - getFontAttributes().getRTL(), - getFontAttributes().getBiDiStrong()); + getFontAttribute().getRTL(), + getFontAttribute().getBiDiStrong()); // handle as one word - impCreateGeometryContent(aNewPrimitives, aDecTrans, getText(), getTextPosition(), getTextLength(), getDXArray(), aNewFontAttributes); + impCreateGeometryContent(aNewPrimitives, aDecTrans, getText(), getTextPosition(), getTextLength(), getDXArray(), aNewFontAttribute); } // convert to Primitive2DSequence @@ -693,7 +426,7 @@ namespace drawinglayer // outline AND shadow depend on NO FontRelief (see dialog) const bool bHasFontRelief(FONT_RELIEF_NONE != getFontRelief()); const bool bHasShadow(!bHasFontRelief && getShadow()); - const bool bHasOutline(!bHasFontRelief && getFontAttributes().getOutline()); + const bool bHasOutline(!bHasFontRelief && getFontAttribute().getOutline()); if(bHasShadow || bHasFontRelief || bHasOutline) { @@ -792,15 +525,15 @@ namespace drawinglayer xub_StrLen aTextPosition, xub_StrLen aTextLength, const ::std::vector< double >& rDXArray, - const FontAttributes& rFontAttributes, + const attribute::FontAttribute& rFontAttribute, const ::com::sun::star::lang::Locale& rLocale, const basegfx::BColor& rFontColor, // local parameters const basegfx::BColor& rOverlineColor, const basegfx::BColor& rTextlineColor, - FontUnderline eFontOverline, - FontUnderline eFontUnderline, + TextLine eFontOverline, + TextLine eFontUnderline, bool bUnderlineAbove, FontStrikeout eFontStrikeout, bool bWordLineMode, @@ -809,7 +542,7 @@ namespace drawinglayer bool bEmphasisMarkBelow, FontRelief eFontRelief, bool bShadow) - : TextSimplePortionPrimitive2D(rNewTransform, rText, aTextPosition, aTextLength, rDXArray, rFontAttributes, rLocale, rFontColor), + : TextSimplePortionPrimitive2D(rNewTransform, rText, aTextPosition, aTextLength, rDXArray, rFontAttribute, rLocale, rFontColor), maOverlineColor(rOverlineColor), maTextlineColor(rTextlineColor), meFontOverline(eFontOverline), @@ -854,8 +587,8 @@ namespace drawinglayer basegfx::B2DRange TextDecoratedPortionPrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewInformation) const { const bool bDecoratedIsNeeded( - FONT_UNDERLINE_NONE != getFontOverline() - || FONT_UNDERLINE_NONE != getFontUnderline() + TEXT_LINE_NONE != getFontOverline() + || TEXT_LINE_NONE != getFontUnderline() || FONT_STRIKEOUT_NONE != getFontStrikeout() || FONT_EMPHASISMARK_NONE != getFontEmphasisMark() || FONT_RELIEF_NONE != getFontRelief() diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index e321783c8406..f24398a1a6ac 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -167,14 +167,14 @@ namespace drawinglayer mrDevice.SetFont( rFont ); } - void TextLayouterDevice::setFontAttributes( - const FontAttributes& rFontAttributes, + void TextLayouterDevice::setFontAttribute( + const attribute::FontAttribute& rFontAttribute, double fFontScaleX, double fFontScaleY, const ::com::sun::star::lang::Locale& rLocale) { - setFont(getVclFontFromFontAttributes( - rFontAttributes, + setFont(getVclFontFromFontAttribute( + rFontAttribute, fFontScaleX, fFontScaleY, 0.0, @@ -297,6 +297,18 @@ namespace drawinglayer return basegfx::B2DRange(); } + + double TextLayouterDevice::getFontAscent() const + { + const ::FontMetric& rMetric = mrDevice.GetFontMetric(); + return rMetric.GetAscent(); + } + + double TextLayouterDevice::getFontDescent() const + { + const ::FontMetric& rMetric = mrDevice.GetFontMetric(); + return rMetric.GetDescent(); + } } // end of namespace primitive2d } // end of namespace drawinglayer @@ -307,8 +319,8 @@ namespace drawinglayer { namespace primitive2d { - Font getVclFontFromFontAttributes( - const FontAttributes& rFontAttributes, + Font getVclFontFromFontAttribute( + const attribute::FontAttribute& rFontAttribute, double fFontScaleX, double fFontScaleY, double fFontRotation, @@ -324,8 +336,8 @@ namespace drawinglayer // is wanted, that width needs to be adapted using FontMetric again to get a // width of the unscaled font Font aRetval( - rFontAttributes.getFamilyName(), - rFontAttributes.getStyleName(), + rFontAttribute.getFamilyName(), + rFontAttribute.getStyleName(), Size(0, nHeight)); #else // for non-WIN32 systems things are easier since these accept a Font creation @@ -334,17 +346,17 @@ namespace drawinglayer // Font would be recorded in a MetaFile (The MetaFile FontAction WILL record a // set FontWidth; import that in a WIN32 system, and trouble is there) Font aRetval( - rFontAttributes.getFamilyName(), - rFontAttributes.getStyleName(), + rFontAttribute.getFamilyName(), + rFontAttribute.getStyleName(), Size(bFontIsScaled ? nWidth : 0, nHeight)); #endif - // define various other FontAttributes + // define various other FontAttribute aRetval.SetAlign(ALIGN_BASELINE); - aRetval.SetCharSet(rFontAttributes.getSymbol() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE); - aRetval.SetVertical(rFontAttributes.getVertical() ? TRUE : FALSE); - aRetval.SetWeight(static_cast(rFontAttributes.getWeight())); - aRetval.SetItalic(rFontAttributes.getItalic() ? ITALIC_NORMAL : ITALIC_NONE); - aRetval.SetOutline(rFontAttributes.getOutline()); + aRetval.SetCharSet(rFontAttribute.getSymbol() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE); + aRetval.SetVertical(rFontAttribute.getVertical() ? TRUE : FALSE); + aRetval.SetWeight(static_cast(rFontAttribute.getWeight())); + aRetval.SetItalic(rFontAttribute.getItalic() ? ITALIC_NORMAL : ITALIC_NONE); + aRetval.SetOutline(rFontAttribute.getOutline()); aRetval.SetLanguage(MsLangId::convertLocaleToLanguage(rLocale)); #ifdef WIN32 @@ -371,13 +383,13 @@ namespace drawinglayer return aRetval; } - FontAttributes getFontAttributesFromVclFont( + attribute::FontAttribute getFontAttributeFromVclFont( basegfx::B2DVector& o_rSize, const Font& rFont, bool bRTL, bool bBiDiStrong) { - const FontAttributes aRetval( + const attribute::FontAttribute aRetval( rFont.GetName(), rFont.GetStyleName(), static_cast(rFont.GetWeight()), diff --git a/drawinglayer/source/primitive2d/textlineprimitive2d.cxx b/drawinglayer/source/primitive2d/textlineprimitive2d.cxx new file mode 100644 index 000000000000..45b2809be2ce --- /dev/null +++ b/drawinglayer/source/primitive2d/textlineprimitive2d.cxx @@ -0,0 +1,317 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: textdecoratedprimitive2d.cxx,v $ + * + * $Revision: 1.12 $ + * + * last change: $Author: aw $ $Date: 2008-05-27 14:11:20 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_drawinglayer.hxx" + +#include +#include +#include +#include +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + Primitive2DSequence TextLinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + Primitive2DSequence xRetval; + + if(TEXT_LINE_NONE != getTextLine()) + { + bool bDoubleLine(false); + bool bWaveLine(false); + bool bBoldLine(false); + const int* pDotDashArray(0); + basegfx::B2DLineJoin eLineJoin(basegfx::B2DLINEJOIN_NONE); + double fOffset(getOffset()); + double fHeight(getHeight()); + + static const int aDottedArray[] = { 1, 1, 0}; // DOTTED LINE + static const int aDotDashArray[] = { 1, 1, 4, 1, 0}; // DASHDOT + static const int aDashDotDotArray[] = { 1, 1, 1, 1, 4, 1, 0}; // DASHDOTDOT + static const int aDashedArray[] = { 5, 2, 0}; // DASHED LINE + static const int aLongDashArray[] = { 7, 2, 0}; // LONGDASH + + // get decomposition + basegfx::B2DVector aScale, aTranslate; + double fRotate, fShearX; + getObjectTransformation().decompose(aScale, aTranslate, fRotate, fShearX); + + switch(getTextLine()) + { + default: // case TEXT_LINE_SINGLE: + { + break; + } + case TEXT_LINE_DOUBLE: + { + bDoubleLine = true; + break; + } + case TEXT_LINE_DOTTED: + { + pDotDashArray = aDottedArray; + break; + } + case TEXT_LINE_DASH: + { + pDotDashArray = aDashedArray; + break; + } + case TEXT_LINE_LONGDASH: + { + pDotDashArray = aLongDashArray; + break; + } + case TEXT_LINE_DASHDOT: + { + pDotDashArray = aDotDashArray; + break; + } + case TEXT_LINE_DASHDOTDOT: + { + pDotDashArray = aDashDotDotArray; + break; + } + case TEXT_LINE_SMALLWAVE: + { + bWaveLine = true; + break; + } + case TEXT_LINE_WAVE: + { + bWaveLine = true; + break; + } + case TEXT_LINE_DOUBLEWAVE: + { + bDoubleLine = true; + bWaveLine = true; + break; + } + case TEXT_LINE_BOLD: + { + bBoldLine = true; + break; + } + case TEXT_LINE_BOLDDOTTED: + { + bBoldLine = true; + pDotDashArray = aDottedArray; + break; + } + case TEXT_LINE_BOLDDASH: + { + bBoldLine = true; + pDotDashArray = aDashedArray; + break; + } + case TEXT_LINE_BOLDLONGDASH: + { + bBoldLine = true; + pDotDashArray = aLongDashArray; + break; + } + case TEXT_LINE_BOLDDASHDOT: + { + bBoldLine = true; + pDotDashArray = aDotDashArray; + break; + } + case TEXT_LINE_BOLDDASHDOTDOT: + { + bBoldLine = true; + pDotDashArray = aDashDotDotArray; + break; + } + case TEXT_LINE_BOLDWAVE: + { + bWaveLine = true; + bBoldLine = true; + break; + } + } + + if(bBoldLine) + { + fHeight *= 2.0; + } + + if(bDoubleLine) + { + fOffset -= 0.50 * fHeight; + fHeight *= 0.64; + } + + if(bWaveLine) + { + eLineJoin = basegfx::B2DLINEJOIN_ROUND; + fHeight *= 0.25; + } + + // prepare Line and Stroke Attributes + const attribute::LineAttribute aLineAttribute(getLineColor(), fHeight, eLineJoin); + attribute::StrokeAttribute aStrokeAttribute; + + if(pDotDashArray) + { + ::std::vector< double > aDoubleArray; + + for(const int* p = pDotDashArray; *p; ++p) + { + aDoubleArray.push_back((double)(*p) * fHeight); + } + + aStrokeAttribute = attribute::StrokeAttribute(aDoubleArray); + } + + // create base polygon and new primitive + basegfx::B2DPolygon aLine; + Primitive2DReference aNewPrimitive; + + aLine.append(basegfx::B2DPoint(0.0, fOffset)); + aLine.append(basegfx::B2DPoint(getWidth(), fOffset)); + + const basegfx::B2DHomMatrix aUnscaledTransform( + basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + fShearX, fRotate, aTranslate)); + + aLine.transform(aUnscaledTransform); + + if(bWaveLine) + { + double fWaveWidth(10.6 * fHeight); + + if(TEXT_LINE_SMALLWAVE == getTextLine()) + { + fWaveWidth *= 0.7; + } + else if(TEXT_LINE_WAVE == getTextLine()) + { + // extra multiply to get the same WaveWidth as with the bold version + fWaveWidth *= 2.0; + } + + aNewPrimitive = Primitive2DReference(new PolygonWavePrimitive2D(aLine, aLineAttribute, aStrokeAttribute, fWaveWidth, fWaveWidth * 0.5)); + } + else + { + aNewPrimitive = Primitive2DReference(new PolygonStrokePrimitive2D(aLine, aLineAttribute, aStrokeAttribute)); + } + + // add primitive + appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, aNewPrimitive); + + if(bDoubleLine) + { + // double line, create 2nd primitive with offset using TransformPrimitive based on + // already created NewPrimitive + double fLineDist(2.3 * fHeight); + + if(bWaveLine) + { + fLineDist = 6.3 * fHeight; + } + + // move base point of text to 0.0 and de-rotate + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + -aTranslate.getX(), -aTranslate.getY())); + aTransform.rotate(-fRotate); + + // translate in Y by offset + aTransform.translate(0.0, fLineDist); + + // move back and rotate + aTransform.rotate(fRotate); + aTransform.translate(aTranslate.getX(), aTranslate.getY()); + + // add transform primitive + const Primitive2DSequence aContent(&aNewPrimitive, 1); + appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, + Primitive2DReference(new TransformPrimitive2D(aTransform, aContent))); + } + } + + return xRetval; + } + + TextLinePrimitive2D::TextLinePrimitive2D( + const basegfx::B2DHomMatrix& rObjectTransformation, + double fWidth, + double fOffset, + double fHeight, + TextLine eTextLine, + const basegfx::BColor& rLineColor) + : BufferedDecompositionPrimitive2D(), + maObjectTransformation(rObjectTransformation), + mfWidth(fWidth), + mfOffset(fOffset), + mfHeight(fHeight), + meTextLine(eTextLine), + maLineColor(rLineColor) + { + } + + bool TextLinePrimitive2D::operator==( const BasePrimitive2D& rPrimitive ) const + { + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) + { + const TextLinePrimitive2D& rCompare = (TextLinePrimitive2D&)rPrimitive; + + return (getObjectTransformation() == rCompare.getObjectTransformation() + && getWidth() == rCompare.getWidth() + && getOffset() == rCompare.getOffset() + && getHeight() == rCompare.getHeight() + && getTextLine() == rCompare.getTextLine() + && getLineColor() == rCompare.getLineColor()); + } + + return false; + } + + // provide unique ID + ImplPrimitrive2DIDBlock(TextLinePrimitive2D, PRIMITIVE2D_ID_TEXTLINEPRIMITIVE2D) + + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx index 6caafd1911ce..61a0c6d15897 100644 --- a/drawinglayer/source/primitive2d/textprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx @@ -50,27 +50,6 @@ using namespace com::sun::star; ////////////////////////////////////////////////////////////////////////////// -namespace drawinglayer -{ - namespace primitive2d - { - bool FontAttributes::operator==(const FontAttributes& rCompare) const - { - return (getFamilyName() == rCompare.getFamilyName() - && getStyleName() == rCompare.getStyleName() - && getWeight() == rCompare.getWeight() - && getSymbol() == rCompare.getSymbol() - && getVertical() == rCompare.getVertical() - && getItalic() == rCompare.getItalic() - && getOutline() == rCompare.getOutline() - && getRTL() == rCompare.getRTL() - && getBiDiStrong() == rCompare.getBiDiStrong()); - } - } // end of namespace primitive2d -} // end of namespace drawinglayer - -////////////////////////////////////////////////////////////////////////////// - namespace { // adapts fontScale for usage with TextLayouter. Input is rScale which is the extracted @@ -156,8 +135,8 @@ namespace drawinglayer // prepare textlayoutdevice TextLayouterDevice aTextLayouter; - aTextLayouter.setFontAttributes( - getFontAttributes(), + aTextLayouter.setFontAttribute( + getFontAttribute(), aFontScale.getX(), aFontScale.getY(), getLocale()); @@ -236,7 +215,7 @@ namespace drawinglayer aRetval[a] = new PolyPolygonColorPrimitive2D(rPolyPolygon, getFontColor()); } - if(getFontAttributes().getOutline()) + if(getFontAttribute().getOutline()) { // decompose polygon transformation to single values basegfx::B2DVector aScale, aTranslate; @@ -264,7 +243,7 @@ namespace drawinglayer xub_StrLen aTextPosition, xub_StrLen aTextLength, const ::std::vector< double >& rDXArray, - const FontAttributes& rFontAttributes, + const attribute::FontAttribute& rFontAttribute, const ::com::sun::star::lang::Locale& rLocale, const basegfx::BColor& rFontColor) : BufferedDecompositionPrimitive2D(), @@ -273,7 +252,7 @@ namespace drawinglayer maTextPosition(aTextPosition), maTextLength(aTextLength), maDXArray(rDXArray), - maFontAttributes(rFontAttributes), + maFontAttribute(rFontAttribute), maLocale(rLocale), maFontColor(rFontColor), maB2DRange() @@ -285,7 +264,7 @@ namespace drawinglayer #endif } - bool impLocalesAreEqual(const ::com::sun::star::lang::Locale& rA, const ::com::sun::star::lang::Locale& rB) + bool LocalesAreEqual(const ::com::sun::star::lang::Locale& rA, const ::com::sun::star::lang::Locale& rB) { return (rA.Language == rB.Language && rA.Country == rB.Country @@ -303,8 +282,8 @@ namespace drawinglayer && getTextPosition() == rCompare.getTextPosition() && getTextLength() == rCompare.getTextLength() && getDXArray() == rCompare.getDXArray() - && getFontAttributes() == rCompare.getFontAttributes() - && impLocalesAreEqual(getLocale(), rCompare.getLocale()) + && getFontAttribute() == rCompare.getFontAttribute() + && LocalesAreEqual(getLocale(), rCompare.getLocale()) && getFontColor() == rCompare.getFontColor()); } @@ -330,8 +309,8 @@ namespace drawinglayer // prepare textlayoutdevice TextLayouterDevice aTextLayouter; - aTextLayouter.setFontAttributes( - getFontAttributes(), + aTextLayouter.setFontAttribute( + getFontAttribute(), aFontScale.getX(), aFontScale.getY(), getLocale()); diff --git a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx new file mode 100644 index 000000000000..8b7d664dd62a --- /dev/null +++ b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx @@ -0,0 +1,294 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: textdecoratedprimitive2d.cxx,v $ + * + * $Revision: 1.12 $ + * + * last change: $Author: aw $ $Date: 2008-05-27 14:11:20 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_drawinglayer.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + BaseTextStrikeoutPrimitive2D::BaseTextStrikeoutPrimitive2D( + const basegfx::B2DHomMatrix& rObjectTransformation, + double fWidth, + const basegfx::BColor& rFontColor) + : BufferedDecompositionPrimitive2D(), + maObjectTransformation(rObjectTransformation), + mfWidth(fWidth), + maFontColor(rFontColor) + { + } + + bool BaseTextStrikeoutPrimitive2D::operator==( const BasePrimitive2D& rPrimitive ) const + { + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) + { + const BaseTextStrikeoutPrimitive2D& rCompare = (BaseTextStrikeoutPrimitive2D&)rPrimitive; + + return (getObjectTransformation() == rCompare.getObjectTransformation() + && getWidth() == rCompare.getWidth() + && getFontColor() == rCompare.getFontColor()); + } + + return false; + } + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + Primitive2DSequence TextCharacterStrikeoutPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + // strikeout with character + const String aSingleCharString(getStrikeoutChar()); + basegfx::B2DVector aScale, aTranslate; + double fRotate, fShearX; + + // get decomposition + getObjectTransformation().decompose(aScale, aTranslate, fRotate, fShearX); + + // prepare TextLayouter + TextLayouterDevice aTextLayouter; + + aTextLayouter.setFontAttribute( + getFontAttribute(), + aScale.getX(), + aScale.getY(), + getLocale()); + + const double fStrikeCharWidth(aTextLayouter.getTextWidth(aSingleCharString, 0, 1)); + const double fStrikeCharCount(fabs(getWidth()/fStrikeCharWidth)); + const sal_uInt32 nStrikeCharCount(static_cast< sal_uInt32 >(fStrikeCharCount + 0.5)); + std::vector aDXArray(nStrikeCharCount); + String aStrikeoutString; + + for(sal_uInt32 a(0); a < nStrikeCharCount; a++) + { + aStrikeoutString += aSingleCharString; + aDXArray[a] = (a + 1) * fStrikeCharWidth; + } + + Primitive2DReference xReference( + new TextSimplePortionPrimitive2D( + getObjectTransformation(), + aStrikeoutString, + 0, + aStrikeoutString.Len(), + aDXArray, + getFontAttribute(), + getLocale(), + getFontColor())); + + return Primitive2DSequence(&xReference, 1); + } + + TextCharacterStrikeoutPrimitive2D::TextCharacterStrikeoutPrimitive2D( + const basegfx::B2DHomMatrix& rObjectTransformation, + double fWidth, + const basegfx::BColor& rFontColor, + sal_Unicode aStrikeoutChar, + const attribute::FontAttribute& rFontAttribute, + const ::com::sun::star::lang::Locale& rLocale) + : BaseTextStrikeoutPrimitive2D(rObjectTransformation, fWidth, rFontColor), + maStrikeoutChar(aStrikeoutChar), + maFontAttribute(rFontAttribute), + maLocale(rLocale) + { + } + + bool TextCharacterStrikeoutPrimitive2D::operator==( const BasePrimitive2D& rPrimitive ) const + { + if(BaseTextStrikeoutPrimitive2D::operator==(rPrimitive)) + { + const TextCharacterStrikeoutPrimitive2D& rCompare = (TextCharacterStrikeoutPrimitive2D&)rPrimitive; + + return (getStrikeoutChar() == rCompare.getStrikeoutChar() + && getFontAttribute() == rCompare.getFontAttribute() + && LocalesAreEqual(getLocale(), rCompare.getLocale())); + } + + return false; + } + + // provide unique ID + ImplPrimitrive2DIDBlock(TextCharacterStrikeoutPrimitive2D, PRIMITIVE2D_ID_TEXTCHARACTERSTRIKEOUTPRIMITIVE2D) + + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + Primitive2DSequence TextGeometryStrikeoutPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + OSL_ENSURE(FONT_STRIKEOUT_SLASH != getFontStrikeout() && FONT_STRIKEOUT_X != getFontStrikeout(), + "Wrong FONT_STRIKEOUT type; a TextCharacterStrikeoutPrimitive2D should be used (!)"); + + // strikeout with geometry + double fStrikeoutHeight(getHeight()); + double fStrikeoutOffset(getOffset()); + bool bDoubleLine(false); + + // get decomposition + basegfx::B2DVector aScale, aTranslate; + double fRotate, fShearX; + getObjectTransformation().decompose(aScale, aTranslate, fRotate, fShearX); + + // set line attribute + switch(getFontStrikeout()) + { + default : // case primitive2d::FONT_STRIKEOUT_SINGLE: + { + break; + } + case primitive2d::FONT_STRIKEOUT_DOUBLE: + { + bDoubleLine = true; + break; + } + case primitive2d::FONT_STRIKEOUT_BOLD: + { + fStrikeoutHeight *= 2.0; + break; + } + } + + if(bDoubleLine) + { + fStrikeoutOffset -= 0.50 * fStrikeoutHeight; + fStrikeoutHeight *= 0.64; + } + + // create base polygon and new primitive + basegfx::B2DPolygon aStrikeoutLine; + + aStrikeoutLine.append(basegfx::B2DPoint(0.0, -fStrikeoutOffset)); + aStrikeoutLine.append(basegfx::B2DPoint(getWidth(), -fStrikeoutOffset)); + + const basegfx::B2DHomMatrix aUnscaledTransform( + basegfx::tools::createShearXRotateTranslateB2DHomMatrix( + fShearX, fRotate, aTranslate)); + + aStrikeoutLine.transform(aUnscaledTransform); + + // add primitive + const attribute::LineAttribute aLineAttribute(getFontColor(), fStrikeoutHeight, basegfx::B2DLINEJOIN_NONE); + Primitive2DSequence xRetval(1); + xRetval[0] = Primitive2DReference(new PolygonStrokePrimitive2D(aStrikeoutLine, aLineAttribute)); + + if(bDoubleLine) + { + // double line, create 2nd primitive with offset using TransformPrimitive based on + // already created NewPrimitive + const double fLineDist(2.0 * fStrikeoutHeight); + + // move base point of text to 0.0 and de-rotate + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + -aTranslate.getX(), -aTranslate.getY())); + aTransform.rotate(-fRotate); + + // translate in Y by offset + aTransform.translate(0.0, -fLineDist); + + // move back and rotate + aTransform.rotate(fRotate); + aTransform.translate(aTranslate.getX(), aTranslate.getY()); + + // add transform primitive + appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, + Primitive2DReference( + new TransformPrimitive2D( + aTransform, + xRetval))); + } + + return xRetval; + } + + TextGeometryStrikeoutPrimitive2D::TextGeometryStrikeoutPrimitive2D( + const basegfx::B2DHomMatrix& rObjectTransformation, + double fWidth, + const basegfx::BColor& rFontColor, + double fHeight, + double fOffset, + FontStrikeout eFontStrikeout) + : BaseTextStrikeoutPrimitive2D(rObjectTransformation, fWidth, rFontColor), + mfHeight(fHeight), + mfOffset(fOffset), + meFontStrikeout(eFontStrikeout) + { + } + + bool TextGeometryStrikeoutPrimitive2D::operator==( const BasePrimitive2D& rPrimitive ) const + { + if(BaseTextStrikeoutPrimitive2D::operator==(rPrimitive)) + { + const TextGeometryStrikeoutPrimitive2D& rCompare = (TextGeometryStrikeoutPrimitive2D&)rPrimitive; + + return (getHeight() == rCompare.getHeight() + && getOffset() == rCompare.getOffset() + && getFontStrikeout() == rCompare.getFontStrikeout()); + } + + return false; + } + + // provide unique ID + ImplPrimitrive2DIDBlock(TextGeometryStrikeoutPrimitive2D, PRIMITIVE2D_ID_TEXTGEOMETRYSTRIKEOUTPRIMITIVE2D) + + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx b/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx new file mode 100644 index 000000000000..621b0b25ad98 --- /dev/null +++ b/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx @@ -0,0 +1,276 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: bitmapprimitive2d.cxx,v $ + * + * $Revision: 1.5 $ + * + * last change: $Author: aw $ $Date: 2008-05-27 14:11:20 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_drawinglayer.hxx" + +#include +#include +#include +#include +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + Primitive2DSequence WallpaperBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + Primitive2DSequence aRetval; + + if(!getLocalObjectRange().isEmpty() && !getBitmapEx().IsEmpty()) + { + // get bitmap PIXEL size + const Size& rPixelSize = getBitmapEx().GetSizePixel(); + + if(rPixelSize.Width() > 0 && rPixelSize.Height() > 0) + { + if(WALLPAPER_SCALE == getWallpaperStyle()) + { + // shortcut for scale; use simple BitmapPrimitive2D + basegfx::B2DHomMatrix aObjectTransform; + + aObjectTransform.set(0, 0, getLocalObjectRange().getWidth()); + aObjectTransform.set(1, 1, getLocalObjectRange().getHeight()); + aObjectTransform.set(0, 2, getLocalObjectRange().getMinX()); + aObjectTransform.set(1, 2, getLocalObjectRange().getMinY()); + + Primitive2DReference xReference( + new BitmapPrimitive2D( + getBitmapEx(), + aObjectTransform)); + + aRetval = Primitive2DSequence(&xReference, 1); + } + else + { + // transform to logic size + basegfx::B2DHomMatrix aInverseViewTransformation(getViewTransformation()); + aInverseViewTransformation.invert(); + basegfx::B2DVector aLogicSize(rPixelSize.Width(), rPixelSize.Height()); + aLogicSize = aInverseViewTransformation * aLogicSize; + + // apply laout + basegfx::B2DPoint aTargetTopLeft(getLocalObjectRange().getMinimum()); + bool bUseTargetTopLeft(true); + bool bNeedsClipping(false); + + switch(getWallpaperStyle()) + { + default: //case WALLPAPER_TILE :, also WALLPAPER_NULL and WALLPAPER_APPLICATIONGRADIENT + { + bUseTargetTopLeft = false; + break; + } + case WALLPAPER_SCALE : + { + // handled by shortcut above + break; + } + case WALLPAPER_TOPLEFT : + { + // nothing to do + break; + } + case WALLPAPER_TOP : + { + const basegfx::B2DPoint aCenter(getLocalObjectRange().getCenter()); + aTargetTopLeft.setX(aCenter.getX() - (aLogicSize.getX() * 0.5)); + break; + } + case WALLPAPER_TOPRIGHT : + { + aTargetTopLeft.setX(getLocalObjectRange().getMaxX() - aLogicSize.getX()); + break; + } + case WALLPAPER_LEFT : + { + const basegfx::B2DPoint aCenter(getLocalObjectRange().getCenter()); + aTargetTopLeft.setY(aCenter.getY() - (aLogicSize.getY() * 0.5)); + break; + } + case WALLPAPER_CENTER : + { + const basegfx::B2DPoint aCenter(getLocalObjectRange().getCenter()); + aTargetTopLeft = aCenter - (aLogicSize * 0.5); + break; + } + case WALLPAPER_RIGHT : + { + const basegfx::B2DPoint aCenter(getLocalObjectRange().getCenter()); + aTargetTopLeft.setX(getLocalObjectRange().getMaxX() - aLogicSize.getX()); + aTargetTopLeft.setY(aCenter.getY() - (aLogicSize.getY() * 0.5)); + break; + } + case WALLPAPER_BOTTOMLEFT : + { + aTargetTopLeft.setY(getLocalObjectRange().getMaxY() - aLogicSize.getY()); + break; + } + case WALLPAPER_BOTTOM : + { + const basegfx::B2DPoint aCenter(getLocalObjectRange().getCenter()); + aTargetTopLeft.setX(aCenter.getX() - (aLogicSize.getX() * 0.5)); + aTargetTopLeft.setY(getLocalObjectRange().getMaxY() - aLogicSize.getY()); + break; + } + case WALLPAPER_BOTTOMRIGHT : + { + aTargetTopLeft = getLocalObjectRange().getMaximum() - aLogicSize; + break; + } + } + + if(bUseTargetTopLeft) + { + // fill target range + const basegfx::B2DRange aTargetRange(aTargetTopLeft, aTargetTopLeft + aLogicSize); + + // create aligned, single BitmapPrimitive2D + basegfx::B2DHomMatrix aObjectTransform; + + aObjectTransform.set(0, 0, aTargetRange.getWidth()); + aObjectTransform.set(1, 1, aTargetRange.getHeight()); + aObjectTransform.set(0, 2, aTargetRange.getMinX()); + aObjectTransform.set(1, 2, aTargetRange.getMinY()); + + Primitive2DReference xReference( + new BitmapPrimitive2D( + getBitmapEx(), + aObjectTransform)); + aRetval = Primitive2DSequence(&xReference, 1); + + // clip when not completely inside object range + bNeedsClipping = !getLocalObjectRange().isInside(aTargetRange); + } + else + { + // WALLPAPER_TILE, WALLPAPER_NULL, WALLPAPER_APPLICATIONGRADIENT + // convert to relative positions + const basegfx::B2DVector aRelativeSize( + aLogicSize.getX() / (getLocalObjectRange().getWidth() ? getLocalObjectRange().getWidth() : 1.0), + aLogicSize.getY() / (getLocalObjectRange().getHeight() ? getLocalObjectRange().getHeight() : 1.0)); + basegfx::B2DPoint aRelativeTopLeft(0.0, 0.0); + + if(WALLPAPER_TILE != getWallpaperStyle()) + { + aRelativeTopLeft.setX(0.5 - aRelativeSize.getX()); + aRelativeTopLeft.setY(0.5 - aRelativeSize.getY()); + } + + // prepare FillBitmapAttribute + const attribute::FillBitmapAttribute aFillBitmapAttribute( + getBitmapEx(), + aRelativeTopLeft, + aRelativeSize, + true); + + // create ObjectTransform + basegfx::B2DHomMatrix aObjectTransform; + + aObjectTransform.set(0, 0, getLocalObjectRange().getWidth()); + aObjectTransform.set(1, 1, getLocalObjectRange().getHeight()); + aObjectTransform.set(0, 2, getLocalObjectRange().getMinX()); + aObjectTransform.set(1, 2, getLocalObjectRange().getMinY()); + + // create FillBitmapPrimitive + const drawinglayer::primitive2d::Primitive2DReference xFillBitmap( + new drawinglayer::primitive2d::FillBitmapPrimitive2D( + aObjectTransform, + aFillBitmapAttribute)); + aRetval = Primitive2DSequence(&xFillBitmap, 1); + + // always embed tiled fill to clipping + bNeedsClipping = true; + } + + if(bNeedsClipping) + { + // embed to clipping; this is necessary for tiled fills + const basegfx::B2DPolyPolygon aPolyPolygon(basegfx::tools::createPolygonFromRect(getLocalObjectRange())); + const drawinglayer::primitive2d::Primitive2DReference xClippedFill( + new drawinglayer::primitive2d::MaskPrimitive2D( + aPolyPolygon, + aRetval)); + aRetval = Primitive2DSequence(&xClippedFill, 1); + } + } + } + } + + return aRetval; + } + + WallpaperBitmapPrimitive2D::WallpaperBitmapPrimitive2D( + const basegfx::B2DRange& rObjectRange, + const BitmapEx& rBitmapEx, + WallpaperStyle eWallpaperStyle) + : ViewTransformationDependentPrimitive2D(), + maObjectRange(rObjectRange), + maBitmapEx(rBitmapEx), + meWallpaperStyle(eWallpaperStyle) + { + } + + bool WallpaperBitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const + { + if(ViewTransformationDependentPrimitive2D::operator==(rPrimitive)) + { + const WallpaperBitmapPrimitive2D& rCompare = (WallpaperBitmapPrimitive2D&)rPrimitive; + + return (getLocalObjectRange() == rCompare.getLocalObjectRange() + && getBitmapEx() == rCompare.getBitmapEx() + && getWallpaperStyle() == rCompare.getWallpaperStyle()); + } + + return false; + } + + basegfx::B2DRange WallpaperBitmapPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + return getLocalObjectRange(); + } + + // provide unique ID + ImplPrimitrive2DIDBlock(WallpaperBitmapPrimitive2D, PRIMITIVE2D_ID_WALLPAPERBITMAPPRIMITIVE2D) + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/source/primitive3d/textureprimitive3d.cxx b/drawinglayer/source/primitive3d/textureprimitive3d.cxx index 16f33435a38b..deeed95a71fd 100644 --- a/drawinglayer/source/primitive3d/textureprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/textureprimitive3d.cxx @@ -171,12 +171,12 @@ namespace drawinglayer namespace primitive3d { BitmapTexturePrimitive3D::BitmapTexturePrimitive3D( - const attribute::FillBitmapAttribute& rBitmap, + const attribute::FillBitmapAttribute& rFillBitmapAttribute, const Primitive3DSequence& rChildren, const basegfx::B2DVector& rTextureSize, bool bModulate, bool bFilter) : TexturePrimitive3D(rChildren, rTextureSize, bModulate, bFilter), - maBitmap(rBitmap) + maFillBitmapAttribute(rFillBitmapAttribute) { } @@ -186,7 +186,7 @@ namespace drawinglayer { const BitmapTexturePrimitive3D& rCompare = (BitmapTexturePrimitive3D&)rPrimitive; - return (getBitmap() == rCompare.getBitmap()); + return (getFillBitmapAttribute() == rCompare.getFillBitmapAttribute()); } return false; diff --git a/drawinglayer/source/processor2d/canvasprocessor.cxx b/drawinglayer/source/processor2d/canvasprocessor.cxx index 20d07add629c..649c208a6db5 100644 --- a/drawinglayer/source/processor2d/canvasprocessor.cxx +++ b/drawinglayer/source/processor2d/canvasprocessor.cxx @@ -676,7 +676,7 @@ using namespace com::sun::star; // directdraw of text simple portion void canvasProcessor::impRender_STXP(const textSimplePortionPrimitive& rTextCandidate) { - const fontAttributes& rFontAttrs( rTextCandidate.getFontAttributes() ); + const fontAttributes& rFontAttrs( rTextCandidate.getFontAttribute() ); rendering::FontRequest aFontRequest; aFontRequest.FontDescription.FamilyName = rFontAttrs.maFamilyName; @@ -1517,16 +1517,16 @@ namespace drawinglayer } else { - const primitive2d::FontAttributes& rFontAttrs(rTextCandidate.getFontAttributes()); + const attribute::FontAttribute& rFontAttr(rTextCandidate.getFontAttribute()); rendering::FontRequest aFontRequest; - aFontRequest.FontDescription.FamilyName = rFontAttrs.getFamilyName(); - aFontRequest.FontDescription.StyleName = rFontAttrs.getStyleName(); - aFontRequest.FontDescription.IsSymbolFont = rFontAttrs.getSymbol() ? util::TriState_YES : util::TriState_NO; - aFontRequest.FontDescription.IsVertical = rFontAttrs.getVertical() ? util::TriState_YES : util::TriState_NO; + aFontRequest.FontDescription.FamilyName = rFontAttr.getFamilyName(); + aFontRequest.FontDescription.StyleName = rFontAttr.getStyleName(); + aFontRequest.FontDescription.IsSymbolFont = rFontAttr.getSymbol() ? util::TriState_YES : util::TriState_NO; + aFontRequest.FontDescription.IsVertical = rFontAttr.getVertical() ? util::TriState_YES : util::TriState_NO; // TODO(F2): improve vclenum->panose conversion - aFontRequest.FontDescription.FontDescription.Weight = static_cast< sal_uInt8 >(rFontAttrs.getWeight()); - aFontRequest.FontDescription.FontDescription.Letterform = rFontAttrs.getItalic() ? 9 : 0; + aFontRequest.FontDescription.FontDescription.Weight = static_cast< sal_uInt8 >(rFontAttr.getWeight()); + aFontRequest.FontDescription.FontDescription.Letterform = rFontAttr.getItalic() ? 9 : 0; // init CellSize to 1.0, else a default font height will be used aFontRequest.CellSize = 1.0; @@ -1795,7 +1795,7 @@ namespace drawinglayer if(rFillBitmapAttribute.getTiling()) { // apply possible color modification to Bitmap - const BitmapEx aChangedBitmapEx(impModifyBitmapEx(maBColorModifierStack, BitmapEx(rFillBitmapAttribute.getBitmap()))); + const BitmapEx aChangedBitmapEx(impModifyBitmapEx(maBColorModifierStack, rFillBitmapAttribute.getBitmapEx())); if(aChangedBitmapEx.IsEmpty()) { diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 8b47368a58b9..062af73f5f0a 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -113,6 +113,7 @@ namespace drawinglayer { // Prepare VDev, MetaFile and connections OutputDevice* pLastOutputDevice = mpOutputDevice; + GDIMetaFile* pLastMetafile = mpMetaFile; basegfx::B2DRange aPrimitiveRange(primitive2d::getB2DRangeFromPrimitive2DSequence(rContent, getViewInformation2D())); // transform primitive range with current transformation (e.g shadow offset) @@ -125,6 +126,7 @@ namespace drawinglayer MapMode aNewMapMode(pLastOutputDevice->GetMapMode()); mpOutputDevice = &aContentVDev; + mpMetaFile = &o_rContentMetafile; aContentVDev.EnableOutput(false); aContentVDev.SetMapMode(pLastOutputDevice->GetMapMode()); o_rContentMetafile.Record(&aContentVDev); @@ -145,6 +147,7 @@ namespace drawinglayer o_rContentMetafile.SetPrefMapMode(aNewMapMode); o_rContentMetafile.SetPrefSize(aPrimitiveRectangle.GetSize()); mpOutputDevice = pLastOutputDevice; + mpMetaFile = pLastMetafile; return aPrimitiveRectangle; } @@ -219,7 +222,7 @@ namespace drawinglayer SvMemoryStream aMemStm; aMemStm << *pSvtGraphicFill; - mrMetaFile.AddAction(new MetaCommentAction("XPATHFILL_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); + mpMetaFile->AddAction(new MetaCommentAction("XPATHFILL_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); mnSvtGraphicFillCount++; } } @@ -229,7 +232,7 @@ namespace drawinglayer if(pSvtGraphicFill && mnSvtGraphicFillCount) { mnSvtGraphicFillCount--; - mrMetaFile.AddAction(new MetaCommentAction("XPATHFILL_SEQ_END")); + mpMetaFile->AddAction(new MetaCommentAction("XPATHFILL_SEQ_END")); delete pSvtGraphicFill; } } @@ -372,7 +375,7 @@ namespace drawinglayer SvMemoryStream aMemStm; aMemStm << *pSvtGraphicStroke; - mrMetaFile.AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); + mpMetaFile->AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); mnSvtGraphicStrokeCount++; } } @@ -382,7 +385,7 @@ namespace drawinglayer if(pSvtGraphicStroke && mnSvtGraphicStrokeCount) { mnSvtGraphicStrokeCount--; - mrMetaFile.AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_END")); + mpMetaFile->AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_END")); delete pSvtGraphicStroke; } } @@ -392,7 +395,7 @@ namespace drawinglayer VclMetafileProcessor2D::VclMetafileProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev) : VclProcessor2D(rViewInformation, rOutDev), - mrMetaFile(*rOutDev.GetConnectMetaFile()), + mpMetaFile(rOutDev.GetConnectMetaFile()), mnSvtGraphicFillCount(0), mnSvtGraphicStrokeCount(0), mfCurrentUnifiedTransparence(0.0), @@ -816,19 +819,19 @@ namespace drawinglayer { default : // case drawinglayer::primitive2d::FIELD_TYPE_COMMON : { - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringCommon)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon)); break; } case drawinglayer::primitive2d::FIELD_TYPE_PAGE : { - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringPage)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringPage)); break; } case drawinglayer::primitive2d::FIELD_TYPE_URL : { const rtl::OUString& rURL = rFieldPrimitive.getString(); const String aOldString(rURL); - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const BYTE* >(aOldString.GetBuffer()), 2 * aOldString.Len())); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const BYTE* >(aOldString.GetBuffer()), 2 * aOldString.Len())); break; } } @@ -838,7 +841,7 @@ namespace drawinglayer process(rContent); // for the end comment the type is not relevant yet, they are all the same. Just add. - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringEnd)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringEnd)); if(mpPDFExtOutDevData && drawinglayer::primitive2d::FIELD_TYPE_URL == rFieldPrimitive.getType()) { @@ -863,7 +866,7 @@ namespace drawinglayer // process recursively and add MetaFile comment process(rLinePrimitive.get2DDecomposition(getViewInformation2D())); - mrMetaFile.AddAction(new MetaCommentAction(aCommentString)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentString)); break; } @@ -876,7 +879,7 @@ namespace drawinglayer // process recursively and add MetaFile comment process(rBulletPrimitive.get2DDecomposition(getViewInformation2D())); - mrMetaFile.AddAction(new MetaCommentAction(aCommentString)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentString)); break; } @@ -893,7 +896,7 @@ namespace drawinglayer // process recursively and add MetaFile comment process(rParagraphPrimitive.get2DDecomposition(getViewInformation2D())); - mrMetaFile.AddAction(new MetaCommentAction(aCommentString)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentString)); if(mpPDFExtOutDevData) { @@ -910,9 +913,9 @@ namespace drawinglayer static const ByteString aCommentStringB("XTEXT_PAINTSHAPE_END"); // add MetaFile comment, process recursively and add MetaFile comment - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringA)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringA)); process(rBlockPrimitive.get2DDecomposition(getViewInformation2D())); - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringB)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringB)); break; } @@ -965,17 +968,17 @@ namespace drawinglayer // create the entries for the respective break positions if(i == nNextCellBreak) { - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringA, i - nTextPosition)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringA, i - nTextPosition)); nNextCellBreak = mxBreakIterator->nextCharacters(rTxt, i, rLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, 1, nDone); } if(i == nNextWordBoundary.endPos) { - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringB, i - nTextPosition)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringB, i - nTextPosition)); nNextWordBoundary = mxBreakIterator->getWordBoundary(rTxt, i + 1, rLocale, ::com::sun::star::i18n::WordType::ANY_WORD, sal_True); } if(i == nNextSentenceBreak) { - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringC, i - nTextPosition)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringC, i - nTextPosition)); nNextSentenceBreak = mxBreakIterator->endOfSentence(rTxt, i + 1, rLocale); } } @@ -1042,7 +1045,7 @@ namespace drawinglayer { const Polygon aToolsPolygon(aCandidate); - mrMetaFile.AddAction(new MetaPolyLineAction(aToolsPolygon, aLineInfo)); + mpMetaFile->AddAction(new MetaPolyLineAction(aToolsPolygon, aLineInfo)); } } } @@ -1107,7 +1110,7 @@ namespace drawinglayer { const Polygon aToolsPolygon(aCandidate); - mrMetaFile.AddAction(new MetaPolyLineAction(aToolsPolygon, aLineInfo)); + mpMetaFile->AddAction(new MetaPolyLineAction(aToolsPolygon, aLineInfo)); } } @@ -1172,8 +1175,8 @@ namespace drawinglayer const basegfx::B2DPoint aFillBitmapTopLeft(rFillBitmapAttribute.getTopLeft() * aOutlineSize); // the scaling needs scale from pixel to logic coordinate system - const Bitmap& rBitmap = rFillBitmapAttribute.getBitmap(); - Size aBmpSizePixel(rBitmap.GetSizePixel()); + const BitmapEx& rBitmapEx = rFillBitmapAttribute.getBitmapEx(); + Size aBmpSizePixel(rBitmapEx.GetSizePixel()); if(!aBmpSizePixel.Width()) { @@ -1197,7 +1200,7 @@ namespace drawinglayer aTransform.matrix[5] = aFillBitmapTopLeft.getY(); // setup fill graphic like in impgrfll - Graphic aFillGraphic = Graphic(rBitmap); + Graphic aFillGraphic = Graphic(rBitmapEx); aFillGraphic.SetPrefMapMode(MapMode(MAP_PIXEL)); aFillGraphic.SetPrefSize(aBmpSizePixel); @@ -1551,7 +1554,10 @@ namespace drawinglayer // svae old mfCurrentUnifiedTransparence and set new one // so that contained SvtGraphicStroke may use the current one const double fLastCurrentUnifiedTransparence(mfCurrentUnifiedTransparence); - mfCurrentUnifiedTransparence = rUniAlphaCandidate.getAlpha(); + // #i105377# paint the content metafile opaque as the transparency gets + // split of into the gradient below + // mfCurrentUnifiedTransparence = rUniAlphaCandidate.getAlpha(); + mfCurrentUnifiedTransparence = 0; // various content, create content-metafile GDIMetaFile aContentMetafile; diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index b1d91ebc86fc..51192f2dc72f 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -232,8 +232,16 @@ namespace drawinglayer mpOutputDevice->SetAntialiasing(nOldAntiAliase | ANTIALIASING_PIXELSNAPHAIRLINE); } - // direct draw of MetaFile - RenderMetafilePrimitive2D(static_cast< const primitive2d::MetafilePrimitive2D& >(rCandidate)); + static bool bTestMetaFilePrimitiveDecomposition(true); + if(bTestMetaFilePrimitiveDecomposition) + { + process(rCandidate.get2DDecomposition(getViewInformation2D())); + } + else + { + // direct draw of MetaFile + RenderMetafilePrimitive2D(static_cast< const primitive2d::MetafilePrimitive2D& >(rCandidate)); + } if(bForceLineSnap) { @@ -535,23 +543,18 @@ namespace drawinglayer case PRIMITIVE2D_ID_INVERTPRIMITIVE2D : { // invert primitive (currently only used for HighContrast fallback for selection in SW and SC). - // Set OutDev to XOR + // Set OutDev to XOR and switch AA off (XOR does not work with AA) mpOutputDevice->Push(); mpOutputDevice->SetRasterOp( ROP_XOR ); - - // force paint color to white by using ColorModifierStack - const basegfx::BColor aColWhite(1.0, 1.0, 1.0); - const basegfx::BColorModifier aColorModifier(aColWhite, 0.0, basegfx::BCOLORMODIFYMODE_REPLACE); - maBColorModifierStack.push(aColorModifier); + const sal_uInt16 nAntiAliasing(mpOutputDevice->GetAntialiasing()); + mpOutputDevice->SetAntialiasing(nAntiAliasing & ~ANTIALIASING_ENABLE_B2DDRAW); // process content recursively process(rCandidate.get2DDecomposition(getViewInformation2D())); - // restore ColorModifierStack - maBColorModifierStack.pop(); - // restore OutDev mpOutputDevice->Pop(); + mpOutputDevice->SetAntialiasing(nAntiAliasing); break; } default : diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index eb5b4b0fbd30..127d4845e672 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -63,6 +63,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// // control support @@ -99,31 +100,31 @@ namespace drawinglayer using ::com::sun::star::awt::XWindow; using ::com::sun::star::awt::PosSize::POSSIZE; - static FontUnderline mapTextLineStyle(primitive2d::FontUnderline eLineStyle) + static FontUnderline mapTextLineStyle(drawinglayer::primitive2d::TextLine eLineStyle) { switch(eLineStyle) { default: DBG_WARNING1( "DrawingLayer: Unknown text line style attribute (%d)!", eLineStyle ); // fall through - case primitive2d::FONT_UNDERLINE_NONE: return UNDERLINE_NONE; - case primitive2d::FONT_UNDERLINE_SINGLE: return UNDERLINE_SINGLE; - case primitive2d::FONT_UNDERLINE_DOUBLE: return UNDERLINE_DOUBLE; - case primitive2d::FONT_UNDERLINE_DOTTED: return UNDERLINE_DOTTED; - case primitive2d::FONT_UNDERLINE_DASH: return UNDERLINE_DASH; - case primitive2d::FONT_UNDERLINE_LONGDASH: return UNDERLINE_LONGDASH; - case primitive2d::FONT_UNDERLINE_DASHDOT: return UNDERLINE_DASHDOT; - case primitive2d::FONT_UNDERLINE_DASHDOTDOT: return UNDERLINE_DASHDOTDOT; - case primitive2d::FONT_UNDERLINE_SMALLWAVE: return UNDERLINE_SMALLWAVE; - case primitive2d::FONT_UNDERLINE_WAVE: return UNDERLINE_WAVE; - case primitive2d::FONT_UNDERLINE_DOUBLEWAVE: return UNDERLINE_DOUBLEWAVE; - case primitive2d::FONT_UNDERLINE_BOLD: return UNDERLINE_BOLD; - case primitive2d::FONT_UNDERLINE_BOLDDOTTED: return UNDERLINE_BOLDDOTTED; - case primitive2d::FONT_UNDERLINE_BOLDDASH: return UNDERLINE_BOLDDASH; - case primitive2d::FONT_UNDERLINE_BOLDLONGDASH: return UNDERLINE_LONGDASH; - case primitive2d::FONT_UNDERLINE_BOLDDASHDOT: return UNDERLINE_BOLDDASHDOT; - case primitive2d::FONT_UNDERLINE_BOLDDASHDOTDOT:return UNDERLINE_BOLDDASHDOT; - case primitive2d::FONT_UNDERLINE_BOLDWAVE: return UNDERLINE_BOLDWAVE; + case primitive2d::TEXT_LINE_NONE: return UNDERLINE_NONE; + case primitive2d::TEXT_LINE_SINGLE: return UNDERLINE_SINGLE; + case primitive2d::TEXT_LINE_DOUBLE: return UNDERLINE_DOUBLE; + case primitive2d::TEXT_LINE_DOTTED: return UNDERLINE_DOTTED; + case primitive2d::TEXT_LINE_DASH: return UNDERLINE_DASH; + case primitive2d::TEXT_LINE_LONGDASH: return UNDERLINE_LONGDASH; + case primitive2d::TEXT_LINE_DASHDOT: return UNDERLINE_DASHDOT; + case primitive2d::TEXT_LINE_DASHDOTDOT: return UNDERLINE_DASHDOTDOT; + case primitive2d::TEXT_LINE_SMALLWAVE: return UNDERLINE_SMALLWAVE; + case primitive2d::TEXT_LINE_WAVE: return UNDERLINE_WAVE; + case primitive2d::TEXT_LINE_DOUBLEWAVE: return UNDERLINE_DOUBLEWAVE; + case primitive2d::TEXT_LINE_BOLD: return UNDERLINE_BOLD; + case primitive2d::TEXT_LINE_BOLDDOTTED: return UNDERLINE_BOLDDOTTED; + case primitive2d::TEXT_LINE_BOLDDASH: return UNDERLINE_BOLDDASH; + case primitive2d::TEXT_LINE_BOLDLONGDASH: return UNDERLINE_LONGDASH; + case primitive2d::TEXT_LINE_BOLDDASHDOT: return UNDERLINE_BOLDDASHDOT; + case primitive2d::TEXT_LINE_BOLDDASHDOTDOT:return UNDERLINE_BOLDDASHDOT; + case primitive2d::TEXT_LINE_BOLDWAVE: return UNDERLINE_BOLDWAVE; } } @@ -157,8 +158,8 @@ namespace drawinglayer if(basegfx::fTools::more(aFontScaling.getX(), 0.0) && basegfx::fTools::more(aFontScaling.getY(), 0.0)) { // Get the VCL font (use FontHeight as FontWidth) - Font aFont(primitive2d::getVclFontFromFontAttributes( - rTextCandidate.getFontAttributes(), + Font aFont(primitive2d::getVclFontFromFontAttribute( + rTextCandidate.getFontAttribute(), aFontScaling.getX(), aFontScaling.getY(), fRotate, @@ -176,7 +177,7 @@ namespace drawinglayer mpOutputDevice->SetTextLineColor( Color(aTextlineColor) ); // set Overline attribute - FontUnderline eFontOverline = mapTextLineStyle( pTCPP->getFontOverline() ); + const FontUnderline eFontOverline(mapTextLineStyle( pTCPP->getFontOverline() )); if( eFontOverline != UNDERLINE_NONE ) { aFont.SetOverline( eFontOverline ); @@ -187,7 +188,7 @@ namespace drawinglayer } // set Underline attribute - FontUnderline eFontUnderline = mapTextLineStyle( pTCPP->getFontUnderline() ); + const FontUnderline eFontUnderline(mapTextLineStyle( pTCPP->getFontUnderline() )); if( eFontUnderline != UNDERLINE_NONE ) { aFont.SetUnderline( eFontUnderline ); @@ -282,7 +283,7 @@ namespace drawinglayer const Point aStartPoint(basegfx::fround(aPoint.getX()), basegfx::fround(aPoint.getY())); const sal_uInt32 nOldLayoutMode(mpOutputDevice->GetLayoutMode()); - if(rTextCandidate.getFontAttributes().getRTL()) + if(rTextCandidate.getFontAttribute().getRTL()) { sal_uInt32 nRTLLayoutMode(nOldLayoutMode & ~(TEXT_LAYOUT_COMPLEX_DISABLED|TEXT_LAYOUT_BIDI_STRONG)); nRTLLayoutMode |= TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_TEXTORIGIN_LEFT; @@ -310,7 +311,7 @@ namespace drawinglayer rTextCandidate.getTextLength()); } - if(rTextCandidate.getFontAttributes().getRTL()) + if(rTextCandidate.getFontAttribute().getRTL()) { mpOutputDevice->SetLayoutMode(nOldLayoutMode); } @@ -428,7 +429,7 @@ namespace drawinglayer { // no shear or rotate, draw direct in pixel coordinates bPrimitiveAccepted = true; - BitmapEx aBitmapEx(rFillBitmapAttribute.getBitmap()); + BitmapEx aBitmapEx(rFillBitmapAttribute.getBitmapEx()); bool bPainted(false); if(maBColorModifierStack.count()) @@ -585,9 +586,9 @@ namespace drawinglayer if(rPolyPolygon.count()) { const attribute::FillBitmapAttribute& rFillBitmapAttribute = rPolygonCandidate.getFillBitmap(); - const Bitmap& rBitmap = rFillBitmapAttribute.getBitmap(); + const BitmapEx& rBitmapEx = rFillBitmapAttribute.getBitmapEx(); - if(rBitmap.IsEmpty()) + if(rBitmapEx.IsEmpty()) { // empty bitmap, done bDone = true; @@ -679,7 +680,9 @@ namespace drawinglayer aLocalPolyPolygon.transform(maCurrentTransformation); mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon); - if(mnPolygonStrokePrimitive2D && getOptionsDrawinglayer().IsAntiAliasing()) + if(mnPolygonStrokePrimitive2D + && getOptionsDrawinglayer().IsAntiAliasing() + && (mpOutputDevice->GetAntialiasing() & ANTIALIASING_ENABLE_B2DDRAW)) { // when AA is on and this filled polygons are the result of stroked line geometry, // draw the geometry once extra as lines to avoid AA 'gaps' between partial polygons diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx index 5f35960323fe..1be93d83b9a9 100644 --- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx +++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx @@ -234,19 +234,19 @@ namespace drawinglayer texture::GeoTexSvx* pOldTex = mpGeoTexSvx; // create texture - const attribute::FillBitmapAttribute& rFillBitmapAttribute = rPrimitive.getBitmap(); + const attribute::FillBitmapAttribute& rFillBitmapAttribute = rPrimitive.getFillBitmapAttribute(); if(rFillBitmapAttribute.getTiling()) { mpGeoTexSvx = new texture::GeoTexSvxBitmapTiled( - rFillBitmapAttribute.getBitmap(), + rFillBitmapAttribute.getBitmapEx().GetBitmap(), rFillBitmapAttribute.getTopLeft() * rPrimitive.getTextureSize(), rFillBitmapAttribute.getSize() * rPrimitive.getTextureSize()); } else { mpGeoTexSvx = new texture::GeoTexSvxBitmap( - rFillBitmapAttribute.getBitmap(), + rFillBitmapAttribute.getBitmapEx().GetBitmap(), rFillBitmapAttribute.getTopLeft() * rPrimitive.getTextureSize(), rFillBitmapAttribute.getSize() * rPrimitive.getTextureSize()); } diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index 2411ca3c31b4..b788de195903 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -113,9 +113,16 @@ namespace sdr if(nCount) { // create range primitives - const basegfx::BColor aRGBColor(getBaseColor().getBColor()); + const bool bInvert(OVERLAY_INVERT == maLastOverlayType); + basegfx::BColor aRGBColor(getBaseColor().getBColor()); aRetval.realloc(nCount); + if(bInvert) + { + // force color to white for invert to get a full invert + aRGBColor = basegfx::BColor(1.0, 1.0, 1.0); + } + for(sal_uInt32 a(0);a < nCount; a++) { const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(maRanges[a])); @@ -125,7 +132,7 @@ namespace sdr aRGBColor)); } - if(OVERLAY_INVERT == maLastOverlayType) + if(bInvert) { // embed all in invert primitive const drawinglayer::primitive2d::Primitive2DReference aInvert( diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 94d62794a397..43fb95f31d40 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -920,9 +920,6 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM if(aSource.count()) { - const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(fScaleX, fScaleY, aOfs.X(), aOfs.Y())); - aSource.transform(aTransform); - if(!bLastObjWasPolyWithoutLine || !CheckLastPolyLineAndFillMerge(aSource)) { const Gradient& rGrad = pAct->GetGradient(); @@ -943,7 +940,20 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM aXGradient.SetEndIntens(rGrad.GetEndIntensity()); aXGradient.SetSteps(rGrad.GetSteps()); - SetAttributes(pPath); + if(aVD.IsLineColor()) + { + // switch line off; when there was one there will be a + // META_POLYLINE_ACTION following creating another object + const Color aLineColor(aVD.GetLineColor()); + aVD.SetLineColor(); + SetAttributes(pPath); + aVD.SetLineColor(aLineColor); + } + else + { + SetAttributes(pPath); + } + aGradAttr.Put(XFillStyleItem(XFILL_GRADIENT)); aGradAttr.Put(XFillGradientItem(&pModel->GetItemPool(), aXGradient)); pPath->SetMergedItemSet(aGradAttr); diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 3f5da01e101b..38f9907e04d5 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -682,7 +682,7 @@ void SdrGrafObj::operator=( const SdrObject& rObj ) const SdrGrafObj& rGraf = (SdrGrafObj&) rObj; - pGraphic->SetGraphic( rGraf.GetGraphic() ); + pGraphic->SetGraphic( rGraf.GetGraphic(), &rGraf.GetGraphicObject() ); aCropRect = rGraf.aCropRect; aFileName = rGraf.aFileName; aFilterName = rGraf.aFilterName; diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 3f9cb0bd0d73..d45eb70f2f3f 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -80,29 +80,29 @@ namespace return aRetval; } - static drawinglayer::primitive2d::FontUnderline mapTextLineStyle(FontUnderline eLineStyle) + static drawinglayer::primitive2d::TextLine mapTextLineStyle(FontUnderline eLineStyle) { switch(eLineStyle) { - case UNDERLINE_SINGLE: return drawinglayer::primitive2d::FONT_UNDERLINE_SINGLE; - case UNDERLINE_DOUBLE: return drawinglayer::primitive2d::FONT_UNDERLINE_DOUBLE; - case UNDERLINE_DOTTED: return drawinglayer::primitive2d::FONT_UNDERLINE_DOTTED; - case UNDERLINE_DASH: return drawinglayer::primitive2d::FONT_UNDERLINE_DASH; - case UNDERLINE_LONGDASH: return drawinglayer::primitive2d::FONT_UNDERLINE_LONGDASH; - case UNDERLINE_DASHDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_DASHDOT; - case UNDERLINE_DASHDOTDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_DASHDOTDOT; - case UNDERLINE_SMALLWAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_SMALLWAVE; - case UNDERLINE_WAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_WAVE; - case UNDERLINE_DOUBLEWAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_DOUBLEWAVE; - case UNDERLINE_BOLD: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLD; - case UNDERLINE_BOLDDOTTED: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDOTTED; - case UNDERLINE_BOLDDASH: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASH; - case UNDERLINE_BOLDLONGDASH: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDLONGDASH; - case UNDERLINE_BOLDDASHDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASHDOT; - case UNDERLINE_BOLDDASHDOTDOT: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDDASHDOTDOT; - case UNDERLINE_BOLDWAVE: return drawinglayer::primitive2d::FONT_UNDERLINE_BOLDWAVE; + case UNDERLINE_SINGLE: return drawinglayer::primitive2d::TEXT_LINE_SINGLE; + case UNDERLINE_DOUBLE: return drawinglayer::primitive2d::TEXT_LINE_DOUBLE; + case UNDERLINE_DOTTED: return drawinglayer::primitive2d::TEXT_LINE_DOTTED; + case UNDERLINE_DASH: return drawinglayer::primitive2d::TEXT_LINE_DASH; + case UNDERLINE_LONGDASH: return drawinglayer::primitive2d::TEXT_LINE_LONGDASH; + case UNDERLINE_DASHDOT: return drawinglayer::primitive2d::TEXT_LINE_DASHDOT; + case UNDERLINE_DASHDOTDOT: return drawinglayer::primitive2d::TEXT_LINE_DASHDOTDOT; + case UNDERLINE_SMALLWAVE: return drawinglayer::primitive2d::TEXT_LINE_SMALLWAVE; + case UNDERLINE_WAVE: return drawinglayer::primitive2d::TEXT_LINE_WAVE; + case UNDERLINE_DOUBLEWAVE: return drawinglayer::primitive2d::TEXT_LINE_DOUBLEWAVE; + case UNDERLINE_BOLD: return drawinglayer::primitive2d::TEXT_LINE_BOLD; + case UNDERLINE_BOLDDOTTED: return drawinglayer::primitive2d::TEXT_LINE_BOLDDOTTED; + case UNDERLINE_BOLDDASH: return drawinglayer::primitive2d::TEXT_LINE_BOLDDASH; + case UNDERLINE_BOLDLONGDASH: return drawinglayer::primitive2d::TEXT_LINE_BOLDLONGDASH; + case UNDERLINE_BOLDDASHDOT: return drawinglayer::primitive2d::TEXT_LINE_BOLDDASHDOT; + case UNDERLINE_BOLDDASHDOTDOT: return drawinglayer::primitive2d::TEXT_LINE_BOLDDASHDOTDOT; + case UNDERLINE_BOLDWAVE: return drawinglayer::primitive2d::TEXT_LINE_BOLDWAVE; // FontUnderline_FORCE_EQUAL_SIZE, UNDERLINE_DONTKNOW, UNDERLINE_NONE - default: return drawinglayer::primitive2d::FONT_UNDERLINE_NONE; + default: return drawinglayer::primitive2d::TEXT_LINE_NONE; } } @@ -217,8 +217,8 @@ namespace if(rInfo.mrText.Len() && rInfo.mnTextLen) { basegfx::B2DVector aFontScaling; - drawinglayer::primitive2d::FontAttributes aFontAttributes( - drawinglayer::primitive2d::getFontAttributesFromVclFont( + drawinglayer::attribute::FontAttribute aFontAttribute( + drawinglayer::primitive2d::getFontAttributeFromVclFont( aFontScaling, rInfo.mrFont, rInfo.IsRTL(), @@ -296,6 +296,11 @@ namespace const Color aFontColor(rInfo.mrFont.GetColor()); const basegfx::BColor aBFontColor(aFontColor.getBColor()); + // prepare wordLineMode (for underline and strikeout) + // NOT for bullet texts. It is set (this may be an error by itself), but needs to be suppressed to hinder e.g. '1)' + // to be splitted which would not look like the original + const bool bWordLineMode(rInfo.mrFont.IsWordLineMode() && !rInfo.mbEndOfBullet); + // prepare new primitive drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = 0; const bool bDecoratedIsNeeded( @@ -304,7 +309,8 @@ namespace || STRIKEOUT_NONE != rInfo.mrFont.GetStrikeout() || EMPHASISMARK_NONE != (rInfo.mrFont.GetEmphasisMark() & EMPHASISMARK_STYLE) || RELIEF_NONE != rInfo.mrFont.GetRelief() - || rInfo.mrFont.IsShadow()); + || rInfo.mrFont.IsShadow() + || bWordLineMode); if(bDecoratedIsNeeded) { @@ -316,11 +322,11 @@ namespace const basegfx::BColor aBOverlineColor((0xffffffff == aOverlineColor.GetColor()) ? aBFontColor : aOverlineColor.getBColor()); // prepare overline and underline data - const drawinglayer::primitive2d::FontUnderline eFontOverline(mapTextLineStyle(rInfo.mrFont.GetOverline())); - const drawinglayer::primitive2d::FontUnderline eFontUnderline(mapTextLineStyle(rInfo.mrFont.GetUnderline())); + const drawinglayer::primitive2d::TextLine eFontOverline(mapTextLineStyle(rInfo.mrFont.GetOverline())); + const drawinglayer::primitive2d::TextLine eFontUnderline(mapTextLineStyle(rInfo.mrFont.GetUnderline())); // check UndelineAbove - const bool bUnderlineAbove(drawinglayer::primitive2d::FONT_UNDERLINE_NONE != eFontUnderline && impIsUnderlineAbove(rInfo.mrFont)); + const bool bUnderlineAbove(drawinglayer::primitive2d::TEXT_LINE_NONE != eFontUnderline && impIsUnderlineAbove(rInfo.mrFont)); // prepare strikeout data drawinglayer::primitive2d::FontStrikeout eFontStrikeout(drawinglayer::primitive2d::FONT_STRIKEOUT_NONE); @@ -335,11 +341,6 @@ namespace default : break; // FontStrikeout_FORCE_EQUAL_SIZE, STRIKEOUT_NONE, STRIKEOUT_DONTKNOW } - // prepare wordLineMode (for underline and strikeout) - // NOT for bullet texts. It is set (this may be an error by itself), but needs to be suppressed to hinder e.g. '1)' - // to be splitted which would not look like the original - const bool bWordLineMode(rInfo.mrFont.IsWordLineMode() && !rInfo.mbEndOfBullet); - // prepare emphasis mark data drawinglayer::primitive2d::FontEmphasisMark eFontEmphasisMark(drawinglayer::primitive2d::FONT_EMPHASISMARK_NONE); @@ -376,7 +377,7 @@ namespace rInfo.mnTextStart, rInfo.mnTextLen, aDXArray, - aFontAttributes, + aFontAttribute, rInfo.mpLocale ? *rInfo.mpLocale : ::com::sun::star::lang::Locale(), aBFontColor, @@ -403,7 +404,7 @@ namespace rInfo.mnTextStart, rInfo.mnTextLen, aDXArray, - aFontAttributes, + aFontAttribute, rInfo.mpLocale ? *rInfo.mpLocale : ::com::sun::star::lang::Locale(), aBFontColor); } diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index f6a30d40b3d5..42215d35bad8 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -366,8 +366,8 @@ namespace { const impPathTextPortion* pCandidate = rTextPortions[a]; basegfx::B2DVector aFontScaling; - const drawinglayer::primitive2d::FontAttributes aCandidateFontAttributes( - drawinglayer::primitive2d::getFontAttributesFromVclFont( + const drawinglayer::attribute::FontAttribute aCandidateFontAttribute( + drawinglayer::primitive2d::getFontAttributeFromVclFont( aFontScaling, pCandidate->getFont(), pCandidate->isRTL(), @@ -520,7 +520,7 @@ namespace nPortionIndex, nNextGlyphLen, aNewDXArray, - aCandidateFontAttributes, + aCandidateFontAttribute, pCandidate->getLocale(), aRGBShadowColor); @@ -545,7 +545,7 @@ namespace nPortionIndex, nNextGlyphLen, aNewDXArray, - aCandidateFontAttributes, + aCandidateFontAttribute, pCandidate->getLocale(), aRGBColor); -- cgit From d12dff9041a47602e6a655a67dacddcfd9cbe86b Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 12 Nov 2009 11:26:43 +0100 Subject: aw078 #i106541# commited in-between stable version with already advanced metafile decomposition for security reasons --- goodies/inc/grfmgr.hxx | 2 +- goodies/source/graphic/grfmgr.cxx | 4 +- vcl/source/gdi/metaact.cxx | 77 ++++++++++++++++++++++----------------- 3 files changed, 47 insertions(+), 36 deletions(-) diff --git a/goodies/inc/grfmgr.hxx b/goodies/inc/grfmgr.hxx index b44c27ea65e3..1ef351ae6d32 100644 --- a/goodies/inc/grfmgr.hxx +++ b/goodies/inc/grfmgr.hxx @@ -353,7 +353,7 @@ public: void ReleaseFromCache(); const Graphic& GetGraphic() const; - void SetGraphic( const Graphic& rGraphic ); + void SetGraphic( const Graphic& rGraphic, const GraphicObject* pCopyObj = 0); void SetGraphic( const Graphic& rGraphic, const String& rLink ); /** Get graphic transformed according to given attributes diff --git a/goodies/source/graphic/grfmgr.cxx b/goodies/source/graphic/grfmgr.cxx index 5cb37a51e81f..cccc51ff7049 100644 --- a/goodies/source/graphic/grfmgr.cxx +++ b/goodies/source/graphic/grfmgr.cxx @@ -845,7 +845,7 @@ const Graphic& GraphicObject::GetGraphic() const // ----------------------------------------------------------------------------- -void GraphicObject::SetGraphic( const Graphic& rGraphic ) +void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* pCopyObj ) { mpMgr->ImplUnregisterObj( *this ); @@ -858,7 +858,7 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic ) delete mpLink, mpLink = NULL; delete mpSimpleCache, mpSimpleCache = NULL; - mpMgr->ImplRegisterObj( *this, maGraphic ); + mpMgr->ImplRegisterObj( *this, maGraphic, 0, pCopyObj); if( mpSwapOutTimer ) mpSwapOutTimer->Start(); diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 4fe9a41be797..0587e661b7e8 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -52,14 +52,6 @@ inline void ImplScalePoint( Point& rPt, double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -inline void ImplScaleSize( Size& rSz, double fScaleX, double fScaleY ) -{ - rSz.Width() = FRound( fScaleX * rSz.Width() ); - rSz.Height() = FRound( fScaleY * rSz.Height() ); -} - -// ------------------------------------------------------------------------ - inline void ImplScaleRect( Rectangle& rRect, double fScaleX, double fScaleY ) { Point aTL( rRect.TopLeft() ); @@ -69,6 +61,7 @@ inline void ImplScaleRect( Rectangle& rRect, double fScaleX, double fScaleY ) ImplScalePoint( aBR, fScaleX, fScaleY ); rRect = Rectangle( aTL, aBR ); + rRect.Justify(); } // ------------------------------------------------------------------------ @@ -85,7 +78,7 @@ inline void ImplScaleLineInfo( LineInfo& rLineInfo, double fScaleX, double fScal { if( !rLineInfo.IsDefault() ) { - const double fScale = ( fScaleX + fScaleY ) * 0.5; + const double fScale = ( fabs(fScaleX) + fabs(fScaleY) ) * 0.5; rLineInfo.SetWidth( FRound( fScale * rLineInfo.GetWidth() ) ); rLineInfo.SetDashLen( FRound( fScale * rLineInfo.GetDashLen() ) ); @@ -598,8 +591,8 @@ void MetaRoundRectAction::Move( long nHorzMove, long nVertMove ) void MetaRoundRectAction::Scale( double fScaleX, double fScaleY ) { ImplScaleRect( maRect, fScaleX, fScaleY ); - mnHorzRound = FRound( mnHorzRound * fScaleX ); - mnVertRound = FRound( mnVertRound * fScaleY ); + mnHorzRound = FRound( mnHorzRound * fabs(fScaleX) ); + mnVertRound = FRound( mnVertRound * fabs(fScaleY) ); } // ------------------------------------------------------------------------ @@ -1396,7 +1389,7 @@ void MetaTextArrayAction::Scale( double fScaleX, double fScaleY ) if ( mpDXAry && mnLen ) { for ( USHORT i = 0, nCount = mnLen; i < nCount; i++ ) - mpDXAry[ i ] = FRound( mpDXAry[ i ] * fScaleX ); + mpDXAry[ i ] = FRound( mpDXAry[ i ] * fabs(fScaleX) ); } } @@ -1524,7 +1517,7 @@ void MetaStretchTextAction::Move( long nHorzMove, long nVertMove ) void MetaStretchTextAction::Scale( double fScaleX, double fScaleY ) { ImplScalePoint( maPt, fScaleX, fScaleY ); - mnWidth = (ULONG)FRound( mnWidth * fScaleX ); + mnWidth = (ULONG)FRound( mnWidth * fabs(fScaleX) ); } // ------------------------------------------------------------------------ @@ -1717,7 +1710,7 @@ void MetaTextLineAction::Move( long nHorzMove, long nVertMove ) void MetaTextLineAction::Scale( double fScaleX, double fScaleY ) { ImplScalePoint( maPos, fScaleX, fScaleY ); - mnWidth = FRound( mnWidth * fScaleX ); + mnWidth = FRound( mnWidth * fabs(fScaleX) ); } // ------------------------------------------------------------------------ @@ -1876,8 +1869,10 @@ void MetaBmpScaleAction::Move( long nHorzMove, long nVertMove ) void MetaBmpScaleAction::Scale( double fScaleX, double fScaleY ) { - ImplScalePoint( maPt, fScaleX, fScaleY ); - ImplScaleSize( maSz, fScaleX, fScaleY ); + Rectangle aRectangle(maPt, maSz); + ImplScaleRect( aRectangle, fScaleX, fScaleY ); + maPt = aRectangle.TopLeft(); + maSz = aRectangle.GetSize(); } // ------------------------------------------------------------------------ @@ -1953,8 +1948,10 @@ void MetaBmpScalePartAction::Move( long nHorzMove, long nVertMove ) void MetaBmpScalePartAction::Scale( double fScaleX, double fScaleY ) { - ImplScalePoint( maDstPt, fScaleX, fScaleY ); - ImplScaleSize( maDstSz, fScaleX, fScaleY ); + Rectangle aRectangle(maDstPt, maDstSz); + ImplScaleRect( aRectangle, fScaleX, fScaleY ); + maDstPt = aRectangle.TopLeft(); + maDstSz = aRectangle.GetSize(); } // ------------------------------------------------------------------------ @@ -2099,8 +2096,10 @@ void MetaBmpExScaleAction::Move( long nHorzMove, long nVertMove ) void MetaBmpExScaleAction::Scale( double fScaleX, double fScaleY ) { - ImplScalePoint( maPt, fScaleX, fScaleY ); - ImplScaleSize( maSz, fScaleX, fScaleY ); + Rectangle aRectangle(maPt, maSz); + ImplScaleRect( aRectangle, fScaleX, fScaleY ); + maPt = aRectangle.TopLeft(); + maSz = aRectangle.GetSize(); } // ------------------------------------------------------------------------ @@ -2176,8 +2175,10 @@ void MetaBmpExScalePartAction::Move( long nHorzMove, long nVertMove ) void MetaBmpExScalePartAction::Scale( double fScaleX, double fScaleY ) { - ImplScalePoint( maDstPt, fScaleX, fScaleY ); - ImplScaleSize( maDstSz, fScaleX, fScaleY ); + Rectangle aRectangle(maDstPt, maDstSz); + ImplScaleRect( aRectangle, fScaleX, fScaleY ); + maDstPt = aRectangle.TopLeft(); + maDstSz = aRectangle.GetSize(); } // ------------------------------------------------------------------------ @@ -2328,8 +2329,10 @@ void MetaMaskScaleAction::Move( long nHorzMove, long nVertMove ) void MetaMaskScaleAction::Scale( double fScaleX, double fScaleY ) { - ImplScalePoint( maPt, fScaleX, fScaleY ); - ImplScaleSize( maSz, fScaleX, fScaleY ); + Rectangle aRectangle(maPt, maSz); + ImplScaleRect( aRectangle, fScaleX, fScaleY ); + maPt = aRectangle.TopLeft(); + maSz = aRectangle.GetSize(); } // ------------------------------------------------------------------------ @@ -2408,8 +2411,10 @@ void MetaMaskScalePartAction::Move( long nHorzMove, long nVertMove ) void MetaMaskScalePartAction::Scale( double fScaleX, double fScaleY ) { - ImplScalePoint( maDstPt, fScaleX, fScaleY ); - ImplScaleSize( maDstSz, fScaleX, fScaleY ); + Rectangle aRectangle(maDstPt, maDstSz); + ImplScaleRect( aRectangle, fScaleX, fScaleY ); + maDstPt = aRectangle.TopLeft(); + maDstSz = aRectangle.GetSize(); } // ------------------------------------------------------------------------ @@ -3486,9 +3491,9 @@ MetaAction* MetaFontAction::Clone() void MetaFontAction::Scale( double fScaleX, double fScaleY ) { - Size aSize( maFont.GetSize() ); - - ImplScaleSize( aSize, fScaleX, fScaleY ); + const Size aSize( + FRound(maFont.GetSize().Width() * fabs(fScaleX)), + FRound(maFont.GetSize().Height() * fabs(fScaleY))); maFont.SetSize( aSize ); } @@ -3766,14 +3771,18 @@ MetaAction* MetaFloatTransparentAction::Clone() void MetaFloatTransparentAction::Move( long nHorzMove, long nVertMove ) { maPoint.Move( nHorzMove, nVertMove ); + maMtf.Move(nHorzMove, nVertMove); } // ------------------------------------------------------------------------ void MetaFloatTransparentAction::Scale( double fScaleX, double fScaleY ) { - ImplScalePoint( maPoint, fScaleX, fScaleY ); - ImplScaleSize( maSize, fScaleX, fScaleY ); + Rectangle aRectangle(maPoint, maSize); + ImplScaleRect( aRectangle, fScaleX, fScaleY ); + maPoint = aRectangle.TopLeft(); + maSize = aRectangle.GetSize(); + maMtf.Scale(fScaleX, fScaleY); } // ------------------------------------------------------------------------ @@ -3847,8 +3856,10 @@ void MetaEPSAction::Move( long nHorzMove, long nVertMove ) void MetaEPSAction::Scale( double fScaleX, double fScaleY ) { - ImplScalePoint( maPoint, fScaleX, fScaleY ); - ImplScaleSize( maSize, fScaleX, fScaleY ); + Rectangle aRectangle(maPoint, maSize); + ImplScaleRect( aRectangle, fScaleX, fScaleY ); + maPoint = aRectangle.TopLeft(); + maSize = aRectangle.GetSize(); } // ------------------------------------------------------------------------ -- cgit From d1514b06afe83c88d9cdbd037840750951236467 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 12 Nov 2009 11:26:43 +0100 Subject: aw078 #i106541# commited in-between stable version with already advanced metafile decomposition for security reasons --- sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx | 8 ++++---- sd/source/ui/view/sdview.cxx | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx index 1a25bedb583b..8a66523280fc 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx @@ -728,8 +728,8 @@ Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::create2DDecomposition(c // get font attributes basegfx::B2DVector aTextSizeAttribute; - const drawinglayer::primitive2d::FontAttributes aFontAttributes( - drawinglayer::primitive2d::getFontAttributesFromVclFont( + const drawinglayer::attribute::FontAttribute aFontAttribute( + drawinglayer::primitive2d::getFontAttributeFromVclFont( aTextSizeAttribute, getPageNameFont(), false, @@ -835,7 +835,7 @@ Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::create2DDecomposition(c 0, aPageName.Len(), aDXArray, - aFontAttributes, + aFontAttribute, aLocale, aFontColor)); } @@ -876,7 +876,7 @@ Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::create2DDecomposition(c 0, nNumberLen, aDXArray, - aFontAttributes, + aFontAttribute, aLocale, aFontColor)); diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 46a7d71a91fe..d38704bd124c 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -448,8 +448,8 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP aVclFont.SetHeight( 500 ); - const drawinglayer::primitive2d::FontAttributes aFontAttributes( - drawinglayer::primitive2d::getFontAttributesFromVclFont( + const drawinglayer::attribute::FontAttribute aFontAttribute( + drawinglayer::primitive2d::getFontAttributeFromVclFont( aTextSizeAttribute, aVclFont, false, @@ -476,7 +476,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP 0, nTextLength, aDXArray, - aFontAttributes, + aFontAttribute, aLocale, aFontColor)); drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xRef); -- cgit From a1ce3509a02958fd2476686b17d2f334032b6642 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 12 Nov 2009 16:59:54 +0100 Subject: sb116: #i106850# propagate soffice.bin exit code from soffice script --- desktop/scripts/soffice.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh index 7895d3ed1cd9..7aaa95bd3ffe 100644 --- a/desktop/scripts/soffice.sh +++ b/desktop/scripts/soffice.sh @@ -129,11 +129,13 @@ export PATH "$sd_prog/$sd_binary" "$@" & trap 'kill -9 $!' TERM wait $! +sd_ret=$? -while [ $? -eq 79 ] +while [ $sd_ret -eq 79 ] do "$sd_prog/$sd_binary" ""$BOOTSTRAPVARS"" & wait $! + sd_ret=$? done -exit +exit $sd_ret -- cgit From 497ee5f728f4d12dc1ddbfe0f76cfd968d372f7c Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 11:04:06 +0100 Subject: sb116: #i106845# removed obsolete IRIX port --- shell/source/backends/localebe/localebackend.cxx | 6 +++--- svx/source/gengal/gengal.sh | 5 ----- svx/util/makefile.mk | 4 ---- xmloff/source/text/txtimp.cxx | 8 -------- 4 files changed, 3 insertions(+), 20 deletions(-) diff --git a/shell/source/backends/localebe/localebackend.cxx b/shell/source/backends/localebe/localebackend.cxx index d8e2f05c0332..1496f426d3c6 100644 --- a/shell/source/backends/localebe/localebackend.cxx +++ b/shell/source/backends/localebe/localebackend.cxx @@ -39,7 +39,7 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) || defined(OS2) +#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(OS2) #include #include @@ -256,7 +256,7 @@ LocaleBackend* LocaleBackend::createInstance( rtl::OUString LocaleBackend::getLocale(void) { -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) || defined(OS2) +#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(OS2) return ImplGetLocale(LC_CTYPE); #elif defined (MACOSX) return ImplGetLocale("AppleLocale"); @@ -269,7 +269,7 @@ rtl::OUString LocaleBackend::getLocale(void) rtl::OUString LocaleBackend::getUILocale(void) { -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) || defined(OS2) +#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(OS2) return ImplGetLocale(LC_MESSAGES); #elif defined(MACOSX) return ImplGetLocale("AppleLanguages"); diff --git a/svx/source/gengal/gengal.sh b/svx/source/gengal/gengal.sh index 0e9613da4df8..d6a9e3cbec94 100644 --- a/svx/source/gengal/gengal.sh +++ b/svx/source/gengal/gengal.sh @@ -80,11 +80,6 @@ case $sd_platform in export SHLIB_PATH ;; - IRIX*) - LD_LIBRARYN32_PATH=${sd_prog}${LD_LIBRARYN32_PATH+:${LD_LIBRARYN32_PATH}} - export LD_LIBRARYN32_PATH - ;; - *) LD_LIBRARY_PATH=${sd_prog}${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}} export LD_LIBRARY_PATH diff --git a/svx/util/makefile.mk b/svx/util/makefile.mk index 3dcf5ca250f3..e0c653610bd0 100644 --- a/svx/util/makefile.mk +++ b/svx/util/makefile.mk @@ -42,10 +42,6 @@ USE_DEFFILE=TRUE .INCLUDE : settings.mk -.IF "$(OS)"=="IRIX" -LINKFLAGS+=-Wl,-LD_LAYOUT:lgot_buffer=30 -.ENDIF - RSCLOCINC+=-I$(PRJ)$/source$/svdraw # --- Svx - DLL ---------- diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 613a4688389f..d33825ccd1f8 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1572,15 +1572,7 @@ void XMLTextImportHelper::AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel { if( !mpOutlineStylesCandidates ) { -#ifdef IRIX - /* GCC 2 bug when member function is called as part of an array - * initialiser - */ - sal_Int8 count = xChapterNumbering->getCount(); - mpOutlineStylesCandidates = new ::std::vector[count]; -#else mpOutlineStylesCandidates = new ::std::vector[xChapterNumbering->getCount()]; -#endif } mpOutlineStylesCandidates[nOutlineLevel-1].push_back( rStyleName ); } -- cgit From 3be984c247488f75a9e23e7549efb69b8bbcacce Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 11:04:06 +0100 Subject: sb116: #i106845# removed obsolete IRIX port --- cpputools/source/sp2bv/makefile.mk | 2 +- jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk | 2 - sal/inc/osl/endian.h | 17 +- sal/inc/rtl/uuid.h | 2 - sal/inc/sal/alloca.h | 2 +- sal/inc/sal/config.h | 2 +- sal/osl/os2/file.cxx | 4 +- sal/osl/os2/nlsupport.c | 21 +- sal/osl/os2/socket.c | 2 +- sal/osl/os2/system.h | 32 +- sal/osl/unx/backtrace.c | 48 --- sal/osl/unx/file_volume.cxx | 425 +---------------------- sal/osl/unx/module.c | 26 -- sal/osl/unx/nlsupport.c | 50 +-- sal/osl/unx/process.c | 44 +-- sal/osl/unx/socket.c | 2 +- sal/osl/unx/system.h | 31 +- sal/rtl/source/alloc.c | 4 +- sal/rtl/source/macro.hxx | 4 - sal/util/makefile.mk | 3 - salhelper/source/simplereferenceobject.cxx | 2 +- 21 files changed, 27 insertions(+), 698 deletions(-) diff --git a/cpputools/source/sp2bv/makefile.mk b/cpputools/source/sp2bv/makefile.mk index 2b80d6e431c6..e9ca09bff6df 100644 --- a/cpputools/source/sp2bv/makefile.mk +++ b/cpputools/source/sp2bv/makefile.mk @@ -34,7 +34,7 @@ PRJ=..$/.. PRJNAME=cpputools TARGET=sp2bv TARGETTYPE=CUI -.IF "$(OS)"!="IRIX" && "$(OS)" != "MACOSX" +.IF "$(OS)" != "MACOSX" # hack to get stdc++ linked NO_DEFAULT_STL=TRUE .ENDIF diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk b/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk index 29aa95854d33..55fb0e2d3c0d 100755 --- a/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk +++ b/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk @@ -34,9 +34,7 @@ PRJ=..$/..$/.. PRJNAME=javaldx TARGET=javaldx TARGETTYPE=CUI -.IF "$(OS)"!="IRIX" NO_DEFAULT_STL=TRUE -.ENDIF LIBTARGET=NO ENABLE_EXCEPTIONS=true diff --git a/sal/inc/osl/endian.h b/sal/inc/osl/endian.h index b0d2922839be..09529a48840f 100644 --- a/sal/inc/osl/endian.h +++ b/sal/inc/osl/endian.h @@ -118,20 +118,6 @@ extern "C" { # include #endif -#ifdef IRIX -# include -# if BYTE_ORDER == LITTLE_ENDIAN -# undef _BIG_ENDIAN -# undef _PDP_ENDIAN -# elif BYTE_ORDER == BIG_ENDIAN -# undef _LITTLE_ENDIAN -# undef _PDP_ENDIAN -# elif BYTE_ORDER == PDP_ENDIAN -# undef _LITTLE_ENDIAN -# undef _BIG_ENDIAN -# endif -#endif - #ifdef _WIN16 # define _LITTLE_ENDIAN #endif @@ -166,8 +152,7 @@ extern "C" { #if !defined(_WIN32) && !defined(_WIN16) && !defined(OS2) && \ !defined(LINUX) && !defined(NETBSD) && !defined(SCO) && \ !defined(AIX) && !defined(HPUX) && \ - !defined(SOLARIS) && !defined(IRIX) && \ - !defined(MACOSX) && !defined(FREEBSD) + !defined(SOLARIS) && !defined(MACOSX) && !defined(FREEBSD) # error "Target platform not specified !" #endif diff --git a/sal/inc/rtl/uuid.h b/sal/inc/rtl/uuid.h index 6451ac7738d6..76911dd841fb 100644 --- a/sal/inc/rtl/uuid.h +++ b/sal/inc/rtl/uuid.h @@ -201,8 +201,6 @@ void SAL_CALL rtl_createNamedUuid( #define UUID_SYSTEM_TIME_RESOLUTION_100NS_TICKS 10 #elif MACOSX #define UUID_SYSTEM_TIME_RESOLUTION_100NS_TICKS 100000 -#elif IRIX -#define UUID_SYSTEM_TIME_RESOLUTION_100NS_TICKS 10 #else #error "System time resolution must be calculated!" #endif diff --git a/sal/inc/sal/alloca.h b/sal/inc/sal/alloca.h index 703027277f18..912e58eff06e 100644 --- a/sal/inc/sal/alloca.h +++ b/sal/inc/sal/alloca.h @@ -31,7 +31,7 @@ #ifndef INCLUDED_SAL_ALLOCA_H #define INCLUDED_SAL_ALLOCA_H -#if defined (SOLARIS) || defined (LINUX) || defined (IRIX) || defined(__EMX__) +#if defined (SOLARIS) || defined (LINUX) || defined(__EMX__) #ifndef INCLUDED_ALLOCA_H #include diff --git a/sal/inc/sal/config.h b/sal/inc/sal/config.h index f16165fe72cb..c9d31a437758 100644 --- a/sal/inc/sal/config.h +++ b/sal/inc/sal/config.h @@ -102,7 +102,7 @@ extern "C" { #define SAL_SYSCONFIGFILE( name ) name ".ini" #endif -#if defined(SOLARIS) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(SCO) || defined(IRIX) +#if defined(SOLARIS) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(SCO) #define SAL_UNX #define SAL_DLLEXTENSION ".so" #define SAL_DLLPREFIX "lib" diff --git a/sal/osl/os2/file.cxx b/sal/osl/os2/file.cxx index e89ce6450bee..f3c1ad015de0 100644 --- a/sal/osl/os2/file.cxx +++ b/sal/osl/os2/file.cxx @@ -2343,7 +2343,7 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handle) # define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) ((__OSL_MSDOS_SUPER_MAGIC != (a).f_type)) #endif /* LINUX */ -#if defined(SOLARIS) || defined(IRIX) +#if defined(SOLARIS) # define __OSL_STATFS_STRUCT struct statvfs # define __OSL_STATFS(dir, sfs) statvfs((dir), (sfs)) # define __OSL_STATFS_BLKSIZ(a) ((sal_uInt64)((a).f_frsize)) @@ -2355,7 +2355,7 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handle) of the target platforms fix it!!!! */ # define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a) (1) # define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (1) -#endif /* SOLARIS || IRIX*/ +#endif /* SOLARIS */ # define __OSL_STATFS_INIT(a) (memset(&(a), 0, sizeof(__OSL_STATFS_STRUCT))) diff --git a/sal/osl/os2/nlsupport.c b/sal/osl/os2/nlsupport.c index 0efccaa787e6..b05332bab0ea 100644 --- a/sal/osl/os2/nlsupport.c +++ b/sal/osl/os2/nlsupport.c @@ -411,9 +411,6 @@ void _imp_getProcessLocale( rtl_Locale ** ppLocale ) int _imp_setProcessLocale( rtl_Locale * pLocale ) { -#ifdef IRIX - char env_buf[80]; -#endif char locale_buf[64]; /* convert rtl_Locale to locale string */ @@ -421,11 +418,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale ) { /* only change env vars that exist already */ if( getenv( "LC_ALL" ) ) { -#if defined( IRIX ) - snprintf(env_buf, sizeof(env_buf), "LC_ALL=%s", locale_buf); - env_buf[sizeof(env_buf)] = '\0'; - putenv(env_buf); -#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ ) +#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ ) setenv( "LC_ALL", locale_buf, 1); #else setenv( "LC_ALL", locale_buf ); @@ -433,11 +426,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale ) } if( getenv( "LC_CTYPE" ) ) { -#if defined( IRIX ) - snprintf(env_buf, sizeof(env_buf), "LC_CTYPE=%s", locale_buf); - env_buf[sizeof(env_buf)] = '\0'; - putenv(env_buf); -#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ ) +#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ ) setenv("LC_CTYPE", locale_buf, 1 ); #else setenv( "LC_CTYPE", locale_buf ); @@ -445,11 +434,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale ) } if( getenv( "LANG" ) ) { -#if defined( IRIX ) - snprintf(env_buf, sizeof(env_buf), "LANG=%s", locale_buf); - env_buf[sizeof(env_buf)] = '\0'; - putenv(env_buf); -#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ ) +#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ ) setenv("LC_CTYPE", locale_buf, 1 ); #else setenv( "LANG", locale_buf ); diff --git a/sal/osl/os2/socket.c b/sal/osl/os2/socket.c index de70e5b8885a..1c6603b55932 100644 --- a/sal/osl/os2/socket.c +++ b/sal/osl/os2/socket.c @@ -48,7 +48,7 @@ #undef HAVE_POLL_H #endif -#if defined(LINUX) || defined (IRIX) || defined(NETBSD) || defined ( FREEBSD ) || defined (MACOSX) +#if defined(LINUX) || defined(NETBSD) || defined ( FREEBSD ) || defined (MACOSX) #include #define HAVE_POLL_H #endif /* HAVE_POLL_H */ diff --git a/sal/osl/os2/system.h b/sal/osl/os2/system.h index 565dfe3ea9c6..ef7626e9c036 100644 --- a/sal/osl/os2/system.h +++ b/sal/osl/os2/system.h @@ -306,36 +306,6 @@ extern unsigned int nanosleep(unsigned int); # define PTHREAD_SIGACTION cma_sigaction #endif -#ifdef IRIX -# define AF_IPX -1 -# include -# include -# include -# include -# include -# include -# include -# include -# include -# if BYTE_ORDER == LITTLE_ENDIAN -# undef _BIG_ENDIAN -# undef _PDP_ENDIAN -# elif BYTE_ORDER == BIG_ENDIAN -# undef _LITTLE_ENDIAN -# undef _PDP_ENDIAN -# elif BYTE_ORDER == PDP_ENDIAN -# undef _LITTLE_ENDIAN -# undef _BIG_ENDIAN -# endif -# define SA_FAMILY_DECL \ - union { struct { short sa_family2; } sa_generic; } sa_union -# define PTR_SIZE_T(s) ((int *)&(s)) -# define NO_PTHREAD_PRIORITY -# include -# define IOCHANNEL_TRANSFER_BSD -extern char *strdup(const char *); -#endif - #ifdef SOLARIS # include # include @@ -389,7 +359,7 @@ char *macxp_tempnam( const char *tmpdir, const char *prefix ); #if !defined(_WIN32) && !defined(_WIN16) && !defined(OS2) && \ !defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD) && !defined(SCO) && \ !defined(AIX) && !defined(HPUX) && \ - !defined(SOLARIS) && !defined(IRIX) && !defined(MAC) && \ + !defined(SOLARIS) && !defined(MAC) && \ !defined(MACOSX) # error "Target plattform not specified !" #endif diff --git a/sal/osl/unx/backtrace.c b/sal/osl/unx/backtrace.c index 437d31157049..886da0c3bee5 100755 --- a/sal/osl/unx/backtrace.c +++ b/sal/osl/unx/backtrace.c @@ -207,54 +207,6 @@ void backtrace_symbols_fd( void **buffer, int size, int fd ) } #endif /* defined FREEBSD */ -#if defined(IRIX) -#include -#include -#include -#include -#include - -/* Need extra libs -lexc -ldwarf -lelf */ - -int backtrace( void **buffer, int max_frames ) -{ - struct sigcontext context; - int i = 0; - - memset(&context, 0, sizeof(struct sigcontext)); - - exc_setjmp(&context); - while(context.sc_pc != 1 && i < max_frames) { - exc_unwind(&context, 0); - if(context.sc_pc != 1) { - *(buffer++) = (void *)context.sc_pc; - i++; - } - } - return(i); -} - -void backtrace_symbols_fd( void **buffer, int size, int fd ) -{ - FILE *fp = fdopen( fd, "w" ); - struct sigcontext context; - char *name; - - if ( fp ) { - while(context.sc_pc!=1) { - if(context.sc_pc != 1) { - exc_unwind_name(&context, 0, &name); - fprintf(fp, " 0x%012lx %.100s\n", context.sc_pc, name ? name : ""); - free(name); - } - } - - fflush( fp ); - fclose( fp ); - } -} -#endif /* defined IRIX */ - #ifdef LINUX #ifndef _GNU_SOURCE diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx index a3b7109123b7..4489368a4c9b 100644 --- a/sal/osl/unx/file_volume.cxx +++ b/sal/osl/unx/file_volume.cxx @@ -76,16 +76,6 @@ static const sal_Char* MOUNTTAB="/etc/mtab"; * This information is stored only in the kernel. */ /* static const sal_Char* MOUNTTAB="/etc/mtab"; */ -#elif defined(IRIX) - -#include -#include -#include -#define HAVE_STATFS_H -#include -//#include -static const sal_Char* MOUNTTAB="/etc/mtab"; - #elif defined(MACOSX) #include @@ -140,12 +130,6 @@ static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice); static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem); #endif /* LINUX */ - -#if defined(IRIX) -static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice); -static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem); -#endif /* IRIX */ - #ifdef DEBUG_OSL_FILE static void osl_printFloppyHandle(oslVolumeDeviceHandleImpl* hFloppy); #endif /* DEBUG_OSL_FILE */ @@ -220,7 +204,7 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI # define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) ((__OSL_MSDOS_SUPER_MAGIC != (a).f_type)) #endif /* LINUX */ -#if defined(SOLARIS) || defined(IRIX) +#if defined(SOLARIS) # define __OSL_STATFS_STRUCT struct statvfs # define __OSL_STATFS(dir, sfs) statvfs((dir), (sfs)) # define __OSL_STATFS_BLKSIZ(a) ((sal_uInt64)((a).f_frsize)) @@ -232,7 +216,7 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI of the target platforms fix it!!!! */ # define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a) (1) # define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (1) -#endif /* SOLARIS || IRIX*/ +#endif /* SOLARIS */ # define __OSL_STATFS_INIT(a) (memset(&(a), 0, sizeof(__OSL_STATFS_STRUCT))) @@ -1093,411 +1077,6 @@ osl_isFloppyMounted (oslVolumeDeviceHandleImpl* pDevice) } #endif /* LINUX */ -/****************************************************************************** - * - * IRIX FLOPPY FUNCTIONS - * - *****************************************************************************/ - -#if defined(IRIX) -static oslVolumeDeviceHandle osl_isFloppyDrive(const sal_Char* pszPath) -{ - oslVolumeDeviceHandleImpl* pItem = osl_newVolumeDeviceHandleImpl (); - sal_Bool bRet = sal_False; - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"In osl_isFloppyDrive\n"); -#endif - - bRet=osl_getFloppyMountEntry(pszPath,pItem); - - if ( bRet == sal_False ) - { -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_isFloppyDrive [not a floppy]\n"); -#endif - rtl_freeMemory(pItem); - return 0; - } - - -#ifdef DEBUG_OSL_FILE - osl_printFloppyHandle(pItem); -#endif -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_isFloppyDrive [ok]\n"); -#endif - - return (oslVolumeDeviceHandle) pItem; -} - - -static oslFileError osl_mountFloppy(oslVolumeDeviceHandle hFloppy) -{ - sal_Bool bRet = sal_False; - oslVolumeDeviceHandleImpl* pItem=0; - int nRet; - sal_Char pszCmd[PATH_MAX]; - sal_Char* pszMountProg = "mount"; - sal_Char* pszSuDo = 0; - sal_Char* pszTmp = 0; - - pszCmd[0] = '\0'; - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"In osl_mountFloppy\n"); -#endif - - pItem = (oslVolumeDeviceHandleImpl*) hFloppy; - - if ( pItem == 0 ) - { -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_mountFloppy [pItem == 0]\n"); -#endif - - return osl_File_E_INVAL; - } - - if ( pItem->ident[0] != 'O' || pItem->ident[1] != 'V' || pItem->ident[2] != 'D' || pItem->ident[3] != 'H' ) - { -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_mountFloppy [invalid handle]\n"); -#endif - return osl_File_E_INVAL; - } - - bRet = osl_isFloppyMounted(pItem); - if ( bRet == sal_True ) - { -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"detected mounted floppy at '%s'\n",pItem->pszMountPoint); -#endif - return osl_File_E_BUSY; - } - - /* mfe: we can't use the mount(2) system call!!! */ - /* even if we are root */ - /* since mtab is not updated!!! */ - /* but we need it to be updated */ - /* some "magic" must be done */ - -/* nRet = mount(pItem->pszDevice,pItem->pszMountPoint,0,0,0); */ -/* if ( nRet != 0 ) */ -/* { */ -/* nRet=errno; */ -/* #ifdef DEBUG_OSL_FILE */ -/* perror("mount"); */ -/* #endif */ -/* } */ - - pszTmp = getenv("SAL_MOUNT_MOUNTPROG"); - if ( pszTmp != 0 ) - { - pszMountProg=pszTmp; - } - - pszTmp=getenv("SAL_MOUNT_SU_DO"); - if ( pszTmp != 0 ) - { - pszSuDo=pszTmp; - } - - if ( pszSuDo != 0 ) - { - snprintf(pszCmd, sizeof(pszCmd), "%s %s %s %s",pszSuDo,pszMountProg,pItem->pszDevice,pItem->pszMountPoint); - } - else - { - snprintf(pszCmd, sizeof(pszCmd), "%s %s",pszMountProg,pItem->pszMountPoint); - } - - -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"executing '%s'\n",pszCmd); -#endif - - nRet = system(pszCmd); - -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"call returned '%i'\n",nRet); - fprintf(stderr,"exit status is '%i'\n", WEXITSTATUS(nRet)); -#endif - - - switch ( WEXITSTATUS(nRet) ) - { - case 0: - nRet=0; - break; - - case 2: - nRet=EPERM; - break; - - case 4: - nRet=ENOENT; - break; - - case 8: - nRet=EINTR; - break; - - case 16: - nRet=EPERM; - break; - - case 32: - nRet=EBUSY; - break; - - case 64: - nRet=EAGAIN; - break; - - default: - nRet=EBUSY; - break; - } - - return ((0 == nRet) ? oslTranslateFileError(OSL_FET_SUCCESS, nRet) : oslTranslateFileError(OSL_FET_ERROR, nRet)); -} - -static oslFileError osl_unmountFloppy(oslVolumeDeviceHandle hFloppy) -{ - oslVolumeDeviceHandleImpl* pItem=0; - int nRet=0; - sal_Char pszCmd[PATH_MAX]; - sal_Char* pszTmp = 0; - sal_Char* pszSuDo = 0; - sal_Char* pszUmountProg = "umount"; - - pszCmd[0] = '\0'; - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"In osl_unmountFloppy\n"); -#endif - - pItem = (oslVolumeDeviceHandleImpl*) hFloppy; - - if ( pItem == 0 ) - { -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_unmountFloppy [pItem==0]\n"); -#endif - return osl_File_E_INVAL; - } - - if ( pItem->ident[0] != 'O' || pItem->ident[1] != 'V' || pItem->ident[2] != 'D' || pItem->ident[3] != 'H' ) - { -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_unmountFloppy [invalid handle]\n"); -#endif - return osl_File_E_INVAL; - } - - /* mfe: we can't use the umount(2) system call!!! */ - /* even if we are root */ - /* since mtab is not updated!!! */ - /* but we need it to be updated */ - /* some "magic" must be done */ - -/* nRet=umount(pItem->pszDevice); */ -/* if ( nRet != 0 ) */ -/* { */ -/* nRet = errno; */ - -/* #ifdef DEBUG_OSL_FILE */ -/* perror("mount"); */ -/* #endif */ -/* } */ - - - pszTmp = getenv("SAL_MOUNT_UMOUNTPROG"); - if ( pszTmp != 0 ) - { - pszUmountProg=pszTmp; - } - - pszTmp = getenv("SAL_MOUNT_SU_DO"); - if ( pszTmp != 0 ) - { - pszSuDo=pszTmp; - } - - if ( pszSuDo != 0 ) - { - snprintf(pszCmd, sizeof(pszCmd), "%s %s %s",pszSuDo,pszUmountProg,pItem->pszMountPoint); - } - else - { - snprintf(pszCmd, sizeof(pszCmd), "%s %s",pszUmountProg,pItem->pszMountPoint); - } - - -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"executing '%s'\n",pszCmd); -#endif - - nRet = system(pszCmd); - -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"call returned '%i'\n",nRet); - fprintf(stderr,"exit status is '%i'\n", WEXITSTATUS(nRet)); -#endif - - switch ( WEXITSTATUS(nRet) ) - { - case 0: - nRet=0; - break; - - default: - nRet=EBUSY; - break; - } - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_unmountFloppy [ok]\n"); -#endif - - return ((0 == nRet) ? oslTranslateFileError(OSL_FET_SUCCESS, nRet) : oslTranslateFileError(OSL_FET_ERROR, nRet)); - -/* return osl_File_E_None;*/ -} - -static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem) -{ - struct mntent* pMountEnt=0; - sal_Char buffer[PATH_MAX]; - FILE* mntfile=0; - int nRet=0; - - buffer[0] = '\0'; - - mntfile = setmntent(MOUNTTAB,"r"); - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"In osl_getFloppyMountEntry\n"); -#endif - - memset(buffer, 0, sizeof(buffer)); - strncpy(buffer, pszPath, sizeof(buffer) - 1); - -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"Checking mount of %s\n",buffer); -#endif - - - if ( mntfile == 0 ) - { - nRet=errno; -#ifdef DEBUG_OSL_FILE - perror("mounttab"); -#endif -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_getFloppyMountEntry [mntfile]\n"); -#endif - return sal_False; - } - - pMountEnt=getmntent(mntfile); - while ( pMountEnt != 0 ) - { -#ifdef DEBUG_OSL_FILE -/* fprintf(stderr,"mnt_fsname : %s\n",pMountEnt->mnt_fsname); */ -/* fprintf(stderr,"mnt_dir : %s\n",pMountEnt->mnt_dir); */ -/* fprintf(stderr,"mnt_type : %s\n",pMountEnt->mnt_type);*/ -#endif - if ( strcmp(pMountEnt->mnt_dir,buffer) == 0 && - strncmp(pMountEnt->mnt_fsname,"/dev/fd",strlen("/dev/fd")) == 0 ) - { - - memset(pItem->pszMountPoint, 0, sizeof(pItem->pszMountPoint)); - strncpy(pItem->pszMountPoint, pMountEnt->mnt_dir, sizeof(pItem->pszMountPoint) - 1); - - memset(pItem->pszFilePath, 0, sizeof(pItem->pszFilePath)); - strncpy(pItem->pszFilePath, pMountEnt->mnt_dir, sizeof(pItem->pszFilePath) - 1); - - memset(pItem->pszDevice, 0, sizeof(pItem->pszDevice)); - strncpy(pItem->pszDevice, pMountEnt->mnt_fsname, sizeof(pItem->pszDevice) - 1); - - fclose(mntfile); -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"Mount Point found '%s'\n",pItem->pszMountPoint); -#endif -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_getFloppyMountEntry [found]\n"); -#endif - return sal_True; - } -#ifdef DEBUG_OSL_FILE -/* fprintf(stderr,"=================\n");*/ -#endif - pMountEnt=getmntent(mntfile); - } - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_getFloppyMountEntry [not found]\n"); -#endif - - fclose(mntfile); - return sal_False; -} - -static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice) -{ - sal_Char buffer[PATH_MAX]; - oslVolumeDeviceHandleImpl* pItem=0; - sal_Bool bRet=0; - - buffer[0] = '\0'; - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"In osl_isFloppyMounted\n"); -#endif - - pItem = osl_newVolumeDeviceHandleImpl (); - if ( pItem == 0 ) - return osl_File_E_NOMEM; - - memset(buffer, 0, sizeof(buffer)); - strncpy(buffer, pDevice->pszMountPoint, sizeof(buffer) - 1); - -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"Checking mount of %s\n",buffer); -#endif - - bRet = osl_getFloppyMountEntry(buffer,pItem); - - if ( bRet == sal_False ) - { -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_isFloppyMounted [not mounted]\n"); -#endif - return sal_False; - } - - if (strcmp(pItem->pszMountPoint, pDevice->pszMountPoint) == 0 && - strcmp(pItem->pszDevice,pDevice->pszDevice) == 0) - { -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_isFloppyMounted [is mounted]\n"); -#endif - rtl_freeMemory(pItem); - return sal_True; - } - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_isFloppyMounted [may be EBUSY]\n"); -#endif - - rtl_freeMemory(pItem); - return sal_False; -} -#endif /* IRIX */ - - /* NetBSD floppy functions have to be added here. Until we have done that, * we use the MACOSX definitions for nonexistent floppy. * */ diff --git a/sal/osl/unx/module.c b/sal/osl/unx/module.c index d486aad00e01..ffb0ebb61e7b 100644 --- a/sal/osl/unx/module.c +++ b/sal/osl/unx/module.c @@ -35,32 +35,6 @@ #include #include -#ifdef IRIX -#ifndef _RLD_INTERFACE_DLFCN_H_DLADDR -#define _RLD_INTERFACE_DLFCN_H_DLADDR -typedef struct DL_INFO { - const char * dli_fname; - void * dli_fbase; - const char * dli_sname; - void * dli_saddr; - int dli_version; - int dli_reserved1; - long dli_reserved[4]; -} Dl_info; -#endif -#include -#define _RLD_DLADDR 14 -int dladdr(void *address, Dl_info *dl); - -int dladdr(void *address, Dl_info *dl) -{ - void *v; - v = _rld_new_interface(_RLD_DLADDR,address,dl); - - return (int)v; -} -#endif - #include "system.h" #if OSL_DEBUG_LEVEL > 1 diff --git a/sal/osl/unx/nlsupport.c b/sal/osl/unx/nlsupport.c index e5390089e6d7..5f3741be883e 100644 --- a/sal/osl/unx/nlsupport.c +++ b/sal/osl/unx/nlsupport.c @@ -33,7 +33,7 @@ #include #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) || defined(MACOSX) +#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(MACOSX) #include #ifndef MACOSX #include @@ -42,7 +42,7 @@ #include #include #endif /* !MACOSX */ -#endif /* LINUX || SOLARIS || IRIX || NETBSD || MACOSX */ +#endif /* LINUX || SOLARIS || NETBSD || MACOSX */ #include @@ -229,13 +229,12 @@ static rtl_Locale * _parse_locale( const char * locale ) return NULL; } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) +#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps * from nl_langinfo(CODESET) to rtl_textencoding defines. - * nl_langinfo() is supported only on Linux and Solaris. - * nl_langinfo() is supported only on Linux, Solaris and IRIX, + * nl_langinfo() is supported only on Linux, Solaris, * >= NetBSD 1.6 and >= FreeBSD 4.4 * * This routine is SLOW because of the setlocale call, so @@ -299,24 +298,6 @@ const _pair _nl_language_list[] = { /* XXX MS-874 is an extension to tis620, so this is not * really equivalent */ -#elif defined(IRIX) - -const _pair _nl_language_list[] = { - { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ - { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ - { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ - { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ - { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ - { "eucTW", RTL_TEXTENCODING_EUC_TW }, /* Taiwan - Traditional Chinese */ - { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ - { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ - { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ - { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ - { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ - { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ - { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ - { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ -}; #elif defined(LINUX) || defined(NETBSD) @@ -552,7 +533,7 @@ const _pair _nl_language_list[] = { { "UTF-8", RTL_TEXTENCODING_UTF8 } /* ISO-10646/UTF-8 */ }; -#endif /* ifdef SOLARIS IRIX LINUX FREEBSD NETBSD */ +#endif /* ifdef SOLARIS LINUX FREEBSD NETBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; @@ -927,9 +908,6 @@ void _imp_getProcessLocale( rtl_Locale ** ppLocale ) int _imp_setProcessLocale( rtl_Locale * pLocale ) { -#ifdef IRIX - char env_buf[80]; -#endif char locale_buf[64]; /* convert rtl_Locale to locale string */ @@ -937,11 +915,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale ) { /* only change env vars that exist already */ if( getenv( "LC_ALL" ) ) { -#if defined( IRIX ) - snprintf(env_buf, sizeof(env_buf), "LC_ALL=%s", locale_buf); - env_buf[sizeof(env_buf)] = '\0'; - putenv(env_buf); -#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) +#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) setenv( "LC_ALL", locale_buf, 1); #else setenv( "LC_ALL", locale_buf ); @@ -949,11 +923,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale ) } if( getenv( "LC_CTYPE" ) ) { -#if defined( IRIX ) - snprintf(env_buf, sizeof(env_buf), "LC_CTYPE=%s", locale_buf); - env_buf[sizeof(env_buf)] = '\0'; - putenv(env_buf); -#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) +#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) setenv("LC_CTYPE", locale_buf, 1 ); #else setenv( "LC_CTYPE", locale_buf ); @@ -961,11 +931,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale ) } if( getenv( "LANG" ) ) { -#if defined( IRIX ) - snprintf(env_buf, sizeof(env_buf), "LANG=%s", locale_buf); - env_buf[sizeof(env_buf)] = '\0'; - putenv(env_buf); -#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) +#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) setenv("LC_CTYPE", locale_buf, 1 ); #else setenv( "LANG", locale_buf ); diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index abda0b73d856..234232b1f0ef 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -49,7 +49,7 @@ #endif #include "system.h" -#if defined(SOLARIS) || defined(IRIX) +#if defined(SOLARIS) # include #endif #include @@ -1368,48 +1368,6 @@ oslProcessError SAL_CALL osl_getProcessInfo(oslProcess Process, oslProcessData F return (pInfo->Fields == Fields) ? osl_Process_E_None : osl_Process_E_Unknown; } -#elif defined(IRIX) - - int fd; - sal_Char name[PATH_MAX + 1]; - - snprintf(name, sizeof(name), "/proc/%u", pid); - - if ((fd = open(name, O_RDONLY)) >= 0) - { - prstatus_t prstatus; - prpsinfo_t prpsinfo; - - if (ioctl(fd, PIOCSTATUS, &prstatus) >= 0 && - ioctl(fd, PIOCPSINFO, &prpsinfo) >= 0) - { - if (Fields & osl_Process_CPUTIMES) - { - pInfo->UserTime.Seconds = prstatus.pr_utime.tv_sec; - pInfo->UserTime.Nanosec = prstatus.pr_utime.tv_nsec; - pInfo->SystemTime.Seconds = prstatus.pr_stime.tv_sec; - pInfo->SystemTime.Nanosec = prstatus.pr_stime.tv_nsec; - - pInfo->Fields |= osl_Process_CPUTIMES; - } - - if (Fields & osl_Process_HEAPUSAGE) - { - int pagesize = getpagesize(); - - pInfo->HeapUsage = prpsinfo.pr_size*pagesize; - - pInfo->Fields |= osl_Process_HEAPUSAGE; - } - - close(fd); - - return (pInfo->Fields == Fields) ? osl_Process_E_None : osl_Process_E_Unknown; - } - else - close(fd); - } - #elif defined(LINUX) if ( (Fields & osl_Process_CPUTIMES) || (Fields & osl_Process_HEAPUSAGE) ) diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c index 4306347af873..362f3b0f2644 100644 --- a/sal/osl/unx/socket.c +++ b/sal/osl/unx/socket.c @@ -48,7 +48,7 @@ #undef HAVE_POLL_H #endif -#if defined(LINUX) || defined (IRIX) || defined(NETBSD) || defined ( FREEBSD ) || defined (MACOSX) +#if defined(LINUX) || defined(NETBSD) || defined ( FREEBSD ) || defined (MACOSX) #include #define HAVE_POLL_H #endif /* HAVE_POLL_H */ diff --git a/sal/osl/unx/system.h b/sal/osl/unx/system.h index c2e01126fb58..91f3b9fb7ae0 100644 --- a/sal/osl/unx/system.h +++ b/sal/osl/unx/system.h @@ -270,34 +270,6 @@ extern unsigned int nanosleep(unsigned int); # define PTHREAD_SIGACTION cma_sigaction #endif -#ifdef IRIX -# define AF_IPX -1 -# include -# include -# include -# include -# include -# include -# include -# include -# if BYTE_ORDER == LITTLE_ENDIAN -# undef _BIG_ENDIAN -# undef _PDP_ENDIAN -# elif BYTE_ORDER == BIG_ENDIAN -# undef _LITTLE_ENDIAN -# undef _PDP_ENDIAN -# elif BYTE_ORDER == PDP_ENDIAN -# undef _LITTLE_ENDIAN -# undef _BIG_ENDIAN -# endif -# define SA_FAMILY_DECL \ - union { struct { short sa_family2; } sa_generic; } sa_union -# define NO_PTHREAD_PRIORITY -# include -# define IOCHANNEL_TRANSFER_BSD -extern char *strdup(const char *); -#endif - #ifdef SOLARIS # include # include @@ -364,8 +336,7 @@ int macxp_resolveAlias(char *path, int buflen); #if !defined(_WIN32) && !defined(_WIN16) && !defined(OS2) && \ !defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD) && !defined(SCO) && \ !defined(AIX) && !defined(HPUX) && \ - !defined(SOLARIS) && !defined(IRIX) && \ - !defined(MACOSX) + !defined(SOLARIS) && !defined(MACOSX) # error "Target platform not specified!" #endif diff --git a/sal/rtl/source/alloc.c b/sal/rtl/source/alloc.c index 98a4c061e42b..123406717275 100644 --- a/sal/rtl/source/alloc.c +++ b/sal/rtl/source/alloc.c @@ -78,7 +78,7 @@ static sal_Size __rtl_memory_vmpagesize (void) /* xBSD */ return (sal_Size)(getpagesize()); } -#elif defined(IRIX) || defined(LINUX) || defined(SOLARIS) +#elif defined(LINUX) || defined(SOLARIS) static sal_Size __rtl_memory_vmpagesize (void) { /* POSIX */ @@ -90,7 +90,7 @@ static sal_Size __rtl_memory_vmpagesize (void) /* other */ return (sal_Size)(0x2000); } -#endif /* FREEBSD || NETBSD || MACOSX || IRIX || LINUX || SOLARIS */ +#endif /* FREEBSD || NETBSD || MACOSX || LINUX || SOLARIS */ #ifndef PROT_HEAP #define PROT_HEAP (PROT_READ | PROT_WRITE | PROT_EXEC) diff --git a/sal/rtl/source/macro.hxx b/sal/rtl/source/macro.hxx index a007d9e1cdab..ec8e4721a6a1 100644 --- a/sal/rtl/source/macro.hxx +++ b/sal/rtl/source/macro.hxx @@ -49,8 +49,6 @@ #define THIS_OS "NetBSD" #elif defined FREEBSD #define THIS_OS "FreeBSD" -#elif defined IRIX -#define THIS_OS "Irix" #endif #if ! defined THIS_OS @@ -76,8 +74,6 @@ this is inserted for the case that the preprocessor ignores error #else # define THIS_ARCH "SPARC" #endif -#elif defined IRIX -# define THIS_ARCH "MIPS" #elif defined MIPS # ifdef OSL_BIGENDIAN # define THIS_ARCH "MIPS_EB" diff --git a/sal/util/makefile.mk b/sal/util/makefile.mk index bc8026aa860f..a43f09e2e0e0 100644 --- a/sal/util/makefile.mk +++ b/sal/util/makefile.mk @@ -127,9 +127,6 @@ SHL1STDLIBS= -Bdynamic -ldl -lpthread -lposix4 -lsocket -lnsl SHL1STDLIBS+= -z allextract -staticlib=Crun -z defaultextract .ENDIF # C50 .ENDIF # SOLARIS -.IF "$(OS)"=="IRIX" -SHL1STDLIBS= -lexc -.ENDIF .ENDIF # UNX .IF "$(GUI)"=="OS2" diff --git a/salhelper/source/simplereferenceobject.cxx b/salhelper/source/simplereferenceobject.cxx index 2d80f246d171..36036feb5986 100755 --- a/salhelper/source/simplereferenceobject.cxx +++ b/salhelper/source/simplereferenceobject.cxx @@ -69,7 +69,7 @@ void SimpleReferenceObject::operator delete(void * pPtr) SAL_THROW(()) void SimpleReferenceObject::operator delete(void * pPtr, std::nothrow_t const &) SAL_THROW(()) { -#if defined WNT || (defined IRIX && !defined GCC) +#if defined WNT ::operator delete(pPtr); // WNT lacks a global nothrow operator delete... #else // WNT ::operator delete(pPtr, std::nothrow); -- cgit From abe1d852c9fe674319dcf0284847d423850f743e Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 11:04:06 +0100 Subject: sb116: #i106845# removed obsolete IRIX port --- configure | 141 ------------------------------------- configure.in | 85 ---------------------- set_soenv.in | 38 ++-------- solenv/bin/checkdll.sh | 10 --- solenv/bin/modules/osarch.pm | 9 +-- solenv/inc/_tg_shl.mk | 80 --------------------- solenv/inc/tg_shl.mk | 8 --- solenv/inc/unx.mk | 12 ---- solenv/inc/unxirgm.mk | 163 ------------------------------------------- solenv/inc/unxirxm.mk | 162 ------------------------------------------ solenv/inc/unxirxm3.mk | 162 ------------------------------------------ stlport/makefile.mk | 8 --- 12 files changed, 7 insertions(+), 871 deletions(-) delete mode 100644 solenv/inc/unxirgm.mk delete mode 100644 solenv/inc/unxirxm.mk delete mode 100644 solenv/inc/unxirxm3.mk diff --git a/configure b/configure index 2c97394a4275..aac619ea3ea9 100755 --- a/configure +++ b/configure @@ -1193,7 +1193,6 @@ with_zip_home with_mingwin with_use_shell with_build_version -enable_sgistl with_alloc enable_verbose enable_largefile @@ -2026,11 +2025,6 @@ Optional Features: explicitly enable if your version of ccache doesn't identify as version 2.4_OOo - --enable-sgistl for IRIX users, use this option option to build - OpenOffice.org using SGI's STL. - - Usage: --enable-sgistl=yes - --enable-verbose Increase build verbosity. --disable-verbose Decrease build verbosity. @@ -3884,11 +3878,6 @@ if test "${with_build_version+set}" = set; then withval=$with_build_version; with_build_version=$withval fi -# Check whether --enable-sgistl was given. -if test "${enable_sgistl+set}" = set; then - enableval=$enable_sgistl; -fi - # Check whether --with-alloc was given. if test "${with_alloc+set}" = set; then @@ -4582,12 +4571,6 @@ $as_echo "$PTHREAD_LIBS" >&6; } PTHREAD_LIBS="-pthread -lpthread" _os=NetBSD ;; - irix*) - test_cups=no - test_randr=no - test_freetype=yes - _os=IRIX - ;; aix*) test_cups=no test_randr=no @@ -6423,76 +6406,6 @@ $as_echo "not found " >&6; } fi -if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - if test "$CC" = "cc"; then - for ac_prog in cc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path__cc+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $_cc in - [\\/]* | ?:[\\/]*) - ac_cv_path__cc="$_cc" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path__cc="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -_cc=$ac_cv_path__cc -if test -n "$_cc"; then - { $as_echo "$as_me:$LINENO: result: $_cc" >&5 -$as_echo "$_cc" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$_cc" && break -done - - COMPATH=`echo $_cc | $SED -n "s/\/cc//p"` - { $as_echo "$as_me:$LINENO: checking the SGI MIPSpro C compiler version" >&5 -$as_echo_n "checking the SGI MIPSpro C compiler version... " >&6; } - _mipspro_version=`$CC -version 2>&1 | $AWK '{ print $4 }'` - _mipspro_major=`echo $_mipspro_version | $AWK -F. '{ print $1 }'` - if test "$_mipspro_major" != "7"; then - { { $as_echo "$as_me:$LINENO: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&5 -$as_echo "$as_me: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&2;} - { (exit 1); exit 1; }; } - else - _mipspro_minor=`echo $_mipspro_version | $AWK -F. '{ if ($2 <= 1) print "false"; else print "true" }'` - if test "$_mipspro_minor" = "false"; then - { { $as_echo "$as_me:$LINENO: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&5 -$as_echo "$as_me: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&2;} - { (exit 1); exit 1; }; } - else - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } - fi - fi - fi -fi - if test "$_os" = "OSF1"; then if test "$CC" = "cc"; then for ac_prog in cc @@ -10933,20 +10846,6 @@ $as_echo "checked" >&6; } fi fi fi -if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - if test "$CC" = "cc"; then - { $as_echo "$as_me:$LINENO: checking SGI MIPSpro C++ Compiler" >&5 -$as_echo_n "checking SGI MIPSpro C++ Compiler... " >&6; } - if test "$CXX" != "CC"; then - { $as_echo "$as_me:$LINENO: WARNING: SGI MIPSpro C++ was not found" >&5 -$as_echo "$as_me: WARNING: SGI MIPSpro C++ was not found" >&2;} - echo "SGI MIPSpro C++ was not found" >> warn - else - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } - fi - fi -fi if test "$_os" = "OSF1"; then { $as_echo "$as_me:$LINENO: checking Compaq C++ compiler version" >&5 $as_echo_n "checking Compaq C++ compiler version... " >&6; } @@ -11134,25 +11033,6 @@ $as_echo "$as_me: WARNING: patch 107733-06 not found, please install linker patc fi fi -if test -n "$enable_sgistl" && "$enable_sgistl" != "no"; then - if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - { $as_echo "$as_me:$LINENO: checking for SGI STL" >&5 -$as_echo_n "checking for SGI STL... " >&6; } - if test -d /usr/include/CC ; then - { $as_echo "$as_me:$LINENO: result: yes." >&5 -$as_echo "yes." >&6; } - - else - { $as_echo "$as_me:$LINENO: result: not found." >&5 -$as_echo "not found." >&6; } - fi - else - { { $as_echo "$as_me:$LINENO: error: Option --enable-sgistl is only valid for IRIX" >&5 -$as_echo "$as_me: error: Option --enable-sgistl is only valid for IRIX" >&2;} - { (exit 1); exit 1; }; } - fi -else - { $as_echo "$as_me:$LINENO: checking what the default STL should be" >&5 $as_echo_n "checking what the default STL should be... " >&6; } DEFAULT_TO_STLPORT="no" @@ -11285,24 +11165,6 @@ $as_echo "checked" >&6; } $as_echo "$as_me: error: STLport libraries not found" >&2;} { (exit 1); exit 1; }; } fi - elif test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - if test -f "$STLPORT4/lib/libstlport_mipspro_41.so"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } - else - if test -f "$STLPORT4/lib/libstlport_gcc.so"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } - elif test -f "$STLPORT4/lib/libstlport.so"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 -$as_echo "checked" >&6; } - STLPORT_VER=500 - else - { { $as_echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -$as_echo "$as_me: error: STLport libraries not found" >&2;} - { (exit 1); exit 1; }; } - fi - fi else if test -f "$STLPORT4/lib/libstlport_gcc.so"; then { $as_echo "$as_me:$LINENO: result: checked" >&5 @@ -13334,9 +13196,6 @@ $as_echo_n "checking which package format to use... " >&6; } OSF1) PKGFORMAT=setld ;; - IRIX) - PKGFORMAT=tardist - ;; # we never should get here since we check the arciecture/os at the beginning, # but go sure... *) diff --git a/configure.in b/configure.in index b22ec11fe289..bce4a1bfce40 100644 --- a/configure.in +++ b/configure.in @@ -784,12 +784,6 @@ AC_ARG_WITH(build-version, Usage: --with-build-version="Built by Jim" ],with_build_version=$withval) -AC_ARG_ENABLE(sgistl, -[ --enable-sgistl for IRIX users, use this option option to build - OpenOffice.org using SGI's STL. - - Usage: --enable-sgistl=yes -],,) AC_ARG_WITH(alloc, [ --with-alloc Define which allocator to build with (choices are oo, system, tcmalloc) @@ -1016,12 +1010,6 @@ case "$build_os" in PTHREAD_LIBS="-pthread -lpthread" _os=NetBSD ;; - irix*) - test_cups=no - test_randr=no - test_freetype=yes - _os=IRIX - ;; aix*) test_cups=no test_randr=no @@ -1628,31 +1616,6 @@ if test "$GCC" = "yes"; then fi AC_SUBST(HAVE_LD_HASH_STYLE) -dnl =================================================================== -dnl Test the IRIX SGI Mips pro compiler -dnl =================================================================== -if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - if test "$CC" = "cc"; then - AC_PATH_PROGS(_cc, cc) - COMPATH=`echo $_cc | $SED -n "s/\/cc//p"` - AC_MSG_CHECKING([the SGI MIPSpro C compiler version]) - dnl cc -version outputs to standard error!!!! - _mipspro_version=`$CC -version 2>&1 | $AWK '{ print $4 }'` - _mipspro_major=`echo $_mipspro_version | $AWK -F. '{ print $1 }'` - if test "$_mipspro_major" != "7"; then - AC_MSG_ERROR([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler]) - else - _mipspro_minor=`echo $_mipspro_version | $AWK -F. '{ if ($2 <= 1) print "false"; else print "true" }'` - if test "$_mipspro_minor" = "false"; then - AC_MSG_ERROR([found version "$_mipspro_version", use version 7.2+ of the SGI MIPSpro C compiler]) - else - dnl compiler will do - AC_MSG_RESULT([checked]) - fi - fi - fi -fi - dnl =================================================================== dnl Test the Compaq compiler for OSF1 dnl =================================================================== @@ -2282,21 +2245,6 @@ if test "$_os" = "Darwin"; then fi fi dnl =================================================================== -dnl Extra checking for the IRIX compiler -dnl =================================================================== -if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - dnl MIPSpro C++ compiler packaged with MIPSpro C compiler - if test "$CC" = "cc"; then - AC_MSG_CHECKING([SGI MIPSpro C++ Compiler]) - if test "$CXX" != "CC"; then - AC_MSG_WARN([SGI MIPSpro C++ was not found]) - echo "SGI MIPSpro C++ was not found" >> warn - else - AC_MSG_RESULT([checked]) - fi - fi -fi -dnl =================================================================== dnl Extra checking for the OSF compiler dnl =================================================================== if test "$_os" = "OSF1"; then @@ -2437,23 +2385,6 @@ if test "$_os" = "SunOS"; then fi fi -dnl =================================================================== -dnl Checks for SGI STL -dnl =================================================================== -if test -n "$enable_sgistl" && "$enable_sgistl" != "no"; then - if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - AC_MSG_CHECKING([for SGI STL]) - if test -d /usr/include/CC ; then - AC_MSG_RESULT([yes.]) - - else - AC_MSG_RESULT([not found.]) - fi - else - AC_MSG_ERROR([Option --enable-sgistl is only valid for IRIX]) - fi -else - dnl =================================================================== dnl Checks for what the default STL should be dnl =================================================================== @@ -2537,19 +2468,6 @@ dnl =================================================================== else AC_MSG_ERROR([STLport libraries not found]) fi - elif test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - if test -f "$STLPORT4/lib/libstlport_mipspro_41.so"; then - AC_MSG_RESULT([checked]) - else - if test -f "$STLPORT4/lib/libstlport_gcc.so"; then - AC_MSG_RESULT([checked]) - elif test -f "$STLPORT4/lib/libstlport.so"; then - AC_MSG_RESULT([checked]) - STLPORT_VER=500 - else - AC_MSG_ERROR([STLport libraries not found]) - fi - fi else if test -f "$STLPORT4/lib/libstlport_gcc.so"; then AC_MSG_RESULT([checked]) @@ -3345,9 +3263,6 @@ if test "$_os" != "WINNT" -a \( "z$enable_epm" = "z" -o "$enable_epm" != "no" \) OSF1) PKGFORMAT=setld ;; - IRIX) - PKGFORMAT=tardist - ;; # we never should get here since we check the arciecture/os at the beginning, # but go sure... *) diff --git a/set_soenv.in b/set_soenv.in index 2296f1d41020..4e230b16a574 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -581,33 +581,6 @@ elsif ( $platform =~ m/osf1/ ) $JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha".$ds."client"; $JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."alpha".$ds."native_threads"; } -elsif ( $platform =~ m/irix/ ) -{ print "Setting Irix specific values... "; - $outfile = "IrixMipsEnv.Set"; - $BIG_SVX = "TRUE"; - if ($CC =~ "gcc" ) { - $COM = "GCC"; - $OUTPATH = "unxirgm"; - $CVER = "C300"; - } - else { - $COM = "C730"; - $CVER = "C730"; - $OUTPATH = "unxirxm3"; - } - $COMPATH = '@COMPATH@'; - $CPU = "M"; - $CPUNAME = "MIPS"; - $GUI = "UNX"; - $GUIBASE = "unx"; - $GVER = "VCL"; - $INPATH = $OUTPATH.$PROEXT; - $OS = "IRIX"; - $PATH_SEPERATOR = $ps; - $JRELIBDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."mips"; - $JRETOOLKITDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."mips".$ds."client"; - $JRETHREADDIR = '$JAVA_HOME'.$ds."jre".$ds."lib".$ds."mips".$ds."native_threads"; -} elsif ( $platform =~ m/cygwin/ ) { $COMPATH = PathFormat('@COMPATH@'); @@ -1045,7 +1018,7 @@ if ($platform =~ m/solaris/) $L.$USR_DT.$LIB. $L.$USR_OPENWIN.$LIB; } -elsif ($platform =~ m/linux|netbsd|osf1|irix|freebsd|aix/) +elsif ($platform =~ m/linux|netbsd|osf1|freebsd|aix/) { $SOLAREXTRALIB = $L.$par_dir.$LIB64; } @@ -1111,7 +1084,7 @@ if ($platform =~ m/cygwin|os2/) } # The general environment path. -if ($platform =~ m/linux|netbsd|odf1|irix|freebsd|aix|solaris/) +if ($platform =~ m/linux|netbsd|odf1|freebsd|aix|solaris/) { $PATH = $cur_dir. # $ps.'$SOLARVER'.$ds.'$INPATH'.$BIN. $ps.'$SOLARENV'.$ds.'$OUTPATH'.$BIN. @@ -1345,7 +1318,7 @@ if ($platform =~ m/solaris/) $L_STLPORT_LIB. $L.$XLIB; } -elsif ($platform =~ m/linux|netbasd|osf1|irix|aix|freebsd/) +elsif ($platform =~ m/linux|netbasd|osf1|aix|freebsd/) { $SOLARLIB = $L.$par_dir.$LIB. $L.'$SOLARENV'.$ds.'$OUTPATH'.$LIB. $L.'$SOLARVER'.$ds.'$INPATH'.$LIB. @@ -1388,7 +1361,7 @@ $SOLARINC = $I.$cur_dir. $I.'$SOLARENV'.$INC. $I.'$SRC_ROOT'.$ds."res"; -if ($platform =~ m/solaris|linux|osf1|freebsd|netbsd|irix/) +if ($platform =~ m/solaris|linux|osf1|freebsd|netbsd/) { $SOLARINC .= $STLPORT_stlport; if ($platform =~ m/linux|freebsd|netbsd/) @@ -1434,9 +1407,6 @@ if ($platform =~ m/linux/) elsif ($platform =~ m/netbsd/) { $SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."netbsd"; } - elsif ($platform =~ m/irix/) - { $SOLARINC .=$I.'$JAVA_HOME'.$INCLUDE.$ds."irix"; - } #java threads include path diff --git a/solenv/bin/checkdll.sh b/solenv/bin/checkdll.sh index 0400f461666e..e64b8fd2aa4c 100755 --- a/solenv/bin/checkdll.sh +++ b/solenv/bin/checkdll.sh @@ -60,16 +60,6 @@ if [ -x $checkdll ]; then *) DYLD_LIBRARY_PATH=$libpath;; esac export DYLD_LIBRARY_PATH;; - IRIX) case "${LD_LIBRARYN32_PATH+X}" in - X) LD_LIBRARYN32_PATH=$libpath:$LD_LIBRARYN32_PATH;; - *) LD_LIBRARYN32_PATH=$libpath;; - esac - export LD_LIBRARYN32_PATH;; - IRIX64) case "${LD_LIBRARYN32_PATH+X}" in - X) LD_LIBRARYN32_PATH=$libpath:$LD_LIBRARYN32_PATH;; - *) LD_LIBRARYN32_PATH=$libpath;; - esac - export LD_LIBRARYN32_PATH;; *) case "${LD_LIBRARY_PATH+X}" in X) LD_LIBRARY_PATH=$libpath:$LD_LIBRARY_PATH;; *) LD_LIBRARY_PATH=$libpath;; diff --git a/solenv/bin/modules/osarch.pm b/solenv/bin/modules/osarch.pm index 8c3a87e4ddc5..205e4c933193 100755 --- a/solenv/bin/modules/osarch.pm +++ b/solenv/bin/modules/osarch.pm @@ -27,8 +27,7 @@ chop( $m_str, $s_str ); # "SCO_SV", "scouw21", "Darwin", "macosxp", "Mac OS", "macosxp", - "SINIX-N", "sinix", - "IRIX", "irix" + "SINIX-N", "sinix" ); %osDefTable = ("SunOS", "-DSYSV -DSOLARIS", @@ -42,8 +41,7 @@ chop( $m_str, $s_str ); # "SCO_SV", "-DSYSV -DSCO -DSCO_UW21", "Darwin", "-DBSD -DMACOSX", "Mac OS", "-DBSD -DMACOSX", - "SINIX-N", "-DSYSV -DSINIX", - "IRIX", "-DSYSV -DIRIX" + "SINIX-N", "-DSYSV -DSINIX" ); %osDosTable = ("SunOS", "sol", @@ -56,8 +54,7 @@ chop( $m_str, $s_str ); "SCO_SV", "sco", "Darwin", "macx", "Mac OS", "macx", - "SINIX-N", "sni", - "IRIX", "irx" + "SINIX-N", "sni" ); %archTable = ("sun4c", "sparc", diff --git a/solenv/inc/_tg_shl.mk b/solenv/inc/_tg_shl.mk index a862ec39897f..19f6e30ad175 100644 --- a/solenv/inc/_tg_shl.mk +++ b/solenv/inc/_tg_shl.mk @@ -100,9 +100,7 @@ $(USE_SHL1VERSIONMAP) .PHONY: .ENDIF # "$(SHL1VERSIONMAP)"!="" -.IF "$(OS)"!="IRIX" SHL1VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL1VERSIONMAP) -.ENDIF $(USE_SHL1VERSIONMAP): \ $(SHL1OBJS)\ @@ -139,9 +137,7 @@ $(USE_SHL1VERSIONMAP) : #and now for the plain non-generic way... .IF "$(SHL1VERSIONMAP)"!="" USE_SHL1VERSIONMAP=$(MISC)/$(SHL1VERSIONMAP:b)_$(SHL1TARGET)$(SHL1VERSIONMAP:e) -.IF "$(OS)"!="IRIX" SHL1VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL1VERSIONMAP) -.ENDIF .IF "$(OS)"=="MACOSX" $(USE_SHL1VERSIONMAP): $(SHL1OBJS) $(SHL1LIBS) @@ -189,11 +185,7 @@ $(USE_SHL1VERSIONMAP): $(SHL1VERSIONMAP) .IF "$(UNIXVERSIONNAMES)"!="" .IF "$(OS)"!="MACOSX" .IF "$(GUI)"=="UNX" -.IF "$(OS)"=="IRIX" -SHL1SONAME=$(SONAME_SWITCH)$(SHL1TARGETN:f) -.ELSE SHL1SONAME=\"$(SONAME_SWITCH)$(SHL1TARGETN:f)\" -.ENDIF .ENDIF # "$(GUI)"!="UNX" .ENDIF # "$(OS)"!="MACOSX" .ENDIF # "$(UNIXVERSIONNAMES)"!="" @@ -654,9 +646,7 @@ $(USE_SHL2VERSIONMAP) .PHONY: .ENDIF # "$(SHL2VERSIONMAP)"!="" -.IF "$(OS)"!="IRIX" SHL2VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL2VERSIONMAP) -.ENDIF $(USE_SHL2VERSIONMAP): \ $(SHL2OBJS)\ @@ -693,9 +683,7 @@ $(USE_SHL2VERSIONMAP) : #and now for the plain non-generic way... .IF "$(SHL2VERSIONMAP)"!="" USE_SHL2VERSIONMAP=$(MISC)/$(SHL2VERSIONMAP:b)_$(SHL2TARGET)$(SHL2VERSIONMAP:e) -.IF "$(OS)"!="IRIX" SHL2VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL2VERSIONMAP) -.ENDIF .IF "$(OS)"=="MACOSX" $(USE_SHL2VERSIONMAP): $(SHL2OBJS) $(SHL2LIBS) @@ -743,11 +731,7 @@ $(USE_SHL2VERSIONMAP): $(SHL2VERSIONMAP) .IF "$(UNIXVERSIONNAMES)"!="" .IF "$(OS)"!="MACOSX" .IF "$(GUI)"=="UNX" -.IF "$(OS)"=="IRIX" -SHL2SONAME=$(SONAME_SWITCH)$(SHL2TARGETN:f) -.ELSE SHL2SONAME=\"$(SONAME_SWITCH)$(SHL2TARGETN:f)\" -.ENDIF .ENDIF # "$(GUI)"!="UNX" .ENDIF # "$(OS)"!="MACOSX" .ENDIF # "$(UNIXVERSIONNAMES)"!="" @@ -1208,9 +1192,7 @@ $(USE_SHL3VERSIONMAP) .PHONY: .ENDIF # "$(SHL3VERSIONMAP)"!="" -.IF "$(OS)"!="IRIX" SHL3VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL3VERSIONMAP) -.ENDIF $(USE_SHL3VERSIONMAP): \ $(SHL3OBJS)\ @@ -1247,9 +1229,7 @@ $(USE_SHL3VERSIONMAP) : #and now for the plain non-generic way... .IF "$(SHL3VERSIONMAP)"!="" USE_SHL3VERSIONMAP=$(MISC)/$(SHL3VERSIONMAP:b)_$(SHL3TARGET)$(SHL3VERSIONMAP:e) -.IF "$(OS)"!="IRIX" SHL3VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL3VERSIONMAP) -.ENDIF .IF "$(OS)"=="MACOSX" $(USE_SHL3VERSIONMAP): $(SHL3OBJS) $(SHL3LIBS) @@ -1297,11 +1277,7 @@ $(USE_SHL3VERSIONMAP): $(SHL3VERSIONMAP) .IF "$(UNIXVERSIONNAMES)"!="" .IF "$(OS)"!="MACOSX" .IF "$(GUI)"=="UNX" -.IF "$(OS)"=="IRIX" -SHL3SONAME=$(SONAME_SWITCH)$(SHL3TARGETN:f) -.ELSE SHL3SONAME=\"$(SONAME_SWITCH)$(SHL3TARGETN:f)\" -.ENDIF .ENDIF # "$(GUI)"!="UNX" .ENDIF # "$(OS)"!="MACOSX" .ENDIF # "$(UNIXVERSIONNAMES)"!="" @@ -1762,9 +1738,7 @@ $(USE_SHL4VERSIONMAP) .PHONY: .ENDIF # "$(SHL4VERSIONMAP)"!="" -.IF "$(OS)"!="IRIX" SHL4VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL4VERSIONMAP) -.ENDIF $(USE_SHL4VERSIONMAP): \ $(SHL4OBJS)\ @@ -1801,9 +1775,7 @@ $(USE_SHL4VERSIONMAP) : #and now for the plain non-generic way... .IF "$(SHL4VERSIONMAP)"!="" USE_SHL4VERSIONMAP=$(MISC)/$(SHL4VERSIONMAP:b)_$(SHL4TARGET)$(SHL4VERSIONMAP:e) -.IF "$(OS)"!="IRIX" SHL4VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL4VERSIONMAP) -.ENDIF .IF "$(OS)"=="MACOSX" $(USE_SHL4VERSIONMAP): $(SHL4OBJS) $(SHL4LIBS) @@ -1851,11 +1823,7 @@ $(USE_SHL4VERSIONMAP): $(SHL4VERSIONMAP) .IF "$(UNIXVERSIONNAMES)"!="" .IF "$(OS)"!="MACOSX" .IF "$(GUI)"=="UNX" -.IF "$(OS)"=="IRIX" -SHL4SONAME=$(SONAME_SWITCH)$(SHL4TARGETN:f) -.ELSE SHL4SONAME=\"$(SONAME_SWITCH)$(SHL4TARGETN:f)\" -.ENDIF .ENDIF # "$(GUI)"!="UNX" .ENDIF # "$(OS)"!="MACOSX" .ENDIF # "$(UNIXVERSIONNAMES)"!="" @@ -2316,9 +2284,7 @@ $(USE_SHL5VERSIONMAP) .PHONY: .ENDIF # "$(SHL5VERSIONMAP)"!="" -.IF "$(OS)"!="IRIX" SHL5VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL5VERSIONMAP) -.ENDIF $(USE_SHL5VERSIONMAP): \ $(SHL5OBJS)\ @@ -2355,9 +2321,7 @@ $(USE_SHL5VERSIONMAP) : #and now for the plain non-generic way... .IF "$(SHL5VERSIONMAP)"!="" USE_SHL5VERSIONMAP=$(MISC)/$(SHL5VERSIONMAP:b)_$(SHL5TARGET)$(SHL5VERSIONMAP:e) -.IF "$(OS)"!="IRIX" SHL5VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL5VERSIONMAP) -.ENDIF .IF "$(OS)"=="MACOSX" $(USE_SHL5VERSIONMAP): $(SHL5OBJS) $(SHL5LIBS) @@ -2405,11 +2369,7 @@ $(USE_SHL5VERSIONMAP): $(SHL5VERSIONMAP) .IF "$(UNIXVERSIONNAMES)"!="" .IF "$(OS)"!="MACOSX" .IF "$(GUI)"=="UNX" -.IF "$(OS)"=="IRIX" -SHL5SONAME=$(SONAME_SWITCH)$(SHL5TARGETN:f) -.ELSE SHL5SONAME=\"$(SONAME_SWITCH)$(SHL5TARGETN:f)\" -.ENDIF .ENDIF # "$(GUI)"!="UNX" .ENDIF # "$(OS)"!="MACOSX" .ENDIF # "$(UNIXVERSIONNAMES)"!="" @@ -2870,9 +2830,7 @@ $(USE_SHL6VERSIONMAP) .PHONY: .ENDIF # "$(SHL6VERSIONMAP)"!="" -.IF "$(OS)"!="IRIX" SHL6VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL6VERSIONMAP) -.ENDIF $(USE_SHL6VERSIONMAP): \ $(SHL6OBJS)\ @@ -2909,9 +2867,7 @@ $(USE_SHL6VERSIONMAP) : #and now for the plain non-generic way... .IF "$(SHL6VERSIONMAP)"!="" USE_SHL6VERSIONMAP=$(MISC)/$(SHL6VERSIONMAP:b)_$(SHL6TARGET)$(SHL6VERSIONMAP:e) -.IF "$(OS)"!="IRIX" SHL6VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL6VERSIONMAP) -.ENDIF .IF "$(OS)"=="MACOSX" $(USE_SHL6VERSIONMAP): $(SHL6OBJS) $(SHL6LIBS) @@ -2959,11 +2915,7 @@ $(USE_SHL6VERSIONMAP): $(SHL6VERSIONMAP) .IF "$(UNIXVERSIONNAMES)"!="" .IF "$(OS)"!="MACOSX" .IF "$(GUI)"=="UNX" -.IF "$(OS)"=="IRIX" -SHL6SONAME=$(SONAME_SWITCH)$(SHL6TARGETN:f) -.ELSE SHL6SONAME=\"$(SONAME_SWITCH)$(SHL6TARGETN:f)\" -.ENDIF .ENDIF # "$(GUI)"!="UNX" .ENDIF # "$(OS)"!="MACOSX" .ENDIF # "$(UNIXVERSIONNAMES)"!="" @@ -3424,9 +3376,7 @@ $(USE_SHL7VERSIONMAP) .PHONY: .ENDIF # "$(SHL7VERSIONMAP)"!="" -.IF "$(OS)"!="IRIX" SHL7VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL7VERSIONMAP) -.ENDIF $(USE_SHL7VERSIONMAP): \ $(SHL7OBJS)\ @@ -3463,9 +3413,7 @@ $(USE_SHL7VERSIONMAP) : #and now for the plain non-generic way... .IF "$(SHL7VERSIONMAP)"!="" USE_SHL7VERSIONMAP=$(MISC)/$(SHL7VERSIONMAP:b)_$(SHL7TARGET)$(SHL7VERSIONMAP:e) -.IF "$(OS)"!="IRIX" SHL7VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL7VERSIONMAP) -.ENDIF .IF "$(OS)"=="MACOSX" $(USE_SHL7VERSIONMAP): $(SHL7OBJS) $(SHL7LIBS) @@ -3513,11 +3461,7 @@ $(USE_SHL7VERSIONMAP): $(SHL7VERSIONMAP) .IF "$(UNIXVERSIONNAMES)"!="" .IF "$(OS)"!="MACOSX" .IF "$(GUI)"=="UNX" -.IF "$(OS)"=="IRIX" -SHL7SONAME=$(SONAME_SWITCH)$(SHL7TARGETN:f) -.ELSE SHL7SONAME=\"$(SONAME_SWITCH)$(SHL7TARGETN:f)\" -.ENDIF .ENDIF # "$(GUI)"!="UNX" .ENDIF # "$(OS)"!="MACOSX" .ENDIF # "$(UNIXVERSIONNAMES)"!="" @@ -3978,9 +3922,7 @@ $(USE_SHL8VERSIONMAP) .PHONY: .ENDIF # "$(SHL8VERSIONMAP)"!="" -.IF "$(OS)"!="IRIX" SHL8VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL8VERSIONMAP) -.ENDIF $(USE_SHL8VERSIONMAP): \ $(SHL8OBJS)\ @@ -4017,9 +3959,7 @@ $(USE_SHL8VERSIONMAP) : #and now for the plain non-generic way... .IF "$(SHL8VERSIONMAP)"!="" USE_SHL8VERSIONMAP=$(MISC)/$(SHL8VERSIONMAP:b)_$(SHL8TARGET)$(SHL8VERSIONMAP:e) -.IF "$(OS)"!="IRIX" SHL8VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL8VERSIONMAP) -.ENDIF .IF "$(OS)"=="MACOSX" $(USE_SHL8VERSIONMAP): $(SHL8OBJS) $(SHL8LIBS) @@ -4067,11 +4007,7 @@ $(USE_SHL8VERSIONMAP): $(SHL8VERSIONMAP) .IF "$(UNIXVERSIONNAMES)"!="" .IF "$(OS)"!="MACOSX" .IF "$(GUI)"=="UNX" -.IF "$(OS)"=="IRIX" -SHL8SONAME=$(SONAME_SWITCH)$(SHL8TARGETN:f) -.ELSE SHL8SONAME=\"$(SONAME_SWITCH)$(SHL8TARGETN:f)\" -.ENDIF .ENDIF # "$(GUI)"!="UNX" .ENDIF # "$(OS)"!="MACOSX" .ENDIF # "$(UNIXVERSIONNAMES)"!="" @@ -4532,9 +4468,7 @@ $(USE_SHL9VERSIONMAP) .PHONY: .ENDIF # "$(SHL9VERSIONMAP)"!="" -.IF "$(OS)"!="IRIX" SHL9VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL9VERSIONMAP) -.ENDIF $(USE_SHL9VERSIONMAP): \ $(SHL9OBJS)\ @@ -4571,9 +4505,7 @@ $(USE_SHL9VERSIONMAP) : #and now for the plain non-generic way... .IF "$(SHL9VERSIONMAP)"!="" USE_SHL9VERSIONMAP=$(MISC)/$(SHL9VERSIONMAP:b)_$(SHL9TARGET)$(SHL9VERSIONMAP:e) -.IF "$(OS)"!="IRIX" SHL9VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL9VERSIONMAP) -.ENDIF .IF "$(OS)"=="MACOSX" $(USE_SHL9VERSIONMAP): $(SHL9OBJS) $(SHL9LIBS) @@ -4621,11 +4553,7 @@ $(USE_SHL9VERSIONMAP): $(SHL9VERSIONMAP) .IF "$(UNIXVERSIONNAMES)"!="" .IF "$(OS)"!="MACOSX" .IF "$(GUI)"=="UNX" -.IF "$(OS)"=="IRIX" -SHL9SONAME=$(SONAME_SWITCH)$(SHL9TARGETN:f) -.ELSE SHL9SONAME=\"$(SONAME_SWITCH)$(SHL9TARGETN:f)\" -.ENDIF .ENDIF # "$(GUI)"!="UNX" .ENDIF # "$(OS)"!="MACOSX" .ENDIF # "$(UNIXVERSIONNAMES)"!="" @@ -5086,9 +5014,7 @@ $(USE_SHL10VERSIONMAP) .PHONY: .ENDIF # "$(SHL10VERSIONMAP)"!="" -.IF "$(OS)"!="IRIX" SHL10VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL10VERSIONMAP) -.ENDIF $(USE_SHL10VERSIONMAP): \ $(SHL10OBJS)\ @@ -5125,9 +5051,7 @@ $(USE_SHL10VERSIONMAP) : #and now for the plain non-generic way... .IF "$(SHL10VERSIONMAP)"!="" USE_SHL10VERSIONMAP=$(MISC)/$(SHL10VERSIONMAP:b)_$(SHL10TARGET)$(SHL10VERSIONMAP:e) -.IF "$(OS)"!="IRIX" SHL10VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL10VERSIONMAP) -.ENDIF .IF "$(OS)"=="MACOSX" $(USE_SHL10VERSIONMAP): $(SHL10OBJS) $(SHL10LIBS) @@ -5175,11 +5099,7 @@ $(USE_SHL10VERSIONMAP): $(SHL10VERSIONMAP) .IF "$(UNIXVERSIONNAMES)"!="" .IF "$(OS)"!="MACOSX" .IF "$(GUI)"=="UNX" -.IF "$(OS)"=="IRIX" -SHL10SONAME=$(SONAME_SWITCH)$(SHL10TARGETN:f) -.ELSE SHL10SONAME=\"$(SONAME_SWITCH)$(SHL10TARGETN:f)\" -.ENDIF .ENDIF # "$(GUI)"!="UNX" .ENDIF # "$(OS)"!="MACOSX" .ENDIF # "$(UNIXVERSIONNAMES)"!="" diff --git a/solenv/inc/tg_shl.mk b/solenv/inc/tg_shl.mk index 496e95926981..8cb6653f334e 100644 --- a/solenv/inc/tg_shl.mk +++ b/solenv/inc/tg_shl.mk @@ -133,9 +133,7 @@ $(USE_SHL$(TNR)VERSIONMAP) .PHONY: .ENDIF # "$(SHL$(TNR)VERSIONMAP)"!="" -.IF "$(OS)"!="IRIX" SHL$(TNR)VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL$(TNR)VERSIONMAP) -.ENDIF $(USE_SHL$(TNR)VERSIONMAP): \ $(SHL$(TNR)OBJS)\ @@ -172,9 +170,7 @@ $(USE_SHL$(TNR)VERSIONMAP) : #and now for the plain non-generic way... .IF "$(SHL$(TNR)VERSIONMAP)"!="" USE_SHL$(TNR)VERSIONMAP=$(MISC)/$(SHL$(TNR)VERSIONMAP:b)_$(SHL$(TNR)TARGET)$(SHL$(TNR)VERSIONMAP:e) -.IF "$(OS)"!="IRIX" SHL$(TNR)VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL$(TNR)VERSIONMAP) -.ENDIF .IF "$(OS)"=="MACOSX" $(USE_SHL$(TNR)VERSIONMAP): $(SHL$(TNR)OBJS) $(SHL$(TNR)LIBS) @@ -222,11 +218,7 @@ $(USE_SHL$(TNR)VERSIONMAP): $(SHL$(TNR)VERSIONMAP) .IF "$(UNIXVERSIONNAMES)"!="" .IF "$(OS)"!="MACOSX" .IF "$(GUI)"=="UNX" -.IF "$(OS)"=="IRIX" -SHL$(TNR)SONAME=$(SONAME_SWITCH)$(SHL$(TNR)TARGETN:f) -.ELSE SHL$(TNR)SONAME=\"$(SONAME_SWITCH)$(SHL$(TNR)TARGETN:f)\" -.ENDIF .ENDIF # "$(GUI)"!="UNX" .ENDIF # "$(OS)"!="MACOSX" .ENDIF # "$(UNIXVERSIONNAMES)"!="" diff --git a/solenv/inc/unx.mk b/solenv/inc/unx.mk index 718e23c01b4e..3b960431e26b 100644 --- a/solenv/inc/unx.mk +++ b/solenv/inc/unx.mk @@ -151,18 +151,6 @@ .INCLUDE : unxfbsd.mk .ENDIF -.IF "$(COM)$(OS)$(CPU)" == "C730IRIXM" -.INCLUDE : unxirxm3.mk -.ENDIF - -.IF "$(COM)$(OS)$(CPU)" == "GCCIRIXM" -.INCLUDE : unxirgm.mk -.ENDIF - -.IF "$(COM)$(OS)$(CPU)" == "C710IRIXM" -.INCLUDE : unxirxm.mk -.ENDIF - .IF "$(COM)$(OS)$(CPU)" == "GCCMACOSXP" .INCLUDE : unxmacxp.mk .ENDIF diff --git a/solenv/inc/unxirgm.mk b/solenv/inc/unxirgm.mk deleted file mode 100644 index b3abfb76d2c3..000000000000 --- a/solenv/inc/unxirgm.mk +++ /dev/null @@ -1,163 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: unxirgm.mk,v $ -# -# $Revision: 1.15 $ -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - - -# Makefile for IRIX/mips using GNU compilers 2.95.2 for n32 ABI -ASM= -AFLAGS= - -SOLAR_JAVA=TRUE -JAVADEF=-DSOLAR_JAVA -#JAVAFLAGSDEBUG=-g - -.IF "$(debug)"=="" -JAVA_RUNTIME=-ljava -.ELSE -JAVA_RUNTIME=-ljava_g -.ENDIF - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*= - -CC= gcc -CXX= g++ -CFLAGS=-c -CDEFS+= -D_PTHREADS -DSTLPORT_VERSION=0x450 -D_USE_NAMESPACE=1 -DNEW_SOLAR -CFLAGSCC=$(ARCH_FLAGS) -CFLAGSCXX=$(ARCH_FLAGS) -PICSWITCH:=-fpic - -# Compiler flags for compiling static object in multi threaded environment with graphical user interface -CFLAGSOBJGUIMT= -# Compiler flags for compiling static object in multi threaded environment with character user interface -CFLAGSOBJCUIMT= -# Compiler flags for compiling shared object in multi threaded environment with graphical user interface -CFLAGSSLOGUIMT=$(PICSWITCH) -# Compiler flags for compiling shared object in multi threaded environment with character user interface -CFLAGSSLOCUIMT=$(PICSWITCH) -# Compiler flags for profiling -CFLAGSPROF= -# Compiler flags for debugging -CFLAGSDEBUG=-g -CFLAGSDBGUTIL= -# Compiler flags for enabling optimizations -CFLAGSOPT=-O2 -# Compiler flags for disabling optimizations -CFLAGSNOOPT=-O0 -# Compiler flags for describing the output path -CFLAGSOUTOBJ=-o - -CFLAGSWARNCC=-w -CFLAGSWALLCC=-Wall -CFLAGSWERRCC=-Werror - -# exception flags -CFLAGSEXCEPTIONS=-fexceptions -CFLAGS_NO_EXCEPTIONS=-fno-exceptions - -STATIC= -Wl,-Bstatic -DYNAMIC= -Wl,-Bdynamic - -# -# To use the map files, you need to have a gcc_specs file which contains: -# *linker: -# /path/to/bin/ld.sh -# where ld.sh is a wrapper script that does some conversion of the -# map files on the fly. -# -LINK= g++ -LINKFLAGS= -L/usr/lib32 -Wl,-no_unresolved -LINKVERSIONMAPFLAG= -Wl,-exports_file - -LINKFLAGSAPPGUI= $(THREADLIB) -LINKFLAGSAPPCUI= $(THREADLIB) -LINKFLAGSSHLGUI= $(THREADLIB) -LINKFLAGSSHLCUI= $(THREADLIB) - -LINKFLAGSAPPGUI+= -Wl,-multigot -LINKFLAGSAPPCUI+= -Wl,-multigot -LINKFLAGSSHLGUI+= -shared -LINKFLAGSSHLCUI+= -shared - -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG= -g -LINKFLAGSOPT= - -LINKFLAGSSHLGUI += -Wl,-Bsymbolic -LINKFLAGSSHLCUI += -Wl,-Bsymbolic - -APPLINKSTATIC=-Bstatic -APPLINKSHARED=-Bsymbolic - -SONAME_SWITCH = -Wl,-soname -Wl, - -# Sequence of libraries DOES matter! -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= -STDLIBGUIMT= $(THREADLIB) $(DYNAMIC) -lX11 -lm -lgcc -lc -STDLIBCUIMT= $(THREADLIB) $(DYNAMIC) -lgcc -lc -lm -STDSHLGUIMT= -L/usr/lib32 $(THREADLIB) $(DYNAMIC) -lX11 -lm -lgcc -lc -STDSHLCUIMT= -L/usr/lib32 $(THREADLIB) $(DYNAMIC) -lm -lgcc -lc -THREADLIB= -lpthread - -.IF "$(STLPORT_VER)" >= "500" -LIBSTLPORT=$(DYNAMIC) -lstlport -LIBSTLPORTST= -lstlport -.ELSE -LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -LIBSTLPORTST= -lstlport_gcc -.ENDIF - -LIBMGR= ar -LIBFLAGS= -r - -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC= irc -RCFLAGS= -fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -DLLPOSTFIX= im -DLLPRE= lib -DLLPOST= .so - - -LDUMP=c++filt diff --git a/solenv/inc/unxirxm.mk b/solenv/inc/unxirxm.mk deleted file mode 100644 index 80aae3d5b382..000000000000 --- a/solenv/inc/unxirxm.mk +++ /dev/null @@ -1,162 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: unxirxm.mk,v $ -# -# $Revision: 1.10 $ -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -# mak-file for IRIX/mips -ASM= -AFLAGS= - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*= - -# -# Zu den Compilerflags: -# -# -ptused : instantisiert Templates, wenn sie benutzt werden. -# Der Schalter wurde neu eingefuegt, weil sich eine -# statische Memberfunktion nicht instantisieren liess. -# (ts&sdo/10.06.98) -# -CC= cc -KPIC -c -n32 -CXX= CC -KPIC -c -n32 -ptused -OPT:Olimit=20523 -CDEFS+=-D_PTHREADS -CDEFS+= -D_STD_NO_NAMESPACE -D_VOS_NO_NAMESPACE -D_UNO_NO_NAMESPACE -# 1009 ...nested comment is not allowed... -# 1021 ...type qualifiers are meaningless in this declaration... -# 1107 ...signed bit field of length 1... -# 1110 ...statement not reached... -# 1155 ...unrecognized #pragma... -# 1171 ...expression has no effect... -# 1183 ...comparison of unsigned integer with zero... -# 1185 ...enumerated type mixed with another type... -# 1188 ...type qualifier is meaningless on cast type... -# 1233 ...explicit type is missing ("int" assumed)... -# 1234 ...access control not specified... -# 1257 ...NULL reference is not allowed... -# 1440 ...initial value of reference to non-const must be an lvalue... -# 1516 ...pointless comparison of unsigned integer with a negative constant -# 1681 ...virtual function override intended... -# 1682 ...is only partially overridden in class... -CFLAGSCC= -Xcpluscomm -woff 1009,1021,1107,1110,1155,1171,1183,1185,1188,1233,1234,1257,1440,1516,1681,1682 $(ARCH_FLAGS) -CFLAGSCXX= -woff 1009,1021,1107,1110,1155,1171,1183,1185,1188,1233,1234,1257,1440,1516,1681,1682 $(ARCH_FLAGS) -CFLAGSOBJGUIMT= -CFLAGSOBJCUIMT= -CFLAGSSLOGUIMT= -CFLAGSSLOCUIMT= -CFLAGSPROF= -CFLAGSDEBUG= -g -CFLAGSDBGUTIL= -CFLAGSOPT= -O -CFLAGSNOOPT= -CFLAGSOUTOBJ= -o - -STATIC= -B static -DYNAMIC= -B dynamic - -# -# Zu den Linkflags: -# -# -update_registry : fuer das Linken mehrerer shared Libraries -# erforderlich. -# **FUER LOKALE STAENDE FEHLT Z.ZT. EIN GULTIGER -# MECHANISMUS** -# -LINK= CC -LINKFLAGS= -LINKFLAGSAPPGUI=-n32 -multigot -LINKFLAGSSHLGUI=-B symbolic -soname $(DLLPRE)$(SHL$(TNR)TARGET)$(DLLPOSTFIX)$(DLLPOST) $(DYNAMIC) -shared -n32 -multigot -update_registry $(SOLARLIBDIR)/so_locations -LINKFLAGSAPPCUI=-n32 -multigot -LINKFLAGSSHLCUI=-B symbolic -soname $(DLLPRE)$(SHL$(TNR)TARGET)$(DLLPOSTFIX)$(DLLPOST) $(DYNAMIC) -shared -n32 -multigot -update_registry $(SOLARLIBDIR)/so_locations -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG= -LINKFLAGSOPT= -APPLINKSTATIC=-Bstatic -APPLINKSHARED=-Bsymbolic - -# Reihenfolge der Libraries NICHT egal! -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= -# STDLIBGUIMT= $(THREADLIB) $(DYNAMIC) -lX11 -lc -lm -STDLIBGUIMT= $(THREADLIB) $(DYNAMIC) -lX11 -lc -lm -STDLIBCUIMT= $(THREADLIB) $(DYNAMIC) -lc -lm -# STDSHLGUIMT= -L/usr/lib32 $(THREADLIB) $(DYNAMIC) -lX11 -lc -lm -STDSHLGUIMT= -L/usr/lib32 $(THREADLIB) $(DYNAMIC) -lX11 -lc -lm -STDSHLCUIMT= -L/usr/lib32 $(THREADLIB) $(DYNAMIC) -lc -lm -THREADLIB= -lpthread - -LIBMGR= ar -LIBFLAGS= -r -# LIBEXT= .so - -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC= irc -RCFLAGS= -fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -DLLPOSTFIX= im -.IF "$(WORK_STAMP)"=="MIX364" -DLLPOSTFIX= -.ENDIF -DLLPRE= lib -DLLPOST= .so - - -LDUMP= - - -# -------------------------- -# AUS DEM ALTEN ENVIRONMENT: -# -------------------------- -# -# Linken einer statischen Library: -# ar -r ... -# -# Linken einer shared Library: -# CC -B symbolic -soname <...> -B dynamic -shared -n32 -multigot -# -update_registry <...> ... -# -# Linken einer Applikation mit statischen Librarys: -# CC -B static ... -# -# Linken einer Applikation mit stared Librarys: -# CC -n32 -multigot ... -# - diff --git a/solenv/inc/unxirxm3.mk b/solenv/inc/unxirxm3.mk deleted file mode 100644 index 8d24d2c54032..000000000000 --- a/solenv/inc/unxirxm3.mk +++ /dev/null @@ -1,162 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: unxirxm3.mk,v $ -# -# $Revision: 1.12 $ -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# -# for a copy of the LGPLv3 License. -# -#************************************************************************* - - -# Makefile for IRIX/mips -ASM= -AFLAGS= - -SOLAR_JAVA*=TRUE -JAVADEF=-DSOLAR_JAVA -#JAVAFLAGSDEBUG=-g - -.IF "$(debug)"=="" -JAVA_RUNTIME=-ljava -.ELSE -JAVA_RUNTIME=-ljava_g -.ENDIF - -# architecture dependent flags for the C and C++ compiler that can be changed by -# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build -ARCH_FLAGS*= - -CC= cc -CXX= CC -CFLAGS= -c -CDEFS+= -DSTLPORT_VERSION=0x450 -D_USE_NAMESPACE=1 -DNEW_SOLAR -CFLAGSCC=$(ARCH_FLAGS) -CFLAGSCXX= -LANG:ansi-for-init-scope=OFF -LANG:std=ON -LANG:libc_in_namespace_std=ON $(ARCH_FLAGS) - -# Compiler flags for compiling static object in multi threaded environment with graphical user interface -CFLAGSOBJGUIMT= -# Compiler flags for compiling static object in multi threaded environment with character user interface -CFLAGSOBJCUIMT= -# Compiler flags for compiling shared object in multi threaded environment with graphical user interface -CFLAGSSLOGUIMT=-KPIC -# Compiler flags for compiling shared object in multi threaded environment with character user interface -CFLAGSSLOCUIMT=-KPIC -# Compiler flags for profiling -CFLAGSPROF= -# Compiler flags for debugging -CFLAGSDEBUG=-g -CFLAGSDBGUTIL= -# Compiler flags for enabling optimizations -CFLAGSOPT=-O2 -# Compiler flags for disabling optimizations -CFLAGSNOOPT=-O0 -# Compiler flags for describing the output path -CFLAGSOUTOBJ=-o - -CFLAGSWARNCC=-w -CFLAGSWALLCC=-fullwarn -CFLAGSWERRCC= - -# exception flags -CFLAGSEXCEPTIONS=-LANG:exceptions=ON -CFLAGS_NO_EXCEPTIONS=-LANG:exceptions=OFF -#CFLAGS_NO_EXCEPTIONS= - -STATIC= -Wl,-Bstatic -DYNAMIC= -Wl,-Bdynamic - -# -# To use the map files, you need to have a gcc_specs file which contains: -# *linker: -# /path/to/bin/ld.sh -# where ld.sh is a wrapper script that does some conversion of the -# map files on the fly. -# -LINK= CC -LINKFLAGS= -L/usr/lib32 -Wl,-no_unresolved -LINKVERSIONMAPFLAG= -Wl,-exports_file - -LINKFLAGSAPPGUI= $(THREADLIB) -LINKFLAGSAPPCUI= $(THREADLIB) -LINKFLAGSSHLGUI= $(THREADLIB) -LINKFLAGSSHLCUI= $(THREADLIB) - -LINKFLAGSAPPGUI+= -Wl,-multigot -LINKFLAGSAPPCUI+= -Wl,-multigot -LINKFLAGSSHLGUI+= -shared -LINKFLAGSSHLCUI+= -shared - -LINKFLAGSTACK= -LINKFLAGSPROF= -LINKFLAGSDEBUG= -g -LINKFLAGSOPT= - -LINKFLAGSSHLGUI += -Wl,-Bsymbolic -LINKFLAGSSHLCUI += -Wl,-Bsymbolic - -APPLINKSTATIC=-Bstatic -APPLINKSHARED=-Bsymbolic - -SONAME_SWITCH = -Wl,-soname -Wl, - -# Sequence of libraries DOES matter! -STDOBJGUI= -STDSLOGUI= -STDOBJCUI= -STDSLOCUI= -STDLIBGUIMT= $(THREADLIB) $(DYNAMIC) -lX11 -lm -lc -STDLIBCUIMT= $(THREADLIB) $(DYNAMIC) -lc -lm -STDSHLGUIMT= -L/usr/lib32 $(THREADLIB) $(DYNAMIC) -lX11 -lm -lc -STDSHLCUIMT= -L/usr/lib32 $(THREADLIB) $(DYNAMIC) -lm -lc -THREADLIB= -lpthread - -#LIBSTLPORT=$(DYNAMIC) -lstlport_mipspro -LIBSTLPORT=$(DYNAMIC) -LIBSTLPORTST= -#LIBSTLPORTST= -lstlport_mipspro - -LIBMGR= ar -LIBFLAGS= -r - -IMPLIB= -IMPLIBFLAGS= - -MAPSYM= -MAPSYMFLAGS= - -RC= irc -RCFLAGS= -fo$@ $(RCFILES) -RCLINK= -RCLINKFLAGS= -RCSETVERSION= - -DLLPOSTFIX= im -DLLPRE= lib -DLLPOST= .so - - -LDUMP=c++filt - - diff --git a/stlport/makefile.mk b/stlport/makefile.mk index ab4dfa244e72..bff4f60fd719 100644 --- a/stlport/makefile.mk +++ b/stlport/makefile.mk @@ -169,14 +169,6 @@ OUT2INC= \ stlport$/SC5$/*.SUNWCCh .ENDIF -.IF "$(OS)"=="IRIX" -TARFILE_NAME=STLport-4.5 -PATCH_FILES=STLport-4.5.patch -BUILD_ACTION=gmake -BUILD_FLAGS=-f gcc-3.0.mak -BUILD_FLAGS+= -j$(MAXPROCESS) -.ENDIF - OUTDIR2INC= \ stlport -- cgit From 560ae61a7a2299f283e8eebbae358cf67ee1f21c Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 11:04:06 +0100 Subject: sb116: #i106845# removed obsolete IRIX port --- berkeleydb/makefile.mk | 6 ------ curl/makefile.mk | 4 ---- python/makefile.mk | 4 ---- 3 files changed, 14 deletions(-) diff --git a/berkeleydb/makefile.mk b/berkeleydb/makefile.mk index 7ee3beb1b07d..beeda4d9f86f 100644 --- a/berkeleydb/makefile.mk +++ b/berkeleydb/makefile.mk @@ -112,13 +112,7 @@ CXXFLAGS+:=$(ARCH_FLAGS) BUILD_DIR=$(CONFIGURE_DIR) BUILD_DIR_OUT=$(CONFIGURE_DIR) - -.IF "$(OS)"=="IRIX" -CONFIGURE_ACTION= $(CONFIG_SHELL) ..$/dist$/configure -BUILD_ACTION=gmake -.ELSE BUILD_ACTION=make -.ENDIF OUT2LIB=$(BUILD_DIR)$/.libs$/libdb*$(DLLPOST) OUT2INC= \ diff --git a/curl/makefile.mk b/curl/makefile.mk index d3ad3ba28bae..2d26a876a556 100644 --- a/curl/makefile.mk +++ b/curl/makefile.mk @@ -74,11 +74,7 @@ CONFIGURE_ACTION=.$/configure CONFIGURE_FLAGS= --without-ssl --without-libidn --enable-ftp --enable-ipv6 --enable-http --disable-gopher --disable-file --disable-ldap --disable-telnet --disable-dict --disable-static CPPFLAGS="$(curl_CFLAGS)" LDFLAGS="$(curl_LDFLAGS)" BUILD_DIR=$(CONFIGURE_DIR)$/lib -.IF "$(OS)"=="IRIX" -BUILD_ACTION=gmake -.ELSE BUILD_ACTION=$(GNUMAKE) -.ENDIF BUILD_FLAGS+= -j$(EXTMAXPROCESS) OUT2LIB=$(BUILD_DIR)$/.libs$/libcurl$(DLLPOST).3 diff --git a/python/makefile.mk b/python/makefile.mk index 663a5604603d..bf8cb80374c5 100644 --- a/python/makefile.mk +++ b/python/makefile.mk @@ -80,11 +80,7 @@ CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) ./configure --prefix=$(MYCWD)/python-in .IF "$(OS)$(CPU)" == "SOLARISI" CONFIGURE_ACTION += --disable-ipv6 .ENDIF -.IF "$(OS)" == "IRIX" -BUILD_ACTION=$(ENV_BUILD) gmake -j$(EXTMAXPROCESS) ; gmake install -.ELSE BUILD_ACTION=$(ENV_BUILD) $(GNUMAKE) -j$(EXTMAXPROCESS) ; $(GNUMAKE) install ; chmod -R ug+w $(MYCWD)/python-inst -.ENDIF .ELSE # ---------------------------------- # WINDOWS -- cgit From 1b430ca5302c73fdf5f98b56d2c61bc11085491c Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 11:04:06 +0100 Subject: sb116: #i106845# removed obsolete IRIX port --- automation/source/testtool/objtest.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx index e068530459a8..5f1e20749a52 100644 --- a/automation/source/testtool/objtest.cxx +++ b/automation/source/testtool/objtest.cxx @@ -495,8 +495,6 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die d abGP.Append( "04" ); #elif defined SOLARIS && defined INTEL abGP.Append( "05" ); // Solaris x86 -#elif defined IRIX - abGP.Append( "06" ); #elif defined HPUX abGP.Append( "07" ); #elif defined FREEBSD -- cgit From 5847cb59f3e70fa0cc800ce2f5e5eb7ded7b671c Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 11:04:06 +0100 Subject: sb116: #i106845# removed obsolete IRIX port --- sw/source/ui/chrdlg/ccoll.cxx | 8 -------- sw/util/makefile.mk | 4 ---- 2 files changed, 12 deletions(-) diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx index 25276c2cc4bc..e0e4826a93d4 100644 --- a/sw/source/ui/chrdlg/ccoll.cxx +++ b/sw/source/ui/chrdlg/ccoll.cxx @@ -209,11 +209,7 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const const String& SwCondCollItem::GetStyle(USHORT nPos) const { -#ifndef IRIX return nPos < COND_COMMAND_COUNT ? sStyles[nPos] : aEmptyStr; -#else - return nPos < COND_COMMAND_COUNT ? (String)sStyles[nPos] : aEmptyStr; -#endif } /**************************************************************************** @@ -224,11 +220,7 @@ const String& SwCondCollItem::GetStyle(USHORT nPos) const void SwCondCollItem::SetStyle(const String* pStyle, USHORT nPos) { if( nPos < COND_COMMAND_COUNT ) -#ifndef IRIX sStyles[nPos] = pStyle ? *pStyle : aEmptyStr; -#else - sStyles[nPos] = pStyle ? (String)*pStyle : aEmptyStr; -#endif } diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk index 4b3abf042b8e..ca81fa868510 100644 --- a/sw/util/makefile.mk +++ b/sw/util/makefile.mk @@ -43,10 +43,6 @@ USE_DEFFILE=TRUE # --- Allgemein ----------------------------------------------------------- -.IF "$(OS)"=="IRIX" -LINKFLAGS+=-Wl,-LD_LAYOUT:lgot_buffer=40 -.ENDIF - sw_res_files= \ $(SRS)$/app.srs \ $(SRS)$/dialog.srs \ -- cgit From a5236e957e05b1f573a00f3535b1204057b3170a Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 11:04:06 +0100 Subject: sb116: #i106845# removed obsolete IRIX port --- testautomation/global/system/includes/sysinfo.inc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/testautomation/global/system/includes/sysinfo.inc b/testautomation/global/system/includes/sysinfo.inc index eb5e91c9a459..761c8d397924 100755 --- a/testautomation/global/system/includes/sysinfo.inc +++ b/testautomation/global/system/includes/sysinfo.inc @@ -67,7 +67,6 @@ Global Const SYS_OSX = 12 Global Const SYS_PPC = 13 Global Const SYS_SCO = 14 Global Const SYS_AIX = 15 -Global Const SYS_IRI = 16 Global Const SYS_HP = 17 Global Const SYS_FBSD = 18 Global Const SYS_NBSD = 19 @@ -97,7 +96,6 @@ sub PlatFormInit '///+Linux PPCppcunx '///+SCO UNIXscounx '///+AIXaixunx -'///+Irixiriunx '///+HP UNIXhpunx '///+FreeBSDfbsdunx '///+NetBSDnbsdunx @@ -120,7 +118,6 @@ sub PlatFormInit PlatformName(SYS_PPC) = "Linux PPC" : PlatformExt(SYS_PPC) = "ppc" PlatFormName(SYS_SCO) = "SCO Unix" : PlatFormExt(SYS_SCO) = "sco" PlatFormName(SYS_AIX) = "AIX" : PlatFormExt(SYS_AIX) = "aix" - PlatFormName(SYS_IRI) = "IRIX" : PlatFormExt(SYS_IRI) = "iri" PlatFormName(SYS_HP) = "HP UNIX" : PlatFormExt(SYS_Hp) = "hp" PlatFormName(SYS_FBSD) = "FreeBSD" : PlatFormExt(SYS_FBSD) = "fbsd" PlatFormName(SYS_NBSD) = "NetBSD" : PlatFormExt(SYS_NBSD) = "nbsd" @@ -143,7 +140,6 @@ sub PlatFormInit PlatFormGroup(SYS_PPC) = "unx" PlatFormGroup(SYS_SCO) = "unx" PlatFormGroup(SYS_AIX) = "unx" - PlatFormGroup(SYS_IRI) = "unx" PlatFormGroup(SYS_HP) = "unx" PlatFormGroup(SYS_FBSD) = "unx" PlatFormGroup(SYS_NBSD) = "unx" @@ -221,7 +217,6 @@ sub GetToolPlatform '///+Linux PPC13 '///+SCO UNIX02 '///+AIX04 -'///+Irix06 '///+HP UNIX07 '///+FreeBSD08 '///+NetBSD14 @@ -254,7 +249,7 @@ sub GetToolPlatform qaErrorLog("The GUI-entry in '" + gTesttoolIni + "' is missing!"+Chr(13)+"Please insert the correct number for your operating system! In Section [GUI Platform], entry Current= "+Chr(13)+"Win95....: 100"+Chr(13)+"Win98....: 395"+Chr(13)+"WinNT....: 351 or 400"+Chr(13)+"WinSE....: 410"+Chr(13)+"WinME....: 490"+Chr(13)+"Win2000..: 500"+Chr(13)+"WinXP....: 501") else iGuiVersion = 01 - QAErrorLog("The GUI value in '" + gTesttoolIni + "' is missing!"+Chr(13)+"Please insert the correct number for your operating system! In Section [GUI Platform], entry Current= "+Chr(13)+"Solaris SPARC.: 01"+Chr(13)+"SCO UNIX......: 02"+Chr(13)+"Linux.........: 03"+Chr(13)+"AIX...........: 04"+Chr(13)+"Solaris x86...: 05"+Chr(13)+"Irix..........: 06"+Chr(13)+"HP-UX.........: 07"+Chr(13)+"FreeBSD........: 08"+Chr(13)+"Mac OS X......: 12"+Chr(13)+"Linux PPC.....: 13"+Chr(13)+"NetBSD.....: 14"+Chr(13)+"Linux 64 bit.....: 15"+Chr(13)+"Linux SPARC.....: 16") + QAErrorLog("The GUI value in '" + gTesttoolIni + "' is missing!"+Chr(13)+"Please insert the correct number for your operating system! In Section [GUI Platform], entry Current= "+Chr(13)+"Solaris SPARC.: 01"+Chr(13)+"SCO UNIX......: 02"+Chr(13)+"Linux.........: 03"+Chr(13)+"AIX...........: 04"+Chr(13)+"Solaris x86...: 05"+Chr(13)+"HP-UX.........: 07"+Chr(13)+"FreeBSD........: 08"+Chr(13)+"Mac OS X......: 12"+Chr(13)+"Linux PPC.....: 13"+Chr(13)+"NetBSD.....: 14"+Chr(13)+"Linux 64 bit.....: 15"+Chr(13)+"Linux SPARC.....: 16") end if end if '///Get the variable gSamePC @@ -302,7 +297,6 @@ sub GetToolPlatform case 03 : gSystemnummer = SYS_LIN case 04 : gSystemnummer = SYS_AIX case 05 : gSystemnummer = SYS_X86 - case 06 : gSystemnummer = SYS_IRI case 07 : gSystemnummer = SYS_HP case 08 : gSystemnummer = SYS_FBSD case 12 : gSystemnummer = SYS_OSX @@ -345,7 +339,6 @@ sub GetOfficePlatform '///+Linux PPCPPC '///+SCO UNIXSCO '///+AIXAIX -'///+IrixIRI '///+HP UNIXHP '///+FreeBSDFBSD '///+NetBSDNBSD @@ -374,7 +367,6 @@ sub GetOfficePlatform case "PPC" : GUI = 13 case "SCO" : GUI = 14 case "AIX" : GUI = 15 - case "IRI" : GUI = 16 case "HP" : GUI = 17 case "FBSD" : GUI = 18 case "NBSD" : GUI = 19 -- cgit -- cgit From 003e500ae984553d7f47008ad15d0974aae9b8bf Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 11:04:06 +0100 Subject: sb116: #i106845# removed obsolete IRIX port --- sc/source/ui/view/output3.cxx | 4 ---- sc/util/makefile.mk | 4 ---- 2 files changed, 8 deletions(-) diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx index 648573bbb21c..c4c51fb3f02a 100644 --- a/sc/source/ui/view/output3.cxx +++ b/sc/source/ui/view/output3.cxx @@ -50,10 +50,6 @@ #include "tabvwsh.hxx" #include "fillinfo.hxx" - -#ifdef IRIX -#include -#endif #include // STATIC DATA ----------------------------------------------------------- diff --git a/sc/util/makefile.mk b/sc/util/makefile.mk index c06071ff6324..91e4fff6a6ee 100644 --- a/sc/util/makefile.mk +++ b/sc/util/makefile.mk @@ -41,10 +41,6 @@ USE_DEFFILE=TRUE .INCLUDE : settings.mk -.IF "$(OS)"=="IRIX" -LINKFLAGS+=-Wl,-LD_LAYOUT:lgot_buffer=30 -.ENDIF - # --- Resourcen ---------------------------------------------------- RESLIB1LIST=\ -- cgit From fe537060e40a6d0c5411a800fd5c518d04a6209c Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 11:04:06 +0100 Subject: sb116: #i106845# removed obsolete IRIX port --- goodies/source/filter.vcl/ios2met/ios2met.cxx | 2 +- rsc/source/parser/rsclex.cxx | 2 +- rsc/source/parser/rsclex.hxx | 2 +- rsc/source/rsc/makefile.mk | 4 ---- svtools/inc/svtools/svarray.hxx | 2 +- tools/inc/tools/inetdef.hxx | 2 -- tools/inc/tools/solar.h | 2 -- tools/source/fsys/unx.cxx | 2 +- vcl/source/glyphs/glyphcache.cxx | 2 -- vcl/unx/inc/salunx.h | 6 ------ vcl/unx/source/app/i18n_ic.cxx | 4 ++-- vcl/unx/source/app/i18n_im.cxx | 2 +- vcl/unx/source/app/saldisp.cxx | 7 ++----- vcl/unx/source/app/saltimer.cxx | 3 --- vcl/unx/source/printer/printerinfomanager.cxx | 2 +- 15 files changed, 11 insertions(+), 33 deletions(-) diff --git a/goodies/source/filter.vcl/ios2met/ios2met.cxx b/goodies/source/filter.vcl/ios2met/ios2met.cxx index 0fbf24f56029..8c3c19e22379 100644 --- a/goodies/source/filter.vcl/ios2met/ios2met.cxx +++ b/goodies/source/filter.vcl/ios2met/ios2met.cxx @@ -846,7 +846,7 @@ void OS2METReader::ReadRelLine(BOOL bGivenPos, USHORT nOrderLen) if (nPolySize==0) return; Polygon aPolygon(nPolySize); for (i=0; i> nunsignedbyte; aP0.X()+=(INT8)nunsignedbyte; *pOS2MET >> nunsignedbyte; aP0.Y()+=(INT8)nunsignedbyte; diff --git a/rsc/source/parser/rsclex.cxx b/rsc/source/parser/rsclex.cxx index 3c2c95e541d1..8c34637fa304 100644 --- a/rsc/source/parser/rsclex.cxx +++ b/rsc/source/parser/rsclex.cxx @@ -317,7 +317,7 @@ int yylex() /****************** yyerror **********************************************/ #ifdef RS6000 extern "C" void yyerror( char* pMessage ) -#elif defined HP9000 || defined SCO || defined IRIX || defined SOLARIS +#elif defined HP9000 || defined SCO || defined SOLARIS extern "C" void yyerror( const char* pMessage ) #else void yyerror( char* pMessage ) diff --git a/rsc/source/parser/rsclex.hxx b/rsc/source/parser/rsclex.hxx index 89feed4dd132..63afd0b208c7 100644 --- a/rsc/source/parser/rsclex.hxx +++ b/rsc/source/parser/rsclex.hxx @@ -107,7 +107,7 @@ class ObjectStack { extern "C" int yyparse(); // forward Deklaration fuer erzeugte Funktion extern "C" void yyerror( char * ); extern "C" int yylex( void ); -#elif defined( HP9000 ) || defined( SCO ) || defined ( IRIX ) || defined ( SOLARIS ) +#elif defined( HP9000 ) || defined( SCO ) || defined ( SOLARIS ) extern "C" int yyparse(); // forward Deklaration fuer erzeugte Funktion extern "C" void yyerror( const char * ); extern "C" int yylex( void ); diff --git a/rsc/source/rsc/makefile.mk b/rsc/source/rsc/makefile.mk index 40e2d77740a3..89abd22207d9 100644 --- a/rsc/source/rsc/makefile.mk +++ b/rsc/source/rsc/makefile.mk @@ -40,10 +40,6 @@ ENABLE_EXCEPTIONS=true .INCLUDE : settings.mk -.IF "$(OS)"=="IRIX" -NOOPTFILES= $(OBJ)$/rsc.obj -.ENDIF - OBJFILES= $(OBJ)$/rsc.obj .INCLUDE : target.mk diff --git a/svtools/inc/svtools/svarray.hxx b/svtools/inc/svtools/svarray.hxx index 3ab3676fa5e0..1518c20f5084 100644 --- a/svtools/inc/svtools/svarray.hxx +++ b/svtools/inc/svtools/svarray.hxx @@ -1034,7 +1034,7 @@ public:\ #define C40_PTR_REPLACE( c, p) Replace( (c const *) p ) #define C40_GETPOS( c, r) GetPos( (c const *)r ) #else -#if defined WTC || defined IRIX || defined ICC || defined HPUX || (defined GCC && __GNUC__ >= 3) || (defined(WNT) && _MSC_VER >= 1400) +#if defined WTC || defined ICC || defined HPUX || (defined GCC && __GNUC__ >= 3) || (defined(WNT) && _MSC_VER >= 1400) #define C40_INSERT( c, p, n ) Insert( (c const *&) p, n ) #define C40_PUSH( c, p) Push( (c const *&) p ) #define C40_PTR_INSERT( c, p ) Insert( (c const *&) p ) diff --git a/tools/inc/tools/inetdef.hxx b/tools/inc/tools/inetdef.hxx index 38cd8935e06b..d9861f64961d 100644 --- a/tools/inc/tools/inetdef.hxx +++ b/tools/inc/tools/inetdef.hxx @@ -61,8 +61,6 @@ #define TOOLS_INETDEF_OS "FreeBSD/amd64" #elif defined SINIX #define TOOLS_INETDEF_OS "SINIX" -#elif defined IRIX -#define TOOLS_INETDEF_OS "IRIX" #else // AIX, HPUX, SOLARIS, ... #define TOOLS_INETDEF_OS "Unix" #endif // AIX, HPUX, SOLARIS, ... diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h index 46fe42b9c36f..4fe00adc9da0 100644 --- a/tools/inc/tools/solar.h +++ b/tools/inc/tools/solar.h @@ -391,8 +391,6 @@ template inline T Abs(T a) { return (a>=0?a:-a); } #define __DLLEXTENSION "fi.so" #elif defined FREEBSD && defined X86_64 #define __DLLEXTENSION "fx.so" -#elif defined IRIX - #define __DLLEXTENSION "im.so" #elif defined MACOSX && defined POWERPC #define __DLLEXTENSION "mxp.dylib" #elif defined MACOSX && defined X86 diff --git a/tools/source/fsys/unx.cxx b/tools/source/fsys/unx.cxx index 76910683df13..4a2e3c6ad76a 100644 --- a/tools/source/fsys/unx.cxx +++ b/tools/source/fsys/unx.cxx @@ -36,7 +36,7 @@ #include #include #include -#if defined HPUX || defined LINUX || defined IRIX +#if defined HPUX || defined LINUX #include #define mnttab mntent #elif defined SCO diff --git a/vcl/source/glyphs/glyphcache.cxx b/vcl/source/glyphs/glyphcache.cxx index e3e840e40730..17e70c539254 100644 --- a/vcl/source/glyphs/glyphcache.cxx +++ b/vcl/source/glyphs/glyphcache.cxx @@ -79,9 +79,7 @@ GlyphCache::~GlyphCache() // ----------------------------------------------------------------------- -#ifndef IRIX inline -#endif size_t GlyphCache::IFSD_Hash::operator()( const ImplFontSelectData& rFontSelData ) const { // TODO: is it worth to improve this hash function? diff --git a/vcl/unx/inc/salunx.h b/vcl/unx/inc/salunx.h index cdf45fd30867..c1fee6c68d94 100644 --- a/vcl/unx/inc/salunx.h +++ b/vcl/unx/inc/salunx.h @@ -38,12 +38,6 @@ #include #include #include -#elif defined IRIX -#ifdef __cplusplus -#include -#endif -#include -#include #endif #include #include diff --git a/vcl/unx/source/app/i18n_ic.cxx b/vcl/unx/source/app/i18n_ic.cxx index cacffbcfdbb1..bb8f86d93e01 100644 --- a/vcl/unx/source/app/i18n_ic.cxx +++ b/vcl/unx/source/app/i18n_ic.cxx @@ -340,7 +340,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) : if ( mnPreeditStyle != XIMPreeditNone ) { -#if defined LINUX || defined FREEBSD || defined NETBSD || defined IRIX +#if defined LINUX || defined FREEBSD || defined NETBSD if ( mpPreeditAttributes != NULL ) #endif mpAttributes = XVaAddToNestedList( mpAttributes, @@ -348,7 +348,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) : } if ( mnStatusStyle != XIMStatusNone ) { -#if defined LINUX || defined FREEBSD || defined NETBSD || defined IRIX +#if defined LINUX || defined FREEBSD || defined NETBSD if ( mpStatusAttributes != NULL ) #endif mpAttributes = XVaAddToNestedList( mpAttributes, diff --git a/vcl/unx/source/app/i18n_im.cxx b/vcl/unx/source/app/i18n_im.cxx index ae472d6323f4..0a48c054167f 100644 --- a/vcl/unx/source/app/i18n_im.cxx +++ b/vcl/unx/source/app/i18n_im.cxx @@ -59,7 +59,7 @@ using namespace vcl; #include "i18n_cb.hxx" -#if defined(SOLARIS) || defined(LINUX) || defined(IRIX) +#if defined(SOLARIS) || defined(LINUX) extern "C" char * XSetIMValues(XIM im, ...); #endif diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx index 07955d426b8c..cfd568ac9b6c 100644 --- a/vcl/unx/source/app/saldisp.cxx +++ b/vcl/unx/source/app/saldisp.cxx @@ -38,16 +38,13 @@ #include #include #include -#if defined(IRIX) -#include -#endif #include #include #include #include #include -#if defined(SOLARIS) || defined(IRIX) +#if defined(SOLARIS) #include #include #endif @@ -898,7 +895,7 @@ void SalDisplay::Init() sscanf( pProperties, "%li", &nProperties_ ); else { -#if defined DBG_UTIL || defined SUN || defined LINUX || defined FREEBSD || defined IRIX +#if defined DBG_UTIL || defined SUN || defined LINUX || defined FREEBSD nProperties_ |= PROPERTY_FEATURE_Maximize; #endif // Server Bugs & Properties diff --git a/vcl/unx/source/app/saltimer.cxx b/vcl/unx/source/app/saltimer.cxx index bf8aa202b066..afcecc0d0667 100644 --- a/vcl/unx/source/app/saltimer.cxx +++ b/vcl/unx/source/app/saltimer.cxx @@ -32,9 +32,6 @@ #include "precompiled_vcl.hxx" #include -#if defined(IRIX) -#include -#endif #include #include #include diff --git a/vcl/unx/source/printer/printerinfomanager.cxx b/vcl/unx/source/printer/printerinfomanager.cxx index b3e5b4667a6a..53cd662db8e0 100644 --- a/vcl/unx/source/printer/printerinfomanager.cxx +++ b/vcl/unx/source/printer/printerinfomanager.cxx @@ -441,7 +441,7 @@ void PrinterInfoManager::initialize() * porters: please append your platform to the Solaris * case if your platform has SystemV printing per default. */ - #if defined SOLARIS || defined(IRIX) + #if defined SOLARIS aValue = "lp"; #else aValue = "lpr"; -- cgit From 0888c59dfb1075b87712e617854104a8aa9c88d9 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 11:04:06 +0100 Subject: sb116: #i106845# removed obsolete IRIX port --- external/gcc3_specific/makefile.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/external/gcc3_specific/makefile.mk b/external/gcc3_specific/makefile.mk index fa409df5a707..4ad02335c8ea 100644 --- a/external/gcc3_specific/makefile.mk +++ b/external/gcc3_specific/makefile.mk @@ -43,7 +43,6 @@ $(MINGWGXXDLL) : .IF "$(SYSTEM_STDLIBS)" != "YES" && "$(COMID)"=="gcc3" .IF "$(OS)"!="MACOSX" -.IF "$(OS)"!="IRIX" .IF "$(OS)"!="FREEBSD" .EXPORT : CC @@ -59,7 +58,6 @@ $(LB)$/libgcc_s.so.1 : .ENDIF .ENDIF -.ENDIF .ENDIF -- cgit From cd65799aee7f9518572c9ab556e3f55cf449c87f Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 11:04:06 +0100 Subject: sb116: #i106845# removed obsolete IRIX port --- sd/source/helper/simplereferencecomponent.cxx | 2 +- sd/source/ui/func/fubullet.cxx | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/sd/source/helper/simplereferencecomponent.cxx b/sd/source/helper/simplereferencecomponent.cxx index 25776e3c420d..2f8bf68dbdf9 100644 --- a/sd/source/helper/simplereferencecomponent.cxx +++ b/sd/source/helper/simplereferencecomponent.cxx @@ -135,7 +135,7 @@ void SimpleReferenceComponent::operator delete(void * pPtr, ) SAL_THROW(()) { -#if defined WNT || (defined IRIX && !defined GCC) +#if defined WNT ::operator delete(pPtr); // WNT lacks a global nothrow operator delete... #else // WNT ::operator delete(pPtr, rNothrow); diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index 64fb3783d78d..a36b7eccbf38 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -52,9 +52,6 @@ #include #include -#ifdef IRIX -#include -#endif #include #include #include "drawview.hxx" -- cgit From b1c385870a7d7c6a2c57b9d5ee9ef31203c2df0b Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 11:04:06 +0100 Subject: sb116: #i106845# removed obsolete IRIX port --- autodoc/source/parser/cpp/c_rcode.cxx | 21 --------------------- odk/source/unowinreg/win/makefile.mk | 2 -- odk/util/makefile.pmk | 6 ------ 3 files changed, 29 deletions(-) diff --git a/autodoc/source/parser/cpp/c_rcode.cxx b/autodoc/source/parser/cpp/c_rcode.cxx index e8f688168d3f..dd62dbbae2e5 100644 --- a/autodoc/source/parser/cpp/c_rcode.cxx +++ b/autodoc/source/parser/cpp/c_rcode.cxx @@ -42,27 +42,6 @@ #include #include "pe_file.hxx" -#ifdef IRIX -// see i19418 incomplete type for cpp::PE_Namespace -#include "pe_namsp.hxx" -#include "pe_ignor.hxx" -#include "pe_defs.hxx" -#include "pe_vafu.hxx" -#include "pe_tydef.hxx" -#include "pe_tpltp.hxx" -#include "pe_type.hxx" -#include "pe_vari.hxx" -#include "pe_funct.hxx" -#include "pe_enum.hxx" -#include "pe_param.hxx" -#include "pe_class.hxx" -#include "pe_expression.hxx" -#include "pe_base.hxx" -#include "pe_enum.hxx" -#include "pe_enval.hxx" -#endif - - const uintt C_nNO_TRY = uintt(-1); diff --git a/odk/source/unowinreg/win/makefile.mk b/odk/source/unowinreg/win/makefile.mk index 7c826ddb265c..2990c3b8d092 100644 --- a/odk/source/unowinreg/win/makefile.mk +++ b/odk/source/unowinreg/win/makefile.mk @@ -55,8 +55,6 @@ JAVA_INCLUDES+= -I$(JAVA_HOME)/include/bsd JAVA_INCLUDES+= -I$(JAVA_HOME)/include/linux .ELIF "$(OS)" == "NETBSD" JAVA_INCLUDES+= -I$(JAVA_HOME)/include/netbsd -.ELIF "$(OS)" == "IRIX" -JAVA_INCLUDES+= -I$(JAVA_HOME)/include/solaris .ENDIF .ENDIF diff --git a/odk/util/makefile.pmk b/odk/util/makefile.pmk index 57604f81b05c..33ff68c90ab1 100644 --- a/odk/util/makefile.pmk +++ b/odk/util/makefile.pmk @@ -162,12 +162,6 @@ DESTPLATFROM=netbsd ########### DESTPLATFROM=freebsd -.ELIF "$(OS)"=="IRIX" -########### -# IRIX -########### -DESTPLATFROM=irix - .ELIF "$(OS)"=="MACOSX" ########### # MACOSX -- cgit From 8de0cce3e09f0b2fc7b5c46b10fa1acd9d9446b5 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 13:48:31 +0100 Subject: sb116: #i105816# updated pagein lists (patch by cmc) --- desktop/source/pagein/makefile.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/desktop/source/pagein/makefile.mk b/desktop/source/pagein/makefile.mk index 85cbb4d3c9fd..626412877250 100644 --- a/desktop/source/pagein/makefile.mk +++ b/desktop/source/pagein/makefile.mk @@ -81,21 +81,25 @@ $(MISC)$/$(TARGET)-calc : makefile.mk @echo Making: $@ @-echo $(DLLPRE)sc$(DFTDLLPOST) > $@ @-echo $(DLLPRE)svx$(DFTDLLPOST) >> $@ + @-echo $(DLLPRE)svxcore$(DFTDLLPOST) >> $@ $(MISC)$/$(TARGET)-draw : makefile.mk @echo Making: $@ @-echo $(DLLPRE)sd$(DFTDLLPOST) > $@ @-echo $(DLLPRE)svx$(DFTDLLPOST) >> $@ + @-echo $(DLLPRE)svxcore$(DFTDLLPOST) >> $@ $(MISC)$/$(TARGET)-impress : makefile.mk @echo Making: $@ @-echo $(DLLPRE)sd$(DFTDLLPOST) > $@ @-echo $(DLLPRE)svx$(DFTDLLPOST) >> $@ + @-echo $(DLLPRE)svxcore$(DFTDLLPOST) >> $@ $(MISC)$/$(TARGET)-writer : makefile.mk @echo Making: $@ @-echo $(DLLPRE)sw$(DFTDLLPOST) > $@ @-echo $(DLLPRE)svx$(DFTDLLPOST) >> $@ + @-echo $(DLLPRE)svxcore$(DFTDLLPOST) >> $@ # sorted in approx. reverse load order (ld.so.1) $(MISC)$/$(TARGET)-common : makefile.mk @@ -121,7 +125,7 @@ $(MISC)$/$(TARGET)-common : makefile.mk @-echo $(DLLPRE)ucb1$(DLLPOST) >> $@ @-echo configmgr2$(UNODLLPOST) >> $@ # - @-echo $(DLLPRE)dtransX11$(DFTDLLPOST) >> $@ + @-echo $(DLLPRE)dtrans$(DLLPOST) >> $@ @-echo $(DLLPRE)vclplug_gen$(DFTDLLPOST) >> $@ .IF "$(ENABLE_GTK)" != "" @-echo $(DLLPRE)vclplug_gtk$(DFTDLLPOST) >> $@ @@ -130,7 +134,6 @@ $(MISC)$/$(TARGET)-common : makefile.mk @-echo $(DLLPRE)vclplug_kde$(DFTDLLPOST) >> $@ .ENDIF # ENABLE_KDE # - @-echo $(DLLPRE)psp$(DFTDLLPOST) >> $@ @-echo $(DLLPRE)basegfx$(DFTDLLPOST) >> $@ @-echo $(DLLPRE)sot$(DFTDLLPOST) >> $@ @-echo $(DLLPRE)xcr$(DFTDLLPOST) >> $@ -- cgit From 661efe7a78a3c741dde3204481b707d353609b55 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 14:45:27 +0100 Subject: sb116: #i106891# evaluate conditional expression in soffice script at build time (based on a patch by mmeeks) --- desktop/prj/d.lst | 2 +- desktop/scripts/makefile.mk | 11 +++++++++++ desktop/scripts/soffice.sh | 7 ++----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/desktop/prj/d.lst b/desktop/prj/d.lst index fe688e2c4b44..5ec84bca7d37 100644 --- a/desktop/prj/d.lst +++ b/desktop/prj/d.lst @@ -93,7 +93,7 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms ..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res -..\%__SRC%\misc\soffice.sh %_DEST%\bin%_EXT%\soffice +..\%__SRC%\misc\soffice.sh-expanded %_DEST%\bin%_EXT%\soffice ..\%__SRC%\misc\sbase.sh %_DEST%\bin%_EXT%\sbase ..\%__SRC%\misc\scalc.sh %_DEST%\bin%_EXT%\scalc ..\%__SRC%\misc\sdraw.sh %_DEST%\bin%_EXT%\sdraw diff --git a/desktop/scripts/makefile.mk b/desktop/scripts/makefile.mk index 52750ca0b44f..001ead351928 100644 --- a/desktop/scripts/makefile.mk +++ b/desktop/scripts/makefile.mk @@ -54,7 +54,18 @@ UNIXTEXT= \ $(MISC)$/unopkg.sh .IF "$(OS)" != "MACOSX" + +ALLTAR: $(MISC)$/soffice.sh-expanded + +$(MISC)/soffice.sh-expanded: $(MISC)/soffice.sh +.IF "$(OS)" == "LINUX" && "$(CPUNAME)" == "POWERPC" + $(SED) 's/^#@# //' $< > $@ +.ELSE + $(COPY) $< $@ +.ENDIF + UNIXTEXT+= $(MISC)$/soffice.sh + .ENDIF .INCLUDE : target.mk diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh index 7aaa95bd3ffe..0690e9647f35 100644 --- a/desktop/scripts/soffice.sh +++ b/desktop/scripts/soffice.sh @@ -43,11 +43,8 @@ export SAL_ENABLE_FILE_LOCKING # working on your system. # SAL_NOOPENGL=true; export SAL_NOOPENGL -# the following test is needed on Linux PPC with IBM j2sdk142 -if [ "`uname -s`" = "Linux" -a "`uname -m`" = "ppc" ] ; then - JITC_PROCESSOR_TYPE=6 - export JITC_PROCESSOR_TYPE -fi +# The following is needed on Linux PPC with IBM j2sdk142: +#@# export JITC_PROCESSOR_TYPE=6 # resolve installation directory sd_cwd="`pwd`" -- cgit From 1d11db194dd5d81983f934ac93a214bf38af58ae Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 17 Nov 2009 13:39:34 +0100 Subject: #i106541# Metafile decompose done --- .../inc/drawinglayer/attribute/fontattribute.hxx | 13 + .../primitive2d/backgroundcolorprimitive2d.hxx | 2 +- .../primitive2d/drawinglayer_primitivetypes2d.hxx | 1 + .../drawinglayer/primitive2d/epsprimitive2d.hxx | 96 +++ .../primitive2d/textdecoratedprimitive2d.hxx | 18 +- .../primitive2d/textenumsprimitive2d.hxx | 47 +- .../primitive2d/textstrikeoutprimitive2d.hxx | 6 +- .../drawinglayer/processor2d/vclprocessor2d.hxx | 2 + drawinglayer/source/primitive2d/epsprimitive2d.cxx | 111 +++ .../source/primitive2d/graphicprimitive2d.cxx | 28 + drawinglayer/source/primitive2d/makefile.mk | 2 + .../source/primitive2d/metafileprimitive2d.cxx | 832 ++++++++++++++++----- .../primitive2d/textdecoratedprimitive2d.cxx | 54 +- .../source/primitive2d/textenumsprimitive2d.cxx | 129 ++++ .../primitive2d/textstrikeoutprimitive2d.cxx | 18 +- .../source/processor2d/vclmetafileprocessor2d.cxx | 6 + .../source/processor2d/vclpixelprocessor2d.cxx | 7 + drawinglayer/source/processor2d/vclprocessor2d.cxx | 101 ++- svx/source/svdraw/svdotextdecomposition.cxx | 70 +- 19 files changed, 1194 insertions(+), 349 deletions(-) create mode 100644 drawinglayer/inc/drawinglayer/primitive2d/epsprimitive2d.hxx create mode 100644 drawinglayer/source/primitive2d/epsprimitive2d.cxx create mode 100644 drawinglayer/source/primitive2d/textenumsprimitive2d.cxx diff --git a/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx index f34ee913418f..d8eed659f5e7 100644 --- a/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx +++ b/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx @@ -92,6 +92,19 @@ namespace drawinglayer { } + FontAttribute() + : maFamilyName(), + maStyleName(), + mnWeight(0), + mbSymbol(false), + mbVertical(false), + mbItalic(false), + mbOutline(false), + mbRTL(false), + mbBiDiStrong(false) + { + } + /// compare operator bool operator==(const FontAttribute& rCompare) const; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx index 82a568fc9ea1..85cf5e236d4f 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive2d { - /** AnimatedInterpolatePrimitive2D class + /** BackgroundColorPrimitive2D class This primitive is defined to fill the whole visible Viewport with the given color (and thus decomposes to a filled polygon). This diff --git a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx index 477c3a19042a..d287482389b5 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx @@ -108,6 +108,7 @@ #define PRIMITIVE2D_ID_TEXTLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 57) #define PRIMITIVE2D_ID_TEXTCHARACTERSTRIKEOUTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 58) #define PRIMITIVE2D_ID_TEXTGEOMETRYSTRIKEOUTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 59) +#define PRIMITIVE2D_ID_EPSPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 60) ////////////////////////////////////////////////////////////////////////////// diff --git a/drawinglayer/inc/drawinglayer/primitive2d/epsprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/epsprimitive2d.hxx new file mode 100644 index 000000000000..0ebb29e153ec --- /dev/null +++ b/drawinglayer/inc/drawinglayer/primitive2d/epsprimitive2d.hxx @@ -0,0 +1,96 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: backgroundcolorprimitive2d.hxx,v $ + * + * $Revision: 1.3 $ + * + * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_EPSPRIMITIVE2D_HXX +#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_EPSPRIMITIVE2D_HXX + +#include +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + /** EpsPrimitive2D class */ + class EpsPrimitive2D : public BufferedDecompositionPrimitive2D + { + private: + /// the geometry definition + basegfx::B2DHomMatrix maEpsTransform; + + /// the Eps content definition + GfxLink maGfxLink; + + /// the replacement content definition + GDIMetaFile maMetaFile; + + protected: + /// create local decomposition + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + + public: + /// constructor + EpsPrimitive2D( + const basegfx::B2DHomMatrix& rEpsTransform, + const GfxLink& rGfxLink, + const GDIMetaFile& rMetaFile); + + /// data read access + const basegfx::B2DHomMatrix& getEpsTransform() const { return maEpsTransform; } + const GfxLink& getGfxLink() const { return maGfxLink; } + const GDIMetaFile& getMetaFile() const { return maMetaFile; } + + /// compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + /// get B2Drange + virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; + + /// provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_EPSPRIMITIVE2D_HXX + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx index 6c7ea8bd24c5..fe41c2e1824a 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx @@ -71,9 +71,9 @@ namespace drawinglayer basegfx::BColor maTextlineColor; TextLine meFontOverline; TextLine meFontUnderline; - FontStrikeout meFontStrikeout; - FontEmphasisMark meFontEmphasisMark; - FontRelief meFontRelief; + TextStrikeout meTextStrikeout; + TextEmphasisMark meTextEmphasisMark; + TextRelief meTextRelief; /// bitfield unsigned mbUnderlineAbove : 1; @@ -123,20 +123,20 @@ namespace drawinglayer TextLine eFontOverline = TEXT_LINE_NONE, TextLine eFontUnderline = TEXT_LINE_NONE, bool bUnderlineAbove = false, - FontStrikeout eFontStrikeout = FONT_STRIKEOUT_NONE, + TextStrikeout eTextStrikeout = TEXT_STRIKEOUT_NONE, bool bWordLineMode = false, - FontEmphasisMark eFontEmphasisMark = FONT_EMPHASISMARK_NONE, + TextEmphasisMark eTextEmphasisMark = TEXT_EMPHASISMARK_NONE, bool bEmphasisMarkAbove = true, bool bEmphasisMarkBelow = false, - FontRelief eFontRelief = FONT_RELIEF_NONE, + TextRelief eTextRelief = TEXT_RELIEF_NONE, bool bShadow = false); /// data read access TextLine getFontOverline() const { return meFontOverline; } TextLine getFontUnderline() const { return meFontUnderline; } - FontStrikeout getFontStrikeout() const { return meFontStrikeout; } - FontEmphasisMark getFontEmphasisMark() const { return meFontEmphasisMark; } - FontRelief getFontRelief() const { return meFontRelief; } + TextStrikeout getTextStrikeout() const { return meTextStrikeout; } + TextEmphasisMark getTextEmphasisMark() const { return meTextEmphasisMark; } + TextRelief getTextRelief() const { return meTextRelief; } basegfx::BColor getOverlineColor() const { return maOverlineColor; } basegfx::BColor getTextlineColor() const { return maTextlineColor; } bool getUnderlineAbove() const { return mbUnderlineAbove; } diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textenumsprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textenumsprimitive2d.hxx index ec2f7e656b40..b0e7dc8c241e 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textenumsprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textenumsprimitive2d.hxx @@ -37,6 +37,7 @@ #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TEXTENUMSPRIMITIVE2D_HXX #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -70,33 +71,41 @@ namespace drawinglayer TEXT_LINE_BOLDWAVE }; + /** helper to convert LineStyle */ + TextLine mapFontUnderlineToTextLine(FontUnderline eLineStyle); + FontUnderline mapTextLineToFontUnderline(TextLine eLineStyle); + /** FontStrikeout definition */ - enum FontStrikeout + enum TextStrikeout { - FONT_STRIKEOUT_NONE, - FONT_STRIKEOUT_SINGLE, - FONT_STRIKEOUT_DOUBLE, - FONT_STRIKEOUT_BOLD, - FONT_STRIKEOUT_SLASH, - FONT_STRIKEOUT_X + TEXT_STRIKEOUT_NONE, + TEXT_STRIKEOUT_SINGLE, + TEXT_STRIKEOUT_DOUBLE, + TEXT_STRIKEOUT_BOLD, + TEXT_STRIKEOUT_SLASH, + TEXT_STRIKEOUT_X }; - /** FontEmphasisMark definition */ - enum FontEmphasisMark + /** helper to convert FontStrikeout */ + TextStrikeout mapFontStrikeoutToTextStrikeout(::FontStrikeout eFontStrikeout); + ::FontStrikeout mapTextStrikeoutToFontStrikeout(TextStrikeout eFontStrikeout); + + /** TextEmphasisMark definition */ + enum TextEmphasisMark { - FONT_EMPHASISMARK_NONE, - FONT_EMPHASISMARK_DOT, - FONT_EMPHASISMARK_CIRCLE, - FONT_EMPHASISMARK_DISC, - FONT_EMPHASISMARK_ACCENT + TEXT_EMPHASISMARK_NONE, + TEXT_EMPHASISMARK_DOT, + TEXT_EMPHASISMARK_CIRCLE, + TEXT_EMPHASISMARK_DISC, + TEXT_EMPHASISMARK_ACCENT }; - /** FontRelief definition */ - enum FontRelief + /** TextRelief definition */ + enum TextRelief { - FONT_RELIEF_NONE, - FONT_RELIEF_EMBOSSED, - FONT_RELIEF_ENGRAVED + TEXT_RELIEF_NONE, + TEXT_RELIEF_EMBOSSED, + TEXT_RELIEF_ENGRAVED }; } // end of namespace primitive2d diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx index 562eb681ddae..34d7d31fb93a 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textstrikeoutprimitive2d.hxx @@ -129,7 +129,7 @@ namespace drawinglayer private: double mfHeight; double mfOffset; - FontStrikeout meFontStrikeout; + TextStrikeout meTextStrikeout; protected: /// local decomposition. @@ -143,12 +143,12 @@ namespace drawinglayer const basegfx::BColor& rFontColor, double fHeight, double fOffset, - FontStrikeout eFontStrikeout); + TextStrikeout eTextStrikeout); /// data read access double getHeight() const { return mfHeight; } double getOffset() const { return mfOffset; } - FontStrikeout getFontStrikeout() const { return meFontStrikeout; } + TextStrikeout getTextStrikeout() const { return meTextStrikeout; } /// compare operator virtual bool operator==( const BasePrimitive2D& rPrimitive ) const; diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx index 66ca140c2e56..ff77cc3fd5d0 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx @@ -64,6 +64,7 @@ namespace drawinglayer { namespace primitive2d { class PolygonStrokePrimitive2D; class ControlPrimitive2D; class PagePreviewPrimitive2D; + class EpsPrimitive2D; }} ////////////////////////////////////////////////////////////////////////////// @@ -113,6 +114,7 @@ namespace drawinglayer void RenderMarkerArrayPrimitive2D(const primitive2d::MarkerArrayPrimitive2D& rMarkerArrayCandidate); void RenderPointArrayPrimitive2D(const primitive2d::PointArrayPrimitive2D& rPointArrayCandidate); void RenderPolygonStrokePrimitive2D(const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokeCandidate); + void RenderEpsPrimitive2D(const primitive2d::EpsPrimitive2D& rEpsPrimitive2D); ///////////////////////////////////////////////////////////////////////////// // DrawMode adaption support diff --git a/drawinglayer/source/primitive2d/epsprimitive2d.cxx b/drawinglayer/source/primitive2d/epsprimitive2d.cxx new file mode 100644 index 000000000000..dc8128ab1386 --- /dev/null +++ b/drawinglayer/source/primitive2d/epsprimitive2d.cxx @@ -0,0 +1,111 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: backgroundcolorprimitive2d.cxx,v $ + * + * $Revision: 1.5 $ + * + * last change: $Author: aw $ $Date: 2008-05-27 14:11:20 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_drawinglayer.hxx" + +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + Primitive2DSequence EpsPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + Primitive2DSequence xRetval; + const GDIMetaFile& rSubstituteContent = getMetaFile(); + + if(rSubstituteContent.GetActionCount()) + { + // the default decomposition will use the Metafile replacement visualisation. + // To really use the Eps data, a renderer has to know and interpret this primitive + // directly. + xRetval.realloc(1); + + xRetval[0] = Primitive2DReference( + new MetafilePrimitive2D( + getEpsTransform(), + rSubstituteContent)); + } + + return xRetval; + } + + EpsPrimitive2D::EpsPrimitive2D( + const basegfx::B2DHomMatrix& rEpsTransform, + const GfxLink& rGfxLink, + const GDIMetaFile& rMetaFile) + : BufferedDecompositionPrimitive2D(), + maEpsTransform(rEpsTransform), + maGfxLink(rGfxLink), + maMetaFile(rMetaFile) + { + } + + bool EpsPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const + { + if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) + { + const EpsPrimitive2D& rCompare = (EpsPrimitive2D&)rPrimitive; + + return (getEpsTransform() == rCompare.getEpsTransform() + && getGfxLink().IsEqual(rCompare.getGfxLink()) + && getMetaFile() == rCompare.getMetaFile()); + } + + return false; + } + + basegfx::B2DRange EpsPrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewInformation) const + { + // use own implementation to quickly answer the getB2DRange question. + basegfx::B2DRange aRetval(0.0, 0.0, 1.0, 1.0); + aRetval.transform(getEpsTransform()); + + return aRetval; + } + + // provide unique ID + ImplPrimitrive2DIDBlock(EpsPrimitive2D, PRIMITIVE2D_ID_EPSPRIMITIVE2D) + + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index eca68858cbb5..d7d3929a7a56 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -689,6 +689,34 @@ namespace drawinglayer //delete pDXArray; } + if(false) + { + const double fHor(aRectangle.getWidth()); + const double fVer(aRectangle.getHeight()); + const Point aPointA( + aRectangle.Left() + basegfx::fround(fHor * 0.2), + aRectangle.Top() + basegfx::fround(fVer * 0.3)); + const Point aPointB( + aRectangle.Left() + basegfx::fround(fHor * 0.2), + aRectangle.Top() + basegfx::fround(fVer * 0.5)); + const Point aPointC( + aRectangle.Left() + basegfx::fround(fHor * 0.2), + aRectangle.Top() + basegfx::fround(fVer * 0.7)); + const String aText(ByteString("Hello, World!"), RTL_TEXTENCODING_UTF8); + + const String aFontName(ByteString("Comic Sans MS"), RTL_TEXTENCODING_UTF8); + Font aFont(aFontName, Size(0, 1000)); + aFont.SetAlign(ALIGN_BASELINE); + aFont.SetColor(COL_RED); + + aOut.SetFont(aFont); + const sal_Int32 nWidth(aOut.GetTextWidth(aText, 0, aText.Len())); + aOut.DrawText(aPointA, aText, 0, aText.Len()); + aOut.DrawTextLine(aPointA, nWidth, STRIKEOUT_SINGLE, UNDERLINE_SINGLE, UNDERLINE_SMALLWAVE); + aOut.DrawTextLine(aPointB, nWidth, STRIKEOUT_SINGLE, UNDERLINE_SINGLE, UNDERLINE_SMALLWAVE); + aOut.DrawTextLine(aPointC, nWidth, STRIKEOUT_SINGLE, UNDERLINE_SINGLE, UNDERLINE_SMALLWAVE); + } + aMtf.Stop(); aMtf.WindStart(); aMtf.SetPrefMapMode(MapMode(MAP_100TH_MM)); diff --git a/drawinglayer/source/primitive2d/makefile.mk b/drawinglayer/source/primitive2d/makefile.mk index 5da4d9c35587..c9a3cc191a35 100644 --- a/drawinglayer/source/primitive2d/makefile.mk +++ b/drawinglayer/source/primitive2d/makefile.mk @@ -55,6 +55,7 @@ SLOFILES= \ $(SLO)$/controlprimitive2d.obj \ $(SLO)$/discretebitmapprimitive2d.obj \ $(SLO)$/embedded3dprimitive2d.obj \ + $(SLO)$/epsprimitive2d.obj \ $(SLO)$/fillbitmapprimitive2d.obj \ $(SLO)$/fillgradientprimitive2d.obj \ $(SLO)$/fillhatchprimitive2d.obj \ @@ -78,6 +79,7 @@ SLOFILES= \ $(SLO)$/shadowprimitive2d.obj \ $(SLO)$/structuretagprimitive2d.obj \ $(SLO)$/texteffectprimitive2d.obj \ + $(SLO)$/textenumsprimitive2d.obj \ $(SLO)$/textlayoutdevice.obj \ $(SLO)$/textlineprimitive2d.obj \ $(SLO)$/textprimitive2d.obj \ diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index a12172939e99..8434146c6f3a 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -68,6 +68,9 @@ #include #include #include +#include +#include +#include #include ////////////////////////////////////////////////////////////////////////////// @@ -78,12 +81,20 @@ using namespace com::sun::star; namespace { + /** helper class for graphic context + + This class allows to hold a complete status of classic + VCL OutputDevice stati. This data is needed for correct + interpretation of the MetaFile action flow. + */ class PropertyHolder { private: + /// current transformation (aka MapMode) basegfx::B2DHomMatrix maTransformation; MapUnit maMapUnit; + /// current colors basegfx::BColor maLineColor; basegfx::BColor maFillColor; basegfx::BColor maTextColor; @@ -91,13 +102,16 @@ namespace basegfx::BColor maTextLineColor; basegfx::BColor maOverlineColor; + /// clipping, font, etc. Region maRegion; Font maFont; RasterOp maRasterOp; sal_uInt32 mnLayoutMode; LanguageType maLanguageType; + sal_uInt16 mnPushFlags; /// bitfield + /// contains all active markers bool mbLineColor : 1; bool mbFillColor : 1; bool mbTextColor : 1; @@ -121,6 +135,7 @@ namespace maRasterOp(ROP_OVERPAINT), mnLayoutMode(0), maLanguageType(0), + mnPushFlags(0), mbLineColor(false), mbFillColor(false), mbTextColor(true), @@ -135,6 +150,7 @@ namespace { } + /// read/write accesses const basegfx::B2DHomMatrix& getTransformation() const { return maTransformation; } void setTransformation(const basegfx::B2DHomMatrix& rNew) { if(rNew != maTransformation) maTransformation = rNew; } @@ -191,6 +207,9 @@ namespace LanguageType getLanguageType() const { return maLanguageType; } void setLanguageType(LanguageType aNew) { if(aNew != maLanguageType) maLanguageType = aNew; } + sal_uInt16 getPushFlags() const { return mnPushFlags; } + void setPushFlags(sal_uInt16 nNew) { if(nNew != mnPushFlags) mnPushFlags = nNew; } + bool getLineOrFillActive() const { return (mbLineColor || mbFillColor); } }; } // end of anonymous namespace @@ -199,6 +218,15 @@ namespace namespace { + /** stack for properites + + This class builds a stack based on the PropertyHolder + class. It encapsulates the pointer/new/delete usage to + make it safe and implements the push/pop as needed by a + VCL Metafile interpreter. The critical part here are the + flag values VCL OutputDevice uses here; not all stuff is + pushed and thus needs to be copied at pop. + */ class PropertyHolders { private: @@ -215,33 +243,127 @@ namespace return maPropertyHolders.size(); } - void Push() + void Push(sal_uInt16 nPushFlags) { - OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: PUSH with no property holders (!)"); - maPropertyHolders.push_back(new PropertyHolder(*maPropertyHolders[maPropertyHolders.size() - 1])); + if(nPushFlags) + { + OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: PUSH with no property holders (!)"); + PropertyHolder* pNew = new PropertyHolder(*maPropertyHolders.back()); + pNew->setPushFlags(nPushFlags); + maPropertyHolders.push_back(pNew); + } } void Pop() { OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: POP with no property holders (!)"); - if(maPropertyHolders.size()) + const sal_uInt32 nSize(maPropertyHolders.size()); + + if(nSize) { - delete maPropertyHolders[maPropertyHolders.size() - 1]; - maPropertyHolders.pop_back(); + const PropertyHolder* pTip = maPropertyHolders.back(); + const sal_uInt16 nPushFlags(pTip->getPushFlags()); + + if(nPushFlags) + { + if(nSize > 1) + { + // copy back content for all non-set flags + PropertyHolder* pLast = maPropertyHolders[nSize - 2]; + + if(PUSH_ALL != nPushFlags) + { + if(!(nPushFlags & PUSH_LINECOLOR )) + { + pLast->setLineColor(pTip->getLineColor()); + pLast->setLineColorActive(pTip->getLineColorActive()); + } + if(!(nPushFlags & PUSH_FILLCOLOR )) + { + pLast->setFillColor(pTip->getFillColor()); + pLast->setFillColorActive(pTip->getFillColorActive()); + } + if(!(nPushFlags & PUSH_FONT )) + { + pLast->setFont(pTip->getFont()); + } + if(!(nPushFlags & PUSH_TEXTCOLOR )) + { + pLast->setTextColor(pTip->getTextColor()); + pLast->setTextColorActive(pTip->getTextColorActive()); + } + if(!(nPushFlags & PUSH_MAPMODE )) + { + pLast->setTransformation(pTip->getTransformation()); + pLast->setMapUnit(pTip->getMapUnit()); + } + if(!(nPushFlags & PUSH_CLIPREGION )) + { + pLast->setRegion(pTip->getRegion()); + pLast->setRegionActive(pTip->getRegionActive()); + } + if(!(nPushFlags & PUSH_RASTEROP )) + { + pLast->setRasterOp(pTip->getRasterOp()); + } + if(!(nPushFlags & PUSH_TEXTFILLCOLOR )) + { + pLast->setTextFillColor(pTip->getTextFillColor()); + pLast->setTextFillColorActive(pTip->getTextFillColorActive()); + } + if(!(nPushFlags & PUSH_TEXTALIGN )) + { + if(pLast->getFont().GetAlign() != pTip->getFont().GetAlign()) + { + Font aFont(pLast->getFont()); + aFont.SetAlign(pTip->getFont().GetAlign()); + pLast->setFont(aFont); + } + } + if(!(nPushFlags & PUSH_REFPOINT )) + { + // not supported + } + if(!(nPushFlags & PUSH_TEXTLINECOLOR )) + { + pLast->setTextLineColor(pTip->getTextLineColor()); + pLast->setTextLineColorActive(pTip->getTextLineColorActive()); + } + if(!(nPushFlags & PUSH_TEXTLAYOUTMODE )) + { + pLast->setLayoutMode(pTip->getLayoutMode()); + } + if(!(nPushFlags & PUSH_TEXTLANGUAGE )) + { + pLast->setLanguageType(pTip->getLanguageType()); + } + if(!(nPushFlags & PUSH_OVERLINECOLOR )) + { + pLast->setOverlineColor(pTip->getOverlineColor()); + pLast->setOverlineColorActive(pTip->getOverlineColorActive()); + } + } + } + + // execute the pop + delete maPropertyHolders.back(); + maPropertyHolders.pop_back(); + } } } PropertyHolder& Current() { OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: CURRENT with no property holders (!)"); - return *maPropertyHolders[maPropertyHolders.size() - 1]; + return *maPropertyHolders.back(); } ~PropertyHolders() { while(maPropertyHolders.size()) { - Pop(); + delete maPropertyHolders.back(); + maPropertyHolders.pop_back(); } } }; @@ -251,6 +373,13 @@ namespace namespace { + /** helper to convert a Region to a B2DPolyPolygon + when it does not yet contain one. In the future + this may be expanded to merge the polygons created + from rectangles or use a special algo to directly turn + the spans of regions to a single, already merged + PolyPolygon. + */ basegfx::B2DPolyPolygon getB2DPolyPolygonFromRegion(const Region& rRegion) { basegfx::B2DPolyPolygon aRetval; @@ -288,6 +417,12 @@ namespace namespace { + /** Helper class to buffer and hold a Primive target vector. It + encapsulates the new/delete functionality and aloows to work + on pointers of the implementation classes. All data will + be converted to uno sequences of uno references when accessing the + data. + */ class TargetHolder { private: @@ -369,6 +504,7 @@ namespace namespace { + /** Helper class which builds a stack on the TargetHolder class */ class TargetHolders { private: @@ -395,7 +531,7 @@ namespace OSL_ENSURE(maTargetHolders.size(), "TargetHolders: POP with no property holders (!)"); if(maTargetHolders.size()) { - delete maTargetHolders[maTargetHolders.size() - 1]; + delete maTargetHolders.back(); maTargetHolders.pop_back(); } } @@ -403,14 +539,15 @@ namespace TargetHolder& Current() { OSL_ENSURE(maTargetHolders.size(), "TargetHolders: CURRENT with no property holders (!)"); - return *maTargetHolders[maTargetHolders.size() - 1]; + return *maTargetHolders.back(); } ~TargetHolders() { while(maTargetHolders.size()) { - Pop(); + delete maTargetHolders.back(); + maTargetHolders.pop_back(); } } }; @@ -461,6 +598,7 @@ namespace drawinglayer namespace { + /** helper to convert a MapMode to a transformation */ basegfx::B2DHomMatrix getTransformFromMapMode(const MapMode& rMapMode) { basegfx::B2DHomMatrix aMapping; @@ -482,6 +620,7 @@ namespace return aMapping; } + /** helper to create a PointArrayPrimitive2D based on current context */ void createPointArrayPrimitive( const std::vector< basegfx::B2DPoint >& rPositions, TargetHolder& rTarget, @@ -514,6 +653,7 @@ namespace } } + /** helper to create a PolygonHairlinePrimitive2D based on current context */ void createHairlinePrimitive( const basegfx::B2DPolygon& rLinePolygon, TargetHolder& rTarget, @@ -530,6 +670,7 @@ namespace } } + /** helper to create a PolyPolygonColorPrimitive2D based on current context */ void createFillPrimitive( const basegfx::B2DPolyPolygon& rFillPolyPolygon, TargetHolder& rTarget, @@ -546,6 +687,7 @@ namespace } } + /** helper to create a PolygonStrokePrimitive2D based on current context */ void createLinePrimitive( const basegfx::B2DPolygon& rLinePolygon, const LineInfo& rLineInfo, @@ -611,6 +753,7 @@ namespace } } + /** helper to create needed line and fill primitives based on current context */ void createHairlineAndFillPrimitive( const basegfx::B2DPolygon& rPolygon, TargetHolder& rTarget, @@ -627,6 +770,7 @@ namespace } } + /** helper to create needed line and fill primitives based on current context */ void createHairlineAndFillPrimitive( const basegfx::B2DPolyPolygon& rPolyPolygon, TargetHolder& rTarget, @@ -646,6 +790,12 @@ namespace } } + /** helper to create DiscreteBitmapPrimitive2D based on current context. + The DiscreteBitmapPrimitive2D is especially created for this usage + since no other usage defines a bitmap visualisation based on top-left + position and size in pixels. At the end it will create a view-dependent + transformed embedding of a BitmapPrimitive2D. + */ void createBitmapExPrimitive( const BitmapEx& rBitmapEx, const Point& rPoint, @@ -664,6 +814,7 @@ namespace } } + /** helper to create BitmapPrimitive2D based on current context */ void createBitmapExPrimitive( const BitmapEx& rBitmapEx, const Point& rPoint, @@ -689,6 +840,10 @@ namespace } } + /** helper to create a regular BotmapEx from a MaskAction (definitions + which use a bitmap without alpha but define one of the colors as + transparent) + */ BitmapEx createMaskBmpEx(const Bitmap& rBitmap, const Color& rMaskColor) { const Color aWhite(COL_WHITE); @@ -705,6 +860,9 @@ namespace return BitmapEx(aSolid, aMask); } + /** helper to convert from a VCL Gradient definition to the corresponding + data for primitive representation + */ drawinglayer::attribute::FillGradientAttribute createFillGradientAttribute(const Gradient& rGradient) { const Color aStartColor(rGradient.GetStartColor()); @@ -774,6 +932,9 @@ namespace rGradient.GetSteps()); } + /** helper to convert from a VCL Hatch definition to the corresponding + data for primitive representation + */ drawinglayer::attribute::FillHatchAttribute createFillHatchAttribute(const Hatch& rHatch) { drawinglayer::attribute::HatchStyle aHatchStyle(drawinglayer::attribute::HATCHSTYLE_SINGLE); @@ -802,6 +963,12 @@ namespace false); } + /** helper to take needed action on ClipRegion change. This method needs to be called + on any Region change, e.g. at the obvious actions doing this, but also at pop-calls + whcih change the Region of the current context. It takes care of creating the + current embeddec context, set the new Region at the context and eventually prepare + a new target for embracing new geometry to the current region + */ void HandleNewClipRegion( const Region* pRegion, TargetHolders& rTargetHolders, @@ -828,7 +995,7 @@ namespace } // apply new settings - const bool bNewActive(pRegion); + const bool bNewActive(pRegion && !pRegion->IsEmpty()); rPropertyHolders.Current().setRegionActive(bNewActive); if(bNewActive) @@ -840,6 +1007,12 @@ namespace } } + /** helper to handle the change of RasterOp. It takes care of encapsulating all current + geometry to the current RasterOp (if changed) and needs to be called on any RasterOp + change. It will also start a new geometry target to embrace to the new RasterOp if + a changuing RasterOp is used. Currently, ROP_XOR and ROP_INVERT are supported using + InvertPrimitive2D, and ROP_0 by using a ModifiedColorPrimitive2D to force to black paint + */ void HandleNewRasterOp( RasterOp aRasterOp, TargetHolders& rTargetHolders, @@ -888,6 +1061,9 @@ namespace } } + /** helper to create needed data to emulate the VCL Wallpaper Metafile action. + It is a quite mighty action. This helper is for simple color filled background. + */ drawinglayer::primitive2d::BasePrimitive2D* CreateColorWallpaper( const basegfx::B2DRange& rRange, const basegfx::BColor& rColor, @@ -901,6 +1077,9 @@ namespace rColor); } + /** helper to create needed data to emulate the VCL Wallpaper Metafile action. + It is a quite mighty action. This helper is for gradient filled background. + */ drawinglayer::primitive2d::BasePrimitive2D* CreateGradientWallpaper( const basegfx::B2DRange& rRange, const Gradient& rGradient, @@ -935,6 +1114,12 @@ namespace } } + /** helper to create needed data to emulate the VCL Wallpaper Metafile action. + It is a quite mighty action. This helper decides if color and/or gradient + background is needed for the wnated bitmap fill and then creates the needed + WallpaperBitmapPrimitive2D. This primitive was created for this purpose and + takes over all needed logic of orientations and tiling. + */ void CreateAndAppendBitmapWallpaper( basegfx::B2DRange aWallpaperRange, const Wallpaper& rWallpaper, @@ -998,32 +1183,7 @@ namespace } } - drawinglayer::primitive2d::TextLine mapTextLineStyle(FontUnderline eLineStyle) - { - switch(eLineStyle) - { - case UNDERLINE_SINGLE: return drawinglayer::primitive2d::TEXT_LINE_SINGLE; - case UNDERLINE_DOUBLE: return drawinglayer::primitive2d::TEXT_LINE_DOUBLE; - case UNDERLINE_DOTTED: return drawinglayer::primitive2d::TEXT_LINE_DOTTED; - case UNDERLINE_DASH: return drawinglayer::primitive2d::TEXT_LINE_DASH; - case UNDERLINE_LONGDASH: return drawinglayer::primitive2d::TEXT_LINE_LONGDASH; - case UNDERLINE_DASHDOT: return drawinglayer::primitive2d::TEXT_LINE_DASHDOT; - case UNDERLINE_DASHDOTDOT: return drawinglayer::primitive2d::TEXT_LINE_DASHDOTDOT; - case UNDERLINE_SMALLWAVE: return drawinglayer::primitive2d::TEXT_LINE_SMALLWAVE; - case UNDERLINE_WAVE: return drawinglayer::primitive2d::TEXT_LINE_WAVE; - case UNDERLINE_DOUBLEWAVE: return drawinglayer::primitive2d::TEXT_LINE_DOUBLEWAVE; - case UNDERLINE_BOLD: return drawinglayer::primitive2d::TEXT_LINE_BOLD; - case UNDERLINE_BOLDDOTTED: return drawinglayer::primitive2d::TEXT_LINE_BOLDDOTTED; - case UNDERLINE_BOLDDASH: return drawinglayer::primitive2d::TEXT_LINE_BOLDDASH; - case UNDERLINE_BOLDLONGDASH: return drawinglayer::primitive2d::TEXT_LINE_BOLDLONGDASH; - case UNDERLINE_BOLDDASHDOT: return drawinglayer::primitive2d::TEXT_LINE_BOLDDASHDOT; - case UNDERLINE_BOLDDASHDOTDOT: return drawinglayer::primitive2d::TEXT_LINE_BOLDDASHDOTDOT; - case UNDERLINE_BOLDWAVE: return drawinglayer::primitive2d::TEXT_LINE_BOLDWAVE; - // FontUnderline_FORCE_EQUAL_SIZE, UNDERLINE_DONTKNOW, UNDERLINE_NONE - default: return drawinglayer::primitive2d::TEXT_LINE_NONE; - } - } - + /** helper to decide UnderlineAbove for text primitives */ bool isUnderlineAbove(const Font& rFont) { if(!rFont.IsVertical()) @@ -1040,6 +1200,53 @@ namespace return false; } + void createFontAttributeTransformAndAlignment( + drawinglayer::attribute::FontAttribute& rFontAttribute, + basegfx::B2DHomMatrix& rTextTransform, + basegfx::B2DVector& rAlignmentOffset, + PropertyHolder& rProperty) + { + const Font& rFont = rProperty.getFont(); + basegfx::B2DVector aFontScaling; + + rFontAttribute = drawinglayer::attribute::FontAttribute( + drawinglayer::primitive2d::getFontAttributeFromVclFont( + aFontScaling, + rFont, + 0 != (rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_RTL), + 0 != (rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_STRONG))); + + // add FontScaling + rTextTransform.scale(aFontScaling.getX(), aFontScaling.getY()); + + // take text align into account + if(ALIGN_BASELINE != rFont.GetAlign()) + { + drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice; + aTextLayouterDevice.setFont(rFont); + + if(ALIGN_TOP == rFont.GetAlign()) + { + rAlignmentOffset.setY(aTextLayouterDevice.getFontAscent()); + } + else // ALIGN_BOTTOM + { + rAlignmentOffset.setY(-aTextLayouterDevice.getFontDescent()); + } + + rTextTransform.translate(rAlignmentOffset.getX(), rAlignmentOffset.getY()); + } + + // add FontRotation (if used) + if(rFont.GetOrientation()) + { + rTextTransform.rotate(-rFont.GetOrientation() * F_PI1800); + } + } + + /** helper which takes complete care for creating the needed text primitives. It + takes care of decorated stuff and all the geometry adaptions needed + */ void proccessMetaTextAction( const Point& rTextStartPosition, const XubString& rText, @@ -1052,49 +1259,19 @@ namespace drawinglayer::primitive2d::BasePrimitive2D* pResult = 0; const Font& rFont = rProperty.getFont(); std::vector< double > aDXArray; + basegfx::B2DVector aAlignmentOffset(0.0, 0.0); if(nTextLength) { - // get current font and create FontScaling and FontAttribute - basegfx::B2DVector aFontScaling; - const drawinglayer::attribute::FontAttribute aFontAttribute( - drawinglayer::primitive2d::getFontAttributeFromVclFont( - aFontScaling, - rFont, - 0 != (rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_RTL), - 0 != (rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_STRONG))); - - // create TextTransform + drawinglayer::attribute::FontAttribute aFontAttribute; basegfx::B2DHomMatrix aTextTransform; - // add FontScaling - aTextTransform.scale(aFontScaling.getX(), aFontScaling.getY()); - - // take text align into account - if(ALIGN_BASELINE != rFont.GetAlign()) - { - drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice; - aTextLayouterDevice.setFont(rFont); - - if(ALIGN_TOP == rFont.GetAlign()) - { - aTextTransform.translate( - 0.0, - aTextLayouterDevice.getFontAscent()); - } - else // ALIGN_BOTTOM - { - aTextTransform.translate( - 0.0, - -aTextLayouterDevice.getFontDescent()); - } - } - - // add FontRotation (if used) - if(rFont.GetOrientation()) - { - aTextTransform.rotate(-rFont.GetOrientation() * F_PI1800); - } + // fill parameters derived from current font + createFontAttributeTransformAndAlignment( + aFontAttribute, + aTextTransform, + aAlignmentOffset, + rProperty); // add TextStartPosition aTextTransform.translate(rTextStartPosition.X(), rTextStartPosition.Y()); @@ -1126,47 +1303,35 @@ namespace if(bDecoratedIsNeeded) { - // prepare overline and underline data - const drawinglayer::primitive2d::TextLine eFontOverline(mapTextLineStyle(rFont.GetOverline())); - const drawinglayer::primitive2d::TextLine eFontUnderline(mapTextLineStyle(rFont.GetUnderline())); + // prepare overline, underline and srikeout data + const drawinglayer::primitive2d::TextLine eFontOverline(drawinglayer::primitive2d::mapFontUnderlineToTextLine(rFont.GetOverline())); + const drawinglayer::primitive2d::TextLine eFontUnderline(drawinglayer::primitive2d::mapFontUnderlineToTextLine(rFont.GetUnderline())); + const drawinglayer::primitive2d::TextStrikeout eTextStrikeout(drawinglayer::primitive2d::mapFontStrikeoutToTextStrikeout(rFont.GetStrikeout())); // check UndelineAbove const bool bUnderlineAbove(drawinglayer::primitive2d::TEXT_LINE_NONE != eFontUnderline && isUnderlineAbove(rFont)); - // prepare strikeout data - drawinglayer::primitive2d::FontStrikeout eFontStrikeout(drawinglayer::primitive2d::FONT_STRIKEOUT_NONE); - - switch(rFont.GetStrikeout()) - { - case STRIKEOUT_SINGLE: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_SINGLE; break; - case STRIKEOUT_DOUBLE: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_DOUBLE; break; - case STRIKEOUT_BOLD: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_BOLD; break; - case STRIKEOUT_SLASH: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_SLASH; break; - case STRIKEOUT_X: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_X; break; - default : break; // FontStrikeout_FORCE_EQUAL_SIZE, STRIKEOUT_NONE, STRIKEOUT_DONTKNOW - } - // prepare emphasis mark data - drawinglayer::primitive2d::FontEmphasisMark eFontEmphasisMark(drawinglayer::primitive2d::FONT_EMPHASISMARK_NONE); + drawinglayer::primitive2d::TextEmphasisMark eTextEmphasisMark(drawinglayer::primitive2d::TEXT_EMPHASISMARK_NONE); switch(rFont.GetEmphasisMark() & EMPHASISMARK_STYLE) { - case EMPHASISMARK_DOT : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_DOT; break; - case EMPHASISMARK_CIRCLE : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_CIRCLE; break; - case EMPHASISMARK_DISC : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_DISC; break; - case EMPHASISMARK_ACCENT : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_ACCENT; break; + case EMPHASISMARK_DOT : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_EMPHASISMARK_DOT; break; + case EMPHASISMARK_CIRCLE : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_EMPHASISMARK_CIRCLE; break; + case EMPHASISMARK_DISC : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_EMPHASISMARK_DISC; break; + case EMPHASISMARK_ACCENT : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_EMPHASISMARK_ACCENT; break; } const bool bEmphasisMarkAbove(rFont.GetEmphasisMark() & EMPHASISMARK_POS_ABOVE); const bool bEmphasisMarkBelow(rFont.GetEmphasisMark() & EMPHASISMARK_POS_BELOW); // prepare font relief data - drawinglayer::primitive2d::FontRelief eFontRelief(drawinglayer::primitive2d::FONT_RELIEF_NONE); + drawinglayer::primitive2d::TextRelief eTextRelief(drawinglayer::primitive2d::TEXT_RELIEF_NONE); switch(rFont.GetRelief()) { - case RELIEF_EMBOSSED : eFontRelief = drawinglayer::primitive2d::FONT_RELIEF_EMBOSSED; break; - case RELIEF_ENGRAVED : eFontRelief = drawinglayer::primitive2d::FONT_RELIEF_ENGRAVED; break; + case RELIEF_EMBOSSED : eTextRelief = drawinglayer::primitive2d::TEXT_RELIEF_EMBOSSED; break; + case RELIEF_ENGRAVED : eTextRelief = drawinglayer::primitive2d::TEXT_RELIEF_ENGRAVED; break; default : break; // RELIEF_NONE, FontRelief_FORCE_EQUAL_SIZE } @@ -1192,12 +1357,12 @@ namespace eFontOverline, eFontUnderline, bUnderlineAbove, - eFontStrikeout, + eTextStrikeout, bWordLineMode, - eFontEmphasisMark, + eTextEmphasisMark, bEmphasisMarkAbove, bEmphasisMarkBelow, - eFontRelief, + eTextRelief, bShadow); } else @@ -1217,61 +1382,57 @@ namespace if(pResult && rProperty.getTextFillColorActive()) { + // text background is requested, add and encapsulate both to new primitive drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice; - const bool bRotated(rFont.GetOrientation()); + aTextLayouterDevice.setFont(rFont); + + // get text width + double fTextWidth(0.0); - if(bRotated) + if(aDXArray.empty()) { - // use unrotated font - Font aUnrotatedFont(rFont); - aUnrotatedFont.SetOrientation(0); - aTextLayouterDevice.setFont(aUnrotatedFont); + fTextWidth = aTextLayouterDevice.getTextWidth(rText, nTextStart, nTextLength); } else { - aTextLayouterDevice.setFont(rFont); + fTextWidth = aDXArray.back(); } - // get base range - basegfx::B2DRange aTextRange( - aTextLayouterDevice.getTextBoundRect( - rText, nTextStart, nTextLength)); - - if(aDXArray.size()) + if(basegfx::fTools::more(fTextWidth, 0.0)) { - // use the last entry in DXArray to correct the width - aTextRange = basegfx::B2DRange( - aTextRange.getMinX(), - aTextRange.getMinY(), - aTextRange.getMinX() + aDXArray[aDXArray.size() - 1], - aTextRange.getMaxY()); - } + // build text range + const basegfx::B2DRange aTextRange( + 0.0, -aTextLayouterDevice.getFontAscent(), + fTextWidth, aTextLayouterDevice.getFontDescent()); - // create Transform. Scale and Alignment are already applied. - basegfx::B2DHomMatrix aTextTransform; + // create Transform + basegfx::B2DHomMatrix aTextTransform; - if(bRotated) - { - aTextTransform.rotate(-rFont.GetOrientation() * F_PI1800); - } + aTextTransform.translate(aAlignmentOffset.getX(), aAlignmentOffset.getY()); - aTextTransform.translate(rTextStartPosition.X(), rTextStartPosition.Y()); + if(rFont.GetOrientation()) + { + aTextTransform.rotate(-rFont.GetOrientation() * F_PI1800); + } - // prepare Primitive2DSequence, put text in foreground - drawinglayer::primitive2d::Primitive2DSequence aSequence(2); - aSequence[1] = drawinglayer::primitive2d::Primitive2DReference(pResult); + aTextTransform.translate(rTextStartPosition.X(), rTextStartPosition.Y()); - // prepare filled polygon - basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aTextRange)); - aOutline.transform(aTextTransform); + // prepare Primitive2DSequence, put text in foreground + drawinglayer::primitive2d::Primitive2DSequence aSequence(2); + aSequence[1] = drawinglayer::primitive2d::Primitive2DReference(pResult); - aSequence[0] = drawinglayer::primitive2d::Primitive2DReference( - new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( - basegfx::B2DPolyPolygon(aOutline), - rProperty.getTextFillColor())); + // prepare filled polygon + basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aTextRange)); + aOutline.transform(aTextTransform); + + aSequence[0] = drawinglayer::primitive2d::Primitive2DReference( + new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( + basegfx::B2DPolyPolygon(aOutline), + rProperty.getTextFillColor())); - // set as group at pResult - pResult = new drawinglayer::primitive2d::GroupPrimitive2D(aSequence); + // set as group at pResult + pResult = new drawinglayer::primitive2d::GroupPrimitive2D(aSequence); + } } if(pResult) @@ -1294,6 +1455,173 @@ namespace } } + /** helper which takes complete care for creating the needed textLine primitives */ + void proccessMetaTextLineAction( + const MetaTextLineAction& rAction, + TargetHolder& rTarget, + PropertyHolder& rProperty) + { + const double fLineWidth(fabs((double)rAction.GetWidth())); + + if(fLineWidth > 0.0) + { + const drawinglayer::primitive2d::TextLine aOverlineMode(drawinglayer::primitive2d::mapFontUnderlineToTextLine(rAction.GetOverline())); + const drawinglayer::primitive2d::TextLine aUnderlineMode(drawinglayer::primitive2d::mapFontUnderlineToTextLine(rAction.GetUnderline())); + const drawinglayer::primitive2d::TextStrikeout aTextStrikeout(drawinglayer::primitive2d::mapFontStrikeoutToTextStrikeout(rAction.GetStrikeout())); + + const bool bOverlineUsed(drawinglayer::primitive2d::TEXT_LINE_NONE != aOverlineMode); + const bool bUnderlineUsed(drawinglayer::primitive2d::TEXT_LINE_NONE != aUnderlineMode); + const bool bStrikeoutUsed(drawinglayer::primitive2d::TEXT_STRIKEOUT_NONE != aTextStrikeout); + + if(bUnderlineUsed || bStrikeoutUsed || bOverlineUsed) + { + std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aTargetVector; + basegfx::B2DVector aAlignmentOffset(0.0, 0.0); + drawinglayer::attribute::FontAttribute aFontAttribute; + basegfx::B2DHomMatrix aTextTransform; + + // fill parameters derived from current font + createFontAttributeTransformAndAlignment( + aFontAttribute, + aTextTransform, + aAlignmentOffset, + rProperty); + + // add TextStartPosition + aTextTransform.translate(rAction.GetStartPoint().X(), rAction.GetStartPoint().Y()); + + // prepare TextLayouter (used in most cases) + drawinglayer::primitive2d::TextLayouterDevice aTextLayouter; + aTextLayouter.setFont(rProperty.getFont()); + + if(bOverlineUsed) + { + // create primitive geometry for overline + aTargetVector.push_back( + new drawinglayer::primitive2d::TextLinePrimitive2D( + aTextTransform, + fLineWidth, + aTextLayouter.getOverlineOffset(), + aTextLayouter.getOverlineHeight(), + aOverlineMode, + rProperty.getOverlineColor())); + } + + if(bUnderlineUsed) + { + // create primitive geometry for underline + aTargetVector.push_back( + new drawinglayer::primitive2d::TextLinePrimitive2D( + aTextTransform, + fLineWidth, + aTextLayouter.getUnderlineOffset(), + aTextLayouter.getUnderlineHeight(), + aUnderlineMode, + rProperty.getTextLineColor())); + } + + if(bStrikeoutUsed) + { + // create primitive geometry for strikeout + if(drawinglayer::primitive2d::TEXT_STRIKEOUT_SLASH == aTextStrikeout + || drawinglayer::primitive2d::TEXT_STRIKEOUT_X == aTextStrikeout) + { + // strikeout with character + const sal_Unicode aStrikeoutChar( + drawinglayer::primitive2d::TEXT_STRIKEOUT_SLASH == aTextStrikeout ? '/' : 'X'); + const com::sun::star::lang::Locale aLocale(MsLangId::convertLanguageToLocale( + rProperty.getLanguageType())); + + aTargetVector.push_back( + new drawinglayer::primitive2d::TextCharacterStrikeoutPrimitive2D( + aTextTransform, + fLineWidth, + rProperty.getTextColor(), + aStrikeoutChar, + aFontAttribute, + aLocale)); + } + else + { + // strikeout with geometry + aTargetVector.push_back( + new drawinglayer::primitive2d::TextGeometryStrikeoutPrimitive2D( + aTextTransform, + fLineWidth, + rProperty.getTextColor(), + aTextLayouter.getUnderlineHeight(), + aTextLayouter.getStrikeoutOffset(), + aTextStrikeout)); + } + } + + if(aTargetVector.size()) + { + // add created text primitive to target + if(rProperty.getTransformation().isIdentity()) + { + for(sal_uInt32 a(0); a < aTargetVector.size(); a++) + { + rTarget.append(aTargetVector[a]); + } + } + else + { + // when a transformation is set, embed to it + drawinglayer::primitive2d::Primitive2DSequence xTargets(aTargetVector.size()); + + for(sal_uInt32 a(0); a < aTargetVector.size(); a++) + { + xTargets[a] = drawinglayer::primitive2d::Primitive2DReference(aTargetVector[a]); + } + + rTarget.append( + new drawinglayer::primitive2d::TransformPrimitive2D( + rProperty.getTransformation(), + xTargets)); + } + } + } + } + + } + + /** This is the main interpreter method. It is designed to handle the given Metafile + completely inside the given context and target. It may use and modify the context and + target. This design allows to call itself recursively wich adapted contexts and + targets as e.g. needed for the META_FLOATTRANSPARENT_ACTION where the content is expressed + as a metafile as sub-content. + + This interpreter is as free of VCL functionality as possible. It uses VCL data classes + (else reading the data would not be possible), but e.g. does NOT use a local OutputDevice + as most other MetaFile interpreters/exporters do to hold and work with the current context. + This is necessary to be able to get away from the strong internal VCL-binding. + + It tries to combine e.g. pixel and/or point actions and to stitch together single line primitives + where possible (which is not trivial with the possible line geometry definitions). + + It tries to handle clipping no longer as Regions and spans of Rectangles, but as PolyPolygon + ClipRegions with (where possible) high precision by using the best possible data quality + from the Region. The Region is unavoidable as data container, but nowadays allows the transport + of Polygon-based clip regions. Where this is not used, a Polygon is constructed from the + Region ranges. All primitive clipping uses the MaskPrimitive2D with Polygon-based clipping. + + I have marked the single MetaActions with: + + SIMPLE, DONE: + Simple, e.g nothing to do or value setting in the context + + CHECKED, WORKS WELL: + Thoroughly tested with extra written test code which created a replacement + Metafile just to test this action in various combinations + + NEEDS IMPLEMENTATION: + Not implemented and asserted, but also no usage found, neither in own Metafile + creations, nor in EMF/WMF imports (checked with a whole bunch of critical EMF/WMF + bugdocs) + + For more commens, see the single action implementations. + */ void interpretMetafile( const GDIMetaFile& rMetaFile, TargetHolders& rTargetHolders, @@ -1891,7 +2219,9 @@ namespace { if(rWallpaper.IsBitmap()) { - // create bitmap background + // create bitmap background. Caution: This + // also will create gradient/color background(s) + // when the bitmap is transparent or not tiled CreateAndAppendBitmapWallpaper( aWallpaperRange, rWallpaper, @@ -2160,6 +2490,9 @@ namespace case META_MAPMODE_ACTION : { /** CHECKED, WORKS WELL */ + // the most necessary MapMode to be interpreted is MAP_RELATIVE, + // but also the others may occur. Even not yet supported ones + // may need to be added here later const MetaMapModeAction* pA = (const MetaMapModeAction*)pAction; const MapMode& rMapMode = pA->GetMapMode(); basegfx::B2DHomMatrix aMapping; @@ -2216,6 +2549,34 @@ namespace /** SIMPLE, DONE */ const MetaFontAction* pA = (const MetaFontAction*)pAction; rPropertyHolders.Current().setFont(pA->GetFont()); + Size aFontSize(pA->GetFont().GetSize()); + + if(0 == aFontSize.Height()) + { + // this should not happen but i got Metafiles where this was the + // case. A height needs to be guessed (similar to OutputDevice::ImplNewFont()) + Font aCorrectedFont(pA->GetFont()); + + if(aFontSize.Width()) + { + // guess width + aFontSize = Size(0, aFontSize.Width() * 3); + } + else + { + // guess 21 pixel + aFontSize = Size(0, 21); + } + + if(aFontSize.Height() < 75) + { + // assume size is in pixels and convert + aFontSize = Application::GetDefaultDevice()->PixelToLogic(aFontSize, MAP_100TH_MM); + } + + aCorrectedFont.SetSize(aFontSize); + rPropertyHolders.Current().setFont(aCorrectedFont); + } // older Metafiles have no META_TEXTCOLOR_ACTION which defines // the FontColor now, so use the Font's color when not transparent @@ -2249,36 +2610,40 @@ namespace case META_PUSH_ACTION : { /** CHECKED, WORKS WELL */ - rPropertyHolders.Push(); + const MetaPushAction* pA = (const MetaPushAction*)pAction; + rPropertyHolders.Push(pA->GetFlags()); break; } case META_POP_ACTION : { /** CHECKED, WORKS WELL */ - if(rPropertyHolders.Current().getRegionActive()) + const bool bRegionMayChange(rPropertyHolders.Current().getPushFlags() & PUSH_CLIPREGION); + const bool bRasterOpMayChange(rPropertyHolders.Current().getPushFlags() & PUSH_RASTEROP); + + if(bRegionMayChange && rPropertyHolders.Current().getRegionActive()) { - // end clipping + // end evtl. clipping HandleNewClipRegion(0, rTargetHolders, rPropertyHolders); } - if(rPropertyHolders.Current().isRasterOpActive()) + if(bRasterOpMayChange && rPropertyHolders.Current().isRasterOpActive()) { - // end RasterOp + // end evtl. RasterOp HandleNewRasterOp(ROP_OVERPAINT, rTargetHolders, rPropertyHolders); } rPropertyHolders.Pop(); - if(rPropertyHolders.Current().isRasterOpActive()) + if(bRasterOpMayChange && rPropertyHolders.Current().isRasterOpActive()) { - // start RasterOp + // start evtl. RasterOp HandleNewRasterOp(rPropertyHolders.Current().getRasterOp(), rTargetHolders, rPropertyHolders); } - if(rPropertyHolders.Current().getRegionActive()) + if(bRegionMayChange && rPropertyHolders.Current().getRegionActive()) { - // start clipping + // start evtl. clipping HandleNewClipRegion(&rPropertyHolders.Current().getRegion(), rTargetHolders, rPropertyHolders); } @@ -2340,15 +2705,42 @@ namespace } case META_EPS_ACTION : { - /** NEEDS IMPLEMENTATION */ - OSL_ENSURE(false, "META_EPS_ACTION requested (!)"); + /** CHECKED, WORKS WELL */ + // To support this action, i have added a EpsPrimitive2D which will + // by default decompose to the Metafile replacement data. To support + // this EPS on screen, the renderer visualizing this has to support + // that primitive and visualize the Eps file (e.g. printing) const MetaEPSAction* pA = (const MetaEPSAction*)pAction; + const Rectangle aRectangle(pA->GetPoint(), pA->GetSize()); + + if(!aRectangle.IsEmpty()) + { + // create object transform + basegfx::B2DHomMatrix aObjectTransform; + + aObjectTransform.set(0, 0, aRectangle.GetWidth()); + aObjectTransform.set(1, 1, aRectangle.GetHeight()); + aObjectTransform.set(0, 2, aRectangle.Left()); + aObjectTransform.set(1, 2, aRectangle.Top()); + + // add current transformation + aObjectTransform = rPropertyHolders.Current().getTransformation() * aObjectTransform; + + // embed using EpsPrimitive + rTargetHolders.Current().append( + new drawinglayer::primitive2d::EpsPrimitive2D( + aObjectTransform, + pA->GetLink(), + pA->GetSubstitute())); + } + break; } case META_REFPOINT_ACTION : { /** SIMPLE, DONE */ - // only used for hatch and line pattern offsets + // only used for hatch and line pattern offsets, pretty much no longer + // supported today // const MetaRefPointAction* pA = (const MetaRefPointAction*)pAction; break; } @@ -2366,12 +2758,21 @@ namespace } case META_TEXTLINE_ACTION : { - /** NEEDS IMPLEMENTATION */ - OSL_ENSURE(false, "META_TEXTLINE_ACTION requested (!)"); + /** CHECKED, WORKS WELL */ // actually creates overline, underline and strikeouts, so // these should be isolated from TextDecoratedPortionPrimitive2D - // to own primitives... + // to own primitives. Done, available now. + // + // This Metaaction seems not to be used (was not used in any + // checked files). It's used in combination with the current + // Font. const MetaTextLineAction* pA = (const MetaTextLineAction*)pAction; + + proccessMetaTextLineAction( + *pA, + rTargetHolders.Current(), + rPropertyHolders.Current()); + break; } case META_FLOATTRANSPARENT_ACTION : @@ -2386,7 +2787,8 @@ namespace if(rContent.GetActionCount()) { - // create the sub-content + // create the sub-content with no embedding specific to the + // sub-metafile, this seems not to be used. drawinglayer::primitive2d::Primitive2DSequence xSubContent; { rTargetHolders.Push(); @@ -2438,7 +2840,8 @@ namespace case META_GRADIENTEX_ACTION : { /** SIMPLE, DONE */ - // This is only a data holder which is interpreted inside comment actions + // This is only a data holder which is interpreted inside comment actions, + // see META_COMMENT_ACTION for more info // const MetaGradientExAction* pA = (const MetaGradientExAction*)pAction; break; } @@ -2470,9 +2873,78 @@ namespace } case META_COMMENT_ACTION : { - /** NEEDS IMPLEMENTATION */ - OSL_ENSURE(false, "META_COMMENT_ACTION requested (!)"); + /** CHECKED, WORKS WELL */ + // I already implemented + // XPATHFILL_SEQ_BEGIN, XPATHFILL_SEQ_END + // XPATHSTROKE_SEQ_BEGIN, XPATHSTROKE_SEQ_END, + // but opted to remove these again; it works well without them + // and makes the code less dependent from those Metafile Add-Ons const MetaCommentAction* pA = (const MetaCommentAction*)pAction; + + if(COMPARE_EQUAL == pA->GetComment().CompareIgnoreCaseToAscii("XGRAD_SEQ_BEGIN")) + { + // XGRAD_SEQ_BEGIN, XGRAD_SEQ_END should be supported since the + // pure recorded paint of the gradients uses the XOR paint functionality + // ('trick'). This is (and will be) broblematic with AntAliasing, so it's + // better to use this info + const MetaGradientExAction* pMetaGradientExAction = 0; + bool bDone(false); + sal_uInt32 b(a + 1); + + for(; !bDone && b < nCount; b++) + { + pAction = rMetaFile.GetAction(b); + + if(META_GRADIENTEX_ACTION == pAction->GetType()) + { + pMetaGradientExAction = (const MetaGradientExAction*)pAction; + } + else if(META_COMMENT_ACTION == pAction->GetType()) + { + if(COMPARE_EQUAL == ((const MetaCommentAction*)pAction)->GetComment().CompareIgnoreCaseToAscii("XGRAD_SEQ_END")) + { + bDone = true; + } + } + } + + if(bDone && pMetaGradientExAction) + { + // consume actions and skip forward + a = b - 1; + + // get geometry data + basegfx::B2DPolyPolygon aPolyPolygon(pMetaGradientExAction->GetPolyPolygon().getB2DPolyPolygon()); + + if(aPolyPolygon.count()) + { + // transform geometry + aPolyPolygon.transform(rPropertyHolders.Current().getTransformation()); + + // get and check if gradient is a real gradient + const Gradient& rGradient = pMetaGradientExAction->GetGradient(); + const drawinglayer::attribute::FillGradientAttribute aAttribute(createFillGradientAttribute(rGradient)); + + if(aAttribute.getStartColor() == aAttribute.getEndColor()) + { + // not really a gradient + rTargetHolders.Current().append( + new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( + aPolyPolygon, + aAttribute.getStartColor())); + } + else + { + // really a gradient + rTargetHolders.Current().append( + new drawinglayer::primitive2d::PolyPolygonGradientPrimitive2D( + aPolyPolygon, + aAttribute)); + } + } + } + } + break; } default: @@ -2493,25 +2965,33 @@ namespace drawinglayer { Primitive2DSequence MetafilePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { + // prepare target and porperties; each will have one default entry TargetHolders aTargetHolders; PropertyHolders aPropertyHolders; + // interpret the Metafile interpretMetafile(getMetaFile(), aTargetHolders, aPropertyHolders, rViewInformation); - Primitive2DSequence xRetval = aTargetHolders.Current().getPrimitive2DSequence(aPropertyHolders.Current()); - if(xRetval.hasElements()) + // get the content. There should be ony one target, as in the start condition, + // but iterating will be the right thing to do when some push/pop is not closed + Primitive2DSequence xRetval; + + while(aTargetHolders.size() > 1) { - Rectangle aMtfTarget(getMetaFile().GetPrefMapMode().GetOrigin(), getMetaFile().GetPrefSize()); + appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, + aTargetHolders.Current().getPrimitive2DSequence(aPropertyHolders.Current())); + aTargetHolders.Pop(); + } - if(MAP_PIXEL == getMetaFile().GetPrefMapMode().GetMapUnit()) - { - aMtfTarget = Application::GetDefaultDevice()->PixelToLogic(aMtfTarget, MAP_100TH_MM); - } - else - { - aMtfTarget = Application::GetDefaultDevice()->LogicToLogic(aMtfTarget, getMetaFile().GetPrefMapMode(), MAP_100TH_MM); - } + appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, + aTargetHolders.Current().getPrimitive2DSequence(aPropertyHolders.Current())); + if(xRetval.hasElements()) + { + // get target size + const Rectangle aMtfTarget(getMetaFile().GetPrefMapMode().GetOrigin(), getMetaFile().GetPrefSize()); + + // create transformation basegfx::B2DHomMatrix aAdaptedTransform; aAdaptedTransform.translate(-aMtfTarget.Left(), -aMtfTarget.Top()); @@ -2520,6 +3000,7 @@ namespace drawinglayer aMtfTarget.getHeight() ? 1.0 / aMtfTarget.getHeight() : 1.0); aAdaptedTransform = getTransform() * aAdaptedTransform; + // embed to target transformation const Primitive2DReference aEmbeddedTransform( new TransformPrimitive2D( aAdaptedTransform, @@ -2555,8 +3036,13 @@ namespace drawinglayer basegfx::B2DRange MetafilePrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const { + // use own implementation to quickly answer the getB2DRange question. The + // MetafilePrimitive2D assumes that all geometry is inside of the shape. If + // this is not the case (i have already seen some wrong Metafiles) it should + // be embedded to a MaskPrimitive2D basegfx::B2DRange aRetval(0.0, 0.0, 1.0, 1.0); aRetval.transform(getTransform()); + return aRetval; } diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx index 9403df5376aa..f9d245f76a34 100644 --- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx @@ -81,17 +81,13 @@ namespace drawinglayer // see if something else needs to be done const bool bOverlineUsed(TEXT_LINE_NONE != getFontOverline()); const bool bUnderlineUsed(TEXT_LINE_NONE != getFontUnderline()); - const bool bStrikeoutUsed(FONT_STRIKEOUT_NONE != getFontStrikeout()); + const bool bStrikeoutUsed(TEXT_STRIKEOUT_NONE != getTextStrikeout()); if(bUnderlineUsed || bStrikeoutUsed || bOverlineUsed) { // common preparations TextLayouterDevice aTextLayouter; - // unscaled is needed since scale contains already the font size - const basegfx::B2DHomMatrix aUnscaledTransform(basegfx::tools::createShearXRotateTranslateB2DHomMatrix( - rDecTrans.getShearX(), rDecTrans.getRotate(), rDecTrans.getTranslate())); - // TextLayouterDevice is needed to get metrics for text decorations like // underline/strikeout/emphasis marks from it. For setup, the font size is needed aTextLayouter.setFontAttribute( @@ -149,10 +145,10 @@ namespace drawinglayer if(bStrikeoutUsed) { // create primitive geometry for strikeout - if(FONT_STRIKEOUT_SLASH == getFontStrikeout() || FONT_STRIKEOUT_X == getFontStrikeout()) + if(TEXT_STRIKEOUT_SLASH == getTextStrikeout() || TEXT_STRIKEOUT_X == getTextStrikeout()) { // strikeout with character - const sal_Unicode aStrikeoutChar(FONT_STRIKEOUT_SLASH == getFontStrikeout() ? '/' : 'X'); + const sal_Unicode aStrikeoutChar(TEXT_STRIKEOUT_SLASH == getTextStrikeout() ? '/' : 'X'); rTarget.push_back(Primitive2DReference( new TextCharacterStrikeoutPrimitive2D( @@ -173,7 +169,7 @@ namespace drawinglayer getFontColor(), aTextLayouter.getUnderlineHeight(), aTextLayouter.getStrikeoutOffset(), - getFontStrikeout()))); + getTextStrikeout()))); } } } @@ -420,15 +416,15 @@ namespace drawinglayer } } - // Handle Shadow, Outline and FontRelief + // Handle Shadow, Outline and TextRelief if(aRetval.hasElements()) { - // outline AND shadow depend on NO FontRelief (see dialog) - const bool bHasFontRelief(FONT_RELIEF_NONE != getFontRelief()); - const bool bHasShadow(!bHasFontRelief && getShadow()); - const bool bHasOutline(!bHasFontRelief && getFontAttribute().getOutline()); + // outline AND shadow depend on NO TextRelief (see dialog) + const bool bHasTextRelief(TEXT_RELIEF_NONE != getTextRelief()); + const bool bHasShadow(!bHasTextRelief && getShadow()); + const bool bHasOutline(!bHasTextRelief && getFontAttribute().getOutline()); - if(bHasShadow || bHasFontRelief || bHasOutline) + if(bHasShadow || bHasTextRelief || bHasOutline) { Primitive2DReference aShadow; @@ -453,7 +449,7 @@ namespace drawinglayer aRetval)); } - if(bHasFontRelief) + if(bHasTextRelief) { // create emboss using an own helper primitive since this will // be view-dependent @@ -463,7 +459,7 @@ namespace drawinglayer if(bDefaultTextColor) { - if(FONT_RELIEF_ENGRAVED == getFontRelief()) + if(TEXT_RELIEF_ENGRAVED == getTextRelief()) { aTextEffectStyle2D = TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED_DEFAULT; } @@ -474,7 +470,7 @@ namespace drawinglayer } else { - if(FONT_RELIEF_ENGRAVED == getFontRelief()) + if(TEXT_RELIEF_ENGRAVED == getTextRelief()) { aTextEffectStyle2D = TEXTEFFECTSTYLE2D_RELIEF_ENGRAVED; } @@ -535,21 +531,21 @@ namespace drawinglayer TextLine eFontOverline, TextLine eFontUnderline, bool bUnderlineAbove, - FontStrikeout eFontStrikeout, + TextStrikeout eTextStrikeout, bool bWordLineMode, - FontEmphasisMark eFontEmphasisMark, + TextEmphasisMark eTextEmphasisMark, bool bEmphasisMarkAbove, bool bEmphasisMarkBelow, - FontRelief eFontRelief, + TextRelief eTextRelief, bool bShadow) : TextSimplePortionPrimitive2D(rNewTransform, rText, aTextPosition, aTextLength, rDXArray, rFontAttribute, rLocale, rFontColor), maOverlineColor(rOverlineColor), maTextlineColor(rTextlineColor), meFontOverline(eFontOverline), meFontUnderline(eFontUnderline), - meFontStrikeout(eFontStrikeout), - meFontEmphasisMark(eFontEmphasisMark), - meFontRelief(eFontRelief), + meTextStrikeout(eTextStrikeout), + meTextEmphasisMark(eTextEmphasisMark), + meTextRelief(eTextRelief), mbUnderlineAbove(bUnderlineAbove), mbWordLineMode(bWordLineMode), mbEmphasisMarkAbove(bEmphasisMarkAbove), @@ -568,9 +564,9 @@ namespace drawinglayer && getTextlineColor() == rCompare.getTextlineColor() && getFontOverline() == rCompare.getFontOverline() && getFontUnderline() == rCompare.getFontUnderline() - && getFontStrikeout() == rCompare.getFontStrikeout() - && getFontEmphasisMark() == rCompare.getFontEmphasisMark() - && getFontRelief() == rCompare.getFontRelief() + && getTextStrikeout() == rCompare.getTextStrikeout() + && getTextEmphasisMark() == rCompare.getTextEmphasisMark() + && getTextRelief() == rCompare.getTextRelief() && getUnderlineAbove() == rCompare.getUnderlineAbove() && getWordLineMode() == rCompare.getWordLineMode() && getEmphasisMarkAbove() == rCompare.getEmphasisMarkAbove() @@ -589,9 +585,9 @@ namespace drawinglayer const bool bDecoratedIsNeeded( TEXT_LINE_NONE != getFontOverline() || TEXT_LINE_NONE != getFontUnderline() - || FONT_STRIKEOUT_NONE != getFontStrikeout() - || FONT_EMPHASISMARK_NONE != getFontEmphasisMark() - || FONT_RELIEF_NONE != getFontRelief() + || TEXT_STRIKEOUT_NONE != getTextStrikeout() + || TEXT_EMPHASISMARK_NONE != getTextEmphasisMark() + || TEXT_RELIEF_NONE != getTextRelief() || getShadow()); if(bDecoratedIsNeeded) diff --git a/drawinglayer/source/primitive2d/textenumsprimitive2d.cxx b/drawinglayer/source/primitive2d/textenumsprimitive2d.cxx new file mode 100644 index 000000000000..8b24668cb056 --- /dev/null +++ b/drawinglayer/source/primitive2d/textenumsprimitive2d.cxx @@ -0,0 +1,129 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: textprimitive2d.cxx,v $ + * + * $Revision: 1.22 $ + * + * last change: $Author: aw $ $Date: 2008-05-27 14:11:20 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_drawinglayer.hxx" + +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + TextLine mapFontUnderlineToTextLine(FontUnderline eLineStyle) + { + switch(eLineStyle) + { + case UNDERLINE_SINGLE: return TEXT_LINE_SINGLE; + case UNDERLINE_DOUBLE: return TEXT_LINE_DOUBLE; + case UNDERLINE_DOTTED: return TEXT_LINE_DOTTED; + case UNDERLINE_DASH: return TEXT_LINE_DASH; + case UNDERLINE_LONGDASH: return TEXT_LINE_LONGDASH; + case UNDERLINE_DASHDOT: return TEXT_LINE_DASHDOT; + case UNDERLINE_DASHDOTDOT: return TEXT_LINE_DASHDOTDOT; + case UNDERLINE_SMALLWAVE: return TEXT_LINE_SMALLWAVE; + case UNDERLINE_WAVE: return TEXT_LINE_WAVE; + case UNDERLINE_DOUBLEWAVE: return TEXT_LINE_DOUBLEWAVE; + case UNDERLINE_BOLD: return TEXT_LINE_BOLD; + case UNDERLINE_BOLDDOTTED: return TEXT_LINE_BOLDDOTTED; + case UNDERLINE_BOLDDASH: return TEXT_LINE_BOLDDASH; + case UNDERLINE_BOLDLONGDASH: return TEXT_LINE_BOLDLONGDASH; + case UNDERLINE_BOLDDASHDOT: return TEXT_LINE_BOLDDASHDOT; + case UNDERLINE_BOLDDASHDOTDOT: return TEXT_LINE_BOLDDASHDOTDOT; + case UNDERLINE_BOLDWAVE: return TEXT_LINE_BOLDWAVE; + // FontUnderline_FORCE_EQUAL_SIZE, UNDERLINE_DONTKNOW, UNDERLINE_NONE + default: return TEXT_LINE_NONE; + } + } + + FontUnderline mapTextLineToFontUnderline(TextLine eLineStyle) + { + switch(eLineStyle) + { + default: /*TEXT_LINE_NONE*/ return UNDERLINE_NONE; + case TEXT_LINE_SINGLE: return UNDERLINE_SINGLE; + case TEXT_LINE_DOUBLE: return UNDERLINE_DOUBLE; + case TEXT_LINE_DOTTED: return UNDERLINE_DOTTED; + case TEXT_LINE_DASH: return UNDERLINE_DASH; + case TEXT_LINE_LONGDASH: return UNDERLINE_LONGDASH; + case TEXT_LINE_DASHDOT: return UNDERLINE_DASHDOT; + case TEXT_LINE_DASHDOTDOT: return UNDERLINE_DASHDOTDOT; + case TEXT_LINE_SMALLWAVE: return UNDERLINE_SMALLWAVE; + case TEXT_LINE_WAVE: return UNDERLINE_WAVE; + case TEXT_LINE_DOUBLEWAVE: return UNDERLINE_DOUBLEWAVE; + case TEXT_LINE_BOLD: return UNDERLINE_BOLD; + case TEXT_LINE_BOLDDOTTED: return UNDERLINE_BOLDDOTTED; + case TEXT_LINE_BOLDDASH: return UNDERLINE_BOLDDASH; + case TEXT_LINE_BOLDLONGDASH: return UNDERLINE_LONGDASH; + case TEXT_LINE_BOLDDASHDOT: return UNDERLINE_BOLDDASHDOT; + case TEXT_LINE_BOLDDASHDOTDOT:return UNDERLINE_BOLDDASHDOT; + case TEXT_LINE_BOLDWAVE: return UNDERLINE_BOLDWAVE; + } + } + + TextStrikeout mapFontStrikeoutToTextStrikeout(FontStrikeout eFontStrikeout) + { + switch(eFontStrikeout) + { + case STRIKEOUT_SINGLE: return TEXT_STRIKEOUT_SINGLE; + case STRIKEOUT_DOUBLE: return TEXT_STRIKEOUT_DOUBLE; + case STRIKEOUT_BOLD: return TEXT_STRIKEOUT_BOLD; + case STRIKEOUT_SLASH: return TEXT_STRIKEOUT_SLASH; + case STRIKEOUT_X: return TEXT_STRIKEOUT_X; + // FontStrikeout_FORCE_EQUAL_SIZE, STRIKEOUT_NONE, STRIKEOUT_DONTKNOW + default: return TEXT_STRIKEOUT_NONE; + } + } + + FontStrikeout mapTextStrikeoutToFontStrikeout(TextStrikeout eTextStrikeout) + { + switch(eTextStrikeout) + { + default: /*case primitive2d::TEXT_STRIKEOUT_NONE*/ return STRIKEOUT_NONE; + case TEXT_STRIKEOUT_SINGLE: return STRIKEOUT_SINGLE; + case TEXT_STRIKEOUT_DOUBLE: return STRIKEOUT_DOUBLE; + case TEXT_STRIKEOUT_BOLD: return STRIKEOUT_BOLD; + case TEXT_STRIKEOUT_SLASH: return STRIKEOUT_SLASH; + case TEXT_STRIKEOUT_X: return STRIKEOUT_X; + } + } + + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx index 8b7d664dd62a..936c690d8af5 100644 --- a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx @@ -172,8 +172,8 @@ namespace drawinglayer { Primitive2DSequence TextGeometryStrikeoutPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { - OSL_ENSURE(FONT_STRIKEOUT_SLASH != getFontStrikeout() && FONT_STRIKEOUT_X != getFontStrikeout(), - "Wrong FONT_STRIKEOUT type; a TextCharacterStrikeoutPrimitive2D should be used (!)"); + OSL_ENSURE(TEXT_STRIKEOUT_SLASH != getTextStrikeout() && TEXT_STRIKEOUT_X != getTextStrikeout(), + "Wrong TEXT_STRIKEOUT type; a TextCharacterStrikeoutPrimitive2D should be used (!)"); // strikeout with geometry double fStrikeoutHeight(getHeight()); @@ -186,18 +186,18 @@ namespace drawinglayer getObjectTransformation().decompose(aScale, aTranslate, fRotate, fShearX); // set line attribute - switch(getFontStrikeout()) + switch(getTextStrikeout()) { - default : // case primitive2d::FONT_STRIKEOUT_SINGLE: + default : // case primitive2d::TEXT_STRIKEOUT_SINGLE: { break; } - case primitive2d::FONT_STRIKEOUT_DOUBLE: + case primitive2d::TEXT_STRIKEOUT_DOUBLE: { bDoubleLine = true; break; } - case primitive2d::FONT_STRIKEOUT_BOLD: + case primitive2d::TEXT_STRIKEOUT_BOLD: { fStrikeoutHeight *= 2.0; break; @@ -262,11 +262,11 @@ namespace drawinglayer const basegfx::BColor& rFontColor, double fHeight, double fOffset, - FontStrikeout eFontStrikeout) + TextStrikeout eTextStrikeout) : BaseTextStrikeoutPrimitive2D(rObjectTransformation, fWidth, rFontColor), mfHeight(fHeight), mfOffset(fOffset), - meFontStrikeout(eFontStrikeout) + meTextStrikeout(eTextStrikeout) { } @@ -278,7 +278,7 @@ namespace drawinglayer return (getHeight() == rCompare.getHeight() && getOffset() == rCompare.getOffset() - && getFontStrikeout() == rCompare.getFontStrikeout()); + && getTextStrikeout() == rCompare.getTextStrikeout()); } return false; diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 062af73f5f0a..a99115a095c4 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -74,6 +74,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// // for PDFExtOutDevData Graphic support @@ -1805,6 +1806,11 @@ namespace drawinglayer break; } + case PRIMITIVE2D_ID_EPSPRIMITIVE2D : + { + RenderEpsPrimitive2D(static_cast< const primitive2d::EpsPrimitive2D& >(rCandidate)); + break; + } default : { // process recursively diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 51192f2dc72f..5a74b0471b7f 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -68,6 +68,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -235,6 +236,7 @@ namespace drawinglayer static bool bTestMetaFilePrimitiveDecomposition(true); if(bTestMetaFilePrimitiveDecomposition) { + // use new Metafile decomposition process(rCandidate.get2DDecomposition(getViewInformation2D())); } else @@ -557,6 +559,11 @@ namespace drawinglayer mpOutputDevice->SetAntialiasing(nAntiAliasing); break; } + case PRIMITIVE2D_ID_EPSPRIMITIVE2D : + { + RenderEpsPrimitive2D(static_cast< const primitive2d::EpsPrimitive2D& >(rCandidate)); + break; + } default : { // process recursively diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 127d4845e672..40f3eebcc78b 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -64,6 +64,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// // control support @@ -100,34 +101,6 @@ namespace drawinglayer using ::com::sun::star::awt::XWindow; using ::com::sun::star::awt::PosSize::POSSIZE; - static FontUnderline mapTextLineStyle(drawinglayer::primitive2d::TextLine eLineStyle) - { - switch(eLineStyle) - { - default: - DBG_WARNING1( "DrawingLayer: Unknown text line style attribute (%d)!", eLineStyle ); - // fall through - case primitive2d::TEXT_LINE_NONE: return UNDERLINE_NONE; - case primitive2d::TEXT_LINE_SINGLE: return UNDERLINE_SINGLE; - case primitive2d::TEXT_LINE_DOUBLE: return UNDERLINE_DOUBLE; - case primitive2d::TEXT_LINE_DOTTED: return UNDERLINE_DOTTED; - case primitive2d::TEXT_LINE_DASH: return UNDERLINE_DASH; - case primitive2d::TEXT_LINE_LONGDASH: return UNDERLINE_LONGDASH; - case primitive2d::TEXT_LINE_DASHDOT: return UNDERLINE_DASHDOT; - case primitive2d::TEXT_LINE_DASHDOTDOT: return UNDERLINE_DASHDOTDOT; - case primitive2d::TEXT_LINE_SMALLWAVE: return UNDERLINE_SMALLWAVE; - case primitive2d::TEXT_LINE_WAVE: return UNDERLINE_WAVE; - case primitive2d::TEXT_LINE_DOUBLEWAVE: return UNDERLINE_DOUBLEWAVE; - case primitive2d::TEXT_LINE_BOLD: return UNDERLINE_BOLD; - case primitive2d::TEXT_LINE_BOLDDOTTED: return UNDERLINE_BOLDDOTTED; - case primitive2d::TEXT_LINE_BOLDDASH: return UNDERLINE_BOLDDASH; - case primitive2d::TEXT_LINE_BOLDLONGDASH: return UNDERLINE_LONGDASH; - case primitive2d::TEXT_LINE_BOLDDASHDOT: return UNDERLINE_BOLDDASHDOT; - case primitive2d::TEXT_LINE_BOLDDASHDOTDOT:return UNDERLINE_BOLDDASHDOT; - case primitive2d::TEXT_LINE_BOLDWAVE: return UNDERLINE_BOLDWAVE; - } - } - ////////////////////////////////////////////////////////////////////////////// // rendering support @@ -177,7 +150,7 @@ namespace drawinglayer mpOutputDevice->SetTextLineColor( Color(aTextlineColor) ); // set Overline attribute - const FontUnderline eFontOverline(mapTextLineStyle( pTCPP->getFontOverline() )); + const FontUnderline eFontOverline(mapTextLineToFontUnderline( pTCPP->getFontOverline() )); if( eFontOverline != UNDERLINE_NONE ) { aFont.SetOverline( eFontOverline ); @@ -188,7 +161,7 @@ namespace drawinglayer } // set Underline attribute - const FontUnderline eFontUnderline(mapTextLineStyle( pTCPP->getFontUnderline() )); + const FontUnderline eFontUnderline(mapTextLineToFontUnderline( pTCPP->getFontUnderline() )); if( eFontUnderline != UNDERLINE_NONE ) { aFont.SetUnderline( eFontUnderline ); @@ -199,35 +172,23 @@ namespace drawinglayer } // set Strikeout attribute - FontStrikeout eFontStrikeout = STRIKEOUT_NONE; - switch( pTCPP->getFontStrikeout() ) - { - default: - DBG_WARNING1( "DrawingLayer: Unknown strikeout attribute (%d)!", pTCPP->getFontStrikeout() ); - // fall through - case primitive2d::FONT_STRIKEOUT_NONE: eFontStrikeout = STRIKEOUT_NONE; break; - case primitive2d::FONT_STRIKEOUT_SINGLE: eFontStrikeout = STRIKEOUT_SINGLE; break; - case primitive2d::FONT_STRIKEOUT_DOUBLE: eFontStrikeout = STRIKEOUT_DOUBLE; break; - case primitive2d::FONT_STRIKEOUT_BOLD: eFontStrikeout = STRIKEOUT_BOLD; break; - case primitive2d::FONT_STRIKEOUT_SLASH: eFontStrikeout = STRIKEOUT_SLASH; break; - case primitive2d::FONT_STRIKEOUT_X: eFontStrikeout = STRIKEOUT_X; break; - } + const FontStrikeout eFontStrikeout(mapTextStrikeoutToFontStrikeout(pTCPP->getTextStrikeout())); if( eFontStrikeout != STRIKEOUT_NONE ) aFont.SetStrikeout( eFontStrikeout ); // set EmphasisMark attribute FontEmphasisMark eFontEmphasisMark = EMPHASISMARK_NONE; - switch( pTCPP->getFontEmphasisMark() ) + switch( pTCPP->getTextEmphasisMark() ) { default: - DBG_WARNING1( "DrawingLayer: Unknown EmphasisMark style (%d)!", pTCPP->getFontEmphasisMark() ); + DBG_WARNING1( "DrawingLayer: Unknown EmphasisMark style (%d)!", pTCPP->getTextEmphasisMark() ); // fall through - case primitive2d::FONT_EMPHASISMARK_NONE: eFontEmphasisMark = EMPHASISMARK_NONE; break; - case primitive2d::FONT_EMPHASISMARK_DOT: eFontEmphasisMark = EMPHASISMARK_DOT; break; - case primitive2d::FONT_EMPHASISMARK_CIRCLE: eFontEmphasisMark = EMPHASISMARK_CIRCLE; break; - case primitive2d::FONT_EMPHASISMARK_DISC: eFontEmphasisMark = EMPHASISMARK_DISC; break; - case primitive2d::FONT_EMPHASISMARK_ACCENT: eFontEmphasisMark = EMPHASISMARK_ACCENT; break; + case primitive2d::TEXT_EMPHASISMARK_NONE: eFontEmphasisMark = EMPHASISMARK_NONE; break; + case primitive2d::TEXT_EMPHASISMARK_DOT: eFontEmphasisMark = EMPHASISMARK_DOT; break; + case primitive2d::TEXT_EMPHASISMARK_CIRCLE: eFontEmphasisMark = EMPHASISMARK_CIRCLE; break; + case primitive2d::TEXT_EMPHASISMARK_DISC: eFontEmphasisMark = EMPHASISMARK_DISC; break; + case primitive2d::TEXT_EMPHASISMARK_ACCENT: eFontEmphasisMark = EMPHASISMARK_ACCENT; break; } if( eFontEmphasisMark != EMPHASISMARK_NONE ) @@ -243,14 +204,14 @@ namespace drawinglayer // set Relief attribute FontRelief eFontRelief = RELIEF_NONE; - switch( pTCPP->getFontRelief() ) + switch( pTCPP->getTextRelief() ) { default: - DBG_WARNING1( "DrawingLayer: Unknown Relief style (%d)!", pTCPP->getFontRelief() ); + DBG_WARNING1( "DrawingLayer: Unknown Relief style (%d)!", pTCPP->getTextRelief() ); // fall through - case primitive2d::FONT_RELIEF_NONE: eFontRelief = RELIEF_NONE; break; - case primitive2d::FONT_RELIEF_EMBOSSED: eFontRelief = RELIEF_EMBOSSED; break; - case primitive2d::FONT_RELIEF_ENGRAVED: eFontRelief = RELIEF_ENGRAVED; break; + case primitive2d::TEXT_RELIEF_NONE: eFontRelief = RELIEF_NONE; break; + case primitive2d::TEXT_RELIEF_EMBOSSED: eFontRelief = RELIEF_EMBOSSED; break; + case primitive2d::TEXT_RELIEF_ENGRAVED: eFontRelief = RELIEF_ENGRAVED; break; } if( eFontRelief != RELIEF_NONE ) @@ -1270,6 +1231,36 @@ namespace drawinglayer } } + void VclProcessor2D::RenderEpsPrimitive2D(const primitive2d::EpsPrimitive2D& rEpsPrimitive2D) + { + // The new decomposition of Metafiles made it necessary to add an Eps + // primitive to handle embedded Eps data. On some devices, this can be + // painted directly (mac, printer). Printer is handled in the + // VclMetafileProcessor2D by not decomposing the Metafiles at all. + // For Mac, the Eps should be painted directly, but unfortunately cannot + // be tested (only in the salgdi layer where true/false is returned). + // To risk nothing currently, always render it using VCL + basegfx::B2DRange aRange(0.0, 0.0, 1.0, 1.0); + aRange.transform(rEpsPrimitive2D.getEpsTransform()); + + if(!aRange.isEmpty()) + { + const Rectangle aRectangle( + (sal_Int32)floor(aRange.getMinX()), (sal_Int32)floor(aRange.getMinY()), + (sal_Int32)ceil(aRange.getMaxX()), (sal_Int32)ceil(aRange.getMaxY())); + + if(!aRectangle.IsEmpty()) + { + const GDIMetaFile& rMetafile = rEpsPrimitive2D.getMetaFile(); + mpOutputDevice->DrawEPS( + aRectangle.TopLeft(), + aRectangle.GetSize(), + rEpsPrimitive2D.getGfxLink(), + rMetafile.GetActionCount() ? const_cast(&rMetafile) : 0); + } + } + } + void VclProcessor2D::adaptLineToFillDrawMode() const { const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode()); diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index d45eb70f2f3f..1e8556aed201 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -80,32 +80,6 @@ namespace return aRetval; } - static drawinglayer::primitive2d::TextLine mapTextLineStyle(FontUnderline eLineStyle) - { - switch(eLineStyle) - { - case UNDERLINE_SINGLE: return drawinglayer::primitive2d::TEXT_LINE_SINGLE; - case UNDERLINE_DOUBLE: return drawinglayer::primitive2d::TEXT_LINE_DOUBLE; - case UNDERLINE_DOTTED: return drawinglayer::primitive2d::TEXT_LINE_DOTTED; - case UNDERLINE_DASH: return drawinglayer::primitive2d::TEXT_LINE_DASH; - case UNDERLINE_LONGDASH: return drawinglayer::primitive2d::TEXT_LINE_LONGDASH; - case UNDERLINE_DASHDOT: return drawinglayer::primitive2d::TEXT_LINE_DASHDOT; - case UNDERLINE_DASHDOTDOT: return drawinglayer::primitive2d::TEXT_LINE_DASHDOTDOT; - case UNDERLINE_SMALLWAVE: return drawinglayer::primitive2d::TEXT_LINE_SMALLWAVE; - case UNDERLINE_WAVE: return drawinglayer::primitive2d::TEXT_LINE_WAVE; - case UNDERLINE_DOUBLEWAVE: return drawinglayer::primitive2d::TEXT_LINE_DOUBLEWAVE; - case UNDERLINE_BOLD: return drawinglayer::primitive2d::TEXT_LINE_BOLD; - case UNDERLINE_BOLDDOTTED: return drawinglayer::primitive2d::TEXT_LINE_BOLDDOTTED; - case UNDERLINE_BOLDDASH: return drawinglayer::primitive2d::TEXT_LINE_BOLDDASH; - case UNDERLINE_BOLDLONGDASH: return drawinglayer::primitive2d::TEXT_LINE_BOLDLONGDASH; - case UNDERLINE_BOLDDASHDOT: return drawinglayer::primitive2d::TEXT_LINE_BOLDDASHDOT; - case UNDERLINE_BOLDDASHDOTDOT: return drawinglayer::primitive2d::TEXT_LINE_BOLDDASHDOTDOT; - case UNDERLINE_BOLDWAVE: return drawinglayer::primitive2d::TEXT_LINE_BOLDWAVE; - // FontUnderline_FORCE_EQUAL_SIZE, UNDERLINE_DONTKNOW, UNDERLINE_NONE - default: return drawinglayer::primitive2d::TEXT_LINE_NONE; - } - } - class impTextBreakupHandler { private: @@ -322,46 +296,40 @@ namespace const basegfx::BColor aBOverlineColor((0xffffffff == aOverlineColor.GetColor()) ? aBFontColor : aOverlineColor.getBColor()); // prepare overline and underline data - const drawinglayer::primitive2d::TextLine eFontOverline(mapTextLineStyle(rInfo.mrFont.GetOverline())); - const drawinglayer::primitive2d::TextLine eFontUnderline(mapTextLineStyle(rInfo.mrFont.GetUnderline())); + const drawinglayer::primitive2d::TextLine eFontOverline( + drawinglayer::primitive2d::mapFontUnderlineToTextLine(rInfo.mrFont.GetOverline())); + const drawinglayer::primitive2d::TextLine eFontUnderline( + drawinglayer::primitive2d::mapFontUnderlineToTextLine(rInfo.mrFont.GetUnderline())); // check UndelineAbove - const bool bUnderlineAbove(drawinglayer::primitive2d::TEXT_LINE_NONE != eFontUnderline && impIsUnderlineAbove(rInfo.mrFont)); + const bool bUnderlineAbove( + drawinglayer::primitive2d::TEXT_LINE_NONE != eFontUnderline && impIsUnderlineAbove(rInfo.mrFont)); // prepare strikeout data - drawinglayer::primitive2d::FontStrikeout eFontStrikeout(drawinglayer::primitive2d::FONT_STRIKEOUT_NONE); - - switch(rInfo.mrFont.GetStrikeout()) - { - case STRIKEOUT_SINGLE: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_SINGLE; break; - case STRIKEOUT_DOUBLE: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_DOUBLE; break; - case STRIKEOUT_BOLD: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_BOLD; break; - case STRIKEOUT_SLASH: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_SLASH; break; - case STRIKEOUT_X: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_X; break; - default : break; // FontStrikeout_FORCE_EQUAL_SIZE, STRIKEOUT_NONE, STRIKEOUT_DONTKNOW - } + const drawinglayer::primitive2d::TextStrikeout eTextStrikeout( + drawinglayer::primitive2d::mapFontStrikeoutToTextStrikeout(rInfo.mrFont.GetStrikeout())); // prepare emphasis mark data - drawinglayer::primitive2d::FontEmphasisMark eFontEmphasisMark(drawinglayer::primitive2d::FONT_EMPHASISMARK_NONE); + drawinglayer::primitive2d::TextEmphasisMark eTextEmphasisMark(drawinglayer::primitive2d::TEXT_EMPHASISMARK_NONE); switch(rInfo.mrFont.GetEmphasisMark() & EMPHASISMARK_STYLE) { - case EMPHASISMARK_DOT : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_DOT; break; - case EMPHASISMARK_CIRCLE : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_CIRCLE; break; - case EMPHASISMARK_DISC : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_DISC; break; - case EMPHASISMARK_ACCENT : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_ACCENT; break; + case EMPHASISMARK_DOT : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_EMPHASISMARK_DOT; break; + case EMPHASISMARK_CIRCLE : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_EMPHASISMARK_CIRCLE; break; + case EMPHASISMARK_DISC : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_EMPHASISMARK_DISC; break; + case EMPHASISMARK_ACCENT : eTextEmphasisMark = drawinglayer::primitive2d::TEXT_EMPHASISMARK_ACCENT; break; } const bool bEmphasisMarkAbove(rInfo.mrFont.GetEmphasisMark() & EMPHASISMARK_POS_ABOVE); const bool bEmphasisMarkBelow(rInfo.mrFont.GetEmphasisMark() & EMPHASISMARK_POS_BELOW); // prepare font relief data - drawinglayer::primitive2d::FontRelief eFontRelief(drawinglayer::primitive2d::FONT_RELIEF_NONE); + drawinglayer::primitive2d::TextRelief eTextRelief(drawinglayer::primitive2d::TEXT_RELIEF_NONE); switch(rInfo.mrFont.GetRelief()) { - case RELIEF_EMBOSSED : eFontRelief = drawinglayer::primitive2d::FONT_RELIEF_EMBOSSED; break; - case RELIEF_ENGRAVED : eFontRelief = drawinglayer::primitive2d::FONT_RELIEF_ENGRAVED; break; + case RELIEF_EMBOSSED : eTextRelief = drawinglayer::primitive2d::TEXT_RELIEF_EMBOSSED; break; + case RELIEF_ENGRAVED : eTextRelief = drawinglayer::primitive2d::TEXT_RELIEF_ENGRAVED; break; default : break; // RELIEF_NONE, FontRelief_FORCE_EQUAL_SIZE } @@ -387,12 +355,12 @@ namespace eFontOverline, eFontUnderline, bUnderlineAbove, - eFontStrikeout, + eTextStrikeout, bWordLineMode, - eFontEmphasisMark, + eTextEmphasisMark, bEmphasisMarkAbove, bEmphasisMarkBelow, - eFontRelief, + eTextRelief, bShadow); } else -- cgit From 5a68fee42aa92563adb8fa777bd680105792a89d Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 18 Nov 2009 13:08:25 +0100 Subject: aw078: changes after resync to DEV300m64 --- .../inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx | 6 +++--- drawinglayer/source/geometry/viewinformation2d.cxx | 2 +- drawinglayer/source/primitive2d/epsprimitive2d.cxx | 2 +- drawinglayer/source/primitive2d/metafileprimitive2d.cxx | 10 +++++----- drawinglayer/source/processor2d/hittestprocessor2d.cxx | 5 +++-- svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx | 5 +++-- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx index 8c0512402120..187e89f42e97 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx @@ -368,12 +368,12 @@ namespace drawinglayer /// the PolyPolygon geometry basegfx::B2DPolyPolygon maPolyPolygon; - /// the hatch definition - attribute::FillHatchAttribute maFillHatch; - /// the hatch background color (if used) basegfx::BColor maBackgroundColor; + /// the hatch definition + attribute::FillHatchAttribute maFillHatch; + protected: /// local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; diff --git a/drawinglayer/source/geometry/viewinformation2d.cxx b/drawinglayer/source/geometry/viewinformation2d.cxx index e03c946edf9e..3a3fd68831db 100644 --- a/drawinglayer/source/geometry/viewinformation2d.cxx +++ b/drawinglayer/source/geometry/viewinformation2d.cxx @@ -157,7 +157,7 @@ namespace drawinglayer mxExtendedInformation[nExtendedInsert++] = rProp; // for performance reasons, also cache content locally - sal_Bool bSalBool; + sal_Bool bSalBool(false); rProp.Value >>= bSalBool; mbReducedDisplayQuality = bSalBool; } diff --git a/drawinglayer/source/primitive2d/epsprimitive2d.cxx b/drawinglayer/source/primitive2d/epsprimitive2d.cxx index dc8128ab1386..5854e90cfb9f 100644 --- a/drawinglayer/source/primitive2d/epsprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/epsprimitive2d.cxx @@ -92,7 +92,7 @@ namespace drawinglayer return false; } - basegfx::B2DRange EpsPrimitive2D::getB2DRange(const geometry::ViewInformation2D& rViewInformation) const + basegfx::B2DRange EpsPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const { // use own implementation to quickly answer the getB2DRange question. basegfx::B2DRange aRetval(0.0, 0.0, 1.0, 1.0); diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 8434146c6f3a..e618093a7457 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -1930,9 +1930,9 @@ namespace // the metafile play interprets the single polygons from MetaPolyPolygonAction // always as closed and always paints an edge from last to first point, // so force to closed here to emulate that - for(sal_uInt32 a(0); a < aPolyPolygonOutline.count(); a++) + for(sal_uInt32 b(0); b < aPolyPolygonOutline.count(); b++) { - basegfx::B2DPolygon aPolygonOutline(aPolyPolygonOutline.getB2DPolygon(a)); + basegfx::B2DPolygon aPolygonOutline(aPolyPolygonOutline.getB2DPolygon(b)); if(aPolygonOutline.count() > 1 && !aPolygonOutline.isClosed()) { @@ -1989,14 +1989,14 @@ namespace /** NEEDS IMPLEMENTATION */ OSL_ENSURE(false, "META_STRETCHTEXT_ACTION requested (!)"); // use OutputDevice::GetTextArray() to map the... - const MetaStretchTextAction* pA = (const MetaStretchTextAction*)pAction; + // const MetaStretchTextAction* pA = (const MetaStretchTextAction*)pAction; break; } case META_TEXTRECT_ACTION : { /** NEEDS IMPLEMENTATION */ OSL_ENSURE(false, "META_TEXTRECT_ACTION requested (!)"); - const MetaTextRectAction* pA = (const MetaTextRectAction*)pAction; + // const MetaTextRectAction* pA = (const MetaTextRectAction*)pAction; break; } case META_BMP_ACTION : @@ -2655,7 +2655,7 @@ namespace const MetaRasterOpAction* pA = (const MetaRasterOpAction*)pAction; const RasterOp aRasterOp = pA->GetRasterOp(); - HandleNewRasterOp(pA->GetRasterOp(), rTargetHolders, rPropertyHolders); + HandleNewRasterOp(aRasterOp, rTargetHolders, rPropertyHolders); break; } diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx index 09eb6e3e71f6..ce9cadb6b40a 100644 --- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx +++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx @@ -449,8 +449,9 @@ namespace drawinglayer { if(!getHitTextOnly()) { - const primitive2d::ScenePrimitive2D& rCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate)); - check3DHit(rCandidate); + const primitive2d::ScenePrimitive2D& rScenePrimitive2D( + static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate)); + check3DHit(rScenePrimitive2D); } break; diff --git a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx index 0b2f8bf698c1..72035eb99569 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx @@ -56,13 +56,14 @@ namespace drawinglayer // defines if SdrTextWordWrapItem was set at SdrObjCustomShape which means // that the text needs to be block formatted unsigned mbWordWrap : 1; - // #SJ# Allow text clipping against TextBox in special cases (used for SC) - unsigned mbForceTextClipToTextRange : 1; // defines that the object contains/is a 3D AutoShape. Needed for // making exceptions with shadow generation unsigned mb3DShape : 1; + // #SJ# Allow text clipping against TextBox in special cases (used for SC) + unsigned mbForceTextClipToTextRange : 1; + protected: // local decomposition. virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const; -- cgit From d1eb6b5cb7482385397f03b56ef396905c5490e5 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 18 Nov 2009 13:08:25 +0100 Subject: aw078: changes after resync to DEV300m64 --- basegfx/test/basegfx2d.cxx | 4 +++- goodies/source/filter.vcl/eps/eps.cxx | 3 +-- vcl/aqua/source/gdi/salgdi.cxx | 1 + vcl/source/gdi/bitmapex.cxx | 2 +- vcl/source/glyphs/gcach_ftyp.cxx | 1 + vcl/unx/source/gdi/salgdi.cxx | 1 + 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx index b4c9453c1d3c..eadd99d31a42 100644 --- a/basegfx/test/basegfx2d.cxx +++ b/basegfx/test/basegfx2d.cxx @@ -484,8 +484,10 @@ public: } while ( nIndex >= 0 ); + // Adapted number of spaces from 50 to 67 because of the new circle construction + // methods which produce more points and thus more spaces, too. CPPUNIT_ASSERT_MESSAGE("exporting to circle does not produce the expected number of coordinates", - nCount==50); + nCount==67); const B2DPolygon aRect( tools::createPolygonFromRect( B2DRange(0.0,0.0,4000.0,4000.0) )); diff --git a/goodies/source/filter.vcl/eps/eps.cxx b/goodies/source/filter.vcl/eps/eps.cxx index b66c118dbf8a..5a4c1163b952 100644 --- a/goodies/source/filter.vcl/eps/eps.cxx +++ b/goodies/source/filter.vcl/eps/eps.cxx @@ -388,7 +388,7 @@ BOOL PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter bTextFillColor = TRUE; aTextFillColor = Color( COL_BLACK ); fLineWidth = 1; - fMiterLimit = 10; + fMiterLimit = 15; // use same limit as most graphic systems and basegfx eLineCap = SvtGraphicStroke::capButt; eJoinType = SvtGraphicStroke::joinMiter; aBackgroundColor = Color( COL_WHITE ); @@ -2377,7 +2377,6 @@ void PSWriter::ImplWriteLineInfo( const LineInfo& rLineInfo ) if ( rLineInfo.GetStyle() == LINE_DASH ) l_aDashArray.push_back( 2 ); const double fLWidth(( ( rLineInfo.GetWidth() + 1 ) + ( rLineInfo.GetWidth() + 1 ) ) * 0.5); - const double fMiterLimit(15.0); SvtGraphicStroke::JoinType aJoinType(SvtGraphicStroke::joinMiter); switch(rLineInfo.GetLineJoin()) diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx index 8d57d56a3667..f38b9852e57e 100644 --- a/vcl/aqua/source/gdi/salgdi.cxx +++ b/vcl/aqua/source/gdi/salgdi.cxx @@ -54,6 +54,7 @@ #include "basegfx/polygon/b2dpolygon.hxx" #include "basegfx/polygon/b2dpolygontools.hxx" #include "basegfx/matrix/b2dhommatrix.hxx" +#include using namespace vcl; diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index 6626a12d29a2..4e2ed20a7966 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -785,7 +785,7 @@ sal_uInt8 BitmapEx::GetTransparency(sal_Int32 nX, sal_Int32 nY) const if(pRead) { - const Color aColor(Color(pRead->GetColor(nY, nX))); + const Color aColor = pRead->GetColor(nY, nX); // if color is not equal to TransparentColor, we are not transparent if(aColor != aTransparentColor) diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx index 820f3f0d74a9..c782366928db 100644 --- a/vcl/source/glyphs/gcach_ftyp.cxx +++ b/vcl/source/glyphs/gcach_ftyp.cxx @@ -43,6 +43,7 @@ #include "tools/poly.hxx" #include "basegfx/matrix/b2dhommatrix.hxx" +#include #include "basegfx/polygon/b2dpolypolygon.hxx" #include "osl/file.hxx" diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx index bfc5aa9d66f4..5bf8b63dc6e2 100644 --- a/vcl/unx/source/gdi/salgdi.cxx +++ b/vcl/unx/source/gdi/salgdi.cxx @@ -50,6 +50,7 @@ #include "basegfx/polygon/b2dpolygonclipper.hxx" #include "basegfx/polygon/b2dlinegeometry.hxx" #include "basegfx/matrix/b2dhommatrix.hxx" +#include #include "basegfx/polygon/b2dpolypolygoncutter.hxx" #include -- cgit From 60164337599bbd71cdbb45a311b38e65ccfbc56f Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 19 Nov 2009 12:57:05 +0100 Subject: aw078: changes after resync --- svx/source/svdraw/svdfmtf.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 43fb95f31d40..a904718d2937 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -72,7 +72,7 @@ #include // FRound #include #include -#include +#include #include //////////////////////////////////////////////////////////////////////////////////////////////////// -- cgit From a5aae5938fb6bce788242895e6f9593fd27b6059 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 19 Nov 2009 12:57:05 +0100 Subject: aw078: changes after resync --- basegfx/test/basegfx2d.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx index eadd99d31a42..639933ace1e6 100644 --- a/basegfx/test/basegfx2d.cxx +++ b/basegfx/test/basegfx2d.cxx @@ -484,10 +484,13 @@ public: } while ( nIndex >= 0 ); - // Adapted number of spaces from 50 to 67 because of the new circle construction - // methods which produce more points and thus more spaces, too. + // Adapted number of spaces to 50 and 67 because of the new circle construction + // methods which produce more points and thus more spaces, too. Use both since + // depending on float precision and the getContinuity() implemetation using + // fTools::equal, linux and mac produce more 'C' than 'S' statements, while WIN32 + // uses more 'S' statements (as it should be for circles) CPPUNIT_ASSERT_MESSAGE("exporting to circle does not produce the expected number of coordinates", - nCount==67); + nCount==67 || nCount==50); const B2DPolygon aRect( tools::createPolygonFromRect( B2DRange(0.0,0.0,4000.0,4000.0) )); -- cgit From 3137d89c8a7632b89f55fdd638bca027593225b3 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Mon, 23 Nov 2009 12:30:29 +0100 Subject: aw078: #i106541# MetaTextRectAction implementation added, corrected/changed FontHandling when no FontSize is given --- .../drawinglayer/primitive2d/textlayoutdevice.hxx | 7 +++ .../source/primitive2d/graphicprimitive2d.cxx | 25 ++++++-- .../source/primitive2d/metafileprimitive2d.cxx | 73 ++++++++++++++++------ .../source/primitive2d/textlayoutdevice.cxx | 10 +++ drawinglayer/source/processor2d/vclprocessor2d.cxx | 25 +++++--- 5 files changed, 108 insertions(+), 32 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx index f454459211df..f3de43c22fd7 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx @@ -49,6 +49,7 @@ class VirtualDevice; class Font; class String; class OutputDevice; +class GDIMetaFile; namespace drawinglayer { namespace attribute { class FontAttribute; @@ -117,6 +118,12 @@ namespace drawinglayer double getFontAscent() const; double getFontDescent() const; + + void addTextRectActions( + const Rectangle& rRectangle, + const String& rText, + sal_uInt16 nStyle, + GDIMetaFile& rGDIMetaFile); }; } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index d7d3929a7a56..d224aca16709 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -55,6 +55,15 @@ #include #include +////////////////////////////////////////////////////////////////////////////// +// includes for testing MetafilePrimitive2D::create2DDecomposition + +#ifdef DBG_UTIL +#include +#include +#include +#endif // DBG_UTIL + ////////////////////////////////////////////////////////////////////////////// namespace @@ -207,10 +216,6 @@ namespace ////////////////////////////////////////////////////////////////////////////// -#include -#include -#include - namespace drawinglayer { namespace primitive2d @@ -297,11 +302,17 @@ namespace drawinglayer case GRAPHIC_GDIMETAFILE : { - // create MetafilePrimitive2D +#ifdef DBG_UTIL static bool bDoTest(false); if(bDoTest) { + // All this is/was test code for testing MetafilePrimitive2D::create2DDecomposition + // extensively. It may be needed again when diverse actions need debugging, so i leave + // it in here, but take it out using DBG_UTIL. + // Use it by compiling with the code, insert any DrawObject, convert to Metafile. The + // debugger will then stop here (when breakpoint set, of course). You may enter single + // parts of actions and/or change to true what You want to check. GDIMetaFile aMtf; VirtualDevice aOut; const basegfx::B2DRange aRange(getB2DRange(rViewInformation)); @@ -729,6 +740,8 @@ namespace drawinglayer } else { +#endif // DBG_UTIL + // create MetafilePrimitive2D const Graphic aGraphic(getGraphicObject().GetGraphic()); const GDIMetaFile& rMetafile = aTransformedGraphic.GetGDIMetaFile(); @@ -760,7 +773,9 @@ namespace drawinglayer basegfx::B2DPolyPolygon(aMaskPolygon), aChildContent)); } +#ifdef DBG_UTIL } +#endif // DBG_UTIL break; } diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index e618093a7457..94e642d06469 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -1994,9 +1994,53 @@ namespace } case META_TEXTRECT_ACTION : { - /** NEEDS IMPLEMENTATION */ - OSL_ENSURE(false, "META_TEXTRECT_ACTION requested (!)"); - // const MetaTextRectAction* pA = (const MetaTextRectAction*)pAction; + /** CHECKED, WORKS WELL */ + // OSL_ENSURE(false, "META_TEXTRECT_ACTION requested (!)"); + const MetaTextRectAction* pA = (const MetaTextRectAction*)pAction; + const Rectangle& rRectangle = pA->GetRect(); + + if(!rRectangle.IsEmpty() && 0 != pA->GetText().Len()) + { + // The problem with this action is that it describes unlayouted text + // and the layout capabilities are in EditEngine/Outliner in SVX. The + // same problem is true for VCL which internally has implementations + // to layout text in this case. There exists even a call + // OutputDevice::AddTextRectActions(...) to create the needed actions + // as 'sub-content' of a Metafile. Unfortunately i do not have an + // OutputDevice here since this interpreter tries to work without + // VCL AFAP. + // Since AddTextRectActions is the only way as long as we do not have + // a simple text layouter available, i will try to add it to the + // TextLayouterDevice isloation. + drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice; + aTextLayouterDevice.setFont(rPropertyHolders.Current().getFont()); + GDIMetaFile aGDIMetaFile; + + aTextLayouterDevice.addTextRectActions( + rRectangle, pA->GetText(), pA->GetStyle(), aGDIMetaFile); + + if(aGDIMetaFile.GetActionCount()) + { + // cerate sub-content + drawinglayer::primitive2d::Primitive2DSequence xSubContent; + { + rTargetHolders.Push(); + interpretMetafile(aGDIMetaFile, rTargetHolders, rPropertyHolders, rViewInformation); + xSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current()); + rTargetHolders.Pop(); + } + + if(xSubContent.hasElements()) + { + // add with transformation + rTargetHolders.Current().append( + new drawinglayer::primitive2d::TransformPrimitive2D( + rPropertyHolders.Current().getTransformation(), + xSubContent)); + } + } + } + break; } case META_BMP_ACTION : @@ -2557,22 +2601,12 @@ namespace // case. A height needs to be guessed (similar to OutputDevice::ImplNewFont()) Font aCorrectedFont(pA->GetFont()); - if(aFontSize.Width()) - { - // guess width - aFontSize = Size(0, aFontSize.Width() * 3); - } - else - { - // guess 21 pixel - aFontSize = Size(0, 21); - } + // guess 16 pixel (as in VCL) + aFontSize = Size(0, 16); - if(aFontSize.Height() < 75) - { - // assume size is in pixels and convert - aFontSize = Application::GetDefaultDevice()->PixelToLogic(aFontSize, MAP_100TH_MM); - } + // convert to target MapUnit if not pixels + aFontSize = Application::GetDefaultDevice()->LogicToLogic( + aFontSize, MAP_PIXEL, rPropertyHolders.Current().getMapUnit()); aCorrectedFont.SetSize(aFontSize); rPropertyHolders.Current().setFont(aCorrectedFont); @@ -2969,6 +3003,9 @@ namespace drawinglayer TargetHolders aTargetHolders; PropertyHolders aPropertyHolders; + // set target MapUnit at Properties + aPropertyHolders.Current().setMapUnit(getMetaFile().GetPrefMapMode().GetMapUnit()); + // interpret the Metafile interpretMetafile(getMetaFile(), aTargetHolders, aPropertyHolders, rViewInformation); diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index f24398a1a6ac..2950427d6b57 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -309,6 +309,16 @@ namespace drawinglayer const ::FontMetric& rMetric = mrDevice.GetFontMetric(); return rMetric.GetDescent(); } + + void TextLayouterDevice::addTextRectActions( + const Rectangle& rRectangle, + const String& rText, + sal_uInt16 nStyle, + GDIMetaFile& rGDIMetaFile) + { + mrDevice.AddTextRectActions( + rRectangle, rText, nStyle, rGDIMetaFile); + } } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 40f3eebcc78b..9def01619286 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -1235,13 +1235,13 @@ namespace drawinglayer { // The new decomposition of Metafiles made it necessary to add an Eps // primitive to handle embedded Eps data. On some devices, this can be - // painted directly (mac, printer). Printer is handled in the - // VclMetafileProcessor2D by not decomposing the Metafiles at all. - // For Mac, the Eps should be painted directly, but unfortunately cannot - // be tested (only in the salgdi layer where true/false is returned). - // To risk nothing currently, always render it using VCL + // painted directly (mac, printer). + // To be able to handle the replacement correctly, i need to handle it myself + // since DrawEPS will not be able e.g. to rotate the replacement. To be able + // to do that, i added a boolean return to OutputDevice::DrawEPS(..) + // to know when EPS was handled directly already. basegfx::B2DRange aRange(0.0, 0.0, 1.0, 1.0); - aRange.transform(rEpsPrimitive2D.getEpsTransform()); + aRange.transform(maCurrentTransformation * rEpsPrimitive2D.getEpsTransform()); if(!aRange.isEmpty()) { @@ -1251,12 +1251,19 @@ namespace drawinglayer if(!aRectangle.IsEmpty()) { - const GDIMetaFile& rMetafile = rEpsPrimitive2D.getMetaFile(); - mpOutputDevice->DrawEPS( + // try to paint EPS directly without fallback visualisation + const bool bEPSPaintedDirectly(mpOutputDevice->DrawEPS( aRectangle.TopLeft(), aRectangle.GetSize(), rEpsPrimitive2D.getGfxLink(), - rMetafile.GetActionCount() ? const_cast(&rMetafile) : 0); + 0)); + + if(!bEPSPaintedDirectly) + { + // use the decomposition which will correctly handle the + // fallback visualisation using full transformation (e.g. rotation) + process(rEpsPrimitive2D.get2DDecomposition(getViewInformation2D())); + } } } } -- cgit From a3235d7e7a5b59fc8af646867766ad807da0c78e Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Mon, 23 Nov 2009 12:30:29 +0100 Subject: aw078: #i106541# MetaTextRectAction implementation added, corrected/changed FontHandling when no FontSize is given --- vcl/inc/vcl/outdev.hxx | 7 ++++++- vcl/source/gdi/outdev6.cxx | 14 +++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx index f824151737d2..464b129fdb64 100644 --- a/vcl/inc/vcl/outdev.hxx +++ b/vcl/inc/vcl/outdev.hxx @@ -1104,7 +1104,12 @@ public: */ BOOL HasAlpha(); - void DrawEPS( const Point& rPt, const Size& rSz, + /** Added return value to see if EPS could be painted directly. + Theoreticaly, handing over a matrix would be needed to handle + painting rotated EPS files (e.g. contained mín Metafiles). This + would then need to be supported for Mac and PS printers, but + that's too much for now, wrote #i107046# for this */ + bool DrawEPS( const Point& rPt, const Size& rSz, const GfxLink& rGfxLink, GDIMetaFile* pSubst = NULL ); /// request XCanvas render interface for this OutputDevice diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx index 79986988afd7..2d436ea43659 100644 --- a/vcl/source/gdi/outdev6.cxx +++ b/vcl/source/gdi/outdev6.cxx @@ -1158,9 +1158,11 @@ void OutputDevice::ImplDraw2ColorFrame( const Rectangle& rRect, // ----------------------------------------------------------------------- -void OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, +bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, const GfxLink& rGfxLink, GDIMetaFile* pSubst ) { + bool bDrawn(true); + if ( mpMetaFile ) { GDIMetaFile aSubst; @@ -1172,20 +1174,20 @@ void OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, } if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() ) - return; + return bDrawn; if( mbOutputClipped ) - return; + return bDrawn; Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) ); + if( !aRect.IsEmpty() ) { // draw the real EPS graphics - bool bDrawn = FALSE; if( rGfxLink.GetData() && rGfxLink.GetDataSize() ) { if( !mpGraphics && !ImplGetGraphics() ) - return; + return bDrawn; if( mbInitClipRegion ) ImplInitClipRegion(); @@ -1208,4 +1210,6 @@ void OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, if( mpAlphaVDev ) mpAlphaVDev->DrawEPS( rPoint, rSize, rGfxLink, pSubst ); + + return bDrawn; } -- cgit From a250306f8fb95f935ac6318850434b79ca21dc8d Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Mon, 23 Nov 2009 16:27:16 +0100 Subject: #i105146# fixed mainly by not setting a page to visualize at the SdrPageObj's for handout page --- svx/inc/svx/svdpage.hxx | 3 +++ .../sdr/contact/viewobjectcontactofpageobj.cxx | 26 ++++++++++++++++++++-- svx/source/svdraw/svdpage.cxx | 6 +++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/svx/inc/svx/svdpage.hxx b/svx/inc/svx/svdpage.hxx index 6f2753c4e896..3523308b6e8f 100644 --- a/svx/inc/svx/svdpage.hxx +++ b/svx/inc/svx/svdpage.hxx @@ -563,6 +563,9 @@ public: const sdr::contact::DisplayInfo& rDisplayInfo, bool bEdit ); + /** Check if page is the HandoutMasterPage (in SVX, no PK_HANDOUT available) */ + bool isHandoutMasterPage() const; + ////////////////////////////////////////////////////////////////////////////// // sdr::Comment interface private: diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx index f81824c1012c..bd208b5cf54f 100644 --- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx @@ -44,6 +44,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -234,6 +235,9 @@ namespace sdr aPageObjectTransform.set(1, 2, aPageObjectBound.getMinY()); } + // #i102637# add gray frame also when printing and page exists (handout pages) + const bool bCreateGrayFrame(!GetObjectContact().isOutputToPrinter() || pPage); + // get displayed page's content. This is the uscaled page content if(mpExtractor && pPage) { @@ -289,10 +293,28 @@ namespace sdr xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xPagePreview, 1); } } + else if(bCreateGrayFrame) + { + // #i105146# no content, but frame display. To make hitting the page preview objects + // on the handout page more simple, add a HitTest fill primitive + const basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0); + basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aUnitRange)); + aOutline.transform(aPageObjectTransform); + + const drawinglayer::primitive2d::Primitive2DReference xHitFill( + new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( + basegfx::B2DPolyPolygon(aOutline), + basegfx::BColor(0.0, 0.0, 0.0))); + + const drawinglayer::primitive2d::Primitive2DReference xHit( + new drawinglayer::primitive2d::HitTestPrimitive2D( + drawinglayer::primitive2d::Primitive2DSequence(&xHitFill, 1))); + + xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xHit, 1); + } // add a gray outline frame, except not when printing - // #i102637# add frame also when printing and page exists (handout pages) - if(!GetObjectContact().isOutputToPrinter() || pPage) + if(bCreateGrayFrame) { const Color aFrameColor(aColorConfig.GetColorValue(svtools::OBJECTBOUNDARIES).nColor); basegfx::B2DPolygon aOwnOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0))); diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 05b5b5e5aca6..d3481e9387de 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -1825,6 +1825,12 @@ GDIMetaFile SdrPage::GetMetaFile(const SetOfByte& /*rVisibleLayers*/, FASTBOOL / return GDIMetaFile(); } +bool SdrPage::isHandoutMasterPage() const +{ + return mbMaster && GetModel() && GetModel()->GetMasterPageCount() + && GetModel()->GetMasterPage(0) == this; +} + ////////////////////////////////////////////////////////////////////////////// // sdr::Comment interface -- cgit From 2546b368921c771c4336e6db18543497389eaab7 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Mon, 23 Nov 2009 16:27:16 +0100 Subject: #i105146# fixed mainly by not setting a page to visualize at the SdrPageObj's for handout page --- sd/source/core/sdpage.cxx | 24 +++++++--------------- .../view/SlsPageObjectViewObjectContact.cxx | 14 ++++++++----- sd/source/ui/view/drviews1.cxx | 18 ++++------------ 3 files changed, 20 insertions(+), 36 deletions(-) diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 7f80b5bd763a..998f34363f33 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -302,8 +302,9 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec case PRESOBJ_HANDOUT: { //Erste Standardseite am SdrPageObj vermerken - SdrPage* pFirstPage = ( (SdDrawDocument*) pModel )->GetSdPage(0, PK_STANDARD); - pSdrObj = new SdrPageObj( pFirstPage ); + // #i105146# We want no content to be displayed for PK_HANDOUT, + // so just never set a page as content + pSdrObj = new SdrPageObj(0); pSdrObj->SetResizeProtect(TRUE); } break; @@ -745,28 +746,17 @@ void SdPage::CreateTitleAndLayout(BOOL bInit, BOOL bCreate ) CalculateHandoutAreas( *static_cast< SdDrawDocument* >(GetModel() ), pMasterPage->GetAutoLayout(), false, aAreas ); const bool bSkip = pMasterPage->GetAutoLayout() == AUTOLAYOUT_HANDOUT3; - - sal_uInt16 nPage = 0; std::vector< Rectangle >::iterator iter( aAreas.begin() ); + while( iter != aAreas.end() ) { SdrPageObj* pPageObj = static_cast(pMasterPage->CreatePresObj(PRESOBJ_HANDOUT, FALSE, (*iter++), TRUE) ); - - const sal_uInt16 nDestinationPageNum(2 * nPage + 1); - - if(nDestinationPageNum < pModel->GetPageCount()) - { - pPageObj->SetReferencedPage(pModel->GetPage(nDestinationPageNum)); - } - else - { - pPageObj->SetReferencedPage(0L); - } + // #i105146# We want no content to be displayed for PK_HANDOUT, + // so just never set a page as content + pPageObj->SetReferencedPage(0L); if( bSkip && iter != aAreas.end() ) iter++; - - nPage++; } } diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx index 8a66523280fc..8c3fd4532c4f 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx @@ -1191,12 +1191,16 @@ void PageObjectViewObjectContact::ActionChanged (void) // Even when we are called from destructor we still have to invalide // the preview bitmap in the cache. const SdrPage* pPage = GetPage(); - SdDrawDocument* pDocument = dynamic_cast(pPage->GetModel()); - if (mpCache!=NULL && pPage!=NULL && pDocument!=NULL) + + if(pPage) { - cache::PageCacheManager::Instance()->InvalidatePreviewBitmap( - pDocument->getUnoModel(), - GetPage()); + SdDrawDocument* pDocument = dynamic_cast(pPage->GetModel()); + if (mpCache!=NULL && pPage!=NULL && pDocument!=NULL) + { + cache::PageCacheManager::Instance()->InvalidatePreviewBitmap( + pDocument->getUnoModel(), + pPage); + } } // call parent diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 2077a852f960..3d7ec543943b 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -1196,25 +1196,15 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage) { // set pages for all available handout presentation objects sd::ShapeList& rShapeList = pMaster->GetPresentationShapeList(); - - sal_uInt16 nPgNum = 0; SdrObject* pObj = 0; + while( (pObj = rShapeList.getNextShape(pObj)) != 0 ) { if( pMaster->GetPresObjKind(pObj) == PRESOBJ_HANDOUT ) { - const sal_uInt16 nDestinationPageNum(2 * nPgNum + 1); - - if(nDestinationPageNum < GetDoc()->GetPageCount()) - { - static_cast(pObj)->SetReferencedPage(GetDoc()->GetPage(nDestinationPageNum)); - } - else - { - static_cast(pObj)->SetReferencedPage(0L); - } - - nPgNum++; + // #i105146# We want no content to be displayed for PK_HANDOUT, + // so just never set a page as content + static_cast(pObj)->SetReferencedPage(0); } } } -- cgit From 50c59ad9f307d16bc312d9b87b9fcfda1ea8f44c Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 24 Nov 2009 11:44:08 +0100 Subject: sb116: #i107157# redesigned java_environment.Registry to avoid memory leaks (and simplified code) --- .../uno/environments/java/java_environment.java | 192 ++++++++------------- 1 file changed, 76 insertions(+), 116 deletions(-) diff --git a/jurt/com/sun/star/lib/uno/environments/java/java_environment.java b/jurt/com/sun/star/lib/uno/environments/java/java_environment.java index 36404f28d57e..aa9a21a26b22 100644 --- a/jurt/com/sun/star/lib/uno/environments/java/java_environment.java +++ b/jurt/com/sun/star/lib/uno/environments/java/java_environment.java @@ -37,7 +37,6 @@ import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; import java.util.HashMap; import java.util.Iterator; -import java.util.LinkedList; /** * The java_environment is the environment where objects and @@ -159,70 +158,64 @@ public final class java_environment implements IEnvironment { } private static final class Registry { - public Object register(Object object, String oid, Type type) { - synchronized (map) { - cleanUp(); - Level1Entry l1 = getLevel1Entry(oid); - if (l1 != null) { - Level2Entry l2 = l1.get(type); - if (l2 != null) { - Object o = l2.get(); - if (o != null) { - l2.acquire(); - return o; - } + public synchronized Object register( + Object object, String oid, Type type) + { + cleanUp(); + Level1Entry l1 = level1map.get(oid); + if (l1 != null) { + Level2Entry l2 = l1.level2map.get(type); + if (l2 != null) { + Object o = l2.get(); + if (o != null) { + l2.acquire(); + return o; } } - // TODO If a holder references an unreachable object, but still - // has a positive count, it is replaced with a new holder - // (referencing a reachable object, and with a count of 1). Any - // later calls to revoke that should decrement the count of the - // previous holder would now decrement the count of the new - // holder, removing it prematurely. This is a design flaw that - // will be fixed when IEnvironment.revokeInterface is changed to - // no longer use counting. (And this problem is harmless, as - // currently a holder either references a strongly held object - // and uses register/revoke to control it, or references a - // weakly held proxy and never revokes it.) - if (l1 == null) { - l1 = new Level1Entry(); - map.put(oid, l1); - } - l1.add(new Level2Entry(oid, type, object, queue)); } + // TODO If a holder references an unreachable object, but still has + // a positive count, it is replaced with a new holder (referencing a + // reachable object, and with a count of 1). Any later calls to + // revoke that should decrement the count of the previous holder + // would now decrement the count of the new holder, removing it + // prematurely. This is a design flaw that will be fixed when + // IEnvironment.revokeInterface is changed to no longer use + // counting. (And this problem is harmless, as currently a holder + // either references a strongly held object and uses register/revoke + // to control it, or references a weakly held proxy and never + // revokes it.) + if (l1 == null) { + l1 = new Level1Entry(); + level1map.put(oid, l1); + } + l1.level2map.put(type, new Level2Entry(oid, type, object, queue)); return object; } - public boolean revoke(String oid, Type type) { - synchronized (map) { - Level1Entry l1 = getLevel1Entry(oid); - Level2Entry l2 = null; - if (l1 != null) { - l2 = l1.get(type); - if (l2 != null && l2.release()) { - removeLevel2Entry(oid, l1, l2); - } + public synchronized boolean revoke(String oid, Type type) { + Level1Entry l1 = level1map.get(oid); + Level2Entry l2 = null; + if (l1 != null) { + l2 = l1.level2map.get(type); + if (l2 != null && l2.release()) { + removeLevel2Entry(l1, oid, type); } - cleanUp(); - return l2 != null; } + cleanUp(); + return l2 != null; } - public Object get(String oid, Type type) { - synchronized (map) { - Level1Entry l1 = getLevel1Entry(oid); - return l1 == null ? null : l1.find(type); - } + public synchronized Object get(String oid, Type type) { + Level1Entry l1 = level1map.get(oid); + return l1 == null ? null : l1.find(type); } - public void clear() { - synchronized (map) { - map.clear(); - cleanUp(); - } + public synchronized void clear() { + level1map.clear(); + cleanUp(); } - // must only be called while synchronized on map: + // must only be called while synchronized on this Registry: private void cleanUp() { for (;;) { Level2Entry l2 = (Level2Entry) queue.poll(); @@ -235,55 +228,38 @@ public final class java_environment implements IEnvironment { // created since now e1.get() == null), and only then e1 is // enqueued. To not erroneously remove the new e2 in that case, // check whether the map still contains e1: - String oid = l2.getOid(); - Level1Entry l1 = getLevel1Entry(oid); - if (l1 != null && l1.get(l2.getType()) == l2) { - removeLevel2Entry(oid, l1, l2); + Level1Entry l1 = level1map.get(l2.oid); + if (l1 != null && l1.level2map.get(l2.type) == l2) { + removeLevel2Entry(l1, l2.oid, l2.type); } } } - // must only be called while synchronized on map: - private Level1Entry getLevel1Entry(String oid) { - return (Level1Entry) map.get(oid); - } - - // must only be called while synchronized on map: - private void removeLevel2Entry(String oid, Level1Entry l1, - Level2Entry l2) { - if (l1.remove(l2)) { - map.remove(oid); + // must only be called while synchronized on this Registry: + private void removeLevel2Entry(Level1Entry l1, String oid, Type type) { + l1.level2map.remove(type); + if (l1.level2map.isEmpty()) { + level1map.remove(oid); } } private static final class Level1Entry { - // must only be called while synchronized on map: - public Level2Entry get(Type type) { - for (Iterator i = list.iterator(); i.hasNext();) { - Level2Entry l2 = (Level2Entry) i.next(); - if (l2.getType().equals(type)) { - return l2; - } - } - return null; - } - - // must only be called while synchronized on map: + // must only be called while synchronized on enclosing Registry: public Object find(Type type) { // First, look for an exactly matching entry; then, look for an // arbitrary entry for a subtype of the request type: - for (Iterator i = list.iterator(); i.hasNext();) { - Level2Entry l2 = (Level2Entry) i.next(); - if (l2.getType().equals(type)) { - Object o = l2.get(); - if (o != null) { - return o; - } + Level2Entry l2 = level2map.get(type); + if (l2 != null) { + Object o = l2.get(); + if (o != null) { + return o; } } - for (Iterator i = list.iterator(); i.hasNext();) { - Level2Entry l2 = (Level2Entry) i.next(); - if (type.isSupertypeOf(l2.getType())) { + for (Iterator i = level2map.values().iterator(); + i.hasNext();) + { + l2 = i.next(); + if (type.isSupertypeOf(l2.type)) { Object o = l2.get(); if (o != null) { return o; @@ -293,53 +269,37 @@ public final class java_environment implements IEnvironment { return null; } - // must only be called while synchronized on map: - public void add(Level2Entry l2) { - list.add(l2); - } - - // must only be called while synchronized on map: - public boolean remove(Level2Entry l2) { - list.remove(l2); - return list.isEmpty(); - } - - private final LinkedList list = new LinkedList(); // of Level2Entry + public final HashMap level2map = + new HashMap(); } - private static final class Level2Entry extends WeakReference { - public Level2Entry(String oid, Type type, Object object, - ReferenceQueue queue) { + private static final class Level2Entry extends WeakReference { + public Level2Entry( + String oid, Type type, Object object, ReferenceQueue queue) + { super(object, queue); this.oid = oid; this.type = type; } - public String getOid() { - return oid; - } - - public Type getType() { - return type; - } - - // must only be called while synchronized on map: + // must only be called while synchronized on enclosing Registry: public void acquire() { ++count; } - // must only be called while synchronized on map: + // must only be called while synchronized on enclosing Registry: public boolean release() { return --count == 0; } - private final String oid; - private final Type type; + public final String oid; + public final Type type; + private int count = 1; } - private final HashMap map = new HashMap(); - // from OID (String) to Level1Entry + private final HashMap level1map = + new HashMap(); private final ReferenceQueue queue = new ReferenceQueue(); } -- cgit From 3f1ff108b3379c52b3ddb848cc1c603f554d0967 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 24 Nov 2009 12:13:33 +0100 Subject: #i103340# added MaskPrimitive2D::getB2DRange implementation --- drawinglayer/inc/drawinglayer/primitive2d/maskprimitive2d.hxx | 3 +++ drawinglayer/source/primitive2d/maskprimitive2d.cxx | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/drawinglayer/inc/drawinglayer/primitive2d/maskprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/maskprimitive2d.hxx index 72d5bd3b9b6b..e5cb12e6e87c 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/maskprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/maskprimitive2d.hxx @@ -77,6 +77,9 @@ namespace drawinglayer /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + /// get range + virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; + /// provide unique ID DeclPrimitrive2DIDBlock() }; diff --git a/drawinglayer/source/primitive2d/maskprimitive2d.cxx b/drawinglayer/source/primitive2d/maskprimitive2d.cxx index 20a4c98db67d..b32abae874ca 100644 --- a/drawinglayer/source/primitive2d/maskprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/maskprimitive2d.cxx @@ -69,6 +69,11 @@ namespace drawinglayer return false; } + basegfx::B2DRange MaskPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + return getMask().getB2DRange(); + } + // provide unique ID ImplPrimitrive2DIDBlock(MaskPrimitive2D, PRIMITIVE2D_ID_MASKPRIMITIVE2D) -- cgit From aed7c63fea58badc64a0b6be2122b97de4520e95 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 24 Nov 2009 12:13:33 +0100 Subject: #i103340# added MaskPrimitive2D::getB2DRange implementation --- tools/source/generic/poly.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 5cca29b3066e..eb8442f7cd93 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -1668,7 +1668,16 @@ void Polygon::Clip( const Rectangle& rRect, BOOL bPolygon ) Rectangle Polygon::GetBoundRect() const { DBG_CHKTHIS( Polygon, NULL ); - DBG_ASSERT( !mpImplPolygon->mpFlagAry, "GetBoundRect could fail with beziers!" ); + // Removing the assert. Bezier curves have the attribute that each single + // curve segment defined by four points can not exit the four-point polygon + // defined by that points. This allows to say that the curve segment can also + // never leave the Range of it's defining points. + // The result is that Polygon::GetBoundRect() may not create the minimal + // BoundRect of the Polygon (to get that, use basegfx::B2DPolygon classes), + // but will always create a valid BoundRect, at least as long as this method + // 'blindly' travels over all points, including control points. + // + // DBG_ASSERT( !mpImplPolygon->mpFlagAry, "GetBoundRect could fail with beziers!" ); USHORT nCount = mpImplPolygon->mnPoints; if( ! nCount ) -- cgit From 8d10c17b61cfc138419ab4a5db8bcde05c79ab2b Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 24 Nov 2009 13:33:53 +0100 Subject: aw078: adapted to Linux warning --- drawinglayer/source/primitive2d/graphicprimitive2d.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index d224aca16709..7c33d7974dd9 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -220,7 +220,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence GraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence GraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; -- cgit From 77a892d14999b5d528e2cdf5f883e3d1ed76d999 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Thu, 26 Nov 2009 22:59:27 +0100 Subject: remove last remains of FontOOo. long obsolete and msfontextract was removed by mh, too --- configure.in | 48 ------------------------------------------------ set_soenv.in | 2 -- 2 files changed, 50 deletions(-) diff --git a/configure.in b/configure.in index e41fa919e752..a84b9f8e32cc 100644 --- a/configure.in +++ b/configure.in @@ -115,10 +115,6 @@ AC_ARG_ENABLE(qadevooo, [ --disable-qadevooo OO.o includes some qa testsuites which some packagers may wish to build without ],,enable_qadevooo="yes") -AC_ARG_ENABLE(fontooo, -[ --disable-fontooo disable FontOOo - (useful for distributions using fontconfig for OOo) -],,enable_fontooo="yes") AC_ARG_ENABLE(mathmldtd, [ --disable-mathmldtd disable mathmldtd (useful for distributions that want to avoid packaging @@ -131,9 +127,6 @@ AC_ARG_ENABLE(evolution2, AC_ARG_WITH(system-stdlibs, [ --with-system-stdlibs use libstdc++/libgcc_s already on system ],,checkforprelink=yes) -AC_ARG_WITH(system-mspack, -[ --with-system-mspack use libmspack already installed on system -],,) AC_ARG_ENABLE(cups, [ --disable-cups disable cups support in the psprint project ],,enable_cups=yes) @@ -6246,47 +6239,6 @@ else fi AC_SUBST(ENABLE_KAB) -dnl =================================================================== -dnl Test whether to include FontOOo -dnl =================================================================== -AC_MSG_CHECKING([whether to include FontOOo]) -if test -n "$enable_fontooo"; then - if test "$enable_fontooo" = "no"; then - AC_MSG_RESULT([no]) - WITH_FONTOOO=NO - SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO" - else - AC_MSG_RESULT([yes]) - WITH_FONTOOO=YES - BUILD_TYPE="$BUILD_TYPE MSFONTEXTRACT" - fi -else - AC_MSG_RESULT([no]) - WITH_FONTOOO=NO - SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO" -fi -AC_SUBST(WITH_FONTOOO) - -if test "$WITH_FONTOOO" = "YES"; then - dnl =============================================================== - dnl Check whether to use libmspack from system - dnl =============================================================== - AC_MSG_CHECKING([whether to use system libmspack]) - if test -n "$with_system_mspack" -o -n "$with_system_libs" && \ - test "$with_system_mspack" != "no"; then - AC_MSG_RESULT([yes]) - SYSTEM_MSPACK=YES - AC_CHECK_HEADER(mspack.h, [], - [AC_MSG_ERROR([mspack.h not found, install libmspack])], []) - AC_CHECK_LIB(mspack, mspack_create_cab_decompressor, [], - [AC_MSG_ERROR(libmspack not installed or functional)], []) - else - AC_MSG_RESULT([no]) - SYSTEM_MSPACK=NO - fi -fi -AC_SUBST(SYSTEM_MSPACK) - dnl =================================================================== dnl Test whether to include MathMLDTD dnl =================================================================== diff --git a/set_soenv.in b/set_soenv.in index 462fb9533e97..51325c64ee53 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -1811,11 +1811,9 @@ ToFile( "WITHOUT_PPDS", "@WITHOUT_PPDS@", "e" ); ToFile( "WITH_BINFILTER", "@WITH_BINFILTER@", "e" ); ToFile( "BUILD_TYPE", "@BUILD_TYPE@", "e" ); ToFile( "VERBOSE", "@VERBOSE@", "e" ); -ToFile( "WITH_FONTOOO", "@WITH_FONTOOO@", "e" ); ToFile( "ENABLE_EVOAB2", "@ENABLE_EVOAB2@", "e" ); ToFile( "GOBJECT_CFLAGS", "@GOBJECT_CFLAGS@", "e" ); ToFile( "GOBJECT_LIBS", "@GOBJECT_LIBS@", "e" ); -ToFile( "SYSTEM_MSPACK", "@SYSTEM_MSPACK@", "e" ); if ( '@ENABLE_RPATH@' eq "no" ) { ToFile( "LINKFLAGSRUNPATH",'', "e" ); } -- cgit -- cgit From d68feb2d83342e474cf2d1cea82b0485ec566398 Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Thu, 26 Nov 2009 23:55:18 +0100 Subject: fontooocleanup: run autoconf --- configure | 18403 ++++++++++++++++++------------------------------------------ 1 file changed, 5399 insertions(+), 13004 deletions(-) diff --git a/configure b/configure index bbd1e35a1c1b..54c4e1e20f82 100755 --- a/configure +++ b/configure @@ -1,19 +1,23 @@ #! /bin/sh # From configure.in Revision: 1.290 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63. +# Generated by GNU Autoconf 2.65. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -21,23 +25,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -45,7 +41,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -56,7 +58,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -79,13 +81,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -95,15 +90,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -115,12 +110,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -132,7 +131,248 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -146,8 +386,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -167,412 +411,124 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit } -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi - -if as_func_ret_success; then - : +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi else - exitcode=1 - echo as_func_ret_success failed. + as_ln_s='cp -p' fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - exitcode=1 - echo positional parameters were not saved. + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi +as_executable_p=$as_test_x -test \$exitcode = 0) || { (exit 1); exit 1; } +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -590,7 +546,6 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= @@ -598,6 +553,7 @@ PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= +PACKAGE_URL= # Factoring default headers for most tests. ac_includes_default="\ @@ -658,8 +614,6 @@ SCPDEFS WITHOUT_AFMS WITHOUT_PPDS WITH_FONTS -SYSTEM_MSPACK -WITH_FONTOOO ENABLE_KAB ENABLE_EVOAB2 GOBJECT_LIBS @@ -1020,6 +974,7 @@ bindir program_transform_name prefix exec_prefix +PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION @@ -1051,11 +1006,9 @@ with_epm with_package_format enable_odk enable_qadevooo -enable_fontooo enable_mathmldtd enable_evolution2 with_system_stdlibs -with_system_mspack enable_cups enable_fontconfig enable_directx @@ -1321,8 +1274,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1348,8 +1300,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1553,8 +1504,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1570,8 +1520,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1601,17 +1550,17 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1628,15 +1577,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1659,8 +1606,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1690,11 +1636,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1733,13 +1677,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1868,9 +1810,6 @@ Optional Features: --disable-qadevooo OO.o includes some qa testsuites which some packagers may wish to build without - --disable-fontooo disable FontOOo - (useful for distributions using fontconfig for OOo) - --disable-mathmldtd disable mathmldtd (useful for distributions that want to avoid packaging it) @@ -2092,8 +2031,6 @@ Optional Packages: --with-system-stdlibs use libstdc++/libgcc_s already on system - --with-system-mspack use libmspack already installed on system - --with-system-cairo Use Cairo libraries already on system --with-mozilla-version Choose which version of mozilla to use while building @@ -2421,7 +2358,7 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command @@ -2432,6 +2369,7 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. +Report bugs to the package provider. _ACEOF ac_status=$? fi @@ -2495,43 +2433,879 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.63 +generated by GNU Autoconf 2.65 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -It was created by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## - $ $0 $@ +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -_ACEOF -exec 5>>config.log + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () { -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` +} # ac_fn_c_try_link -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_cxx_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_compile + +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_cpp + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 &5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_mongrel + +# ac_fn_cxx_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func + +# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES +# --------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_cxx_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_cxx_check_header_mongrel + +# ac_fn_cxx_try_run LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_cxx_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_run + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_member +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.65. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` @@ -2545,8 +3319,8 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } >&5 @@ -2583,9 +3357,9 @@ do ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -2601,13 +3375,13 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -2632,13 +3406,13 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -2710,37 +3484,39 @@ _ASBOX exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +#define PACKAGE_URL "$PACKAGE_URL" _ACEOF @@ -2760,8 +3536,8 @@ fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" @@ -2769,10 +3545,10 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;} done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; @@ -2780,7 +3556,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -2795,11 +3571,11 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; @@ -2809,17 +3585,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac @@ -2831,35 +3607,20 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi - - - - - - - - - - - - - - - - +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2871,13 +3632,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$@" >config.parms # Check whether --with-gnu-patch was given. -if test "${with_gnu_patch+set}" = set; then +if test "${with_gnu_patch+set}" = set; then : withval=$with_gnu_patch; fi # Check whether --with-agg was given. -if test "${with_agg+set}" = set; then +if test "${with_agg+set}" = set; then : withval=$with_agg; else with_agg=yes @@ -2885,60 +3646,60 @@ fi # Check whether --with-gnu-cp was given. -if test "${with_gnu_cp+set}" = set; then +if test "${with_gnu_cp+set}" = set; then : withval=$with_gnu_cp; fi # Check whether --enable-graphite was given. -if test "${enable_graphite+set}" = set; then +if test "${enable_graphite+set}" = set; then : enableval=$enable_graphite; fi # Check whether --with-system-graphite was given. -if test "${with_system_graphite+set}" = set; then +if test "${with_system_graphite+set}" = set; then : withval=$with_system_graphite; fi # Check whether --enable-ldap was given. -if test "${enable_ldap+set}" = set; then +if test "${enable_ldap+set}" = set; then : enableval=$enable_ldap; fi # Check whether --with-openldap was given. -if test "${with_openldap+set}" = set; then +if test "${with_openldap+set}" = set; then : withval=$with_openldap; fi # Check whether --enable-lockdown was given. -if test "${enable_lockdown+set}" = set; then +if test "${enable_lockdown+set}" = set; then : enableval=$enable_lockdown; fi # Check whether --enable-vba was given. -if test "${enable_vba+set}" = set; then +if test "${enable_vba+set}" = set; then : enableval=$enable_vba; fi # Check whether --with-vba-package-format was given. -if test "${with_vba_package_format+set}" = set; then +if test "${with_vba_package_format+set}" = set; then : withval=$with_vba_package_format; fi # Check whether --enable-pch was given. -if test "${enable_pch+set}" = set; then +if test "${enable_pch+set}" = set; then : enableval=$enable_pch; fi # Check whether --enable-hids was given. -if test "${enable_hids+set}" = set; then +if test "${enable_hids+set}" = set; then : enableval=$enable_hids; fi # Check whether --enable-mozilla was given. -if test "${enable_mozilla+set}" = set; then +if test "${enable_mozilla+set}" = set; then : enableval=$enable_mozilla; else enable_mozilla="yes" @@ -2946,24 +3707,24 @@ fi # Check whether --with-fonts was given. -if test "${with_fonts+set}" = set; then +if test "${with_fonts+set}" = set; then : withval=$with_fonts; fi # Check whether --with-ppds was given. -if test "${with_ppds+set}" = set; then +if test "${with_ppds+set}" = set; then : withval=$with_ppds; fi # Check whether --with-afms was given. -if test "${with_afms+set}" = set; then +if test "${with_afms+set}" = set; then : withval=$with_afms; fi # Check whether --enable-epm was given. -if test "${enable_epm+set}" = set; then +if test "${enable_epm+set}" = set; then : enableval=$enable_epm; else enable_epm="yes" @@ -2971,149 +3732,136 @@ fi # Check whether --with-epm was given. -if test "${with_epm+set}" = set; then +if test "${with_epm+set}" = set; then : withval=$with_epm; fi # Check whether --with-package-format was given. -if test "${with_package_format+set}" = set; then +if test "${with_package_format+set}" = set; then : withval=$with_package_format; fi # Check whether --enable-odk was given. -if test "${enable_odk+set}" = set; then +if test "${enable_odk+set}" = set; then : enableval=$enable_odk; else enable_odk="yes" fi # Check whether --enable-qadevooo was given. -if test "${enable_qadevooo+set}" = set; then +if test "${enable_qadevooo+set}" = set; then : enableval=$enable_qadevooo; else enable_qadevooo="yes" fi -# Check whether --enable-fontooo was given. -if test "${enable_fontooo+set}" = set; then - enableval=$enable_fontooo; -else - enable_fontooo="yes" -fi - # Check whether --enable-mathmldtd was given. -if test "${enable_mathmldtd+set}" = set; then +if test "${enable_mathmldtd+set}" = set; then : enableval=$enable_mathmldtd; else enable_mathmldtd="yes" fi # Check whether --enable-evolution2 was given. -if test "${enable_evolution2+set}" = set; then +if test "${enable_evolution2+set}" = set; then : enableval=$enable_evolution2; fi # Check whether --with-system-stdlibs was given. -if test "${with_system_stdlibs+set}" = set; then +if test "${with_system_stdlibs+set}" = set; then : withval=$with_system_stdlibs; else checkforprelink=yes fi - -# Check whether --with-system-mspack was given. -if test "${with_system_mspack+set}" = set; then - withval=$with_system_mspack; -fi - # Check whether --enable-cups was given. -if test "${enable_cups+set}" = set; then +if test "${enable_cups+set}" = set; then : enableval=$enable_cups; else enable_cups=yes fi # Check whether --enable-fontconfig was given. -if test "${enable_fontconfig+set}" = set; then +if test "${enable_fontconfig+set}" = set; then : enableval=$enable_fontconfig; else enable_fontconfig=yes fi # Check whether --enable-directx was given. -if test "${enable_directx+set}" = set; then +if test "${enable_directx+set}" = set; then : enableval=$enable_directx; else enable_directx=yes fi # Check whether --enable-activex was given. -if test "${enable_activex+set}" = set; then +if test "${enable_activex+set}" = set; then : enableval=$enable_activex; fi # Check whether --enable-atl was given. -if test "${enable_atl+set}" = set; then +if test "${enable_atl+set}" = set; then : enableval=$enable_atl; fi # Check whether --enable-symbols was given. -if test "${enable_symbols+set}" = set; then +if test "${enable_symbols+set}" = set; then : enableval=$enable_symbols; fi # Check whether --enable-strip-solver was given. -if test "${enable_strip_solver+set}" = set; then +if test "${enable_strip_solver+set}" = set; then : enableval=$enable_strip_solver; fi # Check whether --enable-werror was given. -if test "${enable_werror+set}" = set; then +if test "${enable_werror+set}" = set; then : enableval=$enable_werror; fi # Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then +if test "${enable_debug+set}" = set; then : enableval=$enable_debug; fi # Check whether --enable-dbgutil was given. -if test "${enable_dbgutil+set}" = set; then +if test "${enable_dbgutil+set}" = set; then : enableval=$enable_dbgutil; fi # Check whether --enable-crashdump was given. -if test "${enable_crashdump+set}" = set; then +if test "${enable_crashdump+set}" = set; then : enableval=$enable_crashdump; else enable_crashdump=no fi # Check whether --enable-cl-standard was given. -if test "${enable_cl_standard+set}" = set; then +if test "${enable_cl_standard+set}" = set; then : enableval=$enable_cl_standard; fi # Check whether --enable-gtk was given. -if test "${enable_gtk+set}" = set; then +if test "${enable_gtk+set}" = set; then : enableval=$enable_gtk; else enable_gtk=yes fi # Check whether --enable-systray was given. -if test "${enable_systray+set}" = set; then +if test "${enable_systray+set}" = set; then : enableval=$enable_systray; else enable_systray=yes fi # Check whether --enable-cairo was given. -if test "${enable_cairo+set}" = set; then +if test "${enable_cairo+set}" = set; then : enableval=$enable_cairo; else enable_cairo=no @@ -3121,139 +3869,139 @@ fi # Check whether --with-system-cairo was given. -if test "${with_system_cairo+set}" = set; then +if test "${with_system_cairo+set}" = set; then : withval=$with_system_cairo; fi # Check whether --enable-opengl was given. -if test "${enable_opengl+set}" = set; then +if test "${enable_opengl+set}" = set; then : enableval=$enable_opengl; else enable_opengl=no fi # Check whether --enable-dbus was given. -if test "${enable_dbus+set}" = set; then +if test "${enable_dbus+set}" = set; then : enableval=$enable_dbus; else enable_dbus=no fi # Check whether --enable-gconf was given. -if test "${enable_gconf+set}" = set; then +if test "${enable_gconf+set}" = set; then : enableval=$enable_gconf; else enable_gconf=yes fi # Check whether --enable-gnome-vfs was given. -if test "${enable_gnome_vfs+set}" = set; then +if test "${enable_gnome_vfs+set}" = set; then : enableval=$enable_gnome_vfs; else enable_gnome_vfs=yes fi # Check whether --enable-gio was given. -if test "${enable_gio+set}" = set; then +if test "${enable_gio+set}" = set; then : enableval=$enable_gio; else enable_gio=no fi # Check whether --enable-static-gtk was given. -if test "${enable_static_gtk+set}" = set; then +if test "${enable_static_gtk+set}" = set; then : enableval=$enable_static_gtk; fi # Check whether --enable-layout was given. -if test "${enable_layout+set}" = set; then +if test "${enable_layout+set}" = set; then : enableval=$enable_layout; fi # Check whether --enable-build-mozilla was given. -if test "${enable_build_mozilla+set}" = set; then +if test "${enable_build_mozilla+set}" = set; then : enableval=$enable_build_mozilla; fi # Check whether --with-mozilla-version was given. -if test "${with_mozilla_version+set}" = set; then +if test "${with_mozilla_version+set}" = set; then : withval=$with_mozilla_version; fi # Check whether --with-mozilla-toolkit was given. -if test "${with_mozilla_toolkit+set}" = set; then +if test "${with_mozilla_toolkit+set}" = set; then : withval=$with_mozilla_toolkit; fi # Check whether --enable-nss_module was given. -if test "${enable_nss_module+set}" = set; then +if test "${enable_nss_module+set}" = set; then : enableval=$enable_nss_module; else enable_nss_module=yes fi # Check whether --enable-kde was given. -if test "${enable_kde+set}" = set; then +if test "${enable_kde+set}" = set; then : enableval=$enable_kde; fi # Check whether --enable-kdeab was given. -if test "${enable_kdeab+set}" = set; then +if test "${enable_kdeab+set}" = set; then : enableval=$enable_kdeab; else if test "$enable_kde" = "yes"; then enable_kdeab=yes; fi fi # Check whether --enable-kde4 was given. -if test "${enable_kde4+set}" = set; then +if test "${enable_kde4+set}" = set; then : enableval=$enable_kde4; fi # Check whether --enable-binfilter was given. -if test "${enable_binfilter+set}" = set; then +if test "${enable_binfilter+set}" = set; then : enableval=$enable_binfilter; else if ! test -d ./binfilter; then enable_binfilter=no; fi fi # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then +if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; fi # Check whether --enable-pam was given. -if test "${enable_pam+set}" = set; then +if test "${enable_pam+set}" = set; then : enableval=$enable_pam; fi # Check whether --enable-pam-link was given. -if test "${enable_pam_link+set}" = set; then +if test "${enable_pam_link+set}" = set; then : enableval=$enable_pam_link; fi # Check whether --enable-crypt-link was given. -if test "${enable_crypt_link+set}" = set; then +if test "${enable_crypt_link+set}" = set; then : enableval=$enable_crypt_link; else enable_crypt_link=yes fi # Check whether --enable-xrender-link was given. -if test "${enable_xrender_link+set}" = set; then +if test "${enable_xrender_link+set}" = set; then : enableval=$enable_xrender_link; fi # Check whether --enable-randr was given. -if test "${enable_randr+set}" = set; then +if test "${enable_randr+set}" = set; then : enableval=$enable_randr; else enable_randr=yes fi # Check whether --enable-randr-link was given. -if test "${enable_randr_link+set}" = set; then +if test "${enable_randr_link+set}" = set; then : enableval=$enable_randr_link; else enable_randr_link=yes @@ -3261,412 +4009,412 @@ fi # Check whether --with-myspell-dicts was given. -if test "${with_myspell_dicts+set}" = set; then +if test "${with_myspell_dicts+set}" = set; then : withval=$with_myspell_dicts; fi # Check whether --with-system-dicts was given. -if test "${with_system_dicts+set}" = set; then +if test "${with_system_dicts+set}" = set; then : withval=$with_system_dicts; fi # Check whether --with-external-dict-dir was given. -if test "${with_external_dict_dir+set}" = set; then +if test "${with_external_dict_dir+set}" = set; then : withval=$with_external_dict_dir; fi # Check whether --with-external-hyph-dir was given. -if test "${with_external_hyph_dir+set}" = set; then +if test "${with_external_hyph_dir+set}" = set; then : withval=$with_external_hyph_dir; fi # Check whether --with-external-thes-dir was given. -if test "${with_external_thes_dir+set}" = set; then +if test "${with_external_thes_dir+set}" = set; then : withval=$with_external_thes_dir; fi # Check whether --with-system-libs was given. -if test "${with_system_libs+set}" = set; then +if test "${with_system_libs+set}" = set; then : withval=$with_system_libs; fi # Check whether --with-system-headers was given. -if test "${with_system_headers+set}" = set; then +if test "${with_system_headers+set}" = set; then : withval=$with_system_headers; fi # Check whether --with-system-jars was given. -if test "${with_system_jars+set}" = set; then +if test "${with_system_jars+set}" = set; then : withval=$with_system_jars; fi # Check whether --with-system-zlib was given. -if test "${with_system_zlib+set}" = set; then +if test "${with_system_zlib+set}" = set; then : withval=$with_system_zlib; fi # Check whether --with-system-openssl was given. -if test "${with_system_openssl+set}" = set; then +if test "${with_system_openssl+set}" = set; then : withval=$with_system_openssl; fi # Check whether --with-system-jpeg was given. -if test "${with_system_jpeg+set}" = set; then +if test "${with_system_jpeg+set}" = set; then : withval=$with_system_jpeg; fi # Check whether --with-system-expat was given. -if test "${with_system_expat+set}" = set; then +if test "${with_system_expat+set}" = set; then : withval=$with_system_expat; fi # Check whether --with-system-libwpd was given. -if test "${with_system_libwpd+set}" = set; then +if test "${with_system_libwpd+set}" = set; then : withval=$with_system_libwpd; fi # Check whether --with-system-libxml was given. -if test "${with_system_libxml+set}" = set; then +if test "${with_system_libxml+set}" = set; then : withval=$with_system_libxml; fi # Check whether --with-system-python was given. -if test "${with_system_python+set}" = set; then +if test "${with_system_python+set}" = set; then : withval=$with_system_python; fi # Check whether --with-system-icu was given. -if test "${with_system_icu+set}" = set; then +if test "${with_system_icu+set}" = set; then : withval=$with_system_icu; fi # Check whether --with-system-poppler was given. -if test "${with_system_poppler+set}" = set; then +if test "${with_system_poppler+set}" = set; then : withval=$with_system_poppler; fi # Check whether --with-system-db was given. -if test "${with_system_db+set}" = set; then +if test "${with_system_db+set}" = set; then : withval=$with_system_db; fi # Check whether --with-system-lucene was given. -if test "${with_system_lucene+set}" = set; then +if test "${with_system_lucene+set}" = set; then : withval=$with_system_lucene; fi # Check whether --with-lucene-core-jar was given. -if test "${with_lucene_core_jar+set}" = set; then +if test "${with_lucene_core_jar+set}" = set; then : withval=$with_lucene_core_jar; LUCENE_CORE_JAR="$withval" fi # Check whether --with-lucene-analyzers-jar was given. -if test "${with_lucene_analyzers_jar+set}" = set; then +if test "${with_lucene_analyzers_jar+set}" = set; then : withval=$with_lucene_analyzers_jar; LUCENE_ANALYZERS_JAR="$withval" fi # Check whether --with-system-hsqldb was given. -if test "${with_system_hsqldb+set}" = set; then +if test "${with_system_hsqldb+set}" = set; then : withval=$with_system_hsqldb; fi # Check whether --with-hsqldb-jar was given. -if test "${with_hsqldb_jar+set}" = set; then +if test "${with_hsqldb_jar+set}" = set; then : withval=$with_hsqldb_jar; HSQLDB_JAR="$withval" fi # Check whether --with-system-beanshell was given. -if test "${with_system_beanshell+set}" = set; then +if test "${with_system_beanshell+set}" = set; then : withval=$with_system_beanshell; fi # Check whether --with-beanshell-jar was given. -if test "${with_beanshell_jar+set}" = set; then +if test "${with_beanshell_jar+set}" = set; then : withval=$with_beanshell_jar; BSH_JAR="$withval" fi # Check whether --enable-minimizer was given. -if test "${enable_minimizer+set}" = set; then +if test "${enable_minimizer+set}" = set; then : enableval=$enable_minimizer; fi # Check whether --enable-presenter-console was given. -if test "${enable_presenter_console+set}" = set; then +if test "${enable_presenter_console+set}" = set; then : enableval=$enable_presenter_console; fi # Check whether --enable-pdfimport was given. -if test "${enable_pdfimport+set}" = set; then +if test "${enable_pdfimport+set}" = set; then : enableval=$enable_pdfimport; fi # Check whether --enable-wiki-publisher was given. -if test "${enable_wiki_publisher+set}" = set; then +if test "${enable_wiki_publisher+set}" = set; then : enableval=$enable_wiki_publisher; fi # Check whether --with-commons-codec-jar was given. -if test "${with_commons_codec_jar+set}" = set; then +if test "${with_commons_codec_jar+set}" = set; then : withval=$with_commons_codec_jar; COMMONS_CODEC_JAR="$withval" fi # Check whether --with-commons-lang-jar was given. -if test "${with_commons_lang_jar+set}" = set; then +if test "${with_commons_lang_jar+set}" = set; then : withval=$with_commons_lang_jar; COMMONS_LANG_JAR="$withval" fi # Check whether --with-commons-httpclient-jar was given. -if test "${with_commons_httpclient_jar+set}" = set; then +if test "${with_commons_httpclient_jar+set}" = set; then : withval=$with_commons_httpclient_jar; COMMONS_HTTPCLIENT_JAR="$withval" fi # Check whether --with-commons-logging-jar was given. -if test "${with_commons_logging_jar+set}" = set; then +if test "${with_commons_logging_jar+set}" = set; then : withval=$with_commons_logging_jar; COMMONS_LOGGING_JAR="$withval" fi # Check whether --with-servlet-api-jar was given. -if test "${with_servlet_api_jar+set}" = set; then +if test "${with_servlet_api_jar+set}" = set; then : withval=$with_servlet_api_jar; SERVLETAPI_JAR="$withval" fi # Check whether --enable-report-builder was given. -if test "${enable_report_builder+set}" = set; then +if test "${enable_report_builder+set}" = set; then : enableval=$enable_report_builder; fi # Check whether --with-system-jfreereport was given. -if test "${with_system_jfreereport+set}" = set; then +if test "${with_system_jfreereport+set}" = set; then : withval=$with_system_jfreereport; fi # Check whether --with-sac-jar was given. -if test "${with_sac_jar+set}" = set; then +if test "${with_sac_jar+set}" = set; then : withval=$with_sac_jar; SAC_JAR="$withval" fi # Check whether --with-libxml-jar was given. -if test "${with_libxml_jar+set}" = set; then +if test "${with_libxml_jar+set}" = set; then : withval=$with_libxml_jar; LIBXML_JAR="$withval" fi # Check whether --with-flute-jar was given. -if test "${with_flute_jar+set}" = set; then +if test "${with_flute_jar+set}" = set; then : withval=$with_flute_jar; FLUTE_JAR="$withval" fi # Check whether --with-jfreereport-jar was given. -if test "${with_jfreereport_jar+set}" = set; then +if test "${with_jfreereport_jar+set}" = set; then : withval=$with_jfreereport_jar; JFREEREPORT_JAR="$withval" fi # Check whether --with-liblayout-jar was given. -if test "${with_liblayout_jar+set}" = set; then +if test "${with_liblayout_jar+set}" = set; then : withval=$with_liblayout_jar; LIBLAYOUT_JAR="$withval" fi # Check whether --with-libloader-jar was given. -if test "${with_libloader_jar+set}" = set; then +if test "${with_libloader_jar+set}" = set; then : withval=$with_libloader_jar; LIBLOADER_JAR="$withval" fi # Check whether --with-libloader-jar was given. -if test "${with_libloader_jar+set}" = set; then +if test "${with_libloader_jar+set}" = set; then : withval=$with_libloader_jar; LIBLOADER_JAR="$withval" fi # Check whether --with-libformula-jar was given. -if test "${with_libformula_jar+set}" = set; then +if test "${with_libformula_jar+set}" = set; then : withval=$with_libformula_jar; LIBFORMULA_JAR="$withval" fi # Check whether --with-librepository-jar was given. -if test "${with_librepository_jar+set}" = set; then +if test "${with_librepository_jar+set}" = set; then : withval=$with_librepository_jar; LIBREPOSITORY_JAR="$withval" fi # Check whether --with-libfonts-jar was given. -if test "${with_libfonts_jar+set}" = set; then +if test "${with_libfonts_jar+set}" = set; then : withval=$with_libfonts_jar; LIBFONTS_JAR="$withval" fi # Check whether --with-libserializer-jar was given. -if test "${with_libserializer_jar+set}" = set; then +if test "${with_libserializer_jar+set}" = set; then : withval=$with_libserializer_jar; LIBSERIALIZER_JAR="$withval" fi # Check whether --with-libbase-jar was given. -if test "${with_libbase_jar+set}" = set; then +if test "${with_libbase_jar+set}" = set; then : withval=$with_libbase_jar; LIBBASE_JAR="$withval" fi # Check whether --with-system-saxon was given. -if test "${with_system_saxon+set}" = set; then +if test "${with_system_saxon+set}" = set; then : withval=$with_system_saxon; fi # Check whether --with-saxon-jar was given. -if test "${with_saxon_jar+set}" = set; then +if test "${with_saxon_jar+set}" = set; then : withval=$with_saxon_jar; SAXON_JAR="$withval" fi # Check whether --with-system-libxslt was given. -if test "${with_system_libxslt+set}" = set; then +if test "${with_system_libxslt+set}" = set; then : withval=$with_system_libxslt; fi # Check whether --with-system-odbc was given. -if test "${with_system_odbc+set}" = set; then +if test "${with_system_odbc+set}" = set; then : withval=$with_system_odbc; fi # Check whether --with-system-sane was given. -if test "${with_system_sane+set}" = set; then +if test "${with_system_sane+set}" = set; then : withval=$with_system_sane; fi # Check whether --with-system-xrender was given. -if test "${with_system_xrender+set}" = set; then +if test "${with_system_xrender+set}" = set; then : withval=$with_system_xrender; fi # Check whether --with-system-curl was given. -if test "${with_system_curl+set}" = set; then +if test "${with_system_curl+set}" = set; then : withval=$with_system_curl; fi # Check whether --with-system-boost was given. -if test "${with_system_boost+set}" = set; then +if test "${with_system_boost+set}" = set; then : withval=$with_system_boost; fi # Check whether --with-system-vigra was given. -if test "${with_system_vigra+set}" = set; then +if test "${with_system_vigra+set}" = set; then : withval=$with_system_vigra; fi # Check whether --enable-neon was given. -if test "${enable_neon+set}" = set; then +if test "${enable_neon+set}" = set; then : enableval=$enable_neon; fi # Check whether --enable-Xaw was given. -if test "${enable_Xaw+set}" = set; then +if test "${enable_Xaw+set}" = set; then : enableval=$enable_Xaw; fi # Check whether --with-system-neon was given. -if test "${with_system_neon+set}" = set; then +if test "${with_system_neon+set}" = set; then : withval=$with_system_neon; fi # Check whether --with-system-agg was given. -if test "${with_system_agg+set}" = set; then +if test "${with_system_agg+set}" = set; then : withval=$with_system_agg; fi # Check whether --with-system-hunspell was given. -if test "${with_system_hunspell+set}" = set; then +if test "${with_system_hunspell+set}" = set; then : withval=$with_system_hunspell; fi # Check whether --with-system-mythes was given. -if test "${with_system_mythes+set}" = set; then +if test "${with_system_mythes+set}" = set; then : withval=$with_system_mythes; fi # Check whether --with-system-altlinuxhyph was given. -if test "${with_system_altlinuxhyph+set}" = set; then +if test "${with_system_altlinuxhyph+set}" = set; then : withval=$with_system_altlinuxhyph; fi # Check whether --with-system-lpsolve was given. -if test "${with_system_lpsolve+set}" = set; then +if test "${with_system_lpsolve+set}" = set; then : withval=$with_system_lpsolve; fi # Check whether --with-system-mozilla was given. -if test "${with_system_mozilla+set}" = set; then +if test "${with_system_mozilla+set}" = set; then : withval=$with_system_mozilla; WITH_SYSTEM_MOZILLA=$withval else WITH_SYSTEM_MOZILLA=no @@ -3674,7 +4422,7 @@ fi # Check whether --with-stlport was given. -if test "${with_stlport+set}" = set; then +if test "${with_stlport+set}" = set; then : withval=$with_stlport; WITH_STLPORT=$withval else WITH_STLPORT=auto @@ -3682,114 +4430,114 @@ fi # Check whether --with-jdk-home was given. -if test "${with_jdk_home+set}" = set; then +if test "${with_jdk_home+set}" = set; then : withval=$with_jdk_home; fi # Check whether --with-gxx_include_path was given. -if test "${with_gxx_include_path+set}" = set; then +if test "${with_gxx_include_path+set}" = set; then : withval=$with_gxx_include_path; fi # Check whether --with-java was given. -if test "${with_java+set}" = set; then +if test "${with_java+set}" = set; then : withval=$with_java; if test "$withval" = "yes"; then WITH_JAVA=java; else WITH_JAVA=$withval; fi else WITH_JAVA=java fi # Check whether --enable-gcjaot was given. -if test "${enable_gcjaot+set}" = set; then +if test "${enable_gcjaot+set}" = set; then : enableval=$enable_gcjaot; fi # Check whether --with-ant-home was given. -if test "${with_ant_home+set}" = set; then +if test "${with_ant_home+set}" = set; then : withval=$with_ant_home; fi # Check whether --with-perl-home was given. -if test "${with_perl_home+set}" = set; then +if test "${with_perl_home+set}" = set; then : withval=$with_perl_home; fi # Check whether --with-cl-home was given. -if test "${with_cl_home+set}" = set; then +if test "${with_cl_home+set}" = set; then : withval=$with_cl_home; fi # Check whether --with-mspdb-path was given. -if test "${with_mspdb_path+set}" = set; then +if test "${with_mspdb_path+set}" = set; then : withval=$with_mspdb_path; fi # Check whether --with-midl-path was given. -if test "${with_midl_path+set}" = set; then +if test "${with_midl_path+set}" = set; then : withval=$with_midl_path; fi # Check whether --with-csc-path was given. -if test "${with_csc_path+set}" = set; then +if test "${with_csc_path+set}" = set; then : withval=$with_csc_path; fi # Check whether --with-nsis-path was given. -if test "${with_nsis_path+set}" = set; then +if test "${with_nsis_path+set}" = set; then : withval=$with_nsis_path; fi # Check whether --with-frame-home was given. -if test "${with_frame_home+set}" = set; then +if test "${with_frame_home+set}" = set; then : withval=$with_frame_home; fi # Check whether --with-psdk-home was given. -if test "${with_psdk_home+set}" = set; then +if test "${with_psdk_home+set}" = set; then : withval=$with_psdk_home; fi # Check whether --with-directx-home was given. -if test "${with_directx_home+set}" = set; then +if test "${with_directx_home+set}" = set; then : withval=$with_directx_home; fi # Check whether --with-mozilla-build was given. -if test "${with_mozilla_build+set}" = set; then +if test "${with_mozilla_build+set}" = set; then : withval=$with_mozilla_build; MOZILLABUILD=$withval fi # Check whether --with-local-solenv was given. -if test "${with_local_solenv+set}" = set; then +if test "${with_local_solenv+set}" = set; then : withval=$with_local_solenv; fi # Check whether --with-local-solver was given. -if test "${with_local_solver+set}" = set; then +if test "${with_local_solver+set}" = set; then : withval=$with_local_solver; fi # Check whether --enable-check-only was given. -if test "${enable_check_only+set}" = set; then +if test "${enable_check_only+set}" = set; then : enableval=$enable_check_only; fi # Check whether --enable-ccache-skip was given. -if test "${enable_ccache_skip+set}" = set; then +if test "${enable_ccache_skip+set}" = set; then : enableval=$enable_ccache_skip; else enable_ccache_skip=auto @@ -3797,73 +4545,73 @@ fi # Check whether --with-lang was given. -if test "${with_lang+set}" = set; then +if test "${with_lang+set}" = set; then : withval=$with_lang; fi # Check whether --with-poor-help-localizations was given. -if test "${with_poor_help_localizations+set}" = set; then +if test "${with_poor_help_localizations+set}" = set; then : withval=$with_poor_help_localizations; fi # Check whether --with-dict was given. -if test "${with_dict+set}" = set; then +if test "${with_dict+set}" = set; then : withval=$with_dict; fi # Check whether --with-intro-bitmaps was given. -if test "${with_intro_bitmaps+set}" = set; then +if test "${with_intro_bitmaps+set}" = set; then : withval=$with_intro_bitmaps; fi # Check whether --with-about-bitmaps was given. -if test "${with_about_bitmaps+set}" = set; then +if test "${with_about_bitmaps+set}" = set; then : withval=$with_about_bitmaps; fi # Check whether --with-vendor was given. -if test "${with_vendor+set}" = set; then +if test "${with_vendor+set}" = set; then : withval=$with_vendor; fi # Check whether --with-unix-wrapper was given. -if test "${with_unix_wrapper+set}" = set; then +if test "${with_unix_wrapper+set}" = set; then : withval=$with_unix_wrapper; fi # Check whether --with-asm-home was given. -if test "${with_asm_home+set}" = set; then +if test "${with_asm_home+set}" = set; then : withval=$with_asm_home; fi # Check whether --with-os-version was given. -if test "${with_os_version+set}" = set; then +if test "${with_os_version+set}" = set; then : withval=$with_os_version; fi # Check whether --with-unzip-home was given. -if test "${with_unzip_home+set}" = set; then +if test "${with_unzip_home+set}" = set; then : withval=$with_unzip_home; fi # Check whether --with-zip-home was given. -if test "${with_zip_home+set}" = set; then +if test "${with_zip_home+set}" = set; then : withval=$with_zip_home; fi # Check whether --with-mingwin was given. -if test "${with_mingwin+set}" = set; then +if test "${with_mingwin+set}" = set; then : withval=$with_mingwin; WITH_MINGWIN=$withval else WITH_MINGWIN=0 @@ -3871,7 +4619,7 @@ fi # Check whether --with-use-shell was given. -if test "${with_use_shell+set}" = set; then +if test "${with_use_shell+set}" = set; then : withval=$with_use_shell; with_use_shell=$withval else with_use_shell="tcsh" @@ -3879,23 +4627,23 @@ fi # Check whether --with-build-version was given. -if test "${with_build_version+set}" = set; then +if test "${with_build_version+set}" = set; then : withval=$with_build_version; with_build_version=$withval fi # Check whether --enable-sgistl was given. -if test "${enable_sgistl+set}" = set; then +if test "${enable_sgistl+set}" = set; then : enableval=$enable_sgistl; fi # Check whether --with-alloc was given. -if test "${with_alloc+set}" = set; then +if test "${with_alloc+set}" = set; then : withval=$with_alloc; fi # Check whether --enable-verbose was given. -if test "${enable_verbose+set}" = set; then +if test "${enable_verbose+set}" = set; then : enableval=$enable_verbose; fi @@ -3925,9 +4673,9 @@ echo "* *" echo "********************************************************************" echo "" cat /dev/null > warn -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then +if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -3938,7 +4686,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue @@ -3958,7 +4706,7 @@ case `"$ac_path_GREP" --version 2>&1` in $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -3973,26 +4721,24 @@ esac $ac_path_GREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then +if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -4006,7 +4752,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue @@ -4026,7 +4772,7 @@ case `"$ac_path_EGREP" --version 2>&1` in $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -4041,12 +4787,10 @@ esac $ac_path_EGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4054,7 +4798,7 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" @@ -4063,9 +4807,9 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then +if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -4076,24 +4820,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4103,9 +4847,9 @@ done # Extract the first word of "$AWK", so it can be a program name with args. set dummy $AWK; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_AWK+set}" = set; then +if test "${ac_cv_path_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else case $AWK in @@ -4118,14 +4862,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -4133,27 +4877,25 @@ esac fi AWK=$ac_cv_path_AWK if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$AWK"; then - { { $as_echo "$as_me:$LINENO: error: install awk to run this script" >&5 -$as_echo "$as_me: error: install awk to run this script" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "install awk to run this script" "$LINENO" 5 fi for ac_prog in sed do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then +if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else case $SED in @@ -4166,14 +4908,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -4181,10 +4923,10 @@ esac fi SED=$ac_cv_path_SED if test -n "$SED"; then - { $as_echo "$as_me:$LINENO: result: $SED" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 $as_echo "$SED" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4193,20 +4935,18 @@ fi done if test -z "$SED"; then - { { $as_echo "$as_me:$LINENO: error: install sed to run this script" >&5 -$as_echo "$as_me: error: install sed to run this script" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "install sed to run this script" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: checking for solenv environment" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for solenv environment" >&5 $as_echo_n "checking for solenv environment... " >&6; } if test -z "$with_local_solenv"; then LOCAL_SOLENV="DEFAULT" - { $as_echo "$as_me:$LINENO: result: default" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5 $as_echo "default" >&6; } else LOCAL_SOLENV=$with_local_solenv - { $as_echo "$as_me:$LINENO: result: $with_local_solenv" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_local_solenv" >&5 $as_echo "$with_local_solenv" >&6; } fi @@ -4225,31 +4965,21 @@ if test -e $_solenv/inc/minor.mk; then SOURCEVERSION="`grep SOURCEVERSION= $_solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" else - { { $as_echo "$as_me:$LINENO: error: $_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." >&5 -$as_echo "$as_me: error: $_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$_solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation..." "$LINENO" 5 fi ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done done if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -4263,35 +4993,27 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then +if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -4307,28 +5029,24 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then +if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4344,28 +5062,24 @@ IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:$LINENO: checking target system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } -if test "${ac_cv_target+set}" = set; then +if test "${ac_cv_target+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 -$as_echo "$as_me: error: invalid value of canonical target" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' @@ -4387,23 +5101,22 @@ test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- + if test "$build" != "$host" -o "$build" != "$target" \ -o "$host" != "$target"; then - { $as_echo "$as_me:$LINENO: WARNING: cross-compiling by any means is not supported (yet)!" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling by any means is not supported (yet)!" >&5 $as_echo "$as_me: WARNING: cross-compiling by any means is not supported (yet)!" >&2;} echo "cross-compiling by any means is not supported (yet)!" >> warn fi if echo "$build_os" | grep cygwin; then - { $as_echo "$as_me:$LINENO: checking Cygwin version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Cygwin version" >&5 $as_echo_n "checking Cygwin version... " >&6; } CygwinVer=`uname -r` - { $as_echo "$as_me:$LINENO: result: $CygwinVer" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CygwinVer" >&5 $as_echo "$CygwinVer" >&6; } if test "`echo $CygwinVer | $AWK -F . '{ print $1$2 }'`" -lt "15"; then - { { $as_echo "$as_me:$LINENO: error: You need at least Cygwin V1.5.x" >&5 -$as_echo "$as_me: error: You need at least Cygwin V1.5.x" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "You need at least Cygwin V1.5.x" "$LINENO" 5 fi else CygwinVer="false" @@ -4420,9 +5133,9 @@ case "$build_os" in _os=SunOS # Extract the first word of "gtar", so it can be a program name with args. set dummy gtar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GNUTAR+set}" = set; then +if test "${ac_cv_path_GNUTAR+set}" = set; then : $as_echo_n "(cached) " >&6 else case $GNUTAR in @@ -4436,14 +5149,14 @@ for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GNUTAR="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -4451,42 +5164,36 @@ esac fi GNUTAR=$ac_cv_path_GNUTAR if test -n "$GNUTAR"; then - { $as_echo "$as_me:$LINENO: result: $GNUTAR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUTAR" >&5 $as_echo "$GNUTAR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$GNUTAR"; then - { { $as_echo "$as_me:$LINENO: error: gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." >&5 -$as_echo "$as_me: error: gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "gtar (gnu tar) not found but needed. Install it (SUN Freeware package)." "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking the Solaris operating system release" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the Solaris operating system release" >&5 $as_echo_n "checking the Solaris operating system release... " >&6; } _os_release=`echo $build_os | $SED -e s/solaris2\.//` if test "$_os_release" -lt "6"; then - { { $as_echo "$as_me:$LINENO: error: use solaris >= 6 to build OpenOffice.org" >&5 -$as_echo "$as_me: error: use solaris >= 6 to build OpenOffice.org" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "use solaris >= 6 to build OpenOffice.org" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: result: ok ($_os_release)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok ($_os_release)" >&5 $as_echo "ok ($_os_release)" >&6; } fi - { $as_echo "$as_me:$LINENO: checking the processor type" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the processor type" >&5 $as_echo_n "checking the processor type... " >&6; } if test "$build_cpu" = "sparc" -o "$build_cpu" = "i386"; then - { $as_echo "$as_me:$LINENO: result: ok ($build_cpu)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok ($build_cpu)" >&5 $as_echo "ok ($build_cpu)" >&6; } else - { { $as_echo "$as_me:$LINENO: error: only sparc and i386 processors are supported" >&5 -$as_echo "$as_me: error: only sparc and i386 processors are supported" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "only sparc and i386 processors are supported" "$LINENO" 5 fi ;; linux-gnu*) @@ -4520,7 +5227,7 @@ $as_echo "$as_me: error: only sparc and i386 processors are supported" >&2;} test_freetype=no _os=Darwin if test "$enable_systray" = "yes" && test "$enable_gtk" != "no"; then - { $as_echo "$as_me:$LINENO: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >&5 $as_echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >&2;} echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn enable_systray=no @@ -4542,16 +5249,16 @@ $as_echo "$as_me: WARNING: Disabling gtk-quickstarter - not supported on Mac. Us test_cups=yes test_randr=yes test_freetype=yes - { $as_echo "$as_me:$LINENO: checking the FreeBSD operating system release" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the FreeBSD operating system release" >&5 $as_echo_n "checking the FreeBSD operating system release... " >&6; } if test -n "$with_os_version"; then OSVERSION="$with_os_version" else OSVERSION=`/sbin/sysctl -n kern.osreldate` fi - { $as_echo "$as_me:$LINENO: result: found OSVERSION=$OSVERSION" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found OSVERSION=$OSVERSION" >&5 $as_echo "found OSVERSION=$OSVERSION" >&6; } - { $as_echo "$as_me:$LINENO: checking which thread library to use" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which thread library to use" >&5 $as_echo_n "checking which thread library to use... " >&6; } if test "$OSVERSION" -lt "500016"; then PTHREAD_CFLAGS="-D_THREAD_SAFE" @@ -4563,7 +5270,7 @@ $as_echo_n "checking which thread library to use... " >&6; } PTHREAD_CFLAGS="" PTHREAD_LIBS="-pthread" fi - { $as_echo "$as_me:$LINENO: result: $PTHREAD_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_LIBS" >&5 $as_echo "$PTHREAD_LIBS" >&6; } _os=FreeBSD ;; @@ -4599,9 +5306,7 @@ $as_echo "$PTHREAD_LIBS" >&6; } _os=AIX ;; *) - { { $as_echo "$as_me:$LINENO: error: $_os operating system is not suitable to build OpenOffice.org!" >&5 -$as_echo "$as_me: error: $_os operating system is not suitable to build OpenOffice.org!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$_os operating system is not suitable to build OpenOffice.org!" "$LINENO" 5 ;; esac @@ -4609,28 +5314,26 @@ esac -{ $as_echo "$as_me:$LINENO: checking whether to enable crashdump feature" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable crashdump feature" >&5 $as_echo_n "checking whether to enable crashdump feature... " >&6; } if test "$enable_crashdump" = "yes" -o "$enable_crashdump" = "TRUE"; then ENABLE_CRASHDUMP="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } BUILD_TYPE="$BUILD_TYPE CRASHREP" else if test "$enable_crashdump" = "STATIC"; then ENABLE_CRASHDUMP="STATIC" - { $as_echo "$as_me:$LINENO: result: yes, STATIC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, STATIC" >&5 $as_echo "yes, STATIC" >&6; } BUILD_TYPE="$BUILD_TYPE CRASHREP" else if test "$enable_crashdump" = "" -o "$enable_crashdump" = "no"; then ENABLE_CRASHDUMP="" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else - { { $as_echo "$as_me:$LINENO: error: --enable-crashdump only accepts yes, no, TRUE or STATIC as parameter." >&5 -$as_echo "$as_me: error: --enable-crashdump only accepts yes, no, TRUE or STATIC as parameter." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "--enable-crashdump only accepts yes, no, TRUE or STATIC as parameter." "$LINENO" 5 fi fi fi @@ -4641,90 +5344,88 @@ if test "$_os" = "WINNT"; then fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking whether to use the standard non-optimizing compiler" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use the standard non-optimizing compiler" >&5 $as_echo_n "checking whether to use the standard non-optimizing compiler... " >&6; } if test "$enable_cl_standard" = "" -o "$enable_cl_standard" = "no"; then VC_STANDARD="" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else VC_STANDARD="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi -{ $as_echo "$as_me:$LINENO: checking whether to turn warnings to errors" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to turn warnings to errors" >&5 $as_echo_n "checking whether to turn warnings to errors... " >&6; } if test -n "$enable_werror" && test "$enable_werror" != "no"; then ENABLE_WERROR="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - { $as_echo "$as_me:$LINENO: WARNING: Turning warnings to errors has no effect in modules or" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Turning warnings to errors has no effect in modules or" >&5 $as_echo "$as_me: WARNING: Turning warnings to errors has no effect in modules or" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: on platforms where it has been disabled explicitely" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: on platforms where it has been disabled explicitely" >&5 $as_echo "$as_me: WARNING: on platforms where it has been disabled explicitely" >&2;} echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitely" >> warn else ENABLE_WERROR="FALSE" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to do a debug build" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to do a debug build" >&5 $as_echo_n "checking whether to do a debug build... " >&6; } if test -n "$enable_debug" && test "$enable_debug" != "no"; then ENABLE_DEBUG="TRUE" if test -z "$enable_symbols"; then enable_symbols="yes" fi - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else ENABLE_DEBUG="FALSE" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to build with additional debug utilities" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with additional debug utilities" >&5 $as_echo_n "checking whether to build with additional debug utilities... " >&6; } if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then PROEXT="" PRODUCT="" PROFULLSWITCH="" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else PRODUCT="full" PROFULLSWITCH="product=full" PROEXT=".pro" - { $as_echo "$as_me:$LINENO: result: no, full product build" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, full product build" >&5 $as_echo "no, full product build" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to include symbols into final build" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include symbols into final build" >&5 $as_echo_n "checking whether to include symbols into final build... " >&6; } if test -n "$enable_symbols" && test "$enable_symbols" != "no"; then if test "$enable_symbols" = "yes" -o "$enable_symbols" = "TRUE"; then ENABLE_SYMBOLS="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else if test "$enable_symbols" = "SMALL" -o "$enable_symbols" = "small"; then ENABLE_SYMBOLS="SMALL" - { $as_echo "$as_me:$LINENO: result: yes, small ones" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, small ones" >&5 $as_echo "yes, small ones" >&6; } else if test "$enable_symbols" != "no" ; then echo enable symbols is: $enable_symbols - { { $as_echo "$as_me:$LINENO: error: --enable-symbols only accepts yes, TRUE or SMALL as parameter." >&5 -$as_echo "$as_me: error: --enable-symbols only accepts yes, TRUE or SMALL as parameter." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "--enable-symbols only accepts yes, TRUE or SMALL as parameter." "$LINENO" 5 else ENABLE_SYMBOLS= fi @@ -4732,12 +5433,12 @@ $as_echo "$as_me: error: --enable-symbols only accepts yes, TRUE or SMALL as par fi else ENABLE_SYMBOLS= - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to strip the solver or not." >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to strip the solver or not." >&5 $as_echo_n "checking whether to strip the solver or not.... " >&6; } if test -n "$enable_strip_solver"; then if test "$enable_strip_solver" = "yes"; then @@ -4745,9 +5446,7 @@ if test -n "$enable_strip_solver"; then else if test "$enable_strip_solver" = "no"; then DISABLE_STRIP="TRUE" else - { { $as_echo "$as_me:$LINENO: error: --disable-strip-solver only accepts yes or no as parameter." >&5 -$as_echo "$as_me: error: --disable-strip-solver only accepts yes or no as parameter." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "--disable-strip-solver only accepts yes or no as parameter." "$LINENO" 5 fi fi else @@ -4759,150 +5458,150 @@ else fi -{ $as_echo "$as_me:$LINENO: checking whether to enable native CUPS support" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable native CUPS support" >&5 $as_echo_n "checking whether to enable native CUPS support... " >&6; } if test "$test_cups" = "yes" -a \( "$enable_cups" = "yes" -o "$enable_cups" = "TRUE" \) ; then ENABLE_CUPS="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else ENABLE_CUPS="" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to enable fontconfig support" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable fontconfig support" >&5 $as_echo_n "checking whether to enable fontconfig support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a \( "$enable_fontconfig" = "yes" -o "$enable_fontconfig" = "TRUE" \); then ENABLE_FONTCONFIG="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else ENABLE_FONTCONFIG="" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to enable filters for legacy binary file formats (StarOffice 5.2)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable filters for legacy binary file formats (StarOffice 5.2)" >&5 $as_echo_n "checking whether to enable filters for legacy binary file formats (StarOffice 5.2)... " >&6; } if test "$enable_binfilter" = "no"; then WITH_BINFILTER="NO" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else WITH_BINFILTER="YES" BUILD_TYPE="$BUILD_TYPE BINFILTER" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking whether to use DirectX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use DirectX" >&5 $as_echo_n "checking whether to use DirectX... " >&6; } if test "$enable_directx" = "yes" -o "$enable_directx" = "TRUE" -o "$enable_directx" = ""; then ENABLE_DIRECTX="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else ENABLE_DIRECTX="" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - { $as_echo "$as_me:$LINENO: checking whether to use ActiveX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use ActiveX" >&5 $as_echo_n "checking whether to use ActiveX... " >&6; } if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then DISABLE_ACTIVEX="" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else DISABLE_ACTIVEX="TRUE" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - { $as_echo "$as_me:$LINENO: checking whether to use ATL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use ATL" >&5 $as_echo_n "checking whether to use ATL... " >&6; } if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then DISABLE_ATL="" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else DISABLE_ATL="TRUE" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi -{ $as_echo "$as_me:$LINENO: checking whether to use RPATH in shared libraries" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use RPATH in shared libraries" >&5 $as_echo_n "checking whether to use RPATH in shared libraries... " >&6; } if test "$enable_rpath" = "no"; then ENABLE_RPATH="no" else ENABLE_RPATH="yes" fi -{ $as_echo "$as_me:$LINENO: result: $ENABLE_RPATH" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_RPATH" >&5 $as_echo "$ENABLE_RPATH" >&6; } -{ $as_echo "$as_me:$LINENO: checking whether to include MySpell dictionaries" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include MySpell dictionaries" >&5 $as_echo_n "checking whether to include MySpell dictionaries... " >&6; } if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } WITH_MYSPELL_DICTS=YES BUILD_TYPE="$BUILD_TYPE DICTIONARIES" else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } WITH_MYSPELL_DICTS=NO fi if test "$WITH_MYSPELL_DICTS" = "NO"; then - { $as_echo "$as_me:$LINENO: checking whether to use dicts from external paths" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use dicts from external paths" >&5 $as_echo_n "checking whether to use dicts from external paths... " >&6; } if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SYSTEM_DICTS=YES - { $as_echo "$as_me:$LINENO: checking for spelling dictionary directory" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for spelling dictionary directory" >&5 $as_echo_n "checking for spelling dictionary directory... " >&6; } if test -n "$with_external_dict_dir"; then DICT_SYSTEM_DIR=file://$with_external_dict_dir else DICT_SYSTEM_DIR=file:///usr/share/hunspell fi - { $as_echo "$as_me:$LINENO: result: $DICT_SYSTEM_DIR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DICT_SYSTEM_DIR" >&5 $as_echo "$DICT_SYSTEM_DIR" >&6; } - { $as_echo "$as_me:$LINENO: checking for hyphenation patterns directory" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hyphenation patterns directory" >&5 $as_echo_n "checking for hyphenation patterns directory... " >&6; } if test -n "$with_external_hyph_dir"; then HYPH_SYSTEM_DIR=file://$with_external_hyph_dir else HYPH_SYSTEM_DIR=file:///usr/share/hyphen fi - { $as_echo "$as_me:$LINENO: result: $HYPH_SYSTEM_DIR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HYPH_SYSTEM_DIR" >&5 $as_echo "$HYPH_SYSTEM_DIR" >&6; } - { $as_echo "$as_me:$LINENO: checking for thesaurus directory" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thesaurus directory" >&5 $as_echo_n "checking for thesaurus directory... " >&6; } if test -n "$with_external_thes_dir"; then THES_SYSTEM_DIR=file://$with_external_thes_dir else THES_SYSTEM_DIR=file:///usr/share/mythes fi - { $as_echo "$as_me:$LINENO: result: $THES_SYSTEM_DIR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THES_SYSTEM_DIR" >&5 $as_echo "$THES_SYSTEM_DIR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SYSTEM_DICTS=NO fi @@ -4912,22 +5611,16 @@ fi -{ $as_echo "$as_me:$LINENO: checking which shell to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which shell to use" >&5 $as_echo_n "checking which shell to use... " >&6; } if test $_os = "WINNT"; then if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "bash"; then - { { $as_echo "$as_me:$LINENO: error: only \"tcsh\" or \"bash\" are supported options" >&5 -$as_echo "$as_me: error: only \"tcsh\" or \"bash\" are supported options" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "only \"tcsh\" or \"bash\" are supported options" "$LINENO" 5 fi if test -L $AWK -o -L `which awk` -o -L `which tar` -o -L `which gunzip` ; then - { { $as_echo "$as_me:$LINENO: error: $AWK, awk, tar or gunzip is a cygwin symlink! -Native windows programs cannot use cygwin symlinks. Remove the symbolic -link, and copy the program to the name of the link." >&5 -$as_echo "$as_me: error: $AWK, awk, tar or gunzip is a cygwin symlink! + as_fn_error "$AWK, awk, tar or gunzip is a cygwin symlink! Native windows programs cannot use cygwin symlinks. Remove the symbolic -link, and copy the program to the name of the link." >&2;} - { (exit 1); exit 1; }; } +link, and copy the program to the name of the link." "$LINENO" 5 fi CC=`echo $CC | $SED "s/^guw.exe //"` CXX=`echo $CXX | $SED "s/^guw.exe //"` @@ -4947,33 +5640,27 @@ link, and copy the program to the name of the link." >&2;} fi elif test $_os = "OS2"; then if test "$with_use_shell" != "tcsh"; then - { { $as_echo "$as_me:$LINENO: error: only \"tcsh\" is supported options" >&5 -$as_echo "$as_me: error: only \"tcsh\" is supported options" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "only \"tcsh\" is supported options" "$LINENO" 5 fi else if test "$with_use_shell" != "tcsh" -a "$with_use_shell" != "bash"; then - { { $as_echo "$as_me:$LINENO: error: only \"tcsh\" or \"bash\" are supported options" >&5 -$as_echo "$as_me: error: only \"tcsh\" or \"bash\" are supported options" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "only \"tcsh\" or \"bash\" are supported options" "$LINENO" 5 fi fi USE_SHELL="$with_use_shell" -{ $as_echo "$as_me:$LINENO: result: $USE_SHELL" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_SHELL" >&5 $as_echo "$USE_SHELL" >&6; } if test "$_os" = "WINNT" ; then - { $as_echo "$as_me:$LINENO: checking for cygwin gcc/g++" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin gcc/g++" >&5 $as_echo_n "checking for cygwin gcc/g++... " >&6; } if which gcc > /dev/null && which g++ > /dev/null ; then - { $as_echo "$as_me:$LINENO: result: found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else - { { $as_echo "$as_me:$LINENO: error: cygwin gcc and g++ are needed, please install them." >&5 -$as_echo "$as_me: error: cygwin gcc and g++ are needed, please install them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cygwin gcc and g++ are needed, please install them." "$LINENO" 5 fi fi @@ -4981,9 +5668,9 @@ fi if test "$with_use_shell" = "tcsh"; then # Extract the first word of "tcsh", so it can be a program name with args. set dummy tcsh; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SHELLPATH+set}" = set; then +if test "${ac_cv_path_SHELLPATH+set}" = set; then : $as_echo_n "(cached) " >&6 else case $SHELLPATH in @@ -4996,14 +5683,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SHELLPATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -5011,27 +5698,25 @@ esac fi SHELLPATH=$ac_cv_path_SHELLPATH if test -n "$SHELLPATH"; then - { $as_echo "$as_me:$LINENO: result: $SHELLPATH" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHELLPATH" >&5 $as_echo "$SHELLPATH" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$SHELLPATH"; then - { { $as_echo "$as_me:$LINENO: error: tcsh not found in \$PATH" >&5 -$as_echo "$as_me: error: tcsh not found in \$PATH" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "tcsh not found in \$PATH" "$LINENO" 5 else SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/tcsh$//p"` fi elif test "$with_use_shell" = "bash"; then # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SHELLPATH+set}" = set; then +if test "${ac_cv_path_SHELLPATH+set}" = set; then : $as_echo_n "(cached) " >&6 else case $SHELLPATH in @@ -5044,14 +5729,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SHELLPATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -5059,36 +5744,34 @@ esac fi SHELLPATH=$ac_cv_path_SHELLPATH if test -n "$SHELLPATH"; then - { $as_echo "$as_me:$LINENO: result: $SHELLPATH" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHELLPATH" >&5 $as_echo "$SHELLPATH" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$SHELLPATH"; then - { { $as_echo "$as_me:$LINENO: error: bash not found in \$PATH" >&5 -$as_echo "$as_me: error: bash not found in \$PATH" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "bash not found in \$PATH" "$LINENO" 5 else SHELLPATH=`echo $SHELLPATH | $SED -n "s/\/bash$//p"` fi else - { $as_echo "$as_me:$LINENO: WARNING: Windows/OS/2 4NT builds don't test for the shell" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Windows/OS/2 4NT builds don't test for the shell" >&5 $as_echo "$as_me: WARNING: Windows/OS/2 4NT builds don't test for the shell" >&2;} SHELLPATH="NO_SHELLPATH_NEEDED" fi -{ $as_echo "$as_me:$LINENO: checking gcc home" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc home" >&5 $as_echo_n "checking gcc home... " >&6; } if test -z "$with_gcc_home"; then GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,` else GCC_HOME="$with_gcc_home" fi -{ $as_echo "$as_me:$LINENO: result: $GCC_HOME" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_HOME" >&5 $as_echo "$GCC_HOME" >&6; } @@ -5107,9 +5790,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -5120,24 +5803,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5147,9 +5830,9 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -5160,24 +5843,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5186,7 +5869,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -5200,9 +5883,9 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -5213,24 +5896,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5240,9 +5923,9 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -5254,18 +5937,18 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -5284,10 +5967,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5299,9 +5982,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -5312,24 +5995,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5343,9 +6026,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -5356,24 +6039,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5386,7 +6069,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -5397,57 +6080,37 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5463,8 +6126,8 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -5480,17 +6143,17 @@ do done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -5507,7 +6170,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -5526,84 +6189,42 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -5618,32 +6239,83 @@ for ac_file in conftest.exe conftest conftest.*; do esac done else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then +if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5655,17 +6327,17 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -5678,31 +6350,23 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then +if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5716,37 +6380,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes @@ -5755,20 +6398,16 @@ else fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then +if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5779,35 +6418,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5818,36 +6433,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5858,42 +6449,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -5910,18 +6476,14 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -5978,32 +6540,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -6014,17 +6553,19 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6040,9 +6581,9 @@ if test "$COMPATH" = "." ; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_COMPATH+set}" = set; then +if test "${ac_cv_path_COMPATH+set}" = set; then : $as_echo_n "(cached) " >&6 else case $COMPATH in @@ -6055,14 +6596,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_COMPATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -6070,10 +6611,10 @@ esac fi COMPATH=$ac_cv_path_COMPATH if test -n "$COMPATH"; then - { $as_echo "$as_me:$LINENO: result: $COMPATH" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPATH" >&5 $as_echo "$COMPATH" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6086,7 +6627,7 @@ fi GCCVER=20995 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then - { $as_echo "$as_me:$LINENO: checking the GNU gcc compiler version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the GNU gcc compiler version" >&5 $as_echo_n "checking the GNU gcc compiler version... " >&6; } _gcc_version=`$CC -dumpversion` _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'` @@ -6094,29 +6635,23 @@ $as_echo_n "checking the GNU gcc compiler version... " >&6; } GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` if test "$_gcc_major" -lt "3"; then - { { $as_echo "$as_me:$LINENO: error: found version \"$_gcc_version\", use version 3+ of the gcc compiler" >&5 -$as_echo "$as_me: error: found version \"$_gcc_version\", use version 3+ of the gcc compiler" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "found version \"$_gcc_version\", use version 3+ of the gcc compiler" "$LINENO" 5 else if test "$GCCVER" -eq "030203"; then if test "$ENABLE_SYMBOLS" = "SMALL"; then - { { $as_echo "$as_me:$LINENO: error: version \"$_gcc_version\" gives internal error with small." >&5 -$as_echo "$as_me: error: version \"$_gcc_version\" gives internal error with small." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "version \"$_gcc_version\" gives internal error with small." "$LINENO" 5 fi fi fi - { $as_echo "$as_me:$LINENO: result: checked (gcc $_gcc_version)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked (gcc $_gcc_version)" >&5 $as_echo "checked (gcc $_gcc_version)" >&6; } if test "$_os" = "SunOS"; then - { $as_echo "$as_me:$LINENO: checking gcc linker" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc linker" >&5 $as_echo_n "checking gcc linker... " >&6; } if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then - { { $as_echo "$as_me:$LINENO: error: failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" >&5 -$as_echo "$as_me: error: failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: result: ok (GNU ld)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (GNU ld)" >&5 $as_echo "ok (GNU ld)" >&6; } fi fi @@ -6124,16 +6659,12 @@ fi HAVE_LD_BSYMBOLIC_FUNCTIONS= if test "$GCC" = "yes"; then - { $as_echo "$as_me:$LINENO: checking for -Bsymbolic-functions linker support " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Bsymbolic-functions linker support " >&5 $as_echo_n "checking for -Bsymbolic-functions linker support ... " >&6; } bsymbolic_functions_ldflags_save=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -6148,86 +6679,59 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then - { $as_echo "$as_me:$LINENO: result: found " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found " >&5 $as_echo "found " >&6; } else - { $as_echo "$as_me:$LINENO: result: not found " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found " >&5 $as_echo "not found " >&6; } fi LDFLAGS=$bsymbolic_functions_ldflags_save fi -{ $as_echo "$as_me:$LINENO: checking whether to enable pch feature" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable pch feature" >&5 $as_echo_n "checking whether to enable pch feature... " >&6; } if test -n "$enable_pch" && test "$enable_pch" != "no"; then if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then ENABLE_PCH="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } elif test "$GCC" = "yes" -a "$GCCVER" -gt "030400"; then ENABLE_PCH="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else ENABLE_PCH="" - { $as_echo "$as_me:$LINENO: WARNING: Precompiled header not yet supported for your platform/compiler" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Precompiled header not yet supported for your platform/compiler" >&5 $as_echo "$as_me: WARNING: Precompiled header not yet supported for your platform/compiler" >&2;} fi else ENABLE_PCH="" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to enable hid list feature" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable hid list feature" >&5 $as_echo_n "checking whether to enable hid list feature... " >&6; } if test -n "$enable_hids" && test "$enable_hids" != "no"; then NO_HIDS="" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else NO_HIDS="TRUE" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for GNU make" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 $as_echo_n "checking for GNU make... " >&6; } for a in "$MAKE" $GNUMAKE make gmake gnumake; do $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null @@ -6236,39 +6740,35 @@ for a in "$MAKE" $GNUMAKE make gmake gnumake; do break fi done -{ $as_echo "$as_me:$LINENO: result: $GNUMAKE" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUMAKE" >&5 $as_echo "$GNUMAKE" >&6; } if test -z "$GNUMAKE"; then - { { $as_echo "$as_me:$LINENO: error: not found. install GNU make." >&5 -$as_echo "$as_me: error: not found. install GNU make." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "not found. install GNU make." "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: checking the GNU make version" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the GNU make version" >&5 $as_echo_n "checking the GNU make version... " >&6; } _make_version=`$GNUMAKE --version | grep GNU | $SED -e 's@^[^0-9]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` if test "$_make_longver" -ge "037901" ; then - { $as_echo "$as_me:$LINENO: result: $GNUMAKE $_make_version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUMAKE $_make_version" >&5 $as_echo "$GNUMAKE $_make_version" >&6; } else if test "$_os" = "Darwin"; then if test "$_make_longver" -ge "037900" ; then - { $as_echo "$as_me:$LINENO: result: $GNUMAKE $_make_version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUMAKE $_make_version" >&5 $as_echo "$GNUMAKE $_make_version" >&6; } else - { $as_echo "$as_me:$LINENO: WARNING: failed ($GNUMAKE $_make_version need 3.79.0+)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: failed ($GNUMAKE $_make_version need 3.79.0+)" >&5 $as_echo "$as_me: WARNING: failed ($GNUMAKE $_make_version need 3.79.0+)" >&2;} fi else - { { $as_echo "$as_me:$LINENO: error: failed ($GNUMAKE $_make_version need 3.79.1+)" >&5 -$as_echo "$as_me: error: failed ($GNUMAKE $_make_version need 3.79.1+)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "failed ($GNUMAKE $_make_version need 3.79.1+)" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: checking for GNU tar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU tar" >&5 $as_echo_n "checking for GNU tar... " >&6; } for a in $GNUTAR gtar gnutar tar; do $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null @@ -6277,12 +6777,10 @@ for a in $GNUTAR gtar gnutar tar; do break fi done -{ $as_echo "$as_me:$LINENO: result: $GNUTAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUTAR" >&5 $as_echo "$GNUTAR" >&6; } if test -z "$GNUTAR"; then - { { $as_echo "$as_me:$LINENO: error: not found. install GNU tar." >&5 -$as_echo "$as_me: error: not found. install GNU tar." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "not found. install GNU tar." "$LINENO" 5 fi @@ -6293,9 +6791,9 @@ if test "$_os" = "SunOS"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path__cc+set}" = set; then +if test "${ac_cv_path__cc+set}" = set; then : $as_echo_n "(cached) " >&6 else case $_cc in @@ -6308,14 +6806,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path__cc="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -6323,10 +6821,10 @@ esac fi _cc=$ac_cv_path__cc if test -n "$_cc"; then - { $as_echo "$as_me:$LINENO: result: $_cc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cc" >&5 $as_echo "$_cc" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6335,23 +6833,19 @@ fi done COMPATH=`echo $_cc | $SED -n "s/\/cc//p"` - { $as_echo "$as_me:$LINENO: checking the SunStudio C/C++ compiler version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the SunStudio C/C++ compiler version" >&5 $as_echo_n "checking the SunStudio C/C++ compiler version... " >&6; } _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'` _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'` _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'` if test "$_sunstudio_major" != "5"; then - { { $as_echo "$as_me:$LINENO: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&5 -$as_echo "$as_me: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" "$LINENO" 5 else _sunstudio_minor=`echo $_sunstudio_version | $AWK -F. '{ if ($2 == 5) print "true"; else if ($2 == 7) print "true"; else if ($2 == 8) print "true"; else if ($2 == 9) print "true"; else print "false" }'` if test "$_sunstudio_minor" = "false"; then - { { $as_echo "$as_me:$LINENO: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&5 -$as_echo "$as_me: error: found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "found version \"$_sunstudio_version\", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } fi fi @@ -6359,15 +6853,11 @@ $as_echo "checked" >&6; } fi if test "$GCC" = "yes"; then - { $as_echo "$as_me:$LINENO: checking for --hash-style=both linker support " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --hash-style=both linker support " >&5 $as_echo_n "checking for --hash-style=both linker support ... " >&6; } hash_style_ldflags_save=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,--hash-style=both" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -6382,43 +6872,18 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : HAVE_LD_HASH_STYLE=TRUE else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - HAVE_LD_HASH_STYLE=FALSE + HAVE_LD_HASH_STYLE=FALSE fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "z$HAVE_LD_HASH_STYLE" = "zTRUE"; then - { $as_echo "$as_me:$LINENO: result: found " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found " >&5 $as_echo "found " >&6; } else - { $as_echo "$as_me:$LINENO: result: not found " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found " >&5 $as_echo "not found " >&6; } fi LDFLAGS=$hash_style_ldflags_save @@ -6431,9 +6896,9 @@ if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path__cc+set}" = set; then +if test "${ac_cv_path__cc+set}" = set; then : $as_echo_n "(cached) " >&6 else case $_cc in @@ -6446,14 +6911,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path__cc="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -6461,10 +6926,10 @@ esac fi _cc=$ac_cv_path__cc if test -n "$_cc"; then - { $as_echo "$as_me:$LINENO: result: $_cc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cc" >&5 $as_echo "$_cc" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6473,22 +6938,18 @@ fi done COMPATH=`echo $_cc | $SED -n "s/\/cc//p"` - { $as_echo "$as_me:$LINENO: checking the SGI MIPSpro C compiler version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the SGI MIPSpro C compiler version" >&5 $as_echo_n "checking the SGI MIPSpro C compiler version... " >&6; } _mipspro_version=`$CC -version 2>&1 | $AWK '{ print $4 }'` _mipspro_major=`echo $_mipspro_version | $AWK -F. '{ print $1 }'` if test "$_mipspro_major" != "7"; then - { { $as_echo "$as_me:$LINENO: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&5 -$as_echo "$as_me: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" "$LINENO" 5 else _mipspro_minor=`echo $_mipspro_version | $AWK -F. '{ if ($2 <= 1) print "false"; else print "true" }'` if test "$_mipspro_minor" = "false"; then - { { $as_echo "$as_me:$LINENO: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&5 -$as_echo "$as_me: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } fi fi @@ -6501,9 +6962,9 @@ if test "$_os" = "OSF1"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path__cc+set}" = set; then +if test "${ac_cv_path__cc+set}" = set; then : $as_echo_n "(cached) " >&6 else case $_cc in @@ -6516,14 +6977,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path__cc="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -6531,10 +6992,10 @@ esac fi _cc=$ac_cv_path__cc if test -n "$_cc"; then - { $as_echo "$as_me:$LINENO: result: $_cc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cc" >&5 $as_echo "$_cc" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6543,18 +7004,16 @@ fi done COMPATH=`echo $_cc | $SED -n "s/\/cc//p"` - { $as_echo "$as_me:$LINENO: WARNING: ******* $_cc , $COMPATH" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ******* $_cc , $COMPATH" >&5 $as_echo "$as_me: WARNING: ******* $_cc , $COMPATH" >&2;} - { $as_echo "$as_me:$LINENO: checking the Compaq C compiler version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the Compaq C compiler version" >&5 $as_echo_n "checking the Compaq C compiler version... " >&6; } _compaqc_version=`$CC -V 2>&1 | $AWK '{ print $3 }'` _compaqc_major=`echo $_compaqc_version | $AWK -F. '{ print $1 }'` if test "$_compaqc_major" != "T6"; then - { { $as_echo "$as_me:$LINENO: error: found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" >&5 -$as_echo "$as_me: error: found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "found version \"$_compaqc_version\", use version 6 of the Compaq C compiler" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } fi fi @@ -6563,9 +7022,9 @@ fi if test -z "$with_perl_home"; then # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PERL+set}" = set; then +if test "${ac_cv_path_PERL+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PERL in @@ -6578,14 +7037,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -6593,10 +7052,10 @@ esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then - { $as_echo "$as_me:$LINENO: result: $PERL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6609,45 +7068,37 @@ else if test -x "$_perl_path"; then PERL=$_perl_path else - { { $as_echo "$as_me:$LINENO: error: $_perl_path not found" >&5 -$as_echo "$as_me: error: $_perl_path not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$_perl_path not found" "$LINENO" 5 fi fi if test "$PERL"; then - { $as_echo "$as_me:$LINENO: checking the Perl version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the Perl version" >&5 $as_echo_n "checking the Perl version... " >&6; } ${PERL} -e "exit($]);" _perl_version=$? if test "$_perl_version" -lt 5; then - { { $as_echo "$as_me:$LINENO: error: found Perl version \"$_perl_version\", use version 5 of Perl" >&5 -$as_echo "$as_me: error: found Perl version \"$_perl_version\", use version 5 of Perl" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "found Perl version \"$_perl_version\", use version 5 of Perl" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: result: checked (perl $_perl_version)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked (perl $_perl_version)" >&5 $as_echo "checked (perl $_perl_version)" >&6; } else - { { $as_echo "$as_me:$LINENO: error: Perl not found, install version 5 of Perl" >&5 -$as_echo "$as_me: error: Perl not found, install version 5 of Perl" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Perl not found, install version 5 of Perl" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: checking for required Perl modules" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for required Perl modules" >&5 $as_echo_n "checking for required Perl modules... " >&6; } if `$PERL -e 'use Archive::Zip;'`; then - { $as_echo "$as_me:$LINENO: result: all modules found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: all modules found" >&5 $as_echo "all modules found" >&6; } else - { { $as_echo "$as_me:$LINENO: error: Failed to find some modules" >&5 -$as_echo "$as_me: error: Failed to find some modules" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Failed to find some modules" "$LINENO" 5 fi if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" != "yes"; then - { $as_echo "$as_me:$LINENO: checking for friendly registry keys" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for friendly registry keys" >&5 $as_echo_n "checking for friendly registry keys... " >&6; } # VS.Net 2003, VS.Net 2005 if test -z "$with_cl_home"; then @@ -6658,7 +7109,7 @@ $as_echo_n "checking for friendly registry keys... " >&6; } else with_cl_home=`cygpath -u "$with_cl_home"` fi - { $as_echo "$as_me:$LINENO: result: done" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$with_mspdb_path";then @@ -6680,9 +7131,9 @@ $as_echo "done" >&6; } if test -z "$MSPDB_PATH";then # Extract the first word of "mspdb80.dll", so it can be a program name with args. set dummy mspdb80.dll; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSPDB_PATH+set}" = set; then +if test "${ac_cv_path_MSPDB_PATH+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MSPDB_PATH in @@ -6695,14 +7146,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MSPDB_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -6710,19 +7161,19 @@ esac fi MSPDB_PATH=$ac_cv_path_MSPDB_PATH if test -n "$MSPDB_PATH"; then - { $as_echo "$as_me:$LINENO: result: $MSPDB_PATH" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSPDB_PATH" >&5 $as_echo "$MSPDB_PATH" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "mspdb71.dll", so it can be a program name with args. set dummy mspdb71.dll; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MSPDB_PATH+set}" = set; then +if test "${ac_cv_path_MSPDB_PATH+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MSPDB_PATH in @@ -6735,14 +7186,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MSPDB_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -6750,10 +7201,10 @@ esac fi MSPDB_PATH=$ac_cv_path_MSPDB_PATH if test -n "$MSPDB_PATH"; then - { $as_echo "$as_me:$LINENO: result: $MSPDB_PATH" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSPDB_PATH" >&5 $as_echo "$MSPDB_PATH" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6762,24 +7213,22 @@ fi fi if test -z "$MSPDB_PATH"; then - { { $as_echo "$as_me:$LINENO: error: You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" >&5 -$as_echo "$as_me: error: You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "You need a mspdb71.dll/mspdb80.dll, make sure it's in the path or use --with-mspdb-path" "$LINENO" 5 fi MSPDB_PATH=`cygpath -d "$MSPDB_PATH"` MSPDB_PATH=`cygpath -u "$MSPDB_PATH"` PATH="$MSPDB_PATH:$PATH" - { $as_echo "$as_me:$LINENO: checking the Microsoft C/C++ Compiler" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the Microsoft C/C++ Compiler" >&5 $as_echo_n "checking the Microsoft C/C++ Compiler... " >&6; } if test -x "$with_cl_home/bin/cl.exe"; then CC="$with_cl_home/bin/cl.exe" else # Extract the first word of "cl.exe", so it can be a program name with args. set dummy cl.exe; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CC+set}" = set; then +if test "${ac_cv_path_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else case $CC in @@ -6792,14 +7241,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -6807,10 +7256,10 @@ esac fi CC=$ac_cv_path_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6821,11 +7270,11 @@ fi CC=`cygpath -d "$CC"` CC=`cygpath -u "$CC"` # Remove /cl.exe from CC case insensitive - { $as_echo "$as_me:$LINENO: result: found ($CC)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ($CC)" >&5 $as_echo "found ($CC)" >&6; } COMPATH=`echo $CC | $SED 's@/[cC][lL]\.[eE][xX][eE]@@'` export INCLUDE=`cygpath -d "$COMPATH/../Include"` - { $as_echo "$as_me:$LINENO: checking the Version of Microsoft C/C++ Compiler" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the Version of Microsoft C/C++ Compiler" >&5 $as_echo_n "checking the Version of Microsoft C/C++ Compiler... " >&6; } CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ { x = match( \\\$0, /..\\...\\...../ ) @@ -6835,38 +7284,34 @@ $as_echo_n "checking the Version of Microsoft C/C++ Compiler... " >&6; } printf (\"%04d\",vertoken[i] ) } }"` - { $as_echo "$as_me:$LINENO: result: found Compiler version $CCNUMVER." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found Compiler version $CCNUMVER." >&5 $as_echo "found Compiler version $CCNUMVER." >&6; } if test "$CCNUMVER" -ge "001500000000"; then COMEX=12 MSVSVER=2008 - { $as_echo "$as_me:$LINENO: result: found .NET 2008 / VS 9.0." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found .NET 2008 / VS 9.0." >&5 $as_echo "found .NET 2008 / VS 9.0." >&6; } elif test "$CCNUMVER" -ge "001400000000"; then COMEX=11 MSVSVER=2005 - { $as_echo "$as_me:$LINENO: result: found .NET 2005." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found .NET 2005." >&5 $as_echo "found .NET 2005." >&6; } elif test "$CCNUMVER" -ge "001300102240"; then COMEX=10 MSVSVER=2003 - { $as_echo "$as_me:$LINENO: result: found .NET 2003." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found .NET 2003." >&5 $as_echo "found .NET 2003." >&6; } else - { { $as_echo "$as_me:$LINENO: error: Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." >&5 -$as_echo "$as_me: error: Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Compiler too old. Use Microsoft C/C++ .NET 2003/2005 compiler." "$LINENO" 5 fi else - { { $as_echo "$as_me:$LINENO: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." >&5 -$as_echo "$as_me: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe." "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: checking the Mingwin32 C++ Compiler" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the Mingwin32 C++ Compiler" >&5 $as_echo_n "checking the Mingwin32 C++ Compiler... " >&6; } if test `$CC -dumpmachine | $SED -e 's/^.*-//'` = "mingw32"; then - { $as_echo "$as_me:$LINENO: result: found." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found." >&5 $as_echo "found." >&6; } if $CC -dumpspecs | grep -q "mno-cygwin"; then USE_MINGW="cygwin" @@ -6874,9 +7319,7 @@ $as_echo "found." >&6; } USE_MINGW="pure-mingw" fi else - { { $as_echo "$as_me:$LINENO: error: Mingwin32 C++ Compiler not found." >&5 -$as_echo "$as_me: error: Mingwin32 C++ Compiler not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Mingwin32 C++ Compiler not found." "$LINENO" 5 fi fi fi @@ -6888,9 +7331,9 @@ if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then # Extract the first word of "midl.exe", so it can be a program name with args. set dummy midl.exe; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MIDL_PATH+set}" = set; then +if test "${ac_cv_path_MIDL_PATH+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MIDL_PATH in @@ -6903,14 +7346,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MIDL_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -6918,10 +7361,10 @@ esac fi MIDL_PATH=$ac_cv_path_MIDL_PATH if test -n "$MIDL_PATH"; then - { $as_echo "$as_me:$LINENO: result: $MIDL_PATH" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIDL_PATH" >&5 $as_echo "$MIDL_PATH" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6951,9 +7394,7 @@ fi fi fi if test ! -x "$MIDL_PATH/midl.exe"; then - { { $as_echo "$as_me:$LINENO: error: midl.exe not found. Make sure it's in the path or use --with-midl-path" >&5 -$as_echo "$as_me: error: midl.exe not found. Make sure it's in the path or use --with-midl-path" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "midl.exe not found. Make sure it's in the path or use --with-midl-path" "$LINENO" 5 fi # Convert to posix path with 8.3 filename restrictions ( No spaces ) MIDL_PATH=`cygpath -d "$MIDL_PATH"` @@ -6961,9 +7402,9 @@ $as_echo "$as_me: error: midl.exe not found. Make sure it's in the path or use - # Extract the first word of "csc.exe", so it can be a program name with args. set dummy csc.exe; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CSC_PATH+set}" = set; then +if test "${ac_cv_path_CSC_PATH+set}" = set; then : $as_echo_n "(cached) " >&6 else case $CSC_PATH in @@ -6976,14 +7417,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CSC_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -6991,10 +7432,10 @@ esac fi CSC_PATH=$ac_cv_path_CSC_PATH if test -n "$CSC_PATH"; then - { $as_echo "$as_me:$LINENO: result: $CSC_PATH" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CSC_PATH" >&5 $as_echo "$CSC_PATH" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7014,15 +7455,13 @@ fi fi fi if test ! -x "$CSC_PATH/csc.exe"; then - { { $as_echo "$as_me:$LINENO: error: csc.exe not found. Make sure it's in the path or use --with-csc-path" >&5 -$as_echo "$as_me: error: csc.exe not found. Make sure it's in the path or use --with-csc-path" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "csc.exe not found. Make sure it's in the path or use --with-csc-path" "$LINENO" 5 fi # Convert to posix path with 8.3 filename restrictions ( No spaces ) CSC_PATH=`cygpath -d "$CSC_PATH"` CSC_PATH=`cygpath -u "$CSC_PATH"` - { $as_echo "$as_me:$LINENO: checking .NET Framework" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking .NET Framework" >&5 $as_echo_n "checking .NET Framework... " >&6; } if test -n "$with_frame_home"; then with_frame_home=`cygpath -u "$with_frame_home"` @@ -7045,11 +7484,9 @@ $as_echo_n "checking .NET Framework... " >&6; } fi fi if test ! -f "$FRAME_HOME/lib/mscoree.lib"; then - { { $as_echo "$as_me:$LINENO: error: mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&5 -$as_echo "$as_me: error: mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "mscoree.lib (.NET Framework) not found. Make sure you use --with-frame-home" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: result: found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } # Convert to posix path with 8.3 filename restrictions ( No spaces ) FRAME_HOME=`cygpath -d "$FRAME_HOME"` @@ -7066,14 +7503,14 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then + if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -7088,11 +7525,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -7101,78 +7534,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +if $ac_preproc_ok; then : break fi @@ -7184,7 +7573,7 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -7195,11 +7584,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -7208,87 +7593,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -7298,16 +7636,12 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -7322,48 +7656,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -7373,18 +7682,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -7394,14 +7699,10 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -7428,51 +7729,22 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_run "$LINENO"; then : -( exit $ac_status ) -ac_cv_header_stdc=no +else + ac_cv_header_stdc=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi @@ -7493,9 +7765,9 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then +if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -7506,24 +7778,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7537,9 +7809,9 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -7550,24 +7822,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7580,7 +7852,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -7591,53 +7863,36 @@ fi fi fi # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7651,37 +7906,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes @@ -7690,20 +7924,16 @@ else fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then +if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7714,35 +7944,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7753,36 +7959,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cxx_werror_flag=$ac_save_cxx_werror_flag +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7793,42 +7975,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS @@ -7856,10 +8013,10 @@ ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded @@ -7874,11 +8031,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -7887,78 +8040,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_cxx_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +if $ac_preproc_ok; then : break fi @@ -7970,7 +8079,7 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes @@ -7981,11 +8090,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -7994,87 +8099,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_cxx_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -8092,14 +8150,14 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then + if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -8114,11 +8172,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -8127,78 +8181,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +if $ac_preproc_ok; then : break fi @@ -8210,7 +8220,7 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -8221,534 +8231,103 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - fi -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of long" >&5 -$as_echo_n "checking size of long... " >&6; } -if test "${ac_cv_sizeof_long+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` +else + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.$ac_ext -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.$ac_ext -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)]; -test_array [0] = 0 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - ; - return 0; -} + fi +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done -case $ac_lo in -?*) ac_cv_sizeof_long=$ac_lo;; -'') if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } - else - ac_cv_sizeof_long=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (long)); } -static unsigned long int ulongval () { return (long int) (sizeof (long)); } -#include -#include -int -main () -{ - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (long))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (long)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long=`cat conftest.val` +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if test "${ac_cv_sizeof_long+set}" = set; then : + $as_echo_n "(cached) " >&6 else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : -( exit $ac_status ) -if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +else + if test "$ac_cv_type_long" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +{ as_fn_set_status 77 +as_fn_error "cannot compute sizeof (long) +See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_long=0 fi fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.val + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } @@ -8760,19 +8339,14 @@ _ACEOF SIZEOF_LONG=$ac_cv_sizeof_long - - { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then +if test "${ac_cv_c_bigendian+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler @@ -8780,46 +8354,34 @@ cat >>conftest.$ac_ext <<_ACEOF typedef int dummy; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless - # there are some -arch flags. Note that *ppc* also matches - # ppc64. This check is also rather less than ideal. - case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( - *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; - esac -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -8837,30 +8399,9 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -8876,49 +8417,18 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -8933,30 +8443,9 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -8971,51 +8460,20 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; @@ -9041,24 +8499,7 @@ return use_ascii (foo) == use_ebcdic (foo); return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi @@ -9070,20 +8511,10 @@ $as_echo "$ac_try_echo") >&5 ac_cv_c_bigendian=unknown fi fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -9103,82 +8534,48 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_c_bigendian=yes + ac_cv_c_bigendian=yes fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) - cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) -cat >>confdefs.h <<\_ACEOF -#define AC_APPLE_UNIVERSAL_BUILD 1 -_ACEOF +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) - { { $as_echo "$as_me:$LINENO: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -$as_echo "$as_me: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} - { (exit 1); exit 1; }; } ;; + as_fn_error "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac WORDS_BIGENDIAN=$ac_cv_c_bigendian # Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then +if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then - { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then +if test "${ac_cv_sys_largefile_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no @@ -9187,11 +8584,7 @@ else while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -9208,62 +8601,16 @@ main () ; return 0; -} -_ACEOF - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break fi - rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext break done @@ -9271,23 +8618,19 @@ rm -f core conftest.err conftest.$ac_objext rm -f conftest.$ac_ext fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi - { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then +if test "${ac_cv_sys_file_offset_bits+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -9306,38 +8649,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include @@ -9357,38 +8673,15 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; @@ -9400,17 +8693,13 @@ _ACEOF esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then +if test "${ac_cv_sys_large_files+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -9429,38 +8718,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include @@ -9480,38 +8742,15 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; @@ -9533,43 +8772,41 @@ if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; th fi -{ $as_echo "$as_me:$LINENO: checking whether to disable vba feature" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable vba feature" >&5 $as_echo_n "checking whether to disable vba feature... " >&6; } if test -n "$enable_vba" && test "$enable_vba" = "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ENABLE_VBA=NO else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ENABLE_VBA=YES fi if test "$ENABLE_VBA" = "YES"; then - { $as_echo "$as_me:$LINENO: checking how to package the vba compatibility api" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to package the vba compatibility api" >&5 $as_echo_n "checking how to package the vba compatibility api... " >&6; } if test -n "$with_vba_package_format"; then if test "$with_vba_package_format" = "extn"; then VBA_EXTENSION=YES - { $as_echo "$as_me:$LINENO: result: uno extension" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: uno extension" >&5 $as_echo "uno extension" >&6; } - { $as_echo "$as_me:$LINENO: WARNING: --with-vba-package-format=extn can cause problems" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-vba-package-format=extn can cause problems" >&5 $as_echo "$as_me: WARNING: --with-vba-package-format=extn can cause problems" >&2;} else if test "$with_vba_package_format" = "builtin"; then VBA_EXTENSION=NO - { $as_echo "$as_me:$LINENO: result: build into installset" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: build into installset" >&5 $as_echo "build into installset" >&6; } else - { { $as_echo "$as_me:$LINENO: error: unknown packaging method" >&5 -$as_echo "$as_me: error: unknown packaging method" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "unknown packaging method" "$LINENO" 5 fi fi else VBA_EXTENSION=NO - { $as_echo "$as_me:$LINENO: result: defaulting to build into installset" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to build into installset" >&5 $as_echo "defaulting to build into installset" >&6; } fi else @@ -9580,306 +8817,45 @@ fi if test "$test_cups" = "yes" -a "$ENABLE_CUPS" = "TRUE" ; then - if test "${ac_cv_header_cups_cups_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for cups/cups.h" >&5 -$as_echo_n "checking for cups/cups.h... " >&6; } -if test "${ac_cv_header_cups_cups_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cups_cups_h" >&5 -$as_echo "$ac_cv_header_cups_cups_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking cups/cups.h usability" >&5 -$as_echo_n "checking cups/cups.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking cups/cups.h presence" >&5 -$as_echo_n "checking cups/cups.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: cups/cups.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: cups/cups.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for cups/cups.h" >&5 -$as_echo_n "checking for cups/cups.h... " >&6; } -if test "${ac_cv_header_cups_cups_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_cups_cups_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cups_cups_h" >&5 -$as_echo "$ac_cv_header_cups_cups_h" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "cups/cups.h" "ac_cv_header_cups_cups_h" "$ac_includes_default" +if test "x$ac_cv_header_cups_cups_h" = x""yes; then : -fi -if test "x$ac_cv_header_cups_cups_h" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" >&5 -$as_echo "$as_me: error: cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cups/cups.h could not be found. libcupsys2-dev or cups???-devel missing?" "$LINENO" 5 fi fi if test "$_os" = "Linux" -o "$_os" = "FreeBSD" -o "$_os" = "GNU"; then - { $as_echo "$as_me:$LINENO: checking whether to enable pam support" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable pam support" >&5 $as_echo_n "checking whether to enable pam support... " >&6; } if test -z "$enable_pam" || test "$enable_pam" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } PAM=YES - if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 -$as_echo_n "checking for security/pam_appl.h... " >&6; } -if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 -$as_echo "$ac_cv_header_security_pam_appl_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5 -$as_echo_n "checking security/pam_appl.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking security/pam_appl.h presence" >&5 -$as_echo_n "checking security/pam_appl.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 -$as_echo_n "checking for security/pam_appl.h... " >&6; } -if test "${ac_cv_header_security_pam_appl_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_security_pam_appl_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 -$as_echo "$ac_cv_header_security_pam_appl_h" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default" +if test "x$ac_cv_header_security_pam_appl_h" = x""yes; then : -fi -if test "x$ac_cv_header_security_pam_appl_h" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?" >&5 -$as_echo "$as_me: error: pam_appl.h could not be found. libpam-dev or pam-devel missing?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "pam_appl.h could not be found. libpam-dev or pam-devel missing?" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking whether to link to libpam" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to link to libpam" >&5 $as_echo_n "checking whether to link to libpam... " >&6; } if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } PAM_LINK=YES - -{ $as_echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5 $as_echo_n "checking for pam_start in -lpam... " >&6; } -if test "${ac_cv_lib_pam_pam_start+set}" = set; then +if test "${ac_cv_lib_pam_pam_start+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpam $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -9897,43 +8873,18 @@ return pam_start (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pam_pam_start=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pam_pam_start=no + ac_cv_lib_pam_pam_start=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5 $as_echo "$ac_cv_lib_pam_pam_start" >&6; } -if test "x$ac_cv_lib_pam_pam_start" = x""yes; then +if test "x$ac_cv_lib_pam_pam_start" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPAM 1 _ACEOF @@ -9941,18 +8892,16 @@ _ACEOF LIBS="-lpam $LIBS" else - { { $as_echo "$as_me:$LINENO: error: libpam not found or functional" >&5 -$as_echo "$as_me: error: libpam not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libpam not found or functional" "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: no, dynamically open it" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, dynamically open it" >&5 $as_echo "no, dynamically open it" >&6; } PAM_LINK=NO fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PAM=NO PAM_LINK=NO @@ -9964,10 +8913,10 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - { $as_echo "$as_me:$LINENO: checking how many arguments getspnam_r() takes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how many arguments getspnam_r() takes" >&5 $as_echo_n "checking how many arguments getspnam_r() takes... " >&6; } - if test "${ac_cv_func_which_getspnam_r+set}" = set; then + if test "${ac_cv_func_which_getspnam_r+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -9985,11 +8934,7 @@ ac_cv_func_which_getspnam_r=unknown # netdb.h is not declaring the function, and the compiler is thereby # assuming an implicit prototype. In which case, we're out of luck. # -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10006,32 +8951,9 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_which_getspnam_r=no -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # @@ -10040,11 +8962,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ac_cv_func_which_getspnam_r" = "unknown"; then -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10063,32 +8981,9 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_which_getspnam_r=five -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -10099,11 +8994,7 @@ fi if test "$ac_cv_func_which_getspnam_r" = "unknown"; then -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10114,40 +9005,17 @@ main () { char buffer[] = { '\0' }; - struct spwd spwdStruct; - const char *name = "myname"; - getspnam_r(name, &spwdStruct, buffer, sizeof buffer) /* ; */ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_func_which_getspnam_r=four -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + struct spwd spwdStruct; + const char *name = "myname"; + getspnam_r(name, &spwdStruct, buffer, sizeof buffer) /* ; */ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_func_which_getspnam_r=four fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -10159,30 +9027,28 @@ fi case "$ac_cv_func_which_getspnam_r" in five) - { $as_echo "$as_me:$LINENO: result: five" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: five" >&5 $as_echo "five" >&6; } NEW_SHADOW_API=YES ;; four) - { $as_echo "$as_me:$LINENO: result: four" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: four" >&5 $as_echo "four" >&6; } ;; no) - { $as_echo "$as_me:$LINENO: result: cannot find function declaration in shadow.h" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot find function declaration in shadow.h" >&5 $as_echo "cannot find function declaration in shadow.h" >&6; } ;; unknown) - { $as_echo "$as_me:$LINENO: result: can't tell" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't tell" >&5 $as_echo "can't tell" >&6; } ;; *) - { { $as_echo "$as_me:$LINENO: error: internal error" >&5 -$as_echo "$as_me: error: internal error" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "internal error" "$LINENO" 5 ;; esac @@ -10201,25 +9067,20 @@ fi if test "$_os" = "Linux"; then - { $as_echo "$as_me:$LINENO: checking whether to link to libcrypt" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to link to libcrypt" >&5 $as_echo_n "checking whether to link to libcrypt... " >&6; } if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CRYPT_LINK=YES - -{ $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 $as_echo_n "checking for crypt in -lcrypt... " >&6; } -if test "${ac_cv_lib_crypt_crypt+set}" = set; then +if test "${ac_cv_lib_crypt_crypt+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -10237,43 +9098,18 @@ return crypt (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypt_crypt=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_crypt_crypt=no + ac_cv_lib_crypt_crypt=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5 $as_echo "$ac_cv_lib_crypt_crypt" >&6; } -if test "x$ac_cv_lib_crypt_crypt" = x""yes; then +if test "x$ac_cv_lib_crypt_crypt" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPT 1 _ACEOF @@ -10281,13 +9117,11 @@ _ACEOF LIBS="-lcrypt $LIBS" else - { { $as_echo "$as_me:$LINENO: error: libcrypt not found or functional" >&5 -$as_echo "$as_me: error: libcrypt not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libcrypt not found or functional" "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: no, dynamically open it" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, dynamically open it" >&5 $as_echo "no, dynamically open it" >&6; } CRYPT_LINK=NO fi @@ -10321,9 +9155,9 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then +if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -10334,24 +9168,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:$LINENO: result: $CXX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -10365,9 +9199,9 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -10378,24 +9212,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -10408,7 +9242,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -10419,53 +9253,36 @@ fi fi fi # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10479,37 +9296,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes @@ -10518,20 +9314,16 @@ else fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then +if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10542,35 +9334,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CXXFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10581,36 +9349,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cxx_werror_flag=$ac_save_cxx_werror_flag +else + ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10621,42 +9365,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS @@ -10682,34 +9401,27 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi if test "$GXX" = "yes"; then - { $as_echo "$as_me:$LINENO: checking the GNU C++ compiler version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the GNU C++ compiler version" >&5 $as_echo_n "checking the GNU C++ compiler version... " >&6; } _gpp_version=`$CXX -dumpversion` _gpp_major=`echo $_gpp_version | $AWK -F. '{ print \$1 }'` _gpp_minor=`echo $_gpp_version | $AWK -F. '{ print \$2 }'` - { $as_echo "$as_me:$LINENO: result: checked (g++ $_gpp_version)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked (g++ $_gpp_version)" >&5 $as_echo "checked (g++ $_gpp_version)" >&6; } if test "$_gpp_major" = "3"; then if test "$_gpp_minor" = "4"; then - { $as_echo "$as_me:$LINENO: checking whether $CXX has the enum bug" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX has the enum bug" >&5 $as_echo_n "checking whether $CXX has the enum bug... " >&6; } -if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +as_fn_error "cannot run test program while cross compiling +See \`config.log' for more details." "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" void abort (void); @@ -10734,45 +9446,16 @@ main (void) } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { { $as_echo "$as_me:$LINENO: error: your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details." >&5 -$as_echo "$as_me: error: your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details." >&2;} - { (exit 1); exit 1; }; } +if ac_fn_c_try_run "$LINENO"; then : + as_fn_error "your version of the GNU C++ compile has a bug which prevents OpenOffice.org from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details." "$LINENO" 5 else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi fi @@ -10780,7 +9463,7 @@ fi # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path # often contains an i386 which is expanded as a macro. Solved in stlport. if test "$GXX" = "yes"; then - { $as_echo "$as_me:$LINENO: checking for g++ include path" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for g++ include path" >&5 $as_echo_n "checking for g++ include path... " >&6; } if test -z "$with_gxx_include_path"; then with_gxx_include_path=`echo "#include " | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` @@ -10799,17 +9482,17 @@ $as_echo_n "checking for g++ include path... " >&6; } fi if test -z "$with_gxx_include_path"; then with_gxx_include_path="NO_GXX_INCLUDE" - { $as_echo "$as_me:$LINENO: result: no g++ includes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no g++ includes" >&5 $as_echo "no g++ includes" >&6; } else - { $as_echo "$as_me:$LINENO: result: $with_gxx_include_path" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gxx_include_path" >&5 $as_echo "$with_gxx_include_path" >&6; } fi GXX_INCLUDE_PATH="$with_gxx_include_path" if test "$WITH_MINGWIN" = "yes"; then - { $as_echo "$as_me:$LINENO: checking for mingwin runtime include path" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mingwin runtime include path" >&5 $as_echo_n "checking for mingwin runtime include path... " >&6; } cat >conftest.$ac_ext <<_ACEOF #include @@ -10828,15 +9511,15 @@ _ACEOF fi if test -z "$_mingw_lib_include_path"; then _mingw_lib_include_path="NO_LIB_INCLUDE" - { $as_echo "$as_me:$LINENO: result: no mingwin runtime includes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no mingwin runtime includes" >&5 $as_echo "no mingwin runtime includes" >&6; } else - { $as_echo "$as_me:$LINENO: result: $_mingw_lib_include_path" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_mingw_lib_include_path" >&5 $as_echo "$_mingw_lib_include_path" >&6; } fi MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path" - { $as_echo "$as_me:$LINENO: checking for mingwin c++ backward include path" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mingwin c++ backward include path" >&5 $as_echo_n "checking for mingwin c++ backward include path... " >&6; } cat >conftest.$ac_ext <<_ACEOF #include @@ -10846,56 +9529,56 @@ _ACEOF if test -n "$_mingw_backward_include_path"; then _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path` _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path` - { $as_echo "$as_me:$LINENO: result: $_mingw_backward_include_path" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_mingw_backward_include_path" >&5 $as_echo "$_mingw_backward_include_path" >&6; } else _mingw_backward_include_path="NO_BACKWARD_INCLUDE" - { $as_echo "$as_me:$LINENO: result: no mingwin c++ backward includes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no mingwin c++ backward includes" >&5 $as_echo "no mingwin c++ backward includes" >&6; } fi MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path" mingw_crtbegin=`$CC -print-file-name=crtbegin.o` MINGW_CLIB_DIR=`dirname $mingw_crtbegin` - { $as_echo "$as_me:$LINENO: checking whether to use dynamic libgcc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use dynamic libgcc" >&5 $as_echo_n "checking whether to use dynamic libgcc... " >&6; } if test -e "$MINGW_CLIB_DIR/libgcc_s.a"; then - { $as_echo "$as_me:$LINENO: checking dynamic libgcc name" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic libgcc name" >&5 $as_echo_n "checking dynamic libgcc name... " >&6; } MINGW_GCCDLL_pattern=`nm $MINGW_CLIB_DIR/libgcc_s.a | sed -ne 's@.* _libgcc\(.*\)_dll_iname@libgcc\1.dll@p' | uniq | sed -e 's@_@?@g'` MINGW_GCCDLL=`cd $COMPATH && ls $MINGW_GCCDLL_pattern 2>/dev/null` if test -n "$MINGW_GCCDLL"; then MINGW_SHARED_GCCLIB=YES - { $as_echo "$as_me:$LINENO: result: use $MINGW_GCCDLL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: use $MINGW_GCCDLL" >&5 $as_echo "use $MINGW_GCCDLL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then MINGW_GCCLIB_EH=YES fi - { $as_echo "$as_me:$LINENO: checking whether to use dynamic libstdc++" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use dynamic libstdc++" >&5 $as_echo_n "checking whether to use dynamic libstdc++... " >&6; } if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then - { $as_echo "$as_me:$LINENO: checking dynamic libstdc++ name" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic libstdc++ name" >&5 $as_echo_n "checking dynamic libstdc++ name... " >&6; } MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/libstdc++_s.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'` MINGW_GXXDLL=`cd $COMPATH && ls $MINGW_GXXDLL_pattern 2>/dev/null` if test -n "$MINGW_GXXDLL"; then MINGW_SHARED_GXXLIB=YES - { $as_echo "$as_me:$LINENO: result: use $MINGW_GXXDLL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: use $MINGW_GXXDLL" >&5 $as_echo "use $MINGW_GXXDLL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR` @@ -10909,62 +9592,62 @@ fi if test "$_os" = "SunOS"; then if test "$CC" = "cc"; then - { $as_echo "$as_me:$LINENO: checking SunStudio C++ Compiler" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking SunStudio C++ Compiler" >&5 $as_echo_n "checking SunStudio C++ Compiler... " >&6; } if test "$CXX" != "CC"; then - { $as_echo "$as_me:$LINENO: WARNING: SunStudio C++ was not found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SunStudio C++ was not found" >&5 $as_echo "$as_me: WARNING: SunStudio C++ was not found" >&2;} echo "SunStudio C++ was not found" >> warn else - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } fi fi fi if test "$_os" = "Darwin"; then if test "$CC" = "cc"; then - { $as_echo "$as_me:$LINENO: checking Macosx c++ Compiler" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Macosx c++ Compiler" >&5 $as_echo_n "checking Macosx c++ Compiler... " >&6; } if test "$CXX" != "c++"; then - { $as_echo "$as_me:$LINENO: WARNING: Macosx C++ was not found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Macosx C++ was not found" >&5 $as_echo "$as_me: WARNING: Macosx C++ was not found" >&2;} echo "Macosx C++ was not found" >> warn else - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } fi fi fi if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then if test "$CC" = "cc"; then - { $as_echo "$as_me:$LINENO: checking SGI MIPSpro C++ Compiler" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking SGI MIPSpro C++ Compiler" >&5 $as_echo_n "checking SGI MIPSpro C++ Compiler... " >&6; } if test "$CXX" != "CC"; then - { $as_echo "$as_me:$LINENO: WARNING: SGI MIPSpro C++ was not found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SGI MIPSpro C++ was not found" >&5 $as_echo "$as_me: WARNING: SGI MIPSpro C++ was not found" >&2;} echo "SGI MIPSpro C++ was not found" >> warn else - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } fi fi fi if test "$_os" = "OSF1"; then - { $as_echo "$as_me:$LINENO: checking Compaq C++ compiler version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Compaq C++ compiler version" >&5 $as_echo_n "checking Compaq C++ compiler version... " >&6; } _compaqcxx_version=`$CXX -V 2>&1 | $AWK '{ print $3 }'` _compaqcxx_major=`echo $_compaqcxx_version | $AWK -F. '{ print $1 }'` if test "$_compaqcxx_major" != "V6"; then - { $as_echo "$as_me:$LINENO: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&5 $as_echo "$as_me: WARNING: found version \"$_compaqc_version\", use version 6 of the Compaq C++ compiler" >&2;} echo "found version $_compaqc_version, use version 6 of the Compaq C++ compiler" >> warn else - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } fi fi -{ $as_echo "$as_me:$LINENO: checking exception type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking exception type" >&5 $as_echo_n "checking exception type... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -10974,11 +9657,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "$WITH_MINGWIN" = "yes"; then -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10993,42 +9672,17 @@ _Unwind_SjLj_RaiseException() return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_cxx_try_link "$LINENO"; then : exceptions_type="sjlj" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - exceptions_type="dwarf2" + exceptions_type="dwarf2" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $exceptions_type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $exceptions_type" >&5 $as_echo "$exceptions_type" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -11042,7 +9696,7 @@ EXCEPTIONS="$exceptions_type" if test "$_os" = "SunOS"; then _temp=`showrev -p | $AWK -F" " '{ print $2 }'` if test "$_os_release" = "7"; then - { $as_echo "$as_me:$LINENO: checking for patch 106327-06 or greater" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for patch 106327-06 or greater" >&5 $as_echo_n "checking for patch 106327-06 or greater... " >&6; } _patch=`echo $_temp | $AWK '/106327-06/ { print "found" }'` _patch="false" @@ -11057,14 +9711,14 @@ $as_echo_n "checking for patch 106327-06 or greater... " >&6; } fi done if test "$_patch" = "found"; then - { $as_echo "$as_me:$LINENO: result: found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else - { $as_echo "$as_me:$LINENO: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&5 $as_echo "$as_me: WARNING: patch 106327-06 not found, please install compiler patch 106327-06 or greater" >&2;} echo "patch 106327-06 not found, please install compiler patch 106327-06 or greater" >> warn fi - { $as_echo "$as_me:$LINENO: checking for patch 106950-11 or greater" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for patch 106950-11 or greater" >&5 $as_echo_n "checking for patch 106950-11 or greater... " >&6; } _patch=`echo $_temp | $AWK '/106950-11/ { print "found" }'` _patch="false" @@ -11079,16 +9733,16 @@ $as_echo_n "checking for patch 106950-11 or greater... " >&6; } fi done if test "$_patch" = "found"; then - { $as_echo "$as_me:$LINENO: result: found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else - { $as_echo "$as_me:$LINENO: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&5 $as_echo "$as_me: WARNING: patch 106950-11 not found, please install linker patch 106950-11 or greater" >&2;} echo "patch 106950-11 not found, please install linker patch 106950-11 or greater" >> warn fi else if test "$_os_release" = "6"; then - { $as_echo "$as_me:$LINENO: checking for patch 105591-09 or greater" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for patch 105591-09 or greater" >&5 $as_echo_n "checking for patch 105591-09 or greater... " >&6; } _patch=`echo $_temp | $AWK '/105591-09/ { print "found" }'` _patch="false" @@ -11103,14 +9757,14 @@ $as_echo_n "checking for patch 105591-09 or greater... " >&6; } fi done if test "$_patch" = "found"; then - { $as_echo "$as_me:$LINENO: result: found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else - { $as_echo "$as_me:$LINENO: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&5 $as_echo "$as_me: WARNING: patch 105591-09 not found, please install compiler patch 105591-09 or greater" >&2;} echo "patch 105591-09 not found, please install compiler patch 105591-09 or greater" >> warn fi - { $as_echo "$as_me:$LINENO: checking for patch 107733-08 or greater" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for patch 107733-08 or greater" >&5 $as_echo_n "checking for patch 107733-08 or greater... " >&6; } _patch=`echo $_temp | $AWK '/107733-08/ { print "found" }'` _patch="false" @@ -11125,10 +9779,10 @@ $as_echo_n "checking for patch 107733-08 or greater... " >&6; } fi done if test "$_patch" = "found"; then - { $as_echo "$as_me:$LINENO: result: found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else - { $as_echo "$as_me:$LINENO: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&5 $as_echo "$as_me: WARNING: patch 107733-06 not found, please install linker patch 107733-08 or greater" >&2;} echo "patch 107733-06 not found, please install linker patch 107733-08 or greater" >> warn fi @@ -11138,24 +9792,22 @@ fi if test -n "$enable_sgistl" && "$enable_sgistl" != "no"; then if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - { $as_echo "$as_me:$LINENO: checking for SGI STL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SGI STL" >&5 $as_echo_n "checking for SGI STL... " >&6; } if test -d /usr/include/CC ; then - { $as_echo "$as_me:$LINENO: result: yes." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes." >&5 $as_echo "yes." >&6; } else - { $as_echo "$as_me:$LINENO: result: not found." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found." >&5 $as_echo "not found." >&6; } fi else - { { $as_echo "$as_me:$LINENO: error: Option --enable-sgistl is only valid for IRIX" >&5 -$as_echo "$as_me: error: Option --enable-sgistl is only valid for IRIX" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Option --enable-sgistl is only valid for IRIX" "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: checking what the default STL should be" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what the default STL should be" >&5 $as_echo_n "checking what the default STL should be... " >&6; } DEFAULT_TO_STLPORT="no" if test "$_os" = "Linux"; then @@ -11177,151 +9829,115 @@ $as_echo_n "checking what the default STL should be... " >&6; } DEFAULT_TO_STLPORT="yes" fi if test "$DEFAULT_TO_STLPORT" = "yes"; then - { $as_echo "$as_me:$LINENO: result: stlport" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: stlport" >&5 $as_echo "stlport" >&6; } else - { $as_echo "$as_me:$LINENO: result: system" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 $as_echo "system" >&6; } fi if test "$WITH_STLPORT" = "auto"; then WITH_STLPORT=$DEFAULT_TO_STLPORT fi - { $as_echo "$as_me:$LINENO: checking for STL providing headers" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STL providing headers" >&5 $as_echo_n "checking for STL providing headers... " >&6; } STLPORT4="" USE_SYSTEM_STL="" if test "$WITH_STLPORT" = "yes"; then - { $as_echo "$as_me:$LINENO: result: using internal stlport." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using internal stlport." >&5 $as_echo "using internal stlport." >&6; } if test "$DEFAULT_TO_STLPORT" != "yes"; then - { $as_echo "$as_me:$LINENO: WARNING: using stlport. Warning, breaks your ABI compatability!" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using stlport. Warning, breaks your ABI compatability!" >&5 $as_echo "$as_me: WARNING: using stlport. Warning, breaks your ABI compatability!" >&2;} echo "using stlport. Warning, breaks your ABI compatability!" >>warn fi elif test "$WITH_STLPORT" = "no"; then - { $as_echo "$as_me:$LINENO: result: using system STL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using system STL" >&5 $as_echo "using system STL" >&6; } USE_SYSTEM_STL="YES" if test "$DEFAULT_TO_STLPORT" != "no"; then - { $as_echo "$as_me:$LINENO: WARNING: using system STL. Warning, breaks your ABI compatability!" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using system STL. Warning, breaks your ABI compatability!" >&5 $as_echo "$as_me: WARNING: using system STL. Warning, breaks your ABI compatability!" >&2;} echo "using system STL. Warning, breaks your ABI compatability!" >>warn fi else STLPORT4=$WITH_STLPORT if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $STLPORT4/stlport/hash_map _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - { $as_echo "$as_me:$LINENO: result: checked." >&5 +if ac_fn_c_try_cpp "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked." >&5 $as_echo "checked." >&6; } else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { { $as_echo "$as_me:$LINENO: error: STLport headers not found." >&5 -$as_echo "$as_me: error: STLport headers not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "STLport headers not found." "$LINENO" 5 fi - rm -f conftest.err conftest.$ac_ext else if test -f "$STLPORT4/stlport/hash_map"; then - { $as_echo "$as_me:$LINENO: result: checked." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked." >&5 $as_echo "checked." >&6; } else - { { $as_echo "$as_me:$LINENO: error: STLport headers not found." >&5 -$as_echo "$as_me: error: STLport headers not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "STLport headers not found." "$LINENO" 5 fi fi if test "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes"; then - { $as_echo "$as_me:$LINENO: checking for STLport libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STLport libraries" >&5 $as_echo_n "checking for STLport libraries... " >&6; } if test "$_os" = "SunOS"; then if test -f "$STLPORT4/lib/libstlport_sunpro.so"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } elif test -f "$STLPORT4/lib/libstlport.so"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } STLPORT_VER=500 else - { { $as_echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -$as_echo "$as_me: error: STLport libraries not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "STLport libraries not found" "$LINENO" 5 fi elif test "$_os" = "Darwin"; then if test -f "$STLPORT4/lib/libstlport_gcc.dylib"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } elif test -f "$STLPORT4/lib/libstlport.dylib"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } STLPORT_VER=500 else - { { $as_echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -$as_echo "$as_me: error: STLport libraries not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "STLport libraries not found" "$LINENO" 5 fi elif test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then if test -f "$STLPORT4/lib/libstlport_mipspro_41.so"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } else if test -f "$STLPORT4/lib/libstlport_gcc.so"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } elif test -f "$STLPORT4/lib/libstlport.so"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } STLPORT_VER=500 else - { { $as_echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -$as_echo "$as_me: error: STLport libraries not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "STLport libraries not found" "$LINENO" 5 fi fi else if test -f "$STLPORT4/lib/libstlport_gcc.so"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } elif test -f "$STLPORT4/lib/libstlport.so"; then - { $as_echo "$as_me:$LINENO: result: checked" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked" >&5 $as_echo "checked" >&6; } STLPORT_VER=500 else - { { $as_echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -$as_echo "$as_me: error: STLport libraries not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "STLport libraries not found" "$LINENO" 5 fi fi fi if test "$DEFAULT_TO_STLPORT" != "yes"; then - { $as_echo "$as_me:$LINENO: WARNING: using stlport. Warning, breaks your ABI compatability!" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using stlport. Warning, breaks your ABI compatability!" >&5 $as_echo "$as_me: WARNING: using stlport. Warning, breaks your ABI compatability!" >&2;} echo "using stlport. Warning, breaks your ABI compatability!" >>warn fi @@ -11339,15 +9955,11 @@ fi if test "$GCC" = "yes"; then - { $as_echo "$as_me:$LINENO: checking whether $CC supports -fvisibility=hidden" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fvisibility=hidden" >&5 $as_echo_n "checking whether $CC supports -fvisibility=hidden... " >&6; } save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -fvisibility=hidden" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -11358,44 +9970,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : HAVE_GCC_VISIBILITY_FEATURE=TRUE -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext CFLAGS=$save_CFLAGS if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi @@ -11403,28 +9988,28 @@ fi # =================================================================== # use --ccache-skip? # =================================================================== -{ $as_echo "$as_me:$LINENO: checking whether we are allowed and able to use --ccache-skip" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are allowed and able to use --ccache-skip" >&5 $as_echo_n "checking whether we are allowed and able to use --ccache-skip... " >&6; } if test "$_os" != "Darwin" ; then - { $as_echo "$as_me:$LINENO: result: only used on Mac currently, skipping" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: only used on Mac currently, skipping" >&5 $as_echo "only used on Mac currently, skipping" >&6; } elif test "$enable_ccache_skip" = "no" ; then - { $as_echo "$as_me:$LINENO: result: no - diabled explicitly" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - diabled explicitly" >&5 $as_echo "no - diabled explicitly" >&6; } elif test "$enable_ccache_skip" = "yes" ; then - { $as_echo "$as_me:$LINENO: result: yes - enabled explicitly, skipping checks" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - enabled explicitly, skipping checks" >&5 $as_echo "yes - enabled explicitly, skipping checks" >&6; } USE_CCACHE=YES elif test "$enable_ccache_skip" = "auto" ; then # checking for ccache presence/version - { $as_echo "$as_me:$LINENO: result: probing..." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: probing..." >&5 $as_echo "probing..." >&6; } # Extract the first word of "ccache", so it can be a program name with args. set dummy ccache; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CCACHE+set}" = set; then +if test "${ac_cv_path_CCACHE+set}" = set; then : $as_echo_n "(cached) " >&6 else case $CCACHE in @@ -11437,14 +10022,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_CCACHE" && ac_cv_path_CCACHE="not_found" @@ -11453,26 +10038,26 @@ esac fi CCACHE=$ac_cv_path_CCACHE if test -n "$CCACHE"; then - { $as_echo "$as_me:$LINENO: result: $CCACHE" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5 $as_echo "$CCACHE" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$CCACHE" = "not_found" ; then - { $as_echo "$as_me:$LINENO: not enabling --ccache-skip (ccache not found)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: not enabling --ccache-skip (ccache not found)" >&5 $as_echo "$as_me: not enabling --ccache-skip (ccache not found)" >&6;} else # check ccache version - { $as_echo "$as_me:$LINENO: checking whether version of ccache is suitable" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether version of ccache is suitable" >&5 $as_echo_n "checking whether version of ccache is suitable... " >&6; } CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'` if test "$CCACHE_VERSION" = "2.4_OOo"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - { $as_echo "$as_me:$LINENO: checking whether ccache is actually used for the build" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ccache is actually used for the build" >&5 $as_echo_n "checking whether ccache is actually used for the build... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -11482,11 +10067,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS --ccache-skip -O2" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -11497,40 +10078,19 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : use_ccache=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - use_ccache=no + use_ccache=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $use_ccache = yes ; then - { $as_echo "$as_me:$LINENO: result: yes, will enable --ccache-skip" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will enable --ccache-skip" >&5 $as_echo "yes, will enable --ccache-skip" >&6; } USE_CCACHE=YES else - { $as_echo "$as_me:$LINENO: result: no, will not enable --ccache-skip" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, will not enable --ccache-skip" >&5 $as_echo "no, will not enable --ccache-skip" >&6; } fi CXXFLAGS=$save_CXXFLAGS @@ -11541,20 +10101,18 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - { $as_echo "$as_me:$LINENO: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&5 $as_echo "$as_me: ccache version $CCACHE_VERSION not accepted. See description for --enable-ccache-skip" >&6;} fi fi else - { { $as_echo "$as_me:$LINENO: error: invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" >&5 -$as_echo "$as_me: error: invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "invalid option to --enable-ccache-skip. Valid values are \"auto\", \"yes\" and \"no\"" "$LINENO" 5 fi if test "$USE_SYSTEM_STL" = "YES"; then - { $as_echo "$as_me:$LINENO: checking if hash_map will be in __gnu_cxx namespace" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hash_map will be in __gnu_cxx namespace" >&5 $as_echo_n "checking if hash_map will be in __gnu_cxx namespace... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -11563,11 +10121,7 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include using namespace __gnu_cxx; @@ -11580,68 +10134,41 @@ hash_map t; return 0; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_have_ext_hash_map=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_cxx_have_ext_hash_map=no + ac_cv_cxx_have_ext_hash_map=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ac_cv_cxx_have_ext_hash_map" = "no"; then - { { $as_echo "$as_me:$LINENO: error: Can't find hash_map. Try with --with-stlport" >&5 -$as_echo "$as_me: error: Can't find hash_map. Try with --with-stlport" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Can't find hash_map. Try with --with-stlport" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_have_ext_hash_map" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_have_ext_hash_map" >&5 $as_echo "$ac_cv_cxx_have_ext_hash_map" >&6; } fi if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - { $as_echo "$as_me:$LINENO: checking if STL headers are visibility safe" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if STL headers are visibility safe" >&5 $as_echo_n "checking if STL headers are visibility safe... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "visibility push" >/dev/null 2>&1; then + $EGREP "visibility push" >/dev/null 2>&1; then : stlvisok=yes else stlvisok=no fi rm -f conftest* - { $as_echo "$as_me:$LINENO: result: $stlvisok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $stlvisok" >&5 $as_echo "$stlvisok" >&6; } if test "$stlvisok" = "no"; then - { $as_echo "$as_me:$LINENO: WARNING: Your gcc STL headers are not visibility safe. Disabling visibility" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your gcc STL headers are not visibility safe. Disabling visibility" >&5 $as_echo "$as_me: WARNING: Your gcc STL headers are not visibility safe. Disabling visibility" >&2;} echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn unset HAVE_GCC_VISIBILITY_FEATURE @@ -11652,13 +10179,9 @@ $as_echo "$as_me: WARNING: Your gcc STL headers are not visibility safe. Disabli sharedlink_ldflags_save=$LDFLAGS LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared" - { $as_echo "$as_me:$LINENO: checking if gcc is -fvisibility-inlines-hidden safe with STL headers" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc is -fvisibility-inlines-hidden safe with STL headers" >&5 $as_echo_n "checking if gcc is -fvisibility-inlines-hidden safe with STL headers... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include using namespace std; @@ -11671,43 +10194,18 @@ istringstream strm( "test" ); return 0; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_cxx_try_link "$LINENO"; then : $EGREP -q unresolvable conftest.err; if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gccvisok=no + gccvisok=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $gccvisok" >&5 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gccvisok" >&5 $as_echo "$gccvisok" >&6; } if test "$gccvisok" = "no"; then - { $as_echo "$as_me:$LINENO: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >&5 $as_echo "$as_me: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >&2;} echo "Your gcc is not -fvisibility-inlines-hidden safe. Disabling visibility" >> warn unset HAVE_GCC_VISIBILITY_FEATURE @@ -11717,7 +10215,7 @@ $as_echo "$as_me: WARNING: Your gcc is not -fvisibility-inlines-hidden safe. Dis fi if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - { $as_echo "$as_me:$LINENO: checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)" >&5 $as_echo_n "checking if gcc has a visibility bug with class-level attributes (GCC bug 26905)... " >&6; } cat >visibility.cxx <<_ACEOF #pragma GCC visibility push(hidden) @@ -11739,129 +10237,38 @@ _ACEOF fi rm -f visibility.s - { $as_echo "$as_me:$LINENO: result: $gccvisbroken" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gccvisbroken" >&5 $as_echo "$gccvisbroken" >&6; } - if test "$gccvisbroken" = "yes"; then - { $as_echo "$as_me:$LINENO: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility" >&5 -$as_echo "$as_me: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility" >&2;} - echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn - unset HAVE_GCC_VISIBILITY_FEATURE - fi - fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi - - - -{ $as_echo "$as_me:$LINENO: checking which memory allocator to use" >&5 -$as_echo_n "checking which memory allocator to use... " >&6; } -if test "$with_alloc" = "system"; then - { $as_echo "$as_me:$LINENO: result: system" >&5 -$as_echo "system" >&6; } - ALLOC="SYS_ALLOC"; - - - - -for ac_func in malloc realloc calloc free -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif + if test "$gccvisbroken" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility" >&5 +$as_echo "$as_me: WARNING: Your gcc is not -fvisibility=hidden safe. Disabling visibility" >&2;} + echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn + unset HAVE_GCC_VISIBILITY_FEATURE + fi + fi -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - eval "$as_ac_var=no" fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which memory allocator to use" >&5 +$as_echo_n "checking which memory allocator to use... " >&6; } +if test "$with_alloc" = "system"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 +$as_echo "system" >&6; } + ALLOC="SYS_ALLOC"; + for ac_func in malloc realloc calloc free +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -11871,26 +10278,19 @@ done fi if test "$with_alloc" = "tcmalloc"; then - { $as_echo "$as_me:$LINENO: result: tcmalloc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: tcmalloc" >&5 $as_echo "tcmalloc" >&6; } if ! echo $build_cpu | grep -E 'i[3456]86' 2>/dev/null >/dev/null; then - { { $as_echo "$as_me:$LINENO: error: tcmalloc only available/usable on ix86" >&5 -$as_echo "$as_me: error: tcmalloc only available/usable on ix86" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "tcmalloc only available/usable on ix86" "$LINENO" 5 fi - -{ $as_echo "$as_me:$LINENO: checking for malloc in -ltcmalloc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -ltcmalloc" >&5 $as_echo_n "checking for malloc in -ltcmalloc... " >&6; } -if test "${ac_cv_lib_tcmalloc_malloc+set}" = set; then +if test "${ac_cv_lib_tcmalloc_malloc+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltcmalloc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11908,43 +10308,18 @@ return malloc (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_tcmalloc_malloc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_tcmalloc_malloc=no + ac_cv_lib_tcmalloc_malloc=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_tcmalloc_malloc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tcmalloc_malloc" >&5 $as_echo "$ac_cv_lib_tcmalloc_malloc" >&6; } -if test "x$ac_cv_lib_tcmalloc_malloc" = x""yes; then +if test "x$ac_cv_lib_tcmalloc_malloc" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBTCMALLOC 1 _ACEOF @@ -11952,45 +10327,43 @@ _ACEOF LIBS="-ltcmalloc $LIBS" else - { { $as_echo "$as_me:$LINENO: error: tcmalloc not found or functional. Install the Google Profiling Tools" >&5 -$as_echo "$as_me: error: tcmalloc not found or functional. Install the Google Profiling Tools" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "tcmalloc not found or functional. Install the Google Profiling Tools" "$LINENO" 5 fi ALLOC="TCMALLOC"; fi if test "$with_alloc" = "internal" -o -z "$with_alloc"; then - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to add custom build version" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to add custom build version" >&5 $as_echo_n "checking whether to add custom build version... " >&6; } if test "z$with_build_version" != "z"; then BUILD_VER_STRING=$with_build_version - { $as_echo "$as_me:$LINENO: result: yes, $BUILD_VER_STRING" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $BUILD_VER_STRING" >&5 $as_echo "yes, $BUILD_VER_STRING" >&6; } else BUILD_VER_STRING= - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to build with Java support" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Java support" >&5 $as_echo_n "checking whether to build with Java support... " >&6; } if test "$WITH_JAVA" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SOLAR_JAVA="TRUE" else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SOLAR_JAVA="" - { $as_echo "$as_me:$LINENO: WARNING: building without java will mean some features will not be available" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building without java will mean some features will not be available" >&5 $as_echo "$as_me: WARNING: building without java will mean some features will not be available" >&2;} echo "building without java will mean some features will not be available" >>warn fi @@ -12018,9 +10391,9 @@ if test "$SOLAR_JAVA" != ""; then if test -z "$with_jdk_home"; then # Extract the first word of "$WITH_JAVA", so it can be a program name with args. set dummy $WITH_JAVA; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_JAVAINTERPRETER+set}" = set; then +if test "${ac_cv_path_JAVAINTERPRETER+set}" = set; then : $as_echo_n "(cached) " >&6 else case $JAVAINTERPRETER in @@ -12033,14 +10406,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVAINTERPRETER="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -12048,10 +10421,10 @@ esac fi JAVAINTERPRETER=$ac_cv_path_JAVAINTERPRETER if test -n "$JAVAINTERPRETER"; then - { $as_echo "$as_me:$LINENO: result: $JAVAINTERPRETER" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAINTERPRETER" >&5 $as_echo "$JAVAINTERPRETER" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -12061,9 +10434,7 @@ fi if test -x "$_java_path"; then JAVAINTERPRETER=$_java_path else - { { $as_echo "$as_me:$LINENO: error: $_java_path not found set with_jdk_home" >&5 -$as_echo "$as_me: error: $_java_path not found set with_jdk_home" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$_java_path not found set with_jdk_home" "$LINENO" 5 fi fi if test "$_os" = "WINNT"; then @@ -12077,13 +10448,11 @@ fi if test "$SOLAR_JAVA" != ""; then _gij_longver=0 - { $as_echo "$as_me:$LINENO: checking the installed JDK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the installed JDK" >&5 $as_echo_n "checking the installed JDK... " >&6; } if test -n "$JAVAINTERPRETER"; then if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then - { { $as_echo "$as_me:$LINENO: error: No valid check available. Please check the block for your desired java in configure.in" >&5 -$as_echo "$as_me: error: No valid check available. Please check the block for your desired java in configure.in" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "No valid check available. Please check the block for your desired java in configure.in" "$LINENO" 5 # dnl Kaffe specific tests # KAFFE_VER=`$JAVAINTERPRETER -version 2>&1 | $EGREP " Version:" | $SED -r "s/.* Version: ([[0-9\.]]*).*/\1/"` # if test -z "$KAFFE_VER"; then @@ -12103,15 +10472,13 @@ $as_echo "$as_me: error: No valid check available. Please check the block for yo # JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then JDK=gcj - { $as_echo "$as_me:$LINENO: result: checked (gcj)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked (gcj)" >&5 $as_echo "checked (gcj)" >&6; } _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[^0-9]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` elif test `$JAVAINTERPRETER -version 2>&1 | awk '{ print }' | grep -c "BEA"` -gt 0; then - { { $as_echo "$as_me:$LINENO: error: No valid check available. Please check the block for your desired java in configure.in" >&5 -$as_echo "$as_me: error: No valid check available. Please check the block for your desired java in configure.in" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "No valid check available. Please check the block for your desired java in configure.in" "$LINENO" 5 # JDK=bea # # dnl BEA JDK specific tests @@ -12141,20 +10508,15 @@ $as_echo "$as_me: error: No valid check available. Please check the block for yo _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` if test "$_jdk_ver" -lt 10600; then - { { $as_echo "$as_me:$LINENO: error: IBM JDK is too old, you need at least 1.6" >&5 -$as_echo "$as_me: error: IBM JDK is too old, you need at least 1.6" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "IBM JDK is too old, you need at least 1.6" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: result: checked (IBM JDK $_jdk)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked (IBM JDK $_jdk)" >&5 $as_echo "checked (IBM JDK $_jdk)" >&6; } if test "$with_jdk_home" = ""; then - { { $as_echo "$as_me:$LINENO: error: In order to successfully build OpenOffice.org using the IBM JDK, -you must use the \"--with-jdk-home\" configure option explicitly" >&5 -$as_echo "$as_me: error: In order to successfully build OpenOffice.org using the IBM JDK, -you must use the \"--with-jdk-home\" configure option explicitly" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "In order to successfully build OpenOffice.org using the IBM JDK, +you must use the \"--with-jdk-home\" configure option explicitly" "$LINENO" 5 fi JAVA_HOME=$with_jdk_home @@ -12166,11 +10528,9 @@ you must use the \"--with-jdk-home\" configure option explicitly" >&2;} _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` if test "$_jdk_ver" -lt 10500; then - { { $as_echo "$as_me:$LINENO: error: JDK is too old, you need at least 1.5" >&5 -$as_echo "$as_me: error: JDK is too old, you need at least 1.5" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "JDK is too old, you need at least 1.5" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: result: checked (JDK $_jdk)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked (JDK $_jdk)" >&5 $as_echo "checked (JDK $_jdk)" >&6; } JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` if test "$_os" = "WINNT"; then @@ -12181,9 +10541,7 @@ $as_echo "checked (JDK $_jdk)" >&6; } fi fi else - { { $as_echo "$as_me:$LINENO: error: JAVA not found. You need at least jdk-1.5, or gcj-4" >&5 -$as_echo "$as_me: error: JAVA not found. You need at least jdk-1.5, or gcj-4" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "JAVA not found. You need at least jdk-1.5, or gcj-4" "$LINENO" 5 fi else JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME @@ -12203,9 +10561,9 @@ if test "$SOLAR_JAVA" != ""; then if test -z "$with_jdk_home"; then # Extract the first word of "$javacompiler", so it can be a program name with args. set dummy $javacompiler; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_JAVACOMPILER+set}" = set; then +if test "${ac_cv_path_JAVACOMPILER+set}" = set; then : $as_echo_n "(cached) " >&6 else case $JAVACOMPILER in @@ -12218,14 +10576,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVACOMPILER="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -12233,10 +10591,10 @@ esac fi JAVACOMPILER=$ac_cv_path_JAVACOMPILER if test -n "$JAVACOMPILER"; then - { $as_echo "$as_me:$LINENO: result: $JAVACOMPILER" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVACOMPILER" >&5 $as_echo "$JAVACOMPILER" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -12248,9 +10606,7 @@ fi fi fi if test -z "$JAVACOMPILER"; then - { { $as_echo "$as_me:$LINENO: error: $javacompiler not found set with_jdk_home" >&5 -$as_echo "$as_me: error: $javacompiler not found set with_jdk_home" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$javacompiler not found set with_jdk_home" "$LINENO" 5 fi if test "$_os" = "WINNT"; then if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then @@ -12266,10 +10622,10 @@ $as_echo "$as_me: error: $javacompiler not found set with_jdk_home" >&2;} fi if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then - { $as_echo "$as_me:$LINENO: checking re-checking JDK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking re-checking JDK" >&5 $as_echo_n "checking re-checking JDK... " >&6; } JDK=gcj - { $as_echo "$as_me:$LINENO: result: checked (ecj)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked (ecj)" >&5 $as_echo "checked (ecj)" >&6; } #TODO: what's to do here? some switch to do 1.5 compiling? JAVAFLAGS="-source 1.5 -target 1.5" @@ -12289,9 +10645,9 @@ if test "$SOLAR_JAVA" != ""; then if test -z "$with_jdk_home"; then # Extract the first word of "javadoc", so it can be a program name with args. set dummy javadoc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_JAVADOC+set}" = set; then +if test "${ac_cv_path_JAVADOC+set}" = set; then : $as_echo_n "(cached) " >&6 else case $JAVADOC in @@ -12304,14 +10660,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -12319,10 +10675,10 @@ esac fi JAVADOC=$ac_cv_path_JAVADOC if test -n "$JAVADOC"; then - { $as_echo "$as_me:$LINENO: result: $JAVADOC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVADOC" >&5 $as_echo "$JAVADOC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -12339,9 +10695,9 @@ fi else # Extract the first word of "javadoc", so it can be a program name with args. set dummy javadoc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_JAVADOC+set}" = set; then +if test "${ac_cv_path_JAVADOC+set}" = set; then : $as_echo_n "(cached) " >&6 else case $JAVADOC in @@ -12354,14 +10710,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -12369,10 +10725,10 @@ esac fi JAVADOC=$ac_cv_path_JAVADOC if test -n "$JAVADOC"; then - { $as_echo "$as_me:$LINENO: result: $JAVADOC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVADOC" >&5 $as_echo "$JAVADOC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -12380,9 +10736,7 @@ fi fi fi if test -z "$JAVADOC"; then - { { $as_echo "$as_me:$LINENO: error: $_javadoc_path not found set with_jdk_home" >&5 -$as_echo "$as_me: error: $_javadoc_path not found set with_jdk_home" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$_javadoc_path not found set with_jdk_home" "$LINENO" 5 fi if test "$_os" = "WINNT"; then if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then @@ -12414,37 +10768,33 @@ class findhome } } _ACEOF - { $as_echo "$as_me:$LINENO: checking if javac works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if javac works" >&5 $as_echo_n "checking if javac works... " >&6; } javac_cmd="$JAVACOMPILER findhome.java 1>&2" - { (eval echo "$as_me:$LINENO: \"$javac_cmd\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$javac_cmd\""; } >&5 (eval $javac_cmd) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } if test $? = 0 && test -f ./findhome.class ; then - { $as_echo "$as_me:$LINENO: result: javac works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: javac works" >&5 $as_echo "javac works" >&6; } else echo "configure: javac test failed" >&5 cat findhome.java >&5 - { { $as_echo "$as_me:$LINENO: error: javac does not work - java projects will not build!" >&5 -$as_echo "$as_me: error: javac does not work - java projects will not build!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "javac does not work - java projects will not build!" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking if gij knows its java.home" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gij knows its java.home" >&5 $as_echo_n "checking if gij knows its java.home... " >&6; } JAVA_HOME=`$JAVAINTERPRETER findhome` if test $? = 0 && test "$JAVA_HOME" != "" ; then - { $as_echo "$as_me:$LINENO: result: $JAVA_HOME" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_HOME" >&5 $as_echo "$JAVA_HOME" >&6; } else echo "configure: java test failed" >&5 cat findhome.java >&5 - { { $as_echo "$as_me:$LINENO: error: gij does not know its java.home - use --with-jdk-home" >&5 -$as_echo "$as_me: error: gij does not know its java.home - use --with-jdk-home" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "gij does not know its java.home - use --with-jdk-home" "$LINENO" 5 fi else JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$WITH_JAVA,,p"` @@ -12466,9 +10816,9 @@ $as_echo "$as_me: error: gij does not know its java.home - use --with-jdk-home" JAVA_HOME=$(readlink $JAVACOMPILER) else # else warn - { $as_echo "$as_me:$LINENO: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&5 $as_echo "$as_me: WARNING: JAVA_HOME is set to /usr - this is very likely to be incorrect" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&5 $as_echo "$as_me: WARNING: if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >&2;} echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn @@ -12491,11 +10841,11 @@ $as_echo "$as_me: WARNING: if this is the case, please inform the correct JAVA_H JAVA_HOME_OK="NO" fi if test "$JAVA_HOME_OK" = "NO"; then - { $as_echo "$as_me:$LINENO: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&5 $as_echo "$as_me: WARNING: JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&5 $as_echo "$as_me: WARNING: attempted to find JAVA_HOME automatically, but apparently it failed" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&5 $as_echo "$as_me: WARNING: in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >&2;} echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn @@ -12509,7 +10859,7 @@ fi AWTLIB= if test "$SOLAR_JAVA" != ""; then - { $as_echo "$as_me:$LINENO: checking for jawt lib name" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jawt lib name" >&5 $as_echo_n "checking for jawt lib name... " >&6; } if test "$JDK" = "gcj"; then save_CFLAGS=$CFLAGS @@ -12517,154 +10867,22 @@ $as_echo_n "checking for jawt lib name... " >&6; } CFLAGS="$CFLAGS -I$JAVA_HOME/include" LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj" exec 6>/dev/null # no output - if test "${ac_cv_header_jni_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for jni.h" >&5 -$as_echo_n "checking for jni.h... " >&6; } -if test "${ac_cv_header_jni_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 -$as_echo "$ac_cv_header_jni_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking jni.h usability" >&5 -$as_echo_n "checking jni.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking jni.h presence" >&5 -$as_echo_n "checking jni.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: jni.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: jni.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: jni.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: jni.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: jni.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: jni.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: jni.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for jni.h" >&5 -$as_echo_n "checking for jni.h... " >&6; } -if test "${ac_cv_header_jni_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_jni_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 -$as_echo "$ac_cv_header_jni_h" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "jni.h" "ac_cv_header_jni_h" "$ac_includes_default" +if test "x$ac_cv_header_jni_h" = x""yes; then : -fi -if test "x$ac_cv_header_jni_h" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" >&5 -$as_echo "$as_me: error: jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking for JAWT_GetAWT in -lgcjawt" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAWT_GetAWT in -lgcjawt" >&5 $as_echo_n "checking for JAWT_GetAWT in -lgcjawt... " >&6; } -if test "${ac_cv_lib_gcjawt_JAWT_GetAWT+set}" = set; then +if test "${ac_cv_lib_gcjawt_JAWT_GetAWT+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgcjawt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -12682,43 +10900,18 @@ return JAWT_GetAWT (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gcjawt_JAWT_GetAWT=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_gcjawt_JAWT_GetAWT=no + ac_cv_lib_gcjawt_JAWT_GetAWT=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gcjawt_JAWT_GetAWT" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcjawt_JAWT_GetAWT" >&5 $as_echo "$ac_cv_lib_gcjawt_JAWT_GetAWT" >&6; } -if test "x$ac_cv_lib_gcjawt_JAWT_GetAWT" = x""yes; then +if test "x$ac_cv_lib_gcjawt_JAWT_GetAWT" = x""yes; then : AWTLIB="-lgcjawt -lgcj" fi @@ -12737,154 +10930,22 @@ fi LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH export LD_LIBRARY_PATH exec 6>/dev/null # no output - if test "${ac_cv_header_jni_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for jni.h" >&5 -$as_echo_n "checking for jni.h... " >&6; } -if test "${ac_cv_header_jni_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 -$as_echo "$ac_cv_header_jni_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking jni.h usability" >&5 -$as_echo_n "checking jni.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking jni.h presence" >&5 -$as_echo_n "checking jni.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: jni.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: jni.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: jni.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: jni.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: jni.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: jni.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: jni.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: jni.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jni.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: jni.h: in the future, the compiler will take precedence" >&2;} + ac_fn_c_check_header_mongrel "$LINENO" "jni.h" "ac_cv_header_jni_h" "$ac_includes_default" +if test "x$ac_cv_header_jni_h" = x""yes; then : - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for jni.h" >&5 -$as_echo_n "checking for jni.h... " >&6; } -if test "${ac_cv_header_jni_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_jni_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jni_h" >&5 -$as_echo "$ac_cv_header_jni_h" >&6; } - -fi -if test "x$ac_cv_header_jni_h" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: jni.h could not be found." >&5 -$as_echo "$as_me: error: jni.h could not be found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "jni.h could not be found." "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking for JAWT_GetAWT in -ljawt" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAWT_GetAWT in -ljawt" >&5 $as_echo_n "checking for JAWT_GetAWT in -ljawt... " >&6; } -if test "${ac_cv_lib_jawt_JAWT_GetAWT+set}" = set; then +if test "${ac_cv_lib_jawt_JAWT_GetAWT+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljawt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -12902,60 +10963,31 @@ return JAWT_GetAWT (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jawt_JAWT_GetAWT=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_jawt_JAWT_GetAWT=no + ac_cv_lib_jawt_JAWT_GetAWT=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jawt_JAWT_GetAWT" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jawt_JAWT_GetAWT" >&5 $as_echo "$ac_cv_lib_jawt_JAWT_GetAWT" >&6; } -if test "x$ac_cv_lib_jawt_JAWT_GetAWT" = x""yes; then +if test "x$ac_cv_lib_jawt_JAWT_GetAWT" = x""yes; then : AWTLIB="-ljawt" fi if test -z "$AWTLIB"; then LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt" - { $as_echo "$as_me:$LINENO: checking for JAWT_GetAWT in -lmawt" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAWT_GetAWT in -lmawt" >&5 $as_echo_n "checking for JAWT_GetAWT in -lmawt... " >&6; } -if test "${ac_cv_lib_mawt_JAWT_GetAWT+set}" = set; then +if test "${ac_cv_lib_mawt_JAWT_GetAWT+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmawt $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -12973,43 +11005,18 @@ return JAWT_GetAWT (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_mawt_JAWT_GetAWT=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_mawt_JAWT_GetAWT=no + ac_cv_lib_mawt_JAWT_GetAWT=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mawt_JAWT_GetAWT" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mawt_JAWT_GetAWT" >&5 $as_echo "$ac_cv_lib_mawt_JAWT_GetAWT" >&6; } -if test "x$ac_cv_lib_mawt_JAWT_GetAWT" = x""yes; then +if test "x$ac_cv_lib_mawt_JAWT_GetAWT" = x""yes; then : AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt" fi @@ -13022,23 +11029,23 @@ fi if test -z "$AWTLIB"; then AWTLIB=-ljawt fi - { $as_echo "$as_me:$LINENO: result: $AWTLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWTLIB" >&5 $as_echo "$AWTLIB" >&6; } fi if test "$SOLAR_JAVA" != ""; then - { $as_echo "$as_me:$LINENO: checking whether to enable gcj aot compilation" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable gcj aot compilation" >&5 $as_echo_n "checking whether to enable gcj aot compilation... " >&6; } if test -n "$enable_gcjaot" && test "$enable_gcjaot" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } if test `echo $WITH_JAVA | grep -c "gij"` -eq 0; then gcjaot="gcj" else gcjaot=`echo $WITH_JAVA | $SED -e "s/gij/gcj/g"` fi - { $as_echo "$as_me:$LINENO: result: $gcjaot" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcjaot" >&5 $as_echo "$gcjaot" >&6; } if test -n "$with_jdk_home"; then _javac_path="$with_jdk_home/bin/$gcjaot" @@ -13049,9 +11056,9 @@ $as_echo "$gcjaot" >&6; } if test -z "$JAVAAOTCOMPILER"; then # Extract the first word of "$gcjaot", so it can be a program name with args. set dummy $gcjaot; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_JAVAAOTCOMPILER+set}" = set; then +if test "${ac_cv_path_JAVAAOTCOMPILER+set}" = set; then : $as_echo_n "(cached) " >&6 else case $JAVAAOTCOMPILER in @@ -13064,14 +11071,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVAAOTCOMPILER="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -13079,21 +11086,21 @@ esac fi JAVAAOTCOMPILER=$ac_cv_path_JAVAAOTCOMPILER if test -n "$JAVAAOTCOMPILER"; then - { $as_echo "$as_me:$LINENO: result: $JAVAAOTCOMPILER" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAAOTCOMPILER" >&5 $as_echo "$JAVAAOTCOMPILER" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$JAVAAOTCOMPILER"; then - { $as_echo "$as_me:$LINENO: WARNING: $gcjaot not found, set with_jdk_home" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $gcjaot not found, set with_jdk_home" >&5 $as_echo "$as_me: WARNING: $gcjaot not found, set with_jdk_home" >&2;} fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi @@ -13110,9 +11117,9 @@ fi # Extract the first word of "dmake", so it can be a program name with args. set dummy dmake; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_DMAKE+set}" = set; then +if test "${ac_cv_path_DMAKE+set}" = set; then : $as_echo_n "(cached) " >&6 else case $DMAKE in @@ -13125,14 +11132,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DMAKE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_DMAKE" && ac_cv_path_DMAKE="no" @@ -13141,10 +11148,10 @@ esac fi DMAKE=$ac_cv_path_DMAKE if test -n "$DMAKE"; then - { $as_echo "$as_me:$LINENO: result: $DMAKE" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DMAKE" >&5 $as_echo "$DMAKE" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -13153,7 +11160,7 @@ if test "$DMAKE" = "no"; then BUILD_DMAKE=YES echo "dmake will be built on ./bootstrap" else - { $as_echo "$as_me:$LINENO: checking whether the found dmake is the right dmake" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the found dmake is the right dmake" >&5 $as_echo_n "checking whether the found dmake is the right dmake... " >&6; } # we need to find out whether that dmake we found is "our" dmake # or the dmake from Sun's SunStudio Compiler which is something @@ -13163,26 +11170,26 @@ $as_echo_n "checking whether the found dmake is the right dmake... " >&6; } $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null if test $? -eq 0; then BUILD_DMAKE=NO - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - { $as_echo "$as_me:$LINENO: checking the dmake version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the dmake version" >&5 $as_echo_n "checking the dmake version... " >&6; } DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'` if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then - { $as_echo "$as_me:$LINENO: result: OK, >= 4.11" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK, >= 4.11" >&5 $as_echo "OK, >= 4.11" >&6; } elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \ test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then - { $as_echo "$as_me:$LINENO: result: OK, >= 4.11" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK, >= 4.11" >&5 $as_echo "OK, >= 4.11" >&6; } else - { $as_echo "$as_me:$LINENO: result: too old. >= 4.11 is needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old. >= 4.11 is needed" >&5 $as_echo "too old. >= 4.11 is needed" >&6; } echo "A newer dmake will be built on ./bootstrap" BUILD_DMAKE=YES fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "dmake will be built on ./bootstrap" BUILD_DMAKE=YES @@ -13190,10 +11197,10 @@ $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to enable EPM for packing" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable EPM for packing" >&5 $as_echo_n "checking whether to enable EPM for packing... " >&6; } if test "$_os" != "WINNT" -a \( "z$enable_epm" = "z" -o "$enable_epm" != "no" \) ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } if test "$_os" != "WINNT"; then if test -n "$with_epm"; then @@ -13201,9 +11208,9 @@ $as_echo "yes" >&6; } else # Extract the first word of "epm", so it can be a program name with args. set dummy epm; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_EPM+set}" = set; then +if test "${ac_cv_path_EPM+set}" = set; then : $as_echo_n "(cached) " >&6 else case $EPM in @@ -13216,14 +11223,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_EPM="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_EPM" && ac_cv_path_EPM="no" @@ -13232,10 +11239,10 @@ esac fi EPM=$ac_cv_path_EPM if test -n "$EPM"; then - { $as_echo "$as_me:$LINENO: result: $EPM" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EPM" >&5 $as_echo "$EPM" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -13247,43 +11254,37 @@ fi BUILD_TYPE="$BUILD_TYPE EPM" else # Gentoo has some epm which is something different... - { $as_echo "$as_me:$LINENO: checking whether the found epm is the right epm" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the found epm is the right epm" >&5 $as_echo_n "checking whether the found epm is the right epm... " >&6; } if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { { $as_echo "$as_me:$LINENO: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" >&5 -$as_echo "$as_me: error: no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking epm version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking epm version" >&5 $as_echo_n "checking epm version... " >&6; } EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//` if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \ test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then - { $as_echo "$as_me:$LINENO: result: OK, >= 3.7" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK, >= 3.7" >&5 $as_echo "OK, >= 3.7" >&6; } BUILD_EPM=NO if test "$_os" = "Darwin"; then - { $as_echo "$as_me:$LINENO: checking which PackageMaker EPM thinks to use" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which PackageMaker EPM thinks to use" >&5 $as_echo_n "checking which PackageMaker EPM thinks to use... " >&6; } _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1` if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then - { { $as_echo "$as_me:$LINENO: error: $_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&5 -$as_echo "$as_me: error: $_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" "$LINENO" 5 elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then - { $as_echo "$as_me:$LINENO: result: $_pm, ok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_pm, ok" >&5 $as_echo "$_pm, ok" >&6; } else # we never should get here, but go safe - { { $as_echo "$as_me:$LINENO: error: $_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&5 -$as_echo "$as_me: error: $_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)" "$LINENO" 5 fi fi else - { $as_echo "$as_me:$LINENO: result: too old. epm >= 3.7 is required." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old. epm >= 3.7 is required." >&5 $as_echo "too old. epm >= 3.7 is required." >&6; } echo "EPM will be built." BUILD_EPM=YES @@ -13293,7 +11294,7 @@ $as_echo "too old. epm >= 3.7 is required." >&6; } fi # test which package format to use - { $as_echo "$as_me:$LINENO: checking which package format to use" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which package format to use" >&5 $as_echo_n "checking which package format to use... " >&6; } # epm supports the following formats: # aix - AIX software distribution @@ -13342,30 +11343,15 @@ $as_echo_n "checking which package format to use... " >&6; } # we never should get here since we check the arciecture/os at the beginning, # but go sure... *) - { { $as_echo "$as_me:$LINENO: error: unknown system" >&5 -$as_echo "$as_me: error: unknown system" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "unknown system" "$LINENO" 5 esac - if test -n "$with_package_format"; then - for i in $with_package_format; do - case "$i" in - aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable) - ;; - *) - { { $as_echo "$as_me:$LINENO: error: unsupported format $i. Supported by EPM are: -aix - AIX software distribution -bsd - FreeBSD, NetBSD, or OpenBSD software distribution -depot or swinstall - HP-UX software distribution -deb - Debian software distribution -inst or tardist - IRIX software distribution -osx - MacOS X software distribution -pkg - Solaris software distribution -rpm - RedHat software distribution -setld - Tru64 (setld) software distribution -native - \"Native\" software distribution for the platform -portable - Portable software distribution - " >&5 -$as_echo "$as_me: error: unsupported format $i. Supported by EPM are: + if test -n "$with_package_format"; then + for i in $with_package_format; do + case "$i" in + aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable) + ;; + *) + as_fn_error "unsupported format $i. Supported by EPM are: aix - AIX software distribution bsd - FreeBSD, NetBSD, or OpenBSD software distribution depot or swinstall - HP-UX software distribution @@ -13377,17 +11363,16 @@ rpm - RedHat software distribution setld - Tru64 (setld) software distribution native - \"Native\" software distribution for the platform portable - Portable software distribution - " >&2;} - { (exit 1); exit 1; }; } + " "$LINENO" 5 ;; esac done PKGFORMAT="$with_package_format" fi - { $as_echo "$as_me:$LINENO: result: $PKGFORMAT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGFORMAT" >&5 $as_echo "$PKGFORMAT" >&6; } if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then - { $as_echo "$as_me:$LINENO: checking for rpm" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rpm" >&5 $as_echo_n "checking for rpm... " >&6; } for a in "$RPM" rpmbuild rpm; do $a --usage >/dev/null 2> /dev/null @@ -13403,21 +11388,19 @@ $as_echo_n "checking for rpm... " >&6; } fi done if test -z "$RPM" ; then - { { $as_echo "$as_me:$LINENO: error: not found" >&5 -$as_echo "$as_me: error: not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "not found" "$LINENO" 5 else RPM_PATH=`which $RPM` - { $as_echo "$as_me:$LINENO: result: $RPM_PATH" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RPM_PATH" >&5 $as_echo "$RPM_PATH" >&6; } fi fi if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then # Extract the first word of "dpkg", so it can be a program name with args. set dummy dpkg; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_DPKG+set}" = set; then +if test "${ac_cv_path_DPKG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $DPKG in @@ -13430,14 +11413,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_DPKG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_DPKG" && ac_cv_path_DPKG="no" @@ -13446,62 +11429,56 @@ esac fi DPKG=$ac_cv_path_DPKG if test -n "$DPKG"; then - { $as_echo "$as_me:$LINENO: result: $DPKG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DPKG" >&5 $as_echo "$DPKG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$DPKG" = "no"; then - { { $as_echo "$as_me:$LINENO: error: dpkg needed for deb creation. Install dpkg." >&5 -$as_echo "$as_me: error: dpkg needed for deb creation. Install dpkg." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "dpkg needed for deb creation. Install dpkg." "$LINENO" 5 fi fi if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then if test "$_os" = "Darwin"; then - { $as_echo "$as_me:$LINENO: checking for PackageMaker availability" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PackageMaker availability" >&5 $as_echo_n "checking for PackageMaker availability... " >&6; } if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then - { { $as_echo "$as_me:$LINENO: error: not installed. Please install Apples Dev Tools" >&5 -$as_echo "$as_me: error: not installed. Please install Apples Dev Tools" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "not installed. Please install Apples Dev Tools" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: result: ok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi else - { { $as_echo "$as_me:$LINENO: error: PackageMaker needed to build OSX packages and you are not on OSX..." >&5 -$as_echo "$as_me: error: PackageMaker needed to build OSX packages and you are not on OSX..." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "PackageMaker needed to build OSX packages and you are not on OSX..." "$LINENO" 5 fi fi if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \ echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then if test "$EPM" != "no" && test "$EPM" != "internal"; then if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then - { $as_echo "$as_me:$LINENO: checking whether epm is patched for OOos needs" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether epm is patched for OOos needs" >&5 $as_echo_n "checking whether epm is patched for OOos needs... " >&6; } if grep "Patched for OpenOffice.org" $EPM >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if echo "$PKGFORMAT" | grep -q rpm; then _pt="rpm" - { $as_echo "$as_me:$LINENO: WARNING: the rpms will need to be installed with --nodeps" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the rpms will need to be installed with --nodeps" >&5 $as_echo "$as_me: WARNING: the rpms will need to be installed with --nodeps" >&2;} echo "the rpms will need to be installed with --nodeps" >> warn else _pt="pkg" fi - { $as_echo "$as_me:$LINENO: WARNING: the ${_pt}s will not be relocateable" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the ${_pt}s will not be relocateable" >&5 $as_echo "$as_me: WARNING: the ${_pt}s will not be relocateable" >&2;} echo "the ${_pt}s will not be relocateable" >> warn - { $as_echo "$as_me:$LINENO: WARNING: if you want to make sure installation without --nodeps and + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: if you want to make sure installation without --nodeps and relocation will work, you need to patch your epm with the patch in epm/epm-3.7.patch or build with --with-epm=internal which will build a suitable epm" >&5 @@ -13516,9 +11493,9 @@ $as_echo "$as_me: WARNING: if you want to make sure installation without --nodep if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then # Extract the first word of "pkgmk", so it can be a program name with args. set dummy pkgmk; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKGMK+set}" = set; then +if test "${ac_cv_path_PKGMK+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKGMK in @@ -13531,14 +11508,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKGMK="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKGMK" && ac_cv_path_PKGMK="no" @@ -13547,18 +11524,16 @@ esac fi PKGMK=$ac_cv_path_PKGMK if test -n "$PKGMK"; then - { $as_echo "$as_me:$LINENO: result: $PKGMK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGMK" >&5 $as_echo "$PKGMK" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$PKGMK" = "no"; then - { { $as_echo "$as_me:$LINENO: error: pkgmk needed for Solaris pkg creation. Install it." >&5 -$as_echo "$as_me: error: pkgmk needed for Solaris pkg creation. Install it." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "pkgmk needed for Solaris pkg creation. Install it." "$LINENO" 5 fi fi @@ -13567,7 +11542,7 @@ $as_echo "$as_me: error: pkgmk needed for Solaris pkg creation. Install it." >&2 else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } EPM=NO fi @@ -13575,9 +11550,9 @@ fi # Extract the first word of "gperf", so it can be a program name with args. set dummy gperf; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GPERF+set}" = set; then +if test "${ac_cv_path_GPERF+set}" = set; then : $as_echo_n "(cached) " >&6 else case $GPERF in @@ -13590,14 +11565,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GPERF="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -13605,37 +11580,33 @@ esac fi GPERF=$ac_cv_path_GPERF if test -n "$GPERF"; then - { $as_echo "$as_me:$LINENO: result: $GPERF" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GPERF" >&5 $as_echo "$GPERF" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$GPERF"; then - { { $as_echo "$as_me:$LINENO: error: gperf not found but needed. Install it." >&5 -$as_echo "$as_me: error: gperf not found but needed. Install it." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "gperf not found but needed. Install it." "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: checking gperf version" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking gperf version" >&5 $as_echo_n "checking gperf version... " >&6; } if test "`$GPERF --version | $EGREP ^GNU\ gperf | $AWK '{ print $3 }' | cut -d. -f1`" -ge "3"; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 $as_echo "OK" >&6; } else - { { $as_echo "$as_me:$LINENO: error: too old, you need at least 3.0.0" >&5 -$as_echo "$as_me: error: too old, you need at least 3.0.0" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "too old, you need at least 3.0.0" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: checking whether to build the ODK" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the ODK" >&5 $as_echo_n "checking whether to build the ODK... " >&6; } if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } if test "$WITH_JAVA" != "no"; then - { $as_echo "$as_me:$LINENO: checking for external/unowinreg/unowinreg.dll" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for external/unowinreg/unowinreg.dll" >&5 $as_echo_n "checking for external/unowinreg/unowinreg.dll... " >&6; } if ! test -f "./external/unowinreg/unowinreg.dll"; then HAVE_UNOWINREG_DLL=no @@ -13643,30 +11614,25 @@ $as_echo_n "checking for external/unowinreg/unowinreg.dll... " >&6; } HAVE_UNOWINREG_DLL=yes fi if test "$HAVE_UNOWINREG_DLL" = "yes"; then - { $as_echo "$as_me:$LINENO: result: found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } BUILD_UNOWINREG=NO else if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: result: not found, will be built" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, will be built" >&5 $as_echo "not found, will be built" >&6; } else - { $as_echo "$as_me:$LINENO: WARNING: not found, will be cross-built using mingw32" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not found, will be cross-built using mingw32" >&5 $as_echo "$as_me: WARNING: not found, will be cross-built using mingw32" >&2;} fi BUILD_UNOWINREG=YES fi if test "$_os" != "WINNT" && test "$BUILD_UNOWINREG" = "YES"; then if test -z "$WITH_MINGWIN" || test "$WITH_MINGWIN" = "0"; then - { { $as_echo "$as_me:$LINENO: error: for rebuilding unowinreg.dll you need the mingw32 C++ compiler. - Specify mingw32 g++ executable name with --with-mingwin. - Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and - put it into external/unowinreg" >&5 -$as_echo "$as_me: error: for rebuilding unowinreg.dll you need the mingw32 C++ compiler. + as_fn_error "for rebuilding unowinreg.dll you need the mingw32 C++ compiler. Specify mingw32 g++ executable name with --with-mingwin. Or use prebuilt one from http://tools.openoffice.org/unowinreg_prebuild/680/ and - put it into external/unowinreg" >&2;} - { (exit 1); exit 1; }; } + put it into external/unowinreg" "$LINENO" 5 fi if echo "$WITH_MINGWIN" | $EGREP -q "/"; then if ! test -x "$WITH_MINGWIN"; then MINGWCXX=false; else MINGWCXX=`basename $WITH_MINGWIN`; fi @@ -13674,9 +11640,9 @@ $as_echo "$as_me: error: for rebuilding unowinreg.dll you need the mingw32 C++ c if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}$WITH_MINGWIN", so it can be a program name with args. set dummy ${ac_tool_prefix}$WITH_MINGWIN; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MINGWCXX+set}" = set; then +if test "${ac_cv_prog_MINGWCXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$MINGWCXX"; then @@ -13687,24 +11653,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MINGWCXX="${ac_tool_prefix}$WITH_MINGWIN" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi MINGWCXX=$ac_cv_prog_MINGWCXX if test -n "$MINGWCXX"; then - { $as_echo "$as_me:$LINENO: result: $MINGWCXX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MINGWCXX" >&5 $as_echo "$MINGWCXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -13714,9 +11680,9 @@ if test -z "$ac_cv_prog_MINGWCXX"; then ac_ct_MINGWCXX=$MINGWCXX # Extract the first word of "$WITH_MINGWIN", so it can be a program name with args. set dummy $WITH_MINGWIN; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_MINGWCXX+set}" = set; then +if test "${ac_cv_prog_ac_ct_MINGWCXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MINGWCXX"; then @@ -13727,24 +11693,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MINGWCXX="$WITH_MINGWIN" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_MINGWCXX=$ac_cv_prog_ac_ct_MINGWCXX if test -n "$ac_ct_MINGWCXX"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_MINGWCXX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MINGWCXX" >&5 $as_echo "$ac_ct_MINGWCXX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -13753,7 +11719,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -13765,18 +11731,14 @@ fi fi if test "$MINGWCXX" = "false"; then - { { $as_echo "$as_me:$LINENO: error: specified MinGW32 C++ cross-compiler not found. Install it or correct name." >&5 -$as_echo "$as_me: error: specified MinGW32 C++ cross-compiler not found. Install it or correct name." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "specified MinGW32 C++ cross-compiler not found. Install it or correct name." "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking whether we are using the MinGW32 cross C++ compiler" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the MinGW32 cross C++ compiler" >&5 $as_echo_n "checking whether we are using the MinGW32 cross C++ compiler... " >&6; } if ! echo "`$MINGWCXX -dumpmachine`" | grep -q mingw32; then - { { $as_echo "$as_me:$LINENO: error: no" >&5 -$as_echo "$as_me: error: no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi if echo "$WITH_MINGWIN" | $EGREP -q "/"; then @@ -13785,9 +11747,9 @@ $as_echo "yes" >&6; } if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}`echo $WITH_MINGWIN | $SED -e s/g++/strip/`", so it can be a program name with args. set dummy ${ac_tool_prefix}`echo $WITH_MINGWIN | $SED -e s/g++/strip/`; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MINGWSTRIP+set}" = set; then +if test "${ac_cv_prog_MINGWSTRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$MINGWSTRIP"; then @@ -13798,24 +11760,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MINGWSTRIP="${ac_tool_prefix}`echo $WITH_MINGWIN | $SED -e s/g++/strip/`" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi MINGWSTRIP=$ac_cv_prog_MINGWSTRIP if test -n "$MINGWSTRIP"; then - { $as_echo "$as_me:$LINENO: result: $MINGWSTRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MINGWSTRIP" >&5 $as_echo "$MINGWSTRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -13825,9 +11787,9 @@ if test -z "$ac_cv_prog_MINGWSTRIP"; then ac_ct_MINGWSTRIP=$MINGWSTRIP # Extract the first word of "`echo $WITH_MINGWIN | $SED -e s/g++/strip/`", so it can be a program name with args. set dummy `echo $WITH_MINGWIN | $SED -e s/g++/strip/`; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_MINGWSTRIP+set}" = set; then +if test "${ac_cv_prog_ac_ct_MINGWSTRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MINGWSTRIP"; then @@ -13838,24 +11800,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MINGWSTRIP="`echo $WITH_MINGWIN | $SED -e s/g++/strip/`" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_MINGWSTRIP=$ac_cv_prog_ac_ct_MINGWSTRIP if test -n "$ac_ct_MINGWSTRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_MINGWSTRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MINGWSTRIP" >&5 $as_echo "$ac_ct_MINGWSTRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -13864,7 +11826,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -13876,9 +11838,7 @@ fi fi if test "$MINGWSTRIP" = "false"; then - { { $as_echo "$as_me:$LINENO: error: MinGW32 binutils needed. Install them." >&5 -$as_echo "$as_me: error: MinGW32 binutils needed. Install them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "MinGW32 binutils needed. Install them." "$LINENO" 5 fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -13898,19 +11858,14 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # do not make sense here (and 'd make the check fail) save_LIBS=$LIBS LIBS="" - -{ $as_echo "$as_me:$LINENO: checking for main in -lkernel32" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lkernel32" >&5 $as_echo_n "checking for main in -lkernel32... " >&6; } -if test "${ac_cv_lib_kernel32_main+set}" = set; then +if test "${ac_cv_lib_kernel32_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkernel32 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13922,43 +11877,18 @@ return main (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_kernel32_main=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_kernel32_main=no + ac_cv_lib_kernel32_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_kernel32_main" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kernel32_main" >&5 $as_echo "$ac_cv_lib_kernel32_main" >&6; } -if test "x$ac_cv_lib_kernel32_main" = x""yes; then +if test "x$ac_cv_lib_kernel32_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBKERNEL32 1 _ACEOF @@ -13968,19 +11898,14 @@ _ACEOF fi ac_cv_lib_kernel32=ac_cv_lib_kernel32_main - -{ $as_echo "$as_me:$LINENO: checking for main in -ladvapi32" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ladvapi32" >&5 $as_echo_n "checking for main in -ladvapi32... " >&6; } -if test "${ac_cv_lib_advapi32_main+set}" = set; then +if test "${ac_cv_lib_advapi32_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ladvapi32 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13992,43 +11917,18 @@ return main (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_advapi32_main=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_advapi32_main=no + ac_cv_lib_advapi32_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_advapi32_main" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_advapi32_main" >&5 $as_echo "$ac_cv_lib_advapi32_main" >&6; } -if test "x$ac_cv_lib_advapi32_main" = x""yes; then +if test "x$ac_cv_lib_advapi32_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBADVAPI32 1 _ACEOF @@ -14038,139 +11938,11 @@ _ACEOF fi ac_cv_lib_advapi32=ac_cv_lib_advapi32_main - if test "${ac_cv_header_windows_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for windows.h" >&5 -$as_echo_n "checking for windows.h... " >&6; } -if test "${ac_cv_header_windows_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_windows_h" >&5 -$as_echo "$ac_cv_header_windows_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking windows.h usability" >&5 -$as_echo_n "checking windows.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking windows.h presence" >&5 -$as_echo_n "checking windows.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: windows.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: windows.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: windows.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: windows.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: windows.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: windows.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: windows.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: windows.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: windows.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: windows.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: windows.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: windows.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: windows.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: windows.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: windows.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: windows.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for windows.h" >&5 -$as_echo_n "checking for windows.h... " >&6; } -if test "${ac_cv_header_windows_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_windows_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_windows_h" >&5 -$as_echo "$ac_cv_header_windows_h" >&6; } + ac_fn_cxx_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" +if test "x$ac_cv_header_windows_h" = x""yes; then : -fi -if test "x$ac_cv_header_windows_h" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: windows.h missing" >&5 -$as_echo "$as_me: error: windows.h missing" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "windows.h missing" "$LINENO" 5 fi @@ -14189,7 +11961,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi BUILD_TYPE="$BUILD_TYPE ODK" else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } BUILD_UNOWINREG=NO fi @@ -14197,16 +11969,16 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether to build qadevOOo" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build qadevOOo" >&5 $as_echo_n "checking whether to build qadevOOo... " >&6; } if test "z$enable_qadevooo" = "z" -o "$enable_qadevooo" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } BUILD_QADEVOOO="YES" BUILD_TYPE="$BUILD_TYPE QADEVOOO" else BUILD_QADEVOOO="NO" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -14214,21 +11986,21 @@ fi if test -z "$with_system_stdlibs" -a -z "$with_system_libs"; then if test -n "$checkforprelink" -a -f /etc/rpm/macros.prelink; then with_system_stdlibs=yes - { $as_echo "$as_me:$LINENO: WARNING: prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&5 $as_echo "$as_me: WARNING: prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&2;} echo "prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >> warn fi fi -{ $as_echo "$as_me:$LINENO: checking whether to provide libstdc++/libgcc_s in the installset" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to provide libstdc++/libgcc_s in the installset" >&5 $as_echo_n "checking whether to provide libstdc++/libgcc_s in the installset... " >&6; } if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \ test "$with_system_stdlibs" != "no"; then - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SYSTEM_STDLIBS=YES else - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SYSTEM_STDLIBS=NO fi @@ -14237,161 +12009,29 @@ fi if test "$_os" = "Darwin" && test "$with_system_zlib" != "no"; then with_system_zlib=yes fi -{ $as_echo "$as_me:$LINENO: checking which zlib to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which zlib to use" >&5 $as_echo_n "checking which zlib to use... " >&6; } if test -n "$with_system_zlib" -o -n "$with_system_libs" && \ test "$with_system_zlib" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_ZLIB=YES - if test "${ac_cv_header_zlib_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 -$as_echo_n "checking for zlib.h... " >&6; } -if test "${ac_cv_header_zlib_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -$as_echo "$ac_cv_header_zlib_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5 -$as_echo_n "checking zlib.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5 -$as_echo_n "checking zlib.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" +if test "x$ac_cv_header_zlib_h" = x""yes; then : - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 -$as_echo_n "checking for zlib.h... " >&6; } -if test "${ac_cv_header_zlib_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_zlib_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -$as_echo "$ac_cv_header_zlib_h" >&6; } - -fi -if test "x$ac_cv_header_zlib_h" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: zlib.h not found. install zlib" >&5 -$as_echo "$as_me: error: zlib.h not found. install zlib" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "zlib.h not found. install zlib" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking for deflate in -lz" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5 $as_echo_n "checking for deflate in -lz... " >&6; } -if test "${ac_cv_lib_z_deflate+set}" = set; then +if test "${ac_cv_lib_z_deflate+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -14406,216 +12046,57 @@ main () { return deflate (); ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_z_deflate=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_z_deflate=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 -$as_echo "$ac_cv_lib_z_deflate" >&6; } -if test "x$ac_cv_lib_z_deflate" = x""yes; then - ZLIB=-lz -else - { { $as_echo "$as_me:$LINENO: error: zlib not found or functional" >&5 -$as_echo "$as_me: error: zlib not found or functional" >&2;} - { (exit 1); exit 1; }; } -fi - -else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } - SYSTEM_ZLIB=NO - BUILD_TYPE="$BUILD_TYPE ZLIB" -fi - - -{ $as_echo "$as_me:$LINENO: checking which jpeg to use" >&5 -$as_echo_n "checking which jpeg to use... " >&6; } -if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \ - test "$with_system_jpeg" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } - SYSTEM_JPEG=YES - if test "${ac_cv_header_jpeglib_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5 -$as_echo_n "checking for jpeglib.h... " >&6; } -if test "${ac_cv_header_jpeglib_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 -$as_echo "$ac_cv_header_jpeglib_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking jpeglib.h usability" >&5 -$as_echo_n "checking jpeglib.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking jpeglib.h presence" >&5 -$as_echo_n "checking jpeglib.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_z_deflate=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + ac_cv_lib_z_deflate=no fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for jpeglib.h" >&5 -$as_echo_n "checking for jpeglib.h... " >&6; } -if test "${ac_cv_header_jpeglib_h+set}" = set; then - $as_echo_n "(cached) " >&6 +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5 +$as_echo "$ac_cv_lib_z_deflate" >&6; } +if test "x$ac_cv_lib_z_deflate" = x""yes; then : + ZLIB=-lz else - ac_cv_header_jpeglib_h=$ac_header_preproc + as_fn_error "zlib not found or functional" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 -$as_echo "$ac_cv_header_jpeglib_h" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } + SYSTEM_ZLIB=NO + BUILD_TYPE="$BUILD_TYPE ZLIB" fi -if test "x$ac_cv_header_jpeglib_h" = x""yes; then - : + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which jpeg to use" >&5 +$as_echo_n "checking which jpeg to use... " >&6; } +if test -n "$with_system_jpeg" -o -n "$with_system_libs" && \ + test "$with_system_jpeg" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } + SYSTEM_JPEG=YES + ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default" +if test "x$ac_cv_header_jpeglib_h" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: jpeg.h not found. install libjpeg" >&5 -$as_echo "$as_me: error: jpeg.h not found. install libjpeg" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "jpeg.h not found. install libjpeg" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking for jpeg_resync_to_restart in -ljpeg" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_resync_to_restart in -ljpeg" >&5 $as_echo_n "checking for jpeg_resync_to_restart in -ljpeg... " >&6; } -if test "${ac_cv_lib_jpeg_jpeg_resync_to_restart+set}" = set; then +if test "${ac_cv_lib_jpeg_jpeg_resync_to_restart+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -14633,213 +12114,55 @@ return jpeg_resync_to_restart (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jpeg_jpeg_resync_to_restart=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_jpeg_jpeg_resync_to_restart=no + ac_cv_lib_jpeg_jpeg_resync_to_restart=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_resync_to_restart" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_resync_to_restart" >&5 $as_echo "$ac_cv_lib_jpeg_jpeg_resync_to_restart" >&6; } -if test "x$ac_cv_lib_jpeg_jpeg_resync_to_restart" = x""yes; then +if test "x$ac_cv_lib_jpeg_jpeg_resync_to_restart" = x""yes; then : JPEG3RDLIB=-ljpeg else - { $as_echo "$as_me:$LINENO: checking jpeg library not found or fuctional" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking jpeg library not found or fuctional" >&5 $as_echo_n "checking jpeg library not found or fuctional... " >&6; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_JPEG=NO BUILD_TYPE="$BUILD_TYPE JPEG" fi -{ $as_echo "$as_me:$LINENO: checking which expat to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which expat to use" >&5 $as_echo_n "checking which expat to use... " >&6; } if test -n "$with_system_expat" -o -n "$with_system_libs" && \ test "$with_system_expat" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_EXPAT=YES - if test "${ac_cv_header_expat_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for expat.h" >&5 -$as_echo_n "checking for expat.h... " >&6; } -if test "${ac_cv_header_expat_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 -$as_echo "$ac_cv_header_expat_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking expat.h usability" >&5 -$as_echo_n "checking expat.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking expat.h presence" >&5 -$as_echo_n "checking expat.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: expat.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: expat.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: expat.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: expat.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: expat.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: expat.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: expat.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: expat.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: expat.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: expat.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for expat.h" >&5 -$as_echo_n "checking for expat.h... " >&6; } -if test "${ac_cv_header_expat_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_expat_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 -$as_echo "$ac_cv_header_expat_h" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default" +if test "x$ac_cv_header_expat_h" = x""yes; then : -fi -if test "x$ac_cv_header_expat_h" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: expat.h not found. install expat" >&5 -$as_echo "$as_me: error: expat.h not found. install expat" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "expat.h not found. install expat" "$LINENO" 5 fi - -{ $as_echo "$as_me:$LINENO: checking for XML_ParserCreate in -lexpat" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate in -lexpat" >&5 $as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; } -if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then +if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lexpat $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -14857,43 +12180,18 @@ return XML_ParserCreate (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_expat_XML_ParserCreate=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_expat_XML_ParserCreate=no + ac_cv_lib_expat_XML_ParserCreate=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_expat_XML_ParserCreate" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_expat_XML_ParserCreate" >&5 $as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; } -if test "x$ac_cv_lib_expat_XML_ParserCreate" = x""yes; then +if test "x$ac_cv_lib_expat_XML_ParserCreate" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBEXPAT 1 _ACEOF @@ -14901,23 +12199,23 @@ _ACEOF LIBS="-lexpat $LIBS" else - { $as_echo "$as_me:$LINENO: result: expat library not found or functional." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: expat library not found or functional." >&5 $as_echo "expat library not found or functional." >&6; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_EXPAT=NO BUILD_TYPE="$BUILD_TYPE EXPAT" fi -{ $as_echo "$as_me:$LINENO: checking which libwpd to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libwpd to use" >&5 $as_echo_n "checking which libwpd to use... " >&6; } if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \ test "$with_system_libwpd" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_LIBWPD=YES @@ -14926,9 +12224,9 @@ $as_echo "external" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -14941,14 +12239,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -14957,10 +12255,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -14975,24 +12273,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libwpd-0.8 " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libwpd-0.8 " >&5 $as_echo_n "checking for libwpd-0.8 ... " >&6; } if $PKG_CONFIG --exists "libwpd-0.8 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking LIBWPD_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBWPD_CFLAGS" >&5 $as_echo_n "checking LIBWPD_CFLAGS... " >&6; } LIBWPD_CFLAGS=`$PKG_CONFIG --cflags "libwpd-0.8 "` - { $as_echo "$as_me:$LINENO: result: $LIBWPD_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBWPD_CFLAGS" >&5 $as_echo "$LIBWPD_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking LIBWPD_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBWPD_LIBS" >&5 $as_echo_n "checking LIBWPD_LIBS... " >&6; } LIBWPD_LIBS=`$PKG_CONFIG --libs "libwpd-0.8 "` - { $as_echo "$as_me:$LINENO: result: $LIBWPD_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBWPD_LIBS" >&5 $as_echo "$LIBWPD_LIBS" >&6; } else LIBWPD_CFLAGS="" @@ -15014,13 +12312,11 @@ $as_echo "$LIBWPD_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (libwpd-0.8 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_LIBWPD=NO BUILD_TYPE="$BUILD_TYPE LIBWPD" @@ -15030,7 +12326,7 @@ fi if test "$test_freetype" = "yes"; then - { $as_echo "$as_me:$LINENO: checking whether freetype is available" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether freetype is available" >&5 $as_echo_n "checking whether freetype is available... " >&6; } succeeded=no @@ -15038,9 +12334,9 @@ $as_echo_n "checking whether freetype is available... " >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -15053,14 +12349,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -15069,10 +12365,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -15087,24 +12383,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for freetype2 >= 2.0 " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2 >= 2.0 " >&5 $as_echo_n "checking for freetype2 >= 2.0 ... " >&6; } if $PKG_CONFIG --exists "freetype2 >= 2.0 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking FREETYPE_CFLAGS" >&5 $as_echo_n "checking FREETYPE_CFLAGS... " >&6; } FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2 >= 2.0 "` - { $as_echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_CFLAGS" >&5 $as_echo "$FREETYPE_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking FREETYPE_LIBS" >&5 $as_echo_n "checking FREETYPE_LIBS... " >&6; } FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2 >= 2.0 "` - { $as_echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIBS" >&5 $as_echo "$FREETYPE_LIBS" >&6; } else FREETYPE_CFLAGS="" @@ -15126,9 +12422,7 @@ $as_echo "$FREETYPE_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (freetype2 >= 2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi fi @@ -15141,18 +12435,14 @@ if test "$test_freetype" = "yes"; then save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS" LDFLAGS="$LDFLAGS $FREETYPE_LIBS" - { $as_echo "$as_me:$LINENO: checking for FT_GlyphSlot_Embolden in -lfreetype" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_GlyphSlot_Embolden in -lfreetype" >&5 $as_echo_n "checking for FT_GlyphSlot_Embolden in -lfreetype... " >&6; } -if test "${ac_cv_lib_freetype_FT_GlyphSlot_Embolden+set}" = set; then +if test "${ac_cv_lib_freetype_FT_GlyphSlot_Embolden+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfreetype $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -15170,43 +12460,18 @@ return FT_GlyphSlot_Embolden (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_freetype_FT_GlyphSlot_Embolden=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_freetype_FT_GlyphSlot_Embolden=no + ac_cv_lib_freetype_FT_GlyphSlot_Embolden=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_freetype_FT_GlyphSlot_Embolden" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_GlyphSlot_Embolden" >&5 $as_echo "$ac_cv_lib_freetype_FT_GlyphSlot_Embolden" >&6; } -if test "x$ac_cv_lib_freetype_FT_GlyphSlot_Embolden" = x""yes; then +if test "x$ac_cv_lib_freetype_FT_GlyphSlot_Embolden" = x""yes; then : USE_FT_EMBOLDEN="YES" else USE_FT_EMBOLDEN="NO" @@ -15239,25 +12504,25 @@ if test -n "$with_system_libxml" -o -n "$with_system_libs" && \ fi fi -{ $as_echo "$as_me:$LINENO: checking which libxslt to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libxslt to use" >&5 $as_echo_n "checking which libxslt to use... " >&6; } if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \ "$_os" = "Darwin" && \ test "$with_system_libxslt" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_LIBXSLT=YES if test "$_os" = "Darwin"; then - { $as_echo "$as_me:$LINENO: checking LIBXSLT_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXSLT_CFLAGS" >&5 $as_echo_n "checking LIBXSLT_CFLAGS... " >&6; } LIBXSLT_CFLAGS=`xslt-config --cflags` - { $as_echo "$as_me:$LINENO: result: $LIBXSLT_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXSLT_CFLAGS" >&5 $as_echo "$LIBXSLT_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking LIBXSLT_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXSLT_LIBS" >&5 $as_echo_n "checking LIBXSLT_LIBS... " >&6; } LIBXSLT_LIBS=`xslt-config --libs` - { $as_echo "$as_me:$LINENO: result: $LIBXSLT_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXSLT_LIBS" >&5 $as_echo "$LIBXSLT_LIBS" >&6; } @@ -15268,9 +12533,9 @@ $as_echo "$LIBXSLT_LIBS" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -15283,14 +12548,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -15299,10 +12564,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -15317,24 +12582,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libxslt" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxslt" >&5 $as_echo_n "checking for libxslt... " >&6; } if $PKG_CONFIG --exists "libxslt" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking LIBXSLT_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXSLT_CFLAGS" >&5 $as_echo_n "checking LIBXSLT_CFLAGS... " >&6; } LIBXSLT_CFLAGS=`$PKG_CONFIG --cflags "libxslt"` - { $as_echo "$as_me:$LINENO: result: $LIBXSLT_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXSLT_CFLAGS" >&5 $as_echo "$LIBXSLT_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking LIBXSLT_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXSLT_LIBS" >&5 $as_echo_n "checking LIBXSLT_LIBS... " >&6; } LIBXSLT_LIBS=`$PKG_CONFIG --libs "libxslt"` - { $as_echo "$as_me:$LINENO: result: $LIBXSLT_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXSLT_LIBS" >&5 $as_echo "$LIBXSLT_LIBS" >&6; } else LIBXSLT_CFLAGS="" @@ -15356,9 +12621,7 @@ $as_echo "$LIBXSLT_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (libxslt) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (libxslt) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (libxslt) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi fi @@ -15366,9 +12629,9 @@ $as_echo "$as_me: error: Library requirements (libxslt) not met; consider adjust # Extract the first word of "xsltproc", so it can be a program name with args. set dummy xsltproc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_XSLTPROC+set}" = set; then +if test "${ac_cv_path_XSLTPROC+set}" = set; then : $as_echo_n "(cached) " >&6 else case $XSLTPROC in @@ -15381,14 +12644,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_XSLTPROC" && ac_cv_path_XSLTPROC="no" @@ -15397,21 +12660,19 @@ esac fi XSLTPROC=$ac_cv_path_XSLTPROC if test -n "$XSLTPROC"; then - { $as_echo "$as_me:$LINENO: result: $XSLTPROC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 $as_echo "$XSLTPROC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$XSLTPROC" = "no"; then - { { $as_echo "$as_me:$LINENO: error: xsltproc is required" >&5 -$as_echo "$as_me: error: xsltproc is required" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "xsltproc is required" "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_LIBXSLT=NO BUILD_TYPE="$BUILD_TYPE LIBXSLT" @@ -15421,24 +12682,24 @@ fi -{ $as_echo "$as_me:$LINENO: checking which libxml to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libxml to use" >&5 $as_echo_n "checking which libxml to use... " >&6; } if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \ "$_os" = "Darwin" && \ test "$with_system_libxml" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_LIBXML=YES if test "$_os" = "Darwin"; then - { $as_echo "$as_me:$LINENO: checking LIBXML_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML_CFLAGS" >&5 $as_echo_n "checking LIBXML_CFLAGS... " >&6; } LIBXML_CFLAGS=`xml2-config --cflags` - { $as_echo "$as_me:$LINENO: result: $LIBXML_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML_CFLAGS" >&5 $as_echo "$LIBXML_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking LIBXML_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML_LIBS" >&5 $as_echo_n "checking LIBXML_LIBS... " >&6; } LIBXML_LIBS=`xml2-config --libs` - { $as_echo "$as_me:$LINENO: result: $LIBXML_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML_LIBS" >&5 $as_echo "$LIBXML_LIBS" >&6; } @@ -15449,9 +12710,9 @@ $as_echo "$LIBXML_LIBS" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -15464,14 +12725,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -15480,10 +12741,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -15498,24 +12759,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libxml-2.0 >= 2.0" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.0" >&5 $as_echo_n "checking for libxml-2.0 >= 2.0... " >&6; } if $PKG_CONFIG --exists "libxml-2.0 >= 2.0" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking LIBXML_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML_CFLAGS" >&5 $as_echo_n "checking LIBXML_CFLAGS... " >&6; } LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.0"` - { $as_echo "$as_me:$LINENO: result: $LIBXML_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML_CFLAGS" >&5 $as_echo "$LIBXML_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking LIBXML_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML_LIBS" >&5 $as_echo_n "checking LIBXML_LIBS... " >&6; } LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.0"` - { $as_echo "$as_me:$LINENO: result: $LIBXML_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML_LIBS" >&5 $as_echo "$LIBXML_LIBS" >&6; } else LIBXML_CFLAGS="" @@ -15537,16 +12798,14 @@ $as_echo "$LIBXML_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (libxml-2.0 >= 2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (libxml-2.0 >= 2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (libxml-2.0 >= 2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi fi BUILD_TYPE="$BUILD_TYPE LIBXMLSEC" else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_LIBXML=NO BUILD_TYPE="$BUILD_TYPE LIBXML2 LIBXMLSEC" @@ -15558,12 +12817,12 @@ fi if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then with_system_python=yes fi -{ $as_echo "$as_me:$LINENO: checking which python to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which python to use" >&5 $as_echo_n "checking which python to use... " >&6; } if test -n "$with_system_python" -o -n "$with_system_libs" && \ test "$with_system_python" != "no"; then SYSTEM_PYTHON=YES - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } @@ -15571,7 +12830,7 @@ $as_echo "external" >&6; } if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. - { $as_echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.2" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.2" >&5 $as_echo_n "checking whether $PYTHON version >= 2.2... " >&6; } prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros @@ -15584,22 +12843,19 @@ sys.exit(sys.hexversion < minverhex)" ($PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + (exit $ac_status); }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { { $as_echo "$as_me:$LINENO: error: too old" >&5 -$as_echo "$as_me: error: too old" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "too old" "$LINENO" 5 fi - am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. - { $as_echo "$as_me:$LINENO: checking for a Python interpreter with version >= 2.2" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.2" >&5 $as_echo_n "checking for a Python interpreter with version >= 2.2... " >&6; } -if test "${am_cv_pathless_PYTHON+set}" = set; then +if test "${am_cv_pathless_PYTHON+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -15616,13 +12872,12 @@ sys.exit(sys.hexversion < minverhex)" ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + (exit $ac_status); }; then : break fi - done fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 $as_echo "$am_cv_pathless_PYTHON" >&6; } # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then @@ -15630,9 +12885,9 @@ $as_echo "$am_cv_pathless_PYTHON" >&6; } else # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. set dummy $am_cv_pathless_PYTHON; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PYTHON+set}" = set; then +if test "${ac_cv_path_PYTHON+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PYTHON in @@ -15645,14 +12900,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -15660,10 +12915,10 @@ esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then - { $as_echo "$as_me:$LINENO: result: $PYTHON" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -15674,20 +12929,18 @@ fi if test "$PYTHON" = :; then - { { $as_echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5 -$as_echo "$as_me: error: no suitable Python interpreter found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no suitable Python interpreter found" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } -if test "${am_cv_python_version+set}" = set; then +if test "${am_cv_python_version+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"` fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_python_version" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 $as_echo "$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version @@ -15699,29 +12952,29 @@ $as_echo "$am_cv_python_version" >&6; } - { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } -if test "${am_cv_python_platform+set}" = set; then +if test "${am_cv_python_platform+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"` fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform - { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } -if test "${am_cv_python_pythondir+set}" = set; then +if test "${am_cv_python_pythondir+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 $as_echo "$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir @@ -15730,15 +12983,15 @@ $as_echo "$am_cv_python_pythondir" >&6; } pkgpythondir=\${pythondir}/$PACKAGE - { $as_echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } -if test "${am_cv_python_pyexecdir+set}" = set; then +if test "${am_cv_python_pyexecdir+set}" = set; then : $as_echo_n "(cached) " >&6 else am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"` fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 $as_echo "$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir @@ -15764,139 +13017,11 @@ $as_echo "$am_cv_python_pyexecdir" >&6; } save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" - if test "${ac_cv_header_Python_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for Python.h" >&5 -$as_echo_n "checking for Python.h... " >&6; } -if test "${ac_cv_header_Python_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5 -$as_echo "$ac_cv_header_Python_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking Python.h usability" >&5 -$as_echo_n "checking Python.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking Python.h presence" >&5 -$as_echo_n "checking Python.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" +if test "x$ac_cv_header_Python_h" = x""yes; then : -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: Python.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: Python.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: Python.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: Python.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: Python.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: Python.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: Python.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: Python.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: Python.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: Python.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: Python.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: Python.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: Python.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: Python.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for Python.h" >&5 -$as_echo_n "checking for Python.h... " >&6; } -if test "${ac_cv_header_Python_h+set}" = set; then - $as_echo_n "(cached) " >&6 else - ac_cv_header_Python_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_Python_h" >&5 -$as_echo "$ac_cv_header_Python_h" >&6; } - -fi -if test "x$ac_cv_header_Python_h" = x""yes; then - : -else - { { $as_echo "$as_me:$LINENO: error: Python headers not found" >&5 -$as_echo "$as_me: error: Python headers not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Python headers not found" "$LINENO" 5 fi @@ -15904,7 +13029,7 @@ fi else SYSTEM_PYTHON=NO BUILD_TYPE="$BUILD_TYPE PYTHON" - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } # Embedded python dies without Home set if test "z$HOME" = "z"; then @@ -15914,9 +13039,9 @@ $as_echo "internal" >&6; } if test -z "$BZIP2"; then # Extract the first word of "bzip2", so it can be a program name with args. set dummy bzip2; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_BZIP2+set}" = set; then +if test "${ac_cv_path_BZIP2+set}" = set; then : $as_echo_n "(cached) " >&6 else case $BZIP2 in @@ -15929,14 +13054,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_BZIP2="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -15944,136 +13069,46 @@ esac fi BZIP2=$ac_cv_path_BZIP2 if test -n "$BZIP2"; then - { $as_echo "$as_me:$LINENO: result: $BZIP2" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BZIP2" >&5 $as_echo "$BZIP2" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$BZIP2"; then - { { $as_echo "$as_me:$LINENO: error: the internal Python module has a .tar.bz2. You need bzip2" >&5 -$as_echo "$as_me: error: the internal Python module has a .tar.bz2. You need bzip2" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "the internal Python module has a .tar.bz2. You need bzip2" "$LINENO" 5 fi fi fi -HOME=`echo $HOME | sed 's:\\\\:/:g'` - - -{ $as_echo "$as_me:$LINENO: checking which db to use" >&5 -$as_echo_n "checking which db to use... " >&6; } -if test -n "$with_system_db" -o -n "$with_system_libs" && \ - test "$with_system_db" != "no"; then - SYSTEM_DB=YES - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } - { $as_echo "$as_me:$LINENO: checking for db.h" >&5 -$as_echo_n "checking for db.h... " >&6; } -if test "${ac_cv_header_db_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - - -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_db_h=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_db_h=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5 -$as_echo "$ac_cv_header_db_h" >&6; } -if test "x$ac_cv_header_db_h" = x""yes; then - DB_INCLUDES=/usr/include -else - - CFLAGS=-I/usr/include/db4 - { $as_echo "$as_me:$LINENO: checking for db4/db.h" >&5 -$as_echo_n "checking for db4/db.h... " >&6; } -if test "${ac_cv_header_db4_db_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -+ - -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_db4_db_h=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +HOME=`echo $HOME | sed 's:\\\\:/:g'` - ac_cv_header_db4_db_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_db4_db_h" >&5 -$as_echo "$ac_cv_header_db4_db_h" >&6; } -if test "x$ac_cv_header_db4_db_h" = x""yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which db to use" >&5 +$as_echo_n "checking which db to use... " >&6; } +if test -n "$with_system_db" -o -n "$with_system_libs" && \ + test "$with_system_db" != "no"; then + SYSTEM_DB=YES + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } + ac_fn_c_check_header_compile "$LINENO" "db.h" "ac_cv_header_db_h" " + +" +if test "x$ac_cv_header_db_h" = x""yes; then : + DB_INCLUDES=/usr/include +else + + CFLAGS=-I/usr/include/db4 + ac_fn_c_check_header_compile "$LINENO" "db4/db.h" "ac_cv_header_db4_db_h" "+ +" +if test "x$ac_cv_header_db4_db_h" = x""yes; then : DB_INCLUDES=/usr/include/db4 else - { { $as_echo "$as_me:$LINENO: error: no. install the db4 libraries" >&5 -$as_echo "$as_me: error: no. install the db4 libraries" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no. install the db4 libraries" "$LINENO" 5 fi @@ -16081,23 +13116,16 @@ fi fi - { $as_echo "$as_me:$LINENO: checking whether db is at least 4.1" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether db is at least 4.1" >&5 $as_echo_n "checking whether db is at least 4.1... " >&6; } for v in `seq 1 7`; do - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +as_fn_error "cannot run test program while cross compiling +See \`config.log' for more details." "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -16108,66 +13136,32 @@ int main(int argc, char **argv) { } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : DB_VERSION_MINOR=$v -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - done if test "$DB_VERSION_MINOR" -gt "1"; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 $as_echo "OK" >&6; } DB_VERSION=4.$DB_VERSION_MINOR else - { { $as_echo "$as_me:$LINENO: error: no. you need at least db 4.1" >&5 -$as_echo "$as_me: error: no. you need at least db 4.1" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no. you need at least db 4.1" "$LINENO" 5 fi # does not work :/ #AC_CHECK_LIB(db, db_create, [], # [AC_MSG_ERROR([db library not installed or functional])], []) - -{ $as_echo "$as_me:$LINENO: checking for main in -ldb" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldb" >&5 $as_echo_n "checking for main in -ldb... " >&6; } -if test "${ac_cv_lib_db_main+set}" = set; then +if test "${ac_cv_lib_db_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldb $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16179,43 +13173,18 @@ return main (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_db_main=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_db_main=no + ac_cv_lib_db_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_db_main" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_db_main" >&5 $as_echo "$ac_cv_lib_db_main" >&6; } -if test "x$ac_cv_lib_db_main" = x""yes; then +if test "x$ac_cv_lib_db_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDB 1 _ACEOF @@ -16223,15 +13192,13 @@ _ACEOF LIBS="-ldb $LIBS" else - { { $as_echo "$as_me:$LINENO: error: db not installed or functional" >&5 -$as_echo "$as_me: error: db not installed or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "db not installed or functional" "$LINENO" 5 fi ac_cv_lib_db=ac_cv_lib_db_main SCPDEFS="$SCPDEFS -DSYSTEM_DB" else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_DB=NO BUILD_TYPE="$BUILD_TYPE BERKELEYDB" @@ -16241,58 +13208,52 @@ fi -{ $as_echo "$as_me:$LINENO: checking which lucene to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which lucene to use" >&5 $as_echo_n "checking which lucene to use... " >&6; } if test -n "$with_system_lucene" -o -n "$with_system_libs" && \ test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_LUCENE=YES if test -z $LUCENE_CORE_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/lucene-core-2.3.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/lucene-core-2.3.jar" >&5 $as_echo_n "checking for /usr/share/java/lucene-core-2.3.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_lucene_core_2_3_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_lucene_core_2_3_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/lucene-core-2.3.jar"; then ac_cv_file__usr_share_java_lucene_core_2_3_jar=yes else ac_cv_file__usr_share_java_lucene_core_2_3_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_core_2_3_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_lucene_core_2_3_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_lucene_core_2_3_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_lucene_core_2_3_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_lucene_core_2_3_jar" = x""yes; then : LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/lucene.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/lucene.jar" >&5 $as_echo_n "checking for /usr/share/java/lucene.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_lucene_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_lucene_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/lucene.jar"; then ac_cv_file__usr_share_java_lucene_jar=yes else ac_cv_file__usr_share_java_lucene_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_lucene_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_lucene_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_lucene_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_lucene_jar" = x""yes; then : LUCENE_CORE_JAR=/usr/share/java/lucene.jar else - { { $as_echo "$as_me:$LINENO: error: lucene-core.jar replacement not found" >&5 -$as_echo "$as_me: error: lucene-core.jar replacement not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "lucene-core.jar replacement not found" "$LINENO" 5 fi @@ -16302,82 +13263,70 @@ fi else as_ac_File=`$as_echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LUCENE_CORE_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LUCENE_CORE_JAR" >&5 $as_echo_n "checking for $LUCENE_CORE_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LUCENE_CORE_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: lucene-core.jar not found." >&5 -$as_echo "$as_me: error: lucene-core.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "lucene-core.jar not found." "$LINENO" 5 fi fi if test -z $LUCENE_ANALYZERS_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/lucene-analyzers-2.3.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/lucene-analyzers-2.3.jar" >&5 $as_echo_n "checking for /usr/share/java/lucene-analyzers-2.3.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/lucene-analyzers-2.3.jar"; then ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar=yes else ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_lucene_analyzers_2_3_jar" = x""yes; then : LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/lucene-contrib/lucene-analyzers.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/lucene-contrib/lucene-analyzers.jar" >&5 $as_echo_n "checking for /usr/share/java/lucene-contrib/lucene-analyzers.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/lucene-contrib/lucene-analyzers.jar"; then ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar=yes else ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_lucene_contrib_lucene_analyzers_jar" = x""yes; then : LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar else - { { $as_echo "$as_me:$LINENO: error: lucene-analyzers.jar replacement not found." >&5 -$as_echo "$as_me: error: lucene-analyzers.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "lucene-analyzers.jar replacement not found." "$LINENO" 5 fi @@ -16387,38 +13336,32 @@ fi else as_ac_File=`$as_echo "ac_cv_file_$LUCENE_CORE_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LUCENE_CORE_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LUCENE_CORE_JAR" >&5 $as_echo_n "checking for $LUCENE_CORE_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LUCENE_CORE_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: lucene-analyzers.jar not found." >&5 -$as_echo "$as_me: error: lucene-analyzers.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "lucene-analyzers.jar not found." "$LINENO" 5 fi fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_LUCENE=NO BUILD_TYPE="$BUILD_TYPE LUCENE" @@ -16427,47 +13370,41 @@ fi -{ $as_echo "$as_me:$LINENO: checking which hsqldb to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which hsqldb to use" >&5 $as_echo_n "checking which hsqldb to use... " >&6; } if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \ test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_HSQLDB=YES if test -z $HSQLDB_JAR; then HSQLDB_JAR=/usr/share/java/hsqldb.jar fi as_ac_File=`$as_echo "ac_cv_file_$HSQLDB_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $HSQLDB_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $HSQLDB_JAR" >&5 $as_echo_n "checking for $HSQLDB_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$HSQLDB_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: hsqldb.jar not found." >&5 -$as_echo "$as_me: error: hsqldb.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "hsqldb.jar not found." "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking whether hsqldb is >= 1.8.0.9" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether hsqldb is >= 1.8.0.9" >&5 $as_echo_n "checking whether hsqldb is >= 1.8.0.9... " >&6; } export HSQLDB_JAR if $PERL -e 'use Archive::Zip; @@ -16491,15 +13428,13 @@ $as_echo_n "checking whether hsqldb is >= 1.8.0.9... " >&6; } } else { exit 1; }'; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { { $as_echo "$as_me:$LINENO: error: no, hsqldb >= 1.8.0.9 is needed" >&5 -$as_echo "$as_me: error: no, hsqldb >= 1.8.0.9 is needed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no, hsqldb >= 1.8.0.9 is needed" "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_HSQLDB=NO BUILD_TYPE="$BUILD_TYPE HSQLDB" @@ -16507,48 +13442,42 @@ fi -{ $as_echo "$as_me:$LINENO: checking which beanshell to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which beanshell to use" >&5 $as_echo_n "checking which beanshell to use... " >&6; } if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \ test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_BSH=YES if test -z $BSH_JAR; then BSH_JAR=/usr/share/java/bsh.jar fi as_ac_File=`$as_echo "ac_cv_file_$BSH_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $BSH_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $BSH_JAR" >&5 $as_echo_n "checking for $BSH_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$BSH_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: bsh.jar not found." >&5 -$as_echo "$as_me: error: bsh.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "bsh.jar not found." "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_BSH=NO BUILD_TYPE="$BUILD_TYPE BSH" @@ -16557,78 +13486,70 @@ fi -{ $as_echo "$as_me:$LINENO: checking which saxon to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which saxon to use" >&5 $as_echo_n "checking which saxon to use... " >&6; } if test -n "$with_system_saxon" -o -n "$with_system_libs" && \ test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_SAXON=YES if test -z $SAXON_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/saxon9.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/saxon9.jar" >&5 $as_echo_n "checking for /usr/share/java/saxon9.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_saxon9_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_saxon9_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/saxon9.jar"; then ac_cv_file__usr_share_java_saxon9_jar=yes else ac_cv_file__usr_share_java_saxon9_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon9_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_saxon9_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_saxon9_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_saxon9_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_saxon9_jar" = x""yes; then : SAXON_JAR=/usr/share/java/saxon9.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/saxon.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/saxon.jar" >&5 $as_echo_n "checking for /usr/share/java/saxon.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_saxon_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_saxon_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/saxon.jar"; then ac_cv_file__usr_share_java_saxon_jar=yes else ac_cv_file__usr_share_java_saxon_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_saxon_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_saxon_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_saxon_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_saxon_jar" = x""yes; then : SAXON_JAR=/usr/share/java/saxon.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/saxon9.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/saxon9.jar" >&5 $as_echo_n "checking for /usr/share/java/saxon9.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_saxon9_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_saxon9_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/saxon9.jar"; then ac_cv_file__usr_share_java_saxon9_jar=yes else ac_cv_file__usr_share_java_saxon9_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_saxon9_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_saxon9_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_saxon9_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_saxon9_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_saxon9_jar" = x""yes; then : SAXON_JAR=/usr/share/java/saxon9.jar else - { { $as_echo "$as_me:$LINENO: error: saxon.jar replacement not found" >&5 -$as_echo "$as_me: error: saxon.jar replacement not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "saxon.jar replacement not found" "$LINENO" 5 fi @@ -16642,71 +13563,59 @@ fi else as_ac_File=`$as_echo "ac_cv_file_$SAXON_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $SAXON_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SAXON_JAR" >&5 $as_echo_n "checking for $SAXON_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$SAXON_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: saxon.jar replacement not found." >&5 -$as_echo "$as_me: error: saxon.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "saxon.jar replacement not found." "$LINENO" 5 fi fi if test -n "$SERIALIZER_JAR"; then as_ac_File=`$as_echo "ac_cv_file_$SERIALIZER_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $SERIALIZER_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SERIALIZER_JAR" >&5 $as_echo_n "checking for $SERIALIZER_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$SERIALIZER_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: serializer.jar not found." >&5 -$as_echo "$as_me: error: serializer.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "serializer.jar not found." "$LINENO" 5 fi fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_SAXON=NO NEED_SAXON=TRUE @@ -16721,19 +13630,19 @@ fi if test "$_os" = "Darwin" && test "$with_system_curl" != "no"; then with_system_curl=yes fi -{ $as_echo "$as_me:$LINENO: checking which curl to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which curl to use" >&5 $as_echo_n "checking which curl to use... " >&6; } if test -n "$with_system_curl" -o -n "$with_system_libs" && \ test "$with_system_curl" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_CURL=YES # Extract the first word of "curl-config", so it can be a program name with args. set dummy curl-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CURLCONFIG+set}" = set; then +if test "${ac_cv_path_CURLCONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $CURLCONFIG in @@ -16746,14 +13655,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CURLCONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -16761,476 +13670,84 @@ esac fi CURLCONFIG=$ac_cv_path_CURLCONFIG if test -n "$CURLCONFIG"; then - { $as_echo "$as_me:$LINENO: result: $CURLCONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURLCONFIG" >&5 $as_echo "$CURLCONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$CURLCONFIG"; then - { { $as_echo "$as_me:$LINENO: error: install curl to run this script" >&5 -$as_echo "$as_me: error: install curl to run this script" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "install curl to run this script" "$LINENO" 5 fi # check curl version - { $as_echo "$as_me:$LINENO: checking whether curl is >= 7.9.8" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether curl is >= 7.9.8" >&5 $as_echo_n "checking whether curl is >= 7.9.8... " >&6; } if test "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $1 }'`" -gt "7" -a \ "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $2 }'`" -gt "9" -a \ "`$CURLCONFIG --version | $AWK -F' ' '{print $2}' | $AWK -F. '{ print $3 }'`" -gt "8"; then - { { $as_echo "$as_me:$LINENO: error: no, you need at least curl 7.9,8" >&5 -$as_echo "$as_me: error: no, you need at least curl 7.9,8" >&2;} - { (exit 1); exit 1; }; } - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - fi - CURL_LIBS=`$CURLCONFIG --libs` - CURL_CFLAGS=`$CURLCONFIG --cflags` -else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } - SYSTEM_CURL=NO - BUILD_TYPE="$BUILD_TYPE CURL" -fi - - - - -{ $as_echo "$as_me:$LINENO: checking which boost to use" >&5 -$as_echo_n "checking which boost to use... " >&6; } -if test -n "$with_system_boost" -o -n "$with_system_headers" && \ - test "$with_system_boost" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } - SYSTEM_BOOST=YES - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 -$as_echo_n "checking for boost/shared_ptr.hpp... " >&6; } -if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 -$as_echo "$ac_cv_header_boost_shared_ptr_hpp" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking boost/shared_ptr.hpp usability" >&5 -$as_echo_n "checking boost/shared_ptr.hpp usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking boost/shared_ptr.hpp presence" >&5 -$as_echo_n "checking boost/shared_ptr.hpp presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: boost/shared_ptr.hpp: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for boost/shared_ptr.hpp" >&5 -$as_echo_n "checking for boost/shared_ptr.hpp... " >&6; } -if test "${ac_cv_header_boost_shared_ptr_hpp+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_boost_shared_ptr_hpp=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_shared_ptr_hpp" >&5 -$as_echo "$ac_cv_header_boost_shared_ptr_hpp" >&6; } - -fi -if test "x$ac_cv_header_boost_shared_ptr_hpp" = x""yes; then - : -else - { { $as_echo "$as_me:$LINENO: error: boost/shared_ptr.hpp not found. install boost" >&5 -$as_echo "$as_me: error: boost/shared_ptr.hpp not found. install boost" >&2;} - { (exit 1); exit 1; }; } -fi - - - if test "${ac_cv_header_boost_spirit_include_classic_core_hpp+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for boost/spirit/include/classic_core.hpp" >&5 -$as_echo_n "checking for boost/spirit/include/classic_core.hpp... " >&6; } -if test "${ac_cv_header_boost_spirit_include_classic_core_hpp+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_spirit_include_classic_core_hpp" >&5 -$as_echo "$ac_cv_header_boost_spirit_include_classic_core_hpp" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking boost/spirit/include/classic_core.hpp usability" >&5 -$as_echo_n "checking boost/spirit/include/classic_core.hpp usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking boost/spirit/include/classic_core.hpp presence" >&5 -$as_echo_n "checking boost/spirit/include/classic_core.hpp presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/spirit/include/classic_core.hpp: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: boost/spirit/include/classic_core.hpp: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for boost/spirit/include/classic_core.hpp" >&5 -$as_echo_n "checking for boost/spirit/include/classic_core.hpp... " >&6; } -if test "${ac_cv_header_boost_spirit_include_classic_core_hpp+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_boost_spirit_include_classic_core_hpp=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_spirit_include_classic_core_hpp" >&5 -$as_echo "$ac_cv_header_boost_spirit_include_classic_core_hpp" >&6; } - -fi -if test "x$ac_cv_header_boost_spirit_include_classic_core_hpp" = x""yes; then - : -else - { { $as_echo "$as_me:$LINENO: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.38" >&5 -$as_echo "$as_me: error: boost/spirit/include/classic_core.hpp not found. install boost >= 1.38" >&2;} - { (exit 1); exit 1; }; } -fi - - - if test "${ac_cv_header_boost_function_hpp+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for boost/function.hpp" >&5 -$as_echo_n "checking for boost/function.hpp... " >&6; } -if test "${ac_cv_header_boost_function_hpp+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_function_hpp" >&5 -$as_echo "$ac_cv_header_boost_function_hpp" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking boost/function.hpp usability" >&5 -$as_echo_n "checking boost/function.hpp usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + as_fn_error "no, you need at least curl 7.9,8" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + CURL_LIBS=`$CURLCONFIG --libs` + CURL_CFLAGS=`$CURLCONFIG --cflags` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } + SYSTEM_CURL=NO + BUILD_TYPE="$BUILD_TYPE CURL" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking boost/function.hpp presence" >&5 -$as_echo_n "checking boost/function.hpp presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which boost to use" >&5 +$as_echo_n "checking which boost to use... " >&6; } +if test -n "$with_system_boost" -o -n "$with_system_headers" && \ + test "$with_system_boost" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } + SYSTEM_BOOST=YES + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: boost/function.hpp: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: boost/function.hpp: in the future, the compiler will take precedence" >&2;} + ac_fn_cxx_check_header_mongrel "$LINENO" "boost/shared_ptr.hpp" "ac_cv_header_boost_shared_ptr_hpp" "$ac_includes_default" +if test "x$ac_cv_header_boost_shared_ptr_hpp" = x""yes; then : - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for boost/function.hpp" >&5 -$as_echo_n "checking for boost/function.hpp... " >&6; } -if test "${ac_cv_header_boost_function_hpp+set}" = set; then - $as_echo_n "(cached) " >&6 else - ac_cv_header_boost_function_hpp=$ac_header_preproc + as_fn_error "boost/shared_ptr.hpp not found. install boost" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_boost_function_hpp" >&5 -$as_echo "$ac_cv_header_boost_function_hpp" >&6; } + + ac_fn_cxx_check_header_mongrel "$LINENO" "boost/spirit/include/classic_core.hpp" "ac_cv_header_boost_spirit_include_classic_core_hpp" "$ac_includes_default" +if test "x$ac_cv_header_boost_spirit_include_classic_core_hpp" = x""yes; then : + +else + as_fn_error "boost/spirit/include/classic_core.hpp not found. install boost >= 1.38" "$LINENO" 5 fi -if test "x$ac_cv_header_boost_function_hpp" = x""yes; then - : + + + ac_fn_cxx_check_header_mongrel "$LINENO" "boost/function.hpp" "ac_cv_header_boost_function_hpp" "$ac_includes_default" +if test "x$ac_cv_header_boost_function_hpp" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: boost/function.hpp not found. install boost" >&5 -$as_echo "$as_me: error: boost/function.hpp not found. install boost" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "boost/function.hpp not found. install boost" "$LINENO" 5 fi save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS -fno-exceptions" - { $as_echo "$as_me:$LINENO: checking whether boost/function.hpp compiles with -fno-exceptions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether boost/function.hpp compiles with -fno-exceptions" >&5 $as_echo_n "checking whether boost/function.hpp compiles with -fno-exceptions... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -17242,40 +13759,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_boost_no_exceptons_broken=no else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_cxx_boost_no_exceptons_broken=yes + ac_cv_cxx_boost_no_exceptons_broken=yes fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ac_cv_cxx_boost_no_exceptons_broken" = "yes"; then - { { $as_echo "$as_me:$LINENO: error: no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" >&5 -$as_echo "$as_me: error: no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi CXXFLAGS=$save_CXXFLAGS @@ -17286,18 +13780,18 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } BUILD_TYPE="$BUILD_TYPE BOOST" SYSTEM_BOOST=NO fi -{ $as_echo "$as_me:$LINENO: checking which vigra to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which vigra to use" >&5 $as_echo_n "checking which vigra to use... " >&6; } if test -n "$with_system_vigra" -o -n "$with_system_headers" && \ test "$with_system_vigra" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_VIGRA=YES ac_ext=cpp @@ -17306,139 +13800,11 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test "${ac_cv_header_vigra_copyimage_hxx+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for vigra/copyimage.hxx" >&5 -$as_echo_n "checking for vigra/copyimage.hxx... " >&6; } -if test "${ac_cv_header_vigra_copyimage_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_vigra_copyimage_hxx" >&5 -$as_echo "$ac_cv_header_vigra_copyimage_hxx" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking vigra/copyimage.hxx usability" >&5 -$as_echo_n "checking vigra/copyimage.hxx usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking vigra/copyimage.hxx presence" >&5 -$as_echo_n "checking vigra/copyimage.hxx presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: vigra/copyimage.hxx: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: vigra/copyimage.hxx: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for vigra/copyimage.hxx" >&5 -$as_echo_n "checking for vigra/copyimage.hxx... " >&6; } -if test "${ac_cv_header_vigra_copyimage_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_vigra_copyimage_hxx=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_vigra_copyimage_hxx" >&5 -$as_echo "$ac_cv_header_vigra_copyimage_hxx" >&6; } + ac_fn_cxx_check_header_mongrel "$LINENO" "vigra/copyimage.hxx" "ac_cv_header_vigra_copyimage_hxx" "$ac_includes_default" +if test "x$ac_cv_header_vigra_copyimage_hxx" = x""yes; then : -fi -if test "x$ac_cv_header_vigra_copyimage_hxx" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: vigra/copyimage.hxx not found. install vigra" >&5 -$as_echo "$as_me: error: vigra/copyimage.hxx not found. install vigra" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "vigra/copyimage.hxx not found. install vigra" "$LINENO" 5 fi @@ -17449,390 +13815,121 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } BUILD_TYPE="$BUILD_TYPE VIGRA" SYSTEM_VIGRA=NO fi -{ $as_echo "$as_me:$LINENO: checking which odbc headers to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which odbc headers to use" >&5 $as_echo_n "checking which odbc headers to use... " >&6; } if test -n "$with_system_odbc_headers" -o -n "$with_system_headers" && \ test "$with_system_odbc_headers" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_ODBC_HEADERS=YES - if test "${ac_cv_header_sqlext_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for sqlext.h" >&5 -$as_echo_n "checking for sqlext.h... " >&6; } -if test "${ac_cv_header_sqlext_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sqlext_h" >&5 -$as_echo "$ac_cv_header_sqlext_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking sqlext.h usability" >&5 -$as_echo_n "checking sqlext.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking sqlext.h presence" >&5 -$as_echo_n "checking sqlext.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: sqlext.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: sqlext.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: sqlext.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: sqlext.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: sqlext.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: sqlext.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: sqlext.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sqlext.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: sqlext.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for sqlext.h" >&5 -$as_echo_n "checking for sqlext.h... " >&6; } -if test "${ac_cv_header_sqlext_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_sqlext_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sqlext_h" >&5 -$as_echo "$ac_cv_header_sqlext_h" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "sqlext.h" "ac_cv_header_sqlext_h" "$ac_includes_default" +if test "x$ac_cv_header_sqlext_h" = x""yes; then : -fi -if test "x$ac_cv_header_sqlext_h" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: odbc not found. install odbc" >&5 -$as_echo "$as_me: error: odbc not found. install odbc" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "odbc not found. install odbc" "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_ODBC_HEADERS=NO BUILD_TYPE="$BUILD_TYPE UNIXODBC" fi -{ $as_echo "$as_me:$LINENO: checking whether to enable build of Mozilla/Mozilla NSS-using components" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build of Mozilla/Mozilla NSS-using components" >&5 $as_echo_n "checking whether to enable build of Mozilla/Mozilla NSS-using components... " >&6; } if test "$enable_mozilla" = "no"; then - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } WITH_MOZILLA=NO ENABLE_NSS_MODULE=NO else - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } WITH_MOZILLA=YES fi -{ $as_echo "$as_me:$LINENO: checking whether to build Mozilla addressbook connectivity" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Mozilla addressbook connectivity" >&5 $as_echo_n "checking whether to build Mozilla addressbook connectivity... " >&6; } if test "$enable_mozilla" = "no"; then - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } elif test "$with_system_mozilla" = "yes"; then - { $as_echo "$as_me:$LINENO: result: no, not possible with system-mozilla" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not possible with system-mozilla" >&5 $as_echo "no, not possible with system-mozilla" >&6; } else - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to build XML Security support" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build XML Security support" >&5 $as_echo_n "checking whether to build XML Security support... " >&6; } if test "$enable_mozilla" = "no"; then - { $as_echo "$as_me:$LINENO: result: no, since Mozilla (NSS) disabled but needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, since Mozilla (NSS) disabled but needed" >&5 $as_echo "no, since Mozilla (NSS) disabled but needed" >&6; } else - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to build LDAP configuration backend" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build LDAP configuration backend" >&5 $as_echo_n "checking whether to build LDAP configuration backend... " >&6; } if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } WITH_LDAP=YES else - { $as_echo "$as_me:$LINENO: result: no. Either Mozilla or OpenLDAP needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Either Mozilla or OpenLDAP needed" >&5 $as_echo "no. Either Mozilla or OpenLDAP needed" >&6; } WITH_LDAP=NO fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - WITH_LDAP=NO -fi - -if test "$WITH_LDAP" = "YES"; then - { $as_echo "$as_me:$LINENO: checking which LDAP SDK to use" >&5 -$as_echo_n "checking which LDAP SDK to use... " >&6; } - if test -n "$with_openldap" && test "$with_openldap" != "no"; then - { $as_echo "$as_me:$LINENO: result: OpenLDAP" >&5 -$as_echo "OpenLDAP" >&6; } - WITH_OPENLDAP=YES - -for ac_header in ldap.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + WITH_LDAP=NO fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +if test "$WITH_LDAP" = "YES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which LDAP SDK to use" >&5 +$as_echo_n "checking which LDAP SDK to use... " >&6; } + if test -n "$with_openldap" && test "$with_openldap" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenLDAP" >&5 +$as_echo "OpenLDAP" >&6; } + WITH_OPENLDAP=YES + for ac_header in ldap.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default" +if test "x$ac_cv_header_ldap_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_LDAP_H 1 _ACEOF else - { { $as_echo "$as_me:$LINENO: error: ldap.h not found. install openldap libs" >&5 -$as_echo "$as_me: error: ldap.h not found. install openldap libs" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "ldap.h not found. install openldap libs" "$LINENO" 5 fi done - -{ $as_echo "$as_me:$LINENO: checking for ldap_simple_bind_s in -lldap" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind_s in -lldap" >&5 $as_echo_n "checking for ldap_simple_bind_s in -lldap... " >&6; } -if test "${ac_cv_lib_ldap_ldap_simple_bind_s+set}" = set; then +if test "${ac_cv_lib_ldap_ldap_simple_bind_s+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -17850,43 +13947,18 @@ return ldap_simple_bind_s (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ldap_ldap_simple_bind_s=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ldap_ldap_simple_bind_s=no + ac_cv_lib_ldap_ldap_simple_bind_s=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_simple_bind_s" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_simple_bind_s" >&5 $as_echo "$ac_cv_lib_ldap_ldap_simple_bind_s" >&6; } -if test "x$ac_cv_lib_ldap_ldap_simple_bind_s" = x""yes; then +if test "x$ac_cv_lib_ldap_ldap_simple_bind_s" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBLDAP 1 _ACEOF @@ -17894,26 +13966,19 @@ _ACEOF LIBS="-lldap $LIBS" else - { { $as_echo "$as_me:$LINENO: error: openldap lib not found or functional" >&5 -$as_echo "$as_me: error: openldap lib not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "openldap lib not found or functional" "$LINENO" 5 fi # rumours say that OpenLDAP doesn't have that function. I looked and # it has it. Test for it to be sure - -{ $as_echo "$as_me:$LINENO: checking for ldap_set_option in -lldap" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_set_option in -lldap" >&5 $as_echo_n "checking for ldap_set_option in -lldap... " >&6; } -if test "${ac_cv_lib_ldap_ldap_set_option+set}" = set; then +if test "${ac_cv_lib_ldap_ldap_set_option+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -17931,43 +13996,18 @@ return ldap_set_option (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ldap_ldap_set_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ldap_ldap_set_option=no + ac_cv_lib_ldap_ldap_set_option=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_set_option" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_set_option" >&5 $as_echo "$ac_cv_lib_ldap_ldap_set_option" >&6; } -if test "x$ac_cv_lib_ldap_ldap_set_option" = x""yes; then +if test "x$ac_cv_lib_ldap_ldap_set_option" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBLDAP 1 _ACEOF @@ -17975,13 +14015,11 @@ _ACEOF LIBS="-lldap $LIBS" else - { { $as_echo "$as_me:$LINENO: error: openldap lib not found or functional" >&5 -$as_echo "$as_me: error: openldap lib not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "openldap lib not found or functional" "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: Netscape/Mozilla" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Netscape/Mozilla" >&5 $as_echo "Netscape/Mozilla" >&6; } # TODO. Actually do a sanity check and check for # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT @@ -17991,15 +14029,15 @@ fi -{ $as_echo "$as_me:$LINENO: checking which mozilla to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which mozilla to use" >&5 $as_echo_n "checking which mozilla to use... " >&6; } if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_MOZILLA=YES ENABLE_NSS_MODULE=NO enable_nss_module=no - { $as_echo "$as_me:$LINENO: checking which Mozilla flavour to use" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which Mozilla flavour to use" >&5 $as_echo_n "checking which Mozilla flavour to use... " >&6; } if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then MOZ_FLAVOUR=libxul @@ -18015,7 +14053,7 @@ $as_echo_n "checking which Mozilla flavour to use... " >&6; } MOZ_FLAVOUR=libxul fi tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst();'` - { $as_echo "$as_me:$LINENO: result: $tmp" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tmp" >&5 $as_echo "$tmp" >&6; } @@ -18024,9 +14062,9 @@ $as_echo "$tmp" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -18039,14 +14077,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -18055,10 +14093,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -18073,24 +14111,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for nss" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss" >&5 $as_echo_n "checking for nss... " >&6; } if $PKG_CONFIG --exists "nss" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZ_NSS_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSS_CFLAGS" >&5 $as_echo_n "checking MOZ_NSS_CFLAGS... " >&6; } MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "nss"` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSS_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSS_CFLAGS" >&5 $as_echo "$MOZ_NSS_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking MOZ_NSS_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSS_LIBS" >&5 $as_echo_n "checking MOZ_NSS_LIBS... " >&6; } MOZ_NSS_LIBS=`$PKG_CONFIG --libs "nss"` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSS_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSS_LIBS" >&5 $as_echo "$MOZ_NSS_LIBS" >&6; } else MOZ_NSS_CFLAGS="" @@ -18122,9 +14160,9 @@ $as_echo "$MOZ_NSS_LIBS" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -18137,14 +14175,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -18153,10 +14191,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -18171,24 +14209,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-nss " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MOZ_FLAVOUR-nss " >&5 $as_echo_n "checking for $MOZ_FLAVOUR-nss ... " >&6; } if $PKG_CONFIG --exists "$MOZ_FLAVOUR-nss " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZ_NSS_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSS_CFLAGS" >&5 $as_echo_n "checking MOZ_NSS_CFLAGS... " >&6; } MOZ_NSS_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nss "` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSS_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSS_CFLAGS" >&5 $as_echo "$MOZ_NSS_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking MOZ_NSS_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSS_LIBS" >&5 $as_echo_n "checking MOZ_NSS_LIBS... " >&6; } MOZ_NSS_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nss "` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSS_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSS_LIBS" >&5 $as_echo "$MOZ_NSS_LIBS" >&6; } else MOZ_NSS_CFLAGS="" @@ -18210,9 +14248,7 @@ $as_echo "$MOZ_NSS_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements ($MOZ_FLAVOUR-nss ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi else @@ -18227,9 +14263,9 @@ $as_echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nss ) not met; consi if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -18242,14 +14278,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -18258,10 +14294,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -18276,24 +14312,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for nspr " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nspr " >&5 $as_echo_n "checking for nspr ... " >&6; } if $PKG_CONFIG --exists "nspr " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZ_NSPR_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSPR_CFLAGS" >&5 $as_echo_n "checking MOZ_NSPR_CFLAGS... " >&6; } MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "nspr "` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSPR_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSPR_CFLAGS" >&5 $as_echo "$MOZ_NSPR_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking MOZ_NSPR_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSPR_LIBS" >&5 $as_echo_n "checking MOZ_NSPR_LIBS... " >&6; } MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "nspr "` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSPR_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSPR_LIBS" >&5 $as_echo "$MOZ_NSPR_LIBS" >&6; } else MOZ_NSPR_CFLAGS="" @@ -18315,9 +14351,7 @@ $as_echo "$MOZ_NSPR_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`" @@ -18329,9 +14363,9 @@ $as_echo "$as_me: error: Library requirements (nspr ) not met; consider adjustin if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -18344,14 +14378,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -18360,10 +14394,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -18378,24 +14412,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-nspr " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MOZ_FLAVOUR-nspr " >&5 $as_echo_n "checking for $MOZ_FLAVOUR-nspr ... " >&6; } if $PKG_CONFIG --exists "$MOZ_FLAVOUR-nspr " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZ_NSPR_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSPR_CFLAGS" >&5 $as_echo_n "checking MOZ_NSPR_CFLAGS... " >&6; } MOZ_NSPR_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-nspr "` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSPR_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSPR_CFLAGS" >&5 $as_echo "$MOZ_NSPR_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking MOZ_NSPR_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZ_NSPR_LIBS" >&5 $as_echo_n "checking MOZ_NSPR_LIBS... " >&6; } MOZ_NSPR_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-nspr "` - { $as_echo "$as_me:$LINENO: result: $MOZ_NSPR_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZ_NSPR_LIBS" >&5 $as_echo "$MOZ_NSPR_LIBS" >&6; } else MOZ_NSPR_CFLAGS="" @@ -18417,9 +14451,7 @@ $as_echo "$MOZ_NSPR_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements ($MOZ_FLAVOUR-nspr ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi fi @@ -18431,9 +14463,9 @@ $as_echo "$as_me: error: Library requirements ($MOZ_FLAVOUR-nspr ) not met; cons if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -18446,14 +14478,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -18462,10 +14494,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -18480,24 +14512,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for $MOZ_FLAVOUR-xpcom" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MOZ_FLAVOUR-xpcom" >&5 $as_echo_n "checking for $MOZ_FLAVOUR-xpcom... " >&6; } if $PKG_CONFIG --exists "$MOZ_FLAVOUR-xpcom" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZILLAXPCOM_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZILLAXPCOM_CFLAGS" >&5 $as_echo_n "checking MOZILLAXPCOM_CFLAGS... " >&6; } MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "$MOZ_FLAVOUR-xpcom"` - { $as_echo "$as_me:$LINENO: result: $MOZILLAXPCOM_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZILLAXPCOM_CFLAGS" >&5 $as_echo "$MOZILLAXPCOM_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking MOZILLAXPCOM_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZILLAXPCOM_LIBS" >&5 $as_echo_n "checking MOZILLAXPCOM_LIBS... " >&6; } MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "$MOZ_FLAVOUR-xpcom"` - { $as_echo "$as_me:$LINENO: result: $MOZILLAXPCOM_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZILLAXPCOM_LIBS" >&5 $as_echo "$MOZILLAXPCOM_LIBS" >&6; } else MOZILLAXPCOM_CFLAGS="" @@ -18533,9 +14565,9 @@ $as_echo "$MOZILLAXPCOM_LIBS" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -18548,14 +14580,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -18564,10 +14596,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -18582,24 +14614,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libxul " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxul " >&5 $as_echo_n "checking for libxul ... " >&6; } if $PKG_CONFIG --exists "libxul " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZILLAXPCOM_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZILLAXPCOM_CFLAGS" >&5 $as_echo_n "checking MOZILLAXPCOM_CFLAGS... " >&6; } MOZILLAXPCOM_CFLAGS=`$PKG_CONFIG --cflags "libxul "` - { $as_echo "$as_me:$LINENO: result: $MOZILLAXPCOM_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZILLAXPCOM_CFLAGS" >&5 $as_echo "$MOZILLAXPCOM_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking MOZILLAXPCOM_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZILLAXPCOM_LIBS" >&5 $as_echo_n "checking MOZILLAXPCOM_LIBS... " >&6; } MOZILLAXPCOM_LIBS=`$PKG_CONFIG --libs "libxul "` - { $as_echo "$as_me:$LINENO: result: $MOZILLAXPCOM_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZILLAXPCOM_LIBS" >&5 $as_echo "$MOZILLAXPCOM_LIBS" >&6; } else MOZILLAXPCOM_CFLAGS="" @@ -18621,9 +14653,7 @@ $as_echo "$MOZILLAXPCOM_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (libxul ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (libxul ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (libxul ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi MOZ_INC=`$PKG_CONFIG --variable=includedir libxul` @@ -18641,19 +14671,14 @@ $as_echo "$as_me: error: Library requirements (libxul ) not met; consider adjust save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS" LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS" - -{ $as_echo "$as_me:$LINENO: checking for PK11_GetCertFromPrivateKey in -lnss3" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PK11_GetCertFromPrivateKey in -lnss3" >&5 $as_echo_n "checking for PK11_GetCertFromPrivateKey in -lnss3... " >&6; } -if test "${ac_cv_lib_nss3_PK11_GetCertFromPrivateKey+set}" = set; then +if test "${ac_cv_lib_nss3_PK11_GetCertFromPrivateKey+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnss3 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -18671,43 +14696,18 @@ return PK11_GetCertFromPrivateKey (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=no + ac_cv_lib_nss3_PK11_GetCertFromPrivateKey=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" >&5 $as_echo "$ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" >&6; } -if test "x$ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" = x""yes; then +if test "x$ac_cv_lib_nss3_PK11_GetCertFromPrivateKey" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSS3 1 _ACEOF @@ -18715,13 +14715,9 @@ _ACEOF LIBS="-lnss3 $LIBS" else - { { $as_echo "$as_me:$LINENO: error: PK11_GetCertFromPrivateKey missing but needed. + as_fn_error "PK11_GetCertFromPrivateKey missing but needed. See https://bugzilla.mozilla.org/show_bug.cgi?id=262274. -Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5)" >&5 -$as_echo "$as_me: error: PK11_GetCertFromPrivateKey missing but needed. -See https://bugzilla.mozilla.org/show_bug.cgi?id=262274. -Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5)" >&2;} - { (exit 1); exit 1; }; } +Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5)" "$LINENO" 5 fi LDFLAGS="$save_LDFLAGS" @@ -18730,20 +14726,16 @@ fi MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then - { $as_echo "$as_me:$LINENO: checking whether $tmp was compiled with --enable-ldap" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $tmp was compiled with --enable-ldap" >&5 $as_echo_n "checking whether $tmp was compiled with --enable-ldap... " >&6; } if test -d "$MOZ_INC/ldap"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MOZ_LDAP_CFLAGS="-I$MOZ_INC" else - { { $as_echo "$as_me:$LINENO: error: no. -Could not find LDAP header include files in $MOZ_INC/ldap. -Please recompile $tmp with --enable-ldap or use --with-openldap." >&5 -$as_echo "$as_me: error: no. + as_fn_error "no. Could not find LDAP header include files in $MOZ_INC/ldap. -Please recompile $tmp with --enable-ldap or use --with-openldap." >&2;} - { (exit 1); exit 1; }; } +Please recompile $tmp with --enable-ldap or use --with-openldap." "$LINENO" 5 fi fi @@ -18754,47 +14746,47 @@ Please recompile $tmp with --enable-ldap or use --with-openldap." >&2;} fi elif test "$enable_mozilla" = "no"; then - { $as_echo "$as_me:$LINENO: result: none" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } WITH_MOZILLA=NO ENABLE_NSS_MODULE=NO enable_nss_module=no else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_MOZILLA=NO BUILD_TYPE="$BUILD_TYPE MOZ" if test -z "$with_mozilla_version"; then MOZILLA_VERSION= else - { $as_echo "$as_me:$LINENO: checking which mozilla version to build" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which mozilla version to build" >&5 $as_echo_n "checking which mozilla version to build... " >&6; } MOZILLA_VERSION=$with_mozilla_version enable_build_mozilla=1 - { $as_echo "$as_me:$LINENO: result: $MOZILLA_VERSION" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZILLA_VERSION" >&5 $as_echo "$MOZILLA_VERSION" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for toolkit mozilla should use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolkit mozilla should use" >&5 $as_echo_n "checking for toolkit mozilla should use... " >&6; } if test -z "$with_mozilla_toolkit"; then if test "$_os" != "WINNT" ; then if test "$_os" = "Darwin" ; then MOZILLA_TOOLKIT=mac - { $as_echo "$as_me:$LINENO: result: mac" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: mac" >&5 $as_echo "mac" >&6; } else MOZILLA_TOOLKIT=gtk2 - { $as_echo "$as_me:$LINENO: result: gtk2" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk2" >&5 $as_echo "gtk2" >&6; } fi fi else MOZILLA_TOOLKIT=$with_mozilla_toolkit enable_build_mozilla=1 - { $as_echo "$as_me:$LINENO: result: $MOZILLA_TOOLKIT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZILLA_TOOLKIT" >&5 $as_echo "$MOZILLA_TOOLKIT" >&6; } fi #if test "$_os" = "Darwin" && test "$MOZILLA_TOOLKIT" != "gtk2"; then @@ -18812,50 +14804,44 @@ else enable_build_mozilla= fi -{ $as_echo "$as_me:$LINENO: checking whether to build Mozilla/SeaMonkey" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Mozilla/SeaMonkey" >&5 $as_echo_n "checking whether to build Mozilla/SeaMonkey... " >&6; } if test -n "$enable_build_mozilla"; then BUILD_MOZAB="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else BUILD_MOZAB="" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to build provided NSS module" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build provided NSS module" >&5 $as_echo_n "checking whether to build provided NSS module... " >&6; } if test "$enable_nss_module" != "no"; then ENABLE_NSS_MODULE="YES" BUILD_TYPE="$BUILD_TYPE NSS" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking for Mozilla build tooling" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mozilla build tooling" >&5 $as_echo_n "checking for Mozilla build tooling... " >&6; } if test -z "$MOZILLABUILD" ; then -{ { $as_echo "$as_me:$LINENO: error: Mozilla build tooling not found. Use --with-mozilla-build=" >&5 -$as_echo "$as_me: error: Mozilla build tooling not found. Use --with-mozilla-build=" >&2;} - { (exit 1); exit 1; }; } +as_fn_error "Mozilla build tooling not found. Use --with-mozilla-build=" "$LINENO" 5 else if test \( "$WITH_MINGWIN" = "yes" \) ; then if test ! -d "$MOZILLABUILD" ; then -{ { $as_echo "$as_me:$LINENO: error: Mozilla build tooling incomplete!" >&5 -$as_echo "$as_me: error: Mozilla build tooling incomplete!" >&2;} - { (exit 1); exit 1; }; } +as_fn_error "Mozilla build tooling incomplete!" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: result: ok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi else if test ! -d "$MOZILLABUILD/moztools" \ -o ! -d "$MOZILLABUILD/msys" ; then -{ { $as_echo "$as_me:$LINENO: error: Mozilla build tooling incomplete!" >&5 -$as_echo "$as_me: error: Mozilla build tooling incomplete!" >&2;} - { (exit 1); exit 1; }; } +as_fn_error "Mozilla build tooling incomplete!" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: result: ok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi fi @@ -18863,7 +14849,7 @@ $as_echo "ok" >&6; } fi else ENABLE_NSS_MODULE="NO" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -18872,12 +14858,10 @@ if test "$BUILD_MOZAB" = "TRUE"; then if test "$WITH_MINGWIN" != "yes"; then # compiling with MSVC. Only supported platform here is MSVS2005 at the moment. if test "$MSVSVER" != "2005"; then - { { $as_echo "$as_me:$LINENO: error: Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." >&5 -$as_echo "$as_me: error: Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Building SeaMonkey is supported with Microsoft Visual Studio .NET 2005 only." "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: WARNING: Building SeaMonkey with mingwin is not tested, and likely to break." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building SeaMonkey with mingwin is not tested, and likely to break." >&5 $as_echo "$as_me: WARNING: Building SeaMonkey with mingwin is not tested, and likely to break." >&2;} echo "Building SeaMonkey with mingwin is not tested, and likely to break." >> warn fi @@ -18888,45 +14872,37 @@ $as_echo "$as_me: WARNING: Building SeaMonkey with mingwin is not tested, and li fi MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source" for e in gz bz2; do - { $as_echo "$as_me:$LINENO: checking for $MOZILLA_SOURCE_VERSION.tar.$e" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MOZILLA_SOURCE_VERSION.tar.$e" >&5 $as_echo_n "checking for $MOZILLA_SOURCE_VERSION.tar.$e... " >&6; } if test ! -e "moz/download/$MOZILLA_SOURCE_VERSION.tar.$e" && test "$HAVE_MOZILLA_TARBALL" != "y"; then - { $as_echo "$as_me:$LINENO: result: not found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } HAVE_MOZILLA_TARBALL=n else - { $as_echo "$as_me:$LINENO: result: found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } HAVE_MOZILLA_TARBALL=y fi done if test "$HAVE_MOZILLA_TARBALL" != "y"; then - { { $as_echo "$as_me:$LINENO: error: Mozilla/SeaMonkey source archive not found. -Please copy $MOZILLA_SOURCE_VERSION.tar.bz2 or $MOZILLA_SOURCE_VERSION.tar.gz to moz/download/. -The archives can be found here: -ftp://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/$MOZILLA_VERSION/" >&5 -$as_echo "$as_me: error: Mozilla/SeaMonkey source archive not found. + as_fn_error "Mozilla/SeaMonkey source archive not found. Please copy $MOZILLA_SOURCE_VERSION.tar.bz2 or $MOZILLA_SOURCE_VERSION.tar.gz to moz/download/. The archives can be found here: -ftp://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/$MOZILLA_VERSION/" >&2;} - { (exit 1); exit 1; }; } +ftp://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/$MOZILLA_VERSION/" "$LINENO" 5 fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking for moztools binaries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for moztools binaries" >&5 $as_echo_n "checking for moztools binaries... " >&6; } if test ! -e "moz/download/vc8-moztools.zip" ; then - { { $as_echo "$as_me:$LINENO: error: The following file is missing in moz/download: vc8-moztools.zip -(from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)" >&5 -$as_echo "$as_me: error: The following file is missing in moz/download: vc8-moztools.zip -(from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "The following file is missing in moz/download: vc8-moztools.zip +(from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: result: ok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi elif test "$_os" = "Darwin"; then if test "$MOZILLA_TOOLKIT" = "gtk2"; then - { $as_echo "$as_me:$LINENO: checking whether mozilla can be built..." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mozilla can be built..." >&5 $as_echo "$as_me: checking whether mozilla can be built..." >&6;} succeeded=no @@ -18934,9 +14910,9 @@ $as_echo "$as_me: checking whether mozilla can be built..." >&6;} if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -18949,14 +14925,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -18965,10 +14941,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -18983,24 +14959,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" >&5 $as_echo_n "checking for gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8... " >&6; } if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZGTK2_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZGTK2_CFLAGS" >&5 $as_echo_n "checking MOZGTK2_CFLAGS... " >&6; } MOZGTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` - { $as_echo "$as_me:$LINENO: result: $MOZGTK2_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZGTK2_CFLAGS" >&5 $as_echo "$MOZGTK2_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking MOZGTK2_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZGTK2_LIBS" >&5 $as_echo_n "checking MOZGTK2_LIBS... " >&6; } MOZGTK2_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8"` - { $as_echo "$as_me:$LINENO: result: $MOZGTK2_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZGTK2_LIBS" >&5 $as_echo "$MOZGTK2_LIBS" >&6; } else MOZGTK2_CFLAGS="" @@ -19020,12 +14996,10 @@ $as_echo "$MOZGTK2_LIBS" >&6; } fi if test $succeeded = yes; then - { $as_echo "$as_me:$LINENO: OK - can build mozilla" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: OK - can build mozilla" >&5 $as_echo "$as_me: OK - can build mozilla" >&6;} else - { { $as_echo "$as_me:$LINENO: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&5 -$as_echo "$as_me: error: Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Prerequisites to build mozilla not met. Either use the precompiled mozilla binaries or install the missing packages" "$LINENO" 5 fi else @@ -19035,9 +15009,9 @@ $as_echo "$as_me: error: Prerequisites to build mozilla not met. Either use the if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -19050,14 +15024,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -19066,10 +15040,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -19084,24 +15058,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libIDL-2.0 >= 0.6.3" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libIDL-2.0 >= 0.6.3" >&5 $as_echo_n "checking for libIDL-2.0 >= 0.6.3... " >&6; } if $PKG_CONFIG --exists "libIDL-2.0 >= 0.6.3" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_CFLAGS" >&5 $as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.6.3"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_CFLAGS" >&5 $as_echo "$MOZLIBREQ_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_LIBS" >&5 $as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.6.3"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_LIBS" >&5 $as_echo "$MOZLIBREQ_LIBS" >&6; } else MOZLIBREQ_CFLAGS="" @@ -19127,9 +15101,7 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZIDL"; then - { { $as_echo "$as_me:$LINENO: error: libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." >&5 -$as_echo "$as_me: error: libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libIDL 0.6.3 or newer is needed to build mozilla with mac toolkit." "$LINENO" 5 fi fi else @@ -19141,9 +15113,9 @@ $as_echo "$as_me: error: libIDL 0.6.3 or newer is needed to build mozilla with m if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -19156,14 +15128,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -19172,10 +15144,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -19190,24 +15162,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gtk+-2.0" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-2.0" >&5 $as_echo_n "checking for gtk+-2.0... " >&6; } if $PKG_CONFIG --exists "gtk+-2.0" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_CFLAGS" >&5 $as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_CFLAGS" >&5 $as_echo "$MOZLIBREQ_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_LIBS" >&5 $as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+-2.0"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_LIBS" >&5 $as_echo "$MOZLIBREQ_LIBS" >&6; } else MOZLIBREQ_CFLAGS="" @@ -19233,9 +15205,7 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZGTK"; then - { { $as_echo "$as_me:$LINENO: error: GTK2 is needed to build mozilla." >&5 -$as_echo "$as_me: error: GTK2 is needed to build mozilla." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "GTK2 is needed to build mozilla." "$LINENO" 5 fi succeeded=no @@ -19243,9 +15213,9 @@ $as_echo "$as_me: error: GTK2 is needed to build mozilla." >&2;} if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -19258,14 +15228,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -19274,10 +15244,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -19292,24 +15262,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libIDL-2.0 >= 0.8.0" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libIDL-2.0 >= 0.8.0" >&5 $as_echo_n "checking for libIDL-2.0 >= 0.8.0... " >&6; } if $PKG_CONFIG --exists "libIDL-2.0 >= 0.8.0" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_CFLAGS" >&5 $as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libIDL-2.0 >= 0.8.0"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_CFLAGS" >&5 $as_echo "$MOZLIBREQ_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_LIBS" >&5 $as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libIDL-2.0 >= 0.8.0"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_LIBS" >&5 $as_echo "$MOZLIBREQ_LIBS" >&6; } else MOZLIBREQ_CFLAGS="" @@ -19335,9 +15305,7 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZIDL"; then - { { $as_echo "$as_me:$LINENO: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&5 -$as_echo "$as_me: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libIDL >= 0.8.0 is needed when using GTK2 to build mozilla." "$LINENO" 5 fi else @@ -19346,9 +15314,9 @@ $as_echo "$as_me: error: libIDL >= 0.8.0 is needed when using GTK2 to build mozi if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -19361,14 +15329,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -19377,10 +15345,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -19395,24 +15363,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gtk+ >= 1.2.3" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+ >= 1.2.3" >&5 $as_echo_n "checking for gtk+ >= 1.2.3... " >&6; } if $PKG_CONFIG --exists "gtk+ >= 1.2.3" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_CFLAGS" >&5 $as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "gtk+ >= 1.2.3"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_CFLAGS" >&5 $as_echo "$MOZLIBREQ_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_LIBS" >&5 $as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "gtk+ >= 1.2.3"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_LIBS" >&5 $as_echo "$MOZLIBREQ_LIBS" >&6; } else MOZLIBREQ_CFLAGS="" @@ -19438,9 +15406,7 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZGTK"; then - { { $as_echo "$as_me:$LINENO: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&5 -$as_echo "$as_me: error: gtk 1.2 is needed when not using GTK2 to build mozilla." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "gtk 1.2 is needed when not using GTK2 to build mozilla." "$LINENO" 5 fi succeeded=no @@ -19448,9 +15414,9 @@ $as_echo "$as_me: error: gtk 1.2 is needed when not using GTK2 to build mozilla. if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -19463,14 +15429,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -19479,10 +15445,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -19497,24 +15463,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libidl >= 0.6.3 libidl <= 0.6.8" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libidl >= 0.6.3 libidl <= 0.6.8" >&5 $as_echo_n "checking for libidl >= 0.6.3 libidl <= 0.6.8... " >&6; } if $PKG_CONFIG --exists "libidl >= 0.6.3 libidl <= 0.6.8" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_CFLAGS" >&5 $as_echo_n "checking MOZLIBREQ_CFLAGS... " >&6; } MOZLIBREQ_CFLAGS=`$PKG_CONFIG --cflags "libidl >= 0.6.3 libidl <= 0.6.8"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_CFLAGS" >&5 $as_echo "$MOZLIBREQ_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking MOZLIBREQ_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MOZLIBREQ_LIBS" >&5 $as_echo_n "checking MOZLIBREQ_LIBS... " >&6; } MOZLIBREQ_LIBS=`$PKG_CONFIG --libs "libidl >= 0.6.3 libidl <= 0.6.8"` - { $as_echo "$as_me:$LINENO: result: $MOZLIBREQ_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOZLIBREQ_LIBS" >&5 $as_echo "$MOZLIBREQ_LIBS" >&6; } else MOZLIBREQ_CFLAGS="" @@ -19540,9 +15506,7 @@ $as_echo "$MOZLIBREQ_LIBS" >&6; } fi if test -z "$MOZIDL"; then - { { $as_echo "$as_me:$LINENO: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&5 -$as_echo "$as_me: error: libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build mozilla." "$LINENO" 5 fi fi fi @@ -19562,162 +15526,34 @@ fi -{ $as_echo "$as_me:$LINENO: checking which sane header to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which sane header to use" >&5 $as_echo_n "checking which sane header to use... " >&6; } if test -n "$with_system_sane_header" -o -n "$with_system_headers" && \ test "$with_system_sane_header" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_SANE_HEADER=YES - if test "${ac_cv_header_sane_sane_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for sane/sane.h" >&5 -$as_echo_n "checking for sane/sane.h... " >&6; } -if test "${ac_cv_header_sane_sane_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sane_sane_h" >&5 -$as_echo "$ac_cv_header_sane_sane_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking sane/sane.h usability" >&5 -$as_echo_n "checking sane/sane.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking sane/sane.h presence" >&5 -$as_echo_n "checking sane/sane.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "sane/sane.h" "ac_cv_header_sane_sane_h" "$ac_includes_default" +if test "x$ac_cv_header_sane_sane_h" = x""yes; then : -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: sane/sane.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: sane/sane.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for sane/sane.h" >&5 -$as_echo_n "checking for sane/sane.h... " >&6; } -if test "${ac_cv_header_sane_sane_h+set}" = set; then - $as_echo_n "(cached) " >&6 else - ac_cv_header_sane_sane_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sane_sane_h" >&5 -$as_echo "$ac_cv_header_sane_sane_h" >&6; } - -fi -if test "x$ac_cv_header_sane_sane_h" = x""yes; then - : -else - { { $as_echo "$as_me:$LINENO: error: sane not found. install sane" >&5 -$as_echo "$as_me: error: sane not found. install sane" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "sane not found. install sane" "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_SANE_HEADER=NO BUILD_TYPE="$BUILD_TYPE SANE" fi -{ $as_echo "$as_me:$LINENO: checking which icu to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which icu to use" >&5 $as_echo_n "checking which icu to use... " >&6; } if test -n "$with_system_icu" -o -n "$with_system_libs" && \ test "$with_system_icu" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_ICU=YES ac_ext=cpp @@ -19726,50 +15562,24 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - { $as_echo "$as_me:$LINENO: checking for unicode/rbbi.h" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unicode/rbbi.h" >&5 $as_echo_n "checking for unicode/rbbi.h... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ unicode/rbbi.h _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - { $as_echo "$as_me:$LINENO: result: checked." >&5 +if ac_fn_cxx_try_cpp "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked." >&5 $as_echo "checked." >&6; } else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { { $as_echo "$as_me:$LINENO: error: icu headers not found." >&5 -$as_echo "$as_me: error: icu headers not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "icu headers not found." "$LINENO" 5 fi - rm -f conftest.err conftest.$ac_ext # Extract the first word of "genbrk", so it can be a program name with args. set dummy genbrk; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SYSTEM_GENBRK+set}" = set; then +if test "${ac_cv_path_SYSTEM_GENBRK+set}" = set; then : $as_echo_n "(cached) " >&6 else case $SYSTEM_GENBRK in @@ -19783,14 +15593,14 @@ for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SYSTEM_GENBRK="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -19798,24 +15608,22 @@ esac fi SYSTEM_GENBRK=$ac_cv_path_SYSTEM_GENBRK if test -n "$SYSTEM_GENBRK"; then - { $as_echo "$as_me:$LINENO: result: $SYSTEM_GENBRK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSTEM_GENBRK" >&5 $as_echo "$SYSTEM_GENBRK" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$SYSTEM_GENBRK"; then - { { $as_echo "$as_me:$LINENO: error: \\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" >&5 -$as_echo "$as_me: error: \\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "\\"genbrk\\" not found in \$PATH, install the icu development tool \\"genbrk\"\" "$LINENO" 5 fi # Extract the first word of "genccode", so it can be a program name with args. set dummy genccode; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SYSTEM_GENCCODE+set}" = set; then +if test "${ac_cv_path_SYSTEM_GENCCODE+set}" = set; then : $as_echo_n "(cached) " >&6 else case $SYSTEM_GENCCODE in @@ -19829,14 +15637,14 @@ for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SYSTEM_GENCCODE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -19844,24 +15652,22 @@ esac fi SYSTEM_GENCCODE=$ac_cv_path_SYSTEM_GENCCODE if test -n "$SYSTEM_GENCCODE"; then - { $as_echo "$as_me:$LINENO: result: $SYSTEM_GENCCODE" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSTEM_GENCCODE" >&5 $as_echo "$SYSTEM_GENCCODE" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$SYSTEM_GENCCODE"; then - { { $as_echo "$as_me:$LINENO: error: \\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" >&5 -$as_echo "$as_me: error: \\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "\\"genccode\\" not found in \$PATH, install the icu development tool \\"genccode\"\" "$LINENO" 5 fi # Extract the first word of "gencmn", so it can be a program name with args. set dummy gencmn; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SYSTEM_GENCMN+set}" = set; then +if test "${ac_cv_path_SYSTEM_GENCMN+set}" = set; then : $as_echo_n "(cached) " >&6 else case $SYSTEM_GENCMN in @@ -19875,14 +15681,14 @@ for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SYSTEM_GENCMN="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -19890,35 +15696,26 @@ esac fi SYSTEM_GENCMN=$ac_cv_path_SYSTEM_GENCMN if test -n "$SYSTEM_GENCMN"; then - { $as_echo "$as_me:$LINENO: result: $SYSTEM_GENCMN" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSTEM_GENCMN" >&5 $as_echo "$SYSTEM_GENCMN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$SYSTEM_GENCMN"; then - { { $as_echo "$as_me:$LINENO: error: \\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" >&5 -$as_echo "$as_me: error: \\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "\\"gencmn\\" not found in \$PATH, install the icu development tool \\"gencmn\"\" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking ICU version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking ICU version" >&5 $as_echo_n "checking ICU version... " >&6; } - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +as_fn_error "cannot run test program while cross compiling +See \`config.log' for more details." "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -19931,45 +15728,16 @@ int main(int argc, char **argv) { } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 +if ac_fn_cxx_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 $as_echo "OK" >&6; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { $as_echo "$as_me:$LINENO: error: not suitable, only >= 4.0 supported currently" >&5 -$as_echo "$as_me: error: not suitable, only >= 4.0 supported currently" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "not suitable, only >= 4.0 supported currently" "$LINENO" 5 fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -19977,7 +15745,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_ICU=NO BUILD_TYPE="$BUILD_TYPE ICU" @@ -19988,17 +15756,17 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether to enable graphite support" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable graphite support" >&5 $as_echo_n "checking whether to enable graphite support... " >&6; } if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" == "z" -o "$enable_graphite" != "no" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ENABLE_GRAPHITE="TRUE" - { $as_echo "$as_me:$LINENO: checking which graphite to use" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which graphite to use" >&5 $as_echo_n "checking which graphite to use... " >&6; } if test -n "$with_system_graphite" -o -n "$with_system_libs" && \ test "$with_system_graphite" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_GRAPHITE=YES @@ -20007,9 +15775,9 @@ $as_echo "external" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -20022,14 +15790,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -20038,10 +15806,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -20056,24 +15824,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for silgraphite " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for silgraphite " >&5 $as_echo_n "checking for silgraphite ... " >&6; } if $PKG_CONFIG --exists "silgraphite " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking GRAPHITE_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GRAPHITE_CFLAGS" >&5 $as_echo_n "checking GRAPHITE_CFLAGS... " >&6; } GRAPHITE_CFLAGS=`$PKG_CONFIG --cflags "silgraphite "` - { $as_echo "$as_me:$LINENO: result: $GRAPHITE_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GRAPHITE_CFLAGS" >&5 $as_echo "$GRAPHITE_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking GRAPHITE_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GRAPHITE_LIBS" >&5 $as_echo_n "checking GRAPHITE_LIBS... " >&6; } GRAPHITE_LIBS=`$PKG_CONFIG --libs "silgraphite "` - { $as_echo "$as_me:$LINENO: result: $GRAPHITE_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GRAPHITE_LIBS" >&5 $as_echo "$GRAPHITE_LIBS" >&6; } else GRAPHITE_CFLAGS="" @@ -20095,29 +15863,25 @@ $as_echo "$GRAPHITE_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (silgraphite ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (silgraphite ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (silgraphite ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking STL compatibility" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking STL compatibility" >&5 $as_echo_n "checking STL compatibility... " >&6; } if test "$WITH_STLPORT" != "no"; then - { { $as_echo "$as_me:$LINENO: error: to use system graphite you need to use --without-stlport" >&5 -$as_echo "$as_me: error: to use system graphite you need to use --without-stlport" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "to use system graphite you need to use --without-stlport" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: result: OK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 $as_echo "OK" >&6; } fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_GRAPHITE=NO BUILD_TYPE="$BUILD_TYPE GRAPHITE" fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -20128,14 +15892,12 @@ fi if test "$_os" = "Darwin"; then if test "x$with_x" = "xyes"; then - { { $as_echo "$as_me:$LINENO: error: X11 build is no longer supported on MacOSX, please use the native aqua build" >&5 -$as_echo "$as_me: error: X11 build is no longer supported on MacOSX, please use the native aqua build" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "X11 build is no longer supported on MacOSX, please use the native aqua build" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: checking for /System/Library/Frameworks/AppKit.framework" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /System/Library/Frameworks/AppKit.framework" >&5 $as_echo_n "checking for /System/Library/Frameworks/AppKit.framework... " >&6; } if test -d "/System/Library/Frameworks/AppKit.framework/"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } x_includes="no_x_includes" x_libraries="no_x_libraries" @@ -20144,9 +15906,7 @@ $as_echo "yes" >&6; } ENABLE_CUPS="" else - { { $as_echo "$as_me:$LINENO: error: No AppKit.framewrok found" >&5 -$as_echo "$as_me: error: No AppKit.framewrok found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "No AppKit.framewrok found" "$LINENO" 5 fi fi fi @@ -20158,12 +15918,12 @@ elif test "$_os" = "OS2" ; then echo "Do Nothing for _os = OS2. Don't check for X11." : elif test "$_os" != "WINNT" ; then - { $as_echo "$as_me:$LINENO: checking for X" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. -if test "${with_x+set}" = set; then +if test "${with_x+set}" = set; then : withval=$with_x; fi @@ -20173,10 +15933,8 @@ if test "x$with_x" = xno; then have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5 -$as_echo "$as_me: error: cannot use X directory names containing '" >&2;} - { (exit 1); exit 1; }; };; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then + *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. @@ -20224,21 +15982,25 @@ fi # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include +/usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 +/usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include +/usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 +/usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 @@ -20260,37 +16022,14 @@ ac_x_header_dirs=' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir @@ -20298,7 +16037,6 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi done fi - rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no @@ -20308,11 +16046,7 @@ if test "$ac_x_libraries" = no; then # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -20323,35 +16057,12 @@ XrmInitialize () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - LIBS=$ac_save_LIBS + LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! @@ -20363,10 +16074,8 @@ do done done fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( @@ -20387,7 +16096,7 @@ fi fi # $with_x != no if test "$have_x" != yes; then - { $as_echo "$as_me:$LINENO: result: $have_x" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else @@ -20398,16 +16107,14 @@ else ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" - { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. -cat >>confdefs.h <<\_ACEOF -#define X_DISPLAY_MISSING 1 -_ACEOF +$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else @@ -20420,16 +16127,12 @@ else X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . - { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -20440,40 +16143,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -20482,48 +16158,21 @@ main () ; return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: neither works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 $as_echo "neither works" >&6; } fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi @@ -20539,11 +16188,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -20561,44 +16206,17 @@ return XOpenDisplay (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -20616,59 +16234,30 @@ return dnet_ntoa (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dnet_dnet_ntoa=no + ac_cv_lib_dnet_dnet_ntoa=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then +if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } -if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then +if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -20686,52 +16275,25 @@ return dnet_ntoa (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dnet_stub_dnet_ntoa=no + ac_cv_lib_dnet_stub_dnet_ntoa=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then +if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, @@ -20742,105 +16304,20 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5 -$as_echo_n "checking for gethostbyname... " >&6; } -if test "${ac_cv_func_gethostbyname+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. - For example, HP-UX 11i declares gettimeofday. */ -#define gethostbyname innocuous_gethostbyname - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostbyname (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef gethostbyname - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname -choke me -#endif - -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_gethostbyname=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_gethostbyname=no -fi + ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +if test "x$ac_cv_func_gethostbyname" = x""yes; then : -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -$as_echo "$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = no; then - { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -20858,59 +16335,30 @@ return gethostbyname (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_nsl_gethostbyname=no + ac_cv_lib_nsl_gethostbyname=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then +if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then - { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } -if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then +if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -20928,43 +16376,18 @@ return gethostbyname (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_bsd_gethostbyname=no + ac_cv_lib_bsd_gethostbyname=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } -if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then +if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi @@ -20978,192 +16401,21 @@ fi # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. - { $as_echo "$as_me:$LINENO: checking for connect" >&5 -$as_echo_n "checking for connect... " >&6; } -if test "${ac_cv_func_connect+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define connect to an innocuous variant, in case declares connect. - For example, HP-UX 11i declares gettimeofday. */ -#define connect innocuous_connect - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char connect (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef connect - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect -choke me -#endif - -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_connect=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_connect=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -$as_echo "$ac_cv_func_connect" >&6; } + ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" +if test "x$ac_cv_func_connect" = x""yes; then : - if test $ac_cv_func_connect = no; then - { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 -$as_echo_n "checking for connect in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_connect+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_socket_connect=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_socket_connect=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 -$as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = x""yes; then - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi - fi - - # Guillermo Gomez says -lposix is necessary on A/UX. - { $as_echo "$as_me:$LINENO: checking for remove" >&5 -$as_echo_n "checking for remove... " >&6; } -if test "${ac_cv_func_remove+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define remove to an innocuous variant, in case declares remove. - For example, HP-UX 11i declares gettimeofday. */ -#define remove innocuous_remove - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char remove (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef remove + if test $ac_cv_func_connect = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 +$as_echo_n "checking for connect in -lsocket... " >&6; } +if test "${ac_cv_lib_socket_connect+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -21171,71 +16423,47 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char remove (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_remove || defined __stub___remove -choke me -#endif - +char connect (); int main () { -return remove (); +return connect (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_remove=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_socket_connect=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_remove=no + ac_cv_lib_socket_connect=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 +$as_echo "$ac_cv_lib_socket_connect" >&6; } +if test "x$ac_cv_lib_socket_connect" = x""yes; then : + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + fi + + # Guillermo Gomez says -lposix is necessary on A/UX. + ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" +if test "x$ac_cv_func_remove" = x""yes; then : + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 -$as_echo "$ac_cv_func_remove" >&6; } if test $ac_cv_func_remove = no; then - { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } -if test "${ac_cv_lib_posix_remove+set}" = set; then +if test "${ac_cv_lib_posix_remove+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -21253,148 +16481,38 @@ return remove (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_posix_remove=no + ac_cv_lib_posix_remove=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } -if test "x$ac_cv_lib_posix_remove" = x""yes; then +if test "x$ac_cv_lib_posix_remove" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - { $as_echo "$as_me:$LINENO: checking for shmat" >&5 -$as_echo_n "checking for shmat... " >&6; } -if test "${ac_cv_func_shmat+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shmat to an innocuous variant, in case declares shmat. - For example, HP-UX 11i declares gettimeofday. */ -#define shmat innocuous_shmat - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shmat (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" +if test "x$ac_cv_func_shmat" = x""yes; then : -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shmat - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shmat (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shmat || defined __stub___shmat -choke me -#endif - -int -main () -{ -return shmat (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shmat=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shmat=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 -$as_echo "$ac_cv_func_shmat" >&6; } if test $ac_cv_func_shmat = no; then - { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } -if test "${ac_cv_lib_ipc_shmat+set}" = set; then +if test "${ac_cv_lib_ipc_shmat+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -21412,43 +16530,18 @@ return shmat (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ipc_shmat=no + ac_cv_lib_ipc_shmat=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } -if test "x$ac_cv_lib_ipc_shmat" = x""yes; then +if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi @@ -21464,18 +16557,14 @@ fi # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry - { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } -if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then +if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -21493,43 +16582,18 @@ return IceConnectionNumber (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ICE_IceConnectionNumber=no + ac_cv_lib_ICE_IceConnectionNumber=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then +if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi @@ -21546,29 +16610,21 @@ fi x_libraries="default_x_libraries" fi if test -z "$x_libraries"; then - { { $as_echo "$as_me:$LINENO: error: No X libraries found" >&5 -$as_echo "$as_me: error: No X libraries found" >&2;} - { (exit 1); exit 1; }; } # Exit + as_fn_error "No X libraries found" "$LINENO" 5 # Exit fi if test -z "$x_includes"; then - { { $as_echo "$as_me:$LINENO: error: No X includes found" >&5 -$as_echo "$as_me: error: No X includes found" >&2;} - { (exit 1); exit 1; }; } # Exit + as_fn_error "No X includes found" "$LINENO" 5 # Exit fi CFLAGS=$X_CFLAGS LDFLAGS="$X_LDFLAGS $X_LIBS" - { $as_echo "$as_me:$LINENO: checking for XOpenDisplay in -lX11" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XOpenDisplay in -lX11" >&5 $as_echo_n "checking for XOpenDisplay in -lX11... " >&6; } -if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then +if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -21586,62 +16642,31 @@ return XOpenDisplay (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_X11_XOpenDisplay=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_X11_XOpenDisplay=no + ac_cv_lib_X11_XOpenDisplay=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XOpenDisplay" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_XOpenDisplay" >&5 $as_echo "$ac_cv_lib_X11_XOpenDisplay" >&6; } -if test "x$ac_cv_lib_X11_XOpenDisplay" = x""yes; then +if test "x$ac_cv_lib_X11_XOpenDisplay" = x""yes; then : x_libs="-lX11 $X_EXTRA_LIBS" else - { { $as_echo "$as_me:$LINENO: error: X Development libraries not found" >&5 -$as_echo "$as_me: error: X Development libraries not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "X Development libraries not found" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking for XauDisposeAuth in -lXau" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XauDisposeAuth in -lXau" >&5 $as_echo_n "checking for XauDisposeAuth in -lXau... " >&6; } -if test "${ac_cv_lib_Xau_XauDisposeAuth+set}" = set; then +if test "${ac_cv_lib_Xau_XauDisposeAuth+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXau $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -21659,43 +16684,18 @@ return XauDisposeAuth (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xau_XauDisposeAuth=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xau_XauDisposeAuth=no + ac_cv_lib_Xau_XauDisposeAuth=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xau_XauDisposeAuth" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xau_XauDisposeAuth" >&5 $as_echo "$ac_cv_lib_Xau_XauDisposeAuth" >&6; } -if test "x$ac_cv_lib_Xau_XauDisposeAuth" = x""yes; then +if test "x$ac_cv_lib_Xau_XauDisposeAuth" = x""yes; then : XAU_LIBS="-lXau" fi @@ -21726,245 +16726,53 @@ fi -if test "$_os" != "WINNT" -a "$_os" != "OS2" -a "$_os" != "Darwin"; then - { $as_echo "$as_me:$LINENO: checking whether to use Xaw" >&5 -$as_echo_n "checking whether to use Xaw... " >&6; } - if test "$enable_Xaw" = "no"; then - DISABLE_XAW=TRUE - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - -for ac_header in X11/Composite.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -else - { { $as_echo "$as_me:$LINENO: error: Xt include headers not found" >&5 -$as_echo "$as_me: error: Xt include headers not found" >&2;} - { (exit 1); exit 1; }; } -fi - -done - - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -for ac_header in X11/Xaw/Label.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +if test "$_os" != "WINNT" -a "$_os" != "OS2" -a "$_os" != "Darwin"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use Xaw" >&5 +$as_echo_n "checking whether to use Xaw... " >&6; } + if test "$enable_Xaw" = "no"; then + DISABLE_XAW=TRUE + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + for ac_header in X11/Composite.h +do : + ac_fn_c_check_header_compile "$LINENO" "X11/Composite.h" "ac_cv_header_X11_Composite_h" "#include +" +if test "x$ac_cv_header_X11_Composite_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_X11_COMPOSITE_H 1 +_ACEOF - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + as_fn_error "Xt include headers not found" "$LINENO" 5 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +done + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + for ac_header in X11/Xaw/Label.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "X11/Xaw/Label.h" "ac_cv_header_X11_Xaw_Label_h" "$ac_includes_default" +if test "x$ac_cv_header_X11_Xaw_Label_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_X11_XAW_LABEL_H 1 _ACEOF else - { { $as_echo "$as_me:$LINENO: error: Xaw include headers not found" >&5 -$as_echo "$as_me: error: Xaw include headers not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Xaw include headers not found" "$LINENO" 5 fi done - -{ $as_echo "$as_me:$LINENO: checking for main in -lXaw" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXaw" >&5 $as_echo_n "checking for main in -lXaw... " >&6; } -if test "${ac_cv_lib_Xaw_main+set}" = set; then +if test "${ac_cv_lib_Xaw_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXaw $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -21976,43 +16784,18 @@ return main (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xaw_main=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xaw_main=no + ac_cv_lib_Xaw_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw_main" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw_main" >&5 $as_echo "$ac_cv_lib_Xaw_main" >&6; } -if test "x$ac_cv_lib_Xaw_main" = x""yes; then +if test "x$ac_cv_lib_Xaw_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXAW 1 _ACEOF @@ -22020,9 +16803,7 @@ _ACEOF LIBS="-lXaw $LIBS" else - { { $as_echo "$as_me:$LINENO: error: Xaw library not found or functional" >&5 -$as_echo "$as_me: error: Xaw library not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Xaw library not found or functional" "$LINENO" 5 fi fi @@ -22032,158 +16813,23 @@ fi if test "$ENABLE_FONTCONFIG" = "TRUE" ; then - if test "${ac_cv_header_fontconfig_fontconfig_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for fontconfig/fontconfig.h" >&5 -$as_echo_n "checking for fontconfig/fontconfig.h... " >&6; } -if test "${ac_cv_header_fontconfig_fontconfig_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fontconfig_fontconfig_h" >&5 -$as_echo "$ac_cv_header_fontconfig_fontconfig_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking fontconfig/fontconfig.h usability" >&5 -$as_echo_n "checking fontconfig/fontconfig.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking fontconfig/fontconfig.h presence" >&5 -$as_echo_n "checking fontconfig/fontconfig.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: fontconfig/fontconfig.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: fontconfig/fontconfig.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for fontconfig/fontconfig.h" >&5 -$as_echo_n "checking for fontconfig/fontconfig.h... " >&6; } -if test "${ac_cv_header_fontconfig_fontconfig_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_fontconfig_fontconfig_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fontconfig_fontconfig_h" >&5 -$as_echo "$ac_cv_header_fontconfig_fontconfig_h" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "fontconfig/fontconfig.h" "ac_cv_header_fontconfig_fontconfig_h" "$ac_includes_default" +if test "x$ac_cv_header_fontconfig_fontconfig_h" = x""yes; then : -fi -if test "x$ac_cv_header_fontconfig_fontconfig_h" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" >&5 -$as_echo "$as_me: error: fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "fontconfig/fontconfig.h could not be found. libfontconfig1-dev or fontconfig???-devel missing?" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking whether fontconfig is >= 2.2.0" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fontconfig is >= 2.2.0" >&5 $as_echo_n "checking whether fontconfig is >= 2.2.0... " >&6; } - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +as_fn_error "cannot run test program while cross compiling +See \`config.log' for more details." "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -22194,222 +16840,60 @@ int main(int argc, char **argv) { } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { $as_echo "$as_me:$LINENO: error: no, fontconfig >= 2.2.0 needed" >&5 -$as_echo "$as_me: error: no, fontconfig >= 2.2.0 needed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no, fontconfig >= 2.2.0 needed" "$LINENO" 5 fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ $as_echo "$as_me:$LINENO: checking whether to link to Xrender" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to link to Xrender" >&5 $as_echo_n "checking whether to link to Xrender... " >&6; } if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } XRENDER_LINK=YES with_system_xrender_headers=yes else - { $as_echo "$as_me:$LINENO: result: no, dynamically open it" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, dynamically open it" >&5 $as_echo "no, dynamically open it" >&6; } XRENDER_LINK=NO fi -{ $as_echo "$as_me:$LINENO: checking which Xrender headers to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which Xrender headers to use" >&5 $as_echo_n "checking which Xrender headers to use... " >&6; } if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \ test "$with_system_xrender_headers" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_XRENDER_HEADERS=YES - if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrender.h" >&5 -$as_echo_n "checking for X11/extensions/Xrender.h... " >&6; } -if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrender_h" >&5 -$as_echo "$ac_cv_header_X11_extensions_Xrender_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xrender.h usability" >&5 -$as_echo_n "checking X11/extensions/Xrender.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xrender.h presence" >&5 -$as_echo_n "checking X11/extensions/Xrender.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrender.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrender.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrender.h" >&5 -$as_echo_n "checking for X11/extensions/Xrender.h... " >&6; } -if test "${ac_cv_header_X11_extensions_Xrender_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_X11_extensions_Xrender_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrender_h" >&5 -$as_echo "$ac_cv_header_X11_extensions_Xrender_h" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrender.h" "ac_cv_header_X11_extensions_Xrender_h" "$ac_includes_default" +if test "x$ac_cv_header_X11_extensions_Xrender_h" = x""yes; then : -fi -if test "x$ac_cv_header_X11_extensions_Xrender_h" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: Xrender not found. install X" >&5 -$as_echo "$as_me: error: Xrender not found. install X" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Xrender not found. install X" "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_XRENDER_HEADERS=NO BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS" fi if test "$XRENDER_LINK" = "YES"; then - -{ $as_echo "$as_me:$LINENO: checking for XRenderQueryVersion in -lXrender" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryVersion in -lXrender" >&5 $as_echo_n "checking for XRenderQueryVersion in -lXrender... " >&6; } -if test "${ac_cv_lib_Xrender_XRenderQueryVersion+set}" = set; then +if test "${ac_cv_lib_Xrender_XRenderQueryVersion+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXrender $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -22427,43 +16911,18 @@ return XRenderQueryVersion (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xrender_XRenderQueryVersion=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xrender_XRenderQueryVersion=no + ac_cv_lib_Xrender_XRenderQueryVersion=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrender_XRenderQueryVersion" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryVersion" >&5 $as_echo "$ac_cv_lib_Xrender_XRenderQueryVersion" >&6; } -if test "x$ac_cv_lib_Xrender_XRenderQueryVersion" = x""yes; then +if test "x$ac_cv_lib_Xrender_XRenderQueryVersion" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXRENDER 1 _ACEOF @@ -22471,21 +16930,19 @@ _ACEOF LIBS="-lXrender $LIBS" else - { { $as_echo "$as_me:$LINENO: error: libXrender not found or functional" >&5 -$as_echo "$as_me: error: libXrender not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libXrender not found or functional" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: checking whether to enable RandR support" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable RandR support" >&5 $as_echo_n "checking whether to enable RandR support... " >&6; } if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then XRANDR_DLOPEN="TRUE" - { $as_echo "$as_me:$LINENO: result: resorting to dlopen libXrandr at runtime" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: resorting to dlopen libXrandr at runtime" >&5 $as_echo "resorting to dlopen libXrandr at runtime" >&6; } else XRANDR_DLOPEN="FALSE" @@ -22495,9 +16952,9 @@ $as_echo "resorting to dlopen libXrandr at runtime" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -22510,14 +16967,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -22526,10 +16983,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -22544,24 +17001,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for xrandr >= 1.2" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xrandr >= 1.2" >&5 $as_echo_n "checking for xrandr >= 1.2... " >&6; } if $PKG_CONFIG --exists "xrandr >= 1.2" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking XRANDR_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking XRANDR_CFLAGS" >&5 $as_echo_n "checking XRANDR_CFLAGS... " >&6; } XRANDR_CFLAGS=`$PKG_CONFIG --cflags "xrandr >= 1.2"` - { $as_echo "$as_me:$LINENO: result: $XRANDR_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XRANDR_CFLAGS" >&5 $as_echo "$XRANDR_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking XRANDR_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking XRANDR_LIBS" >&5 $as_echo_n "checking XRANDR_LIBS... " >&6; } XRANDR_LIBS=`$PKG_CONFIG --libs "xrandr >= 1.2"` - { $as_echo "$as_me:$LINENO: result: $XRANDR_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XRANDR_LIBS" >&5 $as_echo "$XRANDR_LIBS" >&6; } else XRANDR_CFLAGS="" @@ -22587,156 +17044,23 @@ $as_echo "$XRANDR_LIBS" >&6; } fi if test "$ENABLE_RANDR" != "TRUE"; then - if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5 -$as_echo_n "checking for X11/extensions/Xrandr.h... " >&6; } -if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5 -$as_echo "$ac_cv_header_X11_extensions_Xrandr_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xrandr.h usability" >&5 -$as_echo_n "checking X11/extensions/Xrandr.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xrandr.h presence" >&5 -$as_echo_n "checking X11/extensions/Xrandr.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xrandr.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xrandr.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5 -$as_echo_n "checking for X11/extensions/Xrandr.h... " >&6; } -if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_X11_extensions_Xrandr_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5 -$as_echo "$ac_cv_header_X11_extensions_Xrandr_h" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default" +if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then : -fi -if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: X11/extensions/Xrandr.h could not be found. X11 dev missing?" >&5 -$as_echo "$as_me: error: X11/extensions/Xrandr.h could not be found. X11 dev missing?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "X11/extensions/Xrandr.h could not be found. X11 dev missing?" "$LINENO" 5 fi XRANDR_CFLAGS=" " - -{ $as_echo "$as_me:$LINENO: checking for XRRQueryExtension in -lXrandr" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRQueryExtension in -lXrandr" >&5 $as_echo_n "checking for XRRQueryExtension in -lXrandr... " >&6; } -if test "${ac_cv_lib_Xrandr_XRRQueryExtension+set}" = set; then +if test "${ac_cv_lib_Xrandr_XRRQueryExtension+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXrandr $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -22754,43 +17078,18 @@ return XRRQueryExtension (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xrandr_XRRQueryExtension=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xrandr_XRRQueryExtension=no + ac_cv_lib_Xrandr_XRRQueryExtension=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRQueryExtension" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRQueryExtension" >&5 $as_echo "$ac_cv_lib_Xrandr_XRRQueryExtension" >&6; } -if test "x$ac_cv_lib_Xrandr_XRRQueryExtension" = x""yes; then +if test "x$ac_cv_lib_Xrandr_XRRQueryExtension" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXRANDR 1 _ACEOF @@ -22798,20 +17097,18 @@ _ACEOF LIBS="-lXrandr $LIBS" else - { { $as_echo "$as_me:$LINENO: error: libXrandr not found or functional" >&5 -$as_echo "$as_me: error: libXrandr not found or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libXrandr not found or functional" "$LINENO" 5 fi XRANDR_LIBS="-lXrandr " ENABLE_RANDR="TRUE" - { $as_echo "$as_me:$LINENO: result: enabling RandR support" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling RandR support" >&5 $as_echo "enabling RandR support" >&6; } fi fi else ENABLE_RANDR="" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -22819,21 +17116,21 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether to use neon" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use neon" >&5 $as_echo_n "checking whether to use neon... " >&6; } if test "$enable_neon" = "no"; then - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } DISABLE_NEON=TRUE else - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -{ $as_echo "$as_me:$LINENO: checking which neon to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which neon to use" >&5 $as_echo_n "checking which neon to use... " >&6; } if test -n "$with_system_neon" -o -n "$with_system_libs" && \ test "$with_system_neon" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } succeeded=no @@ -22841,9 +17138,9 @@ $as_echo "external" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -22856,14 +17153,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -22872,10 +17169,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -22890,24 +17187,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for neon >= 0.24.0" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for neon >= 0.24.0" >&5 $as_echo_n "checking for neon >= 0.24.0... " >&6; } if $PKG_CONFIG --exists "neon >= 0.24.0" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking NEON_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking NEON_CFLAGS" >&5 $as_echo_n "checking NEON_CFLAGS... " >&6; } NEON_CFLAGS=`$PKG_CONFIG --cflags "neon >= 0.24.0"` - { $as_echo "$as_me:$LINENO: result: $NEON_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEON_CFLAGS" >&5 $as_echo "$NEON_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking NEON_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking NEON_LIBS" >&5 $as_echo_n "checking NEON_LIBS... " >&6; } NEON_LIBS=`$PKG_CONFIG --libs "neon >= 0.24.0"` - { $as_echo "$as_me:$LINENO: result: $NEON_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEON_LIBS" >&5 $as_echo "$NEON_LIBS" >&6; } else NEON_CFLAGS="" @@ -22929,16 +17226,14 @@ $as_echo "$NEON_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: you need neon >= 0.24.x for system-neon" >&5 -$as_echo "$as_me: error: you need neon >= 0.24.x for system-neon" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "you need neon >= 0.24.x for system-neon" "$LINENO" 5 fi NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`" NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1" SYSTEM_NEON=YES else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_NEON=NO NEON_LIBS=-lneon @@ -22954,299 +17249,27 @@ fi if test "$_os" = "Darwin" && test "$with_system_openssl" != "no"; then with_system_openssl=yes fi -{ $as_echo "$as_me:$LINENO: checking which libssl to use" >&5 -$as_echo_n "checking which libssl to use... " >&6; } -if test -n "$with_system_openssl" -o -n "$with_system_libs" && \ - test "$with_system_openssl" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } - # Mac OS builds should get out without extra stuff is the Mac porters' - # wish. And pkg-config is although Xcode ships a .pc for openssl - if test "$_os" = "Darwin"; then - OPENSSL_CFLAGS= - OPENSSL_LIBS="-lssl -lcrypto" - else - - succeeded=no - - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for openssl " >&5 -$as_echo_n "checking for openssl ... " >&6; } - - if $PKG_CONFIG --exists "openssl " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:$LINENO: checking OPENSSL_CFLAGS" >&5 -$as_echo_n "checking OPENSSL_CFLAGS... " >&6; } - OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl "` - { $as_echo "$as_me:$LINENO: result: $OPENSSL_CFLAGS" >&5 -$as_echo "$OPENSSL_CFLAGS" >&6; } - - { $as_echo "$as_me:$LINENO: checking OPENSSL_LIBS" >&5 -$as_echo_n "checking OPENSSL_LIBS... " >&6; } - OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl "` - { $as_echo "$as_me:$LINENO: result: $OPENSSL_LIBS" >&5 -$as_echo "$OPENSSL_LIBS" >&6; } - else - OPENSSL_CFLAGS="" - OPENSSL_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl "` - echo $OPENSSL_PKG_ERRORS - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - : - else - { { $as_echo "$as_me:$LINENO: error: Library requirements (openssl ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (openssl ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } - fi - - fi - SYSTEM_OPENSSL=YES -else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } - SYSTEM_OPENSSL=NO - BUILD_TYPE="$BUILD_TYPE OPENSSL" -fi - - - - -{ $as_echo "$as_me:$LINENO: checking whether to enable agg" >&5 -$as_echo_n "checking whether to enable agg... " >&6; } -if test "$with_agg" = "no"; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - ENABLE_AGG=YES - - - { $as_echo "$as_me:$LINENO: checking which AGG to use" >&5 -$as_echo_n "checking which AGG to use... " >&6; } - if test -n "$with_system_agg" -o -n "$with_system_libs" && \ - test "$with_system_agg" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } - - succeeded=no - - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for libagg >= 2.3" >&5 -$as_echo_n "checking for libagg >= 2.3... " >&6; } - - if $PKG_CONFIG --exists "libagg >= 2.3" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - succeeded=yes - - { $as_echo "$as_me:$LINENO: checking AGG_CFLAGS" >&5 -$as_echo_n "checking AGG_CFLAGS... " >&6; } - AGG_CFLAGS=`$PKG_CONFIG --cflags "libagg >= 2.3"` - { $as_echo "$as_me:$LINENO: result: $AGG_CFLAGS" >&5 -$as_echo "$AGG_CFLAGS" >&6; } - - { $as_echo "$as_me:$LINENO: checking AGG_LIBS" >&5 -$as_echo_n "checking AGG_LIBS... " >&6; } - AGG_LIBS=`$PKG_CONFIG --libs "libagg >= 2.3"` - { $as_echo "$as_me:$LINENO: result: $AGG_LIBS" >&5 -$as_echo "$AGG_LIBS" >&6; } - else - AGG_CFLAGS="" - AGG_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - AGG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libagg >= 2.3"` - echo $AGG_PKG_ERRORS - fi - - - - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - : - else - { { $as_echo "$as_me:$LINENO: error: Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } - fi - - { $as_echo "$as_me:$LINENO: checking agg version" >&5 -$as_echo_n "checking agg version... " >&6; } - # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway - # (/usr/include gets stripped from pkg-config output) - if test -z "$AGG_CFLAGS" || test "$AGG_CFLAGS" = " "; then - AGG_INCDIR="`$PKG_CONFIG --variable includedir libagg`/agg2" - else - AGG_INCDIR="`echo $AGG_CFLAGS | $SED -e s/-I//`" - fi - if $PKG_CONFIG --modversion libagg | grep -q 2.3 || \ - $PKG_CONFIG --modversion libagg | grep -q 2.4; then - # 2.4's libagg.pc.in still contains 2.3 :/ - if $EGREP -q "Version 2.4" `echo $AGG_INCDIR`/agg_basics.h; then - { $as_echo "$as_me:$LINENO: result: 2.4" >&5 -$as_echo "2.4" >&6; } - AGG_VERSION=2400 - else - { $as_echo "$as_me:$LINENO: result: 2.3" >&5 -$as_echo "2.3" >&6; } - AGG_VERSION=2300 - fi - SYSTEM_AGG=YES - else - { { $as_echo "$as_me:$LINENO: error: only agg 2.3 and 2.4 are supported" >&5 -$as_echo "$as_me: error: only agg 2.3 and 2.4 are supported" >&2;} - { (exit 1); exit 1; }; } - fi - else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } - SYSTEM_AGG=NO - AGG_VERSION=2300 - BUILD_TYPE="$BUILD_TYPE AGG" - fi - - -fi - -{ $as_echo "$as_me:$LINENO: checking which redland library to use" >&5 -$as_echo_n "checking which redland library to use... " >&6; } -if test -n "$with_system_redland" && \ - test "$with_system_redland" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libssl to use" >&5 +$as_echo_n "checking which libssl to use... " >&6; } +if test -n "$with_system_openssl" -o -n "$with_system_libs" && \ + test "$with_system_openssl" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } - SYSTEM_REDLAND=YES + # Mac OS builds should get out without extra stuff is the Mac porters' + # wish. And pkg-config is although Xcode ships a .pc for openssl + if test "$_os" = "Darwin"; then + OPENSSL_CFLAGS= + OPENSSL_LIBS="-lssl -lcrypto" + else succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -23259,14 +17282,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -23275,10 +17298,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -23293,32 +17316,32 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for redland" >&5 -$as_echo_n "checking for redland... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl " >&5 +$as_echo_n "checking for openssl ... " >&6; } - if $PKG_CONFIG --exists "redland" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + if $PKG_CONFIG --exists "openssl " ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking REDLAND_CFLAGS" >&5 -$as_echo_n "checking REDLAND_CFLAGS... " >&6; } - REDLAND_CFLAGS=`$PKG_CONFIG --cflags "redland"` - { $as_echo "$as_me:$LINENO: result: $REDLAND_CFLAGS" >&5 -$as_echo "$REDLAND_CFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OPENSSL_CFLAGS" >&5 +$as_echo_n "checking OPENSSL_CFLAGS... " >&6; } + OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl "` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_CFLAGS" >&5 +$as_echo "$OPENSSL_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking REDLAND_LIBS" >&5 -$as_echo_n "checking REDLAND_LIBS... " >&6; } - REDLAND_LIBS=`$PKG_CONFIG --libs "redland"` - { $as_echo "$as_me:$LINENO: result: $REDLAND_LIBS" >&5 -$as_echo "$REDLAND_LIBS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OPENSSL_LIBS" >&5 +$as_echo_n "checking OPENSSL_LIBS... " >&6; } + OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl "` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_LIBS" >&5 +$as_echo "$OPENSSL_LIBS" >&6; } else - REDLAND_CFLAGS="" - REDLAND_LIBS="" + OPENSSL_CFLAGS="" + OPENSSL_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. - REDLAND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "redland"` - echo $REDLAND_PKG_ERRORS + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl "` + echo $OPENSSL_PKG_ERRORS fi @@ -23332,42 +17355,47 @@ $as_echo "$REDLAND_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (redland) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (redland) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (openssl ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi + fi + SYSTEM_OPENSSL=YES else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } - BUILD_TYPE="$BUILD_TYPE REDLAND" - SYSTEM_REDLAND=NO + SYSTEM_OPENSSL=NO + BUILD_TYPE="$BUILD_TYPE OPENSSL" fi -{ $as_echo "$as_me:$LINENO: checking which libhunspell to use" >&5 -$as_echo_n "checking which libhunspell to use... " >&6; } -if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \ - test "$with_system_hunspell" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } - SYSTEM_HUNSPELL=YES - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable agg" >&5 +$as_echo_n "checking whether to enable agg... " >&6; } +if test "$with_agg" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ENABLE_AGG=YES + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which AGG to use" >&5 +$as_echo_n "checking which AGG to use... " >&6; } + if test -n "$with_system_agg" -o -n "$with_system_libs" && \ + test "$with_system_agg" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -23380,14 +17408,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -23396,10 +17424,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -23414,32 +17442,32 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for hunspell" >&5 -$as_echo_n "checking for hunspell... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libagg >= 2.3" >&5 +$as_echo_n "checking for libagg >= 2.3... " >&6; } - if $PKG_CONFIG --exists "hunspell" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + if $PKG_CONFIG --exists "libagg >= 2.3" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking HUNSPELL_CFLAGS" >&5 -$as_echo_n "checking HUNSPELL_CFLAGS... " >&6; } - HUNSPELL_CFLAGS=`$PKG_CONFIG --cflags "hunspell"` - { $as_echo "$as_me:$LINENO: result: $HUNSPELL_CFLAGS" >&5 -$as_echo "$HUNSPELL_CFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking AGG_CFLAGS" >&5 +$as_echo_n "checking AGG_CFLAGS... " >&6; } + AGG_CFLAGS=`$PKG_CONFIG --cflags "libagg >= 2.3"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AGG_CFLAGS" >&5 +$as_echo "$AGG_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking HUNSPELL_LIBS" >&5 -$as_echo_n "checking HUNSPELL_LIBS... " >&6; } - HUNSPELL_LIBS=`$PKG_CONFIG --libs "hunspell"` - { $as_echo "$as_me:$LINENO: result: $HUNSPELL_LIBS" >&5 -$as_echo "$HUNSPELL_LIBS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking AGG_LIBS" >&5 +$as_echo_n "checking AGG_LIBS... " >&6; } + AGG_LIBS=`$PKG_CONFIG --libs "libagg >= 2.3"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AGG_LIBS" >&5 +$as_echo "$AGG_LIBS" >&6; } else - HUNSPELL_CFLAGS="" - HUNSPELL_LIBS="" + AGG_CFLAGS="" + AGG_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. - HUNSPELL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "hunspell"` - + AGG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libagg >= 2.3"` + echo $AGG_PKG_ERRORS fi @@ -23451,634 +17479,378 @@ $as_echo "$HUNSPELL_LIBS" >&6; } fi if test $succeeded = yes; then - HUNSPELL_PC="TRUE" + : else - HUNSPELL_PC="" + as_fn_error "Library requirements (libagg >= 2.3) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi - if test "$HUNSPELL_PC" != "TRUE"; then - if test "${ac_cv_header_hunspell_hxx+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for hunspell.hxx" >&5 -$as_echo_n "checking for hunspell.hxx... " >&6; } -if test "${ac_cv_header_hunspell_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hxx" >&5 -$as_echo "$ac_cv_header_hunspell_hxx" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking hunspell.hxx usability" >&5 -$as_echo_n "checking hunspell.hxx usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking agg version" >&5 +$as_echo_n "checking agg version... " >&6; } + # workaround; if AGG_CFLAGS is empty (broken libagg.pc in 2.3), add /usr/include/agg2 anyway + # (/usr/include gets stripped from pkg-config output) + if test -z "$AGG_CFLAGS" || test "$AGG_CFLAGS" = " "; then + AGG_INCDIR="`$PKG_CONFIG --variable includedir libagg`/agg2" + else + AGG_INCDIR="`echo $AGG_CFLAGS | $SED -e s/-I//`" + fi + if $PKG_CONFIG --modversion libagg | grep -q 2.3 || \ + $PKG_CONFIG --modversion libagg | grep -q 2.4; then + # 2.4's libagg.pc.in still contains 2.3 :/ + if $EGREP -q "Version 2.4" `echo $AGG_INCDIR`/agg_basics.h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.4" >&5 +$as_echo "2.4" >&6; } + AGG_VERSION=2400 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.3" >&5 +$as_echo "2.3" >&6; } + AGG_VERSION=2300 + fi + SYSTEM_AGG=YES + else + as_fn_error "only agg 2.3 and 2.4 are supported" "$LINENO" 5 + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } + SYSTEM_AGG=NO + AGG_VERSION=2300 + BUILD_TYPE="$BUILD_TYPE AGG" + fi -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking hunspell.hxx presence" >&5 -$as_echo_n "checking hunspell.hxx presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell.hxx: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: hunspell.hxx: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for hunspell.hxx" >&5 -$as_echo_n "checking for hunspell.hxx... " >&6; } -if test "${ac_cv_header_hunspell_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_hunspell_hxx=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hxx" >&5 -$as_echo "$ac_cv_header_hunspell_hxx" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which redland library to use" >&5 +$as_echo_n "checking which redland library to use... " >&6; } +if test -n "$with_system_redland" && \ + test "$with_system_redland" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } + SYSTEM_REDLAND=YES -fi -if test "x$ac_cv_header_hunspell_hxx" = x""yes; then - : -else + succeeded=no - if test "${ac_cv_header_hunspell_hunspell_hxx+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for hunspell/hunspell.hxx" >&5 -$as_echo_n "checking for hunspell/hunspell.hxx... " >&6; } -if test "${ac_cv_header_hunspell_hunspell_hxx+set}" = set; then + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hunspell_hxx" >&5 -$as_echo "$ac_cv_header_hunspell_hunspell_hxx" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking hunspell/hunspell.hxx usability" >&5 -$as_echo_n "checking hunspell/hunspell.hxx usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking hunspell/hunspell.hxx presence" >&5 -$as_echo_n "checking hunspell/hunspell.hxx presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hunspell/hunspell.hxx: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: hunspell/hunspell.hxx: in the future, the compiler will take precedence" >&2;} + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ;; + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; esac -{ $as_echo "$as_me:$LINENO: checking for hunspell/hunspell.hxx" >&5 -$as_echo_n "checking for hunspell/hunspell.hxx... " >&6; } -if test "${ac_cv_header_hunspell_hunspell_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_hunspell_hunspell_hxx=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hunspell_hunspell_hxx" >&5 -$as_echo "$ac_cv_header_hunspell_hunspell_hxx" >&6; } - fi -if test "x$ac_cv_header_hunspell_hunspell_hxx" = x""yes; then - HUNSPELL_CFLAGS=-I/usr/include/hunspell +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - { { $as_echo "$as_me:$LINENO: error: hunspell headers not found." >&5 -$as_echo "$as_me: error: hunspell headers not found." >&2;} - { (exit 1); exit 1; }; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + fi -fi - + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for redland" >&5 +$as_echo_n "checking for redland... " >&6; } + if $PKG_CONFIG --exists "redland" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes -{ $as_echo "$as_me:$LINENO: checking for main in -lhunspell" >&5 -$as_echo_n "checking for main in -lhunspell... " >&6; } -if test "${ac_cv_lib_hunspell_main+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lhunspell $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking REDLAND_CFLAGS" >&5 +$as_echo_n "checking REDLAND_CFLAGS... " >&6; } + REDLAND_CFLAGS=`$PKG_CONFIG --cflags "redland"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $REDLAND_CFLAGS" >&5 +$as_echo "$REDLAND_CFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking REDLAND_LIBS" >&5 +$as_echo_n "checking REDLAND_LIBS... " >&6; } + REDLAND_LIBS=`$PKG_CONFIG --libs "redland"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $REDLAND_LIBS" >&5 +$as_echo "$REDLAND_LIBS" >&6; } + else + REDLAND_CFLAGS="" + REDLAND_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + REDLAND_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "redland"` + echo $REDLAND_PKG_ERRORS + fi -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_hunspell_main=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_hunspell_main=no -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hunspell_main" >&5 -$as_echo "$ac_cv_lib_hunspell_main" >&6; } -if test "x$ac_cv_lib_hunspell_main" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBHUNSPELL 1 -_ACEOF + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi - LIBS="-lhunspell $LIBS" + if test $succeeded = yes; then + : + else + as_fn_error "Library requirements (redland) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 + fi else - { { $as_echo "$as_me:$LINENO: error: hunspell library not found." >&5 -$as_echo "$as_me: error: hunspell library not found." >&2;} - { (exit 1); exit 1; }; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } + BUILD_TYPE="$BUILD_TYPE REDLAND" + SYSTEM_REDLAND=NO fi - HUNSPELL_LIBS=-lhunspell - fi - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } - SYSTEM_HUNSPELL=NO - BUILD_TYPE="$BUILD_TYPE HUNSPELL" -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which libhunspell to use" >&5 +$as_echo_n "checking which libhunspell to use... " >&6; } +if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \ + test "$with_system_hunspell" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } + SYSTEM_HUNSPELL=YES + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + succeeded=no -{ $as_echo "$as_me:$LINENO: checking which altlinuxhyph to use" >&5 -$as_echo_n "checking which altlinuxhyph to use... " >&6; } -if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \ - test "$with_system_altlinuxhyph" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } - SYSTEM_HYPH=YES - if test "${ac_cv_header_hyphen_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for hyphen.h" >&5 -$as_echo_n "checking for hyphen.h... " >&6; } -if test "${ac_cv_header_hyphen_h+set}" = set; then + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hyphen_h" >&5 -$as_echo "$ac_cv_header_hyphen_h" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking hyphen.h usability" >&5 -$as_echo_n "checking hyphen.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking hyphen.h presence" >&5 -$as_echo_n "checking hyphen.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + fi - ac_header_preproc=no -fi + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hunspell" >&5 +$as_echo_n "checking for hunspell... " >&6; } -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } + if $PKG_CONFIG --exists "hunspell" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: hyphen.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: hyphen.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: hyphen.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: hyphen.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: hyphen.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: hyphen.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: hyphen.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: hyphen.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: hyphen.h: in the future, the compiler will take precedence" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking HUNSPELL_CFLAGS" >&5 +$as_echo_n "checking HUNSPELL_CFLAGS... " >&6; } + HUNSPELL_CFLAGS=`$PKG_CONFIG --cflags "hunspell"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HUNSPELL_CFLAGS" >&5 +$as_echo "$HUNSPELL_CFLAGS" >&6; } - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for hyphen.h" >&5 -$as_echo_n "checking for hyphen.h... " >&6; } -if test "${ac_cv_header_hyphen_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_hyphen_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_hyphen_h" >&5 -$as_echo "$ac_cv_header_hyphen_h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking HUNSPELL_LIBS" >&5 +$as_echo_n "checking HUNSPELL_LIBS... " >&6; } + HUNSPELL_LIBS=`$PKG_CONFIG --libs "hunspell"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HUNSPELL_LIBS" >&5 +$as_echo "$HUNSPELL_LIBS" >&6; } + else + HUNSPELL_CFLAGS="" + HUNSPELL_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + HUNSPELL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "hunspell"` -fi -if test "x$ac_cv_header_hyphen_h" = x""yes; then - : -else - { { $as_echo "$as_me:$LINENO: error: altlinuxhyph headers not found." >&5 -$as_echo "$as_me: error: altlinuxhyph headers not found." >&2;} - { (exit 1); exit 1; }; } -fi + fi - { $as_echo "$as_me:$LINENO: checking for struct _HyphenDict.cset" >&5 -$as_echo_n "checking for struct _HyphenDict.cset... " >&6; } -if test "${ac_cv_member_struct__HyphenDict_cset+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -static struct _HyphenDict ac_aggr; -if (ac_aggr.cset) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct__HyphenDict_cset=yes + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HUNSPELL_PC="TRUE" + else + HUNSPELL_PC="" + fi + + if test "$HUNSPELL_PC" != "TRUE"; then + ac_fn_cxx_check_header_mongrel "$LINENO" "hunspell.hxx" "ac_cv_header_hunspell_hxx" "$ac_includes_default" +if test "x$ac_cv_header_hunspell_hxx" = x""yes; then : + else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_fn_cxx_check_header_mongrel "$LINENO" "hunspell/hunspell.hxx" "ac_cv_header_hunspell_hunspell_hxx" "$ac_includes_default" +if test "x$ac_cv_header_hunspell_hunspell_hxx" = x""yes; then : + HUNSPELL_CFLAGS=-I/usr/include/hunspell +else + as_fn_error "hunspell headers not found." "$LINENO" 5 +fi + + + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lhunspell" >&5 +$as_echo_n "checking for main in -lhunspell... " >&6; } +if test "${ac_cv_lib_hunspell_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lhunspell $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main () { -static struct _HyphenDict ac_aggr; -if (sizeof ac_aggr.cset) -return 0; +return main (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct__HyphenDict_cset=yes +if ac_fn_cxx_try_link "$LINENO"; then : + ac_cv_lib_hunspell_main=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_hunspell_main=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hunspell_main" >&5 +$as_echo "$ac_cv_lib_hunspell_main" >&6; } +if test "x$ac_cv_lib_hunspell_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBHUNSPELL 1 +_ACEOF + + LIBS="-lhunspell $LIBS" - ac_cv_member_struct__HyphenDict_cset=no +else + as_fn_error "hunspell library not found." "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + HUNSPELL_LIBS=-lhunspell + fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } + SYSTEM_HUNSPELL=NO + BUILD_TYPE="$BUILD_TYPE HUNSPELL" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which altlinuxhyph to use" >&5 +$as_echo_n "checking which altlinuxhyph to use... " >&6; } +if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \ + test "$with_system_altlinuxhyph" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } + SYSTEM_HYPH=YES + ac_fn_c_check_header_mongrel "$LINENO" "hyphen.h" "ac_cv_header_hyphen_h" "$ac_includes_default" +if test "x$ac_cv_header_hyphen_h" = x""yes; then : + +else + as_fn_error "altlinuxhyph headers not found." "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct__HyphenDict_cset" >&5 -$as_echo "$ac_cv_member_struct__HyphenDict_cset" >&6; } -if test "x$ac_cv_member_struct__HyphenDict_cset" = x""yes; then - : + + + ac_fn_c_check_member "$LINENO" "struct _HyphenDict" "cset" "ac_cv_member_struct__HyphenDict_cset" "#include +" +if test "x$ac_cv_member_struct__HyphenDict_cset" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: no. You are sure you have altlinuyhyph headers?" >&5 -$as_echo "$as_me: error: no. You are sure you have altlinuyhyph headers?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no. You are sure you have altlinuyhyph headers?" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhyphen" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hnj_hyphen_hyphenate2 in -lhyphen" >&5 $as_echo_n "checking for hnj_hyphen_hyphenate2 in -lhyphen... " >&6; } -if test "${ac_cv_lib_hyphen_hnj_hyphen_hyphenate2+set}" = set; then +if test "${ac_cv_lib_hyphen_hnj_hyphen_hyphenate2+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhyphen $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -24096,63 +17868,32 @@ return hnj_hyphen_hyphenate2 (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_hyphen_hnj_hyphen_hyphenate2=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_hyphen_hnj_hyphen_hyphenate2=no + ac_cv_lib_hyphen_hnj_hyphen_hyphenate2=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" >&5 $as_echo "$ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" >&6; } -if test "x$ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" = x""yes; then +if test "x$ac_cv_lib_hyphen_hnj_hyphen_hyphenate2" = x""yes; then : HYPHEN_LIB=-lhyphen else - { { $as_echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 -$as_echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "altlinuxhyph library not found or too old." "$LINENO" 5 fi if test -z "$HYPHEN_LIB"; then - { $as_echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhyph" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hnj_hyphen_hyphenate2 in -lhyph" >&5 $as_echo_n "checking for hnj_hyphen_hyphenate2 in -lhyph... " >&6; } -if test "${ac_cv_lib_hyph_hnj_hyphen_hyphenate2+set}" = set; then +if test "${ac_cv_lib_hyph_hnj_hyphen_hyphenate2+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhyph $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -24170,64 +17911,33 @@ return hnj_hyphen_hyphenate2 (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_hyph_hnj_hyphen_hyphenate2=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_hyph_hnj_hyphen_hyphenate2=no + ac_cv_lib_hyph_hnj_hyphen_hyphenate2=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hyph_hnj_hyphen_hyphenate2" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hyph_hnj_hyphen_hyphenate2" >&5 $as_echo "$ac_cv_lib_hyph_hnj_hyphen_hyphenate2" >&6; } -if test "x$ac_cv_lib_hyph_hnj_hyphen_hyphenate2" = x""yes; then +if test "x$ac_cv_lib_hyph_hnj_hyphen_hyphenate2" = x""yes; then : HYPHEN_LIB=-lhyph else - { { $as_echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 -$as_echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "altlinuxhyph library not found or too old." "$LINENO" 5 fi fi if test -z "$HYPHEN_LIB"; then - { $as_echo "$as_me:$LINENO: checking for hnj_hyphen_hyphenate2 in -lhnj" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hnj_hyphen_hyphenate2 in -lhnj" >&5 $as_echo_n "checking for hnj_hyphen_hyphenate2 in -lhnj... " >&6; } -if test "${ac_cv_lib_hnj_hnj_hyphen_hyphenate2+set}" = set; then +if test "${ac_cv_lib_hnj_hnj_hyphen_hyphenate2+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lhnj $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -24245,214 +17955,54 @@ return hnj_hyphen_hyphenate2 (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_hnj_hnj_hyphen_hyphenate2=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_hnj_hnj_hyphen_hyphenate2=no + ac_cv_lib_hnj_hnj_hyphen_hyphenate2=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_hnj_hnj_hyphen_hyphenate2" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hnj_hnj_hyphen_hyphenate2" >&5 $as_echo "$ac_cv_lib_hnj_hnj_hyphen_hyphenate2" >&6; } -if test "x$ac_cv_lib_hnj_hnj_hyphen_hyphenate2" = x""yes; then +if test "x$ac_cv_lib_hnj_hnj_hyphen_hyphenate2" = x""yes; then : HYPHEN_LIB=-lhnj else - { { $as_echo "$as_me:$LINENO: error: altlinuxhyph library not found or too old." >&5 -$as_echo "$as_me: error: altlinuxhyph library not found or too old." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "altlinuxhyph library not found or too old." "$LINENO" 5 fi fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_HYPH=NO fi -{ $as_echo "$as_me:$LINENO: checking which mythes to use" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which mythes to use" >&5 $as_echo_n "checking which mythes to use... " >&6; } if test -n "$with_system_mythes" && test "$with_system_mythes" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_MYTHES=YES - if test "${ac_cv_header_mythes_hxx+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for mythes.hxx" >&5 -$as_echo_n "checking for mythes.hxx... " >&6; } -if test "${ac_cv_header_mythes_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mythes_hxx" >&5 -$as_echo "$ac_cv_header_mythes_hxx" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking mythes.hxx usability" >&5 -$as_echo_n "checking mythes.hxx usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking mythes.hxx presence" >&5 -$as_echo_n "checking mythes.hxx presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mythes.hxx: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: mythes.hxx: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for mythes.hxx" >&5 -$as_echo_n "checking for mythes.hxx... " >&6; } -if test "${ac_cv_header_mythes_hxx+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_mythes_hxx=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mythes_hxx" >&5 -$as_echo "$ac_cv_header_mythes_hxx" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "mythes.hxx" "ac_cv_header_mythes_hxx" "$ac_includes_default" +if test "x$ac_cv_header_mythes_hxx" = x""yes; then : -fi -if test "x$ac_cv_header_mythes_hxx" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: mythes.hxx headers not found." >&5 -$as_echo "$as_me: error: mythes.hxx headers not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "mythes.hxx headers not found." "$LINENO" 5 fi - -{ $as_echo "$as_me:$LINENO: checking for main in -lmythes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmythes" >&5 $as_echo_n "checking for main in -lmythes... " >&6; } -if test "${ac_cv_lib_mythes_main+set}" = set; then +if test "${ac_cv_lib_mythes_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmythes $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -24461,221 +18011,61 @@ main () { return main (); ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_mythes_main=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_mythes_main=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mythes_main" >&5 -$as_echo "$ac_cv_lib_mythes_main" >&6; } -if test "x$ac_cv_lib_mythes_main" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMYTHES 1 -_ACEOF - - LIBS="-lmythes $LIBS" - -else - { { $as_echo "$as_me:$LINENO: error: mythes library not found." >&5 -$as_echo "$as_me: error: mythes library not found." >&2;} - { (exit 1); exit 1; }; } -fi - -else - { $as_echo "$as_me:$LINENO: result: internal" >&5 -$as_echo "internal" >&6; } - SYSTEM_MYTHES=NO -fi - - -{ $as_echo "$as_me:$LINENO: checking which lpsolve to use" >&5 -$as_echo_n "checking which lpsolve to use... " >&6; } -if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \ - test "$with_system_lpsolve" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 -$as_echo "external" >&6; } - SYSTEM_LPSOLVE=YES - if test "${ac_cv_header_lpsolve_lp_lib_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for lpsolve/lp_lib.h" >&5 -$as_echo_n "checking for lpsolve/lp_lib.h... " >&6; } -if test "${ac_cv_header_lpsolve_lp_lib_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_lpsolve_lp_lib_h" >&5 -$as_echo "$ac_cv_header_lpsolve_lp_lib_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking lpsolve/lp_lib.h usability" >&5 -$as_echo_n "checking lpsolve/lp_lib.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking lpsolve/lp_lib.h presence" >&5 -$as_echo_n "checking lpsolve/lp_lib.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mythes_main=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + ac_cv_lib_mythes_main=no fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mythes_main" >&5 +$as_echo "$ac_cv_lib_mythes_main" >&6; } +if test "x$ac_cv_lib_mythes_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBMYTHES 1 +_ACEOF -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: lpsolve/lp_lib.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: lpsolve/lp_lib.h: in the future, the compiler will take precedence" >&2;} + LIBS="-lmythes $LIBS" - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for lpsolve/lp_lib.h" >&5 -$as_echo_n "checking for lpsolve/lp_lib.h... " >&6; } -if test "${ac_cv_header_lpsolve_lp_lib_h+set}" = set; then - $as_echo_n "(cached) " >&6 else - ac_cv_header_lpsolve_lp_lib_h=$ac_header_preproc + as_fn_error "mythes library not found." "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_lpsolve_lp_lib_h" >&5 -$as_echo "$ac_cv_header_lpsolve_lp_lib_h" >&6; } -fi -if test "x$ac_cv_header_lpsolve_lp_lib_h" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: lpsolve headers not found." >&5 -$as_echo "$as_me: error: lpsolve headers not found." >&2;} - { (exit 1); exit 1; }; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 +$as_echo "internal" >&6; } + SYSTEM_MYTHES=NO fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which lpsolve to use" >&5 +$as_echo_n "checking which lpsolve to use... " >&6; } +if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \ + test "$with_system_lpsolve" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 +$as_echo "external" >&6; } + SYSTEM_LPSOLVE=YES + ac_fn_c_check_header_mongrel "$LINENO" "lpsolve/lp_lib.h" "ac_cv_header_lpsolve_lp_lib_h" "$ac_includes_default" +if test "x$ac_cv_header_lpsolve_lp_lib_h" = x""yes; then : + +else + as_fn_error "lpsolve headers not found." "$LINENO" 5 +fi + -{ $as_echo "$as_me:$LINENO: checking for make_lp in -llpsolve55" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for make_lp in -llpsolve55" >&5 $as_echo_n "checking for make_lp in -llpsolve55... " >&6; } -if test "${ac_cv_lib_lpsolve55_make_lp+set}" = set; then +if test "${ac_cv_lib_lpsolve55_make_lp+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llpsolve55 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -24693,43 +18083,18 @@ return make_lp (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lpsolve55_make_lp=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_lpsolve55_make_lp=no + ac_cv_lib_lpsolve55_make_lp=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lpsolve55_make_lp" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lpsolve55_make_lp" >&5 $as_echo "$ac_cv_lib_lpsolve55_make_lp" >&6; } -if test "x$ac_cv_lib_lpsolve55_make_lp" = x""yes; then +if test "x$ac_cv_lib_lpsolve55_make_lp" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBLPSOLVE55 1 _ACEOF @@ -24737,13 +18102,11 @@ _ACEOF LIBS="-llpsolve55 $LIBS" else - { { $as_echo "$as_me:$LINENO: error: lpsolve library not found or too old." >&5 -$as_echo "$as_me: error: lpsolve library not found or too old." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "lpsolve library not found or too old." "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_LPSOLVE=NO BUILD_TYPE="$BUILD_TYPE LPSOLVE" @@ -24751,21 +18114,17 @@ fi if test "$_os" = "Linux"; then - { $as_echo "$as_me:$LINENO: checking whether libc is >= 2.1.1" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libc is >= 2.1.1" >&5 $as_echo_n "checking whether libc is >= 2.1.1... " >&6; } exec 6>/dev/null # no output - { $as_echo "$as_me:$LINENO: checking for gnu_get_libc_version in -lc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnu_get_libc_version in -lc" >&5 $as_echo_n "checking for gnu_get_libc_version in -lc... " >&6; } -if test "${ac_cv_lib_c_gnu_get_libc_version+set}" = set; then +if test "${ac_cv_lib_c_gnu_get_libc_version+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -24783,59 +18142,32 @@ return gnu_get_libc_version (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_gnu_get_libc_version=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_c_gnu_get_libc_version=no + ac_cv_lib_c_gnu_get_libc_version=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_gnu_get_libc_version" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_gnu_get_libc_version" >&5 $as_echo "$ac_cv_lib_c_gnu_get_libc_version" >&6; } -if test "x$ac_cv_lib_c_gnu_get_libc_version" = x""yes; then +if test "x$ac_cv_lib_c_gnu_get_libc_version" = x""yes; then : HAVE_LIBC=yes; export HAVE_LIBC fi exec 6>&1 # output on again if test "$HAVE_LIBC"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { { $as_echo "$as_me:$LINENO: error: no, upgrade libc" >&5 -$as_echo "$as_me: error: no, upgrade libc" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no, upgrade libc" "$LINENO" 5 fi fi if test \( "$_os" = "WINNT" \) ; then - { $as_echo "$as_me:$LINENO: checking for PSDK files" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PSDK files" >&5 $as_echo_n "checking for PSDK files... " >&6; } if test -z "$with_psdk_home"; then # This first line will detect a February 2003 Microsoft Platform SDK @@ -24857,19 +18189,12 @@ $as_echo_n "checking for PSDK files... " >&6; } PSDK_HOME=`echo $PSDK_HOME | $SED 's/\/$//'` # Problem with current PSDK (iz 49865) if test -f "$PSDK_HOME/Lib/libcp.lib"; then - { { $as_echo "$as_me:$LINENO: error: - -Some modules do not build correctly with MS Platform SDK - April 2005 -Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found. -Remove/rename/backup that file and restart configure. Details about this -problem can be found in issue 49856." >&5 -$as_echo "$as_me: error: + as_fn_error " Some modules do not build correctly with MS Platform SDK - April 2005 Edition if the library ($PSDK_HOME/Lib/libcp.lib) is found. Remove/rename/backup that file and restart configure. Details about this -problem can be found in issue 49856." >&2;} - { (exit 1); exit 1; }; } +problem can be found in issue 49856." "$LINENO" 5 fi # WIndows SDK has different headers if test \( -f "$PSDK_HOME/Include/adoint.h" \) \ @@ -24885,32 +18210,27 @@ problem can be found in issue 49856." >&2;} HAVE_PSDK_LIB="no" fi if test "$HAVE_PSDK_H" = "no" -o "$HAVE_PSDK_LIB" = "no"; then - { { $as_echo "$as_me:$LINENO: error: Some (all?) PSDK files not found, please check if all needed Platform SDKs -are installed or use --with-psdk-home ." >&5 -$as_echo "$as_me: error: Some (all?) PSDK files not found, please check if all needed Platform SDKs -are installed or use --with-psdk-home ." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Some (all?) PSDK files not found, please check if all needed Platform SDKs +are installed or use --with-psdk-home ." "$LINENO" 5 fi if test ! -x "$PSDK_HOME/bin/msiinfo.exe" \ -o ! -x "$PSDK_HOME/bin/msidb.exe" \ -o ! -x "$PSDK_HOME/bin/uuidgen.exe" \ -o ! -x "$PSDK_HOME/bin/msitran.exe" ; then - { { $as_echo "$as_me:$LINENO: error: Some (all) files of the Windows Installer SDK are missing, please install." >&5 -$as_echo "$as_me: error: Some (all) files of the Windows Installer SDK are missing, please install." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Some (all) files of the Windows Installer SDK are missing, please install." "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: result: SDK files found ...)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: SDK files found ...)" >&5 $as_echo "SDK files found ...)" >&6; } if echo $PSDK_HOME | grep "v6.1" >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: Found Windows SDK 6.1 ($PSDK_HOME)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Found Windows SDK 6.1 ($PSDK_HOME)" >&5 $as_echo "Found Windows SDK 6.1 ($PSDK_HOME)" >&6; } WINDOWS_VISTA_PSDK=TRUE elif echo $PSDK_HOME | grep "v6.0" >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: Found Windows SDK 6.0 ($PSDK_HOME)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Found Windows SDK 6.0 ($PSDK_HOME)" >&5 $as_echo "Found Windows SDK 6.0 ($PSDK_HOME)" >&6; } WINDOWS_VISTA_PSDK=TRUE else - { $as_echo "$as_me:$LINENO: result: Found Legacy Windows Platform SDK ($PSDK_HOME)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Found Legacy Windows Platform SDK ($PSDK_HOME)" >&5 $as_echo "Found Legacy Windows Platform SDK ($PSDK_HOME)" >&6; } fi fi @@ -24918,7 +18238,7 @@ fi if test \( "$_os" = "WINNT" \) ; then - { $as_echo "$as_me:$LINENO: checking for DirectX SDK files" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK files" >&5 $as_echo_n "checking for DirectX SDK files... " >&6; } if test -z "$with_directx_home"; then if test -n "$DXSDK_DIR"; then @@ -24951,16 +18271,14 @@ $as_echo_n "checking for DirectX SDK files... " >&6; } fi if test -n "$ENABLE_DIRECTX"; then if test "$HAVE_DIRECTXSDK_H" = "yes" -a "$HAVE_DIRECTXSDK_LIB" = "yes"; then - { $as_echo "$as_me:$LINENO: result: found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else - { { $as_echo "$as_me:$LINENO: error: DirectX SDK files not found, please use --with-directx-home or -disable-directx." >&5 -$as_echo "$as_me: error: DirectX SDK files not found, please use --with-directx-home or -disable-directx." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "DirectX SDK files not found, please use --with-directx-home or -disable-directx." "$LINENO" 5 fi else DIRECTXSDK_HOME="" - { $as_echo "$as_me:$LINENO: result: disabled" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } fi fi @@ -24969,13 +18287,13 @@ fi NSIS_PATH="" if test "$_os" = "WINNT" ; then - { $as_echo "$as_me:$LINENO: checking for NSIS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSIS" >&5 $as_echo_n "checking for NSIS... " >&6; } # Extract the first word of "nsis.exe", so it can be a program name with args. set dummy nsis.exe; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_NSIS_PATH+set}" = set; then +if test "${ac_cv_path_NSIS_PATH+set}" = set; then : $as_echo_n "(cached) " >&6 else case $NSIS_PATH in @@ -24988,14 +18306,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_NSIS_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -25003,10 +18321,10 @@ esac fi NSIS_PATH=$ac_cv_path_NSIS_PATH if test -n "$NSIS_PATH"; then - { $as_echo "$as_me:$LINENO: result: $NSIS_PATH" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSIS_PATH" >&5 $as_echo "$NSIS_PATH" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -25025,13 +18343,13 @@ fi NSIS_PATH="$nsistest" fi if test -z "$NSIS_PATH"; then - { $as_echo "$as_me:$LINENO: WARNING: NSIS not found, no self contained installer will be build." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: NSIS not found, no self contained installer will be build." >&5 $as_echo "$as_me: WARNING: NSIS not found, no self contained installer will be build." >&2;} echo "NSIS not found, no self contained installer will be build." >> warn else NSIS_PATH=`cygpath -d "$NSIS_PATH"` NSIS_PATH=`cygpath -u "$NSIS_PATH"` - { $as_echo "$as_me:$LINENO: result: found ($NSIS_PATH)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ($NSIS_PATH)" >&5 $as_echo "found ($NSIS_PATH)" >&6; } fi fi @@ -25039,9 +18357,9 @@ fi # Extract the first word of "bison", so it can be a program name with args. set dummy bison; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_BISON+set}" = set; then +if test "${ac_cv_path_BISON+set}" = set; then : $as_echo_n "(cached) " >&6 else case $BISON in @@ -25054,14 +18372,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -25069,44 +18387,40 @@ esac fi BISON=$ac_cv_path_BISON if test -n "$BISON"; then - { $as_echo "$as_me:$LINENO: result: $BISON" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5 $as_echo "$BISON" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$BISON"; then - { { $as_echo "$as_me:$LINENO: error: no bison found in \$PATH, install bison" >&5 -$as_echo "$as_me: error: no bison found in \$PATH, install bison" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no bison found in \$PATH, install bison" "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: checking the bison version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the bison version" >&5 $as_echo_n "checking the bison version... " >&6; } _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[^0-9]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'` # Accept newer than 1.875 or older(equal) than 1.75 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then if test "$_bison_version" = "1.875" ; then - { $as_echo "$as_me:$LINENO: WARNING: suspect ($BISON $_bison_version)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: suspect ($BISON $_bison_version)" >&5 $as_echo "$as_me: WARNING: suspect ($BISON $_bison_version)" >&2;} echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn else - { $as_echo "$as_me:$LINENO: result: checked ($BISON $_bison_version)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checked ($BISON $_bison_version)" >&5 $as_echo "checked ($BISON $_bison_version)" >&6; } fi else - { { $as_echo "$as_me:$LINENO: error: failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" >&5 -$as_echo "$as_me: error: failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))" "$LINENO" 5 fi fi # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_FLEX+set}" = set; then +if test "${ac_cv_path_FLEX+set}" = set; then : $as_echo_n "(cached) " >&6 else case $FLEX in @@ -25119,14 +18433,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_FLEX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -25134,24 +18448,22 @@ esac fi FLEX=$ac_cv_path_FLEX if test -n "$FLEX"; then - { $as_echo "$as_me:$LINENO: result: $FLEX" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5 $as_echo "$FLEX" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$FLEX"; then - { { $as_echo "$as_me:$LINENO: error: no flex found in \$PATH, install flex" >&5 -$as_echo "$as_me: error: no flex found in \$PATH, install flex" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no flex found in \$PATH, install flex" "$LINENO" 5 fi # Extract the first word of "patch", so it can be a program name with args. set dummy patch; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PATCH+set}" = set; then +if test "${ac_cv_path_PATCH+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PATCH in @@ -25164,14 +18476,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -25179,18 +18491,16 @@ esac fi PATCH=$ac_cv_path_PATCH if test -n "$PATCH"; then - { $as_echo "$as_me:$LINENO: result: $PATCH" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5 $as_echo "$PATCH" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$PATCH"; then - { { $as_echo "$as_me:$LINENO: error: \\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" >&5 -$as_echo "$as_me: error: \\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "\\"patch\\" not found in \$PATH, install the development tool named\\"patch\"\" "$LINENO" 5 fi if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then @@ -25200,21 +18510,17 @@ if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then if test -x "$with_gnu_patch"; then GNUPATCH=$with_gnu_patch else - { { $as_echo "$as_me:$LINENO: error: --with-gnu-patch did not point to an executable" >&5 -$as_echo "$as_me: error: --with-gnu-patch did not point to an executable" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "--with-gnu-patch did not point to an executable" "$LINENO" 5 fi fi - { $as_echo "$as_me:$LINENO: checking whether $GNUPATCH is GNU patch" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GNUPATCH is GNU patch" >&5 $as_echo_n "checking whether $GNUPATCH is GNU patch... " >&6; } if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { { $as_echo "$as_me:$LINENO: error: no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" >&5 -$as_echo "$as_me: error: no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it" "$LINENO" 5 fi @@ -25223,9 +18529,9 @@ $as_echo "$as_me: error: no, GNU patch needed. install or specify with --with-gn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GNUCP+set}" = set; then +if test "${ac_cv_path_GNUCP+set}" = set; then : $as_echo_n "(cached) " >&6 else case $GNUCP in @@ -25238,14 +18544,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GNUCP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -25253,10 +18559,10 @@ esac fi GNUCP=$ac_cv_path_GNUCP if test -n "$GNUCP"; then - { $as_echo "$as_me:$LINENO: result: $GNUCP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUCP" >&5 $as_echo "$GNUCP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -25265,38 +18571,32 @@ fi done if test -z $GNUCP; then - { { $as_echo "$as_me:$LINENO: error: Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" >&5 -$as_echo "$as_me: error: Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it" "$LINENO" 5 fi else if test -x "$with_gnu_cp"; then GNUCP=$with_gnu_cp else - { { $as_echo "$as_me:$LINENO: error: --with-gnu-cp did not point to an executable" >&5 -$as_echo "$as_me: error: --with-gnu-cp did not point to an executable" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "--with-gnu-cp did not point to an executable" "$LINENO" 5 fi fi - { $as_echo "$as_me:$LINENO: checking whether $GNUCP is GNU cp" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GNUCP is GNU cp" >&5 $as_echo_n "checking whether $GNUCP is GNU cp... " >&6; } if $GNUCP --version 2>/dev/null | grep "Free Software Foundation" >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else if $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else if test "$_os" = "Darwin"; then GNUCP='' - { $as_echo "$as_me:$LINENO: result: no gnucp found - using the system's cp command" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no gnucp found - using the system's cp command" >&5 $as_echo "no gnucp found - using the system's cp command" >&6; } else - { { $as_echo "$as_me:$LINENO: error: no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" >&5 -$as_echo "$as_me: error: no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it" "$LINENO" 5 fi fi fi @@ -25309,9 +18609,9 @@ if test "$_os" = "WINNT"; then CYGWIN_PATH="" # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_CYGWIN_PATH+set}" = set; then +if test "${ac_cv_path_CYGWIN_PATH+set}" = set; then : $as_echo_n "(cached) " >&6 else case $CYGWIN_PATH in @@ -25324,14 +18624,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_CYGWIN_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -25339,10 +18639,10 @@ esac fi CYGWIN_PATH=$ac_cv_path_CYGWIN_PATH if test -n "$CYGWIN_PATH"; then - { $as_echo "$as_me:$LINENO: result: $CYGWIN_PATH" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_PATH" >&5 $as_echo "$CYGWIN_PATH" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -25355,7 +18655,7 @@ fi if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then - { $as_echo "$as_me:$LINENO: checking ml.exe assembler path" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking ml.exe assembler path" >&5 $as_echo_n "checking ml.exe assembler path... " >&6; } if test -n "$with_asm_home"; then with_asm_home=`cygpath -u "$with_asm_home"` @@ -25363,9 +18663,9 @@ $as_echo_n "checking ml.exe assembler path... " >&6; } if test ! -x "$with_asm_home/ml.exe"; then # Extract the first word of "ml.exe", so it can be a program name with args. set dummy ml.exe; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ML_EXE+set}" = set; then +if test "${ac_cv_path_ML_EXE+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ML_EXE in @@ -25378,14 +18678,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ML_EXE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -25393,10 +18693,10 @@ esac fi ML_EXE=$ac_cv_path_ML_EXE if test -n "$ML_EXE"; then - { $as_echo "$as_me:$LINENO: result: $ML_EXE" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ML_EXE" >&5 $as_echo "$ML_EXE" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -25404,12 +18704,10 @@ fi if test -z "$ML_EXE"; then if test -x "$with_cl_home/bin/ml.exe"; then with_asm_home=$with_cl_home/bin - { $as_echo "$as_me:$LINENO: result: found ($with_asm_home)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ($with_asm_home)" >&5 $as_echo "found ($with_asm_home)" >&6; } else - { { $as_echo "$as_me:$LINENO: error: Configure did not find ml.exe assembler." >&5 -$as_echo "$as_me: error: Configure did not find ml.exe assembler." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Configure did not find ml.exe assembler." "$LINENO" 5 fi else with_asm_home="ASM_IN_PATH" @@ -25420,7 +18718,7 @@ else fi ASM_HOME="$with_asm_home" if test -n "$ASM_HOME"; then - { $as_echo "$as_me:$LINENO: result: $ASM_HOME" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASM_HOME" >&5 $as_echo "$ASM_HOME" >&6; } fi @@ -25438,9 +18736,9 @@ if test -n "$with_zip_home" ; then else # Extract the first word of "zip", so it can be a program name with args. set dummy zip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ZIP+set}" = set; then +if test "${ac_cv_path_ZIP+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ZIP in @@ -25453,14 +18751,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -25468,19 +18766,19 @@ esac fi ZIP=$ac_cv_path_ZIP if test -n "$ZIP"; then - { $as_echo "$as_me:$LINENO: result: $ZIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5 $as_echo "$ZIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "unzip", so it can be a program name with args. set dummy unzip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_UNZIP+set}" = set; then +if test "${ac_cv_path_UNZIP+set}" = set; then : $as_echo_n "(cached) " >&6 else case $UNZIP in @@ -25493,14 +18791,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -25508,10 +18806,10 @@ esac fi UNZIP=$ac_cv_path_UNZIP if test -n "$UNZIP"; then - { $as_echo "$as_me:$LINENO: result: $UNZIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5 $as_echo "$UNZIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -25519,59 +18817,43 @@ fi ZIP_HOME=`dirname "$ZIP"` fi if test -z "$ZIP" -o -z "$UNZIP"; then - { { $as_echo "$as_me:$LINENO: error: Zip/Unzip are required to build, please install or use --with-zip-home" >&5 -$as_echo "$as_me: error: Zip/Unzip are required to build, please install or use --with-zip-home" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Zip/Unzip are required to build, please install or use --with-zip-home" "$LINENO" 5 fi if test "$_os" = "WINNT"; then if test -n "`$ZIP -h | grep -i WinNT`" ; then -{ { $as_echo "$as_me:$LINENO: error: $ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." >&5 -$as_echo "$as_me: error: $ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." >&2;} - { (exit 1); exit 1; }; } +as_fn_error "$ZIP found in the path is not the required cygwin version of Info-ZIPs zip.exe." "$LINENO" 5 fi fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking for unicows.dll" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unicows.dll" >&5 $as_echo_n "checking for unicows.dll... " >&6; } if test -x ./external/unicows/unicows.dll; then - { $as_echo "$as_me:$LINENO: result: found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else - { { $as_echo "$as_me:$LINENO: error: The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. -Get it from the Microsoft site and put it into external/unicows. -(Note: Microsoft seems to enjoy changing the exact location of this file. You -may have to search Microsoft's website.) Last time it was seen at: -." >&5 -$as_echo "$as_me: error: The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. + as_fn_error "The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. Get it from the Microsoft site and put it into external/unicows. (Note: Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.) Last time it was seen at: -." >&2;} - { (exit 1); exit 1; }; } +." "$LINENO" 5 fi fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking for dbghelp.dll" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbghelp.dll" >&5 $as_echo_n "checking for dbghelp.dll... " >&6; } if test -x ./external/dbghelp/dbghelp.dll; then - { $as_echo "$as_me:$LINENO: result: found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else - { { $as_echo "$as_me:$LINENO: error: dbghelp.dll is missing in external/dbghelp/. -Get it from the Microsoft site and put it into external/dbghelp. -(Note: Microsoft seems to enjoy changing the exact location of this file. You -may have to search Microsoft's website.) Last time it was seen at: -." >&5 -$as_echo "$as_me: error: dbghelp.dll is missing in external/dbghelp/. + as_fn_error "dbghelp.dll is missing in external/dbghelp/. Get it from the Microsoft site and put it into external/dbghelp. (Note: Microsoft seems to enjoy changing the exact location of this file. You may have to search Microsoft's website.) Last time it was seen at: -." >&2;} - { (exit 1); exit 1; }; } +." "$LINENO" 5 fi fi @@ -25579,28 +18861,21 @@ if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then if ./oowintool --msvc-copy-dlls ./external/msvcp ; then : else - { { $as_echo "$as_me:$LINENO: error: oowintool failed to copy CRT" >&5 -$as_echo "$as_me: error: oowintool failed to copy CRT" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "oowintool failed to copy CRT" "$LINENO" 5 fi fi if test "$_os" = "WINNT"; then - { $as_echo "$as_me:$LINENO: checking for gdiplus.dll" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gdiplus.dll" >&5 $as_echo_n "checking for gdiplus.dll... " >&6; } if test -x ./external/gdiplus/gdiplus.dll; then - { $as_echo "$as_me:$LINENO: result: found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else - { { $as_echo "$as_me:$LINENO: error: gdiplus.dll is missing in external/gdiplus/. -Get it from the Microsoft site and put it into external/gdiplus. -You may have to search Microsoft's website. Last time it was seen at: -." >&5 -$as_echo "$as_me: error: gdiplus.dll is missing in external/gdiplus/. + as_fn_error "gdiplus.dll is missing in external/gdiplus/. Get it from the Microsoft site and put it into external/gdiplus. You may have to search Microsoft's website. Last time it was seen at: -." >&2;} - { (exit 1); exit 1; }; } +." "$LINENO" 5 fi fi @@ -25610,10 +18885,10 @@ fi if test "$_os" = "WINNT"; then if test "$WITH_MINGWIN" = "yes" || test "$COMEX" -ge "10"; then - { $as_echo "$as_me:$LINENO: checking for instmsia.exe/instmsiw.exe" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for instmsia.exe/instmsiw.exe" >&5 $as_echo_n "checking for instmsia.exe/instmsiw.exe... " >&6; } if test -x ./external/msi/instmsia.exe -a -x ./external/msi/instmsiw.exe; then - { $as_echo "$as_me:$LINENO: result: found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } else MSIAPATH=`/bin/find "$COMPATH/../.." -iname instmsia.exe | head -n 1` @@ -25623,26 +18898,20 @@ $as_echo "found" >&6; } cp "$MSIWPATH" ./external/msi/ && chmod +x ./external/msi/instmsiw.exe && MSIWCOPY="OK" fi if test -z "$MSIACOPY" -o -z "$MSIWCOPY"; then - { { $as_echo "$as_me:$LINENO: error: instmsia.exe and/or instmsiw.exe are/is missing in the default location. -These programs are part of the Visual Studio installation and should be found in a -directory similar to: -\"c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\\" -As the automatic detection fails please copy the files to external/msi/." >&5 -$as_echo "$as_me: error: instmsia.exe and/or instmsiw.exe are/is missing in the default location. + as_fn_error "instmsia.exe and/or instmsiw.exe are/is missing in the default location. These programs are part of the Visual Studio installation and should be found in a directory similar to: \"c:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\Deployment\\MsiRedist\\\" -As the automatic detection fails please copy the files to external/msi/." >&2;} - { (exit 1); exit 1; }; } +As the automatic detection fails please copy the files to external/msi/." "$LINENO" 5 else - { $as_echo "$as_me:$LINENO: result: found and copied" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found and copied" >&5 $as_echo "found and copied" >&6; } fi fi fi fi -{ $as_echo "$as_me:$LINENO: checking which VCLplugs shall be built" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which VCLplugs shall be built" >&5 $as_echo_n "checking which VCLplugs shall be built... " >&6; } ENABLE_GTK="" if test "x$enable_gtk" = "xyes"; then @@ -25666,20 +18935,20 @@ fi if test -z "$R"; then - { $as_echo "$as_me:$LINENO: result: none" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } else - { $as_echo "$as_me:$LINENO: result: $R" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $R" >&5 $as_echo "$R" >&6; } fi ENABLE_GCONF="" -{ $as_echo "$as_me:$LINENO: checking whether to enable GConf support" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable GConf support" >&5 $as_echo_n "checking whether to enable GConf support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "OS2" -a "$enable_gconf" = "yes"; then ENABLE_GCONF="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=no @@ -25687,9 +18956,9 @@ $as_echo "yes" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -25702,14 +18971,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -25718,10 +18987,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -25736,24 +19005,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gconf-2.0 " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 " >&5 $as_echo_n "checking for gconf-2.0 ... " >&6; } if $PKG_CONFIG --exists "gconf-2.0 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5 $as_echo_n "checking GCONF_CFLAGS... " >&6; } GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 "` - { $as_echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5 $as_echo "$GCONF_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking GCONF_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5 $as_echo_n "checking GCONF_LIBS... " >&6; } GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 "` - { $as_echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5 $as_echo "$GCONF_LIBS" >&6; } else GCONF_CFLAGS="" @@ -25775,24 +19044,22 @@ $as_echo "$GCONF_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ENABLE_GNOMEVFS="" -{ $as_echo "$as_me:$LINENO: checking whether to enable GNOME VFS support" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable GNOME VFS support" >&5 $as_echo_n "checking whether to enable GNOME VFS support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then ENABLE_GNOMEVFS="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=no @@ -25800,9 +19067,9 @@ $as_echo "yes" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -25815,14 +19082,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -25831,10 +19098,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -25849,24 +19116,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gnome-vfs-2.0 >= 2.6.0 " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnome-vfs-2.0 >= 2.6.0 " >&5 $as_echo_n "checking for gnome-vfs-2.0 >= 2.6.0 ... " >&6; } if $PKG_CONFIG --exists "gnome-vfs-2.0 >= 2.6.0 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking GNOMEVFS_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNOMEVFS_CFLAGS" >&5 $as_echo_n "checking GNOMEVFS_CFLAGS... " >&6; } GNOMEVFS_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-2.0 >= 2.6.0 "` - { $as_echo "$as_me:$LINENO: result: $GNOMEVFS_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNOMEVFS_CFLAGS" >&5 $as_echo "$GNOMEVFS_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking GNOMEVFS_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GNOMEVFS_LIBS" >&5 $as_echo_n "checking GNOMEVFS_LIBS... " >&6; } GNOMEVFS_LIBS=`$PKG_CONFIG --libs "gnome-vfs-2.0 >= 2.6.0 "` - { $as_echo "$as_me:$LINENO: result: $GNOMEVFS_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNOMEVFS_LIBS" >&5 $as_echo "$GNOMEVFS_LIBS" >&6; } else GNOMEVFS_CFLAGS="" @@ -25888,9 +19155,7 @@ $as_echo "$GNOMEVFS_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi if test "$ENABLE_GCONF" != "TRUE"; then @@ -25900,9 +19165,9 @@ $as_echo "$as_me: error: Library requirements (gnome-vfs-2.0 >= 2.6.0 ) not met; if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -25915,14 +19180,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -25931,10 +19196,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -25949,24 +19214,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gconf-2.0 " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 " >&5 $as_echo_n "checking for gconf-2.0 ... " >&6; } if $PKG_CONFIG --exists "gconf-2.0 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5 $as_echo_n "checking GCONF_CFLAGS... " >&6; } GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 "` - { $as_echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5 $as_echo "$GCONF_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking GCONF_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5 $as_echo_n "checking GCONF_LIBS... " >&6; } GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 "` - { $as_echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5 $as_echo "$GCONF_LIBS" >&6; } else GCONF_CFLAGS="" @@ -25988,14 +19253,12 @@ $as_echo "$GCONF_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (gconf-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -26014,9 +19277,9 @@ if test "$test_gtk" = "yes"; then if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -26029,14 +19292,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -26045,10 +19308,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -26063,24 +19326,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " >&5 $as_echo_n "checking for gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ... " >&6; } if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5 $as_echo_n "checking GTK_CFLAGS... " >&6; } GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` - { $as_echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5 $as_echo "$GTK_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking GTK_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5 $as_echo_n "checking GTK_LIBS... " >&6; } GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 "` - { $as_echo "$as_me:$LINENO: result: $GTK_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5 $as_echo "$GTK_LIBS" >&6; } else GTK_CFLAGS="" @@ -26102,9 +19365,7 @@ $as_echo "$GTK_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&5 -$as_echo "$as_me: error: requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages" "$LINENO" 5 fi BUILD_TYPE="$BUILD_TYPE GTK" @@ -26114,11 +19375,11 @@ $as_echo "$as_me: error: requirements to build the gtk-plugin not met. Use --dis BUILD_TYPE="$BUILD_TYPE SYSTRAY_GTK" fi - { $as_echo "$as_me:$LINENO: checking whether to enable DBUS support" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable DBUS support" >&5 $as_echo_n "checking whether to enable DBUS support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then ENABLE_DBUS="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=no @@ -26126,9 +19387,9 @@ $as_echo "yes" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -26141,14 +19402,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -26157,10 +19418,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -26175,24 +19436,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for dbus-glib-1 >= 0.70 " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-glib-1 >= 0.70 " >&5 $as_echo_n "checking for dbus-glib-1 >= 0.70 ... " >&6; } if $PKG_CONFIG --exists "dbus-glib-1 >= 0.70 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5 $as_echo_n "checking DBUS_CFLAGS... " >&6; } DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= 0.70 "` - { $as_echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5 $as_echo "$DBUS_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking DBUS_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5 $as_echo_n "checking DBUS_LIBS... " >&6; } DBUS_LIBS=`$PKG_CONFIG --libs "dbus-glib-1 >= 0.70 "` - { $as_echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5 $as_echo "$DBUS_LIBS" >&6; } else DBUS_CFLAGS="" @@ -26214,26 +19475,22 @@ $as_echo "$DBUS_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (dbus-glib-1 >= 0.70 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (dbus-glib-1 >= 0.70 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (dbus-glib-1 >= 0.70 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - { $as_echo "$as_me:$LINENO: checking whether to enable GIO support" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable GIO support" >&5 $as_echo_n "checking whether to enable GIO support... " >&6; } if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then if test "$ENABLE_GNOMEVFS" = "TRUE" ; then - { { $as_echo "$as_me:$LINENO: error: please use --enable-gio only together with --disable-gnome-vfs." >&5 -$as_echo "$as_me: error: please use --enable-gio only together with --disable-gnome-vfs." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "please use --enable-gio only together with --disable-gnome-vfs." "$LINENO" 5 fi ENABLE_GIO="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=no @@ -26241,9 +19498,9 @@ $as_echo "yes" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -26256,14 +19513,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -26272,10 +19529,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -26290,24 +19547,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gio-2.0 " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 " >&5 $as_echo_n "checking for gio-2.0 ... " >&6; } if $PKG_CONFIG --exists "gio-2.0 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking GIO_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GIO_CFLAGS" >&5 $as_echo_n "checking GIO_CFLAGS... " >&6; } GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 "` - { $as_echo "$as_me:$LINENO: result: $GIO_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIO_CFLAGS" >&5 $as_echo "$GIO_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking GIO_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GIO_LIBS" >&5 $as_echo_n "checking GIO_LIBS... " >&6; } GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 "` - { $as_echo "$as_me:$LINENO: result: $GIO_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIO_LIBS" >&5 $as_echo "$GIO_LIBS" >&6; } else GIO_CFLAGS="" @@ -26329,13 +19586,11 @@ $as_echo "$GIO_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (gio-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (gio-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (gio-2.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -26355,17 +19610,17 @@ SYSTEM_CAIRO="" if test "$test_cairo" = "yes"; then - { $as_echo "$as_me:$LINENO: checking whether to use cairo" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use cairo" >&5 $as_echo_n "checking whether to use cairo... " >&6; } if test "x$enable_cairo" != "xno" ; then ENABLE_CAIRO="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - { $as_echo "$as_me:$LINENO: checking which cairo to use" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which cairo to use" >&5 $as_echo_n "checking which cairo to use... " >&6; } if test -n "$with_system_cairo" -o -n "$with_system_libs" && \ test "$with_system_cairo" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_CAIRO=YES @@ -26375,9 +19630,9 @@ $as_echo "external" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -26390,14 +19645,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -26406,10 +19661,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -26424,24 +19679,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for cairo >= 1.0.2 " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cairo >= 1.0.2 " >&5 $as_echo_n "checking for cairo >= 1.0.2 ... " >&6; } if $PKG_CONFIG --exists "cairo >= 1.0.2 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking CAIRO_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking CAIRO_CFLAGS" >&5 $as_echo_n "checking CAIRO_CFLAGS... " >&6; } CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.0.2 "` - { $as_echo "$as_me:$LINENO: result: $CAIRO_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAIRO_CFLAGS" >&5 $as_echo "$CAIRO_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking CAIRO_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking CAIRO_LIBS" >&5 $as_echo_n "checking CAIRO_LIBS... " >&6; } CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= 1.0.2 "` - { $as_echo "$as_me:$LINENO: result: $CAIRO_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAIRO_LIBS" >&5 $as_echo "$CAIRO_LIBS" >&6; } else CAIRO_CFLAGS="" @@ -26463,33 +19718,22 @@ $as_echo "$CAIRO_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (cairo >= 1.0.2 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then - { { $as_echo "$as_me:$LINENO: error: Cairo library requires fontconfig." >&5 -$as_echo "$as_me: error: Cairo library requires fontconfig." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Cairo library requires fontconfig." "$LINENO" 5 fi if test "$with_system_xrender_headers" = "yes"; then - { $as_echo "$as_me:$LINENO: checking whether Xrender.h defines PictStandardA8" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Xrender.h defines PictStandardA8" >&5 $as_echo_n "checking whether Xrender.h defines PictStandardA8... " >&6; } - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +as_fn_error "cannot run test program while cross compiling +See \`config.log' for more details." "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -26503,56 +19747,27 @@ int main(int argc, char **argv) { } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { $as_echo "$as_me:$LINENO: error: no, X headers too old." >&5 -$as_echo "$as_me: error: no, X headers too old." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no, X headers too old." "$LINENO" 5 fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi else BUILD_TYPE="$BUILD_TYPE CAIRO" if test "$build_cpu" != "x86_64"; then BUILD_PIXMAN=YES fi - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi @@ -26564,162 +19779,29 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether to build the OpenGL Transitions component" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the OpenGL Transitions component" >&5 $as_echo_n "checking whether to build the OpenGL Transitions component... " >&6; } ENABLE_OPENGL= if test "x$enable_opengl" != "xno" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - if test "${ac_cv_header_GL_gl_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5 -$as_echo_n "checking for GL/gl.h... " >&6; } -if test "${ac_cv_header_GL_gl_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5 -$as_echo "$ac_cv_header_GL_gl_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking GL/gl.h usability" >&5 -$as_echo_n "checking GL/gl.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking GL/gl.h presence" >&5 -$as_echo_n "checking GL/gl.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi + ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default" +if test "x$ac_cv_header_GL_gl_h" = x""yes; then : -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for GL/gl.h" >&5 -$as_echo_n "checking for GL/gl.h... " >&6; } -if test "${ac_cv_header_GL_gl_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_GL_gl_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5 -$as_echo "$ac_cv_header_GL_gl_h" >&6; } - -fi -if test "x$ac_cv_header_GL_gl_h" = x""yes; then - : else - { { $as_echo "$as_me:$LINENO: error: OpenGL headers not found" >&5 -$as_echo "$as_me: error: OpenGL headers not found" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "OpenGL headers not found" "$LINENO" 5 fi - -{ $as_echo "$as_me:$LINENO: checking for main in -lGL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lGL" >&5 $as_echo_n "checking for main in -lGL... " >&6; } -if test "${ac_cv_lib_GL_main+set}" = set; then +if test "${ac_cv_lib_GL_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lGL $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -26731,43 +19813,18 @@ return main (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_GL_main=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_GL_main=no + ac_cv_lib_GL_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_main" >&5 $as_echo "$ac_cv_lib_GL_main" >&6; } -if test "x$ac_cv_lib_GL_main" = x""yes; then +if test "x$ac_cv_lib_GL_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGL 1 _ACEOF @@ -26775,24 +19832,17 @@ _ACEOF LIBS="-lGL $LIBS" else - { { $as_echo "$as_me:$LINENO: error: libGL not installed or functional" >&5 -$as_echo "$as_me: error: libGL not installed or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libGL not installed or functional" "$LINENO" 5 fi - -{ $as_echo "$as_me:$LINENO: checking for main in -lGLU" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lGLU" >&5 $as_echo_n "checking for main in -lGLU... " >&6; } -if test "${ac_cv_lib_GLU_main+set}" = set; then +if test "${ac_cv_lib_GLU_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lGLU $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -26804,43 +19854,18 @@ return main (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_GLU_main=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_GLU_main=no + ac_cv_lib_GLU_main=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_main" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GLU_main" >&5 $as_echo "$ac_cv_lib_GLU_main" >&6; } -if test "x$ac_cv_lib_GLU_main" = x""yes; then +if test "x$ac_cv_lib_GLU_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGLU 1 _ACEOF @@ -26848,57 +19873,55 @@ _ACEOF LIBS="-lGLU $LIBS" else - { { $as_echo "$as_me:$LINENO: error: libGLU not installed or functional" >&5 -$as_echo "$as_me: error: libGLU not installed or functional" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libGLU not installed or functional" "$LINENO" 5 fi ENABLE_OPENGL=TRUE else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to build the Presentation Minimizer extension" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the Presentation Minimizer extension" >&5 $as_echo_n "checking whether to build the Presentation Minimizer extension... " >&6; } if test -n "$enable_minimizer" -a "$enable_minimizer" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ENABLE_MINIMIZER=YES else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ENABLE_MINIMIZER=NO fi -{ $as_echo "$as_me:$LINENO: checking whether to build the Presenter Screen extension" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the Presenter Screen extension" >&5 $as_echo_n "checking whether to build the Presenter Screen extension... " >&6; } if test -n "$enable_presenter_console" -a "$enable_presenter_screen" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ENABLE_PRESENTER_SCREEN=YES else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ENABLE_PRESENTER_SCREEN=NO fi -{ $as_echo "$as_me:$LINENO: checking whether to build the PDF Import extension" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the PDF Import extension" >&5 $as_echo_n "checking whether to build the PDF Import extension... " >&6; } if test -n "$enable_pdfimport" -a "$enable_pdfimport" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ENABLE_PDFIMPORT=YES - { $as_echo "$as_me:$LINENO: checking which pdf backend to use" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which pdf backend to use" >&5 $as_echo_n "checking which pdf backend to use... " >&6; } if test -n "$with_system_poppler" -o -n "$with_system_libs" && \ test "$with_system_poppler" != "no"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_POPPLER=YES @@ -26907,9 +19930,9 @@ $as_echo "external" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -26922,14 +19945,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -26938,10 +19961,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -26956,24 +19979,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for poppler >= 0.8.0 " >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for poppler >= 0.8.0 " >&5 $as_echo_n "checking for poppler >= 0.8.0 ... " >&6; } if $PKG_CONFIG --exists "poppler >= 0.8.0 " ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking POPPLER_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking POPPLER_CFLAGS" >&5 $as_echo_n "checking POPPLER_CFLAGS... " >&6; } POPPLER_CFLAGS=`$PKG_CONFIG --cflags "poppler >= 0.8.0 "` - { $as_echo "$as_me:$LINENO: result: $POPPLER_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POPPLER_CFLAGS" >&5 $as_echo "$POPPLER_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking POPPLER_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking POPPLER_LIBS" >&5 $as_echo_n "checking POPPLER_LIBS... " >&6; } POPPLER_LIBS=`$PKG_CONFIG --libs "poppler >= 0.8.0 "` - { $as_echo "$as_me:$LINENO: result: $POPPLER_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POPPLER_LIBS" >&5 $as_echo "$POPPLER_LIBS" >&6; } else POPPLER_CFLAGS="" @@ -26995,29 +20018,25 @@ $as_echo "$POPPLER_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (poppler >= 0.8.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_POPPLER=NO BUILD_TYPE="$BUILD_TYPE XPDF" - { $as_echo "$as_me:$LINENO: checking for xpdf module" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xpdf module" >&5 $as_echo_n "checking for xpdf module... " >&6; } if test -d ./xpdf; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 $as_echo "OK" >&6; } else - { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 fi fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ENABLE_PDFIMPORT=NO fi @@ -27027,85 +20046,75 @@ fi if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then - { $as_echo "$as_me:$LINENO: checking for sdext module" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdext module" >&5 $as_echo_n "checking for sdext module... " >&6; } if test -d ./sdext; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 $as_echo "OK" >&6; } else - { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 fi BUILD_TYPE="$BUILD_TYPE SDEXT" fi -{ $as_echo "$as_me:$LINENO: checking whether to build the Wiki Publisher extension" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the Wiki Publisher extension" >&5 $as_echo_n "checking whether to build the Wiki Publisher extension... " >&6; } if test -n "$enable_wiki_publisher" -a "$enable_wiki_publisher" != "no" && test "$WITH_JAVA" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - { $as_echo "$as_me:$LINENO: checking for swext module" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for swext module" >&5 $as_echo_n "checking for swext module... " >&6; } if test -d ./swext; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 $as_echo "OK" >&6; } else - { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 fi ENABLE_MEDIAWIKI=YES BUILD_TYPE="$BUILD_TYPE SWEXT" else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ENABLE_MEDIAWIKI=NO fi if test "$ENABLE_MEDIAWIKI" == "YES"; then - { $as_echo "$as_me:$LINENO: checking which Servlet API Jar to use" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which Servlet API Jar to use" >&5 $as_echo_n "checking which Servlet API Jar to use... " >&6; } if test -n "$with_system_servlet_api"; then - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } SYSTEM_SERVLETAPI=YES if test -z "$SERVLETAPI_JAR"; then SERVLETAPI_JAR=/usr/share/java/servlet-api.jar fi as_ac_File=`$as_echo "ac_cv_file_$SERVLETAPI_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $SERVLETAPI_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SERVLETAPI_JAR" >&5 $as_echo_n "checking for $SERVLETAPI_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$SERVLETAPI_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: servlet-api.jar not found." >&5 -$as_echo "$as_me: error: servlet-api.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "servlet-api.jar not found." "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_SERVLETAPI=NO BUILD_TYPE="$BUILD_TYPE TOMCAT" @@ -27114,107 +20123,93 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether to build the Report Builder extension" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the Report Builder extension" >&5 $as_echo_n "checking whether to build the Report Builder extension... " >&6; } if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test "$WITH_JAVA" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ENABLE_REPORTBUILDER=YES - { $as_echo "$as_me:$LINENO: checking for reportbuilder module" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for reportbuilder module" >&5 $as_echo_n "checking for reportbuilder module... " >&6; } if test -d ./reportbuilder; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 $as_echo "OK" >&6; } else - { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking which jfreereport libs to use" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which jfreereport libs to use" >&5 $as_echo_n "checking which jfreereport libs to use... " >&6; } if test "$with_system_jfreereport" == "yes"; then SYSTEM_JFREEREPORT=YES - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } if test -z $SAC_JAR; then SAC_JAR=/usr/share/java/sac.jar fi as_ac_File=`$as_echo "ac_cv_file_$SAC_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $SAC_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $SAC_JAR" >&5 $as_echo_n "checking for $SAC_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$SAC_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: sac.jar not found." >&5 -$as_echo "$as_me: error: sac.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "sac.jar not found." "$LINENO" 5 fi if test -z $LIBXML_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libxml-1.0.0.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/libxml-1.0.0.jar" >&5 $as_echo_n "checking for /usr/share/java/libxml-1.0.0.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_libxml_1_0_0_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_libxml_1_0_0_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/libxml-1.0.0.jar"; then ac_cv_file__usr_share_java_libxml_1_0_0_jar=yes else ac_cv_file__usr_share_java_libxml_1_0_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libxml_1_0_0_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_libxml_1_0_0_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_libxml_1_0_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libxml_1_0_0_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_libxml_1_0_0_jar" = x""yes; then : LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libxml.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/libxml.jar" >&5 $as_echo_n "checking for /usr/share/java/libxml.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_libxml_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_libxml_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/libxml.jar"; then ac_cv_file__usr_share_java_libxml_jar=yes else ac_cv_file__usr_share_java_libxml_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libxml_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_libxml_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_libxml_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libxml_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_libxml_jar" = x""yes; then : LIBXML_JAR=/usr/share/java/libxml.jar else - { { $as_echo "$as_me:$LINENO: error: libxml.jar replacement not found." >&5 -$as_echo "$as_me: error: libxml.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libxml.jar replacement not found." "$LINENO" 5 fi @@ -27224,82 +20219,70 @@ fi else as_ac_File=`$as_echo "ac_cv_file_$LIBXML_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBXML_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBXML_JAR" >&5 $as_echo_n "checking for $LIBXML_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBXML_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: libxml.jar not found." >&5 -$as_echo "$as_me: error: libxml.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libxml.jar not found." "$LINENO" 5 fi fi if test -z $FLUTE_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/flute-1.3.0.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/flute-1.3.0.jar" >&5 $as_echo_n "checking for /usr/share/java/flute-1.3.0.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_flute_1_3_0_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_flute_1_3_0_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/flute-1.3.0.jar"; then ac_cv_file__usr_share_java_flute_1_3_0_jar=yes else ac_cv_file__usr_share_java_flute_1_3_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flute_1_3_0_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_flute_1_3_0_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_flute_1_3_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_flute_1_3_0_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_flute_1_3_0_jar" = x""yes; then : FLUTE_JAR=/usr/share/java/flute-1.3.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/flute.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/flute.jar" >&5 $as_echo_n "checking for /usr/share/java/flute.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_flute_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_flute_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/flute.jar"; then ac_cv_file__usr_share_java_flute_jar=yes else ac_cv_file__usr_share_java_flute_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flute_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_flute_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_flute_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_flute_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_flute_jar" = x""yes; then : FLUTE_JAR=/usr/share/java/flute.jar else - { { $as_echo "$as_me:$LINENO: error: flute-1.3.0.jar replacement not found." >&5 -$as_echo "$as_me: error: flute-1.3.0.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "flute-1.3.0.jar replacement not found." "$LINENO" 5 fi @@ -27309,82 +20292,70 @@ fi else as_ac_File=`$as_echo "ac_cv_file_$FLUTE_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $FLUTE_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FLUTE_JAR" >&5 $as_echo_n "checking for $FLUTE_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$FLUTE_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: flute-1.3.0.jar not found." >&5 -$as_echo "$as_me: error: flute-1.3.0.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "flute-1.3.0.jar not found." "$LINENO" 5 fi fi if test -z $JFREEREPORT_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/flow-engine-0.9.2.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/flow-engine-0.9.2.jar" >&5 $as_echo_n "checking for /usr/share/java/flow-engine-0.9.2.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_flow_engine_0_9_2_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_flow_engine_0_9_2_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/flow-engine-0.9.2.jar"; then ac_cv_file__usr_share_java_flow_engine_0_9_2_jar=yes else ac_cv_file__usr_share_java_flow_engine_0_9_2_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_flow_engine_0_9_2_jar" = x""yes; then : JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/flow-engine.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/flow-engine.jar" >&5 $as_echo_n "checking for /usr/share/java/flow-engine.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_flow_engine_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_flow_engine_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/flow-engine.jar"; then ac_cv_file__usr_share_java_flow_engine_jar=yes else ac_cv_file__usr_share_java_flow_engine_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_flow_engine_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_flow_engine_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_flow_engine_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_flow_engine_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_flow_engine_jar" = x""yes; then : JFREEREPORT_JAR=/usr/share/java/flow-engine.jar else - { { $as_echo "$as_me:$LINENO: error: jfreereport.jar replacement not found." >&5 -$as_echo "$as_me: error: jfreereport.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "jfreereport.jar replacement not found." "$LINENO" 5 fi @@ -27394,82 +20365,70 @@ fi else as_ac_File=`$as_echo "ac_cv_file_$JFREEREPORT_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $JFREEREPORT_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $JFREEREPORT_JAR" >&5 $as_echo_n "checking for $JFREEREPORT_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$JFREEREPORT_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: jfreereport.jar not found." >&5 -$as_echo "$as_me: error: jfreereport.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "jfreereport.jar not found." "$LINENO" 5 fi fi if test -z $LIBLAYOUT_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/liblayout-0.2.9.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/liblayout-0.2.9.jar" >&5 $as_echo_n "checking for /usr/share/java/liblayout-0.2.9.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_liblayout_0_2_9_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_liblayout_0_2_9_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/liblayout-0.2.9.jar"; then ac_cv_file__usr_share_java_liblayout_0_2_9_jar=yes else ac_cv_file__usr_share_java_liblayout_0_2_9_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_liblayout_0_2_9_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_liblayout_0_2_9_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_liblayout_0_2_9_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_liblayout_0_2_9_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_liblayout_0_2_9_jar" = x""yes; then : LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/liblayout.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/liblayout.jar" >&5 $as_echo_n "checking for /usr/share/java/liblayout.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_liblayout_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_liblayout_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/liblayout.jar"; then ac_cv_file__usr_share_java_liblayout_jar=yes else ac_cv_file__usr_share_java_liblayout_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_liblayout_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_liblayout_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_liblayout_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_liblayout_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_liblayout_jar" = x""yes; then : LIBLAYOUT_JAR=/usr/share/java/liblayout.jar else - { { $as_echo "$as_me:$LINENO: error: liblayout.jar replacement not found." >&5 -$as_echo "$as_me: error: liblayout.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "liblayout.jar replacement not found." "$LINENO" 5 fi @@ -27479,82 +20438,70 @@ fi else as_ac_File=`$as_echo "ac_cv_file_$LIBLAYOUT_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBLAYOUT_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBLAYOUT_JAR" >&5 $as_echo_n "checking for $LIBLAYOUT_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBLAYOUT_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: liblayout.jar not found." >&5 -$as_echo "$as_me: error: liblayout.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "liblayout.jar not found." "$LINENO" 5 fi fi if test -z $LIBLOADER_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libloader-1.0.0.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/libloader-1.0.0.jar" >&5 $as_echo_n "checking for /usr/share/java/libloader-1.0.0.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_libloader_1_0_0_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_libloader_1_0_0_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/libloader-1.0.0.jar"; then ac_cv_file__usr_share_java_libloader_1_0_0_jar=yes else ac_cv_file__usr_share_java_libloader_1_0_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libloader_1_0_0_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_libloader_1_0_0_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_libloader_1_0_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libloader_1_0_0_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_libloader_1_0_0_jar" = x""yes; then : LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libloader.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/libloader.jar" >&5 $as_echo_n "checking for /usr/share/java/libloader.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_libloader_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_libloader_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/libloader.jar"; then ac_cv_file__usr_share_java_libloader_jar=yes else ac_cv_file__usr_share_java_libloader_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libloader_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_libloader_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_libloader_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libloader_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_libloader_jar" = x""yes; then : LIBLOADER_JAR=/usr/share/java/libloader.jar else - { { $as_echo "$as_me:$LINENO: error: libloader.jar replacement not found." >&5 -$as_echo "$as_me: error: libloader.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libloader.jar replacement not found." "$LINENO" 5 fi @@ -27564,82 +20511,70 @@ fi else as_ac_File=`$as_echo "ac_cv_file_$LIBLOADER_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBLOADER_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBLOADER_JAR" >&5 $as_echo_n "checking for $LIBLOADER_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBLOADER_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: libloader.jar not found." >&5 -$as_echo "$as_me: error: libloader.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libloader.jar not found." "$LINENO" 5 fi fi if test -z $LIBFORMULA_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libformula-0.2.0.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/libformula-0.2.0.jar" >&5 $as_echo_n "checking for /usr/share/java/libformula-0.2.0.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_libformula_0_2_0_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_libformula_0_2_0_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/libformula-0.2.0.jar"; then ac_cv_file__usr_share_java_libformula_0_2_0_jar=yes else ac_cv_file__usr_share_java_libformula_0_2_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libformula_0_2_0_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_libformula_0_2_0_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_libformula_0_2_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libformula_0_2_0_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_libformula_0_2_0_jar" = x""yes; then : LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libformula.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/libformula.jar" >&5 $as_echo_n "checking for /usr/share/java/libformula.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_libformula_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_libformula_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/libformula.jar"; then ac_cv_file__usr_share_java_libformula_jar=yes else ac_cv_file__usr_share_java_libformula_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libformula_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_libformula_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_libformula_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libformula_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_libformula_jar" = x""yes; then : LIBFORMULA_JAR=/usr/share/java/libformula.jar else - { { $as_echo "$as_me:$LINENO: error: libformula.jar replacement not found." >&5 -$as_echo "$as_me: error: libformula.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libformula.jar replacement not found." "$LINENO" 5 fi @@ -27649,82 +20584,70 @@ fi else as_ac_File=`$as_echo "ac_cv_file_$LIBFORMULA_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBFORMULA_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBFORMULA_JAR" >&5 $as_echo_n "checking for $LIBFORMULA_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBFORMULA_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: libformula.jar not found." >&5 -$as_echo "$as_me: error: libformula.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libformula.jar not found." "$LINENO" 5 fi fi if test -z $LIBREPOSITORY_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/librepository-1.0.0.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/librepository-1.0.0.jar" >&5 $as_echo_n "checking for /usr/share/java/librepository-1.0.0.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_librepository_1_0_0_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_librepository_1_0_0_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/librepository-1.0.0.jar"; then ac_cv_file__usr_share_java_librepository_1_0_0_jar=yes else ac_cv_file__usr_share_java_librepository_1_0_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_librepository_1_0_0_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_librepository_1_0_0_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_librepository_1_0_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_librepository_1_0_0_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_librepository_1_0_0_jar" = x""yes; then : LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/librepository.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/librepository.jar" >&5 $as_echo_n "checking for /usr/share/java/librepository.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_librepository_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_librepository_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/librepository.jar"; then ac_cv_file__usr_share_java_librepository_jar=yes else ac_cv_file__usr_share_java_librepository_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_librepository_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_librepository_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_librepository_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_librepository_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_librepository_jar" = x""yes; then : LIBREPOSITORY_JAR=/usr/share/java/librepository.jar else - { { $as_echo "$as_me:$LINENO: error: librepository.jar replacement not found." >&5 -$as_echo "$as_me: error: librepository.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "librepository.jar replacement not found." "$LINENO" 5 fi @@ -27734,82 +20657,70 @@ fi else as_ac_File=`$as_echo "ac_cv_file_$LIBREPOSITORY_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBREPOSITORY_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBREPOSITORY_JAR" >&5 $as_echo_n "checking for $LIBREPOSITORY_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBREPOSITORY_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: librepository.jar not found." >&5 -$as_echo "$as_me: error: librepository.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "librepository.jar not found." "$LINENO" 5 fi fi if test -z $LIBFONTS_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libfonts-1.0.0.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/libfonts-1.0.0.jar" >&5 $as_echo_n "checking for /usr/share/java/libfonts-1.0.0.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_libfonts_1_0_0_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_libfonts_1_0_0_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/libfonts-1.0.0.jar"; then ac_cv_file__usr_share_java_libfonts_1_0_0_jar=yes else ac_cv_file__usr_share_java_libfonts_1_0_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libfonts_1_0_0_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_libfonts_1_0_0_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_libfonts_1_0_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libfonts_1_0_0_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_libfonts_1_0_0_jar" = x""yes; then : LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libfonts.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/libfonts.jar" >&5 $as_echo_n "checking for /usr/share/java/libfonts.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_libfonts_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_libfonts_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/libfonts.jar"; then ac_cv_file__usr_share_java_libfonts_jar=yes else ac_cv_file__usr_share_java_libfonts_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libfonts_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_libfonts_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_libfonts_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libfonts_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_libfonts_jar" = x""yes; then : LIBFONTS_JAR=/usr/share/java/libfonts.jar else - { { $as_echo "$as_me:$LINENO: error: libfonts.jar replacement not found." >&5 -$as_echo "$as_me: error: libfonts.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libfonts.jar replacement not found." "$LINENO" 5 fi @@ -27819,82 +20730,70 @@ fi else as_ac_File=`$as_echo "ac_cv_file_$LIBFONTS_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBFONTS_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBFONTS_JAR" >&5 $as_echo_n "checking for $LIBFONTS_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBFONTS_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: libfonts.jar not found." >&5 -$as_echo "$as_me: error: libfonts.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libfonts.jar not found." "$LINENO" 5 fi fi if test -z $LIBSERIALIZER_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libserializer-1.0.0.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/libserializer-1.0.0.jar" >&5 $as_echo_n "checking for /usr/share/java/libserializer-1.0.0.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_libserializer_1_0_0_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_libserializer_1_0_0_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/libserializer-1.0.0.jar"; then ac_cv_file__usr_share_java_libserializer_1_0_0_jar=yes else ac_cv_file__usr_share_java_libserializer_1_0_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libserializer_1_0_0_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_libserializer_1_0_0_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_libserializer_1_0_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libserializer_1_0_0_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_libserializer_1_0_0_jar" = x""yes; then : LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libserializer.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/libserializer.jar" >&5 $as_echo_n "checking for /usr/share/java/libserializer.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_libserializer_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_libserializer_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/libserializer.jar"; then ac_cv_file__usr_share_java_libserializer_jar=yes else ac_cv_file__usr_share_java_libserializer_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libserializer_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_libserializer_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_libserializer_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libserializer_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_libserializer_jar" = x""yes; then : LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar else - { { $as_echo "$as_me:$LINENO: error: libserializer.jar replacement not found." >&5 -$as_echo "$as_me: error: libserializer.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libserializer.jar replacement not found." "$LINENO" 5 fi @@ -27904,83 +20803,71 @@ fi else as_ac_File=`$as_echo "ac_cv_file_$LIBSERIALIZER_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBSERIALIZER_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBSERIALIZER_JAR" >&5 $as_echo_n "checking for $LIBSERIALIZER_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBSERIALIZER_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: libserializer.jar not found." >&5 -$as_echo "$as_me: error: libserializer.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libserializer.jar not found." "$LINENO" 5 fi fi if test -z $LIBBASE_JAR; then - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libbase-1.0.0.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/libbase-1.0.0.jar" >&5 $as_echo_n "checking for /usr/share/java/libbase-1.0.0.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_libbase_1_0_0_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_libbase_1_0_0_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/libbase-1.0.0.jar"; then ac_cv_file__usr_share_java_libbase_1_0_0_jar=yes else ac_cv_file__usr_share_java_libbase_1_0_0_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libbase_1_0_0_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_libbase_1_0_0_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_libbase_1_0_0_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libbase_1_0_0_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_libbase_1_0_0_jar" = x""yes; then : LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar else - { $as_echo "$as_me:$LINENO: checking for /usr/share/java/libbase.jar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/java/libbase.jar" >&5 $as_echo_n "checking for /usr/share/java/libbase.jar... " >&6; } -if test "${ac_cv_file__usr_share_java_libbase_jar+set}" = set; then +if test "${ac_cv_file__usr_share_java_libbase_jar+set}" = set; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/java/libbase.jar"; then ac_cv_file__usr_share_java_libbase_jar=yes else ac_cv_file__usr_share_java_libbase_jar=no fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_libbase_jar" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_java_libbase_jar" >&5 $as_echo "$ac_cv_file__usr_share_java_libbase_jar" >&6; } -if test "x$ac_cv_file__usr_share_java_libbase_jar" = x""yes; then +if test "x$ac_cv_file__usr_share_java_libbase_jar" = x""yes; then : LIBBASE_JAR=/usr/share/java/libbase.jar else - { { $as_echo "$as_me:$LINENO: error: libbase.jar replacement not found." >&5 -$as_echo "$as_me: error: libbase.jar replacement not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libbase.jar replacement not found." "$LINENO" 5 fi @@ -27990,56 +20877,48 @@ fi else as_ac_File=`$as_echo "ac_cv_file_$LIBBASE_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $LIBBASE_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LIBBASE_JAR" >&5 $as_echo_n "checking for $LIBBASE_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$LIBBASE_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: libbase.jar not found." >&5 -$as_echo "$as_me: error: libbase.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "libbase.jar not found." "$LINENO" 5 fi fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } - { $as_echo "$as_me:$LINENO: checking for jfreereport module" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jfreereport module" >&5 $as_echo_n "checking for jfreereport module... " >&6; } if test -d ./jfreereport; then - { $as_echo "$as_me:$LINENO: result: OK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 $as_echo "OK" >&6; } else - { { $as_echo "$as_me:$LINENO: error: not existing. get it (did you get the -extensions tarball?)" >&5 -$as_echo "$as_me: error: not existing. get it (did you get the -extensions tarball?)" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "not existing. get it (did you get the -extensions tarball?)" "$LINENO" 5 fi SYSTEM_JFREEREPORT=NO BUILD_TYPE="$BUILD_TYPE JFREEREPORT" fi BUILD_TYPE="$BUILD_TYPE REPORTBUILDER" else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ENABLE_REPORTBUILDER=NO SYSTEM_JFREEREPORT=NO @@ -28061,110 +20940,92 @@ fi # this has to be here because both the wiki publisher and the SRB use # commons-logging if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then - { $as_echo "$as_me:$LINENO: checking which Apache commons-* libs to use" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which Apache commons-* libs to use" >&5 $as_echo_n "checking which Apache commons-* libs to use... " >&6; } if test "$with_system_apache_commons" = "yes"; then SYSTEM_APACHE_COMMONS=YES - { $as_echo "$as_me:$LINENO: result: external" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: external" >&5 $as_echo "external" >&6; } if test "$ENABLE_MEDIAWIKI" = "YES"; then if test -z "$COMMONS_CODEC_JAR"; then COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar fi as_ac_File=`$as_echo "ac_cv_file_$COMMONS_CODEC_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $COMMONS_CODEC_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $COMMONS_CODEC_JAR" >&5 $as_echo_n "checking for $COMMONS_CODEC_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$COMMONS_CODEC_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: commons-codec.jar not found." >&5 -$as_echo "$as_me: error: commons-codec.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "commons-codec.jar not found." "$LINENO" 5 fi if test -z "$COMMONS_LANG_JAR"; then COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar fi as_ac_File=`$as_echo "ac_cv_file_$COMMONS_LANG_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $COMMONS_LANG_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $COMMONS_LANG_JAR" >&5 $as_echo_n "checking for $COMMONS_LANG_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$COMMONS_LANG_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: commons-lang.jar not found." >&5 -$as_echo "$as_me: error: commons-lang.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "commons-lang.jar not found." "$LINENO" 5 fi if test -z "$COMMONS_HTTPCLIENT_JAR"; then COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar fi as_ac_File=`$as_echo "ac_cv_file_$COMMONS_HTTPCLIENT_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $COMMONS_HTTPCLIENT_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $COMMONS_HTTPCLIENT_JAR" >&5 $as_echo_n "checking for $COMMONS_HTTPCLIENT_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$COMMONS_HTTPCLIENT_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: commons-httpclient.jar not found." >&5 -$as_echo "$as_me: error: commons-httpclient.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "commons-httpclient.jar not found." "$LINENO" 5 fi fi @@ -28173,39 +21034,33 @@ fi COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar fi as_ac_File=`$as_echo "ac_cv_file_$COMMONS_LOGGING_JAR" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $COMMONS_LOGGING_JAR" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $COMMONS_LOGGING_JAR" >&5 $as_echo_n "checking for $COMMONS_LOGGING_JAR... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$COMMONS_LOGGING_JAR"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +eval ac_res=\$$as_ac_File + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - : +eval as_val=\$$as_ac_File + if test "x$as_val" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: commons-logging.jar not found." >&5 -$as_echo "$as_me: error: commons-logging.jar not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "commons-logging.jar not found." "$LINENO" 5 fi fi else - { $as_echo "$as_me:$LINENO: result: internal" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: internal" >&5 $as_echo "internal" >&6; } SYSTEM_APACHE_COMMONS=NO BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT" @@ -28258,7 +21113,7 @@ if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then kde_test_include="ksharedptr.h" kde_test_library="libkdeui.so" - { $as_echo "$as_me:$LINENO: checking for Qt headers" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt headers" >&5 $as_echo_n "checking for Qt headers... " >&6; } qt_incdir="no" for kde_check in $qt_incdirs ; do @@ -28267,17 +21122,14 @@ $as_echo_n "checking for Qt headers... " >&6; } break fi done - { $as_echo "$as_me:$LINENO: result: $qt_incdir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $qt_incdir" >&5 $as_echo "$qt_incdir" >&6; } if test "x$qt_incdir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: Qt headers not found. Please specify the root of -your Qt installation by exporting QTDIR before running \"configure\"." >&5 -$as_echo "$as_me: error: Qt headers not found. Please specify the root of -your Qt installation by exporting QTDIR before running \"configure\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Qt headers not found. Please specify the root of +your Qt installation by exporting QTDIR before running \"configure\"." "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking for Qt libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt libraries" >&5 $as_echo_n "checking for Qt libraries... " >&6; } qt_libdir="no" for qt_check in $qt_libdirs ; do @@ -28286,21 +21138,18 @@ $as_echo_n "checking for Qt libraries... " >&6; } break fi done - { $as_echo "$as_me:$LINENO: result: $qt_libdir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $qt_libdir" >&5 $as_echo "$qt_libdir" >&6; } if test "x$qt_libdir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: Qt libraries not found. Please specify the root of -your Qt installation by exporting QTDIR before running \"configure\"." >&5 -$as_echo "$as_me: error: Qt libraries not found. Please specify the root of -your Qt installation by exporting QTDIR before running \"configure\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Qt libraries not found. Please specify the root of +your Qt installation by exporting QTDIR before running \"configure\"." "$LINENO" 5 fi # Extract the first word of "moc", so it can be a program name with args. set dummy moc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MOC+set}" = set; then +if test "${ac_cv_path_MOC+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MOC in @@ -28314,14 +21163,14 @@ for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MOC="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_MOC" && ac_cv_path_MOC="no" @@ -28330,23 +21179,20 @@ esac fi MOC=$ac_cv_path_MOC if test -n "$MOC"; then - { $as_echo "$as_me:$LINENO: result: $MOC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC" >&5 $as_echo "$MOC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MOC" = "no" ; then - { { $as_echo "$as_me:$LINENO: error: Qt Meta Object Compiler not found. Please specify -the root of your Qt installation by exporting QTDIR before running \"configure\"." >&5 -$as_echo "$as_me: error: Qt Meta Object Compiler not found. Please specify -the root of your Qt installation by exporting QTDIR before running \"configure\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Qt Meta Object Compiler not found. Please specify +the root of your Qt installation by exporting QTDIR before running \"configure\"." "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking for KDE headers" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for KDE headers" >&5 $as_echo_n "checking for KDE headers... " >&6; } kde_incdir="no" for kde_check in $kde_incdirs ; do @@ -28355,17 +21201,14 @@ $as_echo_n "checking for KDE headers... " >&6; } break fi done - { $as_echo "$as_me:$LINENO: result: $kde_incdir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kde_incdir" >&5 $as_echo "$kde_incdir" >&6; } if test "x$kde_incdir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: KDE headers not found. Please specify the root of -your KDE installation by exporting KDEDIR before running \"configure\"." >&5 -$as_echo "$as_me: error: KDE headers not found. Please specify the root of -your KDE installation by exporting KDEDIR before running \"configure\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "KDE headers not found. Please specify the root of +your KDE installation by exporting KDEDIR before running \"configure\"." "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking for KDE libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for KDE libraries" >&5 $as_echo_n "checking for KDE libraries... " >&6; } kde_libdir="no" for kde_check in $kde_libdirs ; do @@ -28374,14 +21217,11 @@ $as_echo_n "checking for KDE libraries... " >&6; } break fi done - { $as_echo "$as_me:$LINENO: result: $kde_libdir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kde_libdir" >&5 $as_echo "$kde_libdir" >&6; } if test "x$kde_libdir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: KDE libraries not found. Please specify the root of -your KDE installation by exporting KDEDIR before running \"configure\"." >&5 -$as_echo "$as_me: error: KDE libraries not found. Please specify the root of -your KDE installation by exporting KDEDIR before running \"configure\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "KDE libraries not found. Please specify the root of +your KDE installation by exporting KDEDIR before running \"configure\"." "$LINENO" 5 fi KDE_CFLAGS="-I$qt_incdir -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" @@ -28421,7 +21261,7 @@ if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then kde_test_include="ksharedptr.h" kde_test_library="libkdeui.so" - { $as_echo "$as_me:$LINENO: checking for Qt4 headers" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt4 headers" >&5 $as_echo_n "checking for Qt4 headers... " >&6; } qt_header_dir="no" for inc_dir in $qt_incdirs ; do @@ -28431,15 +21271,13 @@ $as_echo_n "checking for Qt4 headers... " >&6; } fi done - { $as_echo "$as_me:$LINENO: result: $qt_header_dir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $qt_header_dir" >&5 $as_echo "$qt_header_dir" >&6; } if test "x$qt_header_dir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&5 -$as_echo "$as_me: error: Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking for Qt4 libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt4 libraries" >&5 $as_echo_n "checking for Qt4 libraries... " >&6; } qt_lib_dir="no" for lib_dir in $qt_libdirs ; do @@ -28449,20 +21287,18 @@ $as_echo_n "checking for Qt4 libraries... " >&6; } fi done - { $as_echo "$as_me:$LINENO: result: $qt_lib_dir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $qt_lib_dir" >&5 $as_echo "$qt_lib_dir" >&6; } if test "x$qt_lib_dir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&5 -$as_echo "$as_me: error: Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running \"configure\"." "$LINENO" 5 fi # Extract the first word of "moc", so it can be a program name with args. set dummy moc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MOC4+set}" = set; then +if test "${ac_cv_path_MOC4+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MOC4 in @@ -28476,14 +21312,14 @@ for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MOC4="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_MOC4" && ac_cv_path_MOC4="no" @@ -28492,23 +21328,20 @@ esac fi MOC4=$ac_cv_path_MOC4 if test -n "$MOC4"; then - { $as_echo "$as_me:$LINENO: result: $MOC4" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC4" >&5 $as_echo "$MOC4" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MOC4" = "no" ; then - { { $as_echo "$as_me:$LINENO: error: Qt Meta Object Compiler not found. Please specify -the root of your Qt installation by exporting QT4DIR before running \"configure\"." >&5 -$as_echo "$as_me: error: Qt Meta Object Compiler not found. Please specify -the root of your Qt installation by exporting QT4DIR before running \"configure\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Qt Meta Object Compiler not found. Please specify +the root of your Qt installation by exporting QT4DIR before running \"configure\"." "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking for KDE4 headers" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for KDE4 headers" >&5 $as_echo_n "checking for KDE4 headers... " >&6; } kde_incdir="no" for kde_check in $kde_incdirs ; do @@ -28517,15 +21350,13 @@ $as_echo_n "checking for KDE4 headers... " >&6; } break fi done - { $as_echo "$as_me:$LINENO: result: $kde_incdir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kde_incdir" >&5 $as_echo "$kde_incdir" >&6; } if test "x$kde_incdir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&5 -$as_echo "$as_me: error: KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking for KDE4 libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for KDE4 libraries" >&5 $as_echo_n "checking for KDE4 libraries... " >&6; } kde_libdir="no" for kde_check in $kde_libdirs ; do @@ -28535,12 +21366,10 @@ $as_echo_n "checking for KDE4 libraries... " >&6; } fi done - { $as_echo "$as_me:$LINENO: result: $kde_libdir" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kde_libdir" >&5 $as_echo "$kde_libdir" >&6; } if test "x$kde_libdir" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&5 -$as_echo "$as_me: error: KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running \"configure\"." "$LINENO" 5 fi KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" @@ -28550,23 +21379,23 @@ fi -{ $as_echo "$as_me:$LINENO: checking whether to enable the lockdown pieces" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the lockdown pieces" >&5 $as_echo_n "checking whether to enable the lockdown pieces... " >&6; } ENABLE_LOCKDOWN="" if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then ENABLE_LOCKDOWN=YES - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to enable evolution 2 support" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable evolution 2 support" >&5 $as_echo_n "checking whether to enable evolution 2 support... " >&6; } if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=no @@ -28574,9 +21403,9 @@ $as_echo "yes" >&6; } if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -28589,14 +21418,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" @@ -28605,10 +21434,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -28623,24 +21452,24 @@ fi else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { $as_echo "$as_me:$LINENO: checking for gobject-2.0" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0" >&5 $as_echo_n "checking for gobject-2.0... " >&6; } if $PKG_CONFIG --exists "gobject-2.0" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } succeeded=yes - { $as_echo "$as_me:$LINENO: checking GOBJECT_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GOBJECT_CFLAGS" >&5 $as_echo_n "checking GOBJECT_CFLAGS... " >&6; } GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0"` - { $as_echo "$as_me:$LINENO: result: $GOBJECT_CFLAGS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GOBJECT_CFLAGS" >&5 $as_echo "$GOBJECT_CFLAGS" >&6; } - { $as_echo "$as_me:$LINENO: checking GOBJECT_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking GOBJECT_LIBS" >&5 $as_echo_n "checking GOBJECT_LIBS... " >&6; } GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0"` - { $as_echo "$as_me:$LINENO: result: $GOBJECT_LIBS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GOBJECT_LIBS" >&5 $as_echo "$GOBJECT_LIBS" >&6; } else GOBJECT_CFLAGS="" @@ -28662,25 +21491,23 @@ $as_echo "$GOBJECT_LIBS" >&6; } if test $succeeded = yes; then : else - { { $as_echo "$as_me:$LINENO: error: Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -$as_echo "$as_me: error: Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Library requirements (gobject-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." "$LINENO" 5 fi ENABLE_EVOAB2="TRUE" else ENABLE_EVOAB2="" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to enable KDE address book support" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable KDE address book support" >&5 $as_echo_n "checking whether to enable KDE address book support... " >&6; } if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -28690,22 +21517,15 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS $KDE_CFLAGS" - { $as_echo "$as_me:$LINENO: checking whether KDE is between 3.2 and 3.6" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether KDE is between 3.2 and 3.6" >&5 $as_echo_n "checking whether KDE is between 3.2 and 3.6... " >&6; } - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +as_fn_error "cannot run test program while cross compiling +See \`config.log' for more details." "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -28716,45 +21536,16 @@ int main(int argc, char **argv) { } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_cxx_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { $as_echo "$as_me:$LINENO: error: KDE version too old or too recent, please use another version of KDE or disable KDE address book support" >&5 -$as_echo "$as_me: error: KDE version too old or too recent, please use another version of KDE or disable KDE address book support" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "KDE version too old or too recent, please use another version of KDE or disable KDE address book support" "$LINENO" 5 fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - CXXFLAGS=$save_CXXFLAGS ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -28764,497 +21555,116 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ENABLE_KAB=TRUE else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ENABLE_KAB= fi -{ $as_echo "$as_me:$LINENO: checking whether to include FontOOo" >&5 -$as_echo_n "checking whether to include FontOOo... " >&6; } -if test -n "$enable_fontooo"; then - if test "$enable_fontooo" = "no"; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - WITH_FONTOOO=NO - SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO" - else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - WITH_FONTOOO=YES - BUILD_TYPE="$BUILD_TYPE MSFONTEXTRACT" - fi -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - WITH_FONTOOO=NO - SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO" -fi - - -if test "$WITH_FONTOOO" = "YES"; then - { $as_echo "$as_me:$LINENO: checking whether to use system libmspack" >&5 -$as_echo_n "checking whether to use system libmspack... " >&6; } - if test -n "$with_system_mspack" -o -n "$with_system_libs" && \ - test "$with_system_mspack" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - SYSTEM_MSPACK=YES - if test "${ac_cv_header_mspack_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for mspack.h" >&5 -$as_echo_n "checking for mspack.h... " >&6; } -if test "${ac_cv_header_mspack_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mspack_h" >&5 -$as_echo "$ac_cv_header_mspack_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking mspack.h usability" >&5 -$as_echo_n "checking mspack.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking mspack.h presence" >&5 -$as_echo_n "checking mspack.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: mspack.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: mspack.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mspack.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: mspack.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: mspack.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: mspack.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mspack.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: mspack.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mspack.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: mspack.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mspack.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: mspack.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mspack.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: mspack.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: mspack.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: mspack.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for mspack.h" >&5 -$as_echo_n "checking for mspack.h... " >&6; } -if test "${ac_cv_header_mspack_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_mspack_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mspack_h" >&5 -$as_echo "$ac_cv_header_mspack_h" >&6; } - -fi -if test "x$ac_cv_header_mspack_h" = x""yes; then - : -else - { { $as_echo "$as_me:$LINENO: error: mspack.h not found, install libmspack" >&5 -$as_echo "$as_me: error: mspack.h not found, install libmspack" >&2;} - { (exit 1); exit 1; }; } -fi - - - -{ $as_echo "$as_me:$LINENO: checking for mspack_create_cab_decompressor in -lmspack" >&5 -$as_echo_n "checking for mspack_create_cab_decompressor in -lmspack... " >&6; } -if test "${ac_cv_lib_mspack_mspack_create_cab_decompressor+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmspack $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char mspack_create_cab_decompressor (); -int -main () -{ -return mspack_create_cab_decompressor (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_mspack_mspack_create_cab_decompressor=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_mspack_mspack_create_cab_decompressor=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mspack_mspack_create_cab_decompressor" >&5 -$as_echo "$ac_cv_lib_mspack_mspack_create_cab_decompressor" >&6; } -if test "x$ac_cv_lib_mspack_mspack_create_cab_decompressor" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMSPACK 1 -_ACEOF - - LIBS="-lmspack $LIBS" - -else - { { $as_echo "$as_me:$LINENO: error: libmspack not installed or functional" >&5 -$as_echo "$as_me: error: libmspack not installed or functional" >&2;} - { (exit 1); exit 1; }; } -fi - - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - SYSTEM_MSPACK=NO - fi -fi - - -{ $as_echo "$as_me:$LINENO: checking whether to include MathMLDTD" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include MathMLDTD" >&5 $as_echo_n "checking whether to include MathMLDTD... " >&6; } if test -n "$enable_mathmldtd"; then if test "$enable_mathmldtd" = "no"; then - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" else - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } BUILD_TYPE="$BUILD_TYPE MATHMLDTD" fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" fi -{ $as_echo "$as_me:$LINENO: checking whether to include Bitstream Vera fonts" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include Bitstream Vera fonts" >&5 $as_echo_n "checking whether to include Bitstream Vera fonts... " >&6; } if test "$with_fonts" != "no" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } WITH_FONTS=YES BUILD_TYPE="$BUILD_TYPE BITSTREAM_VERA_FONTS" else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } WITH_FONTS=NO SCPDEFS="$SCPDEFS -DWITHOUT_FONTS" fi -{ $as_echo "$as_me:$LINENO: checking whether to include PPDs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include PPDs" >&5 $as_echo_n "checking whether to include PPDs... " >&6; } if test "$with_ppds" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } WITHOUT_PPDS=YES SCPDEFS="$SCPDEFS -DWITHOUT_PPDS" fi -{ $as_echo "$as_me:$LINENO: checking whether to include AFMs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include AFMs" >&5 $as_echo_n "checking whether to include AFMs... " >&6; } if test "$with_afms" != "no"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - WITHOUT_AFMS=YES - SCPDEFS="$SCPDEFS -DWITHOUT_AFMS" -fi - - - - -{ $as_echo "$as_me:$LINENO: checking whether and how to use Xinerama" >&5 -$as_echo_n "checking whether and how to use Xinerama... " >&6; } -if test "$_os" = "Darwin"; then - USE_XINERAMA=YES - XINERAMA_LINK=dynamic - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then - if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then - # we have both versions, let the user decide but use the dynamic one - # per default - USE_XINERAMA=YES - if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then - XINERAMA_LINK=dynamic - else - XINERAMA_LINK=static - fi - elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then - # we have only the dynamic version - USE_XINERAMA=YES - XINERAMA_LINK=dynamic - elif test -e "$XLIB/libXinerama.a"; then - # static version - if echo $build_cpu | grep -E 'i[3456]86' 2>/dev/null >/dev/null; then - USE_XINERAMA=YES - XINERAMA_LINK=static - else - USE_XINERAMA=NO - XINERAMA_LINK=none - fi - else - # no Xinerama - USE_XINERAMA=NO - XINERAMA_LINK=none - fi - if test "$USE_XINERAMA" = "YES"; then - { $as_echo "$as_me:$LINENO: result: yes, with $XINERAMA_LINK linking" >&5 -$as_echo "yes, with $XINERAMA_LINK linking" >&6; } - if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then - { $as_echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5 -$as_echo_n "checking for X11/extensions/Xinerama.h... " >&6; } -if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then - $as_echo_n "(cached) " >&6 -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5 -$as_echo "$ac_cv_header_X11_extensions_Xinerama_h" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xinerama.h usability" >&5 -$as_echo_n "checking X11/extensions/Xinerama.h usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking X11/extensions/Xinerama.h presence" >&5 -$as_echo_n "checking X11/extensions/Xinerama.h presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + WITHOUT_AFMS=YES + SCPDEFS="$SCPDEFS -DWITHOUT_AFMS" fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: X11/extensions/Xinerama.h: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: X11/extensions/Xinerama.h: in the future, the compiler will take precedence" >&2;} - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5 -$as_echo_n "checking for X11/extensions/Xinerama.h... " >&6; } -if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_header_X11_extensions_Xinerama_h=$ac_header_preproc -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5 -$as_echo "$ac_cv_header_X11_extensions_Xinerama_h" >&6; } -fi -if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then - : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether and how to use Xinerama" >&5 +$as_echo_n "checking whether and how to use Xinerama... " >&6; } +if test "$_os" = "Darwin"; then + USE_XINERAMA=YES + XINERAMA_LINK=dynamic + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then + if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then + # we have both versions, let the user decide but use the dynamic one + # per default + USE_XINERAMA=YES + if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then + XINERAMA_LINK=dynamic + else + XINERAMA_LINK=static + fi + elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then + # we have only the dynamic version + USE_XINERAMA=YES + XINERAMA_LINK=dynamic + elif test -e "$XLIB/libXinerama.a"; then + # static version + if echo $build_cpu | grep -E 'i[3456]86' 2>/dev/null >/dev/null; then + USE_XINERAMA=YES + XINERAMA_LINK=static + else + USE_XINERAMA=NO + XINERAMA_LINK=none + fi + else + # no Xinerama + USE_XINERAMA=NO + XINERAMA_LINK=none + fi + if test "$USE_XINERAMA" = "YES"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $XINERAMA_LINK linking" >&5 +$as_echo "yes, with $XINERAMA_LINK linking" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default" +if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then : + else - { { $as_echo "$as_me:$LINENO: error: Xinerama header not found." >&5 -$as_echo "$as_me: error: Xinerama header not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Xinerama header not found." "$LINENO" 5 fi @@ -29265,19 +21675,14 @@ fi if test "$_os" = "Linux"; then XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl" fi - -{ $as_echo "$as_me:$LINENO: checking for XineramaIsActive in -lXinerama" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaIsActive in -lXinerama" >&5 $as_echo_n "checking for XineramaIsActive in -lXinerama... " >&6; } -if test "${ac_cv_lib_Xinerama_XineramaIsActive+set}" = set; then +if test "${ac_cv_lib_Xinerama_XineramaIsActive+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXinerama $XINERAMA_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -29295,43 +21700,18 @@ return XineramaIsActive (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xinerama_XineramaIsActive=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xinerama_XineramaIsActive=no + ac_cv_lib_Xinerama_XineramaIsActive=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaIsActive" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaIsActive" >&5 $as_echo "$ac_cv_lib_Xinerama_XineramaIsActive" >&6; } -if test "x$ac_cv_lib_Xinerama_XineramaIsActive" = x""yes; then +if test "x$ac_cv_lib_Xinerama_XineramaIsActive" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXINERAMA 1 _ACEOF @@ -29339,17 +21719,15 @@ _ACEOF LIBS="-lXinerama $LIBS" else - { { $as_echo "$as_me:$LINENO: error: Xinerama not functional?" >&5 -$as_echo "$as_me: error: Xinerama not functional?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Xinerama not functional?" "$LINENO" 5 fi else - { $as_echo "$as_me:$LINENO: result: no, libXinerama not found or wrong architecture." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, libXinerama not found or wrong architecture." >&5 $as_echo "no, libXinerama not found or wrong architecture." >&6; } fi else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -29364,9 +21742,9 @@ if test -z "$with_ant_home"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ANT+set}" = set; then +if test "${ac_cv_path_ANT+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ANT in @@ -29379,14 +21757,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -29394,10 +21772,10 @@ esac fi ANT=$ac_cv_path_ANT if test -n "$ANT"; then - { $as_echo "$as_me:$LINENO: result: $ANT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANT" >&5 $as_echo "$ANT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -29413,9 +21791,9 @@ else do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ANT+set}" = set; then +if test "${ac_cv_path_ANT+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ANT in @@ -29429,14 +21807,14 @@ for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -29444,10 +21822,10 @@ esac fi ANT=$ac_cv_path_ANT if test -n "$ANT"; then - { $as_echo "$as_me:$LINENO: result: $ANT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANT" >&5 $as_echo "$ANT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -29460,9 +21838,7 @@ done fi if test -z "$ANT"; then - { { $as_echo "$as_me:$LINENO: error: Ant not found - Make sure it's in the path or use --with-ant-home" >&5 -$as_echo "$as_me: error: Ant not found - Make sure it's in the path or use --with-ant-home" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Ant not found - Make sure it's in the path or use --with-ant-home" "$LINENO" 5 else # resolve relative or absolute symlink while test -h "$ANT"; do @@ -29487,7 +21863,7 @@ else fi ant_minminor1=`echo $ant_minver | cut -d"." -f2` - { $as_echo "$as_me:$LINENO: checking whether ant is >= $ant_minver" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ant is >= $ant_minver" >&5 $as_echo_n "checking whether ant is >= $ant_minver... " >&6; } ant_version=`$ANT -version | $AWK '{ print $4; }'` ant_version_major=`echo $ant_version | cut -d. -f1` @@ -29496,17 +21872,15 @@ echo "configure: ant_version $ant_version " >&5 echo "configure: ant_version_major $ant_version_major " >&5 echo "configure: ant_version_minor $ant_version_minor " >&5 if test "$ant_version_major" -ge "2"; then - { $as_echo "$as_me:$LINENO: result: yes, $ant_version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $ant_version" >&5 $as_echo "yes, $ant_version" >&6; } elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then - { $as_echo "$as_me:$LINENO: result: yes, $ant_version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $ant_version" >&5 $as_echo "yes, $ant_version" >&6; } else - { { $as_echo "$as_me:$LINENO: error: no, you need at least ant >= $ant_minver" >&5 -$as_echo "$as_me: error: no, you need at least ant >= $ant_minver" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no, you need at least ant >= $ant_minver" "$LINENO" 5 fi - { $as_echo "$as_me:$LINENO: checking if $ANT works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $ANT works" >&5 $as_echo_n "checking if $ANT works... " >&6; } cat > conftest.java << EOF public class conftest { @@ -29531,13 +21905,13 @@ EOF else ant_cmd="$ANT -buildfile conftest.xml 1>&2" fi - { (eval echo "$as_me:$LINENO: \"$ant_cmd\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ant_cmd\""; } >&5 (eval $ant_cmd) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } if test $? = 0 && test -f ./conftest.class ; then - { $as_echo "$as_me:$LINENO: result: Ant works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Ant works" >&5 $as_echo "Ant works" >&6; } if test -z "$WITH_ANT_HOME"; then ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"` @@ -29551,7 +21925,7 @@ $as_echo "Ant works" >&6; } echo "configure: Ant test failed" >&5 cat conftest.java >&5 cat conftest.xml >&5 - { $as_echo "$as_me:$LINENO: WARNING: Ant does not work - Some Java projects will not build!" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ant does not work - Some Java projects will not build!" >&5 $as_echo "$as_me: WARNING: Ant does not work - Some Java projects will not build!" >&2;} ANT_HOME="" echo "Ant does not work - Some Java projects will not build!" >>warn @@ -29565,7 +21939,7 @@ fi if test "$ANT_HOME" != "NO_ANT_HOME"; then - { $as_echo "$as_me:$LINENO: checking Ant lib directory" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ant lib directory" >&5 $as_echo_n "checking Ant lib directory... " >&6; } if test -f $ANT_HOME/lib/ant.jar; then ANT_LIB="$ANT_HOME/lib" @@ -29582,22 +21956,20 @@ $as_echo_n "checking Ant lib directory... " >&6; } if test -f $ANT_HOME/lib/ant/ant.jar; then ANT_LIB="$ANT_HOME/lib/ant" else - { { $as_echo "$as_me:$LINENO: error: Ant libraries not found!" >&5 -$as_echo "$as_me: error: Ant libraries not found!" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "Ant libraries not found!" "$LINENO" 5 fi fi fi fi fi - { $as_echo "$as_me:$LINENO: result: Ant lib directory found." >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Ant lib directory found." >&5 $as_echo "Ant lib directory found." >&6; } fi fi if test "$ENABLE_MEDIAWIKI" = "YES"; then -{ $as_echo "$as_me:$LINENO: checking whether ant supports mapper type=\"regexp\"" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ant supports mapper type=\"regexp\"" >&5 $as_echo_n "checking whether ant supports mapper type=\"regexp\"... " >&6; } rm -rf confdir mkdir confdir @@ -29630,13 +22002,13 @@ EOF else ant_cmd="$ANT -buildfile conftest.xml 1>&2" fi - { (eval echo "$as_me:$LINENO: \"$ant_cmd\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ant_cmd\""; } >&5 (eval $ant_cmd) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } if test $? = 0 && test -f ./conftest.class ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } rm -rf confdir else @@ -29644,144 +22016,142 @@ $as_echo "yes" >&6; } cat conftest.java >&5 cat conftest.xml >&5 rm -rf confdir - { { $as_echo "$as_me:$LINENO: error: no. Did you install ant-apache-regexp?" >&5 -$as_echo "$as_me: error: no. Did you install ant-apache-regexp?" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no. Did you install ant-apache-regexp?" "$LINENO" 5 fi fi rm -f conftest* core core.* *.core -{ $as_echo "$as_me:$LINENO: checking which languages to be built" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which languages to be built" >&5 $as_echo_n "checking which languages to be built... " >&6; } WITH_LANG="$with_lang" if test -z "$WITH_LANG"; then - { $as_echo "$as_me:$LINENO: result: en-US" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: en-US" >&5 $as_echo "en-US" >&6; } else - { $as_echo "$as_me:$LINENO: result: $WITH_LANG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WITH_LANG" >&5 $as_echo "$WITH_LANG" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking which languages have poor help localizations" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which languages have poor help localizations" >&5 $as_echo_n "checking which languages have poor help localizations... " >&6; } WITH_POOR_HELP_LOCALIZATIONS="$with_poor_help_localizations" if test -z "$WITH_POOR_HELP_LOCALIZATIONS"; then - { $as_echo "$as_me:$LINENO: result: none" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } else - { $as_echo "$as_me:$LINENO: result: $WITH_POOR_HELP_LOCALIZATIONS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WITH_POOR_HELP_LOCALIZATIONS" >&5 $as_echo "$WITH_POOR_HELP_LOCALIZATIONS" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking which dictionaries to include" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which dictionaries to include" >&5 $as_echo_n "checking which dictionaries to include... " >&6; } if test -z "$with_dict"; then WITH_DICT=,ALL, - { $as_echo "$as_me:$LINENO: result: ALL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ALL" >&5 $as_echo "ALL" >&6; } else WITH_DICT=","$with_dict"," - { $as_echo "$as_me:$LINENO: result: $with_dict" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dict" >&5 $as_echo "$with_dict" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for additional 'intro' bitmaps" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for additional 'intro' bitmaps" >&5 $as_echo_n "checking for additional 'intro' bitmaps... " >&6; } INTRO_BITMAPS= if test -z "$with_intro_bitmaps" -o "$with_intro_bitmaps" = "no" ; then INTRO_BITMAPS= - { $as_echo "$as_me:$LINENO: result: none" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } else for bitmap in `echo $with_intro_bitmaps | tr ',' ' '` ; do case "$bitmap" in *.bmp) ;; - *) bitmap= ; { $as_echo "$as_me:$LINENO: WARNING: Intro bitmaps should be .bmp files!" >&5 + *) bitmap= ; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intro bitmaps should be .bmp files!" >&5 $as_echo "$as_me: WARNING: Intro bitmaps should be .bmp files!" >&2;} ;; esac if test -n "$bitmap" ; then INTRO_BITMAPS="$INTRO_BITMAPS $bitmap" fi done - { $as_echo "$as_me:$LINENO: result: $INTRO_BITMAPS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTRO_BITMAPS" >&5 $as_echo "$INTRO_BITMAPS" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking for additional 'about' bitmaps" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for additional 'about' bitmaps" >&5 $as_echo_n "checking for additional 'about' bitmaps... " >&6; } ABOUT_BITMAPS= if test -z "$with_about_bitmaps" -o "$with_about_bitmaps" = "no" ; then ABOUT_BITMAPS= - { $as_echo "$as_me:$LINENO: result: none" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } else for bitmap in `echo $with_about_bitmaps | tr ',' ' '` ; do case "$bitmap" in *.bmp) ;; - *) bitmap= ; { $as_echo "$as_me:$LINENO: WARNING: About bitmaps should be .bmp files!" >&5 + *) bitmap= ; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: About bitmaps should be .bmp files!" >&5 $as_echo "$as_me: WARNING: About bitmaps should be .bmp files!" >&2;} ;; esac if test -n "$bitmap" ; then ABOUT_BITMAPS="$ABOUT_BITMAPS $bitmap" fi done - { $as_echo "$as_me:$LINENO: result: $ABOUT_BITMAPS" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABOUT_BITMAPS" >&5 $as_echo "$ABOUT_BITMAPS" >&6; } fi OOO_VENDOR= -{ $as_echo "$as_me:$LINENO: checking for vendor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vendor" >&5 $as_echo_n "checking for vendor... " >&6; } if test -z "$with_vendor" -o "$with_vendor" = "no" ; then - { $as_echo "$as_me:$LINENO: result: not set" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 $as_echo "not set" >&6; } else OOO_VENDOR="$with_vendor" - { $as_echo "$as_me:$LINENO: result: $OOO_VENDOR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OOO_VENDOR" >&5 $as_echo "$OOO_VENDOR" >&6; } fi UNIXWRAPPERNAME= -{ $as_echo "$as_me:$LINENO: checking for UNIX wrapper name" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIX wrapper name" >&5 $as_echo_n "checking for UNIX wrapper name... " >&6; } if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then - { $as_echo "$as_me:$LINENO: result: not set" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 $as_echo "not set" >&6; } else UNIXWRAPPERNAME="$with_unix_wrapper" - { $as_echo "$as_me:$LINENO: result: $UNIXWRAPPERNAME" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIXWRAPPERNAME" >&5 $as_echo "$UNIXWRAPPERNAME" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to statically link to Gtk" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to statically link to Gtk" >&5 $as_echo_n "checking whether to statically link to Gtk... " >&6; } if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then ENABLE_STATIC_GTK="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else ENABLE_STATIC_GTK="FALSE" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -{ $as_echo "$as_me:$LINENO: checking whether to use layout dialogs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use layout dialogs" >&5 $as_echo_n "checking whether to use layout dialogs... " >&6; } if test -n "$enable_layout" && test "$enable_layout" != "no"; then ENABLE_LAYOUT="TRUE" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else ENABLE_LAYOUT="FALSE" - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -29789,21 +22159,21 @@ fi # =================================================================== # De- or increase default verbosity of build process # =================================================================== -{ $as_echo "$as_me:$LINENO: checking build verbosity" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build verbosity" >&5 $as_echo_n "checking build verbosity... " >&6; } if test -n "$enable_verbose"; then if test "$enable_verbose" == "yes"; then VERBOSE="TRUE" - { $as_echo "$as_me:$LINENO: result: high" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: high" >&5 $as_echo "high" >&6; } fi if test "$enable_verbose" == "no"; then VERBOSE="FALSE" - { $as_echo "$as_me:$LINENO: result: low" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: low" >&5 $as_echo "low" >&6; } fi else - { $as_echo "$as_me:$LINENO: result: not set" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 $as_echo "not set" >&6; } fi @@ -29815,21 +22185,19 @@ echo "* *" echo "********************************************************************" if test -z "$COMPATH"; then - { { $as_echo "$as_me:$LINENO: error: No compiler found." >&5 -$as_echo "$as_me: error: No compiler found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "No compiler found." "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: checking solver path" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking solver path" >&5 $as_echo_n "checking solver path... " >&6; } if test -z "$with_local_solver"; then LOCAL_SOLVER="DEFAULT" - { $as_echo "$as_me:$LINENO: result: default" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5 $as_echo "default" >&6; } else LOCAL_SOLVER=$with_local_solver - { $as_echo "$as_me:$LINENO: result: $with_local_solver" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_local_solver" >&5 $as_echo "$with_local_solver" >&6; } fi @@ -29868,13 +22236,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -29882,8 +22250,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -29906,11 +22274,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi @@ -29966,8 +22334,8 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -29980,9 +22348,10 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -29992,17 +22361,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -30010,23 +22380,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -30034,7 +22396,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -30045,7 +22413,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -30068,13 +22436,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -30084,15 +22445,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -30104,12 +22465,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -30121,7 +22486,89 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -30135,8 +22582,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -30156,76 +22607,25 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -30254,8 +22654,56 @@ fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -30274,10 +22722,10 @@ else if test -d "$1"; then test -d "$1/."; else - case $1 in + case $1 in #( -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -30292,13 +22740,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -30325,13 +22779,15 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit + --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -30342,16 +22798,17 @@ Usage: $0 [OPTION]... [FILE]... Configuration files: $config_files -Report bugs to ." +Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.65, + with options \\"\$ac_cs_config\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -30385,6 +22842,8 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) @@ -30392,7 +22851,7 @@ do case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -30401,11 +22860,10 @@ do ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -30454,9 +22912,7 @@ do "set_soenv") CONFIG_FILES="$CONFIG_FILES set_soenv" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -30481,7 +22937,7 @@ $debug || trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. @@ -30492,11 +22948,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -30504,10 +22956,16 @@ $debug || if test -n "$CONFIG_FILES"; then -ac_cr=' ' +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' + ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi @@ -30521,24 +22979,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -30560,7 +23012,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -30574,7 +23026,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -30627,9 +23079,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), @@ -30660,9 +23110,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -30690,12 +23138,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't @@ -30706,7 +23152,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. @@ -30719,9 +23165,7 @@ $as_echo "$as_me: creating $ac_file" >&6;} case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -30749,47 +23193,7 @@ $as_echo X"$ac_file" | q } s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in @@ -30837,7 +23241,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - ac_sed_dataroot=' /datarootdir/ { p @@ -30847,12 +23250,11 @@ ac_sed_dataroot=' /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' +/@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -30862,7 +23264,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -30889,14 +23291,12 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} @@ -30906,9 +23306,7 @@ which seems to be undefined. Please make sure it is defined." >&2;} -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; @@ -30918,15 +23316,12 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;} done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -30947,10 +23342,10 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi -- cgit -- cgit From cd4ff946014207f73fbe0629e70119866cb3b15e Mon Sep 17 00:00:00 2001 From: Rene Engelhard Date: Mon, 30 Nov 2009 12:07:18 +0100 Subject: fontooocleanup: also remove FontOOo stuff in wizards/source/launcher, thanks cmc --- wizards/source/launcher/FontOOo.xba | 46 ------------------------------------- wizards/source/launcher/makefile.mk | 3 --- wizards/source/launcher/script.xlb | 1 - 3 files changed, 50 deletions(-) delete mode 100644 wizards/source/launcher/FontOOo.xba diff --git a/wizards/source/launcher/FontOOo.xba b/wizards/source/launcher/FontOOo.xba deleted file mode 100644 index c05e0c11bb2c..000000000000 --- a/wizards/source/launcher/FontOOo.xba +++ /dev/null @@ -1,46 +0,0 @@ - - -Option Explicit - -Sub StartFontOOo - -Dim ThePath as string -Dim aService as object -Dim MyFontOOo as string -dim TheDoc as object -dim args(1) as new com.sun.star.beans.PropertyValue - -on error resume next - -' Find path -aService = CreateUnoService("com.sun.star.util.PathSubstitution") -ThePath =ConvertToURL(aService.substituteVariables("$(prog)", true)) -ThePath=ThePath & "/../share/dict/ooo" - -if fileExists(ThePath & "/FontOOo.lst") then -'read FontOOo.lst file - Open ThePath & "/FontOOo.lst" for input as #1 - line input #1, MyFontOOo - close #1 -else -'create default FontOOo.lst file - Open ThePath & "/FontOOo.lst" for output as #1 - MyFontOOo=ThePath & "/FontOOo.sxw" - print #1, MyFontOOo - close #1 -endif - -'security -if Not fileExists(MyFontOOo) then - MyFontOOo= ThePath & "/FontOOo.sxw" -endif -MyFontOOo=ConvertToURL(MyFontOOo) - -'Opens FontOOo main file -args(0).name="InteractionHandler" -args(0).value="" -args(1).name="MacroExecutionMode" -args(1).value=com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN '4 -TheDoc=StarDesktop.loadComponentFromURL(MyFontOOo,"_blank",0,args()) - -End Sub diff --git a/wizards/source/launcher/makefile.mk b/wizards/source/launcher/makefile.mk index d20cc073f39a..6efbcc54792e 100644 --- a/wizards/source/launcher/makefile.mk +++ b/wizards/source/launcher/makefile.mk @@ -42,9 +42,6 @@ TARGET=launcher ZIP1TARGET = $(LAUNCHER_ALL_TARGET) XBAFILES = DicOOo.xba -.IF "$(WITH_FONTOOO)" == "YES" -XBAFILES += FontOOo.xba -.ENDIF ZIP1LIST = *.xdl $(XBAFILES) *.xlb # --- Targets ------------------------------------------------------ diff --git a/wizards/source/launcher/script.xlb b/wizards/source/launcher/script.xlb index 88a6e68b5aad..55310d9fb286 100644 --- a/wizards/source/launcher/script.xlb +++ b/wizards/source/launcher/script.xlb @@ -2,5 +2,4 @@ - -- cgit From eb40b6f614b54fea1a729c63ef5213b1b000b19a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 30 Nov 2009 12:03:04 +0000 Subject: cmcfixes68: #i107320# ifdef debug only code --- jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx | 7 ------- jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx | 1 - jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 5 ++++- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx index 56972ea0e66f..e7f55eb91595 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx @@ -54,13 +54,6 @@ public: } test; #endif -SunVersion::SunVersion(): m_nUpdateSpecial(0), - m_preRelease(Rel_NONE), - m_bValid(false) -{ - memset(m_arVersionParts, 0, sizeof(m_arVersionParts)); -} - SunVersion::SunVersion(const rtl::OUString &usVer): m_nUpdateSpecial(0), m_preRelease(Rel_NONE), usVersion(usVer) diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx index f6114672b17c..51b4ecf10221 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx @@ -92,7 +92,6 @@ protected: PreRelease m_preRelease; public: - SunVersion(); SunVersion(const char * szVer); SunVersion(const rtl::OUString& usVer); ~SunVersion(); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index a823d551af88..674dd2103236 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -300,13 +300,14 @@ class AsynchReader: public Thread public: AsynchReader(oslFileHandle & rHandle); - +#if OSL_DEBUG_LEVEL >= 2 /** only call this function after this thread has finished. That is, call join on this instance and then call getData. */ OString getData(); +#endif }; AsynchReader::AsynchReader(oslFileHandle & rHandle): @@ -314,11 +315,13 @@ AsynchReader::AsynchReader(oslFileHandle & rHandle): { } +#if OSL_DEBUG_LEVEL >= 2 OString AsynchReader::getData() { OSL_ASSERT(isRunning() == sal_False ); return OString(m_arData.get(), m_nDataSize); } +#endif void AsynchReader::run() { -- cgit From c13c003af95580e555c8ef83b19b00c8c29685ae Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 30 Nov 2009 12:07:42 +0000 Subject: cmcfixes68: #i107321# micro opt for x86_64 bridge --- bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx index 5fb2bd7e12a3..526ff88db39d 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx @@ -121,13 +121,11 @@ static typelib_TypeClass cpp2uno_call( for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos ) { const typelib_MethodParameter & rParam = pParams[nPos]; - typelib_TypeDescription * pParamTypeDescr = 0; - TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef ); int nUsedGPR = 0; int nUsedSSE = 0; bool bFitsRegisters = x86_64::examine_argument( rParam.pTypeRef, false, nUsedGPR, nUsedSSE ); - if ( !rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ) ) // value + if ( !rParam.bOut && bridges::cpp_uno::shared::isSimpleType( rParam.pTypeRef ) ) // value { // Simple types must fit exactly one register on x86_64 OSL_ASSERT( bFitsRegisters && ( ( nUsedSSE == 1 && nUsedGPR == 0 ) || ( nUsedSSE == 0 && nUsedGPR == 1 ) ) ); @@ -152,12 +150,12 @@ static typelib_TypeClass cpp2uno_call( else pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw++; } - - // no longer needed - TYPELIB_DANGER_RELEASE( pParamTypeDescr ); } else // struct <= 16 bytes || ptr to complex value || ref { + typelib_TypeDescription * pParamTypeDescr = 0; + TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef ); + void *pCppStack; char pTmpStruct[16]; -- cgit From 09bc28fb7b998f56b481fb07eb576f00ce72c26f Mon Sep 17 00:00:00 2001 From: Joachim Lingner Date: Mon, 30 Nov 2009 13:50:49 +0100 Subject: jl144: #i106132# nss does not build on MacOS 10.6 because of libsqlite3 --- moz/zipped/makefile.mk | 10 ++-- nss/nss.patch | 56 ++++++++++++++------- nss/prj/d.lst | 22 ++++++++- nss/readme.txt | 131 ++++++++++++++++++++++++++++--------------------- 4 files changed, 141 insertions(+), 78 deletions(-) diff --git a/moz/zipped/makefile.mk b/moz/zipped/makefile.mk index a7b3ea846e9b..78d867bd23f1 100644 --- a/moz/zipped/makefile.mk +++ b/moz/zipped/makefile.mk @@ -175,6 +175,8 @@ FREEBL=freebl3 .ENDIF # "$(OS)" == "SOLARIS" +#On Linux/Unix sqlite is delivered to $(SOLARLIBDIR)/sqlite/libsqlite3.so +#See readme.txt in module nss NSS_MODULE_RUNTIME_LIST:= \ $(FREEBL) \ nspr4 \ @@ -186,7 +188,7 @@ NSS_MODULE_RUNTIME_LIST:= \ plds4 \ smime3 \ softokn3 \ - sqlite3 \ + sqlite/sqlite3 \ ssl3 @@ -200,13 +202,13 @@ $(MISC)$/unpacked_$(TARGET)_inc $(BIN)$/mozruntime.zip echo >& $(NULLDEV) $(foreach,lib,$(LIBLIST) rm -f $(LB)$/$(lib) &&) \ echo >& $(NULLDEV) - $(foreach,lib,$(BIN_RUNTIMELIST) zip -d $(BIN)$/mozruntime.zip $(DLLPRE)$(lib)$(DLLPOST) &&) \ + $(foreach,lib,$(BIN_RUNTIMELIST) zip -d $(BIN)$/mozruntime.zip $(DLLPRE)$(lib:f)$(DLLPOST) &&) \ echo >& $(NULLDEV) .IF "$(GUI)"=="WNT" - $(foreach,lib,$(NSS_MODULE_RUNTIME_LIST) zip -g -j $(BIN)$/mozruntime.zip $(SOLARBINDIR)$/$(DLLPRE)$(lib)$(DLLPOST) &&) \ + +$(foreach,lib,$(NSS_MODULE_RUNTIME_LIST) zip -g -j $(BIN)$/mozruntime.zip $(SOLARBINDIR)$/$(DLLPRE)$(lib:f)$(DLLPOST) &&) \ echo >& $(NULLDEV) .ELSE - $(foreach,lib,$(NSS_MODULE_RUNTIME_LIST) zip -g -j $(BIN)$/mozruntime.zip $(SOLARLIBDIR)$/$(DLLPRE)$(lib)$(DLLPOST) &&) \ + +$(foreach,lib,$(NSS_MODULE_RUNTIME_LIST) zip -g -j $(BIN)$/mozruntime.zip $(SOLARLIBDIR)$/$(lib:d)$(DLLPRE)$(lib:f)$(DLLPOST) &&) \ echo >& $(NULLDEV) .ENDIF $(TOUCH) $@ diff --git a/nss/nss.patch b/nss/nss.patch index d37d892dd6b8..6fb42951b44e 100644 --- a/nss/nss.patch +++ b/nss/nss.patch @@ -1,5 +1,5 @@ ---- misc/mozilla/nsprpub/config/rules.mk 2009-05-02 01:08:01.000000000 +0200 -+++ misc/build/mozilla/nsprpub/config/rules.mk 2009-09-17 10:29:39.823155149 +0200 +--- misc/mozilla/nsprpub/config/rules.mk Sat May 2 01:08:01 2009 ++++ misc/build/mozilla/nsprpub/config/rules.mk Fri Nov 27 13:07:24 2009 @@ -350,7 +350,12 @@ ifdef NS_USE_GCC $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $< @@ -14,8 +14,8 @@ endif # GCC @echo $(RES) finished endif ---- misc/mozilla/nsprpub/configure 2009-05-08 15:12:31.000000000 +0200 -+++ misc/build/mozilla/nsprpub/configure 2009-09-17 10:31:55.064081763 +0200 +--- misc/mozilla/nsprpub/configure Fri May 8 15:12:31 2009 ++++ misc/build/mozilla/nsprpub/configure Fri Nov 27 13:07:24 2009 @@ -3898,7 +3898,7 @@ PR_MD_CSRCS=linux.c MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' @@ -25,8 +25,8 @@ _OPTIMIZE_FLAGS=-O2 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that # combo is not yet good at debugging inlined ---- misc/mozilla/security/coreconf/Darwin.mk 2009-07-30 23:36:02.000000000 +0200 -+++ misc/build/mozilla/security/coreconf/Darwin.mk 2009-09-17 11:11:36.442683705 +0200 +--- misc/mozilla/security/coreconf/Darwin.mk Thu Jul 30 23:36:02 2009 ++++ misc/build/mozilla/security/coreconf/Darwin.mk Fri Nov 27 13:07:24 2009 @@ -39,8 +39,12 @@ DEFAULT_COMPILER = cc @@ -42,8 +42,8 @@ RANLIB = ranlib ifndef CPU_ARCH ---- misc/mozilla/security/coreconf/Linux.mk 2009-07-30 01:43:41.000000000 +0200 -+++ misc/build/mozilla/security/coreconf/Linux.mk 2009-09-17 10:39:40.372245066 +0200 +--- misc/mozilla/security/coreconf/Linux.mk Thu Jul 30 01:43:41 2009 ++++ misc/build/mozilla/security/coreconf/Linux.mk Fri Nov 27 13:07:24 2009 @@ -46,8 +46,11 @@ IMPL_STRATEGY = _PTH endif @@ -67,8 +67,8 @@ DSO_LDFLAGS = LDFLAGS += $(ARCHFLAG) ---- misc/mozilla/security/coreconf/SunOS5.mk 2009-06-11 02:55:32.000000000 +0200 -+++ misc/build/mozilla/security/coreconf/SunOS5.mk 2009-09-17 10:42:17.845459669 +0200 +--- misc/mozilla/security/coreconf/SunOS5.mk Thu Jun 11 02:55:32 2009 ++++ misc/build/mozilla/security/coreconf/SunOS5.mk Fri Nov 27 13:07:24 2009 @@ -89,8 +89,12 @@ # OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer endif @@ -84,8 +84,8 @@ ASFLAGS += -Wa,-P OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG) ifndef BUILD_OPT ---- misc/mozilla/security/coreconf/arch.mk 2009-06-05 04:14:49.000000000 +0200 -+++ misc/build/mozilla/security/coreconf/arch.mk 2009-09-17 10:45:27.710858021 +0200 +--- misc/mozilla/security/coreconf/arch.mk Fri Jun 5 04:14:49 2009 ++++ misc/build/mozilla/security/coreconf/arch.mk Fri Nov 27 13:07:24 2009 @@ -324,7 +324,12 @@ # IMPL_STRATEGY may be defined too. # @@ -100,8 +100,8 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET))) ifndef BUILD_OPT ---- misc/mozilla/security/coreconf/rules.mk 2009-08-11 05:23:39.000000000 +0200 -+++ misc/build/mozilla/security/coreconf/rules.mk 2009-09-17 10:48:07.361462582 +0200 +--- misc/mozilla/security/coreconf/rules.mk Tue Aug 11 05:23:39 2009 ++++ misc/build/mozilla/security/coreconf/rules.mk Fri Nov 27 13:07:24 2009 @@ -355,7 +355,12 @@ ifdef NS_USE_GCC $(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $< @@ -116,9 +116,9 @@ endif @echo $(RES) finished endif ---- misc/mozilla/security/nss/cmd/platlibs.mk 2009-06-18 01:01:48.000000000 +0200 -+++ misc/build/mozilla/security/nss/cmd/platlibs.mk 2009-09-17 11:08:16.697236076 +0200 -@@ -41,27 +41,28 @@ +--- misc/mozilla/security/nss/cmd/platlibs.mk Thu Jun 18 01:01:48 2009 ++++ misc/build/mozilla/security/nss/cmd/platlibs.mk Fri Nov 27 13:07:24 2009 +@@ -41,12 +41,13 @@ ifeq ($(OS_ARCH), SunOS) ifeq ($(BUILD_SUN_PKG), 1) ifeq ($(USE_64), 1) @@ -135,6 +135,7 @@ endif endif +@@ -53,15 +54,15 @@ ifeq ($(OS_ARCH), Linux) ifeq ($(BUILD_SUN_PKG), 1) ifeq ($(USE_64), 1) @@ -154,3 +155,24 @@ endif endif endif +--- misc/mozilla/security/nss/cmd/shlibsign/Makefile Fri Aug 7 21:06:37 2009 ++++ misc/build/mozilla/security/nss/cmd/shlibsign/Makefile Fri Nov 27 13:07:52 2009 +@@ -78,10 +78,15 @@ + + # sign any and all shared libraries that contain the word freebl + +-CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX) +-CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX)) ++# Signing causes loading of some system library which in turn loads ++# libsqlite3. Then it loads libsqulite3 from nss, which does not have the proper ++# version. Therefore signing fails. ++# We cannot build with the system sqlite3, because it is too old (SDK ++# 10.4). Otherwise one could set NSS_USE_SYSTEM_SQLITE=1 and use the system lib. ++#CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX) ++#CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX)) + ifndef NSS_DISABLE_DBM +-CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX) ++#CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX) + endif + CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk) + diff --git a/nss/prj/d.lst b/nss/prj/d.lst index 891eb7739b1c..d70484ceab28 100755 --- a/nss/prj/d.lst +++ b/nss/prj/d.lst @@ -1,10 +1,30 @@ mkdir: %_DEST%\inc%_EXT%\mozilla\nspr mkdir: %_DEST%\inc%_EXT%\mozilla\nspr\obsolete mkdir: %_DEST%\inc%_EXT%\mozilla\nss +mkdir: %_DEST%\lib%_EXT%\sqlite ..\%__SRC%\inc\include\* %_DEST%\inc%_EXT%\mozilla\nspr ..\%__SRC%\inc\include\obsolete\protypes.h %_DEST%\inc%_EXT%\mozilla\nspr\obsolete\protypes.h ..\%__SRC%\inc\nss\*.h %_DEST%\inc%_EXT%\mozilla\nss -..\%__SRC%\lib\* %_DEST%\lib%_EXT% + +..\%__SRC%\lib\libfreebl3.* %_DEST%\lib%_EXT%\libfreebl.* +..\%__SRC%\lib\libfreebl_32fpu_3.* %_DEST%\lib%_EXT%\libfreebl_32fpu_3.* +..\%__SRC%\lib\libfreebl_32int64_3.* %_DEST%\lib%_EXT%\libfreebl_32int64_3.* +..\%__SRC%\lib\libfreebl_32int_3.* %_DEST%\lib%_EXT%\libfreebl_32int_3.* +..\%__SRC%\lib\libfreebl_64int_3.* %_DEST%\lib%_EXT%\libfreebl_64int_3.* +..\%__SRC%\lib\libfreebl_64fpu_3.* %_DEST%\lib%_EXT%\libfreebl_64fpu_3.* +..\%__SRC%\lib\libnspr4.* %_DEST%\lib%_EXT%\libnspr4.* +..\%__SRC%\lib\libnss3.* %_DEST%\lib%_EXT%\libnss3.* +..\%__SRC%\lib\libnssckbi.* %_DEST%\lib%_EXT%\libnssckbi.* +..\%__SRC%\lib\libnssdbm3.* %_DEST%\lib%_EXT%\libnssdbm3.* +..\%__SRC%\lib\libnssutil3.* %_DEST%\lib%_EXT%\libnssutil3.* +..\%__SRC%\lib\libplc4.* %_DEST%\lib%_EXT%\libplc4.* +..\%__SRC%\lib\libplds4.* %_DEST%\lib%_EXT%\libplds4.* +..\%__SRC%\lib\libsmime3.* %_DEST%\lib%_EXT%\libsmime3.* +..\%__SRC%\lib\libsoftokn3.* %_DEST%\lib%_EXT%\libsoftokn3.* +..\%__SRC%\lib\libssl3.* %_DEST%\lib%_EXT%\libssl3.* + +..\%__SRC%\lib\libsqlite3.* %_DEST%\lib%_EXT%\sqlite\libsqlite3.* + ..\%__SRC%\bin\* %_DEST%\bin%_EXT% diff --git a/nss/readme.txt b/nss/readme.txt index de23a264c179..df65908204c4 100755 --- a/nss/readme.txt +++ b/nss/readme.txt @@ -1,56 +1,75 @@ -Relation between nss, moz, moz_prebuilt ---------------------------------------- -nss containes the security libraries which are also part of moz. However nss is -meant to be more current, that is it to be updated more often. This should be -easier than doing this with moz. - -If nss is build depends on an environment variable (ENABLE_NSS_MODULE=YES) which -is per default set to YES. In this case nss is build before moz. The nss -libraries/lib files/headers built in moz are then not delivered. Otherwise they -would overwrite those from nss. That is, the nss libraries build in moz are -removed from mozruntime.zip (build in moz/solver/bin), they are removed from the -lib directory (for example moz/unxlngi6.pro/lib), and the nss and nspr headers -are also removed (inc/nss and inc/nspr). The nss libraries from the nss module -are then added to mozruntime.zip. - -This also applies for moz_prebuilt. Therefore moz and moz_prebuilt must be build -again after changes have been made to the libraries in the nss module. - -Also when moz was updated to use a newer version of mozilla, then one must make -sure that new files which also belong to nss are not delivered and are removed -from mozruntime.zip. - -Fips 140 and signed libraries -------------------------------- -Fips 140 mode is not supported. That is, the *.chk files containing the -checksums for the cryptographic module are not delivered into solver and will -not be part of the OOo installation sets. - -The *chk files do not match the libraries because we change the rpatch. - -libfreebl3 ----------- -Porting to other platforms may require to deliver other variants of -libfreebl*. The library name varies according to the platform. Changes need to -be made to -ooo/moz/extractfiles.mk -ooo/moz/zipped/makefile.mk -sun/moz_prebuilt/zipped/makefile.mk - - -See also -http://www.mozilla.org/projects/security/pki/nss/tech-notes/tn6.html - - -Windows builds of nss ---------------------- -To build mozilla on windows you'll need the mozilla build tools - -Build requirements containing the link to the build tools: -https://developer.mozilla.org/en/Windows_Build_Prerequisites#ss2.2 - -The direct link: - -http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.3.exe - - +Relation between nss, moz, moz_prebuilt +--------------------------------------- +nss containes the security libraries which are also part of moz. However nss is +meant to be more current, that is it to be updated more often. This should be +easier than doing this with moz. + +If nss is build depends on an environment variable (ENABLE_NSS_MODULE=YES) which +is per default set to YES. In this case nss is build before moz. The nss +libraries/lib files/headers built in moz are then not delivered. Otherwise they +would overwrite those from nss. That is, the nss libraries build in moz are +removed from mozruntime.zip (build in moz/solver/bin), they are removed from the +lib directory (for example moz/unxlngi6.pro/lib), and the nss and nspr headers +are also removed (inc/nss and inc/nspr). The nss libraries from the nss module +are then added to mozruntime.zip. + +This also applies for moz_prebuilt. Therefore moz and moz_prebuilt must be build +again after changes have been made to the libraries in the nss module. + +Also when moz was updated to use a newer version of mozilla, then one must make +sure that new files which also belong to nss are not delivered and are removed +from mozruntime.zip. + +Fips 140 and signed libraries +------------------------------- +Fips 140 mode is not supported. That is, the *.chk files containing the +checksums for the cryptographic module are not delivered into solver and will +not be part of the OOo installation sets. + +Signing has been turned off because +- we change the rpath (install names) after signing which breaks the signatures +(Mac) +- sqlite conflicts with the system sqlite when signing which breaks the build + + +libfreebl3 +---------- +Porting to other platforms may require to deliver other variants of +libfreebl*. The library name varies according to the platform. Changes need to +be made to +ooo/moz/extractfiles.mk +ooo/moz/zipped/makefile.mk +sun/moz_prebuilt/zipped/makefile.mk + +See also +http://www.mozilla.org/projects/security/pki/nss/tech-notes/tn6.html + + +Windows builds of nss +--------------------- +To build mozilla on windows you'll need the mozilla build tools + +Build requirements containing the link to the build tools: +https://developer.mozilla.org/en/Windows_Build_Prerequisites#ss2.2 + +The direct link: + +http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.3.exe + +libsqlite3 +---------- +The problem described here was found on Mac with OS 10.6 +NSS cannot use the system sqlite on Mac because the base line is still MacOS +10.4. That system sqlite is incompatible with the softokn3 in nss which requires +a later version of sqlite. +When we used a more current Mac SDK then we could set +NSS_USE_SYSTEM_SQLITE=1 +to build using the system sqlite. + +We cannot deliver sqlite in the lib directory of the solver. This directory is +used by tools of the build environment. Using the sqlite from NSS breaks the +tools if they use system libraries which are linked with the system +sqlite. Therefore we deliver it into lib/sqlite on unix systems. + +See also issue +http://qa.openoffice.org/issues/show_bug.cgi?id=106132 -- cgit From 09e7bc37bdd9a750652dc6a724905c5ee341e5cc Mon Sep 17 00:00:00 2001 From: Joachim Lingner Date: Mon, 30 Nov 2009 13:50:49 +0100 Subject: jl144: #i106132# nss does not build on MacOS 10.6 because of libsqlite3 --- solenv/inc/unxmacxi.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/solenv/inc/unxmacxi.mk b/solenv/inc/unxmacxi.mk index 6d27121366e5..09d5d424b690 100644 --- a/solenv/inc/unxmacxi.mk +++ b/solenv/inc/unxmacxi.mk @@ -55,7 +55,6 @@ CFLAGSENABLESYMBOLS=-g .IF "$(SNOW_LEOPARD_10_4)"!="" JAVACOMPILER+=-target 1.5 -DYLD_INSERT_LIBRARIES=/usr/lib/libsqlite3.dylib .EXPORT: DYLD_INSERT_LIBRARIES .ENDIF # "$(SNOW_LEOPARD_10_4)"!="" -- cgit From e71aa67dbc0ed1f2833a756edf80efc8bb218ea5 Mon Sep 17 00:00:00 2001 From: Joachim Lingner Date: Mon, 30 Nov 2009 16:26:38 +0100 Subject: jl144: #i105977# nss breaks on 64 bit FreeBSD --- nss/makefile.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nss/makefile.mk b/nss/makefile.mk index 4ddd2b39015f..8c15297cdf44 100644 --- a/nss/makefile.mk +++ b/nss/makefile.mk @@ -65,6 +65,13 @@ USE_64:=1 .ENDIF # "$(CPU)"=="X" .ENDIF # "$(OS)$(COM)"=="LINUXGCC" +.IF "$(OS)$(COM)"=="FREEBSDGCC" +.IF "$(CPU)"=="X" +# force 64-bit buildmode +USE_64:=1 +.EXPORT : USE_64 +.ENDIF # "$(CPU)"=="X" +.ENDIF # "$(OS)$(COM)"=="LINUXGCC" .IF "$(OS)"=="MACOSX" .IF "$(EXTRA_CFLAGS)"!="" -- cgit From 7f2b90a903fb4159c62dcbced97342974dff951a Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 1 Dec 2009 12:34:31 +0100 Subject: aw078: added different define for inclusion of test code --- .../source/primitive2d/graphicprimitive2d.cxx | 25 +++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index 7c33d7974dd9..6d1540594dc9 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -58,11 +58,14 @@ ////////////////////////////////////////////////////////////////////////////// // includes for testing MetafilePrimitive2D::create2DDecomposition -#ifdef DBG_UTIL +// this switch defines if the test code is included or not +#undef USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE + +#ifdef USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE #include #include #include -#endif // DBG_UTIL +#endif // USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE ////////////////////////////////////////////////////////////////////////////// @@ -220,7 +223,13 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence GraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence GraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& +#ifdef USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE + rViewInformation +#else + /*rViewInformation*/ +#endif // USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE + ) const { Primitive2DSequence aRetval; @@ -302,14 +311,14 @@ namespace drawinglayer case GRAPHIC_GDIMETAFILE : { -#ifdef DBG_UTIL +#ifdef USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE static bool bDoTest(false); if(bDoTest) { // All this is/was test code for testing MetafilePrimitive2D::create2DDecomposition // extensively. It may be needed again when diverse actions need debugging, so i leave - // it in here, but take it out using DBG_UTIL. + // it in here, but take it out using USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE. // Use it by compiling with the code, insert any DrawObject, convert to Metafile. The // debugger will then stop here (when breakpoint set, of course). You may enter single // parts of actions and/or change to true what You want to check. @@ -740,7 +749,7 @@ namespace drawinglayer } else { -#endif // DBG_UTIL +#endif // USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE // create MetafilePrimitive2D const Graphic aGraphic(getGraphicObject().GetGraphic()); const GDIMetaFile& rMetafile = aTransformedGraphic.GetGDIMetaFile(); @@ -773,9 +782,9 @@ namespace drawinglayer basegfx::B2DPolyPolygon(aMaskPolygon), aChildContent)); } -#ifdef DBG_UTIL +#ifdef USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE } -#endif // DBG_UTIL +#endif // USE_DEBUG_CODE_TO_TEST_METAFILE_DECOMPOSE break; } -- cgit From ead5b1e338399f18cbabfbe7d38628f68443e680 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 1 Dec 2009 11:43:22 +0000 Subject: cmcfixes68: #i107182# ppc fix argument passing in a rare case --- bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx index 1aca0f480b6a..deede37c942f 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx @@ -164,11 +164,11 @@ static typelib_TypeClass cpp2uno_call( case typelib_TypeClass_HYPER: case typelib_TypeClass_UNSIGNED_HYPER: - if (ng < 7) { - if (ng & 1) { - ng++; - gpreg++; - } + if (ng & 1) { + ng++; + gpreg++; + } + if (ng < 8) { pCppArgs[nPos] = gpreg; pUnoArgs[nPos] = gpreg; ng += 2; -- cgit From a24c356d4b6dc6c38c11f3fd7dd55e105994f279 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 1 Dec 2009 11:43:22 +0000 Subject: cmcfixes68: #i107182# ppc fix argument passing in a rare case --- .../com/sun/star/comp/bridge/TestComponent.java | 4 ++++ testtools/source/bridgetest/bridgetest.cxx | 28 ++++++++++++---------- testtools/source/bridgetest/cli/cli_cs_testobj.cs | 5 ++++ testtools/source/bridgetest/cppobj.cxx | 2 ++ testtools/source/bridgetest/idl/bridgetest.idl | 5 ++++ 5 files changed, 32 insertions(+), 12 deletions(-) diff --git a/testtools/com/sun/star/comp/bridge/TestComponent.java b/testtools/com/sun/star/comp/bridge/TestComponent.java index 3a3c60b8146d..57582203fe2d 100644 --- a/testtools/com/sun/star/comp/bridge/TestComponent.java +++ b/testtools/com/sun/star/comp/bridge/TestComponent.java @@ -495,6 +495,10 @@ public class TestComponent { return i_Struct; } + public int testPPCAlignment( long l1, long l2, int i1, long l3, int i2 ) throws com.sun.star.uno.RuntimeException { + return i2; + } + // Attributes public boolean getBool() throws com.sun.star.uno.RuntimeException { return _bool; diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index 45edf5f53392..cf286c30d16f 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -535,24 +535,28 @@ static sal_Bool performTest( bRet = check( equals( aData, aRet ) && equals( aData, aRet2 ) , "struct comparison test") && bRet; { - SmallStruct aIn(1, 2); - SmallStruct aOut = xLBT->echoSmallStruct(aIn); - bRet = check( memcmp(&aIn, &aOut, sizeof(SmallStruct)) == 0, "small struct test" ) && bRet; + SmallStruct aIn(1, 2); + SmallStruct aOut = xLBT->echoSmallStruct(aIn); + bRet = check( memcmp(&aIn, &aOut, sizeof(SmallStruct)) == 0, "small struct test" ) && bRet; } { - MediumStruct aIn(1, 2, 3, 4); - MediumStruct aOut = xLBT->echoMediumStruct(aIn); - bRet = check( memcmp(&aIn, &aOut, sizeof(MediumStruct)) == 0, "medium struct test" ) && bRet; + MediumStruct aIn(1, 2, 3, 4); + MediumStruct aOut = xLBT->echoMediumStruct(aIn); + bRet = check( memcmp(&aIn, &aOut, sizeof(MediumStruct)) == 0, "medium struct test" ) && bRet; } { - BigStruct aIn(1, 2, 3, 4, 5, 6, 7, 8); - BigStruct aOut = xLBT->echoBigStruct(aIn); - bRet = check( memcmp(&aIn, &aOut, sizeof(BigStruct)) == 0, "big struct test" ) && bRet; + BigStruct aIn(1, 2, 3, 4, 5, 6, 7, 8); + BigStruct aOut = xLBT->echoBigStruct(aIn); + bRet = check( memcmp(&aIn, &aOut, sizeof(BigStruct)) == 0, "big struct test" ) && bRet; } { - AllFloats aIn(1.1f, 2.2f, 3.3f, 4.4f); - AllFloats aOut = xLBT->echoAllFloats(aIn); - bRet = check( memcmp(&aIn, &aOut, sizeof(AllFloats)) == 0, "all floats struct test" ) && bRet; + AllFloats aIn(1.1f, 2.2f, 3.3f, 4.4f); + AllFloats aOut = xLBT->echoAllFloats(aIn); + bRet = check( memcmp(&aIn, &aOut, sizeof(AllFloats)) == 0, "all floats struct test" ) && bRet; + } + { + sal_Int32 i2 = xLBT->testPPCAlignment( 0, 0, 0, 0, 0xbeaf ); + bRet = check( i2 == 0xbeaf, "ppc-style alignment test" ) && bRet; } // Test extended attributes that raise exceptions: diff --git a/testtools/source/bridgetest/cli/cli_cs_testobj.cs b/testtools/source/bridgetest/cli/cli_cs_testobj.cs index 2f1c9dde78f6..0801eb95274f 100644 --- a/testtools/source/bridgetest/cli/cli_cs_testobj.cs +++ b/testtools/source/bridgetest/cli/cli_cs_testobj.cs @@ -247,6 +247,11 @@ public class BridgeTestObject : WeakBase, XRecursiveCall, XBridgeTest2 return arg; } + public int testPPCAlignment( long l1, long l2, int i1, long l3, int i2 ) + { + return i2; + } + // Attributes public bool Bool { diff --git a/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx index 9a8a6508a069..f05bb8e1db2f 100644 --- a/testtools/source/bridgetest/cppobj.cxx +++ b/testtools/source/bridgetest/cppobj.cxx @@ -225,6 +225,8 @@ public: { return rStruct; } virtual AllFloats SAL_CALL echoAllFloats(const AllFloats& rStruct) throw(com::sun::star::uno::RuntimeException) { return rStruct; } + virtual sal_Int32 SAL_CALL testPPCAlignment( sal_Int64, sal_Int64, sal_Int32, sal_Int64, sal_Int32 i2 ) throw(com::sun::star::uno::RuntimeException) + { return i2; } virtual sal_Bool SAL_CALL getBool() throw(com::sun::star::uno::RuntimeException) { return _aData.Bool; } diff --git a/testtools/source/bridgetest/idl/bridgetest.idl b/testtools/source/bridgetest/idl/bridgetest.idl index 206956755ee1..be54e4e9d07e 100644 --- a/testtools/source/bridgetest/idl/bridgetest.idl +++ b/testtools/source/bridgetest/idl/bridgetest.idl @@ -269,6 +269,11 @@ interface XBridgeTestBase : com::sun::star::uno::XInterface */ AllFloats echoAllFloats( [in] AllFloats aStruct ); + /** + * register return test 4 (i107182) + */ + long testPPCAlignment( [in] hyper l1, [in] hyper l2, [in] long i1, [in] hyper l3, [in] long i2 ); + [attribute] boolean Bool; [attribute] byte Byte; [attribute] char Char; -- cgit From d0a8f938405309b81e0705a63c365fa9c1394788 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 1 Dec 2009 11:47:26 +0000 Subject: cmcfixes68: #i107183# ppc-linux: add support for softfloat toolchains --- .../source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx | 71 ++++++++++++++++++++-- .../source/cpp_uno/gcc3_linux_powerpc/except.cxx | 6 +- .../source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx | 54 +++++++++++++--- 3 files changed, 115 insertions(+), 16 deletions(-) diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx index deede37c942f..e901a110213f 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx @@ -61,7 +61,9 @@ static typelib_TypeClass cpp2uno_call( sal_Int64 * pRegisterReturn /* space for register return */ ) { int ng = 0; //number of gpr registers used +#ifndef __NO_FPRS__ int nf = 0; //number of fpr regsiters used +#endif void ** pCppStack; //temporary stack pointer // gpreg: [ret *], this, [gpr params] @@ -123,11 +125,23 @@ static typelib_TypeClass cpp2uno_call( { case typelib_TypeClass_DOUBLE: +#ifndef __NO_FPRS__ if (nf < 8) { pCppArgs[nPos] = fpreg; pUnoArgs[nPos] = fpreg; nf++; fpreg += 2; +#else + if (ng & 1) { + ng++; + gpreg++; + } + if (ng < 8) { + pCppArgs[nPos] = gpreg; + pUnoArgs[nPos] = gpreg; + ng += 2; + gpreg += 2; +#endif } else { if (((long)ovrflw) & 4) ovrflw++; pCppArgs[nPos] = ovrflw; @@ -139,6 +153,7 @@ static typelib_TypeClass cpp2uno_call( case typelib_TypeClass_FLOAT: // fpreg are all double values so need to // modify fpreg to be a single word float value +#ifndef __NO_FPRS__ if (nf < 8) { float tmp = (float) (*((double *)fpreg)); (*((float *) fpreg)) = tmp; @@ -146,6 +161,13 @@ static typelib_TypeClass cpp2uno_call( pUnoArgs[nPos] = fpreg; nf++; fpreg += 2; +#else + if (ng < 8) { + pCppArgs[nPos] = gpreg; + pUnoArgs[nPos] = gpreg; + ng++; + gpreg++; +#endif } else { #if 0 /* abi is not being followed correctly */ if (((long)ovrflw) & 4) ovrflw++; @@ -488,10 +510,12 @@ static typelib_TypeClass cpp_mediate( static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpregptr, void** fpregptr, void** ovrflw) { sal_Int32 gpreg[8]; - double fpreg[8]; - memcpy( gpreg, gpregptr, 32); + +#ifndef __NO_FPRS__ + double fpreg[8]; memcpy( fpreg, fpregptr, 64); +#endif volatile long nRegReturn[2]; @@ -499,10 +523,14 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg // fprintf(stderr,"in cpp_vtable_call nVtableOffset is %x\n",nVtableOffset); // fflush(stderr); - sal_Bool bComplex = nFunctionIndex & 0x80000000 ? sal_True : sal_False; - typelib_TypeClass aType = - cpp_mediate( nFunctionIndex, nVtableOffset, (void**)gpreg, (void**)fpreg, ovrflw, (sal_Int64*)nRegReturn ); + cpp_mediate( nFunctionIndex, nVtableOffset, (void**)gpreg, +#ifndef __NO_FPRS__ + (void**)fpreg, +#else + NULL, +#endif + ovrflw, (sal_Int64*)nRegReturn ); switch( aType ) { @@ -524,13 +552,25 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg break; case typelib_TypeClass_FLOAT: +#ifndef __NO_FPRS__ __asm__( "lfs 1,%0\n\t" : : "m" (*((float*)nRegReturn)) ); + #else + __asm__( "lwz 3,%0\n\t" : : + "m"(nRegReturn[0]) ); +#endif break; case typelib_TypeClass_DOUBLE: +#ifndef __NO_FPRS__ __asm__( "lfd 1,%0\n\t" : : "m" (*((double*)nRegReturn)) ); +#else + __asm__( "lwz 3,%0\n\t" : : + "m"(nRegReturn[0]) ); + __asm__( "lwz 4,%0\n\t" : : + "m"(nRegReturn[1]) ); +#endif break; case typelib_TypeClass_HYPER: @@ -577,6 +617,7 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal // # next save fpr 1 to fpr 8 (aligned to 8) + // if dedicated floating point registers are used // stfd f1,-2016(r1) // stfd f2,-2008(r1) // stfd f3,-2000(r1) @@ -604,6 +645,10 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal // #now load up the pointer to the saved fpr registers // addi r6,r1,-2016 + // if no dedicated floating point registers are used than we have NULL + // pointer there + // li r6, 0 + // // #now load up the pointer to the overflow call stack // addi r7,r1,8 @@ -617,6 +662,7 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal * p++ = 0x9101f814; * p++ = 0x9121f818; * p++ = 0x9141f81c; +#ifndef __NO_FPRS__ * p++ = 0xd821f820; * p++ = 0xd841f828; * p++ = 0xd861f830; @@ -625,6 +671,17 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal * p++ = 0xd8c1f848; * p++ = 0xd8e1f850; * p++ = 0xd901f858; +#else + /* these nops could be replaced with a smaller codeSnippetSize - 8 * 4 */ + * p++ = 0x60000000; + * p++ = 0x60000000; + * p++ = 0x60000000; + * p++ = 0x60000000; + * p++ = 0x60000000; + * p++ = 0x60000000; + * p++ = 0x60000000; + * p++ = 0x60000000; +#endif * p++ = 0x3c600000 | (((unsigned long)cpp_vtable_call) >> 16); * p++ = 0x60630000 | (((unsigned long)cpp_vtable_call) & 0x0000FFFF); * p++ = 0x7c6903a6; @@ -633,7 +690,11 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal * p++ = 0x3c800000 | (((unsigned long)vtableOffset) >> 16); * p++ = 0x60840000 | (((unsigned long)vtableOffset) & 0x0000FFFF); * p++ = 0x38a1f800; +#ifndef __NO_FPRS__ * p++ = 0x38c1f820; +#else + * p++ = 0x38c00000; +#endif * p++ = 0x38e10008; * p++ = 0x4e800420; return (code + codeSnippetSize); diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx index 28ad7dc83ed7..adb10dae24c7 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx @@ -137,8 +137,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName; MutexGuard guard( m_mutex ); - t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) ); - if (iFind == m_rttis.end()) + t_rtti_map::const_iterator iRttiFind( m_rttis.find( unoName ) ); + if (iRttiFind == m_rttis.end()) { // RTTI symbol OStringBuffer buf( 64 ); @@ -202,7 +202,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR } else { - rtti = iFind->second; + rtti = iRttiFind->second; } return rtti; diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx index 2a8626733f24..8c527df2d48c 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx @@ -74,12 +74,14 @@ static void callVirtualMethod( void (*ptr)(); int gpr[8]; // storage for gpregisters, map to r3-r10 int off; // offset used to find function +#ifndef __NO_FPRS__ double fpr[8]; // storage for fpregisters, map to f1-f8 - int n; // number of gprs mapped so far int f; // number of fprs mapped so far + double dret; // temporary function return values +#endif + int n; // number of gprs mapped so far long *p; // pointer to parameter overflow area int c; // character of parameter type being decoded - double dret; // temporary function return values int iret, iret2; // Because of the Power PC calling conventions we could be passing @@ -93,7 +95,7 @@ static void callVirtualMethod( // Note: could require up to 2*nStackLongs words of parameter stack area // if the call has many float parameters (i.e. floats take up only 1 - // word on the stack but take 2 words in parameter area in the + // word on the stack but double takes 2 words in parameter area in the // stack frame . // Update! floats on the outgoing parameter stack only take up 1 word @@ -119,7 +121,9 @@ static void callVirtualMethod( // now begin to load the C++ function arguments into storage n = 0; +#ifndef __NO_FPRS__ f = 0; +#endif // now we need to parse the entire signature string */ // until we get the END indicator */ @@ -143,8 +147,16 @@ static void callVirtualMethod( c = *pPT; switch (c) { case 'D': /* type is double */ +#ifndef __NO_FPRS__ if (f < 8) { fpr[f++] = *((double *)pStackLongs); /* store in register */ +#else + if (n & 1) + n++; + if (n < 8) { + gpr[n++] = *pStackLongs; + gpr[n++] = *(pStackLongs+1); +#endif } else { if (((long) p) & 4) p++; @@ -163,8 +175,13 @@ static void callVirtualMethod( store floats as a *single* word on outgoing parameter stack to match what gcc actually does */ +#ifndef __NO_FPRS__ if (f < 8) { fpr[f++] = *((float *)pStackLongs); +#else + if (n < 8) { + gpr[n++] = *pStackLongs; +#endif } else { #if 0 /* if abi were followed */ if (((long) p) & 4) @@ -243,6 +260,7 @@ static void callVirtualMethod( "lwz 8, 20(%0)\n\t" "lwz 9, 24(%0)\n\t" "lwz 10, 28(%0)\n\t" +#ifndef __NO_FPRS__ "lfd 1, 0(%1)\n\t" "lfd 2, 8(%1)\n\t" "lfd 3, 16(%1)\n\t" @@ -252,16 +270,24 @@ static void callVirtualMethod( "lfd 7, 48(%1)\n\t" "lfd 8, 56(%1)\n\t" : : "r" (gpr), "r" (fpr) +#else + : : "r" (gpr) +#endif : "0", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" ); (*ptr)(); __asm__ __volatile__ ( - "mr %1, 3\n\t" - "mr %2, 4\n\t" - "fmr %0, 1\n\t" - : "=f" (dret), "=r" (iret), "=r" (iret2) : ); + "mr %0, 3\n\t" + "mr %1, 4\n\t" +#ifndef __NO_FPRS__ + "fmr %2, 1\n\t" + : "=r" (iret), "=r" (iret2), "=f" (dret) +#else + : "=r" (iret), "=r" (iret2) +#endif + : ); switch( eReturnType ) { @@ -284,10 +310,21 @@ static void callVirtualMethod( *(unsigned char*)pRegisterReturn = (unsigned char)iret; break; case typelib_TypeClass_FLOAT: +#ifndef __NO_FPRS__ *(float*)pRegisterReturn = (float)dret; +#else + ((unsigned int*)pRegisterReturn)[0] = iret; +#endif break; case typelib_TypeClass_DOUBLE: +#ifndef __NO_FPRS__ *(double*)pRegisterReturn = dret; +#else + ((unsigned int*)pRegisterReturn)[0] = iret; + ((unsigned int*)pRegisterReturn)[1] = iret2; +#endif + break; + default: break; } } @@ -399,6 +436,8 @@ static void cpp_call( case typelib_TypeClass_UNSIGNED_HYPER: *pPT++ = 'H'; pCppStack += sizeof(sal_Int32); // extra long + default: + break; } // no longer needed @@ -518,7 +557,6 @@ void unoInterfaceProxyDispatch( // is my surrogate bridges::cpp_uno::shared::UnoInterfaceProxy * pThis = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy *> (pUnoI); - typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr; switch (pMemberDescr->eTypeClass) { -- cgit From 15359030dd8716c7e6ddc6bd43e56feea7a5e6b3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 1 Dec 2009 11:57:48 +0000 Subject: cmcfixes68: #i107349# restrict the visibility test to x86_64/x86, its wrong for so many other platforms --- configure.in | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index 37fa42796ce9..1fef4f96a020 100644 --- a/configure.in +++ b/configure.in @@ -2709,11 +2709,18 @@ _ACEOF if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then gccvisbroken=yes else - if $EGREP -q '@PLT|\$stub|\(PLT\)' visibility.s; then - gccvisbroken=no; - else - gccvisbroken=yes; - fi + case "$build_cpu" in + i?86|x86_64) + if $EGREP -q '@PLT' visibility.s; then + gccvisbroken=no + else + gccvisbroken=yes + fi + ;; + *) + gccvisbroken=no + ;; + esac fi rm -f visibility.s -- cgit From a48c816527cf9f534b8a3492ddf9ccaf1ccdc362 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Tue, 1 Dec 2009 14:34:05 +0100 Subject: awo78: changed MetaFile index to something more sophisticated for security reasons --- .../source/primitive2d/metafileprimitive2d.cxx | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 94e642d06469..2fb3d119d4bd 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -1630,9 +1630,9 @@ namespace { const sal_uInt32 nCount(rMetaFile.GetActionCount()); - for(sal_uInt32 a(0); a < nCount; a++) + for(sal_uInt32 nAction(0); nAction < nCount; nAction++) { - MetaAction* pAction = rMetaFile.GetAction(a); + MetaAction* pAction = rMetaFile.GetAction(nAction); switch(pAction->GetType()) { @@ -1647,7 +1647,7 @@ namespace std::vector< basegfx::B2DPoint > aPositions; Color aLastColor(COL_BLACK); - while(META_PIXEL_ACTION == pAction->GetType() && a < nCount) + while(META_PIXEL_ACTION == pAction->GetType() && nAction < nCount) { const MetaPixelAction* pA = (const MetaPixelAction*)pAction; @@ -1664,10 +1664,10 @@ namespace const Point& rPoint = pA->GetPoint(); aPositions.push_back(basegfx::B2DPoint(rPoint.X(), rPoint.Y())); - a++; if(a < nCount) pAction = rMetaFile.GetAction(a); + nAction++; if(nAction < nCount) pAction = rMetaFile.GetAction(nAction); } - a--; + nAction--; if(aPositions.size()) { @@ -1683,15 +1683,15 @@ namespace { std::vector< basegfx::B2DPoint > aPositions; - while(META_POINT_ACTION == pAction->GetType() && a < nCount) + while(META_POINT_ACTION == pAction->GetType() && nAction < nCount) { const MetaPointAction* pA = (const MetaPointAction*)pAction; const Point& rPoint = pA->GetPoint(); aPositions.push_back(basegfx::B2DPoint(rPoint.X(), rPoint.Y())); - a++; if(a < nCount) pAction = rMetaFile.GetAction(a); + nAction++; if(nAction < nCount) pAction = rMetaFile.GetAction(nAction); } - a--; + nAction--; if(aPositions.size()) { @@ -1709,7 +1709,7 @@ namespace basegfx::B2DPolygon aLinePolygon; LineInfo aLineInfo; - while(META_LINE_ACTION == pAction->GetType() && a < nCount) + while(META_LINE_ACTION == pAction->GetType() && nAction < nCount) { const MetaLineAction* pA = (const MetaLineAction*)pAction; const Point& rStartPoint = pA->GetStartPoint(); @@ -1741,10 +1741,10 @@ namespace aLinePolygon.append(aEnd); } - a++; if(a < nCount) pAction = rMetaFile.GetAction(a); + nAction++; if(nAction < nCount) pAction = rMetaFile.GetAction(nAction); } - a--; + nAction--; if(aLinePolygon.count()) { @@ -1937,7 +1937,7 @@ namespace if(aPolygonOutline.count() > 1 && !aPolygonOutline.isClosed()) { aPolygonOutline.setClosed(true); - aPolyPolygonOutline.setB2DPolygon(a, aPolygonOutline); + aPolyPolygonOutline.setB2DPolygon(b, aPolygonOutline); } } @@ -2923,7 +2923,7 @@ namespace // better to use this info const MetaGradientExAction* pMetaGradientExAction = 0; bool bDone(false); - sal_uInt32 b(a + 1); + sal_uInt32 b(nAction + 1); for(; !bDone && b < nCount; b++) { @@ -2945,7 +2945,7 @@ namespace if(bDone && pMetaGradientExAction) { // consume actions and skip forward - a = b - 1; + nAction = b - 1; // get geometry data basegfx::B2DPolyPolygon aPolyPolygon(pMetaGradientExAction->GetPolyPolygon().getB2DPolyPolygon()); -- cgit From 3b790d2e0926c75a8a919e02bfad05d1b1aff800 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Thu, 3 Dec 2009 12:33:17 +0100 Subject: aw078: corrected small VCL Linux error for non-AA cases --- vcl/source/gdi/outdev.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index 7352f5ed45d9..8b20c8e384f7 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -2653,7 +2653,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly, const LineInfo& rLineInfo void OutputDevice::ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineInfo& rLineInfo) { - const USHORT nPoints(rPoly.GetSize()); + USHORT nPoints(rPoly.GetSize()); if ( !IsDeviceOutputNecessary() || !mbLineColor || ( nPoints < 2 ) || ( LINE_NONE == rLineInfo.GetStyle() ) || ImplIsRecordLayout() ) return; @@ -2698,6 +2698,15 @@ void OutputDevice::ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineI } else { + // #100127# the subdivision HAS to be done here since only a pointer + // to an array of points is given to the DrawPolyLine method, there is + // NO way to find out there that it's a curve. + if( aPoly.HasFlags() ) + { + aPoly = ImplSubdivideBezier( aPoly ); + nPoints = aPoly.GetSize(); + } + mpGraphics->DrawPolyLine(nPoints, (const SalPoint*)aPoly.GetConstPointAry(), this); } -- cgit From 5777dea500e1b50cf0b8bd3fdce501bcfb7dc89a Mon Sep 17 00:00:00 2001 From: Dirk Voelzke Date: Thu, 3 Dec 2009 12:35:08 +0100 Subject: native273:#i106809# Use vcredist*.exe instead of merge modules --- desktop/win32/source/setup/setup.cpp | 114 ++++++++++++++++++++++++++++++ desktop/win32/source/setup/setup.hxx | 4 +- desktop/win32/source/setup/setup_main.cxx | 3 + desktop/win32/source/setup/setup_main.hxx | 1 + 4 files changed, 121 insertions(+), 1 deletion(-) diff --git a/desktop/win32/source/setup/setup.cpp b/desktop/win32/source/setup/setup.cpp index fb29c13d3a1c..c51dcd105bfd 100644 --- a/desktop/win32/source/setup/setup.cpp +++ b/desktop/win32/source/setup/setup.cpp @@ -76,6 +76,7 @@ #define PARAM_PATCH TEXT( " /update " ) #define PARAM_REG_ALL_MSO_TYPES TEXT( "REGISTER_ALL_MSO_TYPES=1 " ) #define PARAM_REG_NO_MSO_TYPES TEXT( "REGISTER_NO_MSO_TYPES=1 " ) +#define PARAM_SILENTINSTALL TEXT( " /QB" ) #define PARAM_RUNNING TEXT( "ignore_running" ) #define CMDLN_REG_ALL_MSO_TYPES TEXT( "msoreg=1" ) @@ -85,6 +86,11 @@ #define ADVAPI32_DLL TEXT( "advapi32.dll" ) #define PROFILE_NAME TEXT( "setup.ini" ) +#define RUNTIME_X64_NAME TEXT( "redist\\vcredist_x64.exe" ) +#define RUNTIME_X86_NAME TEXT( "redist\\vcredist_x86.exe" ) +#define PRODUCTCODE_X86 TEXT( "{E503B4BF-F7BB-3D5F-8BC8-F694B1CFF942}" ) +#define PRODUCTCODE_X64 TEXT( "{350AA351-21FA-3270-8B7A-835434E766AD}" ) + #define MSIAPI_DllGetVersion "DllGetVersion" #define ADVAPI32API_CheckTokenMembership "CheckTokenMembership" @@ -1896,6 +1902,114 @@ boolean SetupAppX::IsPatchInstalled( TCHAR* pBaseDir, TCHAR* pFileName ) return false; } +//-------------------------------------------------------------------------- +boolean SetupAppX::InstallRuntimes( TCHAR *sProductCode, TCHAR *sRuntimePath ) +{ + INSTALLSTATE nRet = MsiQueryProductState( sProductCode ); + OutputDebugStringFormat( TEXT( "MsiQueryProductState returned <%d>\r\n" ), nRet ); + if ( nRet == INSTALLSTATE_DEFAULT ) + return true; + + Log( TEXT( " Will install runtime <%s>\r\n" ), sRuntimePath ); + OutputDebugStringFormat( TEXT( " Will install runtime <%s>\r\n" ), sRuntimePath ); + + STARTUPINFO aSUI; + PROCESS_INFORMATION aPI; + + ZeroMemory( (void*)&aPI, sizeof( PROCESS_INFORMATION ) ); + ZeroMemory( (void*)&aSUI, sizeof( STARTUPINFO ) ); + + aSUI.cb = sizeof(STARTUPINFO); + aSUI.dwFlags = STARTF_USESHOWWINDOW; + aSUI.wShowWindow = SW_SHOW; + + DWORD nCmdLineLength = lstrlen( sRuntimePath ) + lstrlen( PARAM_SILENTINSTALL ) + 2; + TCHAR *sCmdLine = new TCHAR[ nCmdLineLength ]; + + if ( FAILED( StringCchCopy( sCmdLine, nCmdLineLength, sRuntimePath ) ) || + FAILED( StringCchCat( sCmdLine, nCmdLineLength, PARAM_SILENTINSTALL ) ) ) + { + delete [] sCmdLine; + SetError( ERROR_INSTALL_FAILURE ); + return false; + } + + if ( !WIN::CreateProcess( NULL, sCmdLine, NULL, NULL, FALSE, + CREATE_DEFAULT_ERROR_MODE, NULL, NULL, + &aSUI, &aPI ) ) + { + Log( TEXT( "ERROR: Could not create process %s.\r\n" ), sCmdLine ); + SetError( WIN::GetLastError() ); + delete [] sCmdLine; + return false; + } + + DWORD nResult = WaitForProcess( aPI.hProcess ); + bool bRet = true; + + if( ERROR_SUCCESS != nResult ) + { + Log( TEXT( "ERROR: While waiting for %s.\r\n" ), sCmdLine ); + SetError( nResult ); + bRet = false; + } + else + { + GetExitCodeProcess( aPI.hProcess, &nResult ); + SetError( nResult ); + + if ( nResult != ERROR_SUCCESS ) + { + TCHAR sBuf[80]; + StringCchPrintf( sBuf, 80, TEXT("Warning: install runtime returned %u.\r\n"), nResult ); + Log( sBuf ); + } + else + Log( TEXT( " Installation of runtime completed successfully.\r\n" ) ); + } + + CloseHandle( aPI.hProcess ); + + delete [] sCmdLine; + + return bRet; +} + +//-------------------------------------------------------------------------- +boolean SetupAppX::InstallRuntimes() +{ + TCHAR *sRuntimePath = 0; + SYSTEM_INFO siSysInfo; + + GetNativeSystemInfo(&siSysInfo); + + OutputDebugStringFormat( TEXT( "found architecture<%d>\r\n" ), siSysInfo.wProcessorArchitecture ); + + if ( siSysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 ) + { + if ( GetPathToFile( RUNTIME_X64_NAME, &sRuntimePath ) ) + InstallRuntimes( PRODUCTCODE_X64, sRuntimePath ); + else + Log( TEXT( "ERROR: no installer for x64 runtime libraries found!" ) ); + + if ( sRuntimePath ) + { + delete [] sRuntimePath; + sRuntimePath = 0; + } + } + + if ( GetPathToFile( RUNTIME_X86_NAME, &sRuntimePath ) ) + InstallRuntimes( PRODUCTCODE_X86, sRuntimePath ); + else + Log( TEXT( "ERROR: no installer for x86 runtime libraries found!" ) ); + + if ( sRuntimePath ) + delete [] sRuntimePath; + + return true; +} + //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- LanguageDataX::LanguageDataX( LPTSTR pData ) diff --git a/desktop/win32/source/setup/setup.hxx b/desktop/win32/source/setup/setup.hxx index 72785cc75b31..169254db87ab 100644 --- a/desktop/win32/source/setup/setup.hxx +++ b/desktop/win32/source/setup/setup.hxx @@ -119,12 +119,13 @@ private: LPTSTR *pNext, boolean bStripQuotes = false ); boolean IsAdmin(); - boolean GetCommandLine(); boolean IsTerminalServerInstalled() const; void AddFileToPatchList( TCHAR* pPath, TCHAR* pFile ); boolean IsPatchInstalled( TCHAR* pBaseDir, TCHAR* pFileName ); + boolean InstallRuntimes( TCHAR* pProductCode, TCHAR* pFileName ); + public: SetupAppX(); ~SetupAppX(); @@ -136,6 +137,7 @@ public: virtual boolean ChooseLanguage( long& rLanguage ); virtual boolean CheckVersion(); virtual boolean CheckForUpgrade(); + virtual boolean InstallRuntimes(); virtual boolean Install( long nLanguage ); virtual UINT GetError() const; diff --git a/desktop/win32/source/setup/setup_main.cxx b/desktop/win32/source/setup/setup_main.cxx index 515363749c55..6c96bde46b12 100644 --- a/desktop/win32/source/setup/setup_main.cxx +++ b/desktop/win32/source/setup/setup_main.cxx @@ -124,6 +124,9 @@ extern "C" int __stdcall WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, int ) if ( ! pSetup->ChooseLanguage( nLanguage ) ) throw pSetup->GetError(); + if ( ! pSetup->InstallRuntimes() ) + throw pSetup->GetError(); + if ( ! pSetup->Install( nLanguage ) ) throw pSetup->GetError(); } diff --git a/desktop/win32/source/setup/setup_main.hxx b/desktop/win32/source/setup/setup_main.hxx index 67b54adc0d2a..28200fcae757 100644 --- a/desktop/win32/source/setup/setup_main.hxx +++ b/desktop/win32/source/setup/setup_main.hxx @@ -53,6 +53,7 @@ public: virtual boolean ChooseLanguage( long& rLanguage ) = 0; virtual boolean CheckVersion() = 0; virtual boolean CheckForUpgrade() = 0; + virtual boolean InstallRuntimes() = 0; virtual boolean Install( long nLanguage ) = 0; virtual UINT GetError() const = 0; -- cgit From 0dca6e895fd120809d68bedabd6abfd2409df64c Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 3 Dec 2009 14:19:56 +0100 Subject: d2v02: #161005# use X11 link dependency only where really required --- solenv/inc/unxlng.mk | 6 ++++-- solenv/inc/unxsoli4.mk | 2 +- solenv/inc/unxsols4.mk | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/solenv/inc/unxlng.mk b/solenv/inc/unxlng.mk index a79d3e47c6cf..6f44a784edcc 100644 --- a/solenv/inc/unxlng.mk +++ b/solenv/inc/unxlng.mk @@ -208,12 +208,14 @@ LINKFLAGS += -Wl,-zdynsort .ENDIF # libraries for linking applications -STDLIBGUIMT+=-Wl,--as-needed -lX11 -ldl -lpthread -lm -Wl,--no-as-needed +STDLIBGUIMT+=-Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed STDLIBCUIMT+=-Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed # libraries for linking shared libraries -STDSHLGUIMT+=-Wl,--as-needed -lX11 -lXext -ldl -lpthread -lm -Wl,--no-as-needed +STDSHLGUIMT+=-Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed STDSHLCUIMT+=-Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed +X11LINK_DYNAMIC = -Wl,--as-needed -lXext -lX11 -Wl,--no-as-needed + LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive .IF "$(USE_STLP_DEBUG)" != "" diff --git a/solenv/inc/unxsoli4.mk b/solenv/inc/unxsoli4.mk index afcea59a9971..c4c777376561 100644 --- a/solenv/inc/unxsoli4.mk +++ b/solenv/inc/unxsoli4.mk @@ -199,7 +199,7 @@ STDSHLCUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc # libdl.so - no really an GUI library but required in this context STDLIBGUIMT+=-ldl STDSHLGUIMT+=-ldl -X11LINK_DYNAMIC = -lX11 +X11LINK_DYNAMIC = -lXext -lX11 # @@@ interposer needed for -Bdirect @@@ # LIBSALCPPRT*=-z allextract -lsalcpprt -z defaultextract diff --git a/solenv/inc/unxsols4.mk b/solenv/inc/unxsols4.mk index a28b097e13b4..67bafa3a1c14 100644 --- a/solenv/inc/unxsols4.mk +++ b/solenv/inc/unxsols4.mk @@ -205,7 +205,7 @@ STDSHLCUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc # libdl.so - no really an GUI library but required in this context STDLIBGUIMT+=-ldl STDSHLGUIMT+=-ldl -X11LINK_DYNAMIC = -lX11 +X11LINK_DYNAMIC = -lXext -lX11 # @@@ interposer needed for -Bdirect @@@ # LIBSALCPPRT*=-z allextract -lsalcpprt -z defaultextract -- cgit From 19e23268c7a0e1548672de1c4adc185726315b1f Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 3 Dec 2009 14:19:56 +0100 Subject: d2v02: #161005# use X11 link dependency only where really required --- desktop/util/makefile.mk | 6 ------ 1 file changed, 6 deletions(-) diff --git a/desktop/util/makefile.mk b/desktop/util/makefile.mk index 05f129b3c5fc..09d344ae1d95 100644 --- a/desktop/util/makefile.mk +++ b/desktop/util/makefile.mk @@ -119,12 +119,6 @@ APP1STDLIBS = \ $(VOSLIB) -.IF "$(GUI)" == "UNX" -.IF "$(OS)" == "LINUX" || "$(OS)" == "FREEBSD" -APP1STDLIBS+= -lXext -.ENDIF -.ENDIF - APP1DEPN= $(APP1RES) verinfo.rc .IF "$(GUI)" == "WNT" -- cgit From 1c203a23ffd83a57060c0224aa00318bfa4a722f Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Thu, 3 Dec 2009 14:19:56 +0100 Subject: d2v02: #161005# use X11 link dependency only where really required --- extensions/source/plugin/unx/makefile.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/source/plugin/unx/makefile.mk b/extensions/source/plugin/unx/makefile.mk index 902348f0cb7d..5280272af543 100644 --- a/extensions/source/plugin/unx/makefile.mk +++ b/extensions/source/plugin/unx/makefile.mk @@ -77,7 +77,7 @@ APP1STDLIBS=\ $(VOSLIB) \ $(SALLIB) .IF "$(OS)"=="SOLARIS" || "$(OS)"=="SCO" || "$(OS)"=="HPUX" -APP1STDLIBS+=-lXm -lXt -lXext -lX11 -ldl +APP1STDLIBS+=-lXm -lXt $(X11LINK_DYNAMIC) -ldl .ELSE .IF "$(DISABLE_XAW)" != "TRUE" APP1STDLIBS+=-lXaw @@ -85,7 +85,7 @@ APP1STDLIBS+=-lXaw .IF "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" APP1STDLIBS+= -lXt -lXext -lX11 .ELSE -APP1STDLIBS+= -lXt -lXext -lX11 -ldl +APP1STDLIBS+= -lXt $(X11LINK_DYNAMIC) -ldl .ENDIF .ENDIF -- cgit From b3e882c13bb3706c5af2ff0dd01aa90f28cf1d17 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Thu, 3 Dec 2009 17:27:47 +0100 Subject: native275 #i107355# updating to OOo 3.3 --- instsetoo_native/res/DS_Store | Bin 12292 -> 12292 bytes instsetoo_native/util/openoffice.lst | 94 +++++++++---------- scp2/source/base/file_base.scp | 4 +- scp2/source/calc/file_calc.scp | 4 +- scp2/source/calc/registryitem_calc.scp | 4 +- scp2/source/canvas/canvascommons.scp | 2 +- scp2/source/draw/registryitem_draw.scp | 4 +- scp2/source/impress/registryitem_impress.scp | 4 +- scp2/source/layout/layout.scp | 8 +- scp2/source/math/file_math.scp | 2 +- scp2/source/math/registryitem_math.scp | 4 +- scp2/source/onlineupdate/file_onlineupdate.scp | 2 +- scp2/source/ooo/file_improvement.scp | 2 +- scp2/source/ooo/file_library_ooo.scp | 120 ++++++++++++------------- scp2/source/ooo/file_ooo.scp | 18 ++-- scp2/source/ooo/file_resource_ooo.scp | 6 +- scp2/source/ooo/profile_ooo.scp | 2 +- scp2/source/ooo/registryitem_ooo.scp | 32 +++---- scp2/source/ooo/ure.scp | 10 +-- scp2/source/writer/registryitem_writer.scp | 4 +- 20 files changed, 163 insertions(+), 163 deletions(-) diff --git a/instsetoo_native/res/DS_Store b/instsetoo_native/res/DS_Store index d730660fb13f..3b7c9f7794b9 100644 Binary files a/instsetoo_native/res/DS_Store and b/instsetoo_native/res/DS_Store differ diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst index 76c70ed8a435..4626c3427fab 100644 --- a/instsetoo_native/util/openoffice.lst +++ b/instsetoo_native/util/openoffice.lst @@ -4,15 +4,15 @@ Globals { variables { - OOOBASEVERSION 3.2 - OOOPACKAGEVERSION 3.2.0 - UREPACKAGEVERSION 1.6.0 + OOOBASEVERSION 3.3 + OOOPACKAGEVERSION 3.3.0 + UREPACKAGEVERSION 1.7.0 URELAYERVERSION 1 BASISROOTNAME OpenOffice.org UNIXBASISROOTNAME openoffice.org - SERVICETAG_PRODUCTNAME OpenOffice.org 3.2 - SERVICETAG_PRODUCTVERSION 3.2 - SERVICETAG_PARENTNAME OpenOffice.org 3.2 + SERVICETAG_PRODUCTNAME OpenOffice.org 3.3 + SERVICETAG_PRODUCTVERSION 3.3 + SERVICETAG_PARENTNAME OpenOffice.org 3.3 SERVICETAG_SOURCE {buildsource}{minor}(Build:{buildid}) SERVICETAG_URN urn:uuid:cd39f1d0-f2fc-11dd-8c47-080020a9ed93 HIDELICENSEDIALOG 1 @@ -21,7 +21,7 @@ Globals UREPACKAGEPREFIX openoffice.org SOLSUREPACKAGEPREFIX openofficeorg USE_FILEVERSION 1 - LIBRARYVERSION 9.2.0 + LIBRARYVERSION 9.3.0 POOLPRODUCT 1 REGISTRATION_HOST https://registration2.services.openoffice.org/RegistrationWeb REGISTRATIONURL http://survey.services.openoffice.org/user/index.php @@ -35,7 +35,7 @@ Globals CREATE_MSP_INSTALLSET 0 UPDATE_DATABASE_LISTNAME finals_instsetoo.txt PACKAGEMAP package_names.txt,package_names_ext.txt - WINDOWSPATCHLEVEL 4 + WINDOWSPATCHLEVEL 6 } } } @@ -47,7 +47,7 @@ OpenOffice variables { PRODUCTNAME OpenOffice.org - PRODUCTVERSION 3.2 + PRODUCTVERSION 3.3 PRODUCTEXTENSION LONG_PRODUCTEXTENSION SHORT_PRODUCTEXTENSION @@ -55,10 +55,10 @@ OpenOffice POSTVERSIONEXTENSIONUNIX BRANDPACKAGEVERSION 3 USERDIRPRODUCTVERSION 3 - ABOUTBOXPRODUCTVERSION 3.2.0 - BASEPRODUCTVERSION 3.2 + ABOUTBOXPRODUCTVERSION 3.3.0 + BASEPRODUCTVERSION 3.3 PCPFILENAME openoffice.pcp - UPDATEURL http://update34.services.openoffice.org/ProductUpdateService/check.Update + UPDATEURL http://update36.services.openoffice.org/ProductUpdateService/check.Update ODFNOTIFYURL http://odfnotify.services.openoffice.org/OOo3.0/notification.jsp?version=ODF ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,userland.txt REMOVE_UPGRADE_CODE_FILE upgradecode_remove_ooo.txt @@ -67,7 +67,7 @@ OpenOffice FILEFORMATNAME OpenOffice.org FILEFORMATVERSION 1.0 WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1 - PACKAGEVERSION 3.2.0 + PACKAGEVERSION 3.3.0 PACKAGEREVISION {milestone} LICENSENAME LGPL SERVICESPROJEKT 1 @@ -83,7 +83,7 @@ OpenOffice STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A} CHANGETARGETDIR 1 USE_FILEVERSION 1 - LIBRARYVERSION 9.2.0 + LIBRARYVERSION 9.3.0 PATCHCODEFILE ooo_patchcodes.txt DOWNLOADBANNER ooobanner.bmp DOWNLOADBITMAP ooobitmap.bmp @@ -111,7 +111,7 @@ OpenOffice_wJRE variables { PRODUCTNAME OpenOffice.org - PRODUCTVERSION 3.2 + PRODUCTVERSION 3.3 PRODUCTEXTENSION LONG_PRODUCTEXTENSION SHORT_PRODUCTEXTENSION @@ -119,9 +119,9 @@ OpenOffice_wJRE POSTVERSIONEXTENSIONUNIX BRANDPACKAGEVERSION 3 USERDIRPRODUCTVERSION 3 - ABOUTBOXPRODUCTVERSION 3.2.0 - BASEPRODUCTVERSION 3.2 - UPDATEURL http://update34.services.openoffice.org/ProductUpdateService/check.Update + ABOUTBOXPRODUCTVERSION 3.3.0 + BASEPRODUCTVERSION 3.3 + UPDATEURL http://update36.services.openoffice.org/ProductUpdateService/check.Update ODFNOTIFYURL http://odfnotify.services.openoffice.org/OOo3.0/notification.jsp?version=ODF ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,javaversion2.dat,userland.txt REMOVE_UPGRADE_CODE_FILE upgradecode_remove_ooo.txt @@ -130,7 +130,7 @@ OpenOffice_wJRE FILEFORMATNAME OpenOffice.org FILEFORMATVERSION 1.0 WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1 - PACKAGEVERSION 3.2.0 + PACKAGEVERSION 3.3.0 PACKAGEREVISION {milestone} LICENSENAME LGPL SERVICESPROJEKT 1 @@ -146,7 +146,7 @@ OpenOffice_wJRE STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A} CHANGETARGETDIR 1 USE_FILEVERSION 1 - LIBRARYVERSION 9.2.0 + LIBRARYVERSION 9.3.0 PATCHCODEFILE ooo_patchcodes.txt JAVAPRODUCT 1 DOWNLOADBANNER ooobanner.bmp @@ -174,7 +174,7 @@ OpenOffice_Dev variables { PRODUCTNAME OOo-dev - PRODUCTVERSION 3.2 + PRODUCTVERSION 3.3 PRODUCTEXTENSION LONG_PRODUCTEXTENSION SHORT_PRODUCTEXTENSION @@ -184,22 +184,22 @@ OpenOffice_Dev POSTVERSIONEXTENSIONUNIX BRANDPACKAGEVERSION 3 USERDIRPRODUCTVERSION 3 - ABOUTBOXPRODUCTVERSION 3.2.0 - BASEPRODUCTVERSION 3.2 + ABOUTBOXPRODUCTVERSION 3.3.0 + BASEPRODUCTVERSION 3.3 DEVELOPMENTPRODUCT 1 BASISPACKAGEPREFIX ooobasis-dev UREPACKAGEPREFIX ooodev SOLSUREPACKAGEPREFIX ooodev REGISTRYLAYERNAME LayerDev SERVICETAG_URN urn:uuid:156a7974-f2fd-11dd-8c47-080020a9ed93 - UPDATEURL http://update34.services.openoffice.org/ProductUpdateService/check.Update + UPDATEURL http://update36.services.openoffice.org/ProductUpdateService/check.Update ODFNOTIFYURL http://odfnotify.services.openoffice.org/OOo3.0/notification.jsp?version=ODF ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,javaversion2.dat,userland.txt EVAL FILEFORMATNAME OpenOffice.org FILEFORMATVERSION 1.0 WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1 - PACKAGEVERSION 3.2.0 + PACKAGEVERSION 3.3.0 PACKAGEREVISION {milestone} LICENSENAME LGPL SERVICESPROJEKT 1 @@ -216,7 +216,7 @@ OpenOffice_Dev CHANGETARGETDIR 1 USE_FILEVERSION 1 JAVAPRODUCT 1 - LIBRARYVERSION 9.2.0 + LIBRARYVERSION 9.3.0 PATCHCODEFILE ooodev_patchcodes.txt CODEFILENAME codes_ooodev.txt DOWNLOADBANNER ooobanner.bmp @@ -247,8 +247,8 @@ URE variables { PRODUCTNAME URE - PRODUCTVERSION 1.6 - PACKAGEVERSION 1.6 + PRODUCTVERSION 1.7 + PACKAGEVERSION 1.7 PACKAGEREVISION 1 PRODUCTEXTENSION LONG_PRODUCTEXTENSION @@ -288,14 +288,14 @@ OpenOffice_SDK variables { PRODUCTNAME OpenOffice.org - PRODUCTVERSION 3.2 + PRODUCTVERSION 3.3 PRODUCTEXTENSION LONG_PRODUCTEXTENSION SHORT_PRODUCTEXTENSION POSTVERSIONEXTENSION SDK POSTVERSIONEXTENSIONUNIX sdk BRANDPACKAGEVERSION 3 - PACKAGEVERSION 3.2.0 + PACKAGEVERSION 3.3.0 PACKAGEREVISION {milestone} PACK_INSTALLED 1 POOLPRODUCT 0 @@ -331,7 +331,7 @@ OpenOffice_Dev_SDK variables { PRODUCTNAME OOo-dev - PRODUCTVERSION 3.2 + PRODUCTVERSION 3.3 PRODUCTEXTENSION LONG_PRODUCTEXTENSION SHORT_PRODUCTEXTENSION @@ -340,7 +340,7 @@ OpenOffice_Dev_SDK POSTVERSIONEXTENSION SDK POSTVERSIONEXTENSIONUNIX sdk BRANDPACKAGEVERSION 3 - PACKAGEVERSION 3.2.0 + PACKAGEVERSION 3.3.0 PACKAGEREVISION {milestone} BASISPACKAGEPREFIX ooobasis-dev UREPACKAGEPREFIX ooodev @@ -379,7 +379,7 @@ BrOffice variables { PRODUCTNAME BrOffice.org - PRODUCTVERSION 3.2 + PRODUCTVERSION 3.3 PRODUCTEXTENSION LONG_PRODUCTEXTENSION SHORT_PRODUCTEXTENSION @@ -387,12 +387,12 @@ BrOffice POSTVERSIONEXTENSIONUNIX BRANDPACKAGEVERSION 3 USERDIRPRODUCTVERSION 3 - ABOUTBOXPRODUCTVERSION 3.2.0 + ABOUTBOXPRODUCTVERSION 3.3.0 PROGRESSBARCOLOR PROGRESSSIZE PROGRESSPOSITION PROGRESSFRAMECOLOR - UPDATEURL http://update34.services.openoffice.org/ProductUpdateService/check.Update + UPDATEURL http://update36.services.openoffice.org/ProductUpdateService/check.Update ODFNOTIFYURL http://odfnotify.services.openoffice.org/OOo3.0/notification.jsp?version=ODF ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,userland.txt REMOVE_UPGRADE_CODE_FILE upgradecode_remove_ooo.txt @@ -401,7 +401,7 @@ BrOffice FILEFORMATNAME OpenOffice.org FILEFORMATVERSION 1.0 WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1 - PACKAGEVERSION 3.2.0 + PACKAGEVERSION 3.3.0 PACKAGEREVISION {milestone} LICENSENAME LGPL SERVICESPROJEKT 1 @@ -417,7 +417,7 @@ BrOffice STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A} CHANGETARGETDIR 1 USE_FILEVERSION 1 - LIBRARYVERSION 9.2.0 + LIBRARYVERSION 9.3.0 CODEFILENAME codes_broo.txt PATCHCODEFILE bro_patchcodes.txt DOWNLOADBANNER brobanner.bmp @@ -446,7 +446,7 @@ BrOffice_wJRE variables { PRODUCTNAME BrOffice.org - PRODUCTVERSION 3.2 + PRODUCTVERSION 3.3 PRODUCTEXTENSION LONG_PRODUCTEXTENSION SHORT_PRODUCTEXTENSION @@ -454,12 +454,12 @@ BrOffice_wJRE POSTVERSIONEXTENSIONUNIX BRANDPACKAGEVERSION 3 USERDIRPRODUCTVERSION 3 - ABOUTBOXPRODUCTVERSION 3.2.0 + ABOUTBOXPRODUCTVERSION 3.3.0 PROGRESSBARCOLOR PROGRESSSIZE PROGRESSPOSITION PROGRESSFRAMECOLOR - UPDATEURL http://update34.services.openoffice.org/ProductUpdateService/check.Update + UPDATEURL http://update36.services.openoffice.org/ProductUpdateService/check.Update ODFNOTIFYURL http://odfnotify.services.openoffice.org/OOo3.0/notification.jsp?version=ODF ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,javaversion2.dat,userland.txt REMOVE_UPGRADE_CODE_FILE upgradecode_remove_ooo.txt @@ -468,7 +468,7 @@ BrOffice_wJRE FILEFORMATNAME OpenOffice.org FILEFORMATVERSION 1.0 WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1 - PACKAGEVERSION 3.2.0 + PACKAGEVERSION 3.3.0 PACKAGEREVISION {milestone} LICENSENAME LGPL SERVICESPROJEKT 1 @@ -484,7 +484,7 @@ BrOffice_wJRE STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A} CHANGETARGETDIR 1 USE_FILEVERSION 1 - LIBRARYVERSION 9.2.0 + LIBRARYVERSION 9.3.0 CODEFILENAME codes_broo.txt PATCHCODEFILE bro_patchcodes.txt JAVAPRODUCT 1 @@ -513,7 +513,7 @@ BrOffice_Dev variables { PRODUCTNAME BrOo-dev - PRODUCTVERSION 3.2 + PRODUCTVERSION 3.3 PRODUCTEXTENSION LONG_PRODUCTEXTENSION SHORT_PRODUCTEXTENSION @@ -523,7 +523,7 @@ BrOffice_Dev POSTVERSIONEXTENSIONUNIX BRANDPACKAGEVERSION 3 USERDIRPRODUCTVERSION 3 - ABOUTBOXPRODUCTVERSION 3.2.0 + ABOUTBOXPRODUCTVERSION 3.3.0 DEVELOPMENTPRODUCT 1 PROGRESSBARCOLOR PROGRESSSIZE @@ -534,14 +534,14 @@ BrOffice_Dev SOLSUREPACKAGEPREFIX ooodev REGISTRYLAYERNAME LayerDevBroffice SERVICETAG_URN urn:uuid:156a7974-f2fd-11dd-8c47-080020a9ed93 - UPDATEURL http://update34.services.openoffice.org/ProductUpdateService/check.Update + UPDATEURL http://update36.services.openoffice.org/ProductUpdateService/check.Update ODFNOTIFYURL http://odfnotify.services.openoffice.org/OOo3.0/notification.jsp?version=ODF ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,javaversion2.dat,userland.txt EVAL FILEFORMATNAME OpenOffice.org FILEFORMATVERSION 1.0 WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1 - PACKAGEVERSION 3.2.0 + PACKAGEVERSION 3.3.0 PACKAGEREVISION {milestone} LICENSENAME LGPL SERVICESPROJEKT 1 @@ -558,7 +558,7 @@ BrOffice_Dev CHANGETARGETDIR 1 USE_FILEVERSION 1 JAVAPRODUCT 1 - LIBRARYVERSION 9.2.0 + LIBRARYVERSION 9.3.0 PATCHCODEFILE brodev_patchcodes.txt CODEFILENAME codes_broodev.txt DOWNLOADBANNER brobanner.bmp diff --git a/scp2/source/base/file_base.scp b/scp2/source/base/file_base.scp index fa6c1cfcd661..0f34c3ad358d 100644 --- a/scp2/source/base/file_base.scp +++ b/scp2/source/base/file_base.scp @@ -57,7 +57,7 @@ STD_RES_FILE( gid_File_Res_Abp, abp) STD_UNO_LIB_FILE( gid_File_Lib_Dbp, dbp) STD_RES_FILE( gid_File_Res_Dbp, dbp) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Dbu, dbu ) +STD_UNO_LIB_FILE( gid_File_Lib_Dbu, dbu ) STD_RES_FILE( gid_File_Res_Dbu, dbu) STD_UNO_LIB_FILE( gid_File_Lib_Adabasui, adabasui ) @@ -67,7 +67,7 @@ STD_RES_FILE( gid_File_Res_Cnr, cnr) STD_RES_FILE( gid_File_Res_Sdbcl, sdbcl) STD_RES_FILE( gid_File_Res_Sdberr, sdberr) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Rpt, rpt ) +STD_UNO_LIB_FILE( gid_File_Lib_Rpt, rpt ) STD_RES_FILE( gid_File_Res_Rpt, rpt) STD_UNO_LIB_FILE( gid_File_Lib_Rptui, rptui ) diff --git a/scp2/source/calc/file_calc.scp b/scp2/source/calc/file_calc.scp index 89096b80f87c..3917d5f3e92f 100644 --- a/scp2/source/calc/file_calc.scp +++ b/scp2/source/calc/file_calc.scp @@ -51,9 +51,9 @@ STD_UNO_LIB_FILE( gid_File_Lib_Calc, calc) STD_UNO_LIB_FILE( gid_File_Lib_Date, date) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Sc, sc) +STD_UNO_LIB_FILE( gid_File_Lib_Sc, sc) -STD_LIB_FILE_PATCH( gid_File_Lib_Scui, scui) +STD_LIB_FILE( gid_File_Lib_Scui, scui) STD_LIB_FILE( gid_File_Lib_Scfilt, scfilt) diff --git a/scp2/source/calc/registryitem_calc.scp b/scp2/source/calc/registryitem_calc.scp index 133dc6952c94..4e62e4d2bc3f 100644 --- a/scp2/source/calc/registryitem_calc.scp +++ b/scp2/source/calc/registryitem_calc.scp @@ -85,7 +85,7 @@ RegistryItem gid_Regitem_Clsid__7b342dc4_139a_4a46_8a93_Db0827ccee9c__Inprochand ModuleID = gid_Module_Prg_Calc_Bin; Subkey = "CLSID\{7B342DC4-139A-4a46-8A93-DB0827CCEE9C}\InprocHandler32"; Value = "[BASISINSTALLLOCATION]program\inprocserv.dll"; - Styles = (PATCH); + Styles = (); End RegistryItem gid_Regitem_Clsid__7b342dc4_139a_4a46_8a93_Db0827ccee9c__Insertable @@ -204,7 +204,7 @@ RegistryItem gid_Regitem_Clsid__7fa8ae11_B3e3_4d88_Aabf_255526cd1ce8__Inprochand ModuleID = gid_Module_Prg_Calc_Bin; Subkey = "CLSID\{7FA8AE11-B3E3-4D88-AABF-255526CD1CE8}\InprocHandler32"; Value = "[BASISINSTALLLOCATION]program\inprocserv.dll"; - Styles = (PATCH); + Styles = (); End RegistryItem gid_Regitem_Clsid__7fa8ae11_B3e3_4d88_Aabf_255526cd1ce8__Insertable diff --git a/scp2/source/canvas/canvascommons.scp b/scp2/source/canvas/canvascommons.scp index 839cf429793c..67e374e6d584 100644 --- a/scp2/source/canvas/canvascommons.scp +++ b/scp2/source/canvas/canvascommons.scp @@ -43,7 +43,7 @@ File gid_File_Oo_Office_Canvas_Xcu Name = "/registry/data/org/openoffice/Office/Canvas.xcu"; End -STD_LIB_FILE_PATCH(gid_File_Lib_CppCanvas, cppcanvas) +STD_LIB_FILE(gid_File_Lib_CppCanvas, cppcanvas) STD_LIB_FILE(gid_File_Lib_CanvasTools, canvastools) #ifdef ENABLE_AGG diff --git a/scp2/source/draw/registryitem_draw.scp b/scp2/source/draw/registryitem_draw.scp index f1f1a086c997..9303462ffaab 100644 --- a/scp2/source/draw/registryitem_draw.scp +++ b/scp2/source/draw/registryitem_draw.scp @@ -85,7 +85,7 @@ RegistryItem gid_Regitem_Clsid__41662fc2_0d57_4aff_Ab27_Ad2e12e7c273__Inprochand ModuleID = gid_Module_Prg_Draw_Bin; Subkey = "CLSID\{41662FC2-0D57-4aff-AB27-AD2E12E7C273}\InprocHandler32"; Value = "[BASISINSTALLLOCATION]program\inprocserv.dll"; - Styles = (PATCH); + Styles = (); End RegistryItem gid_Regitem_Clsid__41662fc2_0d57_4aff_Ab27_Ad2e12e7c273__Insertable @@ -204,7 +204,7 @@ RegistryItem gid_Regitem_Clsid__448bb771_Cfe2_47c4_Bcdf_1fbf378e202c__Inprochand ModuleID = gid_Module_Prg_Draw_Bin; Subkey = "CLSID\{448BB771-CFE2-47C4-BCDF-1FBF378E202C}\InprocHandler32"; Value = "[BASISINSTALLLOCATION]program\inprocserv.dll"; - Styles = (PATCH); + Styles = (); End RegistryItem gid_Regitem_Clsid__448bb771_Cfe2_47c4_Bcdf_1fbf378e202c__Insertable diff --git a/scp2/source/impress/registryitem_impress.scp b/scp2/source/impress/registryitem_impress.scp index 5ba0cecb95d5..8627e301c1ad 100644 --- a/scp2/source/impress/registryitem_impress.scp +++ b/scp2/source/impress/registryitem_impress.scp @@ -85,7 +85,7 @@ RegistryItem gid_Regitem_Clsid__E5a0b632_Dfba_4549_9346_E414da06e6f8__Inprochand ModuleID = gid_Module_Prg_Impress_Bin; Subkey = "CLSID\{E5A0B632-DFBA-4549-9346-E414DA06E6F8}\InprocHandler32"; Value = "[BASISINSTALLLOCATION]program\inprocserv.dll"; - Styles = (PATCH); + Styles = (); End RegistryItem gid_Regitem_Clsid__E5a0b632_Dfba_4549_9346_E414da06e6f8__Insertable @@ -204,7 +204,7 @@ RegistryItem gid_Regitem_Clsid__Ee5d1ea4_D445_4289_B2fc_55fc93693917__Inprochand ModuleID = gid_Module_Prg_Impress_Bin; Subkey = "CLSID\{EE5D1EA4-D445-4289-B2FC-55FC93693917}\InprocHandler32"; Value = "[BASISINSTALLLOCATION]program\inprocserv.dll"; - Styles = (PATCH); + Styles = (); End RegistryItem gid_Regitem_Clsid__Ee5d1ea4_D445_4289_B2fc_55fc93693917__Insertable diff --git a/scp2/source/layout/layout.scp b/scp2/source/layout/layout.scp index 64629d480a20..0bb9d19ec2ab 100644 --- a/scp2/source/layout/layout.scp +++ b/scp2/source/layout/layout.scp @@ -38,28 +38,28 @@ End File gid_File_Zip_Toolkit_Layout Dir = gid_Dir_Share_Layout; USER_FILE_BODY; - Styles = (ARCHIVE, PATCH); + Styles = (ARCHIVE); Name = "toolkit-layout.zip"; End File gid_File_Zip_Sc_Layout Dir = gid_Dir_Share_Layout; USER_FILE_BODY; - Styles = (ARCHIVE, PATCH); + Styles = (ARCHIVE); Name = "sc-layout.zip"; End File gid_File_Zip_Svx_Layout Dir = gid_Dir_Share_Layout; USER_FILE_BODY; - Styles = (ARCHIVE, PATCH); + Styles = (ARCHIVE); Name = "svx-layout.zip"; End File gid_File_Zip_Sw_Layout Dir = gid_Dir_Share_Layout; USER_FILE_BODY; - Styles = (ARCHIVE, PATCH); + Styles = (ARCHIVE); Name = "sw-layout.zip"; End diff --git a/scp2/source/math/file_math.scp b/scp2/source/math/file_math.scp index 43436a75f82d..5bd506f7432b 100644 --- a/scp2/source/math/file_math.scp +++ b/scp2/source/math/file_math.scp @@ -40,7 +40,7 @@ End #endif -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Sm , sm) +STD_UNO_LIB_FILE( gid_File_Lib_Sm , sm) STD_UNO_LIB_FILE( gid_File_Lib_Smd , smd) diff --git a/scp2/source/math/registryitem_math.scp b/scp2/source/math/registryitem_math.scp index 5a55f1bf4b83..862ccfe8bb8d 100644 --- a/scp2/source/math/registryitem_math.scp +++ b/scp2/source/math/registryitem_math.scp @@ -84,7 +84,7 @@ RegistryItem gid_Regitem_Clsid__D0484de6_Aaee_468a_991f_8d4b0737b57a__Inprochand ModuleID = gid_Module_Prg_Math_Bin; Subkey = "CLSID\{D0484DE6-AAEE-468a-991F-8D4B0737B57A}\InprocHandler32"; Value = "[BASISINSTALLLOCATION]program\inprocserv.dll"; - Styles = (PATCH); + Styles = (); End RegistryItem gid_Regitem_Clsid__D0484de6_Aaee_468a_991f_8d4b0737b57a__Insertable @@ -203,7 +203,7 @@ RegistryItem gid_Regitem_Clsid__D2d59cd1_0a6a_4d36_Ae20_47817077d57c__Inprochand ModuleID = gid_Module_Prg_Math_Bin; Subkey = "CLSID\{D2D59CD1-0A6A-4D36-AE20-47817077D57C}\InprocHandler32"; Value = "[BASISINSTALLLOCATION]program\inprocserv.dll"; - Styles = (PATCH); + Styles = (); End RegistryItem gid_Regitem_Clsid__D2d59cd1_0a6a_4d36_Ae20_47817077d57c__Insertable diff --git a/scp2/source/onlineupdate/file_onlineupdate.scp b/scp2/source/onlineupdate/file_onlineupdate.scp index b415ea2ad9e7..470b69eb9030 100644 --- a/scp2/source/onlineupdate/file_onlineupdate.scp +++ b/scp2/source/onlineupdate/file_onlineupdate.scp @@ -30,7 +30,7 @@ #include "macros.inc" -SPECIAL_UNO_COMPONENT_LIB_FILE_PATCH( gid_File_Lib_Updchk , updchk.uno ) +SPECIAL_UNO_COMPONENT_LIB_FILE( gid_File_Lib_Updchk , updchk.uno ) File gid_File_Registry_Spool_Oo_Office_Addons_Onlineupdate_Xcu TXT_FILE_BODY; diff --git a/scp2/source/ooo/file_improvement.scp b/scp2/source/ooo/file_improvement.scp index 93110fe693eb..67ec89b15963 100644 --- a/scp2/source/ooo/file_improvement.scp +++ b/scp2/source/ooo/file_improvement.scp @@ -49,5 +49,5 @@ End #endif #if defined(BUILD_SPECIAL) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Oooimprovement , oooimprovement) +STD_UNO_LIB_FILE( gid_File_Lib_Oooimprovement , oooimprovement) #endif diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp index a49efd11958f..0c11d0c4a349 100644 --- a/scp2/source/ooo/file_library_ooo.scp +++ b/scp2/source/ooo/file_library_ooo.scp @@ -203,13 +203,13 @@ File gid_File_Lib_Comphelper2 Name = STRING(CONCAT3(comphelp4,COMID,.dll)); #endif Dir = SCP2_OOO_BIN_DIR; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); RegistryID = gid_Starregistry_Services_Rdb; End STD_UNO_LIB_FILE( gid_File_Lib_Ctl , ctl) -STD_LIB_FILE_PATCH( gid_File_Lib_Cui, cui) +STD_LIB_FILE( gid_File_Lib_Cui, cui) #ifndef SYSTEM_CURL @@ -269,7 +269,7 @@ End #endif #endif -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Dba, dba) +STD_UNO_LIB_FILE( gid_File_Lib_Dba, dba) STD_UNO_LIB_FILE( gid_File_Lib_Sdbt, sdbt) @@ -277,7 +277,7 @@ STD_UNO_LIB_FILE( gid_File_Lib_Dbmm, dbmm) STD_UNO_LIB_FILE( gid_File_Lib_Dbacfg, dbacfg) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Dbase2, dbase ) +STD_UNO_LIB_FILE( gid_File_Lib_Dbase2, dbase ) File gid_File_Oo_Office_Dataaccess_Dbase_Xcu TXT_FILE_BODY; Styles = (PACKED); @@ -301,9 +301,9 @@ File gid_File_Lib_Dbpool #endif End -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Dbt, dbtools ) +STD_UNO_LIB_FILE( gid_File_Lib_Dbt, dbtools ) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Dbaxml, dbaxml ) +STD_UNO_LIB_FILE( gid_File_Lib_Dbaxml, dbaxml ) File gid_File_Lib_Dict_Ja TXT_FILE_BODY; @@ -362,7 +362,7 @@ End File gid_File_Lib_Dlgprov TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); RegistryID = gid_Starregistry_Services_Rdb; Dir = SCP2_OOO_BIN_DIR; #ifdef UNX @@ -427,7 +427,7 @@ End #endif -STD_LIB_FILE_PATCH(gid_File_Lib_Drawinglayer,drawinglayer) +STD_LIB_FILE(gid_File_Lib_Drawinglayer,drawinglayer) SPECIAL_UNO_LIB_FILE(gid_File_Lib_Embobj,embobj) @@ -437,11 +437,11 @@ SPECIAL_UNO_LIB_FILE(gid_File_Lib_Emboleobj,emboleobj) #if defined(WNT) && !defined(DISABLE_ATL) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Emser, emser ) +STD_UNO_LIB_FILE( gid_File_Lib_Emser, emser ) File gid_File_Lib_Inprocserv TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = SCP2_OOO_BIN_DIR; Name = "inprocserv.dll"; End @@ -528,7 +528,7 @@ SPECIAL_UNO_LIB_FILE(gid_File_Lib_Fileacc,fileacc) File gid_File_Lib_Filterconfig1 TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); Dir = SCP2_OOO_BIN_DIR; RegistryID = gid_Starregistry_Services_Rdb; Name = SPECIAL_NAME(filterconfig1); @@ -558,7 +558,7 @@ End File gid_File_Lib_Fps TXT_FILE_BODY; - Styles = (PACKED,PATCH,UNO_COMPONENT); + Styles = (PACKED,UNO_COMPONENT); RegistryID = gid_Starregistry_Services_Rdb; Dir = SCP2_OOO_BIN_DIR; Name = "fps.dll"; @@ -607,7 +607,7 @@ End #ifdef QUARTZ File gid_File_Lib_Fps_Aqua TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); RegistryID = gid_Starregistry_Services_Rdb; Dir = SCP2_OOO_BIN_DIR; Name = SPECIAL_COMPONENT_LIB_NAME(fps_aqua.uno); @@ -675,14 +675,14 @@ End #endif -STD_LIB_FILE_PATCH( gid_File_Lib_Fwe , fwe) +STD_LIB_FILE( gid_File_Lib_Fwe , fwe) STD_LIB_FILE( gid_File_Lib_Fwi , fwi) File gid_File_Lib_Fwk Name = LIBNAME(fwk); TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); Dir = SCP2_OOO_BIN_DIR; RegistryID = gid_Starregistry_Services_Rdb; End @@ -703,7 +703,7 @@ End File gid_File_Lib_Go Name = LIBNAME(go); TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); Dir = SCP2_OOO_BIN_DIR; RegistryID = gid_Starregistry_Services_Rdb; End @@ -714,7 +714,7 @@ STD_LIB_FILE( gid_File_Lib_Helplinker, helplinker) File gid_File_Lib_I18npool TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); RegistryID = gid_Starregistry_Services_Rdb; Dir = SCP2_OOO_BIN_DIR; #ifdef UNX @@ -900,12 +900,12 @@ File gid_File_Lib_Rebasemsi TXT_FILE_BODY; Name = "rebase.dll"; Dir = SCP2_OOO_BIN_DIR; - Styles = (PACKED,PATCH,BINARYTABLE,BINARYTABLE_ONLY,DONTRENAMEINPATCH); + Styles = (PACKED,BINARYTABLE,BINARYTABLE_ONLY,DONTRENAMEINPATCH); End #endif -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Lng, lng) +STD_UNO_LIB_FILE( gid_File_Lib_Lng, lng) File gid_File_Lib_Localedata_En TXT_FILE_BODY; @@ -983,7 +983,7 @@ STD_LIB_FILE(gid_File_Lib_Mozabdrv,mozabdrv) File gid_File_Lib_Mozbootstrap TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); RegistryID = gid_Starregistry_Services_Rdb; Dir = SCP2_OOO_BIN_DIR; #ifdef UNX @@ -1073,7 +1073,7 @@ File gid_File_Lib_Mingw_GccS TXT_FILE_BODY; Dir = gid_Dir_Program; Name = MINGW_GCCDLL; - Styles = (PACKED, PATCH); + Styles = (PACKED); End #endif @@ -1084,7 +1084,7 @@ File gid_File_Lib_Mingw_Stdcpp TXT_FILE_BODY; Dir = gid_Dir_Program; Name = MINGW_GXXDLL; - Styles = (PACKED, PATCH); + Styles = (PACKED); End #endif @@ -1193,7 +1193,7 @@ End STD_LIB_FILE(gid_File_Lib_DeploymentMisc, deploymentmisc) #ifndef WITHOUT_MOZILLA -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Pl , pl) +STD_UNO_LIB_FILE( gid_File_Lib_Pl , pl) #endif STD_UNO_LIB_FILE( gid_File_Lib_Preload, preload) @@ -1204,13 +1204,13 @@ SPECIAL_UNO_COMPONENT_LIB_FILE( gid_File_Lib_Productregistration, productregistr File gid_File_Lib_Desktop_Detector Name = LIBNAME(desktop_detector); TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = SCP2_OOO_BIN_DIR; End File gid_File_Lib_Vclplug_Gen Name = LIBNAME(vclplug_gen); TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = SCP2_OOO_BIN_DIR; End #endif @@ -1220,7 +1220,7 @@ End File gid_File_Lib_Vclplug_Gtk Name = LIBNAME(vclplug_gtk); TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = SCP2_OOO_BIN_DIR; End #endif @@ -1229,7 +1229,7 @@ End File gid_File_Lib_Vclplug_Kde Name = LIBNAME(vclplug_kde); TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = SCP2_OOO_BIN_DIR; End #endif @@ -1265,7 +1265,7 @@ End #endif #if defined UNX && ! defined QUARTZ -STD_LIB_FILE_PATCH( gid_File_Lib_Vclplug_Svp, vclplug_svp ) +STD_LIB_FILE( gid_File_Lib_Vclplug_Svp, vclplug_svp ) STD_LIB_FILE( gid_File_Lib_BaseBmp, basebmp ) #endif @@ -1316,7 +1316,7 @@ End File gid_File_Lib_Res Name = LIBNAME(res); TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); Dir = SCP2_OOO_BIN_DIR; RegistryID = gid_Starregistry_Services_Rdb; End @@ -1347,9 +1347,9 @@ End STD_LIB_FILE( gid_File_Lib_Sax , sax) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Oox , oox) +STD_UNO_LIB_FILE( gid_File_Lib_Oox , oox) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Sb , sb) +STD_UNO_LIB_FILE( gid_File_Lib_Sb , sb) STD_UNO_LIB_FILE( gid_File_Lib_Scn, scn) @@ -1366,15 +1366,15 @@ File gid_File_Lib_Scriptframe #endif RegistryID = gid_Starregistry_Services_Rdb; Dir = SCP2_OOO_BIN_DIR; - Styles = (PACKED,PATCH,UNO_COMPONENT); + Styles = (PACKED,UNO_COMPONENT); End -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Sd , sd) -STD_LIB_FILE_PATCH( gid_File_Lib_Sdui, sdui) +STD_UNO_LIB_FILE( gid_File_Lib_Sd , sd) +STD_LIB_FILE( gid_File_Lib_Sdui, sdui) File gid_File_Lib_Slideshow TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); RegistryID = gid_Starregistry_Services_Rdb; Dir = SCP2_OOO_BIN_DIR; #ifdef UNX @@ -1403,7 +1403,7 @@ STD_UNO_LIB_FILE( gid_File_Lib_Sf_Prothdlr, protocolhandler ) File gid_File_Lib_Sfx Name = LIBNAME(sfx); TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); Dir = SCP2_OOO_BIN_DIR; RegistryID = gid_Starregistry_Services_Rdb; End @@ -1445,7 +1445,7 @@ End #endif -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Sot, sot ) +STD_UNO_LIB_FILE( gid_File_Lib_Sot, sot ) #if defined(UNX) && !defined(QUARTZ) @@ -1460,7 +1460,7 @@ End File gid_File_Lib_Spell TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); RegistryID = gid_Starregistry_Services_Rdb; Name = LIBNAME(spell); Dir = SCP2_OOO_BIN_DIR; @@ -1472,24 +1472,24 @@ SPECIAL_UNO_LIB_FILE(gid_File_Lib_Srtrs1,srtrs1) STD_LIB_FILE( gid_File_Lib_Sts , sts) -STD_LIB_FILE_PATCH( gid_File_Lib_Svl, svl ) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Svtools, svt ) +STD_LIB_FILE( gid_File_Lib_Svl, svl ) +STD_UNO_LIB_FILE( gid_File_Lib_Svtools, svt ) SPECIAL_UNO_COMPONENT_LIB_FILE( gid_File_Lib_Svtmisc, svtmisc.uno ) -STD_LIB_FILE_PATCH( gid_File_Lib_Svx_Core, svxcore) -STD_LIB_FILE_PATCH( gid_File_Lib_Svx_Msfilter, svxmsfilter) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Svx, svx) +STD_LIB_FILE( gid_File_Lib_Svx_Core, svxcore) +STD_LIB_FILE( gid_File_Lib_Svx_Msfilter, svxmsfilter) +STD_UNO_LIB_FILE( gid_File_Lib_Svx, svx) STD_UNO_LIB_FILE( gid_File_Lib_TextConversionDlgs, textconversiondlgs) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Sw , sw) -STD_LIB_FILE_PATCH( gid_File_Lib_Swui, swui) +STD_UNO_LIB_FILE( gid_File_Lib_Sw , sw) +STD_LIB_FILE( gid_File_Lib_Swui, swui) -STD_LIB_FILE_PATCH( gid_File_Lib_Msword, msword ) +STD_LIB_FILE( gid_File_Lib_Msword, msword ) #if ! defined UNX File gid_File_Lib_Sysdtrans TXT_FILE_BODY; - Styles = (PACKED,PATCH,UNO_COMPONENT); + Styles = (PACKED,UNO_COMPONENT); RegistryID = gid_Starregistry_Services_Rdb; Dir = SCP2_OOO_BIN_DIR; Name = "sysdtrans.dll"; @@ -1560,13 +1560,13 @@ File gid_File_Lib_Ucpchelp1 End #ifndef DISABLE_NEON -SPECIAL_UNO_LIB_FILE_PATCH(gid_File_Lib_Ucpdav1,ucpdav1) +SPECIAL_UNO_LIB_FILE(gid_File_Lib_Ucpdav1,ucpdav1) #ifndef SYSTEM_NEON SPECIAL_LIB_FILE(gid_File_Lib_Neon,neon) #endif #endif -SPECIAL_UNO_LIB_FILE_PATCH(gid_File_Lib_Ucpfile1,ucpfile1) +SPECIAL_UNO_LIB_FILE(gid_File_Lib_Ucpfile1,ucpfile1) SPECIAL_UNO_LIB_FILE(gid_File_Lib_Ucpftp1,ucpftp1) @@ -1580,7 +1580,7 @@ SPECIAL_UNO_COMPONENT_LIB_FILE(gid_File_Ucpexpand1, ucpexpand1.uno) File gid_File_Lib_Lnth TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); RegistryID = gid_Starregistry_Services_Rdb; Name = LIBNAME(lnth); Dir = SCP2_OOO_BIN_DIR; @@ -1588,22 +1588,22 @@ End File gid_File_Lib_Hyph TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); RegistryID = gid_Starregistry_Services_Rdb; Name = LIBNAME(hyphen); Dir = SCP2_OOO_BIN_DIR; End -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Utl , utl) +STD_UNO_LIB_FILE( gid_File_Lib_Utl , utl) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Uui, uui ) +STD_UNO_LIB_FILE( gid_File_Lib_Uui, uui ) STD_LIB_FILE( gid_File_Lib_BaseGfx, basegfx ) File gid_File_Lib_Vcl Name = LIBNAME(vcl); TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); Dir = SCP2_OOO_BIN_DIR; RegistryID = gid_Starregistry_Services_Rdb; End @@ -1628,7 +1628,7 @@ STD_UNO_LIB_FILE( gid_File_Lib_Xof , xof) File gid_File_Lib_Xo Name = LIBNAME(xo); TXT_FILE_BODY; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); Dir = SCP2_OOO_BIN_DIR; RegistryID = gid_Starregistry_Services_Rdb; End @@ -1691,7 +1691,7 @@ File gid_File_Lib_XSec_Framework Name = "xsec_fw.dll"; #endif Dir = SCP2_OOO_BIN_DIR; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); RegistryID = gid_Starregistry_Services_Rdb; End @@ -1703,7 +1703,7 @@ File gid_File_Lib_XSec_XmlSec Name = "xsec_xmlsec.dll"; #endif Dir = SCP2_OOO_BIN_DIR; - Styles = (PACKED,UNO_COMPONENT,PATCH); + Styles = (PACKED,UNO_COMPONENT); RegistryID = gid_Starregistry_Services_Rdb; End @@ -1771,9 +1771,9 @@ End STD_UNO_LIB_FILE( gid_File_Lib_Guesslang, guesslang ) -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Updchkui , updchk ) +STD_UNO_LIB_FILE( gid_File_Lib_Updchkui , updchk ) -SPECIAL_UNO_COMPONENT_LIB_FILE_PATCH( gid_File_Lib_Updatefeed , updatefeed.uno ) +SPECIAL_UNO_COMPONENT_LIB_FILE( gid_File_Lib_Updatefeed , updatefeed.uno ) #ifdef WNT File gid_File_Lib_Onlinecheck @@ -1821,7 +1821,7 @@ File gid_File_Lib_Unopkgapp Styles = (PACKED); End -STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Oooimprovecore , oooimprovecore) +STD_UNO_LIB_FILE( gid_File_Lib_Oooimprovecore , oooimprovecore) #if defined WNT && !defined _gcc3 && !defined SYSTEM_MOZILLA && !defined WITHOUT_MOZILLA && \ !(defined M1400 && defined PROF_EDITION && !defined _STLP_DEBUG) diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp index 7d1d8bb5cc40..52bd9f00f1cb 100644 --- a/scp2/source/ooo/file_ooo.scp +++ b/scp2/source/ooo/file_ooo.scp @@ -163,7 +163,7 @@ End File gid_File_Profile_Gengal BIN_FILE_BODY; Dir = gid_Dir_Program; - Styles = (PACKED, PATCH); + Styles = (PACKED); Name = PROFILENAME(gengal); End @@ -173,7 +173,7 @@ File gid_File_Bin_Pluginapp BIN_FILE_BODY; Dir = gid_Dir_Program; Name = "pluginapp.bin"; - Styles = (PACKED,PATCH); + Styles = (PACKED); End #endif @@ -348,7 +348,7 @@ End STD_FILTER_FILE( gid_File_Filter_Eme, eme) -STD_FILTER_FILE_PATCH( gid_File_Filter_Sdfilt, sdfilt) +STD_FILTER_FILE( gid_File_Filter_Sdfilt, sdfilt) STD_FILTER_FILE( gid_File_Filter_Icg, icg) @@ -526,7 +526,7 @@ File gid_File_Jar_Unoil TXT_FILE_BODY; Name = "unoil.jar"; Dir = gid_Dir_Classes; - Styles = (PACKED,DONT_OVERWRITE,PATCH); + Styles = (PACKED,DONT_OVERWRITE); End #endif @@ -1667,7 +1667,7 @@ End File gid_File_Oo_Office_Ui_Genericcommands_Xcu TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = gid_Dir_Share_Registry_Data_Org_Openoffice_Office_Ui; Name = "/registry/data/org/openoffice/Office/UI/GenericCommands.xcu"; End @@ -1730,7 +1730,7 @@ End File gid_File_Oo_Office_Linguistic_Xcs TXT_FILE_BODY; - Styles = (PACKED,PATCH); + Styles = (PACKED); Dir = gid_Dir_Share_Registry_Schema_Org_Openoffice_Office; Name = "/registry/schema/org/openoffice/Office/Linguistic.xcs"; End @@ -2126,7 +2126,7 @@ End File gid_File_Rdb_Offapi TXT_FILE_BODY; Dir = gid_Dir_Program; - Styles = (PACKED,PATCH); + Styles = (PACKED); Name = "offapi.rdb"; End @@ -2724,7 +2724,7 @@ File gid_Starregistry_Services_Rdb TXT_FILE_BODY; Name = "services.rdb"; Dir = gid_Dir_Program; - Styles = (PACKED, STARREGISTRY, PATCH); + Styles = (PACKED, STARREGISTRY); #if defined WNT NativeServicesURLPrefix = "vnd.sun.star.expand:$BRAND_BASE_DIR/program/"; #else @@ -2893,7 +2893,7 @@ File gid_File_Images_Zip TXT_FILE_BODY; Dir = gid_Dir_Share_Config; Name = "images.zip"; - Styles = (PACKED,PATCH); + Styles = (PACKED); End File gid_File_ImagesCrystal_Zip diff --git a/scp2/source/ooo/file_resource_ooo.scp b/scp2/source/ooo/file_resource_ooo.scp index 14b02d2dfa83..5fdbf4202c11 100644 --- a/scp2/source/ooo/file_resource_ooo.scp +++ b/scp2/source/ooo/file_resource_ooo.scp @@ -87,7 +87,7 @@ STD_RES_FILE( gid_File_Res_San, san ) STD_RES_FILE( gid_File_Res_Sd, sd ) -STD_RES_FILE_PATCH( gid_File_Res_Sfx, sfx ) +STD_RES_FILE( gid_File_Res_Sfx, sfx ) #if defined(UNX) && !defined(QUARTZ) @@ -101,7 +101,7 @@ STD_RES_FILE( gid_File_Res_Sb, sb ) STD_RES_FILE( gid_File_Res_Svs, svs ) STD_RES_FILE( gid_File_Res_Svt, svt ) -STD_RES_FILE_ONLY_PATCH( gid_File_Res_Svp, svp ) +STD_RES_FILE_ONLY( gid_File_Res_Svp, svp ) STD_RES_FILE( gid_File_Res_Svx, svx ) STD_RES_FILE( gid_File_Res_TextConversionDlgs, textconversiondlgs ) @@ -113,7 +113,7 @@ STD_RES_FILE( gid_File_Res_Acc, acc ) STD_RES_FILE( gid_File_Res_Tpl, tpl ) -STD_RES_FILE_PATCH( gid_File_Res_Uui, uui ) +STD_RES_FILE( gid_File_Res_Uui, uui ) STD_RES_FILE( gid_File_Res_Vcl, vcl ) diff --git a/scp2/source/ooo/profile_ooo.scp b/scp2/source/ooo/profile_ooo.scp index 97211fe6a5ac..34c3a5ce8957 100644 --- a/scp2/source/ooo/profile_ooo.scp +++ b/scp2/source/ooo/profile_ooo.scp @@ -56,7 +56,7 @@ Profile gid_Profile_Version_Ini_Basis ModuleID = gid_Module_Root; Name = PROFILENAME(version); Dir = gid_Dir_Program; - Styles = (PATCH); + Styles = (); End Profile gid_Profile_Fundamentalbasis_Ini diff --git a/scp2/source/ooo/registryitem_ooo.scp b/scp2/source/ooo/registryitem_ooo.scp index 4e34805e33ec..5b62f561851a 100644 --- a/scp2/source/ooo/registryitem_ooo.scp +++ b/scp2/source/ooo/registryitem_ooo.scp @@ -251,7 +251,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Produc ModuleID = gid_Module_Root; Name = "INSTALLLOCATION"; Value = "[INSTALLLOCATION]"; - Styles = (LANGUAGEPACK,ALWAYS_REQUIRED,PATCH); + Styles = (LANGUAGEPACK,ALWAYS_REQUIRED); End RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgradecode_Install @@ -260,7 +260,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgrad ModuleID = gid_Module_Root; Name = "INSTALLLOCATION"; Value = "[INSTALLLOCATION]"; - Styles = (LANGUAGEPACK,ALWAYS_REQUIRED,PATCH); + Styles = (LANGUAGEPACK,ALWAYS_REQUIRED); End RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Install @@ -269,7 +269,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Install ModuleID = gid_Module_Root; Name = "INSTALLLOCATION"; Value = "[INSTALLLOCATION]"; - Styles = (ALWAYS_REQUIRED,PATCH); + Styles = (ALWAYS_REQUIRED); End RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Productcode_Officeinstall @@ -278,7 +278,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Produc ModuleID = gid_Module_Root; Name = "OFFICEINSTALLLOCATION"; Value = "[OFFICEINSTALLLOCATION]"; - Styles = (LANGUAGEPACK,ALWAYS_REQUIRED,PATCH,UPGRADEKEY); + Styles = (LANGUAGEPACK,ALWAYS_REQUIRED,UPGRADEKEY); End RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Productcode_Productversion @@ -287,7 +287,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Produc ModuleID = gid_Module_Root; Name = "ProductVersion"; Value = "[ProductVersion]"; - Styles = (LANGUAGEPACK,ALWAYS_REQUIRED,PATCH); + Styles = (LANGUAGEPACK,ALWAYS_REQUIRED); End RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgradecode_Officeinstall @@ -296,7 +296,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgrad ModuleID = gid_Module_Root; Name = "OFFICEINSTALLLOCATION"; Value = "[OFFICEINSTALLLOCATION]"; - Styles = (LANGUAGEPACK,ALWAYS_REQUIRED,PATCH); + Styles = (LANGUAGEPACK,ALWAYS_REQUIRED); End RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgradecode_Productversion @@ -305,7 +305,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgrad ModuleID = gid_Module_Root; Name = "ProductVersion"; Value = "[ProductVersion]"; - Styles = (LANGUAGEPACK,ALWAYS_REQUIRED,PATCH); + Styles = (LANGUAGEPACK,ALWAYS_REQUIRED); End RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Officeinstall @@ -314,7 +314,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Officeinstall ModuleID = gid_Module_Root; Name = "OFFICEINSTALLLOCATION"; Value = "[OFFICEINSTALLLOCATION]"; - Styles = (ALWAYS_REQUIRED,PATCH); + Styles = (ALWAYS_REQUIRED); End RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Productcode_Basisinstall @@ -323,7 +323,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Produc ModuleID = gid_Module_Root; Name = "BASISINSTALLLOCATION"; Value = "[BASISINSTALLLOCATION]"; - Styles = (LANGUAGEPACK,ALWAYS_REQUIRED,PATCH); + Styles = (LANGUAGEPACK,ALWAYS_REQUIRED); End RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgradecode_Basisinstall @@ -332,7 +332,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgrad ModuleID = gid_Module_Root; Name = "BASISINSTALLLOCATION"; Value = "[BASISINSTALLLOCATION]"; - Styles = (LANGUAGEPACK,ALWAYS_REQUIRED,PATCH); + Styles = (LANGUAGEPACK,ALWAYS_REQUIRED); End RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Basisinstall @@ -341,7 +341,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Basisinstall ModuleID = gid_Module_Root; Name = "BASISINSTALLLOCATION"; Value = "[BASISINSTALLLOCATION]"; - Styles = (ALWAYS_REQUIRED,LAYER_REGISTRY,USE_OOOBASEVERSION,PATCH); + Styles = (ALWAYS_REQUIRED,LAYER_REGISTRY,USE_OOOBASEVERSION); End RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Layer_Basisinstall @@ -350,7 +350,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Layer_Basisinstal ModuleID = gid_Module_Root; Name = "BASISINSTALLLOCATION"; Value = "[BASISINSTALLLOCATION]"; - Styles = (ALWAYS_REQUIRED,PATCH); + Styles = (ALWAYS_REQUIRED); End RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Productcode_Ureinstall @@ -359,7 +359,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Produc ModuleID = gid_Module_Root; Name = "UREINSTALLLOCATION"; Value = "[UREINSTALLLOCATION]"; - Styles = (LANGUAGEPACK,ALWAYS_REQUIRED,PATCH); + Styles = (LANGUAGEPACK,ALWAYS_REQUIRED); End RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgradecode_Ureinstall @@ -368,7 +368,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgrad ModuleID = gid_Module_Root; Name = "UREINSTALLLOCATION"; Value = "[UREINSTALLLOCATION]"; - Styles = (LANGUAGEPACK,ALWAYS_REQUIRED,PATCH); + Styles = (LANGUAGEPACK,ALWAYS_REQUIRED); End RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Ureinstall @@ -377,7 +377,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Ureinstall ModuleID = gid_Module_Root; Name = "UREINSTALLLOCATION"; Value = "[UREINSTALLLOCATION]"; - Styles = (ALWAYS_REQUIRED,LAYER_REGISTRY,USE_URELAYERVERSION,PATCH); + Styles = (ALWAYS_REQUIRED,LAYER_REGISTRY,USE_URELAYERVERSION); End RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Layer_Ureinstall @@ -386,7 +386,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Layer_Ureinstall ModuleID = gid_Module_Root; Name = "UREINSTALLLOCATION"; Value = "[UREINSTALLLOCATION]"; - Styles = (ALWAYS_REQUIRED,PATCH); + Styles = (ALWAYS_REQUIRED); End RegistryItem gid_Regitem_Sog diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp index 1c260e2d2508..41f2b73adbe8 100755 --- a/scp2/source/ooo/ure.scp +++ b/scp2/source/ooo/ure.scp @@ -134,7 +134,7 @@ File gid_File_Exe_Javaldx BIN_FILE_BODY; Dir = gid_Dir_Ure_Bin; Name = EXENAME(javaldx); - Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID, PATCH); + Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID); // CompID = "291B5981-3E41-40E2-9C3F-115A7DF1C6A1"; End #endif @@ -269,7 +269,7 @@ File gid_File_Dl_Sal TXT_FILE_BODY; Dir = SCP2_URE_DL_DIR; Name = SCP2_URE_DL_UNO_VER("sal", "3"); - Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID,PATCH); + Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID); // CompID = "B1EF3AB6-611E-4027-958A-736583EB82E6"; End @@ -336,7 +336,7 @@ File gid_File_Dl_Sunjavaplugin TXT_FILE_BODY; Dir = SCP2_URE_DL_DIR; Name = SCP2_URE_DL_BARE("sunjavaplugin"); - Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID, PATCH); + Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID); // CompID = "0AC6C688-876C-40C5-B24E-9257003FDC3E"; End #endif @@ -839,7 +839,7 @@ File gid_File_Dl_Libxml2 #else Name = SCP2_URE_DL_VER("xml2", "2"); #endif - Styles = (PACKED, PATCH, VERSION_INDEPENDENT_COMP_ID); + Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID); // CompID = "BE6FAD97-F84C-43E3-8392-6FE2CDA04D8E"; End #endif @@ -1208,7 +1208,7 @@ Profile gid_Profile_Version_Ini_Ure ModuleID = gid_Module_Root_Ure_Hidden; Name = PROFILENAME(version); Dir = gid_Dir_Ure_Bin; - Styles = (PATCH); + Styles = (); End ProfileItem gid_Ure_Profileitem_Version_Buildid diff --git a/scp2/source/writer/registryitem_writer.scp b/scp2/source/writer/registryitem_writer.scp index 545225ca8950..8ed6003b7958 100644 --- a/scp2/source/writer/registryitem_writer.scp +++ b/scp2/source/writer/registryitem_writer.scp @@ -85,7 +85,7 @@ RegistryItem gid_Regitem_Clsid__30a2652a_Ddf7_45e7_Aca6_3eab26fc8a4e__Inprochand ModuleID = gid_Module_Prg_Wrt_Bin; Subkey = "CLSID\{30A2652A-DDF7-45e7-ACA6-3EAB26FC8A4E}\InprocHandler32"; Value = "[BASISINSTALLLOCATION]program\inprocserv.dll"; - Styles = (PATCH); + Styles = (); End RegistryItem gid_Regitem_Clsid__30a2652a_Ddf7_45e7_Aca6_3eab26fc8a4e__Insertable @@ -204,7 +204,7 @@ RegistryItem gid_Regitem_Clsid__F616b81f_7bb8_4f22_B8a5_47428d59f8ad__Inprochand ModuleID = gid_Module_Prg_Wrt_Bin; Subkey = "CLSID\{F616B81F-7BB8-4F22-B8A5-47428D59F8AD}\InprocHandler32"; Value = "[BASISINSTALLLOCATION]program\inprocserv.dll"; - Styles = (PATCH); + Styles = (); End RegistryItem gid_Regitem_Clsid__F616b81f_7bb8_4f22_B8a5_47428d59f8ad__Insertable -- cgit From cba0c64a33aab59503714a8e6d7d4a467a076f11 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Thu, 3 Dec 2009 17:27:47 +0100 Subject: native275 #i107355# updating to OOo 3.3 --- sysui/desktop/debian/makefile.mk | 20 ++++++++++---------- sysui/desktop/productversion.mk | 2 +- sysui/desktop/slackware/makefile.mk | 20 ++++++++++---------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/sysui/desktop/debian/makefile.mk b/sysui/desktop/debian/makefile.mk index 1e0761198c14..cb4369763070 100644 --- a/sysui/desktop/debian/makefile.mk +++ b/sysui/desktop/debian/makefile.mk @@ -49,7 +49,7 @@ TARGET=debian .IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/deb//)" -DEBFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i3.2-$(TARGET)-menus_$(PKGVERSION.$i)-$(PKGREV)_all.deb) +DEBFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i3.3-$(TARGET)-menus_$(PKGVERSION.$i)-$(PKGREV)_all.deb) .ENDIF @@ -64,22 +64,22 @@ ALLTAR : $(DEBFILES) %/DEBIAN/control : $$(@:f) @$(MKDIRHIER) $(@:d) $*$/etc $*$/usr/share/applnk/Office $*$/usr/lib/menu - ln -sf /opt/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.2//)) $*$/etc$/ - /bin/sh -c -x "cd $(COMMONMISC)$/$(*:f:s/-/ /:1:s/3.2//) && DESTDIR=$(shell @cd $*; pwd) ICON_PREFIX=$(ICONPREFIX) KDEMAINDIR=/usr GNOMEDIR=/usr create_tree.sh" - @cat openoffice.org-debian-menus | sed -e 's/%PRODUCTNAME/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/3.2//)) $(PRODUCTVERSION.$(*:f:s/-/ /:1:s/3.2//))/' -e 's/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.2//))/' -e 's/%ICONPREFIX/$(ICONPREFIX.$(*:f:s/-/ /:1:s/3.2//))/' > $*$/usr/lib/menu/$(*:f:s/_/ /:1:s/3.2//) - echo "Package: $(*:f:s/_/ /:1:s/3.2//)" > $@ - cat $(@:f) | tr -d "\015" | sed "s/%productname/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/3.2//))/" >> $@ - echo "Version: $(PKGVERSION.$(*:f:s/-/ /:1:s/3.2//))-$(PKGREV)" >> $@ + ln -sf /opt/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.3//)) $*$/etc$/ + /bin/sh -c -x "cd $(COMMONMISC)$/$(*:f:s/-/ /:1:s/3.3//) && DESTDIR=$(shell @cd $*; pwd) ICON_PREFIX=$(ICONPREFIX) KDEMAINDIR=/usr GNOMEDIR=/usr create_tree.sh" + @cat openoffice.org-debian-menus | sed -e 's/%PRODUCTNAME/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/3.3//)) $(PRODUCTVERSION.$(*:f:s/-/ /:1:s/3.3//))/' -e 's/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.3//))/' -e 's/%ICONPREFIX/$(ICONPREFIX.$(*:f:s/-/ /:1:s/3.3//))/' > $*$/usr/lib/menu/$(*:f:s/_/ /:1:s/3.3//) + echo "Package: $(*:f:s/_/ /:1:s/3.3//)" > $@ + cat $(@:f) | tr -d "\015" | sed "s/%productname/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/3.3//))/" >> $@ + echo "Version: $(PKGVERSION.$(*:f:s/-/ /:1:s/3.3//))-$(PKGREV)" >> $@ @du -k -s $* | awk -F ' ' '{ printf "Installed-Size: %s\n", $$1 ; }' >> $@ %/DEBIAN/postinst : $$(@:f) - @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.2//))/g" > $@ + @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.3//))/g" > $@ %/DEBIAN/postrm : $$(@:f) - @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.2//))/g" > $@ + @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.3//))/g" > $@ %/DEBIAN/prerm : $$(@:f) - @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.2//))/g" > $@ + @cat $< | tr -d "\015" | sed -e "s/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/3.3//))/g" > $@ # --- packaging --------------------------------------------------- diff --git a/sysui/desktop/productversion.mk b/sysui/desktop/productversion.mk index 7d2467d32e7e..4bb67bc50b35 100644 --- a/sysui/desktop/productversion.mk +++ b/sysui/desktop/productversion.mk @@ -50,7 +50,7 @@ PKGDIR=$(BIN) PRODUCTLIST = openoffice.org broffice.org # default values to minimize maintainance effort -PRODUCTVERSION = 3.2 +PRODUCTVERSION = 3.3 PRODUCTVERSIONSHORT = 3 PKGVERSION = $(PRODUCTVERSION) # gnome-vfs treats everything behind the last '.' as an icon extension, diff --git a/sysui/desktop/slackware/makefile.mk b/sysui/desktop/slackware/makefile.mk index ae08a3772838..8d8fc071d250 100644 --- a/sysui/desktop/slackware/makefile.mk +++ b/sysui/desktop/slackware/makefile.mk @@ -44,7 +44,7 @@ TARGET=slackware # --- Files -------------------------------------------------------- -MENUFILES=$(PKGDIR)$/{$(PRODUCTLIST)}3.2-$(TARGET)-menus-$(PKGVERSION)-noarch-$(PKGREV).tgz +MENUFILES=$(PKGDIR)$/{$(PRODUCTLIST)}3.3-$(TARGET)-menus-$(PKGVERSION)-noarch-$(PKGREV).tgz .IF "$(USE_SHELL)"=="bash" ECHOPARAM=-e @@ -67,26 +67,26 @@ $(MISC)/$(TARGET)/usr/share/applications/ : # FIXME: removal of *-extension.* only to create identical packages to OOF680 %/usr/share/applications : @$(MKDIRHIER) $@ - /bin/sh -c "cd $(COMMONMISC)$/$(*:b:s/-/ /:1:s/3.2//); DESTDIR=$(shell @cd $*; pwd) GNOMEDIR="" ICON_PREFIX=$(ICONPREFIX.$(*:b:s/-/ /:1:s/3.2//)) KDEMAINDIR=/opt/kde .$/create_tree.sh" + /bin/sh -c "cd $(COMMONMISC)$/$(*:b:s/-/ /:1:s/3.3//); DESTDIR=$(shell @cd $*; pwd) GNOMEDIR="" ICON_PREFIX=$(ICONPREFIX.$(*:b:s/-/ /:1:s/3.3//)) KDEMAINDIR=/opt/kde .$/create_tree.sh" $(RM) $*$/opt$/kde$/share$/icons$/*$/*$/*$/*-extension.png $(RM) $*$/opt$/kde$/share$/mimelnk$/application$/*-extension.desktop $(RM) $*$/usr$/share$/applications$/*.desktop $(RM) $*$/usr$/bin$/soffice %$/install$/doinst.sh : update-script - @echo "( cd etc ; rm -rf $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//)) )" > $@ - @echo "( cd etc ; ln -snf /opt/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//):s/-//) $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//)) )" >> $@ + @echo "( cd etc ; rm -rf $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.3//)) )" > $@ + @echo "( cd etc ; ln -snf /opt/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.3//):s/-//) $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.3//)) )" >> $@ @echo "( cd usr/bin ; rm -rf soffice )" >> $@ - @echo "( cd usr/bin ; ln -sf /etc/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//))/program/soffice soffice )" >> $@ - @echo $(ECHOPARAM) $(foreach,i,$(shell @cat $(COMMONMISC)$/$(*:b:s/-/ /:1:s/3.2//)/launcherlist) "\n( cd usr/share/applications ; rm -rf $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//))-$i )\n( cd usr/share/applications ; ln -sf /etc/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//))/share/xdg/$i $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//))-$i )") >> $@ + @echo "( cd usr/bin ; ln -sf /etc/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.3//))/program/soffice soffice )" >> $@ + @echo $(ECHOPARAM) $(foreach,i,$(shell @cat $(COMMONMISC)$/$(*:b:s/-/ /:1:s/3.3//)/launcherlist) "\n( cd usr/share/applications ; rm -rf $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.3//))-$i )\n( cd usr/share/applications ; ln -sf /etc/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.3//))/share/xdg/$i $(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.3//))-$i )") >> $@ @cat $< >> $@ %$/install$/slack-desc : slack-desc @$(MKDIRHIER) $(@:d) - @sed -e "s/PKGNAME/$(*:b:s/-/ /:1:s/3.2//)-$(TARGET)-menus/g" -e "s/PKGVERSION/$(PKGVERSION.$(*:b:s/-/ /:1:s/3.2//))/g" \ - -e "s/LONGPRODUCTNAME/$(PRODUCTNAME.$(*:b:s/-/ /:1:s/3.2//)) $(PRODUCTVERSION.$(*:b:s/-/ /:1:s/3.2//))/g" \ - -e "s/PRODUCTNAME/$(PRODUCTNAME.$(*:b:s/-/ /:1:s/3.2//))/g" \ - -e "s/UNIXFILENAME/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.2//))/g" $< > $@ + @sed -e "s/PKGNAME/$(*:b:s/-/ /:1:s/3.3//)-$(TARGET)-menus/g" -e "s/PKGVERSION/$(PKGVERSION.$(*:b:s/-/ /:1:s/3.3//))/g" \ + -e "s/LONGPRODUCTNAME/$(PRODUCTNAME.$(*:b:s/-/ /:1:s/3.3//)) $(PRODUCTVERSION.$(*:b:s/-/ /:1:s/3.3//))/g" \ + -e "s/PRODUCTNAME/$(PRODUCTNAME.$(*:b:s/-/ /:1:s/3.3//))/g" \ + -e "s/UNIXFILENAME/$(UNIXFILENAME.$(*:b:s/-/ /:1:s/3.3//))/g" $< > $@ # needed to satisfy the slackware package tools - they need # the entries like this -- cgit From 0e1fee4e4454d449049fb5e4fa26fdf32b83df30 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Thu, 3 Dec 2009 17:28:42 +0100 Subject: native273 #i106809# exchange mergemodules by redistributables --- .../windows/msi_languages/LaunchCo.ulf | 3 ++- .../windows/msi_templates/LaunchCo.idt | 1 + scp2/source/ooo/makefile.mk | 1 - scp2/source/ooo/vc_redist.scp | 22 +++++++++++++++++++++- scp2/util/makefile.mk | 2 -- 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/instsetoo_native/inc_openoffice/windows/msi_languages/LaunchCo.ulf b/instsetoo_native/inc_openoffice/windows/msi_languages/LaunchCo.ulf index f4da77d0d8b9..20f2a60dd195 100644 --- a/instsetoo_native/inc_openoffice/windows/msi_languages/LaunchCo.ulf +++ b/instsetoo_native/inc_openoffice/windows/msi_languages/LaunchCo.ulf @@ -1,3 +1,4 @@ [OOO_LAUNCH_1] en-US = "The Installation Wizard cannot be run properly because you are logged in as a user without sufficient administrator rights for this system." - +[OOO_LAUNCH_2] +en-US = "Please use the file setup.exe to start the installation." diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/LaunchCo.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/LaunchCo.idt index 35d78694a664..c53ccda8d736 100644 --- a/instsetoo_native/inc_openoffice/windows/msi_templates/LaunchCo.idt +++ b/instsetoo_native/inc_openoffice/windows/msi_templates/LaunchCo.idt @@ -2,3 +2,4 @@ Condition Description s255 l255 WINDOWSENCODINGTEMPLATE LaunchCondition Condition Privileged OOO_LAUNCH_1 +SETUP_USED=1 Or Installed OOO_LAUNCH_2 diff --git a/scp2/source/ooo/makefile.mk b/scp2/source/ooo/makefile.mk index 0d85cc529b63..b7183112d1df 100644 --- a/scp2/source/ooo/makefile.mk +++ b/scp2/source/ooo/makefile.mk @@ -293,7 +293,6 @@ PARFILES += \ folder_ooo.par \ folderitem_ooo.par \ registryitem_ooo.par \ - mergemodules_ooo.par \ vc_redist.par \ windowscustomaction_ooo.par .ENDIF diff --git a/scp2/source/ooo/vc_redist.scp b/scp2/source/ooo/vc_redist.scp index 427f698bd467..88d15d9f0102 100644 --- a/scp2/source/ooo/vc_redist.scp +++ b/scp2/source/ooo/vc_redist.scp @@ -30,6 +30,7 @@ #include "macros.inc" #if defined(WITH_VC_REDIST) + WindowsCustomAction gid_Customaction_InstallRuntime Name = "InstallRuntime"; Typ = "98"; @@ -37,7 +38,19 @@ WindowsCustomAction gid_Customaction_InstallRuntime Target = "[SourceDir]redist\vcredist_x86.exe /qb"; Inbinarytable = 0; Styles = (NO_FILE); - Assignment1 = ("InstallUISequence", "VersionNT >= 600 and VersionNT < 700 And OLDPRODUCTSSAMEMAJOR And Not REMOVE=\"ALL\" And Not PATCH", "ExecuteAction"); + Assignment1 = ("InstallUISequence", "Not REMOVE=\"ALL\" And Not PATCH", "ExecuteAction"); + // Assignment1 = ("InstallExecuteSequence", "Not REMOVE=\"ALL\" And Not PATCH", "FileCost"); +End + +WindowsCustomAction gid_Customaction_InstallRuntime_X64 + Name = "InstallRuntimeX64"; + Typ = "98"; + Source = "SystemFolder"; + Target = "[SourceDir]redist\vcredist_x64.exe /qb"; + Inbinarytable = 0; + Styles = (NO_FILE); + Assignment1 = ("InstallUISequence", "Not REMOVE=\"ALL\" And Not PATCH And VersionNT64", "ExecuteAction"); + // Assignment1 = ("InstallExecuteSequence", "Not REMOVE=\"ALL\" And Not PATCH And VersionNT64", "FileCost"); End ScpAction scp_Copy_vcredist_x86 @@ -49,4 +62,11 @@ ScpAction scp_Copy_vcredist_x86 Name = "vcredist_x86.exe"; Subdir = "redist"; End + +ScpAction scp_Copy_vcredist_x64 + Copy = "vcredist_x64.exe"; + Name = "vcredist_x64.exe"; + Subdir = "redist"; +End + #endif diff --git a/scp2/util/makefile.mk b/scp2/util/makefile.mk index 9ba398eff7b9..bafca83860cb 100644 --- a/scp2/util/makefile.mk +++ b/scp2/util/makefile.mk @@ -129,7 +129,6 @@ SCP1FILES += \ folder_ooo.par \ folderitem_ooo.par \ windowscustomaction_ooo.par \ - mergemodules_ooo.par \ vc_redist.par \ registryitem_writer.par \ folderitem_writer.par \ @@ -283,7 +282,6 @@ SCP2FILES += \ folder_ooo.par \ folderitem_ooo.par \ windowscustomaction_ooo.par \ - mergemodules_ooo.par \ vc_redist.par \ registryitem_writer.par \ folderitem_writer.par \ -- cgit From f792a86b80363fca547e5f89a2ff58583a8e7aa4 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Thu, 3 Dec 2009 17:36:51 +0100 Subject: native273 #i106809# exchange mergemodules by redistributables --- scp2/source/ooo/vc_redist.scp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/scp2/source/ooo/vc_redist.scp b/scp2/source/ooo/vc_redist.scp index 88d15d9f0102..8f0b5e8a1bf9 100644 --- a/scp2/source/ooo/vc_redist.scp +++ b/scp2/source/ooo/vc_redist.scp @@ -31,27 +31,27 @@ #if defined(WITH_VC_REDIST) -WindowsCustomAction gid_Customaction_InstallRuntime - Name = "InstallRuntime"; - Typ = "98"; - Source = "SystemFolder"; - Target = "[SourceDir]redist\vcredist_x86.exe /qb"; - Inbinarytable = 0; - Styles = (NO_FILE); - Assignment1 = ("InstallUISequence", "Not REMOVE=\"ALL\" And Not PATCH", "ExecuteAction"); - // Assignment1 = ("InstallExecuteSequence", "Not REMOVE=\"ALL\" And Not PATCH", "FileCost"); -End +// WindowsCustomAction gid_Customaction_InstallRuntime +// Name = "InstallRuntime"; +// Typ = "98"; +// Source = "SystemFolder"; +// Target = "[SourceDir]redist\vcredist_x86.exe /qb"; +// Inbinarytable = 0; +// Styles = (NO_FILE); +// Assignment1 = ("InstallUISequence", "Not REMOVE=\"ALL\" And Not PATCH", "ExecuteAction"); +// // Assignment1 = ("InstallExecuteSequence", "Not REMOVE=\"ALL\" And Not PATCH", "FileCost"); +// End -WindowsCustomAction gid_Customaction_InstallRuntime_X64 - Name = "InstallRuntimeX64"; - Typ = "98"; - Source = "SystemFolder"; - Target = "[SourceDir]redist\vcredist_x64.exe /qb"; - Inbinarytable = 0; - Styles = (NO_FILE); - Assignment1 = ("InstallUISequence", "Not REMOVE=\"ALL\" And Not PATCH And VersionNT64", "ExecuteAction"); - // Assignment1 = ("InstallExecuteSequence", "Not REMOVE=\"ALL\" And Not PATCH And VersionNT64", "FileCost"); -End +// WindowsCustomAction gid_Customaction_InstallRuntime_X64 +// Name = "InstallRuntimeX64"; +// Typ = "98"; +// Source = "SystemFolder"; +// Target = "[SourceDir]redist\vcredist_x64.exe /qb"; +// Inbinarytable = 0; +// Styles = (NO_FILE); +// Assignment1 = ("InstallUISequence", "Not REMOVE=\"ALL\" And Not PATCH And VersionNT64", "ExecuteAction"); +// // Assignment1 = ("InstallExecuteSequence", "Not REMOVE=\"ALL\" And Not PATCH And VersionNT64", "FileCost"); +// End ScpAction scp_Copy_vcredist_x86 #if defined(BUILD_SPECIAL) -- cgit From ff016bd9d3e87d93db950c60ad7ccb5c31b5fa7a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 3 Dec 2009 17:24:39 +0000 Subject: cmcfixes68: #i107420# remove trivial warnings from sw with newer gcc --- sw/source/core/unocore/unotext.cxx | 4 ++-- sw/source/ui/uiview/srcview.cxx | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 7ae4b209f49f..ee1055b276c9 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -270,8 +270,8 @@ void SwXText::insertString(const uno::Reference< text::XTextRange >& xTextRange, sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) )); } - if(pRange && pRange->GetDoc() == GetDoc() || - pCursor && pCursor->GetDoc() == GetDoc()) + if( (pRange && pRange->GetDoc() == GetDoc()) || + (pCursor && pCursor->GetDoc() == GetDoc()) ) { const SwStartNode* pOwnStartNode = GetStartNode(); if(pCursor) diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index d30e85c5ee71..e93abdf73b15 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -717,6 +717,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, if(!bApi) + { if(bNotFoundMessage) { InfoBox( 0, SW_RES(MSG_NOT_FOUND)).Execute(); @@ -728,6 +729,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, pTextView->SetSelection( TextSelection( aPaM, aPaM ) ); StartSearchAndReplace( rSearchItem, FALSE, FALSE, TRUE ); } + } } return nFound; } -- cgit -- cgit From 022cb8bfea71cdf4e2b0ea2c91ff9807961a543a Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 4 Dec 2009 14:04:26 +0100 Subject: d2v02: #161005# do not crash on a badly linked libXrandr --- vcl/unx/source/app/randrwrapper.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vcl/unx/source/app/randrwrapper.cxx b/vcl/unx/source/app/randrwrapper.cxx index 8d01b64d4680..4fbe5db97ab9 100644 --- a/vcl/unx/source/app/randrwrapper.cxx +++ b/vcl/unx/source/app/randrwrapper.cxx @@ -161,7 +161,13 @@ RandRWrapper::RandRWrapper( Display* pDisplay ) : if( ! m_bValid ) { rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libXrandr.so.2" ) ); - m_pRandRLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT ); + // load and resolve dependencies immediately + // rationale: there are older distributions where libXrandr.so.2 is not linked + // with libXext.so, resulting in a missing symbol and terminating the office + // obviously they expected libXext to be linked in global symbolspace (that is + // linked by the application), which is not the case with us (because we want + // to be able to run in headless mode even without an installed X11 library) + m_pRandRLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT | SAL_LOADMODULE_NOW ); initFromModule(); } if( m_bValid ) -- cgit From 0a537a4a7dac6a1183266384359b263405aa9994 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 7 Dec 2009 09:17:16 +0000 Subject: cmcfixes68: #i107465# fix nonpro build error --- bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx | 2 +- bridges/source/remote/urp/urp_reader.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx index 21ec451bcc94..fc5a9af1ac5c 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx @@ -124,7 +124,7 @@ static typelib_TypeClass cpp2uno_call( int nUsedGPR = 0; int nUsedSSE = 0; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 bool bFitsRegisters = #endif x86_64::examine_argument( rParam.pTypeRef, false, nUsedGPR, nUsedSSE ); diff --git a/bridges/source/remote/urp/urp_reader.cxx b/bridges/source/remote/urp/urp_reader.cxx index dd9ff0af80ec..f2ac4f3e9dc7 100644 --- a/bridges/source/remote/urp/urp_reader.cxx +++ b/bridges/source/remote/urp/urp_reader.cxx @@ -372,8 +372,8 @@ inline sal_Bool OReaderThread::readFlags( struct MessageFlags *pFlags ) } pFlags->bSynchronous = ( HDRFLAG_SYNCHRONOUS & moreFlags ); pFlags->bMustReply = ( HDRFLAG_MUSTREPLY & moreFlags ); - OSL_ENSURE( pFlags->bSynchronous && pFlags->bMustReply || - ! pFlags->bSynchronous && !pFlags->bMustReply, + OSL_ENSURE( (pFlags->bSynchronous && pFlags->bMustReply) || + (!pFlags->bSynchronous && !pFlags->bMustReply), "urp-bridge : customized calls currently not supported !"); } -- cgit From 56cb5496a8a8a64ab4a6a6d8d820d9dc3bded3c9 Mon Sep 17 00:00:00 2001 From: Joachim Lingner Date: Mon, 7 Dec 2009 13:28:21 +0100 Subject: jl144: #i106132# lib files on Windows were not delivered --- nss/prj/d.lst | 1 + 1 file changed, 1 insertion(+) diff --git a/nss/prj/d.lst b/nss/prj/d.lst index d70484ceab28..f1090ca8d91e 100755 --- a/nss/prj/d.lst +++ b/nss/prj/d.lst @@ -25,6 +25,7 @@ mkdir: %_DEST%\lib%_EXT%\sqlite ..\%__SRC%\lib\libssl3.* %_DEST%\lib%_EXT%\libssl3.* ..\%__SRC%\lib\libsqlite3.* %_DEST%\lib%_EXT%\sqlite\libsqlite3.* +..\%__SRC%\lib\*.lib %_DEST%\lib%_EXT% ..\%__SRC%\bin\* %_DEST%\bin%_EXT% -- cgit From 0ba84eeda83b5241619a7c2e63f257db08629bad Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 10 Dec 2009 11:28:04 +0100 Subject: sb116: #i106384# removed unncessary assignments (that caused warnings about using uninitialized variables) --- sal/inc/rtl/math.hxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/sal/inc/rtl/math.hxx b/sal/inc/rtl/math.hxx index dbd4a2172246..4891b7565647 100644 --- a/sal/inc/rtl/math.hxx +++ b/sal/inc/rtl/math.hxx @@ -362,7 +362,6 @@ inline void setInf(double * pd, bool bNegative) double sd; sal_math_Double md; }; - sd = *pd; md.w32_parts.msw = bNegative ? 0xFFF00000 : 0x7FF00000; md.w32_parts.lsw = 0; *pd = sd; @@ -377,7 +376,6 @@ inline void setNan(double * pd) double sd; sal_math_Double md; }; - sd = *pd; md.w32_parts.msw = 0x7FFFFFFF; md.w32_parts.lsw = 0xFFFFFFFF; *pd = sd; -- cgit From 4a96552f4966f204a15287d3c1a9340012792661 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 10 Dec 2009 11:32:26 +0100 Subject: sb116: #i106074# moved variable declarations to beginning of C blocks, for non-C99 compilers --- sal/osl/unx/process.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index 234232b1f0ef..e3f78ff2f2b4 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -467,6 +467,9 @@ static void ChildStatusProc(void *pData) if ( (status == 0) && ((pid = fork()) == 0) ) { /* Child */ + int chstatus = 0; + sal_Int32 nWrote; + if (channel[0] != -1) close(channel[0]); if ((data.m_uid != (uid_t)-1) && ((data.m_uid != getuid()) || (data.m_gid != getgid()))) @@ -482,7 +485,6 @@ static void ChildStatusProc(void *pData) #endif } - int chstatus = 0; if (data.m_pszDir) chstatus = chdir(data.m_pszDir); @@ -534,7 +536,7 @@ static void ChildStatusProc(void *pData) OSL_TRACE("ChildStatusProc : starting '%s' failed",data.m_pszArgs[0]); /* if we reach here, something went wrong */ - sal_Int32 nWrote = write(channel[1], &errno, sizeof(errno)); + nWrote = write(channel[1], &errno, sizeof(errno)); if (nWrote != sizeof(errno)) OSL_TRACE("sendFdPipe : sending failed (%s)",strerror(errno)); -- cgit From 407324bf5ee13558a48f5ea6dcdf1ca590aa8595 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 10 Dec 2009 11:36:20 +0100 Subject: sb116: re-run autoconf after merge --- configure | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 9998b3c359dd..51b8e3f57358 100755 --- a/configure +++ b/configure @@ -3013,7 +3013,7 @@ fi if test "${with_system_stdlibs+set}" = set; then withval=$with_system_stdlibs; else - checkforprelink=yes + checkforstdlibproblems=yes fi @@ -11590,7 +11590,7 @@ _ACEOF if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then gccvisbroken=yes else - if $EGREP -q '@PLT|\$stub' visibility.s; then + if $EGREP -q '@PLT|\$stub|\(PLT\)' visibility.s; then gccvisbroken=no; else gccvisbroken=yes; @@ -11999,9 +11999,9 @@ $as_echo "$as_me: error: No valid check available. Please check the block for yo _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[-A-Za-z]*//` _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` - if test "$_jdk_ver" -lt 10600; then - { { $as_echo "$as_me:$LINENO: error: IBM JDK is too old, you need at least 1.6" >&5 -$as_echo "$as_me: error: IBM JDK is too old, you need at least 1.6" >&2;} + if test "$_jdk_ver" -lt 10500; then + { { $as_echo "$as_me:$LINENO: error: IBM JDK is too old, you need at least 1.5" >&5 +$as_echo "$as_me: error: IBM JDK is too old, you need at least 1.5" >&2;} { (exit 1); exit 1; }; } fi @@ -14068,11 +14068,18 @@ fi if test -z "$with_system_stdlibs" -a -z "$with_system_libs"; then - if test -n "$checkforprelink" -a -f /etc/rpm/macros.prelink; then - with_system_stdlibs=yes - { $as_echo "$as_me:$LINENO: WARNING: prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&5 + if test -n "$checkforstdlibproblems"; then + if test -f /etc/rpm/macros.prelink; then + with_system_stdlibs=yes + { $as_echo "$as_me:$LINENO: WARNING: prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&5 $as_echo "$as_me: WARNING: prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&2;} - echo "prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >> warn + echo "prelinked libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >> warn + elif test "$GCC" = "yes" -a ! -e `$CC -print-file-name=libgcc_s.so.1`; then + with_system_stdlibs=yes + { $as_echo "$as_me:$LINENO: WARNING: platform doesn't have a libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&5 +$as_echo "$as_me: WARNING: platform doesn't have a libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >&2;} + echo "platform doesn't have a libgcc_s.so.1, enabling --with-system-stdlibs, use --without-system-stdlibs to override" >> warn + fi fi fi -- cgit From 986a71938c7acdd8d6360b281e7582a68518b30d Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 10 Dec 2009 13:06:13 +0100 Subject: sb116: #i106845# removed "fi" left over from previous changeset 04aef48c8fd5 --- configure | 1 - configure.in | 1 - 2 files changed, 2 deletions(-) diff --git a/configure b/configure index 51b8e3f57358..aab35a795bba 100755 --- a/configure +++ b/configure @@ -11185,7 +11185,6 @@ $as_echo "$as_me: WARNING: using stlport. Warning, breaks your ABI compatability echo "using stlport. Warning, breaks your ABI compatability!" >>warn fi fi -fi if test -z "$STLPORT4"; then STLPORT4="NO_STLPORT4" diff --git a/configure.in b/configure.in index 6217774bd74d..0eaaf634f66d 100644 --- a/configure.in +++ b/configure.in @@ -2483,7 +2483,6 @@ dnl =================================================================== echo "using stlport. Warning, breaks your ABI compatability!" >>warn fi fi -fi if test -z "$STLPORT4"; then STLPORT4="NO_STLPORT4" -- cgit From 59d07c6181f194f60258480f2cb419a86c25a529 Mon Sep 17 00:00:00 2001 From: Ingo Schmidt Date: Thu, 10 Dec 2009 14:27:54 +0100 Subject: native275 #i107355# updating to OOo 3.3 --- instsetoo_native/util/openoffice.lst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst index 4626c3427fab..e6ba698fae7f 100644 --- a/instsetoo_native/util/openoffice.lst +++ b/instsetoo_native/util/openoffice.lst @@ -14,7 +14,7 @@ Globals SERVICETAG_PRODUCTVERSION 3.3 SERVICETAG_PARENTNAME OpenOffice.org 3.3 SERVICETAG_SOURCE {buildsource}{minor}(Build:{buildid}) - SERVICETAG_URN urn:uuid:cd39f1d0-f2fc-11dd-8c47-080020a9ed93 + SERVICETAG_URN urn:uuid:0187debd-e458-11de-82d6-080020a9ed93 HIDELICENSEDIALOG 1 PACKAGEPREFIX BASISPACKAGEPREFIX ooobasis @@ -191,7 +191,7 @@ OpenOffice_Dev UREPACKAGEPREFIX ooodev SOLSUREPACKAGEPREFIX ooodev REGISTRYLAYERNAME LayerDev - SERVICETAG_URN urn:uuid:156a7974-f2fd-11dd-8c47-080020a9ed93 + SERVICETAG_URN urn:uuid:1680b00d-e45c-11de-82d6-080020a9ed93 UPDATEURL http://update36.services.openoffice.org/ProductUpdateService/check.Update ODFNOTIFYURL http://odfnotify.services.openoffice.org/OOo3.0/notification.jsp?version=ODF ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,javaversion2.dat,userland.txt @@ -533,7 +533,7 @@ BrOffice_Dev UREPACKAGEPREFIX ooodev SOLSUREPACKAGEPREFIX ooodev REGISTRYLAYERNAME LayerDevBroffice - SERVICETAG_URN urn:uuid:156a7974-f2fd-11dd-8c47-080020a9ed93 + SERVICETAG_URN urn:uuid:1680b00d-e45c-11de-82d6-080020a9ed93 UPDATEURL http://update36.services.openoffice.org/ProductUpdateService/check.Update ODFNOTIFYURL http://odfnotify.services.openoffice.org/OOo3.0/notification.jsp?version=ODF ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,javaversion2.dat,userland.txt -- cgit From b7cbd2ef8e1caff38e590cc48a3d7b15928a074d Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Thu, 10 Dec 2009 15:53:30 +0100 Subject: aus111: #i107498# - xhp localization outside helpcontent2 and the according cleanup in sdext --- sdext/prj/build.lst | 3 +- .../help/en-US/com.sun.PresenterScreen/makefile.mk | 55 ++++++ .../en-US/com.sun.PresenterScreen/presenter.xhp | 189 +++++++++++++++++++++ sdext/source/presenter/makefile.mk | 15 +- 4 files changed, 252 insertions(+), 10 deletions(-) create mode 100644 sdext/source/presenter/help/en-US/com.sun.PresenterScreen/makefile.mk create mode 100755 sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp diff --git a/sdext/prj/build.lst b/sdext/prj/build.lst index 9d99c119ad83..8ced1e83edad 100644 --- a/sdext/prj/build.lst +++ b/sdext/prj/build.lst @@ -6,7 +6,8 @@ dx sdext\source\minimizer\registry\data\org\openoffice\Office\extension nmake - dx sdext\source\minimizer\registry\data\org\openoffice\Office\UI nmake - all sdext_minimizer_rdooou NULL dx sdext\source\minimizer\registry\data\org\openoffice\Office nmake - all sdext_minimizer_rdooo NULL dx sdext\source\presenter\registry\data\org\openoffice\Office\extension nmake - all sdext_presenter_xcu NULL -dx sdext\source\presenter nmake - all sdext_presenter sdext_inc sdext_presenter_xcu NULL +dx sdext\source\presenter\help\en-US\com.sun.PresenterScreen nmake - all sdext_presenter_help NULL +dx sdext\source\presenter nmake - all sdext_presenter sdext_inc sdext_presenter_xcu sdext_presenter_help NULL dx sdext\inc nmake - all sdext_inc NULL dx sdext\source\pdfimport\xpdfwrapper nmake - all dx_xpdfwrap NULL dx sdext\source\pdfimport\xpdftest nmake - all dx_parsetest dx_xpdfwrap NULL diff --git a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/makefile.mk b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/makefile.mk new file mode 100644 index 000000000000..854644169f17 --- /dev/null +++ b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/makefile.mk @@ -0,0 +1,55 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.10 $ +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=../../../../.. +PRJNAME=sdext +TARGET=PresenterScreenHelp +EXTNAME=PresenterScreen + +PACKAGE = com.sun.PresenterScreen + +# --- Settings ---------------------------------- + +.INCLUDE : settings.mk + +.IF "$(ENABLE_PRESENTER_SCREEN)" == "NO" +do_nothing: + @echo "Presenter Screen build disabled." +.ELSE + +XHPFILES= \ + presenter.xhp + + +.INCLUDE : target.mk +.INCLUDE : tg_help.mk + +.ENDIF diff --git a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp new file mode 100755 index 000000000000..8ef828812dd6 --- /dev/null +++ b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp @@ -0,0 +1,189 @@ + + + + + + + + + Sun Presenter Console Keyboard Shortcuts + /com.sun.PresenterScreen-PLATFORMID/presenter.xhp + + + + +Presenter Console shortcuts + +Sun Presenter Console Keyboard Shortcuts + When running a slide show using the Sun Presenter Console, you can use the following keys: + + + + Action + + + Key or Keys + + + + + Next slide, or next effect + + + Left click, right arrow, down arrow, spacebar, page down, enter, return, 'N' + + + + + Previous slide, or previous effect + + + Right click, left arrow, up arrow, page up, backspace, 'P' + + + + + First slide + + + Home + + + + + Last slide + + + End + + + + + Previous slide without effects + + + Alt+Page Up + + + + + Next slide without effects + + + Alt+Page Down + + + + + Black/Unblack the screen + + + 'B', '.' + + + + + White/Unwhite the screen + + + 'W', ',' + + + + + End slide show + + + Esc, '-' + + + + + Go to slide number + + + Number followed by Enter + + + + + Grow/Shrink size of notes font + + + 'G', 'S' + + + + + Scroll notes up/down + + + 'A', 'Z' + + + + + Move caret in notes view backward/forward + + + 'H', 'L' + + + + + Show the Presenter Console + + + Ctrl-'1' + + + + + Show the Presentation Notes + + + Ctrl-'2' + + + + + Show the Slides Overview + + + Ctrl-'3' + + +
+ + +
diff --git a/sdext/source/presenter/makefile.mk b/sdext/source/presenter/makefile.mk index 2144809b32df..a4b08861004d 100644 --- a/sdext/source/presenter/makefile.mk +++ b/sdext/source/presenter/makefile.mk @@ -247,7 +247,8 @@ PLATFORMID:=$(RTL_OS:l)_$(RTL_ARCH:l) COMPONENT_HELP= \ $(ZIP1DIR)$/help/component.txt \ - $(ZIP1DIR)$/help$/en-US$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp + $(foreach,l,$(alllangiso) $(ZIP1DIR)$/help$/$l$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp) +# $(ZIP1DIR)$/help$/en-US$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp # no localization yet - see #i107498# # $(foreach,l,$(alllangiso) $(ZIP1DIR)$/help$/$l$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp) @@ -282,14 +283,10 @@ $(ZIP1DIR)$/help$/component.txt : help$/$$(@:f) @@-$(MKDIRHIER) $(@:d) $(COPY) $< $@ -$(ZIP1DIR)$/help$/%$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp : help$/%$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp - @echo copying $@ to $< - $(MKDIRHIER) $(@:d) - $(COPY) $< $@ - -#$(COMPONENT_FILES) : $$(@:f) -# -$(MKDIRHIER) $(@:d) -# $(COPY) $< $@ +$(ZIP1DIR)$/help$/%$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp : $(COMMONMISC)/%/com.sun.PresenterScreen/presenter.xhp + @echo creating $@ + @@-$(MKDIRHIER) $(@:d) + $(TYPE) $< | sed "s/PLATFORMID/$(PLATFORMID)/" > $@ $(COMPONENT_BITMAPS) : bitmaps$/$$(@:f) @-$(MKDIRHIER) $(@:d) -- cgit From 268ea4e63f4024544cbd33e0e6d95cb3119746b7 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Thu, 10 Dec 2009 15:53:30 +0100 Subject: aus111: #i107498# - xhp localization outside helpcontent2 and the according cleanup in sdext --- solenv/inc/tg_help.mk | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100755 solenv/inc/tg_help.mk diff --git a/solenv/inc/tg_help.mk b/solenv/inc/tg_help.mk new file mode 100755 index 000000000000..a8a33051f0fc --- /dev/null +++ b/solenv/inc/tg_help.mk @@ -0,0 +1,86 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: makefile.pmk,v $ +# +# $Revision: 1.25 $ +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +# to make it usable with special lang selection of +# helpcontent2 + +aux_alllangiso*:=$(alllangiso) + +SHELL_PACKAGE:=$(subst,/,$/ $(PACKAGE)) +HLANGXHPFILES:=$(foreach,i,$(XHPFILES) $(foreach,j,$(aux_alllangiso) $(COMMONMISC)$/$j$/$(SHELL_PACKAGE)$/$(i:f))) + +ALLTAR : $(COMMONMISC)$/$(TARGET).done $(COMMONMISC)$/xhp_changed.flag optix + +$(HLANGXHPFILES) : $$(@:d)thisdir.created + +$(COMMONMISC)$/{$(aux_alllangiso)}$/$(SHELL_PACKAGE)$/%.xhp :| %.xhp + @$(TOUCH) $@ +# internal dependencies not sufficient to trigger merge? +# @$(NULL) + + +$(COMMONMISC)$/$(TARGET).done : $(HLANGXHPFILES) +.IF "$(WITH_LANG)"!="" + $(AUGMENT_LIBRARY_PATH) $(HELPEX) -QQ -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(COMMONMISC) -y $(SHELL_PACKAGE) -l all -lf $(aux_alllangiso:t",") -m $(LOCALIZESDF) && $(TOUCH) $@ +.ELSE # "$(WITH_LANG)"!="" + cp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES)))) $(COMMONMISC)$/en-US$/$(SHELL_PACKAGE) && $(TOUCH) $@ +.ENDIF # "$(WITH_LANG)"!="" +.IF "$(OS)"=="SOLARIS" + @$(ECHONL) " " +.ELSE # "$(OS)"=="SOLARIS" + @$(ECHONL) +.ENDIF # "$(OS)"=="SOLARIS" + +$(COMMONMISC)$/xhp_changed.flag : $(HLANGXHPFILES) + @$(TOUCH) $@ + +# urks - dmake mixes up operators and strings :-( +.IF "$(HLANGXHPFILES:s/defined/xxx/)"!="" + +.IF "$(HELPTRANSPHONY)"!="" +$(COMMONMISC)$/$(TARGET).done .PHONY : +.ELSE # "$(HELPTRANSPHONY)"!="" + +$(COMMONMISC)$/$(TARGET).done : makefile.mk +.IF "$(WITH_LANG)"!="" +$(COMMONMISC)$/$(TARGET).done : $(LOCALIZESDF) +.ENDIF # "$(WITH_LANG)"!="" +.ENDIF # "$(HELPTRANSPHONY)"!="" +.ENDIF # "$(HLANGXHPFILES)"!="" + +optix: $(COMMONMISC)$/$(TARGET).done + @echo done + +%.created : + @@-$(MKDIRHIER) $(@:d) + @$(TOUCH) $@ + + -- cgit From 5d3dc92d7477ff0e0094d1c40d4732ce2f9a1fe8 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Thu, 10 Dec 2009 18:02:55 +0100 Subject: aus111: #i107498# - xhp localization outside helpcontent2 and the according cleanup in sdext --- .../presenter.xhp | 189 --------------------- .../presenter.xhp | 189 --------------------- .../presenter.xhp | 189 --------------------- .../presenter.xhp | 189 --------------------- .../presenter.xhp | 189 --------------------- .../presenter.xhp | 189 --------------------- 6 files changed, 1134 deletions(-) delete mode 100755 sdext/source/presenter/help/en-US/com.sun.PresenterScreen-linux_x86/presenter.xhp delete mode 100644 sdext/source/presenter/help/en-US/com.sun.PresenterScreen-linux_x86_64/presenter.xhp delete mode 100755 sdext/source/presenter/help/en-US/com.sun.PresenterScreen-macosx_x86/presenter.xhp delete mode 100755 sdext/source/presenter/help/en-US/com.sun.PresenterScreen-solaris_sparc/presenter.xhp delete mode 100644 sdext/source/presenter/help/en-US/com.sun.PresenterScreen-solaris_x86/presenter.xhp delete mode 100755 sdext/source/presenter/help/en-US/com.sun.PresenterScreen-windows_x86/presenter.xhp diff --git a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-linux_x86/presenter.xhp b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-linux_x86/presenter.xhp deleted file mode 100755 index ba804733ac7d..000000000000 --- a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-linux_x86/presenter.xhp +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - Sun Presenter Console Keyboard Shortcuts - /com.sun.PresenterScreen-linux_x86/presenter.xhp - - - - -Presenter Console shortcuts - -Sun Presenter Console Keyboard Shortcuts - When running a slide show using the Sun Presenter Console, you can use the following keys: - - - - Action - - - Key or Keys - - - - - Next slide, or next effect - - - Left click, right arrow, down arrow, spacebar, page down, enter, return, 'N' - - - - - Previous slide, or previous effect - - - Right click, left arrow, up arrow, page up, backspace, 'P' - - - - - First slide - - - Home - - - - - Last slide - - - End - - - - - Previous slide without effects - - - Alt+Page Up - - - - - Next slide without effects - - - Alt+Page Down - - - - - Black/Unblack the screen - - - 'B', '.' - - - - - White/Unwhite the screen - - - 'W', ',' - - - - - End slide show - - - Esc, '-' - - - - - Go to slide number - - - Number followed by Enter - - - - - Grow/Shrink size of notes font - - - 'G', 'S' - - - - - Scroll notes up/down - - - 'A', 'Z' - - - - - Move caret in notes view backward/forward - - - 'H', 'L' - - - - - Show the Presenter Console - - - Ctrl-'1' - - - - - Show the Presentation Notes - - - Ctrl-'2' - - - - - Show the Slides Overview - - - Ctrl-'3' - - -
- - -
diff --git a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-linux_x86_64/presenter.xhp b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-linux_x86_64/presenter.xhp deleted file mode 100644 index 2ad489b265d4..000000000000 --- a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-linux_x86_64/presenter.xhp +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - Sun Presenter Console Keyboard Shortcuts - /com.sun.PresenterScreen-linux_x86_64/presenter.xhp - - - - -Presenter Console shortcuts - -Sun Presenter Console Keyboard Shortcuts - When running a slide show using the Sun Presenter Console, you can use the following keys: - - - - Action - - - Key or Keys - - - - - Next slide, or next effect - - - Left click, right arrow, down arrow, spacebar, page down, enter, return, 'N' - - - - - Previous slide, or previous effect - - - Right click, left arrow, up arrow, page up, backspace, 'P' - - - - - First slide - - - Home - - - - - Last slide - - - End - - - - - Previous slide without effects - - - Alt+Page Up - - - - - Next slide without effects - - - Alt+Page Down - - - - - Black/Unblack the screen - - - 'B', '.' - - - - - White/Unwhite the screen - - - 'W', ',' - - - - - End slide show - - - Esc, '-' - - - - - Go to slide number - - - Number followed by Enter - - - - - Grow/Shrink size of notes font - - - 'G', 'S' - - - - - Scroll notes up/down - - - 'A', 'Z' - - - - - Move caret in notes view backward/forward - - - 'H', 'L' - - - - - Show the Presenter Console - - - Ctrl-'1' - - - - - Show the Presentation Notes - - - Ctrl-'2' - - - - - Show the Slides Overview - - - Ctrl-'3' - - -
- - -
diff --git a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-macosx_x86/presenter.xhp b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-macosx_x86/presenter.xhp deleted file mode 100755 index 551fa61b5849..000000000000 --- a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-macosx_x86/presenter.xhp +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - Sun Presenter Console Keyboard Shortcuts - /com.sun.PresenterScreen-macosx_x86/presenter.xhp - - - - -Presenter Console shortcuts - -Sun Presenter Console Keyboard Shortcuts - When running a slide show using the Sun Presenter Console, you can use the following keys: - - - - Action - - - Key or Keys - - - - - Next slide, or next effect - - - Left click, right arrow, down arrow, spacebar, page down, enter, return, 'N' - - - - - Previous slide, or previous effect - - - Right click, left arrow, up arrow, page up, backspace, 'P' - - - - - First slide - - - Home - - - - - Last slide - - - End - - - - - Previous slide without effects - - - Alt+Page Up - - - - - Next slide without effects - - - Alt+Page Down - - - - - Black/Unblack the screen - - - 'B', '.' - - - - - White/Unwhite the screen - - - 'W', ',' - - - - - End slide show - - - Esc, '-' - - - - - Go to slide number - - - Number followed by Enter - - - - - Grow/Shrink size of notes font - - - 'G', 'S' - - - - - Scroll notes up/down - - - 'A', 'Z' - - - - - Move caret in notes view backward/forward - - - 'H', 'L' - - - - - Show the Presenter Console - - - Ctrl-'1' - - - - - Show the Presentation Notes - - - Ctrl-'2' - - - - - Show the Slides Overview - - - Ctrl-'3' - - -
- - -
diff --git a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-solaris_sparc/presenter.xhp b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-solaris_sparc/presenter.xhp deleted file mode 100755 index a6e2b55d2e7d..000000000000 --- a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-solaris_sparc/presenter.xhp +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - Sun Presenter Console Keyboard Shortcuts - /com.sun.PresenterScreen-solaris_sparc/presenter.xhp - - - - -Presenter Console shortcuts - -Sun Presenter Console Keyboard Shortcuts - When running a slide show using the Sun Presenter Console, you can use the following keys: - - - - Action - - - Key or Keys - - - - - Next slide, or next effect - - - Left click, right arrow, down arrow, spacebar, page down, enter, return, 'N' - - - - - Previous slide, or previous effect - - - Right click, left arrow, up arrow, page up, backspace, 'P' - - - - - First slide - - - Home - - - - - Last slide - - - End - - - - - Previous slide without effects - - - Alt+Page Up - - - - - Next slide without effects - - - Alt+Page Down - - - - - Black/Unblack the screen - - - 'B', '.' - - - - - White/Unwhite the screen - - - 'W', ',' - - - - - End slide show - - - Esc, '-' - - - - - Go to slide number - - - Number followed by Enter - - - - - Grow/Shrink size of notes font - - - 'G', 'S' - - - - - Scroll notes up/down - - - 'A', 'Z' - - - - - Move caret in notes view backward/forward - - - 'H', 'L' - - - - - Show the Presenter Console - - - Ctrl-'1' - - - - - Show the Presentation Notes - - - Ctrl-'2' - - - - - Show the Slides Overview - - - Ctrl-'3' - - -
- - -
diff --git a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-solaris_x86/presenter.xhp b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-solaris_x86/presenter.xhp deleted file mode 100644 index 5bbf174953e5..000000000000 --- a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-solaris_x86/presenter.xhp +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - Sun Presenter Console Keyboard Shortcuts - /com.sun.PresenterScreen-solaris_x86/presenter.xhp - - - - -Presenter Console shortcuts - -Sun Presenter Console Keyboard Shortcuts - When running a slide show using the Sun Presenter Console, you can use the following keys: - - - - Action - - - Key or Keys - - - - - Next slide, or next effect - - - Left click, right arrow, down arrow, spacebar, page down, enter, return, 'N' - - - - - Previous slide, or previous effect - - - Right click, left arrow, up arrow, page up, backspace, 'P' - - - - - First slide - - - Home - - - - - Last slide - - - End - - - - - Previous slide without effects - - - Alt+Page Up - - - - - Next slide without effects - - - Alt+Page Down - - - - - Black/Unblack the screen - - - 'B', '.' - - - - - White/Unwhite the screen - - - 'W', ',' - - - - - End slide show - - - Esc, '-' - - - - - Go to slide number - - - Number followed by Enter - - - - - Grow/Shrink size of notes font - - - 'G', 'S' - - - - - Scroll notes up/down - - - 'A', 'Z' - - - - - Move caret in notes view backward/forward - - - 'H', 'L' - - - - - Show the Presenter Console - - - Ctrl-'1' - - - - - Show the Presentation Notes - - - Ctrl-'2' - - - - - Show the Slides Overview - - - Ctrl-'3' - - -
- - -
diff --git a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-windows_x86/presenter.xhp b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-windows_x86/presenter.xhp deleted file mode 100755 index fabd7a3fa35c..000000000000 --- a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen-windows_x86/presenter.xhp +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - Sun Presenter Console Keyboard Shortcuts - /com.sun.PresenterScreen-windows_x86/presenter.xhp - - - - -Presenter Console shortcuts - -Sun Presenter Console Keyboard Shortcuts - When running a slide show using the Sun Presenter Console, you can use the following keys: - - - - Action - - - Key or Keys - - - - - Next slide, or next effect - - - Left click, right arrow, down arrow, spacebar, page down, enter, return, 'N' - - - - - Previous slide, or previous effect - - - Right click, left arrow, up arrow, page up, backspace, 'P' - - - - - First slide - - - Home - - - - - Last slide - - - End - - - - - Previous slide without effects - - - Alt+Page Up - - - - - Next slide without effects - - - Alt+Page Down - - - - - Black/Unblack the screen - - - 'B', '.' - - - - - White/Unwhite the screen - - - 'W', ',' - - - - - End slide show - - - Esc, '-' - - - - - Go to slide number - - - Number followed by Enter - - - - - Grow/Shrink size of notes font - - - 'G', 'S' - - - - - Scroll notes up/down - - - 'A', 'Z' - - - - - Move caret in notes view backward/forward - - - 'H', 'L' - - - - - Show the Presenter Console - - - Ctrl-'1' - - - - - Show the Presentation Notes - - - Ctrl-'2' - - - - - Show the Slides Overview - - - Ctrl-'3' - - -
- - -
-- cgit From 8464add3add803b619430471083ac96ba60b2c6d Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 11 Dec 2009 13:18:55 +0100 Subject: sb116: #i105348#, #i105059# put PTHREAD_CFLAGS and PYTHONPATH back into solenv/config/ssolar.cmn reset section --- solenv/config/ssolar.cmn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/solenv/config/ssolar.cmn b/solenv/config/ssolar.cmn index 71629f1e44e6..877d82e566a5 100644 --- a/solenv/config/ssolar.cmn +++ b/solenv/config/ssolar.cmn @@ -170,6 +170,7 @@ common PROFILE profile PROSWITCH + PTHREAD_CFLAGS REMOTE_BUILD_FLAG RES_ARAB RES_CHINSIM @@ -269,6 +270,7 @@ common NO_HIDS PAM_LINK PAM + PYTHONPATH SOLAR_PLUGIN URE_BOOTSTRAP USE_FT_EMBOLDEN -- cgit From 540e80d2fcbffc1eb6ee15f475c079d85f4baff9 Mon Sep 17 00:00:00 2001 From: Mikhail Voitenko Date: Wed, 16 Dec 2009 14:02:04 +0000 Subject: #i107688# handle the broken documents correctly --- package/source/zipapi/ZipFile.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index f6dafac4cb6a..9934caa0c066 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -880,8 +880,8 @@ sal_Int32 ZipFile::recover() if ( aEntry.nExtraLen < 0 ) aEntry.nExtraLen = 0x7FFF; // End of quick fix - - sal_Int32 nBlockLength = aEntry.nSize + aEntry.nPathLen + aEntry.nExtraLen + 30 + nDescrLength; + sal_Int32 nDataSize = ( aEntry.nMethod == DEFLATED ) ? aEntry.nCompressedSize : aEntry.nSize; + sal_Int32 nBlockLength = nDataSize + aEntry.nPathLen + aEntry.nExtraLen + 30 + nDescrLength; if ( aEntry.nPathLen <= ZIP_MAXNAMELEN && aEntry.nExtraLen < ZIP_MAXEXTRA && ( nGenPos + nPos + nBlockLength ) <= nLength ) { -- cgit From 449e322ba5a89f456d40e0ef1a1db32205941c65 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 17 Dec 2009 15:56:15 +0000 Subject: pythonssldedux: #i106542# build python md5 module for md5 email support --- python/Python-ssl.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/python/Python-ssl.patch b/python/Python-ssl.patch index a2a70a064029..642586f31584 100644 --- a/python/Python-ssl.patch +++ b/python/Python-ssl.patch @@ -187,3 +187,24 @@ '/usr/contrib/ssl/lib/' ] ) +--- misc/Python-2.6.1/Modules/Setup.dist 2009-12-17 15:16:50.000000000 +0000 ++++ misc/build/Python-2.6.1/Modules/Setup.dist 2009-12-17 15:17:49.000000000 +0000 +@@ -248,14 +248,14 @@ + # Message-Digest Algorithm, described in RFC 1321. The necessary files + # md5.c and md5.h are included here. + +-#_md5 md5module.c md5.c ++_md5 md5module.c md5.c + + + # The _sha module implements the SHA checksum algorithms. + # (NIST's Secure Hash Algorithms.) +-#_sha shamodule.c +-#_sha256 sha256module.c +-#_sha512 sha512module.c ++_sha shamodule.c ++_sha256 sha256module.c ++_sha512 sha512module.c + + + # SGI IRIX specific modules -- off by default. -- cgit From 27f3b9b1fee739ae147ac1bd15a69d70bc529298 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 17 Dec 2009 17:28:31 +0000 Subject: #i107741# HasRefListExpressibleAsOneReference is supposed to detect one reference, really do so --- sc/source/core/data/cell2.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx index d7d3708c3295..4caaa1cb3267 100644 --- a/sc/source/core/data/cell2.cxx +++ b/sc/source/core/data/cell2.cxx @@ -679,6 +679,14 @@ ScFormulaCell::HasRefListExpressibleAsOneReference(ScRange& rRange) const Union of these references must form one range and their intersection must be empty set. */ + + // Detect the simple case of exactly one reference in advance without all + // overhead. + // #i107741# Doing so actually makes outlines using SUBTOTAL(x;reference) + // work again, where the function does not have only references. + if (HasOneReference( rRange)) + return true; + pCode->Reset(); // Get first reference, if any ScToken* const pFirstReference( -- cgit From bbce52251b1d763c9fa943ba5d9fcdd3c78e3ec5 Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Mon, 21 Dec 2009 14:14:08 +0000 Subject: #i107804# Checking for an already running office doesn't work well with Windows Vista or later --- scp2/source/ooo/windowscustomaction_ooo.scp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scp2/source/ooo/windowscustomaction_ooo.scp b/scp2/source/ooo/windowscustomaction_ooo.scp index b4ddac39799b..ceb0b156cd7b 100755 --- a/scp2/source/ooo/windowscustomaction_ooo.scp +++ b/scp2/source/ooo/windowscustomaction_ooo.scp @@ -394,7 +394,7 @@ WindowsCustomAction gid_Customaction_Patch_Isofficerunning Target = "IsOfficeRunning"; Inbinarytable = 1; Assignment1 = ("ControlEvent", "ReadyToInstall", "InstallNow", "DoAction", "IsOfficeRunning", "1", "1"); - Assignment2 = ("InstallExecuteSequence", "", "RunningOffice"); + Assignment2 = ("InstallExecuteSequence", "VersionNT < 600", "RunningOffice"); End WindowsCustomAction gid_Customaction_Full_Isofficerunning @@ -403,7 +403,7 @@ WindowsCustomAction gid_Customaction_Full_Isofficerunning Source = "shlxtmsi.dll"; Target = "IsOfficeRunning"; Inbinarytable = 1; - Assignment1 = ("InstallExecuteSequence", "", "RunningOffice"); + Assignment1 = ("InstallExecuteSequence", "VersionNT < 600 Or Not PATCH", "RunningOffice"); End WindowsCustomAction gid_Customaction_Langpack_Isofficerunning @@ -412,7 +412,7 @@ WindowsCustomAction gid_Customaction_Langpack_Isofficerunning Source = "lngpckinsthlp.dll"; Target = "IsOfficeRunning"; Inbinarytable = 1; - Assignment1 = ("InstallExecuteSequence", "PATCH", "RunningOffice"); + Assignment1 = ("InstallExecuteSequence", "PATCH And VersionNT < 600", "RunningOffice"); End WindowsCustomAction gid_Customaction_CheckPatchList -- cgit From a520bb907fb01b381da79903de2ed529620bb4ea Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Wed, 23 Dec 2009 16:38:34 +0100 Subject: aw078: adaptions to resync --- .../source/processor2d/vclpixelprocessor2d.cxx | 6 -- drawinglayer/source/processor2d/vclprocessor2d.cxx | 92 ---------------------- .../sdr/primitive2d/sdrcustomshapeprimitive2d.hxx | 1 - svx/source/svdraw/svdfmtf.cxx | 2 +- 4 files changed, 1 insertion(+), 100 deletions(-) diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 66863b1b2875..5a74b0471b7f 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -216,12 +216,6 @@ namespace drawinglayer RenderPolyPolygonBitmapPrimitive2D(static_cast< const primitive2d::PolyPolygonBitmapPrimitive2D& >(rCandidate)); break; } - case PRIMITIVE2D_ID_POLYPOLYGONBITMAPPRIMITIVE2D : - { - // direct draw of bitmap - RenderPolyPolygonBitmapPrimitive2D(static_cast< const primitive2d::PolyPolygonBitmapPrimitive2D& >(rCandidate)); - break; - } case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D : { // direct draw of PolyPolygon with color diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 5614183ceb6b..dd0a83be2ca7 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -630,98 +630,6 @@ namespace drawinglayer } } - // direct draw of bitmap - void VclProcessor2D::RenderPolyPolygonBitmapPrimitive2D(const primitive2d::PolyPolygonBitmapPrimitive2D& rPolygonCandidate) - { - bool bDone(false); - const basegfx::B2DPolyPolygon& rPolyPolygon = rPolygonCandidate.getB2DPolyPolygon(); - - if(rPolyPolygon.count()) - { - const attribute::FillBitmapAttribute& rFillBitmapAttribute = rPolygonCandidate.getFillBitmap(); - const Bitmap& rBitmap = rFillBitmapAttribute.getBitmap(); - - if(rBitmap.IsEmpty()) - { - // empty bitmap, done - bDone = true; - } - else - { - // try to catch cases where the bitmap will be color-modified to a single - // color (e.g. shadow). This would NOT be optimizable with an alpha channel - // at the Bitmap which we do not have here. When this should change, this - // optimization has to be reworked accordingly. - const sal_uInt32 nBColorModifierStackCount(maBColorModifierStack.count()); - - if(nBColorModifierStackCount) - { - const basegfx::BColorModifier& rTopmostModifier = maBColorModifierStack.getBColorModifier(nBColorModifierStackCount - 1); - - if(basegfx::BCOLORMODIFYMODE_REPLACE == rTopmostModifier.getMode()) - { - // the bitmap fill is in unified color, so we can replace it with - // a single polygon fill. The form of the fill depends on tiling - if(rFillBitmapAttribute.getTiling()) - { - // with tiling, fill the whole PolyPolygon with the modifier color - basegfx::B2DPolyPolygon aLocalPolyPolygon(rPolyPolygon); - - aLocalPolyPolygon.transform(maCurrentTransformation); - mpOutputDevice->SetLineColor(); - mpOutputDevice->SetFillColor(Color(rTopmostModifier.getBColor())); - mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon); - } - else - { - // without tiling, only the area common to the bitmap tile and the - // PolyPolygon is filled. Create the bitmap tile area in object - // coordinates. For this, the object transformation needs to be created - // from the already scaled PolyPolygon. The tile area in object - // coordinates wil always be non-rotated, so it's not necessary to - // work with a polygon here - basegfx::B2DRange aTileRange(rFillBitmapAttribute.getTopLeft(), - rFillBitmapAttribute.getTopLeft() + rFillBitmapAttribute.getSize()); - const basegfx::B2DRange aPolyPolygonRange(rPolyPolygon.getB2DRange()); - basegfx::B2DHomMatrix aNewObjectTransform; - - aNewObjectTransform.set(0, 0, aPolyPolygonRange.getWidth()); - aNewObjectTransform.set(1, 1, aPolyPolygonRange.getHeight()); - aNewObjectTransform.set(0, 2, aPolyPolygonRange.getMinX()); - aNewObjectTransform.set(1, 2, aPolyPolygonRange.getMinY()); - aTileRange.transform(aNewObjectTransform); - - // now clip the object polyPolygon against the tile range - // to get the common area (OR) - basegfx::B2DPolyPolygon aTarget = basegfx::tools::clipPolyPolygonOnRange(rPolyPolygon, aTileRange, true, false); - - if(aTarget.count()) - { - aTarget.transform(maCurrentTransformation); - mpOutputDevice->SetLineColor(); - mpOutputDevice->SetFillColor(Color(rTopmostModifier.getBColor())); - mpOutputDevice->DrawPolyPolygon(aTarget); - } - } - - bDone = true; - } - } - } - } - else - { - // empty polyPolygon, done - bDone = true; - } - - if(!bDone) - { - // use default decomposition - process(rPolygonCandidate.get2DDecomposition(getViewInformation2D())); - } - } - // direct draw of PolyPolygon with color void VclProcessor2D::RenderPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate) { diff --git a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx index ab7e60ca25d3..72035eb99569 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx @@ -83,7 +83,6 @@ namespace drawinglayer const basegfx::B2DHomMatrix& getTextBox() const { return maTextBox; } bool getWordWrap() const { return mbWordWrap; } bool get3DShape() const { return mb3DShape; } - bool get3DShape() const { return mb3DShape; } bool isForceTextClipToTextRange() const { return mbForceTextClipToTextRange; } // compare operator diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index dd8486f8a304..ecfff66bf8c2 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -72,7 +72,7 @@ #include // FRound #include #include -#include +#include #include //////////////////////////////////////////////////////////////////////////////////////////////////// -- cgit From 9afae518759e5d6ecb32dacd76a1aa746ae2cef6 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Mon, 28 Dec 2009 20:17:11 +0100 Subject: aw078: changes after resync --- svtools/source/filter.vcl/wmf/emfwr.cxx | 1 + vcl/source/gdi/makefile.mk | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/svtools/source/filter.vcl/wmf/emfwr.cxx b/svtools/source/filter.vcl/wmf/emfwr.cxx index f516c2eefbd0..e011dde1a0e8 100644 --- a/svtools/source/filter.vcl/wmf/emfwr.cxx +++ b/svtools/source/filter.vcl/wmf/emfwr.cxx @@ -35,6 +35,7 @@ #include #include #include +#include // ----------- // - Defines - diff --git a/vcl/source/gdi/makefile.mk b/vcl/source/gdi/makefile.mk index ae90d5bd1461..e253f83b25ab 100755 --- a/vcl/source/gdi/makefile.mk +++ b/vcl/source/gdi/makefile.mk @@ -100,7 +100,6 @@ SLOFILES= $(EXCEPTIONSFILES) \ $(SLO)$/impbmp.obj \ $(SLO)$/imagerepository.obj \ $(SLO)$/impvect.obj \ - $(SLO)$/jobset.obj \ $(SLO)$/lineinfo.obj \ $(SLO)$/mapmod.obj \ $(SLO)$/metaact.obj \ -- cgit From bf3a34df7ace9332084f77bad3fedf2d1bc33bde Mon Sep 17 00:00:00 2001 From: obo Date: Mon, 4 Jan 2010 13:10:51 +0100 Subject: #i107269# build breaks for unxmacxi + seperate SDK directory --- nss/makefile.mk | 7 ++++++- nss/nss_macosx.patch | 12 ++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 nss/nss_macosx.patch diff --git a/nss/makefile.mk b/nss/makefile.mk index 2122a168904d..61bcf1a40460 100644 --- a/nss/makefile.mk +++ b/nss/makefile.mk @@ -49,6 +49,10 @@ TARFILE_NAME=nss_3_12_5 TARFILE_ROOTDIR=mozilla PATCH_FILES=nss.patch +.IF "$(OS)"=="MACOSX" +PATCH_FILES+=nss_macosx.patch +.ENDIF # "$(OS)"=="MACOSX" + .IF "$(debug)" != "" .ELSE BUILD_OPT=1 @@ -70,7 +74,8 @@ USE_64:=1 CPP:=gcc -E $(EXTRA_CFLAGS) CXX:=g++ $(EXTRA_CFLAGS) CC:=gcc $(EXTRA_CFLAGS) -.EXPORT : CPP +MACOS_SDK_DIR*=$(MACDEVSDK) +.EXPORT : CPP MACOS_SDK_DIR .ENDIF # "$(EXTRA_CFLAGS)"!="" .ENDIF # "$(OS)"=="MACOSX" diff --git a/nss/nss_macosx.patch b/nss/nss_macosx.patch new file mode 100644 index 000000000000..d6ce6ff4f8d0 --- /dev/null +++ b/nss/nss_macosx.patch @@ -0,0 +1,12 @@ +--- misc/mozilla/security/nss/Makefile 2008-12-03 00:24:39.000000000 +0100 ++++ misc/build/mozilla/security/nss/Makefile 2009-11-27 13:36:22.662753328 +0100 +@@ -104,6 +104,9 @@ + ifeq ($(OS_TARGET),WIN95) + NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95 + endif ++ifdef MACOS_SDK_DIR ++NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR) ++endif + ifdef USE_DEBUG_RTL + NSPR_CONFIGURE_OPTS += --enable-debug-rtl + endif -- cgit From 2a7c61c18e01f66d9020375e3fdd66572ea1eb36 Mon Sep 17 00:00:00 2001 From: Release Engineering Date: Tue, 5 Jan 2010 16:57:53 +0100 Subject: DEV300 --- solenv/inc/minor.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk index b27b78230620..74248a6e8cd7 100644 --- a/solenv/inc/minor.mk +++ b/solenv/inc/minor.mk @@ -1,5 +1,5 @@ RSCVERSION=300 -RSCREVISION=300m68(Build:9474) -BUILD=9474 -LAST_MINOR=m68 +RSCREVISION=300m69(Build:9475) +BUILD=9475 +LAST_MINOR=m69 SOURCEVERSION=DEV300 -- cgit From 29215a2062903a6391d9903c2c8f47656181099d Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Tue, 5 Jan 2010 17:34:14 +0100 Subject: DEV300: #i10000#: re-generate configure --- configure | 852 ++++++++++++++++++++------------------------------------------ 1 file changed, 271 insertions(+), 581 deletions(-) diff --git a/configure b/configure index a386d0c426a8..ca6818eaab0e 100755 --- a/configure +++ b/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS EGREP AWK SED LOCAL_SOLENV _solenv UPD SOURCEVERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os GNUTAR OSVERSION PTHREAD_CFLAGS PTHREAD_LIBS ENABLE_CRASHDUMP VC_STANDARD ENABLE_WERROR ENABLE_DEBUG PRODUCT PROFULLSWITCH PROEXT ENABLE_SYMBOLS DISABLE_STRIP ENABLE_CUPS ENABLE_FONTCONFIG WITH_BINFILTER ENABLE_DIRECTX DISABLE_ACTIVEX DISABLE_ATL ENABLE_RPATH WITH_MYSPELL_DICTS SYSTEM_DICTS DICT_SYSTEM_DIR HYPH_SYSTEM_DIR THES_SYSTEM_DIR USE_SHELL WITH_MINGWIN SHELLPATH GCC_HOME CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT COMPATH GCCVER HAVE_LD_BSYMBOLIC_FUNCTIONS ENABLE_PCH NO_HIDS GNUMAKE _cc HAVE_LD_HASH_STYLE PERL MSPDB_PATH COMEX USE_MINGW MIDL_PATH CSC_PATH FRAME_HOME CPP CXX CXXFLAGS ac_ct_CXX CXXCPP SIZEOF_LONG WORDS_BIGENDIAN LFS_CFLAGS ENABLE_VBA VBA_EXTENSION PAM NEW_SHADOW_API PAM_LINK CRYPT_LINK GXX_INCLUDE_PATH MINGW_LIB_INCLUDE_PATH MINGW_BACKWARD_INCLUDE_PATH MINGW_CLIB_DIR MINGW_SHARED_GCCLIB MINGW_GCCLIB_EH MINGW_SHARED_GXXLIB MINGW_GCCDLL MINGW_GXXDLL EXCEPTIONS STLPORT4 STLPORT_VER USE_SYSTEM_STL USE_CCACHE CCACHE HAVE_GCC_VISIBILITY_FEATURE ALLOC BUILD_VER_STRING SOLAR_JAVA JAVAINTERPRETER JAVACOMPILER JAVACISGCJ JAVADOC AWTLIB JAVAAOTCOMPILER JAVA_HOME JDK JAVAFLAGS DMAKE BUILD_DMAKE EPM DPKG PKGMK BUILD_EPM PKGFORMAT RPM GPERF MINGWCXX ac_ct_MINGWCXX MINGWSTRIP ac_ct_MINGWSTRIP BUILD_UNOWINREG BUILD_QADEVOOO SYSTEM_STDLIBS SYSTEM_ZLIB SYSTEM_JPEG SYSTEM_EXPAT PKG_CONFIG LIBWPD_CFLAGS LIBWPD_LIBS SYSTEM_LIBWPD FREETYPE_CFLAGS FREETYPE_LIBS USE_FT_EMBOLDEN LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC SYSTEM_LIBXSLT LIBXML_CFLAGS LIBXML_LIBS SYSTEM_LIBXML PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir BZIP2 SYSTEM_PYTHON PYTHON_CFLAGS PYTHON_LIBS HOME SYSTEM_DB DB_VERSION DB_INCLUDES DB_JAR SYSTEM_LUCENE LUCENE_CORE_JAR LUCENE_ANALYZERS_JAR SYSTEM_HSQLDB HSQLDB_JAR SYSTEM_BSH BSH_JAR SERIALIZER_JAR SYSTEM_SAXON SAXON_JAR CURLCONFIG SYSTEM_CURL CURL_CFLAGS CURL_LIBS SYSTEM_BOOST SYSTEM_VIGRA SYSTEM_ODBC_HEADERS WITH_MOZILLA WITH_LDAP WITH_OPENLDAP MOZ_NSS_CFLAGS MOZ_NSS_LIBS NSS_LIB MOZ_NSPR_CFLAGS MOZ_NSPR_LIBS NSPR_LIB MOZILLAXPCOM_CFLAGS MOZILLAXPCOM_LIBS MOZILLA_VERSION MOZILLA_TOOLKIT MOZGTK2_CFLAGS MOZGTK2_LIBS MOZLIBREQ_CFLAGS MOZLIBREQ_LIBS BUILD_MOZAB ENABLE_NSS_MODULE MOZILLABUILD SYSTEM_MOZILLA MOZ_FLAVOUR MOZ_INC MOZ_LIB MOZ_LIB_XPCOM MOZ_LDAP_CFLAGS SYSTEM_SANE_HEADER SYSTEM_GENBRK SYSTEM_GENCCODE SYSTEM_GENCMN SYSTEM_ICU GRAPHITE_CFLAGS GRAPHITE_LIBS ENABLE_GRAPHITE SYSTEM_GRAPHITE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XINC XLIB XAU_LIBS DISABLE_XAW SYSTEM_XRENDER_HEADERS XRENDER_LINK XRANDR_CFLAGS XRANDR_LIBS XRANDR_DLOPEN ENABLE_RANDR DISABLE_NEON NEON_CFLAGS NEON_LIBS SYSTEM_NEON NEON_VERSION OPENSSL_CFLAGS OPENSSL_LIBS SYSTEM_OPENSSL ENABLE_AGG AGG_CFLAGS AGG_LIBS SYSTEM_AGG AGG_VERSION REDLAND_CFLAGS REDLAND_LIBS SYSTEM_REDLAND HUNSPELL_CFLAGS HUNSPELL_LIBS SYSTEM_HUNSPELL SYSTEM_HYPH HYPHEN_LIB SYSTEM_MYTHES SYSTEM_LPSOLVE PSDK_HOME WINDOWS_VISTA_PSDK DIRECTXSDK_HOME DIRECTXSDK_LIB NSIS_PATH BISON FLEX PATCH GNUCP GNUPATCH CYGWIN_PATH ML_EXE ASM_HOME ZIP UNZIP ZIP_HOME ENABLE_GTK ENABLE_KDE ENABLE_KDE4 GCONF_CFLAGS GCONF_LIBS ENABLE_GCONF GNOMEVFS_CFLAGS GNOMEVFS_LIBS ENABLE_GNOMEVFS GTK_CFLAGS GTK_LIBS DBUS_CFLAGS DBUS_LIBS GIO_CFLAGS GIO_LIBS ENABLE_GIO ENABLE_DBUS ENABLE_SYSTRAY_GTK CAIRO_CFLAGS CAIRO_LIBS ENABLE_CAIRO BUILD_PIXMAN SYSTEM_CAIRO ENABLE_OPENGL ENABLE_MINIMIZER ENABLE_PRESENTER_SCREEN POPPLER_CFLAGS POPPLER_LIBS ENABLE_PDFIMPORT SYSTEM_POPPLER ENABLE_MEDIAWIKI SYSTEM_SERVLETAPI SERVLETAPI_JAR ENABLE_REPORTBUILDER SYSTEM_JFREEREPORT SAC_JAR LIBXML_JAR FLUTE_JAR JFREEREPORT_JAR LIBBASE_JAR LIBLAYOUT_JAR LIBLOADER_JAR LIBFORMULA_JAR LIBREPOSITORY_JAR LIBFONTS_JAR LIBSERIALIZER_JAR SYSTEM_APACHE_COMMONS COMMONS_CODEC_JAR COMMONS_LANG_JAR COMMONS_HTTPCLIENT_JAR COMMONS_LOGGING_JAR MOC KDE_CFLAGS KDE_LIBS MOC4 KDE4_CFLAGS KDE4_LIBS ENABLE_LOCKDOWN GOBJECT_CFLAGS GOBJECT_LIBS ENABLE_EVOAB2 ENABLE_KAB WITH_FONTOOO SYSTEM_MSPACK WITH_FONTS WITHOUT_PPDS WITHOUT_AFMS SCPDEFS USE_XINERAMA XINERAMA_LINK ANT ANT_HOME ANT_LIB WITH_LANG WITH_POOR_HELP_LOCALIZATIONS WITH_DICT INTRO_BITMAPS ABOUT_BITMAPS OOO_VENDOR UNIXWRAPPERNAME ENABLE_STATIC_GTK ENABLE_LAYOUT VERBOSE LOCAL_SOLVER BUILD_TYPE LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS EGREP AWK SED LOCAL_SOLENV _solenv UPD SOURCEVERSION build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os GNUTAR OSVERSION PTHREAD_CFLAGS PTHREAD_LIBS ENABLE_CRASHDUMP VC_STANDARD ENABLE_WERROR ENABLE_DEBUG PRODUCT PROFULLSWITCH PROEXT ENABLE_SYMBOLS DISABLE_STRIP ENABLE_CUPS ENABLE_FONTCONFIG WITH_BINFILTER ENABLE_DIRECTX DISABLE_ACTIVEX DISABLE_ATL ENABLE_RPATH WITH_MYSPELL_DICTS SYSTEM_DICTS DICT_SYSTEM_DIR HYPH_SYSTEM_DIR THES_SYSTEM_DIR USE_SHELL WITH_MINGWIN SHELLPATH GCC_HOME CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT COMPATH GCCVER HAVE_LD_BSYMBOLIC_FUNCTIONS ENABLE_PCH NO_HIDS GNUMAKE _cc HAVE_LD_HASH_STYLE PERL MSPDB_PATH COMEX USE_MINGW MIDL_PATH CSC_PATH FRAME_HOME CPP CXX CXXFLAGS ac_ct_CXX CXXCPP SIZEOF_LONG WORDS_BIGENDIAN LFS_CFLAGS ENABLE_VBA VBA_EXTENSION PAM NEW_SHADOW_API PAM_LINK CRYPT_LINK GXX_INCLUDE_PATH MINGW_LIB_INCLUDE_PATH MINGW_BACKWARD_INCLUDE_PATH MINGW_CLIB_DIR MINGW_SHARED_GCCLIB MINGW_GCCLIB_EH MINGW_SHARED_GXXLIB MINGW_GCCDLL MINGW_GXXDLL EXCEPTIONS STLPORT4 STLPORT_VER USE_SYSTEM_STL USE_CCACHE CCACHE HAVE_GCC_VISIBILITY_FEATURE ALLOC BUILD_VER_STRING SOLAR_JAVA JAVAINTERPRETER JAVACOMPILER JAVACISGCJ JAVADOC AWTLIB JAVAAOTCOMPILER JAVA_HOME JDK JAVAFLAGS DMAKE BUILD_DMAKE EPM DPKG PKGMK BUILD_EPM PKGFORMAT RPM GPERF MINGWCXX ac_ct_MINGWCXX MINGWSTRIP ac_ct_MINGWSTRIP BUILD_UNOWINREG BUILD_QADEVOOO SYSTEM_STDLIBS SYSTEM_ZLIB SYSTEM_JPEG SYSTEM_EXPAT PKG_CONFIG LIBWPD_CFLAGS LIBWPD_LIBS SYSTEM_LIBWPD FREETYPE_CFLAGS FREETYPE_LIBS USE_FT_EMBOLDEN LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC SYSTEM_LIBXSLT LIBXML_CFLAGS LIBXML_LIBS SYSTEM_LIBXML PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir BZIP2 SYSTEM_PYTHON PYTHON_CFLAGS PYTHON_LIBS HOME SYSTEM_DB DB_VERSION DB_INCLUDES DB_JAR SYSTEM_LUCENE LUCENE_CORE_JAR LUCENE_ANALYZERS_JAR SYSTEM_HSQLDB HSQLDB_JAR SYSTEM_BSH BSH_JAR SERIALIZER_JAR SYSTEM_SAXON SAXON_JAR CURLCONFIG SYSTEM_CURL CURL_CFLAGS CURL_LIBS SYSTEM_BOOST SYSTEM_VIGRA SYSTEM_ODBC_HEADERS WITH_MOZILLA WITH_LDAP WITH_OPENLDAP MOZ_NSS_CFLAGS MOZ_NSS_LIBS NSS_LIB MOZ_NSPR_CFLAGS MOZ_NSPR_LIBS NSPR_LIB MOZILLAXPCOM_CFLAGS MOZILLAXPCOM_LIBS MOZILLA_VERSION MOZILLA_TOOLKIT MOZGTK2_CFLAGS MOZGTK2_LIBS MOZLIBREQ_CFLAGS MOZLIBREQ_LIBS BUILD_MOZAB ENABLE_NSS_MODULE MOZILLABUILD SYSTEM_MOZILLA MOZ_FLAVOUR MOZ_INC MOZ_LIB MOZ_LIB_XPCOM MOZ_LDAP_CFLAGS SYSTEM_SANE_HEADER SYSTEM_GENBRK SYSTEM_GENCCODE SYSTEM_GENCMN SYSTEM_ICU GRAPHITE_CFLAGS GRAPHITE_LIBS ENABLE_GRAPHITE SYSTEM_GRAPHITE X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XINC XLIB XAU_LIBS DISABLE_XAW SYSTEM_XRENDER_HEADERS XRENDER_LINK XRANDR_CFLAGS XRANDR_LIBS XRANDR_DLOPEN ENABLE_RANDR DISABLE_NEON NEON_CFLAGS NEON_LIBS SYSTEM_NEON NEON_VERSION OPENSSL_CFLAGS OPENSSL_LIBS SYSTEM_OPENSSL ENABLE_AGG AGG_CFLAGS AGG_LIBS SYSTEM_AGG AGG_VERSION REDLAND_CFLAGS REDLAND_LIBS SYSTEM_REDLAND HUNSPELL_CFLAGS HUNSPELL_LIBS SYSTEM_HUNSPELL SYSTEM_HYPH HYPHEN_LIB SYSTEM_MYTHES SYSTEM_LPSOLVE PSDK_HOME WINDOWS_VISTA_PSDK DIRECTXSDK_HOME DIRECTXSDK_LIB NSIS_PATH BISON FLEX PATCH GNUCP GNUPATCH CYGWIN_PATH ML_EXE ASM_HOME ZIP UNZIP ZIP_HOME ENABLE_GTK ENABLE_KDE ENABLE_KDE4 GCONF_CFLAGS GCONF_LIBS ENABLE_GCONF GNOMEVFS_CFLAGS GNOMEVFS_LIBS ENABLE_GNOMEVFS GTK_CFLAGS GTK_LIBS DBUS_CFLAGS DBUS_LIBS GIO_CFLAGS GIO_LIBS ENABLE_GIO ENABLE_DBUS ENABLE_SYSTRAY_GTK CAIRO_CFLAGS CAIRO_LIBS ENABLE_CAIRO BUILD_PIXMAN SYSTEM_CAIRO ENABLE_OPENGL ENABLE_MINIMIZER ENABLE_PRESENTER_SCREEN POPPLER_CFLAGS POPPLER_LIBS ENABLE_PDFIMPORT SYSTEM_POPPLER ENABLE_MEDIAWIKI SYSTEM_SERVLETAPI SERVLETAPI_JAR ENABLE_REPORTBUILDER SYSTEM_JFREEREPORT SAC_JAR LIBXML_JAR FLUTE_JAR JFREEREPORT_JAR LIBBASE_JAR LIBLAYOUT_JAR LIBLOADER_JAR LIBFORMULA_JAR LIBREPOSITORY_JAR LIBFONTS_JAR LIBSERIALIZER_JAR SYSTEM_APACHE_COMMONS COMMONS_CODEC_JAR COMMONS_LANG_JAR COMMONS_HTTPCLIENT_JAR COMMONS_LOGGING_JAR MOC KDE_CFLAGS KDE_LIBS MOC4 KDE4_CFLAGS KDE4_LIBS ENABLE_LOCKDOWN GOBJECT_CFLAGS GOBJECT_LIBS ENABLE_EVOAB2 ENABLE_KAB WITH_FONTS WITHOUT_PPDS WITHOUT_AFMS SCPDEFS USE_XINERAMA XINERAMA_LINK ANT ANT_HOME ANT_LIB WITH_LANG WITH_POOR_HELP_LOCALIZATIONS WITH_DICT INTRO_BITMAPS ABOUT_BITMAPS OOO_VENDOR UNIXWRAPPERNAME ENABLE_STATIC_GTK ENABLE_LAYOUT VERBOSE LOCAL_SOLVER BUILD_TYPE LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -888,9 +888,6 @@ Optional Features: --disable-qadevooo OO.o includes some qa testsuites which some packagers may wish to build without - --disable-fontooo disable FontOOo - (useful for distributions using fontconfig for OOo) - --disable-mathmldtd disable mathmldtd (useful for distributions that want to avoid packaging it) @@ -1046,11 +1043,6 @@ Optional Features: explicitly enable if your version of ccache doesn't identify as version 2.4_OOo - --enable-sgistl for IRIX users, use this option option to build - OpenOffice.org using SGI's STL. - - Usage: --enable-sgistl=yes - --enable-verbose Increase build verbosity. --disable-verbose Decrease build verbosity. @@ -1112,8 +1104,6 @@ Optional Packages: --with-system-stdlibs use libstdc++/libgcc_s already on system - --with-system-mspack use libmspack already installed on system - --with-system-cairo Use Cairo libraries already on system --with-mozilla-version Choose which version of mozilla to use while building @@ -2015,13 +2005,6 @@ if test "${enable_qadevooo+set}" = set; then else enable_qadevooo="yes" fi; -# Check whether --enable-fontooo or --disable-fontooo was given. -if test "${enable_fontooo+set}" = set; then - enableval="$enable_fontooo" - -else - enable_fontooo="yes" -fi; # Check whether --enable-mathmldtd or --disable-mathmldtd was given. if test "${enable_mathmldtd+set}" = set; then enableval="$enable_mathmldtd" @@ -2042,12 +2025,6 @@ if test "${with_system_stdlibs+set}" = set; then else checkforstdlibproblems=yes fi; - -# Check whether --with-system-mspack or --without-system-mspack was given. -if test "${with_system_mspack+set}" = set; then - withval="$with_system_mspack" - -fi; # Check whether --enable-cups or --disable-cups was given. if test "${enable_cups+set}" = set; then enableval="$enable_cups" @@ -2903,11 +2880,6 @@ if test "${with_build_version+set}" = set; then withval="$with_build_version" with_build_version=$withval fi; -# Check whether --enable-sgistl or --disable-sgistl was given. -if test "${enable_sgistl+set}" = set; then - enableval="$enable_sgistl" - -fi; # Check whether --with-alloc or --without-alloc was given. if test "${with_alloc+set}" = set; then @@ -3343,9 +3315,6 @@ echo "$as_me: error: only sparc and i386 processors are supported" >&2;} test_cups=yes test_randr=yes test_freetype=yes - if getconf GNU_LIBPTHREAD_VERSION |grep -q NPTL; then - PTHREAD_CFLAGS="-DNPTL" - fi _os=Linux ;; gnu) @@ -3430,12 +3399,6 @@ echo "${ECHO_T}$PTHREAD_LIBS" >&6 PTHREAD_LIBS="-pthread -lpthread" _os=NetBSD ;; - irix*) - test_cups=no - test_randr=no - test_freetype=yes - _os=IRIX - ;; aix*) test_cups=no test_randr=no @@ -4923,7 +4886,8 @@ done COMPATH=`echo $COMPATH | $SED "s@/[^/:]*\\\$@@"`; fi - +COMPATH=`echo $COMPATH | $SED "s@/[Bb][Ii][Nn]\\\$@@"`; +echo $COMPATH GCCVER=20995 if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; then echo "$as_me:$LINENO: checking the GNU gcc compiler version" >&5 @@ -5171,7 +5135,7 @@ fi test -n "$_cc" && break done - COMPATH=`echo $_cc | $SED -n "s/\/cc//p"` + COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` echo "$as_me:$LINENO: checking the SunStudio C/C++ compiler version" >&5 echo $ECHO_N "checking the SunStudio C/C++ compiler version... $ECHO_C" >&6 _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | sed -e 's/.* C //'` @@ -5261,75 +5225,6 @@ echo "${ECHO_T}not found " >&6 fi -if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - if test "$CC" = "cc"; then - for ac_prog in cc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path__cc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $_cc in - [\\/]* | ?:[\\/]*) - ac_cv_path__cc="$_cc" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path__cc="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -_cc=$ac_cv_path__cc - -if test -n "$_cc"; then - echo "$as_me:$LINENO: result: $_cc" >&5 -echo "${ECHO_T}$_cc" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$_cc" && break -done - - COMPATH=`echo $_cc | $SED -n "s/\/cc//p"` - echo "$as_me:$LINENO: checking the SGI MIPSpro C compiler version" >&5 -echo $ECHO_N "checking the SGI MIPSpro C compiler version... $ECHO_C" >&6 - _mipspro_version=`$CC -version 2>&1 | $AWK '{ print $4 }'` - _mipspro_major=`echo $_mipspro_version | $AWK -F. '{ print $1 }'` - if test "$_mipspro_major" != "7"; then - { { echo "$as_me:$LINENO: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&5 -echo "$as_me: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&2;} - { (exit 1); exit 1; }; } - else - _mipspro_minor=`echo $_mipspro_version | $AWK -F. '{ if ($2 <= 1) print "false"; else print "true" }'` - if test "$_mipspro_minor" = "false"; then - { { echo "$as_me:$LINENO: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&5 -echo "$as_me: error: found version \"$_mipspro_version\", use version 7.2+ of the SGI MIPSpro C compiler" >&2;} - { (exit 1); exit 1; }; } - else - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 - fi - fi - fi -fi - if test "$_os" = "OSF1"; then if test "$CC" = "cc"; then for ac_prog in cc @@ -5376,7 +5271,7 @@ fi test -n "$_cc" && break done - COMPATH=`echo $_cc | $SED -n "s/\/cc//p"` + COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` { echo "$as_me:$LINENO: WARNING: ******* $_cc , $COMPATH" >&5 echo "$as_me: WARNING: ******* $_cc , $COMPATH" >&2;} echo "$as_me:$LINENO: checking the Compaq C compiler version" >&5 @@ -5653,8 +5548,8 @@ fi # Remove /cl.exe from CC case insensitive echo "$as_me:$LINENO: result: found ($CC)" >&5 echo "${ECHO_T}found ($CC)" >&6 - COMPATH=`echo $CC | $SED 's@/[cC][lL]\.[eE][xX][eE]@@'` - export INCLUDE=`cygpath -d "$COMPATH/../Include"` + COMPATH=`echo $CC | $SED 's@\/[Bb][Ii][Nn]\/[cC][lL]\.[eE][xX][eE]@@'` + export INCLUDE=`cygpath -d "$COMPATH/Include"` echo "$as_me:$LINENO: checking the Version of Microsoft C/C++ Compiler" >&5 echo $ECHO_N "checking the Version of Microsoft C/C++ Compiler... $ECHO_C" >&6 CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ { @@ -9533,7 +9428,7 @@ echo $ECHO_N "checking whether to use dynamic libgcc... $ECHO_C" >&6 echo "$as_me:$LINENO: checking dynamic libgcc name" >&5 echo $ECHO_N "checking dynamic libgcc name... $ECHO_C" >&6 MINGW_GCCDLL_pattern=`nm $MINGW_CLIB_DIR/libgcc_s.a | sed -ne 's@.* _libgcc\(.*\)_dll_iname@libgcc\1.dll@p' | uniq | sed -e 's@_@?@g'` - MINGW_GCCDLL=`cd $COMPATH && ls $MINGW_GCCDLL_pattern 2>/dev/null` + MINGW_GCCDLL=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null` if test -n "$MINGW_GCCDLL"; then MINGW_SHARED_GCCLIB=YES echo "$as_me:$LINENO: result: use $MINGW_GCCDLL" >&5 @@ -9555,7 +9450,7 @@ echo $ECHO_N "checking whether to use dynamic libstdc++... $ECHO_C" >&6 echo "$as_me:$LINENO: checking dynamic libstdc++ name" >&5 echo $ECHO_N "checking dynamic libstdc++ name... $ECHO_C" >&6 MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/libstdc++_s.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'` - MINGW_GXXDLL=`cd $COMPATH && ls $MINGW_GXXDLL_pattern 2>/dev/null` + MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null` if test -n "$MINGW_GXXDLL"; then MINGW_SHARED_GXXLIB=YES echo "$as_me:$LINENO: result: use $MINGW_GXXDLL" >&5 @@ -9605,20 +9500,6 @@ echo "${ECHO_T}checked" >&6 fi fi fi -if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - if test "$CC" = "cc"; then - echo "$as_me:$LINENO: checking SGI MIPSpro C++ Compiler" >&5 -echo $ECHO_N "checking SGI MIPSpro C++ Compiler... $ECHO_C" >&6 - if test "$CXX" != "CC"; then - { echo "$as_me:$LINENO: WARNING: SGI MIPSpro C++ was not found" >&5 -echo "$as_me: WARNING: SGI MIPSpro C++ was not found" >&2;} - echo "SGI MIPSpro C++ was not found" >> warn - else - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 - fi - fi -fi if test "$_os" = "OSF1"; then echo "$as_me:$LINENO: checking Compaq C++ compiler version" >&5 echo $ECHO_N "checking Compaq C++ compiler version... $ECHO_C" >&6 @@ -9805,25 +9686,6 @@ echo "$as_me: WARNING: patch 107733-06 not found, please install linker patch 10 fi fi -if test -n "$enable_sgistl" && "$enable_sgistl" != "no"; then - if test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - echo "$as_me:$LINENO: checking for SGI STL" >&5 -echo $ECHO_N "checking for SGI STL... $ECHO_C" >&6 - if test -d /usr/include/CC ; then - echo "$as_me:$LINENO: result: yes." >&5 -echo "${ECHO_T}yes." >&6 - - else - echo "$as_me:$LINENO: result: not found." >&5 -echo "${ECHO_T}not found." >&6 - fi - else - { { echo "$as_me:$LINENO: error: Option --enable-sgistl is only valid for IRIX" >&5 -echo "$as_me: error: Option --enable-sgistl is only valid for IRIX" >&2;} - { (exit 1); exit 1; }; } - fi -else - echo "$as_me:$LINENO: checking what the default STL should be" >&5 echo $ECHO_N "checking what the default STL should be... $ECHO_C" >&6 DEFAULT_TO_STLPORT="no" @@ -9956,24 +9818,6 @@ echo "${ECHO_T}checked" >&6 echo "$as_me: error: STLport libraries not found" >&2;} { (exit 1); exit 1; }; } fi - elif test "$_os" = "IRIX" -o "$_os" = "IRIX64"; then - if test -f "$STLPORT4/lib/libstlport_mipspro_41.so"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 - else - if test -f "$STLPORT4/lib/libstlport_gcc.so"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 - elif test -f "$STLPORT4/lib/libstlport.so"; then - echo "$as_me:$LINENO: result: checked" >&5 -echo "${ECHO_T}checked" >&6 - STLPORT_VER=500 - else - { { echo "$as_me:$LINENO: error: STLport libraries not found" >&5 -echo "$as_me: error: STLport libraries not found" >&2;} - { (exit 1); exit 1; }; } - fi - fi else if test -f "$STLPORT4/lib/libstlport_gcc.so"; then echo "$as_me:$LINENO: result: checked" >&5 @@ -9995,7 +9839,6 @@ echo "$as_me: WARNING: using stlport. Warning, breaks your ABI compatability!" > echo "using stlport. Warning, breaks your ABI compatability!" >>warn fi fi -fi if test -z "$STLPORT4"; then STLPORT4="NO_STLPORT4" @@ -10402,11 +10245,18 @@ _ACEOF if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then gccvisbroken=yes else - if $EGREP -q '@PLT|\$stub|\(PLT\)' visibility.s; then - gccvisbroken=no; - else - gccvisbroken=yes; - fi + case "$build_cpu" in + i?86|x86_64) + if $EGREP -q '@PLT' visibility.s; then + gccvisbroken=no + else + gccvisbroken=yes + fi + ;; + *) + gccvisbroken=no + ;; + esac fi rm -f visibility.s @@ -10942,7 +10792,7 @@ echo $ECHO_N "checking re-checking JDK... $ECHO_C" >&6 echo "${ECHO_T}checked (ecj)" >&6 #TODO: what's to do here? some switch to do 1.5 compiling? JAVAFLAGS="-source 1.5 -target 1.5" - _gij_longver="50000" + _gij_longver="40200" fi fi @@ -11067,7 +10917,7 @@ fi if test "$SOLAR_JAVA" != ""; then if test "$JDK" == "gcj" -a -z "$JAVA_HOME"; then - if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "50000"; then + if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "40200"; then cat > findhome.java <<_ACEOF import java.io.File; @@ -11118,7 +10968,7 @@ echo "$as_me: error: gij does not know its java.home - use --with-jdk-home" >&2; fi fi - if test "$JDK" != "gcj" -o "$_gij_longver" -ge "50000"; then + if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then @@ -12017,9 +11867,6 @@ echo $ECHO_N "checking which package format to use... $ECHO_C" >&6 OSF1) PKGFORMAT=setld ;; - IRIX) - PKGFORMAT=tardist - ;; # we never should get here since we check the arciecture/os at the beginning, # but go sure... *) @@ -14787,8 +14634,7 @@ fi echo "$as_me:$LINENO: checking whether db is at least 4.1" >&5 echo $ECHO_N "checking whether db is at least 4.1... $ECHO_C" >&6 - for v in `seq 1 7`; do - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling @@ -14805,7 +14651,7 @@ cat >>conftest.$ac_ext <<_ACEOF #include int main(int argc, char **argv) { - if(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == $v) return 0; + if(DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)) return 0; else return 1; } @@ -14821,28 +14667,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - DB_VERSION_MINOR=$v + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: no. you need at least db 4.1" >&5 +echo "$as_me: error: no. you need at least db 4.1" >&2;} + { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - done - if test "$DB_VERSION_MINOR" -gt "1"; then - echo "$as_me:$LINENO: result: OK" >&5 -echo "${ECHO_T}OK" >&6 - DB_VERSION=4.$DB_VERSION_MINOR - else - { { echo "$as_me:$LINENO: error: no. you need at least db 4.1" >&5 -echo "$as_me: error: no. you need at least db 4.1" >&2;} - { (exit 1); exit 1; }; } - fi - # does not work :/ - #AC_CHECK_LIB(db, db_create, [], - # [AC_MSG_ERROR([db library not installed or functional])], []) echo "$as_me:$LINENO: checking for main in -ldb" >&5 echo $ECHO_N "checking for main in -ldb... $ECHO_C" >&6 @@ -20510,25 +20348,19 @@ echo "${ECHO_T}yes" >&6 for ac_header in X11/Xaw/Label.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default +#include + #include <$ac_header> _ACEOF rm -f conftest.$ac_objext @@ -20553,100 +20385,17 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_header_compiler=yes + eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no +eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - -fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -24369,8 +24118,8 @@ echo $ECHO_N "checking for instmsia.exe/instmsiw.exe... $ECHO_C" >&6 echo "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6 else - MSIAPATH=`/bin/find "$COMPATH/../.." -iname instmsia.exe | head -n 1` - MSIWPATH=`/bin/find "$COMPATH/../.." -iname instmsiw.exe | head -n 1` + MSIAPATH=`/bin/find "$COMPATH/.." -iname instmsia.exe | head -n 1` + MSIWPATH=`/bin/find "$COMPATH/.." -iname instmsiw.exe | head -n 1` if test -n "$MSIAPATH" -a -n "$MSIWPATH"; then cp "$MSIAPATH" ./external/msi/ && chmod +x ./external/msi/instmsia.exe && MSIACOPY="OK" cp "$MSIWPATH" ./external/msi/ && chmod +x ./external/msi/instmsiw.exe && MSIWCOPY="OK" @@ -26753,14 +26502,64 @@ if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then echo "$as_me:$LINENO: checking which Apache commons-* libs to use" >&5 echo $ECHO_N "checking which Apache commons-* libs to use... $ECHO_C" >&6 if test "$with_system_apache_commons" = "yes"; then - SYSTEM_APACHE_COMMONS=YES - echo "$as_me:$LINENO: result: external" >&5 + SYSTEM_APACHE_COMMONS=YES + echo "$as_me:$LINENO: result: external" >&5 echo "${ECHO_T}external" >&6 if test "$ENABLE_MEDIAWIKI" = "YES"; then - if test -z "$COMMONS_CODEC_JAR"; then - COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar - fi - as_ac_File=`echo "ac_cv_file_$COMMONS_CODEC_JAR" | $as_tr_sh` + if test -z $COMMONS_CODEC_JAR; then + echo "$as_me:$LINENO: checking for /usr/share/java/commons-codec-1.3.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-codec-1.3.jar... $ECHO_C" >&6 +if test "${ac_cv_file__usr_share_java_commons_codec_1_3_jar+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/share/java/commons-codec-1.3.jar"; then + ac_cv_file__usr_share_java_commons_codec_1_3_jar=yes +else + ac_cv_file__usr_share_java_commons_codec_1_3_jar=no +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_codec_1_3_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_codec_1_3_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_codec_1_3_jar = yes; then + COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar +else + + echo "$as_me:$LINENO: checking for /usr/share/java/commons-codec.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-codec.jar... $ECHO_C" >&6 +if test "${ac_cv_file__usr_share_java_commons_codec_jar+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/share/java/commons-codec.jar"; then + ac_cv_file__usr_share_java_commons_codec_jar=yes +else + ac_cv_file__usr_share_java_commons_codec_jar=no +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_codec_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_codec_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_codec_jar = yes; then + COMMONS_CODEC_JAR=/usr/share/java/commons-codecs.jar +else + { { echo "$as_me:$LINENO: error: commons-codec.jar replacement not found." >&5 +echo "$as_me: error: commons-codec.jar replacement not found." >&2;} + { (exit 1); exit 1; }; } + +fi + + + +fi + + else + as_ac_File=`echo "ac_cv_file_$COMMONS_CODEC_JAR" | $as_tr_sh` echo "$as_me:$LINENO: checking for $COMMONS_CODEC_JAR" >&5 echo $ECHO_N "checking for $COMMONS_CODEC_JAR... $ECHO_C" >&6 if eval "test \"\${$as_ac_File+set}\" = set"; then @@ -26786,14 +26585,66 @@ echo "$as_me: error: commons-codec.jar not found." >&2;} { (exit 1); exit 1; }; } fi - if test -z "$COMMONS_LANG_JAR"; then - COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar - fi - as_ac_File=`echo "ac_cv_file_$COMMONS_LANG_JAR" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $COMMONS_LANG_JAR" >&5 -echo $ECHO_N "checking for $COMMONS_LANG_JAR... $ECHO_C" >&6 -if eval "test \"\${$as_ac_File+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + fi + + if test -z $COMMONS_LANG_JAR; then + echo "$as_me:$LINENO: checking for /usr/share/java/commons-lang-2.3.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-lang-2.3.jar... $ECHO_C" >&6 +if test "${ac_cv_file__usr_share_java_commons_lang_2_3_jar+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/share/java/commons-lang-2.3.jar"; then + ac_cv_file__usr_share_java_commons_lang_2_3_jar=yes +else + ac_cv_file__usr_share_java_commons_lang_2_3_jar=no +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_lang_2_3_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_lang_2_3_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_lang_2_3_jar = yes; then + COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar +else + + echo "$as_me:$LINENO: checking for /usr/share/java/commons-lang.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-lang.jar... $ECHO_C" >&6 +if test "${ac_cv_file__usr_share_java_commons_lang_jar+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/share/java/commons-lang.jar"; then + ac_cv_file__usr_share_java_commons_lang_jar=yes +else + ac_cv_file__usr_share_java_commons_lang_jar=no +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_lang_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_lang_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_lang_jar = yes; then + COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar +else + { { echo "$as_me:$LINENO: error: commons-lang.jar replacement not found." >&5 +echo "$as_me: error: commons-lang.jar replacement not found." >&2;} + { (exit 1); exit 1; }; } + +fi + + + +fi + + else + as_ac_File=`echo "ac_cv_file_$COMMONS_LANG_JAR" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $COMMONS_LANG_JAR" >&5 +echo $ECHO_N "checking for $COMMONS_LANG_JAR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_File+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 @@ -26815,10 +26666,62 @@ echo "$as_me: error: commons-lang.jar not found." >&2;} { (exit 1); exit 1; }; } fi - if test -z "$COMMONS_HTTPCLIENT_JAR"; then - COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar - fi - as_ac_File=`echo "ac_cv_file_$COMMONS_HTTPCLIENT_JAR" | $as_tr_sh` + fi + + if test -z $COMMONS_HTTPCLIENT_JAR; then + echo "$as_me:$LINENO: checking for /usr/share/java/commons-httpclient-3.1.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-httpclient-3.1.jar... $ECHO_C" >&6 +if test "${ac_cv_file__usr_share_java_commons_httpclient_3_1_jar+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/share/java/commons-httpclient-3.1.jar"; then + ac_cv_file__usr_share_java_commons_httpclient_3_1_jar=yes +else + ac_cv_file__usr_share_java_commons_httpclient_3_1_jar=no +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_httpclient_3_1_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_httpclient_3_1_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_httpclient_3_1_jar = yes; then + COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar +else + + echo "$as_me:$LINENO: checking for /usr/share/java/commons-httpclient.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-httpclient.jar... $ECHO_C" >&6 +if test "${ac_cv_file__usr_share_java_commons_httpclient_jar+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/share/java/commons-httpclient.jar"; then + ac_cv_file__usr_share_java_commons_httpclient_jar=yes +else + ac_cv_file__usr_share_java_commons_httpclient_jar=no +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_httpclient_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_httpclient_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_httpclient_jar = yes; then + COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar +else + { { echo "$as_me:$LINENO: error: commons-httpclient.jar replacement not found." >&5 +echo "$as_me: error: commons-httpclient.jar replacement not found." >&2;} + { (exit 1); exit 1; }; } + +fi + + + +fi + + else + as_ac_File=`echo "ac_cv_file_$COMMONS_HTTPCLIENT_JAR" | $as_tr_sh` echo "$as_me:$LINENO: checking for $COMMONS_HTTPCLIENT_JAR" >&5 echo $ECHO_N "checking for $COMMONS_HTTPCLIENT_JAR... $ECHO_C" >&6 if eval "test \"\${$as_ac_File+set}\" = set"; then @@ -26844,12 +26747,63 @@ echo "$as_me: error: commons-httpclient.jar not found." >&2;} { (exit 1); exit 1; }; } fi + fi fi if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then - if test -z "$COMMONS_LOGGING_JAR"; then - COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar - fi - as_ac_File=`echo "ac_cv_file_$COMMONS_LOGGING_JAR" | $as_tr_sh` + if test -z $COMMONS_LOGGING_JAR; then + echo "$as_me:$LINENO: checking for /usr/share/java/commons-logging-1.1.1.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-logging-1.1.1.jar... $ECHO_C" >&6 +if test "${ac_cv_file__usr_share_java_commons_logging_1_1_1_jar+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/share/java/commons-logging-1.1.1.jar"; then + ac_cv_file__usr_share_java_commons_logging_1_1_1_jar=yes +else + ac_cv_file__usr_share_java_commons_logging_1_1_1_jar=no +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_logging_1_1_1_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_logging_1_1_1_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_logging_1_1_1_jar = yes; then + COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar +else + + echo "$as_me:$LINENO: checking for /usr/share/java/commons-logging.jar" >&5 +echo $ECHO_N "checking for /usr/share/java/commons-logging.jar... $ECHO_C" >&6 +if test "${ac_cv_file__usr_share_java_commons_logging_jar+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/share/java/commons-logging.jar"; then + ac_cv_file__usr_share_java_commons_logging_jar=yes +else + ac_cv_file__usr_share_java_commons_logging_jar=no +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_file__usr_share_java_commons_logging_jar" >&5 +echo "${ECHO_T}$ac_cv_file__usr_share_java_commons_logging_jar" >&6 +if test $ac_cv_file__usr_share_java_commons_logging_jar = yes; then + COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar +else + { { echo "$as_me:$LINENO: error: commons-logging.jar replacement not found." >&5 +echo "$as_me: error: commons-logging.jar replacement not found." >&2;} + { (exit 1); exit 1; }; } + +fi + + + +fi + + else + as_ac_File=`echo "ac_cv_file_$COMMONS_LOGGING_JAR" | $as_tr_sh` echo "$as_me:$LINENO: checking for $COMMONS_LOGGING_JAR" >&5 echo $ECHO_N "checking for $COMMONS_LOGGING_JAR... $ECHO_C" >&6 if eval "test \"\${$as_ac_File+set}\" = set"; then @@ -26875,13 +26829,13 @@ echo "$as_me: error: commons-logging.jar not found." >&2;} { (exit 1); exit 1; }; } fi - + fi fi else - echo "$as_me:$LINENO: result: internal" >&5 + echo "$as_me:$LINENO: result: internal" >&5 echo "${ECHO_T}internal" >&6 - SYSTEM_APACHE_COMMONS=NO - BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT" + SYSTEM_APACHE_COMMONS=NO + BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT" fi fi @@ -27424,268 +27378,6 @@ echo "${ECHO_T}no" >&6 fi -echo "$as_me:$LINENO: checking whether to include FontOOo" >&5 -echo $ECHO_N "checking whether to include FontOOo... $ECHO_C" >&6 -if test -n "$enable_fontooo"; then - if test "$enable_fontooo" = "no"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - WITH_FONTOOO=NO - SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO" - else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - WITH_FONTOOO=YES - BUILD_TYPE="$BUILD_TYPE MSFONTEXTRACT" - fi -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - WITH_FONTOOO=NO - SCPDEFS="$SCPDEFS -DWITHOUT_FONTOOO" -fi - - -if test "$WITH_FONTOOO" = "YES"; then - echo "$as_me:$LINENO: checking whether to use system libmspack" >&5 -echo $ECHO_N "checking whether to use system libmspack... $ECHO_C" >&6 - if test -n "$with_system_mspack" -o -n "$with_system_libs" && \ - test "$with_system_mspack" != "no"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - SYSTEM_MSPACK=YES - if test "${ac_cv_header_mspack_h+set}" = set; then - echo "$as_me:$LINENO: checking for mspack.h" >&5 -echo $ECHO_N "checking for mspack.h... $ECHO_C" >&6 -if test "${ac_cv_header_mspack_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_mspack_h" >&5 -echo "${ECHO_T}$ac_cv_header_mspack_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking mspack.h usability" >&5 -echo $ECHO_N "checking mspack.h usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 - -# Is the header present? -echo "$as_me:$LINENO: checking mspack.h presence" >&5 -echo $ECHO_N "checking mspack.h presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: mspack.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: mspack.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: mspack.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: mspack.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: mspack.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: mspack.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: mspack.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: mspack.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: mspack.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: mspack.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: mspack.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for mspack.h" >&5 -echo $ECHO_N "checking for mspack.h... $ECHO_C" >&6 -if test "${ac_cv_header_mspack_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_mspack_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_mspack_h" >&5 -echo "${ECHO_T}$ac_cv_header_mspack_h" >&6 - -fi -if test $ac_cv_header_mspack_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: mspack.h not found, install libmspack" >&5 -echo "$as_me: error: mspack.h not found, install libmspack" >&2;} - { (exit 1); exit 1; }; } -fi - - - -echo "$as_me:$LINENO: checking for mspack_create_cab_decompressor in -lmspack" >&5 -echo $ECHO_N "checking for mspack_create_cab_decompressor in -lmspack... $ECHO_C" >&6 -if test "${ac_cv_lib_mspack_mspack_create_cab_decompressor+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lmspack $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char mspack_create_cab_decompressor (); -int -main () -{ -mspack_create_cab_decompressor (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_mspack_mspack_create_cab_decompressor=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_mspack_mspack_create_cab_decompressor=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_mspack_mspack_create_cab_decompressor" >&5 -echo "${ECHO_T}$ac_cv_lib_mspack_mspack_create_cab_decompressor" >&6 -if test $ac_cv_lib_mspack_mspack_create_cab_decompressor = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBMSPACK 1 -_ACEOF - - LIBS="-lmspack $LIBS" - -else - { { echo "$as_me:$LINENO: error: libmspack not installed or functional" >&5 -echo "$as_me: error: libmspack not installed or functional" >&2;} - { (exit 1); exit 1; }; } -fi - - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - SYSTEM_MSPACK=NO - fi -fi - - echo "$as_me:$LINENO: checking whether to include MathMLDTD" >&5 echo $ECHO_N "checking whether to include MathMLDTD... $ECHO_C" >&6 if test -n "$enable_mathmldtd"; then @@ -29475,8 +29167,6 @@ s,@GOBJECT_CFLAGS@,$GOBJECT_CFLAGS,;t t s,@GOBJECT_LIBS@,$GOBJECT_LIBS,;t t s,@ENABLE_EVOAB2@,$ENABLE_EVOAB2,;t t s,@ENABLE_KAB@,$ENABLE_KAB,;t t -s,@WITH_FONTOOO@,$WITH_FONTOOO,;t t -s,@SYSTEM_MSPACK@,$SYSTEM_MSPACK,;t t s,@WITH_FONTS@,$WITH_FONTS,;t t s,@WITHOUT_PPDS@,$WITHOUT_PPDS,;t t s,@WITHOUT_AFMS@,$WITHOUT_AFMS,;t t -- cgit From 73f1c832825e5083987f87d7cda71b594bffb2c4 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Tue, 5 Jan 2010 19:53:12 +0100 Subject: DEV300 masterfix: #i10000#: lineinfo.cxx: enable exceptions --- vcl/source/gdi/makefile.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vcl/source/gdi/makefile.mk b/vcl/source/gdi/makefile.mk index e253f83b25ab..0ec8ca1f280c 100755 --- a/vcl/source/gdi/makefile.mk +++ b/vcl/source/gdi/makefile.mk @@ -57,7 +57,7 @@ EXCEPTIONSFILES= $(SLO)$/salmisc.obj \ $(SLO)$/gfxlink.obj \ $(SLO)$/print.obj \ $(SLO)$/print2.obj \ - $(SLO)$/configsettings.obj \ + $(SLO)$/configsettings.obj \ $(SLO)$/sallayout.obj \ $(SLO)$/image.obj \ $(SLO)$/impimage.obj \ @@ -75,7 +75,8 @@ EXCEPTIONSFILES= $(SLO)$/salmisc.obj \ $(SLO)$/impprn.obj \ $(SLO)$/gdimtf.obj \ $(SLO)$/graphictools.obj \ - $(SLO)$/textlayout.obj + $(SLO)$/textlayout.obj \ + $(SLO)$/lineinfo.obj SLOFILES= $(EXCEPTIONSFILES) \ $(SLO)$/animate.obj \ -- cgit From 8765a3bf9f2926a50d0f644e4263782269abe023 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Wed, 6 Jan 2010 13:54:46 +0100 Subject: DEV300 masterfix: #i10000#: lineinfo.cxx: enable exceptions (corrected) --- vcl/source/gdi/makefile.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/vcl/source/gdi/makefile.mk b/vcl/source/gdi/makefile.mk index 0ec8ca1f280c..eda537bf629a 100755 --- a/vcl/source/gdi/makefile.mk +++ b/vcl/source/gdi/makefile.mk @@ -101,7 +101,6 @@ SLOFILES= $(EXCEPTIONSFILES) \ $(SLO)$/impbmp.obj \ $(SLO)$/imagerepository.obj \ $(SLO)$/impvect.obj \ - $(SLO)$/lineinfo.obj \ $(SLO)$/mapmod.obj \ $(SLO)$/metaact.obj \ $(SLO)$/octree.obj \ -- cgit From b0c799c7fbaa93f707bf18a87eb9aef5d86be52c Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Wed, 6 Jan 2010 14:39:23 +0100 Subject: DEV300 masterfix: add namespace to call to primitive2d::mapTextLineToFontUnderline() --- drawinglayer/source/processor2d/vclprocessor2d.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index dd0a83be2ca7..bd9439ef9339 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -150,7 +150,7 @@ namespace drawinglayer mpOutputDevice->SetTextLineColor( Color(aTextlineColor) ); // set Overline attribute - const FontUnderline eFontOverline(mapTextLineToFontUnderline( pTCPP->getFontOverline() )); + const FontUnderline eFontOverline(primitive2d::mapTextLineToFontUnderline( pTCPP->getFontOverline() )); if( eFontOverline != UNDERLINE_NONE ) { aFont.SetOverline( eFontOverline ); @@ -161,7 +161,7 @@ namespace drawinglayer } // set Underline attribute - const FontUnderline eFontUnderline(mapTextLineToFontUnderline( pTCPP->getFontUnderline() )); + const FontUnderline eFontUnderline(primitive2d::mapTextLineToFontUnderline( pTCPP->getFontUnderline() )); if( eFontUnderline != UNDERLINE_NONE ) { aFont.SetUnderline( eFontUnderline ); @@ -172,7 +172,7 @@ namespace drawinglayer } // set Strikeout attribute - const FontStrikeout eFontStrikeout(mapTextStrikeoutToFontStrikeout(pTCPP->getTextStrikeout())); + const FontStrikeout eFontStrikeout(primitive2d::mapTextStrikeoutToFontStrikeout(pTCPP->getTextStrikeout())); if( eFontStrikeout != STRIKEOUT_NONE ) aFont.SetStrikeout( eFontStrikeout ); -- cgit From 35c909bffaf940a27a5ed477cf5fe3d3994b3c90 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Wed, 6 Jan 2010 17:55:27 +0100 Subject: DEV300 masterfix: #i10000#: proper lookup for sqlite3 --- moz/extractfiles.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/moz/extractfiles.mk b/moz/extractfiles.mk index c98bf8574e73..81e04ab80ad6 100644 --- a/moz/extractfiles.mk +++ b/moz/extractfiles.mk @@ -67,7 +67,7 @@ NSS_MODULE_RUNTIME_LIST:= \ plds4 \ smime3 \ softokn3 \ - sqlite3 \ + sqlite/sqlite3 \ ssl3 BIN_RUNTIMELIST= \ @@ -307,8 +307,8 @@ $(MISC)$/build$/so_moz_runtime_files: $(OUT)$/bin$/mozruntime.zip echo >& $(NULLDEV) .IF "$(ENABLE_NSS_MODULE)" == "YES" # We add the libraries from the separate nss module - $(foreach,file,$(NSS_MODULE_RUNTIME_LIST) $(COPY) $(SOLARLIBDIR)$/$(DLLPRE)$(file)$(DLLPOST) \ - $(RUNTIME_DIR)$/$(DLLPRE)$(file)$(DLLPOST) &&) \ + $(foreach,file,$(NSS_MODULE_RUNTIME_LIST) $(COPY) $(SOLARLIBDIR)$/$(file:d:d)/$(DLLPRE)$(file:f)$(DLLPOST) \ + $(RUNTIME_DIR)$/$(DLLPRE)$(file:f)$(DLLPOST) &&) \ echo >& $(NULLDEV) .ENDIF .ELSE # .IF "$(GUI)" == "UNX" -- cgit From b24cbcb51b47d8e71f651c93d9247e63cd85f9ed Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Wed, 6 Jan 2010 18:02:43 +0100 Subject: DEV300 masterfix: #i10000#: add solenv to dependency list --- lpsolve/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lpsolve/prj/build.lst b/lpsolve/prj/build.lst index e6965a1e25e7..68b61bf75674 100644 --- a/lpsolve/prj/build.lst +++ b/lpsolve/prj/build.lst @@ -1,3 +1,3 @@ -lps lpsolve : NULL +lps lpsolve : solenv NULL lps lpsolve usr1 - all lps_mkout NULL lps lpsolve nmake - all lps_lpsolve NULL -- cgit From 2023a7904c5a6536546022423948ab53fb4b309a Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Wed, 6 Jan 2010 18:18:06 +0100 Subject: DEV300 masterfix: #i10000#: add missing includes; fix CR/LF --- .../hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx | 73 +++++++++++----------- lingucomponent/source/lingutil/lingutil.cxx | 3 + .../source/spellcheck/spell/sspellimp.cxx | 2 +- .../source/thesaurus/libnth/nthesimp.cxx | 1 + 4 files changed, 42 insertions(+), 37 deletions(-) diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx index 8f43530c5a3a..7ebd9a7b66f3 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx @@ -65,6 +65,7 @@ #include "dictmgr.hxx" #include +#include #include #include @@ -544,10 +545,10 @@ Reference< XPossibleHyphens > SAL_CALL char *lcword; int k; - PropertyHelper_Hyphen & rHelper = GetPropHelper(); - rHelper.SetTmpPropVals(aProperties); - sal_Int16 minTrail = rHelper.GetMinTrailing(); - sal_Int16 minLead = rHelper.GetMinLeading(); + PropertyHelper_Hyphen & rHelper = GetPropHelper(); + rHelper.SetTmpPropVals(aProperties); + sal_Int16 minTrail = rHelper.GetMinTrailing(); + sal_Int16 minLead = rHelper.GetMinLeading(); HyphenDict *dict = NULL; rtl_TextEncoding aEnc = 0; @@ -621,9 +622,9 @@ Reference< XPossibleHyphens > SAL_CALL wordlen = encWord.getLength(); lcword = new char[wordlen+1]; hyphens = new char[wordlen+5]; - char ** rep = NULL; // replacements of discretionary hyphenation - int * pos = NULL; // array of [hyphenation point] minus [deletion position] - int * cut = NULL; // length of deletions in original word + char ** rep = NULL; // replacements of discretionary hyphenation + int * pos = NULL; // array of [hyphenation point] minus [deletion position] + int * cut = NULL; // length of deletions in original word // copy converted word into simple char buffer strcpy(lcword,encWord.getStr()); @@ -634,21 +635,21 @@ Reference< XPossibleHyphens > SAL_CALL n++; // fprintf(stderr,"hyphenate... %s\n",lcword); fflush(stderr); if (n > 0) { - if (hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL, &rep, &pos, &cut, - minLead, minTrail, Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))), - Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2))))) + if (hnj_hyphen_hyphenate3(dict, lcword, n, hyphens, NULL, &rep, &pos, &cut, + minLead, minTrail, Max(dict->clhmin, Max(dict->clhmin, 2) + Max(0, minLead - Max(dict->lhmin, 2))), + Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2))))) { delete[] hyphens; delete[] lcword; - - if (rep) { - for(int j = 0; j < n; j++) { - if (rep[j]) free(rep[j]); - } - free(rep); - } - if (pos) free(pos); - if (cut) free(cut); + + if (rep) { + for(int j = 0; j < n; j++) { + if (rep[j]) free(rep[j]); + } + free(rep); + } + if (pos) free(pos); + if (cut) free(cut); return NULL; } @@ -662,7 +663,7 @@ Reference< XPossibleHyphens > SAL_CALL INT16 i; for ( i = 0; i < encWord.getLength(); i++) - if (hyphens[i]&1 && (!rep || !rep[i])) + if (hyphens[i]&1 && (!rep || !rep[i])) nHyphCount++; Sequence< INT16 > aHyphPos(nHyphCount); @@ -671,14 +672,14 @@ Reference< XPossibleHyphens > SAL_CALL OUString hyphenatedWord; nHyphCount = 0; - for (i = 0; i < nWord.getLength(); i++) { + for (i = 0; i < nWord.getLength(); i++) { hyphenatedWordBuffer.append(aWord[i]); - // hyphenation position (not alternative) - if (hyphens[i]&1 && (!rep || !rep[i])) { - pPos[nHyphCount] = i; - hyphenatedWordBuffer.append(sal_Unicode('=')); - nHyphCount++; - } + // hyphenation position (not alternative) + if (hyphens[i]&1 && (!rep || !rep[i])) { + pPos[nHyphCount] = i; + hyphenatedWordBuffer.append(sal_Unicode('=')); + nHyphCount++; + } } hyphenatedWord = hyphenatedWordBuffer.makeStringAndClear(); @@ -690,15 +691,15 @@ Reference< XPossibleHyphens > SAL_CALL delete[] hyphens; delete[] lcword; - - if (rep) { - for(int j = 0; j < n; j++) { - if (rep[j]) free(rep[j]); - } - free(rep); - } - if (pos) free(pos); - if (cut) free(cut); + + if (rep) { + for(int j = 0; j < n; j++) { + if (rep[j]) free(rep[j]); + } + free(rep); + } + if (pos) free(pos); + if (cut) free(cut); return xRes; } diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx index 2e00035628bc..5e9b0c8fa592 100644 --- a/lingucomponent/source/lingutil/lingutil.cxx +++ b/lingucomponent/source/lingutil/lingutil.cxx @@ -57,11 +57,14 @@ #include #include +#include #include #include + + using ::com::sun::star::lang::Locale; using namespace ::com::sun::star; diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 1a92db58a4dc..bcb09c5ac16d 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -60,7 +60,7 @@ #include #include - +#include using namespace utl; using namespace osl; diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index c526d2b07444..a92c5926c8b4 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -54,6 +54,7 @@ #include #include +#include // values asigned to capitalization types #define CAPTYPE_UNKNOWN 0 -- cgit From 8a5b59989048d67b567819ee2038d4bff54ca184 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Thu, 7 Jan 2010 13:02:32 +0100 Subject: DEV300 masterfix: get_sis_time_string(): correct calculation of month --- setup_native/scripts/admin.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/setup_native/scripts/admin.pl b/setup_native/scripts/admin.pl index ebb16d0ef008..f737a6392f13 100644 --- a/setup_native/scripts/admin.pl +++ b/setup_native/scripts/admin.pl @@ -1164,6 +1164,7 @@ sub get_sis_time_string my $day = (localtime())[3]; my $month = (localtime())[4]; my $year = 1900 + (localtime())[5]; + $month++; if ( $second < 10 ) { $second = "0" . $second; } if ( $minute < 10 ) { $minute = "0" . $minute; } -- cgit