summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-02-20 00:23:31 +0100
committerEike Rathke <erack@redhat.com>2016-02-20 00:39:30 +0100
commit9f0fa7e5316509d73e3384a3b23b61a8a2d27f7c (patch)
treeed723ebb2ba5e38289f652255cc3ae4d323b8a09
parent91dd7a67d1b64d56fc00b19db102731a91f220f7 (diff)
add Wildcards UNO API implementation, tdf#72196
Change-Id: I3dbca9661b55596484ac77f92243fd463fa01ec9
-rw-r--r--sc/inc/optuno.hxx1
-rw-r--r--sc/inc/unonames.hxx2
-rw-r--r--sc/source/ui/unoobj/docuno.cxx2
-rw-r--r--sc/source/ui/unoobj/optuno.cxx7
4 files changed, 12 insertions, 0 deletions
diff --git a/sc/inc/optuno.hxx b/sc/inc/optuno.hxx
index d2d2bcef59d3..b75fb3c58e8f 100644
--- a/sc/inc/optuno.hxx
+++ b/sc/inc/optuno.hxx
@@ -35,6 +35,7 @@
#define PROP_UNO_SPELLONLINE 10
#define PROP_UNO_STANDARDDEC 11
#define PROP_UNO_REGEXENABLED 12
+#define PROP_UNO_WILDCARDSENABLED 13
class ScDocOptionsHelper
{
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 59398959387e..c03178943fe7 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -278,6 +278,7 @@
#define SC_UNONAME_ISUSER "IsUserDefined"
#define SC_UNONAME_ISNATIVE "IsNative"
#define SC_UNONAME_REGEXP "RegularExpressions"
+#define SC_UNONAME_WILDCARDS "Wildcards"
#define SC_UNONAME_SAVEOUT "SaveOutputPosition"
#define SC_UNONAME_SKIPDUP "SkipDuplicates"
#define SC_UNONAME_SRCOBJ "SourceObject"
@@ -498,6 +499,7 @@
#define SC_UNO_SPELLONLINE "SpellOnline"
#define SC_UNO_STANDARDDEC "StandardDecimals"
#define SC_UNO_REGEXENABLED "RegularExpressions"
+#define SC_UNO_WILDCARDSENABLED "Wildcards"
#define SC_UNO_BASICLIBRARIES "BasicLibraries"
#define SC_UNO_DIALOGLIBRARIES "DialogLibraries"
#define SC_UNO_RUNTIMEUID "RuntimeUID"
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 7620b632f053..cdb8682ebb50 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -158,6 +158,7 @@ static const SfxItemPropertyMapEntry* lcl_GetDocOptPropertyMap()
{OUString(SC_UNO_SPELLONLINE), PROP_UNO_SPELLONLINE, cppu::UnoType<bool>::get(), 0, 0},
{OUString(SC_UNO_STANDARDDEC), PROP_UNO_STANDARDDEC, cppu::UnoType<sal_Int16>::get(), 0, 0},
{OUString(SC_UNO_REGEXENABLED), PROP_UNO_REGEXENABLED, cppu::UnoType<bool>::get(), 0, 0},
+ {OUString(SC_UNO_WILDCARDSENABLED), PROP_UNO_WILDCARDSENABLED, cppu::UnoType<bool>::get(), 0, 0},
{OUString(SC_UNO_RUNTIMEUID), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0},
{OUString(SC_UNO_HASVALIDSIGNATURES), 0, cppu::UnoType<bool>::get(), beans::PropertyAttribute::READONLY, 0},
{OUString(SC_UNO_ISLOADED), 0, cppu::UnoType<bool>::get(), 0, 0},
@@ -2102,6 +2103,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
// done...
if ( aString == SC_UNO_IGNORECASE ||
aString == SC_UNONAME_REGEXP ||
+ aString == SC_UNONAME_WILDCARDS ||
aString == SC_UNO_LOOKUPLABELS )
bHardRecalc = false;
}
diff --git a/sc/source/ui/unoobj/optuno.cxx b/sc/source/ui/unoobj/optuno.cxx
index b158b0e7a2df..a78d6185c0d1 100644
--- a/sc/source/ui/unoobj/optuno.cxx
+++ b/sc/source/ui/unoobj/optuno.cxx
@@ -44,6 +44,7 @@ const SfxItemPropertyMapEntry* ScDocOptionsHelper::GetPropertyMap()
{OUString(SC_UNO_SPELLONLINE), PROP_UNO_SPELLONLINE , cppu::UnoType<bool>::get(), 0, 0},
{OUString(SC_UNO_STANDARDDEC), PROP_UNO_STANDARDDEC , cppu::UnoType<sal_Int16>::get(), 0, 0},
{OUString(SC_UNO_REGEXENABLED), PROP_UNO_REGEXENABLED, cppu::UnoType<bool>::get(), 0, 0},
+ {OUString(SC_UNO_WILDCARDSENABLED), PROP_UNO_WILDCARDSENABLED, cppu::UnoType<bool>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aMap;
@@ -116,6 +117,9 @@ bool ScDocOptionsHelper::setPropertyValue( ScDocOptions& rOptions,
case PROP_UNO_REGEXENABLED:
rOptions.SetFormulaRegexEnabled( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
break;
+ case PROP_UNO_WILDCARDSENABLED:
+ rOptions.SetFormulaWildcardsEnabled( ScUnoHelpFunctions::GetBoolFromAny( aValue ) );
+ break;
default:;
}
return true;
@@ -173,6 +177,9 @@ uno::Any ScDocOptionsHelper::getPropertyValue(
case PROP_UNO_REGEXENABLED:
ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsFormulaRegexEnabled() );
break;
+ case PROP_UNO_WILDCARDSENABLED:
+ ScUnoHelpFunctions::SetBoolInAny( aRet, rOptions.IsFormulaWildcardsEnabled() );
+ break;
default:;
}
return aRet;