editeng/source/editeng/impedit3.cxx | 4 +- include/svx/sdr/primitive2d/svx_primitivetypes2d.hxx | 2 - svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx | 27 +++++++++++++++++++ svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 5 +++ svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx | 23 ++++++++++++++++ 5 files changed, 58 insertions(+), 3 deletions(-)
New commits: commit 7427a65ad93a68ac3814d8c88f831474194351c0 Author: matteocam <[email protected]> Date: Tue Jul 22 15:57:18 2014 +0300 Basic SdrChainedTextPrimitive2D class definition Change-Id: I3bab06d061b1bde6804c0d539df3cf81bb363857 diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 196d0ee..77264b4 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -542,8 +542,8 @@ void ImpEditEngine::CheckAutoPageSize() SetValidPaperSize( aPaperSize ); // consider Min, Max // FIXME(matteocam) - fprintf( stderr, IsPageOverflow(aPaperSize, aPrevPaperSize) - ? "YES Overflow!\n" : "NO Overflow!\n" ); + /* fprintf( stderr, IsPageOverflow(aPaperSize, aPrevPaperSize) + ? "YES Overflow!\n" : "NO Overflow!\n" ); */ // setting overflow status if ( IsPageOverflow( aPaperSize, aPrevPaperSize ) ) aStatus.SetPageOverflow(true); diff --git a/include/svx/sdr/primitive2d/svx_primitivetypes2d.hxx b/include/svx/sdr/primitive2d/svx_primitivetypes2d.hxx index 0fae52a..cc7aca0 100644 --- a/include/svx/sdr/primitive2d/svx_primitivetypes2d.hxx +++ b/include/svx/sdr/primitive2d/svx_primitivetypes2d.hxx @@ -48,7 +48,7 @@ #define PRIMITIVE2D_ID_SDRCONTROLPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 21) #define PRIMITIVE2D_ID_SDROLECONTENTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 22) #define PRIMITIVE2D_ID_SDRAUTOFITTEXTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 23) - +#define PRIMITIVE2D_ID_SDRCHAINEDTEXTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 24) #endif // INCLUDED_SVX_SDR_PRIMITIVE2D_SVX_PRIMITIVETYPES2D_HXX diff --git a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx index fa8a13f..44b82ae 100644 --- a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx +++ b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx @@ -331,6 +331,33 @@ namespace drawinglayer } // end of namespace primitive2d } // end of namespace drawinglayer +namespace drawinglayer +{ + namespace primitive2d + { + class SdrChainedTextPrimitive2D : public SdrTextPrimitive2D + { + private: + // XXX: might have position of overflowing text + protected: + // local decomposition. + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const SAL_OVERRIDE; + + public: + SdrChainedTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rOutlinerParaObjectPtrs); + + // get data + + // compare operator + //virtual bool operator==(const BasePrimitive2D& rPrimitive) const SAL_OVERRIDE; + + // provide unique ID + DeclPrimitive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer #endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRTEXTPRIMITIVE2D_HXX diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index a12ff99..7e2a705 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -302,6 +302,11 @@ namespace drawinglayer } else if(rText.isAutoFit()) { + // FIXME(matteocam) + bool b = false; + if (b) + pNew = new SdrChainedTextPrimitive2D( &rText.getSdrText(), rText.getOutlinerParaObject() ); + else // end FIXME // isotrophically scaled text in range pNew = new SdrAutoFitTextPrimitive2D(&rText.getSdrText(), rText.getOutlinerParaObject(), aAnchorTransform, bWordWrap); } diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index 158a0d0..8ba2909 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -480,6 +480,29 @@ namespace drawinglayer } // end of namespace primitive2d } // end of namespace drawinglayer +namespace drawinglayer +{ + namespace primitive2d + { + + SdrChainedTextPrimitive2D::SdrChainedTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rOutlinerParaObject) + : SdrTextPrimitive2D(pSdrText, rOutlinerParaObject) + { } + + Primitive2DSequence SdrChainedTextPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const + { + Primitive2DSequence aRetval; + getSdrText()->GetObject().impDecomposeChainedPrimitive(aRetval, *this, aViewInformation); + + return encapsulateWithTextHierarchyBlockPrimitive2D(aRetval); + } + + // provide unique ID + ImplPrimitive2DIDBlock(SdrChainedTextPrimitive2D, PRIMITIVE2D_ID_SDRCHAINEDTEXTPRIMITIVE2D) + } // end of namespace primitive2d +} // end of namespace drawinglayer namespace drawinglayer _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
