Kaydet (Commit) fb31134e authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

refactor cui tabpages controls to use RenderContext

Change-Id: I91db162053cddfd669abe081e39bb85d3ee3e1f5
üst 9fd81f77
...@@ -37,11 +37,6 @@ ...@@ -37,11 +37,6 @@
#include <editeng/editrids.hrc> #include <editeng/editrids.hrc>
#include <editeng/eerdll.hxx> #include <editeng/eerdll.hxx>
// table background
#define TBL_DEST_CELL 0
#define TBL_DEST_ROW 1
#define TBL_DEST_TBL 2
#include <editeng/brushitem.hxx> #include <editeng/brushitem.hxx>
#include "backgrnd.hxx" #include "backgrnd.hxx"
...@@ -58,8 +53,12 @@ ...@@ -58,8 +53,12 @@
#include <svtools/grfmgr.hxx> #include <svtools/grfmgr.hxx>
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
using namespace ::com::sun::star; using namespace css;
// static ----------------------------------------------------------------
// table background
#define TBL_DEST_CELL 0
#define TBL_DEST_ROW 1
#define TBL_DEST_TBL 2
const sal_uInt16 SvxBackgroundTabPage::pPageRanges[] = const sal_uInt16 SvxBackgroundTabPage::pPageRanges[] =
{ {
...@@ -142,14 +141,15 @@ static drawing::FillStyle lcl_getFillStyle(ListBox* pLbSelect) ...@@ -142,14 +141,15 @@ static drawing::FillStyle lcl_getFillStyle(ListBox* pLbSelect)
static void lcl_setFillStyle(ListBox* pLbSelect, drawing::FillStyle eStyle) static void lcl_setFillStyle(ListBox* pLbSelect, drawing::FillStyle eStyle)
{ {
for (int i = 0; i < pLbSelect->GetEntryCount(); ++i) for (int i = 0; i < pLbSelect->GetEntryCount(); ++i)
{
if ((drawing::FillStyle)reinterpret_cast<sal_uLong>(pLbSelect->GetEntryData(i)) == eStyle) if ((drawing::FillStyle)reinterpret_cast<sal_uLong>(pLbSelect->GetEntryData(i)) == eStyle)
{ {
pLbSelect->SelectEntryPos(i); pLbSelect->SelectEntryPos(i);
return; return;
} }
}
} }
sal_uInt16 GetItemId_Impl( ValueSet& rValueSet, const Color& rCol ) sal_uInt16 GetItemId_Impl( ValueSet& rValueSet, const Color& rCol )
{ {
bool bFound = false; bool bFound = false;
...@@ -170,13 +170,8 @@ sal_uInt16 GetItemId_Impl( ValueSet& rValueSet, const Color& rCol ) ...@@ -170,13 +170,8 @@ sal_uInt16 GetItemId_Impl( ValueSet& rValueSet, const Color& rCol )
return bFound ? n : 0; return bFound ? n : 0;
} }
// class BackgroundPreview -----------------------------------------------
/* [Description]
preview window for brush or bitmap
*/
/** Preview window for brush or bitmap */
class BackgroundPreviewImpl : public vcl::Window class BackgroundPreviewImpl : public vcl::Window
{ {
public: public:
...@@ -228,8 +223,6 @@ void BackgroundPreviewImpl::setBmp(bool bBmp) ...@@ -228,8 +223,6 @@ void BackgroundPreviewImpl::setBmp(bool bBmp)
Invalidate(); Invalidate();
} }
BackgroundPreviewImpl::~BackgroundPreviewImpl() BackgroundPreviewImpl::~BackgroundPreviewImpl()
{ {
disposeOnce(); disposeOnce();
...@@ -255,29 +248,27 @@ void BackgroundPreviewImpl::NotifyChange( const Color& rColor ) ...@@ -255,29 +248,27 @@ void BackgroundPreviewImpl::NotifyChange( const Color& rColor )
} }
} }
void BackgroundPreviewImpl::NotifyChange( const Bitmap* pNewBitmap ) void BackgroundPreviewImpl::NotifyChange( const Bitmap* pNewBitmap )
{ {
if ( bIsBmp && (pNewBitmap || pBitmap) ) if (bIsBmp && (pNewBitmap || pBitmap))
{ {
if ( pNewBitmap && pBitmap ) if (pNewBitmap && pBitmap)
*pBitmap = *pNewBitmap; *pBitmap = *pNewBitmap;
else if ( pNewBitmap && !pBitmap ) else if (pNewBitmap && !pBitmap)
pBitmap = new Bitmap( *pNewBitmap ); pBitmap = new Bitmap(*pNewBitmap);
else if ( !pNewBitmap ) else if (!pNewBitmap)
DELETEZ( pBitmap ); DELETEZ(pBitmap);
recalcDrawPos(); recalcDrawPos();
Invalidate( aDrawRect ); Invalidate(aDrawRect);
Update(); Update();
} }
} }
void BackgroundPreviewImpl::recalcDrawPos() void BackgroundPreviewImpl::recalcDrawPos()
{ {
if ( pBitmap ) if (pBitmap)
{ {
Size aSize = GetOutputSizePixel(); Size aSize = GetOutputSizePixel();
// InnerSize == Size without one pixel border // InnerSize == Size without one pixel border
...@@ -287,10 +278,10 @@ void BackgroundPreviewImpl::recalcDrawPos() ...@@ -287,10 +278,10 @@ void BackgroundPreviewImpl::recalcDrawPos()
aDrawSize = pBitmap->GetSizePixel(); aDrawSize = pBitmap->GetSizePixel();
// bitmap bigger than preview window? // bitmap bigger than preview window?
if ( aDrawSize.Width() > aInnerSize.Width() ) if (aDrawSize.Width() > aInnerSize.Width())
{ {
aDrawSize.Height() = aDrawSize.Height() * aInnerSize.Width() / aDrawSize.Width(); aDrawSize.Height() = aDrawSize.Height() * aInnerSize.Width() / aDrawSize.Width();
if ( aDrawSize.Height() > aInnerSize.Height() ) if (aDrawSize.Height() > aInnerSize.Height())
{ {
aDrawSize.Width() = aDrawSize.Height(); aDrawSize.Width() = aDrawSize.Height();
aDrawSize.Height() = aInnerSize.Height(); aDrawSize.Height() = aInnerSize.Height();
...@@ -298,10 +289,10 @@ void BackgroundPreviewImpl::recalcDrawPos() ...@@ -298,10 +289,10 @@ void BackgroundPreviewImpl::recalcDrawPos()
else else
aDrawSize.Width() = aInnerSize.Width(); aDrawSize.Width() = aInnerSize.Width();
} }
else if ( aDrawSize.Height() > aInnerSize.Height() ) else if (aDrawSize.Height() > aInnerSize.Height())
{ {
aDrawSize.Width() = aDrawSize.Width() * aInnerSize.Height() / aDrawSize.Height(); aDrawSize.Width() = aDrawSize.Width() * aInnerSize.Height() / aDrawSize.Height();
if ( aDrawSize.Width() > aInnerSize.Width() ) if (aDrawSize.Width() > aInnerSize.Width())
{ {
aDrawSize.Height() = aDrawSize.Width(); aDrawSize.Height() = aDrawSize.Width();
aDrawSize.Width() = aInnerSize.Width(); aDrawSize.Width() = aInnerSize.Width();
...@@ -322,25 +313,27 @@ void BackgroundPreviewImpl::Resize() ...@@ -322,25 +313,27 @@ void BackgroundPreviewImpl::Resize()
recalcDrawPos(); recalcDrawPos();
} }
void BackgroundPreviewImpl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
{
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
rRenderContext.SetBackground(Wallpaper(rStyleSettings.GetWindowColor()));
rRenderContext.SetLineColor();
if (bIsBmp)
{
rRenderContext.SetFillColor(Color(COL_TRANSPARENT));
}
rRenderContext.DrawRect(aDrawRect);
void BackgroundPreviewImpl::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) if (bIsBmp)
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
SetBackground(Wallpaper(rStyleSettings.GetWindowColor()));
SetLineColor();
if(bIsBmp)
SetFillColor( Color(COL_TRANSPARENT) );
DrawRect( aDrawRect );
if ( bIsBmp )
{ {
if ( pBitmap ) if (pBitmap)
DrawBitmap( aDrawPos, aDrawSize, *pBitmap ); rRenderContext.DrawBitmap(aDrawPos, aDrawSize, *pBitmap);
else else
{ {
Size aSize = GetOutputSizePixel(); Size aSize = rRenderContext.GetOutputSizePixel();
DrawLine( Point(0,0), Point(aSize.Width(),aSize.Height()) ); rRenderContext.DrawLine(Point(0, 0), Point(aSize.Width(), aSize.Height()));
DrawLine( Point(0,aSize.Height()), Point(aSize.Width(),0) ); rRenderContext.DrawLine(Point(0, aSize.Height()), Point(aSize.Width(), 0));
} }
} }
} }
...@@ -355,8 +348,6 @@ void BackgroundPreviewImpl::DataChanged( const DataChangedEvent& rDCEvt ) ...@@ -355,8 +348,6 @@ void BackgroundPreviewImpl::DataChanged( const DataChangedEvent& rDCEvt )
Window::DataChanged( rDCEvt ); Window::DataChanged( rDCEvt );
} }
// class SvxBackgroundTabPage --------------------------------------------
#define HDL(hdl) LINK(this,SvxBackgroundTabPage,hdl) #define HDL(hdl) LINK(this,SvxBackgroundTabPage,hdl)
SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSet& rCoreSet) SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
...@@ -426,8 +417,6 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSe ...@@ -426,8 +417,6 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(vcl::Window* pParent, const SfxItemSe
m_pBackgroundColorSet->SetText(SVX_RESSTR(RID_SVXSTR_TRANSPARENT)); m_pBackgroundColorSet->SetText(SVX_RESSTR(RID_SVXSTR_TRANSPARENT));
} }
SvxBackgroundTabPage::~SvxBackgroundTabPage() SvxBackgroundTabPage::~SvxBackgroundTabPage()
{ {
disposeOnce(); disposeOnce();
...@@ -491,16 +480,11 @@ void SvxBackgroundTabPage::dispose() ...@@ -491,16 +480,11 @@ void SvxBackgroundTabPage::dispose()
SvxTabPage::dispose(); SvxTabPage::dispose();
} }
VclPtr<SfxTabPage> SvxBackgroundTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
VclPtr<SfxTabPage> SvxBackgroundTabPage::Create( vcl::Window* pParent,
const SfxItemSet* rAttrSet )
{ {
return VclPtr<SfxTabPage>( new SvxBackgroundTabPage( pParent, *rAttrSet ), SAL_NO_ACQUIRE ); return VclPtr<SfxTabPage>( new SvxBackgroundTabPage( pParent, *rAttrSet ), SAL_NO_ACQUIRE );
} }
void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet ) void SvxBackgroundTabPage::Reset( const SfxItemSet* rSet )
{ {
// os: Such a nonsense! One will always find such an item somewhere, // os: Such a nonsense! One will always find such an item somewhere,
...@@ -728,26 +712,18 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) ...@@ -728,26 +712,18 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet )
m_pBtnLink->Show( false ); m_pBtnLink->Show( false );
} }
/** When destroying a SfxTabPage this virtual method is called,
void SvxBackgroundTabPage::FillUserData()
/* [Description]
When destroying a SfxTabPage this virtual method is called,
so that the TabPage can save internal information. so that the TabPage can save internal information.
In this case the condition of the preview button is saved. In this case the condition of the preview button is saved.
*/ */
void SvxBackgroundTabPage::FillUserData()
{ {
SetUserData( m_pBtnPreview->IsChecked() ? OUString('1') : OUString('0') ); SetUserData( m_pBtnPreview->IsChecked() ? OUString('1') : OUString('0') );
} }
bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet ) bool SvxBackgroundTabPage::FillItemSet( SfxItemSet* rCoreSet )
{ {
if ( pPageImpl->pLoadIdle && pPageImpl->pLoadIdle->IsActive() ) if ( pPageImpl->pLoadIdle && pPageImpl->pLoadIdle->IsActive() )
...@@ -1078,15 +1054,8 @@ bool SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, s ...@@ -1078,15 +1054,8 @@ bool SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, s
return bModified; return bModified;
} }
/** virtual method; is called on deactivation */
SfxTabPage::sfxpg SvxBackgroundTabPage::DeactivatePage( SfxItemSet* _pSet ) SfxTabPage::sfxpg SvxBackgroundTabPage::DeactivatePage( SfxItemSet* _pSet )
/* [Description]
virtual method; is called on deactivation
*/
{ {
if ( pPageImpl->bIsImportDlgInExecute ) if ( pPageImpl->bIsImportDlgInExecute )
return KEEP_PAGE; return KEEP_PAGE;
...@@ -1097,15 +1066,11 @@ SfxTabPage::sfxpg SvxBackgroundTabPage::DeactivatePage( SfxItemSet* _pSet ) ...@@ -1097,15 +1066,11 @@ SfxTabPage::sfxpg SvxBackgroundTabPage::DeactivatePage( SfxItemSet* _pSet )
return LEAVE_PAGE; return LEAVE_PAGE;
} }
void SvxBackgroundTabPage::PointChanged( vcl::Window* , RECT_POINT ) void SvxBackgroundTabPage::PointChanged( vcl::Window* , RECT_POINT )
{ {
// has to be implemented so that position control can work // has to be implemented so that position control can work
} }
void SvxBackgroundTabPage::ShowSelector() void SvxBackgroundTabPage::ShowSelector()
{ {
if( bAllowShowSelector) if( bAllowShowSelector)
...@@ -1136,9 +1101,6 @@ void SvxBackgroundTabPage::ShowSelector() ...@@ -1136,9 +1101,6 @@ void SvxBackgroundTabPage::ShowSelector()
} }
} }
void SvxBackgroundTabPage::RaiseLoadError_Impl() void SvxBackgroundTabPage::RaiseLoadError_Impl()
{ {
SfxErrorContext aContext( ERRCTX_SVX_BACKGROUND, SfxErrorContext aContext( ERRCTX_SVX_BACKGROUND,
...@@ -1152,8 +1114,6 @@ void SvxBackgroundTabPage::RaiseLoadError_Impl() ...@@ -1152,8 +1114,6 @@ void SvxBackgroundTabPage::RaiseLoadError_Impl()
aBgdGraphicPath ) ); aBgdGraphicPath ) );
} }
bool SvxBackgroundTabPage::LoadLinkedGraphic_Impl() bool SvxBackgroundTabPage::LoadLinkedGraphic_Impl()
{ {
bool bResult = ( !aBgdGraphicPath.isEmpty() ) && bool bResult = ( !aBgdGraphicPath.isEmpty() ) &&
...@@ -1163,9 +1123,6 @@ bool SvxBackgroundTabPage::LoadLinkedGraphic_Impl() ...@@ -1163,9 +1123,6 @@ bool SvxBackgroundTabPage::LoadLinkedGraphic_Impl()
return bResult; return bResult;
} }
void SvxBackgroundTabPage::FillColorValueSets_Impl() void SvxBackgroundTabPage::FillColorValueSets_Impl()
{ {
SfxObjectShell* pDocSh = SfxObjectShell::Current(); SfxObjectShell* pDocSh = SfxObjectShell::Current();
...@@ -1190,20 +1147,10 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl() ...@@ -1190,20 +1147,10 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl()
m_pBackgroundColorSet->SetColCount(SvxColorValueSet::getColumnCount()); m_pBackgroundColorSet->SetColCount(SvxColorValueSet::getColumnCount());
} }
/** Hide the controls for editing the bitmap
void SvxBackgroundTabPage::ShowColorUI_Impl()
/* [Description]
Hide the controls for editing the bitmap
and show the controls for color settings instead. and show the controls for color settings instead.
*/ */
void SvxBackgroundTabPage::ShowColorUI_Impl()
{ {
if (!m_pBackGroundColorFrame->IsVisible()) if (!m_pBackGroundColorFrame->IsVisible())
{ {
...@@ -1223,16 +1170,10 @@ void SvxBackgroundTabPage::HideColorUI_Impl() ...@@ -1223,16 +1170,10 @@ void SvxBackgroundTabPage::HideColorUI_Impl()
m_pBackGroundColorFrame->Hide(); m_pBackGroundColorFrame->Hide();
} }
/** Hide the controls for color settings
void SvxBackgroundTabPage::ShowBitmapUI_Impl()
/* [Description]
Hide the controls for color settings
and show controls for editing the bitmap instead. and show controls for editing the bitmap instead.
*/ */
void SvxBackgroundTabPage::ShowBitmapUI_Impl()
{ {
if (m_pLbSelect->IsVisible() && if (m_pLbSelect->IsVisible() &&
(m_pBackGroundColorFrame->IsVisible() || !m_pFileFrame->IsVisible())) (m_pBackGroundColorFrame->IsVisible() || !m_pFileFrame->IsVisible()))
...@@ -1310,8 +1251,6 @@ void SvxBackgroundTabPage::SetGraphicPosition_Impl( SvxGraphicPosition ePos ) ...@@ -1310,8 +1251,6 @@ void SvxBackgroundTabPage::SetGraphicPosition_Impl( SvxGraphicPosition ePos )
m_pWndPosition->Invalidate(); m_pWndPosition->Invalidate();
} }
SvxGraphicPosition SvxBackgroundTabPage::GetGraphicPosition_Impl() SvxGraphicPosition SvxBackgroundTabPage::GetGraphicPosition_Impl()
{ {
if ( m_pBtnTile->IsChecked() ) if ( m_pBtnTile->IsChecked() )
...@@ -1339,11 +1278,8 @@ SvxGraphicPosition SvxBackgroundTabPage::GetGraphicPosition_Impl() ...@@ -1339,11 +1278,8 @@ SvxGraphicPosition SvxBackgroundTabPage::GetGraphicPosition_Impl()
// Handler // Handler
/** Handler, called when color selection is changed */
IMPL_LINK_NOARG(SvxBackgroundTabPage, BackgroundColorHdl_Impl) IMPL_LINK_NOARG(SvxBackgroundTabPage, BackgroundColorHdl_Impl)
/*
Handler, called when color selection is changed
*/
{ {
sal_uInt16 nItemId = m_pBackgroundColorSet->GetSelectItemId(); sal_uInt16 nItemId = m_pBackgroundColorSet->GetSelectItemId();
Color aColor = nItemId ? ( m_pBackgroundColorSet->GetItemColor( nItemId ) ) : Color( COL_TRANSPARENT ); Color aColor = nItemId ? ( m_pBackgroundColorSet->GetItemColor( nItemId ) ) : Color( COL_TRANSPARENT );
...@@ -1355,8 +1291,6 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, BackgroundColorHdl_Impl) ...@@ -1355,8 +1291,6 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, BackgroundColorHdl_Impl)
return 0; return 0;
} }
IMPL_LINK_NOARG(SvxBackgroundTabPage, SelectHdl_Impl) IMPL_LINK_NOARG(SvxBackgroundTabPage, SelectHdl_Impl)
{ {
if ( drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect) ) if ( drawing::FillStyle_SOLID == lcl_getFillStyle(m_pLbSelect) )
...@@ -1372,8 +1306,6 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, SelectHdl_Impl) ...@@ -1372,8 +1306,6 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, SelectHdl_Impl)
return 0; return 0;
} }
IMPL_LINK( SvxBackgroundTabPage, FileClickHdl_Impl, CheckBox*, pBox ) IMPL_LINK( SvxBackgroundTabPage, FileClickHdl_Impl, CheckBox*, pBox )
{ {
if (m_pBtnLink == pBox) if (m_pBtnLink == pBox)
...@@ -1421,8 +1353,6 @@ IMPL_LINK( SvxBackgroundTabPage, FileClickHdl_Impl, CheckBox*, pBox ) ...@@ -1421,8 +1353,6 @@ IMPL_LINK( SvxBackgroundTabPage, FileClickHdl_Impl, CheckBox*, pBox )
return 0; return 0;
} }
IMPL_LINK( SvxBackgroundTabPage, RadioClickHdl_Impl, RadioButton*, pBtn ) IMPL_LINK( SvxBackgroundTabPage, RadioClickHdl_Impl, RadioButton*, pBtn )
{ {
if (pBtn == m_pBtnPosition) if (pBtn == m_pBtnPosition)
...@@ -1441,14 +1371,10 @@ IMPL_LINK( SvxBackgroundTabPage, RadioClickHdl_Impl, RadioButton*, pBtn ) ...@@ -1441,14 +1371,10 @@ IMPL_LINK( SvxBackgroundTabPage, RadioClickHdl_Impl, RadioButton*, pBtn )
return 0; return 0;
} }
IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl) /** Handler, called by pressing the browse button.
/* [Description]
Handler, called by pressing the browse button.
Create graphic/insert dialog, set path and start. Create graphic/insert dialog, set path and start.
*/ */
IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl)
{ {
if ( pPageImpl->pLoadIdle->IsActive() ) if ( pPageImpl->pLoadIdle->IsActive() )
return 0; return 0;
...@@ -1481,17 +1407,11 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl) ...@@ -1481,17 +1407,11 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl)
return 0; return 0;
} }
/** Delayed loading of the graphic.
IMPL_LINK_TYPED( SvxBackgroundTabPage, LoadIdleHdl_Impl, Idle* , pIdle, void )
/* [Description]
Delayed loading of the graphic.
Graphic is only loaded, if it's Graphic is only loaded, if it's
different to the current graphic. different to the current graphic.
*/ */
IMPL_LINK_TYPED( SvxBackgroundTabPage, LoadIdleHdl_Impl, Idle* , pIdle, void )
{ {
if ( pIdle == pPageImpl->pLoadIdle ) if ( pIdle == pPageImpl->pLoadIdle )
{ {
...@@ -1541,8 +1461,6 @@ IMPL_LINK_TYPED( SvxBackgroundTabPage, LoadIdleHdl_Impl, Idle* , pIdle, void ) ...@@ -1541,8 +1461,6 @@ IMPL_LINK_TYPED( SvxBackgroundTabPage, LoadIdleHdl_Impl, Idle* , pIdle, void )
} }
} }
void SvxBackgroundTabPage::ShowTblControl() void SvxBackgroundTabPage::ShowTblControl()
{ {
m_pTblLBox->SetSelectHdl( HDL(TblDestinationHdl_Impl) ); m_pTblLBox->SetSelectHdl( HDL(TblDestinationHdl_Impl) );
...@@ -1552,8 +1470,6 @@ void SvxBackgroundTabPage::ShowTblControl() ...@@ -1552,8 +1470,6 @@ void SvxBackgroundTabPage::ShowTblControl()
m_pAsGrid->Show(); m_pAsGrid->Show();
} }
void SvxBackgroundTabPage::ShowParaControl(bool bCharOnly) void SvxBackgroundTabPage::ShowParaControl(bool bCharOnly)
{ {
m_pParaLBox->SetSelectHdl(HDL(ParaDestinationHdl_Impl)); m_pParaLBox->SetSelectHdl(HDL(ParaDestinationHdl_Impl));
...@@ -1567,7 +1483,6 @@ void SvxBackgroundTabPage::ShowParaControl(bool bCharOnly) ...@@ -1567,7 +1483,6 @@ void SvxBackgroundTabPage::ShowParaControl(bool bCharOnly)
m_pParaLBox->SetData(m_pParaLBox); // here it can be recognized that this mode is turned on m_pParaLBox->SetData(m_pParaLBox); // here it can be recognized that this mode is turned on
} }
IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox ) IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox )
{ {
sal_Int32 nSelPos = pBox->GetSelectEntryPos(); sal_Int32 nSelPos = pBox->GetSelectEntryPos();
...@@ -1656,8 +1571,6 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox ) ...@@ -1656,8 +1571,6 @@ IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox )
return 0; return 0;
} }
IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox ) IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox )
{ {
sal_Int32 nSelPos = pBox->GetSelectEntryPos(); sal_Int32 nSelPos = pBox->GetSelectEntryPos();
...@@ -1720,8 +1633,6 @@ IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox ) ...@@ -1720,8 +1633,6 @@ IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox )
return 0; return 0;
} }
void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
const OUString& rUserData ) const OUString& rUserData )
{ {
...@@ -1798,7 +1709,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, ...@@ -1798,7 +1709,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
m_pBtnLink->Disable(); m_pBtnLink->Disable();
} }
if(bGraphTransparency) if (bGraphTransparency)
{ {
const GraphicObject* pObject = rBgdAttr.GetGraphicObject(); const GraphicObject* pObject = rBgdAttr.GetGraphicObject();
if(pObject) if(pObject)
......
...@@ -145,36 +145,35 @@ void SvxNumberPreview::NotifyChange( const OUString& rPrevStr, ...@@ -145,36 +145,35 @@ void SvxNumberPreview::NotifyChange( const OUString& rPrevStr,
#* #*
#************************************************************************/ #************************************************************************/
void SvxNumberPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& ) void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
{ {
vcl::Font aDrawFont = GetFont(); vcl::Font aDrawFont = rRenderContext.GetFont();
Size aSzWnd = GetOutputSizePixel(); Size aSzWnd = rRenderContext.GetOutputSizePixel();
OUString aTmpStr( aPrevStr ); OUString aTmpStr( aPrevStr );
long nLeadSpace = (aSzWnd.Width() - GetTextWidth( aTmpStr )) /2; long nLeadSpace = (aSzWnd.Width() - rRenderContext.GetTextWidth(aTmpStr)) / 2;
aDrawFont.SetColor( aPrevCol ); aDrawFont.SetColor(aPrevCol);
SetFont( aDrawFont ); rRenderContext.SetFont(aDrawFont);
if ( mnPos != -1 ) if (mnPos != -1)
{ {
long nCharWidth = GetTextWidth( OUString( mnChar ) ); long nCharWidth = rRenderContext.GetTextWidth(OUString(mnChar));
int nNumCharsToInsert = 0; int nNumCharsToInsert = 0;
if (nCharWidth > 0) nNumCharsToInsert = nLeadSpace / nCharWidth; if (nCharWidth > 0)
nNumCharsToInsert = nLeadSpace / nCharWidth;
if ( nNumCharsToInsert > 0) if (nNumCharsToInsert > 0)
{ {
for ( int i = 0; i < nNumCharsToInsert; ++i ) for (int i = 0; i < nNumCharsToInsert; ++i)
aTmpStr = aTmpStr.replaceAt( mnPos, 0, OUString(mnChar) ); aTmpStr = aTmpStr.replaceAt(mnPos, 0, OUString(mnChar));
} }
} }
Point aPosText = Point( ( mnPos != -1 ) ? 0 : nLeadSpace, Point aPosText = Point((mnPos != -1) ? 0 : nLeadSpace,
(aSzWnd.Height() - GetTextHeight())/2 ); (aSzWnd.Height() - GetTextHeight()) / 2);
DrawText( aPosText, aTmpStr ); rRenderContext.DrawText(aPosText, aTmpStr);
} }
void SvxNumberPreview::InitSettings( bool bForeground, bool bBackground ) void SvxNumberPreview::InitSettings( bool bForeground, bool bBackground )
{ {
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
......
...@@ -2477,32 +2477,32 @@ SvxNumberingPreview::SvxNumberingPreview(vcl::Window* pParent, WinBits nWinBits) ...@@ -2477,32 +2477,32 @@ SvxNumberingPreview::SvxNumberingPreview(vcl::Window* pParent, WinBits nWinBits)
VCL_BUILDER_FACTORY_ARGS(SvxNumberingPreview, WB_BORDER) VCL_BUILDER_FACTORY_ARGS(SvxNumberingPreview, WB_BORDER)
// paint preview of numeration // paint preview of numeration
void SvxNumberingPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& /*rRect*/ ) void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/)
{ {
Size aSize(PixelToLogic(GetOutputSizePixel())); Size aSize(rRenderContext.PixelToLogic(rRenderContext.GetOutputSizePixel()));
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
const Color aBackColor = rStyleSettings.GetFieldColor(); const Color aBackColor = rStyleSettings.GetFieldColor();
const Color aTextColor = rStyleSettings.GetFieldTextColor(); const Color aTextColor = rStyleSettings.GetFieldTextColor();
ScopedVclPtrInstance< VirtualDevice > pVDev(*this); ScopedVclPtrInstance<VirtualDevice> pVDev(rRenderContext);
pVDev->EnableRTL( IsRTLEnabled() ); pVDev->EnableRTL(rRenderContext.IsRTLEnabled());
pVDev->SetMapMode(GetMapMode()); pVDev->SetMapMode(rRenderContext.GetMapMode());
pVDev->SetOutputSize( aSize ); pVDev->SetOutputSize(aSize);
Color aLineColor(COL_LIGHTGRAY); Color aLineColor(COL_LIGHTGRAY);
if(aLineColor == aBackColor) if (aLineColor == aBackColor)
aLineColor.Invert(); aLineColor.Invert();
pVDev->SetLineColor(aLineColor); pVDev->SetLineColor(aLineColor);
pVDev->SetFillColor( aBackColor ); pVDev->SetFillColor(aBackColor);
if(pActNum) if (pActNum)
{ {
sal_uInt16 nWidthRelation; sal_uInt16 nWidthRelation;
if(nPageWidth) if (nPageWidth)
{ {
nWidthRelation = sal_uInt16 (nPageWidth / aSize.Width()); nWidthRelation = sal_uInt16 (nPageWidth / aSize.Width());
if(bPosition) if (bPosition)
nWidthRelation = nWidthRelation * 2 / 3; nWidthRelation = nWidthRelation * 2 / 3;
else else
nWidthRelation = nWidthRelation / 4; nWidthRelation = nWidthRelation / 4;
...@@ -2511,109 +2511,104 @@ void SvxNumberingPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const R ...@@ -2511,109 +2511,104 @@ void SvxNumberingPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const R
nWidthRelation = 30; // chapter dialog nWidthRelation = 30; // chapter dialog
// height per level // height per level
sal_uInt16 nXStep = sal::static_int_cast< sal_uInt16 >(aSize.Width() / (3 * pActNum->GetLevelCount())); sal_uInt16 nXStep = sal::static_int_cast<sal_uInt16>(aSize.Width() / (3 * pActNum->GetLevelCount()));
if(pActNum->GetLevelCount() < 10) if (pActNum->GetLevelCount() < 10)
nXStep /= 2; nXStep /= 2;
sal_uInt16 nYStart = 4; sal_uInt16 nYStart = 4;
// the whole height mustn't be used for a single level // the whole height mustn't be used for a single level
sal_uInt16 nYStep = sal::static_int_cast< sal_uInt16 >((aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5)); sal_uInt16 nYStep = sal::static_int_cast<sal_uInt16>((aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5));
aStdFont = OutputDevice::GetDefaultFont(
DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE); aStdFont = OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE);
aStdFont.SetColor(aTextColor); aStdFont.SetColor(aTextColor);
aStdFont.SetFillColor(aBackColor); aStdFont.SetFillColor(aBackColor);
sal_uInt16 nFontHeight = nYStep * 6 / 10; sal_uInt16 nFontHeight = nYStep * 6 / 10;
if(bPosition) if (bPosition)
nFontHeight = nYStep * 15 / 10; nFontHeight = nYStep * 15 / 10;
aStdFont.SetSize(Size( 0, nFontHeight )); aStdFont.SetSize(Size( 0, nFontHeight ));
SvxNodeNum aNum( (sal_uInt8)0 ); SvxNodeNum aNum(sal_uInt8(0));
sal_uInt16 nPreNum = pActNum->GetLevel(0).GetStart(); sal_uInt16 nPreNum = pActNum->GetLevel(0).GetStart();
if(bPosition) if (bPosition)
{ {
sal_uInt16 nLineHeight = nFontHeight * 8 / 7; sal_uInt16 nLineHeight = nFontHeight * 8 / 7;
sal_uInt8 nStart = 0; sal_uInt8 nStart = 0;
while( !(nActLevel & (1<<nStart)) ) while (!(nActLevel & (1<<nStart)))
{ {
nStart++; nStart++;
} }
if(nStart) if (nStart)
nStart--; nStart--;
sal_uInt8 nEnd = std::min( (sal_uInt8)(nStart + 3), (sal_uInt8)pActNum->GetLevelCount() ); sal_uInt8 nEnd = std::min(sal_uInt8(nStart + 3), sal_uInt8(pActNum->GetLevelCount()));
for( sal_uInt8 nLevel = nStart; nLevel < nEnd; ++nLevel ) for (sal_uInt8 nLevel = nStart; nLevel < nEnd; ++nLevel)
{ {
const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel); const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel);
aNum.GetLevelVal()[ nLevel ] = rFmt.GetStart(); aNum.GetLevelVal()[nLevel] = rFmt.GetStart();
sal_uInt16 nXStart( 0 ); sal_uInt16 nXStart( 0 );
short nTextOffset( 0 ); short nTextOffset( 0 );
sal_uInt16 nNumberXPos( 0 ); sal_uInt16 nNumberXPos( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
{ {
nXStart = rFmt.GetAbsLSpace() / nWidthRelation; nXStart = rFmt.GetAbsLSpace() / nWidthRelation;
nTextOffset = rFmt.GetCharTextDistance() / nWidthRelation; nTextOffset = rFmt.GetCharTextDistance() / nWidthRelation;
nNumberXPos = nXStart; nNumberXPos = nXStart;
sal_uInt16 nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation; sal_uInt16 nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation;
if(nFirstLineOffset <= nNumberXPos) if (nFirstLineOffset <= nNumberXPos)
nNumberXPos = nNumberXPos - nFirstLineOffset; nNumberXPos = nNumberXPos - nFirstLineOffset;
else else
nNumberXPos = 0; nNumberXPos = 0;
// in draw this is valid // in draw this is valid
if(nTextOffset < 0) if (nTextOffset < 0)
nNumberXPos = nNumberXPos + nTextOffset; nNumberXPos = nNumberXPos + nTextOffset;
} }
else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) else if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT)
{ {
const long nTmpNumberXPos( ( rFmt.GetIndentAt() + const long nTmpNumberXPos((rFmt.GetIndentAt() + rFmt.GetFirstLineIndent() ) / nWidthRelation);
rFmt.GetFirstLineIndent() ) / if (nTmpNumberXPos < 0)
nWidthRelation );
if ( nTmpNumberXPos < 0 )
{ {
nNumberXPos = 0; nNumberXPos = 0;
} }
else else
{ {
nNumberXPos = static_cast<sal_uInt16>( nTmpNumberXPos ); nNumberXPos = static_cast<sal_uInt16>(nTmpNumberXPos);
} }
} }
sal_uInt16 nBulletWidth = 0; sal_uInt16 nBulletWidth = 0;
if( SVX_NUM_BITMAP == (rFmt.GetNumberingType() &(~LINK_TOKEN))) if (SVX_NUM_BITMAP == (rFmt.GetNumberingType() &(~LINK_TOKEN)))
{ {
nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawGraphic(pVDev.get(), rFmt, nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawGraphic(pVDev.get(), rFmt, nNumberXPos, nYStart, nWidthRelation) : 0;
nNumberXPos,
nYStart, nWidthRelation) : 0;
} }
else if( SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType() ) else if (SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType())
{ {
nBulletWidth = rFmt.IsShowSymbol() ? nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawBullet(pVDev.get(), rFmt, nNumberXPos, nYStart, aStdFont.GetSize()) : 0;
lcl_DrawBullet(pVDev.get(), rFmt, nNumberXPos, nYStart, aStdFont.GetSize()) : 0;
} }
else else
{ {
pVDev->SetFont(aStdFont); pVDev->SetFont(aStdFont);
aNum.SetLevel( nLevel ); aNum.SetLevel(nLevel);
if(pActNum->IsContinuousNumbering()) if (pActNum->IsContinuousNumbering())
aNum.GetLevelVal()[nLevel] = nPreNum; aNum.GetLevelVal()[nLevel] = nPreNum;
OUString aText(pActNum->MakeNumString( aNum )); OUString aText(pActNum->MakeNumString( aNum ));
vcl::Font aSaveFont = pVDev->GetFont(); vcl::Font aSaveFont = pVDev->GetFont();
vcl::Font aColorFont(aSaveFont); vcl::Font aColorFont(aSaveFont);
Color aTmpBulletColor = rFmt.GetBulletColor(); Color aTmpBulletColor = rFmt.GetBulletColor();
if(aTmpBulletColor.GetColor() == COL_AUTO) if (aTmpBulletColor.GetColor() == COL_AUTO)
aTmpBulletColor = Color(aBackColor.IsDark() ? COL_WHITE : COL_BLACK); aTmpBulletColor = Color(aBackColor.IsDark() ? COL_WHITE : COL_BLACK);
else if(aTmpBulletColor == aBackColor) else if (aTmpBulletColor == aBackColor)
aTmpBulletColor.Invert(); aTmpBulletColor.Invert();
aColorFont.SetColor(aTmpBulletColor); aColorFont.SetColor(aTmpBulletColor);
pVDev->SetFont(aColorFont); pVDev->SetFont(aColorFont);
pVDev->DrawText( Point(nNumberXPos, nYStart), aText ); pVDev->DrawText(Point(nNumberXPos, nYStart), aText);
pVDev->SetFont(aSaveFont); pVDev->SetFont(aSaveFont);
nBulletWidth = (sal_uInt16)pVDev->GetTextWidth(aText); nBulletWidth = sal_uInt16(pVDev->GetTextWidth(aText));
nPreNum++; nPreNum++;
} }
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT && if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT &&
rFmt.GetLabelFollowedBy() == SvxNumberFormat::SPACE ) rFmt.GetLabelFollowedBy() == SvxNumberFormat::SPACE )
{ {
pVDev->SetFont(aStdFont); pVDev->SetFont(aStdFont);
OUString aText(' '); OUString aText(' ');
...@@ -2622,23 +2617,22 @@ void SvxNumberingPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const R ...@@ -2622,23 +2617,22 @@ void SvxNumberingPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const R
} }
sal_uInt16 nTextXPos( 0 ); sal_uInt16 nTextXPos( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
{ {
nTextXPos = nXStart; nTextXPos = nXStart;
if(nTextOffset < 0) if (nTextOffset < 0)
nTextXPos = nTextXPos + nTextOffset; nTextXPos = nTextXPos + nTextOffset;
if(nNumberXPos + nBulletWidth + nTextOffset > nTextXPos ) if (nNumberXPos + nBulletWidth + nTextOffset > nTextXPos)
nTextXPos = nNumberXPos + nBulletWidth + nTextOffset; nTextXPos = nNumberXPos + nBulletWidth + nTextOffset;
} }
else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) else if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT)
{ {
switch ( rFmt.GetLabelFollowedBy() ) switch (rFmt.GetLabelFollowedBy())
{ {
case SvxNumberFormat::LISTTAB: case SvxNumberFormat::LISTTAB:
{ {
nTextXPos = static_cast<sal_uInt16>( nTextXPos = static_cast<sal_uInt16>(rFmt.GetListtabPos() / nWidthRelation);
rFmt.GetListtabPos() / nWidthRelation ); if (nTextXPos < nNumberXPos + nBulletWidth)
if ( nTextXPos < nNumberXPos + nBulletWidth )
{ {
nTextXPos = nNumberXPos + nBulletWidth; nTextXPos = nNumberXPos + nBulletWidth;
} }
...@@ -2652,46 +2646,44 @@ void SvxNumberingPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const R ...@@ -2652,46 +2646,44 @@ void SvxNumberingPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const R
break; break;
} }
nXStart = static_cast<sal_uInt16>( rFmt.GetIndentAt() / nWidthRelation ); nXStart = static_cast<sal_uInt16>(rFmt.GetIndentAt() / nWidthRelation);
} }
Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2)); Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2));
pVDev->SetFillColor( aBackColor ); pVDev->SetFillColor(aBackColor);
pVDev->DrawRect( aRect1 ); pVDev->DrawRect(aRect1);
Rectangle aRect2(Point(nXStart, nYStart + nLineHeight + nFontHeight / 2 ), Size(aSize.Width() / 2, 2)); Rectangle aRect2(Point(nXStart, nYStart + nLineHeight + nFontHeight / 2 ), Size(aSize.Width() / 2, 2));
pVDev->DrawRect( aRect2 ); pVDev->DrawRect(aRect2);
nYStart += 2 * nLineHeight; nYStart += 2 * nLineHeight;
} }
} }
else else
{ {
//#i5153# painting gray or black rectangles as 'normal' numbering text //#i5153# painting gray or black rectangles as 'normal' numbering text
OUString sMsg( "Preview" ); OUString sMsg("Preview");
long nWidth = pVDev->GetTextWidth(sMsg); long nWidth = pVDev->GetTextWidth(sMsg);
long nTextHeight = pVDev->GetTextHeight(); long nTextHeight = pVDev->GetTextHeight();
long nRectHeight = nTextHeight * 2 / 3; long nRectHeight = nTextHeight * 2 / 3;
long nTopOffset = nTextHeight - nRectHeight; long nTopOffset = nTextHeight - nRectHeight;
Color aBlackColor(COL_BLACK); Color aBlackColor(COL_BLACK);
if(aBlackColor == aBackColor) if (aBlackColor == aBackColor)
aBlackColor.Invert(); aBlackColor.Invert();
for( sal_uInt8 nLevel = 0; nLevel < pActNum->GetLevelCount(); for (sal_uInt8 nLevel = 0; nLevel < pActNum->GetLevelCount(); ++nLevel, nYStart = nYStart + nYStep)
++nLevel, nYStart = nYStart + nYStep )
{ {
const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel); const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel);
aNum.GetLevelVal()[ nLevel ] = rFmt.GetStart(); aNum.GetLevelVal()[ nLevel ] = rFmt.GetStart();
sal_uInt16 nXStart( 0 ); sal_uInt16 nXStart( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
{ {
nXStart = rFmt.GetAbsLSpace() / nWidthRelation; nXStart = rFmt.GetAbsLSpace() / nWidthRelation;
} }
else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) else if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT)
{ {
const long nTmpXStart( ( rFmt.GetIndentAt() + const long nTmpXStart((rFmt.GetIndentAt() + rFmt.GetFirstLineIndent() ) / nWidthRelation);
rFmt.GetFirstLineIndent() ) / if (nTmpXStart < 0)
nWidthRelation );
if ( nTmpXStart < 0 )
{ {
nXStart = 0; nXStart = 0;
} }
...@@ -2703,17 +2695,17 @@ void SvxNumberingPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const R ...@@ -2703,17 +2695,17 @@ void SvxNumberingPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const R
nXStart /= 2; nXStart /= 2;
nXStart += 2; nXStart += 2;
sal_uInt16 nTextOffset = 2 * nXStep; sal_uInt16 nTextOffset = 2 * nXStep;
if( SVX_NUM_BITMAP == (rFmt.GetNumberingType()&(~LINK_TOKEN)) ) if (SVX_NUM_BITMAP == (rFmt.GetNumberingType()&(~LINK_TOKEN)))
{ {
if(rFmt.IsShowSymbol()) if (rFmt.IsShowSymbol())
{ {
nTextOffset = lcl_DrawGraphic(pVDev.get(), rFmt, nXStart, nYStart, nWidthRelation); nTextOffset = lcl_DrawGraphic(pVDev.get(), rFmt, nXStart, nYStart, nWidthRelation);
nTextOffset = nTextOffset + nXStep; nTextOffset = nTextOffset + nXStep;
} }
} }
else if( SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType() ) else if (SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType())
{ {
if(rFmt.IsShowSymbol()) if (rFmt.IsShowSymbol())
{ {
nTextOffset = lcl_DrawBullet(pVDev.get(), rFmt, nXStart, nYStart, aStdFont.GetSize()); nTextOffset = lcl_DrawBullet(pVDev.get(), rFmt, nXStart, nYStart, aStdFont.GetSize());
nTextOffset = nTextOffset + nXStep; nTextOffset = nTextOffset + nXStep;
...@@ -2723,33 +2715,33 @@ void SvxNumberingPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const R ...@@ -2723,33 +2715,33 @@ void SvxNumberingPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const R
{ {
vcl::Font aColorFont(aStdFont); vcl::Font aColorFont(aStdFont);
Color aTmpBulletColor = rFmt.GetBulletColor(); Color aTmpBulletColor = rFmt.GetBulletColor();
if(aTmpBulletColor.GetColor() == COL_AUTO) if (aTmpBulletColor.GetColor() == COL_AUTO)
aTmpBulletColor = Color(aBackColor.IsDark() ? COL_WHITE : COL_BLACK); aTmpBulletColor = Color(aBackColor.IsDark() ? COL_WHITE : COL_BLACK);
else if(aTmpBulletColor == aBackColor) else if (aTmpBulletColor == aBackColor)
aTmpBulletColor.Invert(); aTmpBulletColor.Invert();
aColorFont.SetColor(aTmpBulletColor); aColorFont.SetColor(aTmpBulletColor);
pVDev->SetFont(aColorFont); pVDev->SetFont(aColorFont);
aNum.SetLevel( nLevel ); aNum.SetLevel( nLevel );
if(pActNum->IsContinuousNumbering()) if (pActNum->IsContinuousNumbering())
aNum.GetLevelVal()[nLevel] = nPreNum; aNum.GetLevelVal()[nLevel] = nPreNum;
OUString aText(pActNum->MakeNumString( aNum )); OUString aText(pActNum->MakeNumString(aNum));
pVDev->DrawText( Point(nXStart, nYStart), aText ); pVDev->DrawText(Point(nXStart, nYStart), aText);
pVDev->SetFont(aStdFont); pVDev->SetFont(aStdFont);
nTextOffset = (sal_uInt16)pVDev->GetTextWidth(aText); nTextOffset = (sal_uInt16)pVDev->GetTextWidth(aText);
nTextOffset = nTextOffset + nXStep; nTextOffset = nTextOffset + nXStep;
nPreNum++; nPreNum++;
} }
if(pOutlineNames) if (pOutlineNames)
{ {
//#i5153# outline numberings still use the style names as text //#i5153# outline numberings still use the style names as text
pVDev->SetFont(aStdFont); pVDev->SetFont(aStdFont);
sMsg = pOutlineNames[nLevel]; sMsg = pOutlineNames[nLevel];
pVDev->DrawText( Point(nXStart + nTextOffset, nYStart), sMsg ); pVDev->DrawText(Point(nXStart + nTextOffset, nYStart), sMsg);
} }
else else
{ {
//#i5153# the selected rectangle(s) should be black //#i5153# the selected rectangle(s) should be black
if( 0 != (nActLevel & (1<<nLevel))) if (0 != (nActLevel & (1<<nLevel)))
{ {
pVDev->SetFillColor( aBlackColor ); pVDev->SetFillColor( aBlackColor );
pVDev->SetLineColor( aBlackColor ); pVDev->SetLineColor( aBlackColor );
...@@ -2766,9 +2758,7 @@ void SvxNumberingPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const R ...@@ -2766,9 +2758,7 @@ void SvxNumberingPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const R
} }
} }
} }
DrawOutDev( Point(0,0), aSize, rRenderContext.DrawOutDev(Point(), aSize, Point(), aSize, *pVDev);
Point(0,0), aSize,
*pVDev );
} }
//See uiconfig/swriter/ui/outlinepositionpage.ui for effectively a duplicate //See uiconfig/swriter/ui/outlinepositionpage.ui for effectively a duplicate
......
...@@ -54,7 +54,7 @@ public: ...@@ -54,7 +54,7 @@ public:
virtual ~TabWin_Impl() { disposeOnce(); } virtual ~TabWin_Impl() { disposeOnce(); }
virtual void dispose() SAL_OVERRIDE { mpPage.clear(); vcl::Window::dispose(); } virtual void dispose() SAL_OVERRIDE { mpPage.clear(); vcl::Window::dispose(); }
virtual void Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect) SAL_OVERRIDE; virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) SAL_OVERRIDE;
void SetTabulatorTabPage(SvxTabulatorTabPage* pPage) { mpPage = pPage; } void SetTabulatorTabPage(SvxTabulatorTabPage* pPage) { mpPage = pPage; }
void SetTabStyle(sal_uInt16 nStyle) {nTabStyle = nStyle; } void SetTabStyle(sal_uInt16 nStyle) {nTabStyle = nStyle; }
...@@ -62,8 +62,6 @@ public: ...@@ -62,8 +62,6 @@ public:
VCL_BUILDER_FACTORY_ARGS(TabWin_Impl, 0) VCL_BUILDER_FACTORY_ARGS(TabWin_Impl, 0)
// static ----------------------------------------------------------------
const sal_uInt16 SvxTabulatorTabPage::pRanges[] = const sal_uInt16 SvxTabulatorTabPage::pRanges[] =
{ {
SID_ATTR_TABSTOP, SID_ATTR_TABSTOP,
...@@ -71,8 +69,6 @@ const sal_uInt16 SvxTabulatorTabPage::pRanges[] = ...@@ -71,8 +69,6 @@ const sal_uInt16 SvxTabulatorTabPage::pRanges[] =
0 0
}; };
// C function ------------------------------------------------------------
void FillUpWithDefTabs_Impl( long nDefDist, SvxTabStopItem& rTabs ) void FillUpWithDefTabs_Impl( long nDefDist, SvxTabStopItem& rTabs )
{ {
if( rTabs.Count() ) if( rTabs.Count() )
...@@ -83,8 +79,6 @@ void FillUpWithDefTabs_Impl( long nDefDist, SvxTabStopItem& rTabs ) ...@@ -83,8 +79,6 @@ void FillUpWithDefTabs_Impl( long nDefDist, SvxTabStopItem& rTabs )
} }
} }
// class TabWin_Impl -----------------------------------------------------
void TabWin_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) void TabWin_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
{ {
// Paint tabulators // Paint tabulators
...@@ -95,18 +89,13 @@ void TabWin_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&) ...@@ -95,18 +89,13 @@ void TabWin_Impl::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
Ruler::DrawTab(rRenderContext, rRenderContext.GetSettings().GetStyleSettings().GetFontColor(), aPoint, nTabStyle); Ruler::DrawTab(rRenderContext, rRenderContext.GetSettings().GetStyleSettings().GetFontColor(), aPoint, nTabStyle);
} }
// class SvxTabulatorTabPage --------------------------------------------- SvxTabulatorTabPage::SvxTabulatorTabPage(vcl::Window* pParent, const SfxItemSet& rAttr)
: SfxTabPage(pParent, "ParagraphTabsPage","cui/ui/paratabspage.ui", &rAttr)
SvxTabulatorTabPage::SvxTabulatorTabPage( vcl::Window* pParent, const SfxItemSet& rAttr ): , aAktTab(0)
, aNewTabs(0, 0, SVX_TAB_ADJUST_LEFT, GetWhich(SID_ATTR_TABSTOP))
SfxTabPage( pParent, "ParagraphTabsPage","cui/ui/paratabspage.ui", &rAttr ), , nDefDist(0)
, eDefUnit(FUNIT_100TH_MM)
aAktTab ( 0 ), , bCheck(false)
aNewTabs ( 0, 0, SVX_TAB_ADJUST_LEFT, GetWhich( SID_ATTR_TABSTOP ) ),
nDefDist ( 0 ),
eDefUnit ( FUNIT_100TH_MM ),
bCheck ( false )
{ {
get(m_pTabBox,"ED_TABPOS"); get(m_pTabBox,"ED_TABPOS");
//the tab images //the tab images
...@@ -218,125 +207,115 @@ void SvxTabulatorTabPage::dispose() ...@@ -218,125 +207,115 @@ void SvxTabulatorTabPage::dispose()
SfxTabPage::dispose(); SfxTabPage::dispose();
} }
bool SvxTabulatorTabPage::FillItemSet( SfxItemSet* rSet ) bool SvxTabulatorTabPage::FillItemSet(SfxItemSet* rSet)
{ {
bool bModified = false; bool bModified = false;
// Put the controls' values in here // Put the controls' values in here
if ( m_pNewBtn->IsEnabled() ) if (m_pNewBtn->IsEnabled())
NewHdl_Impl( 0 ); NewHdl_Impl( 0 );
// Call the LoseFocus-Handler first // Call the LoseFocus-Handler first
GetDezCharHdl_Impl( m_pDezChar ); GetDezCharHdl_Impl(m_pDezChar);
GetFillCharHdl_Impl( m_pFillChar ); GetFillCharHdl_Impl(m_pFillChar);
FillUpWithDefTabs_Impl( nDefDist, aNewTabs ); FillUpWithDefTabs_Impl(nDefDist, aNewTabs);
SfxItemPool* pPool = rSet->GetPool(); SfxItemPool* pPool = rSet->GetPool();
MapUnit eUnit = (MapUnit)pPool->GetMetric( GetWhich( SID_ATTR_TABSTOP ) ); MapUnit eUnit = (MapUnit)pPool->GetMetric(GetWhich(SID_ATTR_TABSTOP));
const SfxPoolItem* pOld = GetOldItem( *rSet, SID_ATTR_TABSTOP ); const SfxPoolItem* pOld = GetOldItem(*rSet, SID_ATTR_TABSTOP);
if ( MAP_100TH_MM != eUnit ) if (MAP_100TH_MM != eUnit)
{ {
// If the ItemSet contains a LRSpaceItem with negative first line indent, // If the ItemSet contains a LRSpaceItem with negative first line indent,
// the TabStopItem needs to have a DefTab at position 0. // the TabStopItem needs to have a DefTab at position 0.
const SfxPoolItem* pLRSpace; const SfxPoolItem* pLRSpace;
// If not in the new set, then maybe in the old one // If not in the new set, then maybe in the old one
if ( SfxItemState::SET != rSet->GetItemState( GetWhich( SID_ATTR_LRSPACE ), true, &pLRSpace ) ) if (SfxItemState::SET != rSet->GetItemState(GetWhich(SID_ATTR_LRSPACE), true, &pLRSpace))
pLRSpace = GetOldItem( *rSet, SID_ATTR_LRSPACE ); pLRSpace = GetOldItem(*rSet, SID_ATTR_LRSPACE);
if ( pLRSpace && static_cast<const SvxLRSpaceItem*>(pLRSpace)->GetTxtFirstLineOfst() < 0 ) if (pLRSpace && static_cast<const SvxLRSpaceItem*>(pLRSpace)->GetTxtFirstLineOfst() < 0)
{ {
SvxTabStop aNull( 0, SVX_TAB_ADJUST_DEFAULT ); SvxTabStop aNull(0, SVX_TAB_ADJUST_DEFAULT);
aNewTabs.Insert( aNull ); aNewTabs.Insert(aNull);
} }
SvxTabStopItem aTmp( aNewTabs ); SvxTabStopItem aTmp(aNewTabs);
aTmp.Remove( 0, aTmp.Count() ); aTmp.Remove(0, aTmp.Count());
for ( sal_uInt16 i = 0; i < aNewTabs.Count(); ++i ) for (sal_uInt16 i = 0; i < aNewTabs.Count(); ++i)
{ {
SvxTabStop aTmpStop = aNewTabs[i]; SvxTabStop aTmpStop = aNewTabs[i];
aTmpStop.GetTabPos() = aTmpStop.GetTabPos() = LogicToLogic(aTmpStop.GetTabPos(), MAP_100TH_MM, eUnit);
LogicToLogic( aTmpStop.GetTabPos(), MAP_100TH_MM, eUnit ); aTmp.Insert(aTmpStop);
aTmp.Insert( aTmpStop );
} }
if ( !pOld || !( *static_cast<const SvxTabStopItem*>(pOld) == aTmp ) ) if (!pOld || !(*static_cast<const SvxTabStopItem*>(pOld) == aTmp))
{ {
rSet->Put( aTmp ); rSet->Put(aTmp);
bModified = true; bModified = true;
} }
} }
else if ( !pOld || !( *static_cast<const SvxTabStopItem*>(pOld) == aNewTabs ) ) else if (!pOld || !( *static_cast<const SvxTabStopItem*>(pOld) == aNewTabs))
{ {
rSet->Put( aNewTabs ); rSet->Put(aNewTabs);
bModified = true; bModified = true;
} }
return bModified; return bModified;
} }
VclPtr<SfxTabPage> SvxTabulatorTabPage::Create(vcl::Window* pParent, const SfxItemSet* rSet)
VclPtr<SfxTabPage> SvxTabulatorTabPage::Create( vcl::Window* pParent,
const SfxItemSet* rSet)
{ {
return VclPtr<SfxTabPage>( new SvxTabulatorTabPage( pParent, *rSet ), return VclPtr<SfxTabPage>(new SvxTabulatorTabPage(pParent, *rSet), SAL_NO_ACQUIRE);
SAL_NO_ACQUIRE );
} }
void SvxTabulatorTabPage::Reset(const SfxItemSet* rSet)
void SvxTabulatorTabPage::Reset( const SfxItemSet* rSet )
{ {
SfxItemPool* pPool = rSet->GetPool(); SfxItemPool* pPool = rSet->GetPool();
MapUnit eUnit = (MapUnit)pPool->GetMetric( GetWhich( SID_ATTR_TABSTOP ) ); MapUnit eUnit = (MapUnit)pPool->GetMetric(GetWhich(SID_ATTR_TABSTOP));
// Current tabs // Current tabs
const SfxPoolItem* pItem = GetItem( *rSet, SID_ATTR_TABSTOP ); const SfxPoolItem* pItem = GetItem(*rSet, SID_ATTR_TABSTOP);
if ( pItem ) if (pItem)
{ {
if ( MAP_100TH_MM != eUnit ) if (MAP_100TH_MM != eUnit)
{ {
SvxTabStopItem aTmp( *static_cast<const SvxTabStopItem*>(pItem) ); SvxTabStopItem aTmp(*static_cast<const SvxTabStopItem*>(pItem));
aNewTabs.Remove( 0, aNewTabs.Count() ); aNewTabs.Remove(0, aNewTabs.Count());
for ( sal_uInt16 i = 0; i < aTmp.Count(); ++i ) for (sal_uInt16 i = 0; i < aTmp.Count(); ++i)
{ {
SvxTabStop aTmpStop = aTmp[i]; SvxTabStop aTmpStop = aTmp[i];
aTmpStop.GetTabPos() = LogicToLogic( aTmpStop.GetTabPos(), eUnit, MAP_100TH_MM ); aTmpStop.GetTabPos() = LogicToLogic(aTmpStop.GetTabPos(), eUnit, MAP_100TH_MM);
aNewTabs.Insert( aTmpStop ); aNewTabs.Insert(aTmpStop);
} }
} }
else else
aNewTabs = *static_cast<const SvxTabStopItem*>(pItem); aNewTabs = *static_cast<const SvxTabStopItem*>(pItem);
} }
else else
aNewTabs.Remove( 0, aNewTabs.Count() ); aNewTabs.Remove(0, aNewTabs.Count());
// Defaul tab distance // Defaul tab distance
nDefDist = SVX_TAB_DEFDIST; nDefDist = SVX_TAB_DEFDIST;
pItem = GetItem( *rSet, SID_ATTR_TABSTOP_DEFAULTS ); pItem = GetItem(*rSet, SID_ATTR_TABSTOP_DEFAULTS);
if ( pItem ) if (pItem)
nDefDist = LogicToLogic( nDefDist = LogicToLogic(long(static_cast<const SfxUInt16Item*>(pItem)->GetValue()), eUnit, MAP_100TH_MM);
(long)static_cast<const SfxUInt16Item*>(pItem)->GetValue(), eUnit, MAP_100TH_MM );
// Tab pos currently selected // Tab pos currently selected
sal_uInt16 nTabPos = 0; sal_uInt16 nTabPos = 0;
pItem = GetItem( *rSet, SID_ATTR_TABSTOP_POS ); pItem = GetItem(*rSet, SID_ATTR_TABSTOP_POS);
if ( pItem ) if (pItem)
nTabPos = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); nTabPos = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
InitTabPos_Impl( nTabPos ); InitTabPos_Impl(nTabPos);
} }
void SvxTabulatorTabPage::DisableControls(const sal_uInt16 nFlag)
void SvxTabulatorTabPage::DisableControls( const sal_uInt16 nFlag )
{ {
if ( ( TABTYPE_LEFT & nFlag ) == TABTYPE_LEFT ) if ((TABTYPE_LEFT & nFlag) == TABTYPE_LEFT)
{ {
m_pLeftTab->Disable(); m_pLeftTab->Disable();
m_pLeftWin->Disable(); m_pLeftWin->Disable();
...@@ -358,7 +337,7 @@ void SvxTabulatorTabPage::DisableControls( const sal_uInt16 nFlag ) ...@@ -358,7 +337,7 @@ void SvxTabulatorTabPage::DisableControls( const sal_uInt16 nFlag )
m_pDezCharLabel->Disable(); m_pDezCharLabel->Disable();
m_pDezChar->Disable(); m_pDezChar->Disable();
} }
if ( ( TABTYPE_ALL & nFlag ) == TABTYPE_ALL ) if ( ( TABTYPE_ALL & nFlag ) == TABTYPE_ALL )
m_pTypeFrame->Disable(); m_pTypeFrame->Disable();
if ( ( TABFILL_NONE & nFlag ) == TABFILL_NONE ) if ( ( TABFILL_NONE & nFlag ) == TABFILL_NONE )
m_pNoFillChar->Disable(); m_pNoFillChar->Disable();
...@@ -377,8 +356,6 @@ void SvxTabulatorTabPage::DisableControls( const sal_uInt16 nFlag ) ...@@ -377,8 +356,6 @@ void SvxTabulatorTabPage::DisableControls( const sal_uInt16 nFlag )
m_pFillFrame->Disable(); m_pFillFrame->Disable();
} }
SfxTabPage::sfxpg SvxTabulatorTabPage::DeactivatePage( SfxItemSet* _pSet ) SfxTabPage::sfxpg SvxTabulatorTabPage::DeactivatePage( SfxItemSet* _pSet )
{ {
if ( _pSet ) if ( _pSet )
...@@ -386,20 +363,17 @@ SfxTabPage::sfxpg SvxTabulatorTabPage::DeactivatePage( SfxItemSet* _pSet ) ...@@ -386,20 +363,17 @@ SfxTabPage::sfxpg SvxTabulatorTabPage::DeactivatePage( SfxItemSet* _pSet )
return LEAVE_PAGE; return LEAVE_PAGE;
} }
void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos ) void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos )
{ {
m_pTabBox->Clear(); m_pTabBox->Clear();
long nOffset = 0; long nOffset = 0;
const SfxPoolItem* pItem = 0; const SfxPoolItem* pItem = 0;
if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, true, &pItem ) if (GetItemSet().GetItemState(SID_ATTR_TABSTOP_OFFSET, true, &pItem) == SfxItemState::SET)
== SfxItemState::SET )
{ {
nOffset = static_cast<const SfxInt32Item*>(pItem)->GetValue(); nOffset = static_cast<const SfxInt32Item*>(pItem)->GetValue();
MapUnit eUnit = (MapUnit)GetItemSet().GetPool()->GetMetric( GetWhich( SID_ATTR_TABSTOP ) ); MapUnit eUnit = (MapUnit)GetItemSet().GetPool()->GetMetric(GetWhich(SID_ATTR_TABSTOP));
nOffset = OutputDevice::LogicToLogic( nOffset, eUnit, MAP_100TH_MM ); nOffset = OutputDevice::LogicToLogic(nOffset, eUnit, MAP_100TH_MM);
} }
// Correct current TabPos and default tabs // Correct current TabPos and default tabs
...@@ -442,8 +416,6 @@ void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos ) ...@@ -442,8 +416,6 @@ void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos )
} }
} }
void SvxTabulatorTabPage::SetFillAndTabType_Impl() void SvxTabulatorTabPage::SetFillAndTabType_Impl()
{ {
RadioButton* pTypeBtn = 0; RadioButton* pTypeBtn = 0;
...@@ -489,8 +461,6 @@ void SvxTabulatorTabPage::SetFillAndTabType_Impl() ...@@ -489,8 +461,6 @@ void SvxTabulatorTabPage::SetFillAndTabType_Impl()
pFillBtn->Check(); pFillBtn->Check();
} }
IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn )
{ {
// Add a new one and select it // Add a new one and select it
...@@ -547,8 +517,6 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn ) ...@@ -547,8 +517,6 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn )
return 0; return 0;
} }
IMPL_LINK_NOARG(SvxTabulatorTabPage, DelHdl_Impl) IMPL_LINK_NOARG(SvxTabulatorTabPage, DelHdl_Impl)
{ {
sal_Int32 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue() ); sal_Int32 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue() );
...@@ -590,8 +558,6 @@ IMPL_LINK_NOARG(SvxTabulatorTabPage, DelHdl_Impl) ...@@ -590,8 +558,6 @@ IMPL_LINK_NOARG(SvxTabulatorTabPage, DelHdl_Impl)
return 0; return 0;
} }
IMPL_LINK_NOARG(SvxTabulatorTabPage, DelAllHdl_Impl) IMPL_LINK_NOARG(SvxTabulatorTabPage, DelAllHdl_Impl)
{ {
if ( aNewTabs.Count() ) if ( aNewTabs.Count() )
...@@ -605,8 +571,6 @@ IMPL_LINK_NOARG(SvxTabulatorTabPage, DelAllHdl_Impl) ...@@ -605,8 +571,6 @@ IMPL_LINK_NOARG(SvxTabulatorTabPage, DelAllHdl_Impl)
return 0; return 0;
} }
IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox ) IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox )
{ {
bCheck = true; bCheck = true;
...@@ -640,8 +604,6 @@ IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox ) ...@@ -640,8 +604,6 @@ IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox )
return 0; return 0;
} }
IMPL_LINK( SvxTabulatorTabPage, FillTypeCheckHdl_Impl, RadioButton *, pBox ) IMPL_LINK( SvxTabulatorTabPage, FillTypeCheckHdl_Impl, RadioButton *, pBox )
{ {
bCheck = true; bCheck = true;
...@@ -671,8 +633,6 @@ IMPL_LINK( SvxTabulatorTabPage, FillTypeCheckHdl_Impl, RadioButton *, pBox ) ...@@ -671,8 +633,6 @@ IMPL_LINK( SvxTabulatorTabPage, FillTypeCheckHdl_Impl, RadioButton *, pBox )
return 0; return 0;
} }
IMPL_LINK( SvxTabulatorTabPage, GetFillCharHdl_Impl, Edit *, pEdit ) IMPL_LINK( SvxTabulatorTabPage, GetFillCharHdl_Impl, Edit *, pEdit )
{ {
OUString aChar( pEdit->GetText() ); OUString aChar( pEdit->GetText() );
...@@ -689,8 +649,6 @@ IMPL_LINK( SvxTabulatorTabPage, GetFillCharHdl_Impl, Edit *, pEdit ) ...@@ -689,8 +649,6 @@ IMPL_LINK( SvxTabulatorTabPage, GetFillCharHdl_Impl, Edit *, pEdit )
return 0; return 0;
} }
IMPL_LINK( SvxTabulatorTabPage, GetDezCharHdl_Impl, Edit *, pEdit ) IMPL_LINK( SvxTabulatorTabPage, GetDezCharHdl_Impl, Edit *, pEdit )
{ {
OUString aChar( pEdit->GetText() ); OUString aChar( pEdit->GetText() );
...@@ -706,8 +664,6 @@ IMPL_LINK( SvxTabulatorTabPage, GetDezCharHdl_Impl, Edit *, pEdit ) ...@@ -706,8 +664,6 @@ IMPL_LINK( SvxTabulatorTabPage, GetDezCharHdl_Impl, Edit *, pEdit )
return 0; return 0;
} }
IMPL_LINK_NOARG(SvxTabulatorTabPage, SelectHdl_Impl) IMPL_LINK_NOARG(SvxTabulatorTabPage, SelectHdl_Impl)
{ {
sal_Int32 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit ); sal_Int32 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit );
...@@ -720,8 +676,6 @@ IMPL_LINK_NOARG(SvxTabulatorTabPage, SelectHdl_Impl) ...@@ -720,8 +676,6 @@ IMPL_LINK_NOARG(SvxTabulatorTabPage, SelectHdl_Impl)
return 0; return 0;
} }
IMPL_LINK_NOARG(SvxTabulatorTabPage, ModifyHdl_Impl) IMPL_LINK_NOARG(SvxTabulatorTabPage, ModifyHdl_Impl)
{ {
sal_Int32 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit ); sal_Int32 nPos = m_pTabBox->GetValuePos( m_pTabBox->GetValue( eDefUnit ), eDefUnit );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment