summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorRohan Kumar <rohankanojia420@gmail.com>2017-01-24 21:18:00 +0530
committerMaxim Monastirsky <momonasmon@gmail.com>2017-02-21 01:39:01 +0200
commit33c51e8002f58847ba43bc111dabc49278e36daf (patch)
treea1e276b24a26d4fe594b08dd47dfdaeda31cd020 /dbaccess
parente25bf8505cfaa3599c2e78a7c56729280f27373e (diff)
tdf#95844 Refactor CommandInfoProvider
Instead of a singleton, CommandInfoProvider should just be a set of static methods. Change-Id: I16d4406e361a72f013d78f18d6bd0ae20c0cc5e9
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx4
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index ac36ea17bc1d..1e9ca0663138 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -197,7 +197,7 @@ OAppDetailPageHelper::OAppDetailPageHelper(vcl::Window* _pParent,OAppBorderWindo
m_aTBPreview->SetOutStyle(TOOLBOX_STYLE_FLAT);
m_aTBPreview->InsertItem(SID_DB_APP_DISABLE_PREVIEW,
- vcl::CommandInfoProvider::Instance().GetCommandPropertyFromModule(".uno:DBDisablePreview", "com.sun.star.sdb.OfficeDatabaseDocument"),
+ vcl::CommandInfoProvider::GetCommandPropertyFromModule(".uno:DBDisablePreview", "com.sun.star.sdb.OfficeDatabaseDocument"),
ToolBoxItemBits::LEFT|ToolBoxItemBits::DROPDOWN|ToolBoxItemBits::AUTOSIZE|ToolBoxItemBits::RADIOCHECK);
m_aTBPreview->SetHelpId(HID_APP_VIEW_PREVIEW_CB);
m_aTBPreview->SetDropdownClickHdl( LINK( this, OAppDetailPageHelper, OnDropdownClickHdl ) );
@@ -995,7 +995,7 @@ void OAppDetailPageHelper::switchPreview(PreviewMode _eMode,bool _bForce)
break;
}
- OUString aCommandLabel = vcl::CommandInfoProvider::Instance().GetCommandPropertyFromModule(aCommand, "com.sun.star.sdb.OfficeDatabaseDocument");
+ OUString aCommandLabel = vcl::CommandInfoProvider::GetCommandPropertyFromModule(aCommand, "com.sun.star.sdb.OfficeDatabaseDocument");
m_aTBPreview->SetItemText(SID_DB_APP_DISABLE_PREVIEW, stripTrailingDots(aCommandLabel));
Resize();
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index daac412787e3..dff3368f5528 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -118,7 +118,7 @@ namespace dbaui
m_sModule = OUString::createFromAscii( _pAsciiModuleName );
// our label should equal the UI text of the "Open" command
- OUString sLabel(vcl::CommandInfoProvider::Instance().GetCommandPropertyFromModule(".uno:Open", m_sModule));
+ OUString sLabel(vcl::CommandInfoProvider::GetCommandPropertyFromModule(".uno:Open", m_sModule));
SetText(" " + sLabel.replaceAll("~", ""));
// Place icon left of text and both centered in the button.