2006-10-19 09:40:02 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2006-10-19 09:40:02 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2006-10-19 09:40:02 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2006-10-19 09:40:02 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* This file is part of OpenOffice.org.
|
2006-10-19 09:40:02 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* 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.
|
2006-10-19 09:40:02 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* 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).
|
2006-10-19 09:40:02 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2006-10-19 09:40:02 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2008-03-05 08:18:45 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_drawinglayer.hxx"
|
|
|
|
|
2006-10-19 09:40:02 +00:00
|
|
|
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
|
|
|
|
#include <vcl/timer.hxx>
|
|
|
|
#include <vcl/virdev.hxx>
|
|
|
|
#include <vcl/font.hxx>
|
2007-02-14 13:53:01 +00:00
|
|
|
#include <vcl/metric.hxx>
|
2009-08-17 14:12:14 +00:00
|
|
|
#include <i18npool/mslangid.hxx>
|
2006-10-19 09:40:02 +00:00
|
|
|
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
|
2009-09-17 10:29:02 +00:00
|
|
|
#include <vcl/svapp.hxx>
|
2007-11-19 09:21:42 +00:00
|
|
|
|
2006-10-19 09:40:02 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// VDev RevDevice provider
|
|
|
|
|
|
|
|
namespace
|
|
|
|
{
|
|
|
|
class ImpTimedRefDev : public Timer
|
|
|
|
{
|
|
|
|
ImpTimedRefDev** mppStaticPointerOnMe;
|
|
|
|
VirtualDevice* mpVirDev;
|
|
|
|
sal_uInt32 mnUseCount;
|
|
|
|
|
|
|
|
public:
|
|
|
|
ImpTimedRefDev(ImpTimedRefDev** ppStaticPointerOnMe);
|
|
|
|
~ImpTimedRefDev();
|
|
|
|
virtual void Timeout();
|
|
|
|
|
|
|
|
VirtualDevice& acquireVirtualDevice();
|
|
|
|
void releaseVirtualDevice();
|
|
|
|
};
|
|
|
|
|
|
|
|
ImpTimedRefDev::ImpTimedRefDev(ImpTimedRefDev** ppStaticPointerOnMe)
|
|
|
|
: mppStaticPointerOnMe(ppStaticPointerOnMe),
|
|
|
|
mpVirDev(0L),
|
|
|
|
mnUseCount(0L)
|
|
|
|
{
|
|
|
|
SetTimeout(3L * 60L * 1000L); // three minutes
|
|
|
|
Start();
|
|
|
|
}
|
|
|
|
|
|
|
|
ImpTimedRefDev::~ImpTimedRefDev()
|
|
|
|
{
|
|
|
|
OSL_ENSURE(0L == mnUseCount, "destruction of a still used ImpTimedRefDev (!)");
|
|
|
|
|
|
|
|
if(mppStaticPointerOnMe && *mppStaticPointerOnMe)
|
|
|
|
{
|
|
|
|
*mppStaticPointerOnMe = 0L;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(mpVirDev)
|
|
|
|
{
|
|
|
|
delete mpVirDev;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ImpTimedRefDev::Timeout()
|
|
|
|
{
|
|
|
|
// for obvious reasons, do not call anything after this
|
|
|
|
delete (this);
|
|
|
|
}
|
|
|
|
|
|
|
|
VirtualDevice& ImpTimedRefDev::acquireVirtualDevice()
|
|
|
|
{
|
|
|
|
if(!mpVirDev)
|
|
|
|
{
|
|
|
|
mpVirDev = new VirtualDevice();
|
2007-01-25 11:15:23 +00:00
|
|
|
mpVirDev->SetReferenceDevice( VirtualDevice::REFDEV_MODE_MSO1 );
|
2006-10-19 09:40:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if(!mnUseCount)
|
|
|
|
{
|
|
|
|
Stop();
|
|
|
|
}
|
|
|
|
|
|
|
|
mnUseCount++;
|
|
|
|
|
|
|
|
return *mpVirDev;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ImpTimedRefDev::releaseVirtualDevice()
|
|
|
|
{
|
|
|
|
OSL_ENSURE(mnUseCount, "mismatch call number to releaseVirtualDevice() (!)");
|
|
|
|
mnUseCount--;
|
|
|
|
|
|
|
|
if(!mnUseCount)
|
|
|
|
{
|
|
|
|
Start();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} // end of anonymous namespace
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// access to one global ImpTimedRefDev incarnation in namespace drawinglayer::primitive
|
|
|
|
|
|
|
|
namespace drawinglayer
|
|
|
|
{
|
|
|
|
namespace primitive2d
|
|
|
|
{
|
|
|
|
// static pointer here
|
2007-01-25 11:15:23 +00:00
|
|
|
static ImpTimedRefDev* pImpGlobalRefDev = 0L;
|
2006-10-19 09:40:02 +00:00
|
|
|
|
|
|
|
// static methods here
|
|
|
|
VirtualDevice& acquireGlobalVirtualDevice()
|
|
|
|
{
|
|
|
|
if(!pImpGlobalRefDev)
|
|
|
|
{
|
|
|
|
pImpGlobalRefDev = new ImpTimedRefDev(&pImpGlobalRefDev);
|
|
|
|
}
|
|
|
|
|
|
|
|
return pImpGlobalRefDev->acquireVirtualDevice();
|
|
|
|
}
|
|
|
|
|
|
|
|
void releaseGlobalVirtualDevice()
|
|
|
|
{
|
|
|
|
OSL_ENSURE(pImpGlobalRefDev, "releaseGlobalVirtualDevice() without prior acquireGlobalVirtualDevice() call(!)");
|
|
|
|
pImpGlobalRefDev->releaseVirtualDevice();
|
|
|
|
}
|
|
|
|
|
|
|
|
TextLayouterDevice::TextLayouterDevice()
|
|
|
|
: mrDevice(acquireGlobalVirtualDevice())
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
TextLayouterDevice::~TextLayouterDevice()
|
|
|
|
{
|
|
|
|
releaseGlobalVirtualDevice();
|
|
|
|
}
|
|
|
|
|
|
|
|
void TextLayouterDevice::setFont(const Font& rFont)
|
|
|
|
{
|
2007-01-25 11:15:23 +00:00
|
|
|
mrDevice.SetFont( rFont );
|
2006-10-19 09:40:02 +00:00
|
|
|
}
|
|
|
|
|
2009-11-12 11:26:43 +01:00
|
|
|
void TextLayouterDevice::setFontAttribute(
|
|
|
|
const attribute::FontAttribute& rFontAttribute,
|
2009-09-17 10:29:02 +00:00
|
|
|
double fFontScaleX,
|
|
|
|
double fFontScaleY,
|
|
|
|
const ::com::sun::star::lang::Locale& rLocale)
|
2007-11-19 09:21:42 +00:00
|
|
|
{
|
2009-11-12 11:26:43 +01:00
|
|
|
setFont(getVclFontFromFontAttribute(
|
|
|
|
rFontAttribute,
|
2009-09-17 10:29:02 +00:00
|
|
|
fFontScaleX,
|
|
|
|
fFontScaleY,
|
|
|
|
0.0,
|
|
|
|
rLocale));
|
2006-10-19 09:40:02 +00:00
|
|
|
}
|
|
|
|
|
2009-01-05 17:49:45 +00:00
|
|
|
double TextLayouterDevice::getOverlineOffset() const
|
|
|
|
{
|
|
|
|
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
|
|
|
|
double fRet = (rMetric.GetIntLeading() / 2.0) - rMetric.GetAscent();
|
|
|
|
return fRet;
|
|
|
|
}
|
|
|
|
|
2007-02-14 13:53:01 +00:00
|
|
|
double TextLayouterDevice::getUnderlineOffset() const
|
|
|
|
{
|
|
|
|
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
|
|
|
|
double fRet = rMetric.GetDescent() / 2.0;
|
|
|
|
return fRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
double TextLayouterDevice::getStrikeoutOffset() const
|
|
|
|
{
|
|
|
|
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
|
|
|
|
double fRet = (rMetric.GetAscent() - rMetric.GetIntLeading()) / 3.0;
|
|
|
|
return fRet;
|
|
|
|
}
|
|
|
|
|
2009-01-05 17:49:45 +00:00
|
|
|
double TextLayouterDevice::getOverlineHeight() const
|
|
|
|
{
|
|
|
|
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
|
|
|
|
double fRet = rMetric.GetIntLeading() / 2.5;
|
|
|
|
return fRet;
|
|
|
|
}
|
|
|
|
|
2007-02-14 13:53:01 +00:00
|
|
|
double TextLayouterDevice::getUnderlineHeight() const
|
|
|
|
{
|
|
|
|
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
|
|
|
|
double fRet = rMetric.GetDescent() / 4.0;
|
|
|
|
return fRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
double TextLayouterDevice::getTextHeight() const
|
2006-10-19 09:40:02 +00:00
|
|
|
{
|
|
|
|
return mrDevice.GetTextHeight();
|
|
|
|
}
|
|
|
|
|
2007-10-01 08:14:08 +00:00
|
|
|
double TextLayouterDevice::getTextWidth(
|
|
|
|
const String& rText,
|
2010-02-02 12:16:54 +01:00
|
|
|
sal_uInt32 nIndex,
|
|
|
|
sal_uInt32 nLength) const
|
2006-10-19 09:40:02 +00:00
|
|
|
{
|
2007-10-01 08:14:08 +00:00
|
|
|
return mrDevice.GetTextWidth(rText, nIndex, nLength);
|
2006-10-19 09:40:02 +00:00
|
|
|
}
|
|
|
|
|
2007-10-01 08:14:08 +00:00
|
|
|
bool TextLayouterDevice::getTextOutlines(
|
|
|
|
basegfx::B2DPolyPolygonVector& rB2DPolyPolyVector,
|
|
|
|
const String& rText,
|
2010-02-02 12:16:54 +01:00
|
|
|
sal_uInt32 nIndex,
|
|
|
|
sal_uInt32 nLength,
|
|
|
|
const ::std::vector< double >& rDXArray) const
|
2006-10-19 09:40:02 +00:00
|
|
|
{
|
2009-09-17 10:29:02 +00:00
|
|
|
const sal_uInt32 nDXArrayCount(rDXArray.size());
|
2010-02-02 12:16:54 +01:00
|
|
|
sal_uInt32 nTextLength(nLength);
|
|
|
|
const sal_uInt32 nStringLength(rText.Len());
|
|
|
|
|
|
|
|
if(nTextLength + nIndex > nStringLength)
|
|
|
|
{
|
|
|
|
nTextLength = nStringLength - nIndex;
|
|
|
|
}
|
CWS-TOOLING: integrate CWS aw065
2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation
2009-06-16 15:45:28 +0200 wg r273021 : i102838
2009-06-16 12:46:07 +0200 wg r273016 : i102833
2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper
2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected
2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect
2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition
2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct)
2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync
2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync
2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync
2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49)
2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives
2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged()
2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition
2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping
2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping
2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped
2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped
2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped
2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped
2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state
2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state
2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state
2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state
2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state
2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state
2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications
2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications
2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications
2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications
2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications
2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications
2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications
2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds
2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling
2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations
2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked
2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared
2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes
2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes
2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH
2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH
2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH
2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync
2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync
2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47)
2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed
2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected
2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done
2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done
2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done
2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done
2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done
2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done
2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done
2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done
2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done
2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping
2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes
2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes
2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes
2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change
2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
|
|
|
|
2009-09-17 10:29:02 +00:00
|
|
|
if(nDXArrayCount)
|
CWS-TOOLING: integrate CWS aw065
2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation
2009-06-16 15:45:28 +0200 wg r273021 : i102838
2009-06-16 12:46:07 +0200 wg r273016 : i102833
2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper
2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected
2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect
2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition
2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct)
2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync
2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync
2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync
2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49)
2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives
2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged()
2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition
2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping
2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping
2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped
2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped
2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped
2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped
2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state
2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state
2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state
2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state
2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state
2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state
2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications
2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications
2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications
2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications
2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications
2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications
2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications
2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds
2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling
2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations
2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked
2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared
2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes
2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes
2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH
2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH
2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH
2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync
2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync
2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47)
2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed
2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected
2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done
2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done
2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done
2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done
2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done
2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done
2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done
2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done
2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done
2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping
2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes
2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes
2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes
2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change
2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
|
|
|
{
|
2010-02-02 12:16:54 +01:00
|
|
|
OSL_ENSURE(nDXArrayCount == nTextLength, "DXArray size does not correspond to text portion size (!)");
|
2009-09-17 10:29:02 +00:00
|
|
|
std::vector< sal_Int32 > aIntegerDXArray(nDXArrayCount);
|
CWS-TOOLING: integrate CWS aw065
2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation
2009-06-16 15:45:28 +0200 wg r273021 : i102838
2009-06-16 12:46:07 +0200 wg r273016 : i102833
2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper
2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected
2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect
2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition
2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct)
2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync
2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync
2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync
2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49)
2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives
2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged()
2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition
2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping
2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping
2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped
2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped
2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped
2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped
2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state
2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state
2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state
2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state
2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state
2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state
2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications
2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications
2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications
2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications
2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications
2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications
2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications
2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds
2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling
2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations
2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked
2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared
2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes
2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes
2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH
2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH
2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH
2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync
2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync
2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47)
2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed
2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected
2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done
2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done
2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done
2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done
2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done
2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done
2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done
2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done
2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done
2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping
2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes
2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes
2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes
2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change
2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
|
|
|
|
2009-09-17 10:29:02 +00:00
|
|
|
for(sal_uInt32 a(0); a < nDXArrayCount; a++)
|
CWS-TOOLING: integrate CWS aw065
2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation
2009-06-16 15:45:28 +0200 wg r273021 : i102838
2009-06-16 12:46:07 +0200 wg r273016 : i102833
2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper
2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected
2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect
2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition
2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct)
2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync
2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync
2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync
2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49)
2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives
2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged()
2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition
2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping
2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping
2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped
2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped
2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped
2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped
2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state
2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state
2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state
2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state
2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state
2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state
2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications
2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications
2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications
2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications
2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications
2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications
2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications
2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds
2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling
2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations
2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked
2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared
2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes
2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes
2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH
2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH
2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH
2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync
2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync
2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47)
2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed
2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected
2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done
2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done
2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done
2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done
2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done
2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done
2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done
2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done
2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done
2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping
2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes
2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes
2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes
2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change
2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
|
|
|
{
|
2009-09-17 10:29:02 +00:00
|
|
|
aIntegerDXArray[a] = basegfx::fround(rDXArray[a]);
|
CWS-TOOLING: integrate CWS aw065
2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation
2009-06-16 15:45:28 +0200 wg r273021 : i102838
2009-06-16 12:46:07 +0200 wg r273016 : i102833
2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper
2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected
2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect
2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition
2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct)
2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync
2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync
2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync
2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49)
2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives
2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged()
2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition
2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping
2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping
2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped
2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped
2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped
2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped
2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state
2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state
2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state
2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state
2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state
2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state
2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications
2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications
2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications
2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications
2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications
2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications
2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications
2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds
2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling
2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations
2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked
2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared
2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes
2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes
2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH
2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH
2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH
2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync
2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync
2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47)
2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed
2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected
2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done
2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done
2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done
2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done
2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done
2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done
2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done
2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done
2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done
2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping
2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes
2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes
2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes
2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change
2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
|
|
|
}
|
|
|
|
|
2009-09-17 10:29:02 +00:00
|
|
|
return mrDevice.GetTextOutlines(
|
|
|
|
rB2DPolyPolyVector,
|
|
|
|
rText,
|
|
|
|
nIndex,
|
|
|
|
nIndex,
|
|
|
|
nLength,
|
|
|
|
true,
|
|
|
|
0,
|
|
|
|
&(aIntegerDXArray[0]));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return mrDevice.GetTextOutlines(
|
|
|
|
rB2DPolyPolyVector,
|
|
|
|
rText,
|
|
|
|
nIndex,
|
|
|
|
nIndex,
|
|
|
|
nLength,
|
|
|
|
true,
|
|
|
|
0,
|
|
|
|
0);
|
|
|
|
}
|
2006-10-19 09:40:02 +00:00
|
|
|
}
|
|
|
|
|
2007-10-01 08:14:08 +00:00
|
|
|
basegfx::B2DRange TextLayouterDevice::getTextBoundRect(
|
|
|
|
const String& rText,
|
2010-02-02 12:16:54 +01:00
|
|
|
sal_uInt32 nIndex,
|
|
|
|
sal_uInt32 nLength) const
|
2006-10-19 09:40:02 +00:00
|
|
|
{
|
2010-02-02 12:16:54 +01:00
|
|
|
sal_uInt32 nTextLength(nLength);
|
|
|
|
const sal_uInt32 nStringLength(rText.Len());
|
|
|
|
|
|
|
|
if(nTextLength + nIndex > nStringLength)
|
|
|
|
{
|
|
|
|
nTextLength = nStringLength - nIndex;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(nTextLength)
|
2006-10-19 09:40:02 +00:00
|
|
|
{
|
|
|
|
Rectangle aRect;
|
2007-10-01 08:14:08 +00:00
|
|
|
|
2007-09-26 10:36:58 +00:00
|
|
|
mrDevice.GetTextBoundRect(
|
|
|
|
aRect,
|
|
|
|
rText,
|
2007-10-01 08:14:08 +00:00
|
|
|
nIndex,
|
|
|
|
nIndex,
|
|
|
|
nLength);
|
2006-10-19 09:40:02 +00:00
|
|
|
|
2009-09-17 10:29:02 +00:00
|
|
|
// #i104432#, #i102556# take empty results into account
|
2009-08-26 14:41:39 +00:00
|
|
|
if(!aRect.IsEmpty())
|
|
|
|
{
|
2010-02-02 12:16:54 +01:00
|
|
|
return basegfx::B2DRange(
|
|
|
|
aRect.Left(), aRect.Top(),
|
|
|
|
aRect.Right(), aRect.Bottom());
|
2009-08-26 14:41:39 +00:00
|
|
|
}
|
2006-10-19 09:40:02 +00:00
|
|
|
}
|
2009-08-26 14:41:39 +00:00
|
|
|
|
|
|
|
return basegfx::B2DRange();
|
2006-10-19 09:40:02 +00:00
|
|
|
}
|
2009-11-12 11:26:43 +01:00
|
|
|
|
|
|
|
double TextLayouterDevice::getFontAscent() const
|
|
|
|
{
|
|
|
|
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
|
|
|
|
return rMetric.GetAscent();
|
|
|
|
}
|
|
|
|
|
|
|
|
double TextLayouterDevice::getFontDescent() const
|
|
|
|
{
|
|
|
|
const ::FontMetric& rMetric = mrDevice.GetFontMetric();
|
|
|
|
return rMetric.GetDescent();
|
|
|
|
}
|
2009-11-23 12:30:29 +01:00
|
|
|
|
|
|
|
void TextLayouterDevice::addTextRectActions(
|
|
|
|
const Rectangle& rRectangle,
|
|
|
|
const String& rText,
|
|
|
|
sal_uInt16 nStyle,
|
2010-02-02 12:16:54 +01:00
|
|
|
GDIMetaFile& rGDIMetaFile) const
|
2009-11-23 12:30:29 +01:00
|
|
|
{
|
|
|
|
mrDevice.AddTextRectActions(
|
|
|
|
rRectangle, rText, nStyle, rGDIMetaFile);
|
|
|
|
}
|
2010-02-02 12:16:54 +01:00
|
|
|
|
|
|
|
::std::vector< double > TextLayouterDevice::getTextArray(
|
|
|
|
const String& rText,
|
|
|
|
sal_uInt32 nIndex,
|
|
|
|
sal_uInt32 nLength) const
|
|
|
|
{
|
|
|
|
::std::vector< double > aRetval;
|
|
|
|
sal_uInt32 nTextLength(nLength);
|
|
|
|
const sal_uInt32 nStringLength(rText.Len());
|
|
|
|
|
|
|
|
if(nTextLength + nIndex > nStringLength)
|
|
|
|
{
|
|
|
|
nTextLength = nStringLength - nIndex;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(nTextLength)
|
|
|
|
{
|
|
|
|
aRetval.reserve(nTextLength);
|
|
|
|
sal_Int32* pArray = new sal_Int32[nTextLength];
|
|
|
|
mrDevice.GetTextArray(rText, pArray, nIndex, nLength);
|
|
|
|
|
|
|
|
for(sal_uInt32 a(0); a < nTextLength; a++)
|
|
|
|
{
|
|
|
|
aRetval.push_back(pArray[a]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return aRetval;
|
|
|
|
}
|
|
|
|
|
2006-10-19 09:40:02 +00:00
|
|
|
} // end of namespace primitive2d
|
|
|
|
} // end of namespace drawinglayer
|
|
|
|
|
2007-11-19 09:21:42 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// helper methods for vcl font handling
|
|
|
|
|
|
|
|
namespace drawinglayer
|
|
|
|
{
|
|
|
|
namespace primitive2d
|
|
|
|
{
|
2009-11-12 11:26:43 +01:00
|
|
|
Font getVclFontFromFontAttribute(
|
|
|
|
const attribute::FontAttribute& rFontAttribute,
|
2007-11-19 09:21:42 +00:00
|
|
|
double fFontScaleX,
|
|
|
|
double fFontScaleY,
|
|
|
|
double fFontRotation,
|
2009-09-17 10:29:02 +00:00
|
|
|
const ::com::sun::star::lang::Locale& rLocale)
|
2007-11-19 09:21:42 +00:00
|
|
|
{
|
2009-09-17 10:29:02 +00:00
|
|
|
// detect FontScaling
|
|
|
|
const sal_uInt32 nHeight(basegfx::fround(fabs(fFontScaleY)));
|
|
|
|
const sal_uInt32 nWidth(basegfx::fround(fabs(fFontScaleX)));
|
|
|
|
const bool bFontIsScaled(nHeight != nWidth);
|
|
|
|
|
|
|
|
#ifdef WIN32
|
|
|
|
// for WIN32 systems, start with creating an unscaled font. If FontScaling
|
|
|
|
// is wanted, that width needs to be adapted using FontMetric again to get a
|
|
|
|
// width of the unscaled font
|
2007-11-19 09:21:42 +00:00
|
|
|
Font aRetval(
|
2009-11-12 11:26:43 +01:00
|
|
|
rFontAttribute.getFamilyName(),
|
|
|
|
rFontAttribute.getStyleName(),
|
2007-11-19 09:21:42 +00:00
|
|
|
Size(0, nHeight));
|
|
|
|
#else
|
2009-09-17 10:29:02 +00:00
|
|
|
// for non-WIN32 systems things are easier since these accept a Font creation
|
|
|
|
// with initially nWidth != nHeight for FontScaling. Despite that, use zero for
|
|
|
|
// FontWidth when no scaling is used to explicitely have that zero when e.g. the
|
|
|
|
// 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(
|
2009-11-12 11:26:43 +01:00
|
|
|
rFontAttribute.getFamilyName(),
|
|
|
|
rFontAttribute.getStyleName(),
|
2009-09-17 10:29:02 +00:00
|
|
|
Size(bFontIsScaled ? nWidth : 0, nHeight));
|
2007-11-19 09:21:42 +00:00
|
|
|
#endif
|
2009-11-12 11:26:43 +01:00
|
|
|
// define various other FontAttribute
|
2007-11-19 09:21:42 +00:00
|
|
|
aRetval.SetAlign(ALIGN_BASELINE);
|
2009-11-12 11:26:43 +01:00
|
|
|
aRetval.SetCharSet(rFontAttribute.getSymbol() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE);
|
|
|
|
aRetval.SetVertical(rFontAttribute.getVertical() ? TRUE : FALSE);
|
|
|
|
aRetval.SetWeight(static_cast<FontWeight>(rFontAttribute.getWeight()));
|
|
|
|
aRetval.SetItalic(rFontAttribute.getItalic() ? ITALIC_NORMAL : ITALIC_NONE);
|
|
|
|
aRetval.SetOutline(rFontAttribute.getOutline());
|
2010-09-30 16:10:11 +01:00
|
|
|
aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : PITCH_VARIABLE);
|
2009-08-17 14:12:14 +00:00
|
|
|
aRetval.SetLanguage(MsLangId::convertLocaleToLanguage(rLocale));
|
2007-11-19 09:21:42 +00:00
|
|
|
|
|
|
|
#ifdef WIN32
|
2009-09-17 10:29:02 +00:00
|
|
|
// for WIN32 systems, correct the FontWidth if FontScaling is used
|
|
|
|
if(bFontIsScaled && nHeight > 0)
|
2007-11-19 09:21:42 +00:00
|
|
|
{
|
2009-09-17 10:29:02 +00:00
|
|
|
const FontMetric aUnscaledFontMetric(Application::GetDefaultDevice()->GetFontMetric(aRetval));
|
|
|
|
|
|
|
|
if(aUnscaledFontMetric.GetWidth() > 0)
|
|
|
|
{
|
|
|
|
const double fScaleFactor((double)nWidth / (double)nHeight);
|
|
|
|
const sal_uInt32 nScaledWidth(basegfx::fround((double)aUnscaledFontMetric.GetWidth() * fScaleFactor));
|
|
|
|
aRetval.SetWidth(nScaledWidth);
|
|
|
|
}
|
2007-11-19 09:21:42 +00:00
|
|
|
}
|
|
|
|
#endif
|
2009-09-17 10:29:02 +00:00
|
|
|
// handle FontRotation (if defined)
|
2007-11-19 09:21:42 +00:00
|
|
|
if(!basegfx::fTools::equalZero(fFontRotation))
|
|
|
|
{
|
|
|
|
sal_Int16 aRotate10th((sal_Int16)(fFontRotation * (-1800.0/F_PI)));
|
|
|
|
aRetval.SetOrientation(aRotate10th % 3600);
|
|
|
|
}
|
|
|
|
|
|
|
|
return aRetval;
|
|
|
|
}
|
|
|
|
|
2009-11-12 11:26:43 +01:00
|
|
|
attribute::FontAttribute getFontAttributeFromVclFont(
|
2009-09-17 10:29:02 +00:00
|
|
|
basegfx::B2DVector& o_rSize,
|
|
|
|
const Font& rFont,
|
|
|
|
bool bRTL,
|
|
|
|
bool bBiDiStrong)
|
2007-11-19 09:21:42 +00:00
|
|
|
{
|
2009-11-12 11:26:43 +01:00
|
|
|
const attribute::FontAttribute aRetval(
|
2007-11-19 09:21:42 +00:00
|
|
|
rFont.GetName(),
|
|
|
|
rFont.GetStyleName(),
|
|
|
|
static_cast<sal_uInt16>(rFont.GetWeight()),
|
|
|
|
RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet(),
|
|
|
|
rFont.IsVertical(),
|
|
|
|
ITALIC_NONE != rFont.GetItalic(),
|
2010-09-30 16:10:11 +01:00
|
|
|
PITCH_FIXED == rFont.GetPitch(),
|
2007-11-19 09:21:42 +00:00
|
|
|
rFont.IsOutline(),
|
|
|
|
bRTL,
|
|
|
|
bBiDiStrong);
|
|
|
|
// TODO: eKerning
|
|
|
|
|
2009-09-17 10:29:02 +00:00
|
|
|
// set FontHeight and init to no FontScaling
|
|
|
|
o_rSize.setY(rFont.GetSize().getHeight() > 0 ? rFont.GetSize().getHeight() : 0);
|
|
|
|
o_rSize.setX(o_rSize.getY());
|
2007-11-19 09:21:42 +00:00
|
|
|
|
2009-09-17 10:29:02 +00:00
|
|
|
#ifdef WIN32
|
|
|
|
// for WIN32 systems, the FontScaling at the Font is detected by
|
|
|
|
// checking that FontWidth != 0. When FontScaling is used, WIN32
|
|
|
|
// needs to do extra stuff to detect the correct width (since it's
|
|
|
|
// zero and not equal the font height) and it's relationship to
|
|
|
|
// the height
|
|
|
|
if(rFont.GetSize().getWidth() > 0)
|
|
|
|
{
|
|
|
|
Font aUnscaledFont(rFont);
|
|
|
|
aUnscaledFont.SetWidth(0);
|
|
|
|
const FontMetric aUnscaledFontMetric(Application::GetDefaultDevice()->GetFontMetric(aUnscaledFont));
|
2007-11-19 09:21:42 +00:00
|
|
|
|
2009-09-17 10:29:02 +00:00
|
|
|
if(aUnscaledFontMetric.GetWidth() > 0)
|
|
|
|
{
|
|
|
|
const double fScaleFactor((double)rFont.GetSize().getWidth() / (double)aUnscaledFontMetric.GetWidth());
|
|
|
|
o_rSize.setX(fScaleFactor * o_rSize.getY());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
// For non-WIN32 systems the detection is the same, but the value
|
|
|
|
// is easier achieved since width == height is interpreted as no
|
|
|
|
// scaling. Ergo, Width == 0 means width == height, and width != 0
|
|
|
|
// means the scaling is in the direct relation of width to height
|
|
|
|
if(rFont.GetSize().getWidth() > 0)
|
|
|
|
{
|
|
|
|
o_rSize.setX((double)rFont.GetSize().getWidth());
|
|
|
|
}
|
|
|
|
#endif
|
2007-11-19 09:21:42 +00:00
|
|
|
return aRetval;
|
|
|
|
}
|
|
|
|
} // end of namespace primitive2d
|
|
|
|
} // end of namespace drawinglayer
|
|
|
|
|
2006-10-19 09:40:02 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// eof
|