Kaydet (Commit) 7665246a authored tarafından Ashod Nakashian's avatar Ashod Nakashian Kaydeden (comit) Jan Holesovsky

ViewShellBase const correctness

Change-Id: I00bffe23f2f850f5e0cbf63a60aa1600f848edac
(cherry picked from commit 4e6e33870a60a796c17c1e2d67ac6482b853ad28)
Reviewed-on: https://gerrit.libreoffice.org/73479
Tested-by: Jenkins
Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst d8b0774e
......@@ -274,8 +274,7 @@ public:
void SetNewWindowAllowed( bool bSet ) { bNoNewWindow = !bSet; }
void SetController( SfxBaseController* pController );
css::uno::Reference< css::frame::XController >
GetController();
css::uno::Reference<css::frame::XController> GetController() const;
bool TryContextMenuInterception( Menu& rIn, const OUString& rMenuIdentifier, VclPtr<Menu>& rpOut, css::ui::ContextMenuExecuteEvent aEvent );
bool TryContextMenuInterception( Menu& rMenu, const OUString& rMenuIdentifier, css::ui::ContextMenuExecuteEvent aEvent );
......
......@@ -84,7 +84,7 @@ public:
callback is destroyed.
*/
CallbackCaller (
::sd::ViewShellBase& rBase,
const ::sd::ViewShellBase& rBase,
const OUString& rsEventType,
const ::sd::framework::FrameworkHelper::ConfigurationChangeEventFilter& rFilter,
const ::sd::framework::FrameworkHelper::Callback& rCallback);
......@@ -343,7 +343,7 @@ FrameworkHelper::InstanceMap FrameworkHelper::maInstanceMap;
return pHelper;
}
void FrameworkHelper::DisposeInstance (ViewShellBase& rBase)
void FrameworkHelper::DisposeInstance (const ViewShellBase& rBase)
{
InstanceMap::iterator iHelper (maInstanceMap.find(&rBase));
if (iHelper != maInstanceMap.end())
......@@ -352,7 +352,7 @@ void FrameworkHelper::DisposeInstance (ViewShellBase& rBase)
}
}
void FrameworkHelper::ReleaseInstance (ViewShellBase& rBase)
void FrameworkHelper::ReleaseInstance (const ViewShellBase& rBase)
{
InstanceMap::iterator iHelper (maInstanceMap.find(&rBase));
if (iHelper != maInstanceMap.end())
......@@ -830,7 +830,7 @@ namespace {
//===== CallbackCaller ========================================================
CallbackCaller::CallbackCaller (
::sd::ViewShellBase& rBase,
const ::sd::ViewShellBase& rBase,
const OUString& rsEventType,
const ::sd::framework::FrameworkHelper::ConfigurationChangeEventFilter& rFilter,
const ::sd::framework::FrameworkHelper::Callback& rCallback)
......
......@@ -114,14 +114,14 @@ public:
Do not call this method. It is an internally used method that can
not be made private.
*/
static void DisposeInstance (ViewShellBase& rBase);
static void DisposeInstance (const ViewShellBase& rBase);
/** Destroy the FrameworkHelper object for the given ViewShellBase.
Do not call this method. It is an internally used method that can
not be made private.
*/
static void ReleaseInstance (ViewShellBase& rBase);
static void ReleaseInstance (const ViewShellBase& rBase);
/** Return an identifier for the given view URL. This identifier can be
used in a switch statement. See GetViewURL() for a mapping in the
......@@ -299,7 +299,7 @@ public:
private:
typedef ::std::map<
ViewShellBase*,
const ViewShellBase*,
::std::shared_ptr<FrameworkHelper> > InstanceMap;
/** The instance map holds (at least) one FrameworkHelper instance for
every ViewShellBase object.
......
......@@ -1759,7 +1759,7 @@ void SfxViewShell::SetController( SfxBaseController* pController )
pImpl->xClipboardListener = new SfxClipboardChangeListener( this, GetClipboardNotifier() );
}
Reference < XController > SfxViewShell::GetController()
Reference < XController > SfxViewShell::GetController() const
{
return pImpl->m_pController.get();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment