summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-12-21 13:42:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-21 15:55:46 +0100
commit25298930bc86d1a449a7e5b139d65e49f695f8c1 (patch)
treeb3f28ef6b18b12347694a637b6785ecb5eedc1fe /cui/source
parent1edaee2f03bce0efa409c592919458658d0aa751 (diff)
loplugin:flatten in canvas..cui
Change-Id: I208767eaa60d913fe2882403f1f9351eb08256f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/customize/acccfg.cxx29
-rw-r--r--cui/source/customize/cfg.cxx28
-rw-r--r--cui/source/options/cfgchart.cxx59
-rw-r--r--cui/source/options/treeopt.cxx36
-rw-r--r--cui/source/tabpages/backgrnd.cxx52
-rw-r--r--cui/source/tabpages/swpossizetabpage.cxx97
-rw-r--r--cui/source/tabpages/textattr.cxx44
-rw-r--r--cui/source/tabpages/themepage.cxx64
8 files changed, 203 insertions, 206 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index b6ff3af0475c..398ca509dbd7 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -797,23 +797,24 @@ IMPL_LINK(SfxAcceleratorConfigPage, KeyInputHdl, const KeyEvent&, rKey, bool)
sal_uInt16 nMod1 = aCode1.GetModifier();
// is it related to our list box ?
- if ((nCode1 != KEY_DOWN) && (nCode1 != KEY_UP) && (nCode1 != KEY_LEFT) && (nCode1 != KEY_RIGHT)
- && (nCode1 != KEY_PAGEUP) && (nCode1 != KEY_PAGEDOWN))
+ if ((nCode1 == KEY_DOWN) || (nCode1 == KEY_UP) || (nCode1 == KEY_LEFT) || (nCode1 == KEY_RIGHT)
+ || (nCode1 == KEY_PAGEUP) || (nCode1 == KEY_PAGEDOWN))
+ // no - handle it as normal dialog input
+ return false;
+
+ for (int i = 0, nCount = m_xEntriesBox->n_children(); i < nCount; ++i)
{
- for (int i = 0, nCount = m_xEntriesBox->n_children(); i < nCount; ++i)
+ TAccInfo* pUserData = reinterpret_cast<TAccInfo*>(m_xEntriesBox->get_id(i).toInt64());
+ if (pUserData)
{
- TAccInfo* pUserData = reinterpret_cast<TAccInfo*>(m_xEntriesBox->get_id(i).toInt64());
- if (pUserData)
- {
- sal_uInt16 nCode2 = pUserData->m_aKey.GetCode();
- sal_uInt16 nMod2 = pUserData->m_aKey.GetModifier();
+ sal_uInt16 nCode2 = pUserData->m_aKey.GetCode();
+ sal_uInt16 nMod2 = pUserData->m_aKey.GetModifier();
- if (nCode1 == nCode2 && nMod1 == nMod2)
- {
- m_xEntriesBox->select(i);
- m_xEntriesBox->scroll_to_row(i);
- return true;
- }
+ if (nCode1 == nCode2 && nMod1 == nMod2)
+ {
+ m_xEntriesBox->select(i);
+ m_xEntriesBox->scroll_to_row(i);
+ return true;
}
}
}
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 6b975317bc4f..e083d4bd438e 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1722,27 +1722,25 @@ bool SvxConfigPage::MoveEntryData(int nSourceEntry, int nTargetEntry)
SvxConfigEntry* pTargetData =
reinterpret_cast<SvxConfigEntry*>(m_xContentsListBox->get_id(nTargetEntry).toInt64());
- if ( pSourceData != nullptr && pTargetData != nullptr )
- {
- // remove the source entry from our list
- SvxConfigPageHelper::RemoveEntry( pEntries, pSourceData );
+ if ( pSourceData == nullptr || pTargetData == nullptr )
+ return false;
- SvxEntries::iterator iter = pEntries->begin();
- SvxEntries::const_iterator end = pEntries->end();
+ // remove the source entry from our list
+ SvxConfigPageHelper::RemoveEntry( pEntries, pSourceData );
- // advance the iterator to the position of the target entry
- while (*iter != pTargetData && ++iter != end) ;
+ SvxEntries::iterator iter = pEntries->begin();
+ SvxEntries::const_iterator end = pEntries->end();
- // insert the source entry at the position after the target
- pEntries->insert( ++iter, pSourceData );
+ // advance the iterator to the position of the target entry
+ while (*iter != pTargetData && ++iter != end) ;
- GetSaveInData()->SetModified();
- GetTopLevelSelection()->SetModified();
+ // insert the source entry at the position after the target
+ pEntries->insert( ++iter, pSourceData );
- return true;
- }
+ GetSaveInData()->SetModified();
+ GetTopLevelSelection()->SetModified();
- return false;
+ return true;
}
SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog(
diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx
index 2303823a0e9e..063ecc0fb184 100644
--- a/cui/source/options/cfgchart.cxx
+++ b/cui/source/options/cfgchart.cxx
@@ -190,41 +190,40 @@ bool SvxChartOptions::RetrieveOptions()
uno::Sequence< uno::Any > aProperties( aNames.getLength());
aProperties = GetProperties( aNames );
- if( aProperties.getLength() == aNames.getLength())
+ if( aProperties.getLength() != aNames.getLength())
+ return false;
+
+ // 1. default colors for series
+ maDefColors.clear();
+ uno::Sequence< sal_Int64 > aColorSeq;
+ aProperties[ 0 ] >>= aColorSeq;
+
+ sal_Int32 nCount = aColorSeq.getLength();
+ Color aCol;
+
+ // create strings for entry names
+ OUString aResName( CuiResId( RID_CUISTR_DIAGRAM_ROW ) );
+ OUString aPrefix, aPostfix, aName;
+ sal_Int32 nPos = aResName.indexOf( "$(ROW)" );
+ if( nPos != -1 )
{
- // 1. default colors for series
- maDefColors.clear();
- uno::Sequence< sal_Int64 > aColorSeq;
- aProperties[ 0 ] >>= aColorSeq;
-
- sal_Int32 nCount = aColorSeq.getLength();
- Color aCol;
-
- // create strings for entry names
- OUString aResName( CuiResId( RID_CUISTR_DIAGRAM_ROW ) );
- OUString aPrefix, aPostfix, aName;
- sal_Int32 nPos = aResName.indexOf( "$(ROW)" );
- if( nPos != -1 )
- {
- aPrefix = aResName.copy( 0, nPos );
- sal_Int32 idx = nPos + sizeof( "$(ROW)" ) - 1;
- aPostfix = aResName.copy( idx );
- }
- else
- aPrefix = aResName;
+ aPrefix = aResName.copy( 0, nPos );
+ sal_Int32 idx = nPos + sizeof( "$(ROW)" ) - 1;
+ aPostfix = aResName.copy( idx );
+ }
+ else
+ aPrefix = aResName;
- // set color values
- for( sal_Int32 i=0; i < nCount; i++ )
- {
- aCol = Color(ColorTransparency, aColorSeq[ i ]);
+ // set color values
+ for( sal_Int32 i=0; i < nCount; i++ )
+ {
+ aCol = Color(ColorTransparency, aColorSeq[ i ]);
- aName = aPrefix + OUString::number(i + 1) + aPostfix;
+ aName = aPrefix + OUString::number(i + 1) + aPostfix;
- maDefColors.append( XColorEntry( aCol, aName ));
- }
- return true;
+ maDefColors.append( XColorEntry( aCol, aName ));
}
- return false;
+ return true;
}
void SvxChartOptions::ImplCommit()
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index a3d2fc54819d..c96b80b47dd9 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1629,27 +1629,27 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
static bool isNodeActive( OptionsNode const * pNode, Module* pModule )
{
- if ( pNode )
- {
- // Node for all modules active?
- if ( pNode->m_bAllModules )
- return true;
+ if ( !pNode )
+ return false;
- // OOo-Nodes (Writer, Calc, Impress...) are active if node is already inserted
- if ( !getGroupName( pNode->m_sId, false ).isEmpty() )
- return true;
+ // Node for all modules active?
+ if ( pNode->m_bAllModules )
+ return true;
- // no module -> not active
- if ( !pModule )
- return false;
+ // OOo-Nodes (Writer, Calc, Impress...) are active if node is already inserted
+ if ( !getGroupName( pNode->m_sId, false ).isEmpty() )
+ return true;
- // search node in active module
- if ( pModule->m_bActive )
- {
- for (auto const& j : pModule->m_aNodeList)
- if ( j->m_sId == pNode->m_sId )
- return true;
- }
+ // no module -> not active
+ if ( !pModule )
+ return false;
+
+ // search node in active module
+ if ( pModule->m_bActive )
+ {
+ for (auto const& j : pModule->m_aNodeList)
+ if ( j->m_sId == pNode->m_sId )
+ return true;
}
return false;
}
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 7b06e9a86092..c40fe32e9623 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -188,40 +188,40 @@ bool SvxBkgTabPage::FillItemSet( SfxItemSet* rCoreSet )
break;
}
- if (m_xTblLBox && m_xTblLBox->get_visible())
+ if (!m_xTblLBox || !m_xTblLBox->get_visible())
+ return true;
+
+ if (nSlot != SID_ATTR_BRUSH)
{
- if (nSlot != SID_ATTR_BRUSH)
+ nWhich = maSet.GetPool()->GetWhich(SID_ATTR_BRUSH);
+ if (SfxItemState::SET == maSet.GetItemState(nWhich))
{
- nWhich = maSet.GetPool()->GetWhich(SID_ATTR_BRUSH);
- if (SfxItemState::SET == maSet.GetItemState(nWhich))
- {
- SvxBrushItem aBrushItem(static_cast<const SvxBrushItem&>(maSet.Get(nWhich)));
- rCoreSet->Put(aBrushItem);
- }
+ SvxBrushItem aBrushItem(static_cast<const SvxBrushItem&>(maSet.Get(nWhich)));
+ rCoreSet->Put(aBrushItem);
}
- if (nSlot != SID_ATTR_BRUSH_ROW)
+ }
+ if (nSlot != SID_ATTR_BRUSH_ROW)
+ {
+ nWhich = maSet.GetPool()->GetWhich(SID_ATTR_BRUSH_ROW);
+ if (SfxItemState::SET == maSet.GetItemState(nWhich))
{
- nWhich = maSet.GetPool()->GetWhich(SID_ATTR_BRUSH_ROW);
- if (SfxItemState::SET == maSet.GetItemState(nWhich))
- {
- SvxBrushItem aBrushItem(static_cast<const SvxBrushItem&>(maSet.Get(nWhich)));
- rCoreSet->Put(aBrushItem);
- }
+ SvxBrushItem aBrushItem(static_cast<const SvxBrushItem&>(maSet.Get(nWhich)));
+ rCoreSet->Put(aBrushItem);
}
- if (nSlot != SID_ATTR_BRUSH_TABLE)
+ }
+ if (nSlot != SID_ATTR_BRUSH_TABLE)
+ {
+ nWhich = maSet.GetPool()->GetWhich(SID_ATTR_BRUSH_TABLE);
+ if (SfxItemState::SET == maSet.GetItemState(nWhich))
{
- nWhich = maSet.GetPool()->GetWhich(SID_ATTR_BRUSH_TABLE);
- if (SfxItemState::SET == maSet.GetItemState(nWhich))
- {
- SvxBrushItem aBrushItem(static_cast<const SvxBrushItem&>(maSet.Get(nWhich)));
- rCoreSet->Put(aBrushItem);
- }
+ SvxBrushItem aBrushItem(static_cast<const SvxBrushItem&>(maSet.Get(nWhich)));
+ rCoreSet->Put(aBrushItem);
}
+ }
- if (m_xTblLBox->get_value_changed_from_saved())
- {
- rCoreSet->Put(SfxUInt16Item(SID_BACKGRND_DESTINATION, m_xTblLBox->get_active()));
- }
+ if (m_xTblLBox->get_value_changed_from_saved())
+ {
+ rCoreSet->Put(SfxUInt16Item(SID_BACKGRND_DESTINATION, m_xTblLBox->get_active()));
}
return true;
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index 5e5352aff400..105cf43f7ca2 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -379,55 +379,54 @@ FrmMap const aVAsCharHtmlMap[] =
static std::size_t lcl_GetFrmMapCount(const FrmMap* pMap)
{
- if( pMap )
- {
- if( pMap == aVParaHtmlMap )
- return SAL_N_ELEMENTS(aVParaHtmlMap);
- if( pMap == aVAsCharHtmlMap )
- return SAL_N_ELEMENTS( aVAsCharHtmlMap );
- if( pMap == aHParaHtmlMap )
- return SAL_N_ELEMENTS( aHParaHtmlMap );
- if( pMap == aHParaHtmlAbsMap )
- return SAL_N_ELEMENTS( aHParaHtmlAbsMap );
- if( pMap == aVPageMap )
- return SAL_N_ELEMENTS( aVPageMap );
- if( pMap == aVPageHtmlMap )
- return SAL_N_ELEMENTS( aVPageHtmlMap );
- if( pMap == aVAsCharMap )
- return SAL_N_ELEMENTS( aVAsCharMap );
- if( pMap == aVParaMap )
- return SAL_N_ELEMENTS( aVParaMap );
- if( pMap == aHParaMap )
- return SAL_N_ELEMENTS( aHParaMap );
- if( pMap == aHFrameMap )
- return SAL_N_ELEMENTS( aHFrameMap );
- if( pMap == aVFrameMap )
- return SAL_N_ELEMENTS( aVFrameMap );
- if( pMap == aHCharMap )
- return SAL_N_ELEMENTS( aHCharMap );
- if( pMap == aHCharHtmlMap )
- return SAL_N_ELEMENTS( aHCharHtmlMap );
- if( pMap == aHCharHtmlAbsMap )
- return SAL_N_ELEMENTS( aHCharHtmlAbsMap );
- if( pMap == aVCharMap )
- return SAL_N_ELEMENTS( aVCharMap );
- if( pMap == aVCharHtmlMap )
- return SAL_N_ELEMENTS( aVCharHtmlMap );
- if( pMap == aVCharHtmlAbsMap )
- return SAL_N_ELEMENTS( aVCharHtmlAbsMap );
- if( pMap == aHPageHtmlMap )
- return SAL_N_ELEMENTS( aHPageHtmlMap );
- if( pMap == aHFlyHtmlMap )
- return SAL_N_ELEMENTS( aHFlyHtmlMap );
- if( pMap == aVFlyHtmlMap )
- return SAL_N_ELEMENTS( aVFlyHtmlMap );
- if( pMap == aVMultiSelectionMap )
- return SAL_N_ELEMENTS( aVMultiSelectionMap );
- if( pMap == aHMultiSelectionMap )
- return SAL_N_ELEMENTS( aHMultiSelectionMap );
- return SAL_N_ELEMENTS(aHPageMap);
- }
- return 0;
+ if( !pMap )
+ return 0;
+
+ if( pMap == aVParaHtmlMap )
+ return SAL_N_ELEMENTS(aVParaHtmlMap);
+ if( pMap == aVAsCharHtmlMap )
+ return SAL_N_ELEMENTS( aVAsCharHtmlMap );
+ if( pMap == aHParaHtmlMap )
+ return SAL_N_ELEMENTS( aHParaHtmlMap );
+ if( pMap == aHParaHtmlAbsMap )
+ return SAL_N_ELEMENTS( aHParaHtmlAbsMap );
+ if( pMap == aVPageMap )
+ return SAL_N_ELEMENTS( aVPageMap );
+ if( pMap == aVPageHtmlMap )
+ return SAL_N_ELEMENTS( aVPageHtmlMap );
+ if( pMap == aVAsCharMap )
+ return SAL_N_ELEMENTS( aVAsCharMap );
+ if( pMap == aVParaMap )
+ return SAL_N_ELEMENTS( aVParaMap );
+ if( pMap == aHParaMap )
+ return SAL_N_ELEMENTS( aHParaMap );
+ if( pMap == aHFrameMap )
+ return SAL_N_ELEMENTS( aHFrameMap );
+ if( pMap == aVFrameMap )
+ return SAL_N_ELEMENTS( aVFrameMap );
+ if( pMap == aHCharMap )
+ return SAL_N_ELEMENTS( aHCharMap );
+ if( pMap == aHCharHtmlMap )
+ return SAL_N_ELEMENTS( aHCharHtmlMap );
+ if( pMap == aHCharHtmlAbsMap )
+ return SAL_N_ELEMENTS( aHCharHtmlAbsMap );
+ if( pMap == aVCharMap )
+ return SAL_N_ELEMENTS( aVCharMap );
+ if( pMap == aVCharHtmlMap )
+ return SAL_N_ELEMENTS( aVCharHtmlMap );
+ if( pMap == aVCharHtmlAbsMap )
+ return SAL_N_ELEMENTS( aVCharHtmlAbsMap );
+ if( pMap == aHPageHtmlMap )
+ return SAL_N_ELEMENTS( aHPageHtmlMap );
+ if( pMap == aHFlyHtmlMap )
+ return SAL_N_ELEMENTS( aHFlyHtmlMap );
+ if( pMap == aVFlyHtmlMap )
+ return SAL_N_ELEMENTS( aVFlyHtmlMap );
+ if( pMap == aVMultiSelectionMap )
+ return SAL_N_ELEMENTS( aVMultiSelectionMap );
+ if( pMap == aHMultiSelectionMap )
+ return SAL_N_ELEMENTS( aHMultiSelectionMap );
+ return SAL_N_ELEMENTS(aHPageMap);
}
static SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index d542f9b0810e..a936e227622a 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -395,34 +395,34 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs)
// #103516# Do not change values if adjust controls were disabled.
bool bIsDisabled(m_aCtlPosition.IsCompletelyDisabled());
- if(!bIsDisabled)
- {
- if( m_xTsbFullWidth->get_state() == TRISTATE_TRUE )
- {
- if (IsTextDirectionLeftToRight())
- eTHA = SDRTEXTHORZADJUST_BLOCK;
- else
- eTVA = SDRTEXTVERTADJUST_BLOCK;
- }
+ if(bIsDisabled)
+ return true;
- if ( rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ) != SfxItemState::DONTCARE )
- {
- SdrTextVertAdjust eOldTVA = rOutAttrs.Get( SDRATTR_TEXT_VERTADJUST ).GetValue();
- if( eOldTVA != eTVA )
- rAttrs->Put( SdrTextVertAdjustItem( eTVA ) );
- }
+ if( m_xTsbFullWidth->get_state() == TRISTATE_TRUE )
+ {
+ if (IsTextDirectionLeftToRight())
+ eTHA = SDRTEXTHORZADJUST_BLOCK;
else
+ eTVA = SDRTEXTVERTADJUST_BLOCK;
+ }
+
+ if ( rOutAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST ) != SfxItemState::DONTCARE )
+ {
+ SdrTextVertAdjust eOldTVA = rOutAttrs.Get( SDRATTR_TEXT_VERTADJUST ).GetValue();
+ if( eOldTVA != eTVA )
rAttrs->Put( SdrTextVertAdjustItem( eTVA ) );
+ }
+ else
+ rAttrs->Put( SdrTextVertAdjustItem( eTVA ) );
- if ( rOutAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ) != SfxItemState::DONTCARE )
- {
- SdrTextHorzAdjust eOldTHA = rOutAttrs.Get( SDRATTR_TEXT_HORZADJUST ).GetValue();
- if( eOldTHA != eTHA )
- rAttrs->Put( SdrTextHorzAdjustItem( eTHA ) );
- }
- else
+ if ( rOutAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST ) != SfxItemState::DONTCARE )
+ {
+ SdrTextHorzAdjust eOldTHA = rOutAttrs.Get( SDRATTR_TEXT_HORZADJUST ).GetValue();
+ if( eOldTHA != eTHA )
rAttrs->Put( SdrTextHorzAdjustItem( eTHA ) );
}
+ else
+ rAttrs->Put( SdrTextHorzAdjustItem( eTHA ) );
return true;
}
diff --git a/cui/source/tabpages/themepage.cxx b/cui/source/tabpages/themepage.cxx
index 07d24649fb5d..35eb9156398a 100644
--- a/cui/source/tabpages/themepage.cxx
+++ b/cui/source/tabpages/themepage.cxx
@@ -130,41 +130,41 @@ bool SvxThemePage::FillItemSet(SfxItemSet* pAttrs)
{
const SfxItemSet& rOldSet = GetItemSet();
- if (rOldSet.HasItem(SID_ATTR_CHAR_GRABBAG))
+ if (!rOldSet.HasItem(SID_ATTR_CHAR_GRABBAG))
+ return true;
+
+ SfxGrabBagItem aGrabBagItem(
+ static_cast<const SfxGrabBagItem&>(rOldSet.Get(SID_ATTR_CHAR_GRABBAG)));
+
+ comphelper::SequenceAsHashMap aMap;
+ auto it = aGrabBagItem.GetGrabBag().find("Theme");
+ if (it != aGrabBagItem.GetGrabBag().end())
{
- SfxGrabBagItem aGrabBagItem(
- static_cast<const SfxGrabBagItem&>(rOldSet.Get(SID_ATTR_CHAR_GRABBAG)));
-
- comphelper::SequenceAsHashMap aMap;
- auto it = aGrabBagItem.GetGrabBag().find("Theme");
- if (it != aGrabBagItem.GetGrabBag().end())
- {
- aMap << it->second;
- }
-
- aMap["Name"] <<= m_xThemeName->get_text();
- aMap["ColorSchemeName"] <<= m_xColorSetName->get_text();
- std::vector<util::Color> aColorScheme = {
- static_cast<sal_Int32>(m_xDk1->GetSelectEntryColor()),
- static_cast<sal_Int32>(m_xLt1->GetSelectEntryColor()),
- static_cast<sal_Int32>(m_xDk2->GetSelectEntryColor()),
- static_cast<sal_Int32>(m_xLt2->GetSelectEntryColor()),
- static_cast<sal_Int32>(m_xAccent1->GetSelectEntryColor()),
- static_cast<sal_Int32>(m_xAccent2->GetSelectEntryColor()),
- static_cast<sal_Int32>(m_xAccent3->GetSelectEntryColor()),
- static_cast<sal_Int32>(m_xAccent4->GetSelectEntryColor()),
- static_cast<sal_Int32>(m_xAccent5->GetSelectEntryColor()),
- static_cast<sal_Int32>(m_xAccent6->GetSelectEntryColor()),
- static_cast<sal_Int32>(m_xHlink->GetSelectEntryColor()),
- static_cast<sal_Int32>(m_xFolHlink->GetSelectEntryColor()),
- };
- aMap["ColorScheme"] <<= comphelper::containerToSequence(aColorScheme);
-
- beans::PropertyValues aTheme = aMap.getAsConstPropertyValueList();
- aGrabBagItem.GetGrabBag()["Theme"] <<= aTheme;
- pAttrs->Put(aGrabBagItem);
+ aMap << it->second;
}
+ aMap["Name"] <<= m_xThemeName->get_text();
+ aMap["ColorSchemeName"] <<= m_xColorSetName->get_text();
+ std::vector<util::Color> aColorScheme = {
+ static_cast<sal_Int32>(m_xDk1->GetSelectEntryColor()),
+ static_cast<sal_Int32>(m_xLt1->GetSelectEntryColor()),
+ static_cast<sal_Int32>(m_xDk2->GetSelectEntryColor()),
+ static_cast<sal_Int32>(m_xLt2->GetSelectEntryColor()),
+ static_cast<sal_Int32>(m_xAccent1->GetSelectEntryColor()),
+ static_cast<sal_Int32>(m_xAccent2->GetSelectEntryColor()),
+ static_cast<sal_Int32>(m_xAccent3->GetSelectEntryColor()),
+ static_cast<sal_Int32>(m_xAccent4->GetSelectEntryColor()),
+ static_cast<sal_Int32>(m_xAccent5->GetSelectEntryColor()),
+ static_cast<sal_Int32>(m_xAccent6->GetSelectEntryColor()),
+ static_cast<sal_Int32>(m_xHlink->GetSelectEntryColor()),
+ static_cast<sal_Int32>(m_xFolHlink->GetSelectEntryColor()),
+ };
+ aMap["ColorScheme"] <<= comphelper::containerToSequence(aColorScheme);
+
+ beans::PropertyValues aTheme = aMap.getAsConstPropertyValueList();
+ aGrabBagItem.GetGrabBag()["Theme"] <<= aTheme;
+ pAttrs->Put(aGrabBagItem);
+
return true;
}