use 'r' prefix for elements passed by reference instead of 'a'
Change-Id: I3ab8d0a4346f7706c532880e00dfeb079e92c651 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186804 Tested-by: Jenkins Reviewed-by: Sahil Gautam <sahil.gautam@collabora.com>
This commit is contained in:
@@ -80,17 +80,17 @@ class SVT_DLLPUBLIC ToolboxController :
|
||||
const css::uno::Reference< css::uno::XComponentContext >& getContext() const;
|
||||
css::uno::Reference< css::frame::XLayoutManager > getLayoutManager() const;
|
||||
|
||||
void updateStatus( const OUString& aCommandURL );
|
||||
void updateStatus( const OUString& rCommandURL );
|
||||
void updateStatus();
|
||||
|
||||
// XInterface
|
||||
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
|
||||
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) override;
|
||||
virtual void SAL_CALL acquire() noexcept override;
|
||||
virtual void SAL_CALL release() noexcept override;
|
||||
virtual css::uno::Sequence<css::uno::Type> SAL_CALL getTypes() override;
|
||||
|
||||
// XInitialization
|
||||
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
|
||||
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& rArguments ) override;
|
||||
|
||||
// XUpdatable
|
||||
virtual void SAL_CALL update() override;
|
||||
@@ -98,7 +98,7 @@ class SVT_DLLPUBLIC ToolboxController :
|
||||
// XComponent
|
||||
virtual void SAL_CALL dispose() override;
|
||||
virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override;
|
||||
virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override;
|
||||
virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& rListener ) override;
|
||||
|
||||
// XEventListener
|
||||
using cppu::OPropertySetHelper::disposing;
|
||||
@@ -164,8 +164,8 @@ class SVT_DLLPUBLIC ToolboxController :
|
||||
css::uno::Reference< css::frame::XDispatch > > URLToDispatchMap;
|
||||
|
||||
// methods to support status forwarder, known by the old sfx2 toolbox controller implementation
|
||||
void addStatusListener( const OUString& aCommandURL );
|
||||
void removeStatusListener( const OUString& aCommandURL );
|
||||
void addStatusListener( const OUString& rCommandURL );
|
||||
void removeStatusListener( const OUString& rCommandURL );
|
||||
void bindListener();
|
||||
void unbindListener();
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ css::uno::Sequence<css::uno::Type> ToolboxController::getTypes()
|
||||
getBaseTypes());
|
||||
}
|
||||
|
||||
void SAL_CALL ToolboxController::initialize( const Sequence< Any >& aArguments )
|
||||
void SAL_CALL ToolboxController::initialize( const Sequence< Any >& rArguments )
|
||||
{
|
||||
SolarMutexGuard aSolarMutexGuard;
|
||||
|
||||
@@ -174,7 +174,7 @@ void SAL_CALL ToolboxController::initialize( const Sequence< Any >& aArguments )
|
||||
m_bInitialized = true;
|
||||
m_bSupportVisible = false;
|
||||
PropertyValue aPropValue;
|
||||
for ( const auto& rArgument : aArguments )
|
||||
for ( const auto& rArgument : rArguments )
|
||||
{
|
||||
if ( rArgument >>= aPropValue )
|
||||
{
|
||||
@@ -279,9 +279,9 @@ void SAL_CALL ToolboxController::addEventListener( const Reference< XEventListen
|
||||
m_aListenerContainer.addInterface( cppu::UnoType<XEventListener>::get(), xListener );
|
||||
}
|
||||
|
||||
void SAL_CALL ToolboxController::removeEventListener( const Reference< XEventListener >& aListener )
|
||||
void SAL_CALL ToolboxController::removeEventListener( const Reference< XEventListener >& rListener )
|
||||
{
|
||||
m_aListenerContainer.removeInterface( cppu::UnoType<XEventListener>::get(), aListener );
|
||||
m_aListenerContainer.removeInterface( cppu::UnoType<XEventListener>::get(), rListener );
|
||||
}
|
||||
|
||||
// XEventListener
|
||||
@@ -374,7 +374,7 @@ Reference< XWindow > SAL_CALL ToolboxController::createItemWindow( const Referen
|
||||
return Reference< XWindow >();
|
||||
}
|
||||
|
||||
void ToolboxController::addStatusListener( const OUString& aCommandURL )
|
||||
void ToolboxController::addStatusListener( const OUString& rCommandURL )
|
||||
{
|
||||
Reference< XDispatch > xDispatch;
|
||||
Reference< XStatusListener > xStatusListener;
|
||||
@@ -382,7 +382,7 @@ void ToolboxController::addStatusListener( const OUString& aCommandURL )
|
||||
|
||||
{
|
||||
SolarMutexGuard aSolarMutexGuard;
|
||||
URLToDispatchMap::iterator pIter = m_aListenerMap.find( aCommandURL );
|
||||
URLToDispatchMap::iterator pIter = m_aListenerMap.find( rCommandURL );
|
||||
|
||||
// Already in the list of status listener. Do nothing.
|
||||
if ( pIter != m_aListenerMap.end() )
|
||||
@@ -393,7 +393,7 @@ void ToolboxController::addStatusListener( const OUString& aCommandURL )
|
||||
if ( !m_bInitialized )
|
||||
{
|
||||
// Put into the unordered_map of status listener. Will be activated when initialized is called
|
||||
m_aListenerMap.emplace( aCommandURL, Reference< XDispatch >() );
|
||||
m_aListenerMap.emplace( rCommandURL, Reference< XDispatch >() );
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -402,13 +402,13 @@ void ToolboxController::addStatusListener( const OUString& aCommandURL )
|
||||
Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
|
||||
if ( m_xContext.is() && xDispatchProvider.is() )
|
||||
{
|
||||
aTargetURL.Complete = aCommandURL;
|
||||
aTargetURL.Complete = rCommandURL;
|
||||
if ( m_xUrlTransformer.is() )
|
||||
m_xUrlTransformer->parseStrict( aTargetURL );
|
||||
xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
|
||||
|
||||
xStatusListener = this;
|
||||
URLToDispatchMap::iterator aIter = m_aListenerMap.find( aCommandURL );
|
||||
URLToDispatchMap::iterator aIter = m_aListenerMap.find( rCommandURL );
|
||||
if ( aIter != m_aListenerMap.end() )
|
||||
{
|
||||
Reference< XDispatch > xOldDispatch( aIter->second );
|
||||
@@ -424,7 +424,7 @@ void ToolboxController::addStatusListener( const OUString& aCommandURL )
|
||||
}
|
||||
}
|
||||
else
|
||||
m_aListenerMap.emplace( aCommandURL, xDispatch );
|
||||
m_aListenerMap.emplace( rCommandURL, xDispatch );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -440,11 +440,11 @@ void ToolboxController::addStatusListener( const OUString& aCommandURL )
|
||||
}
|
||||
}
|
||||
|
||||
void ToolboxController::removeStatusListener( const OUString& aCommandURL )
|
||||
void ToolboxController::removeStatusListener( const OUString& rCommandURL )
|
||||
{
|
||||
SolarMutexGuard aSolarMutexGuard;
|
||||
|
||||
URLToDispatchMap::iterator pIter = m_aListenerMap.find( aCommandURL );
|
||||
URLToDispatchMap::iterator pIter = m_aListenerMap.find( rCommandURL );
|
||||
if ( pIter == m_aListenerMap.end() )
|
||||
return;
|
||||
|
||||
@@ -455,7 +455,7 @@ void ToolboxController::removeStatusListener( const OUString& aCommandURL )
|
||||
try
|
||||
{
|
||||
css::util::URL aTargetURL;
|
||||
aTargetURL.Complete = aCommandURL;
|
||||
aTargetURL.Complete = rCommandURL;
|
||||
if ( m_xUrlTransformer.is() )
|
||||
m_xUrlTransformer->parseStrict( aTargetURL );
|
||||
|
||||
@@ -622,7 +622,7 @@ void ToolboxController::updateStatus()
|
||||
bindListener();
|
||||
}
|
||||
|
||||
void ToolboxController::updateStatus( const OUString& aCommandURL )
|
||||
void ToolboxController::updateStatus( const OUString& rCommandURL )
|
||||
{
|
||||
Reference< XDispatch > xDispatch;
|
||||
Reference< XStatusListener > xStatusListener;
|
||||
@@ -639,7 +639,7 @@ void ToolboxController::updateStatus( const OUString& aCommandURL )
|
||||
xStatusListener = this;
|
||||
if ( m_xContext.is() && xDispatchProvider.is() )
|
||||
{
|
||||
aTargetURL.Complete = aCommandURL;
|
||||
aTargetURL.Complete = rCommandURL;
|
||||
if ( m_xUrlTransformer.is() )
|
||||
m_xUrlTransformer->parseStrict( aTargetURL );
|
||||
xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
|
||||
@@ -706,17 +706,17 @@ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL ToolboxController:
|
||||
return new ::cppu::OPropertyArrayHelper(aProps);
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL ToolboxController::convertFastPropertyValue( css::uno::Any& aConvertedValue ,
|
||||
css::uno::Any& aOldValue ,
|
||||
sal_Int32 nHandle ,
|
||||
const css::uno::Any& aValue )
|
||||
sal_Bool SAL_CALL ToolboxController::convertFastPropertyValue(css::uno::Any& aConvertedValue,
|
||||
css::uno::Any& aOldValue,
|
||||
sal_Int32 nHandle,
|
||||
const css::uno::Any& rValue)
|
||||
{
|
||||
switch (nHandle)
|
||||
{
|
||||
case TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIBLE:
|
||||
{
|
||||
bool aNewValue(false);
|
||||
aValue >>= aNewValue;
|
||||
rValue >>= aNewValue;
|
||||
if (aNewValue != m_bSupportVisible)
|
||||
{
|
||||
aConvertedValue <<= aNewValue;
|
||||
@@ -726,19 +726,19 @@ sal_Bool SAL_CALL ToolboxController::convertFastPropertyValue( css::uno::Any&
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return OPropertyContainer::convertFastPropertyValue(aConvertedValue, aOldValue, nHandle, aValue);
|
||||
return OPropertyContainer::convertFastPropertyValue(aConvertedValue, aOldValue, nHandle, rValue);
|
||||
}
|
||||
|
||||
void SAL_CALL ToolboxController::setFastPropertyValue_NoBroadcast(
|
||||
sal_Int32 nHandle,
|
||||
const css::uno::Any& aValue )
|
||||
const css::uno::Any& rValue )
|
||||
{
|
||||
OPropertyContainer::setFastPropertyValue_NoBroadcast(nHandle, aValue);
|
||||
OPropertyContainer::setFastPropertyValue_NoBroadcast(nHandle, rValue);
|
||||
if (TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIBLE == nHandle)
|
||||
{
|
||||
bool rValue(false);
|
||||
if (( aValue >>= rValue ) && m_bInitialized)
|
||||
m_bSupportVisible = rValue;
|
||||
bool bValue(false);
|
||||
if (( rValue >>= bValue ) && m_bInitialized)
|
||||
m_bSupportVisible = bValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
SAL_CALL createItemWindow(const css::uno::Reference<css::awt::XWindow>& rParent) override;
|
||||
|
||||
// XInitialization
|
||||
virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& aArguments) override;
|
||||
virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rArguments) override;
|
||||
|
||||
// XComponent
|
||||
virtual void SAL_CALL dispose() override;
|
||||
|
||||
@@ -71,7 +71,7 @@ private:
|
||||
void DrawText(vcl::RenderContext& rRenderContext);
|
||||
void DrawHighlight(vcl::RenderContext& rRenderContext, Color aFontBack);
|
||||
static void DrawContentBackground(vcl::RenderContext& rRenderContext,
|
||||
const tools::Rectangle& aContentRect, const Color& aColor);
|
||||
const tools::Rectangle& rContentRect, const Color& rColor);
|
||||
};
|
||||
|
||||
class StylesListUpdateTask final : public Idle
|
||||
@@ -117,7 +117,7 @@ protected:
|
||||
|
||||
public:
|
||||
StylesPreviewWindow_Base(weld::Builder& xBuilder,
|
||||
std::vector<std::pair<OUString, OUString>>&& aDefaultStyles,
|
||||
std::vector<std::pair<OUString, OUString>>&& rDefaultStyles,
|
||||
const css::uno::Reference<css::frame::XFrame>& xFrame);
|
||||
~StylesPreviewWindow_Base();
|
||||
|
||||
@@ -137,7 +137,7 @@ class StylesPreviewWindow_Impl final : public InterimItemWindow, public StylesPr
|
||||
{
|
||||
public:
|
||||
StylesPreviewWindow_Impl(vcl::Window* pParent,
|
||||
std::vector<std::pair<OUString, OUString>>&& aDefaultStyles,
|
||||
std::vector<std::pair<OUString, OUString>>&& rDefaultStyles,
|
||||
const css::uno::Reference<css::frame::XFrame>& xFrame);
|
||||
~StylesPreviewWindow_Impl();
|
||||
|
||||
|
||||
@@ -67,16 +67,16 @@ void StylesPreviewToolBoxControl::InitializeStyles(
|
||||
u"Heading 3"_ustr, u"Heading 4"_ustr, u"Title"_ustr, u"Subtitle"_ustr,
|
||||
u"Quotations"_ustr, u"Preformatted Text"_ustr
|
||||
};
|
||||
for (const OUString& aStyle : aWriterStyles)
|
||||
for (const OUString& rStyle : aWriterStyles)
|
||||
{
|
||||
try
|
||||
{
|
||||
css::uno::Reference<css::beans::XPropertySet> xStyle;
|
||||
xParaStyles->getByName(aStyle) >>= xStyle;
|
||||
xParaStyles->getByName(rStyle) >>= xStyle;
|
||||
OUString sName;
|
||||
xStyle->getPropertyValue(u"DisplayName"_ustr) >>= sName;
|
||||
if (!sName.isEmpty())
|
||||
m_aDefaultStyles.push_back(std::pair<OUString, OUString>(aStyle, sName));
|
||||
m_aDefaultStyles.push_back(std::pair<OUString, OUString>(rStyle, sName));
|
||||
}
|
||||
catch (const css::container::NoSuchElementException&)
|
||||
{
|
||||
|
||||
@@ -397,12 +397,12 @@ void StyleItemController::DrawEntry(vcl::RenderContext& rRenderContext,
|
||||
}
|
||||
|
||||
void StyleItemController::DrawContentBackground(vcl::RenderContext& rRenderContext,
|
||||
const tools::Rectangle& aContentRect,
|
||||
const Color& aColor)
|
||||
const tools::Rectangle& rContentRect,
|
||||
const Color& rColor)
|
||||
{
|
||||
rRenderContext.SetLineColor(aColor);
|
||||
rRenderContext.SetFillColor(aColor);
|
||||
rRenderContext.DrawRect(aContentRect);
|
||||
rRenderContext.SetLineColor(rColor);
|
||||
rRenderContext.SetFillColor(rColor);
|
||||
rRenderContext.DrawRect(rContentRect);
|
||||
}
|
||||
|
||||
void StyleItemController::DrawHighlight(vcl::RenderContext& rRenderContext, Color aFontBack)
|
||||
@@ -441,12 +441,12 @@ void StyleItemController::DrawText(vcl::RenderContext& rRenderContext)
|
||||
}
|
||||
|
||||
StylesPreviewWindow_Base::StylesPreviewWindow_Base(
|
||||
weld::Builder& xBuilder, std::vector<std::pair<OUString, OUString>>&& aDefaultStyles,
|
||||
weld::Builder& xBuilder, std::vector<std::pair<OUString, OUString>>&& rDefaultStyles,
|
||||
const css::uno::Reference<css::frame::XFrame>& xFrame)
|
||||
: m_xFrame(xFrame)
|
||||
, m_xStylesView(xBuilder.weld_icon_view(u"stylesview"_ustr))
|
||||
, m_aUpdateTask(*this)
|
||||
, m_aDefaultStyles(std::move(aDefaultStyles))
|
||||
, m_aDefaultStyles(std::move(rDefaultStyles))
|
||||
{
|
||||
StylePreviewCache::RegisterClient();
|
||||
|
||||
@@ -666,11 +666,11 @@ void StylesPreviewWindow_Base::UpdateStylesList()
|
||||
}
|
||||
|
||||
StylesPreviewWindow_Impl::StylesPreviewWindow_Impl(
|
||||
vcl::Window* pParent, std::vector<std::pair<OUString, OUString>>&& aDefaultStyles,
|
||||
vcl::Window* pParent, std::vector<std::pair<OUString, OUString>>&& rDefaultStyles,
|
||||
const css::uno::Reference<css::frame::XFrame>& xFrame)
|
||||
: InterimItemWindow(pParent, u"svx/ui/stylespreview.ui"_ustr, u"ApplyStyleBox"_ustr, true,
|
||||
reinterpret_cast<sal_uInt64>(SfxViewShell::Current()))
|
||||
, StylesPreviewWindow_Base(*m_xBuilder, std::move(aDefaultStyles), xFrame)
|
||||
, StylesPreviewWindow_Base(*m_xBuilder, std::move(rDefaultStyles), xFrame)
|
||||
{
|
||||
SetOptimalSize();
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
std::unique_ptr<WeldToolbarPopup> weldPopupWindow() override;
|
||||
|
||||
// XInitialization
|
||||
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
|
||||
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& rArguments ) override;
|
||||
|
||||
// XServiceInfo
|
||||
virtual OUString SAL_CALL getImplementationName() override;
|
||||
@@ -271,9 +271,9 @@ VclPtr<vcl::Window> NumberingToolBoxControl::createVclPopupWindow( vcl::Window*
|
||||
return mxInterimPopover;
|
||||
}
|
||||
|
||||
void SAL_CALL NumberingToolBoxControl::initialize( const css::uno::Sequence< css::uno::Any >& aArguments )
|
||||
void SAL_CALL NumberingToolBoxControl::initialize( const css::uno::Sequence< css::uno::Any >& rArguments )
|
||||
{
|
||||
svt::PopupWindowController::initialize( aArguments );
|
||||
svt::PopupWindowController::initialize( rArguments );
|
||||
|
||||
if ( m_aCommandURL == ".uno:DefaultBullet" )
|
||||
mePageType = NumberingPageType::BULLET;
|
||||
|
||||
Reference in New Issue
Block a user