diff options
-rw-r--r-- | include/svx/DescriptionGenerator.hxx | 13 | ||||
-rw-r--r-- | svx/source/accessibility/DescriptionGenerator.cxx | 76 |
2 files changed, 1 insertions, 88 deletions
diff --git a/include/svx/DescriptionGenerator.hxx b/include/svx/DescriptionGenerator.hxx index 8d3010ea5b94..7769a25dbe6a 100644 --- a/include/svx/DescriptionGenerator.hxx +++ b/include/svx/DescriptionGenerator.hxx @@ -44,8 +44,7 @@ public: enum class PropertyType { Color, Integer, - String, - FillStyle + String }; /** Creates a new description generator with an empty description @@ -165,16 +164,6 @@ private: */ SVX_DLLPRIVATE void AddString (const OUString& sPropertyName, const OUString& sLocalizedName, sal_uInt16 nWhichId); - - /** Add a property value formatted as fill style to the description - string. If the fill style is <const>HATCH</const>, - <const>GRADIENT</const>, or <const>BITMAP</const>, then the of the - hatch, gradient, or bitmap is appended as well. - @param sPropertyName - Name of the property. Usually this will be "FillStyle". - */ - SVX_DLLPRIVATE void AddFillStyle (const OUString& sPropertyName, - const OUString& sLocalizedName); }; diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx index cefe8e104fcc..ff5bb21f20eb 100644 --- a/svx/source/accessibility/DescriptionGenerator.cxx +++ b/svx/source/accessibility/DescriptionGenerator.cxx @@ -169,9 +169,6 @@ void DescriptionGenerator::AddProperty (const OUString& sPropertyName, case PropertyType::String: AddString (sPropertyName, sLocalizedName, nWhichId); break; - case PropertyType::FillStyle: - AddFillStyle (sPropertyName, sLocalizedName); - break; } } } @@ -266,79 +263,6 @@ void DescriptionGenerator::AddString (const OUString& sPropertyName, } -void DescriptionGenerator::AddFillStyle (const OUString& sPropertyName, - const OUString& sLocalizedName) -{ - msDescription.append(sLocalizedName); - msDescription.append('='); - - try - { - if (mxSet.is()) - { - uno::Any aValue = mxSet->getPropertyValue (sPropertyName); - drawing::FillStyle aFillStyle; - aValue >>= aFillStyle; - - // Get the fill style name from the resource. - OUString sFillStyleName; - { - SolarMutexGuard aGuard; - switch (aFillStyle) - { - case drawing::FillStyle_NONE: - sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_NONE); - break; - case drawing::FillStyle_SOLID: - sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_SOLID); - break; - case drawing::FillStyle_GRADIENT: - sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_GRADIENT); - break; - case drawing::FillStyle_HATCH: - sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_HATCH); - break; - case drawing::FillStyle_BITMAP: - sFillStyleName = SvxResId(RID_SVXSTR_A11Y_FILLSTYLE_BITMAP); - break; - default: - break; - } - } - msDescription.append (sFillStyleName); - - // Append the appropriate properties. - switch (aFillStyle) - { - case drawing::FillStyle_NONE: - break; - case drawing::FillStyle_SOLID: - AddProperty ("FillColor", PropertyType::Color, SIP_XA_FILLCOLOR); - break; - case drawing::FillStyle_GRADIENT: - AddProperty ("FillGradientName", PropertyType::String, SIP_XA_FILLGRADIENT, - XATTR_FILLGRADIENT); - break; - case drawing::FillStyle_HATCH: - AddProperty ("FillColor", PropertyType::Color, SIP_XA_FILLCOLOR); - AddProperty ("FillHatchName", PropertyType::String, SIP_XA_FILLHATCH, - XATTR_FILLHATCH); - break; - case drawing::FillStyle_BITMAP: - AddProperty ("FillBitmapName", PropertyType::String, SIP_XA_FILLBITMAP, - XATTR_FILLBITMAP); - break; - default: - break; - } - } - } - catch (const css::beans::UnknownPropertyException &) - { - msDescription.append ("<unknown>"); - } -} - } // end of namespace accessibility /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |