Kaydet (Commit) 708cab47 authored tarafından Noel Grandin's avatar Noel Grandin

fdo#46808, propogate XLinguProperties through some more code

Change-Id: I89258875094e9731921fcafdc903278ca8f95aa8
üst c75a46fb
...@@ -101,7 +101,7 @@ public: ...@@ -101,7 +101,7 @@ public:
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > &rxSource, ::com::sun::star::uno::XInterface > &rxSource,
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > &rxPropSet, ::com::sun::star::linguistic2::XLinguProperties > &rxPropSet,
int nAllowedEvents ); int nAllowedEvents );
virtual ~PropertyChgHelper(); virtual ~PropertyChgHelper();
...@@ -161,7 +161,7 @@ public: ...@@ -161,7 +161,7 @@ public:
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > &rxSource, ::com::sun::star::uno::XInterface > &rxSource,
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > &rxPropSet ); ::com::sun::star::linguistic2::XLinguProperties > &rxPropSet );
virtual ~PropertyHelper_Thes(); virtual ~PropertyHelper_Thes();
// XPropertyChangeListener // XPropertyChangeListener
...@@ -184,7 +184,7 @@ public: ...@@ -184,7 +184,7 @@ public:
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > &rxSource, ::com::sun::star::uno::XInterface > &rxSource,
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > &rxPropSet ); ::com::sun::star::linguistic2::XLinguProperties > &rxPropSet );
~PropertyHelper_Thesaurus(); ~PropertyHelper_Thesaurus();
void AddAsPropListener(); void AddAsPropListener();
void RemoveAsPropListener(); void RemoveAsPropListener();
...@@ -223,7 +223,7 @@ public: ...@@ -223,7 +223,7 @@ public:
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > &rxSource, ::com::sun::star::uno::XInterface > &rxSource,
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > &rxPropSet ); ::com::sun::star::linguistic2::XLinguProperties > &rxPropSet );
virtual ~PropertyHelper_Spell(); virtual ~PropertyHelper_Spell();
virtual void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals ); virtual void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals );
...@@ -256,7 +256,7 @@ public: ...@@ -256,7 +256,7 @@ public:
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > &rxSource, ::com::sun::star::uno::XInterface > &rxSource,
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > &rxPropSet ); ::com::sun::star::linguistic2::XLinguProperties > &rxPropSet );
~PropertyHelper_Spelling(); ~PropertyHelper_Spelling();
void AddAsPropListener(); void AddAsPropListener();
...@@ -305,7 +305,7 @@ public: ...@@ -305,7 +305,7 @@ public:
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > &rxSource, ::com::sun::star::uno::XInterface > &rxSource,
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > &rxPropSet); ::com::sun::star::linguistic2::XLinguProperties > &rxPropSet);
virtual ~PropertyHelper_Hyphen(); virtual ~PropertyHelper_Hyphen();
virtual void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals ); virtual void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals );
...@@ -334,7 +334,7 @@ public: ...@@ -334,7 +334,7 @@ public:
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > &rxSource, ::com::sun::star::uno::XInterface > &rxSource,
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > &rxPropSet); ::com::sun::star::linguistic2::XLinguProperties > &rxPropSet);
~PropertyHelper_Hyphenation(); ~PropertyHelper_Hyphenation();
void AddAsPropListener(); void AddAsPropListener();
......
...@@ -96,7 +96,7 @@ PropertyHelper_Hyphenation& Hyphenator::GetPropHelper_Impl() ...@@ -96,7 +96,7 @@ PropertyHelper_Hyphenation& Hyphenator::GetPropHelper_Impl()
{ {
if (!pPropHelper) if (!pPropHelper)
{ {
Reference< XPropertySet > xPropSet( GetLinguProperties(), UNO_QUERY ); Reference< XLinguProperties > xPropSet( GetLinguProperties(), UNO_QUERY );
pPropHelper = new PropertyHelper_Hyphenation ((XHyphenator *) this, xPropSet ); pPropHelper = new PropertyHelper_Hyphenation ((XHyphenator *) this, xPropSet );
pPropHelper->AddAsPropListener(); //! after a reference is established pPropHelper->AddAsPropListener(); //! after a reference is established
...@@ -790,7 +790,7 @@ void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments ) ...@@ -790,7 +790,7 @@ void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments )
sal_Int32 nLen = rArguments.getLength(); sal_Int32 nLen = rArguments.getLength();
if (2 == nLen) if (2 == nLen)
{ {
Reference< XPropertySet > xPropSet; Reference< XLinguProperties > xPropSet;
rArguments.getConstArray()[0] >>= xPropSet; rArguments.getConstArray()[0] >>= xPropSet;
//rArguments.getConstArray()[1] >>= xDicList; //rArguments.getConstArray()[1] >>= xDicList;
......
...@@ -83,7 +83,7 @@ PropertyHelper_Spell & MacSpellChecker::GetPropHelper_Impl() ...@@ -83,7 +83,7 @@ PropertyHelper_Spell & MacSpellChecker::GetPropHelper_Impl()
{ {
if (!pPropHelper) if (!pPropHelper)
{ {
Reference< XPropertySet > xPropSet( GetLinguProperties(), UNO_QUERY ); Reference< XLinguProperties > xPropSet( GetLinguProperties(), UNO_QUERY );
pPropHelper = new PropertyHelper_Spell( (XSpellChecker *) this, xPropSet ); pPropHelper = new PropertyHelper_Spell( (XSpellChecker *) this, xPropSet );
xPropHelper = pPropHelper; xPropHelper = pPropHelper;
......
...@@ -97,7 +97,7 @@ PropertyHelper_Spelling & SpellChecker::GetPropHelper_Impl() ...@@ -97,7 +97,7 @@ PropertyHelper_Spelling & SpellChecker::GetPropHelper_Impl()
{ {
if (!pPropHelper) if (!pPropHelper)
{ {
Reference< XPropertySet > xPropSet( GetLinguProperties(), UNO_QUERY ); Reference< XLinguProperties > xPropSet( GetLinguProperties(), UNO_QUERY );
pPropHelper = new PropertyHelper_Spelling( (XSpellChecker *) this, xPropSet ); pPropHelper = new PropertyHelper_Spelling( (XSpellChecker *) this, xPropSet );
pPropHelper->AddAsPropListener(); //! after a reference is established pPropHelper->AddAsPropListener(); //! after a reference is established
...@@ -571,7 +571,7 @@ void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments ) ...@@ -571,7 +571,7 @@ void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments )
sal_Int32 nLen = rArguments.getLength(); sal_Int32 nLen = rArguments.getLength();
if (2 == nLen) if (2 == nLen)
{ {
Reference< XPropertySet > xPropSet; Reference< XLinguProperties > xPropSet;
rArguments.getConstArray()[0] >>= xPropSet; rArguments.getConstArray()[0] >>= xPropSet;
//rArguments.getConstArray()[1] >>= xDicList; //rArguments.getConstArray()[1] >>= xDicList;
......
...@@ -120,7 +120,7 @@ PropertyHelper_Thesaurus& Thesaurus::GetPropHelper_Impl() ...@@ -120,7 +120,7 @@ PropertyHelper_Thesaurus& Thesaurus::GetPropHelper_Impl()
{ {
if (!pPropHelper) if (!pPropHelper)
{ {
Reference< XPropertySet > xPropSet( GetLinguProperties(), UNO_QUERY ); Reference< XLinguProperties > xPropSet( GetLinguProperties(), UNO_QUERY );
pPropHelper = new PropertyHelper_Thesaurus( (XThesaurus *) this, xPropSet ); pPropHelper = new PropertyHelper_Thesaurus( (XThesaurus *) this, xPropSet );
pPropHelper->AddAsPropListener(); //! after a reference is established pPropHelper->AddAsPropListener(); //! after a reference is established
...@@ -554,7 +554,7 @@ void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments ) ...@@ -554,7 +554,7 @@ void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments )
sal_Int32 nLen = rArguments.getLength(); sal_Int32 nLen = rArguments.getLength();
if (1 == nLen) if (1 == nLen)
{ {
Reference< XPropertySet > xPropSet; Reference< XLinguProperties > xPropSet;
rArguments.getConstArray()[0] >>= xPropSet; rArguments.getConstArray()[0] >>= xPropSet;
//! Pointer allows for access of the non-UNO functions. //! Pointer allows for access of the non-UNO functions.
......
...@@ -56,7 +56,7 @@ static int nCHCount = sizeof(aCH) / sizeof(aCH[0]); ...@@ -56,7 +56,7 @@ static int nCHCount = sizeof(aCH) / sizeof(aCH[0]);
PropertyChgHelper::PropertyChgHelper( PropertyChgHelper::PropertyChgHelper(
const Reference< XInterface > &rxSource, const Reference< XInterface > &rxSource,
Reference< XPropertySet > &rxPropSet, Reference< XLinguProperties > &rxPropSet,
int nAllowedEvents ) : int nAllowedEvents ) :
PropertyChgHelperBase(), PropertyChgHelperBase(),
aPropNames (nCHCount), aPropNames (nCHCount),
...@@ -335,7 +335,7 @@ sal_Bool SAL_CALL ...@@ -335,7 +335,7 @@ sal_Bool SAL_CALL
PropertyHelper_Thes::PropertyHelper_Thes( PropertyHelper_Thes::PropertyHelper_Thes(
const Reference< XInterface > &rxSource, const Reference< XInterface > &rxSource,
Reference< XPropertySet > &rxPropSet ) : Reference< XLinguProperties > &rxPropSet ) :
PropertyChgHelper ( rxSource, rxPropSet, 0 ) PropertyChgHelper ( rxSource, rxPropSet, 0 )
{ {
SetDefaultValues(); SetDefaultValues();
...@@ -370,7 +370,7 @@ static const char *aSP[] = ...@@ -370,7 +370,7 @@ static const char *aSP[] =
PropertyHelper_Spell::PropertyHelper_Spell( PropertyHelper_Spell::PropertyHelper_Spell(
const Reference< XInterface > & rxSource, const Reference< XInterface > & rxSource,
Reference< XPropertySet > &rxPropSet ) : Reference< XLinguProperties > &rxPropSet ) :
PropertyChgHelper ( rxSource, rxPropSet, AE_SPELLCHECKER ) PropertyChgHelper ( rxSource, rxPropSet, AE_SPELLCHECKER )
{ {
AddPropNames( aSP, sizeof(aSP) / sizeof(aSP[0]) ); AddPropNames( aSP, sizeof(aSP) / sizeof(aSP[0]) );
...@@ -558,7 +558,7 @@ static const char *aHP[] = ...@@ -558,7 +558,7 @@ static const char *aHP[] =
PropertyHelper_Hyphen::PropertyHelper_Hyphen( PropertyHelper_Hyphen::PropertyHelper_Hyphen(
const Reference< XInterface > & rxSource, const Reference< XInterface > & rxSource,
Reference< XPropertySet > &rxPropSet ) : Reference< XLinguProperties > &rxPropSet ) :
PropertyChgHelper ( rxSource, rxPropSet, AE_HYPHENATOR ) PropertyChgHelper ( rxSource, rxPropSet, AE_HYPHENATOR )
{ {
AddPropNames( aHP, sizeof(aHP) / sizeof(aHP[0]) ); AddPropNames( aHP, sizeof(aHP) / sizeof(aHP[0]) );
...@@ -703,7 +703,7 @@ PropertyHelper_Thesaurus::PropertyHelper_Thesaurus( ...@@ -703,7 +703,7 @@ PropertyHelper_Thesaurus::PropertyHelper_Thesaurus(
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > &rxSource, ::com::sun::star::uno::XInterface > &rxSource,
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > &rxPropSet ) ::com::sun::star::linguistic2::XLinguProperties > &rxPropSet )
{ {
pInst = new PropertyHelper_Thes( rxSource, rxPropSet ); pInst = new PropertyHelper_Thes( rxSource, rxPropSet );
xPropHelper = pInst; xPropHelper = pInst;
...@@ -732,7 +732,7 @@ PropertyHelper_Hyphenation::PropertyHelper_Hyphenation( ...@@ -732,7 +732,7 @@ PropertyHelper_Hyphenation::PropertyHelper_Hyphenation(
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > &rxSource, ::com::sun::star::uno::XInterface > &rxSource,
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > &rxPropSet) ::com::sun::star::linguistic2::XLinguProperties > &rxPropSet)
{ {
pInst = new PropertyHelper_Hyphen( rxSource, rxPropSet ); pInst = new PropertyHelper_Hyphen( rxSource, rxPropSet );
xPropHelper = pInst; xPropHelper = pInst;
...@@ -792,7 +792,7 @@ PropertyHelper_Spelling::PropertyHelper_Spelling( ...@@ -792,7 +792,7 @@ PropertyHelper_Spelling::PropertyHelper_Spelling(
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > &rxSource, ::com::sun::star::uno::XInterface > &rxSource,
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > &rxPropSet ) ::com::sun::star::linguistic2::XLinguProperties > &rxPropSet )
{ {
pInst = new PropertyHelper_Spell( rxSource, rxPropSet ); pInst = new PropertyHelper_Spell( rxSource, rxPropSet );
xPropHelper = pInst; xPropHelper = pInst;
......
...@@ -60,7 +60,7 @@ class SpellCheckerDispatcher : ...@@ -60,7 +60,7 @@ class SpellCheckerDispatcher :
LinguOptions aOpt; LinguOptions aOpt;
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > xPropSet; ::com::sun::star::linguistic2::XLinguProperties > xPropSet;
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSearchableDictionaryList > xDicList; ::com::sun::star::linguistic2::XSearchableDictionaryList > xDicList;
...@@ -75,7 +75,7 @@ class SpellCheckerDispatcher : ...@@ -75,7 +75,7 @@ class SpellCheckerDispatcher :
inline linguistic::SpellCache & GetCache() const; inline linguistic::SpellCache & GetCache() const;
inline ::com::sun::star::uno::Reference< inline ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > ::com::sun::star::linguistic2::XLinguProperties >
GetPropSet(); GetPropSet();
inline ::com::sun::star::uno::Reference< inline ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSearchableDictionaryList > ::com::sun::star::linguistic2::XSearchableDictionaryList >
...@@ -137,7 +137,7 @@ inline linguistic::SpellCache & SpellCheckerDispatcher::GetCache() const ...@@ -137,7 +137,7 @@ inline linguistic::SpellCache & SpellCheckerDispatcher::GetCache() const
inline ::com::sun::star::uno::Reference< inline ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > ::com::sun::star::linguistic2::XLinguProperties >
SpellCheckerDispatcher::GetPropSet() SpellCheckerDispatcher::GetPropSet()
{ {
return xPropSet.is() ? return xPropSet.is() ?
......
...@@ -58,14 +58,14 @@ class ThesaurusDispatcher : ...@@ -58,14 +58,14 @@ class ThesaurusDispatcher :
ThesSvcByLangMap_t aSvcMap; ThesSvcByLangMap_t aSvcMap;
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > xPropSet; ::com::sun::star::linguistic2::XLinguProperties > xPropSet;
// disallow copy-constructor and assignment-operator for now // disallow copy-constructor and assignment-operator for now
ThesaurusDispatcher(const ThesaurusDispatcher &); ThesaurusDispatcher(const ThesaurusDispatcher &);
ThesaurusDispatcher & operator = (const ThesaurusDispatcher &); ThesaurusDispatcher & operator = (const ThesaurusDispatcher &);
inline ::com::sun::star::uno::Reference< inline ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > ::com::sun::star::linguistic2::XLinguProperties >
GetPropSet(); GetPropSet();
void ClearSvcList(); void ClearSvcList();
...@@ -106,7 +106,7 @@ public: ...@@ -106,7 +106,7 @@ public:
inline ::com::sun::star::uno::Reference< inline ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > ::com::sun::star::linguistic2::XLinguProperties >
ThesaurusDispatcher::GetPropSet() ThesaurusDispatcher::GetPropSet()
{ {
return xPropSet.is() ? return xPropSet.is() ?
......
...@@ -70,7 +70,7 @@ PropertyHelper_Spell & SpellChecker::GetPropHelper_Impl() ...@@ -70,7 +70,7 @@ PropertyHelper_Spell & SpellChecker::GetPropHelper_Impl()
{ {
if (!pPropHelper) if (!pPropHelper)
{ {
Reference< XPropertySet > xPropSet( GetLinguProperties(), UNO_QUERY ); Reference< XLinguProperties > xPropSet = GetLinguProperties();
pPropHelper = new PropertyHelper_Spell( (XSpellChecker *) this, xPropSet ); pPropHelper = new PropertyHelper_Spell( (XSpellChecker *) this, xPropSet );
xPropHelper = pPropHelper; xPropHelper = pPropHelper;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment