summaryrefslogtreecommitdiff
path: root/drawinglayer/inc/drawinglayer/primitive2d
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-09-17 10:29:02 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-09-17 10:29:02 +0000
commit762181f6f1168e0eb54009990222d7cb4cebebd5 (patch)
treeeae0197fb4e9ee2549d31e358f01386145cff5a9 /drawinglayer/inc/drawinglayer/primitive2d
parent4e5d76b3cef5a863d5961e33a0c08c26b0b6dc2d (diff)
CWS-TOOLING: integrate CWS aw077
2009-09-17 Armin Le Grand #resolved conflicts for integration 2009-09-07 Armin Le Grand #i103058# re-added handling of StatusBar texts for DrawObject creation, added FullDrag for circle-similar shapes (all in the ellipse toolbar) 2009-09-03 Armin Le Grand #i100514# extended TextAttributes and handling, adapted for super/subscript, adapted WordBreaking (again) 2009-09-02 Armin Le Grand #i104432# secured TextLayouterDevice::getTextBoundRect implementation and usage 2009-09-02 Armin Le Grand #i104232#, #i100514# Mainly solved 1st one, no more local SpellCheck remembering, but adding to compare op's where needed 2009-08-19 Armin Le Grand #i100514# commited in-between version due to 2week holiday 2009-08-13 Armin Le Grand #i99157# applied changes to BitmapEx and SdrHdlBitmapSet 2009-08-06 Armin Le Grand #i100357# added clipping for too big MetaFiles
Diffstat (limited to 'drawinglayer/inc/drawinglayer/primitive2d')
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx42
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx8
2 files changed, 23 insertions, 27 deletions
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx
index b9639aeacc50..df09718a7582 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx
@@ -76,8 +76,11 @@ namespace drawinglayer
~TextLayouterDevice();
void setFont(const Font& rFont);
- void setFontAttributes(const FontAttributes& rFontAttributes, const basegfx::B2DHomMatrix& rTransform, const ::com::sun::star::lang::Locale & rLocale);
- void setFontAttributes(const FontAttributes& rFontAttributes, double fFontScaleX, double fFontScaleY, const ::com::sun::star::lang::Locale & rLocale);
+ void setFontAttributes(
+ const FontAttributes& rFontAttributes,
+ double fFontScaleX,
+ double fFontScaleY,
+ const ::com::sun::star::lang::Locale & rLocale);
double getTextHeight() const;
double getOverlineHeight() const;
@@ -85,9 +88,6 @@ namespace drawinglayer
double getUnderlineHeight() const;
double getUnderlineOffset() const;
double getStrikeoutOffset() const;
-#ifdef WIN32
- double getCurrentFontRelation() const;
-#endif
double getTextWidth(
const String& rText,
@@ -99,9 +99,7 @@ namespace drawinglayer
const String& rText,
xub_StrLen nIndex,
xub_StrLen nLength,
- // #i89784# added suppirt for DXArray for justified text
- const ::std::vector< double >& rDXArray,
- double fFontScaleWidth);
+ const ::std::vector< double >& rDXArray);
basegfx::B2DRange getTextBoundRect(
const String& rText,
@@ -112,27 +110,33 @@ namespace drawinglayer
} // end of namespace drawinglayer
//////////////////////////////////////////////////////////////////////////////
+// helper methods for vcl font handling
namespace drawinglayer
{
namespace primitive2d
{
- // helper methods for vcl font handling
+ // 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,
double fFontScaleY,
double fFontRotation,
- const ::com::sun::star::lang::Locale & rLocale,
- const OutputDevice& rOutDev);
-
- Font getVclFontFromFontAttributes(
- const FontAttributes& rFontAttributes,
- const basegfx::B2DHomMatrix& rTransform,
- const ::com::sun::star::lang::Locale & rLocale,
- const OutputDevice& rOutDev);
-
- FontAttributes getFontAttributesFromVclFont(basegfx::B2DVector& rSize, const Font& rFont, bool bRTL, bool bBiDiStrong);
+ 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
+ FontAttributes getFontAttributesFromVclFont(
+ basegfx::B2DVector& o_rSize,
+ const Font& rFont,
+ bool bRTL,
+ bool bBiDiStrong);
} // end of namespace primitive2d
} // end of namespace drawinglayer
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
index 9515fcc22ee8..d7f9bdb1e89a 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
@@ -158,14 +158,6 @@ namespace drawinglayer
// the necessary VCL outline extractins, scaling adaptions and other stuff.
void getTextOutlinesAndTransformation(basegfx::B2DPolyPolygonVector& rTarget, basegfx::B2DHomMatrix& rTransformation) const;
- // adapts fontScale for usage with TextLayouter. Input is rScale which is the extracted
- // scale from a text transformation. A copy goes to rFontScale and is modified so that
- // it contains only positive scalings and XY-equal scalings to allow to get a non-X-scaled
- // Vcl-Font for TextLayouter. rScale is adapted accordingly to contain the corrected scale
- // which would need to be applied to e.g. outlines received from TextLayouter under
- // usage of fontScale. This includes Y-Scale, X-Scale-correction and mirrorings.
- void getCorrectedScaleAndFontScale(basegfx::B2DVector& rScale, basegfx::B2DVector& rFontScale) const;
-
// get data
const basegfx::B2DHomMatrix& getTextTransform() const { return maTextTransform; }
const String& getText() const { return maText; }