summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-14 15:54:42 +0200
committerNoel Grandin <noel@peralex.com>2013-05-15 08:25:38 +0200
commit3e563377333881efa60aaa93d2feeaf647cf19ff (patch)
tree4e3260d11424a9b36ea11fdd56c0be02c27fc452 /sw/source
parent6f2a33332d401ef5d9f08dd9c079383283cd8910 (diff)
fdo#46808, More LinguProperties fun
Change-Id: Ia3173e980370f532fcabc8f1c7a913e5d66d6d8a
Diffstat (limited to 'sw/source')
-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
7 files changed, 12 insertions, 19 deletions
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