diff options
author | Noel Grandin <noel@peralex.com> | 2013-05-14 15:54:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-05-15 08:25:38 +0200 |
commit | 3e563377333881efa60aaa93d2feeaf647cf19ff (patch) | |
tree | 4e3260d11424a9b36ea11fdd56c0be02c27fc452 /cui | |
parent | 6f2a33332d401ef5d9f08dd9c079383283cd8910 (diff) |
fdo#46808, More LinguProperties fun
Change-Id: Ia3173e980370f532fcabc8f1c7a913e5d66d6d8a
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/hyphen.cxx | 10 | ||||
-rw-r--r-- | cui/source/inc/optlingu.hxx | 3 | ||||
-rw-r--r-- | cui/source/options/optgdlg.cxx | 8 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/treeopt.cxx | 10 |
5 files changed, 14 insertions, 19 deletions
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index e7bfc03a3d5c..7e4e72474045 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -360,19 +360,15 @@ IMPL_LINK( SvxHyphenWordDialog, HyphenateAllHdl_Impl, Button *, EMPTYARG /*pButt { try { - uno::Reference< beans::XPropertySet > xProp( SvxGetLinguPropertySet() ); - const OUString aName( "IsHyphAuto" ); - uno::Any aAny; + uno::Reference< linguistic2::XLinguProperties > xProp( SvxGetLinguPropertySet() ); - aAny <<= sal_True; - xProp->setPropertyValue( aName, aAny ); + xProp->setIsHyphAuto( sal_True ); bBusy = sal_True; ContinueHyph_Impl( /*nHyphPos*/nOldPos ); bBusy = sal_False; - aAny <<= sal_False; - xProp->setPropertyValue( aName, aAny ); + xProp->setIsHyphAuto( sal_False ); } catch (uno::Exception &e) { diff --git a/cui/source/inc/optlingu.hxx b/cui/source/inc/optlingu.hxx index abafc3941cff..ee6c51cbf55f 100644 --- a/cui/source/inc/optlingu.hxx +++ b/cui/source/inc/optlingu.hxx @@ -38,6 +38,7 @@ namespace beans{ namespace linguistic2{ class XDictionary; class XDictionaryList; + class XLinguProperties; }}}} class SvTreeListEntry; @@ -123,7 +124,7 @@ private: String sHyphSpecial; com::sun::star::uno::Reference< - com::sun::star::beans::XPropertySet > xProp; + com::sun::star::linguistic2::XLinguProperties > xProp; com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionaryList > xDicList; diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 86e6f48017e2..7a3a9e3893ad 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1349,7 +1349,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) pLangConfig->aSysLocaleOptions.SetDatePatternsConfigString( aDatePatternsED.GetText()); SfxObjectShell* pCurrentDocShell = SfxObjectShell::Current(); - Reference< XPropertySet > xLinguProp( LinguMgr::GetLinguPropertySet(), UNO_QUERY ); + Reference< css::linguistic2::XLinguProperties > xLinguProp = LinguMgr::GetLinguPropertySet(); sal_Bool bCurrentDocCBChecked = aCurrentDocCB.IsChecked(); if(aCurrentDocCB.IsEnabled()) bLanguageCurrentDoc_Impl = bCurrentDocCBChecked; @@ -1367,7 +1367,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) OUString aPropName( "DefaultLocale" ); pLangConfig->aLinguConfig.SetProperty( aPropName, aValue ); if (xLinguProp.is()) - xLinguProp->setPropertyValue( aPropName, aValue ); + xLinguProp->setDefaultLocale( aLocale ); } if(pCurrentDocShell) { @@ -1387,7 +1387,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) OUString aPropName( "DefaultLocale_CJK" ); pLangConfig->aLinguConfig.SetProperty( aPropName, aValue ); if (xLinguProp.is()) - xLinguProp->setPropertyValue( aPropName, aValue ); + xLinguProp->setDefaultLocale_CJK( aLocale ); } if(pCurrentDocShell) { @@ -1407,7 +1407,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) OUString aPropName( "DefaultLocale_CTL" ); pLangConfig->aLinguConfig.SetProperty( aPropName, aValue ); if (xLinguProp.is()) - xLinguProp->setPropertyValue( aPropName, aValue ); + xLinguProp->setDefaultLocale_CTL( aLocale ); } if(pCurrentDocShell) { diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 75fd722cfcc7..303a89f986e8 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1117,7 +1117,7 @@ SvxLinguTabPage::SvxLinguTabPage( Window* pParent, aLinguDicsEditPB.SetAccessibleName(sAccessibleNameDicsEdit); aLinguOptionsEditPB.SetAccessibleName(sAccessibleNameOptionEdit); - xProp = uno::Reference< XPropertySet >( SvxGetLinguPropertySet(), UNO_QUERY ); + xProp = SvxGetLinguPropertySet(); xDicList = uno::Reference< XDictionaryList >( SvxGetDictionaryList(), UNO_QUERY ); if (xDicList.is()) { diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 6d31b469d078..ac4ab975746a 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1203,7 +1203,7 @@ OfaPageResource::OfaPageResource() : SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) { - Reference< XPropertySet > xProp( SvxGetLinguPropertySet() ); + Reference< XLinguProperties > xProp( SvxGetLinguPropertySet() ); SfxItemSet* pRet = 0; switch(nId) { @@ -1267,10 +1267,8 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) nMinTrail = 2; if (xProp.is()) { - xProp->getPropertyValue( OUString( - UPN_HYPH_MIN_LEADING) ) >>= nMinLead; - xProp->getPropertyValue( OUString( - UPN_HYPH_MIN_TRAILING) ) >>= nMinTrail; + nMinLead = xProp->getHyphMinLeading(); + nMinTrail = xProp->getHyphMinTrailing(); } aHyphen.GetMinLead() = (sal_uInt8)nMinLead; aHyphen.GetMinTrail() = (sal_uInt8)nMinTrail; @@ -1300,7 +1298,7 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId ) sal_Bool bVal = sal_False; if (xProp.is()) { - xProp->getPropertyValue( OUString( UPN_IS_SPELL_AUTO) ) >>= bVal; + bVal = xProp->getIsSpellAuto(); } pRet->Put(SfxBoolItem(SID_AUTOSPELL_CHECK, bVal)); |