summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/Palette.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/tbxctrls/Palette.cxx')
-rw-r--r--svx/source/tbxctrls/Palette.cxx37
1 files changed, 37 insertions, 0 deletions
diff --git a/svx/source/tbxctrls/Palette.cxx b/svx/source/tbxctrls/Palette.cxx
index a5c12db487e1..6f90ec00e4f3 100644
--- a/svx/source/tbxctrls/Palette.cxx
+++ b/svx/source/tbxctrls/Palette.cxx
@@ -49,6 +49,17 @@ void PaletteASE::LoadColorSet( SvxColorValueSet& rColorSet )
}
}
+void PaletteASE::LoadColorSet( ColorValueSet& rColorSet )
+{
+ rColorSet.Clear();
+ int nIx = 1;
+ for (ColorList::const_iterator it = maColors.begin(); it != maColors.end(); ++it)
+ {
+ rColorSet.InsertItem(nIx, it->first, it->second);
+ ++nIx;
+ }
+}
+
const OUString& PaletteASE::GetName()
{
return maASEPaletteName;
@@ -210,6 +221,19 @@ void PaletteGPL::LoadColorSet( SvxColorValueSet& rColorSet )
}
}
+void PaletteGPL::LoadColorSet( ColorValueSet& rColorSet )
+{
+ LoadPalette();
+
+ rColorSet.Clear();
+ int nIx = 1;
+ for (ColorList::const_iterator it = maColors.begin(); it != maColors.end(); ++it)
+ {
+ rColorSet.InsertItem(nIx, it->first, it->second);
+ ++nIx;
+ }
+}
+
bool PaletteGPL::IsValid()
{
return mbValidPalette;
@@ -356,6 +380,19 @@ void PaletteSOC::LoadColorSet( SvxColorValueSet& rColorSet )
rColorSet.addEntriesForXColorList( *mpColorList );
}
+void PaletteSOC::LoadColorSet( ColorValueSet& rColorSet )
+{
+ if( !mbLoadedPalette )
+ {
+ mbLoadedPalette = true;
+ mpColorList = XPropertyList::AsColorList(XPropertyList::CreatePropertyListFromURL(XPropertyListType::Color, maFPath));
+ (void)mpColorList->Load();
+ }
+ rColorSet.Clear();
+ if( mpColorList.is() )
+ rColorSet.addEntriesForXColorList( *mpColorList );
+}
+
bool PaletteSOC::IsValid()
{
return true;