summaryrefslogtreecommitdiff
path: root/cui/source/tabpages
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <orw@apache.org>2013-04-10 08:20:16 +0000
committerOliver-Rainer Wittmann <orw@apache.org>2013-04-10 08:20:16 +0000
commit0a0a9b32aa5bf1ce2554ad37cbba3c7a105db2b5 (patch)
treef5c258d25d3719c8f719a944043b5220377e9f9c /cui/source/tabpages
parentbcfee75544246db6788715d98efd6d33c12f933d (diff)
121420: merge sidebar feature from branch into trunk
Notes
Diffstat (limited to 'cui/source/tabpages')
-rw-r--r--cui/source/tabpages/backgrnd.cxx4
-rw-r--r--cui/source/tabpages/border.cxx6
-rw-r--r--cui/source/tabpages/chardlg.cxx10
-rw-r--r--cui/source/tabpages/numpages.cxx4
-rw-r--r--cui/source/tabpages/tpbitmap.cxx10
-rw-r--r--cui/source/tabpages/tpcolor.cxx10
-rw-r--r--cui/source/tabpages/tpline.cxx30
-rw-r--r--cui/source/tabpages/tplnedef.cxx8
-rw-r--r--cui/source/tabpages/tplneend.cxx7
9 files changed, 46 insertions, 43 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 938ae0868580..f84bc459ea6c 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1194,7 +1194,7 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl()
{
SfxObjectShell* pDocSh = SfxObjectShell::Current();
const SfxPoolItem* pItem = NULL;
- XColorTable* pColorTable = NULL;
+ XColorList* pColorTable = NULL;
const Size aSize15x15 = Size( 15, 15 );
FASTBOOL bOwn = sal_False;
@@ -1204,7 +1204,7 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl()
if ( !pColorTable )
{
bOwn = sal_True;
- pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() );
+ pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
}
if ( pColorTable )
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 578f29deac8f..cac29eddbe52 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -38,7 +38,7 @@
#define LINESTYLE_HTML_MAX 5
-#include <svx/xtable.hxx> // XColorTable
+#include <svx/xtable.hxx> // XColorList
#include <svx/drawitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/shaditem.hxx>
@@ -335,10 +335,10 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent,
FillValueSets();
FillLineListBox_Impl();
- // ColorBox aus der XColorTable fuellen.
+ // ColorBox aus der XColorList fuellen.
SfxObjectShell* pDocSh = SfxObjectShell::Current();
const SfxPoolItem* pItem = NULL;
- XColorTable* pColorTable = NULL;
+ XColorList* pColorTable = NULL;
DBG_ASSERT( pDocSh, "DocShell not found!" );
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 50ce94bd633d..18bc03872773 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -46,7 +46,7 @@
#include <cuires.hrc>
#include "chardlg.hrc"
-#include <svx/xtable.hxx> // XColorTable
+#include <svx/xtable.hxx> // XColorList
#include "chardlg.hxx"
#include "editeng/fontitem.hxx"
#include <editeng/postitem.hxx>
@@ -715,7 +715,7 @@ void SvxCharNamePage::Initialize()
// fill the color box
SfxObjectShell* pDocSh = SfxObjectShell::Current();
//DBG_ASSERT( pDocSh, "DocShell not found!" );
- XColorTable* pColorTable = NULL;
+ XColorList* pColorTable = NULL;
FASTBOOL bKillTable = sal_False;
const SfxPoolItem* pItem = NULL;
@@ -728,7 +728,7 @@ void SvxCharNamePage::Initialize()
if ( !pColorTable )
{
- pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() );
+ pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
bKillTable = sal_True;
}
@@ -1787,7 +1787,7 @@ void SvxCharEffectsPage::Initialize()
// fill the color box
SfxObjectShell* pDocSh = SfxObjectShell::Current();
DBG_ASSERT( pDocSh, "DocShell not found!" );
- XColorTable* pColorTable = NULL;
+ XColorList* pColorTable = NULL;
FASTBOOL bKillTable = sal_False;
if ( pDocSh )
@@ -1799,7 +1799,7 @@ void SvxCharEffectsPage::Initialize()
if ( !pColorTable )
{
- pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() );
+ pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
bKillTable = sal_True;
}
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 9e9219c24acd..f6d63fe6a17a 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -1609,7 +1609,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
{
SfxObjectShell* pDocSh = SfxObjectShell::Current();
DBG_ASSERT( pDocSh, "DocShell not found!" );
- XColorTable* pColorTable = NULL;
+ XColorList* pColorTable = NULL;
FASTBOOL bKillTable = sal_False;
if ( pDocSh )
{
@@ -1620,7 +1620,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
if ( !pColorTable )
{
- pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() );
+ pColorTable = new XColorList( SvtPathOptions().GetPalettePath() );
bKillTable = sal_True;
}
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index d67c513c97e6..65a7c9ae8132 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -593,8 +593,8 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
if( pEntry )
{
pBitmapList->Insert( pEntry );
-
- aLbBitmaps.Append( pEntry );
+ const Size aUiSize(pBitmapList->getUiBitmapWidth(), pBitmapList->getUiBitmapHeight());
+ aLbBitmaps.Append(aUiSize, *pEntry );
aLbBitmaps.SelectEntryPos( aLbBitmaps.GetEntryCount() - 1 );
#ifdef WNT
@@ -701,7 +701,8 @@ IMPL_LINK( SvxBitmapTabPage, ClickImportHdl_Impl, void *, EMPTYARG )
XBitmapEntry* pEntry = new XBitmapEntry( aGraphic, aName );
pBitmapList->Insert( pEntry );
- aLbBitmaps.Append( pEntry );
+ const Size aUiSize(pBitmapList->getUiBitmapWidth(), pBitmapList->getUiBitmapHeight());
+ aLbBitmaps.Append(aUiSize, *pEntry );
aLbBitmaps.SelectEntryPos( aLbBitmaps.GetEntryCount() - 1 );
#ifdef WNT
@@ -756,6 +757,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
long nCount = pBitmapList->Count();
sal_Bool bDifferent = sal_False;
sal_Bool bLoop = sal_True;
+ const Size aUiSize(pBitmapList->getUiBitmapWidth(), pBitmapList->getUiBitmapHeight());
while( bLoop && pDlg->Execute() == RET_OK )
{
@@ -780,7 +782,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
pEntry->SetGraphicObject(Graphic(aBitmapEx));
- aLbBitmaps.Modify( pEntry, nPos );
+ aLbBitmaps.Modify( aUiSize, *pEntry, nPos );
aLbBitmaps.SelectEntryPos( nPos );
// Flag fuer modifiziert setzen
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 326ec9b6e5be..1928e2333b2b 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -524,7 +524,7 @@ IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
ConvertColorValues (aAktuellColor, CM_RGB);
pEntry = new XColorEntry( aAktuellColor, aName );
- pColorTab->Insert( pColorTab->Count(), pEntry );
+ pColorTab->Insert( pEntry, pColorTab->Count() );
aLbColor.Append( pEntry );
aValSetColorTable.InsertItem( aValSetColorTable.GetItemCount() + 1,
@@ -643,7 +643,7 @@ IMPL_LINK( SvxColorTabPage, ClickWorkOnHdl_Impl, void *, EMPTYARG )
ConvertColorValues (aTmpColor, CM_RGB);
pColorDlg->SetColor (aTmpColor);
- pColorDlg->SetMode( svtools::ColorPickerMode_MODIFY );
+ pColorDlg->SetMode( svtools::ColorPickerMode_MODIFY );
if( pColorDlg->Execute() == RET_OK )
{
@@ -698,7 +698,7 @@ IMPL_LINK( SvxColorTabPage, ClickDeleteHdl_Impl, void *, EMPTYARG )
{
pEntry = pColorTab->Remove( i + 1 );
DBG_ASSERT( pEntry, "ColorEntry nicht vorhanden (2) !" );
- pColorTab->Insert( i, pEntry );
+ pColorTab->Insert( pEntry, i );
}
// Listbox und ValueSet aktualisieren
@@ -765,14 +765,14 @@ IMPL_LINK( SvxColorTabPage, ClickLoadHdl_Impl, void *, EMPTYARG )
aPathURL.removeFinalSlash();
// Tabelle speichern
- XColorTable* pColTab = new XColorTable( aPathURL.GetMainURL( INetURLObject::NO_DECODE ), pXPool );
+ XColorList* pColTab = new XColorList( aPathURL.GetMainURL( INetURLObject::NO_DECODE ), pXPool );
pColTab->SetName( aURL.getName() ); // XXX
if( pColTab->Load() )
{
if( pColTab )
{
// Pruefen, ob Tabelle geloescht werden darf:
- const XColorTable *pTempTable = 0;
+ const XColorList *pTempTable = 0;
SvxAreaTabDialog* pArea = dynamic_cast< SvxAreaTabDialog* >( DLGWIN );
SvxLineTabDialog* pLine = dynamic_cast< SvxLineTabDialog* >( DLGWIN );
if( pArea )
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index a78837113a1d..b6efd27812c1 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -301,7 +301,7 @@ void SvxLineTabPage::FillListboxes()
{
// Linienstile
sal_uInt16 nOldSelect = aLbLineStyle.GetSelectEntryPos();
- aLbLineStyle.FillStyles();
+ // aLbLineStyle.FillStyles();
aLbLineStyle.Fill( pDashList );
aLbLineStyle.SelectEntryPos( nOldSelect );
@@ -728,22 +728,22 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs )
{
case 0: // Rounded, default
{
- pNew = new XLineJointItem(XLINEJOINT_ROUND);
+ pNew = new XLineJointItem(com::sun::star::drawing::LineJoint_ROUND);
break;
}
case 1: // - none -
{
- pNew = new XLineJointItem(XLINEJOINT_NONE);
+ pNew = new XLineJointItem(com::sun::star::drawing::LineJoint_NONE);
break;
}
case 2: // Miter
{
- pNew = new XLineJointItem(XLINEJOINT_MITER);
+ pNew = new XLineJointItem(com::sun::star::drawing::LineJoint_MITER);
break;
}
case 3: // Bevel
{
- pNew = new XLineJointItem(XLINEJOINT_BEVEL);
+ pNew = new XLineJointItem(com::sun::star::drawing::LineJoint_BEVEL);
break;
}
}
@@ -895,22 +895,22 @@ sal_Bool SvxLineTabPage::FillXLSet_Impl()
{
case 0: // Rounded, default
{
- rXLSet.Put(XLineJointItem(XLINEJOINT_ROUND));
+ rXLSet.Put(XLineJointItem(com::sun::star::drawing::LineJoint_ROUND));
break;
}
case 1: // - none -
{
- rXLSet.Put(XLineJointItem(XLINEJOINT_NONE));
+ rXLSet.Put(XLineJointItem(com::sun::star::drawing::LineJoint_NONE));
break;
}
case 2: // Miter
{
- rXLSet.Put(XLineJointItem(XLINEJOINT_MITER));
+ rXLSet.Put(XLineJointItem(com::sun::star::drawing::LineJoint_MITER));
break;
}
case 3: // Bevel
{
- rXLSet.Put(XLineJointItem(XLINEJOINT_BEVEL));
+ rXLSet.Put(XLineJointItem(com::sun::star::drawing::LineJoint_BEVEL));
break;
}
}
@@ -1344,15 +1344,15 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs )
}
else if(SFX_ITEM_DONTCARE != rAttrs.GetItemState(XATTR_LINEJOINT))
{
- XLineJoint eLineJoint = ((const XLineJointItem&)(rAttrs.Get(XATTR_LINEJOINT))).GetValue();
+ const com::sun::star::drawing::LineJoint eLineJoint = ((const XLineJointItem&)(rAttrs.Get(XATTR_LINEJOINT))).GetValue();
switch(eLineJoint)
{
- case XLINEJOINT_ROUND : maLBEdgeStyle.SelectEntryPos(0); break;
- case XLINEJOINT_NONE : maLBEdgeStyle.SelectEntryPos(1); break;
- case XLINEJOINT_MITER : maLBEdgeStyle.SelectEntryPos(2); break;
- case XLINEJOINT_BEVEL : maLBEdgeStyle.SelectEntryPos(3); break;
- case XLINEJOINT_MIDDLE : break;
+ case com::sun::star::drawing::LineJoint_MIDDLE : // fallback to round, unused value
+ case com::sun::star::drawing::LineJoint_ROUND : maLBEdgeStyle.SelectEntryPos(0); break;
+ case com::sun::star::drawing::LineJoint_NONE : maLBEdgeStyle.SelectEntryPos(1); break;
+ case com::sun::star::drawing::LineJoint_MITER : maLBEdgeStyle.SelectEntryPos(2); break;
+ case com::sun::star::drawing::LineJoint_BEVEL : maLBEdgeStyle.SelectEntryPos(3); break;
}
}
else
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index a9116e88e3f3..4a5adb6e2bea 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -626,8 +626,8 @@ IMPL_LINK( SvxLineDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
long nDashCount = pDashList->Count();
pDashList->Insert( pEntry, nDashCount );
- Bitmap* pBitmap = pDashList->GetBitmap( nDashCount );
- aLbLineStyles.Append( pEntry, pBitmap );
+ const Bitmap aBitmap = pDashList->GetUiBitmap( nDashCount );
+ aLbLineStyles.Append( pEntry, &aBitmap );
aLbLineStyles.SelectEntryPos( aLbLineStyles.GetEntryCount() - 1 );
@@ -707,8 +707,8 @@ IMPL_LINK( SvxLineDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
XDashEntry* pEntry = new XDashEntry( aDash, aName );
delete pDashList->Replace( pEntry, nPos );
- Bitmap* pBitmap = pDashList->GetBitmap( nPos );
- aLbLineStyles.Modify( pEntry, nPos, pBitmap );
+ const Bitmap aBitmap = pDashList->GetUiBitmap( nPos );
+ aLbLineStyles.Modify( pEntry, nPos, &aBitmap );
aLbLineStyles.SelectEntryPos( nPos );
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 942e3f93f6e1..210f3d4c7dd9 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -407,7 +407,8 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickModifyHdl_Impl, void *, EMPTYARG )
pEntry->SetName( aName );
aEdtName.SetText( aName );
- aLbLineEnds.Modify( pEntry, nPos, pLineEndList->GetBitmap( nPos ) );
+ const Bitmap aUiBitmap( pLineEndList->GetUiBitmap( nPos ) );
+ aLbLineEnds.Modify( pEntry, nPos, &aUiBitmap );
aLbLineEnds.SelectEntryPos( nPos );
// Flag fuer modifiziert setzen
@@ -505,10 +506,10 @@ IMPL_LINK( SvxLineEndDefTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
long nLineEndCount = pLineEndList->Count();
pLineEndList->Insert( pEntry, nLineEndCount );
- Bitmap* pBitmap = pLineEndList->GetBitmap( nLineEndCount );
+ const Bitmap aBitmap = pLineEndList->GetUiBitmap( nLineEndCount );
// Zur ListBox hinzufuegen
- aLbLineEnds.Append( pEntry, pBitmap );
+ aLbLineEnds.Append( pEntry, &aBitmap );
aLbLineEnds.SelectEntryPos( aLbLineEnds.GetEntryCount() - 1 );
// Flag fuer modifiziert setzen