diff options
33 files changed, 120 insertions, 130 deletions
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index c20e0af58f20..f1076626bdfd 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -175,7 +175,7 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj ) pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, 0 ) ); pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) ); pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) ); - pObj->SetMergedItem( SdrTextAutoGrowHeightItem( false ) ); + pObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) ); SdrObjCustomShape* pShape(dynamic_cast< SdrObjCustomShape* >( pObj )); assert(pShape); @@ -515,8 +515,8 @@ SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID ) if ( bVertical ) { SfxItemSet aSet( pDrawModelWrapper->GetItemPool() ); - aSet.Put( SdrTextAutoGrowWidthItem( true ) ); - aSet.Put( SdrTextAutoGrowHeightItem( false ) ); + aSet.Put( makeSdrTextAutoGrowWidthItem( true ) ); + aSet.Put( makeSdrTextAutoGrowHeightItem( false ) ); aSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_TOP ) ); aSet.Put( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_RIGHT ) ); pTextObj->SetMergedItemSet( aSet ); diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index 02533421cfce..40958b9ea255 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -170,7 +170,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) // adjust to height if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SFX_ITEM_DONTCARE ) { - m_pTsbAutoGrowHeight->SetState( ( ( const SdrTextAutoGrowHeightItem& )rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). + m_pTsbAutoGrowHeight->SetState( ( ( const SdrOnOffItem& )rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); m_pTsbAutoGrowHeight->EnableTriState( false ); } @@ -181,7 +181,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) // adjust to width if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWWIDTH ) != SFX_ITEM_DONTCARE ) { - m_pTsbAutoGrowWidth->SetState( ( ( const SdrTextAutoGrowWidthItem& )rAttrs->Get( SDRATTR_TEXT_AUTOGROWWIDTH ) ). + m_pTsbAutoGrowWidth->SetState( ( ( const SdrOnOffItem& )rAttrs->Get( SDRATTR_TEXT_AUTOGROWWIDTH ) ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); m_pTsbAutoGrowWidth->EnableTriState( false ); } @@ -192,7 +192,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) // autogrowsize if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWSIZE ) != SFX_ITEM_DONTCARE ) { - m_pTsbAutoGrowSize->SetState( ( ( const SdrTextAutoGrowHeightItem& )rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). + m_pTsbAutoGrowSize->SetState( ( ( const SdrOnOffItem& )rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); m_pTsbAutoGrowSize->EnableTriState( false ); } @@ -358,19 +358,19 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs) eState = m_pTsbAutoGrowHeight->GetState(); if( m_pTsbAutoGrowHeight->IsValueChangedFromSaved() ) { - rAttrs->Put( SdrTextAutoGrowHeightItem( TRISTATE_TRUE == eState ) ); + rAttrs->Put( makeSdrTextAutoGrowHeightItem( TRISTATE_TRUE == eState ) ); } eState = m_pTsbAutoGrowWidth->GetState(); if( m_pTsbAutoGrowWidth->IsValueChangedFromSaved() ) { - rAttrs->Put( SdrTextAutoGrowWidthItem( TRISTATE_TRUE == eState ) ); + rAttrs->Put( makeSdrTextAutoGrowWidthItem( TRISTATE_TRUE == eState ) ); } eState = m_pTsbAutoGrowSize->GetState(); if( m_pTsbAutoGrowSize->IsValueChangedFromSaved() ) { - rAttrs->Put( SdrTextAutoGrowHeightItem( TRISTATE_TRUE == eState ) ); + rAttrs->Put( makeSdrTextAutoGrowHeightItem( TRISTATE_TRUE == eState ) ); } eState = m_pTsbWordWrapText->GetState(); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index c5bdd59f5758..73a73d72b7c6 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -1502,7 +1502,7 @@ void DffPropertyReader::ApplyCustomShapeTextAttributes( SfxItemSet& rSet ) const rSet.Put( makeSdrTextLowerDistItem( nTextBottom ) ); rSet.Put( SdrTextWordWrapItem( (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) != mso_wrapNone ? sal_True : sal_False ) ); - rSet.Put( SdrTextAutoGrowHeightItem( ( GetPropertyValue( DFF_Prop_FitTextToShape ) & 2 ) != 0 ) ); + rSet.Put( makeSdrTextAutoGrowHeightItem( ( GetPropertyValue( DFF_Prop_FitTextToShape ) & 2 ) != 0 ) ); } void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxItemSet& rSet, const DffObjData& rObjData ) const @@ -4330,8 +4330,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r aSet.Put( SvxKerningItem( 1, EE_CHAR_KERNING ) ); // #i119496# the resize autoshape to fit text attr of word art in MS PPT is always false - aSet.Put(SdrTextAutoGrowHeightItem(false)); - aSet.Put(SdrTextAutoGrowWidthItem(false)); + aSet.Put(makeSdrTextAutoGrowHeightItem(false)); + aSet.Put(makeSdrTextAutoGrowWidthItem(false)); } pRet->SetMergedItemSet( aSet ); @@ -5121,7 +5121,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, bool bFitText = false; if (GetPropertyValue(DFF_Prop_FitTextToShape) & 2) { - aSet.Put( SdrTextAutoGrowHeightItem( true ) ); + aSet.Put( makeSdrTextAutoGrowHeightItem( true ) ); aSet.Put( makeSdrTextMinFrameHeightItem( aNewRect.Bottom() - aNewRect.Top() ) ); aSet.Put( makeSdrTextMinFrameWidthItem( @@ -5130,15 +5130,15 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, } else { - aSet.Put( SdrTextAutoGrowHeightItem( false ) ); - aSet.Put( SdrTextAutoGrowWidthItem( false ) ); + aSet.Put( makeSdrTextAutoGrowHeightItem( false ) ); + aSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); } switch ( (MSO_WrapMode) GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) ) { case mso_wrapNone : - aSet.Put( SdrTextAutoGrowWidthItem( true ) ); + aSet.Put( makeSdrTextAutoGrowWidthItem( true ) ); if (bFitText) { //can't do autowidth in flys #i107184# diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index bd869b2c1e5a..8698fb6401cf 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -1073,13 +1073,13 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi if ( !pTObj->ISA( SdrObjCustomShape ) ) { - pTObj->SetMergedItem( SdrTextAutoGrowWidthItem( bAutoGrowWidth ) ); - pTObj->SetMergedItem( SdrTextAutoGrowHeightItem( bAutoGrowHeight ) ); + pTObj->SetMergedItem( makeSdrTextAutoGrowWidthItem( bAutoGrowWidth ) ); + pTObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( bAutoGrowHeight ) ); } else { pTObj->SetMergedItem( SdrTextWordWrapItem( bWordWrap ) ); - pTObj->SetMergedItem( SdrTextAutoGrowHeightItem( bFitShapeToText ) ); + pTObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( bFitShapeToText ) ); } pTObj->SetMergedItem( SdrTextVertAdjustItem( eTVA ) ); diff --git a/include/svx/sdtagitm.hxx b/include/svx/sdtagitm.hxx index 65f90e91b06e..df186107f697 100644 --- a/include/svx/sdtagitm.hxx +++ b/include/svx/sdtagitm.hxx @@ -22,23 +22,13 @@ #include <svx/sdooitm.hxx> #include <svx/svddef.hxx> +inline SdrOnOffItem makeSdrTextAutoGrowHeightItem(bool bAuto) { + return SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT, bAuto); +} -// class SdrTextAutoGrowHeightItem - -class SdrTextAutoGrowHeightItem: public SdrOnOffItem { -public: - SdrTextAutoGrowHeightItem(bool bAuto=true): SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT,bAuto) {} - SdrTextAutoGrowHeightItem(SvStream& rIn) : SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT,rIn) {} -}; - - -// class SdrTextAutoGrowWidthItem - -class SdrTextAutoGrowWidthItem: public SdrOnOffItem { -public: - SdrTextAutoGrowWidthItem(bool bAuto=false): SdrOnOffItem(SDRATTR_TEXT_AUTOGROWWIDTH,bAuto) {} - SdrTextAutoGrowWidthItem(SvStream& rIn) : SdrOnOffItem(SDRATTR_TEXT_AUTOGROWWIDTH,rIn) {} -}; +inline SdrOnOffItem makeSdrTextAutoGrowWidthItem(bool bAuto) { + return SdrOnOffItem(SDRATTR_TEXT_AUTOGROWWIDTH, bAuto); +} #endif diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 842a65cb2b02..7c5bc5ce04e1 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -546,8 +546,8 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes //for the fallback geometry. if(aShapeType.startsWith("fontwork")) { - pShape->SetMergedItem(SdrTextAutoGrowHeightItem(false)); - pShape->SetMergedItem(SdrTextAutoGrowWidthItem(false)); + pShape->SetMergedItem(makeSdrTextAutoGrowHeightItem(false)); + pShape->SetMergedItem(makeSdrTextAutoGrowWidthItem(false)); } } convertShapeProperties( xShape ); diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index e4be3ed58e6f..3c560569345c 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -679,7 +679,7 @@ void OReportSection::createDefault(const OUString& _sType,SdrObject* _pObj) _pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER ,ITEMID_ADJUST) ); _pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) ); _pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) ); - _pObj->SetMergedItem( SdrTextAutoGrowHeightItem( false ) ); + _pObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) ); ((SdrObjCustomShape*)_pObj)->MergeDefaultAttributes( &_sType ); } } diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index fbc95ef008de..673640f15f6f 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -132,8 +132,8 @@ void ScCaptionUtil::SetDefaultItems( SdrCaptionObj& rCaption, ScDocument& rDoc ) aItemSet.Put( makeSdrTextRightDistItem( 100 ) ); aItemSet.Put( makeSdrTextUpperDistItem( 100 ) ); aItemSet.Put( makeSdrTextLowerDistItem( 100 ) ); - aItemSet.Put( SdrTextAutoGrowWidthItem( false ) ); - aItemSet.Put( SdrTextAutoGrowHeightItem( true ) ); + aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); + aItemSet.Put( makeSdrTextAutoGrowHeightItem( true ) ); // use the default cell style to be able to modify the caption font const ScPatternAttr& rDefPattern = static_cast< const ScPatternAttr& >( rDoc.GetPool()->GetDefaultItem( ATTR_PATTERN ) ); rDefPattern.FillEditItemSet( &aItemSet ); @@ -794,10 +794,10 @@ SdrCaptionObj* ScNoteUtil::CreateTempCaption( ScCaptionUtil::SetDefaultItems( *pCaption, rDoc ); // adjust caption size to text size long nMaxWidth = ::std::min< long >( aVisRect.GetWidth() * 2 / 3, SC_NOTECAPTION_MAXWIDTH_TEMP ); - pCaption->SetMergedItem( SdrTextAutoGrowWidthItem( true ) ); + pCaption->SetMergedItem( makeSdrTextAutoGrowWidthItem( true ) ); pCaption->SetMergedItem( makeSdrTextMinFrameWidthItem( SC_NOTECAPTION_WIDTH ) ); pCaption->SetMergedItem( makeSdrTextMaxFrameWidthItem( nMaxWidth ) ); - pCaption->SetMergedItem( SdrTextAutoGrowHeightItem( true ) ); + pCaption->SetMergedItem( makeSdrTextAutoGrowHeightItem( true ) ); pCaption->AdjustTextFrameWidthAndHeight(); } diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index 5051a2ac8749..102155cc6eb8 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -224,8 +224,8 @@ ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) : aCaptionSet.Put( makeSdrTextUpperDistItem( 100 ) ); aCaptionSet.Put( makeSdrTextLowerDistItem( 100 ) ); - aCaptionSet.Put( SdrTextAutoGrowWidthItem( false ) ); - aCaptionSet.Put( SdrTextAutoGrowHeightItem( true ) ); + aCaptionSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); + aCaptionSet.Put( makeSdrTextAutoGrowHeightItem( true ) ); // do use the default cell style, so the user has a chance to // modify the font for the annotations diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 6a75aa3f3deb..b14ae22aa031 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -1436,8 +1436,8 @@ SdrObject* XclImpTextObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Re xSdrObj->MergeDefaultAttributes( &aRectType ); ConvertRectStyle( *xSdrObj ); bool bAutoSize = ::get_flag( maTextData.maData.mnFlags, EXC_OBJ_TEXT_AUTOSIZE ); - xSdrObj->SetMergedItem( SdrTextAutoGrowWidthItem( bAutoSize ) ); - xSdrObj->SetMergedItem( SdrTextAutoGrowHeightItem( bAutoSize ) ); + xSdrObj->SetMergedItem( makeSdrTextAutoGrowWidthItem( bAutoSize ) ); + xSdrObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( bAutoSize ) ); xSdrObj->SetMergedItem( SdrTextWordWrapItem( true ) ); rDffConv.Progress(); return xSdrObj.release(); diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx index ce2e45294f4d..17ccbd4d8cac 100644 --- a/sc/source/ui/drawfunc/fuconcustomshape.cxx +++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx @@ -264,7 +264,7 @@ void FuConstCustomShape::SetAttributes( SdrObject* pObj ) pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, 0 ) ); pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) ); pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) ); - pObj->SetMergedItem( SdrTextAutoGrowHeightItem( false ) ); + pObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) ); ((SdrObjCustomShape*)pObj)->MergeDefaultAttributes( &aCustomShape ); } } diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx index d191218ccb5a..911b1a69c059 100644 --- a/sc/source/ui/drawfunc/futext.cxx +++ b/sc/source/ui/drawfunc/futext.cxx @@ -464,8 +464,8 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt) SfxItemSet aItemSet( pDrDoc->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST); - aItemSet.Put( SdrTextAutoGrowWidthItem( false ) ); - aItemSet.Put( SdrTextAutoGrowHeightItem( false ) ); + aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); + aItemSet.Put( makeSdrTextAutoGrowHeightItem( false ) ); aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) ); aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) ); aItemSet.Put( SdrTextAniCountItem( 1 ) ); @@ -491,8 +491,8 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt) pText->SetVerticalWriting(true); - aSet.Put(SdrTextAutoGrowWidthItem(true)); - aSet.Put(SdrTextAutoGrowHeightItem(false)); + aSet.Put(makeSdrTextAutoGrowWidthItem(true)); + aSet.Put(makeSdrTextAutoGrowHeightItem(false)); aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP)); aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); @@ -802,8 +802,8 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rR { SfxItemSet aSet(pDrDoc->GetItemPool()); - aSet.Put(SdrTextAutoGrowWidthItem(true)); - aSet.Put(SdrTextAutoGrowHeightItem(false)); + aSet.Put(makeSdrTextAutoGrowWidthItem(true)); + aSet.Put(makeSdrTextAutoGrowHeightItem(false)); aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP)); aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); @@ -814,8 +814,8 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rR { SfxItemSet aSet(pDrDoc->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST); - aSet.Put( SdrTextAutoGrowWidthItem( false ) ); - aSet.Put( SdrTextAutoGrowHeightItem( false ) ); + aSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); + aSet.Put( makeSdrTextAutoGrowHeightItem( false ) ); aSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) ); aSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) ); aSet.Put( SdrTextAniCountItem( 1 ) ); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 351f544fff08..8f8f6e613a75 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -427,9 +427,9 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec // potential problem: This action was still NOT // adapted for vertical text. This sure needs to be done. if(bVertical) - aTempAttr.Put(SdrTextAutoGrowWidthItem(false)); + aTempAttr.Put(makeSdrTextAutoGrowWidthItem(false)); else - aTempAttr.Put(SdrTextAutoGrowHeightItem(false)); + aTempAttr.Put(makeSdrTextAutoGrowHeightItem(false)); } // check if we need another vertical adjustment than the default @@ -2240,13 +2240,13 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() ); SdrMetricItem aMinHeight( makeSdrTextMinFrameHeightItem(aRect.GetSize().Height()) ); aTempAttr.Put( aMinHeight ); - aTempAttr.Put( SdrTextAutoGrowHeightItem(false) ); + aTempAttr.Put( makeSdrTextAutoGrowHeightItem(false) ); pTextObject->SetMergedItemSet(aTempAttr); pTextObject->SetLogicRect(aRect); // switch on AutoGrowHeight SfxItemSet aAttr( ((SdDrawDocument*) pModel)->GetPool() ); - aAttr.Put( SdrTextAutoGrowHeightItem(true) ); + aAttr.Put( makeSdrTextAutoGrowHeightItem(true) ); pTextObject->SetMergedItemSet(aAttr); } @@ -2257,13 +2257,13 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() ); SdrMetricItem aMinWidth( makeSdrTextMinFrameWidthItem(aRect.GetSize().Width()) ); aTempAttr.Put( aMinWidth ); - aTempAttr.Put( SdrTextAutoGrowWidthItem(false) ); + aTempAttr.Put( makeSdrTextAutoGrowWidthItem(false) ); pTextObject->SetMergedItemSet(aTempAttr); pTextObject->SetLogicRect(aRect); // switch on AutoGrowWidth SfxItemSet aAttr( ((SdDrawDocument*) pModel)->GetPool() ); - aAttr.Put( SdrTextAutoGrowWidthItem(true) ); + aAttr.Put( makeSdrTextAutoGrowWidthItem(true) ); pTextObject->SetMergedItemSet(aAttr); } } @@ -2284,8 +2284,8 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, if( bVertical && (( eObjKind == PRESOBJ_TITLE) || (eObjKind == PRESOBJ_OUTLINE))) { SfxItemSet aNewSet(pObj->GetMergedItemSet()); - aNewSet.Put( SdrTextAutoGrowWidthItem(true) ); - aNewSet.Put( SdrTextAutoGrowHeightItem(false) ); + aNewSet.Put( makeSdrTextAutoGrowWidthItem(true) ); + aNewSet.Put( makeSdrTextAutoGrowHeightItem(false) ); if( eObjKind == PRESOBJ_OUTLINE ) { aNewSet.Put( SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP) ); diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index cb11f738ccea..79475e5184be 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -255,7 +255,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool rSet.Put( XLineStyleItem(XLINE_NONE) ); rSet.Put( XFillStyleItem(drawing::FillStyle_NONE) ); rSet.Put( SdrTextFitToSizeTypeItem(SDRTEXTFIT_AUTOFIT) ); - rSet.Put( SdrTextAutoGrowHeightItem(false) ); + rSet.Put( makeSdrTextAutoGrowHeightItem(false) ); // #i16874# enable kerning by default but only for new documents rSet.Put( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) ); diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index a84e29dcea91..01a683722781 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -2276,7 +2276,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj SfxItemSet aTempAttr( mpDoc->GetPool() ); SdrMetricItem aMinHeight( makeSdrTextMinFrameHeightItem(pText->GetLogicRect().GetSize().Height()) ); aTempAttr.Put( aMinHeight ); - SdrTextAutoGrowHeightItem aAutoGrowHeight( false ); + SdrOnOffItem aAutoGrowHeight( makeSdrTextAutoGrowHeightItem(false) ); aTempAttr.Put( aAutoGrowHeight ); pText->SetMergedItemSet(aTempAttr); } diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx index 8d1c003a52c3..eeaf6485ce1f 100644 --- a/sd/source/ui/func/fuconcs.cxx +++ b/sd/source/ui/func/fuconcs.cxx @@ -254,7 +254,7 @@ void FuConstructCustomShape::SetAttributes( SdrObject* pObj ) pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) ); pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) ); pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) ); - pObj->SetMergedItem( SdrTextAutoGrowHeightItem( false ) ); + pObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) ); ((SdrObjCustomShape*)pObj)->MergeDefaultAttributes( &aCustomShape ); } } diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index a92d4bd24f4f..ebd76dbc192c 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -472,8 +472,8 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj) Size aSize(pObj->GetLogicRect().GetSize()); rAttr.Put( makeSdrTextMinFrameHeightItem( aSize.Height() ) ); rAttr.Put( makeSdrTextMinFrameWidthItem( aSize.Width() ) ); - rAttr.Put( SdrTextAutoGrowHeightItem( true ) ); - rAttr.Put( SdrTextAutoGrowWidthItem( true ) ); + rAttr.Put( makeSdrTextAutoGrowHeightItem( true ) ); + rAttr.Put( makeSdrTextAutoGrowWidthItem( true ) ); // Support full with for vertical caption objects, too if(SID_DRAW_CAPTION == nSlotId) diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index d7075e4b4934..b13949d3785a 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -481,8 +481,8 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj) object, otherwise we draw to much */ SfxItemSet aSet(mpViewShell->GetPool()); aSet.Put(makeSdrTextMinFrameHeightItem(0)); - aSet.Put(SdrTextAutoGrowWidthItem(false)); - aSet.Put(SdrTextAutoGrowHeightItem(true)); + aSet.Put(makeSdrTextAutoGrowWidthItem(false)); + aSet.Put(makeSdrTextAutoGrowHeightItem(true)); pTxtObj->SetMergedItemSet(aSet); pTxtObj->AdjustTextFrameWidthAndHeight(); aSet.Put(makeSdrTextMaxFrameHeightItem(pTxtObj->GetLogicRect().GetSize().Height())); @@ -492,8 +492,8 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj) { SfxItemSet aSet(mpViewShell->GetPool()); aSet.Put(makeSdrTextMinFrameWidthItem(0)); - aSet.Put(SdrTextAutoGrowWidthItem(true)); - aSet.Put(SdrTextAutoGrowHeightItem(false)); + aSet.Put(makeSdrTextAutoGrowWidthItem(true)); + aSet.Put(makeSdrTextAutoGrowHeightItem(false)); // Needs to be set since default is SDRTEXTHORZADJUST_BLOCK aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); @@ -510,8 +510,8 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj) // draw text object, needs to be initialized when vertical text is used SfxItemSet aSet(mpViewShell->GetPool()); - aSet.Put(SdrTextAutoGrowWidthItem(true)); - aSet.Put(SdrTextAutoGrowHeightItem(false)); + aSet.Put(makeSdrTextAutoGrowWidthItem(true)); + aSet.Put(makeSdrTextAutoGrowHeightItem(false)); // Set defaults for vertical klick-n'drag text object, pool defaults are: // SdrTextVertAdjustItem: SDRTEXTVERTADJUST_TOP @@ -531,8 +531,8 @@ void FuText::ImpSetAttributesFitToSize(SdrTextObj* pTxtObj) SfxItemSet aSet(mpViewShell->GetPool(), SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH); SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL; aSet.Put(SdrTextFitToSizeTypeItem(eFTS)); - aSet.Put(SdrTextAutoGrowHeightItem(false)); - aSet.Put(SdrTextAutoGrowWidthItem(false)); + aSet.Put(makeSdrTextAutoGrowHeightItem(false)); + aSet.Put(makeSdrTextAutoGrowWidthItem(false)); pTxtObj->SetMergedItemSet(aSet); pTxtObj->AdjustTextFrameWidthAndHeight(); } @@ -543,8 +543,8 @@ void FuText::ImpSetAttributesFitToSizeVertical(SdrTextObj* pTxtObj) SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH); SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL; aSet.Put(SdrTextFitToSizeTypeItem(eFTS)); - aSet.Put(SdrTextAutoGrowHeightItem(false)); - aSet.Put(SdrTextAutoGrowWidthItem(false)); + aSet.Put(makeSdrTextAutoGrowHeightItem(false)); + aSet.Put(makeSdrTextAutoGrowWidthItem(false)); pTxtObj->SetMergedItemSet(aSet); pTxtObj->AdjustTextFrameWidthAndHeight(); } @@ -560,8 +560,8 @@ void FuText::ImpSetAttributesFitCommon(SdrTextObj* pTxtObj) SfxItemSet aSet(mpViewShell->GetPool()); aSet.Put(makeSdrTextMinFrameHeightItem(0)); aSet.Put(makeSdrTextMaxFrameHeightItem(0)); - aSet.Put(SdrTextAutoGrowHeightItem(true)); - aSet.Put(SdrTextAutoGrowWidthItem(false)); + aSet.Put(makeSdrTextAutoGrowHeightItem(true)); + aSet.Put(makeSdrTextAutoGrowWidthItem(false)); pTxtObj->SetMergedItemSet(aSet); } else if( nSlotId == SID_ATTR_CHAR_VERTICAL ) @@ -569,8 +569,8 @@ void FuText::ImpSetAttributesFitCommon(SdrTextObj* pTxtObj) SfxItemSet aSet(mpViewShell->GetPool()); aSet.Put(makeSdrTextMinFrameWidthItem(0)); aSet.Put(makeSdrTextMaxFrameWidthItem(0)); - aSet.Put(SdrTextAutoGrowWidthItem(true)); - aSet.Put(SdrTextAutoGrowHeightItem(false)); + aSet.Put(makeSdrTextAutoGrowWidthItem(true)); + aSet.Put(makeSdrTextAutoGrowHeightItem(false)); pTxtObj->SetMergedItemSet(aSet); } @@ -789,8 +789,8 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt) SfxItemSet aSet(mpViewShell->GetPool()); aSet.Put(makeSdrTextMinFrameHeightItem(0)); aSet.Put(makeSdrTextMinFrameWidthItem(0)); - aSet.Put(SdrTextAutoGrowHeightItem(true)); - aSet.Put(SdrTextAutoGrowWidthItem(true)); + aSet.Put(makeSdrTextAutoGrowHeightItem(true)); + aSet.Put(makeSdrTextAutoGrowWidthItem(true)); if(nSlotId == SID_ATTR_CHAR_VERTICAL) { diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index c135ee37da3e..3371a41f2dc7 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -1969,7 +1969,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) OutlinerParaObject* pOutlParaObject = pOutl->CreateParaObject(); SdrRectObj* pRectObj = new SdrRectObj( OBJ_TEXT ); - pRectObj->SetMergedItem(SdrTextAutoGrowWidthItem(true)); + pRectObj->SetMergedItem(makeSdrTextAutoGrowWidthItem(true)); pOutl->UpdateFields(); pOutl->SetUpdateMode( true ); diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx index d36d33c7d8ad..97d49210fa98 100644 --- a/svx/source/sdr/properties/customshapeproperties.cxx +++ b/svx/source/sdr/properties/customshapeproperties.cxx @@ -39,7 +39,7 @@ namespace sdr // change TextFrame flag when bResizeShapeToFitText changes (which is mapped // on the item SDRATTR_TEXT_AUTOGROWHEIGHT for custom shapes, argh) - rObj.bTextFrame = static_cast< const SdrTextAutoGrowHeightItem& >(GetObjectItemSet().Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue(); + rObj.bTextFrame = static_cast< const SdrOnOffItem& >(GetObjectItemSet().Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue(); // check if it did change if(rObj.bTextFrame != bOld) diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 3118a3160d88..83460b717f69 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -147,7 +147,7 @@ SdrItemPool::SdrItemPool( mppLocalPoolDefaults[SDRATTR_CAPTIONFITLINELEN-SDRATTR_START]=new SdrCaptionFitLineLenItem; mppLocalPoolDefaults[SDRATTR_ECKENRADIUS -SDRATTR_START]=new SdrEckenradiusItem; mppLocalPoolDefaults[SDRATTR_TEXT_MINFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT, 0); - mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWHEIGHT -SDRATTR_START]=new SdrTextAutoGrowHeightItem; + mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWHEIGHT -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWHEIGHT, true); mppLocalPoolDefaults[SDRATTR_TEXT_FITTOSIZE -SDRATTR_START]=new SdrTextFitToSizeTypeItem; mppLocalPoolDefaults[SDRATTR_TEXT_LEFTDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_LEFTDIST, 0); mppLocalPoolDefaults[SDRATTR_TEXT_RIGHTDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_RIGHTDIST, 0); @@ -157,7 +157,7 @@ SdrItemPool::SdrItemPool( mppLocalPoolDefaults[SDRATTR_TEXT_MAXFRAMEHEIGHT -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT, 0); mppLocalPoolDefaults[SDRATTR_TEXT_MINFRAMEWIDTH -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH, 0); mppLocalPoolDefaults[SDRATTR_TEXT_MAXFRAMEWIDTH -SDRATTR_START]=new SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH, 0); - mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWWIDTH -SDRATTR_START]=new SdrTextAutoGrowWidthItem; + mppLocalPoolDefaults[SDRATTR_TEXT_AUTOGROWWIDTH -SDRATTR_START]=new SdrOnOffItem(SDRATTR_TEXT_AUTOGROWWIDTH, false); mppLocalPoolDefaults[SDRATTR_TEXT_HORZADJUST -SDRATTR_START]=new SdrTextHorzAdjustItem; mppLocalPoolDefaults[SDRATTR_TEXT_ANIKIND -SDRATTR_START]=new SdrTextAniKindItem; mppLocalPoolDefaults[SDRATTR_TEXT_ANIDIRECTION -SDRATTR_START]=new SdrTextAniDirectionItem; diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 04d2c59a87f3..0952a23e1989 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -1355,12 +1355,12 @@ void SdrDragObjOwn::MoveSdrDrag(const Point& rNoSnapPnt) // also this (pretty indirect) property change is possible. If it gets // changed, it needs to be copied to the original since nothing will // happen when it only changes in the drag clone - const bool bOldAutoGrowWidth(((SdrTextAutoGrowWidthItem&)pObj->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue()); - const bool bNewAutoGrowWidth(((SdrTextAutoGrowWidthItem&)mpClone->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue()); + const bool bOldAutoGrowWidth(((SdrOnOffItem&)pObj->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue()); + const bool bNewAutoGrowWidth(((SdrOnOffItem&)mpClone->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue()); if(bOldAutoGrowWidth != bNewAutoGrowWidth) { - GetDragObj()->SetMergedItem(SdrTextAutoGrowWidthItem(bNewAutoGrowWidth)); + GetDragObj()->SetMergedItem(makeSdrTextAutoGrowWidthItem(bNewAutoGrowWidth)); } } diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 7945d2cb69be..d8a96d92e500 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -1370,7 +1370,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const } SfxItemState eState=aMarkAttr.GetItemState(SDRATTR_TEXT_AUTOGROWWIDTH); - bool bAutoGrow=((SdrTextAutoGrowWidthItem&)(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue(); + bool bAutoGrow=((SdrOnOffItem&)(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue(); if (eState==SFX_ITEM_DONTCARE) { aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_AUTOWIDTH); } else if (eState==SFX_ITEM_SET) { @@ -1378,7 +1378,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const } eState=aMarkAttr.GetItemState(SDRATTR_TEXT_AUTOGROWHEIGHT); - bAutoGrow=((SdrTextAutoGrowHeightItem&)(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); + bAutoGrow=((SdrOnOffItem&)(aMarkAttr.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); if (eState==SFX_ITEM_DONTCARE) { aRetSet.InvalidateItem(SID_ATTR_TRANSFORM_AUTOHEIGHT); } else if (eState==SFX_ITEM_SET) { @@ -1581,13 +1581,13 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) // AutoGrow if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_AUTOWIDTH,true,&pPoolItem)) { bool bAutoGrow=((const SfxBoolItem*)pPoolItem)->GetValue(); - aSetAttr.Put(SdrTextAutoGrowWidthItem(bAutoGrow)); + aSetAttr.Put(makeSdrTextAutoGrowWidthItem(bAutoGrow)); bSetAttr=true; } if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_AUTOHEIGHT,true,&pPoolItem)) { bool bAutoGrow=((const SfxBoolItem*)pPoolItem)->GetValue(); - aSetAttr.Put(SdrTextAutoGrowHeightItem(bAutoGrow)); + aSetAttr.Put(makeSdrTextAutoGrowHeightItem(bAutoGrow)); bSetAttr=true; } diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index e7e28d692c02..e7cbae2d0edd 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -1028,13 +1028,13 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt if ( aFnt.GetWidth() || ( rAct.GetType() == META_STRETCHTEXT_ACTION ) ) { pText->ClearMergedItem( SDRATTR_TEXT_AUTOGROWWIDTH ); - pText->SetMergedItem( SdrTextAutoGrowHeightItem( false ) ); + pText->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) ); // don't let the margins eat the space needed for the text pText->SetMergedItem( SdrTextFitToSizeTypeItem( SDRTEXTFIT_ALLLINES ) ); } else { - pText->SetMergedItem( SdrTextAutoGrowWidthItem( true ) ); + pText->SetMergedItem( makeSdrTextAutoGrowWidthItem( true ) ); } pText->SetModel(mpModel); diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index 40ca0d9f212a..05de58c280bd 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -789,7 +789,7 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI case SDRATTR_TEXT_MAXFRAMEHEIGHT: { rIndent=1; if (ImpGetItem(*pSet,SDRATTR_TEXT_AUTOGROWHEIGHT,pItem)) { - bool bAutoGrow=((const SdrTextAutoGrowHeightItem*)pItem)->GetValue(); + bool bAutoGrow=((const SdrOnOffItem*)pItem)->GetValue(); if (!bAutoGrow) return true; } } break; @@ -797,7 +797,7 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI case SDRATTR_TEXT_MAXFRAMEWIDTH: { rIndent=1; if (ImpGetItem(*pSet,SDRATTR_TEXT_AUTOGROWWIDTH,pItem)) { - bool bAutoGrow=((const SdrTextAutoGrowWidthItem*)pItem)->GetValue(); + bool bAutoGrow=((const SdrOnOffItem*)pItem)->GetValue(); if (!bAutoGrow) return true; } } break; diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index f6fab1311c43..177771473fe7 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1445,7 +1445,7 @@ void SdrObjCustomShape::AdaptTextMinSize() { if(!pModel || !pModel->IsPasteResize()) { - const bool bResizeShapeToFitText(static_cast< const SdrTextAutoGrowHeightItem& >(GetObjectItem(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue()); + const bool bResizeShapeToFitText(static_cast< const SdrOnOffItem& >(GetObjectItem(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue()); SfxItemSet aSet( *GetObjectItemSet().GetPool(), SDRATTR_TEXT_MINFRAMEHEIGHT, SDRATTR_TEXT_AUTOGROWHEIGHT, @@ -2239,7 +2239,7 @@ basegfx::B2DPolyPolygon SdrObjCustomShape::TakeCreatePoly(const SdrDragStat& /*r bool SdrObjCustomShape::IsAutoGrowHeight() const { const SfxItemSet& rSet = GetMergedItemSet(); - bool bIsAutoGrowHeight = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); + bool bIsAutoGrowHeight = ((SdrOnOffItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); if ( bIsAutoGrowHeight && IsVerticalWriting() ) bIsAutoGrowHeight = !((SdrTextWordWrapItem&)(rSet.Get(SDRATTR_TEXT_WORDWRAP))).GetValue(); return bIsAutoGrowHeight; @@ -2247,7 +2247,7 @@ bool SdrObjCustomShape::IsAutoGrowHeight() const bool SdrObjCustomShape::IsAutoGrowWidth() const { const SfxItemSet& rSet = GetMergedItemSet(); - bool bIsAutoGrowWidth = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); + bool bIsAutoGrowWidth = ((SdrOnOffItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); if ( bIsAutoGrowWidth && !IsVerticalWriting() ) bIsAutoGrowWidth = !((SdrTextWordWrapItem&)(rSet.Get(SDRATTR_TEXT_WORDWRAP))).GetValue(); return bIsAutoGrowWidth; diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index f08a01726cca..225d0dd958bd 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -301,7 +301,7 @@ bool SdrTextObj::IsAutoGrowHeight() const return false; // AutoGrow only together with TextFrames const SfxItemSet& rSet = GetObjectItemSet(); - bool bRet = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); + bool bRet = ((SdrOnOffItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); if(bRet) { @@ -326,7 +326,7 @@ bool SdrTextObj::IsAutoGrowWidth() const return false; // AutoGrow only together with TextFrames const SfxItemSet& rSet = GetObjectItemSet(); - bool bRet = ((SdrTextAutoGrowWidthItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue(); + bool bRet = ((SdrOnOffItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue(); bool bInEditMOde = IsInEditMode(); @@ -571,7 +571,7 @@ void SdrTextObj::AdaptTextMinSize() if(!IsVerticalWriting() && bDisableAutoWidthOnDragging) { bDisableAutoWidthOnDragging = true; - aSet.Put(SdrTextAutoGrowWidthItem(false)); + aSet.Put(makeSdrTextAutoGrowWidthItem(false)); } } @@ -585,7 +585,7 @@ void SdrTextObj::AdaptTextMinSize() if(IsVerticalWriting() && bDisableAutoWidthOnDragging) { bDisableAutoWidthOnDragging = false; - aSet.Put(SdrTextAutoGrowHeightItem(false)); + aSet.Put(makeSdrTextAutoGrowHeightItem(false)); } } @@ -1531,8 +1531,8 @@ void SdrTextObj::SetVerticalWriting(bool bVertical) { // get item settings const SfxItemSet& rSet = GetObjectItemSet(); - bool bAutoGrowWidth = ((SdrTextAutoGrowWidthItem&)rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue(); - bool bAutoGrowHeight = ((SdrTextAutoGrowHeightItem&)rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue(); + bool bAutoGrowWidth = ((SdrOnOffItem&)rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue(); + bool bAutoGrowHeight = ((SdrOnOffItem&)rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT)).GetValue(); // Also exchange hor/ver adjust items SdrTextHorzAdjust eHorz = ((SdrTextHorzAdjustItem&)(rSet.Get(SDRATTR_TEXT_HORZADJUST))).GetValue(); @@ -1550,8 +1550,8 @@ void SdrTextObj::SetVerticalWriting(bool bVertical) 0, 0); aNewSet.Put(rSet); - aNewSet.Put(SdrTextAutoGrowWidthItem(bAutoGrowHeight)); - aNewSet.Put(SdrTextAutoGrowHeightItem(bAutoGrowWidth)); + aNewSet.Put(makeSdrTextAutoGrowWidthItem(bAutoGrowHeight)); + aNewSet.Put(makeSdrTextAutoGrowHeightItem(bAutoGrowWidth)); // Exchange horz and vert adjusts switch(eVert) diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 8aa17a8c6814..754a28b979a0 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -2787,8 +2787,8 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const if(bVertical) { SfxItemSet aSet(pDrawModel->GetItemPool()); - aSet.Put(SdrTextAutoGrowWidthItem(true)); - aSet.Put(SdrTextAutoGrowHeightItem(false)); + aSet.Put(makeSdrTextAutoGrowWidthItem(true)); + aSet.Put(makeSdrTextAutoGrowHeightItem(false)); aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP)); aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); pText->SetMergedItemSet(aSet); @@ -2797,8 +2797,8 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const if(bMarquee) { SfxItemSet aSet(pDrawModel->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST); - aSet.Put( SdrTextAutoGrowWidthItem( false ) ); - aSet.Put( SdrTextAutoGrowHeightItem( false ) ); + aSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); + aSet.Put( makeSdrTextAutoGrowHeightItem( false ) ); aSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) ); aSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) ); aSet.Put( SdrTextAniCountItem( 1 ) ); diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index 7f9ee9e1e045..3aa6a05a6e0e 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -382,8 +382,8 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) EE_CHAR_START, EE_CHAR_END, 0 }; SfxItemSet aItemSet( pModel->GetItemPool(), aWhichMap ); - aItemSet.Put( SdrTextAutoGrowWidthItem( false ) ); - aItemSet.Put( SdrTextAutoGrowHeightItem( true ) ); + aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); + aItemSet.Put( makeSdrTextAutoGrowHeightItem( true ) ); aItemSet.Put( SdrTextAniKindItem( eAniKind ) ); aItemSet.Put( SdrTextAniDirectionItem( eAniDir ) ); aItemSet.Put( SdrTextAniCountItem( nCount ) ); diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index c8af5bfaa18a..a488e494e386 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1199,8 +1199,8 @@ SdrObject* SwWW8ImplReader::ReadTxtBox( WW8_DPHEAD* pHd, const WW8_DO* pDo, SetFill( rSet, aTxtB.aFill ); rSet.Put( SdrTextFitToSizeTypeItem( SDRTEXTFIT_NONE ) ); - rSet.Put( SdrTextAutoGrowWidthItem(false)); - rSet.Put( SdrTextAutoGrowHeightItem(false)); + rSet.Put( makeSdrTextAutoGrowWidthItem(false)); + rSet.Put( makeSdrTextAutoGrowHeightItem(false)); rSet.Put( makeSdrTextLeftDistItem( MIN_BORDER_DIST*2 ) ); rSet.Put( makeSdrTextRightDistItem( MIN_BORDER_DIST*2 ) ); rSet.Put( makeSdrTextUpperDistItem( MIN_BORDER_DIST ) ); @@ -1652,7 +1652,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, aBox.SetDistance( (sal_uInt16)rInnerDist.Bottom(), BOX_LINE_BOTTOM ); bool bFixSize = !(WW8ITEMVALUE(rOldSet, SDRATTR_TEXT_AUTOGROWHEIGHT, - SdrTextAutoGrowHeightItem)); + SdrOnOffItem)); // Size: SwFmtFrmSize if( SFX_ITEM_SET != rFlySet.GetItemState(RES_FRM_SIZE, false) ) @@ -2727,8 +2727,8 @@ SwFrmFmt* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject, aSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); aSet.Put(XLineStyleItem(XLINE_NONE)); aSet.Put(SdrTextFitToSizeTypeItem( SDRTEXTFIT_NONE )); - aSet.Put(SdrTextAutoGrowHeightItem(false)); - aSet.Put(SdrTextAutoGrowWidthItem(false)); + aSet.Put(makeSdrTextAutoGrowHeightItem(false)); + aSet.Put(makeSdrTextAutoGrowWidthItem(false)); pSdrTextObj->SetMergedItemSet(aSet); long nAngle = pRecord->nTextRotationAngle; diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 75241b7f1166..4f1f63b52da7 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -835,7 +835,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, if (GetPropertyValue(DFF_Prop_FitTextToShape) & 2) { - aSet.Put( SdrTextAutoGrowHeightItem( true ) ); + aSet.Put( makeSdrTextAutoGrowHeightItem( true ) ); aSet.Put( makeSdrTextMinFrameHeightItem( aNewRect.Bottom() - aNewRect.Top() ) ); aSet.Put( makeSdrTextMinFrameWidthItem( @@ -843,15 +843,15 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, } else { - aSet.Put( SdrTextAutoGrowHeightItem( false ) ); - aSet.Put( SdrTextAutoGrowWidthItem( false ) ); + aSet.Put( makeSdrTextAutoGrowHeightItem( false ) ); + aSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); } switch ( (MSO_WrapMode) GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) ) { case mso_wrapNone : - aSet.Put( SdrTextAutoGrowWidthItem( true ) ); + aSet.Put( makeSdrTextAutoGrowWidthItem( true ) ); pImpRec->bAutoWidth = true; break; case mso_wrapByPoints : diff --git a/sw/source/uibase/ribbar/concustomshape.cxx b/sw/source/uibase/ribbar/concustomshape.cxx index f1a70d64bcc9..0c21879ed15a 100644 --- a/sw/source/uibase/ribbar/concustomshape.cxx +++ b/sw/source/uibase/ribbar/concustomshape.cxx @@ -168,7 +168,7 @@ void ConstCustomShape::SetAttributes( SdrObject* pObj ) pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ) ); pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) ); pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) ); - pObj->SetMergedItem( SdrTextAutoGrowHeightItem( false ) ); + pObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) ); ((SdrObjCustomShape*)pObj)->MergeDefaultAttributes( &aCustomShape ); } } diff --git a/sw/source/uibase/ribbar/conrect.cxx b/sw/source/uibase/ribbar/conrect.cxx index 2b6d08caf53a..dc738b4346ee 100644 --- a/sw/source/uibase/ribbar/conrect.cxx +++ b/sw/source/uibase/ribbar/conrect.cxx @@ -85,8 +85,8 @@ bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) SfxItemSet aItemSet( pSdrView->GetModel()->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST); - aItemSet.Put( SdrTextAutoGrowWidthItem( false ) ); - aItemSet.Put( SdrTextAutoGrowHeightItem( false ) ); + aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); + aItemSet.Put( makeSdrTextAutoGrowHeightItem( false ) ); aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SCROLL ) ); aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) ); aItemSet.Put( SdrTextAniCountItem( 0 ) ); @@ -103,8 +103,8 @@ bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) pText->SetVerticalWriting(true); - aSet.Put(SdrTextAutoGrowWidthItem(true)); - aSet.Put(SdrTextAutoGrowHeightItem(false)); + aSet.Put(makeSdrTextAutoGrowWidthItem(true)); + aSet.Put(makeSdrTextAutoGrowHeightItem(false)); aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP)); aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); |