improve function-local statics in dbaccess..filter
Change-Id: I64939ad4b6c53696e33300114db384abfe73f13f Reviewed-on: https://gerrit.libreoffice.org/63702 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -70,18 +70,19 @@ OXMLDataSourceSetting::OXMLDataSourceSetting( ODBFilter& rImport
|
||||
case XML_TOK_DATA_SOURCE_SETTING_TYPE:
|
||||
{
|
||||
// needs to be translated into a css::uno::Type
|
||||
static std::map< OUString, css::uno::Type > s_aTypeNameMap;
|
||||
if (s_aTypeNameMap.empty())
|
||||
static std::map< OUString, css::uno::Type > s_aTypeNameMap = [&]()
|
||||
{
|
||||
s_aTypeNameMap[GetXMLToken( XML_BOOLEAN)] = cppu::UnoType<bool>::get();
|
||||
std::map< OUString, css::uno::Type > tmp;
|
||||
tmp[GetXMLToken( XML_BOOLEAN)] = cppu::UnoType<bool>::get();
|
||||
// Not a copy paste error, see comment xmloff/source/forms/propertyimport.cxx lines 244-248
|
||||
s_aTypeNameMap[GetXMLToken( XML_FLOAT)] = ::cppu::UnoType<double>::get();
|
||||
s_aTypeNameMap[GetXMLToken( XML_DOUBLE)] = ::cppu::UnoType<double>::get();
|
||||
s_aTypeNameMap[GetXMLToken( XML_STRING)] = ::cppu::UnoType<OUString>::get();
|
||||
s_aTypeNameMap[GetXMLToken( XML_INT)] = ::cppu::UnoType<sal_Int32>::get();
|
||||
s_aTypeNameMap[GetXMLToken( XML_SHORT)] = ::cppu::UnoType<sal_Int16>::get();
|
||||
s_aTypeNameMap[GetXMLToken( XML_VOID)] = cppu::UnoType<void>::get();
|
||||
}
|
||||
tmp[GetXMLToken( XML_FLOAT)] = ::cppu::UnoType<double>::get();
|
||||
tmp[GetXMLToken( XML_DOUBLE)] = ::cppu::UnoType<double>::get();
|
||||
tmp[GetXMLToken( XML_STRING)] = ::cppu::UnoType<OUString>::get();
|
||||
tmp[GetXMLToken( XML_INT)] = ::cppu::UnoType<sal_Int32>::get();
|
||||
tmp[GetXMLToken( XML_SHORT)] = ::cppu::UnoType<sal_Int16>::get();
|
||||
tmp[GetXMLToken( XML_VOID)] = cppu::UnoType<void>::get();
|
||||
return tmp;
|
||||
}();
|
||||
|
||||
const std::map< OUString, css::uno::Type >::const_iterator aTypePos = s_aTypeNameMap.find(sValue);
|
||||
OSL_ENSURE(s_aTypeNameMap.end() != aTypePos, "OXMLDataSourceSetting::OXMLDataSourceSetting: invalid type!");
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <flt_reghelper.hxx>
|
||||
#include "xmlservices.hxx"
|
||||
#include <mutex>
|
||||
|
||||
using namespace ::dbaxml;
|
||||
using namespace ::com::sun::star::uno;
|
||||
@@ -30,8 +31,8 @@ extern "C" {
|
||||
|
||||
static void createRegistryInfo_dbaxml()
|
||||
{
|
||||
static bool bInit = false;
|
||||
if (!bInit)
|
||||
static std::once_flag aInit;
|
||||
std::call_once(aInit, [&]()
|
||||
{
|
||||
createRegistryInfo_DBTypeDetection();
|
||||
createRegistryInfo_ODBFilter();
|
||||
@@ -39,8 +40,8 @@ static void createRegistryInfo_dbaxml()
|
||||
createRegistryInfo_OSettingsExport();
|
||||
createRegistryInfo_OFullExport();
|
||||
createRegistryInfo_DBContentLoader2();
|
||||
bInit = true;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -87,9 +87,9 @@ namespace dbaui
|
||||
static const FeatureSet& lcl_getFeatureSet( const OUString& _rURL )
|
||||
{
|
||||
typedef std::map< OUString, FeatureSet > FeatureSets;
|
||||
static FeatureSets s_aFeatureSets;
|
||||
if ( s_aFeatureSets.empty() )
|
||||
static FeatureSets s_aFeatureSets = [&]()
|
||||
{
|
||||
FeatureSets tmp;
|
||||
::connectivity::DriversConfig aDriverConfig( ::comphelper::getProcessComponentContext() );
|
||||
const uno::Sequence< OUString > aPatterns = aDriverConfig.getURLs();
|
||||
for ( auto const & pattern : aPatterns )
|
||||
@@ -105,9 +105,10 @@ namespace dbaui
|
||||
++pFeatureMapping;
|
||||
}
|
||||
|
||||
s_aFeatureSets[ pattern ] = aCurrentSet;
|
||||
tmp[ pattern ] = aCurrentSet;
|
||||
}
|
||||
}
|
||||
return tmp;
|
||||
}();
|
||||
|
||||
OSL_ENSURE( s_aFeatureSets.find( _rURL ) != s_aFeatureSets.end(), "invalid URL/pattern!" );
|
||||
return s_aFeatureSets[ _rURL ];
|
||||
@@ -115,9 +116,9 @@ namespace dbaui
|
||||
|
||||
static AuthenticationMode getAuthenticationMode( const OUString& _sURL )
|
||||
{
|
||||
static std::map< OUString, FeatureSupport > s_aSupport;
|
||||
if ( s_aSupport.empty() )
|
||||
static std::map< OUString, FeatureSupport > s_aSupport = [&]()
|
||||
{
|
||||
std::map< OUString, FeatureSupport > tmp;
|
||||
::connectivity::DriversConfig aDriverConfig(::comphelper::getProcessComponentContext());
|
||||
const uno::Sequence< OUString > aURLs = aDriverConfig.getURLs();
|
||||
const OUString* pIter = aURLs.getConstArray();
|
||||
@@ -135,9 +136,10 @@ namespace dbaui
|
||||
else if ( sAuth == "Password" )
|
||||
aInit = FeatureSupport(AuthPwd);
|
||||
}
|
||||
s_aSupport.insert(std::make_pair(*pIter,aInit));
|
||||
tmp.insert(std::make_pair(*pIter,aInit));
|
||||
}
|
||||
}
|
||||
return tmp;
|
||||
}();
|
||||
OSL_ENSURE(s_aSupport.find(_sURL) != s_aSupport.end(),"Illegal URL!");
|
||||
return s_aSupport[ _sURL ].eAuthentication;
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <dbu_reghelper.hxx>
|
||||
#include <uiservices.hxx>
|
||||
#include <mutex>
|
||||
|
||||
using namespace ::dbaui;
|
||||
using namespace ::com::sun::star::uno;
|
||||
@@ -30,8 +31,8 @@ extern "C" {
|
||||
|
||||
static void createRegistryInfo_DBU()
|
||||
{
|
||||
static bool bInit = false;
|
||||
if (!bInit)
|
||||
static std::once_flag aInit;
|
||||
std::call_once(aInit, [&]()
|
||||
{
|
||||
createRegistryInfo_OTableFilterDialog();
|
||||
createRegistryInfo_ODataSourcePropertyDialog();
|
||||
@@ -57,8 +58,8 @@ static void createRegistryInfo_DBU()
|
||||
createRegistryInfo_CopyTableWizard();
|
||||
createRegistryInfo_OTextConnectionSettingsDialog();
|
||||
createRegistryInfo_LimitBoxController();
|
||||
bInit = true;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -239,13 +239,12 @@ static TransliterationWrapper& GetIgnoreTranslWrapper()
|
||||
}
|
||||
static CollatorWrapper& GetCollatorWrapper()
|
||||
{
|
||||
static int bIsInit = 0;
|
||||
static CollatorWrapper aCollWrp( ::comphelper::getProcessComponentContext() );
|
||||
if( !bIsInit )
|
||||
static CollatorWrapper aCollWrp = [&]()
|
||||
{
|
||||
aCollWrp.loadDefaultCollator( GetAppLang().getLocale(), 0 );
|
||||
bIsInit = 1;
|
||||
}
|
||||
CollatorWrapper tmp( ::comphelper::getProcessComponentContext() );
|
||||
tmp.loadDefaultCollator( GetAppLang().getLocale(), 0 );
|
||||
return tmp;
|
||||
}();
|
||||
return aCollWrp;
|
||||
}
|
||||
|
||||
|
@@ -40,20 +40,17 @@ const char cDataSourceHistory[] = "DataSourceHistory";
|
||||
|
||||
Sequence<OUString> const & BibConfig::GetPropertyNames()
|
||||
{
|
||||
static Sequence<OUString> aNames;
|
||||
if(!aNames.getLength())
|
||||
static Sequence<OUString> aNames =
|
||||
{
|
||||
aNames.realloc(8);
|
||||
OUString* pNames = aNames.getArray();
|
||||
pNames[0] = "CurrentDataSource/DataSourceName";
|
||||
pNames[1] = "CurrentDataSource/Command";
|
||||
pNames[2] = "CurrentDataSource/CommandType";
|
||||
pNames[3] = "BeamerHeight";
|
||||
pNames[4] = "ViewHeight";
|
||||
pNames[5] = "QueryText";
|
||||
pNames[6] = "QueryField";
|
||||
pNames[7] = "ShowColumnAssignmentWarning";
|
||||
}
|
||||
"CurrentDataSource/DataSourceName",
|
||||
"CurrentDataSource/Command",
|
||||
"CurrentDataSource/CommandType",
|
||||
"BeamerHeight",
|
||||
"ViewHeight",
|
||||
"QueryText",
|
||||
"QueryField",
|
||||
"ShowColumnAssignmentWarning"
|
||||
};
|
||||
return aNames;
|
||||
}
|
||||
|
||||
|
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <componentmodule.hxx>
|
||||
#include "dbpservices.hxx"
|
||||
#include <mutex>
|
||||
|
||||
using namespace ::com::sun::star::uno;
|
||||
using namespace ::com::sun::star::lang;
|
||||
@@ -28,14 +29,14 @@ extern "C" {
|
||||
|
||||
static void dbp_initializeModule()
|
||||
{
|
||||
static bool s_bInit = false;
|
||||
if (!s_bInit)
|
||||
std::once_flag aInit;
|
||||
std::call_once(aInit, [&]()
|
||||
{
|
||||
createRegistryInfo_OGroupBoxWizard();
|
||||
createRegistryInfo_OListComboWizard();
|
||||
createRegistryInfo_OGridWizard();
|
||||
s_bInit = true;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "modulepcr.hxx"
|
||||
#include "pcrservices.hxx"
|
||||
#include <mutex>
|
||||
|
||||
using namespace ::com::sun::star::uno;
|
||||
using namespace ::com::sun::star::lang;
|
||||
@@ -29,8 +30,8 @@ extern "C" {
|
||||
|
||||
static void pcr_initializeModule()
|
||||
{
|
||||
static bool s_bInit = false;
|
||||
if (!s_bInit)
|
||||
std::once_flag aInit;
|
||||
std::call_once(aInit, [&]()
|
||||
{
|
||||
createRegistryInfo_OPropertyBrowserController();
|
||||
createRegistryInfo_FormController();
|
||||
@@ -51,8 +52,8 @@ static void pcr_initializeModule()
|
||||
createRegistryInfo_StringRepresentation();
|
||||
createRegistryInfo_MasterDetailLinkDialog();
|
||||
createRegistryInfo_FormGeometryHandler();
|
||||
s_bInit = true;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -303,9 +303,8 @@ static void SetByte(sal_uInt16& nx, sal_uInt16 ny, vcl::bitmap::RawBitmap& rBitm
|
||||
|
||||
//=================== methods of PictReader ==============================
|
||||
rtl_TextEncoding PictReader::GetTextEncoding (sal_uInt16 fId) {
|
||||
static bool first = true;
|
||||
static rtl_TextEncoding enc = RTL_TEXTENCODING_APPLE_ROMAN;
|
||||
if (first) {
|
||||
static rtl_TextEncoding enc = [&]()
|
||||
{
|
||||
rtl_TextEncoding def = osl_getThreadTextEncoding();
|
||||
// we keep osl_getThreadTextEncoding only if it is a mac encoding
|
||||
switch(def) {
|
||||
@@ -329,11 +328,12 @@ rtl_TextEncoding PictReader::GetTextEncoding (sal_uInt16 fId) {
|
||||
case RTL_TEXTENCODING_APPLE_CHINTRAD:
|
||||
case RTL_TEXTENCODING_APPLE_JAPANESE:
|
||||
case RTL_TEXTENCODING_APPLE_KOREAN:
|
||||
enc = def; break;
|
||||
default: break;
|
||||
return def; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
return RTL_TEXTENCODING_APPLE_ROMAN;
|
||||
}();
|
||||
if (fId == 13) return RTL_TEXTENCODING_ADOBE_DINGBATS; // CHECKME
|
||||
if (fId == 23) return RTL_TEXTENCODING_ADOBE_SYMBOL;
|
||||
return enc;
|
||||
|
@@ -689,14 +689,15 @@ KeyCodeEntry const aMSKeyCodesData[] = {
|
||||
|
||||
awt::KeyEvent parseKeyEvent( const OUString& Key )
|
||||
{
|
||||
static std::map< OUString, sal_uInt16 > s_KeyCodes;
|
||||
if ( s_KeyCodes.empty() )
|
||||
static std::map< OUString, sal_uInt16 > s_KeyCodes = [&]()
|
||||
{
|
||||
std::map< OUString, sal_uInt16 > tmp;
|
||||
for (KeyCodeEntry const & i : aMSKeyCodesData)
|
||||
{
|
||||
s_KeyCodes[ OUString::createFromAscii( i.sName ) ] = i.nCode;
|
||||
tmp[ OUString::createFromAscii( i.sName ) ] = i.nCode;
|
||||
}
|
||||
}
|
||||
return tmp;
|
||||
}();
|
||||
OUString sKeyCode;
|
||||
sal_uInt16 nVclKey = 0;
|
||||
|
||||
|
@@ -1167,40 +1167,37 @@ static struct {
|
||||
{"textBox", mso_sptTextBox},
|
||||
};
|
||||
|
||||
typedef std::unordered_map< const char*, const char*, rtl::CStringHash, rtl::CStringEqual> CustomShapeTypeTranslationHashMap;
|
||||
static CustomShapeTypeTranslationHashMap* pCustomShapeTypeTranslationHashMap = nullptr;
|
||||
|
||||
const char* GetOOXMLPresetGeometry( const char* sShapeType )
|
||||
{
|
||||
if( pCustomShapeTypeTranslationHashMap == nullptr )
|
||||
typedef std::unordered_map< const char*, const char*, rtl::CStringHash, rtl::CStringEqual> CustomShapeTypeTranslationHashMap;
|
||||
static CustomShapeTypeTranslationHashMap aCustomShapeTypeTranslationHashMap = [&]()
|
||||
{
|
||||
pCustomShapeTypeTranslationHashMap = new CustomShapeTypeTranslationHashMap;
|
||||
CustomShapeTypeTranslationHashMap tmp;
|
||||
for(const msfilter::util::CustomShapeTypeTranslationTable& i : pCustomShapeTypeTranslationTable)
|
||||
{
|
||||
(*pCustomShapeTypeTranslationHashMap)[ i.sOOo ] = i.sMSO;
|
||||
tmp[ i.sOOo ] = i.sMSO;
|
||||
}
|
||||
}
|
||||
return tmp;
|
||||
}();
|
||||
CustomShapeTypeTranslationHashMap::iterator i(
|
||||
pCustomShapeTypeTranslationHashMap->find(sShapeType));
|
||||
return i == pCustomShapeTypeTranslationHashMap->end() ? "rect" : i->second;
|
||||
aCustomShapeTypeTranslationHashMap.find(sShapeType));
|
||||
return i == aCustomShapeTypeTranslationHashMap.end() ? "rect" : i->second;
|
||||
}
|
||||
|
||||
typedef std::unordered_map< const char*, MSO_SPT, rtl::CStringHash, rtl::CStringEqual> DMLToVMLTranslationHashMap;
|
||||
static DMLToVMLTranslationHashMap* pDMLToVMLMap;
|
||||
|
||||
MSO_SPT GETVMLShapeType(const OString& aType)
|
||||
{
|
||||
const char* pDML = GetOOXMLPresetGeometry(aType.getStr());
|
||||
|
||||
if (!pDMLToVMLMap)
|
||||
typedef std::unordered_map< const char*, MSO_SPT, rtl::CStringHash, rtl::CStringEqual> DMLToVMLTranslationHashMap;
|
||||
static DMLToVMLTranslationHashMap aDMLToVMLMap = [&]()
|
||||
{
|
||||
pDMLToVMLMap = new DMLToVMLTranslationHashMap;
|
||||
DMLToVMLTranslationHashMap tmp;
|
||||
for (auto& i : pDMLToVMLTable)
|
||||
(*pDMLToVMLMap)[i.sDML] = i.nVML;
|
||||
}
|
||||
tmp[i.sDML] = i.nVML;
|
||||
return tmp;
|
||||
}();
|
||||
|
||||
DMLToVMLTranslationHashMap::iterator i(pDMLToVMLMap->find(pDML));
|
||||
return i == pDMLToVMLMap->end() ? mso_sptNil : i->second;
|
||||
const char* pDML = GetOOXMLPresetGeometry(aType.getStr());
|
||||
DMLToVMLTranslationHashMap::iterator i(aDMLToVMLMap.find(pDML));
|
||||
return i == aDMLToVMLMap.end() ? mso_sptNil : i->second;
|
||||
}
|
||||
|
||||
bool HasTextBoxContent(sal_uInt32 nShapeType)
|
||||
|
@@ -78,7 +78,7 @@ struct application_info_impl
|
||||
};
|
||||
|
||||
|
||||
extern std::vector< application_info_impl* >& getApplicationInfos();
|
||||
extern std::vector< application_info_impl > const & getApplicationInfos();
|
||||
extern OUString getApplicationUIName( const OUString& rServiceName );
|
||||
extern const application_info_impl* getApplicationInfo( const OUString& rServiceName );
|
||||
OUString XsltResId(const char* pId);
|
||||
|
@@ -1186,74 +1186,64 @@ application_info_impl::application_info_impl( const sal_Char * pDocumentService,
|
||||
{
|
||||
}
|
||||
|
||||
std::vector< application_info_impl* >& getApplicationInfos()
|
||||
std::vector< application_info_impl > const & getApplicationInfos()
|
||||
{
|
||||
static std::vector< application_info_impl* > aInfos;
|
||||
|
||||
if( aInfos.empty() )
|
||||
static std::vector< application_info_impl > const aInfos
|
||||
{
|
||||
aInfos.push_back( new application_info_impl(
|
||||
"com.sun.star.text.TextDocument",
|
||||
{ "com.sun.star.text.TextDocument",
|
||||
STR_APPL_NAME_WRITER,
|
||||
"com.sun.star.comp.Writer.XMLImporter",
|
||||
"com.sun.star.comp.Writer.XMLExporter" ) );
|
||||
"com.sun.star.comp.Writer.XMLExporter" },
|
||||
|
||||
aInfos.push_back( new application_info_impl(
|
||||
"com.sun.star.sheet.SpreadsheetDocument",
|
||||
{ "com.sun.star.sheet.SpreadsheetDocument",
|
||||
STR_APPL_NAME_CALC,
|
||||
"com.sun.star.comp.Calc.XMLImporter",
|
||||
"com.sun.star.comp.Calc.XMLExporter" ) );
|
||||
"com.sun.star.comp.Calc.XMLExporter" },
|
||||
|
||||
aInfos.push_back( new application_info_impl(
|
||||
"com.sun.star.presentation.PresentationDocument",
|
||||
{ "com.sun.star.presentation.PresentationDocument",
|
||||
STR_APPL_NAME_IMPRESS,
|
||||
"com.sun.star.comp.Impress.XMLImporter",
|
||||
"com.sun.star.comp.Impress.XMLExporter" ) );
|
||||
"com.sun.star.comp.Impress.XMLExporter" },
|
||||
|
||||
aInfos.push_back( new application_info_impl(
|
||||
"com.sun.star.drawing.DrawingDocument",
|
||||
{ "com.sun.star.drawing.DrawingDocument",
|
||||
STR_APPL_NAME_DRAW,
|
||||
"com.sun.star.comp.Draw.XMLImporter",
|
||||
"com.sun.star.comp.Draw.XMLExporter" ) );
|
||||
"com.sun.star.comp.Draw.XMLExporter" },
|
||||
|
||||
// --- oasis file formats...
|
||||
aInfos.push_back( new application_info_impl(
|
||||
"com.sun.star.text.TextDocument",
|
||||
{ "com.sun.star.text.TextDocument",
|
||||
STR_APPL_NAME_OASIS_WRITER,
|
||||
"com.sun.star.comp.Writer.XMLOasisImporter",
|
||||
"com.sun.star.comp.Writer.XMLOasisExporter" ) );
|
||||
"com.sun.star.comp.Writer.XMLOasisExporter" },
|
||||
|
||||
aInfos.push_back( new application_info_impl(
|
||||
"com.sun.star.sheet.SpreadsheetDocument",
|
||||
{ "com.sun.star.sheet.SpreadsheetDocument",
|
||||
STR_APPL_NAME_OASIS_CALC,
|
||||
"com.sun.star.comp.Calc.XMLOasisImporter",
|
||||
"com.sun.star.comp.Calc.XMLOasisExporter" ) );
|
||||
"com.sun.star.comp.Calc.XMLOasisExporter" },
|
||||
|
||||
aInfos.push_back( new application_info_impl(
|
||||
"com.sun.star.presentation.PresentationDocument",
|
||||
{ "com.sun.star.presentation.PresentationDocument",
|
||||
STR_APPL_NAME_OASIS_IMPRESS,
|
||||
"com.sun.star.comp.Impress.XMLOasisImporter",
|
||||
"com.sun.star.comp.Impress.XMLOasisExporter" ) );
|
||||
"com.sun.star.comp.Impress.XMLOasisExporter" },
|
||||
|
||||
aInfos.push_back( new application_info_impl(
|
||||
"com.sun.star.drawing.DrawingDocument",
|
||||
{ "com.sun.star.drawing.DrawingDocument",
|
||||
STR_APPL_NAME_OASIS_DRAW,
|
||||
"com.sun.star.comp.Draw.XMLOasisImporter",
|
||||
"com.sun.star.comp.Draw.XMLOasisExporter" ) );
|
||||
}
|
||||
"com.sun.star.comp.Draw.XMLOasisExporter" },
|
||||
};
|
||||
|
||||
return aInfos;
|
||||
}
|
||||
|
||||
const application_info_impl* getApplicationInfo( const OUString& rServiceName )
|
||||
{
|
||||
std::vector< application_info_impl* >& rInfos = getApplicationInfos();
|
||||
std::vector< application_info_impl > const & rInfos = getApplicationInfos();
|
||||
for (auto const& info : rInfos)
|
||||
{
|
||||
if( rServiceName == info->maXMLExporter ||
|
||||
rServiceName == info->maXMLImporter)
|
||||
if( rServiceName == info.maXMLExporter ||
|
||||
rServiceName == info.maXMLImporter)
|
||||
{
|
||||
return info;
|
||||
return &info;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
|
@@ -34,10 +34,10 @@ XMLFilterTabPageBasic::XMLFilterTabPageBasic(weld::Widget* pPage)
|
||||
{
|
||||
m_xEDDescription->set_size_request(-1, m_xEDDescription->get_height_rows(4));
|
||||
|
||||
std::vector< application_info_impl* >& rInfos = getApplicationInfos();
|
||||
std::vector< application_info_impl > const & rInfos = getApplicationInfos();
|
||||
for (auto const& info : rInfos)
|
||||
{
|
||||
OUString aEntry( info->maDocumentUIName );
|
||||
OUString aEntry( info.maDocumentUIName );
|
||||
m_xCBApplication->append_text( aEntry );
|
||||
}
|
||||
}
|
||||
@@ -92,14 +92,14 @@ void XMLFilterTabPageBasic::FillInfo( filter_info_impl* pInfo )
|
||||
|
||||
if( !pInfo->maDocumentService.isEmpty() )
|
||||
{
|
||||
std::vector< application_info_impl* >& rInfos = getApplicationInfos();
|
||||
std::vector< application_info_impl > const & rInfos = getApplicationInfos();
|
||||
for (auto const& info : rInfos)
|
||||
{
|
||||
if( pInfo->maDocumentService == info->maDocumentUIName )
|
||||
if( pInfo->maDocumentService == info.maDocumentUIName )
|
||||
{
|
||||
pInfo->maDocumentService = info->maDocumentService;
|
||||
pInfo->maExportService = info->maXMLExporter;
|
||||
pInfo->maImportService = info->maXMLImporter;
|
||||
pInfo->maDocumentService = info.maDocumentService;
|
||||
pInfo->maExportService = info.maXMLExporter;
|
||||
pInfo->maImportService = info.maXMLImporter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user