summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/dialogs/hyphen.cxx10
-rw-r--r--cui/source/inc/optlingu.hxx3
-rw-r--r--cui/source/options/optgdlg.cxx8
-rw-r--r--cui/source/options/optlingu.cxx2
-rw-r--r--cui/source/options/treeopt.cxx10
-rw-r--r--sw/inc/swtypes.hxx3
-rw-r--r--sw/source/core/bastyp/swtypes.cxx2
-rw-r--r--sw/source/core/doc/docedt.cxx1
-rw-r--r--sw/source/core/edit/edlingu.cxx1
-rw-r--r--sw/source/core/txtnode/txtedt.cxx2
-rw-r--r--sw/source/ui/lingu/hyp.cxx6
-rw-r--r--sw/source/ui/uiview/view0.cxx5
-rw-r--r--sw/source/ui/uiview/viewling.cxx14
13 files changed, 28 insertions, 39 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));
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
index 4b41e45bfc44..98c156761e89 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -30,6 +30,7 @@
namespace com { namespace sun { namespace star {
namespace linguistic2{
class XDictionaryList;
+ class XLinguProperties;
class XSpellChecker1;
class XHyphenator;
class XThesaurus;
@@ -161,7 +162,7 @@ extern ResMgr* pSwResMgr; // Is in swapp0.cxx.
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XThesaurus > GetThesaurus();
::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySet > GetLinguPropertySet();
+ ::com::sun::star::linguistic2::XLinguProperties > GetLinguPropertySet();
// Returns the twip size of this graphic.
SW_DLLPUBLIC Size GetGraphicSizeTwip( const Graphic&, OutputDevice* pOutDev );
diff --git a/sw/source/core/bastyp/swtypes.cxx b/sw/source/core/bastyp/swtypes.cxx
index d4a49a9cbd3d..9f559d38f483 100644
--- a/sw/source/core/bastyp/swtypes.cxx
+++ b/sw/source/core/bastyp/swtypes.cxx
@@ -114,7 +114,7 @@ uno::Reference< linguistic2::XThesaurus > GetThesaurus()
return LinguMgr::GetThesaurus();
}
-uno::Reference< beans::XPropertySet > GetLinguPropertySet()
+uno::Reference< linguistic2::XLinguProperties > GetLinguPropertySet()
{
return LinguMgr::GetLinguPropertySet();
}
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 883332327f14..1f36b91e8a9b 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -1823,7 +1823,6 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
SwConversionArgs *pConvArgs ) const
{
SwPosition* pSttPos = rPaM.Start(), *pEndPos = rPaM.End();
- uno::Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() );
SwSpellArgs *pSpellArgs = 0;
if (pConvArgs)
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 6bd017e3e693..4a77c702383f 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -313,7 +313,6 @@ void SwSpellIter::Start( SwEditShell *pShell, SwDocPositions eStart,
if( GetSh() )
return;
- uno::Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() );
xSpeller = ::GetSpellChecker();
if ( xSpeller.is() )
_Start( pShell, eStart, eEnd );
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 3ae2f43408be..45f5c7288baa 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -871,8 +871,6 @@ sal_uInt16 SwTxtNode::Spell(SwSpellArgs* pArgs)
// Die Aehnlichkeiten zu SwTxtFrm::_AutoSpell sind beabsichtigt ...
// ACHTUNG: Ev. Bugs in beiden Routinen fixen!
- uno::Reference<beans::XPropertySet> xProp( GetLinguPropertySet() );
-
xub_StrLen nBegin, nEnd;
// modify string according to redline information and hidden text
diff --git a/sw/source/ui/lingu/hyp.cxx b/sw/source/ui/lingu/hyp.cxx
index 82b5e9fbb38e..814e49ace6ba 100644
--- a/sw/source/ui/lingu/hyp.cxx
+++ b/sw/source/ui/lingu/hyp.cxx
@@ -27,6 +27,7 @@
#include <vcl/wrkwin.hxx>
#include <linguistic/lngprops.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/linguistic2/XLinguProperties.hpp>
#include <swwait.hxx>
#include "hyp.hxx"
@@ -54,9 +55,8 @@ SwHyphWrapper::SwHyphWrapper( SwView* pVw,
bInSelection( bSelect ),
bInfoBox( sal_False )
{
- uno::Reference< beans::XPropertySet > xProp( GetLinguPropertySet() );
- bAutomatic = xProp.is() ?
- *(sal_Bool*)xProp->getPropertyValue(UPN_IS_HYPH_AUTO).getValue() : sal_False;
+ uno::Reference< linguistic2::XLinguProperties > xProp( GetLinguPropertySet() );
+ bAutomatic = xProp.is() ? xProp->getIsHyphAuto() : sal_False;
SetHyphen();
}
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index 6863ced87f3b..671ccb3cf94e 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -39,6 +39,7 @@
#include <uivwimp.hxx>
#include <avmedia/mediaplayer.hxx>
#include <swmodule.hxx>
+#include <com/sun/star/linguistic2/XLinguProperties.hpp>
#include <sfx2/objface.hxx>
#include <navipi.hxx>
@@ -356,7 +357,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
}
sal_Bool bFlag = STATE_ON == eState;
- uno::Reference< beans::XPropertySet > xLngProp( ::GetLinguPropertySet() );
+ uno::Reference< linguistic2::XLinguProperties > xLngProp( ::GetLinguPropertySet() );
switch ( nSlot )
{
@@ -503,7 +504,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
aCfg.SetProperty( aPropName, aVal );
if (xLngProp.is())
- xLngProp->setPropertyValue( aPropName, aVal );
+ xLngProp->setIsSpellAuto( bSet );
// for the time being we do not have a specific option for grammarchecking.
// thus we'll use the one for spell checking...
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 1e524c328833..98d0dfc306f9 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -270,9 +270,8 @@ void SwView::SpellStart( SvxSpellArea eWhich,
bool bStartDone, bool bEndDone,
SwConversionArgs *pConvArgs )
{
- Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() );
- sal_Bool bIsWrapReverse = (!pConvArgs && xProp.is()) ?
- *(sal_Bool*)xProp->getPropertyValue( UPN_IS_WRAP_REVERSE ).getValue() : sal_False;
+ Reference< XLinguProperties > xProp = ::GetLinguPropertySet();
+ sal_Bool bIsWrapReverse = (!pConvArgs && xProp.is()) ? xProp->getIsWrapReverse() : sal_False;
SwDocPositions eStart = DOCPOS_START;
SwDocPositions eEnde = DOCPOS_END;
@@ -451,13 +450,12 @@ void SwView::HyphenateDocument()
sal_Bool bOldIdle = pVOpt->IsIdle();
pVOpt->SetIdle( sal_False );
- Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() );
+ Reference< XLinguProperties > xProp( ::GetLinguPropertySet() );
m_pWrtShell->StartUndo(UNDO_INSATTR); // spaeter gueltig
- sal_Bool bHyphSpecial = xProp.is() ?
- *(sal_Bool*)xProp->getPropertyValue( UPN_IS_HYPH_SPECIAL ).getValue() : sal_False;
+ sal_Bool bHyphSpecial = xProp.is() ? xProp->getIsHyphSpecial() : sal_False;
sal_Bool bSelection = ((SwCrsrShell*)m_pWrtShell)->HasSelection() ||
m_pWrtShell->GetCrsr() != m_pWrtShell->GetCrsr()->GetNext();
sal_Bool bOther = m_pWrtShell->HasOtherCnt() && bHyphSpecial && !bSelection;
@@ -473,9 +471,7 @@ void SwView::HyphenateDocument()
bOther = sal_True;
if (xProp.is())
{
- sal_Bool bTrue = sal_True;
- Any aTmp(&bTrue, ::getBooleanCppuType());
- xProp->setPropertyValue( UPN_IS_HYPH_SPECIAL, aTmp );
+ xProp->setIsHyphSpecial( sal_True );
}
}
else