INTEGRATION: CWS canvas05 (1.18.14); FILE MERGED
2008/04/21 07:50:30 thb 1.18.14.3: RESYNC: (1.19-1.20); FILE MERGED 2008/04/07 14:40:34 thb 1.18.14.2: RESYNC: (1.18-1.19); FILE MERGED 2007/10/01 13:41:44 thb 1.18.14.1: #i79258# Merge from CWS picom
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
* OpenOffice.org - a multi-platform office productivity suite
|
* OpenOffice.org - a multi-platform office productivity suite
|
||||||
*
|
*
|
||||||
* $RCSfile: textaction.cxx,v $
|
* $RCSfile: textaction.cxx,v $
|
||||||
* $Revision: 1.20 $
|
* $Revision: 1.21 $
|
||||||
*
|
*
|
||||||
* This file is part of OpenOffice.org.
|
* This file is part of OpenOffice.org.
|
||||||
*
|
*
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
#include "precompiled_cppcanvas.hxx"
|
#include "precompiled_cppcanvas.hxx"
|
||||||
|
|
||||||
#include <canvas/debug.hxx>
|
#include <canvas/debug.hxx>
|
||||||
|
#include <tools/diagnose_ex.h>
|
||||||
#include <canvas/verbosetrace.hxx>
|
#include <canvas/verbosetrace.hxx>
|
||||||
|
|
||||||
#include <rtl/logfile.hxx>
|
#include <rtl/logfile.hxx>
|
||||||
@@ -260,7 +261,7 @@ namespace cppcanvas
|
|||||||
const OutDevState& rState,
|
const OutDevState& rState,
|
||||||
const ::basegfx::B2DHomMatrix* pTextTransform )
|
const ::basegfx::B2DHomMatrix* pTextTransform )
|
||||||
{
|
{
|
||||||
ENSURE_AND_THROW( rOffsets.getLength(),
|
ENSURE_OR_THROW( rOffsets.getLength(),
|
||||||
"::cppcanvas::internal::initArrayAction(): zero-length DX array" );
|
"::cppcanvas::internal::initArrayAction(): zero-length DX array" );
|
||||||
|
|
||||||
const ::basegfx::B2DPoint aLocalStartPoint(
|
const ::basegfx::B2DPoint aLocalStartPoint(
|
||||||
@@ -278,7 +279,7 @@ namespace cppcanvas
|
|||||||
rState.textDirection,
|
rState.textDirection,
|
||||||
0 );
|
0 );
|
||||||
|
|
||||||
ENSURE_AND_THROW( o_rTextLayout.is(),
|
ENSURE_OR_THROW( o_rTextLayout.is(),
|
||||||
"::cppcanvas::internal::initArrayAction(): Invalid font" );
|
"::cppcanvas::internal::initArrayAction(): Invalid font" );
|
||||||
|
|
||||||
o_rTextLayout->applyLogicalAdvancements( rOffsets );
|
o_rTextLayout->applyLogicalAdvancements( rOffsets );
|
||||||
@@ -304,13 +305,13 @@ namespace cppcanvas
|
|||||||
const uno::Reference< rendering::XTextLayout >& rOrigTextLayout,
|
const uno::Reference< rendering::XTextLayout >& rOrigTextLayout,
|
||||||
const ::cppcanvas::internal::Action::Subset& rSubset )
|
const ::cppcanvas::internal::Action::Subset& rSubset )
|
||||||
{
|
{
|
||||||
ENSURE_AND_THROW( rSubset.mnSubsetEnd > rSubset.mnSubsetBegin,
|
ENSURE_OR_THROW( rSubset.mnSubsetEnd > rSubset.mnSubsetBegin,
|
||||||
"::cppcanvas::internal::calcSubsetOffsets(): invalid subset range range" );
|
"::cppcanvas::internal::calcSubsetOffsets(): invalid subset range range" );
|
||||||
|
|
||||||
uno::Sequence< double > aOrigOffsets( rOrigTextLayout->queryLogicalAdvancements() );
|
uno::Sequence< double > aOrigOffsets( rOrigTextLayout->queryLogicalAdvancements() );
|
||||||
const double* pOffsets( aOrigOffsets.getConstArray() );
|
const double* pOffsets( aOrigOffsets.getConstArray() );
|
||||||
|
|
||||||
ENSURE_AND_THROW( aOrigOffsets.getLength() >= rSubset.mnSubsetEnd,
|
ENSURE_OR_THROW( aOrigOffsets.getLength() >= rSubset.mnSubsetEnd,
|
||||||
"::cppcanvas::internal::calcSubsetOffsets(): invalid subset range range" );
|
"::cppcanvas::internal::calcSubsetOffsets(): invalid subset range range" );
|
||||||
|
|
||||||
// TODO(F3): It currently seems that for RTL text, the
|
// TODO(F3): It currently seems that for RTL text, the
|
||||||
@@ -455,7 +456,7 @@ namespace cppcanvas
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ENSURE_AND_THROW( io_rTextLayout.is(),
|
ENSURE_OR_THROW( io_rTextLayout.is(),
|
||||||
"createSubsetLayout(): Invalid input layout" );
|
"createSubsetLayout(): Invalid input layout" );
|
||||||
|
|
||||||
const rendering::StringContext& rOrigContext( io_rTextLayout->getText() );
|
const rendering::StringContext& rOrigContext( io_rTextLayout->getText() );
|
||||||
@@ -515,6 +516,8 @@ namespace cppcanvas
|
|||||||
const ::basegfx::B2DSize& rReliefOffset )
|
const ::basegfx::B2DSize& rReliefOffset )
|
||||||
{
|
{
|
||||||
::Color aEmptyColor( COL_AUTO );
|
::Color aEmptyColor( COL_AUTO );
|
||||||
|
uno::Reference<rendering::XColorSpace> xColorSpace(
|
||||||
|
xCanvas->getDevice()->getDeviceColorSpace() );
|
||||||
|
|
||||||
// draw shadow text, if enabled
|
// draw shadow text, if enabled
|
||||||
if( rShadowColor != aEmptyColor )
|
if( rShadowColor != aEmptyColor )
|
||||||
@@ -528,8 +531,8 @@ namespace cppcanvas
|
|||||||
::canvas::tools::appendToRenderState(aShadowState, aTranslate);
|
::canvas::tools::appendToRenderState(aShadowState, aTranslate);
|
||||||
|
|
||||||
aShadowState.DeviceColor =
|
aShadowState.DeviceColor =
|
||||||
::vcl::unotools::colorToDoubleSequence( xCanvas->getDevice(),
|
::vcl::unotools::colorToDoubleSequence( rShadowColor,
|
||||||
rShadowColor );
|
xColorSpace );
|
||||||
|
|
||||||
rRenderer( aShadowState );
|
rRenderer( aShadowState );
|
||||||
}
|
}
|
||||||
@@ -546,8 +549,8 @@ namespace cppcanvas
|
|||||||
::canvas::tools::appendToRenderState(aReliefState, aTranslate);
|
::canvas::tools::appendToRenderState(aReliefState, aTranslate);
|
||||||
|
|
||||||
aReliefState.DeviceColor =
|
aReliefState.DeviceColor =
|
||||||
::vcl::unotools::colorToDoubleSequence( xCanvas->getDevice(),
|
::vcl::unotools::colorToDoubleSequence( rReliefColor,
|
||||||
rReliefColor );
|
xColorSpace );
|
||||||
|
|
||||||
rRenderer( aReliefState );
|
rRenderer( aReliefState );
|
||||||
}
|
}
|
||||||
@@ -686,7 +689,7 @@ namespace cppcanvas
|
|||||||
rStartPoint,
|
rStartPoint,
|
||||||
rState, rCanvas );
|
rState, rCanvas );
|
||||||
|
|
||||||
ENSURE_AND_THROW( mxFont.is(),
|
ENSURE_OR_THROW( mxFont.is(),
|
||||||
"::cppcanvas::internal::TextAction(): Invalid font" );
|
"::cppcanvas::internal::TextAction(): Invalid font" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -707,7 +710,7 @@ namespace cppcanvas
|
|||||||
rStartPoint,
|
rStartPoint,
|
||||||
rState, rCanvas, rTextTransform );
|
rState, rCanvas, rTextTransform );
|
||||||
|
|
||||||
ENSURE_AND_THROW( mxFont.is(),
|
ENSURE_OR_THROW( mxFont.is(),
|
||||||
"::cppcanvas::internal::TextAction(): Invalid font" );
|
"::cppcanvas::internal::TextAction(): Invalid font" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -884,7 +887,7 @@ namespace cppcanvas
|
|||||||
rStartPoint,
|
rStartPoint,
|
||||||
rState, rCanvas );
|
rState, rCanvas );
|
||||||
|
|
||||||
ENSURE_AND_THROW( mxFont.is() && mxTextLines.is(),
|
ENSURE_OR_THROW( mxFont.is() && mxTextLines.is(),
|
||||||
"::cppcanvas::internal::EffectTextAction(): Invalid font or lines" );
|
"::cppcanvas::internal::EffectTextAction(): Invalid font or lines" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -924,7 +927,7 @@ namespace cppcanvas
|
|||||||
rStartPoint,
|
rStartPoint,
|
||||||
rState, rCanvas, rTextTransform );
|
rState, rCanvas, rTextTransform );
|
||||||
|
|
||||||
ENSURE_AND_THROW( mxFont.is() && mxTextLines.is(),
|
ENSURE_OR_THROW( mxFont.is() && mxTextLines.is(),
|
||||||
"::cppcanvas::internal::EffectTextAction(): Invalid font or lines" );
|
"::cppcanvas::internal::EffectTextAction(): Invalid font or lines" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1665,8 +1668,9 @@ namespace cppcanvas
|
|||||||
maState(),
|
maState(),
|
||||||
mnOutlineWidth( calcOutlineWidth(rState,rVDev) ),
|
mnOutlineWidth( calcOutlineWidth(rState,rVDev) ),
|
||||||
maFillColor(
|
maFillColor(
|
||||||
::vcl::unotools::colorToDoubleSequence( rCanvas->getUNOCanvas()->getDevice(),
|
::vcl::unotools::colorToDoubleSequence(
|
||||||
::Color( COL_WHITE ) ) ),
|
::Color( COL_WHITE ),
|
||||||
|
rCanvas->getUNOCanvas()->getDevice()->getDeviceColorSpace() )),
|
||||||
maTextLineInfo( tools::createTextLineInfo( rVDev, rState ) ),
|
maTextLineInfo( tools::createTextLineInfo( rVDev, rState ) ),
|
||||||
maLinesOverallSize(),
|
maLinesOverallSize(),
|
||||||
maOutlineBounds( rOutlineBounds ),
|
maOutlineBounds( rOutlineBounds ),
|
||||||
@@ -1708,8 +1712,9 @@ namespace cppcanvas
|
|||||||
maState(),
|
maState(),
|
||||||
mnOutlineWidth( calcOutlineWidth(rState,rVDev) ),
|
mnOutlineWidth( calcOutlineWidth(rState,rVDev) ),
|
||||||
maFillColor(
|
maFillColor(
|
||||||
::vcl::unotools::colorToDoubleSequence( rCanvas->getUNOCanvas()->getDevice(),
|
::vcl::unotools::colorToDoubleSequence(
|
||||||
::Color( COL_WHITE ) ) ),
|
::Color( COL_WHITE ),
|
||||||
|
rCanvas->getUNOCanvas()->getDevice()->getDeviceColorSpace() )),
|
||||||
maTextLineInfo( tools::createTextLineInfo( rVDev, rState ) ),
|
maTextLineInfo( tools::createTextLineInfo( rVDev, rState ) ),
|
||||||
maLinesOverallSize(),
|
maLinesOverallSize(),
|
||||||
maOutlineBounds( rOutlineBounds ),
|
maOutlineBounds( rOutlineBounds ),
|
||||||
@@ -1797,8 +1802,8 @@ namespace cppcanvas
|
|||||||
double nOutlineWidth ) :
|
double nOutlineWidth ) :
|
||||||
maFillColor(
|
maFillColor(
|
||||||
::vcl::unotools::colorToDoubleSequence(
|
::vcl::unotools::colorToDoubleSequence(
|
||||||
rCanvas->getDevice(),
|
::Color( COL_WHITE ),
|
||||||
::Color( COL_WHITE ) ) ),
|
rCanvas->getDevice()->getDeviceColorSpace() )),
|
||||||
mnOutlineWidth( nOutlineWidth ),
|
mnOutlineWidth( nOutlineWidth ),
|
||||||
mrCanvas( rCanvas ),
|
mrCanvas( rCanvas ),
|
||||||
mrTextPolygon( rTextPolygon ),
|
mrTextPolygon( rTextPolygon ),
|
||||||
|
Reference in New Issue
Block a user