2010-10-12 08:57:08 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2004-05-07 10:13:25 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 02:46:56 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2004-05-07 10:13:25 -05:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2004-05-07 10:13:25 -05:00
|
|
|
*
|
2008-04-11 02:46:56 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2004-05-07 10:13:25 -05:00
|
|
|
*
|
2008-04-11 02:46:56 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2004-05-07 10:13:25 -05:00
|
|
|
*
|
2008-04-11 02:46:56 -05: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.
|
2004-05-07 10:13:25 -05:00
|
|
|
*
|
2008-04-11 02:46:56 -05: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).
|
2004-05-07 10:13:25 -05:00
|
|
|
*
|
2008-04-11 02:46:56 -05: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.
|
2004-05-07 10:13:25 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 18:00:47 -05:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_forms.hxx"
|
|
|
|
|
2004-05-07 10:13:25 -05:00
|
|
|
#ifndef FORMS_SOURCE_RICHTEXT_RICHTEXTMODEL_CXX
|
|
|
|
#include "richtextmodel.hxx"
|
|
|
|
#endif
|
|
|
|
#include "richtextengine.hxx"
|
|
|
|
#include "richtextunowrapper.hxx"
|
|
|
|
|
|
|
|
/** === begin UNO includes === **/
|
2004-10-22 05:42:08 -05:00
|
|
|
#include <com/sun/star/awt/LineEndFormat.hpp>
|
2008-12-16 07:30:53 -06:00
|
|
|
#include <com/sun/star/text/WritingMode2.hpp>
|
2009-10-23 05:10:07 -05:00
|
|
|
#include <com/sun/star/style/VerticalAlignment.hpp>
|
2004-05-07 10:13:25 -05:00
|
|
|
/** === end UNO includes === **/
|
2009-10-23 05:10:07 -05:00
|
|
|
|
2004-05-07 10:13:25 -05:00
|
|
|
#include <cppuhelper/typeprovider.hxx>
|
2006-10-24 09:11:29 -05:00
|
|
|
#include <comphelper/guarding.hxx>
|
2004-05-07 10:13:25 -05:00
|
|
|
#include <toolkit/awt/vclxdevice.hxx>
|
|
|
|
#include <toolkit/helper/vclunohelper.hxx>
|
2010-01-08 11:32:51 -06:00
|
|
|
#include <editeng/editstat.hxx>
|
2004-05-07 10:13:25 -05:00
|
|
|
#include <vcl/outdev.hxx>
|
2005-12-21 06:23:48 -06:00
|
|
|
#include <vcl/svapp.hxx>
|
2004-05-07 10:13:25 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------
|
|
|
|
extern "C" void SAL_CALL createRegistryInfo_ORichTextModel()
|
|
|
|
{
|
|
|
|
static ::frm::OMultiInstanceAutoRegistration< ::frm::ORichTextModel > aRegisterModel;
|
|
|
|
}
|
|
|
|
|
|
|
|
//........................................................................
|
|
|
|
namespace frm
|
|
|
|
{
|
|
|
|
//........................................................................
|
|
|
|
|
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::awt;
|
|
|
|
using namespace ::com::sun::star::lang;
|
|
|
|
using namespace ::com::sun::star::io;
|
|
|
|
using namespace ::com::sun::star::beans;
|
|
|
|
using namespace ::com::sun::star::form;
|
|
|
|
using namespace ::com::sun::star::util;
|
2009-10-23 05:10:07 -05:00
|
|
|
using namespace ::com::sun::star::style;
|
2004-05-07 10:13:25 -05:00
|
|
|
|
2008-12-16 07:30:53 -06:00
|
|
|
namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
|
|
|
|
|
2004-05-07 10:13:25 -05:00
|
|
|
//====================================================================
|
|
|
|
//= ORichTextModel
|
|
|
|
//====================================================================
|
|
|
|
DBG_NAME( ORichTextModel )
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
ORichTextModel::ORichTextModel( const Reference< XMultiServiceFactory >& _rxFactory )
|
|
|
|
:OControlModel ( _rxFactory, ::rtl::OUString() )
|
|
|
|
,FontControlModel ( true )
|
|
|
|
,m_pEngine ( RichTextEngine::Create() )
|
|
|
|
,m_bSettingEngineText( false )
|
2006-06-19 07:00:59 -05:00
|
|
|
,m_aModifyListeners ( m_aMutex )
|
2004-05-07 10:13:25 -05:00
|
|
|
{
|
|
|
|
DBG_CTOR( ORichTextModel, NULL );
|
|
|
|
m_nClassId = FormComponentType::TEXTFIELD;
|
|
|
|
|
2004-07-05 10:20:11 -05:00
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_DEFAULTCONTROL ) >>= m_sDefaultControl;
|
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_BORDER ) >>= m_nBorder;
|
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_ENABLED ) >>= m_bEnabled;
|
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 09:21:50 -05:00
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_ENABLEVISIBLE ) >>= m_bEnableVisible;
|
2004-07-05 10:20:11 -05:00
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_HARDLINEBREAKS ) >>= m_bHardLineBreaks;
|
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_HSCROLL ) >>= m_bHScroll;
|
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_VSCROLL ) >>= m_bVScroll;
|
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_READONLY ) >>= m_bReadonly;
|
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_PRINTABLE ) >>= m_bPrintable;
|
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_ALIGN ) >>= m_aAlign;
|
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_ECHO_CHAR ) >>= m_nEchoChar;
|
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_MAXTEXTLEN ) >>= m_nMaxTextLength;
|
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_MULTILINE ) >>= m_bMultiLine;
|
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_RICH_TEXT ) >>= m_bReallyActAsRichText;
|
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_HIDEINACTIVESELECTION ) >>= m_bHideInactiveSelection;
|
2005-01-21 09:51:55 -06:00
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_LINEEND_FORMAT ) >>= m_nLineEndFormat;
|
2008-12-16 07:30:53 -06:00
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_WRITING_MODE ) >>= m_nTextWritingMode;
|
|
|
|
getPropertyDefaultByHandle( PROPERTY_ID_CONTEXT_WRITING_MODE ) >>= m_nContextWritingMode;
|
2004-05-07 10:13:25 -05:00
|
|
|
|
|
|
|
implInit();
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
ORichTextModel::ORichTextModel( const ORichTextModel* _pOriginal, const Reference< XMultiServiceFactory >& _rxFactory )
|
|
|
|
:OControlModel ( _pOriginal, _rxFactory, sal_False )
|
|
|
|
,FontControlModel ( _pOriginal )
|
|
|
|
,m_pEngine ( NULL )
|
|
|
|
,m_bSettingEngineText( false )
|
2006-06-19 07:00:59 -05:00
|
|
|
,m_aModifyListeners ( m_aMutex )
|
2004-05-07 10:13:25 -05:00
|
|
|
{
|
|
|
|
DBG_CTOR( ORichTextModel, NULL );
|
|
|
|
|
2004-07-05 10:20:11 -05:00
|
|
|
m_aTabStop = _pOriginal->m_aTabStop;
|
|
|
|
m_aBackgroundColor = _pOriginal->m_aBackgroundColor;
|
|
|
|
m_aBorderColor = _pOriginal->m_aBorderColor;
|
2009-10-23 05:10:07 -05:00
|
|
|
m_aVerticalAlignment = _pOriginal->m_aVerticalAlignment;
|
2004-07-05 10:20:11 -05:00
|
|
|
m_sDefaultControl = _pOriginal->m_sDefaultControl;
|
|
|
|
m_sHelpText = _pOriginal->m_sHelpText;
|
|
|
|
m_sHelpURL = _pOriginal->m_sHelpURL;
|
|
|
|
m_nBorder = _pOriginal->m_nBorder;
|
|
|
|
m_bEnabled = _pOriginal->m_bEnabled;
|
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 09:21:50 -05:00
|
|
|
m_bEnableVisible = _pOriginal->m_bEnableVisible;
|
2004-07-05 10:20:11 -05:00
|
|
|
m_bHardLineBreaks = _pOriginal->m_bHardLineBreaks;
|
|
|
|
m_bHScroll = _pOriginal->m_bHScroll;
|
|
|
|
m_bVScroll = _pOriginal->m_bVScroll;
|
|
|
|
m_bReadonly = _pOriginal->m_bReadonly;
|
|
|
|
m_bPrintable = _pOriginal->m_bPrintable;
|
|
|
|
m_bReallyActAsRichText = _pOriginal->m_bReallyActAsRichText;
|
|
|
|
m_bHideInactiveSelection = _pOriginal->m_bHideInactiveSelection;
|
2005-01-21 09:51:55 -06:00
|
|
|
m_nLineEndFormat = _pOriginal->m_nLineEndFormat;
|
2008-12-16 07:30:53 -06:00
|
|
|
m_nTextWritingMode = _pOriginal->m_nTextWritingMode;
|
|
|
|
m_nContextWritingMode = _pOriginal->m_nContextWritingMode;
|
2004-05-07 10:13:25 -05:00
|
|
|
|
|
|
|
m_aAlign = _pOriginal->m_aAlign;
|
|
|
|
m_nEchoChar = _pOriginal->m_nEchoChar;
|
|
|
|
m_nMaxTextLength = _pOriginal->m_nMaxTextLength;
|
|
|
|
m_bMultiLine = _pOriginal->m_bMultiLine;
|
|
|
|
|
2007-07-06 03:56:54 -05:00
|
|
|
m_pEngine.reset(_pOriginal->m_pEngine->Clone());
|
2004-05-07 10:13:25 -05:00
|
|
|
m_sLastKnownEngineText = m_pEngine->GetText();
|
|
|
|
|
|
|
|
implInit();
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
void ORichTextModel::implInit()
|
|
|
|
{
|
2007-07-06 03:56:54 -05:00
|
|
|
OSL_ENSURE( m_pEngine.get(), "ORichTextModel::implInit: where's the engine?" );
|
|
|
|
if ( m_pEngine.get() )
|
2004-05-07 10:13:25 -05:00
|
|
|
{
|
|
|
|
m_pEngine->SetModifyHdl( LINK( this, ORichTextModel, OnEngineContentModified ) );
|
|
|
|
|
|
|
|
ULONG nEngineControlWord = m_pEngine->GetControlWord();
|
|
|
|
nEngineControlWord = nEngineControlWord & ~EE_CNTRL_AUTOPAGESIZE;
|
|
|
|
m_pEngine->SetControlWord( nEngineControlWord );
|
|
|
|
|
|
|
|
VCLXDevice* pUnoRefDevice = new VCLXDevice;
|
|
|
|
pUnoRefDevice->SetOutputDevice( m_pEngine->GetRefDevice() );
|
|
|
|
m_xReferenceDevice = pUnoRefDevice;
|
|
|
|
}
|
|
|
|
|
|
|
|
implDoAggregation();
|
|
|
|
implRegisterProperties();
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
void ORichTextModel::implDoAggregation()
|
|
|
|
{
|
|
|
|
increment( m_refCount );
|
|
|
|
|
|
|
|
{
|
|
|
|
m_xAggregate = new ORichTextUnoWrapper( *m_pEngine, this );
|
|
|
|
setAggregation( m_xAggregate );
|
|
|
|
doSetDelegator();
|
|
|
|
}
|
|
|
|
|
|
|
|
decrement( m_refCount );
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
void ORichTextModel::implRegisterProperties()
|
|
|
|
{
|
2004-07-05 10:20:11 -05:00
|
|
|
REGISTER_PROP_2( DEFAULTCONTROL, m_sDefaultControl, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( HELPTEXT, m_sHelpText, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( HELPURL, m_sHelpURL, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( ENABLED, m_bEnabled, BOUND, MAYBEDEFAULT );
|
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 09:21:50 -05:00
|
|
|
REGISTER_PROP_2( ENABLEVISIBLE, m_bEnableVisible, BOUND, MAYBEDEFAULT );
|
2004-07-05 10:20:11 -05:00
|
|
|
REGISTER_PROP_2( BORDER, m_nBorder, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( HARDLINEBREAKS, m_bHardLineBreaks, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( HSCROLL, m_bHScroll, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( VSCROLL, m_bVScroll, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( READONLY, m_bReadonly, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( PRINTABLE, m_bPrintable, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( REFERENCE_DEVICE, m_xReferenceDevice, BOUND, TRANSIENT );
|
|
|
|
REGISTER_PROP_2( RICH_TEXT, m_bReallyActAsRichText, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( HIDEINACTIVESELECTION, m_bHideInactiveSelection, BOUND, MAYBEDEFAULT );
|
|
|
|
|
2009-10-23 05:10:07 -05:00
|
|
|
REGISTER_VOID_PROP_2( TABSTOP, m_aTabStop, sal_Bool, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_VOID_PROP_2( BACKGROUNDCOLOR, m_aBackgroundColor, sal_Int32, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_VOID_PROP_2( BORDERCOLOR, m_aBorderColor, sal_Int32, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_VOID_PROP_2( VERTICAL_ALIGN, m_aVerticalAlignment, VerticalAlignment, BOUND, MAYBEDEFAULT );
|
2004-05-07 10:13:25 -05:00
|
|
|
|
|
|
|
// properties which exist only for compatibility with the css.swt.UnoControlEditModel,
|
2008-12-16 07:30:53 -06:00
|
|
|
// since we replace the default implementation for this service
|
|
|
|
REGISTER_PROP_2( ECHO_CHAR, m_nEchoChar, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( MAXTEXTLEN, m_nMaxTextLength, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( MULTILINE, m_bMultiLine, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( TEXT, m_sLastKnownEngineText, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( LINEEND_FORMAT, m_nLineEndFormat, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_2( WRITING_MODE, m_nTextWritingMode, BOUND, MAYBEDEFAULT );
|
|
|
|
REGISTER_PROP_3( CONTEXT_WRITING_MODE, m_nContextWritingMode, BOUND, MAYBEDEFAULT, TRANSIENT );
|
2004-05-07 10:13:25 -05:00
|
|
|
|
|
|
|
REGISTER_VOID_PROP_2( ALIGN, m_aAlign, sal_Int16, BOUND, MAYBEDEFAULT );
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
ORichTextModel::~ORichTextModel( )
|
|
|
|
{
|
|
|
|
if ( !OComponentHelper::rBHelper.bDisposed )
|
|
|
|
{
|
|
|
|
acquire();
|
|
|
|
dispose();
|
|
|
|
}
|
2007-07-06 03:56:54 -05:00
|
|
|
if ( m_pEngine.get() )
|
|
|
|
{
|
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 08:16:02 -06:00
|
|
|
SfxItemPool* pPool = m_pEngine->getPool();
|
2007-07-06 03:56:54 -05:00
|
|
|
m_pEngine.reset();
|
CWS-TOOLING: integrate CWS aw063
2009-02-12 13:10:24 +0100 aw r267649 : #i99123# when a primitive is invisible, it is not sufficient to produce no output when decomposing, but to add invisible data using HitTestPrimitive2D. This is needed for the slideshow which relies on geometry data in MetaFiles when painting invisible objects
2009-02-12 13:08:39 +0100 aw r267648 : #i99123# do not ignore HitTestPrimitive2D, but draw empty rectangles instead. This is needed since Slideshow is based on getting MetaFile content when painting invisible objects
2009-02-11 16:04:28 +0100 aw r267620 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:04:10 +0100 aw r267619 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:56 +0100 aw r267618 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:39 +0100 aw r267617 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:03:21 +0100 aw r267615 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:48 +0100 aw r267614 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:24 +0100 aw r267613 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:02:01 +0100 aw r267612 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:32 +0100 aw r267611 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:01:05 +0100 aw r267610 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 16:00:15 +0100 aw r267608 : #i98788# made SfxItemPool destructor protected, added static ::Free method
2009-02-11 11:27:33 +0100 aw r267585 : #i98788# added missing include for STL
2009-02-10 17:46:50 +0100 aw r267570 : #i98788# added reaction on pool destruction
2009-02-10 17:11:58 +0100 aw r267562 : #i98788# added messaging mechanism to register for pool destruction
2009-02-10 13:35:35 +0100 aw r267549 : #i98788# removing changes, too complicated and risky for 3.1
2009-02-10 12:13:48 +0100 aw r267546 : #i98788# 4th round
2009-02-10 12:13:37 +0100 aw r267545 : #i98788# 4th round
2009-02-10 12:13:26 +0100 aw r267544 : #i98788# 4th round
2009-02-10 12:13:14 +0100 aw r267543 : #i98788# 4th round
2009-02-10 12:13:03 +0100 aw r267542 : #i98788# 4th round
2009-02-10 12:12:50 +0100 aw r267541 : #i98788# 4th round
2009-02-10 12:12:37 +0100 aw r267540 : #i98788# 4th round
2009-02-08 14:38:22 +0100 aw r267495 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:38:06 +0100 aw r267494 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:48 +0100 aw r267493 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:37:17 +0100 aw r267492 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:56 +0100 aw r267491 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:44 +0100 aw r267490 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:29 +0100 aw r267489 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:16 +0100 aw r267488 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:36:02 +0100 aw r267487 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-08 14:35:46 +0100 aw r267486 : #i98788# 3rd round of changes to SfxItemPool handling
2009-02-05 12:20:39 +0100 aw r267415 : #i98788# 2nd batch of adaptions for SfxItemPoolHolder addition
2009-02-04 15:12:54 +0100 aw r267385 : #i98788# added newline at EOF
2009-02-04 13:26:04 +0100 aw r267379 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:40 +0100 aw r267378 : #i98788# make SfxItemPool holdable
2009-02-04 13:25:08 +0100 aw r267377 : #i98788# make SfxItemPool holdable
2009-02-04 13:24:42 +0100 aw r267376 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:14 +0100 aw r267375 : #i98788# make SfxItemPool holdable
2009-02-04 13:23:02 +0100 aw r267374 : #i98788# make SfxItemPool holdable
2009-01-29 17:08:31 +0100 aw r267159 : #i97628# completed the fix
2009-01-29 17:08:15 +0100 aw r267158 : #i97628# completed the fix
2009-01-29 14:09:07 +0100 aw r267132 : #i97628# Corrected usage of ParagraphData in headers
2009-01-29 14:06:58 +0100 iha r267131 : #i98344# incorrect font size in charts
2009-01-29 12:13:46 +0100 aw r267115 : #i97628# back to old state; triggers too many errors in other modules
2009-01-29 12:03:51 +0100 aw r267114 : #i97628# enabled exceptions due to STL vector include
2009-01-29 11:21:37 +0100 aw r267107 : #i97628# added needed include
2009-01-28 17:58:29 +0100 aw r267077 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:58:12 +0100 aw r267076 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:51 +0100 aw r267074 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-28 17:57:21 +0100 aw r267073 : #i97628# first version of newly implemented OutlinerParaObject and adaptions
2009-01-27 17:07:33 +0100 aw r267011 : #i98402# added support for ViewRange when exporting MetaFiles in ObjectContactOfPageView::DoProcessDisplay to avoid to paint too much
2009-01-27 11:45:48 +0100 aw r266973 : #i98404# Added a warning to a place where a conversion to rectangle should not be copied from
2009-01-26 21:44:36 +0100 iha r266949 : #i98497# 3D charts are rendered with wrong size
2009-01-26 20:47:07 +0100 aw r266947 : #i98404# handle BackgroundColorPrimitive2D directly in PixelRenderers and avoid AA under all circumstances
2009-01-26 14:50:36 +0100 aw r266926 : #i98386# secured cloning of SdrObject in IMapUserData by boost::shared_prt usage
2009-01-26 12:51:30 +0100 aw r266916 : #i96581# added separated FontStretching and fallback for small X!=Y scale differences
2009-01-23 16:14:55 +0100 aw r266834 : #i96475# added missing implementation of TextDecoratedPortionPrimitive2D::getB2DRange
2009-01-23 15:24:34 +0100 aw r266826 : #i98405# fixed fallback to DrawAlphaRect to use the correctly sized rectangle
2009-01-23 13:34:43 +0100 aw r266813 : #i96474# fixed impSplitSingleWords for an unexpected case
2009-01-23 10:47:31 +0100 aw r266786 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:20 +0100 aw r266785 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:47:09 +0100 aw r266783 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:58 +0100 aw r266782 : #i98289#,#i96474# tooling and new flags for tasks
2009-01-23 10:46:48 +0100 aw r266781 : #i98289#,#i96474# tooling and new flags for tasks
2009-03-04 08:16:02 -06:00
|
|
|
SfxItemPool::Free(pPool);
|
2007-07-06 03:56:54 -05:00
|
|
|
}
|
|
|
|
|
2004-05-07 10:13:25 -05:00
|
|
|
|
|
|
|
DBG_DTOR( ORichTextModel, NULL );
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
Any SAL_CALL ORichTextModel::queryAggregation( const Type& _rType ) throw ( RuntimeException )
|
|
|
|
{
|
|
|
|
Any aReturn = ORichTextModel_BASE::queryInterface( _rType );
|
|
|
|
|
|
|
|
if ( !aReturn.hasValue() )
|
|
|
|
aReturn = OControlModel::queryAggregation( _rType );
|
|
|
|
|
|
|
|
return aReturn;
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
IMPLEMENT_FORWARD_XTYPEPROVIDER2( ORichTextModel, OControlModel, ORichTextModel_BASE )
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2008-12-16 07:30:53 -06:00
|
|
|
IMPLEMENT_SERVICE_REGISTRATION_8( ORichTextModel, OControlModel,
|
2004-05-07 10:13:25 -05:00
|
|
|
FRM_SUN_COMPONENT_RICHTEXTCONTROL,
|
|
|
|
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextRange" ) ),
|
|
|
|
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.style.CharacterProperties" ) ),
|
|
|
|
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.style.ParagraphProperties" ) ),
|
|
|
|
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.style.CharacterPropertiesAsian" ) ),
|
|
|
|
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.style.CharacterPropertiesComplex" ) ),
|
2008-12-16 07:30:53 -06:00
|
|
|
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.style.ParagraphPropertiesAsian" ) ),
|
|
|
|
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.style.ParagraphPropertiesComplex" ) )
|
2004-05-07 10:13:25 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
IMPLEMENT_DEFAULT_CLONING( ORichTextModel )
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
void SAL_CALL ORichTextModel::disposing()
|
|
|
|
{
|
2006-06-19 07:00:59 -05:00
|
|
|
m_aModifyListeners.disposeAndClear( EventObject( *this ) );
|
2004-05-07 10:13:25 -05:00
|
|
|
OControlModel::disposing();
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace
|
|
|
|
{
|
|
|
|
void lcl_removeProperty( Sequence< Property >& _rSeq, const ::rtl::OUString& _rPropertyName )
|
|
|
|
{
|
|
|
|
Property* pLoop = _rSeq.getArray();
|
|
|
|
Property* pEnd = _rSeq.getArray() + _rSeq.getLength();
|
|
|
|
while ( pLoop != pEnd )
|
|
|
|
{
|
|
|
|
if ( pLoop->Name == _rPropertyName )
|
|
|
|
{
|
|
|
|
::std::copy( pLoop + 1, pEnd, pLoop );
|
|
|
|
_rSeq.realloc( _rSeq.getLength() - 1 );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
++pLoop;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//------------------------------------------------------------------------------
|
2007-03-09 06:36:05 -06:00
|
|
|
void ORichTextModel::describeFixedProperties( Sequence< Property >& _rProps ) const
|
2004-05-07 10:13:25 -05:00
|
|
|
{
|
|
|
|
BEGIN_DESCRIBE_PROPERTIES( 1, OControlModel )
|
|
|
|
DECL_PROP2( TABINDEX, sal_Int16, BOUND, MAYBEDEFAULT );
|
|
|
|
END_DESCRIBE_PROPERTIES();
|
|
|
|
|
|
|
|
// properties which the OPropertyContainerHelper is responsible for
|
|
|
|
Sequence< Property > aContainedProperties;
|
|
|
|
describeProperties( aContainedProperties );
|
|
|
|
|
|
|
|
// properties which the FontControlModel is responsible for
|
|
|
|
Sequence< Property > aFontProperties;
|
|
|
|
describeFontRelatedProperties( aFontProperties );
|
|
|
|
|
2007-03-09 06:36:05 -06:00
|
|
|
_rProps = concatSequences( aContainedProperties, aFontProperties, _rProps );
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
void ORichTextModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const
|
|
|
|
{
|
|
|
|
OControlModel::describeAggregateProperties( _rAggregateProps );
|
|
|
|
|
2004-05-07 10:13:25 -05:00
|
|
|
// our aggregate (the SvxUnoText) declares a FontDescriptor property, as does
|
|
|
|
// our FormControlFont base class. We remove it from the base class' sequence
|
|
|
|
// here, and later on care for both instances being in sync
|
|
|
|
lcl_removeProperty( _rAggregateProps, PROPERTY_FONT );
|
2008-12-16 07:30:53 -06:00
|
|
|
|
|
|
|
// similar, the WritingMode property is declared in our aggregate, too, but we override
|
|
|
|
// it, since the aggregate does no proper PropertyState handling.
|
|
|
|
lcl_removeProperty( _rAggregateProps, PROPERTY_WRITING_MODE );
|
2004-05-07 10:13:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
void SAL_CALL ORichTextModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
|
|
|
|
{
|
|
|
|
if ( isRegisteredProperty( _nHandle ) )
|
|
|
|
{
|
|
|
|
OPropertyContainerHelper::getFastPropertyValue( _rValue, _nHandle );
|
|
|
|
}
|
|
|
|
else if ( isFontRelatedProperty( _nHandle ) )
|
|
|
|
{
|
|
|
|
FontControlModel::getFastPropertyValue( _rValue, _nHandle );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
OControlModel::getFastPropertyValue( _rValue, _nHandle );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
sal_Bool SAL_CALL ORichTextModel::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw( IllegalArgumentException )
|
|
|
|
{
|
|
|
|
sal_Bool bModified = sal_False;
|
|
|
|
|
|
|
|
if ( isRegisteredProperty( _nHandle ) )
|
|
|
|
{
|
|
|
|
bModified = OPropertyContainerHelper::convertFastPropertyValue( _rConvertedValue, _rOldValue, _nHandle, _rValue );
|
|
|
|
}
|
|
|
|
else if ( isFontRelatedProperty( _nHandle ) )
|
|
|
|
{
|
|
|
|
bModified = FontControlModel::convertFastPropertyValue( _rConvertedValue, _rOldValue, _nHandle, _rValue );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
bModified = OControlModel::convertFastPropertyValue( _rConvertedValue, _rOldValue, _nHandle, _rValue );
|
|
|
|
}
|
|
|
|
|
|
|
|
return bModified;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
void SAL_CALL ORichTextModel::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw ( Exception)
|
|
|
|
{
|
|
|
|
if ( isRegisteredProperty( _nHandle ) )
|
|
|
|
{
|
|
|
|
OPropertyContainerHelper::setFastPropertyValue( _nHandle, _rValue );
|
|
|
|
|
2008-12-16 07:30:53 -06:00
|
|
|
switch ( _nHandle )
|
2004-05-07 10:13:25 -05:00
|
|
|
{
|
2008-12-16 07:30:53 -06:00
|
|
|
case PROPERTY_ID_REFERENCE_DEVICE:
|
|
|
|
{
|
|
|
|
#if OSL_DEBUG_LEVEL > 0
|
2004-05-07 10:13:25 -05:00
|
|
|
MapMode aOldMapMode = m_pEngine->GetRefDevice()->GetMapMode();
|
2008-12-16 07:30:53 -06:00
|
|
|
#endif
|
2004-05-07 10:13:25 -05:00
|
|
|
|
|
|
|
OutputDevice* pRefDevice = VCLUnoHelper::GetOutputDevice( m_xReferenceDevice );
|
|
|
|
OSL_ENSURE( pRefDevice, "ORichTextModel::setFastPropertyValue_NoBroadcast: empty reference device?" );
|
|
|
|
m_pEngine->SetRefDevice( pRefDevice );
|
|
|
|
|
2008-12-16 07:30:53 -06:00
|
|
|
#if OSL_DEBUG_LEVEL > 0
|
2004-05-07 10:13:25 -05:00
|
|
|
MapMode aNewMapMode = m_pEngine->GetRefDevice()->GetMapMode();
|
|
|
|
OSL_ENSURE( aNewMapMode.GetMapUnit() == aOldMapMode.GetMapUnit(),
|
|
|
|
"ORichTextModel::setFastPropertyValue_NoBroadcast: You should not tamper with the MapUnit of the ref device!" );
|
|
|
|
// if this assertion here is triggered, then we would need to adjust all
|
|
|
|
// items in all text portions in all paragraphs in the attributes of the EditEngine,
|
|
|
|
// as long as they are MapUnit-dependent. This holds at least for the FontSize.
|
2008-12-16 07:30:53 -06:00
|
|
|
#endif
|
2004-05-07 10:13:25 -05:00
|
|
|
}
|
2008-12-16 07:30:53 -06:00
|
|
|
break;
|
|
|
|
|
|
|
|
case PROPERTY_ID_TEXT:
|
2004-05-07 10:13:25 -05:00
|
|
|
{
|
2006-10-24 09:11:29 -05:00
|
|
|
MutexRelease aReleaseMutex( m_aMutex );
|
2005-12-21 06:23:48 -06:00
|
|
|
impl_smlock_setEngineText( m_sLastKnownEngineText );
|
2004-05-07 10:13:25 -05:00
|
|
|
}
|
2008-12-16 07:30:53 -06:00
|
|
|
break;
|
|
|
|
} // switch ( _nHandle )
|
2004-05-07 10:13:25 -05:00
|
|
|
}
|
|
|
|
else if ( isFontRelatedProperty( _nHandle ) )
|
|
|
|
{
|
|
|
|
FontDescriptor aOldFont( getFont() );
|
|
|
|
|
|
|
|
FontControlModel::setFastPropertyValue_NoBroadcast( _nHandle, _rValue );
|
|
|
|
|
|
|
|
if ( isFontAggregateProperty( _nHandle ) )
|
|
|
|
firePropertyChange( PROPERTY_ID_FONT, makeAny( getFont() ), makeAny( aOldFont ) );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-12-16 07:30:53 -06:00
|
|
|
switch ( _nHandle )
|
|
|
|
{
|
|
|
|
case PROPERTY_ID_WRITING_MODE:
|
|
|
|
{
|
|
|
|
// forward to our aggregate, so the EditEngine knows about it
|
|
|
|
if ( m_xAggregateSet.is() )
|
|
|
|
m_xAggregateSet->setPropertyValue(
|
|
|
|
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WritingMode" ) ), _rValue );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
OControlModel::setFastPropertyValue_NoBroadcast( _nHandle, _rValue );
|
|
|
|
break;
|
|
|
|
}
|
2004-05-07 10:13:25 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
Any ORichTextModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
|
|
|
|
{
|
|
|
|
Any aDefault;
|
|
|
|
|
|
|
|
switch ( _nHandle )
|
|
|
|
{
|
2008-12-16 07:30:53 -06:00
|
|
|
case PROPERTY_ID_WRITING_MODE:
|
|
|
|
case PROPERTY_ID_CONTEXT_WRITING_MODE:
|
|
|
|
aDefault <<= WritingMode2::CONTEXT;
|
|
|
|
break;
|
|
|
|
|
2004-10-22 05:42:08 -05:00
|
|
|
case PROPERTY_ID_LINEEND_FORMAT:
|
|
|
|
aDefault <<= (sal_Int16)LineEndFormat::LINE_FEED;
|
|
|
|
break;
|
|
|
|
|
2004-05-07 10:13:25 -05:00
|
|
|
case PROPERTY_ID_ECHO_CHAR:
|
|
|
|
case PROPERTY_ID_ALIGN:
|
|
|
|
case PROPERTY_ID_MAXTEXTLEN:
|
|
|
|
aDefault <<= (sal_Int16)0;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PROPERTY_ID_TABSTOP:
|
|
|
|
case PROPERTY_ID_BACKGROUNDCOLOR:
|
2004-07-05 10:20:11 -05:00
|
|
|
case PROPERTY_ID_BORDERCOLOR:
|
2009-10-23 05:10:07 -05:00
|
|
|
case PROPERTY_ID_VERTICAL_ALIGN:
|
2004-05-07 10:13:25 -05:00
|
|
|
/* void */
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PROPERTY_ID_ENABLED:
|
CWS-TOOLING: integrate CWS dba32c
2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion
2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time
2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths
2009-06-29 10:08:54 +0200 fs r273455 : #i103138#
refactored the code for positioning/zooming the control
Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to
take an additional ViewTransformation parameter, describing the transformation to obtain the actual
control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter.
This has become necessary since during painting, the device which we created our control for might not necessarily
have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size,
this would lead to wrong results.
Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation
to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier
time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken.
Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ...
I consider it broken, since:
- we need the map mode to obtain the proper zoom level, which is to be forwarded to the control
- there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works
fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears).
It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand
one has no possibility to obtain the current zoom by other means.
Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls
have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used,
which means the controls have a zoom of "1:1" set, which is wrong here.
2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties
2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning
2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed
2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc
2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux
2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux
2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar
2009-06-15 14:11:27 +0200 fs r272983 : added since tag
2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted
2009-06-15 11:08:53 +0200 fs r272969 : #i10000#
2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701#
2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src
2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50)
2009-06-02 09:53:10 +0200 fs r272483 : #i10000#
2009-05-29 15:55:03 +0200 fs r272465 : #i100818#
2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any
2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition
2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex
2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed
2009-05-27 14:53:36 +0200 fs r272347 : #i10000#
2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast
2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly
2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used
2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function
2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well
2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution
2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set
2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition
2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria
2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR
2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein
2009-05-25 15:49:57 +0200 fs r272254 : #i999704#
2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property
2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString
2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein
2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property
2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property)
2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default
2009-05-25 14:39:31 +0200 fs r272243 : removed dead import
2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns
2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent
2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel
2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event
2009-05-22 21:42:47 +0200 fs r272211 : #i102003#
2009-05-22 21:42:20 +0200 fs r272210 : grammar
2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously
2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear
2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG
2009-05-22 12:03:42 +0200 fs r272180 : #i88878#
provided by noel.power@novell.com
implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs
2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them
2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values
2009-05-15 15:08:31 +0200 fs r271937 : includes
2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint
2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity
2009-05-15 10:15:44 +0200 fs r271928 : #i10000#
2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique
2009-05-14 20:23:23 +0200 fs r271919 : #i101622#
2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids
2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b)
2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48
2009-05-07 14:43:19 +0200 fs r271670 : #i101477#
2009-05-07 14:37:30 +0200 fs r271668 : #i101477#
2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch
2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics
2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47)
2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control
2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 09:21:50 -05:00
|
|
|
case PROPERTY_ID_ENABLEVISIBLE:
|
2004-05-07 10:13:25 -05:00
|
|
|
case PROPERTY_ID_PRINTABLE:
|
2004-07-05 10:20:11 -05:00
|
|
|
case PROPERTY_ID_HIDEINACTIVESELECTION:
|
2004-05-07 10:13:25 -05:00
|
|
|
aDefault <<= (sal_Bool)sal_True;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PROPERTY_ID_HARDLINEBREAKS:
|
|
|
|
case PROPERTY_ID_HSCROLL:
|
|
|
|
case PROPERTY_ID_VSCROLL:
|
|
|
|
case PROPERTY_ID_READONLY:
|
|
|
|
case PROPERTY_ID_MULTILINE:
|
|
|
|
case PROPERTY_ID_RICH_TEXT:
|
|
|
|
aDefault <<= (sal_Bool)sal_False;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PROPERTY_ID_DEFAULTCONTROL:
|
|
|
|
aDefault <<= (::rtl::OUString)FRM_SUN_CONTROL_RICHTEXTCONTROL;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PROPERTY_ID_HELPTEXT:
|
|
|
|
case PROPERTY_ID_HELPURL:
|
|
|
|
case PROPERTY_ID_TEXT:
|
|
|
|
aDefault <<= ::rtl::OUString();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PROPERTY_ID_BORDER:
|
|
|
|
aDefault <<= (sal_Int16)1;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
if ( isFontRelatedProperty( _nHandle ) )
|
|
|
|
aDefault = FontControlModel::getPropertyDefaultByHandle( _nHandle );
|
|
|
|
else
|
|
|
|
aDefault = OControlModel::getPropertyDefaultByHandle( _nHandle );
|
|
|
|
}
|
|
|
|
|
|
|
|
return aDefault;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2005-12-21 06:23:48 -06:00
|
|
|
void ORichTextModel::impl_smlock_setEngineText( const ::rtl::OUString& _rText )
|
2004-05-07 10:13:25 -05:00
|
|
|
{
|
2007-07-06 03:56:54 -05:00
|
|
|
if ( m_pEngine.get() )
|
2004-05-07 10:13:25 -05:00
|
|
|
{
|
2005-12-21 06:23:48 -06:00
|
|
|
::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
|
2004-05-07 10:13:25 -05:00
|
|
|
m_bSettingEngineText = true;
|
|
|
|
m_pEngine->SetText( _rText );
|
|
|
|
m_bSettingEngineText = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
::rtl::OUString SAL_CALL ORichTextModel::getServiceName() throw ( RuntimeException)
|
|
|
|
{
|
|
|
|
return FRM_SUN_COMPONENT_RICHTEXTCONTROL;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
void SAL_CALL ORichTextModel::write(const Reference< XObjectOutputStream >& _rxOutStream) throw ( IOException, RuntimeException)
|
|
|
|
{
|
|
|
|
OControlModel::write( _rxOutStream );
|
|
|
|
// TODO: place your code here
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
void SAL_CALL ORichTextModel::read(const Reference< XObjectInputStream >& _rxInStream) throw ( IOException, RuntimeException)
|
|
|
|
{
|
|
|
|
OControlModel::read( _rxInStream );
|
|
|
|
// TODO: place your code here
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
RichTextEngine* ORichTextModel::getEditEngine( const Reference< XControlModel >& _rxModel )
|
|
|
|
{
|
|
|
|
RichTextEngine* pEngine = NULL;
|
|
|
|
|
|
|
|
Reference< XUnoTunnel > xTunnel( _rxModel, UNO_QUERY );
|
|
|
|
OSL_ENSURE( xTunnel.is(), "ORichTextModel::getEditEngine: invalid model!" );
|
|
|
|
if ( xTunnel.is() )
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
pEngine = reinterpret_cast< RichTextEngine* >( xTunnel->getSomething( getEditEngineTunnelId() ) );
|
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
OSL_ENSURE( sal_False, "ORichTextModel::getEditEngine: caught an exception!" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return pEngine;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
Sequence< sal_Int8 > ORichTextModel::getEditEngineTunnelId()
|
|
|
|
{
|
|
|
|
static ::cppu::OImplementationId * pId = 0;
|
|
|
|
if (! pId)
|
|
|
|
{
|
|
|
|
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
|
|
|
|
if (! pId)
|
|
|
|
{
|
|
|
|
static ::cppu::OImplementationId aId;
|
|
|
|
pId = &aId;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return pId->getImplementationId();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2006-06-19 07:00:59 -05:00
|
|
|
IMPL_LINK( ORichTextModel, OnEngineContentModified, void*, /*_pNotInterestedIn*/ )
|
2004-05-07 10:13:25 -05:00
|
|
|
{
|
|
|
|
if ( !m_bSettingEngineText )
|
|
|
|
{
|
2006-06-19 07:00:59 -05:00
|
|
|
m_aModifyListeners.notifyEach( &XModifyListener::modified, EventObject( *this ) );
|
2004-05-07 10:13:25 -05:00
|
|
|
|
|
|
|
potentialTextChange();
|
|
|
|
// is this a good idea? It may become expensive in case of larger texts,
|
|
|
|
// and this method here is called for every single changed character ...
|
|
|
|
// On the other hand, the API *requires* us to notify changes in the "Text"
|
|
|
|
// property immediately ...
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0L;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
sal_Int64 SAL_CALL ORichTextModel::getSomething( const Sequence< sal_Int8 >& _rId ) throw (RuntimeException)
|
|
|
|
{
|
|
|
|
Sequence< sal_Int8 > aEditEngineAccessId( getEditEngineTunnelId() );
|
|
|
|
if ( ( _rId.getLength() == aEditEngineAccessId.getLength() )
|
|
|
|
&& ( 0 == rtl_compareMemory( aEditEngineAccessId.getConstArray(), _rId.getConstArray(), _rId.getLength() ) )
|
|
|
|
)
|
2007-07-06 03:56:54 -05:00
|
|
|
return reinterpret_cast< sal_Int64 >( m_pEngine.get() );
|
2004-05-07 10:13:25 -05:00
|
|
|
|
|
|
|
Reference< XUnoTunnel > xAggTunnel;
|
|
|
|
if ( query_aggregation( m_xAggregate, xAggTunnel ) )
|
|
|
|
return xAggTunnel->getSomething( _rId );
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
void SAL_CALL ORichTextModel::addModifyListener( const Reference< XModifyListener >& _rxListener ) throw (RuntimeException)
|
|
|
|
{
|
2006-06-19 07:00:59 -05:00
|
|
|
m_aModifyListeners.addInterface( _rxListener );
|
2004-05-07 10:13:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
void SAL_CALL ORichTextModel::removeModifyListener( const Reference< XModifyListener >& _rxListener ) throw (RuntimeException)
|
|
|
|
{
|
2006-06-19 07:00:59 -05:00
|
|
|
m_aModifyListeners.removeInterface( _rxListener );
|
2004-05-07 10:13:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
void ORichTextModel::potentialTextChange( )
|
|
|
|
{
|
|
|
|
::rtl::OUString sCurrentEngineText;
|
2007-07-06 03:56:54 -05:00
|
|
|
if ( m_pEngine.get() )
|
2004-05-07 10:13:25 -05:00
|
|
|
sCurrentEngineText = m_pEngine->GetText();
|
|
|
|
|
|
|
|
if ( sCurrentEngineText != m_sLastKnownEngineText )
|
|
|
|
{
|
|
|
|
sal_Int32 nHandle = PROPERTY_ID_TEXT;
|
|
|
|
Any aOldValue; aOldValue <<= m_sLastKnownEngineText;
|
|
|
|
Any aNewValue; aNewValue <<= sCurrentEngineText;
|
|
|
|
fire( &nHandle, &aNewValue, &aOldValue, 1, sal_False );
|
|
|
|
|
|
|
|
m_sLastKnownEngineText = sCurrentEngineText;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//........................................................................
|
|
|
|
} // namespace frm
|
|
|
|
//........................................................................
|
2010-10-12 08:57:08 -05:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|