1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: rtattributehandler.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_forms.hxx"
33 #include "rtattributehandler.hxx"
35 #ifndef _SVX_SVXIDS_HRC
36 #include <svx/svxids.hrc>
38 #include <svx/eeitem.hxx>
39 #include <svtools/itemset.hxx>
40 #include <svtools/itempool.hxx>
41 #include <vcl/mapunit.hxx>
42 #include <vcl/mapmod.hxx>
43 #include <vcl/outdev.hxx>
45 #define ITEMID_ADJUST EE_PARA_JUST
46 #include <svx/adjitem.hxx>
47 #define ITEMID_WEIGHT EE_CHAR_WEIGHT
48 #include <svx/wghtitem.hxx>
49 #define ITEMID_ESCAPEMENT EE_CHAR_ESCAPEMENT
50 #include <svx/escpitem.hxx>
51 #define ITEMID_LINESPACING EE_PARA_SBL
52 #include <svx/lspcitem.hxx>
53 #define ITEMID_FONTHEIGHT EE_CHAR_FONTHEIGHT
54 #include <svx/fhgtitem.hxx>
55 #define ITEMID_FRAMEDIR EE_PARA_WRITINGDIR
56 #include <svx/frmdiritem.hxx>
57 #include <svx/scripttypeitem.hxx>
59 //........................................................................
62 //........................................................................
63 //====================================================================
65 //====================================================================
66 //--------------------------------------------------------------------
67 oslInterlockedCount SAL_CALL
ReferenceBase::acquire()
69 return osl_incrementInterlockedCount( &m_refCount
);
72 //--------------------------------------------------------------------
73 oslInterlockedCount SAL_CALL
ReferenceBase::release()
75 return osl_decrementInterlockedCount( &m_refCount
);
78 //--------------------------------------------------------------------
79 ReferenceBase::~ReferenceBase()
83 //====================================================================
85 //====================================================================
86 //--------------------------------------------------------------------
87 AttributeHandler::AttributeHandler( AttributeId _nAttributeId
, WhichId _nWhichId
)
88 :m_nAttribute( _nAttributeId
)
89 ,m_nWhich ( _nWhichId
)
93 //--------------------------------------------------------------------
94 AttributeHandler::~AttributeHandler()
98 //--------------------------------------------------------------------
99 oslInterlockedCount SAL_CALL
AttributeHandler::acquire()
101 return ReferenceBase::acquire();
104 //--------------------------------------------------------------------
105 oslInterlockedCount SAL_CALL
AttributeHandler::release()
107 return ReferenceBase::release();
110 //--------------------------------------------------------------------
111 AttributeId
AttributeHandler::getAttributeId( ) const
113 return getAttribute();
116 //--------------------------------------------------------------------
117 AttributeCheckState
AttributeHandler::implGetCheckState( const SfxPoolItem
& /*_rItem*/ ) const
119 OSL_ENSURE( sal_False
, "AttributeHandler::implGetCheckState: not to be called!" );
120 return eIndetermined
;
123 //--------------------------------------------------------------------
124 void AttributeHandler::putItemForScript( SfxItemSet
& _rAttribs
, const SfxPoolItem
& _rItem
, ScriptType _nForScriptType
) const
126 SvxScriptSetItem
aSetItem( (WhichId
)getAttributeId(), *_rAttribs
.GetPool() );
127 aSetItem
.PutItemForScriptType( _nForScriptType
, _rItem
);
128 _rAttribs
.Put( aSetItem
.GetItemSet(), FALSE
);
131 //--------------------------------------------------------------------
132 AttributeCheckState
AttributeHandler::getCheckState( const SfxItemSet
& _rAttribs
) const
134 AttributeCheckState
eSimpleState( eIndetermined
);
135 const SfxPoolItem
* pItem
= _rAttribs
.GetItem( getWhich() );
137 eSimpleState
= implGetCheckState( *pItem
);
141 //--------------------------------------------------------------------
142 AttributeState
AttributeHandler::getState( const SfxItemSet
& _rAttribs
) const
144 AttributeState
aState( eIndetermined
);
145 aState
.eSimpleState
= getCheckState( _rAttribs
);
149 //====================================================================
150 //= AttributeHandlerFactory
151 //====================================================================
152 //--------------------------------------------------------------------
155 static WhichId
lcl_implGetWhich( const SfxItemPool
& _rPool
, AttributeId _nAttributeId
)
158 switch ( _nAttributeId
)
160 case SID_ATTR_CHAR_LATIN_FONTHEIGHT
:nWhich
= EE_CHAR_FONTHEIGHT
;break;
161 case SID_ATTR_CHAR_LATIN_FONT
: nWhich
= EE_CHAR_FONTINFO
; break;
162 case SID_ATTR_CHAR_LATIN_LANGUAGE
: nWhich
= EE_CHAR_LANGUAGE
; break;
163 case SID_ATTR_CHAR_LATIN_POSTURE
: nWhich
= EE_CHAR_ITALIC
; break;
164 case SID_ATTR_CHAR_LATIN_WEIGHT
: nWhich
= EE_CHAR_WEIGHT
; break;
167 nWhich
= _rPool
.GetWhich( (SfxSlotId
)_nAttributeId
);
172 //--------------------------------------------------------------------
173 ::rtl::Reference
< IAttributeHandler
> AttributeHandlerFactory::getHandlerFor( AttributeId _nAttributeId
, const SfxItemPool
& _rEditEnginePool
)
175 ::rtl::Reference
< IAttributeHandler
> pReturn
;
176 switch ( _nAttributeId
)
178 case SID_ATTR_PARA_ADJUST_LEFT
:
179 case SID_ATTR_PARA_ADJUST_CENTER
:
180 case SID_ATTR_PARA_ADJUST_RIGHT
:
181 case SID_ATTR_PARA_ADJUST_BLOCK
:
182 pReturn
= new ParaAlignmentHandler( _nAttributeId
);
185 case SID_ATTR_PARA_LINESPACE_10
:
186 case SID_ATTR_PARA_LINESPACE_15
:
187 case SID_ATTR_PARA_LINESPACE_20
:
188 pReturn
= new LineSpacingHandler( _nAttributeId
);
191 case SID_SET_SUPER_SCRIPT
:
192 case SID_SET_SUB_SCRIPT
:
193 pReturn
= new EscapementHandler( _nAttributeId
);
196 case SID_ATTR_CHAR_FONTHEIGHT
:
197 case SID_ATTR_CHAR_CTL_FONTHEIGHT
:
198 case SID_ATTR_CHAR_CJK_FONTHEIGHT
:
199 case SID_ATTR_CHAR_LATIN_FONTHEIGHT
:
200 pReturn
= new FontSizeHandler( _nAttributeId
, lcl_implGetWhich( _rEditEnginePool
, _nAttributeId
) );
203 case SID_ATTR_PARA_LEFT_TO_RIGHT
:
204 case SID_ATTR_PARA_RIGHT_TO_LEFT
:
205 pReturn
= new ParagraphDirectionHandler( _nAttributeId
);
208 case SID_ATTR_PARA_HANGPUNCTUATION
:
209 case SID_ATTR_PARA_FORBIDDEN_RULES
:
210 case SID_ATTR_PARA_SCRIPTSPACE
:
211 pReturn
= new BooleanHandler( _nAttributeId
, lcl_implGetWhich( _rEditEnginePool
, _nAttributeId
) );
215 pReturn
= new SlotHandler( (SfxSlotId
)_nAttributeId
, lcl_implGetWhich( _rEditEnginePool
, _nAttributeId
) );
223 //====================================================================
224 //= ParaAlignmentHandler
225 //====================================================================
226 //--------------------------------------------------------------------
227 ParaAlignmentHandler::ParaAlignmentHandler( AttributeId _nAttributeId
)
228 :AttributeHandler( _nAttributeId
, EE_PARA_JUST
)
229 ,m_eAdjust( SVX_ADJUST_CENTER
)
231 switch ( getAttribute() )
233 case SID_ATTR_PARA_ADJUST_LEFT
: m_eAdjust
= SVX_ADJUST_LEFT
; break;
234 case SID_ATTR_PARA_ADJUST_CENTER
: m_eAdjust
= SVX_ADJUST_CENTER
; break;
235 case SID_ATTR_PARA_ADJUST_RIGHT
: m_eAdjust
= SVX_ADJUST_RIGHT
; break;
236 case SID_ATTR_PARA_ADJUST_BLOCK
: m_eAdjust
= SVX_ADJUST_BLOCK
; break;
238 OSL_ENSURE( sal_False
, "ParaAlignmentHandler::ParaAlignmentHandler: invalid slot!" );
243 //--------------------------------------------------------------------
244 AttributeCheckState
ParaAlignmentHandler::implGetCheckState( const SfxPoolItem
& _rItem
) const
246 OSL_ENSURE( _rItem
.ISA( SvxAdjustItem
), "ParaAlignmentHandler::implGetCheckState: invalid pool item!" );
247 SvxAdjust eAdjust
= static_cast< const SvxAdjustItem
& >( _rItem
).GetAdjust();
248 return ( eAdjust
== m_eAdjust
) ? eChecked
: eUnchecked
;
251 //--------------------------------------------------------------------
252 void ParaAlignmentHandler::executeAttribute( const SfxItemSet
& /*_rCurrentAttribs*/, SfxItemSet
& _rNewAttribs
, const SfxPoolItem
* _pAdditionalArg
, ScriptType
/*_nForScriptType*/ ) const
254 OSL_ENSURE( !_pAdditionalArg
, "ParaAlignmentHandler::executeAttribute: this is a simple toggle attribute - no args possible!" );
255 (void)_pAdditionalArg
;
256 _rNewAttribs
.Put( SvxAdjustItem( m_eAdjust
, getWhich() ) );
259 //====================================================================
260 //= LineSpacingHandler
261 //====================================================================
262 //--------------------------------------------------------------------
263 LineSpacingHandler::LineSpacingHandler( AttributeId _nAttributeId
)
264 :AttributeHandler( _nAttributeId
, EE_PARA_SBL
)
267 switch ( getAttribute() )
269 case SID_ATTR_PARA_LINESPACE_10
: m_nLineSpace
= 100; break;
270 case SID_ATTR_PARA_LINESPACE_15
: m_nLineSpace
= 150; break;
271 case SID_ATTR_PARA_LINESPACE_20
: m_nLineSpace
= 200; break;
273 OSL_ENSURE( sal_False
, "LineSpacingHandler::LineSpacingHandler: invalid slot!" );
278 //--------------------------------------------------------------------
279 AttributeCheckState
LineSpacingHandler::implGetCheckState( const SfxPoolItem
& _rItem
) const
281 OSL_ENSURE( _rItem
.ISA( SvxLineSpacingItem
), "LineSpacingHandler::implGetCheckState: invalid pool item!" );
282 USHORT nLineSpace
= static_cast< const SvxLineSpacingItem
& >( _rItem
).GetPropLineSpace();
283 return ( nLineSpace
== m_nLineSpace
) ? eChecked
: eUnchecked
;
286 //--------------------------------------------------------------------
287 void LineSpacingHandler::executeAttribute( const SfxItemSet
& /*_rCurrentAttribs*/, SfxItemSet
& _rNewAttribs
, const SfxPoolItem
* _pAdditionalArg
, ScriptType
/*_nForScriptType*/ ) const
289 OSL_ENSURE( !_pAdditionalArg
, "LineSpacingHandler::executeAttribute: this is a simple toggle attribute - no args possible!" );
290 (void)_pAdditionalArg
;
292 SvxLineSpacingItem
aLineSpacing( m_nLineSpace
, getWhich() );
293 aLineSpacing
.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO
;
294 if ( 100 == m_nLineSpace
)
295 aLineSpacing
.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF
;
297 aLineSpacing
.SetPropLineSpace( (BYTE
)m_nLineSpace
);
299 _rNewAttribs
.Put( aLineSpacing
);
302 //====================================================================
303 //= EscapementHandler
304 //====================================================================
305 //--------------------------------------------------------------------
306 EscapementHandler::EscapementHandler( AttributeId _nAttributeId
)
307 :AttributeHandler( _nAttributeId
, EE_CHAR_ESCAPEMENT
)
308 ,m_eEscapement( SVX_ESCAPEMENT_OFF
)
310 switch ( getAttribute() )
312 case SID_SET_SUPER_SCRIPT
: m_eEscapement
= SVX_ESCAPEMENT_SUPERSCRIPT
; break;
313 case SID_SET_SUB_SCRIPT
: m_eEscapement
= SVX_ESCAPEMENT_SUBSCRIPT
; break;
315 OSL_ENSURE( sal_False
, "EscapementHandler::EscapementHandler: invalid slot!" );
320 //--------------------------------------------------------------------
321 AttributeCheckState
EscapementHandler::implGetCheckState( const SfxPoolItem
& _rItem
) const
323 OSL_ENSURE( _rItem
.ISA( SvxEscapementItem
), "EscapementHandler::getState: invalid pool item!" );
324 SvxEscapement eEscapement
= static_cast< const SvxEscapementItem
& >( _rItem
).GetEscapement();
325 return ( eEscapement
== m_eEscapement
) ? eChecked
: eUnchecked
;
328 //--------------------------------------------------------------------
329 void EscapementHandler::executeAttribute( const SfxItemSet
& _rCurrentAttribs
, SfxItemSet
& _rNewAttribs
, const SfxPoolItem
* _pAdditionalArg
, ScriptType
/*_nForScriptType*/ ) const
331 OSL_ENSURE( !_pAdditionalArg
, "EscapementHandler::executeAttribute: this is a simple toggle attribute - no args possible!" );
332 // well, in theory we could allow an SvxEscapementItem here, but this is not needed
333 (void)_pAdditionalArg
;
335 bool bIsChecked
= getCheckState( _rCurrentAttribs
) == eChecked
;
336 _rNewAttribs
.Put( SvxEscapementItem( bIsChecked
? SVX_ESCAPEMENT_OFF
: m_eEscapement
, getWhich() ) );
339 //====================================================================
341 //====================================================================
342 //--------------------------------------------------------------------
343 SlotHandler::SlotHandler( AttributeId _nAttributeId
, WhichId _nWhichId
)
344 :AttributeHandler( _nAttributeId
, _nWhichId
)
345 ,m_bScriptDependent( false )
347 m_bScriptDependent
= ( SID_ATTR_CHAR_WEIGHT
== _nAttributeId
)
348 || ( SID_ATTR_CHAR_POSTURE
== _nAttributeId
)
349 || ( SID_ATTR_CHAR_FONT
== _nAttributeId
);
352 //--------------------------------------------------------------------
353 AttributeState
SlotHandler::getState( const SfxItemSet
& _rAttribs
) const
355 AttributeState
aState( eIndetermined
);
357 const SfxPoolItem
* pItem
= _rAttribs
.GetItem( getWhich() );
359 aState
.setItem( pItem
->Clone() );
364 //--------------------------------------------------------------------
365 void SlotHandler::executeAttribute( const SfxItemSet
& /*_rCurrentAttribs*/, SfxItemSet
& _rNewAttribs
, const SfxPoolItem
* _pAdditionalArg
, ScriptType _nForScriptType
) const
367 if ( _pAdditionalArg
)
369 SfxPoolItem
* pCorrectWich
= _pAdditionalArg
->Clone();
370 pCorrectWich
->SetWhich( getWhich() );
372 if ( m_bScriptDependent
)
373 putItemForScript( _rNewAttribs
, *pCorrectWich
, _nForScriptType
);
375 _rNewAttribs
.Put( *pCorrectWich
);
376 DELETEZ( pCorrectWich
);
379 OSL_ENSURE( sal_False
, "SlotHandler::executeAttribute: need attributes to do something!" );
382 //====================================================================
384 //====================================================================
385 //--------------------------------------------------------------------
386 FontSizeHandler::FontSizeHandler( AttributeId _nAttributeId
, WhichId _nWhichId
)
387 :AttributeHandler( _nAttributeId
, _nWhichId
)
389 OSL_ENSURE( ( _nAttributeId
== SID_ATTR_CHAR_FONTHEIGHT
) || ( _nAttributeId
== SID_ATTR_CHAR_CTL_FONTHEIGHT
)
390 || ( _nAttributeId
== SID_ATTR_CHAR_CJK_FONTHEIGHT
) || ( _nAttributeId
== SID_ATTR_CHAR_LATIN_FONTHEIGHT
),
391 "FontSizeHandler::FontSizeHandler: invalid attribute id!" );
394 //--------------------------------------------------------------------
395 AttributeState
FontSizeHandler::getState( const SfxItemSet
& _rAttribs
) const
397 AttributeState
aState( eIndetermined
);
399 const SfxPoolItem
* pItem
= _rAttribs
.GetItem( getWhich() );
400 const SvxFontHeightItem
* pFontHeightItem
= PTR_CAST( SvxFontHeightItem
, pItem
);
401 OSL_ENSURE( pFontHeightItem
|| !pItem
, "FontSizeHandler::getState: invalid item!" );
402 if ( pFontHeightItem
)
404 // by definition, the item should have the unit twip
405 ULONG nHeight
= pFontHeightItem
->GetHeight();
406 if ( _rAttribs
.GetPool()->GetMetric( getWhich() ) != SFX_MAPUNIT_TWIP
)
408 nHeight
= OutputDevice::LogicToLogic(
410 MapMode( (MapUnit
)( _rAttribs
.GetPool()->GetMetric( getWhich() ) ) ),
415 SvxFontHeightItem
* pNewItem
= new SvxFontHeightItem( nHeight
, 100, getWhich() );
416 pNewItem
->SetProp( pFontHeightItem
->GetProp(), pFontHeightItem
->GetPropUnit() );
417 aState
.setItem( pNewItem
);
423 //--------------------------------------------------------------------
424 void FontSizeHandler::executeAttribute( const SfxItemSet
& /*_rCurrentAttribs*/, SfxItemSet
& _rNewAttribs
, const SfxPoolItem
* _pAdditionalArg
, ScriptType _nForScriptType
) const
426 const SvxFontHeightItem
* pFontHeightItem
= PTR_CAST( SvxFontHeightItem
, _pAdditionalArg
);
427 OSL_ENSURE( pFontHeightItem
, "FontSizeHandler::executeAttribute: need a FontHeightItem!" );
429 if ( pFontHeightItem
)
431 // corect measurement units
432 SfxMapUnit eItemMapUnit
= pFontHeightItem
->GetPropUnit(); (void)eItemMapUnit
;
433 ULONG nHeight
= pFontHeightItem
->GetHeight();
434 if ( _rNewAttribs
.GetPool()->GetMetric( getWhich() ) != SFX_MAPUNIT_TWIP
)
436 nHeight
= OutputDevice::LogicToLogic(
438 MapMode( (MapUnit
)( SFX_MAPUNIT_TWIP
) ),
439 MapMode( (MapUnit
)( _rNewAttribs
.GetPool()->GetMetric( getWhich() ) ) )
443 SvxFontHeightItem
aNewItem( nHeight
, 100, getWhich() );
444 aNewItem
.SetProp( pFontHeightItem
->GetProp(), pFontHeightItem
->GetPropUnit() );
446 if ( ( getAttributeId() == SID_ATTR_CHAR_FONTHEIGHT
) && _nForScriptType
)
447 putItemForScript( _rNewAttribs
, aNewItem
, _nForScriptType
);
449 _rNewAttribs
.Put( aNewItem
);
453 //====================================================================
454 //= ParagraphDirectionHandler
455 //====================================================================
456 //--------------------------------------------------------------------
457 ParagraphDirectionHandler::ParagraphDirectionHandler( AttributeId _nAttributeId
)
458 :AttributeHandler( _nAttributeId
, EE_PARA_WRITINGDIR
)
459 ,m_eParagraphDirection( FRMDIR_HORI_LEFT_TOP
)
460 ,m_eDefaultAdjustment( SVX_ADJUST_RIGHT
)
461 ,m_eOppositeDefaultAdjustment( SVX_ADJUST_LEFT
)
463 switch ( getAttributeId() )
465 case SID_ATTR_PARA_LEFT_TO_RIGHT
: m_eParagraphDirection
= FRMDIR_HORI_LEFT_TOP
; m_eDefaultAdjustment
= SVX_ADJUST_LEFT
; break;
466 case SID_ATTR_PARA_RIGHT_TO_LEFT
: m_eParagraphDirection
= FRMDIR_HORI_RIGHT_TOP
; m_eDefaultAdjustment
= SVX_ADJUST_RIGHT
; break;
468 OSL_ENSURE( sal_False
, "ParagraphDirectionHandler::ParagraphDirectionHandler: invalid attribute id!" );
471 if ( SVX_ADJUST_RIGHT
== m_eDefaultAdjustment
)
472 m_eOppositeDefaultAdjustment
= SVX_ADJUST_LEFT
;
474 m_eOppositeDefaultAdjustment
= SVX_ADJUST_RIGHT
;
477 //--------------------------------------------------------------------
478 AttributeCheckState
ParagraphDirectionHandler::implGetCheckState( const SfxPoolItem
& _rItem
) const
480 OSL_ENSURE( _rItem
.ISA( SvxFrameDirectionItem
), "ParagraphDirectionHandler::implGetCheckState: invalid pool item!" );
481 SvxFrameDirection eDirection
= static_cast< SvxFrameDirection
>( static_cast< const SvxFrameDirectionItem
& >( _rItem
).GetValue() );
482 return ( eDirection
== m_eParagraphDirection
) ? eChecked
: eUnchecked
;
485 //--------------------------------------------------------------------
486 void ParagraphDirectionHandler::executeAttribute( const SfxItemSet
& _rCurrentAttribs
, SfxItemSet
& _rNewAttribs
, const SfxPoolItem
* /*_pAdditionalArg*/, ScriptType
/*_nForScriptType*/ ) const
488 _rNewAttribs
.Put( SvxFrameDirectionItem( m_eParagraphDirection
, getWhich() ) );
490 // if the current adjustment of the was the default adjustment for the *previous* text direction,
491 // then we toggle the adjustment, too
492 SvxAdjust eCurrentAdjustment
= SVX_ADJUST_LEFT
;
493 const SfxPoolItem
* pCurrentAdjustment
= NULL
;
494 if ( SFX_ITEM_ON
== _rCurrentAttribs
.GetItemState( EE_PARA_JUST
, TRUE
, &pCurrentAdjustment
) )
495 eCurrentAdjustment
= static_cast< const SvxAdjustItem
* >( pCurrentAdjustment
)->GetAdjust();
497 if ( eCurrentAdjustment
== m_eOppositeDefaultAdjustment
)
498 _rNewAttribs
.Put( SvxAdjustItem( m_eDefaultAdjustment
, EE_PARA_JUST
) );
501 //====================================================================
503 //====================================================================
504 //--------------------------------------------------------------------
505 BooleanHandler::BooleanHandler( AttributeId _nAttributeId
, WhichId _nWhichId
)
506 :AttributeHandler( _nAttributeId
, _nWhichId
)
510 //--------------------------------------------------------------------
511 AttributeCheckState
BooleanHandler::implGetCheckState( const SfxPoolItem
& _rItem
) const
513 OSL_ENSURE( _rItem
.ISA( SfxBoolItem
), "BooleanHandler::implGetCheckState: invalid item!" );
514 if ( _rItem
.ISA( SfxBoolItem
) )
515 return static_cast< const SfxBoolItem
& >( _rItem
).GetValue() ? eChecked
: eUnchecked
;
517 return eIndetermined
;
520 //--------------------------------------------------------------------
521 void BooleanHandler::executeAttribute( const SfxItemSet
& /*_rCurrentAttribs*/, SfxItemSet
& _rNewAttribs
, const SfxPoolItem
* _pAdditionalArg
, ScriptType
/*_nForScriptType*/ ) const
523 OSL_ENSURE( _pAdditionalArg
&& _pAdditionalArg
->ISA( SfxBoolItem
), "BooleanHandler::executeAttribute: invalid argument!" );
524 if ( _pAdditionalArg
)
526 SfxPoolItem
* pCorrectWich
= _pAdditionalArg
->Clone();
527 pCorrectWich
->SetWhich( getWhich() );
528 _rNewAttribs
.Put( *pCorrectWich
);
529 DELETEZ( pCorrectWich
);
533 //........................................................................
535 //........................................................................