summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorka <kai.ahrens@oracle.com>2011-03-28 22:51:37 +0200
committerka <kai.ahrens@oracle.com>2011-03-28 22:51:37 +0200
commitc42564a7fdbe8a5e65eff768dca598ee96b8f88e (patch)
tree414f67e4fb2656c66e6067fa6eb2fa40844769a9 /drawinglayer
parentf5aba9c0bac074d291ddbb7ce75e427c11ae7c39 (diff)
parent9823cbf7faac2ef54b29e453a8fd03bb7d987c6b (diff)
ka102: rebased to DEV300_m104
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx2
-rw-r--r--drawinglayer/source/attribute/fontattribute.cxx20
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx2
-rw-r--r--drawinglayer/source/processor2d/canvasprocessor.cxx5
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx2
5 files changed, 26 insertions, 5 deletions
diff --git a/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx
index 6dffd80b332e..da7aedc6f983 100644
--- a/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx
+++ b/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx
@@ -65,6 +65,7 @@ namespace drawinglayer
bool bSymbol = false,
bool bVertical = false,
bool bItalic = false,
+ bool bMonospaced = false,
bool bOutline = false,
bool bRTL = false,
bool bBiDiStrong = false);
@@ -89,6 +90,7 @@ namespace drawinglayer
bool getOutline() const;
bool getRTL() const;
bool getBiDiStrong() const;
+ bool getMonospaced() const;
};
} // end of namespace attribute
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/attribute/fontattribute.cxx b/drawinglayer/source/attribute/fontattribute.cxx
index 7d10d3a37384..d4246376d9ca 100644
--- a/drawinglayer/source/attribute/fontattribute.cxx
+++ b/drawinglayer/source/attribute/fontattribute.cxx
@@ -55,6 +55,7 @@ namespace drawinglayer
unsigned mbOutline : 1; // Outline Flag
unsigned mbRTL : 1; // RTL Flag
unsigned mbBiDiStrong : 1; // BiDi Flag
+ unsigned mbMonospaced : 1;
ImpFontAttribute(
const String& rFamilyName,
@@ -63,6 +64,7 @@ namespace drawinglayer
bool bSymbol,
bool bVertical,
bool bItalic,
+ bool bMonospaced,
bool bOutline,
bool bRTL,
bool bBiDiStrong)
@@ -75,7 +77,8 @@ namespace drawinglayer
mbItalic(bItalic),
mbOutline(bOutline),
mbRTL(bRTL),
- mbBiDiStrong(bBiDiStrong)
+ mbBiDiStrong(bBiDiStrong),
+ mbMonospaced(bMonospaced)
{
}
@@ -89,6 +92,7 @@ namespace drawinglayer
bool getOutline() const { return mbOutline; }
bool getRTL() const { return mbRTL; }
bool getBiDiStrong() const { return mbBiDiStrong; }
+ bool getMonospaced() const { return mbMonospaced; }
bool operator==(const ImpFontAttribute& rCompare) const
{
@@ -100,7 +104,8 @@ namespace drawinglayer
&& getItalic() == rCompare.getItalic()
&& getOutline() == rCompare.getOutline()
&& getRTL() == rCompare.getRTL()
- && getBiDiStrong() == rCompare.getBiDiStrong());
+ && getBiDiStrong() == rCompare.getBiDiStrong()
+ && getMonospaced() == rCompare.getMonospaced());
}
static ImpFontAttribute* get_global_default()
@@ -112,7 +117,7 @@ namespace drawinglayer
pDefault = new ImpFontAttribute(
String(), String(),
0,
- false, false, false, false, false, false);
+ false, false, false, false, false, false, false);
// never delete; start with RefCount 1, not 0
pDefault->mnRefCount++;
@@ -129,11 +134,12 @@ namespace drawinglayer
bool bSymbol,
bool bVertical,
bool bItalic,
+ bool bMonospaced,
bool bOutline,
bool bRTL,
bool bBiDiStrong)
: mpFontAttribute(new ImpFontAttribute(
- rFamilyName, rStyleName, nWeight, bSymbol, bVertical, bItalic, bOutline, bRTL, bBiDiStrong))
+ rFamilyName, rStyleName, nWeight, bSymbol, bVertical, bItalic, bMonospaced, bOutline, bRTL, bBiDiStrong))
{
}
@@ -246,6 +252,12 @@ namespace drawinglayer
return mpFontAttribute->getBiDiStrong();
}
+ bool FontAttribute::getMonospaced() const
+ {
+ return mpFontAttribute->getMonospaced();
+ }
+
+
} // end of namespace attribute
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index c9774bea3f34..9aafd195a707 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -406,6 +406,7 @@ namespace drawinglayer
aRetval.SetWeight(static_cast<FontWeight>(rFontAttribute.getWeight()));
aRetval.SetItalic(rFontAttribute.getItalic() ? ITALIC_NORMAL : ITALIC_NONE);
aRetval.SetOutline(rFontAttribute.getOutline());
+ aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : PITCH_VARIABLE);
aRetval.SetLanguage(MsLangId::convertLocaleToLanguage(rLocale));
#ifdef WIN32
@@ -445,6 +446,7 @@ namespace drawinglayer
RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet(),
rFont.IsVertical(),
ITALIC_NONE != rFont.GetItalic(),
+ PITCH_FIXED == rFont.GetPitch(),
rFont.IsOutline(),
bRTL,
bBiDiStrong);
diff --git a/drawinglayer/source/processor2d/canvasprocessor.cxx b/drawinglayer/source/processor2d/canvasprocessor.cxx
index e20f1a417dcc..23661fe3747b 100644
--- a/drawinglayer/source/processor2d/canvasprocessor.cxx
+++ b/drawinglayer/source/processor2d/canvasprocessor.cxx
@@ -57,6 +57,7 @@
#include <basegfx/tuple/b2i64tuple.hxx>
#include <basegfx/range/b2irange.hxx>
#include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp>
+#include <com/sun/star/rendering/PanoseProportion.hpp>
#include <com/sun/star/rendering/CompositeOperation.hpp>
#include <com/sun/star/rendering/StrokeAttributes.hpp>
#include <com/sun/star/rendering/PathJoinType.hpp>
@@ -1517,6 +1518,10 @@ namespace drawinglayer
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 >(rFontAttr.getWeight());
+ aFontRequest.FontDescription.FontDescription.Proportion =
+ rFontAttr.getMonospaced()
+ ? rendering::PanoseProportion::MONO_SPACED
+ : rendering::PanoseProportion::ANYTHING;
aFontRequest.FontDescription.FontDescription.Letterform = rFontAttr.getItalic() ? 9 : 0;
// init CellSize to 1.0, else a default font height will be used
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 101b6c7f08e1..ed2b6e2e8244 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -866,7 +866,7 @@ namespace drawinglayer
// I have now moved describePDFControl to toolkit, thus i can implement the PDF
// form control support now as follows
::std::auto_ptr< ::vcl::PDFWriter::AnyWidget > pPDFControl;
- ::toolkitform::describePDFControl(rXControl, pPDFControl);
+ ::toolkitform::describePDFControl( rXControl, pPDFControl, *mpPDFExtOutDevData );
if(pPDFControl.get())
{