Files
libreoffice/svx/source/dialog/dlgctrl.cxx

2119 lines
62 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 16:07:07 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 16:07:07 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 16:07:07 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 16:07:07 +00: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.
2000-09-18 16:07:07 +00: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).
2000-09-18 16:07:07 +00: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.
2000-09-18 16:07:07 +00:00
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
2000-09-18 16:07:07 +00:00
// include ---------------------------------------------------------------
#include <tools/shl.hxx>
#include <vcl/svapp.hxx>
#include <svx/xtable.hxx>
#include <svx/xpool.hxx>
2000-09-18 16:07:07 +00:00
#include <svx/dialogs.hrc>
2002-03-06 08:46:48 +00:00
#include "accessibility.hrc"
#include <svx/dlgctrl.hxx>
#include <svx/dialmgr.hxx>
#include <tools/poly.hxx>
2000-09-18 16:07:07 +00:00
#include <vcl/region.hxx>
#include <vcl/gradient.hxx>
#include <vcl/hatch.hxx>
#include <svtools/colorcfg.hxx>
2002-03-06 08:46:48 +00:00
#include "svxrectctaccessiblecontext.hxx"
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <svx/svdorect.hxx>
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
#include <svx/svdmodel.hxx>
#include <svx/svdopath.hxx>
#include <svx/sdr/contact/objectcontactofobjlistpainter.hxx>
#include <svx/sdr/contact/displayinfo.hxx>
2009-10-31 00:36:06 +01:00
#include "linectrl.hrc"
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
#define OUTPUT_DRAWMODE_COLOR (DRAWMODE_DEFAULT)
#define OUTPUT_DRAWMODE_CONTRAST (DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT)
2002-03-06 08:46:48 +00:00
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::accessibility;
2002-03-06 08:46:48 +00:00
// Control fo display and selection of the corner points and mid point of an
// object
2000-09-18 16:07:07 +00:00
Bitmap& SvxRectCtl::GetRectBitmap( void )
{
if( !pBitmap )
InitRectBitmap();
return *pBitmap;
}
2000-09-18 16:07:07 +00:00
SvxRectCtl::SvxRectCtl( Window* pParent, const ResId& rResId, RECT_POINT eRpt,
USHORT nBorder, USHORT nCircle, CTL_STYLE eStyle ) :
Control( pParent, rResId ),
2002-03-06 08:46:48 +00:00
pAccContext ( NULL ),
2000-09-18 16:07:07 +00:00
nBorderWidth( nBorder ),
nRadius ( nCircle),
eDefRP ( eRpt ),
eCS ( eStyle ),
pBitmap ( NULL ),
m_nState ( 0 ),
mbCompleteDisable(sal_False)
2000-09-18 16:07:07 +00:00
{
SetMapMode( MAP_100TH_MM );
2002-08-26 11:52:04 +00:00
Resize_Impl();
}
// -----------------------------------------------------------------------
SvxRectCtl::~SvxRectCtl()
{
delete pBitmap;
if( pAccContext )
pAccContext->release();
}
// -----------------------------------------------------------------------
void SvxRectCtl::Resize()
{
Resize_Impl();
Control::Resize();
}
// -----------------------------------------------------------------------
void SvxRectCtl::Resize_Impl()
{
2000-09-18 16:07:07 +00:00
aSize = GetOutputSize();
switch( eCS )
{
case CS_RECT:
case CS_ANGLE:
case CS_SHADOW:
aPtLT = Point( 0 + nBorderWidth, 0 + nBorderWidth );
aPtMT = Point( aSize.Width() / 2, 0 + nBorderWidth );
aPtRT = Point( aSize.Width() - nBorderWidth, 0 + nBorderWidth );
aPtLM = Point( 0 + nBorderWidth, aSize.Height() / 2 );
aPtMM = Point( aSize.Width() / 2, aSize.Height() / 2 );
aPtRM = Point( aSize.Width() - nBorderWidth, aSize.Height() / 2 );
aPtLB = Point( 0 + nBorderWidth, aSize.Height() - nBorderWidth );
aPtMB = Point( aSize.Width() / 2, aSize.Height() - nBorderWidth );
aPtRB = Point( aSize.Width() - nBorderWidth, aSize.Height() - nBorderWidth );
break;
case CS_LINE:
aPtLT = Point( 0 + 3 * nBorderWidth, 0 + nBorderWidth );
aPtMT = Point( aSize.Width() / 2, 0 + nBorderWidth );
aPtRT = Point( aSize.Width() - 3 * nBorderWidth, 0 + nBorderWidth );
aPtLM = Point( 0 + 3 * nBorderWidth, aSize.Height() / 2 );
aPtMM = Point( aSize.Width() / 2, aSize.Height() / 2 );
aPtRM = Point( aSize.Width() - 3 * nBorderWidth, aSize.Height() / 2 );
aPtLB = Point( 0 + 3 * nBorderWidth, aSize.Height() - nBorderWidth );
aPtMB = Point( aSize.Width() / 2, aSize.Height() - nBorderWidth );
aPtRB = Point( aSize.Width() - 3 * nBorderWidth, aSize.Height() - nBorderWidth );
break;
}
Reset();
InitSettings( TRUE, TRUE );
}
// -----------------------------------------------------------------------
void SvxRectCtl::InitRectBitmap( void )
{
if( pBitmap )
delete pBitmap;
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
svtools::ColorConfig aColorConfig;
pBitmap = new Bitmap( SVX_RES( RID_SVXCTRL_RECTBTNS ) );
// set bitmap-colors
Color aColorAry1[7];
Color aColorAry2[7];
aColorAry1[0] = Color( 0xC0, 0xC0, 0xC0 ); // light-gray
aColorAry1[1] = Color( 0xFF, 0xFF, 0x00 ); // yellow
aColorAry1[2] = Color( 0xFF, 0xFF, 0xFF ); // white
aColorAry1[3] = Color( 0x80, 0x80, 0x80 ); // dark-gray
aColorAry1[4] = Color( 0x00, 0x00, 0x00 ); // black
aColorAry1[5] = Color( 0x00, 0xFF, 0x00 ); // green
aColorAry1[6] = Color( 0x00, 0x00, 0xFF ); // blue
aColorAry2[0] = rStyles.GetDialogColor(); // background
aColorAry2[1] = rStyles.GetWindowColor();
aColorAry2[2] = rStyles.GetLightColor();
aColorAry2[3] = rStyles.GetShadowColor();
aColorAry2[4] = rStyles.GetDarkShadowColor();
aColorAry2[5] = Color( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor );
aColorAry2[6] = rStyles.GetDialogColor();
#ifdef DBG_UTIL
static BOOL bModify = FALSE;
BOOL& rModify = bModify;
if( rModify )
{
static int n = 0;
static UINT8 r = 0xFF;
static UINT8 g = 0x00;
static UINT8 b = 0xFF;
int& rn = n;
UINT8& rr = r;
UINT8& rg = g;
UINT8& rb = b;
aColorAry2[ rn ] = Color( rr, rg, rb );
}
#endif
pBitmap->Replace( aColorAry1, aColorAry2, 7, NULL );
}
// -----------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SvxRectCtl::InitSettings( BOOL bForeground, BOOL bBackground )
{
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
if( bForeground )
2000-09-18 16:07:07 +00:00
{
svtools::ColorConfig aColorConfig;
Color aTextColor( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor );
2000-09-18 16:07:07 +00:00
if ( IsControlForeground() )
aTextColor = GetControlForeground();
SetTextColor( aTextColor );
}
if( bBackground )
2000-09-18 16:07:07 +00:00
{
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
else
SetBackground( rStyleSettings.GetWindowColor() );
}
delete pBitmap;
pBitmap = NULL; // forces new creating of bitmap
2000-09-18 16:07:07 +00:00
Invalidate();
}
// The clicked rectangle (3 x 3) is determined and the parent (dialog)
// is notified that the item was changed
2000-09-18 16:07:07 +00:00
void SvxRectCtl::MouseButtonDown( const MouseEvent& rMEvt )
{
// CompletelyDisabled() added to have a disabled state for SvxRectCtl
if(!IsCompletelyDisabled())
{
Point aPtLast = aPtNew;
2000-09-18 16:07:07 +00:00
aPtNew = GetApproxLogPtFromPixPt( rMEvt.GetPosPixel() );
2000-09-18 16:07:07 +00:00
if( aPtNew == aPtMM && ( eCS == CS_SHADOW || eCS == CS_ANGLE ) )
{
aPtNew = aPtLast;
}
else
{
Invalidate( Rectangle( aPtLast - Point( nRadius, nRadius ),
aPtLast + Point( nRadius, nRadius ) ) );
Invalidate( Rectangle( aPtNew - Point( nRadius, nRadius ),
aPtNew + Point( nRadius, nRadius ) ) );
eRP = GetRPFromPoint( aPtNew );
2000-09-18 16:07:07 +00:00
SetActualRP( eRP );
2002-03-06 08:46:48 +00:00
if( WINDOW_TABPAGE == GetParent()->GetType() )
( (SvxTabPage*) GetParent() )->PointChanged( this, eRP );
}
2001-06-14 15:14:56 +00:00
}
}
// -----------------------------------------------------------------------
void SvxRectCtl::KeyInput( const KeyEvent& rKeyEvt )
{
// CompletelyDisabled() added to have a disabled state for SvxRectCtl
if(!IsCompletelyDisabled())
2001-06-14 15:14:56 +00:00
{
RECT_POINT eNewRP = eRP;
BOOL bUseMM = (eCS != CS_SHADOW) && (eCS != CS_ANGLE);
switch( rKeyEvt.GetKeyCode().GetCode() )
2001-06-14 15:14:56 +00:00
{
case KEY_DOWN:
{
if( !(m_nState & CS_NOVERT) )
switch( eNewRP )
{
case RP_LT: eNewRP = RP_LM; break;
case RP_MT: eNewRP = bUseMM ? RP_MM : RP_MB; break;
case RP_RT: eNewRP = RP_RM; break;
case RP_LM: eNewRP = RP_LB; break;
case RP_MM: eNewRP = RP_MB; break;
case RP_RM: eNewRP = RP_RB; break;
default: ; //prevent warning
}
}
break;
case KEY_UP:
{
if( !(m_nState & CS_NOVERT) )
switch( eNewRP )
{
case RP_LM: eNewRP = RP_LT; break;
case RP_MM: eNewRP = RP_MT; break;
case RP_RM: eNewRP = RP_RT; break;
case RP_LB: eNewRP = RP_LM; break;
case RP_MB: eNewRP = bUseMM ? RP_MM : RP_MT; break;
case RP_RB: eNewRP = RP_RM; break;
default: ; //prevent warning
}
}
break;
case KEY_LEFT:
{
if( !(m_nState & CS_NOHORZ) )
switch( eNewRP )
{
case RP_MT: eNewRP = RP_LT; break;
case RP_RT: eNewRP = RP_MT; break;
case RP_MM: eNewRP = RP_LM; break;
case RP_RM: eNewRP = bUseMM ? RP_MM : RP_LM; break;
case RP_MB: eNewRP = RP_LB; break;
case RP_RB: eNewRP = RP_MB; break;
default: ; //prevent warning
}
}
break;
case KEY_RIGHT:
{
if( !(m_nState & CS_NOHORZ) )
switch( eNewRP )
{
case RP_LT: eNewRP = RP_MT; break;
case RP_MT: eNewRP = RP_RT; break;
case RP_LM: eNewRP = bUseMM ? RP_MM : RP_RM; break;
case RP_MM: eNewRP = RP_RM; break;
case RP_LB: eNewRP = RP_MB; break;
case RP_MB: eNewRP = RP_RB; break;
default: ; //prevent warning
}
}
break;
default:
Control::KeyInput( rKeyEvt );
return;
2001-06-14 15:14:56 +00:00
}
if( eNewRP != eRP )
2001-06-14 15:14:56 +00:00
{
SetActualRP( eNewRP );
2001-06-14 15:14:56 +00:00
if( WINDOW_TABPAGE == GetParent()->GetType() )
( (SvxTabPage*) GetParent() )->PointChanged( this, eRP );
SetFocusRect();
}
2000-09-18 16:07:07 +00:00
}
}
// -----------------------------------------------------------------------
void SvxRectCtl::StateChanged( StateChangedType nType )
{
if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
InitSettings( TRUE, FALSE );
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
InitSettings( FALSE, TRUE );
Window::StateChanged( nType );
}
// -----------------------------------------------------------------------
void SvxRectCtl::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
InitSettings( TRUE, TRUE );
else
Window::DataChanged( rDCEvt );
}
// the control (rectangle with 9 circles)
2000-09-18 16:07:07 +00:00
void SvxRectCtl::Paint( const Rectangle& )
2000-09-18 16:07:07 +00:00
{
Point aPtDiff( PixelToLogic( Point( 1, 1 ) ) );
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
SetLineColor( rStyles.GetDialogColor() );
SetFillColor( rStyles.GetDialogColor() );
DrawRect( Rectangle( Point(0,0), GetOutputSize() ) );
if( IsEnabled() )
SetLineColor( rStyles.GetLabelTextColor() );
else
SetLineColor( rStyles.GetShadowColor() );
SetFillColor();
switch( eCS )
{
case CS_RECT:
case CS_SHADOW:
if( !IsEnabled() )
{
Color aOldCol = GetLineColor();
SetLineColor( rStyles.GetLightColor() );
DrawRect( Rectangle( aPtLT + aPtDiff, aPtRB + aPtDiff ) );
SetLineColor( aOldCol );
}
DrawRect( Rectangle( aPtLT, aPtRB ) );
break;
case CS_LINE:
if( !IsEnabled() )
{
Color aOldCol = GetLineColor();
SetLineColor( rStyles.GetLightColor() );
DrawLine( aPtLM - Point( 2 * nBorderWidth, 0) + aPtDiff,
aPtRM + Point( 2 * nBorderWidth, 0 ) + aPtDiff );
SetLineColor( aOldCol );
}
DrawLine( aPtLM - Point( 2 * nBorderWidth, 0),
aPtRM + Point( 2 * nBorderWidth, 0 ) );
break;
case CS_ANGLE:
if( !IsEnabled() )
{
Color aOldCol = GetLineColor();
SetLineColor( rStyles.GetLightColor() );
DrawLine( aPtLT + aPtDiff, aPtRB + aPtDiff );
DrawLine( aPtLB + aPtDiff, aPtRT + aPtDiff );
DrawLine( aPtLM + aPtDiff, aPtRM + aPtDiff );
DrawLine( aPtMT + aPtDiff, aPtMB + aPtDiff );
SetLineColor( aOldCol );
}
DrawLine( aPtLT, aPtRB );
DrawLine( aPtLB, aPtRT );
DrawLine( aPtLM, aPtRM );
DrawLine( aPtMT, aPtMB );
break;
default:
break;
}
SetFillColor( GetBackground().GetColor() );
Size aBtnSize( 11, 11 );
Size aDstBtnSize( PixelToLogic( aBtnSize ) );
Point aToCenter( aDstBtnSize.Width() >> 1, aDstBtnSize.Height() >> 1);
Point aBtnPnt1( IsEnabled()?0:22,0 );
Point aBtnPnt2( 11,0 );
Point aBtnPnt3( 22,0 );
BOOL bNoHorz = (m_nState & CS_NOHORZ) != 0;
BOOL bNoVert = (m_nState & CS_NOVERT) != 0;
Bitmap& rBitmap = GetRectBitmap();
2000-09-18 16:07:07 +00:00
// CompletelyDisabled() added to have a disabled state for SvxRectCtl
if(IsCompletelyDisabled())
{
DrawBitmap( aPtLT - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap );
DrawBitmap( aPtMT - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap );
DrawBitmap( aPtRT - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap );
DrawBitmap( aPtLM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap );
if( eCS == CS_RECT || eCS == CS_LINE )
DrawBitmap( aPtMM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap );
DrawBitmap( aPtRM - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap );
DrawBitmap( aPtLB - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap );
DrawBitmap( aPtMB - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap );
DrawBitmap( aPtRB - aToCenter, aDstBtnSize, aBtnPnt3, aBtnSize, rBitmap );
}
else
{
DrawBitmap( aPtLT - aToCenter, aDstBtnSize, (bNoHorz | bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap );
DrawBitmap( aPtMT - aToCenter, aDstBtnSize, bNoVert?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap );
DrawBitmap( aPtRT - aToCenter, aDstBtnSize, (bNoHorz | bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap );
2000-09-18 16:07:07 +00:00
DrawBitmap( aPtLM - aToCenter, aDstBtnSize, bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap );
2000-09-18 16:07:07 +00:00
// Center for rectangle and line
if( eCS == CS_RECT || eCS == CS_LINE )
DrawBitmap( aPtMM - aToCenter, aDstBtnSize, aBtnPnt1, aBtnSize, rBitmap );
2000-09-18 16:07:07 +00:00
DrawBitmap( aPtRM - aToCenter, aDstBtnSize, bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap );
2000-09-18 16:07:07 +00:00
DrawBitmap( aPtLB - aToCenter, aDstBtnSize, (bNoHorz | bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap );
DrawBitmap( aPtMB - aToCenter, aDstBtnSize, bNoVert?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap );
DrawBitmap( aPtRB - aToCenter, aDstBtnSize, (bNoHorz | bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap );
}
2000-09-18 16:07:07 +00:00
// draw active button, avoid center pos for angle
// CompletelyDisabled() added to have a disabled state for SvxRectCtl
if(!IsCompletelyDisabled())
2000-09-18 16:07:07 +00:00
{
if( IsEnabled() && (eCS != CS_ANGLE || aPtNew != aPtMM) )
{
Point aCenterPt( aPtNew );
aCenterPt -= aToCenter;
DrawBitmap( aCenterPt, aDstBtnSize, aBtnPnt2, aBtnSize, rBitmap );
}
}
}
// Convert RECT_POINT Point
2000-09-18 16:07:07 +00:00
|*
\************************************************************************/
Point SvxRectCtl::GetPointFromRP( RECT_POINT _eRP) const
2000-09-18 16:07:07 +00:00
{
switch( _eRP )
2000-09-18 16:07:07 +00:00
{
case RP_LT: return aPtLT;
case RP_MT: return aPtMT;
case RP_RT: return aPtRT;
case RP_LM: return aPtLM;
case RP_MM: return aPtMM;
case RP_RM: return aPtRM;
case RP_LB: return aPtLB;
case RP_MB: return aPtMB;
case RP_RB: return aPtRB;
}
return( aPtMM ); // default
}
2002-03-06 08:46:48 +00:00
void SvxRectCtl::SetFocusRect( const Rectangle* pRect )
{
HideFocus();
if( pRect )
ShowFocus( *pRect );
else
ShowFocus( CalculateFocusRectangle() );
}
Point SvxRectCtl::SetActualRPWithoutInvalidate( RECT_POINT eNewRP )
{
Point aPtLast = aPtNew;
aPtNew = GetPointFromRP( eNewRP );
if( (m_nState & CS_NOHORZ) != 0 )
aPtNew.X() = aPtMM.X();
if( (m_nState & CS_NOVERT) != 0 )
aPtNew.Y() = aPtMM.Y();
eNewRP = GetRPFromPoint( aPtNew );
eDefRP = eNewRP;
eRP = eNewRP;
return aPtLast;
}
void SvxRectCtl::GetFocus()
{
SetFocusRect();
}
void SvxRectCtl::LoseFocus()
{
HideFocus();
}
Point SvxRectCtl::GetApproxLogPtFromPixPt( const Point& rPt ) const
{
Point aPt = PixelToLogic( rPt );
long x;
long y;
if( ( m_nState & CS_NOHORZ ) == 0 )
{
if( aPt.X() < aSize.Width() / 3 )
x = aPtLT.X();
else if( aPt.X() < aSize.Width() * 2 / 3 )
x = aPtMM.X();
else
x = aPtRB.X();
}
else
x = aPtMM.X();
if( ( m_nState & CS_NOVERT ) == 0 )
{
if( aPt.Y() < aSize.Height() / 3 )
y = aPtLT.Y();
else if( aPt.Y() < aSize.Height() * 2 / 3 )
y = aPtMM.Y();
else
y = aPtRB.Y();
}
else
y = aPtMM.Y();
return Point( x, y );
}
// Converts Point in RECT_POINT
2000-09-18 16:07:07 +00:00
RECT_POINT SvxRectCtl::GetRPFromPoint( Point aPt ) const
{
if ( aPt == aPtLT) return RP_LT;
else if( aPt == aPtMT) return RP_MT;
else if( aPt == aPtRT) return RP_RT;
else if( aPt == aPtLM) return RP_LM;
else if( aPt == aPtRM) return RP_RM;
else if( aPt == aPtLB) return RP_LB;
else if( aPt == aPtMB) return RP_MB;
else if( aPt == aPtRB) return RP_RB;
else
return RP_MM; // default
}
// Resets to the original state of the control
2000-09-18 16:07:07 +00:00
void SvxRectCtl::Reset()
{
aPtNew = GetPointFromRP( eDefRP );
eRP = eDefRP;
Invalidate();
}
// Returns the currently selected RECT_POINT
2000-09-18 16:07:07 +00:00
RECT_POINT SvxRectCtl::GetActualRP() const
{
return( eRP );
}
void SvxRectCtl::SetActualRP( RECT_POINT eNewRP )
{
2002-03-06 08:46:48 +00:00
Point aPtLast( SetActualRPWithoutInvalidate( eNewRP ) );
2000-09-18 16:07:07 +00:00
2002-03-06 08:46:48 +00:00
Invalidate( Rectangle( aPtLast - Point( nRadius, nRadius ), aPtLast + Point( nRadius, nRadius ) ) );
Invalidate( Rectangle( aPtNew - Point( nRadius, nRadius ), aPtNew + Point( nRadius, nRadius ) ) );
2000-09-18 16:07:07 +00:00
// notify accessibility object about change
2002-03-06 08:46:48 +00:00
if( pAccContext )
pAccContext->selectChild( eNewRP );
2000-09-18 16:07:07 +00:00
}
void SvxRectCtl::SetState( CTL_STATE nState )
{
m_nState = nState;
Point aPtLast( GetPointFromRP( eRP ) );
Point _aPtNew( aPtLast );
2000-09-18 16:07:07 +00:00
if( (m_nState & CS_NOHORZ) != 0 )
_aPtNew.X() = aPtMM.X();
2000-09-18 16:07:07 +00:00
if( (m_nState & CS_NOVERT) != 0 )
_aPtNew.Y() = aPtMM.Y();
2000-09-18 16:07:07 +00:00
eRP = GetRPFromPoint( _aPtNew );
2000-09-18 16:07:07 +00:00
Invalidate();
if( WINDOW_TABPAGE == GetParent()->GetType() )
( (SvxTabPage*) GetParent() )->PointChanged( this, eRP );
}
2002-03-06 08:46:48 +00:00
UINT8 SvxRectCtl::GetNumOfChilds( void ) const
{
return ( eCS == CS_ANGLE )? 8 : 9;
}
Rectangle SvxRectCtl::CalculateFocusRectangle( void ) const
{
Size aDstBtnSize( PixelToLogic( Size( 15, 15 ) ) );
return Rectangle( aPtNew - Point( aDstBtnSize.Width() >> 1, aDstBtnSize.Height() >> 1 ), aDstBtnSize );
}
Rectangle SvxRectCtl::CalculateFocusRectangle( RECT_POINT eRectPoint ) const
{
Rectangle aRet;
RECT_POINT eOldRectPoint = GetActualRP();
if( eOldRectPoint == eRectPoint )
aRet = CalculateFocusRectangle();
else
{
SvxRectCtl* pThis = const_cast< SvxRectCtl* >( this );
pThis->SetActualRPWithoutInvalidate( eRectPoint ); // no invalidation because it's only temporary!
aRet = CalculateFocusRectangle();
pThis->SetActualRPWithoutInvalidate( eOldRectPoint ); // no invalidation because nothing has changed!
}
return aRet;
}
Reference< XAccessible > SvxRectCtl::CreateAccessible()
{
2002-03-19 07:55:56 +00:00
Window* pParent = GetAccessibleParentWindow();
2002-03-06 08:46:48 +00:00
DBG_ASSERT( pParent, "-SvxRectCtl::CreateAccessible(): No Parent!" );
Reference< XAccessible > xAccParent = pParent->GetAccessible();
if( xAccParent.is() )
{
pAccContext = new SvxRectCtlAccessibleContext( xAccParent, *this );
pAccContext->acquire();
SetActualRP( GetActualRP() );
return pAccContext;
}
else
return Reference< XAccessible >();
}
RECT_POINT SvxRectCtl::GetApproxRPFromPixPt( const ::com::sun::star::awt::Point& r ) const
{
return GetRPFromPoint( GetApproxLogPtFromPixPt( Point( r.X, r.Y ) ) );
}
// CompletelyDisabled() added to have a disabled state for SvxRectCtl
void SvxRectCtl::DoCompletelyDisable(sal_Bool bNew)
{
mbCompleteDisable = bNew;
Invalidate();
}
2002-03-06 08:46:48 +00:00
// Constructor without the size parameter
2000-09-18 16:07:07 +00:00
SvxAngleCtl::SvxAngleCtl( Window* pParent, const ResId& rResId ) :
SvxRectCtl( pParent, rResId ),
aFont( Application::GetSettings().GetStyleSettings().GetAppFont() )
{
aFontSize = Size( 250, 400 );
Initialize();
}
// Constructor with the size parameter
2000-09-18 16:07:07 +00:00
SvxAngleCtl::SvxAngleCtl( Window* pParent, const ResId& rResId, Size _aSize ) :
2000-09-18 16:07:07 +00:00
SvxRectCtl( pParent, rResId ),
aFont( Application::GetSettings().GetStyleSettings().GetAppFont() )
{
aFontSize = _aSize;
2000-09-18 16:07:07 +00:00
Initialize();
}
void SvxAngleCtl::Initialize()
{
bPositive = TRUE;
aFont.SetSize( aFontSize );
aFont.SetWeight( WEIGHT_NORMAL );
aFont.SetTransparent( FALSE );
SetFont( aFont );
}
// Draws the (mini) coordinate system
2000-09-18 16:07:07 +00:00
void SvxAngleCtl::Paint( const Rectangle& )
2000-09-18 16:07:07 +00:00
{
SetLineColor( Color( COL_BLACK ) ); // PEN_DOT ???
DrawLine( aPtLT - Point( 0, 0), aPtRB + Point( 0, 0 ) );
DrawLine( aPtLB - Point( 0, 0), aPtRT + Point( 0, 0 ) );
SetLineColor( Color( COL_BLACK ) );
DrawLine( aPtLM - Point( 0, 0), aPtRM + Point( 0, 0 ) );
DrawLine( aPtMT - Point( 0, 0), aPtMB + Point( 0, 0 ) );
Point aDiff(aFontSize.Width() / 2, aFontSize.Height() / 2);
DrawText( aPtLT - aDiff, UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "135" ) ) );
DrawText( aPtLM - aDiff, UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "180" ) ) );
if ( bPositive )
DrawText( aPtLB - aDiff, UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "225" ) ) );
else
DrawText( aPtLB - aDiff, UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "-135" ) ) );
aDiff.X() = aFontSize.Width();
DrawText( aPtMT - aDiff, UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "90" ) ) );
DrawText( aPtRT - aDiff, UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "45" ) ) );
aDiff.X() = aDiff .X() * 3 / 2;
if ( bPositive )
DrawText( aPtMB - aDiff, UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "270" ) ) );
else
DrawText( aPtMB - aDiff, UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "-90" ) ) );
DrawText( aPtRM - Point( 0, aDiff.Y() ), UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "0" ) ) );
aDiff.X() = aFontSize.Width() * 2;
if ( bPositive )
DrawText( aPtRB - aDiff, UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "315" ) ) );
else
DrawText( aPtRB - aDiff, UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "-45" ) ) );
}
// Control for editing bitmaps
2000-09-18 16:07:07 +00:00
SvxPixelCtl::SvxPixelCtl( Window* pParent, const ResId& rResId, USHORT nNumber ) :
Control ( pParent, rResId ),
nLines ( nNumber ),
bPaintable ( TRUE )
{
aRectSize = GetOutputSize();
SetPixelColor( Color( COL_BLACK ) );
SetBackgroundColor( Color( COL_WHITE ) );
SetLineColor( Application::GetSettings().GetStyleSettings().GetShadowColor() );
nSquares = nLines * nLines;
pPixel = new USHORT[ nSquares ];
rtl_zeroMemory(pPixel, nSquares * sizeof(USHORT));
2000-09-18 16:07:07 +00:00
}
// Destructor dealocating the dynamic array
2000-09-18 16:07:07 +00:00
SvxPixelCtl::~SvxPixelCtl( )
{
delete []pPixel;
}
// Changes the foreground or Background color
2000-09-18 16:07:07 +00:00
void SvxPixelCtl::ChangePixel( USHORT nPixel )
{
if( *( pPixel + nPixel) == 0 )
*( pPixel + nPixel) = 1; // could be extended to more colors
2000-09-18 16:07:07 +00:00
else
*( pPixel + nPixel) = 0;
}
// The clicked rectangle is identified, to change its color
2000-09-18 16:07:07 +00:00
void SvxPixelCtl::MouseButtonDown( const MouseEvent& rMEvt )
{
Point aPt = PixelToLogic( rMEvt.GetPosPixel() );
Point aPtTl, aPtBr;
USHORT nX, nY;
nX = (USHORT) ( aPt.X() * nLines / aRectSize.Width() );
nY = (USHORT) ( aPt.Y() * nLines / aRectSize.Height() );
ChangePixel( nX + nY * nLines );
aPtTl.X() = aRectSize.Width() * nX / nLines + 1;
aPtBr.X() = aRectSize.Width() * (nX + 1) / nLines - 1;
aPtTl.Y() = aRectSize.Height() * nY / nLines + 1;
aPtBr.Y() = aRectSize.Height() * (nY + 1) / nLines - 1;
Invalidate( Rectangle( aPtTl, aPtBr ) );
if( WINDOW_TABPAGE == GetParent()->GetType() )
( (SvxTabPage*) GetParent() )->PointChanged( this, RP_MM ); // RectPoint is a dummy
2000-09-18 16:07:07 +00:00
}
// Draws the Control (Rectangle with nine circles)
2000-09-18 16:07:07 +00:00
void SvxPixelCtl::Paint( const Rectangle& )
2000-09-18 16:07:07 +00:00
{
USHORT i, j, nTmp;
Point aPtTl, aPtBr;
if( bPaintable )
{
// Draw lines
2000-09-18 16:07:07 +00:00
Control::SetLineColor( aLineColor );
for( i = 1; i < nLines; i++)
{
// horizontal
nTmp = (USHORT) ( aRectSize.Height() * i / nLines );
DrawLine( Point( 0, nTmp ), Point( aRectSize.Width(), nTmp ) );
// vertically
2000-09-18 16:07:07 +00:00
nTmp = (USHORT) ( aRectSize.Width() * i / nLines );
DrawLine( Point( nTmp, 0 ), Point( nTmp, aRectSize.Height() ) );
}
//Draw Rectangles (squares)
2000-09-18 16:07:07 +00:00
Control::SetLineColor();
USHORT nLastPixel = *pPixel ? 0 : 1;
for( i = 0; i < nLines; i++)
{
aPtTl.Y() = aRectSize.Height() * i / nLines + 1;
aPtBr.Y() = aRectSize.Height() * (i + 1) / nLines - 1;
for( j = 0; j < nLines; j++)
{
aPtTl.X() = aRectSize.Width() * j / nLines + 1;
aPtBr.X() = aRectSize.Width() * (j + 1) / nLines - 1;
if ( *( pPixel + i * nLines + j ) != nLastPixel )
{
nLastPixel = *( pPixel + i * nLines + j );
// Change color: 0 -> Background color
2000-09-18 16:07:07 +00:00
SetFillColor( nLastPixel ? aPixelColor : aBackgroundColor );
}
DrawRect( Rectangle( aPtTl, aPtBr ) );
}
}
} // bPaintable
else
{
SetBackground( Wallpaper( Color( COL_LIGHTGRAY ) ) );
Control::SetLineColor( Color( COL_LIGHTRED ) );
DrawLine( Point( 0, 0 ), Point( aRectSize.Width(), aRectSize.Height() ) );
DrawLine( Point( 0, aRectSize.Height() ), Point( aRectSize.Width(), 0 ) );
}
}
void SvxPixelCtl::SetXBitmap( const XOBitmap& rXBmp )
{
if( rXBmp.GetBitmapType() == XBITMAP_8X8 )
{
aPixelColor = rXBmp.GetPixelColor();
aBackgroundColor = rXBmp.GetBackgroundColor();
USHORT* pArray = rXBmp.GetPixelArray();
for( USHORT i = 0; i < nSquares; i++ )
*( pPixel + i ) = *( pArray + i );
}
}
// Returns a specific pixel
2000-09-18 16:07:07 +00:00
USHORT SvxPixelCtl::GetBitmapPixel( const USHORT nPixel )
2000-09-18 16:07:07 +00:00
{
return( *( pPixel + nPixel ) );
}
// Resets to the original state of the control
2000-09-18 16:07:07 +00:00
void SvxPixelCtl::Reset()
{
// clear pixel area
rtl_zeroMemory(pPixel, nSquares * sizeof(USHORT));
2000-09-18 16:07:07 +00:00
Invalidate();
}
// Constructor: BitmapCtl for SvxPixelCtl
2000-09-18 16:07:07 +00:00
SvxBitmapCtl::SvxBitmapCtl( Window* /*pParent*/, const Size& rSize )
2000-09-18 16:07:07 +00:00
{
aSize = rSize;
}
SvxBitmapCtl::~SvxBitmapCtl()
{
}
// BitmapCtl: Returns the Bitmap
2000-09-18 16:07:07 +00:00
XOBitmap SvxBitmapCtl::GetXBitmap()
{
XOBitmap aXOBitmap( pBmpArray, aPixelColor, aBackgroundColor );
return( aXOBitmap );
}
// Fills the Listbox with color and strings
2000-09-18 16:07:07 +00:00
void ColorLB::Fill( const XColorTable* pColorTab )
{
long nCount = pColorTab->Count();
XColorEntry* pEntry;
SetUpdateMode( FALSE );
for( long i = 0; i < nCount; i++ )
{
pEntry = pColorTab->GetColor( i );
2000-09-18 16:07:07 +00:00
InsertEntry( pEntry->GetColor(), pEntry->GetName() );
}
SetUpdateMode( TRUE );
}
/************************************************************************/
void ColorLB::Append( XColorEntry* pEntry, Bitmap* )
2000-09-18 16:07:07 +00:00
{
InsertEntry( pEntry->GetColor(), pEntry->GetName() );
}
/************************************************************************/
void ColorLB::Modify( XColorEntry* pEntry, USHORT nPos, Bitmap* )
2000-09-18 16:07:07 +00:00
{
RemoveEntry( nPos );
InsertEntry( pEntry->GetColor(), pEntry->GetName(), nPos );
}
// Fills the Listbox with color and strings
2000-09-18 16:07:07 +00:00
void FillAttrLB::Fill( const XColorTable* pColorTab )
{
long nCount = pColorTab->Count();
XColorEntry* pEntry;
SetUpdateMode( FALSE );
for( long i = 0; i < nCount; i++ )
{
pEntry = pColorTab->GetColor( i );
2000-09-18 16:07:07 +00:00
InsertEntry( pEntry->GetColor(), pEntry->GetName() );
}
SetUpdateMode( TRUE );
}
// Fills the listbox (provisional) with strings
2000-09-18 16:07:07 +00:00
HatchingLB::HatchingLB( Window* pParent, ResId Id, BOOL bUserDraw /*= TRUE*/ )
: ListBox( pParent, Id ),
mpList ( NULL ),
mbUserDraw( bUserDraw )
{
EnableUserDraw( mbUserDraw );
}
HatchingLB::HatchingLB( Window* pParent, WinBits aWB, BOOL bUserDraw /*= TRUE*/ )
: ListBox( pParent, aWB ),
mpList ( NULL ),
mbUserDraw( bUserDraw )
{
EnableUserDraw( mbUserDraw );
}
void HatchingLB::Fill( const XHatchList* pList )
{
mpList = (XHatchList*)pList;
XHatchEntry* pEntry;
long nCount = pList->Count();
SetUpdateMode( FALSE );
if( mbUserDraw )
{
for( long i = 0; i < nCount; i++ )
InsertEntry( pList->GetHatch( i )->GetName() );
2000-09-18 16:07:07 +00:00
}
else
{
for( long i = 0; i < nCount; i++ )
{
pEntry = pList->GetHatch( i );
2000-09-18 16:07:07 +00:00
Bitmap* pBitmap = pList->GetBitmap( i );
if( pBitmap )
InsertEntry( pEntry->GetName(), *pBitmap );
else
InsertEntry( pEntry->GetName() );
}
}
SetUpdateMode( TRUE );
}
void HatchingLB::UserDraw( const UserDrawEvent& rUDEvt )
{
if( mpList != NULL )
{
// Draw gradient with borderrectangle
const Rectangle& rDrawRect = rUDEvt.GetRect();
Rectangle aRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nLeft+33, rDrawRect.nBottom-1 );
sal_Int32 nId = rUDEvt.GetItemId();
2000-09-18 16:07:07 +00:00
if( nId >= 0 && nId <= mpList->Count() )
{
OutputDevice* pDevice = rUDEvt.GetDevice();
ULONG nOldDrawMode = pDevice->GetDrawMode();
pDevice->SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
XHatch& rXHatch = mpList->GetHatch( rUDEvt.GetItemId() )->GetHatch();
2000-09-18 16:07:07 +00:00
MapMode aMode( MAP_100TH_MM );
Hatch aHatch( (HatchStyle) rXHatch.GetHatchStyle(),
rXHatch.GetColor(),
rUDEvt.GetDevice()->LogicToPixel( Point( rXHatch.GetDistance(), 0 ), aMode ).X(),
(sal_uInt16)rXHatch.GetAngle() );
2000-09-18 16:07:07 +00:00
const Polygon aPolygon( aRect );
const PolyPolygon aPolypoly( aPolygon );
pDevice->DrawHatch( aPolypoly, aHatch );
pDevice->SetLineColor( COL_BLACK );
pDevice->SetFillColor();
pDevice->DrawRect( aRect );
pDevice->SetDrawMode( nOldDrawMode );
2000-09-18 16:07:07 +00:00
// Draw name
pDevice->DrawText( Point( aRect.nRight+7, aRect.nTop-1 ), mpList->GetHatch( rUDEvt.GetItemId() )->GetName() );
2000-09-18 16:07:07 +00:00
}
}
}
/************************************************************************/
void HatchingLB::Append( XHatchEntry* pEntry, Bitmap* pBmp )
{
if( pBmp )
InsertEntry( pEntry->GetName(), *pBmp );
else
InsertEntry( pEntry->GetName() );
}
/************************************************************************/
void HatchingLB::Modify( XHatchEntry* pEntry, USHORT nPos, Bitmap* pBmp )
{
RemoveEntry( nPos );
if( pBmp )
InsertEntry( pEntry->GetName(), *pBmp, nPos );
else
InsertEntry( pEntry->GetName(), nPos );
}
/************************************************************************/
void HatchingLB::SelectEntryByList( const XHatchList* pList, const String& rStr,
const XHatch& rHatch, USHORT nDist )
{
long nCount = pList->Count();
XHatchEntry* pEntry;
BOOL bFound = FALSE;
String aStr;
long i;
for( i = 0; i < nCount && !bFound; i++ )
{
pEntry = pList->GetHatch( i );
2000-09-18 16:07:07 +00:00
aStr = pEntry->GetName();
if( rStr == aStr && rHatch == pEntry->GetHatch() )
bFound = TRUE;
}
if( bFound )
SelectEntryPos( (USHORT) ( i - 1 + nDist ) );
}
// Fills the listbox (provisional) with strings
2000-09-18 16:07:07 +00:00
void FillAttrLB::Fill( const XHatchList* pList )
{
long nCount = pList->Count();
XHatchEntry* pEntry;
ListBox::SetUpdateMode( FALSE );
for( long i = 0; i < nCount; i++ )
{
pEntry = pList->GetHatch( i );
2000-09-18 16:07:07 +00:00
Bitmap* pBitmap = pList->GetBitmap( i );
if( pBitmap )
ListBox::InsertEntry( pEntry->GetName(), *pBitmap );
else
InsertEntry( pEntry->GetName() );
}
ListBox::SetUpdateMode( TRUE );
}
// Fills the listbox (provisional) with strings
2000-09-18 16:07:07 +00:00
GradientLB::GradientLB( Window* pParent, ResId Id, BOOL bUserDraw /*= TRUE*/ )
: ListBox( pParent, Id ),
mpList(NULL),
mbUserDraw( bUserDraw )
{
EnableUserDraw( mbUserDraw);
}
GradientLB::GradientLB( Window* pParent, WinBits aWB, BOOL bUserDraw /*= TRUE*/ )
: ListBox( pParent, aWB ),
mpList(NULL),
mbUserDraw( bUserDraw )
{
EnableUserDraw( mbUserDraw );
}
void GradientLB::Fill( const XGradientList* pList )
{
mpList = (XGradientList*)pList;
XGradientEntry* pEntry;
long nCount = pList->Count();
SetUpdateMode( FALSE );
if( mbUserDraw )
{
for( long i = 0; i < nCount; i++ )
InsertEntry( pList->GetGradient( i )->GetName() );
2000-09-18 16:07:07 +00:00
}
else
{
for( long i = 0; i < nCount; i++ )
{
pEntry = pList->GetGradient( i );
2000-09-18 16:07:07 +00:00
Bitmap* pBitmap = pList->GetBitmap( i );
if( pBitmap )
InsertEntry( pEntry->GetName(), *pBitmap );
else
InsertEntry( pEntry->GetName() );
}
}
SetUpdateMode( TRUE );
}
void GradientLB::UserDraw( const UserDrawEvent& rUDEvt )
{
if( mpList != NULL )
{
// Draw gradient with borderrectangle
const Rectangle& rDrawRect = rUDEvt.GetRect();
Rectangle aRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nLeft+33, rDrawRect.nBottom-1 );
sal_Int32 nId = rUDEvt.GetItemId();
2000-09-18 16:07:07 +00:00
if( nId >= 0 && nId <= mpList->Count() )
{
OutputDevice* pDevice = rUDEvt.GetDevice();
XGradient& rXGrad = mpList->GetGradient( rUDEvt.GetItemId() )->GetGradient();
2000-09-18 16:07:07 +00:00
Gradient aGradient( (GradientStyle) rXGrad.GetGradientStyle(), rXGrad.GetStartColor(), rXGrad.GetEndColor() );
aGradient.SetAngle( (USHORT)rXGrad.GetAngle() );
aGradient.SetBorder( rXGrad.GetBorder() );
aGradient.SetOfsX( rXGrad.GetXOffset() );
aGradient.SetOfsY( rXGrad.GetYOffset() );
aGradient.SetStartIntensity( rXGrad.GetStartIntens() );
aGradient.SetEndIntensity( rXGrad.GetEndIntens() );
aGradient.SetSteps( 255 );
// #i76307# always paint the preview in LTR, because this is what the document does
Window* pWin = dynamic_cast<Window*>(pDevice);
if( pWin && pWin->IsRTLEnabled() && Application::GetSettings().GetLayoutRTL())
{
long nWidth = pDevice->GetOutputSize().Width();
pWin->EnableRTL( FALSE );
Rectangle aMirrorRect( Point( nWidth - aRect.Left() - aRect.GetWidth(), aRect.Top() ),
aRect.GetSize() );
pDevice->DrawGradient( aMirrorRect, aGradient );
pWin->EnableRTL( TRUE );
}
else
pDevice->DrawGradient( aRect, aGradient );
2000-09-18 16:07:07 +00:00
pDevice->SetLineColor( COL_BLACK );
pDevice->SetFillColor();
pDevice->DrawRect( aRect );
// Draw name
pDevice->DrawText( Point( aRect.nRight+7, aRect.nTop-1 ), mpList->GetGradient( rUDEvt.GetItemId() )->GetName() );
2000-09-18 16:07:07 +00:00
}
}
}
/************************************************************************/
void GradientLB::Append( XGradientEntry* pEntry, Bitmap* pBmp )
{
if( pBmp )
InsertEntry( pEntry->GetName(), *pBmp );
else
InsertEntry( pEntry->GetName() );
}
/************************************************************************/
void GradientLB::Modify( XGradientEntry* pEntry, USHORT nPos, Bitmap* pBmp )
{
RemoveEntry( nPos );
if( pBmp )
InsertEntry( pEntry->GetName(), *pBmp, nPos );
else
InsertEntry( pEntry->GetName(), nPos );
}
/************************************************************************/
void GradientLB::SelectEntryByList( const XGradientList* pList, const String& rStr,
const XGradient& rGradient, USHORT nDist )
{
long nCount = pList->Count();
XGradientEntry* pEntry;
BOOL bFound = FALSE;
String aStr;
long i;
for( i = 0; i < nCount && !bFound; i++ )
{
pEntry = pList->GetGradient( i );
2000-09-18 16:07:07 +00:00
aStr = pEntry->GetName();
if( rStr == aStr && rGradient == pEntry->GetGradient() )
bFound = TRUE;
}
if( bFound )
SelectEntryPos( (USHORT) ( i - 1 + nDist ) );
}
// Fills the listbox (provisional) with strings
2000-09-18 16:07:07 +00:00
void FillAttrLB::Fill( const XGradientList* pList )
{
long nCount = pList->Count();
XGradientEntry* pEntry;
ListBox::SetUpdateMode( FALSE );
for( long i = 0; i < nCount; i++ )
{
pEntry = pList->GetGradient( i );
2000-09-18 16:07:07 +00:00
Bitmap* pBitmap = pList->GetBitmap( i );
if( pBitmap )
ListBox::InsertEntry( pEntry->GetName(), *pBitmap );
else
InsertEntry( pEntry->GetName() );
}
ListBox::SetUpdateMode( TRUE );
}
// BitmapLB Constructor
2000-09-18 16:07:07 +00:00
BitmapLB::BitmapLB( Window* pParent, ResId Id, BOOL bUserDraw /*= TRUE*/ )
: ListBox( pParent, Id ),
mpList( NULL ),
mbUserDraw( bUserDraw )
{
aVD.SetOutputSizePixel( Size( 32, 16 ) );
EnableUserDraw( mbUserDraw );
}
/************************************************************************/
void BitmapLB::SetVirtualDevice()
{
if( aBitmap.GetSizePixel().Width() > 8 ||
aBitmap.GetSizePixel().Height() > 8 )
{
aVD.DrawBitmap( Point( 0, 0 ), Size( 32, 16 ), aBitmap );
}
else
{
aVD.DrawBitmap( Point( 0, 0 ), aBitmap );
aVD.DrawBitmap( Point( 8, 0 ), aBitmap );
aVD.DrawBitmap( Point( 16, 0 ), aBitmap );
aVD.DrawBitmap( Point( 24, 0 ), aBitmap );
aVD.DrawBitmap( Point( 0, 8 ), aBitmap );
aVD.DrawBitmap( Point( 8, 8 ), aBitmap );
aVD.DrawBitmap( Point( 16, 8 ), aBitmap );
aVD.DrawBitmap( Point( 24, 8 ), aBitmap );
}
}
/************************************************************************/
void BitmapLB::Fill( const XBitmapList* pList )
{
mpList = (XBitmapList*)pList;
XBitmapEntry* pEntry;
long nCount = pList->Count();
SetUpdateMode( FALSE );
if( mbUserDraw )
{
for( long i = 0; i < nCount; i++ )
InsertEntry( pList->GetBitmap( i )->GetName() );
2000-09-18 16:07:07 +00:00
}
else
{
for( long i = 0; i < nCount; i++ )
{
pEntry = pList->GetBitmap( i );
2000-09-18 16:07:07 +00:00
aBitmap = pEntry->GetXBitmap().GetBitmap();
SetVirtualDevice();
InsertEntry( pEntry->GetName(), aVD.GetBitmap( Point( 0, 2 ), Size( 32, 12 ) ) );
}
}
SetUpdateMode( TRUE );
}
void BitmapLB::UserDraw( const UserDrawEvent& rUDEvt )
{
if( mpList != NULL )
{
// Draw bitmap
const Rectangle& rDrawRect = rUDEvt.GetRect();
Rectangle aRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nLeft+33, rDrawRect.nBottom-1 );
sal_Int32 nId = rUDEvt.GetItemId();
2000-09-18 16:07:07 +00:00
if( nId >= 0 && nId <= mpList->Count() )
{
Rectangle aClipRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nRight-1, rDrawRect.nBottom-1 );
OutputDevice* pDevice = rUDEvt.GetDevice();
pDevice->SetClipRegion( Region( aClipRect ) );
aBitmap = mpList->GetBitmap( nId )->GetXBitmap().GetBitmap();
2000-09-18 16:07:07 +00:00
long nPosBaseX = aRect.nLeft;
long nPosBaseY = aRect.nTop;
if( aBitmap.GetSizePixel().Width() > 8 ||
aBitmap.GetSizePixel().Height() > 8 )
{
pDevice->DrawBitmap( Point( nPosBaseX, nPosBaseY ), Size( 32, 16 ), aBitmap );
}
else
{
pDevice->DrawBitmap( Point( nPosBaseX+ 0, nPosBaseY+0 ), aBitmap );
pDevice->DrawBitmap( Point( nPosBaseX+ 8, nPosBaseY+0 ), aBitmap );
pDevice->DrawBitmap( Point( nPosBaseX+16, nPosBaseY+0 ), aBitmap );
pDevice->DrawBitmap( Point( nPosBaseX+24, nPosBaseY+0 ), aBitmap );
pDevice->DrawBitmap( Point( nPosBaseX+ 0, nPosBaseY+8 ), aBitmap );
pDevice->DrawBitmap( Point( nPosBaseX+ 8, nPosBaseY+8 ), aBitmap );
pDevice->DrawBitmap( Point( nPosBaseX+16, nPosBaseY+8 ), aBitmap );
pDevice->DrawBitmap( Point( nPosBaseX+24, nPosBaseY+8 ), aBitmap );
}
pDevice->SetClipRegion();
// Draw name
pDevice->DrawText( Point( aRect.nRight+7, aRect.nTop-1 ), mpList->GetBitmap( nId )->GetName() );
2000-09-18 16:07:07 +00:00
}
}
}
/************************************************************************/
void BitmapLB::Append( XBitmapEntry* pEntry, Bitmap* pBmp )
{
if( pBmp )
{
aBitmap = pEntry->GetXBitmap().GetBitmap();
SetVirtualDevice();
InsertEntry( pEntry->GetName(), aVD.GetBitmap( Point( 0, 2 ), Size( 32, 12 ) ) );
}
else
InsertEntry( pEntry->GetName() );
}
/************************************************************************/
void BitmapLB::Modify( XBitmapEntry* pEntry, USHORT nPos, Bitmap* pBmp )
{
RemoveEntry( nPos );
if( pBmp )
{
aBitmap = pEntry->GetXBitmap().GetBitmap();
SetVirtualDevice();
InsertEntry( pEntry->GetName(), aVD.GetBitmap( Point( 0, 2 ), Size( 32, 12 ) ), nPos );
}
else
InsertEntry( pEntry->GetName() );
}
/************************************************************************/
void BitmapLB::SelectEntryByList( const XBitmapList* pList, const String& rStr,
const Bitmap& )
2000-09-18 16:07:07 +00:00
{
long nCount = pList->Count();
XBitmapEntry* pEntry;
BOOL bFound = FALSE;
long i;
for( i = 0; i < nCount && !bFound; i++ )
{
pEntry = pList->GetBitmap( i );
2000-09-18 16:07:07 +00:00
String aStr = pEntry->GetName();
if( rStr == aStr )
{
bFound = TRUE;
}
}
if( bFound )
SelectEntryPos( (USHORT) ( i - 1 ) );
}
// FillAttrLB Constructor
2000-09-18 16:07:07 +00:00
FillAttrLB::FillAttrLB( Window* pParent, ResId Id ) :
ColorListBox( pParent, Id )
{
aVD.SetOutputSizePixel( Size( 32, 16 ) );
}
/************************************************************************/
FillAttrLB::FillAttrLB( Window* pParent, WinBits aWB ) :
ColorListBox( pParent, aWB )
{
aVD.SetOutputSizePixel( Size( 32, 16 ) );
}
/************************************************************************/
void FillAttrLB::SetVirtualDevice()
{
if( aBitmap.GetSizePixel().Width() > 8 ||
aBitmap.GetSizePixel().Height() > 8 )
{
aVD.DrawBitmap( Point( 0, 0 ), Size( 32, 16 ), aBitmap );
}
else
{
aVD.DrawBitmap( Point( 0, 0 ), aBitmap );
aVD.DrawBitmap( Point( 8, 0 ), aBitmap );
aVD.DrawBitmap( Point( 16, 0 ), aBitmap );
aVD.DrawBitmap( Point( 24, 0 ), aBitmap );
aVD.DrawBitmap( Point( 0, 8 ), aBitmap );
aVD.DrawBitmap( Point( 8, 8 ), aBitmap );
aVD.DrawBitmap( Point( 16, 8 ), aBitmap );
aVD.DrawBitmap( Point( 24, 8 ), aBitmap );
}
}
/************************************************************************/
void FillAttrLB::Fill( const XBitmapList* pList )
{
long nCount = pList->Count();
XBitmapEntry* pEntry;
ListBox::SetUpdateMode( FALSE );
for( long i = 0; i < nCount; i++ )
{
pEntry = pList->GetBitmap( i );
2000-09-18 16:07:07 +00:00
aBitmap = pEntry->GetXBitmap().GetBitmap();
SetVirtualDevice();
ListBox::InsertEntry( pEntry->GetName(), aVD.GetBitmap( Point( 0, 2 ), Size( 32, 12 ) ) );
}
ListBox::SetUpdateMode( TRUE );
}
/************************************************************************/
void FillAttrLB::SelectEntryByList( const XBitmapList* pList, const String& rStr,
const Bitmap& /*rBmp*/)
2000-09-18 16:07:07 +00:00
{
long nCount = pList->Count();
XBitmapEntry* pEntry;
BOOL bFound = FALSE;
long i;
for( i = 0; i < nCount && !bFound; i++ )
{
pEntry = pList->GetBitmap( i );
2000-09-18 16:07:07 +00:00
String aStr = pEntry->GetName();
if( rStr == aStr )
{
bFound = TRUE;
}
}
if( bFound )
SelectEntryPos( (USHORT) ( i - 1 ) );
}
// Fills the listbox (provisional) with strings
2000-09-18 16:07:07 +00:00
void FillTypeLB::Fill()
{
SetUpdateMode( FALSE );
InsertEntry( String( SVX_RES( RID_SVXSTR_INVISIBLE ) ) );
InsertEntry( String( SVX_RES( RID_SVXSTR_COLOR ) ) );
InsertEntry( String( SVX_RES( RID_SVXSTR_GRADIENT ) ) );
InsertEntry( String( SVX_RES( RID_SVXSTR_HATCH ) ) );
InsertEntry( String( SVX_RES( RID_SVXSTR_BITMAP ) ) );
2000-09-18 16:07:07 +00:00
SetUpdateMode( TRUE );
}
// Fills the listbox (provisional) with strings
2000-09-18 16:07:07 +00:00
void LineLB::Fill( const XDashList* pList )
{
long nCount = pList->Count();
XDashEntry* pEntry;
SetUpdateMode( FALSE );
for( long i = 0; i < nCount; i++ )
{
pEntry = pList->GetDash( i );
Bitmap* pBitmap = const_cast<XDashList*>(pList)->CreateBitmapForUI( i );
2000-09-18 16:07:07 +00:00
if( pBitmap )
{
2000-09-18 16:07:07 +00:00
InsertEntry( pEntry->GetName(), *pBitmap );
delete pBitmap;
}
2000-09-18 16:07:07 +00:00
else
InsertEntry( pEntry->GetName() );
}
SetUpdateMode( TRUE );
}
2009-10-31 00:36:06 +01:00
void LineLB::FillStyles()
{
ResMgr& rMgr = DIALOG_MGR();
// Line Styles
2009-10-31 00:36:06 +01:00
Clear();
InsertEntry( String( ResId( RID_SVXSTR_INVISIBLE, rMgr ) ) );
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
Bitmap aBitmap ( SVX_RES ( RID_SVXCTRL_LINECTRL ) );
Color aSourceColors[2];
Color aDestColors[2];
aSourceColors[0] = Color( COL_WHITE );
aSourceColors[1] = Color( COL_BLACK );
aDestColors[0] = rStyles.GetFieldColor();
aDestColors[1] = rStyles.GetFieldTextColor();
aBitmap.Replace ( aSourceColors, aDestColors, 2 );
Image aSolidLine ( aBitmap );
InsertEntry( String( ResId( RID_SVXSTR_SOLID, rMgr ) ), aSolidLine );
}
2000-09-18 16:07:07 +00:00
/************************************************************************/
void LineLB::Append( XDashEntry* pEntry, Bitmap* pBmp )
{
if( pBmp )
InsertEntry( pEntry->GetName(), *pBmp );
else
InsertEntry( pEntry->GetName() );
}
/************************************************************************/
void LineLB::Modify( XDashEntry* pEntry, USHORT nPos, Bitmap* pBmp )
{
RemoveEntry( nPos );
if( pBmp )
InsertEntry( pEntry->GetName(), *pBmp, nPos );
else
InsertEntry( pEntry->GetName(), nPos );
}
/************************************************************************/
void LineLB::SelectEntryByList( const XDashList* pList, const String& rStr,
const XDash& rDash, USHORT nDist )
{
long nCount = pList->Count();
XDashEntry* pEntry;
BOOL bFound = FALSE;
String aStr;
XDash aDash;
long i;
for( i = 0; i < nCount && !bFound; i++ )
{
pEntry = pList->GetDash( i );
2000-09-18 16:07:07 +00:00
aStr = pEntry->GetName();
aDash = pEntry->GetDash();
if( rStr == aStr && rDash == aDash )
bFound = TRUE;
}
if( bFound )
SelectEntryPos( (USHORT) ( i - 1 + nDist ) );
}
// Fills the listbox (provisional) with strings
2000-09-18 16:07:07 +00:00
void LineEndLB::Fill( const XLineEndList* pList, BOOL bStart )
{
long nCount = pList->Count();
XLineEndEntry* pEntry;
VirtualDevice aVD;
SetUpdateMode( FALSE );
for( long i = 0; i < nCount; i++ )
{
pEntry = pList->GetLineEnd( i );
Bitmap* pBitmap = const_cast<XLineEndList*>(pList)->CreateBitmapForUI( i );
2000-09-18 16:07:07 +00:00
if( pBitmap )
{
Size aBmpSize( pBitmap->GetSizePixel() );
aVD.SetOutputSizePixel( aBmpSize, FALSE );
aVD.DrawBitmap( Point(), *pBitmap );
InsertEntry( pEntry->GetName(),
aVD.GetBitmap( bStart ? Point() : Point( aBmpSize.Width() / 2, 0 ),
Size( aBmpSize.Width() / 2, aBmpSize.Height() ) ) );
delete pBitmap;
2000-09-18 16:07:07 +00:00
}
else
InsertEntry( pEntry->GetName() );
}
SetUpdateMode( TRUE );
}
/************************************************************************/
void LineEndLB::Append( XLineEndEntry* pEntry, Bitmap* pBmp,
BOOL bStart )
{
if( pBmp )
{
VirtualDevice aVD;
Size aBmpSize( pBmp->GetSizePixel() );
aVD.SetOutputSizePixel( aBmpSize, FALSE );
aVD.DrawBitmap( Point(), *pBmp );
InsertEntry( pEntry->GetName(),
aVD.GetBitmap( bStart ? Point() : Point( aBmpSize.Width() / 2, 0 ),
Size( aBmpSize.Width() / 2, aBmpSize.Height() ) ) );
}
else
InsertEntry( pEntry->GetName() );
}
/************************************************************************/
void LineEndLB::Modify( XLineEndEntry* pEntry, USHORT nPos, Bitmap* pBmp,
BOOL bStart )
{
RemoveEntry( nPos );
if( pBmp )
{
VirtualDevice aVD;
Size aBmpSize( pBmp->GetSizePixel() );
aVD.SetOutputSizePixel( aBmpSize, FALSE );
aVD.DrawBitmap( Point(), *pBmp );
InsertEntry( pEntry->GetName(),
aVD.GetBitmap( bStart ? Point() : Point( aBmpSize.Width() / 2, 0 ),
Size( aBmpSize.Width() / 2, aBmpSize.Height() ) ), nPos );
}
else
InsertEntry( pEntry->GetName(), nPos );
}
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
//////////////////////////////////////////////////////////////////////////////
void SvxPreviewBase::InitSettings(bool bForeground, bool bBackground)
{
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
if(bForeground)
{
svtools::ColorConfig aColorConfig;
Color aTextColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor);
if(IsControlForeground())
{
aTextColor = GetControlForeground();
}
getBufferDevice().SetTextColor(aTextColor);
}
if(bBackground)
{
if(IsControlBackground())
{
getBufferDevice().SetBackground(GetControlBackground());
}
else
{
getBufferDevice().SetBackground(rStyleSettings.GetWindowColor());
}
}
// do not paint background self, it gets painted buffered
SetControlBackground();
SetBackground();
Invalidate();
}
SvxPreviewBase::SvxPreviewBase( Window* pParent, const ResId& rResId )
: Control( pParent, rResId ),
mpModel( new SdrModel() ),
mpBufferDevice( new VirtualDevice(*this) )
{
// Draw the control's border as a flat thin black line.
SetBorderStyle(WINDOW_BORDER_MONO);
SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
SetMapMode(MAP_100TH_MM);
// init model
mpModel->GetItemPool().FreezeIdRanges();
}
SvxPreviewBase::~SvxPreviewBase()
{
delete mpModel;
delete mpBufferDevice;
}
void SvxPreviewBase::LocalPrePaint()
{
// init BufferDevice
if(mpBufferDevice->GetOutputSizePixel() != GetOutputSizePixel())
{
mpBufferDevice->SetDrawMode(GetDrawMode());
mpBufferDevice->SetSettings(GetSettings());
mpBufferDevice->SetAntialiasing(GetAntialiasing());
mpBufferDevice->SetOutputSizePixel(GetOutputSizePixel());
mpBufferDevice->SetMapMode(GetMapMode());
}
mpBufferDevice->Erase();
}
void SvxPreviewBase::LocalPostPaint()
{
// copy to front (in pixel mode)
const bool bWasEnabledSrc(mpBufferDevice->IsMapModeEnabled());
const bool bWasEnabledDst(IsMapModeEnabled());
const Point aEmptyPoint;
mpBufferDevice->EnableMapMode(false);
EnableMapMode(false);
DrawOutDev(
aEmptyPoint, GetOutputSizePixel(),
aEmptyPoint, GetOutputSizePixel(),
*mpBufferDevice);
mpBufferDevice->EnableMapMode(bWasEnabledSrc);
EnableMapMode(bWasEnabledDst);
}
void SvxPreviewBase::StateChanged(StateChangedType nType)
{
Control::StateChanged(nType);
if(STATE_CHANGE_CONTROLFOREGROUND == nType)
{
InitSettings(true, false);
}
else if(STATE_CHANGE_CONTROLBACKGROUND == nType)
{
InitSettings(false, true);
}
}
void SvxPreviewBase::DataChanged(const DataChangedEvent& rDCEvt)
{
SetDrawMode(GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR);
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
if((DATACHANGED_SETTINGS == rDCEvt.GetType()) && (rDCEvt.GetFlags() & SETTINGS_STYLE))
{
InitSettings(true, true);
}
else
{
Control::DataChanged(rDCEvt);
}
}
SvxXLinePreview::SvxXLinePreview( Window* pParent, const ResId& rResId )
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
: SvxPreviewBase( pParent, rResId ),
mpLineObjA( 0L ),
mpLineObjB( 0L ),
mpLineObjC( 0L ),
mpGraphic( 0L ),
mbWithSymbol( sal_False )
2000-09-18 16:07:07 +00:00
{
const Size aOutputSize(GetOutputSize());
2000-09-18 16:07:07 +00:00
InitSettings( TRUE, TRUE );
const sal_Int32 nDistance(500L);
const sal_Int32 nAvailableLength(aOutputSize.Width() - (4 * nDistance));
// create DrawObectA
const sal_Int32 aYPosA(aOutputSize.Height() / 2);
const basegfx::B2DPoint aPointA1( nDistance, aYPosA);
const basegfx::B2DPoint aPointA2( aPointA1.getX() + ((nAvailableLength * 14) / 20), aYPosA );
basegfx::B2DPolygon aPolygonA;
aPolygonA.append(aPointA1);
aPolygonA.append(aPointA2);
mpLineObjA = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPolygonA));
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
mpLineObjA->SetModel(&getModel());
// create DrawObectB
const sal_Int32 aYPosB1((aOutputSize.Height() * 3) / 4);
const sal_Int32 aYPosB2((aOutputSize.Height() * 1) / 4);
const basegfx::B2DPoint aPointB1( aPointA2.getX() + nDistance, aYPosB1);
const basegfx::B2DPoint aPointB2( aPointB1.getX() + ((nAvailableLength * 2) / 20), aYPosB2 );
const basegfx::B2DPoint aPointB3( aPointB2.getX() + ((nAvailableLength * 2) / 20), aYPosB1 );
basegfx::B2DPolygon aPolygonB;
aPolygonB.append(aPointB1);
aPolygonB.append(aPointB2);
aPolygonB.append(aPointB3);
mpLineObjB = new SdrPathObj(OBJ_PLIN, basegfx::B2DPolyPolygon(aPolygonB));
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
mpLineObjB->SetModel(&getModel());
// create DrawObectC
const basegfx::B2DPoint aPointC1( aPointB3.getX() + nDistance, aYPosB1);
const basegfx::B2DPoint aPointC2( aPointC1.getX() + ((nAvailableLength * 1) / 20), aYPosB2 );
const basegfx::B2DPoint aPointC3( aPointC2.getX() + ((nAvailableLength * 1) / 20), aYPosB1 );
basegfx::B2DPolygon aPolygonC;
aPolygonC.append(aPointC1);
aPolygonC.append(aPointC2);
aPolygonC.append(aPointC3);
mpLineObjC = new SdrPathObj(OBJ_PLIN, basegfx::B2DPolyPolygon(aPolygonC));
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
mpLineObjC->SetModel(&getModel());
2000-09-18 16:07:07 +00:00
}
SvxXLinePreview::~SvxXLinePreview()
{
SdrObject::Free( mpLineObjA );
SdrObject::Free( mpLineObjB );
SdrObject::Free( mpLineObjC );
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
void SvxXLinePreview::SetSymbol(Graphic* p,const Size& s)
{
mpGraphic = p;
maSymbolSize = s;
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
void SvxXLinePreview::ResizeSymbol(const Size& s)
{
if ( s != maSymbolSize )
2000-09-18 16:07:07 +00:00
{
maSymbolSize = s;
2000-09-18 16:07:07 +00:00
Invalidate();
}
}
// -----------------------------------------------------------------------
void SvxXLinePreview::SetLineAttributes(const SfxItemSet& rItemSet)
{
// Set ItemSet at objects
mpLineObjA->SetMergedItemSet(rItemSet);
// At line joints, do not use arrows
SfxItemSet aTempSet(rItemSet);
aTempSet.ClearItem(XATTR_LINESTART);
aTempSet.ClearItem(XATTR_LINEEND);
mpLineObjB->SetMergedItemSet(aTempSet);
mpLineObjC->SetMergedItemSet(aTempSet);
}
// -----------------------------------------------------------------------
void SvxXLinePreview::Paint( const Rectangle& )
2000-09-18 16:07:07 +00:00
{
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
LocalPrePaint();
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
// paint objects to buffer device
sdr::contact::SdrObjectVector aObjectVector;
aObjectVector.push_back(mpLineObjA);
aObjectVector.push_back(mpLineObjB);
aObjectVector.push_back(mpLineObjC);
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), aObjectVector, 0);
sdr::contact::DisplayInfo aDisplayInfo;
// do processing
aPainter.ProcessDisplay(aDisplayInfo);
if ( mbWithSymbol && mpGraphic )
2000-09-18 16:07:07 +00:00
{
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
const Size aOutputSize(GetOutputSize());
Point aPos = Point( aOutputSize.Width() / 3, aOutputSize.Height() / 2 );
aPos.X() -= maSymbolSize.Width() / 2;
aPos.Y() -= maSymbolSize.Height() / 2;
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
mpGraphic->Draw( &getBufferDevice(), aPos, maSymbolSize );
2000-09-18 16:07:07 +00:00
}
2002-06-06 14:04:47 +00:00
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
LocalPostPaint();
2000-09-18 16:07:07 +00:00
}
SvxXRectPreview::SvxXRectPreview( Window* pParent, const ResId& rResId )
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
: SvxPreviewBase( pParent, rResId ),
mpRectangleObject(0)
{
InitSettings(true, true);
2000-09-18 16:07:07 +00:00
// create RectangleObject
const Rectangle aObjectSize(Point(), GetOutputSize());
mpRectangleObject = new SdrRectObj(aObjectSize);
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
mpRectangleObject->SetModel(&getModel());
}
SvxXRectPreview::~SvxXRectPreview()
2000-09-18 16:07:07 +00:00
{
SdrObject::Free(mpRectangleObject);
2000-09-18 16:07:07 +00:00
}
void SvxXRectPreview::SetAttributes(const SfxItemSet& rItemSet)
{
mpRectangleObject->SetMergedItemSet(rItemSet, true);
mpRectangleObject->SetMergedItem(XLineStyleItem(XLINE_NONE));
}
void SvxXRectPreview::Paint( const Rectangle& )
{
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
LocalPrePaint();
sdr::contact::SdrObjectVector aObjectVector;
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
aObjectVector.push_back(mpRectangleObject);
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), aObjectVector, 0);
sdr::contact::DisplayInfo aDisplayInfo;
aPainter.ProcessDisplay(aDisplayInfo);
2000-09-18 16:07:07 +00:00
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
LocalPostPaint();
2000-09-18 16:07:07 +00:00
}
SvxXShadowPreview::SvxXShadowPreview( Window* pParent, const ResId& rResId )
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
: SvxPreviewBase( pParent, rResId ),
mpRectangleObject(0),
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
mpRectangleShadow(0)
2000-09-18 16:07:07 +00:00
{
InitSettings(true, true);
// prepare size
Size aSize = GetOutputSize();
aSize.Width() = aSize.Width() / 3;
aSize.Height() = aSize.Height() / 3;
// create RectangleObject
const Rectangle aObjectSize( Point( aSize.Width(), aSize.Height() ), aSize );
mpRectangleObject = new SdrRectObj(aObjectSize);
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
mpRectangleObject->SetModel(&getModel());
// create ShadowObject
const Rectangle aShadowSize( Point( aSize.Width(), aSize.Height() ), aSize );
mpRectangleShadow = new SdrRectObj(aShadowSize);
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
mpRectangleShadow->SetModel(&getModel());
2000-09-18 16:07:07 +00:00
}
SvxXShadowPreview::~SvxXShadowPreview()
{
SdrObject::Free(mpRectangleObject);
SdrObject::Free(mpRectangleShadow);
}
2000-09-18 16:07:07 +00:00
void SvxXShadowPreview::SetRectangleAttributes(const SfxItemSet& rItemSet)
2000-09-18 16:07:07 +00:00
{
mpRectangleObject->SetMergedItemSet(rItemSet, true);
mpRectangleObject->SetMergedItem(XLineStyleItem(XLINE_NONE));
2000-09-18 16:07:07 +00:00
}
void SvxXShadowPreview::SetShadowAttributes(const SfxItemSet& rItemSet)
{
mpRectangleShadow->SetMergedItemSet(rItemSet, true);
mpRectangleShadow->SetMergedItem(XLineStyleItem(XLINE_NONE));
}
2000-09-18 16:07:07 +00:00
void SvxXShadowPreview::SetShadowPosition(const Point& rPos)
2000-09-18 16:07:07 +00:00
{
Rectangle aObjectPosition(mpRectangleObject->GetSnapRect());
aObjectPosition.Move(rPos.X(), rPos.Y());
mpRectangleShadow->SetSnapRect(aObjectPosition);
2000-09-18 16:07:07 +00:00
}
void SvxXShadowPreview::Paint( const Rectangle& )
{
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
LocalPrePaint();
sdr::contact::SdrObjectVector aObjectVector;
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
aObjectVector.push_back(mpRectangleShadow);
aObjectVector.push_back(mpRectangleObject);
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), aObjectVector, 0);
sdr::contact::DisplayInfo aDisplayInfo;
aPainter.ProcessDisplay(aDisplayInfo);
2000-09-18 16:07:07 +00:00
CWS-TOOLING: integrate CWS aw058 2008-11-19 14:27:57 +0100 aw r263994 : #i95264# corrected line primitive range calculation for hairlines 2008-11-18 11:31:52 +0100 wg r263754 : i96156 2008-11-18 11:22:38 +0100 wg r263752 : i96156 2008-11-13 11:46:49 +0100 aw r263626 : #i93169# used flag the wrong way; true means that nothing was done yet 2008-11-12 15:33:41 +0100 wg r263601 : i96156 2008-11-12 13:22:38 +0100 wg r263592 : i95527 2008-11-12 13:18:51 +0100 wg r263591 : i95527 2008-10-29 13:22:02 +0100 aw r262794 : #i93485# identified reason and with PL's help changed problem accordingly with usage of an old fallback. This will need to be optimized again by HDU when he finds the time. 2008-10-28 18:23:04 +0100 aw r262763 : unxmacxi compiler warning fixed 2008-10-28 18:17:01 +0100 aw r262762 : unxmacxi compiler warning fixed 2008-10-28 17:55:18 +0100 aw r262761 : unxmacxi compiler warning fixed 2008-10-28 13:48:22 +0100 aw r262743 : #i93485# added UnifiedAlphaPrimitive2D to VclRenderer; corrected getB2DRange implementations for hairlines which are view-dependent 2008-10-28 12:40:55 +0100 aw r262735 : #i93485# had to move Pre/PostPaint to LocalPre/PostPaint since PrePaint is a virtual window method 2008-10-27 15:54:10 +0100 aw r262679 : #i19871# adapted the call order to parent implementations in some Nbc methods in SdrPathObj due to errors in SnapRect recalculation when GluePoints are involved 2008-10-24 18:31:48 +0200 aw r262661 : #i77187# disable all buttons in bezier toolbar when move and/or resize protected object is involved 2008-10-24 18:30:16 +0200 aw r262660 : #i77187# simplified and secured model changers, added toolbar update, disabled move drag start when polygon point is selected 2008-10-24 12:57:50 +0200 hdu r262635 : #i93485# use device transformation for SAL layer 2008-10-24 12:41:37 +0200 hdu r262634 : #i93485# use device transformation for SAL layer 2008-10-23 19:46:12 +0200 aw r262630 : mac compiler warning fixed 2008-10-23 18:15:02 +0200 aw r262628 : #i93485# modified dialog previews to use prerendering 2008-10-23 18:14:27 +0200 aw r262627 : #i93485# added assert when render helper uses Window as copy source 2008-10-22 18:07:30 +0200 aw r262610 : #i95264# fixes assertion 2008-10-22 14:31:51 +0200 aw r262606 : #i89661# also enabling DrawTransparent shortcut for VCL-Renderer 2008-10-22 14:10:31 +0200 aw r262604 : #i89661# new HitTest 2D primitive to support BoundRect and HitTest calculations/tests 2008-10-22 14:09:22 +0200 aw r262603 : #i89661# new HitTest tolerance, new TextFrame selection overlay, support for HitTest geometry 2008-10-22 14:08:16 +0200 aw r262602 : #i89661# correcting old HitTest tolerance expansion 2008-10-20 15:31:48 +0200 aw r262321 : #i89661# added patch to test it 2008-10-20 11:50:31 +0200 aw r262310 : #i87762# removed no longer used icons (aw053) 2008-10-17 15:41:48 +0200 aw r262288 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-17 15:40:54 +0200 aw r262287 : #i93169#, #i93180# FormControl corrections for Primitive handling 2008-10-16 11:12:44 +0200 aw r262253 : #i93595# removed superfluous grid interface 2008-10-16 11:11:20 +0200 aw r262252 : #i93595# changed grid display to sub-grid usage and new defaults 2008-10-15 15:09:40 +0200 aw r262234 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-15 15:09:09 +0200 aw r262233 : #i93597# moved flag for only vertical PageBorder 2008-10-15 15:08:46 +0200 aw r262232 : #i93597# moved flag for only vertical PageBorder, added reacting on it to primitive creation 2008-10-14 16:27:07 +0200 aw r262207 : #i93648# (flushViewObjectContacts) and #i93318# (propertyChange) 2008-10-14 16:25:10 +0200 aw r262206 : #i93318# back to old state since detecting a change is not placed well at the primitive (which is a graphical information at the itme it was fetched). Instead i will add the needed check and flush at the FormControl's VOC 2008-10-14 13:47:38 +0200 aw r262201 : #i93318# added a change listener to the XControlModel and code to make the operator== at control primitive fail
2008-11-19 14:05:59 +00:00
LocalPostPaint();
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
// eof
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */