diff options
author | Krisztian Pinter <pin.terminator@gmail.com> | 2014-06-16 21:52:12 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2014-09-17 10:19:29 +0200 |
commit | 5f27596bed3bd155a321b66650d04226e6f2d1ee (patch) | |
tree | 96887f0289c37ed00cd84413307feba8e68b0bb6 /svx | |
parent | 079c861f08d27aa8b6368aebc37f235979049286 (diff) |
Add writer document font colors to color palettes
Change-Id: If3fedc45586eee068c40e92da87d5d550a456a64
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/colorwindow.hxx | 1 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/svx/source/tbxctrls/colorwindow.hxx b/svx/source/tbxctrls/colorwindow.hxx index 62ca706d48c3..85d0a036bfb3 100644 --- a/svx/source/tbxctrls/colorwindow.hxx +++ b/svx/source/tbxctrls/colorwindow.hxx @@ -34,6 +34,7 @@ class SvxColorWindow_Impl : public SfxPopupWindow private: const sal_uInt16 theSlotId; SvxColorValueSet aColorSet; + SvxColorValueSet aDocColorSet; OUString maCommand; Link maSelectedLink; diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 288df13186ef..ec2355fe8109 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1009,7 +1009,8 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand, Window* pParentWindow ): SfxPopupWindow( nSlotId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ), theSlotId( nSlotId ), - aColorSet( this, WinBits( WB_ITEMBORDER | WB_NAMEFIELD | WB_3DLOOK | WB_NO_DIRECTSELECT) ), + aColorSet ( this, WinBits( WB_ITEMBORDER | WB_NAMEFIELD | WB_3DLOOK | WB_NO_DIRECTSELECT) ), + aDocColorSet( this, WinBits( WB_ITEMBORDER | WB_NAMEFIELD | WB_3DLOOK | WB_NO_DIRECTSELECT) ), maCommand( rCommand ) { @@ -1018,8 +1019,20 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand, XColorListRef pColorList; if ( pDocSh ) + { if ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) ) pColorList = ( (SvxColorListItem*)pItem )->GetColorList(); +//-------- Add doc colors to palette + XColorEntry* pEntry; + std::vector<Color> aColors = pDocSh->GetDocColors(); + for( unsigned int i = 0; i < aColors.size(); ++i ) + { + pEntry = new XColorEntry( aColors[i], + "Document Color " + OUString::number(i) ); + pColorList->Insert( pEntry, pColorList->Count() ); + } +//--------- + } if ( !pColorList.is() ) pColorList = XColorList::CreateStdColorList(); |