[Libreoffice-commits] core.git: 3 commits - cui/source include/svx sc/inc sc/uiconfig sfx2/source svx/source
Caolán McNamara
caolanm at redhat.com
Tue Jun 18 07:35:37 PDT 2013
cui/source/options/optchart.cxx | 9 -
cui/source/tabpages/tpbitmap.cxx | 29 ----
cui/source/tabpages/tpcolor.cxx | 19 +-
cui/source/tabpages/tpgradnt.cxx | 4
cui/source/tabpages/tphatch.cxx | 4
cui/source/tabpages/tplnedef.cxx | 5
cui/source/tabpages/tplneend.cxx | 11 -
include/svx/dlgctrl.hxx | 28 +--
include/svx/xtable.hxx | 240 +++++++++++++++-------------------
sc/inc/helpids.h | 2
sc/uiconfig/scalc/ui/optformula.ui | 25 +--
sfx2/source/inc/helpid.hrc | 1
svx/source/dialog/dlgctrl.cxx | 142 ++++++++++++--------
svx/source/unodraw/XPropertyTable.cxx | 2
svx/source/unodraw/unoctabl.cxx | 8 -
svx/source/unodraw/unoshape.cxx | 22 +--
svx/source/xoutdev/xattr.cxx | 2
svx/source/xoutdev/xattrbmp.cxx | 4
svx/source/xoutdev/xtabbtmp.cxx | 13 -
svx/source/xoutdev/xtabcolr.cxx | 4
svx/source/xoutdev/xtabdash.cxx | 6
svx/source/xoutdev/xtabgrdt.cxx | 6
svx/source/xoutdev/xtabhtch.cxx | 6
svx/source/xoutdev/xtable.cxx | 98 +++++++++++++
svx/source/xoutdev/xtablend.cxx | 6
25 files changed, 381 insertions(+), 315 deletions(-)
New commits:
commit ecc031ee63fc6255b88677ed00594789a81d43e5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 18 15:31:11 2013 +0100
set mnemonic widgets
Change-Id: I991b1c01a2e366e8d95ef2ec85a6b83037ac0413
diff --git a/sc/uiconfig/scalc/ui/optformula.ui b/sc/uiconfig/scalc/ui/optformula.ui
index 743ef34..f7b0652 100644
--- a/sc/uiconfig/scalc/ui/optformula.ui
+++ b/sc/uiconfig/scalc/ui/optformula.ui
@@ -41,6 +41,7 @@
<property name="can_focus">False</property>
<property name="label" translatable="yes">Formula _syntax:</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">formulasyntax</property>
</object>
<packing>
<property name="expand">False</property>
@@ -69,11 +70,10 @@
<child>
<object class="GtkCheckButton" id="englishfuncname">
<property name="label" translatable="yes">Use English function names</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
@@ -131,14 +131,14 @@
<child>
<object class="GtkRadioButton" id="calcdefault">
<property name="label" translatable="yes">Default</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
+ <property name="group">calccustom</property>
</object>
<packing>
<property name="expand">False</property>
@@ -154,14 +154,13 @@
<child>
<object class="GtkRadioButton" id="calccustom">
<property name="label" translatable="yes">Custom</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
- <property name="active">True</property>
<property name="draw_indicator">True</property>
+ <property name="group">calcdefault</property>
</object>
<packing>
<property name="expand">False</property>
@@ -172,11 +171,9 @@
<child>
<object class="GtkButton" id="details">
<property name="label" translatable="yes">Details...</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="expand">False</property>
@@ -243,6 +240,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">_Function</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">function</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -258,6 +256,7 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">Array co_lumn</property>
<property name="use_underline">True</property>
+ <property name="mnemonic_widget">arraycolumn</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -272,6 +271,8 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Array _row</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">arrayrow</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -332,12 +333,10 @@
<child>
<object class="GtkButton" id="reset">
<property name="label" translatable="yes">Rese_t</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">center</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -398,6 +397,8 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Excel 2007 and newer</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">ooxmlrecalc</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -412,6 +413,8 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">ODF Spreadsheet (not saved by %PRODUCTNAME)</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">odfrecalc</property>
</object>
<packing>
<property name="left_attach">0</property>
commit 56e664405a23fb80da79d60519b276a3cce572ce
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 18 15:13:40 2013 +0100
various now unused HIDs
Change-Id: I01ebf562bf5963a52f056d6023e5cc6efd12e386
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index 2b2d5f7..a57fd88 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -60,8 +60,6 @@
#define HID_SC_PIVOTSUBT "SC_HID_SC_PIVOTSUBT"
#define HID_SCPAGE_SUBT_OPTIONS "SC_HID_SCPAGE_SUBT_OPTIONS"
#define HID_SCPAGE_SUBT_GROUP "SC_HID_SCPAGE_SUBT_GROUP"
-#define HID_SCPAGE_FORMULA "SC_HID_SCPAGE_FORMULA"
-#define HID_SCPAGE_USERLISTS "SC_HID_SCPAGE_USERLISTS"
#define HID_SCPAGE_AREAS "SC_HID_SCPAGE_AREAS"
#define HID_SCPAGE_SUBT_GROUP1 "SC_HID_SCPAGE_SUBT_GROUP1"
#define HID_SCPAGE_SUBT_GROUP2 "SC_HID_SCPAGE_SUBT_GROUP2"
diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc
index c11cabb..89081e0 100644
--- a/sfx2/source/inc/helpid.hrc
+++ b/sfx2/source/inc/helpid.hrc
@@ -27,7 +27,6 @@
#define HID_PRINTMONITOR "SFX2_HID_PRINTMONITOR"
#define HID_CONFIG_EVENT "SFX2_HID_CONFIG_EVENT"
#define HID_BROWSERCONTROL "SFX2_HID_BROWSERCONTROL"
-#define HID_PRINT_OPTIONS "SFX2_HID_PRINT_OPTIONS"
#define HID_PREVIEW_FRAME "SFX2_HID_PREVIEW_FRAME"
#define HID_DOCINFO_FRAME "SFX2_HID_DOCINFO_FRAME"
#define HID_EXPLORER_FRAME "SFX2_HID_EXPLORER_FRAME"
commit 6ed60d6a9314341bda0afbea7ed6b106f562393d
Author: Armin Le Grand <alg at apache.org>
Date: Thu May 2 13:22:17 2013 +0000
Related: #i122120# Ensured Append/Modify methods in LB implementations...
always add a UI graphic preview, corrected diag mirror in bitmap pattern
(cherry picked from commit 36a8574012525fa837df6dfd1839fa65b5a2bc70)
Conflicts:
cui/source/tabpages/tpbitmap.cxx
cui/source/tabpages/tpcolor.cxx
cui/source/tabpages/tpgradnt.cxx
cui/source/tabpages/tplnedef.cxx
cui/source/tabpages/tplneend.cxx
svx/inc/svx/dlgctrl.hxx
svx/inc/svx/xtable.hxx
svx/source/dialog/dlgctrl.cxx
svx/source/xoutdev/xtabbtmp.cxx
svx/source/xoutdev/xtabcolr.cxx
svx/source/xoutdev/xtabdash.cxx
svx/source/xoutdev/xtabgrdt.cxx
svx/source/xoutdev/xtabhtch.cxx
svx/source/xoutdev/xtable.cxx
svx/source/xoutdev/xtablend.cxx
Change-Id: Iff0744061b76d8c608e285f81bcc8e76edeb6a69
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 06f25ef..cf7d025 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -35,7 +35,7 @@ void ChartColorLB::FillBox( const SvxChartColorTable & rTab )
for( long i = 0; i < nCount; i++ )
{
- Append( const_cast< XColorEntry * >( & rTab[ i ] ));
+ Append( rTab[ i ] );
}
SetUpdateMode( sal_True );
}
@@ -160,7 +160,7 @@ long SvxDefaultColorOptPage::GetColorIndex( const Color& rCol )
{
pColorEntry = pColorList->GetColor( i );
if( pColorEntry && pColorEntry->GetColor() == rCol )
- return pColorList->Get( pColorEntry->GetName() );
+ return pColorList->GetIndex( pColorEntry->GetName() );
}
}
return -1L;
@@ -270,10 +270,9 @@ IMPL_LINK_NOARG(SvxDefaultColorOptPage, BoxClickedHdl)
sal_uInt16 nIdx = aLbChartColors.GetSelectEntryPos();
if( nIdx != LISTBOX_ENTRY_NOTFOUND )
{
- XColorEntry aEntry( aValSetColorBox.GetItemColor( aValSetColorBox.GetSelectItemId() ),
- aLbChartColors.GetSelectEntry() );
+ const XColorEntry aEntry( aValSetColorBox.GetItemColor( aValSetColorBox.GetSelectItemId() ), aLbChartColors.GetSelectEntry() );
- aLbChartColors.Modify( & aEntry, nIdx );
+ aLbChartColors.Modify( aEntry, nIdx );
pColorConfig->ReplaceColorByIndex( nIdx, aEntry );
aLbChartColors.SelectEntryPos( nIdx ); // reselect entry
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 148cbd8..1d516c4 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -528,6 +528,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl)
if( pWarnBox->Execute() != RET_OK )
break;
}
+
delete pDlg;
delete pWarnBox;
@@ -559,16 +560,6 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl)
aLbBitmaps.Append(rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry );
aLbBitmaps.SelectEntryPos( aLbBitmaps.GetEntryCount() - 1 );
-#ifdef WNT
- // hack: #31355# W.P.
- Rectangle aRect( aLbBitmaps.GetPosPixel(), aLbBitmaps.GetSizePixel() );
- if( sal_True ) { // ??? overlapped with pDlg
- // and srolling
- Invalidate( aRect );
- //aLbBitmaps.Invalidate();
- }
-#endif
-
*pnBitmapListState |= CT_MODIFIED;
ChangeBitmapHdl_Impl( this );
@@ -649,6 +640,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl)
if( pWarnBox->Execute() != RET_OK )
break;
}
+
delete pDlg;
delete pWarnBox;
@@ -661,15 +653,6 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl)
aLbBitmaps.Append(rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry );
aLbBitmaps.SelectEntryPos( aLbBitmaps.GetEntryCount() - 1 );
-#ifdef WNT
- // hack: #31355# W.P.
- Rectangle aRect( aLbBitmaps.GetPosPixel(), aLbBitmaps.GetSizePixel() );
- if( sal_True ) { // ??? overlapped with pDlg
- // and srolling
- Invalidate( aRect );
- }
-#endif
-
*pnBitmapListState |= CT_MODIFIED;
ChangeBitmapHdl_Impl( this );
@@ -723,15 +706,11 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl)
if( bDifferent )
{
bLoop = sal_False;
- XBitmapEntry* pEntry = pBitmapList->GetBitmap( nPos );
-
- pEntry->SetName( aName );
const BitmapEx aBitmapEx(aBitmapCtl.GetBitmapEx());
+ const XBitmapEntry aEntry(Graphic(aBitmapEx), aName);
- pEntry->SetGraphicObject(Graphic(aBitmapEx));
-
- aLbBitmaps.Modify( rStyleSettings.GetListBoxPreviewDefaultPixelSize(), *pEntry, nPos );
+ aLbBitmaps.Modify( rStyleSettings.GetListBoxPreviewDefaultPixelSize(), aEntry, nPos );
aLbBitmaps.SelectEntryPos( nPos );
*pnBitmapListState |= CT_MODIFIED;
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 3535228..5411f5a 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -729,9 +729,8 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl)
pColorList->Insert( pEntry, pColorList->Count() );
- m_pLbColor->Append( pEntry );
- m_pValSetColorList->InsertItem( m_pValSetColorList->GetItemCount() + 1,
- pEntry->GetColor(), pEntry->GetName() );
+ m_pLbColor->Append( *pEntry );
+ m_pValSetColorList->InsertItem( m_pValSetColorList->GetItemCount() + 1, pEntry->GetColor(), pEntry->GetName() );
ImpColorCountChanged();
m_pLbColor->SelectEntryPos( m_pLbColor->GetEntryCount() - 1 );
@@ -796,20 +795,18 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickModifyHdl_Impl)
// if not existing the entry is entered
if( bDifferent )
{
- XColorEntry* pEntry = pColorList->GetColor( nPos );
-
Color aTmpColor (aAktuellColor);
+
if (eCM != CM_RGB)
ConvertColorValues (aTmpColor, CM_RGB);
- pEntry->SetColor( aTmpColor );
- pEntry->SetName( aName );
+ const XColorEntry aEntry(aTmpColor, aName);
- m_pLbColor->Modify( pEntry, nPos );
+ m_pLbColor->Modify( aEntry, nPos );
m_pLbColor->SelectEntryPos( nPos );
- /////
- m_pValSetColorList->SetItemColor( nPos + 1, pEntry->GetColor() );
- m_pValSetColorList->SetItemText( nPos + 1, pEntry->GetName() );
+
+ m_pValSetColorList->SetItemColor( nPos + 1, aEntry.GetColor() );
+ m_pValSetColorList->SetItemText( nPos + 1, aEntry.GetName() );
m_pEdtName->SetText( aName );
m_pCtlPreviewOld->Invalidate();
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 3798030..db2b507 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -481,7 +481,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl)
pGradientList->Insert( pEntry, nCount );
- m_pLbGradients->Append( pEntry );
+ m_pLbGradients->Append( *pEntry, pGradientList->GetUiBitmap( nCount ) );
m_pLbGradients->SelectEntryPos( m_pLbGradients->GetEntryCount() - 1 );
@@ -560,7 +560,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl)
delete pGradientList->Replace( pEntry, nPos );
- m_pLbGradients->Modify( pEntry, nPos );
+ m_pLbGradients->Modify( *pEntry, nPos, pGradientList->GetUiBitmap( nPos ) );
m_pLbGradients->SelectEntryPos( nPos );
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index c386e36..2be33ae 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -530,7 +530,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl)
pHatchingList->Insert( pEntry, nCount );
- aLbHatchings.Append( pEntry );
+ aLbHatchings.Append( *pEntry, pHatchingList->GetUiBitmap( nCount ) );
aLbHatchings.SelectEntryPos( aLbHatchings.GetEntryCount() - 1 );
@@ -603,7 +603,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl)
delete pHatchingList->Replace( pEntry, nPos );
- aLbHatchings.Modify( pEntry, nPos );
+ aLbHatchings.Modify( *pEntry, nPos, pHatchingList->GetUiBitmap( nPos ) );
aLbHatchings.SelectEntryPos( nPos );
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 14ceb6b..e58b7a9 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -594,7 +594,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl)
long nDashCount = pDashList->Count();
pDashList->Insert( pEntry, nDashCount );
const Bitmap aBitmap = pDashList->GetUiBitmap( nDashCount );
- aLbLineStyles.Append( pEntry, &aBitmap );
+ aLbLineStyles.Append( *pEntry, pDashList->GetUiBitmap( nDashCount ) );
aLbLineStyles.SelectEntryPos( aLbLineStyles.GetEntryCount() - 1 );
@@ -672,8 +672,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl)
XDashEntry* pEntry = new XDashEntry( aDash, aName );
delete pDashList->Replace( pEntry, nPos );
- const Bitmap aBitmap = pDashList->GetUiBitmap( nPos );
- aLbLineStyles.Modify( pEntry, nPos, &aBitmap );
+ aLbLineStyles.Modify( *pEntry, nPos, pDashList->GetUiBitmap( nPos ) );
aLbLineStyles.SelectEntryPos( nPos );
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 93ab7b0..6756aec 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -365,13 +365,13 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl)
// if not existing, enter the entry
if( bDifferent )
{
- XLineEndEntry* pEntry = pLineEndList->GetLineEnd( nPos );
+ const XLineEndEntry* pEntry = pLineEndList->GetLineEnd( nPos );
- pEntry->SetName( aName );
aEdtName.SetText( aName );
- const Bitmap aUiBitmap( pLineEndList->GetUiBitmap( nPos ) );
- aLbLineEnds.Modify( pEntry, nPos, &aUiBitmap );
+ const XLineEndEntry aEntry(pEntry->GetLineEnd(), aName);
+
+ aLbLineEnds.Modify( aEntry, nPos, pLineEndList->GetUiBitmap( nPos ) );
aLbLineEnds.SelectEntryPos( nPos );
*pnLineEndListState |= CT_MODIFIED;
@@ -467,10 +467,9 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl)
long nLineEndCount = pLineEndList->Count();
pLineEndList->Insert( pEntry, nLineEndCount );
- const Bitmap aBitmap = pLineEndList->GetUiBitmap( nLineEndCount );
// add to the ListBox
- aLbLineEnds.Append( pEntry, &aBitmap );
+ aLbLineEnds.Append( *pEntry, pLineEndList->GetUiBitmap( nLineEndCount ) );
aLbLineEnds.SelectEntryPos( aLbLineEnds.GetEntryCount() - 1 );
*pnLineEndListState |= CT_MODIFIED;
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index a3c56ce..d88d2e2 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -209,8 +209,8 @@ public:
virtual void Fill( const XColorListRef &pTab );
- void Append( XColorEntry* pEntry, Bitmap* pBmp = NULL );
- void Modify( XColorEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL );
+ void Append( const XColorEntry& rEntry );
+ void Modify( const XColorEntry& rEntry, sal_uInt16 nPos );
};
/************************************************************************/
@@ -223,8 +223,8 @@ public:
virtual void Fill( const XHatchListRef &pList );
- void Append( XHatchEntry* pEntry, Bitmap* pBmp = NULL );
- void Modify( XHatchEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL );
+ void Append( const XHatchEntry& rEntry, const Bitmap& rBitmap );
+ void Modify( const XHatchEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
};
/************************************************************************/
@@ -238,8 +238,8 @@ public:
virtual void Fill( const XGradientListRef &pList );
- void Append( XGradientEntry* pEntry, Bitmap* pBmp = NULL );
- void Modify( XGradientEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL );
+ void Append( const XGradientEntry& rEntry, const Bitmap& rBitmap );
+ void Modify( const XGradientEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
void SelectEntryByList( const XGradientListRef &pList, const String& rStr,
const XGradient& rXGradient, sal_uInt16 nDist = 0 );
};
@@ -253,8 +253,8 @@ public:
virtual void Fill(const XBitmapListRef &pList);
- void Append(const Size& rSize, const XBitmapEntry& rEntry, BitmapEx* pBmpEx = 0);
- void Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos, BitmapEx* pBmpEx = 0);
+ void Append(const Size& rSize, const XBitmapEntry& rEntry);
+ void Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos);
void SelectEntryByList(const XBitmapList* pList, const String& rStr);
private:
@@ -309,8 +309,8 @@ public:
bool getAddStandardFields() const { return mbAddStandardFields; }
void setAddStandardFields(bool bNew);
- void Append(XDashEntry* pEntry, const Bitmap* pBmp = 0);
- void Modify(XDashEntry* pEntry, sal_uInt16 nPos, const Bitmap* pBmp = 0);
+ void Append(const XDashEntry& rEntry, const Bitmap& rBitmap );
+ void Modify(const XDashEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap );
void SelectEntryByList(const XDashList* pList, const String& rStr, const XDash& rDash, sal_uInt16 nDist = 0);
};
@@ -324,12 +324,10 @@ public:
LineEndLB( Window* pParent, WinBits aWB );
virtual ~LineEndLB (void);
- virtual void Fill( const XLineEndListRef &pList, sal_Bool bStart = sal_True );
+ virtual void Fill( const XLineEndListRef &pList, bool bStart = true );
- void Append( XLineEndEntry* pEntry, const Bitmap* pBmp = NULL,
- sal_Bool bStart = sal_True );
- void Modify( XLineEndEntry* pEntry, sal_uInt16 nPos, const Bitmap* pBmp = NULL,
- sal_Bool bStart = sal_True );
+ void Append( const XLineEndEntry& rEntry, const Bitmap& rBitmap, bool bStart = true );
+ void Modify( const XLineEndEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap, bool bStart = true );
};
//////////////////////////////////////////////////////////////////////////////
diff --git a/include/svx/xtable.hxx b/include/svx/xtable.hxx
index 6f5a23a..194547a 100644
--- a/include/svx/xtable.hxx
+++ b/include/svx/xtable.hxx
@@ -55,38 +55,33 @@ SVX_DLLPUBLIC Color RGB_Color( ColorData nColorName );
// class XColorEntry
// ------------------
-class XColorEntry : public XPropertyEntry
+class SVX_DLLPUBLIC XColorEntry : public XPropertyEntry
{
+private:
Color aColor;
public:
- XColorEntry(const Color& rColor, const String& rName)
- : XPropertyEntry(rName)
- , aColor(rColor)
- {}
+ XColorEntry(const Color& rColor, const String& rName);
+ XColorEntry(const XColorEntry& rOther);
- void SetColor(const Color& rColor) { aColor = rColor; }
- const Color& GetColor() const { return aColor; }
+ const Color& GetColor() const
+ {
+ return aColor;
+ }
};
// --------------------
// class XLineEndEntry
// --------------------
-class XLineEndEntry : public XPropertyEntry
+class SVX_DLLPUBLIC XLineEndEntry : public XPropertyEntry
{
+private:
basegfx::B2DPolyPolygon aB2DPolyPolygon;
public:
- XLineEndEntry(const basegfx::B2DPolyPolygon& rB2DPolyPolygon, const String& rName)
- : XPropertyEntry(rName),
- aB2DPolyPolygon(rB2DPolyPolygon)
- {}
-
- void SetLineEnd(const basegfx::B2DPolyPolygon& rB2DPolyPolygon)
- {
- aB2DPolyPolygon = rB2DPolyPolygon;
- }
+ XLineEndEntry(const basegfx::B2DPolyPolygon& rB2DPolyPolygon, const String& rName);
+ XLineEndEntry(const XLineEndEntry& rOther);
const basegfx::B2DPolyPolygon& GetLineEnd() const
{
@@ -98,81 +93,76 @@ public:
// class XDashEntry
// ------------------
-class XDashEntry : public XPropertyEntry
+class SVX_DLLPUBLIC XDashEntry : public XPropertyEntry
{
+private:
XDash aDash;
public:
- XDashEntry(const XDash& rDash, const String& rName) :
- XPropertyEntry(rName), aDash(rDash) {}
+ XDashEntry(const XDash& rDash, const String& rName);
+ XDashEntry(const XDashEntry& rOther);
- void SetDash(const XDash& rDash) { aDash = rDash; }
- const XDash& GetDash() const { return aDash; }
+ const XDash& GetDash() const
+ {
+ return aDash;
+ }
};
// ------------------
// class XHatchEntry
// ------------------
-class XHatchEntry : public XPropertyEntry
+class SVX_DLLPUBLIC XHatchEntry : public XPropertyEntry
{
+private:
XHatch aHatch;
public:
- XHatchEntry(const XHatch& rHatch, const String& rName) :
- XPropertyEntry(rName), aHatch(rHatch) {}
+ XHatchEntry(const XHatch& rHatch, const String& rName);
+ XHatchEntry(const XHatchEntry& rOther);
- void SetHatch(const XHatch& rHatch) { aHatch = rHatch; }
- const XHatch& GetHatch() const { return aHatch; }
+ const XHatch& GetHatch() const
+ {
+ return aHatch;
+ }
};
// ---------------------
// class XGradientEntry
// ---------------------
-class XGradientEntry : public XPropertyEntry
+class SVX_DLLPUBLIC XGradientEntry : public XPropertyEntry
{
+private:
XGradient aGradient;
public:
- XGradientEntry(const XGradient& rGradient, const String& rName):
- XPropertyEntry(rName), aGradient(rGradient) {}
+ XGradientEntry(const XGradient& rGradient, const String& rName);
+ XGradientEntry(const XGradientEntry& rOther);
- void SetGradient(const XGradient& rGrad) { aGradient = rGrad; }
- const XGradient& GetGradient() const { return aGradient; }
+ const XGradient& GetGradient() const
+ {
+ return aGradient;
+ }
};
// ---------------------
// class XBitmapEntry
// ---------------------
-class XBitmapEntry : public XPropertyEntry
+class SVX_DLLPUBLIC XBitmapEntry : public XPropertyEntry
{
private:
GraphicObject maGraphicObject;
public:
- XBitmapEntry(const GraphicObject& rGraphicObject, const String& rName)
- : XPropertyEntry(rName),
- maGraphicObject(rGraphicObject)
- {
- }
-
- XBitmapEntry(const XBitmapEntry& rOther)
- : XPropertyEntry(rOther),
- maGraphicObject(rOther.maGraphicObject)
- {
- }
+ XBitmapEntry(const GraphicObject& rGraphicObject, const String& rName);
+ XBitmapEntry(const XBitmapEntry& rOther);
const GraphicObject& GetGraphicObject() const
{
return maGraphicObject;
}
-
- void SetGraphicObject(const GraphicObject& rGraphicObject)
- {
- maGraphicObject = rGraphicObject;
- }
};
// --------------------
@@ -217,58 +207,59 @@ protected:
bool mbListDirty;
bool mbEmbedInDocument;
- XPropertyList( XPropertyListType t, const String& rPath );
+ XPropertyList(XPropertyListType t, const String& rPath);
- virtual Bitmap CreateBitmapForUI( long nIndex ) = 0;
+ virtual Bitmap CreateBitmapForUI(long nIndex) = 0;
public:
- virtual ~XPropertyList();
-
- XPropertyListType Type() const { return meType; }
- long Count() const;
-
- void Insert( XPropertyEntry* pEntry, long nIndex = CONTAINER_APPEND );
- XPropertyEntry* Replace( XPropertyEntry* pEntry, long nIndex );
- XPropertyEntry* Remove( long nIndex );
-
- // Note: Get(long) & Get( String& ) are ambiguous
- XPropertyEntry* Get( long nIndex, sal_uInt16 nDummy ) const;
- long Get(const String& rName);
- Bitmap GetUiBitmap( long nIndex ) const;
-
- const String& GetName() const { return maName; }
- void SetName( const String& rString );
- const String& GetPath() const { return maPath; }
- void SetPath( const String& rString ) { maPath = rString; }
- bool IsDirty() const { return mbListDirty; }
- void SetDirty( bool bDirty = sal_True )
- { mbListDirty = bDirty; }
- bool IsEmbedInDocument() const { return mbEmbedInDocument; }
- void SetEmbedInDocument(bool b) { mbEmbedInDocument = b; }
+ virtual ~XPropertyList();
+
+ XPropertyListType Type() const { return meType; }
+ long Count() const;
+
+ void Insert(XPropertyEntry* pEntry, long nIndex = CONTAINER_APPEND);
+ XPropertyEntry* Replace(XPropertyEntry* pEntry, long nIndex);
+ XPropertyEntry* Remove(long nIndex);
+
+ XPropertyEntry* Get(long nIndex) const;
+ long GetIndex(const String& rName) const;
+ Bitmap GetUiBitmap(long nIndex) const;
+
+ const String& GetName() const { return maName; }
+ void SetName(const String& rString);
+
+ const String& GetPath() const { return maPath; }
+ void SetPath(const String& rString) { maPath = rString; }
+
+ bool IsDirty() const { return mbListDirty; }
+ void SetDirty(bool bDirty = true) { mbListDirty = bDirty; }
+
+ bool IsEmbedInDocument() const { return mbEmbedInDocument; }
+ void SetEmbedInDocument(bool b) { mbEmbedInDocument = b; }
static OUString GetDefaultExt(XPropertyListType t);
static OUString GetDefaultExtFilter(XPropertyListType t);
- OUString GetDefaultExt() const { return GetDefaultExt( meType ); }
+ OUString GetDefaultExt() const { return GetDefaultExt(meType); }
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >
createInstance() = 0;
- bool Load();
- bool LoadFrom( const ::com::sun::star::uno::Reference<
- ::com::sun::star::embed::XStorage > &xStorage,
- const OUString &rURL );
- bool Save();
- bool SaveTo ( const ::com::sun::star::uno::Reference<
- ::com::sun::star::embed::XStorage > &xStorage,
- const OUString &rURL,
- OUString *pOptName );
- virtual sal_Bool Create() = 0;
+ bool Load();
+ bool LoadFrom(const ::com::sun::star::uno::Reference<
+ ::com::sun::star::embed::XStorage > &xStorage,
+ const OUString &rURL);
+ bool Save();
+ bool SaveTo (const ::com::sun::star::uno::Reference<
+ ::com::sun::star::embed::XStorage > &xStorage,
+ const OUString &rURL,
+ OUString *pOptName);
+ virtual bool Create() = 0;
// Factory method for sub-classes
- static XPropertyListRef CreatePropertyList( XPropertyListType t,
- const String& rPath );
+ static XPropertyListRef CreatePropertyList(XPropertyListType t,
+ const String& rPath);
// as above but initializes name as expected
- static XPropertyListRef CreatePropertyListFromURL( XPropertyListType t,
- const OUString & rUrl );
+ static XPropertyListRef CreatePropertyListFromURL(XPropertyListType t,
+ const OUString & rUrl);
// helper accessors
inline XDashListRef AsDashList();
@@ -286,21 +277,20 @@ public:
class SVX_DLLPUBLIC XColorList : public XPropertyList
{
protected:
- virtual Bitmap CreateBitmapForUI( long nIndex );
+ virtual Bitmap CreateBitmapForUI(long nIndex);
public:
- explicit XColorList( const String& rPath )
- : XPropertyList( XCOLOR_LIST, rPath ) {}
+ explicit XColorList(const String& rPath)
+ : XPropertyList(XCOLOR_LIST, rPath) {}
using XPropertyList::Replace;
using XPropertyList::Remove;
- using XPropertyList::Get;
- XColorEntry* Replace(long nIndex, XColorEntry* pEntry );
- XColorEntry* Remove(long nIndex);
- XColorEntry* GetColor(long nIndex) const;
+ XColorEntry* Replace(long nIndex, XColorEntry* pEntry);
+ XColorEntry* Remove(long nIndex);
+ XColorEntry* GetColor(long nIndex) const;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createInstance();
- virtual sal_Bool Create();
+ virtual bool Create();
static XColorListRef CreateStdColorList();
static XColorListRef GetStdColorList(); // returns a singleton
@@ -309,7 +299,6 @@ public:
// -------------------
// class XLineEndList
// -------------------
-class impXLineEndList;
class SVX_DLLPUBLIC XLineEndList : public XPropertyList
{
@@ -317,22 +306,20 @@ protected:
virtual Bitmap CreateBitmapForUI(long nIndex);
public:
- explicit XLineEndList( const String& rPath );
- virtual ~XLineEndList();
+ explicit XLineEndList(const String& rPath);
+ virtual ~XLineEndList();
using XPropertyList::Remove;
XLineEndEntry* Remove(long nIndex);
- using XPropertyList::Get;
XLineEndEntry* GetLineEnd(long nIndex) const;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createInstance();
- virtual sal_Bool Create();
+ virtual bool Create();
};
// -------------------
// class XDashList
// -------------------
-class impXDashList;
class SVX_DLLPUBLIC XDashList : public XPropertyList
{
@@ -346,18 +333,17 @@ protected:
virtual Bitmap CreateBitmapForUI(long nIndex);
public:
- explicit XDashList(const String& rPath);
- virtual ~XDashList();
+ explicit XDashList(const String& rPath);
+ virtual ~XDashList();
using XPropertyList::Replace;
- XDashEntry* Replace(XDashEntry* pEntry, long nIndex);
+ XDashEntry* Replace(XDashEntry* pEntry, long nIndex);
using XPropertyList::Remove;
- XDashEntry* Remove(long nIndex);
- using XPropertyList::Get;
- XDashEntry* GetDash(long nIndex) const;
+ XDashEntry* Remove(long nIndex);
+ XDashEntry* GetDash(long nIndex) const;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createInstance();
- virtual sal_Bool Create();
+ virtual bool Create();
// Special call to get a bitmap for the solid line representation. It
// creates a bitmap fitting in size and style to the ones you get by
@@ -373,7 +359,6 @@ public:
// -------------------
// class XHatchList
// -------------------
-class impXHatchList;
class SVX_DLLPUBLIC XHatchList : public XPropertyList
{
@@ -381,43 +366,39 @@ protected:
virtual Bitmap CreateBitmapForUI(long nIndex);
public:
- explicit XHatchList( const String& rPath );
+ explicit XHatchList(const String& rPath);
virtual ~XHatchList();
using XPropertyList::Replace;
XHatchEntry* Replace(XHatchEntry* pEntry, long nIndex);
using XPropertyList::Remove;
XHatchEntry* Remove(long nIndex);
- using XPropertyList::Get;
XHatchEntry* GetHatch(long nIndex) const;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createInstance();
- virtual sal_Bool Create();
+ virtual bool Create();
};
// -------------------
// class XGradientList
// -------------------
-class impXGradientList;
-
class SVX_DLLPUBLIC XGradientList : public XPropertyList
{
protected:
virtual Bitmap CreateBitmapForUI(long nIndex);
public:
- explicit XGradientList( const String& rPath );
- virtual ~XGradientList();
+ explicit XGradientList(const String& rPath);
+ virtual ~XGradientList();
using XPropertyList::Replace;
- XGradientEntry* Replace(XGradientEntry* pEntry, long nIndex);
+ XGradientEntry* Replace(XGradientEntry* pEntry, long nIndex);
using XPropertyList::Remove;
- XGradientEntry* Remove(long nIndex);
- using XPropertyList::Get;
- XGradientEntry* GetGradient(long nIndex) const;
+ XGradientEntry* Remove(long nIndex);
+ XGradientEntry* GetGradient(long nIndex) const;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createInstance();
- virtual sal_Bool Create();
+ virtual bool Create();
};
// -------------------
@@ -427,20 +408,19 @@ public:
class SVX_DLLPUBLIC XBitmapList : public XPropertyList
{
protected:
- virtual Bitmap CreateBitmapForUI( long nIndex );
+ virtual Bitmap CreateBitmapForUI(long nIndex);
public:
- explicit XBitmapList( const String& rPath )
- : XPropertyList( XBITMAP_LIST, rPath ) {}
+ explicit XBitmapList(const String& rPath)
+ : XPropertyList(XBITMAP_LIST, rPath) {}
using XPropertyList::Replace;
using XPropertyList::Remove;
- XBitmapEntry* Remove(long nIndex);
- using XPropertyList::Get;
- XBitmapEntry* GetBitmap(long nIndex) const;
+ XBitmapEntry* Remove(long nIndex);
+ XBitmapEntry* GetBitmap(long nIndex) const;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > createInstance();
- virtual sal_Bool Create();
+ virtual bool Create();
};
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index a653b26..18d5671 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -934,18 +934,18 @@ void ColorLB::Fill( const XColorListRef &pColorTab )
/************************************************************************/
-void ColorLB::Append( XColorEntry* pEntry, Bitmap* )
+void ColorLB::Append( const XColorEntry& rEntry )
{
- InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ InsertEntry( rEntry.GetColor(), rEntry.GetName() );
AdaptDropDownLineCountToMaximum();
}
/************************************************************************/
-void ColorLB::Modify( XColorEntry* pEntry, sal_uInt16 nPos, Bitmap* )
+void ColorLB::Modify( const XColorEntry& rEntry, sal_uInt16 nPos )
{
RemoveEntry( nPos );
- InsertEntry( pEntry->GetColor(), pEntry->GetName(), nPos );
+ InsertEntry( rEntry.GetColor(), rEntry.GetName(), nPos );
}
// Fills the Listbox with color and strings
@@ -1002,25 +1002,34 @@ void HatchingLB::Fill( const XHatchListRef &pList )
/************************************************************************/
-void HatchingLB::Append( XHatchEntry* pEntry, Bitmap* pBmp )
+void HatchingLB::Append( const XHatchEntry& rEntry, const Bitmap& rBitmap )
{
- if( pBmp )
- InsertEntry( pEntry->GetName(), *pBmp );
+ if(!rBitmap.IsEmpty())
+ {
+ InsertEntry( rEntry.GetName(), rBitmap );
+ }
else
- InsertEntry( pEntry->GetName() );
+ {
+ InsertEntry( rEntry.GetName() );
+ }
+
AdaptDropDownLineCountToMaximum();
}
/************************************************************************/
-void HatchingLB::Modify( XHatchEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp )
+void HatchingLB::Modify( const XHatchEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap )
{
RemoveEntry( nPos );
- if( pBmp )
- InsertEntry( pEntry->GetName(), *pBmp, nPos );
+ if( !rBitmap.IsEmpty() )
+ {
+ InsertEntry( rEntry.GetName(), rBitmap, nPos );
+ }
else
- InsertEntry( pEntry->GetName(), nPos );
+ {
+ InsertEntry( rEntry.GetName(), nPos );
+ }
}
// Fills the listbox (provisional) with strings
@@ -1099,25 +1108,34 @@ void GradientLB::Fill( const XGradientListRef &pList )
/************************************************************************/
-void GradientLB::Append( XGradientEntry* pEntry, Bitmap* pBmp )
+void GradientLB::Append( const XGradientEntry& rEntry, const Bitmap& rBitmap )
{
- if( pBmp )
- InsertEntry( pEntry->GetName(), *pBmp );
+ if(!rBitmap.IsEmpty())
+ {
+ InsertEntry( rEntry.GetName(), rBitmap );
+ }
else
- InsertEntry( pEntry->GetName() );
+ {
+ InsertEntry( rEntry.GetName() );
+ }
+
AdaptDropDownLineCountToMaximum();
}
/************************************************************************/
-void GradientLB::Modify( XGradientEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp )
+void GradientLB::Modify( const XGradientEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap )
{
RemoveEntry( nPos );
- if( pBmp )
- InsertEntry( pEntry->GetName(), *pBmp, nPos );
+ if(!rBitmap.IsEmpty())
+ {
+ InsertEntry( rEntry.GetName(), rBitmap, nPos );
+ }
else
- InsertEntry( pEntry->GetName(), nPos );
+ {
+ InsertEntry( rEntry.GetName(), nPos );
+ }
}
/************************************************************************/
@@ -1261,11 +1279,12 @@ void BitmapLB::Fill( const XBitmapListRef &pList )
/************************************************************************/
-void BitmapLB::Append(const Size& rSize, const XBitmapEntry& rEntry, BitmapEx* pBmpEx)
+void BitmapLB::Append(const Size& rSize, const XBitmapEntry& rEntry)
{
- if(pBmpEx)
+ maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
+
+ if(!maBitmapEx.IsEmpty())
{
- maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
formatBitmapExToSize(maBitmapEx, rSize);
InsertEntry(rEntry.GetName(), maBitmapEx);
}
@@ -1279,13 +1298,13 @@ void BitmapLB::Append(const Size& rSize, const XBitmapEntry& rEntry, BitmapEx* p
/************************************************************************/
-void BitmapLB::Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos, BitmapEx* pBmpEx)
+void BitmapLB::Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 nPos)
{
RemoveEntry(nPos);
+ maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
- if(pBmpEx)
+ if(!maBitmapEx.IsEmpty())
{
- maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
formatBitmapExToSize(maBitmapEx, rSize);
InsertEntry(rEntry.GetName(), maBitmapEx, nPos);
}
@@ -1405,25 +1424,34 @@ void LineLB::Fill( const XDashListRef &pList )
/************************************************************************/
-void LineLB::Append( XDashEntry* pEntry, const Bitmap* pBmp )
+void LineLB::Append( const XDashEntry& rEntry, const Bitmap& rBitmap )
{
- if( pBmp )
- InsertEntry( pEntry->GetName(), *pBmp );
+ if(!rBitmap.IsEmpty())
+ {
+ InsertEntry( rEntry.GetName(), rBitmap );
+ }
else
- InsertEntry( pEntry->GetName() );
+ {
+ InsertEntry( rEntry.GetName() );
+ }
+
AdaptDropDownLineCountToMaximum();
}
/************************************************************************/
-void LineLB::Modify( XDashEntry* pEntry, sal_uInt16 nPos, const Bitmap* pBmp )
+void LineLB::Modify( const XDashEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap )
{
RemoveEntry( nPos );
- if( pBmp )
- InsertEntry( pEntry->GetName(), *pBmp, nPos );
+ if(!rBitmap.IsEmpty())
+ {
+ InsertEntry( rEntry.GetName(), rBitmap, nPos );
+ }
else
- InsertEntry( pEntry->GetName(), nPos );
+ {
+ InsertEntry( rEntry.GetName(), nPos );
+ }
}
// Fills the listbox (provisional) with strings
@@ -1444,7 +1472,7 @@ LineEndLB::~LineEndLB(void)
{
}
-void LineEndLB::Fill( const XLineEndListRef &pList, sal_Bool bStart )
+void LineEndLB::Fill( const XLineEndListRef &pList, bool bStart )
{
if( !pList.is() )
return;
@@ -1478,43 +1506,49 @@ void LineEndLB::Fill( const XLineEndListRef &pList, sal_Bool bStart )
/************************************************************************/
-void LineEndLB::Append( XLineEndEntry* pEntry, const Bitmap* pBmp, sal_Bool bStart )
+void LineEndLB::Append( const XLineEndEntry& rEntry, const Bitmap& rBitmap, bool bStart )
{
- if( pBmp )
+ if(!rBitmap.IsEmpty())
{
VirtualDevice aVD;
- Size aBmpSize( pBmp->GetSizePixel() );
+ const Size aBmpSize(rBitmap.GetSizePixel());
- aVD.SetOutputSizePixel( aBmpSize, sal_False );
- aVD.DrawBitmap( Point(), *pBmp );
- InsertEntry( pEntry->GetName(),
- aVD.GetBitmap( bStart ? Point() : Point( aBmpSize.Width() / 2, 0 ),
- Size( aBmpSize.Width() / 2, aBmpSize.Height() ) ) );
+ aVD.SetOutputSizePixel(aBmpSize, false);
+ aVD.DrawBitmap(Point(), rBitmap);
+ InsertEntry(
+ rEntry.GetName(),
+ aVD.GetBitmap(bStart ? Point() : Point(aBmpSize.Width() / 2, 0 ), Size(aBmpSize.Width() / 2, aBmpSize.Height())));
}
else
- InsertEntry( pEntry->GetName() );
+ {
+ InsertEntry(rEntry.GetName());
+ }
+
AdaptDropDownLineCountToMaximum();
}
/************************************************************************/
-void LineEndLB::Modify( XLineEndEntry* pEntry, sal_uInt16 nPos, const Bitmap* pBmp, sal_Bool bStart )
+void LineEndLB::Modify( const XLineEndEntry& rEntry, sal_uInt16 nPos, const Bitmap& rBitmap, bool bStart )
{
RemoveEntry( nPos );
- if( pBmp )
+ if(!rBitmap.IsEmpty())
{
VirtualDevice aVD;
- Size aBmpSize( pBmp->GetSizePixel() );
-
- aVD.SetOutputSizePixel( aBmpSize, sal_False );
- aVD.DrawBitmap( Point(), *pBmp );
- InsertEntry( pEntry->GetName(),
- aVD.GetBitmap( bStart ? Point() : Point( aBmpSize.Width() / 2, 0 ),
- Size( aBmpSize.Width() / 2, aBmpSize.Height() ) ), nPos );
+ const Size aBmpSize(rBitmap.GetSizePixel());
+
+ aVD.SetOutputSizePixel(aBmpSize, false);
+ aVD.DrawBitmap(Point(), rBitmap);
+ InsertEntry(
+ rEntry.GetName(),
+ aVD.GetBitmap(bStart ? Point() : Point( aBmpSize.Width() / 2, 0 ), Size( aBmpSize.Width() / 2, aBmpSize.Height())),
+ nPos);
}
else
- InsertEntry( pEntry->GetName(), nPos );
+ {
+ InsertEntry(rEntry.GetName(), nPos);
+ }
}
//////////////////////////////////////////////////////////////////////////////
diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx
index c9b9603..ededdfd 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -87,7 +87,7 @@ SvxUnoXPropertyTable::~SvxUnoXPropertyTable() throw()
XPropertyEntry* SvxUnoXPropertyTable::get( long index ) const
{
if( mpList )
- return mpList->Get( index, 0 );
+ return mpList->Get(index);
else
return NULL;
}
diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx
index 605f092..82baea9 100644
--- a/svx/source/unodraw/unoctabl.cxx
+++ b/svx/source/unodraw/unoctabl.cxx
@@ -135,7 +135,7 @@ void SAL_CALL SvxUnoColorTable::insertByName( const OUString& aName, const uno::
void SAL_CALL SvxUnoColorTable::removeByName( const OUString& Name )
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- long nIndex = pList.is() ? pList->Get( Name ) : -1;
+ long nIndex = pList.is() ? pList->GetIndex( Name ) : -1;
if( nIndex == -1 )
throw container::NoSuchElementException();
@@ -150,7 +150,7 @@ void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno:
if( !(aElement >>= nColor) )
throw lang::IllegalArgumentException();
- long nIndex = pList.is() ? pList->Get( aName ) : -1;
+ long nIndex = pList.is() ? pList->GetIndex( aName ) : -1;
if( nIndex == -1 )
throw container::NoSuchElementException();
@@ -162,7 +162,7 @@ void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno:
uno::Any SAL_CALL SvxUnoColorTable::getByName( const OUString& aName )
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- long nIndex = pList.is() ? pList->Get( aName ) : -1;
+ long nIndex = pList.is() ? pList->GetIndex( aName ) : -1;
if( nIndex == -1 )
throw container::NoSuchElementException();
@@ -190,7 +190,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoColorTable::getElementNames()
sal_Bool SAL_CALL SvxUnoColorTable::hasByName( const OUString& aName )
throw( uno::RuntimeException )
{
- long nIndex = pList.is() ? pList->Get( aName ) : -1;
+ long nIndex = pList.is() ? pList->GetIndex( aName ) : -1;
return nIndex != -1;
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index c5199e6..dffbd73 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1497,9 +1497,9 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN
if( !pBitmapList.is() )
return sal_False;
- long nPos = pBitmapList->Get(aStrName);
+ long nPos = pBitmapList->GetIndex(aStrName);
if( nPos == -1 )
- return sal_False;
+ return false;
XBitmapEntry* pEntry = pBitmapList->GetBitmap( nPos );
XFillBitmapItem aBmpItem;
@@ -1516,9 +1516,9 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN
if( !pGradientList.is() )
return sal_False;
- long nPos = pGradientList->Get(aStrName);
+ long nPos = pGradientList->GetIndex(aStrName);
if( nPos == -1 )
- return sal_False;
+ return false;
XGradientEntry* pEntry = pGradientList->GetGradient( nPos );
XFillGradientItem aGrdItem;
@@ -1535,9 +1535,9 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN
if( !pHatchList.is() )
return sal_False;
- long nPos = pHatchList->Get(aStrName);
+ long nPos = pHatchList->GetIndex(aStrName);
if( nPos == -1 )
- return sal_False;
+ return false;
XHatchEntry* pEntry = pHatchList->GetHatch( nPos );
XFillHatchItem aHatchItem;
@@ -1555,9 +1555,9 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN
if( !pLineEndList.is() )
return sal_False;
- long nPos = pLineEndList->Get(aStrName);
+ long nPos = pLineEndList->GetIndex(aStrName);
if( nPos == -1 )
- return sal_False;
+ return false;
XLineEndEntry* pEntry = pLineEndList->GetLineEnd( nPos );
if( XATTR_LINEEND == nWID )
@@ -1584,11 +1584,11 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN
XDashListRef pDashList = pModel->GetDashList();
if( !pDashList.is() )
- return sal_False;
+ return false;
- long nPos = pDashList->Get(aStrName);
+ long nPos = pDashList->GetIndex(aStrName);
if( nPos == -1 )
- return sal_False;
+ return false;
XDashEntry* pEntry = pDashList->GetDash( nPos );
XLineDashItem aDashItem;
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 2d26c8d..f24d812 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -233,7 +233,7 @@ String NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_uIn
int nIndex;
for( nIndex = 0; nIndex < nCount; nIndex++ )
{
- XPropertyEntry* pEntry = pDefaults->Get( nIndex, 0 );
+ XPropertyEntry* pEntry = pDefaults->Get(nIndex);
if( pEntry )
{
bool bFound = false;
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index 462bae6..3734e4a 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -298,11 +298,11 @@ Bitmap createHistorical8x8FromArray(const sal_uInt16* pArray, Color aColorPix, C
{
if(pArray[(a * 8) + b])
{
- pContent->SetPixelIndex(b, a, 1);
+ pContent->SetPixelIndex(a, b, 1);
}
else
{
- pContent->SetPixelIndex(b, a, 0);
+ pContent->SetPixelIndex(a, b, 0);
}
}
}
diff --git a/svx/source/xoutdev/xtabbtmp.cxx b/svx/source/xoutdev/xtabbtmp.cxx
index 328366a..4cf5fd4 100644
--- a/svx/source/xoutdev/xtabbtmp.cxx
+++ b/svx/source/xoutdev/xtabbtmp.cxx
@@ -38,7 +38,7 @@ XBitmapEntry* XBitmapList::Remove(long nIndex)
XBitmapEntry* XBitmapList::GetBitmap(long nIndex) const
{
- return (XBitmapEntry*) XPropertyList::Get(nIndex, 0);
+ return (XBitmapEntry*) XPropertyList::Get(nIndex);
}
uno::Reference< container::XNameContainer > XBitmapList::createInstance()
@@ -47,17 +47,8 @@ uno::Reference< container::XNameContainer > XBitmapList::createInstance()
SvxUnoXBitmapTable_createInstance( this ), uno::UNO_QUERY );
}
-sal_Bool XBitmapList::Create()
+bool XBitmapList::Create()
{
- //-----------------------
- // 00 01 02 03 04 05 06 07
- // 08 09 10 11 12 13 14 15
- // 16 17 18 19 20 21 22 23
- // 24 25 26 27 28 29 30 31
- // 32 33 34 35 36 37 38 39
- // 40 41 42 43 44 45 46 47
- // 48 49 50 51 52 53 54 55
- // 56 57 58 59 60 61 62 63
String aStr(SVX_RES(RID_SVXSTR_BITMAP));
sal_uInt16 aArray[64];
Bitmap aBitmap;
diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx
index b4628c6..ef81ea8 100644
--- a/svx/source/xoutdev/xtabcolr.cxx
+++ b/svx/source/xoutdev/xtabcolr.cxx
@@ -53,7 +53,7 @@ XColorEntry* XColorList::Remove(long nIndex)
XColorEntry* XColorList::GetColor(long nIndex) const
{
- return (XColorEntry*) XPropertyList::Get(nIndex, 0);
+ return (XColorEntry*) XPropertyList::Get(nIndex);
}
uno::Reference< container::XNameContainer > XColorList::createInstance()
@@ -63,7 +63,7 @@ uno::Reference< container::XNameContainer > XColorList::createInstance()
uno::UNO_QUERY );
}
-sal_Bool XColorList::Create()
+bool XColorList::Create()
{
XubString aStr;
xub_StrLen nLen;
diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx
index 1c4d707..93ada53 100644
--- a/svx/source/xoutdev/xtabdash.cxx
+++ b/svx/source/xoutdev/xtabdash.cxx
@@ -57,7 +57,7 @@ XDashEntry* XDashList::Remove(long nIndex)
XDashEntry* XDashList::GetDash(long nIndex) const
{
- return (XDashEntry*) XPropertyList::Get(nIndex, 0);
+ return (XDashEntry*) XPropertyList::Get(nIndex);
}
uno::Reference< container::XNameContainer > XDashList::createInstance()
@@ -66,7 +66,7 @@ uno::Reference< container::XNameContainer > XDashList::createInstance()
SvxUnoXDashTable_createInstance( this ), uno::UNO_QUERY );
}
-sal_Bool XDashList::Create()
+bool XDashList::Create()
{
XubString aStr( SVX_RES( RID_SVXSTR_LINESTYLE ) );
xub_StrLen nLen;
@@ -79,7 +79,7 @@ sal_Bool XDashList::Create()
aStr.SetChar(nLen, sal_Unicode('3'));
Insert(new XDashEntry(XDash(XDASH_RECT,2, 50,3,250,120),aStr));
- return sal_True;
+ return true;
}
Bitmap XDashList::ImpCreateBitmapForXDash(const XDash* pDash)
diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx
index 73ff6ad..559f66b 100644
--- a/svx/source/xoutdev/xtabgrdt.cxx
+++ b/svx/source/xoutdev/xtabgrdt.cxx
@@ -55,7 +55,7 @@ XGradientEntry* XGradientList::Remove(long nIndex)
XGradientEntry* XGradientList::GetGradient(long nIndex) const
{
- return( (XGradientEntry*) XPropertyList::Get( nIndex, 0 ) );
+ return( (XGradientEntry*) XPropertyList::Get( nIndex ) );
}
uno::Reference< container::XNameContainer > XGradientList::createInstance()
@@ -65,7 +65,7 @@ uno::Reference< container::XNameContainer > XGradientList::createInstance()
uno::UNO_QUERY );
}
-sal_Bool XGradientList::Create()
+bool XGradientList::Create()
{
XubString aStr( SVX_RES( RID_SVXSTR_GRADIENT ) );
xub_StrLen nLen;
@@ -84,7 +84,7 @@ sal_Bool XGradientList::Create()
aStr.SetChar(nLen, sal_Unicode('6'));
Insert(new XGradientEntry(XGradient(RGB_Color(COL_MAGENTA),RGB_Color(COL_YELLOW ),XGRAD_RECT , 1900,60,60,50,100,100),aStr));
- return( sal_True );
+ return true;
}
Bitmap XGradientList::CreateBitmapForUI( long nIndex )
diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx
index 72033e3..8235cab 100644
--- a/svx/source/xoutdev/xtabhtch.cxx
+++ b/svx/source/xoutdev/xtabhtch.cxx
@@ -55,7 +55,7 @@ XHatchEntry* XHatchList::Remove(long nIndex)
XHatchEntry* XHatchList::GetHatch(long nIndex) const
{
- return (XHatchEntry*) XPropertyList::Get(nIndex, 0);
+ return (XHatchEntry*) XPropertyList::Get(nIndex);
}
uno::Reference< container::XNameContainer > XHatchList::createInstance()
@@ -64,7 +64,7 @@ uno::Reference< container::XNameContainer > XHatchList::createInstance()
SvxUnoXHatchTable_createInstance( this ), uno::UNO_QUERY );
}
-sal_Bool XHatchList::Create()
+bool XHatchList::Create()
{
XubString aStr( SVX_RES( RID_SVXSTR_HATCH ) );
xub_StrLen nLen;
@@ -77,7 +77,7 @@ sal_Bool XHatchList::Create()
aStr.SetChar(nLen, sal_Unicode('3'));
Insert(new XHatchEntry(XHatch(RGB_Color(COL_BLUE ),XHATCH_TRIPLE,120, 0),aStr));
- return( sal_True );
+ return true;
}
Bitmap XHatchList::CreateBitmapForUI( long nIndex )
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index 99278c5..5fd2d5e 100644
--- a/svx/source/xoutdev/xtable.cxx
+++ b/svx/source/xoutdev/xtable.cxx
@@ -37,6 +37,96 @@ Color RGB_Color( ColorData nColorName )
return aRGBColor;
}
+//////////////////////////////////////////////////////////////////////////////
+// class XColorEntry
+
+XColorEntry::XColorEntry(const Color& rColor, const String& rName)
+: XPropertyEntry(rName),
+ aColor(rColor)
+{
+}
+
+XColorEntry::XColorEntry(const XColorEntry& rOther)
+: XPropertyEntry(rOther),
+aColor(rOther.aColor)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// class XLineEndEntry
+
+XLineEndEntry::XLineEndEntry(const basegfx::B2DPolyPolygon& rB2DPolyPolygon, const String& rName)
+: XPropertyEntry(rName),
+ aB2DPolyPolygon(rB2DPolyPolygon)
+{
+}
+
+XLineEndEntry::XLineEndEntry(const XLineEndEntry& rOther)
+: XPropertyEntry(rOther),
+ aB2DPolyPolygon(rOther.aB2DPolyPolygon)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// class XDashEntry
+
+XDashEntry::XDashEntry(const XDash& rDash, const String& rName)
+: XPropertyEntry(rName),
+ aDash(rDash)
+{
+}
+
+XDashEntry::XDashEntry(const XDashEntry& rOther)
+: XPropertyEntry(rOther),
+aDash(rOther.aDash)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// class XHatchEntry
+
+XHatchEntry::XHatchEntry(const XHatch& rHatch, const String& rName)
+: XPropertyEntry(rName),
+ aHatch(rHatch)
+{
+}
+
+XHatchEntry::XHatchEntry(const XHatchEntry& rOther)
+: XPropertyEntry(rOther),
+ aHatch(rOther.aHatch)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// class XGradientEntry
+
+XGradientEntry::XGradientEntry(const XGradient& rGradient, const String& rName)
+: XPropertyEntry(rName),
+ aGradient(rGradient)
+{
+}
+
+XGradientEntry::XGradientEntry(const XGradientEntry& rOther)
+: XPropertyEntry(rOther),
+ aGradient(rOther.aGradient)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// class XBitmapEntry
+
+XBitmapEntry::XBitmapEntry(const GraphicObject& rGraphicObject, const String& rName)
+: XPropertyEntry(rName),
+ maGraphicObject(rGraphicObject)
+{
+}
+
+XBitmapEntry::XBitmapEntry(const XBitmapEntry& rOther)
+: XPropertyEntry(rOther),
+ maGraphicObject(rOther.maGraphicObject)
+{
+}
+
// static int count = 0;
XPropertyList::XPropertyList(
@@ -70,7 +160,7 @@ long XPropertyList::Count() const
return maList.size();
}
-XPropertyEntry* XPropertyList::Get( long nIndex, sal_uInt16 /*nDummy*/) const
+XPropertyEntry* XPropertyList::Get( long nIndex ) const
{
if( mbListDirty )
{
@@ -80,12 +170,12 @@ XPropertyEntry* XPropertyList::Get( long nIndex, sal_uInt16 /*nDummy*/) const
return ( (size_t)nIndex < maList.size() ) ? maList[ nIndex ] : NULL;
}
-long XPropertyList::Get(const XubString& rName)
+long XPropertyList::GetIndex(const XubString& rName) const
{
if( mbListDirty )
{
- if( !Load() )
- Create();
+ if( !( (XPropertyList*) this )->Load() )
+ ( (XPropertyList*) this )->Create();
}
for( long i = 0, n = maList.size(); i < n; ++i ) {
diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx
index 4accd71..d5bc789 100644
--- a/svx/source/xoutdev/xtablend.cxx
+++ b/svx/source/xoutdev/xtablend.cxx
@@ -49,7 +49,7 @@ XLineEndEntry* XLineEndList::Remove(long nIndex)
XLineEndEntry* XLineEndList::GetLineEnd(long nIndex) const
{
- return (XLineEndEntry*) XPropertyList::Get(nIndex, 0);
+ return (XLineEndEntry*) XPropertyList::Get(nIndex);
}
uno::Reference< container::XNameContainer > XLineEndList::createInstance()
@@ -58,7 +58,7 @@ uno::Reference< container::XNameContainer > XLineEndList::createInstance()
SvxUnoXLineEndTable_createInstance( this ), uno::UNO_QUERY );
}
-sal_Bool XLineEndList::Create()
+bool XLineEndList::Create()
{
basegfx::B2DPolygon aTriangle;
aTriangle.append(basegfx::B2DPoint(10.0, 0.0));
@@ -78,7 +78,7 @@ sal_Bool XLineEndList::Create()
basegfx::B2DPolygon aCircle(basegfx::tools::createPolygonFromCircle(basegfx::B2DPoint(0.0, 0.0), 100.0));
Insert( new XLineEndEntry( basegfx::B2DPolyPolygon(aCircle), SVX_RESSTR( RID_SVXSTR_CIRCLE ) ) );
- return sal_True;
+ return true;
}
Bitmap XLineEndList::CreateBitmapForUI( long nIndex )
More information about the Libreoffice-commits
mailing list