diff options
101 files changed, 619 insertions, 535 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index fba635332ad8..a478dfc9d6b0 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <com/sun/star/drawing/FillStyle.hpp> #include <unotools/pathoptions.hxx> #include <vcl/builder.hxx> #include <vcl/msgbox.hxx> @@ -130,16 +131,16 @@ static void lcl_SetTransparency(SvxBrushItem& rBrush, long nTransparency) } /// Returns the fill style of the currently selected entry. -static XFillStyle lcl_getFillStyle(ListBox* pLbSelect) +static drawing::FillStyle lcl_getFillStyle(ListBox* pLbSelect) { - return (XFillStyle)(sal_uLong)pLbSelect->GetEntryData(pLbSelect->GetSelectEntryPos()); + return (drawing::FillStyle)(sal_uLong)pLbSelect->GetEntryData(pLbSelect->GetSelectEntryPos()); } // Selects the entry matching the specified fill style. -static void lcl_setFillStyle(ListBox* pLbSelect, XFillStyle eStyle) +static void lcl_setFillStyle(ListBox* pLbSelect, drawing::FillStyle eStyle) { for (int i = 0; i < pLbSelect->GetEntryCount(); ++i) - if ((XFillStyle)(sal_uLong)pLbSelect->GetEntryData(i) == eStyle) + if ((drawing::FillStyle)(sal_uLong)pLbSelect->GetEntryData(i) == eStyle) { pLbSelect->SelectEntryPos(i); return; @@ -555,7 +556,7 @@ void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) { m_pSelectTxt->Hide(); m_pLbSelect->Hide(); - lcl_setFillStyle(m_pLbSelect, XFILL_SOLID); + lcl_setFillStyle(m_pLbSelect, drawing::FillStyle_SOLID); ShowColorUI_Impl(); const SfxPoolItem* pOld = GetOldItem( *rSet, SID_ATTR_BRUSH ); @@ -681,7 +682,7 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) } else { - lcl_setFillStyle(m_pLbSelect, XFILL_SOLID); + lcl_setFillStyle(m_pLbSelect, drawing::FillStyle_SOLID); ShowColorUI_Impl(); const SfxPoolItem* pOld = GetOldItem( rSet, SID_VIEW_FLD_PIC ); @@ -773,7 +774,7 @@ bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) { const SvxBrushItem& rOldItem = (const SvxBrushItem&)*pOld; SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos(); - const bool bIsBrush = ( XFILL_SOLID == lcl_getFillStyle(m_pLbSelect) ); + const bool bIsBrush = ( drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect) ); // transparency has to be set if enabled, the color not already set to "No fill" and if( bColTransparency && @@ -981,7 +982,7 @@ bool SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, s SvxBrushItem rOldItem( (const CntWallpaperItem&)*pOld, nWhich ); SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos(); - const bool bIsBrush = ( XFILL_SOLID == lcl_getFillStyle(m_pLbSelect) ); + const bool bIsBrush = ( drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect) ); bool bModified = false; if ( ( (GPOS_NONE == eOldPos) && bIsBrush ) @@ -1329,7 +1330,7 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, BackgroundColorHdl_Impl) IMPL_LINK_NOARG(SvxBackgroundTabPage, SelectHdl_Impl) { - if ( XFILL_SOLID == lcl_getFillStyle(m_pLbSelect) ) + if ( drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect) ) { ShowColorUI_Impl(); m_pParaLBox->Enable(); // drawing background can't be a bitmap @@ -1571,7 +1572,7 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox ) xItemHolder.reset(new SvxBrushItem(nWhich)); pActItem = xItemHolder.get(); } - if(XFILL_SOLID == lcl_getFillStyle(m_pLbSelect)) // brush selected + if(drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect)) // brush selected { *pActItem = SvxBrushItem( aBgdColor, nWhich ); } @@ -1651,7 +1652,7 @@ IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox ) return 0; } pParaBck_Impl->nActPos = nSelPos; - if(XFILL_SOLID == lcl_getFillStyle(m_pLbSelect)) // brush selected + if(drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect)) // brush selected { sal_uInt16 nWhich = pActItem->Which(); *pActItem = SvxBrushItem( aBgdColor, nWhich ); @@ -1714,7 +1715,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, if ( GPOS_NONE == ePos || !m_pLbSelect->IsVisible() ) { - lcl_setFillStyle(m_pLbSelect, XFILL_SOLID); + lcl_setFillStyle(m_pLbSelect, drawing::FillStyle_SOLID); ShowColorUI_Impl(); Color aTrColor( COL_TRANSPARENT ); aBgdColor = rColor; @@ -1751,7 +1752,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, const OUString aStrLink = rBgdAttr.GetGraphicLink(); const OUString aStrFilter = rBgdAttr.GetGraphicFilter(); - lcl_setFillStyle(m_pLbSelect, XFILL_BITMAP); + lcl_setFillStyle(m_pLbSelect, drawing::FillStyle_BITMAP); ShowBitmapUI_Impl(); if ( !aStrLink.isEmpty() ) diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 1fdcbe5a7404..cc89a4924677 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -45,6 +45,8 @@ #include "sfx2/opengrf.hxx" #include <vcl/msgbox.hxx> +using namespace com::sun::star; + // static ---------------------------------------------------------------- static const sal_uInt16 pAreaRanges[] = @@ -517,7 +519,7 @@ bool SvxTransparenceTabPage::InitPreview ( const SfxItemSet& rSet ) m_pCtlXRectPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlBitmapPreview->SetAttributes( aXFillAttr.GetItemSet() ); - bBitmap = ( ( ( XFillStyleItem& )rSet.Get(XATTR_FILLSTYLE) ).GetValue() == XFILL_BITMAP ); + bBitmap = ( ( ( XFillStyleItem& )rSet.Get(XATTR_FILLSTYLE) ).GetValue() == drawing::FillStyle_BITMAP ); // show the right preview window if ( bBitmap ) @@ -715,7 +717,7 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : ePoolUnit = pPool->GetMetric( XATTR_FILLBMP_SIZEX ); // setting the output device - rXFSet.Put( XFillStyleItem( XFILL_SOLID ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); rXFSet.Put( XFillColorItem( OUString(), COL_BLACK ) ); m_pCtlXRectPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlBitmapPreview->SetAttributes( aXFillAttr.GetItemSet() ); @@ -900,30 +902,30 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet ) } // evaluate if any other Tabpage set another filltype - if( m_pTypeLB->GetSelectEntryPos() > XFILL_NONE) + if( m_pTypeLB->GetSelectEntryPos() > drawing::FillStyle_NONE) { switch( nPageType ) { case PT_GRADIENT: - m_pTypeLB->SelectEntryPos( XFILL_GRADIENT ); + m_pTypeLB->SelectEntryPos( drawing::FillStyle_GRADIENT ); m_pLbGradient->SelectEntryPos( _nPos ); ClickGradientHdl_Impl(); break; case PT_HATCH: - m_pTypeLB->SelectEntryPos( XFILL_HATCH ); + m_pTypeLB->SelectEntryPos( drawing::FillStyle_HATCH ); m_pLbHatching->SelectEntryPos( _nPos ); ClickHatchingHdl_Impl(); break; case PT_BITMAP: - m_pTypeLB->SelectEntryPos( XFILL_BITMAP ); + m_pTypeLB->SelectEntryPos( drawing::FillStyle_BITMAP ); m_pLbBitmap->SelectEntryPos( _nPos ); ClickBitmapHdl_Impl(); break; case PT_COLOR: - m_pTypeLB->SelectEntryPos( XFILL_SOLID ); + m_pTypeLB->SelectEntryPos( drawing::FillStyle_SOLID ); m_pLbColor->SelectEntryPos( _nPos ); m_pLbHatchBckgrdColor->SelectEntryPos( _nPos ); ClickColorHdl_Impl(); @@ -942,10 +944,10 @@ int SvxAreaTabPage::DeactivatePage( SfxItemSet* _pSet ) if( nDlgType == 0 ) // area dialog { sal_Int32 nPosOrig = nPos; - XFillStyle eStyle = (XFillStyle) m_pTypeLB->GetSelectEntryPos(); + drawing::FillStyle eStyle = (drawing::FillStyle) m_pTypeLB->GetSelectEntryPos(); switch( eStyle ) { - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: { nPageType = PT_GRADIENT; nPos = m_pLbGradient->GetSelectEntryPos(); @@ -953,7 +955,7 @@ int SvxAreaTabPage::DeactivatePage( SfxItemSet* _pSet ) *pnGradientListState |= CT_MODIFIED; } break; - case XFILL_HATCH: + case drawing::FillStyle_HATCH: { nPageType = PT_HATCH; nPos = m_pLbHatching->GetSelectEntryPos(); @@ -961,7 +963,7 @@ int SvxAreaTabPage::DeactivatePage( SfxItemSet* _pSet ) *pnHatchingListState |= CT_MODIFIED; } break; - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { nPageType = PT_BITMAP; nPos = m_pLbBitmap->GetSelectEntryPos(); @@ -969,7 +971,7 @@ int SvxAreaTabPage::DeactivatePage( SfxItemSet* _pSet ) *pnBitmapListState |= CT_MODIFIED; } break; - case XFILL_SOLID: + case drawing::FillStyle_SOLID: { nPageType = PT_COLOR; nPos = m_pLbColor->GetSelectEntryPos(); @@ -997,15 +999,16 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) if( nDlgType != 0 || *pbAreaTP ) { const SfxPoolItem* pOld = NULL; - XFillStyle eStyle = (XFillStyle) m_pTypeLB->GetSelectEntryPos(); - XFillStyle eSavedStyle = (XFillStyle) m_pTypeLB->GetSavedValue(); + drawing::FillStyle eStyle = (drawing::FillStyle) m_pTypeLB->GetSelectEntryPos(); + drawing::FillStyle eSavedStyle = (drawing::FillStyle) m_pTypeLB->GetSavedValue(); switch( eStyle ) { - case XFILL_NONE: + default: + case drawing::FillStyle_NONE: { if( eSavedStyle != eStyle ) { - XFillStyleItem aStyleItem( XFILL_NONE ); + XFillStyleItem aStyleItem( drawing::FillStyle_NONE ); pOld = GetOldItem( *rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { @@ -1015,7 +1018,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) } } break; - case XFILL_SOLID: + case drawing::FillStyle_SOLID: { _nPos = m_pLbColor->GetSelectEntryPos(); if( _nPos != LISTBOX_ENTRY_NOTFOUND && @@ -1035,7 +1038,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) ( bModified || SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), true ) ) ) { - XFillStyleItem aStyleItem( XFILL_SOLID ); + XFillStyleItem aStyleItem( drawing::FillStyle_SOLID ); pOld = GetOldItem( *rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { @@ -1045,7 +1048,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) } } break; - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: { _nPos = m_pLbGradient->GetSelectEntryPos(); if( _nPos != LISTBOX_ENTRY_NOTFOUND && @@ -1066,7 +1069,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) ( bModified || SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), true ) ) ) { - XFillStyleItem aStyleItem( XFILL_GRADIENT ); + XFillStyleItem aStyleItem( drawing::FillStyle_GRADIENT ); pOld = GetOldItem( *rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { @@ -1076,7 +1079,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) } } break; - case XFILL_HATCH: + case drawing::FillStyle_HATCH: { _nPos = m_pLbHatching->GetSelectEntryPos(); if( _nPos != LISTBOX_ENTRY_NOTFOUND && @@ -1112,7 +1115,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) ( bModified || SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), true ) ) ) { - XFillStyleItem aStyleItem( XFILL_HATCH ); + XFillStyleItem aStyleItem( drawing::FillStyle_HATCH ); pOld = GetOldItem( *rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { @@ -1122,13 +1125,13 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) } } break; - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { //UUUU if(mbDirectGraphicSet && GRAPHIC_NONE != maDirectGraphic.GetType()) { const XFillBitmapItem aXBmpItem(maDirectName, maDirectGraphic); - rAttrs->Put(XFillStyleItem(XFILL_BITMAP)); + rAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP)); rAttrs->Put(aXBmpItem); bModified = true; } @@ -1153,7 +1156,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) ( bModified || SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), true ) ) ) { - XFillStyleItem aStyleItem( XFILL_BITMAP ); + XFillStyleItem aStyleItem( drawing::FillStyle_BITMAP ); pOld = GetOldItem( *rAttrs, XATTR_FILLSTYLE ); if ( !pOld || !( *(const XFillStyleItem*)pOld == aStyleItem ) ) { @@ -1442,10 +1445,10 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) bool isMissingHatching(false); bool isMissingGradient(false); bool isMissingBitmap(false); - XFillStyle eXFS; + drawing::FillStyle eXFS; if( rAttrs->GetItemState( XATTR_FILLSTYLE ) != SFX_ITEM_DONTCARE ) { - eXFS = (XFillStyle) ( ( ( const XFillStyleItem& ) rAttrs-> + eXFS = (drawing::FillStyle) ( ( ( const XFillStyleItem& ) rAttrs-> Get( GetWhich( XATTR_FILLSTYLE ) ) ).GetValue() ); m_pTypeLB->SelectEntryPos( sal::static_int_cast< sal_Int32 >( eXFS ) ); @@ -1504,24 +1507,24 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) switch( eXFS ) { - case XFILL_NONE: + case drawing::FillStyle_NONE: ClickInvisibleHdl_Impl(); break; - case XFILL_SOLID: + case drawing::FillStyle_SOLID: ClickColorHdl_Impl(); break; - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: ClickGradientHdl_Impl(); break; - case XFILL_HATCH: + case drawing::FillStyle_HATCH: ClickHatchingHdl_Impl(); ToggleHatchBckgrdColorHdl_Impl( this ); break; - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { ClickBitmapHdl_Impl(); } @@ -1730,7 +1733,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs ) m_pMtrFldYOffset->SetText( "" ); // not earlier so that tile and stretch are considered - if( m_pTypeLB->GetSelectEntryPos() == XFILL_BITMAP ) + if( m_pTypeLB->GetSelectEntryPos() == drawing::FillStyle_BITMAP ) ClickBitmapHdl_Impl(); m_pTypeLB->SaveValue(); @@ -1772,13 +1775,14 @@ const sal_uInt16* SvxAreaTabPage::GetRanges() IMPL_LINK_NOARG(SvxAreaTabPage, SelectDialogTypeHdl_Impl) { - switch( (XFillStyle)m_pTypeLB->GetSelectEntryPos() ) + switch( (drawing::FillStyle)m_pTypeLB->GetSelectEntryPos() ) { - case XFILL_NONE: ClickInvisibleHdl_Impl(); break; - case XFILL_SOLID: ClickColorHdl_Impl(); break; - case XFILL_GRADIENT: ClickGradientHdl_Impl(); break; - case XFILL_HATCH: ClickHatchingHdl_Impl(); break; - case XFILL_BITMAP: ClickBitmapHdl_Impl(); break; + default: + case drawing::FillStyle_NONE: ClickInvisibleHdl_Impl(); break; + case drawing::FillStyle_SOLID: ClickColorHdl_Impl(); break; + case drawing::FillStyle_GRADIENT: ClickGradientHdl_Impl(); break; + case drawing::FillStyle_HATCH: ClickHatchingHdl_Impl(); break; + case drawing::FillStyle_BITMAP: ClickBitmapHdl_Impl(); break; } return 0; @@ -1798,7 +1802,7 @@ void SvxAreaTabPage::ClickInvisibleHdl_Impl() // Controls for Hatch-Background m_pFlHatchBckgrd->Hide(); - rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); m_pCtlXRectPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlBitmapPreview->SetAttributes( aXFillAttr.GetItemSet() ); @@ -1839,18 +1843,18 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyColorHdl_Impl) m_pLbHatchBckgrdColor->SelectEntryPos( _nPos ); if( _nPos != LISTBOX_ENTRY_NOTFOUND ) { - rXFSet.Put( XFillStyleItem( XFILL_SOLID ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); rXFSet.Put( XFillColorItem( OUString(), m_pLbColor->GetSelectEntryColor() ) ); } // NEW else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), true, &pPoolItem ) ) { - rXFSet.Put( XFillStyleItem( XFILL_SOLID ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); Color aColor( ( ( const XFillColorItem* ) pPoolItem )->GetColorValue() ); rXFSet.Put( XFillColorItem( OUString(), aColor ) ); } else - rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); m_pCtlXRectPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlXRectPreview->Invalidate(); @@ -1897,16 +1901,16 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyGradientHdl_Impl) // fill ItemSet and pass it on to aCtlXRectPreview XGradientEntry* pEntry = pGradientList->GetGradient( _nPos ); - rXFSet.Put( XFillStyleItem( XFILL_GRADIENT ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_GRADIENT ) ); rXFSet.Put( XFillGradientItem( OUString(), pEntry->GetGradient() ) ); } else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), true, &pPoolItem ) ) { - rXFSet.Put( XFillStyleItem( XFILL_GRADIENT ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_GRADIENT ) ); rXFSet.Put( XFillGradientItem( OUString(), ( ( const XFillGradientItem* ) pPoolItem )->GetGradientValue() ) ); } else - rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); m_pCtlXRectPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlXRectPreview->Invalidate(); @@ -1953,16 +1957,16 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyHatchingHdl_Impl) // fill ItemSet and pass it on to aCtlXRectPreview XHatchEntry* pEntry = pHatchingList->GetHatch( _nPos ); - rXFSet.Put( XFillStyleItem( XFILL_HATCH ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_HATCH ) ); rXFSet.Put( XFillHatchItem( OUString(), pEntry->GetHatch() ) ); } else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), true, &pPoolItem ) ) { - rXFSet.Put( XFillStyleItem( XFILL_HATCH ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_HATCH ) ); rXFSet.Put( XFillHatchItem( OUString(), ( ( const XFillHatchItem* ) pPoolItem )->GetHatchValue() ) ); } else - rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); m_pCtlXRectPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlXRectPreview->Invalidate(); @@ -1987,7 +1991,7 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyHatchBckgrdColorHdl_Impl) rXFSet.Put( XFillColorItem( OUString(), aColor ) ); } else - rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); m_pCtlXRectPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlXRectPreview->Invalidate(); @@ -2083,16 +2087,16 @@ IMPL_LINK_NOARG(SvxAreaTabPage, ModifyBitmapHdl_Impl) // fill ItemSet and pass it on to aCtlXRectPreview const XBitmapEntry* pEntry = pBitmapList->GetBitmap(_nPos); - rXFSet.Put(XFillStyleItem(XFILL_BITMAP)); + rXFSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); rXFSet.Put(XFillBitmapItem(OUString(), pEntry->GetGraphicObject())); } else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), true, &pPoolItem ) ) { - rXFSet.Put(XFillStyleItem(XFILL_BITMAP)); + rXFSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); rXFSet.Put(XFillBitmapItem(OUString(), ((const XFillBitmapItem*)pPoolItem)->GetGraphicObject())); } else - rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); m_pCtlBitmapPreview->SetAttributes( aXFillAttr.GetItemSet() ); m_pCtlBitmapPreview->Invalidate(); @@ -2151,7 +2155,7 @@ IMPL_LINK_NOARG( SvxAreaTabPage, ClickImportHdl_Impl ) // use loaded graphic const XFillBitmapItem aXBmpItem(maDirectName, maDirectGraphic); - rXFSet.Put(XFillStyleItem(XFILL_BITMAP)); + rXFSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); rXFSet.Put(aXBmpItem); // trigger state flag for directly loaded graphic diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 953993c7a352..2cfc700b6230 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -48,6 +48,8 @@ #include "sfx2/opengrf.hxx" #include "paragrph.hrc" +using namespace com::sun::star; + SvxBitmapTabPage::SvxBitmapTabPage( Window* pParent, const SfxItemSet& rInAttrs) : SvxTabPage ( pParent, @@ -65,7 +67,7 @@ SvxBitmapTabPage::SvxBitmapTabPage( Window* pParent, const SfxItemSet& rInAttrs bBmpChanged ( false ), pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), - aXFStyleItem ( XFILL_BITMAP ), + aXFStyleItem ( drawing::FillStyle_BITMAP ), aXBitmapItem ( OUString(), Graphic() ), aXFillAttr ( pXPool ), rXFSet ( aXFillAttr.GetItemSet() ) @@ -231,7 +233,7 @@ bool SvxBitmapTabPage::FillItemSet( SfxItemSet* _rOutAttrs ) { if(PT_BITMAP == *pPageType) { - _rOutAttrs->Put(XFillStyleItem(XFILL_BITMAP)); + _rOutAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP)); sal_Int32 nPos = m_pLbBitmaps->GetSelectEntryPos(); if(LISTBOX_ENTRY_NOTFOUND != nPos) { @@ -312,9 +314,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ChangeBitmapHdl_Impl) if(SFX_ITEM_SET == rOutAttrs.GetItemState(GetWhich(XATTR_FILLSTYLE), true, &pPoolItem)) { - const XFillStyle eXFS((XFillStyle)((const XFillStyleItem*)pPoolItem)->GetValue()); + const drawing::FillStyle eXFS((drawing::FillStyle)((const XFillStyleItem*)pPoolItem)->GetValue()); - if((XFILL_BITMAP == eXFS) && (SFX_ITEM_SET == rOutAttrs.GetItemState(GetWhich(XATTR_FILLBITMAP), true, &pPoolItem))) + if((drawing::FillStyle_BITMAP == eXFS) && (SFX_ITEM_SET == rOutAttrs.GetItemState(GetWhich(XATTR_FILLBITMAP), true, &pPoolItem))) { pGraphicObject = new GraphicObject(((const XFillBitmapItem*)pPoolItem)->GetGraphicObject()); } diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 5c2ecd7bc6b4..2e016dfdcdb6 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -47,6 +47,7 @@ #include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> +using namespace com::sun::star; XPropertyListRef SvxColorTabPage::GetList() { @@ -312,7 +313,7 @@ SvxColorTabPage::SvxColorTabPage(Window* pParent, const SfxItemSet& rInAttrs) , nDlgType( 0 ) , pPos( NULL ) , pbAreaTP( NULL ) - , aXFStyleItem( XFILL_SOLID ) + , aXFStyleItem( drawing::FillStyle_SOLID ) , aXFillColorItem( OUString(), Color( COL_BLACK ) ) , aXFillAttr( (XOutdevItemPool*) rInAttrs.GetPool() ) , rXFSet( aXFillAttr.GetItemSet() ) @@ -576,7 +577,7 @@ bool SvxColorTabPage::FillItemSet( SfxItemSet* rSet ) aColor.SetColor (aCurrentColor.GetColor()); } rSet->Put( XFillColorItem( aString, aColor ) ); - rSet->Put( XFillStyleItem( XFILL_SOLID ) ); + rSet->Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); } return true; diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 96c48ffc747c..1fd7706680a7 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -42,6 +42,8 @@ #include <svx/dialogs.hrc> #include "paragrph.hrc" +using namespace com::sun::star; + SvxGradientTabPage::SvxGradientTabPage ( Window* pParent, @@ -59,7 +61,7 @@ SvxGradientTabPage::SvxGradientTabPage pbAreaTP ( 0 ), pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), - aXFStyleItem ( XFILL_GRADIENT ), + aXFStyleItem ( drawing::FillStyle_GRADIENT ), aXGradientItem ( OUString(), XGradient( COL_BLACK, COL_WHITE ) ), aXFillAttr ( pXPool ), rXFSet ( aXFillAttr.GetItemSet() ) @@ -335,7 +337,7 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet ) (sal_uInt16) m_pMtrColorTo->GetValue() ); } DBG_ASSERT( pXGradient, "XGradient konnte nicht erzeugt werden" ); - rSet->Put( XFillStyleItem( XFILL_GRADIENT ) ); + rSet->Put( XFillStyleItem( drawing::FillStyle_GRADIENT ) ); rSet->Put( XFillGradientItem( aString, *pXGradient ) ); delete pXGradient; @@ -780,7 +782,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ChangeGradientHdl_Impl) const SfxPoolItem* pPoolItem = NULL; if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), true, &pPoolItem ) ) { - if( ( XFILL_GRADIENT == (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) && + if( ( drawing::FillStyle_GRADIENT == (drawing::FillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) && ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLGRADIENT ), true, &pPoolItem ) ) ) { pGradient = new XGradient( ( ( const XFillGradientItem* ) pPoolItem )->GetGradientValue() ); diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index 0cdff356e37e..f2d591ebef6b 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -44,6 +44,8 @@ #include "paragrph.hrc" #include <svx/dialogs.hrc> +using namespace com::sun::star; + SvxHatchTabPage::SvxHatchTabPage ( Window* pParent, @@ -62,7 +64,7 @@ SvxHatchTabPage::SvxHatchTabPage pbAreaTP ( 0 ), pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), - aXFStyleItem ( XFILL_HATCH ), + aXFStyleItem ( drawing::FillStyle_HATCH ), aXHatchItem ( OUString(), XHatch() ), aXFillAttr ( pXPool ), rXFSet ( aXFillAttr.GetItemSet() ) @@ -303,7 +305,7 @@ bool SvxHatchTabPage::FillItemSet( SfxItemSet* rSet ) static_cast<long>(m_pMtrAngle->GetValue() * 10) ); } DBG_ASSERT( pXHatch, "XHatch konnte nicht erzeugt werden" ); - rSet->Put( XFillStyleItem( XFILL_HATCH ) ); + rSet->Put( XFillStyleItem( drawing::FillStyle_HATCH ) ); rSet->Put( XFillHatchItem( aString, *pXHatch ) ); delete pXHatch; @@ -393,7 +395,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ChangeHatchHdl_Impl) const SfxPoolItem* pPoolItem = NULL; if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), true, &pPoolItem ) ) { - if( ( XFILL_HATCH == (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) && + if( ( drawing::FillStyle_HATCH == (drawing::FillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue() ) && ( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLHATCH ), true, &pPoolItem ) ) ) { pHatch = new XHatch( ( ( const XFillHatchItem* ) pPoolItem )->GetHatchValue() ); diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index b623734bba4c..d1dfe228d8c2 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -35,6 +35,8 @@ #include <svx/xlineit0.hxx> #include <sfx2/request.hxx> +using namespace com::sun::star; + static const sal_uInt16 pShadowRanges[] = { SDRATTR_SHADOWCOLOR, @@ -90,16 +92,14 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs ePoolUnit = pPool->GetMetric( SDRATTR_SHADOWXDIST ); // setting the output device - XFillStyle eXFS = XFILL_SOLID; + drawing::FillStyle eXFS = drawing::FillStyle_SOLID; if( rOutAttrs.GetItemState( XATTR_FILLSTYLE ) != SFX_ITEM_DONTCARE ) { - eXFS = (XFillStyle) ( ( ( const XFillStyleItem& ) rOutAttrs. + eXFS = (drawing::FillStyle) ( ( ( const XFillStyleItem& ) rOutAttrs. Get( GetWhich( XATTR_FILLSTYLE ) ) ).GetValue() ); switch( eXFS ) { - //case XFILL_NONE: --> NOTHING - - case XFILL_SOLID: + case drawing::FillStyle_SOLID: if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLCOLOR ) ) { XFillColorItem aColorItem( ( const XFillColorItem& ) @@ -108,7 +108,7 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs } break; - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLGRADIENT ) ) { XFillGradientItem aGradientItem( ( ( const XFillGradientItem& ) @@ -117,7 +117,7 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs } break; - case XFILL_HATCH: + case drawing::FillStyle_HATCH: if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLHATCH ) ) { XFillHatchItem aHatchItem( ( ( const XFillHatchItem& ) @@ -126,7 +126,7 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs } break; - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { if( SFX_ITEM_DONTCARE != rOutAttrs.GetItemState( XATTR_FILLBITMAP ) ) { @@ -136,7 +136,8 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs } } break; - case XFILL_NONE : break; + case drawing::FillStyle_NONE : break; + default: break; } } else @@ -144,13 +145,13 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs rXFSet.Put( XFillColorItem( OUString(), COL_LIGHTRED ) ); } - if(XFILL_NONE == eXFS) + if(drawing::FillStyle_NONE == eXFS) { // #i96350# // fallback to solid fillmode when no fill mode is provided to have // a reasonable shadow preview. The used color will be a set one or // the default (currently blue8) - eXFS = XFILL_SOLID; + eXFS = drawing::FillStyle_SOLID; } rXFSet.Put( XFillStyleItem( eXFS ) ); @@ -493,9 +494,9 @@ IMPL_LINK_NOARG(SvxShadowTabPage, ClickShadowHdl_Impl) IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl) { if( m_pTsbShowShadow->GetState() == TRISTATE_TRUE ) - rXFSet.Put( XFillStyleItem( XFILL_SOLID ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); else - rXFSet.Put( XFillStyleItem( XFILL_NONE ) ); + rXFSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); sal_Int32 nPos = m_pLbShadowColor->GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index fa8672fc9c9e..0956d125faff 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -1248,16 +1248,16 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co if ( nFillFlags & 0x10 ) { MSO_FillType eMSO_FillType = (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid ); - XFillStyle eXFill = XFILL_NONE; + drawing::FillStyle eXFill = drawing::FillStyle_NONE; switch( eMSO_FillType ) { case mso_fillSolid : // Fill with a solid color - eXFill = XFILL_SOLID; + eXFill = drawing::FillStyle_SOLID; break; case mso_fillPattern : // Fill with a pattern (bitmap) case mso_fillTexture : // A texture (pattern with its own color map) case mso_fillPicture : // Center a picture in the shape - eXFill = XFILL_BITMAP; + eXFill = drawing::FillStyle_BITMAP; break; case mso_fillShadeCenter : // Shade from bounding rectangle to end point { @@ -1265,16 +1265,16 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co //But the gradient look well comparing with imported as gradient. And rotate with shape //also works better. So here just keep it. if ( rObjData.aBoundRect.IsEmpty() )// size of object needed to be able - eXFill = XFILL_GRADIENT; // to create a bitmap substitution + eXFill = drawing::FillStyle_GRADIENT; // to create a bitmap substitution else - eXFill = XFILL_BITMAP; + eXFill = drawing::FillStyle_BITMAP; } break; case mso_fillShade : // Shade from start to end points case mso_fillShadeShape : // Shade from shape outline to end point case mso_fillShadeScale : // Similar to mso_fillShade, but the fillAngle case mso_fillShadeTitle : // special type - shade to title --- for PP - eXFill = XFILL_GRADIENT; + eXFill = drawing::FillStyle_GRADIENT; break; // case mso_fillBackground : // Use the background fill color/pattern default: break; @@ -1286,7 +1286,7 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co if (IsProperty(DFF_Prop_fillOpacity)) { dTrans = GetPropertyValue(DFF_Prop_fillOpacity) / 65536.0; - if ( eXFill != XFILL_GRADIENT ) + if ( eXFill != drawing::FillStyle_GRADIENT ) { dTrans = dTrans * 100; rSet.Put(XFillTransparenceItem( @@ -1297,15 +1297,15 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co if ( IsProperty(DFF_Prop_fillBackOpacity) ) dBackTrans = GetPropertyValue(DFF_Prop_fillBackOpacity) / 65536.0; - if ( ( eMSO_FillType == mso_fillShadeCenter ) && ( eXFill == XFILL_BITMAP ) ) + if ( ( eMSO_FillType == mso_fillShadeCenter ) && ( eXFill == drawing::FillStyle_BITMAP ) ) { ApplyRectangularGradientAsBitmap( rManager, rIn, rSet, aShadeColors, rObjData, mnFix16Angle ); } - else if ( eXFill == XFILL_GRADIENT ) + else if ( eXFill == drawing::FillStyle_GRADIENT ) { ImportGradientColor ( rSet, eMSO_FillType, dTrans , dBackTrans ); } - else if ( eXFill == XFILL_BITMAP ) + else if ( eXFill == drawing::FillStyle_BITMAP ) { if( IsProperty( DFF_Prop_fillBlip ) ) { @@ -1370,7 +1370,7 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co } } else - rSet.Put( XFillStyleItem( XFILL_NONE ) ); + rSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); } void DffPropertyReader::ApplyCustomShapeTextAttributes( SfxItemSet& rSet ) const diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 3fba7dad3348..1426da8d0d77 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -1045,7 +1045,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi if ( pRet ) { pTObj->SetMergedItem( XLineStyleItem( XLINE_NONE ) ); - pTObj->SetMergedItem( XFillStyleItem( XFILL_NONE ) ); + pTObj->SetMergedItem( XFillStyleItem( drawing::FillStyle_NONE ) ); } if ( bVerticalText ) { @@ -2972,7 +2972,7 @@ SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage if ( !pSet ) { pSet.reset(new SfxItemSet( pSdrModel->GetItemPool() )); - pSet->Put( XFillStyleItem( XFILL_NONE ) ); + pSet->Put( XFillStyleItem( drawing::FillStyle_NONE ) ); } pSet->Put( XLineStyleItem( XLINE_NONE ) ); Rectangle aRect( rPage.GetLftBorder(), rPage.GetUppBorder(), rPage.GetWdt()-rPage.GetRgtBorder(), rPage.GetHgt()-rPage.GetLwrBorder() ); @@ -5578,10 +5578,10 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s pItemSet->GetItemState( XATTR_FILLSTYLE, false, &pFillStyleItem ); if ( pFillStyleItem ) { - XFillStyle eFillStyle = ((XFillStyleItem*)pFillStyleItem)->GetValue(); + drawing::FillStyle eFillStyle = ((XFillStyleItem*)pFillStyleItem)->GetValue(); switch( eFillStyle ) { - case XFILL_SOLID : + case drawing::FillStyle_SOLID : { const SfxPoolItem* pFillColorItem = NULL; pItemSet->GetItemState( XATTR_FILLCOLOR, false, &pFillColorItem ); @@ -5589,7 +5589,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s aDefColor = ((XColorItem*)pFillColorItem)->GetColorValue(); } break; - case XFILL_GRADIENT : + case drawing::FillStyle_GRADIENT : { const SfxPoolItem* pGradientItem = NULL; pItemSet->GetItemState( XATTR_FILLGRADIENT, false, &pGradientItem ); @@ -5597,8 +5597,8 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s aDefColor = ((XFillGradientItem*)pGradientItem)->GetGradientValue().GetStartColor(); } break; - case XFILL_HATCH : - case XFILL_BITMAP : + case drawing::FillStyle_HATCH : + case drawing::FillStyle_BITMAP : aDefColor = Color( COL_WHITE ); break; default: break; @@ -7267,11 +7267,11 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell ) xPropSet->setPropertyValue( sWritingMode , Any( ::com::sun::star::text::WritingMode_TB_RL ) ); } SfxItemSet aSet( pObj->GetMergedItemSet() ); - XFillStyle eFillStyle(((XFillStyleItem&)pObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue()); + drawing::FillStyle eFillStyle(((XFillStyleItem&)pObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue()); ::com::sun::star::drawing::FillStyle eFS( com::sun::star::drawing::FillStyle_NONE ); switch( eFillStyle ) { - case XFILL_SOLID : + case drawing::FillStyle_SOLID : { static const OUString sFillColor( "FillColor" ); eFS = com::sun::star::drawing::FillStyle_SOLID; @@ -7280,7 +7280,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell ) xPropSet->setPropertyValue( sFillColor, Any( nFillColor ) ); } break; - case XFILL_GRADIENT : + case drawing::FillStyle_GRADIENT : { eFS = com::sun::star::drawing::FillStyle_GRADIENT; XGradient aXGradient(((const XFillGradientItem&)pObj->GetMergedItem(XATTR_FILLGRADIENT)).GetGradientValue()); @@ -7301,10 +7301,10 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell ) xPropSet->setPropertyValue( sFillGradient, Any( aGradient ) ); } break; - case XFILL_HATCH : + case drawing::FillStyle_HATCH : eFS = com::sun::star::drawing::FillStyle_HATCH; break; - case XFILL_BITMAP : + case drawing::FillStyle_BITMAP : { eFS = com::sun::star::drawing::FillStyle_BITMAP; @@ -7326,14 +7326,15 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell ) xPropSet->setPropertyValue( "FillBitmapMode", Any( com::sun::star::drawing::BitmapMode_NO_REPEAT ) ); } break; - case XFILL_NONE : + default: + case drawing::FillStyle_NONE : eFS = com::sun::star::drawing::FillStyle_NONE; break; } static const OUString sFillStyle( "FillStyle" ); xPropSet->setPropertyValue( sFillStyle, Any( eFS ) ); - if ( eFillStyle != XFILL_NONE ) + if ( eFillStyle != drawing::FillStyle_NONE ) { sal_Int16 nFillTransparence( ( (const XFillTransparenceItem&)pObj->GetMergedItem( XATTR_FILLTRANSPARENCE ) ).GetValue() ); static const OUString sFillTransparence( "FillTransparence" ); diff --git a/include/svx/fillctrl.hxx b/include/svx/fillctrl.hxx index 8825770f5b5d..215ce4de56a8 100644 --- a/include/svx/fillctrl.hxx +++ b/include/svx/fillctrl.hxx @@ -23,6 +23,7 @@ #include <svl/lstner.hxx> #include <sfx2/tbxctrl.hxx> #include <svx/svxdllapi.h> +#include <com/sun/star/drawing/FillStyle.hpp> class XFillStyleItem; class XFillColorItem; @@ -53,7 +54,7 @@ private: SvxFillTypeBox* mpFillTypeLB; SvxFillAttrBox* mpFillAttrLB; - XFillStyle meLastXFS; + css::drawing::FillStyle meLastXFS; /// bitfield bool mbUpdate:1; @@ -93,7 +94,7 @@ private: virtual void DataChanged(const DataChangedEvent& rDCEvt) SAL_OVERRIDE; - void InitializeFillStyleAccordingToGivenFillType(XFillStyle eFillStyle); + void InitializeFillStyleAccordingToGivenFillType(css::drawing::FillStyle eFillStyle); void updateLastFillTypeControlSelectEntryPos(); void updateLastFillAttrControlSelectEntryPos(); diff --git a/include/svx/xenum.hxx b/include/svx/xenum.hxx index c405c4b14927..2f76110f64d8 100644 --- a/include/svx/xenum.hxx +++ b/include/svx/xenum.hxx @@ -23,8 +23,6 @@ enum XLineStyle { XLINE_NONE, XLINE_SOLID, XLINE_DASH }; enum XDashStyle { XDASH_RECT, XDASH_ROUND, XDASH_RECTRELATIVE, XDASH_ROUNDRELATIVE }; -enum XFillStyle { XFILL_NONE, XFILL_SOLID, XFILL_GRADIENT, XFILL_HATCH, - XFILL_BITMAP }; enum XGradientStyle { XGRAD_LINEAR, XGRAD_AXIAL, XGRAD_RADIAL, XGRAD_ELLIPTICAL, XGRAD_SQUARE, XGRAD_RECT }; enum XHatchStyle { XHATCH_SINGLE, XHATCH_DOUBLE, XHATCH_TRIPLE }; diff --git a/include/svx/xfillit0.hxx b/include/svx/xfillit0.hxx index 51edf4e2e7b0..1c28fc15824d 100644 --- a/include/svx/xfillit0.hxx +++ b/include/svx/xfillit0.hxx @@ -25,6 +25,7 @@ #include <svx/xdef.hxx> #include <svx/xenum.hxx> #include <svx/svxdllapi.h> +#include <com/sun/star/drawing/FillStyle.hpp> // class XFillStyleItem @@ -34,7 +35,7 @@ class SVX_DLLPUBLIC XFillStyleItem : public SfxEnumItem { public: TYPEINFO_OVERRIDE(); - XFillStyleItem(XFillStyle = XFILL_SOLID); + XFillStyleItem(css::drawing::FillStyle = css::drawing::FillStyle_SOLID); XFillStyleItem(SvStream& rIn); virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const SAL_OVERRIDE; @@ -48,7 +49,7 @@ public: SfxMapUnit ePresMetric, OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE; virtual sal_uInt16 GetValueCount() const SAL_OVERRIDE; - XFillStyle GetValue() const { return (XFillStyle) SfxEnumItem::GetValue(); } + css::drawing::FillStyle GetValue() const { return (css::drawing::FillStyle) SfxEnumItem::GetValue(); } }; #endif diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 49f04cdc1814..b89c22b80ad9 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -48,6 +48,8 @@ #include <utility> +using namespace com::sun::star; + namespace { const long SC_NOTECAPTION_WIDTH = 2900; /// Default width of note caption textbox. @@ -113,7 +115,7 @@ void ScCaptionUtil::SetDefaultItems( SdrCaptionObj& rCaption, ScDocument& rDoc ) aItemSet.Put( XLineStartItem( OUString(), ::basegfx::B2DPolyPolygon( aTriangle ) ) ); aItemSet.Put( XLineStartWidthItem( 200 ) ); aItemSet.Put( XLineStartCenterItem( false ) ); - aItemSet.Put( XFillStyleItem( XFILL_SOLID ) ); + aItemSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); aItemSet.Put( XFillColorItem( OUString(), ScDetectiveFunc::GetCommentColor() ) ); aItemSet.Put( SdrCaptionEscDirItem( SDRCAPT_ESCBESTFIT ) ); diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index 39e4bbd531ef..a4ac8cb6f619 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -73,6 +73,7 @@ #include <boost/scoped_array.hpp> using ::std::vector; +using namespace com::sun::star; // line ends are now created with an empty name. // The checkForUniqueItem method then finds a unique name for the item's value. @@ -141,7 +142,7 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) : nMaxLevel = 0; aBoxSet.Put( XLineColorItem( EMPTY_OUSTRING, Color( ScDetectiveFunc::GetArrowColor() ) ) ); - aBoxSet.Put( XFillStyleItem( XFILL_NONE ) ); + aBoxSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); // Standard-Linienenden (wie aus XLineEndList::Create) selber zusammenbasteln, // um von den konfigurierten Linienenden unabhaengig zu sein @@ -186,7 +187,7 @@ ScDetectiveData::ScDetectiveData( SdrModel* pModel ) : aFromTabSet.Put( XLineEndCenterItem( false ) ); aCircleSet.Put( XLineColorItem( OUString(), Color( ScDetectiveFunc::GetErrorColor() ) ) ); - aCircleSet.Put( XFillStyleItem( XFILL_NONE ) ); + aCircleSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); sal_uInt16 nWidth = 55; // 54 = 1 Pixel aCircleSet.Put( XLineWidthItem( nWidth ) ); } @@ -205,7 +206,7 @@ ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) : aCaptionSet.Put( XLineStartItem( aName, basegfx::B2DPolyPolygon(aTriangle) ) ); aCaptionSet.Put( XLineStartWidthItem( 200 ) ); aCaptionSet.Put( XLineStartCenterItem( false ) ); - aCaptionSet.Put( XFillStyleItem( XFILL_SOLID ) ); + aCaptionSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); Color aYellow( ScDetectiveFunc::GetCommentColor() ); aCaptionSet.Put( XFillColorItem( OUString(), aYellow ) ); diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 3b6a2f8d02b0..1223057cba01 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -80,6 +80,7 @@ #include <oox/export/utils.hxx> #include <boost/shared_ptr.hpp> +using namespace com::sun::star; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; @@ -1234,7 +1235,7 @@ XclExpNote::XclExpNote( const XclExpRoot& rRoot, const ScAddress& rScPos, // AutoFill style would change if Postit.cxx object creation values are changed OUString aCol(((XFillColorItem &)GETITEM(aItemSet, XFillColorItem , XATTR_FILLCOLOR)).GetValue()); - mbAutoFill = aCol.isEmpty() && (GETITEMVALUE(aItemSet, XFillStyleItem, XATTR_FILLSTYLE, sal_uLong) == XFILL_SOLID); + mbAutoFill = aCol.isEmpty() && (GETITEMVALUE(aItemSet, XFillStyleItem, XATTR_FILLSTYLE, sal_uLong) == drawing::FillStyle_SOLID); mbAutoLine = true; mbRowHidden = (rRoot.GetDoc().RowHidden(maScPos.Row(),maScPos.Tab())); mbColHidden = (rRoot.GetDoc().ColHidden(maScPos.Col(),maScPos.Tab())); diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 86f14a106ca3..e9366ff6be3c 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -110,6 +110,7 @@ #include <boost/shared_ptr.hpp> #include <sfx2/docfile.hxx> +using namespace com::sun::star; using ::com::sun::star::uno::makeAny; using ::com::sun::star::uno::Any; using ::com::sun::star::beans::XPropertySet; @@ -702,7 +703,7 @@ void XclImpDrawObjBase::ConvertFillStyle( SdrObject& rSdrObj, const XclObjFillDa } else if( rFillData.mnPattern == EXC_PATT_NONE ) { - rSdrObj.SetMergedItem( XFillStyleItem( XFILL_NONE ) ); + rSdrObj.SetMergedItem( XFillStyleItem( drawing::FillStyle_NONE ) ); } else { @@ -710,7 +711,7 @@ void XclImpDrawObjBase::ConvertFillStyle( SdrObject& rSdrObj, const XclObjFillDa Color aBackColor = GetPalette().GetColor( rFillData.mnBackColorIdx ); if( (rFillData.mnPattern == EXC_PATT_SOLID) || (aPattColor == aBackColor) ) { - rSdrObj.SetMergedItem( XFillStyleItem( XFILL_SOLID ) ); + rSdrObj.SetMergedItem( XFillStyleItem( drawing::FillStyle_SOLID ) ); rSdrObj.SetMergedItem( XFillColorItem( EMPTY_OUSTRING, aPattColor ) ); } else @@ -757,7 +758,7 @@ void XclImpDrawObjBase::ConvertFillStyle( SdrObject& rSdrObj, const XclObjFillDa aXOBitmap.Array2Bitmap(); aBitmap = aXOBitmap.GetBitmap(); - rSdrObj.SetMergedItem(XFillStyleItem(XFILL_BITMAP)); + rSdrObj.SetMergedItem(XFillStyleItem(drawing::FillStyle_BITMAP)); rSdrObj.SetMergedItem(XFillBitmapItem(EMPTY_OUSTRING, Graphic(aBitmap))); } } diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx index de9b15711333..52307ac5b2f5 100644 --- a/sc/source/filter/excel/xlchart.cxx +++ b/sc/source/filter/excel/xlchart.cxx @@ -50,6 +50,7 @@ #include "xlroot.hxx" #include "xlstyle.hxx" +using namespace com::sun::star; using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::UNO_QUERY; @@ -1021,7 +1022,7 @@ void XclChPropSetHelper::WriteEscherProperties( ScfPropertySet& rPropSet, { switch( pStyleItem->GetValue() ) { - case XFILL_SOLID: + case drawing::FillStyle_SOLID: // #i84812# Excel 2007 writes Escher properties for solid fill if( const XFillColorItem* pColorItem = static_cast< const XFillColorItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLCOLOR, false ) ) ) { @@ -1035,7 +1036,7 @@ void XclChPropSetHelper::WriteEscherProperties( ScfPropertySet& rPropSet, rAreaHlp.WriteToPropertySet( rPropSet ); } break; - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: if( const XFillGradientItem* pGradItem = static_cast< const XFillGradientItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLGRADIENT, false ) ) ) { Any aGradientAny; @@ -1053,7 +1054,7 @@ void XclChPropSetHelper::WriteEscherProperties( ScfPropertySet& rPropSet, } } break; - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: if( const XFillBitmapItem* pBmpItem = static_cast< const XFillBitmapItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLBITMAP, false ) ) ) { Any aBitmapAny; diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx index 9acf314744d7..ce2e45294f4d 100644 --- a/sc/source/ui/drawfunc/fuconcustomshape.cxx +++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx @@ -35,6 +35,8 @@ #include <math.h> +using namespace com::sun::star; + FuConstCustomShape::FuConstCustomShape( ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pViewP, SdrModel* pDoc, SfxRequest& rReq ) : FuConstruct( pViewSh, pWin, pViewP, pDoc, rReq ) { @@ -88,7 +90,7 @@ bool FuConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) if ( ((SdrObjCustomShape*)pObj)->UseNoFillStyle() ) bForceNoFillStyle = true; if ( bForceNoFillStyle ) - pObj->SetMergedItem( XFillStyleItem( XFILL_NONE ) ); + pObj->SetMergedItem( XFillStyleItem( drawing::FillStyle_NONE ) ); pObj->SetGridOffset( aGridOff ); } diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index 7f4ef96f6ae9..2dc101875926 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -975,7 +975,7 @@ SdrObject* ScDrawView::ApplyGraphicToObject( SfxItemSet aSet(GetModel()->GetItemPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP); - aSet.Put(XFillStyleItem(XFILL_BITMAP)); + aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); aSet.Put(XFillBitmapItem(OUString(), rGraphic)); rHitObject.SetMergedItemSetAndBroadcast(aSet); return &rHitObject; diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 51b5fcc1af17..d1ae4e875a71 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -423,7 +423,7 @@ void SdFiltersTest::testFdo77027() // check that the fill style/color was actually imported const XFillStyleItem& rStyleItem = dynamic_cast<const XFillStyleItem&>( pObj->GetMergedItem(XATTR_FILLSTYLE)); - CPPUNIT_ASSERT_EQUAL(XFILL_SOLID, rStyleItem.GetValue()); + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, rStyleItem.GetValue()); const XFillColorItem& rColorItem = dynamic_cast<const XFillColorItem&>( pObj->GetMergedItem(XATTR_FILLCOLOR)); CPPUNIT_ASSERT_EQUAL(Color(0xff6600), rColorItem.GetColorValue()); diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 59c7832a7977..11a20a10a081 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -163,7 +163,7 @@ void SdDrawDocument::CreateLayoutTemplates() rISet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_BLOCK)); // Fill attributes (Extended OutputDevice) - rISet.Put(XFillStyleItem(XFILL_SOLID)); + rISet.Put(XFillStyleItem(drawing::FillStyle_SOLID)); rISet.Put(XFillColorItem(OUString(), RGB_Color(COL_DEFAULT_SHAPE_FILLING))); rISet.Put( XFillGradientItem( aNullGrad) ); @@ -295,7 +295,7 @@ void SdDrawDocument::CreateLayoutTemplates() pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJWITHOUTFILL ); pISet = &pSheet->GetItemSet(); - pISet->Put(XFillStyleItem(XFILL_NONE)); + pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); pISet->Put(XLineColorItem(OUString(), RGB_Color(COL_BLACK))); // Object no fill no line @@ -306,7 +306,7 @@ void SdDrawDocument::CreateLayoutTemplates() pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJNOLINENOFILL ); pISet = &pSheet->GetItemSet(); - pISet->Put(XFillStyleItem(XFILL_NONE)); + pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); pISet->Put(XLineStyleItem(XLINE_NONE)); // Text @@ -318,7 +318,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet = &pSheet->GetItemSet(); pISet->Put(XLineStyleItem(XLINE_NONE)); - pISet->Put(XFillStyleItem(XFILL_NONE)); + pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); // Text body aName = SD_RESSTR(STR_POOLSHEET_TEXTBODY); @@ -328,7 +328,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet = &pSheet->GetItemSet(); pISet->Put(XLineStyleItem(XLINE_NONE)); - pISet->Put(XFillStyleItem(XFILL_NONE)); + pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); pISet->Put(SvxFontHeightItem(564, 100, EE_CHAR_FONTHEIGHT)); // 16 pt @@ -340,7 +340,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet = &pSheet->GetItemSet(); pISet->Put(XLineStyleItem(XLINE_NONE)); - pISet->Put(XFillStyleItem(XFILL_NONE)); + pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); pISet->Put(SvxAdjustItem(SVX_ADJUST_BLOCK, EE_PARA_JUST )); @@ -352,7 +352,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet = &pSheet->GetItemSet(); pISet->Put(XLineStyleItem(XLINE_NONE)); - pISet->Put(XFillStyleItem(XFILL_NONE)); + pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); SvxLRSpaceItem aLRSpaceItem( EE_PARA_LRSPACE ); aLRSpaceItem.SetTxtFirstLineOfst(600); // Indentation of first line: 6mm; right: 0 @@ -367,7 +367,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet = &pSheet->GetItemSet(); pISet->Put(XLineStyleItem(XLINE_NONE)); - pISet->Put(XFillStyleItem(XFILL_NONE)); + pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); pISet->Put(SvxFontHeightItem(1551, 100, EE_CHAR_FONTHEIGHT )); // 44 pt @@ -379,7 +379,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet = &pSheet->GetItemSet(); pISet->Put(XLineStyleItem(XLINE_NONE)); - pISet->Put(XFillStyleItem(XFILL_SOLID)); + pISet->Put(XFillStyleItem(drawing::FillStyle_SOLID)); pISet->Put(XFillColorItem(OUString(), RGB_Color(COL_CYAN))); pISet->Put(SdrShadowItem(true)); @@ -429,7 +429,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet = &pSheet->GetItemSet(); pISet->Put(XLineStyleItem(XLINE_NONE)); - pISet->Put(XFillStyleItem(XFILL_NONE)); + pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); pISet->Put(SvxFontHeightItem(846, 100, EE_CHAR_FONTHEIGHT )); // 24 pt @@ -444,7 +444,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet = &pSheet->GetItemSet(); pISet->Put(XLineStyleItem(XLINE_NONE)); - pISet->Put(XFillStyleItem(XFILL_NONE)); + pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); pISet->Put(SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT )); @@ -461,7 +461,7 @@ void SdDrawDocument::CreateLayoutTemplates() pISet = &pSheet->GetItemSet(); pISet->Put(XLineStyleItem(XLINE_NONE)); - pISet->Put(XFillStyleItem(XFILL_NONE)); + pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); pISet->Put(SvxPostureItem(ITALIC_NORMAL, EE_CHAR_ITALIC )); pISet->Put(SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT)); @@ -478,7 +478,7 @@ void SdDrawDocument::CreateLayoutTemplates() pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_MEASURE ); pISet = &pSheet->GetItemSet(); - pISet->Put(XFillStyleItem(XFILL_NONE)); + pISet->Put(XFillStyleItem(drawing::FillStyle_NONE)); pISet->Put(XLineColorItem(OUString(), RGB_Color(COL_BLACK))); pISet->Put(SvxFontHeightItem(423, 100, EE_CHAR_FONTHEIGHT )); // 12 pt @@ -500,7 +500,7 @@ static Any implMakeSolidCellStyle( SdStyleSheetPool* pSSPool, const OUString& rN SfxStyleSheetBase* pSheet = &(pSSPool->Make(rName, SD_STYLE_FAMILY_CELL, SFXSTYLEBIT_AUTO)); pSheet->SetParent(rParent); SfxItemSet* pISet = &pSheet->GetItemSet(); - pISet->Put(XFillStyleItem(XFILL_SOLID)); + pISet->Put(XFillStyleItem(drawing::FillStyle_SOLID)); pISet->Put(XFillColorItem(OUString(), rColor)); return Any( Reference< XStyle >( static_cast< XWeak* >( pSheet ), UNO_QUERY ) ); @@ -557,7 +557,7 @@ void SdDrawDocument::CreateDefaultCellStyles() aNullGrad.SetEndIntens( 100 ); XHatch aNullHatch(aNullCol); - rISet.Put(XFillStyleItem(XFILL_SOLID)); + rISet.Put(XFillStyleItem(drawing::FillStyle_SOLID)); rISet.Put(XFillColorItem(OUString(), RGB_Color(0x00ccccff))); Font aLatinFont, aCJKFont, aCTLFont; diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index bfe91d37ceb9..a33bdccb4c85 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -232,9 +232,9 @@ void SdPage::EnsureMasterPageDefaultBackground() } else { - // no style found, assert and set at least XFILL_NONE + // no style found, assert and set at least drawing::FillStyle_NONE OSL_FAIL("No Style for MasterPageBackground fill found (!)"); - getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); + getSdrPageProperties().PutItem(XFillStyleItem(drawing::FillStyle_NONE)); } } } diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 77e2e026400e..bee0b1efd394 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -66,6 +66,7 @@ #include <svl/itemset.hxx> #include "app.hrc" +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::style; @@ -252,7 +253,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool rSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR) ); rSet.Put( SvxBackgroundColorItem( Color (COL_AUTO), EE_CHAR_BKGCOLOR ) ); rSet.Put( XLineStyleItem(XLINE_NONE) ); - rSet.Put( XFillStyleItem(XFILL_NONE) ); + rSet.Put( XFillStyleItem(drawing::FillStyle_NONE) ); rSet.Put( SdrTextFitToSizeTypeItem(SDRTEXTFIT_AUTOFIT) ); rSet.Put( SdrTextAutoGrowHeightItem(false) ); // #i16874# enable kerning by default but only for new documents @@ -346,7 +347,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool pSheet->SetParent( OUString() ); SfxItemSet& rTitleSet = pSheet->GetItemSet(); rTitleSet.Put(XLineStyleItem(XLINE_NONE)); - rTitleSet.Put(XFillStyleItem(XFILL_NONE)); + rTitleSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); rTitleSet.Put(aSvxFontItem); rTitleSet.Put(aSvxFontItemCJK); rTitleSet.Put(aSvxFontItemCTL); @@ -392,7 +393,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool pSheet->SetParent( OUString() ); SfxItemSet& rSubtitleSet = pSheet->GetItemSet(); rSubtitleSet.Put(XLineStyleItem(XLINE_NONE)); - rSubtitleSet.Put(XFillStyleItem(XFILL_NONE)); + rSubtitleSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); rSubtitleSet.Put(aSvxFontItem); rSubtitleSet.Put(aSvxFontItemCJK); rSubtitleSet.Put(aSvxFontItemCTL); @@ -441,7 +442,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool pSheet->SetParent( OUString() ); SfxItemSet& rNotesSet = pSheet->GetItemSet(); rNotesSet.Put(XLineStyleItem(XLINE_NONE)); - rNotesSet.Put(XFillStyleItem(XFILL_NONE)); + rNotesSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); rNotesSet.Put(aSvxFontItem); rNotesSet.Put(aSvxFontItemCJK); rNotesSet.Put(aSvxFontItemCTL); @@ -508,7 +509,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool pSheet->SetParent( OUString() ); SfxItemSet& rBackgroundSet = pSheet->GetItemSet(); rBackgroundSet.Put(XLineStyleItem(XLINE_NONE)); - rBackgroundSet.Put(XFillStyleItem(XFILL_NONE)); + rBackgroundSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); // #i16874# enable kerning by default but only for new documents rBackgroundSet.Put( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) ); } diff --git a/sd/source/filter/cgm/sdcgmfilter.cxx b/sd/source/filter/cgm/sdcgmfilter.cxx index 1e4159023abb..eeb0107c353a 100644 --- a/sd/source/filter/cgm/sdcgmfilter.cxx +++ b/sd/source/filter/cgm/sdcgmfilter.cxx @@ -35,6 +35,7 @@ #define CGM_BIG_ENDIAN 0x00020000 +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::task; using namespace ::com::sun::star::frame; @@ -98,7 +99,7 @@ bool SdCGMFilter::Import() // set PageFill to given color const Color aColor((sal_uInt8)(nRetValue >> 16), (sal_uInt8)(nRetValue >> 8), (sal_uInt8)(nRetValue >> 16)); pSdPage->getSdrPageProperties().PutItem(XFillColorItem(OUString(), aColor)); - pSdPage->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_SOLID)); + pSdPage->getSdrPageProperties().PutItem(XFillStyleItem(drawing::FillStyle_SOLID)); } } } diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 82303cf9cded..e5e637721535 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -2564,10 +2564,10 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi { const SfxItemSet& rObjItemSet = pObj->GetMergedItemSet(); - XFillStyle eFillStyle = ((XFillStyleItem&)(rObjItemSet.Get(XATTR_FILLSTYLE))).GetValue(); + drawing::FillStyle eFillStyle = ((XFillStyleItem&)(rObjItemSet.Get(XATTR_FILLSTYLE))).GetValue(); XLineStyle eLineStyle = ((XLineStyleItem&)(rObjItemSet.Get(XATTR_LINESTYLE))).GetValue(); - if ( ( eFillStyle == XFILL_NONE ) && ( eLineStyle == XLINE_NONE ) ) + if ( ( eFillStyle == drawing::FillStyle_NONE ) && ( eLineStyle == XLINE_NONE ) ) bDontAnimateInvisibleShape = true; } } diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index 29ecd77b1f81..19b3f5ac0716 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -57,6 +57,7 @@ #include <svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx> using ::sdr::PolyPolygonEditor; +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::util; @@ -360,7 +361,7 @@ MotionPathTag::MotionPathTag( CustomAnimationPane& rPane, ::sd::View& rView, con mpPathObj->SetMergedItem( XLineDashItem( aEmpty, aDash ) ); mpPathObj->SetMergedItem( XLineStyleItem( XLINE_DASH ) ); mpPathObj->SetMergedItem( XLineColorItem(aEmpty, ::Color(COL_GRAY)) ); - mpPathObj->SetMergedItem( XFillStyleItem( XFILL_NONE ) ); + mpPathObj->SetMergedItem( XFillStyleItem( drawing::FillStyle_NONE ) ); ::basegfx::B2DPolygon aStartArrow; aStartArrow.append(::basegfx::B2DPoint(20.0, 0.0)); diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx index efe77093e9c4..f8895e2efb71 100644 --- a/sd/source/ui/dlg/morphdlg.cxx +++ b/sd/source/ui/dlg/morphdlg.cxx @@ -30,6 +30,8 @@ #include <svl/itemset.hxx> #include <svl/itempool.hxx> +using namespace com::sun::star; + namespace sd { MorphDlg::MorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2 ) @@ -51,11 +53,11 @@ MorphDlg::MorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* const XLineStyle eLineStyle1 = ( (const XLineStyleItem&) aSet1.Get( XATTR_LINESTYLE ) ).GetValue(); const XLineStyle eLineStyle2 = ( (const XLineStyleItem&) aSet2.Get( XATTR_LINESTYLE ) ).GetValue(); - const XFillStyle eFillStyle1 = ( (const XFillStyleItem&) aSet1.Get( XATTR_FILLSTYLE ) ).GetValue(); - const XFillStyle eFillStyle2 = ( (const XFillStyleItem&) aSet2.Get( XATTR_FILLSTYLE ) ).GetValue(); + const drawing::FillStyle eFillStyle1 = ( (const XFillStyleItem&) aSet1.Get( XATTR_FILLSTYLE ) ).GetValue(); + const drawing::FillStyle eFillStyle2 = ( (const XFillStyleItem&) aSet2.Get( XATTR_FILLSTYLE ) ).GetValue(); if ( ( ( eLineStyle1 == XLINE_NONE ) || ( eLineStyle2 == XLINE_NONE ) ) && - ( ( eFillStyle1 != XFILL_SOLID ) || ( eFillStyle2 != XFILL_SOLID ) ) ) + ( ( eFillStyle1 != drawing::FillStyle_SOLID ) || ( eFillStyle2 != drawing::FillStyle_SOLID ) ) ) { m_pCbxAttributes->Disable(); } diff --git a/sd/source/ui/func/fuconarc.cxx b/sd/source/ui/func/fuconarc.cxx index b044b454bc13..461eee36dec9 100644 --- a/sd/source/ui/func/fuconarc.cxx +++ b/sd/source/ui/func/fuconarc.cxx @@ -41,6 +41,8 @@ #include <svx/sxciaitm.hxx> +using namespace com::sun::star; + namespace sd { TYPEINIT1( FuConstructArc, FuConstruct ); @@ -251,7 +253,7 @@ SdrObject* FuConstructArc::CreateDefaultObject(const sal_uInt16 nID, const Recta SID_DRAW_ELLIPSECUT_NOFILL == nID || SID_DRAW_CIRCLECUT_NOFILL == nID) { - aAttr.Put(XFillStyleItem(XFILL_NONE)); + aAttr.Put(XFillStyleItem(drawing::FillStyle_NONE)); } pObj->SetMergedItemSet(aAttr); diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx index b77aad877b74..8a16803424af 100644 --- a/sd/source/ui/func/fuconstr.cxx +++ b/sd/source/ui/func/fuconstr.cxx @@ -40,6 +40,8 @@ #include "stlpool.hxx" #include <svx/globl3d.hxx> +using namespace com::sun::star; + namespace sd { TYPEINIT1( FuConstruct, FuDraw ); @@ -348,13 +350,13 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj, const XFillStyleItem& rFillStyle = (const XFillStyleItem&)rSet.Get(XATTR_FILLSTYLE); if ( bForceFillStyle ) { - if (rFillStyle.GetValue() == XFILL_NONE) - rAttr.Put(XFillStyleItem(XFILL_SOLID)); + if (rFillStyle.GetValue() == drawing::FillStyle_NONE) + rAttr.Put(XFillStyleItem(drawing::FillStyle_SOLID)); } else if ( bForceNoFillStyle ) { - if (rFillStyle.GetValue() != XFILL_NONE) - rAttr.Put(XFillStyleItem(XFILL_NONE)); + if (rFillStyle.GetValue() != drawing::FillStyle_NONE) + rAttr.Put(XFillStyleItem(drawing::FillStyle_NONE)); } } } @@ -380,7 +382,7 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj, else { SfxItemSet aAttr(*mpView->GetDefaultAttr().Clone()); - rAttr.Put(XFillStyleItem(XFILL_NONE)); + rAttr.Put(XFillStyleItem(drawing::FillStyle_NONE)); pObj->SetMergedItemSet(aAttr); } } diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index 800ce2f78be8..a93d7ded0d6f 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -40,6 +40,8 @@ #include "sdabstdlg.hxx" #include <boost/scoped_ptr.hpp> +using namespace com::sun::star; + namespace sd { TYPEINIT1( FuCopy, FuPoor ); @@ -84,9 +86,9 @@ void FuCopy::DoExecute( SfxRequest& rReq ) if( SFX_ITEM_SET == aAttr.GetItemState( XATTR_FILLSTYLE, true, &pPoolItem ) ) { - XFillStyle eStyle = ( ( const XFillStyleItem* ) pPoolItem )->GetValue(); + drawing::FillStyle eStyle = ( ( const XFillStyleItem* ) pPoolItem )->GetValue(); - if( eStyle == XFILL_SOLID && + if( eStyle == drawing::FillStyle_SOLID && SFX_ITEM_SET == aAttr.GetItemState( XATTR_FILLCOLOR, true, &pPoolItem ) ) { const XFillColorItem* pItem = ( const XFillColorItem* ) pPoolItem; @@ -209,7 +211,7 @@ void FuCopy::DoExecute( SfxRequest& rReq ) if( ( 1 == i ) && bColor ) { SfxItemSet aNewSet( mpViewShell->GetPool(), XATTR_FILLSTYLE, XATTR_FILLCOLOR, 0L ); - aNewSet.Put( XFillStyleItem( XFILL_SOLID ) ); + aNewSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); aNewSet.Put( XFillColorItem( OUString(), aStartColor ) ); mpView->SetAttributes( aNewSet ); } @@ -271,7 +273,7 @@ void FuCopy::DoExecute( SfxRequest& rReq ) sal_uInt8 nBlue = aStartColor.GetBlue() + (sal_uInt8) ( ( (long) aEndColor.GetBlue() - (long) aStartColor.GetBlue() ) * (long) i / (long) nNumber ); Color aNewColor( nRed, nGreen, nBlue ); SfxItemSet aNewSet( mpViewShell->GetPool(), XATTR_FILLSTYLE, XATTR_FILLCOLOR, 0L ); - aNewSet.Put( XFillStyleItem( XFILL_SOLID ) ); + aNewSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); aNewSet.Put( XFillColorItem( OUString(), aNewColor ) ); mpView->SetAttributes( aNewSet ); } diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx index 1c058089d46f..83cc83713cf9 100644 --- a/sd/source/ui/func/fuexpand.cxx +++ b/sd/source/ui/func/fuexpand.cxx @@ -43,6 +43,8 @@ #include <sfx2/dispatch.hxx> #include <editeng/eeitem.hxx> +using namespace com::sun::star; + namespace sd { TYPEINIT1( FuExpandPage, FuPoor ); @@ -238,7 +240,7 @@ void FuExpandPage::DoExecute( SfxRequest& ) // remove hard attributes (Flag to sal_True) SfxItemSet aAttr(mpDoc->GetPool()); aAttr.Put(XLineStyleItem(XLINE_NONE)); - aAttr.Put(XFillStyleItem(XFILL_NONE)); + aAttr.Put(XFillStyleItem(drawing::FillStyle_NONE)); pOutlineObj->SetMergedItemSet(aAttr); } } diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx index 799ceb7f1a48..5aa763ab8864 100644 --- a/sd/source/ui/func/fumorph.cxx +++ b/sd/source/ui/func/fumorph.cxx @@ -45,6 +45,8 @@ #include <basegfx/color/bcolor.hxx> #include <boost/scoped_ptr.hpp> +using namespace com::sun::star; + namespace sd { #define ITEMVALUE( ItemSet, Id, Cast ) ( ( (const Cast&) (ItemSet).Get( (Id) ) ).GetValue() ) @@ -354,8 +356,8 @@ void FuMorph::ImpInsertPolygons( const XLineStyle eLineStyle1 = ITEMVALUE( aSet1, XATTR_LINESTYLE, XLineStyleItem ); const XLineStyle eLineStyle2 = ITEMVALUE( aSet2, XATTR_LINESTYLE, XLineStyleItem ); - const XFillStyle eFillStyle1 = ITEMVALUE( aSet1, XATTR_FILLSTYLE, XFillStyleItem ); - const XFillStyle eFillStyle2 = ITEMVALUE( aSet2, XATTR_FILLSTYLE, XFillStyleItem ); + const drawing::FillStyle eFillStyle1 = ITEMVALUE( aSet1, XATTR_FILLSTYLE, XFillStyleItem ); + const drawing::FillStyle eFillStyle2 = ITEMVALUE( aSet2, XATTR_FILLSTYLE, XFillStyleItem ); if ( bAttributeFade ) { @@ -374,7 +376,7 @@ void FuMorph::ImpInsertPolygons( else if ( ( eLineStyle1 == XLINE_NONE ) && ( eLineStyle2 == XLINE_NONE ) ) bIgnoreLine = true; - if ( ( eFillStyle1 == XFILL_SOLID ) && ( eFillStyle2 == XFILL_SOLID ) ) + if ( ( eFillStyle1 == drawing::FillStyle_SOLID ) && ( eFillStyle2 == drawing::FillStyle_SOLID ) ) { bFillColor = true; aStartFillCol = static_cast< XFillColorItem const & >( @@ -382,7 +384,7 @@ void FuMorph::ImpInsertPolygons( aEndFillCol = static_cast< XFillColorItem const & >( aSet2.Get(XATTR_FILLCOLOR)).GetColorValue(); } - else if ( ( eFillStyle1 == XFILL_NONE ) && ( eFillStyle2 == XFILL_NONE ) ) + else if ( ( eFillStyle1 == drawing::FillStyle_NONE ) && ( eFillStyle2 == drawing::FillStyle_NONE ) ) bIgnoreFill = true; } @@ -397,7 +399,7 @@ void FuMorph::ImpInsertPolygons( double fFactor = fStep; aSet.Put( XLineStyleItem( XLINE_SOLID ) ); - aSet.Put( XFillStyleItem( XFILL_SOLID ) ); + aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); for ( size_t i = 0; i < nCount; i++, fFactor += fStep ) { @@ -420,7 +422,7 @@ void FuMorph::ImpInsertPolygons( aSet.Put( XFillColorItem( aEmptyStr, Color(aFillColor))); } else if ( bIgnoreFill ) - aSet.Put( XFillStyleItem( XFILL_NONE ) ); + aSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); // line width if ( bLineWidth ) diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 3337c8e276c1..bd11ce897861 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -69,6 +69,8 @@ #include <boost/scoped_ptr.hpp> +using namespace com::sun::star; + namespace sd { class Window; @@ -255,7 +257,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) // Only this page, get attributes for background fill const SfxItemSet& rBackgroundAttributes = mpPage->getSdrPageProperties().GetItemSet(); - if(XFILL_NONE != ((const XFillStyleItem&)rBackgroundAttributes.Get(XATTR_FILLSTYLE)).GetValue()) + if(drawing::FillStyle_NONE != ((const XFillStyleItem&)rBackgroundAttributes.Get(XATTR_FILLSTYLE)).GetValue()) { // page attributes are used, take them aMergedAttr.Put(rBackgroundAttributes); @@ -263,7 +265,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) else { if(pStyleSheet - && XFILL_NONE != ((const XFillStyleItem&)pStyleSheet->GetItemSet().Get(XATTR_FILLSTYLE)).GetValue()) + && drawing::FillStyle_NONE != ((const XFillStyleItem&)pStyleSheet->GetItemSet().Get(XATTR_FILLSTYLE)).GetValue()) { // if the page has no fill style, use the settings from the // background stylesheet (if used) @@ -272,7 +274,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) else { // no fill style from page, start with no fill style - aMergedAttr.Put(XFillStyleItem(XFILL_NONE)); + aMergedAttr.Put(XFillStyleItem(drawing::FillStyle_NONE)); } } } @@ -292,7 +294,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) { pTempSet.reset( new SfxItemSet( mpDoc->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST, 0) ); - pTempSet->Put( XFillStyleItem( XFILL_BITMAP ) ); + pTempSet->Put( XFillStyleItem( drawing::FillStyle_BITMAP ) ); // MigrateItemSet makes sure the XFillBitmapItem will have a unique name SfxItemSet aMigrateSet( mpDoc->GetPool(), XATTR_FILLBITMAP, XATTR_FILLBITMAP ); @@ -335,9 +337,9 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) } // if the background for this page was set to invisible, the background-object has to be deleted, too. - if( ( ( (XFillStyleItem*) pTempSet->GetItem( XATTR_FILLSTYLE ) )->GetValue() == XFILL_NONE ) || + if( ( ( (XFillStyleItem*) pTempSet->GetItem( XATTR_FILLSTYLE ) )->GetValue() == drawing::FillStyle_NONE ) || ( ( pTempSet->GetItemState( XATTR_FILLSTYLE ) == SFX_ITEM_DEFAULT ) && - ( ( (XFillStyleItem*) aMergedAttr.GetItem( XATTR_FILLSTYLE ) )->GetValue() == XFILL_NONE ) ) ) + ( ( (XFillStyleItem*) aMergedAttr.GetItem( XATTR_FILLSTYLE ) )->GetValue() == drawing::FillStyle_NONE ) ) ) mbPageBckgrdDeleted = true; bool bSetToAllPages = false; @@ -370,7 +372,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) rPageProperties.ClearItem( XATTR_FILLBITMAP ); rPageProperties.ClearItem( XATTR_FILLGRADIENT ); rPageProperties.ClearItem( XATTR_FILLHATCH ); - rPageProperties.PutItem(XFillStyleItem(XFILL_NONE)); + rPageProperties.PutItem(XFillStyleItem(drawing::FillStyle_NONE)); } } } @@ -418,7 +420,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) SdPage *pPage = mpDoc->GetSdPage(i, ePageKind); const SfxItemSet& rFillAttributes = pPage->getSdrPageProperties().GetItemSet(); - if(XFILL_NONE != ((const XFillStyleItem&)rFillAttributes.Get(XATTR_FILLSTYLE)).GetValue()) + if(drawing::FillStyle_NONE != ((const XFillStyleItem&)rFillAttributes.Get(XATTR_FILLSTYLE)).GetValue()) { SdBackgroundObjUndoAction *pBackgroundObjUndoAction = new SdBackgroundObjUndoAction(*mpDoc, *pPage, rFillAttributes); pUndoGroup->AddAction(pBackgroundObjUndoAction); @@ -427,7 +429,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) rPageProperties.ClearItem( XATTR_FILLBITMAP ); rPageProperties.ClearItem( XATTR_FILLGRADIENT ); rPageProperties.ClearItem( XATTR_FILLHATCH ); - rPageProperties.PutItem(XFillStyleItem(XFILL_NONE)); + rPageProperties.PutItem(XFillStyleItem(drawing::FillStyle_NONE)); pPage->ActionChanged(); } @@ -445,7 +447,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent ) { pTempSet->ClearItem( nWhich ); } - pTempSet->Put(XFillStyleItem(XFILL_NONE)); + pTempSet->Put(XFillStyleItem(drawing::FillStyle_NONE)); } const SfxPoolItem *pItem; diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index cc0031723afd..6347f5189778 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -1198,7 +1198,7 @@ bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) aSet.Put(pObj->GetMergedItemSet()); const XFillStyleItem& rFillStyle = (const XFillStyleItem&) aSet.Get(XATTR_FILLSTYLE); - bFilled = rFillStyle.GetValue() != XFILL_NONE; + bFilled = rFillStyle.GetValue() != drawing::FillStyle_NONE; } const SetOfByte* pVisiLayer = &mpView->GetSdrPageView()->GetVisibleLayers(); diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx index 4789946d578f..da0a333c7539 100644 --- a/sd/source/ui/func/fusumry.cxx +++ b/sd/source/ui/func/fusumry.cxx @@ -38,6 +38,8 @@ #include "optsitem.hxx" #include "DrawViewShell.hxx" +using namespace com::sun::star; + namespace sd { TYPEINIT1( FuSummaryPage, FuPoor ); @@ -209,7 +211,7 @@ void FuSummaryPage::DoExecute( SfxRequest& ) // remove hard attributes (Flag to sal_True) SfxItemSet aAttr(mpDoc->GetPool()); aAttr.Put(XLineStyleItem(XLINE_NONE)); - aAttr.Put(XFillStyleItem(XFILL_NONE)); + aAttr.Put(XFillStyleItem(drawing::FillStyle_NONE)); pTextObj->SetMergedItemSet(aAttr); if( bBegUndo ) diff --git a/sd/source/ui/sidebar/DocumentHelper.cxx b/sd/source/ui/sidebar/DocumentHelper.cxx index 0b59b8330edf..3b0cc0969be7 100644 --- a/sd/source/ui/sidebar/DocumentHelper.cxx +++ b/sd/source/ui/sidebar/DocumentHelper.cxx @@ -418,7 +418,7 @@ void DocumentHelper::AssignMasterPageToPage ( new SdBackgroundObjUndoAction( *pDocument, *pPage, pPage->getSdrPageProperties().GetItemSet()), true); - pPage->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); + pPage->getSdrPageProperties().PutItem(XFillStyleItem(drawing::FillStyle_NONE)); pDocument->SetMasterPage ( (pPage->GetPageNum()-1)/2, diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index c0184896f2e8..074485519c34 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -2476,8 +2476,8 @@ void SdDrawPage::setBackground( const Any& rValue ) if( !xSet.is() ) { - // the easy case, no background set. Set XFILL_NONE to represent this - GetPage()->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); + // the easy case, no background set. Set drawing::FillStyle_NONE to represent this + GetPage()->getSdrPageProperties().PutItem(XFillStyleItem(drawing::FillStyle_NONE)); return; } @@ -2517,8 +2517,8 @@ void SdDrawPage::setBackground( const Any& rValue ) if( aSet.Count() == 0 ) { - // no background fill, represent by setting XFILL_NONE - GetPage()->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); + // no background fill, represent by setting drawing::FillStyle_NONE + GetPage()->getSdrPageProperties().PutItem(XFillStyleItem(drawing::FillStyle_NONE)); } else { @@ -2556,9 +2556,9 @@ void SdDrawPage::getBackground( Any& rValue ) throw() { const SfxItemSet& rFillAttributes = GetPage()->getSdrPageProperties().GetItemSet(); - if(XFILL_NONE == ((const XFillStyleItem&)rFillAttributes.Get(XATTR_FILLSTYLE)).GetValue()) + if(drawing::FillStyle_NONE == ((const XFillStyleItem&)rFillAttributes.Get(XATTR_FILLSTYLE)).GetValue()) { - // no fill set (switched off by XFILL_NONE), clear rValue to represent this + // no fill set (switched off by drawing::FillStyle_NONE), clear rValue to represent this rValue.clear(); } else @@ -2976,7 +2976,7 @@ void SdMasterPage::getBackground( Any& rValue ) throw() // should NOT happen and is an error const SfxItemSet& rFallbackItemSet(SvxFmDrawPage::mpPage->getSdrPageProperties().GetItemSet()); - if(XFILL_NONE == ((const XFillStyleItem&)rFallbackItemSet.Get(XATTR_FILLSTYLE)).GetValue()) + if(drawing::FillStyle_NONE == ((const XFillStyleItem&)rFallbackItemSet.Get(XATTR_FILLSTYLE)).GetValue()) { rValue <<= Reference< beans::XPropertySet >( new SdUnoPageBackground(GetModel()->GetDoc(), &rFallbackItemSet)); diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index 76075ee56188..11912682007d 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -59,6 +59,8 @@ #include <com/sun/star/gallery/GalleryItemType.hpp> #include <boost/scoped_ptr.hpp> +using namespace com::sun::star; + namespace sd { void DrawViewShell::ExecGallery(SfxRequest& rReq) @@ -215,10 +217,10 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) if (pArgs->Count () == 1) { SFX_REQUEST_ARG (rReq, pFillStyle, SfxUInt32Item, ID_VAL_STYLE, false); - if (CHECK_RANGE (XFILL_NONE, (sal_Int32)pFillStyle->GetValue (), XFILL_BITMAP)) + if (CHECK_RANGE (drawing::FillStyle_NONE, (sal_Int32)pFillStyle->GetValue (), drawing::FillStyle_BITMAP)) { pAttr->ClearItem (XATTR_FILLSTYLE); - pAttr->Put (XFillStyleItem ((XFillStyle) pFillStyle->GetValue ()), XATTR_FILLSTYLE); + pAttr->Put (XFillStyleItem ((drawing::FillStyle) pFillStyle->GetValue ()), XATTR_FILLSTYLE); rBindings.Invalidate (SID_ATTR_FILL_STYLE); } #ifndef DISABLE_SCRIPTING @@ -283,7 +285,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) (sal_uInt8) pGreen->GetValue (), (sal_uInt8) pBlue->GetValue ())), XATTR_FILLCOLOR); - pAttr->Put (XFillStyleItem (XFILL_SOLID), XATTR_FILLSTYLE); + pAttr->Put (XFillStyleItem (drawing::FillStyle_SOLID), XATTR_FILLSTYLE); rBindings.Invalidate (SID_ATTR_FILL_COLOR); rBindings.Invalidate (SID_ATTR_FILL_STYLE); break; @@ -345,7 +347,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) if (rReq.GetSlot () == SID_SETGRADSTARTCOLOR) aGradient.SetStartColor (aColor); else aGradient.SetEndColor (aColor); - pAttr->Put (XFillStyleItem (XFILL_GRADIENT), XATTR_FILLSTYLE); + pAttr->Put (XFillStyleItem (drawing::FillStyle_GRADIENT), XATTR_FILLSTYLE); pAttr->Put (XFillGradientItem (pName->GetValue (), aGradient), XATTR_FILLGRADIENT); break; } @@ -363,7 +365,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) GetDoc()->GetGradientList ()->Insert (new XGradientEntry (aGradient, pName->GetValue ())); - pAttr->Put (XFillStyleItem (XFILL_GRADIENT), XATTR_FILLSTYLE); + pAttr->Put (XFillStyleItem (drawing::FillStyle_GRADIENT), XATTR_FILLSTYLE); pAttr->Put (XFillGradientItem (pName->GetValue (), aGradient), XATTR_FILLGRADIENT); } @@ -405,7 +407,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) aHatch.SetColor (aColor); - pAttr->Put (XFillStyleItem (XFILL_HATCH), XATTR_FILLSTYLE); + pAttr->Put (XFillStyleItem (drawing::FillStyle_HATCH), XATTR_FILLSTYLE); pAttr->Put (XFillHatchItem (pName->GetValue (), aHatch), XATTR_FILLHATCH); break; } @@ -417,7 +419,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) GetDoc()->GetHatchList ()->Insert (new XHatchEntry (aHatch, pName->GetValue ())); - pAttr->Put (XFillStyleItem (XFILL_HATCH), XATTR_FILLSTYLE); + pAttr->Put (XFillStyleItem (drawing::FillStyle_HATCH), XATTR_FILLSTYLE); pAttr->Put (XFillHatchItem (pName->GetValue (), aHatch), XATTR_FILLHATCH); } @@ -525,7 +527,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) aGradient.SetStartIntens ((short) pStart->GetValue ()); aGradient.SetEndIntens ((short) pEnd->GetValue ()); - pAttr->Put (XFillStyleItem (XFILL_GRADIENT), XATTR_FILLSTYLE); + pAttr->Put (XFillStyleItem (drawing::FillStyle_GRADIENT), XATTR_FILLSTYLE); pAttr->Put (XFillGradientItem (pName->GetValue (), aGradient), XATTR_FILLGRADIENT); break; } @@ -540,7 +542,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) (short) pStart->GetValue (), (short) pEnd->GetValue ()); pGradientList->Insert (new XGradientEntry (aGradient, pName->GetValue ())); - pAttr->Put (XFillStyleItem (XFILL_GRADIENT), XATTR_FILLSTYLE); + pAttr->Put (XFillStyleItem (drawing::FillStyle_GRADIENT), XATTR_FILLSTYLE); pAttr->Put (XFillGradientItem (pName->GetValue (), aGradient), XATTR_FILLGRADIENT); } @@ -589,7 +591,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) aHatch.SetDistance (pDistance->GetValue ()); aHatch.SetAngle (pAngle->GetValue () * 10); - pAttr->Put (XFillStyleItem (XFILL_HATCH), XATTR_FILLSTYLE); + pAttr->Put (XFillStyleItem (drawing::FillStyle_HATCH), XATTR_FILLSTYLE); pAttr->Put (XFillHatchItem (pName->GetValue (), aHatch), XATTR_FILLHATCH); break; } @@ -602,7 +604,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) pAngle->GetValue () * 10); pHatchList->Insert (new XHatchEntry (aHatch, pName->GetValue ())); - pAttr->Put (XFillStyleItem (XFILL_HATCH), XATTR_FILLSTYLE); + pAttr->Put (XFillStyleItem (drawing::FillStyle_HATCH), XATTR_FILLSTYLE); pAttr->Put (XFillHatchItem (pName->GetValue (), aHatch), XATTR_FILLHATCH); } @@ -638,7 +640,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) { pAttr->ClearItem (XATTR_FILLGRADIENT); pAttr->ClearItem (XATTR_FILLSTYLE); - pAttr->Put (XFillStyleItem (XFILL_GRADIENT), XATTR_FILLSTYLE); + pAttr->Put (XFillStyleItem (drawing::FillStyle_GRADIENT), XATTR_FILLSTYLE); pAttr->Put (XFillGradientItem (pName->GetValue (), pEntry->GetGradient ()), XATTR_FILLGRADIENT); rBindings.Invalidate (SID_ATTR_FILL_GRADIENT); @@ -673,7 +675,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) { pAttr->ClearItem (XATTR_FILLHATCH); pAttr->ClearItem (XATTR_FILLSTYLE); - pAttr->Put (XFillStyleItem (XFILL_HATCH), XATTR_FILLSTYLE); + pAttr->Put (XFillStyleItem (drawing::FillStyle_HATCH), XATTR_FILLSTYLE); pAttr->Put (XFillHatchItem (pName->GetValue (), pEntry->GetHatch ()), XATTR_FILLHATCH); rBindings.Invalidate (SID_ATTR_FILL_HATCH); diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx index c87934adf35d..73ce8d718f09 100644 --- a/sd/source/ui/view/drviewsi.cxx +++ b/sd/source/ui/view/drviewsi.cxx @@ -144,9 +144,9 @@ void DrawViewShell::AssignFrom3DWindow() // Determine if a FILL attribute is set. // If not, hard set a fill attribute - XFillStyle eFillStyle = ITEMVALUE( aSet, XATTR_FILLSTYLE, XFillStyleItem ); - if(eFillStyle == XFILL_NONE) - aSet.Put(XFillStyleItem (XFILL_SOLID)); + drawing::FillStyle eFillStyle = ITEMVALUE( aSet, XATTR_FILLSTYLE, XFillStyleItem ); + if(eFillStyle == drawing::FillStyle_NONE) + aSet.Put(XFillStyleItem (drawing::FillStyle_SOLID)); // remove some 3DSCENE attributes since these were // created by convert to 3D and may not be changed diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 3828c82ad752..ebd7b0fbc21c 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -990,11 +990,11 @@ bool View::IsMorphingAllowed() const aSet1.Put(pObj1->GetMergedItemSet()); aSet2.Put(pObj2->GetMergedItemSet()); - const XFillStyle eFillStyle1 = ( (const XFillStyleItem&) aSet1.Get( XATTR_FILLSTYLE ) ).GetValue(); - const XFillStyle eFillStyle2 = ( (const XFillStyleItem&) aSet2.Get( XATTR_FILLSTYLE ) ).GetValue(); + const drawing::FillStyle eFillStyle1 = ( (const XFillStyleItem&) aSet1.Get( XATTR_FILLSTYLE ) ).GetValue(); + const drawing::FillStyle eFillStyle2 = ( (const XFillStyleItem&) aSet2.Get( XATTR_FILLSTYLE ) ).GetValue(); - if( ( eFillStyle1 == XFILL_NONE || eFillStyle1 == XFILL_SOLID ) && - ( eFillStyle2 == XFILL_NONE || eFillStyle2 == XFILL_SOLID ) ) + if( ( eFillStyle1 == drawing::FillStyle_NONE || eFillStyle1 == drawing::FillStyle_SOLID ) && + ( eFillStyle2 == drawing::FillStyle_NONE || eFillStyle2 == drawing::FillStyle_SOLID ) ) bRet = true; } } diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 47f962c50557..163970e20736 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -761,7 +761,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, { // If we have a graphic as source object, use it's graphic // content as fill style - aSet.Put(XFillStyleItem(XFILL_BITMAP)); + aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); aSet.Put(XFillBitmapItem(&mrDoc.GetPool(), pSdrGrafObj->GetGraphic())); } @@ -1314,9 +1314,9 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, XFillAttrSetItem* pSetItem = aFillData.GetXFillAttrSetItem(); SfxItemSet rSet = pSetItem->GetItemSet(); - XFillStyle eFill= ( (XFillStyleItem&) rSet.Get( XATTR_FILLSTYLE ) ).GetValue(); + drawing::FillStyle eFill= ( (XFillStyleItem&) rSet.Get( XATTR_FILLSTYLE ) ).GetValue(); - if( eFill == XFILL_SOLID || eFill == XFILL_NONE ) + if( eFill == drawing::FillStyle_SOLID || eFill == drawing::FillStyle_NONE ) { const XFillColorItem& rColItem = (XFillColorItem&) rSet.Get( XATTR_FILLCOLOR ); Color aColor( rColItem.GetColorValue() ); @@ -1345,7 +1345,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, SdrObjectPrimitiveHit(*pPickObj, aHitPosB, nHitLog, *GetSdrPageView(), pVisiLayer, false) ) { // area fill - if(eFill == XFILL_SOLID ) + if(eFill == drawing::FillStyle_SOLID ) aSet.Put(XFillColorItem(aName, aColor)); aSet.Put( XFillStyleItem( eFill ) ); diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index b15b44fa111f..4e02e56ecfee 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -162,7 +162,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction, SfxItemSet aSet(mpDocSh->GetPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP); - aSet.Put(XFillStyleItem(XFILL_BITMAP)); + aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); aSet.Put(XFillBitmapItem(&mpDocSh->GetPool(), rGraphic)); pPickObj->SetMergedItemSetAndBroadcast(aSet); } diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 03b45d26add9..8d42e38b1ac9 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -55,6 +55,7 @@ #include <rtl/strbuf.hxx> #include <math.h> +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::drawing; using namespace ::com::sun::star::drawing::EnhancedCustomShapeSegmentCommand; @@ -731,7 +732,7 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : nFlags ( 0 ), nColorData ( 0 ), bTextFlow ( false ), - bFilled ( ((const XFillStyleItem&)pAObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue() != XFILL_NONE ), + bFilled ( ((const XFillStyleItem&)pAObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue() != drawing::FillStyle_NONE ), bStroked ( ((const XLineStyleItem&)pAObj->GetMergedItem( XATTR_LINESTYLE )).GetValue() != XLINE_NONE ), bFlipH ( false ), bFlipV ( false ) @@ -2003,7 +2004,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm aNewB2DPolyPolygon, dBrightness); SfxItemSet aTempSet(*this); aTempSet.Put(SdrShadowItem(false)); - aTempSet.Put(XFillStyleItem(XFILL_NONE)); + aTempSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); pStroke->SetMergedItemSet(aTempSet); rObjectList.push_back(pStroke); } @@ -2020,7 +2021,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm pObj = new SdrPathObj( aNewB2DPolyPolygon.isClosed() ? OBJ_POLY : OBJ_PLIN, aNewB2DPolyPolygon, dBrightness); - aTempSet.Put(XFillStyleItem(XFILL_NONE)); + aTempSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); } else { @@ -2139,11 +2140,11 @@ void EnhancedCustomShape2d::AdaptObjColor(SdrPathObj& rObj, const SfxItemSet& rC { if ( !rObj.IsLine() ) { - const XFillStyle eFillStyle = ((const XFillStyleItem&)rObj.GetMergedItem(XATTR_FILLSTYLE)).GetValue(); + const drawing::FillStyle eFillStyle = ((const XFillStyleItem&)rObj.GetMergedItem(XATTR_FILLSTYLE)).GetValue(); switch( eFillStyle ) { default: - case XFILL_SOLID: + case drawing::FillStyle_SOLID: { Color aFillColor; if ( nColorCount || rObj.GetBrightness() != 1.0 ) @@ -2155,7 +2156,7 @@ void EnhancedCustomShape2d::AdaptObjColor(SdrPathObj& rObj, const SfxItemSet& rC } break; } - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: { XGradient aXGradient(((const XFillGradientItem&)rObj.GetMergedItem(XATTR_FILLGRADIENT)).GetGradientValue()); if ( nColorCount || rObj.GetBrightness() != 1.0 ) @@ -2173,7 +2174,7 @@ void EnhancedCustomShape2d::AdaptObjColor(SdrPathObj& rObj, const SfxItemSet& rC rObj.SetMergedItem( XFillGradientItem( "", aXGradient ) ); break; } - case XFILL_HATCH: + case drawing::FillStyle_HATCH: { XHatch aXHatch(((const XFillHatchItem&)rObj.GetMergedItem(XATTR_FILLHATCH)).GetHatchValue()); if ( nColorCount || rObj.GetBrightness() != 1.0 ) @@ -2187,7 +2188,7 @@ void EnhancedCustomShape2d::AdaptObjColor(SdrPathObj& rObj, const SfxItemSet& rC rObj.SetMergedItem( XFillHatchItem( "", aXHatch ) ); break; } - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { if ( nColorCount || rObj.GetBrightness() != 1.0 ) { @@ -2247,10 +2248,10 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly ) { SdrPathObj* pObj(vObjectList[i]); const XLineStyle eLineStyle = ((const XLineStyleItem&)pObj->GetMergedItem(XATTR_LINESTYLE)).GetValue(); - const XFillStyle eFillStyle = ((const XFillStyleItem&)pObj->GetMergedItem(XATTR_FILLSTYLE)).GetValue(); + const drawing::FillStyle eFillStyle = ((const XFillStyleItem&)pObj->GetMergedItem(XATTR_FILLSTYLE)).GetValue(); //SJ: #i40600# if bLineGeometryNeededOnly is set linystyle does not matter - if( !bLineGeometryNeededOnly && ( XLINE_NONE == eLineStyle ) && ( XFILL_NONE == eFillStyle ) ) + if( !bLineGeometryNeededOnly && ( XLINE_NONE == eLineStyle ) && ( drawing::FillStyle_NONE == eFillStyle ) ) delete pObj; else vTempList.push_back(pObj); diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index 4d4dbcb9b62b..7608137a2546 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -345,7 +345,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con const OUString aExtrusionColor( "Color" ); bool bUseExtrusionColor = GetBool( rGeometryItem, aExtrusionColor, false ); - XFillStyle eFillStyle( ITEMVALUE( aSet, XATTR_FILLSTYLE, XFillStyleItem ) ); + drawing::FillStyle eFillStyle( ITEMVALUE( aSet, XATTR_FILLSTYLE, XFillStyleItem ) ); pScene->GetProperties().SetObjectItem( Svx3DShadeModeItem( 0 ) ); aSet.Put( Svx3DPercentDiagonalItem( 0 ) ); aSet.Put( Svx3DTextureModeItem( 1 ) ); @@ -354,15 +354,15 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con if ( eShadeMode == drawing::ShadeMode_DRAFT ) { aSet.Put( XLineStyleItem( XLINE_SOLID ) ); - aSet.Put( XFillStyleItem ( XFILL_NONE ) ); + aSet.Put( XFillStyleItem ( drawing::FillStyle_NONE ) ); aSet.Put( Svx3DDoubleSidedItem( true ) ); } else { aSet.Put( XLineStyleItem( XLINE_NONE ) ); - if ( eFillStyle == XFILL_NONE ) - aSet.Put( XFillStyleItem( XFILL_SOLID ) ); - else if ( ( eFillStyle == XFILL_BITMAP ) || ( eFillStyle == XFILL_GRADIENT ) || bUseExtrusionColor ) + if ( eFillStyle == drawing::FillStyle_NONE ) + aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); + else if ( ( eFillStyle == drawing::FillStyle_BITMAP ) || ( eFillStyle == drawing::FillStyle_GRADIENT ) || bUseExtrusionColor ) bUseTwoFillStyles = true; // #116336# @@ -386,11 +386,11 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con while( aIter.IsMore() ) { const SdrObject* pNext = aIter.Next(); - bool bIsPlaceholderObject = (((XFillStyleItem&)pNext->GetMergedItem( XATTR_FILLSTYLE )).GetValue() == XFILL_NONE ) + bool bIsPlaceholderObject = (((XFillStyleItem&)pNext->GetMergedItem( XATTR_FILLSTYLE )).GetValue() == drawing::FillStyle_NONE ) && (((XLineStyleItem&)pNext->GetMergedItem( XATTR_LINESTYLE )).GetValue() == XLINE_NONE ); basegfx::B2DPolyPolygon aPolyPoly; SfxItemSet aLocalSet(aSet); - XFillStyle aLocalFillStyle(eFillStyle); + drawing::FillStyle aLocalFillStyle(eFillStyle); if ( pNext->ISA( SdrPathObj ) ) { @@ -403,9 +403,9 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con // invisible (all this 'hidden' logic should be migrated to primitives). if(!bMultipleSubObjects) { - const XFillStyle eStyle(((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue()); + const drawing::FillStyle eStyle(((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue()); - if(XFILL_NONE == eStyle) + if(drawing::FillStyle_NONE == eStyle) { const drawinglayer::attribute::SdrLineAttribute aLine( drawinglayer::primitive2d::createNewSdrLineAttribute(rSet)); @@ -443,7 +443,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con // for draft, create wireframe with fixed line width aLocalSet.Put(XLineStyleItem(XLINE_SOLID)); aLocalSet.Put(XLineWidthItem(40)); - aLocalFillStyle = XFILL_NONE; + aLocalFillStyle = drawing::FillStyle_NONE; } else { @@ -451,9 +451,9 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con aLocalSet.Put(XLineWidthItem(0)); aLocalSet.Put(XLineStyleItem(XLINE_NONE)); aLocalSet.Put(XFillColorItem(OUString(), ((const XLineColorItem&)(aLocalSet.Get(XATTR_LINECOLOR))).GetColorValue())); - aLocalSet.Put(XFillStyleItem(XFILL_SOLID)); + aLocalSet.Put(XFillStyleItem(drawing::FillStyle_SOLID)); aLocalSet.Put(XFillTransparenceItem(((const XLineTransparenceItem&)(aLocalSet.Get(XATTR_LINETRANSPARENCE))).GetValue())); - aLocalFillStyle = XFILL_SOLID; + aLocalFillStyle = drawing::FillStyle_SOLID; } } else @@ -547,7 +547,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con p3DObj->SetMergedItemSet( aLocalSet ); if ( bUseExtrusionColor ) p3DObj->SetMergedItem( XFillColorItem( "", ((XSecondaryFillColorItem&)pCustomShape->GetMergedItem( XATTR_SECONDARYFILLCOLOR )).GetColorValue() ) ); - p3DObj->SetMergedItem( XFillStyleItem( XFILL_SOLID ) ); + p3DObj->SetMergedItem( XFillStyleItem( drawing::FillStyle_SOLID ) ); p3DObj->SetMergedItem( Svx3DCloseFrontItem( false ) ); p3DObj->SetMergedItem( Svx3DCloseBackItem( false ) ); pScene->Insert3DObj( p3DObj ); @@ -562,12 +562,12 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con aFrontTransform.translate( 0.0, 0.0, fDepth ); p3DObj->NbcSetTransform( aFrontTransform ); - if ( ( aLocalFillStyle == XFILL_BITMAP ) && !aFillBmp.IsEmpty() ) + if ( ( aLocalFillStyle == drawing::FillStyle_BITMAP ) && !aFillBmp.IsEmpty() ) { p3DObj->SetMergedItem(XFillBitmapItem(OUString(), Graphic(aFillBmp))); } } - else if ( aLocalFillStyle == XFILL_NONE ) + else if ( aLocalFillStyle == drawing::FillStyle_NONE ) { XLineColorItem& rLineColor = (XLineColorItem&)p3DObj->GetMergedItem( XATTR_LINECOLOR ); p3DObj->SetMergedItem( XFillColorItem( "", rLineColor.GetColorValue() ) ); diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 4835d60e18ac..33399569c2b2 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -207,7 +207,7 @@ SdrObject* EnhancedCustomShapeEngine::ImplForceGroupWithText( const SdrObjCustom // clear fill and line style aTargetItemSet.Put(XLineStyleItem(XLINE_NONE)); - aTargetItemSet.Put(XFillStyleItem(XFILL_NONE)); + aTargetItemSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); // get the text bounds and set at text object Rectangle aTextBounds = pCustoObj->GetSnapRect(); diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx index 41fb49896454..0c1df56fca24 100644 --- a/svx/source/dialog/contwnd.cxx +++ b/svx/source/dialog/contwnd.cxx @@ -30,6 +30,8 @@ #include <basegfx/polygon/b2dpolypolygontools.hxx> #include "svx/sdrpaintwindow.hxx" +using namespace com::sun::star; + #define TRANSCOL Color( COL_WHITE ) ContourWindow::ContourWindow( Window* pParent, const ResId& rResId ) : @@ -70,7 +72,7 @@ void ContourWindow::SetPolyPolygon( const PolyPolygon& rPolyPoly ) { SfxItemSet aSet( pModel->GetItemPool() ); - aSet.Put( XFillStyleItem( XFILL_SOLID ) ); + aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); aSet.Put( XFillColorItem( "", TRANSCOL ) ); aSet.Put( XFillTransparenceItem( 50 ) ); diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index bb155c3691ff..d0bfeb33d2a6 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -39,7 +39,7 @@ #include <svx/dialmgr.hxx> #include <vcl/settings.hxx> - +using namespace com::sun::star; Svx3DPreviewControl::Svx3DPreviewControl(Window* pParent, const ResId& rResId) : Control(pParent, rResId), @@ -138,7 +138,7 @@ void Svx3DPreviewControl::Construct() XATTR_FILL_FIRST, XATTR_FILLBITMAP, 0, 0 ); aSet.Put( XLineStyleItem( XLINE_NONE ) ); - aSet.Put( XFillStyleItem( XFILL_SOLID ) ); + aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); aSet.Put( XFillColorItem( "", Color( COL_WHITE ) ) ); mpScene->SetMergedItemSet(aSet); @@ -304,7 +304,7 @@ void Svx3DLightControl::Construct2() mpScene->Insert3DObj( mpExpansionObject ); SfxItemSet aSet(mpModel->GetItemPool()); aSet.Put( XLineStyleItem( XLINE_NONE ) ); - aSet.Put( XFillStyleItem( XFILL_NONE ) ); + aSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); mpExpansionObject->SetMergedItemSet(aSet); } @@ -344,7 +344,7 @@ void Svx3DLightControl::Construct2() // initially invisible SfxItemSet aSet(mpModel->GetItemPool()); aSet.Put( XLineStyleItem( XLINE_NONE ) ); - aSet.Put( XFillStyleItem( XFILL_NONE ) ); + aSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); mpLampBottomObject->SetMergedItemSet(aSet); mpLampShaftObject->SetMergedItemSet(aSet); @@ -410,7 +410,7 @@ void Svx3DLightControl::ConstructLightObjects() SfxItemSet aSet(mpModel->GetItemPool()); aSet.Put( XLineStyleItem( XLINE_NONE ) ); - aSet.Put( XFillStyleItem( XFILL_SOLID ) ); + aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); aSet.Put( XFillColorItem(OUString(), GetLightColor(a))); pNewLight->SetMergedItemSet(aSet); @@ -426,7 +426,7 @@ void Svx3DLightControl::AdaptToSelectedLight() // make mpLampBottomObject/mpLampShaftObject invisible SfxItemSet aSet(mpModel->GetItemPool()); aSet.Put( XLineStyleItem( XLINE_NONE ) ); - aSet.Put( XFillStyleItem( XFILL_NONE ) ); + aSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); mpLampBottomObject->SetMergedItemSet(aSet); mpLampShaftObject->SetMergedItemSet(aSet); } @@ -440,7 +440,7 @@ void Svx3DLightControl::AdaptToSelectedLight() aSet.Put( XLineStyleItem( XLINE_SOLID ) ); aSet.Put( XLineColorItem(OUString(), COL_YELLOW)); aSet.Put( XLineWidthItem(0)); - aSet.Put( XFillStyleItem( XFILL_NONE ) ); + aSet.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); mpLampBottomObject->SetMergedItemSet(aSet); mpLampShaftObject->SetMergedItemSet(aSet); diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index a5d902ae1501..a01a55938374 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -54,6 +54,8 @@ #include <svx/unobrushitemhelper.hxx> #include <sfx2/request.hxx> +using namespace com::sun::star; + // static ---------------------------------------------------------------- // Word 97 incompatibility (#i19922#) @@ -269,9 +271,9 @@ bool SvxHFPage::FillItemSet( SfxItemSet* rSet ) if(mbEnableDrawingLayerFillStyles) { //UUUU When using the XATTR_FILLSTYLE DrawingLayer FillStyle definition - // extra action has to be done here since the pool default is XFILL_SOLID - // instead of XFILL_NONE (to have the default blue fill color at start). - aSet.Put(XFillStyleItem(XFILL_NONE)); + // extra action has to be done here since the pool default is drawing::FillStyle_SOLID + // instead of drawing::FillStyle_NONE (to have the default blue fill color at start). + aSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); } aSet.Put( SfxBoolItem( nWOn, m_pTurnOnBox->IsChecked() ) ); @@ -654,10 +656,10 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl) if(mbEnableDrawingLayerFillStyles) { //UUUU The style for header/footer is not yet created, need to reset - // XFillStyleItem to XFILL_NONE which is the same as in the style + // XFillStyleItem to drawing::FillStyle_NONE which is the same as in the style // initialization. This needs to be done since the pool default for - // XFillStyleItem is XFILL_SOLID - pBBSet->Put(XFillStyleItem(XFILL_NONE)); + // XFillStyleItem is drawing::FillStyle_SOLID + pBBSet->Put(XFillStyleItem(drawing::FillStyle_NONE)); } } diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 67fe824c34b2..dc6b2902beae 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -50,6 +50,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <boost/scoped_ptr.hpp> +using namespace com::sun::star; using ::com::sun::star::frame::XFrame; using ::com::sun::star::uno::Reference; @@ -253,7 +254,7 @@ SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj ) { SfxItemSet aSet( pModel->GetItemPool() ); - aSet.Put( XFillStyleItem( XFILL_SOLID ) ); + aSet.Put( XFillStyleItem( drawing::FillStyle_SOLID ) ); aSet.Put( XFillColorItem( "", TRANSCOL ) ); if ( !pIMapObj->IsActive() ) diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index a25470bb3f9f..2c6cf4b82bd6 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -54,6 +54,8 @@ #include <svx/float3d.hxx> #include "float3d.hrc" +using namespace com::sun::star; + SFX_IMPL_DOCKINGWINDOW_WITHID( Svx3DChildWindow, SID_3D_WIN ) struct Svx3DWinImpl @@ -604,8 +606,8 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(XATTR_FILLSTYLE); if(eState != SFX_ITEM_DONTCARE) { - XFillStyle eXFS = (XFillStyle)((const XFillStyleItem&)rAttrs.Get(XATTR_FILLSTYLE)).GetValue(); - bBitmap = (eXFS == XFILL_BITMAP || eXFS == XFILL_GRADIENT || eXFS == XFILL_HATCH); + drawing::FillStyle eXFS = (drawing::FillStyle)((const XFillStyleItem&)rAttrs.Get(XATTR_FILLSTYLE)).GetValue(); + bBitmap = (eXFS == drawing::FillStyle_BITMAP || eXFS == drawing::FillStyle_GRADIENT || eXFS == drawing::FillStyle_HATCH); } aFtTexKind.Enable( bBitmap ); diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index 1459ef1bbb1b..973d307b2aed 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -271,8 +271,8 @@ void E3dObject::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const // gradient depends on fillstyle // BM *** check if SetItem is NULL *** - XFillStyle eFillStyle = ((XFillStyleItem&)(GetMergedItem(XATTR_FILLSTYLE))).GetValue(); - rInfo.bGradientAllowed = (eFillStyle == XFILL_GRADIENT); + drawing::FillStyle eFillStyle = ((XFillStyleItem&)(GetMergedItem(XATTR_FILLSTYLE))).GetValue(); + rInfo.bGradientAllowed = (eFillStyle == drawing::FillStyle_GRADIENT); // Convert 3D objects in a group of polygons: // At first not only possible, because the creation of a group of diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index b9fd6d885218..bbbbe553079c 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -67,6 +67,8 @@ #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <basegfx/polygon/b2dpolypolygoncutter.hxx> +using namespace com::sun::star; + #define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue() TYPEINIT1(E3dView, SdrView); @@ -686,12 +688,12 @@ void E3dView::ImpChangeSomeAttributesFor3DConversion2(SdrObject* pObj) const SfxItemSet& rSet = pObj->GetMergedItemSet(); sal_Int32 nLineWidth = ((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue(); XLineStyle eLineStyle = (XLineStyle)((const XLineStyleItem&)rSet.Get(XATTR_LINESTYLE)).GetValue(); - XFillStyle eFillStyle = ITEMVALUE(rSet, XATTR_FILLSTYLE, XFillStyleItem); + drawing::FillStyle eFillStyle = ITEMVALUE(rSet, XATTR_FILLSTYLE, XFillStyleItem); if(((SdrPathObj*)pObj)->IsClosed() && eLineStyle == XLINE_SOLID && !nLineWidth - && eFillStyle != XFILL_NONE) + && eFillStyle != drawing::FillStyle_NONE) { if(pObj->GetPage() && GetModel()->IsUndoEnabled() ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj, false, false)); @@ -717,13 +719,13 @@ void E3dView::ImpCreateSingle3DObjectFlat(E3dScene* pScene, SdrObject* pObj, boo // Get Itemset of the original object SfxItemSet aSet(pObj->GetMergedItemSet()); - XFillStyle eFillStyle = ITEMVALUE(aSet, XATTR_FILLSTYLE, XFillStyleItem); + drawing::FillStyle eFillStyle = ITEMVALUE(aSet, XATTR_FILLSTYLE, XFillStyleItem); // line style turned off aSet.Put(XLineStyleItem(XLINE_NONE)); //Determining if FILL_Attribut is set. - if(!pPath->IsClosed() || eFillStyle == XFILL_NONE) + if(!pPath->IsClosed() || eFillStyle == drawing::FillStyle_NONE) { // This SdrPathObj is not filled, leave the front and rear face out. // Moreover, a two-sided representation necessary. @@ -733,7 +735,7 @@ void E3dView::ImpCreateSingle3DObjectFlat(E3dScene* pScene, SdrObject* pObj, boo aSet.Put(Svx3DDoubleSidedItem(true)); // Set fill attribute - aSet.Put(XFillStyleItem(XFILL_SOLID)); + aSet.Put(XFillStyleItem(drawing::FillStyle_SOLID)); // Fill color must be the color line, because the object was // previously just a line @@ -1064,7 +1066,7 @@ void E3dView::DoDepthArrange(E3dScene* pScene, double fDepth) const basegfx::B2DPolyPolygon aExtrudePoly( basegfx::tools::prepareForPolygonOperation(pExtrudeObj->GetExtrudePolygon())); const SfxItemSet& rLocalSet = pExtrudeObj->GetMergedItemSet(); - const XFillStyle eLocalFillStyle = ITEMVALUE(rLocalSet, XATTR_FILLSTYLE, XFillStyleItem); + const drawing::FillStyle eLocalFillStyle = ITEMVALUE(rLocalSet, XATTR_FILLSTYLE, XFillStyleItem); const Color aLocalColor = ((const XFillColorItem&)(rLocalSet.Get(XATTR_FILLCOLOR))).GetColorValue(); // sort in ExtrudeObj @@ -1090,11 +1092,11 @@ void E3dView::DoDepthArrange(E3dScene* pScene, double fDepth) // second ciriteria: is another fillstyle or color used? const SfxItemSet& rCompareSet = pAct->mpObj->GetMergedItemSet(); - XFillStyle eCompareFillStyle = ITEMVALUE(rCompareSet, XATTR_FILLSTYLE, XFillStyleItem); + drawing::FillStyle eCompareFillStyle = ITEMVALUE(rCompareSet, XATTR_FILLSTYLE, XFillStyleItem); if(eLocalFillStyle == eCompareFillStyle) { - if(eLocalFillStyle == XFILL_SOLID) + if(eLocalFillStyle == drawing::FillStyle_SOLID) { Color aCompareColor = ((const XFillColorItem&)(rCompareSet.Get(XATTR_FILLCOLOR))).GetColorValue(); @@ -1103,7 +1105,7 @@ void E3dView::DoDepthArrange(E3dScene* pScene, double fDepth) bOverlap = false; } } - else if(eLocalFillStyle == XFILL_NONE) + else if(eLocalFillStyle == drawing::FillStyle_NONE) { bOverlap = false; } diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx index 4dfdf337955b..cc569c238490 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx @@ -36,7 +36,7 @@ #include <svx/sdr/primitive2d/sdrdecompositiontools.hxx> #include <basegfx/polygon/b2dpolygonclipper.hxx> - +using namespace com::sun::star; namespace sdr { @@ -111,14 +111,14 @@ namespace sdr const SdrShadowColorItem& rShadColItem = (SdrShadowColorItem&)(rItemSet.Get(SDRATTR_SHADOWCOLOR)); const sal_uInt16 nShadowTransparence(((SdrShadowTransparenceItem&)(rItemSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue()); const Color aShadowColor(rShadColItem.GetColorValue()); - const XFillStyle eShadowStyle = ((XFillStyleItem&)(rItemSet.Get(XATTR_FILLSTYLE))).GetValue(); + const drawing::FillStyle eShadowStyle = ((XFillStyleItem&)(rItemSet.Get(XATTR_FILLSTYLE))).GetValue(); // Create own ItemSet and modify as needed // Always hide lines for special calc shadow SfxItemSet aSet(rItemSet); aSet.Put(XLineStyleItem(XLINE_NONE)); - if(XFILL_HATCH == eShadowStyle) + if(drawing::FillStyle_HATCH == eShadowStyle) { // #41666# Hatch color is set hard to shadow color XHatch aHatch = ((XFillHatchItem&)(rItemSet.Get(XATTR_FILLHATCH))).GetHatchValue(); @@ -127,10 +127,10 @@ namespace sdr } else { - if(XFILL_SOLID != eShadowStyle) + if(drawing::FillStyle_SOLID != eShadowStyle) { // force fill to solid (for Gradient, Bitmap and *no* fill (#119750# not filled comments *have* shadow)) - aSet.Put(XFillStyleItem(XFILL_SOLID)); + aSet.Put(XFillStyleItem(drawing::FillStyle_SOLID)); } aSet.Put(XFillColorItem(OUString(),aShadowColor)); diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index 4b3315b999a1..858d1aa4569a 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -76,7 +76,7 @@ #include <sdr/attribute/sdrfilltextattribute.hxx> #include <com/sun/star/drawing/LineCap.hpp> - +using namespace com::sun::star; namespace drawinglayer { @@ -381,7 +381,7 @@ namespace drawinglayer attribute::SdrFillAttribute createNewSdrFillAttribute(const SfxItemSet& rSet) { - const XFillStyle eStyle(((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue()); + const drawing::FillStyle eStyle(((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue()); sal_uInt16 nTransparence(((const XFillTransparenceItem&)(rSet.Get(XATTR_FILLTRANSPARENCE))).GetValue()); @@ -390,7 +390,7 @@ namespace drawinglayer nTransparence = 100; } - if(XFILL_NONE != eStyle) + if(drawing::FillStyle_NONE != eStyle) { if(100 != nTransparence) { @@ -421,13 +421,14 @@ namespace drawinglayer switch(eStyle) { - case XFILL_NONE : // for warnings - case XFILL_SOLID : + case drawing::FillStyle_NONE : // for warnings + case drawing::FillStyle_SOLID : + default: { // nothing to do, color is defined break; } - case XFILL_GRADIENT : + case drawing::FillStyle_GRADIENT : { XGradient aXGradient(((XFillGradientItem&)(rSet.Get(XATTR_FILLGRADIENT))).GetGradientValue()); @@ -463,7 +464,7 @@ namespace drawinglayer break; } - case XFILL_HATCH : + case drawing::FillStyle_HATCH : { const XHatch& rHatch(((XFillHatchItem&)(rSet.Get(XATTR_FILLHATCH))).GetHatchValue()); const Color aColorB(rHatch.GetColor()); @@ -478,7 +479,7 @@ namespace drawinglayer break; } - case XFILL_BITMAP : + case drawing::FillStyle_BITMAP : { aFillGraphic = createNewSdrFillGraphicAttribute(rSet); break; diff --git a/svx/source/sdr/properties/properties.cxx b/svx/source/sdr/properties/properties.cxx index 7fe8e208559b..a950b4a6f012 100644 --- a/svx/source/sdr/properties/properties.cxx +++ b/svx/source/sdr/properties/properties.cxx @@ -24,7 +24,7 @@ #include <svx/svditer.hxx> #include <svx/xfillit0.hxx> - +using namespace com::sun::star; namespace sdr { @@ -170,17 +170,17 @@ namespace sdr const XFillStyleItem* pFillStyleItem = dynamic_cast< const XFillStyleItem* >( rItemSet.GetItem(XATTR_FILLSTYLE) ); if( pFillStyleItem ) { - if( bFillBitmap && (pFillStyleItem->GetValue() != XFILL_BITMAP) ) + if( bFillBitmap && (pFillStyleItem->GetValue() != drawing::FillStyle_BITMAP) ) { rItemSet.ClearItem( XATTR_FILLBITMAP ); } - if( bFillGradient && (pFillStyleItem->GetValue() != XFILL_GRADIENT) ) + if( bFillGradient && (pFillStyleItem->GetValue() != drawing::FillStyle_GRADIENT) ) { rItemSet.ClearItem( XATTR_FILLGRADIENT ); } - if( bFillHatch && (pFillStyleItem->GetValue() != XFILL_HATCH) ) + if( bFillHatch && (pFillStyleItem->GetValue() != drawing::FillStyle_HATCH) ) { rItemSet.ClearItem( XATTR_FILLHATCH ); } diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index 71cb2f97085d..c81fe2d2b167 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -36,7 +36,7 @@ #include <svx/xlnwtit.hxx> #include <svx/svdpool.hxx> - +using namespace com::sun::star; namespace sdr { @@ -376,7 +376,7 @@ namespace sdr { mpItemSet->Put(XLineStyleItem(XLINE_NONE)); mpItemSet->Put(XFillColorItem(OUString(), Color(COL_WHITE))); - mpItemSet->Put(XFillStyleItem(XFILL_NONE)); + mpItemSet->Put(XFillStyleItem(drawing::FillStyle_NONE)); } else { diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx index bd152cf66849..ac7cafd7890e 100644 --- a/svx/source/sidebar/area/AreaPropertyPanel.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx @@ -205,9 +205,9 @@ void AreaPropertyPanel::Initialize() IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox ) { - const XFillStyle eXFS = (XFillStyle)mpLbFillType->GetSelectEntryPos(); + const drawing::FillStyle eXFS = (drawing::FillStyle)mpLbFillType->GetSelectEntryPos(); - if((XFillStyle)meLastXFS != eXFS) + if((drawing::FillStyle)meLastXFS != eXFS) { mpLbFillAttr->Clear(); SfxObjectShell* pSh = SfxObjectShell::Current(); @@ -219,7 +219,8 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox ) // Checked that this works in all apps. switch( eXFS ) { - case XFILL_NONE: + default: + case drawing::FillStyle_NONE: { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); @@ -231,7 +232,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox ) SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L); break; } - case XFILL_SOLID: + case drawing::FillStyle_SOLID: { mpLbFillAttr->Hide(); mpToolBoxColor->Show(); @@ -244,7 +245,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox ) SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, &aXFillStyleItem, 0L); break; } - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); @@ -283,7 +284,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox ) } break; } - case XFILL_HATCH: + case drawing::FillStyle_HATCH: { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); @@ -322,7 +323,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox ) } break; } - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); @@ -365,7 +366,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox ) meLastXFS = (sal_uInt16)eXFS; - if(XFILL_NONE != eXFS) + if(drawing::FillStyle_NONE != eXFS) { if(pToolBox) { @@ -381,7 +382,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox ) IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox ) { - const XFillStyle eXFS = (XFillStyle)mpLbFillType->GetSelectEntryPos(); + const drawing::FillStyle eXFS = (drawing::FillStyle)mpLbFillType->GetSelectEntryPos(); const XFillStyleItem aXFillStyleItem(eXFS); SfxObjectShell* pSh = SfxObjectShell::Current(); @@ -389,11 +390,11 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox ) { // #i122676# dependent from bFillStyleChange, do execute a single or two // changes in one Execute call - const bool bFillStyleChange((XFillStyle) meLastXFS != eXFS); + const bool bFillStyleChange((drawing::FillStyle) meLastXFS != eXFS); switch(eXFS) { - case XFILL_SOLID: + case drawing::FillStyle_SOLID: { if(bFillStyleChange) { @@ -402,7 +403,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox ) } break; } - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: { sal_Int32 nPos = mpLbFillAttr->GetSelectEntryPos(); @@ -433,7 +434,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox ) } break; } - case XFILL_HATCH: + case drawing::FillStyle_HATCH: { sal_Int32 nPos = mpLbFillAttr->GetSelectEntryPos(); @@ -464,7 +465,7 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox ) } break; } - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { sal_Int32 nPos = mpLbFillAttr->GetSelectEntryPos(); @@ -820,11 +821,11 @@ void AreaPropertyPanel::NotifyItemUpdate( mpStyleItem.reset(dynamic_cast< XFillStyleItem* >(pItem->Clone())); mpLbFillType->Enable(); mpColorTextFT->Enable(); - XFillStyle eXFS = (XFillStyle)mpStyleItem->GetValue(); + drawing::FillStyle eXFS = (drawing::FillStyle)mpStyleItem->GetValue(); meLastXFS = eXFS; mpLbFillType->SelectEntryPos(sal::static_int_cast< sal_Int32 >(eXFS)); - if(XFILL_NONE == eXFS) + if(drawing::FillStyle_NONE == eXFS) { mpLbFillAttr->SetNoSelection(); mpLbFillAttr->Disable(); @@ -851,7 +852,7 @@ void AreaPropertyPanel::NotifyItemUpdate( mpColorItem.reset(pState ? (XFillColorItem*)pState->Clone() : 0); } - if(mpStyleItem && XFILL_SOLID == (XFillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_SOLID == (drawing::FillStyle)mpStyleItem->GetValue()) { mpLbFillAttr->Hide(); mpToolBoxColor->Show(); @@ -884,7 +885,7 @@ void AreaPropertyPanel::NotifyItemUpdate( mpFillGradientItem.reset(pState ? (XFillGradientItem*)pState->Clone() : 0); } - if(mpStyleItem && XFILL_GRADIENT == (XFillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_GRADIENT == (drawing::FillStyle)mpStyleItem->GetValue()) { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); @@ -913,7 +914,7 @@ void AreaPropertyPanel::NotifyItemUpdate( mpHatchItem.reset(pState ? (XFillHatchItem*)pState->Clone() : 0); } - if(mpStyleItem && XFILL_HATCH == (XFillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_HATCH == (drawing::FillStyle)mpStyleItem->GetValue()) { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); @@ -942,7 +943,7 @@ void AreaPropertyPanel::NotifyItemUpdate( mpBitmapItem.reset(pState ? (XFillBitmapItem*)pState->Clone() : 0); } - if(mpStyleItem && XFILL_BITMAP == (XFillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_BITMAP == (drawing::FillStyle)mpStyleItem->GetValue()) { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); @@ -968,7 +969,7 @@ void AreaPropertyPanel::NotifyItemUpdate( { if(SFX_ITEM_AVAILABLE == eState) { - if(mpStyleItem && XFILL_SOLID == (XFillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_SOLID == (drawing::FillStyle)mpStyleItem->GetValue()) { if(mpColorItem) { @@ -993,7 +994,7 @@ void AreaPropertyPanel::NotifyItemUpdate( { if(SFX_ITEM_AVAILABLE == eState) { - if(mpStyleItem && XFILL_GRADIENT == (XFillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_GRADIENT == (drawing::FillStyle)mpStyleItem->GetValue()) { if(mpFillGradientItem) { @@ -1018,7 +1019,7 @@ void AreaPropertyPanel::NotifyItemUpdate( { if(SFX_ITEM_AVAILABLE == eState) { - if(mpStyleItem && XFILL_HATCH == (XFillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_HATCH == (drawing::FillStyle)mpStyleItem->GetValue()) { if(mpHatchItem) { @@ -1043,7 +1044,7 @@ void AreaPropertyPanel::NotifyItemUpdate( { if(SFX_ITEM_AVAILABLE == eState) { - if(mpStyleItem && XFILL_BITMAP == (XFillStyle)mpStyleItem->GetValue()) + if(mpStyleItem && drawing::FillStyle_BITMAP == (drawing::FillStyle)mpStyleItem->GetValue()) { if(mpBitmapItem) { @@ -1076,18 +1077,18 @@ void AreaPropertyPanel::Update() { if(mpStyleItem) { - const XFillStyle eXFS = (XFillStyle)mpStyleItem->GetValue(); + const drawing::FillStyle eXFS = (drawing::FillStyle)mpStyleItem->GetValue(); SfxObjectShell* pSh = SfxObjectShell::Current(); switch( eXFS ) { - case XFILL_NONE: + case drawing::FillStyle_NONE: { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); break; } - case XFILL_SOLID: + case drawing::FillStyle_SOLID: { if(mpColorItem) { @@ -1101,7 +1102,7 @@ void AreaPropertyPanel::Update() } break; } - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); @@ -1130,7 +1131,7 @@ void AreaPropertyPanel::Update() } break; } - case XFILL_HATCH: + case drawing::FillStyle_HATCH: { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); @@ -1159,7 +1160,7 @@ void AreaPropertyPanel::Update() } break; } - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { mpLbFillAttr->Show(); mpToolBoxColor->Hide(); diff --git a/svx/source/svdraw/sdrmasterpagedescriptor.cxx b/svx/source/svdraw/sdrmasterpagedescriptor.cxx index 9b44726a31dd..598388375dc6 100644 --- a/svx/source/svdraw/sdrmasterpagedescriptor.cxx +++ b/svx/source/svdraw/sdrmasterpagedescriptor.cxx @@ -24,6 +24,7 @@ #include <svx/xfillit0.hxx> #include <svl/itemset.hxx> +using namespace com::sun::star; namespace sdr { @@ -106,7 +107,7 @@ namespace sdr const SdrPage* pCorrectPage = &GetOwnerPage(); const SdrPageProperties* pCorrectProperties = &pCorrectPage->getSdrPageProperties(); - if(XFILL_NONE == ((const XFillStyleItem&)pCorrectProperties->GetItemSet().Get(XATTR_FILLSTYLE)).GetValue()) + if(drawing::FillStyle_NONE == ((const XFillStyleItem&)pCorrectProperties->GetItemSet().Get(XATTR_FILLSTYLE)).GetValue()) { pCorrectPage = &GetUsedPage(); pCorrectProperties = &pCorrectPage->getSdrPageProperties(); diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx index de53aa3c0a19..b8ed6cbf3f5a 100644 --- a/svx/source/svdraw/svdcrtv.cxx +++ b/svx/source/svdraw/svdcrtv.cxx @@ -41,7 +41,7 @@ #include <svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> - +using namespace com::sun::star; class ImplConnectMarkerOverlay { @@ -457,7 +457,7 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const { SfxItemSet aSet(pMod->GetItemPool()); aSet.Put(XFillColorItem(OUString(),Color(COL_WHITE))); // in case someone turns on Solid - aSet.Put(XFillStyleItem(XFILL_NONE)); + aSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); pAktCreate->SetMergedItemSet(aSet); } @@ -467,7 +467,7 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, sal_uInt16 nIdent, const // default for all text frames: no background, no border SfxItemSet aSet(pMod->GetItemPool()); aSet.Put(XFillColorItem(OUString(),Color(COL_WHITE))); // in case someone turns on Solid - aSet.Put(XFillStyleItem(XFILL_NONE)); + aSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); aSet.Put(XLineColorItem(OUString(),Color(COL_BLACK))); // in case someone turns on Solid aSet.Put(XLineStyleItem(XLINE_NONE)); @@ -767,10 +767,10 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/) if(bUseSolidDragging) { const SfxItemSet& rSet = pAktCreate->GetMergedItemSet(); - const XFillStyle eFill(((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue()); + const drawing::FillStyle eFill(((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue()); const XLineStyle eLine(((XLineStyleItem&)(rSet.Get(XATTR_LINESTYLE))).GetValue()); - if(XLINE_NONE == eLine && XFILL_NONE == eFill) + if(XLINE_NONE == eLine && drawing::FillStyle_NONE == eFill) { bUseSolidDragging = false; } diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 9daebbe48723..802e0fafd88c 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -36,6 +36,8 @@ #include <svx/svdview.hxx> #include <clonelist.hxx> +using namespace com::sun::star; + void SdrEditView::ImpResetPossibilityFlags() { bReadOnly =false; @@ -522,9 +524,9 @@ void SdrEditView::CheckPossibilities() if(SFX_ITEM_DONTCARE != eState) { // If state is not DONTCARE, test the item - XFillStyle eFillStyle = ((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue(); + drawing::FillStyle eFillStyle = ((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue(); - if(eFillStyle != XFILL_GRADIENT) + if(eFillStyle != drawing::FillStyle_GRADIENT) { bGradientAllowed = false; } diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 4b73e5ae6295..bb31717c6584 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -45,6 +45,7 @@ #include <boost/scoped_ptr.hpp> #include <vector> using ::std::vector; +using namespace com::sun::star; SdrObject* SdrEditView::GetMaxToTopObj(SdrObject* /*pObj*/) const { @@ -1313,12 +1314,12 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly) // If LineStyle of pAttrObj is XLINE_NONE force to XLINE_SOLID to make visible. const XLineStyle eLineStyle = ((const XLineStyleItem&)pAttrObj->GetMergedItem(XATTR_LINESTYLE)).GetValue(); - const XFillStyle eFillStyle = ((const XFillStyleItem&)pAttrObj->GetMergedItem(XATTR_FILLSTYLE)).GetValue(); + const drawing::FillStyle eFillStyle = ((const XFillStyleItem&)pAttrObj->GetMergedItem(XATTR_FILLSTYLE)).GetValue(); // Take fill style/closed state of pAttrObj in account when deciding to change the line style bool bIsClosedPathObj(pAttrObj->ISA(SdrPathObj) && ((SdrPathObj*)pAttrObj)->IsClosed()); - if(XLINE_NONE == eLineStyle && (XFILL_NONE == eFillStyle || !bIsClosedPathObj)) + if(XLINE_NONE == eLineStyle && (drawing::FillStyle_NONE == eFillStyle || !bIsClosedPathObj)) { pPath->SetMergedItem(XLineStyleItem(XLINE_SOLID)); } @@ -1572,7 +1573,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, // clear fill and line style aTargetItemSet.Put(XLineStyleItem(XLINE_NONE)); - aTargetItemSet.Put(XFillStyleItem(XFILL_NONE)); + aTargetItemSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); // get the text bounds and set at text object Rectangle aTextBounds = pCustomShape->GetSnapRect(); diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index b68c76fbdf16..ec9245379231 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -296,19 +296,19 @@ void SdrLinkList::RemoveLink(const Link& rLink) bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol) { - XFillStyle eFill=((XFillStyleItem&)rSet.Get(XATTR_FILLSTYLE)).GetValue(); + drawing::FillStyle eFill=((XFillStyleItem&)rSet.Get(XATTR_FILLSTYLE)).GetValue(); bool bRetval = false; switch(eFill) { - case XFILL_SOLID: + case drawing::FillStyle_SOLID: { rCol = ((XFillColorItem&)rSet.Get(XATTR_FILLCOLOR)).GetColorValue(); bRetval = true; break; } - case XFILL_HATCH: + case drawing::FillStyle_HATCH: { Color aCol1(((XFillHatchItem&)rSet.Get(XATTR_FILLHATCH)).GetHatchValue().GetColor()); Color aCol2(COL_WHITE); @@ -326,7 +326,7 @@ bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol) break; } - case XFILL_GRADIENT: { + case drawing::FillStyle_GRADIENT: { const XGradient& rGrad=((XFillGradientItem&)rSet.Get(XATTR_FILLGRADIENT)).GetGradientValue(); Color aCol1(rGrad.GetStartColor()); Color aCol2(rGrad.GetEndColor()); @@ -336,7 +336,7 @@ bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol) break; } - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { Bitmap aBitmap(((XFillBitmapItem&)rSet.Get(XATTR_FILLBITMAP)).GetGraphicObject().GetGraphic().GetBitmapEx().GetBitmap()); const Size aSize(aBitmap.GetSizePixel()); diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index ef3874a21515..b0ef005f4e07 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -71,7 +71,7 @@ #include <svx/svditer.hxx> #include <svx/svdogrp.hxx> - +using namespace com::sun::star; ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport( SdrModel& rModel, @@ -395,12 +395,12 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr { if(maVD.IsFillColor()) { - mpFillAttr->Put(XFillStyleItem(XFILL_SOLID)); + mpFillAttr->Put(XFillStyleItem(drawing::FillStyle_SOLID)); mpFillAttr->Put(XFillColorItem(OUString(), maVD.GetFillColor())); } else { - mpFillAttr->Put(XFillStyleItem(XFILL_NONE)); + mpFillAttr->Put(XFillStyleItem(drawing::FillStyle_NONE)); } } else @@ -600,7 +600,7 @@ void ImpSdrGDIMetaFileImport::InsertObj(SdrObject* pObj, bool bScale) aClipTopLeft, aClipSize); - pObj->SetMergedItem(XFillStyleItem(XFILL_BITMAP)); + pObj->SetMergedItem(XFillStyleItem(drawing::FillStyle_BITMAP)); pObj->SetMergedItem(XFillBitmapItem(OUString(), Graphic(aClippedBitmap))); pObj->SetMergedItem(XFillBmpTileItem(false)); pObj->SetMergedItem(XFillBmpStretchItem(true)); @@ -1046,7 +1046,7 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt if (!aFnt.IsTransparent()) { SfxItemSet aAttr(*mpFillAttr->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST, 0, 0); - aAttr.Put(XFillStyleItem(XFILL_SOLID)); + aAttr.Put(XFillStyleItem(drawing::FillStyle_SOLID)); aAttr.Put(XFillColorItem(OUString(), aFnt.GetFillColor())); pText->SetMergedItemSet(aAttr); } @@ -1091,7 +1091,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpAction& rAct) // This action is not creating line and fill, set directly, do not use SetAttributes(..) pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE)); - pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE)); + pGraf->SetMergedItem(XFillStyleItem(drawing::FillStyle_NONE)); InsertObj(pGraf); } @@ -1103,7 +1103,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScaleAction& rAct) // This action is not creating line and fill, set directly, do not use SetAttributes(..) pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE)); - pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE)); + pGraf->SetMergedItem(XFillStyleItem(drawing::FillStyle_NONE)); InsertObj(pGraf); } @@ -1115,7 +1115,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExAction& rAct) // This action is not creating line and fill, set directly, do not use SetAttributes(..) pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE)); - pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE)); + pGraf->SetMergedItem(XFillStyleItem(drawing::FillStyle_NONE)); InsertObj(pGraf); } @@ -1127,7 +1127,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScaleAction& rAct) // This action is not creating line and fill, set directly, do not use SetAttributes(..) pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE)); - pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE)); + pGraf->SetMergedItem(XFillStyleItem(drawing::FillStyle_NONE)); InsertObj(pGraf); } @@ -1173,7 +1173,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaHatchAction& rAct ) } SetAttributes(pPath); - aHatchAttr.Put(XFillStyleItem(XFILL_HATCH)); + aHatchAttr.Put(XFillStyleItem(drawing::FillStyle_HATCH)); aHatchAttr.Put(XFillHatchItem(&mpModel->GetItemPool(), XHatch(rHatch.GetColor(), eStyle, rHatch.GetDistance(), rHatch.GetAngle()))); pPath->SetMergedItemSet(aHatchAttr); @@ -1263,7 +1263,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile& rM aGradAttr.Put(XLineStyleItem(XLINE_NONE)); // add detected gradient fillstyle - aGradAttr.Put(XFillStyleItem(XFILL_GRADIENT)); + aGradAttr.Put(XFillStyleItem(drawing::FillStyle_GRADIENT)); aGradAttr.Put(XFillGradientItem(aXGradient)); pPath->SetMergedItemSet(aGradAttr); @@ -1310,7 +1310,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpScalePartAction& rAct) // This action is not creating line and fill, set directly, do not use SetAttributes(..) pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE)); - pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE)); + pGraf->SetMergedItem(XFillStyleItem(drawing::FillStyle_NONE)); InsertObj(pGraf); } @@ -1326,7 +1326,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaBmpExScalePartAction& rAct) // This action is not creating line and fill, set directly, do not use SetAttributes(..) pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE)); - pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE)); + pGraf->SetMergedItem(XFillStyleItem(drawing::FillStyle_NONE)); InsertObj(pGraf); } @@ -1340,7 +1340,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaMaskAction& rAct) // This action is not creating line and fill, set directly, do not use SetAttributes(..) pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE)); - pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE)); + pGraf->SetMergedItem(XFillStyleItem(drawing::FillStyle_NONE)); InsertObj(pGraf); } @@ -1354,7 +1354,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScaleAction& rAct) // This action is not creating line and fill, set directly, do not use SetAttributes(..) pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE)); - pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE)); + pGraf->SetMergedItem(XFillStyleItem(drawing::FillStyle_NONE)); InsertObj(pGraf); } @@ -1369,7 +1369,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaMaskScalePartAction& rAct) // This action is not creating line and fill, set directly, do not use SetAttributes(..) pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE)); - pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE)); + pGraf->SetMergedItem(XFillStyleItem(drawing::FillStyle_NONE)); InsertObj(pGraf); } @@ -1431,7 +1431,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaGradientAction& rAct) rGradient.GetSteps())); SetAttributes(pRect); - aGradientAttr.Put(XFillStyleItem(XFILL_GRADIENT)); // #i125211# + aGradientAttr.Put(XFillStyleItem(drawing::FillStyle_GRADIENT)); // #i125211# aGradientAttr.Put(aXFillGradientItem); pRect->SetMergedItemSet(aGradientAttr); @@ -1501,7 +1501,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaGradientExAction& rAct) rGradient.GetSteps())); SetAttributes(pPath); - aGradientAttr.Put(XFillStyleItem(XFILL_GRADIENT)); // #i125211# + aGradientAttr.Put(XFillStyleItem(drawing::FillStyle_GRADIENT)); // #i125211# aGradientAttr.Put(aXFillGradientItem); pPath->SetMergedItemSet(aGradientAttr); @@ -1690,7 +1690,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaFloatTransparentAction& rAct) // since these metafile content is not used to draw line/fill // dependent of these setting at the device content pGraf->SetMergedItem(XLineStyleItem(XLINE_NONE)); - pGraf->SetMergedItem(XFillStyleItem(XFILL_NONE)); + pGraf->SetMergedItem(XFillStyleItem(drawing::FillStyle_NONE)); InsertObj(pGraf); } } diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index be7047d07358..9f1322c98781 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -55,6 +55,8 @@ #include <svx/xlnstwit.hxx> #include <svx/xtextit0.hxx> +using namespace com::sun::star; + #define ITEMBROWSER_WHICHCOL_ID 1 #define ITEMBROWSER_STATECOL_ID 2 #define ITEMBROWSER_TYPECOL_ID 3 @@ -639,12 +641,12 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI { rIndent=1; if (ImpGetItem(*pSet,XATTR_FILLSTYLE,pItem)) { - XFillStyle eFillStyle=((const XFillStyleItem*)pItem)->GetValue(); - if (eFillStyle==XFILL_NONE) return true; + drawing::FillStyle eFillStyle=((const XFillStyleItem*)pItem)->GetValue(); + if (eFillStyle==drawing::FillStyle_NONE) return true; // transparency currently only for SolidFill - if (eFillStyle!=XFILL_SOLID && (nWhich==XATTR_FILLCOLOR || nWhich==XATTR_FILLTRANSPARENCE)) return true; - if (eFillStyle!=XFILL_GRADIENT && (nWhich==XATTR_FILLGRADIENT || nWhich==XATTR_GRADIENTSTEPCOUNT)) return true; - if (eFillStyle!=XFILL_HATCH && (nWhich==XATTR_FILLHATCH || nWhich==XATTR_FILLBACKGROUND)) return true; + if (eFillStyle!=drawing::FillStyle_SOLID && (nWhich==XATTR_FILLCOLOR || nWhich==XATTR_FILLTRANSPARENCE)) return true; + if (eFillStyle!=drawing::FillStyle_GRADIENT && (nWhich==XATTR_FILLGRADIENT || nWhich==XATTR_GRADIENTSTEPCOUNT)) return true; + if (eFillStyle!=drawing::FillStyle_HATCH && (nWhich==XATTR_FILLHATCH || nWhich==XATTR_FILLBACKGROUND)) return true; } } break; case XATTR_FILLBITMAP : @@ -660,8 +662,8 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI case XATTR_FILLBMP_POSOFFSETY : { /* only if TILE=sal_True*/ rIndent=1; if (ImpGetItem(*pSet,XATTR_FILLSTYLE,pItem)) { - XFillStyle eFillStyle=((const XFillStyleItem*)pItem)->GetValue(); - if (eFillStyle!=XFILL_BITMAP) return true; + drawing::FillStyle eFillStyle=((const XFillStyleItem*)pItem)->GetValue(); + if (eFillStyle!=drawing::FillStyle_BITMAP) return true; } if (nWhich==XATTR_FILLBITMAP || nWhich==XATTR_FILLBMP_TILE) { return false; // always selectable diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 230cceb516bf..acfbcab68ad0 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -52,6 +52,7 @@ #include <editeng/editdata.hxx> +using namespace com::sun::star; // Migrate Marking of Objects, Points and GluePoints @@ -991,9 +992,9 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode) { SdrObject* pObj = GetMarkedObjectByIndex(0); const SfxItemSet& rSet = pObj->GetMergedItemSet(); - XFillStyle eFillStyle = ((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue(); + drawing::FillStyle eFillStyle = ((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue(); - if(eFillStyle == XFILL_GRADIENT) + if(eFillStyle == drawing::FillStyle_GRADIENT) { // set values and transform to vector set GradTransformer aGradTransformer; diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 9e021dc819d8..c2257f279914 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -230,7 +230,7 @@ SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemS while(aIterator.IsMore()) { SdrObject* pObj = aIterator.Next(); - XFillStyle eFillStyle = ((XFillStyleItem&)(pObj->GetMergedItem(XATTR_FILLSTYLE))).GetValue(); + drawing::FillStyle eFillStyle = ((XFillStyleItem&)(pObj->GetMergedItem(XATTR_FILLSTYLE))).GetValue(); if(!bLineUsed) { @@ -244,22 +244,22 @@ SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemS if(!bAllFillUsed) { - if(!bSolidFillUsed && XFILL_SOLID == eFillStyle) + if(!bSolidFillUsed && drawing::FillStyle_SOLID == eFillStyle) { bSolidFillUsed = true; bAllFillUsed = (bSolidFillUsed && bGradientFillUsed && bHatchFillUsed && bBitmapFillUsed); } - if(!bGradientFillUsed && XFILL_GRADIENT == eFillStyle) + if(!bGradientFillUsed && drawing::FillStyle_GRADIENT == eFillStyle) { bGradientFillUsed = true; bAllFillUsed = (bSolidFillUsed && bGradientFillUsed && bHatchFillUsed && bBitmapFillUsed); } - if(!bHatchFillUsed && XFILL_HATCH == eFillStyle) + if(!bHatchFillUsed && drawing::FillStyle_HATCH == eFillStyle) { bHatchFillUsed = true; bAllFillUsed = (bSolidFillUsed && bGradientFillUsed && bHatchFillUsed && bBitmapFillUsed); } - if(!bBitmapFillUsed && XFILL_BITMAP == eFillStyle) + if(!bBitmapFillUsed && drawing::FillStyle_BITMAP == eFillStyle) { bBitmapFillUsed = true; bAllFillUsed = (bSolidFillUsed && bGradientFillUsed && bHatchFillUsed && bBitmapFillUsed); diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx index ba7e8b1aad6e..0ecea696cc1e 100644 --- a/svx/source/svdraw/svdoattr.cxx +++ b/svx/source/svdraw/svdoattr.cxx @@ -72,7 +72,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include "svx/xlinjoit.hxx" - +using namespace com::sun::star; sdr::properties::BaseProperties* SdrAttrObj::CreateObjectSpecificProperties() { @@ -154,7 +154,7 @@ sal_Int32 SdrAttrObj::ImpGetLineWdt() const bool SdrAttrObj::HasFill() const { - return bClosedObj && ((XFillStyleItem&)(GetProperties().GetObjectItemSet().Get(XATTR_FILLSTYLE))).GetValue()!=XFILL_NONE; + return bClosedObj && ((XFillStyleItem&)(GetProperties().GetObjectItemSet().Get(XATTR_FILLSTYLE))).GetValue()!=drawing::FillStyle_NONE; } bool SdrAttrObj::HasLine() const diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index dea52a782230..18cc1bce95f6 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -1180,7 +1180,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeContour() const basegfx::B2DPolyPolygon aRetval; // create cloned object without text, but with XLINE_SOLID, - // COL_BLACK as line color and XFILL_NONE + // COL_BLACK as line color and drawing::FillStyle_NONE SdrObject* pClone = Clone(); if(pClone) @@ -1224,7 +1224,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeContour() const // solid black lines and no fill aNewSet.Put(XLineStyleItem(XLINE_SOLID)); aNewSet.Put(XLineColorItem(OUString(), Color(COL_BLACK))); - aNewSet.Put(XFillStyleItem(XFILL_NONE)); + aNewSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); pClone->SetMergedItemSet(aNewSet); // get sequence from clone @@ -2546,7 +2546,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, bool bForceLineDas if(aMergedLineFillPolyPolygon.count() || (bForceLineDash && aMergedHairlinePolyPolygon.count())) { SfxItemSet aSet(pRet->GetMergedItemSet()); - XFillStyle eOldFillStyle = ((const XFillStyleItem&)(aSet.Get(XATTR_FILLSTYLE))).GetValue(); + drawing::FillStyle eOldFillStyle = ((const XFillStyleItem&)(aSet.Get(XATTR_FILLSTYLE))).GetValue(); SdrPathObj* aLinePolygonPart = NULL; SdrPathObj* aLineHairlinePart = NULL; bool bBuildGroup(false); @@ -2563,7 +2563,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, bool bForceLineDas Color aColorLine = ((const XLineColorItem&)(aSet.Get(XATTR_LINECOLOR))).GetColorValue(); sal_uInt16 nTransLine = ((const XLineTransparenceItem&)(aSet.Get(XATTR_LINETRANSPARENCE))).GetValue(); aSet.Put(XFillColorItem(OUString(), aColorLine)); - aSet.Put(XFillStyleItem(XFILL_SOLID)); + aSet.Put(XFillStyleItem(drawing::FillStyle_SOLID)); aSet.Put(XFillTransparenceItem(nTransLine)); aLinePolygonPart->SetMergedItemSet(aSet); @@ -2579,7 +2579,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, bool bForceLineDas aLineHairlinePart->SetModel(pRet->GetModel()); aSet.Put(XLineWidthItem(0L)); - aSet.Put(XFillStyleItem(XFILL_NONE)); + aSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); aSet.Put(XLineStyleItem(XLINE_SOLID)); // it is also necessary to switch off line start and ends here @@ -2600,7 +2600,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, bool bForceLineDas if(pPath && pPath->IsClosed()) { - if(eOldFillStyle != XFILL_NONE) + if(eOldFillStyle != drawing::FillStyle_NONE) { bAddOriginalGeometry = true; } @@ -3215,10 +3215,10 @@ bool SdrObject::IsInDestruction() const return false; } -// return if fill is != XFILL_NONE +// return if fill is != drawing::FillStyle_NONE bool SdrObject::HasFillStyle() const { - return (((const XFillStyleItem&)GetObjectItem(XATTR_FILLSTYLE)).GetValue() != XFILL_NONE); + return (((const XFillStyleItem&)GetObjectItem(XATTR_FILLSTYLE)).GetValue() != drawing::FillStyle_NONE); } bool SdrObject::HasLineStyle() const diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 1cdf8be3403b..db836dd721e0 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -50,7 +50,7 @@ #include <svx/xlnwtit.hxx> #include <svx/xpool.hxx> - +using namespace com::sun::star; Point GetWinkPnt(const Rectangle& rR, long nWink) { @@ -194,8 +194,8 @@ bool SdrCircObj::PaintNeedsXPolyCirc() const // XPoly is necessary if Fill !=None and !=Solid if(!bNeed && meCircleKind != OBJ_CARC) { - XFillStyle eFill=((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue(); - bNeed = eFill != XFILL_NONE && eFill != XFILL_SOLID; + drawing::FillStyle eFill=((XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue(); + bNeed = eFill != drawing::FillStyle_NONE && eFill != drawing::FillStyle_SOLID; } if(!bNeed && meCircleKind != OBJ_CIRC && nStartWink == nEndWink) diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 54776a56598d..f5c263246b17 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -982,7 +982,7 @@ void SdrGrafObj::SetPage( SdrPage* pNewPage ) } else { - SetMergedItem(XFillStyleItem(XFILL_NONE)); + SetMergedItem(XFillStyleItem(drawing::FillStyle_NONE)); SetMergedItem(XLineStyleItem(XLINE_NONE)); } } @@ -1176,7 +1176,7 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const // retrieve bitmap for the fill SfxItemSet aSet(GetObjectItemSet()); - aSet.Put(XFillStyleItem(XFILL_BITMAP)); + aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); const BitmapEx aBitmapEx(GetTransformedGraphic().GetBitmapEx()); aSet.Put(XFillBitmapItem(OUString(), Graphic(aBitmapEx))); aSet.Put(XFillBmpTileItem(false)); diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 0d3ed8a27113..d1348c648b0d 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -1364,7 +1364,7 @@ SdrObject* SdrOle2Obj::createSdrGrafObjReplacement(bool bAddText, bool /* bUseHC pClone->SetMergedItem(XLineColorItem(OUString(), aColor.nColor)); // bitmap fill - pClone->SetMergedItem(XFillStyleItem(XFILL_BITMAP)); + pClone->SetMergedItem(XFillStyleItem(drawing::FillStyle_BITMAP)); pClone->SetMergedItem(XFillBitmapItem(OUString(), GetEmptyOLEReplacementGraphic())); pClone->SetMergedItem(XFillBmpTileItem(false)); pClone->SetMergedItem(XFillBmpStretchItem(false)); @@ -1493,7 +1493,7 @@ void SdrOle2Obj::SetPage(SdrPage* pNewPage) } else { - SetMergedItem(XFillStyleItem(XFILL_NONE)); + SetMergedItem(XFillStyleItem(drawing::FillStyle_NONE)); SetMergedItem(XLineStyleItem(XLINE_NONE)); } } diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index 45f9f01fed81..387f57910cde 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -44,6 +44,7 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> +using namespace com::sun::star; // BaseProperties section @@ -180,8 +181,8 @@ void SdrRectObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const rInfo.bTransparenceAllowed = true; // gradient depends on fillstyle - XFillStyle eFillStyle = ((XFillStyleItem&)(GetObjectItem(XATTR_FILLSTYLE))).GetValue(); - rInfo.bGradientAllowed = (eFillStyle == XFILL_GRADIENT); + drawing::FillStyle eFillStyle = ((XFillStyleItem&)(GetObjectItem(XATTR_FILLSTYLE))).GetValue(); + rInfo.bGradientAllowed = (eFillStyle == drawing::FillStyle_GRADIENT); rInfo.bShearAllowed =bNoTextFrame; rInfo.bEdgeRadiusAllowed=true; diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 0c6e8ca63560..219fc6398e35 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -444,8 +444,8 @@ void SdrTextObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const rInfo.bTransparenceAllowed = true; // gradient depends on fillstyle - XFillStyle eFillStyle = ((XFillStyleItem&)(GetObjectItem(XATTR_FILLSTYLE))).GetValue(); - rInfo.bGradientAllowed = (eFillStyle == XFILL_GRADIENT); + drawing::FillStyle eFillStyle = ((XFillStyleItem&)(GetObjectItem(XATTR_FILLSTYLE))).GetValue(); + rInfo.bGradientAllowed = (eFillStyle == drawing::FillStyle_GRADIENT); rInfo.bShearAllowed =bNoTextFrame; rInfo.bEdgeRadiusAllowed=true; bool bCanConv=ImpCanConvTextToCurve(); diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 2f7c4e1dfede..b4d52033e06c 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -50,6 +50,7 @@ #include <editeng/outlobj.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> +using namespace com::sun::star; // helpers @@ -895,14 +896,14 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( Color aOriginalBackColor(rOutliner.GetBackgroundColor()); const SfxItemSet* pBackgroundFillSet = &GetObjectItemSet(); - if (XFILL_NONE == ((const XFillStyleItem&)pBackgroundFillSet->Get(XATTR_FILLSTYLE)).GetValue()) + if (drawing::FillStyle_NONE == ((const XFillStyleItem&)pBackgroundFillSet->Get(XATTR_FILLSTYLE)).GetValue()) { SdrPage *pOwnerPage = GetPage(); if (pOwnerPage) { pBackgroundFillSet = &pOwnerPage->getSdrPageProperties().GetItemSet(); - if (XFILL_NONE == ((const XFillStyleItem&)pBackgroundFillSet->Get(XATTR_FILLSTYLE)).GetValue()) + if (drawing::FillStyle_NONE == ((const XFillStyleItem&)pBackgroundFillSet->Get(XATTR_FILLSTYLE)).GetValue()) { if (!pOwnerPage->IsMasterPage() && pOwnerPage->TRG_HasMasterPage()) { @@ -912,7 +913,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( } } - if (XFILL_NONE != ((const XFillStyleItem&)pBackgroundFillSet->Get(XATTR_FILLSTYLE)).GetValue()) + if (drawing::FillStyle_NONE != ((const XFillStyleItem&)pBackgroundFillSet->Get(XATTR_FILLSTYLE)).GetValue()) { Color aColor(rOutliner.GetBackgroundColor()); GetDraftFillColor(*pBackgroundFillSet, aColor); diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index 25997de5c3af..22bc44f4be8a 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -38,6 +38,7 @@ #include <svx/xlnclit.hxx> #include <svx/xlnwtit.hxx> +using namespace com::sun::star; void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect) { @@ -378,7 +379,7 @@ SdrObject* SdrTextObj::ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const // set needed items aAttributeSet.Put(XFillColorItem(OUString(), Color(rCandidate.getBColor()))); aAttributeSet.Put(XLineStyleItem(XLINE_NONE)); - aAttributeSet.Put(XFillStyleItem(XFILL_SOLID)); + aAttributeSet.Put(XFillStyleItem(drawing::FillStyle_SOLID)); // create filled SdrPathObj pPathObj = new SdrPathObj(OBJ_PATHFILL, aPolyPolygon); @@ -389,7 +390,7 @@ SdrObject* SdrTextObj::ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const aAttributeSet.Put(XLineColorItem(OUString(), Color(rCandidate.getBColor()))); aAttributeSet.Put(XLineStyleItem(XLINE_SOLID)); aAttributeSet.Put(XLineWidthItem(0)); - aAttributeSet.Put(XFillStyleItem(XFILL_NONE)); + aAttributeSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); // create line SdrPathObj pPathObj = new SdrPathObj(OBJ_PATHLINE, aPolyPolygon); diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index 04f52ebcd2a4..f56886bd10ca 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -1157,7 +1157,7 @@ SdrPageProperties::SdrPageProperties(SdrPage& rSdrPage) { if(!rSdrPage.IsMasterPage()) { - mpProperties->Put(XFillStyleItem(XFILL_NONE)); + mpProperties->Put(XFillStyleItem(drawing::FillStyle_NONE)); } } @@ -1815,7 +1815,7 @@ Color SdrPage::GetPageBackgroundColor( SdrPageView* pView, bool bScreenDisplay ) if(!IsMasterPage() && TRG_HasMasterPage()) { - if(XFILL_NONE == ((const XFillStyleItem&)pBackgroundFill->Get(XATTR_FILLSTYLE)).GetValue()) + if(drawing::FillStyle_NONE == ((const XFillStyleItem&)pBackgroundFill->Get(XATTR_FILLSTYLE)).GetValue()) { pBackgroundFill = &TRG_GetMasterPage().getSdrPageProperties().GetItemSet(); } diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 5b3c57b14944..e6f179f1c24f 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -55,7 +55,7 @@ #include <svx/sdr/contact/objectcontactofobjlistpainter.hxx> #include <svx/sdr/contact/displayinfo.hxx> - +using namespace com::sun::star; SdrExchangeView::SdrExchangeView(SdrModel* pModel1, OutputDevice* pOut): SdrObjEditView(pModel1,pOut) @@ -153,7 +153,7 @@ bool SdrExchangeView::Paste(const OUString& rStr, const Point& rPos, SdrObjList* SfxItemSet aTempAttr(pMod->GetItemPool()); // no fill, no line aTempAttr.Put(XLineStyleItem(XLINE_NONE)); - aTempAttr.Put(XFillStyleItem(XFILL_NONE)); + aTempAttr.Put(XFillStyleItem(drawing::FillStyle_NONE)); pObj->SetMergedItemSet(aTempAttr); @@ -189,7 +189,7 @@ bool SdrExchangeView::Paste(SvStream& rInput, const OUString& rBaseURL, sal_uInt SfxItemSet aTempAttr(pMod->GetItemPool()); // no fill, no line aTempAttr.Put(XLineStyleItem(XLINE_NONE)); - aTempAttr.Put(XFillStyleItem(XFILL_NONE)); + aTempAttr.Put(XFillStyleItem(drawing::FillStyle_NONE)); pObj->SetMergedItemSet(aTempAttr); diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 72ebdc95ab78..57b507c54d6b 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -74,6 +74,7 @@ using ::com::sun::star::beans::XPropertySet; using ::com::sun::star::util::XModifyBroadcaster; using sdr::properties::TextProperties; using sdr::properties::BaseProperties; +using namespace ::com::sun::star; using namespace ::com::sun::star::text; using namespace ::com::sun::star::container; using namespace ::com::sun::star::style; @@ -1364,8 +1365,8 @@ void SdrTableObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const rInfo.bTransparenceAllowed = true; // gradient depends on fillstyle - XFillStyle eFillStyle = ((XFillStyleItem&)(GetObjectItem(XATTR_FILLSTYLE))).GetValue(); - rInfo.bGradientAllowed = (eFillStyle == XFILL_GRADIENT); + drawing::FillStyle eFillStyle = ((XFillStyleItem&)(GetObjectItem(XATTR_FILLSTYLE))).GetValue(); + rInfo.bGradientAllowed = (eFillStyle == drawing::FillStyle_GRADIENT); rInfo.bShearAllowed =false; rInfo.bEdgeRadiusAllowed=false; rInfo.bCanConvToPath =false; diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index 56ac8a6f2bfd..9792a562bde0 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -36,6 +36,7 @@ #include "svx/xexch.hxx" #include <vcl/svapp.hxx> +using namespace com::sun::star; // - SvxColorValueSetData - @@ -197,7 +198,7 @@ void SvxColorValueSet_docking::DoDrag() SfxItemSet& rSet = aXFillSetItem.GetItemSet(); rSet.Put( XFillColorItem( GetItemText( nItemId ), GetItemColor( nItemId ) ) ); - rSet.Put(XFillStyleItem( ( 1 == nItemId ) ? XFILL_NONE : XFILL_SOLID ) ); + rSet.Put(XFillStyleItem( ( 1 == nItemId ) ? drawing::FillStyle_NONE : drawing::FillStyle_SOLID ) ); EndSelection(); ( new SvxColorValueSetData( aXFillSetItem ) )->StartDrag( this, DND_ACTION_COPY ); @@ -425,7 +426,7 @@ IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl) { if ( nPos == 1 ) // unsichtbar { - XFillStyleItem aXFillStyleItem( XFILL_NONE ); + XFillStyleItem aXFillStyleItem( drawing::FillStyle_NONE ); pDispatcher->Execute( nLeftSlot, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L ); } else @@ -448,7 +449,7 @@ IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl) } if ( !bDone ) { - XFillStyleItem aXFillStyleItem( XFILL_SOLID ); + XFillStyleItem aXFillStyleItem( drawing::FillStyle_SOLID ); XFillColorItem aXFillColorItem( aStr, aColor ); pDispatcher->Execute( nLeftSlot, SFX_CALLMODE_RECORD, &aXFillColorItem, &aXFillStyleItem, 0L ); diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index fb0b930d5cfd..5b735c9dae1f 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -38,6 +38,7 @@ #include "helpid.hrc" #include <boost/scoped_ptr.hpp> +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::util; using namespace ::com::sun::star::beans; @@ -64,7 +65,7 @@ SvxFillToolBoxControl::SvxFillToolBoxControl( , mpFillControl(0) , mpFillTypeLB(0) , mpFillAttrLB(0) - , meLastXFS(XFILL_NONE) + , meLastXFS(drawing::FillStyle_NONE) , mbUpdate(false) { addStatusListener( OUString( ".uno:FillColor" )); @@ -120,14 +121,14 @@ void SvxFillToolBoxControl::StateChanged( } else if(mpStyleItem) { - const XFillStyle eXFS(static_cast< XFillStyle >(mpStyleItem->GetValue())); + const drawing::FillStyle eXFS(static_cast< drawing::FillStyle >(mpStyleItem->GetValue())); if(nSID == SID_ATTR_FILL_COLOR) { delete mpColorItem; mpColorItem = static_cast< XFillColorItem* >(pState->Clone()); - if(eXFS == XFILL_SOLID) + if(eXFS == drawing::FillStyle_SOLID) { bEnableControls = true; } @@ -137,7 +138,7 @@ void SvxFillToolBoxControl::StateChanged( delete mpGradientItem; mpGradientItem = static_cast< XFillGradientItem* >(pState->Clone()); - if(eXFS == XFILL_GRADIENT) + if(eXFS == drawing::FillStyle_GRADIENT) { bEnableControls = true; } @@ -147,7 +148,7 @@ void SvxFillToolBoxControl::StateChanged( delete mpHatchItem; mpHatchItem = static_cast< XFillHatchItem* >(pState->Clone()); - if(eXFS == XFILL_HATCH) + if(eXFS == drawing::FillStyle_HATCH) { bEnableControls = true; } @@ -157,7 +158,7 @@ void SvxFillToolBoxControl::StateChanged( delete mpBitmapItem; mpBitmapItem = static_cast< XFillBitmapItem* >(pState->Clone()); - if(eXFS == XFILL_BITMAP) + if(eXFS == drawing::FillStyle_BITMAP) { bEnableControls = true; } @@ -167,12 +168,12 @@ void SvxFillToolBoxControl::StateChanged( if(mpStyleItem) { // ensure that the correct entry is selected in mpFillTypeLB - XFillStyle eXFS(static_cast< XFillStyle >(mpStyleItem->GetValue())); + drawing::FillStyle eXFS(static_cast< drawing::FillStyle >(mpStyleItem->GetValue())); const bool bFillTypeChangedByUser(mpFillControl->mbFillTypeChanged); if(bFillTypeChangedByUser) { - meLastXFS = static_cast< XFillStyle >(mpFillControl->mnLastFillTypeControlSelectEntryPos); + meLastXFS = static_cast< drawing::FillStyle >(mpFillControl->mnLastFillTypeControlSelectEntryPos); mpFillControl->mbFillTypeChanged = false; } @@ -207,18 +208,18 @@ void SvxFillToolBoxControl::StateChanged( } else { - XFillStyle eXFS(XFILL_NONE); + drawing::FillStyle eXFS(drawing::FillStyle_NONE); if(mpStyleItem) { - eXFS = static_cast< XFillStyle >(mpStyleItem->GetValue()); + eXFS = static_cast< drawing::FillStyle >(mpStyleItem->GetValue()); } if(!mpStyleItem || - (nSID == SID_ATTR_FILL_COLOR && eXFS == XFILL_SOLID) || - (nSID == SID_ATTR_FILL_GRADIENT && eXFS == XFILL_GRADIENT) || - (nSID == SID_ATTR_FILL_HATCH && eXFS == XFILL_HATCH) || - (nSID == SID_ATTR_FILL_BITMAP && eXFS == XFILL_BITMAP)) + (nSID == SID_ATTR_FILL_COLOR && eXFS == drawing::FillStyle_SOLID) || + (nSID == SID_ATTR_FILL_GRADIENT && eXFS == drawing::FillStyle_GRADIENT) || + (nSID == SID_ATTR_FILL_HATCH && eXFS == drawing::FillStyle_HATCH) || + (nSID == SID_ATTR_FILL_BITMAP && eXFS == drawing::FillStyle_BITMAP)) { mpFillAttrLB->SetNoSelection(); } @@ -233,7 +234,7 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState) if(mpStyleItem && pState && mbUpdate) { mbUpdate = false; - const XFillStyle eXFS(static_cast< XFillStyle >(mpStyleItem->GetValue())); + const drawing::FillStyle eXFS(static_cast< drawing::FillStyle >(mpStyleItem->GetValue())); // Check if the fill style was already active if(meLastXFS != eXFS) @@ -246,12 +247,12 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState) switch(eXFS) { - case XFILL_NONE: + case drawing::FillStyle_NONE: { break; } - case XFILL_SOLID: + case drawing::FillStyle_SOLID: { if(mpColorItem) { @@ -295,7 +296,7 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState) break; } - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: { if(mpGradientItem) { @@ -340,7 +341,7 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState) break; } - case XFILL_HATCH: + case drawing::FillStyle_HATCH: { if(mpHatchItem) { @@ -385,7 +386,7 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState) break; } - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { if(mpBitmapItem) { @@ -440,12 +441,12 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState) if(pState && mpStyleItem) { - XFillStyle eXFS = static_cast< XFillStyle >(mpStyleItem->GetValue()); + drawing::FillStyle eXFS = static_cast< drawing::FillStyle >(mpStyleItem->GetValue()); // Does the lists have changed? switch(eXFS) { - case XFILL_SOLID: + case drawing::FillStyle_SOLID: { const SvxColorListItem* pItem = dynamic_cast< const SvxColorListItem* >(pState); @@ -458,7 +459,7 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState) } break; } - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: { const SvxGradientListItem* pItem = dynamic_cast< const SvxGradientListItem* >(pState); @@ -471,7 +472,7 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState) } break; } - case XFILL_HATCH: + case drawing::FillStyle_HATCH: { const SvxHatchListItem* pItem = dynamic_cast< const SvxHatchListItem* >(pState); @@ -484,7 +485,7 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState) } break; } - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { const SvxBitmapListItem* pItem = dynamic_cast< const SvxBitmapListItem* >(pState); @@ -497,7 +498,7 @@ void SvxFillToolBoxControl::Update(const SfxPoolItem* pState) } break; } - default: // XFILL_NONE + default: // drawing::FillStyle_NONE { break; } @@ -527,8 +528,8 @@ Window* SvxFillToolBoxControl::CreateItemWindow(Window *pParent) // and selecting a DrawObject, thhus a useful initialization is // needed to get the FillType and the FillStyle List inited // correctly. This in combination with meLastXFS inited to - // XFILL_NONE do the trick - mpStyleItem = new XFillStyleItem(XFILL_SOLID); + // drawing::FillStyle_NONE do the trick + mpStyleItem = new XFillStyleItem(drawing::FillStyle_SOLID); } return mpFillControl; @@ -575,7 +576,7 @@ FillControl::~FillControl() delete mpLbFillAttr; } -void FillControl::InitializeFillStyleAccordingToGivenFillType(XFillStyle aFillStyle) +void FillControl::InitializeFillStyleAccordingToGivenFillType(drawing::FillStyle aFillStyle) { SfxObjectShell* pSh = SfxObjectShell::Current(); bool bDone(false); @@ -587,7 +588,7 @@ void FillControl::InitializeFillStyleAccordingToGivenFillType(XFillStyle aFillSt switch (aFillStyle) { - case XFILL_SOLID: + case drawing::FillStyle_SOLID: { if(pSh->GetItem(SID_COLOR_TABLE)) { @@ -599,7 +600,7 @@ void FillControl::InitializeFillStyleAccordingToGivenFillType(XFillStyle aFillSt break; } - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: { if(pSh->GetItem(SID_GRADIENT_LIST)) { @@ -611,7 +612,7 @@ void FillControl::InitializeFillStyleAccordingToGivenFillType(XFillStyle aFillSt break; } - case XFILL_HATCH: + case drawing::FillStyle_HATCH: { if(pSh->GetItem(SID_HATCH_LIST)) { @@ -623,7 +624,7 @@ void FillControl::InitializeFillStyleAccordingToGivenFillType(XFillStyle aFillSt break; } - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { if(pSh->GetItem(SID_BITMAP_LIST)) { @@ -634,9 +635,9 @@ void FillControl::InitializeFillStyleAccordingToGivenFillType(XFillStyle aFillSt } break; } - default: // XFILL_NONE + default: // drawing::FillStyle_NONE { - // accept disable (no styles for XFILL_NONE) + // accept disable (no styles for drawing::FillStyle_NONE) break; } } @@ -666,9 +667,9 @@ IMPL_LINK(FillControl,SelectFillTypeHdl,ListBox *,pBox) && mpLbFillType->GetSelectEntryPos() != mnLastFillTypeControlSelectEntryPos); updateLastFillTypeControlSelectEntryPos(); - XFillStyle eXFS = static_cast< XFillStyle >(mpLbFillType->GetSelectEntryPos()); + drawing::FillStyle eXFS = static_cast< drawing::FillStyle >(mpLbFillType->GetSelectEntryPos()); - if(bAction && XFILL_NONE != eXFS) + if(bAction && drawing::FillStyle_NONE != eXFS) { mbFillTypeChanged = true; } @@ -676,12 +677,12 @@ IMPL_LINK(FillControl,SelectFillTypeHdl,ListBox *,pBox) // update list of FillStyles in any case InitializeFillStyleAccordingToGivenFillType(eXFS); - // for XFILL_NONE do no longer call SelectFillAttrHdl (as done before), + // for drawing::FillStyle_NONE do no longer call SelectFillAttrHdl (as done before), // trigger needed actions directly. This is the only action this handler // can trigger directly as the user action is finished in this case - if(XFILL_NONE == eXFS && bAction) + if(drawing::FillStyle_NONE == eXFS && bAction) { - // for XFILL_NONE do no longer call SelectFillAttrHdl, + // for drawing::FillStyle_NONE do no longer call SelectFillAttrHdl, // trigger needed actions directly Any a; Sequence< PropertyValue > aArgsFillStyle(1); @@ -741,17 +742,18 @@ IMPL_LINK(FillControl, SelectFillAttrHdl, ListBox *, pBox) Any a; Sequence< PropertyValue > aArgsFillAttr(1); OUString aFillAttrCommand; - XFillStyle eXFS(static_cast< XFillStyle >(mpLbFillType->GetSelectEntryPos())); + drawing::FillStyle eXFS(static_cast< drawing::FillStyle >(mpLbFillType->GetSelectEntryPos())); switch(eXFS) { - case XFILL_NONE: + default: + case drawing::FillStyle_NONE: { // handled in SelectFillTypeHdl, nothing to do here break; } - case XFILL_SOLID: + case drawing::FillStyle_SOLID: { // Entry gets tested against temporary color OUString aTmpStr = mpLbFillAttr->GetSelectEntry(); @@ -767,7 +769,7 @@ IMPL_LINK(FillControl, SelectFillAttrHdl, ListBox *, pBox) aFillAttrCommand = ".uno:FillColor"; break; } - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: { sal_Int32 nPos = mpLbFillAttr->GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem(SID_GRADIENT_LIST)) @@ -787,7 +789,7 @@ IMPL_LINK(FillControl, SelectFillAttrHdl, ListBox *, pBox) break; } - case XFILL_HATCH: + case drawing::FillStyle_HATCH: { sal_Int32 nPos = mpLbFillAttr->GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem(SID_HATCH_LIST)) @@ -808,7 +810,7 @@ IMPL_LINK(FillControl, SelectFillAttrHdl, ListBox *, pBox) break; } - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { sal_Int32 nPos = mpLbFillAttr->GetSelectEntryPos(); if (nPos != LISTBOX_ENTRY_NOTFOUND && pSh && pSh->GetItem(SID_BITMAP_LIST)) diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index 11a24d7cad5b..40865b85bc50 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <com/sun/star/drawing/FillStyle.hpp> + #include <tools/shl.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/objsh.hxx> @@ -43,6 +45,7 @@ #include "svx/linectrl.hxx" #include <svtools/colorcfg.hxx> +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::util; @@ -429,7 +432,7 @@ SvxFillTypeBox::SvxFillTypeBox( Window* pParent, WinBits nBits ) : { SetSizePixel( LogicToPixel( Size(40, 40 ),MAP_APPFONT )); Fill(); - SelectEntryPos( XFILL_SOLID ); + SelectEntryPos( drawing::FillStyle_SOLID ); Show(); } diff --git a/svx/source/unodraw/unobrushitemhelper.cxx b/svx/source/unodraw/unobrushitemhelper.cxx index cad5ee21b20c..8ba7dfd4c8db 100644 --- a/svx/source/unodraw/unobrushitemhelper.cxx +++ b/svx/source/unodraw/unobrushitemhelper.cxx @@ -37,6 +37,8 @@ #include <svx/xfltrit.hxx> #include <svx/unoshape.hxx> +using namespace com::sun::star; + //UUUU void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem& rBrush, SfxItemSet& rToSet) { @@ -54,7 +56,7 @@ void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem& rBrush, SfxI // we have a color fill const Color aColor(rBrush.GetColor().GetRGBColor()); - rToSet.Put(XFillStyleItem(XFILL_SOLID)); + rToSet.Put(XFillStyleItem(drawing::FillStyle_SOLID)); rToSet.Put(XFillColorItem(OUString(), aColor)); // #125189# nTransparency is in range [0..254], convert to [0..100] which is used in @@ -64,7 +66,7 @@ void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem& rBrush, SfxI else if(GPOS_NONE != rBrush.GetGraphicPos()) { // we have a graphic fill, set fill style - rToSet.Put(XFillStyleItem(XFILL_BITMAP)); + rToSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); // set graphic (if available) const Graphic* pGraphic = rBrush.GetGraphic(); @@ -140,10 +142,10 @@ void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem& rBrush, SfxI // Also need to set the FillStyle to NONE to express the 0xff transparency flag; this // is needed when e.g. first transparency is set to 0xff and then a Graphic gets set. // When not changing the FillStyle, the next getSvxBrushItemFromSourceSet *will* return - // to XFILL_SOLID with the rescued color. + // to drawing::FillStyle_SOLID with the rescued color. const Color aColor(rBrush.GetColor().GetRGBColor()); - rToSet.Put(XFillStyleItem(XFILL_NONE)); + rToSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); rToSet.Put(XFillColorItem(OUString(), aColor)); } } @@ -194,9 +196,9 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt { const XFillStyleItem* pXFillStyleItem(static_cast< const XFillStyleItem* >(rSourceSet.GetItem(XATTR_FILLSTYLE, bSearchInParents))); - if(!pXFillStyleItem || XFILL_NONE == pXFillStyleItem->GetValue()) + if(!pXFillStyleItem || drawing::FillStyle_NONE == pXFillStyleItem->GetValue()) { - // no fill, still need to rescue the evtl. set RGB color, but use as transparent color (we have XFILL_NONE) + // no fill, still need to rescue the evtl. set RGB color, but use as transparent color (we have drawing::FillStyle_NONE) Color aFillColor(static_cast< const XFillColorItem& >(rSourceSet.Get(XATTR_FILLCOLOR, bSearchInParents)).GetColorValue()); // when fill style is none, then don't allow anything other than 0 or auto. @@ -212,18 +214,19 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt switch(pXFillStyleItem->GetValue()) { - case XFILL_NONE: + default: + case drawing::FillStyle_NONE: { // already handled above, can not happen again break; } - case XFILL_SOLID: + case drawing::FillStyle_SOLID: { // create SvxBrushItem with fill color aRetval = getSvxBrushItemForSolid(rSourceSet, bSearchInParents, nBackgroundID); break; } - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: { // cannot be directly supported, but do the best possible const XGradient aXGradient(static_cast< const XFillGradientItem& >(rSourceSet.Get(XATTR_FILLGRADIENT)).GetGradientValue()); @@ -249,7 +252,7 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt aRetval = SvxBrushItem(aMixedColor, nBackgroundID); break; } - case XFILL_HATCH: + case drawing::FillStyle_HATCH: { // cannot be directly supported, but do the best possible const XHatch& rHatch(static_cast< const XFillHatchItem& >(rSourceSet.Get(XATTR_FILLHATCH)).GetHatchValue()); @@ -257,7 +260,7 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt if(bFillBackground) { - // hatch is background-filled, use FillColor as if XFILL_SOLID + // hatch is background-filled, use FillColor as if drawing::FillStyle_SOLID aRetval = getSvxBrushItemForSolid(rSourceSet, bSearchInParents, nBackgroundID); } else @@ -283,7 +286,7 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt break; } - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { // create SvxBrushItem with bitmap info and flags const XFillBitmapItem& rBmpItm = static_cast< const XFillBitmapItem& >(rSourceSet.Get(XATTR_FILLBITMAP, bSearchInParents)); diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index bae3f7dac839..918d0e7e6afe 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -3117,7 +3117,7 @@ void SvxShape::setAllPropertiesToDefault() throw (uno::RuntimeException, std::ex if(mpObj->ISA(SdrGrafObj)) { // defaults for graphic objects have changed: - mpObj->SetMergedItem( XFillStyleItem( XFILL_NONE ) ); + mpObj->SetMergedItem( XFillStyleItem( drawing::FillStyle_NONE ) ); mpObj->SetMergedItem( XLineStyleItem( XLINE_NONE ) ); } diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index d5af6f29f6b8..7a652f08299b 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -2230,7 +2230,7 @@ bool XLineEndCenterItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_u TYPEINIT1_AUTOFACTORY(XFillStyleItem, SfxEnumItem); -XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle) : +XFillStyleItem::XFillStyleItem(drawing::FillStyle eFillStyle) : SfxEnumItem(XATTR_FILLSTYLE, sal::static_int_cast< sal_uInt16 >(eFillStyle)) { } @@ -2272,19 +2272,19 @@ SfxItemPresentation XFillStyleItem::GetPresentation switch( (sal_uInt16)GetValue() ) { - case XFILL_NONE: + case drawing::FillStyle_NONE: nId = RID_SVXSTR_INVISIBLE; break; - case XFILL_SOLID: + case drawing::FillStyle_SOLID: nId = RID_SVXSTR_SOLID; break; - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: nId = RID_SVXSTR_GRADIENT; break; - case XFILL_HATCH: + case drawing::FillStyle_HATCH: nId = RID_SVXSTR_HATCH; break; - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: nId = RID_SVXSTR_BITMAP; break; } diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index a7cdfe8bf6de..3320f61ec013 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -290,7 +290,7 @@ SwDoc::SwDoc() //UUUU The DrawingLayer ItemPool which is used as 2nd pool for Writer documents' pool // has a default for the XFillStyleItem of XFILL_SOLID and the color for it is the default // fill color (blue7 or similar). This is a problem, in Writer we want the default fill - // style to be XFILL_NONE. This cannot simply be done by changing it in the 2nd pool at the + // style to be drawing::FillStyle_NONE. This cannot simply be done by changing it in the 2nd pool at the // pool defaults when the DrawingLayer ItemPool is used for Writer, that would lead to // countless problems like DrawObjects initial fill and others. // It is also hard to find all places where the initial ItemSets for Writer (including @@ -299,8 +299,8 @@ SwDoc::SwDoc() // attribbute sets (which is done at import and using UI). Also not a good solution. // Luckily Writer uses pDfltTxtFmtColl as default parent for all paragraphs and similar, thus // it is possible to set this attribute here. It will be not reset when importing. - mpDfltTxtFmtColl->SetFmtAttr(XFillStyleItem(XFILL_NONE)); - mpDfltFrmFmt->SetFmtAttr(XFillStyleItem(XFILL_NONE)); + mpDfltTxtFmtColl->SetFmtAttr(XFillStyleItem(drawing::FillStyle_NONE)); + mpDfltFrmFmt->SetFmtAttr(XFillStyleItem(drawing::FillStyle_NONE)); /* * DefaultFormats and DefaultFormatCollections (FmtColl) diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx index 248aa06bbff9..7c1983324caf 100644 --- a/sw/source/core/docnode/nodedump.cxx +++ b/sw/source/core/docnode/nodedump.cxx @@ -50,6 +50,8 @@ #include <boost/optional.hpp> #include <rtl/strbuf.hxx> +using namespace com::sun::star; + namespace { @@ -487,19 +489,20 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet) const XFillStyleItem* pFillStyleItem = static_cast<const XFillStyleItem*>(pItem); switch (pFillStyleItem->GetValue()) { - case XFILL_NONE: + default: + case drawing::FillStyle_NONE: oValue = "none"; break; - case XFILL_SOLID: + case drawing::FillStyle_SOLID: oValue = "solid"; break; - case XFILL_GRADIENT: + case drawing::FillStyle_GRADIENT: oValue = "gradient"; break; - case XFILL_HATCH: + case drawing::FillStyle_HATCH: oValue = "hatch"; break; - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: oValue = "bitmap"; break; } diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index c99453c904bc..e874d2699b5d 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -1476,7 +1476,7 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt ) if(GRAPHIC_NONE != rGraphic.GetType() && GRAPHIC_DEFAULT != rGraphic.GetType()) { aSet.Put(XFillBitmapItem(OUString(), rGraphic)); - aSet.Put(XFillStyleItem(XFILL_BITMAP)); + aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); } } else @@ -1587,7 +1587,7 @@ bool SwFEShell::Paste(const Graphic &rGrf, const OUString& rURL) SfxItemSet aSet(pView->GetModel()->GetItemPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP); - aSet.Put(XFillStyleItem(XFILL_BITMAP)); + aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); aSet.Put(XFillBitmapItem(OUString(), rGrf)); pObj->SetMergedItemSetAndBroadcast(aSet); } diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index f3aad5f69774..df5d953834bc 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -6530,7 +6530,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage, bool bDone(false); // #i125189# We are also done when the new DrawingLayer FillAttributes are used - // or the FillStyle is set (different from XFILL_NONE) + // or the FillStyle is set (different from drawing::FillStyle_NONE) if(pOut && aFillAttributes.get()) { if(aFillAttributes->isUsed()) @@ -6545,9 +6545,9 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage, // thus need to check the model data itself for FillStyle (do not rely on // SdrAllFillAttributesHelper since it already contains optimized information, // e.g. transparency leads to no fill) - const XFillStyle eFillStyle(static_cast< const XFillStyleItem& >(GetAttrSet()->Get(XATTR_FILLSTYLE)).GetValue()); + const drawing::FillStyle eFillStyle(static_cast< const XFillStyleItem& >(GetAttrSet()->Get(XATTR_FILLSTYLE)).GetValue()); - if(XFILL_NONE != eFillStyle) + if(drawing::FillStyle_NONE != eFillStyle) { bDone = true; } @@ -7456,16 +7456,16 @@ bool SwFrm::GetBackgroundBrush( // the new DrawingLayer FillStyle is used if(rFillAttributes->isUsed()) { - // it's not XFILL_NONE + // it's not drawing::FillStyle_NONE bNewDrawingLayerFillStyleIsUsedAndNotNoFill = true; } else { // maybe optimized already when 100% transparency is used somewhere, need to test // XFillStyleItem directly from the model data - const XFillStyle eFillStyle(static_cast< const XFillStyleItem& >(pFrm->GetAttrSet()->Get(XATTR_FILLSTYLE)).GetValue()); + const drawing::FillStyle eFillStyle(static_cast< const XFillStyleItem& >(pFrm->GetAttrSet()->Get(XATTR_FILLSTYLE)).GetValue()); - if(XFILL_NONE != eFillStyle) + if(drawing::FillStyle_NONE != eFillStyle) { bNewDrawingLayerFillStyleIsUsedAndNotNoFill = true; } @@ -7478,7 +7478,7 @@ bool SwFrm::GetBackgroundBrush( // return brush of frame <pFrm>, if its color is *not* "no fill"/"auto fill" if ( // #i125189# Done when the new DrawingLayer FillAttributes are used and - // not XFILL_NONE (see above) + // not drawing::FillStyle_NONE (see above) bNewDrawingLayerFillStyleIsUsedAndNotNoFill || // done when SvxBrushItem is used diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx index f91f541018ae..2fa3f5490af9 100644 --- a/sw/source/core/unocore/swunohelper.cxx +++ b/sw/source/core/unocore/swunohelper.cxx @@ -40,6 +40,8 @@ #include <svx/xfillit0.hxx> #include <svl/itemset.hxx> +using namespace com::sun::star; + namespace SWUnoHelper { @@ -277,9 +279,9 @@ bool needToMapFillItemsToSvxBrushItemTypes(const SfxItemSet& rSet) // here different FillStyles can be excluded for export; it will depend on the // quality these fallbacks can reach. That again is done in getSvxBrushItemFromSourceSet, // take a look there how the superset of DrawObject FillStyles is mapped to SvxBrushItem. - // For now, take them all - except XFILL_NONE + // For now, take them all - except drawing::FillStyle_NONE - if(XFILL_NONE != pXFillStyleItem->GetValue()) + if(drawing::FillStyle_NONE != pXFillStyleItem->GetValue()) { return true; } diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 85541ba9a7ca..c5b6ef0eaaeb 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -353,7 +353,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI aXFillColorItem.PutValue(*pXFillColorItem); rToSet.Put(aXFillColorItem); } - else if (aXFillStyleItem.GetValue() == XFILL_SOLID && pCol) + else if (aXFillStyleItem.GetValue() == drawing::FillStyle_SOLID && pCol) { // Fill style is set to solid, but no fill color is given. // On the other hand, we have a BackColor, so use that. @@ -451,7 +451,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI aXFillTransparenceItem.PutValue(*pXFillTransparenceItem); rToSet.Put(aXFillTransparenceItem); } - else if (aXFillStyleItem.GetValue() == XFILL_SOLID && pColTrans) + else if (aXFillStyleItem.GetValue() == drawing::FillStyle_SOLID && pColTrans) { // Fill style is set to solid, but no fill transparency is given. // On the other hand, we have a BackColorTransparency, so use that. diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index 11099f9dfa2e..5f2c9af6a970 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -232,7 +232,7 @@ static void PutEEPoolItem( SfxItemSet &rEEItemSet, case RES_CHRATR_BACKGROUND: { const SvxBrushItem& rBrushItem = (const SvxBrushItem&)rSwItem; - rEEItemSet.Put( XFillStyleItem(XFILL_SOLID) ); + rEEItemSet.Put( XFillStyleItem(drawing::FillStyle_SOLID) ); rEEItemSet.Put( XFillColorItem(aEmptyOUStr, rBrushItem.GetColor()) ); } @@ -443,7 +443,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) if( bBGColor ) { - aItemSet.Put( XFillStyleItem(XFILL_SOLID) ); + aItemSet.Put( XFillStyleItem(drawing::FillStyle_SOLID) ); aItemSet.Put( XFillColorItem(aEmptyOUStr, aBGColor) ); } diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx index 27d0775d85e4..79e1e96b000f 100644 --- a/sw/source/filter/html/htmldrawwriter.cxx +++ b/sw/source/filter/html/htmldrawwriter.cxx @@ -267,9 +267,9 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt, } // BGCOLOR - XFillStyle eFillStyle = + drawing::FillStyle eFillStyle = ((const XFillStyleItem&)rItemSet.Get(XATTR_FILLSTYLE)).GetValue(); - if( XFILL_SOLID==eFillStyle ) + if( drawing::FillStyle_SOLID==eFillStyle ) { const Color& rFillColor = ((const XFillColorItem&)rItemSet.Get(XATTR_FILLCOLOR)).GetColorValue(); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index dcdb99ada084..4f5a1a313760 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7147,7 +7147,7 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush ) if (pItem) { const XFillStyleItem* pFillStyle = static_cast<const XFillStyleItem*>(pItem); - if(pFillStyle->GetValue() == XFILL_BITMAP) + if(pFillStyle->GetValue() == drawing::FillStyle_BITMAP) { bImageBackground = true; } @@ -7200,7 +7200,7 @@ void DocxAttributeOutput::FormatFillStyle( const XFillStyleItem& rFillStyle ) void DocxAttributeOutput::FormatFillGradient( const XFillGradientItem& rFillGradient ) { - if (m_oFillStyle && *m_oFillStyle == XFILL_GRADIENT && !m_rExport.SdrExporter().getDMLTextFrameSyntax()) + if (m_oFillStyle && *m_oFillStyle == drawing::FillStyle_GRADIENT && !m_rExport.SdrExporter().getDMLTextFrameSyntax()) { AddToAttrList( m_rExport.SdrExporter().getFlyFillAttrList(), XML_type, "gradient" ); @@ -7244,7 +7244,7 @@ void DocxAttributeOutput::FormatFillGradient( const XFillGradientItem& rFillGrad AddToAttrList( m_rExport.SdrExporter().getFlyAttrList(), XML_fillcolor, sColor1.getStr() ); AddToAttrList( m_rExport.SdrExporter().getFlyFillAttrList(), XML_color2, sColor2.getStr() ); } - else if (m_oFillStyle && *m_oFillStyle == XFILL_GRADIENT && m_rExport.SdrExporter().getDMLTextFrameSyntax()) + else if (m_oFillStyle && *m_oFillStyle == drawing::FillStyle_GRADIENT && m_rExport.SdrExporter().getDMLTextFrameSyntax()) { uno::Reference<beans::XPropertySet> xPropertySet = SwXFrames::GetObject(const_cast<SwFrmFmt&>(m_rExport.mpParentFrame->GetFrmFmt()), FLYCNTTYPE_FRM); m_rDrawingML.SetFS(m_pSerializer); @@ -7263,7 +7263,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox ) { const XFillStyleItem* pFillStyle = static_cast<const XFillStyleItem*>(pItem); FormatFillStyle(*pFillStyle); - if (m_oFillStyle && *m_oFillStyle == XFILL_BITMAP) + if (m_oFillStyle && *m_oFillStyle == drawing::FillStyle_BITMAP) { const SdrObject* pSdrObj = m_rExport.mpParentFrame->GetFrmFmt().FindRealSdrObject(); if (pSdrObj) diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 99adbd97be33..d21560711023 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -40,6 +40,7 @@ #include <docxtablestyleexport.hxx> #include <com/sun/star/table/BorderLine2.hpp> +#include <com/sun/star/drawing/FillStyle.hpp> #include <boost/scoped_ptr.hpp> @@ -868,7 +869,7 @@ private: // Remember first cell (used for for default borders/margins) of each table std::vector<ww8::WW8TableNodeInfoInner::Pointer_t> tableFirstCells; - boost::optional<XFillStyle> m_oFillStyle; + boost::optional<css::drawing::FillStyle> m_oFillStyle; /// If FormatBox() already handled fill style / gradient. bool m_bIgnoreNextFill; diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 482569d5c7af..6364b98c0f30 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -2971,7 +2971,7 @@ void RtfAttributeOutput::FormatFillStyle(const XFillStyleItem& rFillStyle) void RtfAttributeOutput::FormatFillGradient(const XFillGradientItem& rFillGradient) { - if (*m_oFillStyle == XFILL_GRADIENT) + if (*m_oFillStyle == drawing::FillStyle_GRADIENT) { m_aFlyProperties.push_back(std::make_pair<OString, OString>("fillType", OString::number(7))); // Shade using the fillAngle diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx index d10cb92c28bd..f59a02922c28 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.hxx +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -20,6 +20,8 @@ #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX #define INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX +#include <com/sun/star/drawing/FillStyle.hpp> + #include "attributeoutputbase.hxx" #include "rtfexport.hxx" #include "rtfstringbuffer.hxx" @@ -592,7 +594,7 @@ private: std::vector< std::pair<OString, OString> > m_aFlyProperties; - boost::optional<XFillStyle> m_oFillStyle; + boost::optional<css::drawing::FillStyle> m_oFillStyle; public: RtfAttributeOutput(RtfExport& rExport); diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 44c433cca14b..6de7aecfa8b0 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -853,9 +853,9 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF { switch (pXFillStyleItem->GetValue()) { - case XFILL_NONE: + case drawing::FillStyle_NONE: break; - case XFILL_SOLID: + case drawing::FillStyle_SOLID: { // Construct an SvxBrushItem, as expected by the exporters. aSet.Put(getSvxBrushItemFromSourceSet(rFrmFmt.GetAttrSet(), RES_BACKGROUND)); diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index d757538e6b7f..2af7e71f5831 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -254,10 +254,10 @@ static void SetFill( SfxItemSet& rSet, WW8_DP_FILL& rFill ) sal_uInt16 nPat = SVBT16ToShort(rFill.flpp); if (nPat == 0) // transparent - rSet.Put(XFillStyleItem(XFILL_NONE)); + rSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); else { - rSet.Put(XFillStyleItem(XFILL_SOLID)); // necessary for textbox + rSet.Put(XFillStyleItem(drawing::FillStyle_SOLID)); // necessary for textbox if (nPat <= 1 || ((sizeof(nPatA)/sizeof(nPatA[0])) <= nPat)) { // Solid background or unknown @@ -1749,11 +1749,12 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, eState = rOldSet.GetItemState(XATTR_FILLSTYLE, true, &pItem); if (eState == SFX_ITEM_SET) { - const XFillStyle eFill = ((const XFillStyleItem*)pItem)->GetValue(); + const drawing::FillStyle eFill = ((const XFillStyleItem*)pItem)->GetValue(); switch (eFill) { - case XFILL_NONE: + default: + case drawing::FillStyle_NONE: // Writer graphics don't have it yet if (eShapeType != mso_sptPictureFrame) { @@ -1761,8 +1762,8 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, bBrushItemOk = true; } break; - case XFILL_SOLID: - case XFILL_GRADIENT: + case drawing::FillStyle_SOLID: + case drawing::FillStyle_GRADIENT: { const Color aColor = static_cast< XFillColorItem const & >( rOldSet.Get(XATTR_FILLCOLOR)).GetColorValue(); @@ -1774,11 +1775,9 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, bBrushItemOk = true; } break; - // case XFILL_GRADIENT: - // break; - case XFILL_HATCH: + case drawing::FillStyle_HATCH: break; - case XFILL_BITMAP: + case drawing::FillStyle_BITMAP: { GraphicObject aGrfObj(static_cast< XFillBitmapItem const & >(rOldSet.Get(XATTR_FILLBITMAP)).GetGraphicObject()); const bool bTile(WW8ITEMVALUE(rOldSet, XATTR_FILLBMP_TILE, SfxBoolItem) ? true: false); @@ -2725,7 +2724,7 @@ SwFrmFmt* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject, pSdrTextObj = new SdrRectObj( OBJ_TEXT, pThisGroup->GetCurrentBoundRect()); SfxItemSet aSet(pDrawModel->GetItemPool()); - aSet.Put(XFillStyleItem(XFILL_NONE)); + aSet.Put(XFillStyleItem(drawing::FillStyle_NONE)); aSet.Put(XLineStyleItem(XLINE_NONE)); aSet.Put(SdrTextFitToSizeTypeItem( SDRTEXTFIT_NONE )); aSet.Put(SdrTextAutoGrowHeightItem(false)); diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index f2255ba6be3e..d74956eac813 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -793,7 +793,7 @@ OUString SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) //UUUU Get currently used FillStyle and remember, also need the XFillFloatTransparenceItem // to decide if gradient transparence is used - const XFillStyle eFillStyle(static_cast< const XFillStyleItem& >(pSet->Get(XATTR_FILLSTYLE)).GetValue()); + const drawing::FillStyle eFillStyle(static_cast< const XFillStyleItem& >(pSet->Get(XATTR_FILLSTYLE)).GetValue()); const bool bUseFloatTransparence(static_cast< const XFillFloatTransparenceItem& >(pSet->Get(XATTR_FILLFLOATTRANSPARENCE)).IsEnabled()); for ( const SfxPoolItem* pItem = aIter.FirstItem(); pItem; pItem = aIter.NextItem() ) @@ -827,25 +827,25 @@ OUString SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) case XATTR_FILLCOLOR: { // only use active FillStyle information - bIsDefault = (XFILL_SOLID == eFillStyle); + bIsDefault = (drawing::FillStyle_SOLID == eFillStyle); break; } case XATTR_FILLGRADIENT: { // only use active FillStyle information - bIsDefault = (XFILL_GRADIENT == eFillStyle); + bIsDefault = (drawing::FillStyle_GRADIENT == eFillStyle); break; } case XATTR_FILLHATCH: { // only use active FillStyle information - bIsDefault = (XFILL_HATCH == eFillStyle); + bIsDefault = (drawing::FillStyle_HATCH == eFillStyle); break; } case XATTR_FILLBITMAP: { // only use active FillStyle information - bIsDefault = (XFILL_BITMAP == eFillStyle); + bIsDefault = (drawing::FillStyle_BITMAP == eFillStyle); break; } case XATTR_FILLTRANSPARENCE: @@ -1230,7 +1230,7 @@ SfxItemSet& SwDocStyleSheet::GetItemSet() case SFX_STYLE_FAMILY_PAGE : { - //UUUU set correct parent to get the XFILL_NONE FillStyle as needed + //UUUU set correct parent to get the drawing::FillStyle_NONE FillStyle as needed if(!aCoreSet.GetParent()) { aCoreSet.SetParent(&rDoc.GetDfltFrmFmt()->GetAttrSet()); diff --git a/sw/source/uibase/ribbar/concustomshape.cxx b/sw/source/uibase/ribbar/concustomshape.cxx index 9b3a5dfa7b89..f1a70d64bcc9 100644 --- a/sw/source/uibase/ribbar/concustomshape.cxx +++ b/sw/source/uibase/ribbar/concustomshape.cxx @@ -45,6 +45,8 @@ #include <math.h> +using namespace com::sun::star; + ConstCustomShape::ConstCustomShape( SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView, SfxRequest& rReq ) : SwDrawBase( pWrtShell, pEditWin, pSwView ) { @@ -86,7 +88,7 @@ bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) SfxItemSet aAttr( m_pView->GetPool() ); if ( bForceNoFillStyle ) - aAttr.Put( XFillStyleItem( XFILL_NONE ) ); + aAttr.Put( XFillStyleItem( drawing::FillStyle_NONE ) ); pObj->SetMergedItemSet(aAttr); } } diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx index d4887fa3d4b3..c61bbe757a34 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -178,7 +178,7 @@ void SwDrawShell::InsertPictureFromFile(SdrObject& rObject) SfxItemSet aSet(pSdrView->GetModel()->GetItemPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP); - aSet.Put(XFillStyleItem(XFILL_BITMAP)); + aSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP)); aSet.Put(XFillBitmapItem(OUString(), aGraphic)); rObject.SetMergedItemSetAndBroadcast(aSet); } |