[API CHANGE] remove css::drawing::framework::XResourceId

internal to sd, no need for it to use UNO

Change-Id: I9cbf069e9697d70f8d54da48cc265dcee8965d71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186893
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2025-06-26 07:52:34 +02:00
parent 83ed6aa69c
commit 401e886528
93 changed files with 506 additions and 615 deletions
-1
View File
@@ -2363,7 +2363,6 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/drawing,\
))
$(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/drawing/framework,\
AnchorBindingMode \
XResourceId \
))
$(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/embed,\
Actions \
@@ -1,136 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
module com { module sun { module star { module drawing { module framework {
/** A resource id uses a set of URLs to unambiguously specify a resource of
the drawing framework.
<p>Resources of the drawing framework are panes, views, tool bars, and
command groups. One URL describes the type of the actual resource. A
sequence of URLs (typically one, sometimes two) specifies its anchor,
the resource it is bound to. The anchor typically is a pane (for
views), or it is empty (for panes).</p>
<p>The resource URL may be empty. In this case the anchor is empty,
too. Such an empty resource id does not describe a resource but rather
the absence of one. Instead of an empty XResourceId object
an empty reference can be used in many places.</p>
<p>The resource URL may have arguments that are passed to the factory
method on its creation. Arguments are only available through the
getFullResourceURL(). The getResourceURL() method strips them away.</p>
*/
interface XResourceId
{
/** Return the URL of the resource. Arguments supplied on creation are
stripped away. Use getFullResourceURL() to access them.
*/
string getResourceURL ();
/** Return a URL object of the resource URL that may contain arguments.
*/
com::sun::star::util::URL getFullResourceURL ();
/** Return whether there is a non-empty anchor URL. When this method
returns `FALSE` then getAnchorURLs() will return an empty list.
*/
boolean hasAnchor ();
/** Return a new XResourceId that represents the anchor resource.
*/
XResourceId getAnchor ();
/** Return the, possibly empty, list of anchor URLs. The URLs are
ordered so that the one in position 0 is the direct anchor of the
resource, while the one in position i+1 is the direct anchor of the
one in position i.
*/
sequence<string> getAnchorURLs ();
/** Return the type prefix of the resource URL. This includes all up to
and including the second slash.
*/
string getResourceTypePrefix ();
/** Compare the called XResourceId object with the given
one.
<p>The two resource ids A and B are compared so that if A<B (return
value is -1) then either A and B are unrelated or A is a direct or
indirect anchor of B.</p>
<p>The algorithm for this comparison is quite simple. It uses a
double lexicographic ordering. On the lower level individual URLs
are compared via the lexicographic order defined on strings. On the
higher level two resource ids are compared via a lexicographic order
defined on the URLS. So when there are two resource ids A1.A2
(A1 being the anchor of A2) and B1.B2 then A1.A2<B1.B2 when A1<B1 or
A1==B1 and A2<B2. Resource ids may have different lengths: A1 <
B1.B2 when A1<B1 or A1==B1 (anchors first then resources linked to them.</p>
@param xId
The resource id to which the called resource id is compared.
@return
Returns 0 when the called resource id is
equivalent to the given resource id. Returns <code>-1</code> or
<code>+1</code> when the two compared resource ids differ.
*/
short compareTo (
[in] XResourceId xId);
/** Return whether the anchor of the called resource id object
represents the same resource as the given object.
<p>Note that not only the anchor of the given object is taken into
account. The whole object, including the resource URL, is
interpreted as anchor resource.</p>
@param xAnchorId
The resource id of the anchor.
@param eMode
This mode specifies how the called resource has to be bound to
the given anchor in order to have this function return `TRUE`.
<p>If eMode is DIRECT then the anchor of the called resource id
has to be identical to the given anchor. If eMode is
INDIRECT then the given anchor has to be a part
of the anchor of the called resource.
*/
boolean isBoundTo (
[in] XResourceId xAnchorId,
[in] AnchorBindingMode eMode);
/** Return whether the anchor of the called resource id object
represents the same resource as the given anchor URL. This is a
convenience variant of the isBoundTo() function
that can also be seen as an optimization for the case that the
anchor consists of exactly one URL.
@param AnchorURL
The resource URL of the anchor.
@param eMode
This mode specifies how the called resource has to be bound to
the given anchor in order to have this function return. See the
description of isBoundTo() for more
information.
*/
boolean isBoundToURL (
[in] string AnchorURL,
[in] AnchorBindingMode eMode);
/** Return a copy of the called resource id. The caller becomes the
owner of the new object.
*/
XResourceId clone ();
};
}; }; }; }; }; // ::com::sun::star::drawing::framework
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+106 -44
View File
@@ -21,12 +21,11 @@
#include <sal/config.h>
#include "sddllapi.h"
#include <vector>
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <com/sun/star/util/URL.hpp>
#include <com/sun/star/drawing/framework/AnchorBindingMode.hpp>
#include <cppuhelper/implbase.hxx>
#include <rtl/ref.hxx>
#include <vector>
#include <memory>
namespace com::sun::star::util { class XURLTransformer; }
@@ -34,14 +33,22 @@ namespace com::sun::star::uno { template <class interface_type> class WeakRefere
namespace sd::framework {
typedef ::cppu::WeakImplHelper <
css::drawing::framework::XResourceId
> ResourceIdInterfaceBase;
/** Implementation of css::drawing::framework::XResourceId interface.
/** A resource id uses a set of URLs to unambiguously specify a resource of
the drawing framework.
<p>Resources of the drawing framework are panes, views, tool bars, and
command groups. One URL describes the type of the actual resource. A
sequence of URLs (typically one, sometimes two) specifies its anchor,
the resource it is bound to. The anchor typically is a pane (for
views), or it is empty (for panes).</p>
<p>The resource URL may be empty. In this case the anchor is empty,
too. Such an empty resource id does not describe a resource but rather
the absence of one. Instead of an empty ResourceId object
an empty reference can be used in many places.</p>
<p>The resource URL may have arguments that are passed to the factory
method on its creation. Arguments are only available through the
getFullResourceURL(). The getResourceURL() method strips them away.</p>
*/
class SD_DLLPUBLIC ResourceId final
: public ResourceIdInterfaceBase
class SD_DLLPUBLIC ResourceId final : public ::cppu::WeakImplHelper<>
{
public:
/** Create a new, empty resource id.
@@ -67,10 +74,10 @@ public:
const OUString& rsResourceURL);
/** Create a resource id for an anchor that is given as
XResourceId object. This is the most general of the
ResourceId object. This is the most general of the
constructor variants.
*/
ResourceId(const OUString& sResourceURL, const css::uno::Reference<XResourceId>& xAnchor);
ResourceId(const OUString& sResourceURL, const rtl::Reference<ResourceId>& xAnchor);
/** Create a new resource id for the given resource type and an anchor
that is specified by a single URL. This constructor can be used for
@@ -91,54 +98,109 @@ public:
@param rsFirstAnchorURL
This URL extends the anchor given by rAnchorURLs.
@param rAnchorURLs
An anchor as it is returned by XResourceId::getAnchorURLs().
An anchor as it is returned by ResourceId::getAnchorURLs().
*/
ResourceId (
const OUString& rsResourceURL,
const OUString& rsFirstAnchorURL,
const css::uno::Sequence<OUString>& rAnchorURLs);
const std::vector<OUString>& rAnchorURLs);
virtual ~ResourceId() override;
//===== XResourceId =======================================================
/** Return the URL of the resource. Arguments supplied on creation are
stripped away. Use getFullResourceURL() to access them.
*/
OUString getResourceURL() const;
virtual OUString SAL_CALL
getResourceURL() override;
/** Return a URL object of the resource URL that may contain arguments.
*/
css::util::URL getFullResourceURL();
virtual css::util::URL SAL_CALL
getFullResourceURL() override;
/** Return whether there is a non-empty anchor URL. When this method
returns `FALSE` then getAnchorURLs() will return an empty list.
*/
bool hasAnchor() const;
virtual sal_Bool SAL_CALL
hasAnchor() override;
/** Return a new ResourceId that represents the anchor resource.
*/
rtl::Reference<ResourceId> getAnchor() const;
virtual css::uno::Reference<
css::drawing::framework::XResourceId> SAL_CALL
getAnchor() override;
/** Return the, possibly empty, list of anchor URLs. The URLs are
ordered so that the one in position 0 is the direct anchor of the
resource, while the one in position i+1 is the direct anchor of the
one in position i.
*/
std::vector<OUString> getAnchorURLs() const;
virtual css::uno::Sequence<OUString> SAL_CALL
getAnchorURLs() override;
/** Return the type prefix of the resource URL. This includes all up to
and including the second slash.
*/
OUString getResourceTypePrefix() const;
virtual OUString SAL_CALL
getResourceTypePrefix() override;
/** Compare the called ResourceId object with the given
one.
<p>The two resource ids A and B are compared so that if A<B (return
value is -1) then either A and B are unrelated or A is a direct or
indirect anchor of B.</p>
<p>The algorithm for this comparison is quite simple. It uses a
double lexicographic ordering. On the lower level individual URLs
are compared via the lexicographic order defined on strings. On the
higher level two resource ids are compared via a lexicographic order
defined on the URLS. So when there are two resource ids A1.A2
(A1 being the anchor of A2) and B1.B2 then A1.A2<B1.B2 when A1<B1 or
A1==B1 and A2<B2. Resource ids may have different lengths: A1 <
B1.B2 when A1<B1 or A1==B1 (anchors first then resources linked to them.</p>
@param xId
The resource id to which the called resource id is compared.
@return
Returns 0 when the called resource id is
equivalent to the given resource id. Returns <code>-1</code> or
<code>+1</code> when the two compared resource ids differ.
*/
sal_Int16 compareTo(const rtl::Reference<ResourceId>& rxResourceId) const;
virtual sal_Int16 SAL_CALL
compareTo (const css::uno::Reference<
css::drawing::framework::XResourceId>& rxResourceId) override;
virtual sal_Bool SAL_CALL
/** Return whether the anchor of the called resource id object
represents the same resource as the given object.
<p>Note that not only the anchor of the given object is taken into
account. The whole object, including the resource URL, is
interpreted as anchor resource.</p>
@param xAnchorId
The resource id of the anchor.
@param eMode
This mode specifies how the called resource has to be bound to
the given anchor in order to have this function return `TRUE`.
<p>If eMode is DIRECT then the anchor of the called resource id
has to be identical to the given anchor. If eMode is
INDIRECT then the given anchor has to be a part
of the anchor of the called resource.
*/
bool
isBoundTo (
const css::uno::Reference<
css::drawing::framework::XResourceId>& rxResourceId,
css::drawing::framework::AnchorBindingMode eMode) override;
const rtl::Reference<ResourceId>& rxResourceId,
css::drawing::framework::AnchorBindingMode eMode) const;
virtual sal_Bool SAL_CALL
/** Return whether the anchor of the called resource id object
represents the same resource as the given anchor URL. This is a
convenience variant of the isBoundTo() function
that can also be seen as an optimization for the case that the
anchor consists of exactly one URL.
@param AnchorURL
The resource URL of the anchor.
@param eMode
This mode specifies how the called resource has to be bound to
the given anchor in order to have this function return. See the
description of isBoundTo() for more
information.
*/
bool
isBoundToURL (
const OUString& rsAnchorURL,
css::drawing::framework::AnchorBindingMode eMode) override;
css::drawing::framework::AnchorBindingMode eMode) const;
virtual css::uno::Reference<
css::drawing::framework::XResourceId> SAL_CALL
clone() override;
/** Return a copy of the called resource id. The caller becomes the
owner of the new object.
*/
rtl::Reference<ResourceId> clone() const;
private:
/** The set of URLs that consist of the resource URL at index 0 and the
@@ -171,7 +233,7 @@ private:
*/
bool IsBoundToAnchor (
const OUString* psFirstAnchorURL,
const css::uno::Sequence<OUString>* paAnchorURLs,
const std::vector<OUString>* paAnchorURLs,
css::drawing::framework::AnchorBindingMode eMode) const;
/** Return whether the called ResourceId object is bound to the anchor
+1 -1
View File
@@ -91,7 +91,7 @@ PresenterController::PresenterController (
const rtl::Reference<::sd::DrawController>& rxController,
const Reference<presentation::XSlideShowController>& rxSlideShowController,
rtl::Reference<PresenterPaneContainer> xPaneContainer,
const Reference<XResourceId>& rxMainPaneId)
const rtl::Reference<sd::framework::ResourceId>& rxMainPaneId)
: mxScreen(std::move(xScreen)),
mxComponentContext(rxContext),
mxController(rxController),
+2 -2
View File
@@ -88,7 +88,7 @@ public:
const rtl::Reference<::sd::DrawController>& rxController,
const css::uno::Reference<css::presentation::XSlideShowController>& rxSlideShowController,
rtl::Reference<PresenterPaneContainer> xPaneContainer,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxMainPaneId);
const rtl::Reference<sd::framework::ResourceId>& rxMainPaneId);
virtual ~PresenterController() override;
virtual void disposing(std::unique_lock<std::mutex>&) override;
@@ -178,7 +178,7 @@ private:
rtl::Reference<::sd::DrawController> mxController;
rtl::Reference<::sd::framework::ConfigurationController> mxConfigurationController;
css::uno::Reference<css::presentation::XSlideShowController> mxSlideShowController;
css::uno::Reference<css::drawing::framework::XResourceId> mxMainPaneId;
rtl::Reference<sd::framework::ResourceId> mxMainPaneId;
rtl::Reference<PresenterPaneContainer> mpPaneContainer;
sal_Int32 mnCurrentSlideIndex;
css::uno::Reference<css::drawing::XDrawPage> mxCurrentSlide;
+2 -2
View File
@@ -120,7 +120,7 @@ class PresenterHelpView::TextContainer : public vector<std::shared_ptr<Block> >
PresenterHelpView::PresenterHelpView (
const Reference<uno::XComponentContext>& rxContext,
const Reference<XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<::sd::DrawController>& rxController,
::rtl::Reference<PresenterController> xPresenterController)
: mxComponentContext(rxContext),
@@ -434,7 +434,7 @@ void PresenterHelpView::CheckFontSize()
//----- AbstractResource -----------------------------------------------------------
Reference<XResourceId> PresenterHelpView::getResourceId()
rtl::Reference<sd::framework::ResourceId> PresenterHelpView::getResourceId()
{
{
std::unique_lock l(m_aMutex);
+4 -4
View File
@@ -25,7 +25,7 @@
#include <com/sun/star/awt/XPaintListener.hpp>
#include <com/sun/star/awt/XWindowListener.hpp>
#include <framework/AbstractView.hxx>
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <ResourceId.hxx>
#include <com/sun/star/frame/XController.hpp>
#include <memory>
@@ -47,7 +47,7 @@ class PresenterHelpView
public:
explicit PresenterHelpView (
const css::uno::Reference<css::uno::XComponentContext>& rxContext,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<::sd::DrawController>& rxController,
::rtl::Reference<PresenterController> xPresenterController);
virtual ~PresenterHelpView() override;
@@ -76,7 +76,7 @@ public:
// AbstractResource
virtual css::uno::Reference<css::drawing::framework::XResourceId> getResourceId() override;
virtual rtl::Reference<sd::framework::ResourceId> getResourceId() override;
virtual bool isAnchorOnly() override;
@@ -84,7 +84,7 @@ private:
class TextContainer;
css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
css::uno::Reference<css::drawing::framework::XResourceId> mxViewId;
rtl::Reference<sd::framework::ResourceId> mxViewId;
rtl::Reference<sd::framework::AbstractPane> mxPane;
css::uno::Reference<css::awt::XWindow> mxWindow;
css::uno::Reference<css::rendering::XCanvas> mxCanvas;
+2 -2
View File
@@ -52,7 +52,7 @@ namespace sdext::presenter {
PresenterNotesView::PresenterNotesView (
const Reference<XComponentContext>& rxComponentContext,
const Reference<XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const ::rtl::Reference<::sd::DrawController>& rxController,
const ::rtl::Reference<PresenterController>& rpPresenterController)
: mxViewId(rxViewId),
@@ -286,7 +286,7 @@ void SAL_CALL PresenterNotesView::windowPaint (const awt::PaintEvent& rEvent)
//----- AbstractResource -----------------------------------------------------------
Reference<XResourceId> PresenterNotesView::getResourceId()
rtl::Reference<sd::framework::ResourceId> PresenterNotesView::getResourceId()
{
return mxViewId;
}
+4 -4
View File
@@ -29,7 +29,7 @@
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/drawing/XDrawView.hpp>
#include <framework/AbstractView.hxx>
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <ResourceId.hxx>
#include <com/sun/star/frame/XController.hpp>
#include <rtl/ref.hxx>
#include <memory>
@@ -61,7 +61,7 @@ class PresenterNotesView
public:
explicit PresenterNotesView (
const css::uno::Reference<css::uno::XComponentContext>& rxContext,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const ::rtl::Reference<::sd::DrawController>& rxController,
const ::rtl::Reference<PresenterController>& rpPresenterController);
virtual ~PresenterNotesView() override;
@@ -103,7 +103,7 @@ public:
// AbstractResource
virtual css::uno::Reference<css::drawing::framework::XResourceId> getResourceId() override;
virtual rtl::Reference<sd::framework::ResourceId> getResourceId() override;
virtual bool isAnchorOnly() override;
@@ -120,7 +120,7 @@ public:
virtual void SAL_CALL keyReleased (const css::awt::KeyEvent& rEvent) override;
private:
css::uno::Reference<css::drawing::framework::XResourceId> mxViewId;
rtl::Reference<sd::framework::ResourceId> mxViewId;
::rtl::Reference<PresenterController> mpPresenterController;
css::uno::Reference<css::awt::XWindow> mxParentWindow;
css::uno::Reference<css::rendering::XCanvas> mxCanvas;
+2 -2
View File
@@ -100,7 +100,7 @@ const rtl::Reference<PresenterPaneBorderPainter>&
}
void PresenterPaneBase::initialize(
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
const rtl::Reference<sd::framework::ResourceId>& rxPaneId,
const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
const css::uno::Reference<css::rendering::XCanvas>& rxParentCanvas,
const rtl::Reference<PresenterPaneBorderPainter>& rxBorderPainter,
@@ -140,7 +140,7 @@ void PresenterPaneBase::initialize(
//----- AbstractResource -----------------------------------------------------------
Reference<XResourceId> PresenterPaneBase::getResourceId()
rtl::Reference<sd::framework::ResourceId> PresenterPaneBase::getResourceId()
{
{
std::unique_lock l(m_aMutex);
+3 -3
View File
@@ -63,7 +63,7 @@ public:
void SetTitle (const OUString& rsTitle);
const rtl::Reference<PresenterPaneBorderPainter>& GetPaneBorderPainter() const;
void initialize(const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
void initialize(const rtl::Reference<sd::framework::ResourceId>& rxPaneId,
const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
const css::uno::Reference<css::rendering::XCanvas>& rxParentCanvas,
const rtl::Reference<PresenterPaneBorderPainter>& rxBorderPainter,
@@ -71,7 +71,7 @@ public:
// AbstractResourceI
virtual css::uno::Reference<css::drawing::framework::XResourceId> getResourceId() override;
virtual rtl::Reference<sd::framework::ResourceId> getResourceId() override;
virtual bool isAnchorOnly() override;
@@ -96,7 +96,7 @@ protected:
css::uno::Reference<css::rendering::XCanvas> mxBorderCanvas;
css::uno::Reference<css::awt::XWindow> mxContentWindow;
css::uno::Reference<css::rendering::XCanvas> mxContentCanvas;
css::uno::Reference<css::drawing::framework::XResourceId> mxPaneId;
rtl::Reference<sd::framework::ResourceId> mxPaneId;
rtl::Reference<PresenterPaneBorderPainter> mxBorderPainter;
OUString msTitle;
css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
+9 -9
View File
@@ -36,7 +36,7 @@ PresenterPaneContainer::~PresenterPaneContainer()
}
void PresenterPaneContainer::PreparePane (
const Reference<XResourceId>& rxPaneId,
const rtl::Reference<sd::framework::ResourceId>& rxPaneId,
const OUString& rsViewURL,
const OUString& rsTitle,
const OUString& rsAccessibleTitle,
@@ -89,7 +89,7 @@ PresenterPaneContainer::SharedPaneDescriptor
if (rxPane.is())
{
OUString sPaneURL;
Reference<XResourceId> xPaneId (rxPane->getResourceId());
rtl::Reference<sd::framework::ResourceId> xPaneId (rxPane->getResourceId());
if (xPaneId.is())
sPaneURL = xPaneId->getResourceURL();
@@ -116,7 +116,7 @@ PresenterPaneContainer::SharedPaneDescriptor
PresenterPaneContainer::SharedPaneDescriptor
PresenterPaneContainer::StoreBorderWindow(
const Reference<XResourceId>& rxPaneId,
const rtl::Reference<sd::framework::ResourceId>& rxPaneId,
const Reference<awt::XWindow>& rxBorderWindow)
{
// The content window may not be present. Use the resource URL of the
@@ -144,10 +144,10 @@ PresenterPaneContainer::SharedPaneDescriptor
if (rxView.is())
{
OUString sPaneURL;
Reference<XResourceId> xViewId (rxView->getResourceId());
rtl::Reference<sd::framework::ResourceId> xViewId (rxView->getResourceId());
if (xViewId.is())
{
Reference<XResourceId> xPaneId (xViewId->getAnchor());
rtl::Reference<sd::framework::ResourceId> xPaneId (xViewId->getAnchor());
if (xPaneId.is())
sPaneURL = xPaneId->getResourceURL();
}
@@ -172,7 +172,7 @@ PresenterPaneContainer::SharedPaneDescriptor
}
PresenterPaneContainer::SharedPaneDescriptor
PresenterPaneContainer::RemovePane (const Reference<XResourceId>& rxPaneId)
PresenterPaneContainer::RemovePane (const rtl::Reference<sd::framework::ResourceId>& rxPaneId)
{
SharedPaneDescriptor pDescriptor (FindPaneId(rxPaneId));
if (pDescriptor)
@@ -196,10 +196,10 @@ PresenterPaneContainer::SharedPaneDescriptor
if (rxView.is())
{
OUString sPaneURL;
Reference<XResourceId> xViewId (rxView->getResourceId());
rtl::Reference<sd::framework::ResourceId> xViewId (rxView->getResourceId());
if (xViewId.is())
{
Reference<XResourceId> xPaneId (xViewId->getAnchor());
rtl::Reference<sd::framework::ResourceId> xPaneId (xViewId->getAnchor());
if (xPaneId.is())
sPaneURL = xPaneId->getResourceURL();
}
@@ -245,7 +245,7 @@ PresenterPaneContainer::SharedPaneDescriptor PresenterPaneContainer::FindPaneURL
}
PresenterPaneContainer::SharedPaneDescriptor PresenterPaneContainer::FindPaneId (
const Reference<XResourceId>& rxPaneId)
const rtl::Reference<sd::framework::ResourceId>& rxPaneId)
{
if ( ! rxPaneId.is())
return SharedPaneDescriptor();
+6 -7
View File
@@ -23,7 +23,7 @@
#include "PresenterPaneBase.hxx"
#include <PresenterHelper.hxx>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <ResourceId.hxx>
#include <framework/AbstractView.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/basemutex.hxx>
@@ -70,7 +70,7 @@ public:
class PaneDescriptor
{
public:
css::uno::Reference<css::drawing::framework::XResourceId> mxPaneId;
rtl::Reference<sd::framework::ResourceId> mxPaneId;
OUString msViewURL;
::rtl::Reference<PresenterPaneBase> mxPane;
rtl::Reference<sd::framework::AbstractView> mxView;
@@ -92,7 +92,7 @@ public:
PaneList maPanes;
void PreparePane (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
const rtl::Reference<sd::framework::ResourceId>& rxPaneId,
const OUString& rsViewURL,
const OUString& rsTitle,
const OUString& rsAccessibleTitle,
@@ -103,14 +103,14 @@ public:
const rtl::Reference<PresenterPaneBase>& rxPane);
SharedPaneDescriptor StoreBorderWindow(
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
const rtl::Reference<sd::framework::ResourceId>& rxPaneId,
const css::uno::Reference<css::awt::XWindow>& rxBorderWindow);
SharedPaneDescriptor StoreView (
const rtl::Reference<sd::framework::AbstractView>& rxView);
SharedPaneDescriptor RemovePane (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId);
const rtl::Reference<sd::framework::ResourceId>& rxPaneId);
SharedPaneDescriptor RemoveView (
const rtl::Reference<sd::framework::AbstractView>& rxView);
@@ -133,8 +133,7 @@ public:
/** Find the pane whose resource id is identical to the given one.
*/
SharedPaneDescriptor FindPaneId (const css::uno::Reference<
css::drawing::framework::XResourceId>& rxPaneId);
SharedPaneDescriptor FindPaneId (const rtl::Reference<sd::framework::ResourceId>& rxPaneId);
SharedPaneDescriptor FindViewURL (const OUString& rsViewURL);
+3 -3
View File
@@ -109,7 +109,7 @@ void PresenterPaneFactory::disposing(std::unique_lock<std::mutex>&)
//----- AbstractPaneFactory ----------------------------------------------------------
rtl::Reference<sd::framework::AbstractResource> PresenterPaneFactory::createResource (
const Reference<XResourceId>& rxPaneId)
const rtl::Reference<sd::framework::ResourceId>& rxPaneId)
{
{
std::unique_lock l(m_aMutex);
@@ -189,7 +189,7 @@ void PresenterPaneFactory::releaseResource (const rtl::Reference<sd::framework::
rtl::Reference<sd::framework::AbstractResource> PresenterPaneFactory::CreatePane (
const Reference<XResourceId>& rxPaneId)
const rtl::Reference<sd::framework::ResourceId>& rxPaneId)
{
if ( ! rxPaneId.is())
return nullptr;
@@ -222,7 +222,7 @@ rtl::Reference<sd::framework::AbstractResource> PresenterPaneFactory::CreatePane
}
rtl::Reference<sd::framework::AbstractResource> PresenterPaneFactory::CreatePane (
const Reference<XResourceId>& rxPaneId,
const rtl::Reference<sd::framework::ResourceId>& rxPaneId,
const rtl::Reference<sd::framework::AbstractPane>& rxParentPane,
const bool bIsSpritePane)
{
+3 -4
View File
@@ -71,8 +71,7 @@ public:
virtual rtl::Reference<sd::framework::AbstractResource>
createResource (
const css::uno::Reference<
css::drawing::framework::XResourceId>& rxPaneId) override;
const rtl::Reference<sd::framework::ResourceId>& rxPaneId) override;
virtual void
releaseResource (
@@ -95,9 +94,9 @@ private:
void Register (const rtl::Reference<::sd::DrawController>& rxController);
rtl::Reference<sd::framework::AbstractResource> CreatePane (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId);
const rtl::Reference<sd::framework::ResourceId>& rxPaneId);
rtl::Reference<sd::framework::AbstractResource> CreatePane (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
const rtl::Reference<sd::framework::ResourceId>& rxPaneId,
const rtl::Reference<sd::framework::AbstractPane>& rxParentPane,
const bool bIsSpritePane);
};
+7 -7
View File
@@ -360,7 +360,7 @@ void PresenterScreen::InitializePresenterScreen()
mxConfigurationControllerWeak = xCC.get();
Reference<XComponentContext> xContext(mxContextWeak);
Reference<drawing::framework::XResourceId> xMainPaneId(
rtl::Reference<sd::framework::ResourceId> xMainPaneId(
GetMainPaneId(xPresentation, xContext));
// An empty reference means that the presenter screen can
// not or must not be displayed.
@@ -556,7 +556,7 @@ sal_Int32 PresenterScreen::GetPresenterScreenFromScreen( sal_Int32 nPresentation
return nPresenterScreenNumber;
}
Reference<drawing::framework::XResourceId> PresenterScreen::GetMainPaneId (
rtl::Reference<sd::framework::ResourceId> PresenterScreen::GetMainPaneId (
const Reference<presentation::XPresentation2>& rxPresentation,
const Reference<XComponentContext>& xContext) const
{
@@ -663,7 +663,7 @@ void PresenterScreen::SetupViewFactory (const Reference<XComponentContext>& rxCo
void PresenterScreen::SetupConfiguration (
const Reference<XComponentContext>& rxContext,
const Reference<XResourceId>& rxAnchorId)
const rtl::Reference<sd::framework::ResourceId>& rxAnchorId)
{
try
{
@@ -687,7 +687,7 @@ void PresenterScreen::ProcessLayout (
PresenterConfigurationAccess& rConfiguration,
std::u16string_view rsLayoutName,
const Reference<XComponentContext>& rxContext,
const Reference<XResourceId>& rxAnchorId)
const rtl::Reference<sd::framework::ResourceId>& rxAnchorId)
{
try
{
@@ -769,7 +769,7 @@ void PresenterScreen::ProcessViewDescriptions (
void PresenterScreen::ProcessComponent (
const ::std::vector<Any>& rValues,
const Reference<XResourceId>& rxAnchorId)
const rtl::Reference<sd::framework::ResourceId>& rxAnchorId)
{
if (rValues.size() != 6)
return;
@@ -829,7 +829,7 @@ void PresenterScreen::ProcessViewDescription (
}
void PresenterScreen::SetupView(
const Reference<XResourceId>& rxAnchorId,
const rtl::Reference<sd::framework::ResourceId>& rxAnchorId,
const OUString& rsPaneURL,
const OUString& rsViewURL,
const PresenterPaneContainer::ViewInitializationFunction& rViewInitialization)
@@ -838,7 +838,7 @@ void PresenterScreen::SetupView(
if (!xCC.is())
return;
Reference<XResourceId> xPaneId (new sd::framework::ResourceId(rsPaneURL,rxAnchorId));
rtl::Reference<sd::framework::ResourceId> xPaneId (new sd::framework::ResourceId(rsPaneURL,rxAnchorId));
// Look up the view descriptor.
ViewDescriptor aViewDescriptor;
ViewDescriptorContainer::const_iterator iDescriptor (maViewDescriptors.find(rsViewURL));
+5 -5
View File
@@ -178,7 +178,7 @@ private:
*/
void SetupConfiguration (
const css::uno::Reference<css::uno::XComponentContext>& rxContext,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxAnchorId);
const rtl::Reference<sd::framework::ResourceId>& rxAnchorId);
/** Read one layout from the configuration and make resource activation
requests to bring it on to the screen. When one layout references a
@@ -188,14 +188,14 @@ private:
PresenterConfigurationAccess& rConfiguration,
std::u16string_view rsLayoutName,
const css::uno::Reference<css::uno::XComponentContext>& rxContext,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxAnchorId);
const rtl::Reference<sd::framework::ResourceId>& rxAnchorId);
/** Called by ProcessLayout for a single entry of a Layouts
configuration list.
*/
void ProcessComponent (
const ::std::vector<css::uno::Any>& rValues,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxAnchorId);
const rtl::Reference<sd::framework::ResourceId>& rxAnchorId);
/** Read the view descriptions from the configuration.
*/
@@ -208,7 +208,7 @@ private:
const ::std::vector<css::uno::Any>& rValues);
void SetupView (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxAnchorId,
const rtl::Reference<sd::framework::ResourceId>& rxAnchorId,
const OUString& rsPaneURL,
const OUString& rsViewURL,
const PresenterPaneContainer::ViewInitializationFunction& rViewInitialization);
@@ -227,7 +227,7 @@ private:
/** Create a resource id for the full screen background pane so that it
is displayed on another screen than the full screen presentation.
*/
css::uno::Reference<css::drawing::framework::XResourceId> GetMainPaneId (
rtl::Reference<sd::framework::ResourceId> GetMainPaneId (
const css::uno::Reference<css::presentation::XPresentation2>& rxPresentation,
const css::uno::Reference<css::uno::XComponentContext>& xContext) const;
};
+2 -2
View File
@@ -42,7 +42,7 @@ namespace sdext::presenter {
PresenterSlidePreview::PresenterSlidePreview (
const Reference<XComponentContext>& rxContext,
const Reference<XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<sd::framework::AbstractPane>& rxAnchorPane,
const ::rtl::Reference<PresenterController>& rpPresenterController)
: mpPresenterController(rpPresenterController),
@@ -108,7 +108,7 @@ void PresenterSlidePreview::disposing(std::unique_lock<std::mutex>&)
//----- AbstractResource -----------------------------------------------------------
Reference<XResourceId> PresenterSlidePreview::getResourceId()
rtl::Reference<sd::framework::ResourceId> PresenterSlidePreview::getResourceId()
{
return mxViewId;
}
+3 -3
View File
@@ -54,7 +54,7 @@ class PresenterSlidePreview
public:
PresenterSlidePreview (
const css::uno::Reference<css::uno::XComponentContext>& rxContext,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<sd::framework::AbstractPane>& rxAnchorPane,
const ::rtl::Reference<PresenterController>& rpPresenterController);
virtual ~PresenterSlidePreview() override;
@@ -66,7 +66,7 @@ public:
// AbstractResource
virtual css::uno::Reference<css::drawing::framework::XResourceId> getResourceId() override;
virtual rtl::Reference<sd::framework::ResourceId> getResourceId() override;
virtual bool isAnchorOnly() override;
@@ -98,7 +98,7 @@ protected:
::rtl::Reference<PresenterController> mpPresenterController;
private:
css::uno::Reference<css::drawing::framework::XResourceId> mxViewId;
rtl::Reference<sd::framework::ResourceId> mxViewId;
rtl::Reference<sd::presenter::SlideRenderer> mxPreviewRenderer;
/** This Image holds the preview of the current slide. After resize
+2 -2
View File
@@ -77,7 +77,7 @@ namespace sdext::presenter {
PresenterSlideShowView::PresenterSlideShowView (
css::uno::Reference<css::uno::XComponentContext> xContext,
css::uno::Reference<css::drawing::framework::XResourceId> xViewId,
rtl::Reference<sd::framework::ResourceId> xViewId,
const rtl::Reference<::sd::DrawController>& rxController,
::rtl::Reference<PresenterController> xPresenterController)
: mxComponentContext(std::move(xContext)),
@@ -619,7 +619,7 @@ void SAL_CALL PresenterSlideShowView::windowHidden (const lang::EventObject&) {}
//----- XView -----------------------------------------------------------------
Reference<XResourceId> PresenterSlideShowView::getResourceId()
rtl::Reference<sd::framework::ResourceId> PresenterSlideShowView::getResourceId()
{
return mxViewId;
}
+4 -4
View File
@@ -29,7 +29,7 @@
#include <com/sun/star/awt/XWindowListener.hpp>
#include <com/sun/star/drawing/XDrawView.hpp>
#include <framework/AbstractPane.hxx>
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <ResourceId.hxx>
#include <framework/AbstractView.hxx>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/presentation/XSlideShowController.hpp>
@@ -59,7 +59,7 @@ class PresenterSlideShowView
public:
PresenterSlideShowView (
css::uno::Reference<css::uno::XComponentContext> xContext,
css::uno::Reference<css::drawing::framework::XResourceId> xViewId,
rtl::Reference<sd::framework::ResourceId> xViewId,
const rtl::Reference<::sd::DrawController>& rxController,
::rtl::Reference<PresenterController> xPresenterController);
virtual ~PresenterSlideShowView() override;
@@ -153,7 +153,7 @@ public:
// XView
virtual css::uno::Reference<css::drawing::framework::XResourceId>
virtual rtl::Reference<sd::framework::ResourceId>
getResourceId() override;
virtual bool isAnchorOnly() override;
@@ -174,7 +174,7 @@ public:
private:
css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
::rtl::Reference<PresenterController> mpPresenterController;
css::uno::Reference<css::drawing::framework::XResourceId> mxViewId;
rtl::Reference<sd::framework::ResourceId> mxViewId;
rtl::Reference<::sd::DrawController> mxController;
css::uno::Reference<css::presentation::XSlideShowController> mxSlideShowController;
css::uno::Reference<css::presentation::XSlideShow> mxSlideShow;
+2 -2
View File
@@ -227,7 +227,7 @@ private:
PresenterSlideSorter::PresenterSlideSorter (
const Reference<uno::XComponentContext>& rxContext,
const Reference<XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<::sd::DrawController>& rxController,
const ::rtl::Reference<PresenterController>& rpPresenterController)
: mxComponentContext(rxContext),
@@ -545,7 +545,7 @@ void SAL_CALL PresenterSlideSorter::mouseDragged (const css::awt::MouseEvent&) {
//----- AbstractResource -----------------------------------------------------------
Reference<XResourceId> PresenterSlideSorter::getResourceId()
rtl::Reference<sd::framework::ResourceId> PresenterSlideSorter::getResourceId()
{
{
std::unique_lock l(m_aMutex);
+4 -4
View File
@@ -31,7 +31,7 @@
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
#include <com/sun/star/drawing/XDrawView.hpp>
#include <framework/AbstractView.hxx>
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <ResourceId.hxx>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/geometry/RealRectangle2D.hpp>
#include <com/sun/star/rendering/XPolyPolygon2D.hpp>
@@ -62,7 +62,7 @@ class PresenterSlideSorter
public:
PresenterSlideSorter (
const css::uno::Reference<css::uno::XComponentContext>& rxContext,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<::sd::DrawController>& rxController,
const ::rtl::Reference<PresenterController>& rpPresenterController);
virtual ~PresenterSlideSorter() override;
@@ -107,7 +107,7 @@ public:
// AbstractResource
virtual css::uno::Reference<css::drawing::framework::XResourceId> getResourceId() override;
virtual rtl::Reference<sd::framework::ResourceId> getResourceId() override;
virtual bool isAnchorOnly() override;
@@ -130,7 +130,7 @@ public:
private:
css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
css::uno::Reference<css::drawing::framework::XResourceId> mxViewId;
rtl::Reference<sd::framework::ResourceId> mxViewId;
rtl::Reference<sd::framework::AbstractPane> mxPane;
css::uno::Reference<css::rendering::XCanvas> mxCanvas;
css::uno::Reference<css::awt::XWindow> mxWindow;
+3 -3
View File
@@ -923,7 +923,7 @@ void PresenterToolBar::ThrowIfDisposed() const
PresenterToolBarView::PresenterToolBarView (
const Reference<XComponentContext>& rxContext,
const Reference<XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<::sd::DrawController>& rxController,
const ::rtl::Reference<PresenterController>& rpPresenterController)
: mxViewId(rxViewId),
@@ -1010,9 +1010,9 @@ void SAL_CALL PresenterToolBarView::disposing (const lang::EventObject& rEventOb
mxWindow = nullptr;
}
//----- XResourceId -----------------------------------------------------------
//----- ResourceId -----------------------------------------------------------
Reference<XResourceId> PresenterToolBarView::getResourceId()
rtl::Reference<sd::framework::ResourceId> PresenterToolBarView::getResourceId()
{
return mxViewId;
}
+4 -4
View File
@@ -32,7 +32,7 @@
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/drawing/XDrawView.hpp>
#include <framework/AbstractView.hxx>
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <ResourceId.hxx>
#include <com/sun/star/frame/XController.hpp>
#include <functional>
@@ -193,7 +193,7 @@ class PresenterToolBarView
public:
explicit PresenterToolBarView (
const css::uno::Reference<css::uno::XComponentContext>& rxContext,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const ::rtl::Reference<::sd::DrawController>& rxController,
const ::rtl::Reference<PresenterController>& rpPresenterController);
virtual ~PresenterToolBarView() override;
@@ -216,7 +216,7 @@ public:
// AbstractResource
virtual css::uno::Reference<css::drawing::framework::XResourceId> getResourceId() override;
virtual rtl::Reference<sd::framework::ResourceId> getResourceId() override;
virtual bool isAnchorOnly() override;
@@ -230,7 +230,7 @@ public:
private:
// css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
rtl::Reference<sd::framework::AbstractPane> mxPane;
css::uno::Reference<css::drawing::framework::XResourceId> mxViewId;
rtl::Reference<sd::framework::ResourceId> mxViewId;
css::uno::Reference<css::awt::XWindow> mxWindow;
css::uno::Reference<css::rendering::XCanvas> mxCanvas;
::rtl::Reference<PresenterController> mpPresenterController;
+11 -11
View File
@@ -46,7 +46,7 @@ class NextSlidePreview : public PresenterSlidePreview
public:
NextSlidePreview (
const css::uno::Reference<css::uno::XComponentContext>& rxContext,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<sd::framework::AbstractPane>& rxAnchorPane,
const ::rtl::Reference<PresenterController>& rpPresenterController)
: PresenterSlidePreview(rxContext, rxViewId, rxAnchorPane, rpPresenterController)
@@ -173,7 +173,7 @@ void PresenterViewFactory::disposing(std::unique_lock<std::mutex>&)
//----- XViewFactory ----------------------------------------------------------
rtl::Reference<sd::framework::AbstractResource> PresenterViewFactory::createResource (
const Reference<XResourceId>& rxViewId)
const rtl::Reference<sd::framework::ResourceId>& rxViewId)
{
{
std::unique_lock l(m_aMutex);
@@ -238,7 +238,7 @@ void PresenterViewFactory::releaseResource (const rtl::Reference<sd::framework::
else
{
// Put cacheable views in the cache.
Reference<XResourceId> xViewId (rxView->getResourceId());
rtl::Reference<sd::framework::ResourceId> xViewId (rxView->getResourceId());
if (xViewId.is())
{
rtl::Reference<sd::framework::AbstractPane> xAnchorPane = dynamic_cast<sd::framework::AbstractPane*>(
@@ -252,7 +252,7 @@ void PresenterViewFactory::releaseResource (const rtl::Reference<sd::framework::
rtl::Reference<sd::framework::AbstractResource> PresenterViewFactory::GetViewFromCache(
const Reference<XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<sd::framework::AbstractPane>& rxAnchorPane) const
{
if (mpResourceCache == nullptr)
@@ -288,7 +288,7 @@ rtl::Reference<sd::framework::AbstractResource> PresenterViewFactory::GetViewFro
}
rtl::Reference<sd::framework::AbstractResource> PresenterViewFactory::CreateView(
const Reference<XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<sd::framework::AbstractPane>& rxAnchorPane)
{
rtl::Reference<sd::framework::AbstractView> xView;
@@ -336,7 +336,7 @@ rtl::Reference<sd::framework::AbstractResource> PresenterViewFactory::CreateView
}
rtl::Reference<sd::framework::AbstractView> PresenterViewFactory::CreateSlideShowView(
const Reference<XResourceId>& rxViewId) const
const rtl::Reference<sd::framework::ResourceId>& rxViewId) const
{
if ( ! mxConfigurationController.is())
return nullptr;
@@ -362,7 +362,7 @@ rtl::Reference<sd::framework::AbstractView> PresenterViewFactory::CreateSlideSho
}
rtl::Reference<sd::framework::AbstractView> PresenterViewFactory::CreateSlidePreviewView(
const Reference<XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<sd::framework::AbstractPane>& rxAnchorPane) const
{
rtl::Reference<sd::framework::AbstractView> xView;
@@ -390,7 +390,7 @@ rtl::Reference<sd::framework::AbstractView> PresenterViewFactory::CreateSlidePre
}
rtl::Reference<sd::framework::AbstractView> PresenterViewFactory::CreateToolBarView(
const Reference<XResourceId>& rxViewId) const
const rtl::Reference<sd::framework::ResourceId>& rxViewId) const
{
return new PresenterToolBarView(
mxComponentContext,
@@ -400,7 +400,7 @@ rtl::Reference<sd::framework::AbstractView> PresenterViewFactory::CreateToolBarV
}
rtl::Reference<sd::framework::AbstractView> PresenterViewFactory::CreateNotesView(
const Reference<XResourceId>& rxViewId) const
const rtl::Reference<sd::framework::ResourceId>& rxViewId) const
{
rtl::Reference<sd::framework::AbstractView> xView;
@@ -427,7 +427,7 @@ rtl::Reference<sd::framework::AbstractView> PresenterViewFactory::CreateNotesVie
}
rtl::Reference<sd::framework::AbstractView> PresenterViewFactory::CreateSlideSorterView(
const Reference<XResourceId>& rxViewId) const
const rtl::Reference<sd::framework::ResourceId>& rxViewId) const
{
rtl::Reference<sd::framework::AbstractView> xView;
@@ -455,7 +455,7 @@ rtl::Reference<sd::framework::AbstractView> PresenterViewFactory::CreateSlideSor
}
rtl::Reference<sd::framework::AbstractView> PresenterViewFactory::CreateHelpView(
const Reference<XResourceId>& rxViewId) const
const rtl::Reference<sd::framework::ResourceId>& rxViewId) const
{
return new PresenterHelpView(
mxComponentContext,
+9 -9
View File
@@ -97,7 +97,7 @@ public:
virtual rtl::Reference<sd::framework::AbstractResource>
createResource (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId) override;
const rtl::Reference<sd::framework::ResourceId>& rxViewId) override;
virtual void
releaseResource (
@@ -121,29 +121,29 @@ private:
void Register (const ::rtl::Reference<::sd::DrawController>& rxController);
rtl::Reference<sd::framework::AbstractView> CreateSlideShowView(
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId) const;
const rtl::Reference<sd::framework::ResourceId>& rxViewId) const;
rtl::Reference<sd::framework::AbstractView> CreateSlidePreviewView(
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<sd::framework::AbstractPane>& rxPane) const;
rtl::Reference<sd::framework::AbstractView> CreateToolBarView(
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId) const;
const rtl::Reference<sd::framework::ResourceId>& rxViewId) const;
rtl::Reference<sd::framework::AbstractView> CreateNotesView(
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId) const;
const rtl::Reference<sd::framework::ResourceId>& rxViewId) const;
rtl::Reference<sd::framework::AbstractView> CreateSlideSorterView(
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId) const;
const rtl::Reference<sd::framework::ResourceId>& rxViewId) const;
rtl::Reference<sd::framework::AbstractView> CreateHelpView(
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId) const;
const rtl::Reference<sd::framework::ResourceId>& rxViewId) const;
rtl::Reference<sd::framework::AbstractResource> GetViewFromCache (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<sd::framework::AbstractPane>& rxAnchorPane) const;
rtl::Reference<sd::framework::AbstractResource> CreateView(
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<sd::framework::AbstractPane>& rxAnchorPane);
};
+1
View File
@@ -54,6 +54,7 @@
#include <FactoryIds.hxx>
#include <memory>
#include <slideshow.hxx>
#include <ResourceId.hxx>
#include <officecfg/Office/Draw.hxx>
#include <officecfg/Office/Impress.hxx>
+1
View File
@@ -80,6 +80,7 @@
#include <Window.hxx>
#include <svl/intitem.hxx>
#include <DrawController.hxx>
#include <ResourceId.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -35,13 +35,13 @@ using namespace ::com::sun::star::drawing::framework;
using ::sd::framework::FrameworkHelper;
namespace {
/** Use the XResourceId::compareTo() method to implement a compare operator
/** Use the ResourceId::compareTo() method to implement a compare operator
for STL containers.
*/
class XResourceIdLess
{
public:
bool operator () (const Reference<XResourceId>& rId1, const Reference<XResourceId>& rId2) const
bool operator () (const rtl::Reference<sd::framework::ResourceId>& rId1, const rtl::Reference<sd::framework::ResourceId>& rId2) const
{
return rId1->compareTo(rId2) == -1;
}
@@ -52,7 +52,7 @@ public:
namespace sd::framework {
class Configuration::ResourceContainer
: public ::std::set<Reference<XResourceId>, XResourceIdLess>
: public ::std::set<rtl::Reference<ResourceId>, XResourceIdLess>
{
public:
ResourceContainer() {}
@@ -91,7 +91,7 @@ void Configuration::disposing(std::unique_lock<std::mutex>&)
//----- Configuration --------------------------------------------------------
void Configuration::addResource (const Reference<XResourceId>& rxResourceId)
void Configuration::addResource (const rtl::Reference<ResourceId>& rxResourceId)
{
ThrowIfDisposed();
@@ -106,7 +106,7 @@ void Configuration::addResource (const Reference<XResourceId>& rxResourceId)
}
}
void Configuration::removeResource (const Reference<XResourceId>& rxResourceId)
void Configuration::removeResource (const rtl::Reference<ResourceId>& rxResourceId)
{
ThrowIfDisposed();
@@ -123,8 +123,8 @@ void Configuration::removeResource (const Reference<XResourceId>& rxResourceId)
}
}
Sequence<Reference<XResourceId> > Configuration::getResources (
const Reference<XResourceId>& rxAnchorId,
std::vector<rtl::Reference<ResourceId> > Configuration::getResources (
const rtl::Reference<ResourceId>& rxAnchorId,
std::u16string_view rsResourceURLPrefix,
AnchorBindingMode eMode)
{
@@ -134,7 +134,7 @@ Sequence<Reference<XResourceId> > Configuration::getResources (
const bool bFilterResources (!rsResourceURLPrefix.empty());
// Collect the matching resources in a vector.
::std::vector<Reference<XResourceId> > aResources;
::std::vector<rtl::Reference<ResourceId> > aResources;
for (const auto& rxResource : *mpResourceContainer)
{
if ( ! rxResource->isBoundTo(rxAnchorId,eMode))
@@ -161,10 +161,10 @@ Sequence<Reference<XResourceId> > Configuration::getResources (
aResources.push_back(rxResource);
}
return comphelper::containerToSequence(aResources);
return aResources;
}
bool Configuration::hasResource (const Reference<XResourceId>& rxResourceId)
bool Configuration::hasResource (const rtl::Reference<ResourceId>& rxResourceId)
{
std::unique_lock aGuard (m_aMutex);
ThrowIfDisposed();
@@ -215,7 +215,7 @@ void SAL_CALL Configuration::setName (const OUString&)
}
void Configuration::PostEvent (
const Reference<XResourceId>& rxResourceId,
const rtl::Reference<ResourceId>& rxResourceId,
const bool bActivation)
{
OSL_ASSERT(rxResourceId.is());
@@ -259,10 +259,10 @@ bool AreConfigurationsEquivalent (
return true;
// Get the lists of resources from the two given configurations.
const Sequence<Reference<XResourceId> > aResources1(
const std::vector<rtl::Reference<ResourceId> > aResources1(
rxConfiguration1->getResources(
nullptr, u"", AnchorBindingMode_INDIRECT));
const Sequence<Reference<XResourceId> > aResources2(
const std::vector<rtl::Reference<ResourceId> > aResources2(
rxConfiguration2->getResources(
nullptr, u"", AnchorBindingMode_INDIRECT));
@@ -271,7 +271,7 @@ bool AreConfigurationsEquivalent (
// Comparison of the two lists of resource ids relies on their
// ordering.
return std::equal(aResources1.begin(), aResources1.end(), aResources2.begin(), aResources2.end(),
[](const Reference<XResourceId>& a, const Reference<XResourceId>& b) {
[](const rtl::Reference<ResourceId>& a, const rtl::Reference<ResourceId>& b) {
if (a.is() && b.is())
return a->compareTo(b) == 0;
return a.is() == b.is();
@@ -21,6 +21,7 @@
#include <framework/FrameworkHelper.hxx>
#include <framework/Configuration.hxx>
#include <ResourceId.hxx>
#include <sal/log.hxx>
using namespace ::com::sun::star;
@@ -50,8 +51,8 @@ bool ConfigurationClassifier::Partition()
}
void ConfigurationClassifier::PartitionResources (
const css::uno::Sequence<Reference<XResourceId> >& rS1,
const css::uno::Sequence<Reference<XResourceId> >& rS2)
const std::vector<rtl::Reference<ResourceId> >& rS1,
const std::vector<rtl::Reference<ResourceId> >& rS2)
{
ResourceIdVector aC1minusC2;
ResourceIdVector aC2minusC1;
@@ -81,18 +82,18 @@ void ConfigurationClassifier::PartitionResources (
}
void ConfigurationClassifier::ClassifyResources (
const css::uno::Sequence<Reference<XResourceId> >& rS1,
const css::uno::Sequence<Reference<XResourceId> >& rS2,
const std::vector<rtl::Reference<ResourceId> >& rS1,
const std::vector<rtl::Reference<ResourceId> >& rS2,
ResourceIdVector& rS1minusS2,
ResourceIdVector& rS2minusS1,
ResourceIdVector& rS1andS2)
{
// Find all elements in rS1 and place them in rS1minusS2 or rS1andS2
// depending on whether they are in rS2 or not.
for (const Reference<XResourceId>& rA1 : rS1)
for (const rtl::Reference<ResourceId>& rA1 : rS1)
{
bool bFound = std::any_of(rS2.begin(), rS2.end(),
[&rA1](const Reference<XResourceId>& rA2) {
[&rA1](const rtl::Reference<ResourceId>& rA2) {
return rA1->getResourceURL() == rA2->getResourceURL(); });
if (bFound)
@@ -104,10 +105,10 @@ void ConfigurationClassifier::ClassifyResources (
// Find all elements in rS2 that are not in rS1. The elements that are
// in both rS1 and rS2 have been handled above and are therefore ignored
// here.
for (const Reference<XResourceId>& rA2 : rS2)
for (const rtl::Reference<ResourceId>& rA2 : rS2)
{
bool bFound = std::any_of(rS1.begin(), rS1.end(),
[&rA2](const Reference<XResourceId>& rA1) {
[&rA2](const rtl::Reference<ResourceId>& rA1) {
return rA2->getResourceURL() == rA1->getResourceURL(); });
if ( ! bFound)
@@ -123,12 +124,12 @@ void ConfigurationClassifier::CopyResources (
// Copy all resources bound to the ones in aC1minusC2Unique to rC1minusC2.
for (const auto& rxResource : rSource)
{
const Sequence<Reference<XResourceId> > aBoundResources (
const std::vector<rtl::Reference<ResourceId> > aBoundResources (
rxConfiguration->getResources(
rxResource,
u"",
AnchorBindingMode_INDIRECT));
const sal_Int32 nL (aBoundResources.getLength());
const sal_Int32 nL (aBoundResources.size());
rTarget.reserve(rTarget.size() + 1 + nL);
rTarget.push_back(rxResource);
@@ -136,7 +137,7 @@ void ConfigurationClassifier::CopyResources (
SAL_INFO("sd.fwk", __func__ << ": copying " <<
FrameworkHelper::ResourceIdToString(rxResource));
for (const Reference<XResourceId>& rBoundResource : aBoundResources)
for (const rtl::Reference<ResourceId>& rBoundResource : aBoundResources)
{
rTarget.push_back(rBoundResource);
SAL_INFO("sd.fwk", __func__ << ": copying " <<
@@ -28,13 +28,11 @@ namespace sd::framework
{
class Configuration;
}
namespace com::sun::star::drawing::framework
{
class XResourceId;
}
namespace sd::framework
{
class ResourceId;
/** A ConfigurationClassifier object compares two configurations of
resources and gives access to the differences. It is used mainly when
changes to the current configuration have been requested and the various
@@ -59,8 +57,7 @@ public:
*/
bool Partition();
typedef ::std::vector<css::uno::Reference<css::drawing::framework::XResourceId>>
ResourceIdVector;
typedef ::std::vector<rtl::Reference<sd::framework::ResourceId>> ResourceIdVector;
/** Return the resources that belong to the configuration given as
rxConfiguration1 to the constructor but that do not belong to
@@ -117,28 +114,27 @@ private:
URLs for classification. Therefore this method calls itself
recursively.
@param rS1
One sequence of XResourceId objects.
One sequence of ResourceId objects.
@param rS2
Another sequence of XResourceId objects.
Another sequence of ResourceId objects.
*/
void PartitionResources(
const css::uno::Sequence<css::uno::Reference<css::drawing::framework::XResourceId>>& rS1,
const css::uno::Sequence<css::uno::Reference<css::drawing::framework::XResourceId>>& rS2);
void PartitionResources(const std::vector<rtl::Reference<sd::framework::ResourceId>>& rS1,
const std::vector<rtl::Reference<sd::framework::ResourceId>>& rS2);
/** Compare the given sequences of resource ids and put their elements
in one of three vectors depending on whether an element belongs to
both sequences or to one but not the other. Note that only the
resource URLs of the XResourceId objects are used for the
resource URLs of the ResourceId objects are used for the
classification.
@param rS1
One sequence of XResourceId objects.
One sequence of ResourceId objects.
@param rS2
Another sequence of XResourceId objects.
Another sequence of ResourceId objects.
*/
static void ClassifyResources(
const css::uno::Sequence<css::uno::Reference<css::drawing::framework::XResourceId>>& rS1,
const css::uno::Sequence<css::uno::Reference<css::drawing::framework::XResourceId>>& rS2,
ResourceIdVector& rS1minusS2, ResourceIdVector& rS2minusS1, ResourceIdVector& rS1andS2);
static void ClassifyResources(const std::vector<rtl::Reference<sd::framework::ResourceId>>& rS1,
const std::vector<rtl::Reference<sd::framework::ResourceId>>& rS2,
ResourceIdVector& rS1minusS2, ResourceIdVector& rS2minusS1,
ResourceIdVector& rS1andS2);
/** Copy the resources given in rSource to the list of resources
specified by rTarget. Resources bound to the ones in rSource,
@@ -31,6 +31,7 @@
#include "UpdateRequest.hxx"
#include "ChangeRequestQueueProcessor.hxx"
#include "ConfigurationClassifier.hxx"
#include <ResourceId.hxx>
#include <com/sun/star/frame/XController.hpp>
#include <sal/log.hxx>
@@ -224,7 +225,7 @@ void ConfigurationController::unlock()
}
void ConfigurationController::requestResourceActivation (
const Reference<XResourceId>& rxResourceId,
const rtl::Reference<ResourceId>& rxResourceId,
ResourceActivationMode eMode)
{
::osl::MutexGuard aGuard (m_aMutex);
@@ -252,7 +253,7 @@ void ConfigurationController::requestResourceActivation (
{
// Get a list of the matching resources and create deactivation
// requests for them.
const Sequence<Reference<XResourceId> > aResourceList (
const std::vector<rtl::Reference<ResourceId> > aResourceList (
mpImplementation->mxRequestedConfiguration->getResources(
rxResourceId->getAnchor(),
rxResourceId->getResourceTypePrefix(),
@@ -280,7 +281,7 @@ void ConfigurationController::requestResourceActivation (
}
void ConfigurationController::requestResourceDeactivation (
const Reference<XResourceId>& rxResourceId)
const rtl::Reference<ResourceId>& rxResourceId)
{
::osl::MutexGuard aGuard (m_aMutex);
ThrowIfDisposed();
@@ -293,7 +294,7 @@ void ConfigurationController::requestResourceDeactivation (
// Request deactivation of all resources linked to the specified one
// as well.
const Sequence<Reference<XResourceId> > aLinkedResources (
const std::vector<rtl::Reference<ResourceId> > aLinkedResources (
mpImplementation->mxRequestedConfiguration->getResources(
rxResourceId,
u"",
@@ -315,7 +316,7 @@ void ConfigurationController::requestResourceDeactivation (
}
rtl::Reference<AbstractResource> ConfigurationController::getResource (
const Reference<XResourceId>& rxResourceId)
const rtl::Reference<ResourceId>& rxResourceId)
{
::osl::MutexGuard aGuard (m_aMutex);
ThrowIfDisposed();
@@ -128,7 +128,7 @@ void ConfigurationControllerBroadcaster::NotifyListeners (const ConfigurationCha
void ConfigurationControllerBroadcaster::NotifyListeners (
const OUString& rsEventType,
const Reference<XResourceId>& rxResourceId,
const rtl::Reference<ResourceId>& rxResourceId,
const rtl::Reference<AbstractResource>& rxResourceObject)
{
ConfigurationChangeEvent aEvent;
@@ -24,13 +24,12 @@
#include <unordered_map>
#include <vector>
namespace com::sun::star::drawing::framework { class XResourceId; }
namespace sd::framework {
class ConfigurationChangeListener;
struct ConfigurationChangeEvent;
class ConfigurationController;
class AbstractResource;
class ResourceId;
/** This class manages the set of ConfigurationChangeListeners and
calls them when the ConfigurationController wants to broadcast an
@@ -98,7 +97,7 @@ public:
*/
void NotifyListeners (
const OUString& rsEventType,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId,
const rtl::Reference<sd::framework::ResourceId>& rxResourceId,
const rtl::Reference<sd::framework::AbstractResource>& rxResourceObject);
/** Call all listeners and inform them that the
@@ -20,6 +20,7 @@
#include "ConfigurationControllerResourceManager.hxx"
#include "ConfigurationControllerBroadcaster.hxx"
#include "ResourceFactoryManager.hxx"
#include <ResourceId.hxx>
#include <framework/FrameworkHelper.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
#include <framework/Configuration.hxx>
@@ -52,7 +53,7 @@ ConfigurationControllerResourceManager::~ConfigurationControllerResourceManager(
ConfigurationControllerResourceManager::ResourceDescriptor
ConfigurationControllerResourceManager::GetResource (
const Reference<XResourceId>& rxResourceId)
const rtl::Reference<ResourceId>& rxResourceId)
{
::osl::MutexGuard aGuard (maMutex);
ResourceMap::const_iterator iResource (maResourceMap.find(rxResourceId));
@@ -63,19 +64,19 @@ ConfigurationControllerResourceManager::ResourceDescriptor
}
void ConfigurationControllerResourceManager::ActivateResources (
const ::std::vector<Reference<XResourceId> >& rResources,
const ::std::vector<rtl::Reference<ResourceId> >& rResources,
const rtl::Reference<Configuration>& rxConfiguration)
{
::osl::MutexGuard aGuard (maMutex);
// Iterate in normal order over the resources that are to be
// activated so that resources on which others depend are activated
// before the depending resources are activated.
for (const Reference<XResourceId>& xResource : rResources)
for (const rtl::Reference<ResourceId>& xResource : rResources)
ActivateResource(xResource, rxConfiguration);
}
void ConfigurationControllerResourceManager::DeactivateResources (
const ::std::vector<Reference<XResourceId> >& rResources,
const ::std::vector<rtl::Reference<ResourceId> >& rResources,
const rtl::Reference<Configuration>& rxConfiguration)
{
::osl::MutexGuard aGuard (maMutex);
@@ -85,7 +86,7 @@ void ConfigurationControllerResourceManager::DeactivateResources (
::std::for_each(
rResources.rbegin(),
rResources.rend(),
[&] (Reference<XResourceId> const& xResource) {
[&] (rtl::Reference<ResourceId> const& xResource) {
return DeactivateResource(xResource, rxConfiguration);
} );
}
@@ -99,7 +100,7 @@ void ConfigurationControllerResourceManager::DeactivateResources (
5. Notify listeners.
*/
void ConfigurationControllerResourceManager::ActivateResource (
const Reference<XResourceId>& rxResourceId,
const rtl::Reference<ResourceId>& rxResourceId,
const rtl::Reference<Configuration>& rxConfiguration)
{
if ( ! rxResourceId.is())
@@ -171,7 +172,7 @@ void ConfigurationControllerResourceManager::ActivateResource (
5. Notify listeners about that deactivation is completed.
*/
void ConfigurationControllerResourceManager::DeactivateResource (
const Reference<XResourceId>& rxResourceId,
const rtl::Reference<ResourceId>& rxResourceId,
const rtl::Reference<Configuration>& rxConfiguration)
{
if ( ! rxResourceId.is())
@@ -262,7 +263,7 @@ void ConfigurationControllerResourceManager::AddResource (
ConfigurationControllerResourceManager::ResourceDescriptor
ConfigurationControllerResourceManager::RemoveResource (
const Reference<XResourceId>& rxResourceId)
const rtl::Reference<ResourceId>& rxResourceId)
{
ResourceDescriptor aDescriptor;
@@ -285,8 +286,8 @@ ConfigurationControllerResourceManager::ResourceDescriptor
//===== ConfigurationControllerResourceManager::ResourceComparator ============
bool ConfigurationControllerResourceManager::ResourceComparator::operator() (
const Reference<XResourceId>& rxId1,
const Reference<XResourceId>& rxId2) const
const rtl::Reference<ResourceId>& rxId1,
const rtl::Reference<ResourceId>& rxId2) const
{
if (rxId1.is() && rxId2.is())
return rxId1->compareTo(rxId2)<0;
@@ -28,10 +28,9 @@
#include <vector>
namespace sd::framework { class Configuration; }
namespace com::sun::star::drawing::framework { class XResourceId; }
namespace sd::framework {
class ResourceId;
class ConfigurationControllerBroadcaster;
class ResourceFactoryManager;
class ResourceFactory;
@@ -74,7 +73,7 @@ public:
*/
void ActivateResources (
const ::std::vector<
css::uno::Reference<css::drawing::framework::XResourceId> >& rResources,
rtl::Reference<sd::framework::ResourceId> >& rResources,
const rtl::Reference<sd::framework::Configuration>& rxConfiguration);
/** Deactivate all the resources that are specified by resource ids in
@@ -84,7 +83,7 @@ public:
*/
void DeactivateResources (
const ::std::vector<
css::uno::Reference<css::drawing::framework::XResourceId> >& rResources,
rtl::Reference<sd::framework::ResourceId> >& rResources,
const rtl::Reference<sd::framework::Configuration>& rxConfiguration);
/** Return the descriptor for the specified resource.
@@ -93,7 +92,7 @@ public:
an empty descriptor is returned.
*/
ResourceDescriptor GetResource (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId);
const rtl::Reference<sd::framework::ResourceId>& rxResourceId);
private:
osl::Mutex maMutex;
@@ -102,12 +101,12 @@ private:
{
public:
bool operator() (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxId1,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxId2) const;
const rtl::Reference<sd::framework::ResourceId>& rxId1,
const rtl::Reference<sd::framework::ResourceId>& rxId2) const;
};
typedef ::std::map<
css::uno::Reference<css::drawing::framework::XResourceId>,
rtl::Reference<sd::framework::ResourceId>,
ResourceDescriptor,
ResourceComparator> ResourceMap;
ResourceMap maResourceMap;
@@ -120,11 +119,11 @@ private:
std::shared_ptr<ConfigurationControllerBroadcaster> mpBroadcaster;
void ActivateResource (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId,
const rtl::Reference<sd::framework::ResourceId>& rxResourceId,
const rtl::Reference<sd::framework::Configuration>& rxConfiguration);
void DeactivateResource (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId,
const rtl::Reference<sd::framework::ResourceId>& rxResourceId,
const rtl::Reference<sd::framework::Configuration>& rxConfiguration);
void AddResource (
@@ -132,7 +131,7 @@ private:
const rtl::Reference<framework::ResourceFactory>& rxFactory);
ResourceDescriptor RemoveResource (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId);
const rtl::Reference<sd::framework::ResourceId>& rxResourceId);
};
} // end of namespace sd::framework
@@ -20,6 +20,7 @@
#include "ConfigurationTracer.hxx"
#include <framework/Configuration.hxx>
#include <ResourceId.hxx>
#include <sal/log.hxx>
using namespace ::com::sun::star::uno;
@@ -51,13 +52,13 @@ void ConfigurationTracer::TraceConfiguration (
#if OSL_DEBUG_LEVEL >=1
void ConfigurationTracer::TraceBoundResources (
const rtl::Reference<Configuration>& rxConfiguration,
const Reference<XResourceId>& rxResourceId,
const rtl::Reference<ResourceId>& rxResourceId,
const int nIndentation)
{
const Sequence<Reference<XResourceId> > aResourceList (
const std::vector<rtl::Reference<ResourceId> > aResourceList (
rxConfiguration->getResources(rxResourceId, u"", AnchorBindingMode_DIRECT));
static constexpr OUStringLiteral sIndentation (u" ");
for (Reference<XResourceId> const & resourceId : aResourceList)
for (rtl::Reference<ResourceId> const & resourceId : aResourceList)
{
OUString sLine (resourceId->getResourceURL());
for (int i=0; i<nIndentation; ++i)
@@ -26,10 +26,6 @@ namespace sd::framework
{
class Configuration;
}
namespace com::sun::star::drawing::framework
{
class XResourceId;
}
namespace com::sun::star::uno
{
template <typename> class Reference;
@@ -37,6 +33,8 @@ template <typename> class Reference;
namespace sd::framework
{
class ResourceId;
/** Print debug information about configurations to the standard error
output channel.
*/
@@ -47,10 +45,10 @@ public:
TraceConfiguration(const rtl::Reference<sd::framework::Configuration>& rxConfiguration,
const char* pMessage);
#if OSL_DEBUG_LEVEL >= 1
static void TraceBoundResources(
const rtl::Reference<sd::framework::Configuration>& rxConfiguration,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId,
const int nIndentation);
static void
TraceBoundResources(const rtl::Reference<sd::framework::Configuration>& rxConfiguration,
const rtl::Reference<sd::framework::ResourceId>& rxResourceId,
const int nIndentation);
#endif
};
@@ -196,7 +196,7 @@ void ConfigurationUpdater::CleanRequestedConfiguration()
return;
// Request the deactivation of pure anchors that have no child.
vector<Reference<XResourceId> > aResourcesToDeactivate;
vector<rtl::Reference<ResourceId> > aResourcesToDeactivate;
CheckPureAnchors(mxRequestedConfiguration, aResourcesToDeactivate);
if (!aResourcesToDeactivate.empty())
{
@@ -259,7 +259,7 @@ void ConfigurationUpdater::UpdateCore (const ConfigurationClassifier& rClassifie
#endif
// Deactivate pure anchors that have no child.
vector<Reference<XResourceId> > aResourcesToDeactivate;
vector<rtl::Reference<ResourceId> > aResourcesToDeactivate;
CheckPureAnchors(mxCurrentConfiguration, aResourcesToDeactivate);
if (!aResourcesToDeactivate.empty())
mpResourceManager->DeactivateResources(aResourcesToDeactivate, mxCurrentConfiguration);
@@ -272,17 +272,16 @@ void ConfigurationUpdater::UpdateCore (const ConfigurationClassifier& rClassifie
void ConfigurationUpdater::CheckPureAnchors (
const rtl::Reference<Configuration>& rxConfiguration,
vector<Reference<XResourceId> >& rResourcesToDeactivate)
vector<rtl::Reference<ResourceId> >& rResourcesToDeactivate)
{
if ( ! rxConfiguration.is())
return;
// Get a list of all resources in the configuration.
Sequence<Reference<XResourceId> > aResources(
std::vector<rtl::Reference<ResourceId> > aResources(
rxConfiguration->getResources(
nullptr, u"", AnchorBindingMode_INDIRECT));
auto aResourcesRange = asNonConstRange(aResources);
sal_Int32 nCount (aResources.getLength());
sal_Int32 nCount (aResources.size());
// Prepare the list of pure anchors that have to be deactivated.
rResourcesToDeactivate.clear();
@@ -293,7 +292,7 @@ void ConfigurationUpdater::CheckPureAnchors (
sal_Int32 nIndex (nCount-1);
while (nIndex >= 0)
{
const Reference<XResourceId>& xResourceId (aResources[nIndex]);
const rtl::Reference<ResourceId>& xResourceId (aResources[nIndex]);
const rtl::Reference<AbstractResource> xResource (
mpResourceManager->GetResource(xResourceId).mxResource);
bool bDeactiveCurrentResource (false);
@@ -311,7 +310,7 @@ void ConfigurationUpdater::CheckPureAnchors (
}
else
{
const Reference<XResourceId>& xPrevResourceId (aResources[nIndex+1]);
const rtl::Reference<ResourceId>& xPrevResourceId (aResources[nIndex+1]);
if ( ! xPrevResourceId.is()
|| ! xPrevResourceId->isBoundTo(xResourceId, AnchorBindingMode_DIRECT))
{
@@ -330,7 +329,7 @@ void ConfigurationUpdater::CheckPureAnchors (
rResourcesToDeactivate.push_back(xResourceId);
// Erase element from current configuration.
for (sal_Int32 nI=nIndex; nI<nCount-2; ++nI)
aResourcesRange[nI] = aResources[nI+1];
aResources[nI] = aResources[nI+1];
nCount -= 1;
}
nIndex -= 1;
@@ -25,14 +25,6 @@
#include <memory>
#include <vector>
namespace sd::framework
{
class Configuration;
}
namespace com::sun::star::drawing::framework
{
class XResourceId;
}
namespace sd
{
class DrawController;
@@ -40,10 +32,12 @@ class DrawController;
namespace sd::framework
{
class Configuration;
class ConfigurationClassifier;
class ConfigurationUpdaterLock;
class ConfigurationControllerResourceManager;
class ConfigurationControllerBroadcaster;
class ResourceId;
/** This is a helper class for the ConfigurationController. It handles the
update of the current configuration so that it looks like a requested
@@ -159,9 +153,9 @@ private:
Childless pure anchors are deactivated.
This affects only the current configuration.
*/
void CheckPureAnchors(const rtl::Reference<sd::framework::Configuration>& rxConfiguration,
::std::vector<css::uno::Reference<css::drawing::framework::XResourceId>>&
rResourcesToDeactivate);
void CheckPureAnchors(
const rtl::Reference<sd::framework::Configuration>& rxConfiguration,
::std::vector<rtl::Reference<sd::framework::ResourceId>>& rResourcesToDeactivate);
/** Remove from the requested configuration all pure anchors that have no
child. Requested but not yet activated anchors can not be removed
@@ -24,6 +24,7 @@
#include "GenericConfigurationChangeRequest.hxx"
#include <framework/FrameworkHelper.hxx>
#include <ResourceId.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -32,7 +33,7 @@ using namespace ::com::sun::star::drawing::framework;
namespace sd::framework {
GenericConfigurationChangeRequest::GenericConfigurationChangeRequest (
const Reference<XResourceId>& rxResourceId,
const rtl::Reference<ResourceId>& rxResourceId,
const Mode eMode)
: mxResourceId(rxResourceId),
meMode(eMode)
@@ -23,9 +23,8 @@
#include <com/sun/star/container/XNamed.hpp>
#include <comphelper/compbase.hxx>
namespace com::sun::star::drawing::framework { class XResourceId; }
namespace sd::framework {
class ResourceId;
typedef cppu::ImplInheritanceHelper <
sd::framework::ConfigurationChangeRequest,
@@ -57,7 +56,7 @@ public:
@throws css::css::lang::IllegalArgumentException
*/
GenericConfigurationChangeRequest (
const css::uno::Reference<css::drawing::framework::XResourceId>&
const rtl::Reference<sd::framework::ResourceId>&
rxResourceId,
const Mode eMode);
@@ -88,7 +87,7 @@ public:
virtual void SAL_CALL setName (const OUString& rName) override;
private:
const css::uno::Reference<css::drawing::framework::XResourceId> mxResourceId;
const rtl::Reference<sd::framework::ResourceId> mxResourceId;
const Mode meMode;
};
@@ -63,13 +63,13 @@ ResourceId::ResourceId (
}
ResourceId::ResourceId (
const OUString& rsResourceURL, const css::uno::Reference<XResourceId>& xAnchor)
const OUString& rsResourceURL, const rtl::Reference<ResourceId>& xAnchor)
{
maResourceURLs.push_back(rsResourceURL);
if (xAnchor.is())
{
maResourceURLs.push_back(xAnchor->getResourceURL());
const Sequence<OUString> aAnchorURLs (xAnchor->getAnchorURLs());
std::vector<OUString> aAnchorURLs (xAnchor->getAnchorURLs());
maResourceURLs.insert( maResourceURLs.end(), aAnchorURLs.begin(), aAnchorURLs.end() );
}
ParseResourceURL();
@@ -88,8 +88,8 @@ ResourceId::ResourceId (
ResourceId::ResourceId (
const OUString& rsResourceURL,
const OUString& rsFirstAnchorURL,
const Sequence<OUString>& rAnchorURLs)
: maResourceURLs(2+rAnchorURLs.getLength())
const std::vector<OUString>& rAnchorURLs)
: maResourceURLs(2+rAnchorURLs.size())
{
maResourceURLs[0] = rsResourceURL;
maResourceURLs[1] = rsFirstAnchorURL;
@@ -102,8 +102,7 @@ ResourceId::~ResourceId()
mpURL.reset();
}
OUString SAL_CALL
ResourceId::getResourceURL()
OUString ResourceId::getResourceURL() const
{
if (!maResourceURLs.empty())
return maResourceURLs[0];
@@ -111,8 +110,7 @@ OUString SAL_CALL
return OUString();
}
util::URL SAL_CALL
ResourceId::getFullResourceURL()
util::URL ResourceId::getFullResourceURL()
{
if (mpURL != nullptr)
return *mpURL;
@@ -132,14 +130,12 @@ util::URL SAL_CALL
return aURL;
}
sal_Bool SAL_CALL
ResourceId::hasAnchor()
bool ResourceId::hasAnchor() const
{
return maResourceURLs.size()>1;
}
Reference<XResourceId> SAL_CALL
ResourceId::getAnchor()
rtl::Reference<ResourceId> ResourceId::getAnchor() const
{
::rtl::Reference<ResourceId> rResourceId (new ResourceId());
const sal_Int32 nAnchorCount (maResourceURLs.size()-1);
@@ -152,22 +148,20 @@ Reference<XResourceId> SAL_CALL
return rResourceId;
}
Sequence<OUString> SAL_CALL
ResourceId::getAnchorURLs()
std::vector<OUString> ResourceId::getAnchorURLs() const
{
const sal_Int32 nAnchorCount (maResourceURLs.size() - 1);
if (nAnchorCount > 0)
{
Sequence<OUString> aAnchorURLs (nAnchorCount);
std::copy_n(maResourceURLs.begin() + 1, nAnchorCount, aAnchorURLs.getArray());
std::vector<OUString> aAnchorURLs(nAnchorCount);
std::copy_n(maResourceURLs.begin() + 1, nAnchorCount, aAnchorURLs.begin());
return aAnchorURLs;
}
else
return Sequence<OUString>();
return {};
}
OUString SAL_CALL
ResourceId::getResourceTypePrefix()
OUString ResourceId::getResourceTypePrefix() const
{
if (!maResourceURLs.empty() )
{
@@ -187,8 +181,7 @@ OUString SAL_CALL
return OUString();
}
sal_Int16 SAL_CALL
ResourceId::compareTo (const Reference<XResourceId>& rxResourceId)
sal_Int16 ResourceId::compareTo(const rtl::Reference<ResourceId>& rxResourceId) const
{
sal_Int16 nResult (0);
@@ -202,10 +195,7 @@ sal_Int16 SAL_CALL
}
else
{
ResourceId& rId = dynamic_cast<ResourceId&>(*rxResourceId);
// We have direct access to the implementation of the given
// resource id object.
nResult = CompareToLocalImplementation(rId);
nResult = CompareToLocalImplementation(*rxResourceId);
}
return nResult;
@@ -253,10 +243,9 @@ sal_Int16 ResourceId::CompareToLocalImplementation (const ResourceId& rId) const
return nResult;
}
sal_Bool SAL_CALL
ResourceId::isBoundTo (
const Reference<XResourceId>& rxResourceId,
AnchorBindingMode eMode)
bool ResourceId::isBoundTo (
const rtl::Reference<ResourceId>& rxResourceId,
AnchorBindingMode eMode) const
{
if ( ! rxResourceId.is())
{
@@ -264,20 +253,17 @@ sal_Bool SAL_CALL
return IsBoundToAnchor(nullptr, nullptr, eMode);
}
ResourceId& rId = dynamic_cast<ResourceId&>(*rxResourceId);
return IsBoundToAnchor(rId.maResourceURLs, eMode);
return IsBoundToAnchor(rxResourceId->maResourceURLs, eMode);
}
sal_Bool SAL_CALL
ResourceId::isBoundToURL (
bool ResourceId::isBoundToURL (
const OUString& rsAnchorURL,
AnchorBindingMode eMode)
AnchorBindingMode eMode) const
{
return IsBoundToAnchor(&rsAnchorURL, nullptr, eMode);
}
Reference<XResourceId> SAL_CALL
ResourceId::clone()
rtl::Reference<ResourceId> ResourceId::clone() const
{
return new ResourceId(std::vector(maResourceURLs));
}
@@ -289,13 +275,13 @@ Reference<XResourceId> SAL_CALL
*/
bool ResourceId::IsBoundToAnchor (
const OUString* psFirstAnchorURL,
const Sequence<OUString>* paAnchorURLs,
const std::vector<OUString>* paAnchorURLs,
AnchorBindingMode eMode) const
{
const sal_uInt32 nLocalAnchorURLCount (maResourceURLs.size() - 1);
const bool bHasFirstAnchorURL (psFirstAnchorURL!=nullptr);
const sal_uInt32 nAnchorURLCount ((bHasFirstAnchorURL?1:0)
+ (paAnchorURLs!=nullptr ? paAnchorURLs->getLength() : 0));
+ (paAnchorURLs!=nullptr ? paAnchorURLs->size() : 0));
// Check the lengths.
if (nLocalAnchorURLCount<nAnchorURLCount ||
@@ -309,7 +295,7 @@ bool ResourceId::IsBoundToAnchor (
sal_uInt32 nOffset = 0;
if (paAnchorURLs != nullptr)
{
sal_uInt32 nCount = paAnchorURLs->getLength();
sal_uInt32 nCount = paAnchorURLs->size();
while (nOffset < nCount)
{
if ( maResourceURLs[nLocalAnchorURLCount - nOffset] !=
@@ -34,6 +34,7 @@
#include <ViewShellBase.hxx>
#include <PaneChildWindows.hxx>
#include <DrawController.hxx>
#include <ResourceId.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -173,7 +174,7 @@ void BasicPaneFactory::disposing(std::unique_lock<std::mutex>&)
//===== AbstractPaneFactory ==========================================================
rtl::Reference<AbstractResource> BasicPaneFactory::createResource (
const Reference<XResourceId>& rxPaneId)
const rtl::Reference<ResourceId>& rxPaneId)
{
ThrowIfDisposed();
@@ -320,7 +321,7 @@ void SAL_CALL BasicPaneFactory::Listener::disposing (
}
rtl::Reference<AbstractResource> BasicPaneFactory::CreateFrameWindowPane (
const Reference<XResourceId>& rxPaneId)
const rtl::Reference<ResourceId>& rxPaneId)
{
if (!mpViewShellBase)
return nullptr;
@@ -329,7 +330,7 @@ rtl::Reference<AbstractResource> BasicPaneFactory::CreateFrameWindowPane (
}
rtl::Reference<AbstractResource> BasicPaneFactory::CreateFullScreenPane(
const Reference<XResourceId>& rxPaneId)
const rtl::Reference<ResourceId>& rxPaneId)
{
const Reference<uno::XComponentContext>& xContext = comphelper::getProcessComponentContext();
@@ -344,7 +345,7 @@ rtl::Reference<AbstractResource> BasicPaneFactory::CreateFullScreenPane(
}
rtl::Reference<AbstractResource> BasicPaneFactory::CreateChildWindowPane (
const Reference<XResourceId>& rxPaneId,
const rtl::Reference<ResourceId>& rxPaneId,
const PaneDescriptor& rDescriptor)
{
if (!mpViewShellBase)
@@ -22,6 +22,7 @@
#include <ViewTabBar.hxx>
#include <framework/FrameworkHelper.hxx>
#include <ResourceId.hxx>
#include <DrawController.hxx>
#include <unotools/mediadescriptor.hxx>
@@ -103,7 +104,7 @@ void SAL_CALL BasicToolBarFactory::disposing (
//===== AbstractPaneFactory ==========================================================
rtl::Reference<AbstractResource> BasicToolBarFactory::createResource (
const Reference<XResourceId>& rxToolBarId)
const rtl::Reference<ResourceId>& rxToolBarId)
{
ThrowIfDisposed();
@@ -36,6 +36,7 @@
#include <SlideSorterViewShell.hxx>
#include <FrameView.hxx>
#include <Window.hxx>
#include <ResourceId.hxx>
#include <comphelper/servicehelper.hxx>
#include <sfx2/viewfrm.hxx>
@@ -59,7 +60,7 @@ class BasicViewFactory::ViewDescriptor
public:
rtl::Reference<ViewShellWrapper> mxView;
std::shared_ptr<sd::ViewShell> mpViewShell;
Reference<XResourceId> mxViewId;
rtl::Reference<ResourceId> mxViewId;
static bool CompareView (const std::shared_ptr<ViewDescriptor>& rpDescriptor,
const rtl::Reference<AbstractResource>& rxView)
{ return rpDescriptor->mxView.get() == rxView.get(); }
@@ -72,7 +73,7 @@ BasicViewFactory::BasicViewFactory (const rtl::Reference<::sd::DrawController>&
mpFrameView(nullptr),
mpWindow(VclPtr<WorkWindow>::Create(nullptr,WB_STDWORK)),
mpViewCache(std::make_shared<ViewCache>()),
mxLocalPane(new Pane(Reference<XResourceId>(), mpWindow.get()))
mxLocalPane(new Pane(rtl::Reference<ResourceId>(), mpWindow.get()))
{
try
{
@@ -133,7 +134,7 @@ void BasicViewFactory::disposing(std::unique_lock<std::mutex>&)
}
rtl::Reference<AbstractResource> BasicViewFactory::createResource (
const Reference<XResourceId>& rxViewId)
const rtl::Reference<ResourceId>& rxViewId)
{
const bool bIsCenterPane (
rxViewId->isBoundToURL(FrameworkHelper::msCenterPaneURL, AnchorBindingMode_DIRECT));
@@ -230,7 +231,7 @@ void BasicViewFactory::releaseResource (const rtl::Reference<AbstractResource>&
}
std::shared_ptr<BasicViewFactory::ViewDescriptor> BasicViewFactory::CreateView (
const Reference<XResourceId>& rxViewId,
const rtl::Reference<ResourceId>& rxViewId,
vcl::Window& rWindow,
const rtl::Reference<AbstractPane>& rxPane,
FrameView* pFrameView,
@@ -272,7 +273,7 @@ std::shared_ptr<BasicViewFactory::ViewDescriptor> BasicViewFactory::CreateView (
}
std::shared_ptr<ViewShell> BasicViewFactory::CreateViewShell (
const Reference<XResourceId>& rxViewId,
const rtl::Reference<ResourceId>& rxViewId,
vcl::Window& rWindow,
FrameView* pFrameView)
{
@@ -392,9 +393,9 @@ bool BasicViewFactory::IsCacheable (const std::shared_ptr<ViewDescriptor>& rpDes
if (rpDescriptor->mxView)
{
static ::std::vector<Reference<XResourceId> > s_aCacheableResources = [&]()
static ::std::vector<rtl::Reference<ResourceId> > s_aCacheableResources = [&]()
{
::std::vector<Reference<XResourceId> > tmp;
::std::vector<rtl::Reference<ResourceId> > tmp;
FrameworkHelper::Instance(*mpBase);
// The slide sorter and the task panel are cacheable and relocatable.
@@ -406,14 +407,14 @@ bool BasicViewFactory::IsCacheable (const std::shared_ptr<ViewDescriptor>& rpDes
}();
bIsCacheable = std::any_of(s_aCacheableResources.begin(), s_aCacheableResources.end(),
[&rpDescriptor](const Reference<XResourceId>& rxId) { return rxId->compareTo(rpDescriptor->mxViewId) == 0; });
[&rpDescriptor](const rtl::Reference<ResourceId>& rxId) { return rxId->compareTo(rpDescriptor->mxViewId) == 0; });
}
return bIsCacheable;
}
std::shared_ptr<BasicViewFactory::ViewDescriptor> BasicViewFactory::GetViewFromCache (
const Reference<XResourceId>& rxViewId,
const rtl::Reference<ResourceId>& rxViewId,
const rtl::Reference<AbstractPane>& rxPane)
{
std::shared_ptr<ViewDescriptor> pDescriptor;
@@ -33,12 +33,11 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
namespace sd::framework {
ChildWindowPane::ChildWindowPane (
const Reference<XResourceId>& rxPaneId,
const rtl::Reference<ResourceId>& rxPaneId,
sal_uInt16 nChildWindowId,
ViewShellBase& rViewShellBase,
::std::unique_ptr<SfxShell> && pShell)
@@ -29,7 +29,6 @@
class SfxShell;
namespace sd { class ViewShellBase; }
namespace com::sun::star::drawing::framework { class XResourceId; }
namespace sd::framework {
@@ -47,7 +46,7 @@ class ChildWindowPane
{
public:
ChildWindowPane (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
const rtl::Reference<sd::framework::ResourceId>& rxPaneId,
sal_uInt16 nChildWindowId,
ViewShellBase& rViewShellBase,
::std::unique_ptr<SfxShell> && pShell);
@@ -21,11 +21,10 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
namespace sd::framework
{
FrameWindowPane::FrameWindowPane(const Reference<XResourceId>& rxPaneId, vcl::Window* pWindow)
FrameWindowPane::FrameWindowPane(const rtl::Reference<ResourceId>& rxPaneId, vcl::Window* pWindow)
: Pane(rxPaneId, pWindow)
{
}
@@ -21,20 +21,17 @@
#include <framework/Pane.hxx>
namespace com::sun::star::drawing::framework
{
class XResourceId;
}
namespace sd::framework
{
class ResourceId;
/** This subclass is not necessary anymore. We can remove it if that
remains so.
*/
class FrameWindowPane : public Pane
{
public:
FrameWindowPane(const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
FrameWindowPane(const rtl::Reference<sd::framework::ResourceId>& rxPaneId,
vcl::Window* pWindow);
virtual ~FrameWindowPane() noexcept override;
@@ -27,6 +27,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/util/URL.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <ResourceId.hxx>
#include <strings.hrc>
#include <sdresid.hxx>
#include <DrawDocShell.hxx>
@@ -39,7 +40,7 @@ namespace sd::framework {
FullScreenPane::FullScreenPane (
const Reference<XComponentContext>& rxComponentContext,
const Reference<XResourceId>& rxPaneId,
const rtl::Reference<ResourceId>& rxPaneId,
const vcl::Window* pViewShellWindow,
const DrawDocShell* pDrawDocShell)
: FrameWindowPane(rxPaneId,nullptr),
@@ -173,7 +174,7 @@ Reference<rendering::XCanvas> FullScreenPane::CreateCanvas()
}
void FullScreenPane::ExtractArguments (
const Reference<XResourceId>& rxPaneId,
const rtl::Reference<ResourceId>& rxPaneId,
sal_Int32& rnScreenNumberReturnValue,
bool& rbFullScreen)
{
@@ -52,7 +52,7 @@ public:
*/
FullScreenPane (
const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
const rtl::Reference<sd::framework::ResourceId>& rxPaneId,
const vcl::Window* pViewShellWindow,
const DrawDocShell* pDrawDocShell);
virtual ~FullScreenPane() noexcept override;
@@ -72,7 +72,7 @@ private:
VclPtr<WorkWindow> mpWorkWindow;
static void ExtractArguments (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
const rtl::Reference<sd::framework::ResourceId>& rxPaneId,
sal_Int32& rnScreenNumberReturnValue,
bool& rbFullScreen);
};
+3 -3
View File
@@ -19,6 +19,7 @@
#include <framework/Pane.hxx>
#include <framework/ResourceFactory.hxx>
#include <ResourceId.hxx>
#include <osl/mutex.hxx>
#include <toolkit/helper/vclunohelper.hxx>
@@ -29,12 +30,11 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
namespace sd::framework {
Pane::Pane (
const Reference<XResourceId>& rxPaneId,
const rtl::Reference<ResourceId>& rxPaneId,
vcl::Window* pWindow)
noexcept
: mxPaneId(rxPaneId),
@@ -96,7 +96,7 @@ void Pane::setVisible (bool bIsVisible)
//----- XResource -------------------------------------------------------------
Reference<XResourceId> Pane::getResourceId()
rtl::Reference<ResourceId> Pane::getResourceId()
{
{
std::unique_lock aGuard (m_aMutex);
@@ -22,6 +22,7 @@
#include <DrawController.hxx>
#include <framework/AbstractView.hxx>
#include <ResourceId.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <slideshow.hxx>
@@ -45,19 +46,19 @@ namespace {
class PresentationView : public AbstractView
{
public:
explicit PresentationView (const Reference<XResourceId>& rxViewId)
explicit PresentationView (const rtl::Reference<ResourceId>& rxViewId)
: mxResourceId(rxViewId) {};
// XView
virtual Reference<XResourceId> getResourceId() override
virtual rtl::Reference<ResourceId> getResourceId() override
{ return mxResourceId; };
virtual bool isAnchorOnly() override
{ return false; }
private:
Reference<XResourceId> mxResourceId;
rtl::Reference<ResourceId> mxResourceId;
};
} // end of anonymous namespace.
@@ -80,7 +81,7 @@ PresentationFactory::~PresentationFactory()
//----- XViewFactory ----------------------------------------------------------
rtl::Reference<AbstractResource> PresentationFactory::createResource (
const Reference<XResourceId>& rxViewId)
const rtl::Reference<ResourceId>& rxViewId)
{
{
std::unique_lock l(m_aMutex);
@@ -29,6 +29,7 @@
#include <model/SlsPageDescriptor.hxx>
#include <framework/AbstractPane.hxx>
#include <ResourceId.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <toolkit/helper/vclunohelper.hxx>
@@ -37,7 +38,6 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
using ::com::sun::star::awt::XWindow;
@@ -45,7 +45,7 @@ namespace sd::framework {
ViewShellWrapper::ViewShellWrapper (
const std::shared_ptr<ViewShell>& pViewShell,
const Reference<XResourceId>& rxViewId,
const rtl::Reference<ResourceId>& rxViewId,
const Reference<awt::XWindow>& rxWindow)
: mpViewShell(pViewShell),
mpSlideSorterViewShell(
@@ -90,7 +90,7 @@ uno::Any SAL_CALL ViewShellWrapper::queryInterface( const uno::Type & rType )
//----- AbstractResource -------------------------------------------------------------
Reference<XResourceId> ViewShellWrapper::getResourceId()
rtl::Reference<ResourceId> ViewShellWrapper::getResourceId()
{
return mxViewId;
}
@@ -113,12 +113,12 @@ void CenterViewFocusModule::HandleNewView (
// Make the center pane the active one. Tunnel through the
// controller to obtain a ViewShell pointer.
Sequence<Reference<XResourceId> > xViewIds (rxConfiguration->getResources(
std::vector<rtl::Reference<ResourceId> > xViewIds (rxConfiguration->getResources(
FrameworkHelper::CreateResourceId(FrameworkHelper::msCenterPaneURL),
FrameworkHelper::msViewURLPrefix,
AnchorBindingMode_DIRECT));
rtl::Reference<AbstractView> xView;
if (xViewIds.hasElements())
if (!xViewIds.empty())
xView = dynamic_cast<AbstractView*>( mxConfigurationController->getResource(xViewIds[0]).get() );
if (mpBase!=nullptr)
{
@@ -36,7 +36,6 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
namespace sd::framework {
@@ -242,11 +242,11 @@ bool NotesPaneModule::IsMasterView(const rtl::Reference<AbstractView>& xView)
void NotesPaneModule::onResourceRequest(
bool bActivation, const rtl::Reference<sd::framework::Configuration>& rxConfiguration)
{
Sequence<Reference<XResourceId>> aCenterViews = rxConfiguration->getResources(
std::vector<rtl::Reference<ResourceId>> aCenterViews = rxConfiguration->getResources(
FrameworkHelper::CreateResourceId(FrameworkHelper::msCenterPaneURL),
FrameworkHelper::msViewURLPrefix, AnchorBindingMode_DIRECT);
if (aCenterViews.getLength() != 1)
if (aCenterViews.size() != 1)
return;
// do not record the state of bottom pane when in master edit modes
@@ -8,7 +8,7 @@
*/
#pragma once
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <ResourceId.hxx>
#include <framework/ConfigurationChangeListener.hxx>
#include <comphelper/compbase.hxx>
#include <rtl/ref.hxx>
@@ -62,8 +62,8 @@ public:
private:
rtl::Reference<ConfigurationController> mxConfigurationController;
css::uno::Reference<css::drawing::framework::XResourceId> mxBottomImpressPaneId;
css::uno::Reference<css::drawing::framework::XResourceId> mxMainViewAnchorId;
rtl::Reference<sd::framework::ResourceId> mxBottomImpressPaneId;
rtl::Reference<sd::framework::ResourceId> mxMainViewAnchorId;
std::set<OUString> maActiveMainViewContainer;
OUString msCurrentMainViewURL;
@@ -278,11 +278,11 @@ void SlideSorterModule::HandleResourceRequest(
bool bActivation,
const rtl::Reference<Configuration>& rxConfiguration)
{
Sequence<Reference<XResourceId> > aCenterViews = rxConfiguration->getResources(
std::vector<rtl::Reference<ResourceId> > aCenterViews = rxConfiguration->getResources(
FrameworkHelper::CreateResourceId(FrameworkHelper::msCenterPaneURL),
FrameworkHelper::msViewURLPrefix,
AnchorBindingMode_DIRECT);
if (aCenterViews.getLength() == 1)
if (aCenterViews.size() == 1)
{
if (bActivation)
{
@@ -19,7 +19,7 @@
#pragma once
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <ResourceId.hxx>
#include <framework/ConfigurationChangeListener.hxx>
#include <comphelper/compbase.hxx>
#include <rtl/ref.hxx>
@@ -74,11 +74,11 @@ private:
rtl::Reference<ConfigurationController> mxConfigurationController;
::std::set<OUString> maActiveMainViewContainer;
/// The resource managed by this class.
css::uno::Reference<css::drawing::framework::XResourceId> mxResourceId;
rtl::Reference<sd::framework::ResourceId> mxResourceId;
/// The anchor of the main view.
css::uno::Reference<css::drawing::framework::XResourceId> mxMainViewAnchorId;
rtl::Reference<sd::framework::ResourceId> mxMainViewAnchorId;
OUString msCurrentMainViewURL;
css::uno::Reference<css::drawing::framework::XResourceId> mxViewTabBarId;
rtl::Reference<sd::framework::ResourceId> mxViewTabBarId;
rtl::Reference<::sd::DrawController> mxControllerManager;
void HandleMainViewSwitch (
@@ -146,7 +146,7 @@ void ToolBarModule::notifyConfigurationChange (
}
}
void ToolBarModule::HandlePaneViewShellFocused(const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId)
void ToolBarModule::HandlePaneViewShellFocused(const rtl::Reference<sd::framework::ResourceId>& rxResourceId)
{
if(!mpBase)
return;
@@ -265,10 +265,8 @@ IMPL_LINK(ToolBarModule, EventMultiplexerListener, sd::tools::EventMultiplexerEv
{
case EventMultiplexerEventId::FocusShifted:
{
uno::Reference<drawing::framework::XResourceId> xResourceId{ rEvent.mxUserData,
UNO_QUERY };
if (xResourceId.is())
HandlePaneViewShellFocused(xResourceId);
if (rEvent.mxUserData)
HandlePaneViewShellFocused(rEvent.mxUserData);
break;
}
default:
@@ -28,11 +28,6 @@
#include <rtl/ref.hxx>
#include <memory>
namespace com::sun::star::drawing::framework
{
class XResourceId;
}
namespace sd {
class DrawController;
class ViewShellBase;
@@ -46,6 +41,7 @@ class EventMultiplexerEvent;
namespace sd::framework
{
class ConfigurationController;
class ResourceId;
/** This module is responsible for locking the ToolBarManager during
configuration updates and for triggering ToolBarManager updates.
@@ -90,7 +86,7 @@ private:
void HandleUpdateStart();
void HandleUpdateEnd();
void HandlePaneViewShellFocused(
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId);
const rtl::Reference<sd::framework::ResourceId>& rxResourceId);
DECL_LINK(EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent&, void);
};
@@ -49,7 +49,7 @@ namespace sd::framework {
ViewTabBarModule::ViewTabBarModule (
const rtl::Reference<::sd::DrawController>& rxController,
const Reference<XResourceId>& rxViewTabBarId)
const rtl::Reference<ResourceId>& rxViewTabBarId)
: mxViewTabBarId(rxViewTabBarId)
{
if (!rxController.is())
@@ -148,7 +148,7 @@ void ViewTabBarModule::UpdateViewTabBar (const rtl::Reference<sd::ViewTabBar>& r
TabBarButton aEmptyButton;
Reference<XResourceId> xAnchor (mxViewTabBarId->getAnchor());
rtl::Reference<ResourceId> xAnchor (mxViewTabBarId->getAnchor());
TabBarButton aImpressViewButton;
aImpressViewButton.ResourceId = FrameworkHelper::CreateResourceId(
@@ -19,7 +19,7 @@
#pragma once
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <ResourceId.hxx>
#include <framework/ConfigurationChangeListener.hxx>
#include <comphelper/compbase.hxx>
#include <rtl/ref.hxx>
@@ -48,8 +48,7 @@ public:
*/
ViewTabBarModule (
const rtl::Reference<::sd::DrawController>& rxController,
const css::uno::Reference<
css::drawing::framework::XResourceId>& rxViewTabBarId);
const rtl::Reference<ResourceId>& rxViewTabBarId);
virtual ~ViewTabBarModule() override;
virtual void disposing(std::unique_lock<std::mutex>&) override;
@@ -66,7 +65,7 @@ public:
private:
rtl::Reference<ConfigurationController> mxConfigurationController;
css::uno::Reference<css::drawing::framework::XResourceId> mxViewTabBarId;
rtl::Reference<sd::framework::ResourceId> mxViewTabBarId;
/** This is the place where the view tab bar is filled. Only missing
buttons are added, so it is safe to call this method multiple
@@ -155,12 +155,12 @@ namespace {
{
public:
explicit FrameworkHelperResourceIdFilter (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId);
const rtl::Reference<sd::framework::ResourceId>& rxResourceId);
bool operator() (const sd::framework::ConfigurationChangeEvent& rEvent)
{ return mxResourceId.is() && rEvent.ResourceId.is()
&& mxResourceId->compareTo(rEvent.ResourceId) == 0; }
private:
css::uno::Reference<css::drawing::framework::XResourceId> mxResourceId;
rtl::Reference<sd::framework::ResourceId> mxResourceId;
};
} // end of anonymous namespace
@@ -207,14 +207,14 @@ namespace
return pViewShell;
}
rtl::Reference< AbstractResource > lcl_getFirstViewInPane( const rtl::Reference< ConfigurationController >& i_rConfigController,
const Reference< XResourceId >& i_rPaneId )
const rtl::Reference< ResourceId >& i_rPaneId )
{
try
{
rtl::Reference< sd::framework::Configuration > xConfiguration( i_rConfigController->getRequestedConfiguration() );
Sequence< Reference< XResourceId > > aViewIds( xConfiguration->getResources(
std::vector< rtl::Reference< ResourceId > > aViewIds( xConfiguration->getResources(
i_rPaneId, FrameworkHelper::msViewURLPrefix, AnchorBindingMode_DIRECT ) );
if ( aViewIds.hasElements() )
if ( !aViewIds.empty() )
return i_rConfigController->getResource( aViewIds[0] );
}
catch( const Exception& )
@@ -350,7 +350,7 @@ bool FrameworkHelper::IsValid() const
if ( !mxConfigurationController.is() )
return ::std::shared_ptr<ViewShell>();
Reference<XResourceId> xPaneId( CreateResourceId( rsPaneURL ) );
rtl::Reference<ResourceId> xPaneId( CreateResourceId( rsPaneURL ) );
return lcl_getViewShell( lcl_getFirstViewInPane( mxConfigurationController, xPaneId ) );
}
@@ -359,7 +359,7 @@ bool FrameworkHelper::IsValid() const
return lcl_getViewShell( rxView );
}
rtl::Reference<AbstractView> FrameworkHelper::GetView (const Reference<XResourceId>& rxPaneOrViewId)
rtl::Reference<AbstractView> FrameworkHelper::GetView (const rtl::Reference<ResourceId>& rxPaneOrViewId)
{
rtl::Reference<AbstractView> xView;
@@ -388,11 +388,11 @@ rtl::Reference<AbstractView> FrameworkHelper::GetView (const Reference<XResource
return xView;
}
Reference<XResourceId> FrameworkHelper::RequestView (
rtl::Reference<ResourceId> FrameworkHelper::RequestView (
const OUString& rsResourceURL,
const OUString& rsAnchorURL)
{
Reference<XResourceId> xViewId;
rtl::Reference<ResourceId> xViewId;
try
{
@@ -486,7 +486,7 @@ void updateEditMode(const rtl::Reference<AbstractView> &xView, const EditMode eE
void asyncUpdateEditMode(FrameworkHelper* const pHelper, const EditMode eEMode)
{
Reference<XResourceId> xPaneId (
rtl::Reference<ResourceId> xPaneId (
FrameworkHelper::CreateResourceId(framework::FrameworkHelper::msCenterPaneURL));
rtl::Reference<AbstractView> xView (pHelper->GetView(xPaneId));
updateEditMode(xView, eEMode, true);
@@ -525,7 +525,7 @@ void FrameworkHelper::HandleModeChangeSlot (
if ( ! mxConfigurationController.is())
throw RuntimeException();
Reference<XResourceId> xPaneId (
rtl::Reference<ResourceId> xPaneId (
CreateResourceId(framework::FrameworkHelper::msCenterPaneURL));
rtl::Reference<AbstractView> xView (GetView(xPaneId));
@@ -598,7 +598,7 @@ void FrameworkHelper::RunOnConfigurationEvent(
}
void FrameworkHelper::RunOnResourceActivation(
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId,
const rtl::Reference<sd::framework::ResourceId>& rxResourceId,
const Callback& rCallback)
{
if (mxConfigurationController.is()
@@ -698,7 +698,7 @@ void FrameworkHelper::UpdateConfiguration()
}
}
OUString FrameworkHelper::ResourceIdToString (const Reference<XResourceId>& rxResourceId)
OUString FrameworkHelper::ResourceIdToString (const rtl::Reference<ResourceId>& rxResourceId)
{
OUStringBuffer sString;
if (rxResourceId.is())
@@ -706,7 +706,7 @@ OUString FrameworkHelper::ResourceIdToString (const Reference<XResourceId>& rxRe
sString.append(rxResourceId->getResourceURL());
if (rxResourceId->hasAnchor())
{
const Sequence<OUString> aAnchorURLs (rxResourceId->getAnchorURLs());
std::vector<OUString> aAnchorURLs (rxResourceId->getAnchorURLs());
for (const auto& rAnchorURL : aAnchorURLs)
{
sString.append(" | " + rAnchorURL);
@@ -716,21 +716,21 @@ OUString FrameworkHelper::ResourceIdToString (const Reference<XResourceId>& rxRe
return sString.makeStringAndClear();
}
Reference<XResourceId> FrameworkHelper::CreateResourceId (const OUString& rsResourceURL)
rtl::Reference<ResourceId> FrameworkHelper::CreateResourceId (const OUString& rsResourceURL)
{
return new ::sd::framework::ResourceId(rsResourceURL);
}
Reference<XResourceId> FrameworkHelper::CreateResourceId (
rtl::Reference<ResourceId> FrameworkHelper::CreateResourceId (
const OUString& rsResourceURL,
const OUString& rsAnchorURL)
{
return new ::sd::framework::ResourceId(rsResourceURL, rsAnchorURL);
}
Reference<XResourceId> FrameworkHelper::CreateResourceId (
rtl::Reference<ResourceId> FrameworkHelper::CreateResourceId (
const OUString& rsResourceURL,
const Reference<XResourceId>& rxAnchorId)
const rtl::Reference<ResourceId>& rxAnchorId)
{
if (rxAnchorId.is())
return new ::sd::framework::ResourceId(
@@ -768,7 +768,7 @@ void SAL_CALL FrameworkHelper::DisposeListener::disposing (const lang::EventObje
//===== FrameworkHelperResourceIdFilter =======================================
FrameworkHelperResourceIdFilter::FrameworkHelperResourceIdFilter (
const Reference<XResourceId>& rxResourceId)
const rtl::Reference<ResourceId>& rxResourceId)
: mxResourceId(rxResourceId)
{
}
+4 -3
View File
@@ -23,6 +23,7 @@
#include <rtl/ref.hxx>
#include <com/sun/star/uno/XInterface.hpp>
#include <ResourceId.hxx>
template <typename Arg, typename Ret> class Link;
@@ -126,10 +127,10 @@ class EventMultiplexerEvent
public:
EventMultiplexerEventId meEventId;
const void* mpUserData;
css::uno::Reference<css::uno::XInterface> mxUserData;
rtl::Reference<sd::framework::ResourceId> mxUserData;
EventMultiplexerEvent(EventMultiplexerEventId eEventId, const void* pUserData,
const css::uno::Reference<css::uno::XInterface>& xUserData = {});
const rtl::Reference<sd::framework::ResourceId>& xUserData = {});
};
/** This convenience class makes it easy to listen to various events that
@@ -168,7 +169,7 @@ public:
Some data sent to the listeners along with the event.
*/
void MultiplexEvent(EventMultiplexerEventId eEventId, void const* pUserData,
const css::uno::Reference<css::uno::XInterface>& xUserData = {});
const rtl::Reference<sd::framework::ResourceId>& xUserData = {});
private:
class Implementation;
+7 -8
View File
@@ -26,7 +26,6 @@
#include <vector>
namespace com::sun::star::drawing::framework { class XResourceId; }
namespace vcl { class Window; }
namespace sd {
@@ -35,6 +34,7 @@ namespace sd {
class ViewTabBar;
}
namespace sd::framework { class ConfigurationController; }
namespace sd::framework { class ResourceId; }
namespace sd {
@@ -69,13 +69,13 @@ struct TabBarButton
*/
OUString ButtonLabel;
/** XResourceId object of the resource that is requested to be
/** ResourceId object of the resource that is requested to be
displayed when the tab bar button is activated.
<p>For some methods of the XTabBar interface only this
member is evaluated. That is because only this member is used to
identify a tab bar button.</p>
*/
css::uno::Reference<css::drawing::framework::XResourceId> ResourceId;
rtl::Reference<sd::framework::ResourceId> ResourceId;
};
@@ -103,7 +103,7 @@ class ViewTabBar final
{
public:
ViewTabBar (
const css::uno::Reference< css::drawing::framework::XResourceId>& rxViewTabBarId,
const rtl::Reference<framework::ResourceId>& rxViewTabBarId,
const rtl::Reference< ::sd::DrawController>& rxController);
virtual ~ViewTabBar() override;
@@ -140,8 +140,7 @@ public:
//----- AbstractResource ---------------------------------------------------------
virtual css::uno::Reference<
css::drawing::framework::XResourceId> getResourceId() override;
virtual rtl::Reference<framework::ResourceId> getResourceId() override;
virtual bool isAnchorOnly() override;
@@ -188,7 +187,7 @@ private:
rtl::Reference<::sd::framework::ConfigurationController> mxConfigurationController;
typedef ::std::vector<TabBarButton> TabBarButtonList;
TabBarButtonList maTabBarButtons;
css::uno::Reference<css::drawing::framework::XResourceId> mxViewTabBarId;
rtl::Reference<sd::framework::ResourceId> mxViewTabBarId;
ViewShellBase* mpViewShellBase;
int mnNoteBookWidthPadding;
@@ -203,7 +202,7 @@ private:
members.
*/
static vcl::Window* GetAnchorWindow(
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewTabBarId,
const rtl::Reference<sd::framework::ResourceId>& rxViewTabBarId,
const rtl::Reference<::sd::DrawController>& rxController);
};
@@ -19,12 +19,14 @@
#pragma once
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <comphelper/compbase.hxx>
#include <rtl/ref.hxx>
#include <sddllapi.h>
namespace sd::framework
{
class ResourceId;
/** Base interface that provides functionality shared by all resource types
of the drawing framework.
*/
@@ -33,10 +35,10 @@ class SD_DLLPUBLIC AbstractResource : public comphelper::WeakComponentImplHelper
public:
virtual ~AbstractResource() override;
/** Return an XResourceId object for the called resource.
/** Return an ResourceId object for the called resource.
The returned id unambiguously identifies the resource.
*/
virtual css::uno::Reference<css::drawing::framework::XResourceId> getResourceId() = 0;
virtual rtl::Reference<sd::framework::ResourceId> getResourceId() = 0;
/** Some resources must not be leafs, i.e. have to be anchor to at least
one other resource. Most panes are examples for this. Views on the
+11 -12
View File
@@ -22,13 +22,13 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/drawing/framework/AnchorBindingMode.hpp>
#include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <comphelper/compbase.hxx>
#include <rtl/ref.hxx>
#include <memory>
namespace sd::framework {
class ConfigurationController;
class ResourceId;
typedef comphelper::WeakComponentImplHelper <
css::container::XNamed
@@ -89,7 +89,7 @@ public:
IllegalArgumentException is thrown.
*/
void addResource (
const css::uno::Reference<css::drawing::framework::XResourceId>&
const rtl::Reference<sd::framework::ResourceId>&
rxResourceId);
/** Remove a resource from the configuration.
@@ -105,7 +105,7 @@ public:
IllegalArgumentException is thrown.
*/
void removeResource(
const css::uno::Reference<css::drawing::framework::XResourceId>&
const rtl::Reference<sd::framework::ResourceId>&
rxResourceId);
/** Returns the list of resources that are bound directly and/or
@@ -113,8 +113,8 @@ public:
returned resource ids.
@param xAnchorId
This anchor typically is either a pane or an empty
XResourceId object. An
empty reference is treated like an XResourceId object.
ResourceId object. An
empty reference is treated like an ResourceId object.
@param sTargetURLPrefix
When a non-empty string is given then resource ids are returned
only when their resource URL matches this prefix, i.e. when it
@@ -134,11 +134,10 @@ public:
The set of returned resource ids may be empty when there are no
resource ids that match all conditions. The resources in the
sequence are ordered with respect to the
XResourceId::compareTo() method.
ResourceId::compareTo() method.
*/
css::uno::Sequence< css::uno::Reference<
css::drawing::framework::XResourceId> > getResources (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxAnchorId,
std::vector< rtl::Reference<sd::framework::ResourceId> > getResources (
const rtl::Reference<sd::framework::ResourceId>& rxAnchorId,
std::u16string_view rsResourceURLPrefix,
css::drawing::framework::AnchorBindingMode eMode);
@@ -148,14 +147,14 @@ public:
active, i.e. has a visible representation in the GUI.
@param xResourceId
The id of a resource. May be empty (empty reference or empty
XResourceId object) in which case `FALSE` is
ResourceId object) in which case `FALSE` is
returned.
@return
Returns `TRUE` when the resource is part of the configuration
and `FALSE` when it is not.
*/
bool hasResource (
const css::uno::Reference<css::drawing::framework::XResourceId>&
const rtl::Reference<sd::framework::ResourceId>&
rxResourceId);
rtl::Reference<Configuration> createClone();
@@ -207,7 +206,7 @@ private:
into account when the actual event type field is determined.
*/
void PostEvent (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId,
const rtl::Reference<sd::framework::ResourceId>& rxResourceId,
const bool bActivation);
/** When the called object has already been disposed this method throws
@@ -20,6 +20,7 @@
#pragma once
#include <com/sun/star/lang/EventObject.hpp>
#include <ResourceId.hxx>
#include <rtl/ref.hxx>
namespace sd::framework
@@ -53,7 +54,7 @@ struct ConfigurationChangeEvent final : public ::css::lang::EventObject
rtl::Reference<::sd::framework::Configuration> Configuration;
/** The resource id that is part of the configuration change.
*/
::css::uno::Reference<::css::drawing::framework::XResourceId> ResourceId;
rtl::Reference<sd::framework::ResourceId> ResourceId;
/** The resource object that corresponds to the ResourceId. May
be an empty reference.
*/
@@ -90,16 +90,16 @@ public:
void unlock();
void requestResourceActivation (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId,
const rtl::Reference<sd::framework::ResourceId>& rxResourceId,
ResourceActivationMode eMode);
void requestResourceDeactivation (
const css::uno::Reference<css::drawing::framework::XResourceId>&
const rtl::Reference<sd::framework::ResourceId>&
rxResourceId);
rtl::Reference<sd::framework::AbstractResource>
getResource (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId);
const rtl::Reference<sd::framework::ResourceId>& rxResourceId);
void update();
+15 -22
View File
@@ -28,17 +28,16 @@
#include <memory>
#include <mutex>
namespace com::sun::star::drawing::framework { class XResourceId; }
namespace sd::framework { struct ConfigurationChangeEvent; }
namespace sd {
class ViewShellBase;
}
namespace sd::framework {
struct ConfigurationChangeEvent;
class ConfigurationController;
class AbstractView;
class ResourceId;
/** The FrameworkHelper is a convenience class that simplifies the
access to the drawing framework.
@@ -138,8 +137,7 @@ public:
typedef ::std::function<void (bool bEventSeen)> Callback;
typedef ::std::function<
void (
const css::uno::Reference<
css::drawing::framework::XResourceId>&)
const rtl::Reference<ResourceId>&)
> ResourceFunctor;
/** Test whether the called FrameworkHelper object is valid.
@@ -173,7 +171,7 @@ public:
necessary).
*/
rtl::Reference<sd::framework::AbstractView> GetView (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneOrViewId);
const rtl::Reference<sd::framework::ResourceId>& rxPaneOrViewId);
/** Request the specified view to be displayed in the specified pane.
When the pane is not visible its creation is also requested. The
@@ -187,7 +185,7 @@ public:
the caller can, for example, call RunOnResourceActivation() to
do some initialization after the requested view becomes active.
*/
css::uno::Reference<css::drawing::framework::XResourceId> RequestView (
rtl::Reference<sd::framework::ResourceId> RequestView (
const OUString& rsResourceURL,
const OUString& rsAnchorURL);
@@ -219,7 +217,7 @@ public:
*/
void RunOnResourceActivation(
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId,
const rtl::Reference<sd::framework::ResourceId>& rxResourceId,
const Callback& rCallback);
/** Normally the requested changes of the configuration are executed
@@ -252,36 +250,31 @@ public:
*/
void UpdateConfiguration();
/** Return a string representation of the given XResourceId object.
/** Return a string representation of the given ResourceId object.
*/
static OUString ResourceIdToString (
const css::uno::Reference<
css::drawing::framework::XResourceId>& rxResourceId);
const rtl::Reference<ResourceId>& rxResourceId);
/** Create a new XResourceId object for the given resource URL.
/** Create a new ResourceId object for the given resource URL.
*/
static css::uno::Reference<
css::drawing::framework::XResourceId>
static rtl::Reference<ResourceId>
CreateResourceId (
const OUString& rsResourceURL);
/** Create a new XResourceId object for the given resource URL and a
/** Create a new ResourceId object for the given resource URL and a
single anchor URL.
*/
static css::uno::Reference<
css::drawing::framework::XResourceId>
static rtl::Reference<ResourceId>
CreateResourceId (
const OUString& rsResourceURL,
const OUString& rsAnchorURL);
/** Create a new XResourceId object for the given resource URL.
/** Create a new ResourceId object for the given resource URL.
*/
static css::uno::Reference<
css::drawing::framework::XResourceId>
static rtl::Reference<ResourceId>
CreateResourceId (
const OUString& rsResourceURL,
const css::uno::Reference<
css::drawing::framework::XResourceId>& rxAnchor);
const rtl::Reference<ResourceId>& rxAnchor);
const rtl::Reference<ConfigurationController>&
GetConfigurationController() const { return mxConfigurationController;}
+3 -3
View File
@@ -52,7 +52,7 @@ public:
NULL.
*/
Pane (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
const rtl::Reference<sd::framework::ResourceId>& rxPaneId,
vcl::Window* pWindow)
noexcept;
virtual ~Pane() override;
@@ -85,7 +85,7 @@ public:
//----- XResource ---------------------------------------------------------
virtual css::uno::Reference<css::drawing::framework::XResourceId> getResourceId() override;
virtual rtl::Reference<sd::framework::ResourceId> getResourceId() override;
/** For the typical pane it makes no sense to be displayed without a
view. Therefore this default implementation returns always <TRUE/>.
@@ -93,7 +93,7 @@ public:
virtual bool isAnchorOnly() override;
protected:
css::uno::Reference<css::drawing::framework::XResourceId> mxPaneId;
rtl::Reference<sd::framework::ResourceId> mxPaneId;
VclPtr<vcl::Window> mpWindow;
css::uno::Reference<css::awt::XWindow> mxWindow;
css::uno::Reference<css::rendering::XCanvas> mxCanvas;
@@ -45,8 +45,7 @@ public:
virtual rtl::Reference<sd::framework::AbstractResource>
createResource (
const css::uno::Reference<
css::drawing::framework::XResourceId>& rxViewId) override;
const rtl::Reference<ResourceId>& rxViewId) override;
virtual void releaseResource (
const rtl::Reference<sd::framework::AbstractResource>& xView) override;
@@ -26,6 +26,8 @@
namespace sd::framework
{
class ResourceId;
/** Factory and possibly cache for creating and releasing resources.
<p>A resource factory is created and used by the
XConfigurationController object.</p>
@@ -35,7 +37,7 @@ namespace sd::framework
class SD_DLLPUBLIC ResourceFactory : public comphelper::WeakComponentImplHelper<>
{
public:
/** Create a resource for the given XResourceId object.
/** Create a resource for the given ResourceId object.
@param xResourceId
The resource URL of this id specifies the type of resource to
create. The anchor can be used to obtain the associated object
@@ -55,8 +57,7 @@ public:
when the given URL is not supported by the factory.
*/
virtual rtl::Reference<sd::framework::AbstractResource>
createResource(const ::css::uno::Reference<::css::drawing::framework::XResourceId>& xResourceId)
= 0;
createResource(const rtl::Reference<sd::framework::ResourceId>& xResourceId) = 0;
/** Call this method to tell a factory that the given resource is no
longer in use. The factory can decide whether to destroy the
@@ -59,7 +59,7 @@ public:
*/
ViewShellWrapper (
const ::std::shared_ptr<ViewShell>& pViewShell,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const css::uno::Reference<css::awt::XWindow>& rxWindow);
virtual ~ViewShellWrapper() override;
@@ -74,7 +74,7 @@ public:
// AbstractResource
virtual css::uno::Reference<css::drawing::framework::XResourceId>
virtual rtl::Reference<sd::framework::ResourceId>
getResourceId() override;
virtual bool isAnchorOnly() override;
@@ -120,7 +120,7 @@ public:
private:
::std::shared_ptr< ViewShell > mpViewShell;
::std::shared_ptr< ::sd::slidesorter::SlideSorterViewShell > mpSlideSorterViewShell;
const css::uno::Reference< css::drawing::framework::XResourceId > mxViewId;
const rtl::Reference< sd::framework::ResourceId > mxViewId;
css::uno::Reference<css::awt::XWindow > mxWindow;
};
@@ -60,7 +60,7 @@ public:
virtual rtl::Reference<sd::framework::AbstractResource>
createResource (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId) override;
const rtl::Reference<sd::framework::ResourceId>& rxPaneId) override;
virtual void
releaseResource (
@@ -101,14 +101,14 @@ private:
*/
rtl::Reference<sd::framework::AbstractResource>
CreateFrameWindowPane (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId);
const rtl::Reference<sd::framework::ResourceId>& rxPaneId);
/** Create a new pane that represents the center pane in full screen
mode.
*/
rtl::Reference<sd::framework::AbstractResource>
CreateFullScreenPane (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId);
const rtl::Reference<sd::framework::ResourceId>& rxPaneId);
/** Create a new instance of ChildWindowPane.
@param rPaneId
@@ -116,8 +116,7 @@ private:
*/
rtl::Reference<sd::framework::AbstractResource>
CreateChildWindowPane (
const css::uno::Reference<
css::drawing::framework::XResourceId>& rxPaneId,
const rtl::Reference<ResourceId>& rxPaneId,
const PaneDescriptor& rDescriptor);
/// @throws css::lang::DisposedException
@@ -51,8 +51,7 @@ public:
virtual rtl::Reference<sd::framework::AbstractResource>
createResource (
const css::uno::Reference<
css::drawing::framework::XResourceId>& rxToolBarId) override;
const rtl::Reference<ResourceId>& rxToolBarId) override;
virtual void
releaseResource (
@@ -62,7 +62,7 @@ public:
virtual rtl::Reference<sd::framework::AbstractResource>
createResource (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId) override;
const rtl::Reference<sd::framework::ResourceId>& rxViewId) override;
virtual void releaseResource (
const rtl::Reference<sd::framework::AbstractResource>& xView) override;
@@ -82,14 +82,14 @@ private:
rtl::Reference<framework::AbstractPane> mxLocalPane;
std::shared_ptr<ViewDescriptor> CreateView (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
vcl::Window& rWindow,
const rtl::Reference<framework::AbstractPane>& rxPane,
FrameView* pFrameView,
const bool bIsCenterView);
std::shared_ptr<ViewShell> CreateViewShell (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
vcl::Window& rWindow,
FrameView* pFrameView);
@@ -104,7 +104,7 @@ private:
const std::shared_ptr<ViewDescriptor>& rpDescriptor);
std::shared_ptr<ViewDescriptor> GetViewFromCache (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
const rtl::Reference<sd::framework::ResourceId>& rxViewId,
const rtl::Reference<AbstractPane>& rxPane);
};
+1 -1
View File
@@ -474,7 +474,7 @@ void LayoutMenu::Fill()
{
if (mrBase.GetDrawController())
{
Reference<XResourceId> xPaneId (new sd::framework::ResourceId(
rtl::Reference<sd::framework::ResourceId> xPaneId (new sd::framework::ResourceId(
FrameworkHelper::msCenterPaneURL));
rtl::Reference<framework::AbstractView> xView (FrameworkHelper::Instance(mrBase)->GetView(xPaneId));
if (xView.is())
+6 -4
View File
@@ -22,6 +22,7 @@
#include <ViewShell.hxx>
#include <ViewShellBase.hxx>
#include <DrawController.hxx>
#include <ResourceId.hxx>
#include "slideshowimpl.hxx"
#include <framework/ConfigurationController.hxx>
#include <framework/FrameworkHelper.hxx>
@@ -59,10 +60,11 @@ PaneHider::PaneHider(const ViewShell& rViewShell, SlideshowImpl* pSlideShow)
if (mxConfiguration.is())
{
// Iterate over the resources and deactivate the panes.
const Sequence<Reference<XResourceId>> aResources(mxConfiguration->getResources(
nullptr, framework::FrameworkHelper::msPaneURLPrefix,
AnchorBindingMode_DIRECT));
for (const Reference<XResourceId>& xPaneId : aResources)
const std::vector<rtl::Reference<framework::ResourceId>> aResources(
mxConfiguration->getResources(nullptr,
framework::FrameworkHelper::msPaneURLPrefix,
AnchorBindingMode_DIRECT));
for (const rtl::Reference<framework::ResourceId>& xPaneId : aResources)
{
if (xPaneId->getResourceURL() != FrameworkHelper::msCenterPaneURL)
{
@@ -20,6 +20,7 @@
#include <DrawController.hxx>
#include <ViewShellBase.hxx>
#include <slideshow.hxx>
#include <ResourceId.hxx>
#include "SlideShowRestarter.hxx"
#include <comphelper/propertyvalue.hxx>
+1
View File
@@ -59,6 +59,7 @@
#include <optsitem.hxx>
#include <strings.hrc>
#include <sdresid.hxx>
#include <ResourceId.hxx>
using ::com::sun::star::presentation::XSlideShowController;
using ::sd::framework::FrameworkHelper;
@@ -54,6 +54,7 @@
#include <vcl/ptrstyle.hxx>
#include <optional>
#include <sdmod.hxx>
#include <ResourceId.hxx>
namespace {
const sal_uInt32 SINGLE_CLICK (0x00000001);
@@ -65,7 +65,6 @@ using namespace ::sd::slidesorter;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
using ::sd::framework::FrameworkHelper;
using ::vcl::EnumContext;
+4 -4
View File
@@ -135,7 +135,7 @@ private:
void CallListeners (
EventMultiplexerEventId eId,
void const * pUserData = nullptr,
const css::uno::Reference<css::uno::XInterface>& xUserData = {});
const rtl::Reference<sd::framework::ResourceId>& xUserData = {});
DECL_LINK(SlideSorterSelectionChangeListener, LinkParamNone*, void);
};
@@ -177,7 +177,7 @@ void EventMultiplexer::RemoveEventListener (
}
void EventMultiplexer::MultiplexEvent(EventMultiplexerEventId eEventId, void const* pUserData,
const css::uno::Reference<css::uno::XInterface>& xUserData)
const rtl::Reference<sd::framework::ResourceId>& xUserData)
{
EventMultiplexerEvent aEvent(eEventId, pUserData, xUserData);
mpImpl->CallListeners(aEvent);
@@ -621,7 +621,7 @@ void EventMultiplexer::Implementation::Notify (
void EventMultiplexer::Implementation::CallListeners(
EventMultiplexerEventId eId, void const* pUserData,
const css::uno::Reference<css::uno::XInterface>& xUserData)
const rtl::Reference<sd::framework::ResourceId>& xUserData)
{
EventMultiplexerEvent aEvent(eId, pUserData, xUserData);
CallListeners(aEvent);
@@ -646,7 +646,7 @@ IMPL_LINK_NOARG(EventMultiplexer::Implementation, SlideSorterSelectionChangeList
EventMultiplexerEvent::EventMultiplexerEvent (
EventMultiplexerEventId eEventId,
const void* pUserData,
const css::uno::Reference<css::uno::XInterface>& xUserData)
const rtl::Reference<sd::framework::ResourceId>& xUserData)
: meEventId(eEventId),
mpUserData(pUserData),
mxUserData(xUserData)
+3 -2
View File
@@ -25,6 +25,7 @@
#include <ViewShellManager.hxx>
#include <FormShellManager.hxx>
#include <Window.hxx>
#include <ResourceId.hxx>
#include <framework/ConfigurationController.hxx>
#include <framework/ModuleController.hxx>
@@ -571,11 +572,11 @@ Any SAL_CALL DrawController::getSlideSorterSelection()
ThrowIfDisposed();
// * traverse Impress resources to find slide preview pane, grab selection from there
const uno::Sequence<uno::Reference<drawing::framework::XResourceId>> aResIds(
const std::vector<rtl::Reference<framework::ResourceId>> aResIds(
mxConfigurationController->getCurrentConfiguration()->getResources(
{}, u"", drawing::framework::AnchorBindingMode_INDIRECT));
for (const uno::Reference<drawing::framework::XResourceId>& rResId : aResIds)
for (const rtl::Reference<framework::ResourceId>& rResId : aResIds)
{
// can we somehow obtain the slidesorter from the Impress framework?
if (rResId->getResourceURL() == "private:resource/view/SlideSorter")
+1
View File
@@ -65,6 +65,7 @@
#include <VectorGraphicSearchContext.hxx>
#include <fusearch.hxx>
#include <sdpage.hxx>
#include <ResourceId.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+5 -5
View File
@@ -327,9 +327,9 @@ void ViewShellBase::LateInit (const OUString& rsDefaultView)
FrameworkHelper::Instance(*this);
// Create the resource ids for the center pane and view.
const Reference<drawing::framework::XResourceId> xCenterPaneId (
const rtl::Reference<framework::ResourceId> xCenterPaneId (
FrameworkHelper::CreateResourceId(FrameworkHelper::msCenterPaneURL));
const Reference<drawing::framework::XResourceId> xCenterViewId (
const rtl::Reference<framework::ResourceId> xCenterViewId (
FrameworkHelper::CreateResourceId(sView, xCenterPaneId));
// Request center pane and view.
@@ -1311,9 +1311,9 @@ void ViewShellBase::Implementation::SetPaneVisibility (
if (!pDrawController)
return;
Reference<XResourceId> xPaneId (new sd::framework::ResourceId(
rtl::Reference<framework::ResourceId> xPaneId (new sd::framework::ResourceId(
rsPaneURL));
Reference<XResourceId> xViewId (new sd::framework::ResourceId(
rtl::Reference<framework::ResourceId> xViewId (new sd::framework::ResourceId(
rsViewURL, rsPaneURL));
// Determine the new visibility state.
@@ -1386,7 +1386,7 @@ void ViewShellBase::Implementation::GetSlotState (SfxItemSet& rSet)
{
bool bState (false);
bool bEnabled;
Reference<XResourceId> xResourceId;
rtl::Reference<framework::ResourceId> xResourceId;
try
{
bEnabled = true;
+4 -4
View File
@@ -60,7 +60,7 @@ bool IsEqual (const TabBarButton& rButton1, const TabBarButton& rButton2)
} // end of anonymous namespace
ViewTabBar::ViewTabBar (
const Reference<XResourceId>& rxViewTabBarId,
const rtl::Reference<framework::ResourceId>& rxViewTabBarId,
const rtl::Reference<::sd::DrawController>& rxController)
: mxListener(new Listener(*this)),
mpTabControl(VclPtr<TabBarControl>::Create(GetAnchorWindow(rxViewTabBarId,rxController), this)),
@@ -139,7 +139,7 @@ void ViewTabBar::disposing(std::unique_lock<std::mutex>&)
}
vcl::Window* ViewTabBar::GetAnchorWindow(
const Reference<XResourceId>& rxViewTabBarId,
const rtl::Reference<framework::ResourceId>& rxViewTabBarId,
const rtl::Reference<::sd::DrawController>& rxController)
{
vcl::Window* pWindow = nullptr;
@@ -229,7 +229,7 @@ bool ViewTabBar::hasTabBarButton (const TabBarButton& rButton)
//----- AbstractResource -------------------------------------------------------------
Reference<XResourceId> ViewTabBar::getResourceId()
rtl::Reference<framework::ResourceId> ViewTabBar::getResourceId()
{
return mxViewTabBarId;
}
@@ -384,7 +384,7 @@ void ViewTabBar::UpdateActiveButton()
if (!xView.is())
return;
Reference<XResourceId> xViewId (xView->getResourceId());
rtl::Reference<framework::ResourceId> xViewId (xView->getResourceId());
for (size_t nIndex=0; nIndex<maTabBarButtons.size(); ++nIndex)
{
if (maTabBarButtons[nIndex].ResourceId->compareTo(xViewId) == 0)
+3 -2
View File
@@ -30,6 +30,7 @@
#include <DrawController.hxx>
#include <LayerTabBar.hxx>
#include <Outliner.hxx>
#include <ResourceId.hxx>
#include <sal/log.hxx>
#include <sfx2/viewfrm.hxx>
@@ -405,7 +406,7 @@ void ViewShell::Deactivate(bool bIsMDIActivate)
void ViewShell::BroadcastContextForActivation(const bool bIsActivated)
{
auto getFrameworkResourceIdForShell
= [&]() -> uno::Reference<drawing::framework::XResourceId> const
= [&]() -> rtl::Reference<framework::ResourceId> const
{
DrawController* pDrawController = GetViewShellBase().GetDrawController();
if (!pDrawController)
@@ -424,7 +425,7 @@ void ViewShell::BroadcastContextForActivation(const bool bIsActivated)
auto aResIdsIndirect
= xConfiguration->getResources({}, u"", drawing::framework::AnchorBindingMode_INDIRECT);
for (const uno::Reference<drawing::framework::XResourceId>& rResId : aResIdsIndirect)
for (const rtl::Reference<framework::ResourceId>& rResId : aResIdsIndirect)
{
auto pFrameworkHelper = framework::FrameworkHelper::Instance(GetViewShellBase());