summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2015-11-17 11:08:46 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2015-11-17 11:10:05 +0100
commit0c48c809f09e74e79c9f8dc4c22958147f591921 (patch)
treebfba7f403290b958d0058ba239e244f42613d2a0 /vcl/source
parent16f85dc485970f34c2abd06fb5379b426d3a83bc (diff)
tdf#95845 Use CommandInfoProvider to receive command properties
Change-Id: I41f9a661b7a5b355e50910d7f58f0d9d55dc62a6
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/helper/commandinfoprovider.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/vcl/source/helper/commandinfoprovider.cxx b/vcl/source/helper/commandinfoprovider.cxx
index 4eef99c1cb61..cb0378c7fd43 100644
--- a/vcl/source/helper/commandinfoprovider.cxx
+++ b/vcl/source/helper/commandinfoprovider.cxx
@@ -214,6 +214,25 @@ Image CommandInfoProvider::GetImageForCommand(const OUString& rsCommandName, boo
return Image();
}
+sal_Int32 CommandInfoProvider::GetPropertiesForCommand (
+ const OUString& rsCommandName,
+ const Reference<frame::XFrame>& rxFrame)
+{
+ SetFrame(rxFrame);
+
+ const Sequence<beans::PropertyValue> aProperties (GetCommandProperties(rsCommandName));
+ for (sal_Int32 nIndex=0; nIndex<aProperties.getLength(); ++nIndex)
+ {
+ if (aProperties[nIndex].Name == "Properties")
+ {
+ sal_Int32 nValue;
+ aProperties[nIndex].Value >>= nValue;
+ return nValue;
+ }
+ }
+ return 0;
+}
+
void CommandInfoProvider::SetFrame (const Reference<frame::XFrame>& rxFrame)
{
if (rxFrame != mxCachedDataFrame)