summaryrefslogtreecommitdiff
path: root/linguistic/source/lngprophelp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'linguistic/source/lngprophelp.cxx')
-rw-r--r--linguistic/source/lngprophelp.cxx42
1 files changed, 42 insertions, 0 deletions
diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx
index a14c96c9501e..543685dc33c4 100644
--- a/linguistic/source/lngprophelp.cxx
+++ b/linguistic/source/lngprophelp.cxx
@@ -292,6 +292,8 @@ PropertyHelper_Spell::PropertyHelper_Spell(
rPropNames.push_back(UPN_IS_SPELL_UPPER_CASE);
rPropNames.push_back(UPN_IS_SPELL_WITH_DIGITS);
rPropNames.push_back(UPN_IS_SPELL_CAPITALIZATION);
+ rPropNames.push_back(UPN_IS_SPELL_CLOSED_COMPOUND);
+ rPropNames.push_back(UPN_IS_SPELL_HYPHENATED_COMPOUND);
SetDefaultValues();
GetCurrentValues();
}
@@ -309,6 +311,8 @@ void PropertyHelper_Spell::SetDefaultValues()
bResIsSpellUpperCase = bIsSpellUpperCase = false;
bResIsSpellWithDigits = bIsSpellWithDigits = false;
bResIsSpellCapitalization = bIsSpellCapitalization = true;
+ bResIsSpellClosedCompound = bIsSpellClosedCompound = true;
+ bResIsSpellHyphenatedCompound = bIsSpellHyphenatedCompound = true;
}
@@ -340,6 +344,16 @@ void PropertyHelper_Spell::GetCurrentValues()
pbVal = &bIsSpellCapitalization;
pbResVal = &bResIsSpellCapitalization;
}
+ else if ( rPropName == UPN_IS_SPELL_CLOSED_COMPOUND )
+ {
+ pbVal = &bIsSpellClosedCompound;
+ pbResVal = &bResIsSpellClosedCompound;
+ }
+ else if ( rPropName == UPN_IS_SPELL_HYPHENATED_COMPOUND )
+ {
+ pbVal = &bIsSpellHyphenatedCompound;
+ pbResVal = &bResIsSpellHyphenatedCompound;
+ }
if (pbVal && pbResVal)
{
@@ -383,6 +397,20 @@ bool PropertyHelper_Spell::propertyChange_Impl( const PropertyChangeEvent& rEvt
bSWWA = !bSCWA; // sal_True->sal_False change?
break;
}
+ case UPH_IS_SPELL_CLOSED_COMPOUND :
+ {
+ pbVal = &bIsSpellClosedCompound;
+ bSCWA = ! *pbVal; // sal_False->sal_True change?
+ bSWWA = !bSCWA; // sal_True->sal_False change?
+ break;
+ }
+ case UPH_IS_SPELL_HYPHENATED_COMPOUND :
+ {
+ pbVal = &bIsSpellHyphenatedCompound;
+ bSCWA = ! *pbVal; // sal_False->sal_True change?
+ bSWWA = !bSCWA; // sal_True->sal_False change?
+ break;
+ }
default:
SAL_WARN( "linguistic", "unknown property" );
}
@@ -425,6 +453,8 @@ void PropertyHelper_Spell::SetTmpPropVals( const PropertyValues &rPropVals )
// temporary value
bResIsSpellWithDigits = bIsSpellWithDigits;
bResIsSpellCapitalization = bIsSpellCapitalization;
+ bResIsSpellClosedCompound = bIsSpellClosedCompound;
+ bResIsSpellHyphenatedCompound = bIsSpellHyphenatedCompound;
bResIsSpellUpperCase = bIsSpellUpperCase;
for (const PropertyValue& rVal : rPropVals)
@@ -441,6 +471,8 @@ void PropertyHelper_Spell::SetTmpPropVals( const PropertyValues &rPropVals )
case UPH_IS_SPELL_UPPER_CASE : pbResVal = &bResIsSpellUpperCase; break;
case UPH_IS_SPELL_WITH_DIGITS : pbResVal = &bResIsSpellWithDigits; break;
case UPH_IS_SPELL_CAPITALIZATION : pbResVal = &bResIsSpellCapitalization; break;
+ case UPH_IS_SPELL_CLOSED_COMPOUND : pbResVal = &bResIsSpellClosedCompound; break;
+ case UPH_IS_SPELL_HYPHENATED_COMPOUND : pbResVal = &bResIsSpellHyphenatedCompound; break;
default:
SAL_WARN( "linguistic", "unknown property" );
}
@@ -731,6 +763,16 @@ bool PropertyHelper_Spelling::IsSpellCapitalization() const
return mxPropHelper->IsSpellCapitalization();
}
+bool PropertyHelper_Spelling::IsSpellClosedCompound() const
+{
+ return mxPropHelper->IsSpellClosedCompound();
+}
+
+bool PropertyHelper_Spelling::IsSpellHyphenatedCompound() const
+{
+ return mxPropHelper->IsSpellHyphenatedCompound();
+}
+
bool PropertyHelper_Spelling::addLinguServiceEventListener(
const css::uno::Reference<
css::linguistic2::XLinguServiceEventListener >& rxListener )