summaryrefslogtreecommitdiff
path: root/svx/source/form/dbcharsethelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/form/dbcharsethelper.cxx')
-rw-r--r--svx/source/form/dbcharsethelper.cxx31
1 files changed, 19 insertions, 12 deletions
diff --git a/svx/source/form/dbcharsethelper.cxx b/svx/source/form/dbcharsethelper.cxx
index f401592e9644..aa26c27aaaac 100644
--- a/svx/source/form/dbcharsethelper.cxx
+++ b/svx/source/form/dbcharsethelper.cxx
@@ -19,24 +19,31 @@
#include "svx/dbcharsethelper.hxx"
+#include <connectivity/dbtools.hxx>
+#include <connectivity/dbcharset.hxx>
-namespace svxform
-{
-
- ODataAccessCharsetHelper::ODataAccessCharsetHelper( )
- {
- }
+using namespace ::dbtools;
+namespace svxform { namespace charset_helper
+{
- bool ODataAccessCharsetHelper::ensureLoaded() const
+ sal_Int32 getSupportedTextEncodings( ::std::vector< rtl_TextEncoding >& _rEncs )
{
- if ( !ODbtoolsClient::ensureLoaded() )
- return false;
- m_xCharsetHelper = getFactory()->createCharsetHelper( );
- return m_xCharsetHelper.is();
+ OCharsetMap aCharsetInfo;
+ _rEncs.clear();
+
+ OCharsetMap::const_iterator aLoop = aCharsetInfo.begin();
+ OCharsetMap::const_iterator aLoopEnd = aCharsetInfo.end();
+ while (aLoop != aLoopEnd)
+ {
+ _rEncs.push_back( (*aLoop).getEncoding() );
+ ++aLoop;
+ }
+
+ return _rEncs.size();
}
-
+} // namespace charset_helper
} // namespace svxform