summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-08 13:16:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-09 17:07:24 +0100
commitcfadf87cf51e0681d5fc4059a973ed1630a8203f (patch)
treef6eebc381a4fba4c282e6a19d4fe53332e66bd0c
parent0019eac5e5c1e0a9f0a216da7ce56eb5bfff886b (diff)
loplugin:indentation in framework
Change-Id: I9d0ef502eb812499b0372436083f673bb19ff578 Reviewed-on: https://gerrit.libreoffice.org/67557 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx5
-rw-r--r--framework/source/accelerators/presethandler.cxx20
-rw-r--r--framework/source/dispatch/dispatchinformationprovider.cxx16
-rw-r--r--framework/source/dispatch/dispatchprovider.cxx6
-rw-r--r--framework/source/dispatch/interceptionhelper.cxx8
-rw-r--r--framework/source/fwe/classes/addonsoptions.cxx2
-rw-r--r--framework/source/fwe/helper/titlehelper.cxx220
-rw-r--r--framework/source/helper/oframes.cxx4
-rw-r--r--framework/source/jobs/helponstartup.cxx4
-rw-r--r--framework/source/jobs/job.cxx2
-rw-r--r--framework/source/jobs/jobexecutor.cxx31
-rw-r--r--framework/source/jobs/joburl.cxx6
-rw-r--r--framework/source/jobs/shelljob.cxx6
-rw-r--r--framework/source/layoutmanager/helpers.cxx10
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx10
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx2
-rw-r--r--framework/source/loadenv/loadenv.cxx4
-rw-r--r--framework/source/services/autorecovery.cxx4
-rw-r--r--framework/source/services/frame.cxx8
-rw-r--r--framework/source/services/pathsettings.cxx12
-rw-r--r--framework/source/tabwin/tabwindow.cxx2
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx2
-rw-r--r--framework/source/uielement/progressbarwrapper.cxx4
23 files changed, 205 insertions, 183 deletions
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index 37baeba37364..559be7efbb1b 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -864,7 +864,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::setStorage(const css::uno::Refer
sal_Bool SAL_CALL XCUBasedAcceleratorConfiguration::hasStorage()
{
SAL_INFO("fwk.accelerators", "XCUBasedAcceleratorConfiguration::hasStorage(): implement this HACK .-)");
- return false;
+ return false;
}
void SAL_CALL XCUBasedAcceleratorConfiguration::addConfigurationListener(const css::uno::Reference< css::ui::XUIConfigurationListener >& /*xListener*/)
@@ -918,8 +918,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util:
css::util::ChangesEvent aReceivedEvents( aEvent );
const sal_Int32 c = aReceivedEvents.Changes.getLength();
- sal_Int32 i = 0;
- for (i=0; i<c; ++i)
+ for (sal_Int32 i=0; i<c; ++i)
{
const css::util::ElementChange& aChange = aReceivedEvents.Changes[i];
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index b5b309150fd6..2c0b96f78f02 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -447,13 +447,13 @@ void PresetHandler::connectToResource( PresetHandler::EConfigType
}
// read content of level 3 (presets, targets)
- css::uno::Reference< css::container::XNameAccess > xAccess;
- css::uno::Sequence< OUString > lNames;
- const OUString* pNames;
- sal_Int32 c;
- sal_Int32 i;
- std::vector<OUString> lPresets;
- std::vector<OUString> lTargets;
+ css::uno::Reference< css::container::XNameAccess > xAccess;
+ css::uno::Sequence< OUString > lNames;
+ const OUString* pNames;
+ sal_Int32 c;
+ sal_Int32 i;
+ std::vector<OUString> lPresets;
+ std::vector<OUString> lTargets;
// read preset names of share layer
xAccess.set(xShare, css::uno::UNO_QUERY);
@@ -786,11 +786,11 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::impl_openLocalizedPat
if (!xAccess.is())
return ::std::vector< OUString >();
- ::std::vector< OUString > lSubFolders;
+ ::std::vector< OUString > lSubFolders;
const css::uno::Sequence< OUString > lNames = xAccess->getElementNames();
const OUString* pNames = lNames.getConstArray();
- sal_Int32 c = lNames.getLength();
- sal_Int32 i = 0;
+ sal_Int32 c = lNames.getLength();
+ sal_Int32 i = 0;
for (i=0; i<c; ++i)
{
diff --git a/framework/source/dispatch/dispatchinformationprovider.cxx b/framework/source/dispatch/dispatchinformationprovider.cxx
index ea0b05cf99ec..1f4e98f41616 100644
--- a/framework/source/dispatch/dispatchinformationprovider.cxx
+++ b/framework/source/dispatch/dispatchinformationprovider.cxx
@@ -56,12 +56,12 @@ css::uno::Sequence< sal_Int16 > SAL_CALL DispatchInformationProvider::getSupport
continue;
const css::uno::Sequence< sal_Int16 > lProviderGroups = xProvider->getSupportedCommandGroups();
- sal_Int32 c2 = lProviderGroups.getLength();
- sal_Int32 i2 = 0;
+ sal_Int32 c2 = lProviderGroups.getLength();
+ sal_Int32 i2 = 0;
for (i2=0; i2<c2; ++i2)
{
- const sal_Int16& rGroup = lProviderGroups[i2];
- ::std::vector< sal_Int16 >::const_iterator pGroup =
+ const sal_Int16& rGroup = lProviderGroups[i2];
+ ::std::vector< sal_Int16 >::const_iterator pGroup =
::std::find(lGroups.begin(), lGroups.end(), rGroup);
if (pGroup == lGroups.end())
lGroups.push_back(rGroup);
@@ -89,12 +89,12 @@ css::uno::Sequence< css::frame::DispatchInformation > SAL_CALL DispatchInformati
continue;
const css::uno::Sequence< css::frame::DispatchInformation > lProviderInfos = xProvider->getConfigurableDispatchInformation(nCommandGroup);
- sal_Int32 c2 = lProviderInfos.getLength();
- sal_Int32 i2 = 0;
+ sal_Int32 c2 = lProviderInfos.getLength();
+ sal_Int32 i2 = 0;
for (i2=0; i2<c2; ++i2)
{
- const css::frame::DispatchInformation& rInfo = lProviderInfos[i2];
- auto pInfo = lInfos.find(rInfo.Command);
+ const css::frame::DispatchInformation& rInfo = lProviderInfos[i2];
+ auto pInfo = lInfos.find(rInfo.Command);
if (pInfo == lInfos.end())
lInfos[rInfo.Command] = rInfo;
}
diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx
index 7e7bb405ea43..480953f0cb3c 100644
--- a/framework/source/dispatch/dispatchprovider.cxx
+++ b/framework/source/dispatch/dispatchprovider.cxx
@@ -217,8 +217,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryDeskt
else
{
- sal_Int32 nRightFlags = nSearchFlags;
- nRightFlags &= ~css::frame::FrameSearchFlag::CREATE;
+ sal_Int32 nRightFlags = nSearchFlags & ~css::frame::FrameSearchFlag::CREATE;
// try to find any existing target and ask him for his dispatcher
css::uno::Reference< css::frame::XFrame > xFoundFrame = xDesktop->findFrame(sTargetFrameName, nRightFlags);
@@ -385,8 +384,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame
else
{
- sal_Int32 nRightFlags = nSearchFlags;
- nRightFlags &= ~css::frame::FrameSearchFlag::CREATE;
+ sal_Int32 nRightFlags = nSearchFlags & ~css::frame::FrameSearchFlag::CREATE;
// try to find any existing target and ask him for his dispatcher
css::uno::Reference< css::frame::XFrame > xFoundFrame = xFrame->findFrame(sTargetFrameName, nRightFlags);
diff --git a/framework/source/dispatch/interceptionhelper.cxx b/framework/source/dispatch/interceptionhelper.cxx
index 32378f2283a5..9a98285ec720 100644
--- a/framework/source/dispatch/interceptionhelper.cxx
+++ b/framework/source/dispatch/interceptionhelper.cxx
@@ -84,10 +84,10 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL InterceptionHelper::queryD
css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL InterceptionHelper::queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& lDescriptor )
{
- sal_Int32 c = lDescriptor.getLength();
- css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > lDispatches (c);
- css::uno::Reference< css::frame::XDispatch >* pDispatches = lDispatches.getArray();
- const css::frame::DispatchDescriptor* pDescriptor = lDescriptor.getConstArray();
+ sal_Int32 c = lDescriptor.getLength();
+ css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > lDispatches (c);
+ css::uno::Reference< css::frame::XDispatch >* pDispatches = lDispatches.getArray();
+ const css::frame::DispatchDescriptor* pDescriptor = lDescriptor.getConstArray();
for (sal_Int32 i=0; i<c; ++i)
pDispatches[i] = queryDispatch(pDescriptor[i].FeatureURL, pDescriptor[i].FrameName, pDescriptor[i].SearchFlags);
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index 2c6f33bef492..4131a4381736 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -1101,7 +1101,7 @@ bool AddonsOptions_Impl::ReadMenuItem( const OUString& aMenuNodeName, Sequence<
OUString aMenuImageId;
aMenuItemNodePropValues[ OFFSET_MENUITEM_IMAGEIDENTIFIER ] >>= aMenuImageId;
- ReadAndAssociateImages( aStrValue, aMenuImageId );
+ ReadAndAssociateImages( aStrValue, aMenuImageId );
aMenuItem[ OFFSET_MENUITEM_URL ].Value <<= aStrValue;
aMenuItem[ OFFSET_MENUITEM_TARGET ].Value = aMenuItemNodePropValues[ OFFSET_MENUITEM_TARGET ];
diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx
index 36141cfba0f1..070ec79bdfe0 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -67,11 +67,11 @@ TitleHelper::~TitleHelper()
void TitleHelper::setOwner(const css::uno::Reference< css::uno::XInterface >& xOwner)
{
// SYNCHRONIZED ->
- ::osl::ResettableMutexGuard aLock(m_aMutex);
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
m_xOwner = xOwner;
-
- aLock.clear ();
+ }
// <- SYNCHRONIZED
css::uno::Reference< css::frame::XModel > xModel(xOwner, css::uno::UNO_QUERY);
@@ -101,21 +101,20 @@ OUString SAL_CALL TitleHelper::getTitle()
// SYNCHRONIZED ->
::osl::ResettableMutexGuard aLock(m_aMutex);
- // An external title will win always and disable all internal logic about
- // creating/using a title value.
- // Even an empty string will be accepted as valid title !
- if (m_bExternalTitle)
- return m_sTitle;
-
- // Title seems to be up-to-date. Return it directly.
- if (!m_sTitle.isEmpty())
- return m_sTitle;
-
- // Title seems to be unused till now ... do bootstraping
- impl_updateTitle (true);
+ // An external title will win always and disable all internal logic about
+ // creating/using a title value.
+ // Even an empty string will be accepted as valid title !
+ if (m_bExternalTitle)
+ return m_sTitle;
+ // Title seems to be up-to-date. Return it directly.
+ if (!m_sTitle.isEmpty())
return m_sTitle;
+ // Title seems to be unused till now ... do bootstraping
+ impl_updateTitle (true);
+
+ return m_sTitle;
// <- SYNCHRONIZED
}
@@ -124,20 +123,19 @@ void TitleHelper::connectWithUntitledNumbers (const css::uno::Reference< css::fr
// SYNCHRONIZED ->
::osl::ResettableMutexGuard aLock(m_aMutex);
- m_xUntitledNumbers = xNumbers;
-
+ m_xUntitledNumbers = xNumbers;
// <- SYNCHRONIZED
}
void SAL_CALL TitleHelper::setTitle(const OUString& sTitle)
{
// SYNCHRONIZED ->
- ::osl::ResettableMutexGuard aLock(m_aMutex);
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
m_bExternalTitle = true;
m_sTitle = sTitle;
-
- aLock.clear ();
+ }
// <- SYNCHRONIZED
impl_sendTitleChangedEvent ();
@@ -157,12 +155,13 @@ void SAL_CALL TitleHelper::removeTitleChangeListener(const css::uno::Reference<
void SAL_CALL TitleHelper::titleChanged(const css::frame::TitleChangedEvent& aEvent)
{
+ css::uno::Reference< css::frame::XTitle > xSubTitle;
// SYNCHRONIZED ->
- ::osl::ResettableMutexGuard aLock(m_aMutex);
-
- css::uno::Reference< css::frame::XTitle > xSubTitle(m_xSubTitle.get (), css::uno::UNO_QUERY);
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
- aLock.clear ();
+ xSubTitle.set(m_xSubTitle.get (), css::uno::UNO_QUERY);
+ }
// <- SYNCHRONIZED
if (aEvent.Source != xSubTitle)
@@ -178,12 +177,13 @@ void SAL_CALL TitleHelper::documentEventOccured(const css::document::DocumentEve
&& ! aEvent.EventName.equalsIgnoreAsciiCase("OnTitleChanged"))
return;
+ css::uno::Reference< css::frame::XModel > xOwner;
// SYNCHRONIZED ->
- ::osl::ResettableMutexGuard aLock(m_aMutex);
-
- css::uno::Reference< css::frame::XModel > xOwner(m_xOwner.get (), css::uno::UNO_QUERY);
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
- aLock.clear ();
+ xOwner.set(m_xOwner.get (), css::uno::UNO_QUERY);
+ }
// <- SYNCHRONIZED
if (aEvent.Source != xOwner
@@ -199,12 +199,13 @@ void SAL_CALL TitleHelper::documentEventOccured(const css::document::DocumentEve
void SAL_CALL TitleHelper::frameAction(const css::frame::FrameActionEvent& aEvent)
{
+ css::uno::Reference< css::frame::XFrame > xOwner;
// SYNCHRONIZED ->
- ::osl::ResettableMutexGuard aLock(m_aMutex);
-
- css::uno::Reference< css::frame::XFrame > xOwner(m_xOwner.get (), css::uno::UNO_QUERY);
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
- aLock.clear ();
+ xOwner.set(m_xOwner.get (), css::uno::UNO_QUERY);
+ }
// <- SYNCHRONIZED
if (aEvent.Source != xOwner)
@@ -225,12 +226,17 @@ void SAL_CALL TitleHelper::frameAction(const css::frame::FrameActionEvent& aEven
void SAL_CALL TitleHelper::disposing(const css::lang::EventObject& aEvent)
{
+ css::uno::Reference< css::uno::XInterface > xOwner;
+ css::uno::Reference< css::frame::XUntitledNumbers > xNumbers;
+ ::sal_Int32 nLeasedNumber;
// SYNCHRONIZED ->
- ::osl::ResettableMutexGuard aLock(m_aMutex);
- css::uno::Reference< css::uno::XInterface > xOwner (m_xOwner.get() , css::uno::UNO_QUERY);
- css::uno::Reference< css::frame::XUntitledNumbers > xNumbers (m_xUntitledNumbers.get(), css::uno::UNO_QUERY);
- ::sal_Int32 nLeasedNumber = m_nLeasedNumber;
- aLock.clear ();
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
+
+ xOwner.set(m_xOwner.get() , css::uno::UNO_QUERY);
+ xNumbers.set(m_xUntitledNumbers.get(), css::uno::UNO_QUERY);
+ nLeasedNumber = m_nLeasedNumber;
+ }
// <- SYNCHRONIZED
if ( ! xOwner.is ())
@@ -246,27 +252,29 @@ void SAL_CALL TitleHelper::disposing(const css::lang::EventObject& aEvent)
xNumbers->releaseNumber (nLeasedNumber);
// SYNCHRONIZED ->
- aLock.reset ();
-
- m_xOwner = nullptr;
- m_sTitle = OUString ();
- m_nLeasedNumber = css::frame::UntitledNumbersConst::INVALID_NUMBER;
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
- aLock.clear ();
+ m_xOwner = nullptr;
+ m_sTitle = OUString ();
+ m_nLeasedNumber = css::frame::UntitledNumbersConst::INVALID_NUMBER;
+ }
// <- SYNCHRONIZED
-
}
void TitleHelper::impl_sendTitleChangedEvent ()
{
+ css::uno::Reference<css::uno::XInterface> xOwner;
// SYNCHRONIZED ->
- ::osl::ResettableMutexGuard aLock(m_aMutex);
-
- css::frame::TitleChangedEvent aEvent(m_xOwner.get (), m_sTitle);
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
- aLock.clear ();
+ xOwner = m_xOwner;
+ }
// <- SYNCHRONIZED
+ css::frame::TitleChangedEvent aEvent(xOwner, m_sTitle);
+
if( ! aEvent.Source.is() )
return;
@@ -290,14 +298,17 @@ void TitleHelper::impl_sendTitleChangedEvent ()
void TitleHelper::impl_updateTitle (bool init)
{
+ css::uno::Reference< css::frame::XModel > xModel;
+ css::uno::Reference< css::frame::XController > xController;
+ css::uno::Reference< css::frame::XFrame > xFrame;
// SYNCHRONIZED ->
- ::osl::ResettableMutexGuard aLock(m_aMutex);
-
- css::uno::Reference< css::frame::XModel > xModel (m_xOwner.get(), css::uno::UNO_QUERY);
- css::uno::Reference< css::frame::XController > xController(m_xOwner.get(), css::uno::UNO_QUERY);
- css::uno::Reference< css::frame::XFrame > xFrame (m_xOwner.get(), css::uno::UNO_QUERY);
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
- aLock.clear ();
+ xModel.set (m_xOwner.get(), css::uno::UNO_QUERY);
+ xController.set(m_xOwner.get(), css::uno::UNO_QUERY);
+ xFrame.set (m_xOwner.get(), css::uno::UNO_QUERY);
+ }
// <- SYNCHRONIZED
if (xModel.is ())
@@ -316,19 +327,22 @@ void TitleHelper::impl_updateTitle (bool init)
void TitleHelper::impl_updateTitleForModel (const css::uno::Reference< css::frame::XModel >& xModel, bool init)
{
+ css::uno::Reference< css::uno::XInterface > xOwner;
+ css::uno::Reference< css::frame::XUntitledNumbers > xNumbers;
+ ::sal_Int32 nLeasedNumber;
// SYNCHRONIZED ->
- ::osl::ResettableMutexGuard aLock(m_aMutex);
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
// external title won't be updated internally!
// It has to be set from outside new.
if (m_bExternalTitle)
return;
- css::uno::Reference< css::uno::XInterface > xOwner (m_xOwner.get() , css::uno::UNO_QUERY);
- css::uno::Reference< css::frame::XUntitledNumbers > xNumbers (m_xUntitledNumbers.get(), css::uno::UNO_QUERY);
- ::sal_Int32 nLeasedNumber = m_nLeasedNumber;
-
- aLock.clear ();
+ xOwner.set (m_xOwner.get() , css::uno::UNO_QUERY);
+ xNumbers.set (m_xUntitledNumbers.get(), css::uno::UNO_QUERY);
+ nLeasedNumber = m_nLeasedNumber;
+ }
// <- SYNCHRONIZED
if (
@@ -376,17 +390,18 @@ void TitleHelper::impl_updateTitleForModel (const css::uno::Reference< css::fram
sTitle = sNewTitle.makeStringAndClear ();
}
+ bool bChanged;
// SYNCHRONIZED ->
- aLock.reset ();
-
- // WORKAROUND: the notification is currently sent always,
- // can be changed after shared mode is supported per UNO API
- bool bChanged = !init; // && m_sTitle != sTitle
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
- m_sTitle = sTitle;
- m_nLeasedNumber = nLeasedNumber;
+ // WORKAROUND: the notification is currently sent always,
+ // can be changed after shared mode is supported per UNO API
+ bChanged = !init; // && m_sTitle != sTitle
- aLock.clear ();
+ m_sTitle = sTitle;
+ m_nLeasedNumber = nLeasedNumber;
+ }
// <- SYNCHRONIZED
if (bChanged)
@@ -395,19 +410,22 @@ void TitleHelper::impl_updateTitleForModel (const css::uno::Reference< css::fram
void TitleHelper::impl_updateTitleForController (const css::uno::Reference< css::frame::XController >& xController, bool init)
{
+ css::uno::Reference< css::uno::XInterface > xOwner;
+ css::uno::Reference< css::frame::XUntitledNumbers > xNumbers;
+ ::sal_Int32 nLeasedNumber;
// SYNCHRONIZED ->
- ::osl::ResettableMutexGuard aLock(m_aMutex);
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
// external title won't be updated internally!
// It has to be set from outside new.
if (m_bExternalTitle)
return;
- css::uno::Reference< css::uno::XInterface > xOwner (m_xOwner.get() , css::uno::UNO_QUERY);
- css::uno::Reference< css::frame::XUntitledNumbers > xNumbers (m_xUntitledNumbers.get(), css::uno::UNO_QUERY);
- ::sal_Int32 nLeasedNumber = m_nLeasedNumber;
-
- aLock.clear ();
+ xOwner.set (m_xOwner.get() , css::uno::UNO_QUERY);
+ xNumbers.set (m_xUntitledNumbers.get(), css::uno::UNO_QUERY);
+ nLeasedNumber = m_nLeasedNumber;
+ }
// <- SYNCHRONIZED
if (
@@ -454,15 +472,16 @@ void TitleHelper::impl_updateTitleForController (const css::uno::Reference< css:
}
}
+ bool bChanged;
// SYNCHRONIZED ->
- aLock.reset ();
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
OUString sNewTitle = sTitle.makeStringAndClear ();
- bool bChanged = !init && m_sTitle != sNewTitle;
- m_sTitle = sNewTitle;
- m_nLeasedNumber = nLeasedNumber;
-
- aLock.clear ();
+ bChanged = !init && m_sTitle != sNewTitle;
+ m_sTitle = sNewTitle;
+ m_nLeasedNumber = nLeasedNumber;
+ }
// <- SYNCHRONIZED
if (bChanged)
@@ -475,14 +494,14 @@ void TitleHelper::impl_updateTitleForFrame (const css::uno::Reference< css::fram
return;
// SYNCHRONIZED ->
- ::osl::ResettableMutexGuard aLock(m_aMutex);
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
// external title won't be updated internally!
// It has to be set from outside new.
if (m_bExternalTitle)
return;
-
- aLock.clear ();
+ }
// <- SYNCHRONIZED
css::uno::Reference< css::uno::XInterface > xComponent;
@@ -501,14 +520,16 @@ void TitleHelper::impl_updateTitleForFrame (const css::uno::Reference< css::fram
impl_appendDebugVersion (sTitle);
#endif
impl_appendSafeMode (sTitle);
+
+ bool bChanged;
// SYNCHRONIZED ->
- aLock.reset ();
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
OUString sNewTitle = sTitle.makeStringAndClear ();
- bool bChanged = !init && m_sTitle != sNewTitle;
- m_sTitle = sNewTitle;
-
- aLock.clear ();
+ bChanged = !init && m_sTitle != sNewTitle;
+ m_sTitle = sNewTitle;
+ }
// <- SYNCHRONIZED
if (bChanged)
@@ -538,13 +559,15 @@ void TitleHelper::impl_appendProductName (OUStringBuffer& sTitle)
void TitleHelper::impl_appendModuleName (OUStringBuffer& sTitle)
{
+ css::uno::Reference< css::uno::XInterface > xOwner;
+ css::uno::Reference< css::uno::XComponentContext > xContext;
// SYNCHRONIZED ->
- ::osl::ResettableMutexGuard aLock(m_aMutex);
-
- css::uno::Reference< css::uno::XInterface > xOwner = m_xOwner.get();
- css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
- aLock.clear ();
+ xOwner = m_xOwner.get();
+ xContext = m_xContext;
+ }
// <- SYNCHRONIZED
try
@@ -553,7 +576,7 @@ void TitleHelper::impl_appendModuleName (OUStringBuffer& sTitle)
css::frame::ModuleManager::create(xContext);
const OUString sID = xModuleManager->identify(xOwner);
- ::comphelper::SequenceAsHashMap lProps = xModuleManager->getByName (sID);
+ ::comphelper::SequenceAsHashMap lProps = xModuleManager->getByName (sID);
const OUString sUIName = lProps.getUnpackedValueOrDefault (OFFICEFACTORY_PROPNAME_ASCII_UINAME, OUString());
// An UIname property is an optional value !
@@ -625,17 +648,18 @@ void TitleHelper::impl_updateListeningForFrame (const css::uno::Reference< css::
void TitleHelper::impl_setSubTitle (const css::uno::Reference< css::frame::XTitle >& xSubTitle)
{
+ css::uno::Reference< css::frame::XTitle > xOldSubTitle;
// SYNCHRONIZED ->
- ::osl::ResettableMutexGuard aLock(m_aMutex);
+ {
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
// ignore duplicate calls. Makes outside using of this helper more easy :-)
- css::uno::Reference< css::frame::XTitle > xOldSubTitle(m_xSubTitle.get(), css::uno::UNO_QUERY);
+ xOldSubTitle.set(m_xSubTitle.get(), css::uno::UNO_QUERY);
if (xOldSubTitle == xSubTitle)
return;
m_xSubTitle = xSubTitle;
-
- aLock.clear ();
+ }
// <- SYNCHRONIZED
css::uno::Reference< css::frame::XTitleChangeBroadcaster > xOldBroadcaster(xOldSubTitle , css::uno::UNO_QUERY );
diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx
index 0b59f89ac8d3..1425325f7673 100644
--- a/framework/source/helper/oframes.cxx
+++ b/framework/source/helper/oframes.cxx
@@ -228,8 +228,8 @@ Any SAL_CALL OFrames::getByIndex( sal_Int32 nIndex )
{
SolarMutexGuard g;
- sal_uInt32 nCount = m_pFrameContainer->getCount();
- if ( nIndex < 0 || ( sal::static_int_cast< sal_uInt32 >( nIndex ) >= nCount ))
+ sal_uInt32 nCount = m_pFrameContainer->getCount();
+ if ( nIndex < 0 || ( sal::static_int_cast< sal_uInt32 >( nIndex ) >= nCount ))
throw IndexOutOfBoundsException("OFrames::getByIndex - Index out of bounds",
static_cast<OWeakObject *>(this) );
diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx
index 67f670f31e3e..c318bad1a660 100644
--- a/framework/source/jobs/helponstartup.cxx
+++ b/framework/source/jobs/helponstartup.cxx
@@ -267,8 +267,8 @@ bool HelpOnStartup::its_isHelpUrlADefaultOne(const OUString& sHelpURL)
// check given help url against all default ones
const css::uno::Sequence< OUString > lModules = xConfig->getElementNames();
const OUString* pModules = lModules.getConstArray();
- ::sal_Int32 c = lModules.getLength();
- ::sal_Int32 i = 0;
+ ::sal_Int32 c = lModules.getLength();
+ ::sal_Int32 i = 0;
for (i=0; i<c; ++i)
{
diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx
index d1afa95b61b9..574765ad3d22 100644
--- a/framework/source/jobs/job.cxx
+++ b/framework/source/jobs/job.cxx
@@ -466,7 +466,7 @@ void Job::impl_reactForJobResult( /*IN*/ const css::uno::Any& aResult )
// and we nor the job are the right ones ...
// our user has set itself before. So we can fake this source address!
css::frame::DispatchResultEvent aEvent = aAnalyzedResult.getDispatchResult();
- aEvent.Source = m_xResultSourceFake;
+ aEvent.Source = m_xResultSourceFake;
m_xResultListener->dispatchFinished(aEvent);
}
}
diff --git a/framework/source/jobs/jobexecutor.cxx b/framework/source/jobs/jobexecutor.cxx
index 23db4f21fe5f..6e54d7375f43 100644
--- a/framework/source/jobs/jobexecutor.cxx
+++ b/framework/source/jobs/jobexecutor.cxx
@@ -224,23 +224,24 @@ void SAL_CALL JobExecutor::trigger( const OUString& sEvent )
{
rtl::Reference<Job> pJob;
- /* SAFE */ {
- SolarMutexGuard g2;
-
- JobData aCfg(m_xContext);
- aCfg.setEvent(sEvent, lJobs[j]);
- aCfg.setEnvironment(JobData::E_EXECUTION);
-
- /*Attention!
- Jobs implements interfaces and dies by ref count!
- And freeing of such uno object is done by uno itself.
- So we have to use dynamic memory everytimes.
- */
- pJob = new Job(m_xContext, css::uno::Reference< css::frame::XFrame >());
- pJob->setJobData(aCfg);
+ /* SAFE */
+ {
+ SolarMutexGuard g2;
+
+ JobData aCfg(m_xContext);
+ aCfg.setEvent(sEvent, lJobs[j]);
+ aCfg.setEnvironment(JobData::E_EXECUTION);
+
+ /*Attention!
+ Jobs implements interfaces and dies by ref count!
+ And freeing of such uno object is done by uno itself.
+ So we have to use dynamic memory everytimes.
+ */
+ pJob = new Job(m_xContext, css::uno::Reference< css::frame::XFrame >());
+ pJob->setJobData(aCfg);
} /* SAFE */
- pJob->execute(css::uno::Sequence< css::beans::NamedValue >());
+ pJob->execute(css::uno::Sequence< css::beans::NamedValue >());
}
}
diff --git a/framework/source/jobs/joburl.cxx b/framework/source/jobs/joburl.cxx
index 307f6c9cdc93..6cefd3119982 100644
--- a/framework/source/jobs/joburl.cxx
+++ b/framework/source/jobs/joburl.cxx
@@ -125,7 +125,7 @@ bool JobURL::getEvent( /*OUT*/ OUString& sEvent ) const
{
SolarMutexGuard g;
- sEvent.clear();
+ sEvent.clear();
bool bSet = ((m_eRequest & E_EVENT) == E_EVENT);
if (bSet)
sEvent = m_sEvent;
@@ -153,7 +153,7 @@ bool JobURL::getAlias( /*OUT*/ OUString& sAlias ) const
{
SolarMutexGuard g;
- sAlias.clear();
+ sAlias.clear();
bool bSet = ((m_eRequest & E_ALIAS) == E_ALIAS);
if (bSet)
sAlias = m_sAlias;
@@ -181,7 +181,7 @@ bool JobURL::getService( /*OUT*/ OUString& sService ) const
{
SolarMutexGuard g;
- sService.clear();
+ sService.clear();
bool bSet = ((m_eRequest & E_SERVICE) == E_SERVICE);
if (bSet)
sService = m_sService;
diff --git a/framework/source/jobs/shelljob.cxx b/framework/source/jobs/shelljob.cxx
index e9df9737a615..a83949437517 100644
--- a/framework/source/jobs/shelljob.cxx
+++ b/framework/source/jobs/shelljob.cxx
@@ -124,9 +124,9 @@ bool ShellJob::impl_execute(const OUString& sCommand
const css::uno::Sequence< OUString >& lArguments ,
bool bCheckExitCode)
{
- ::rtl_uString** pArgs = nullptr;
- const ::sal_Int32 nArgs = lArguments.getLength ();
- oslProcess hProcess(nullptr);
+ ::rtl_uString** pArgs = nullptr;
+ const ::sal_Int32 nArgs = lArguments.getLength ();
+ oslProcess hProcess(nullptr);
if (nArgs > 0)
pArgs = reinterpret_cast< ::rtl_uString** >(const_cast< OUString* >(lArguments.getConstArray()));
diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx
index 2227dd2a1e60..a5e4762f2e8b 100644
--- a/framework/source/layoutmanager/helpers.cxx
+++ b/framework/source/layoutmanager/helpers.cxx
@@ -256,12 +256,12 @@ uno::Reference< frame::XModel > impl_getModelFromFrame( const uno::Reference< fr
{
// Query for the model to get check the context information
uno::Reference< frame::XModel > xModel;
- if ( rFrame.is() )
- {
+ if ( rFrame.is() )
+ {
uno::Reference< frame::XController > xController( rFrame->getController(), uno::UNO_QUERY );
- if ( xController.is() )
- xModel = xController->getModel();
- }
+ if ( xController.is() )
+ xModel = xController->getModel();
+ }
return xModel;
}
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index a746715366bf..749562d29245 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -2864,11 +2864,11 @@ void SAL_CALL LayoutManager::elementRemoved( const ui::ConfigurationEvent& Event
if ( xFrame.is() )
{
- OUString aElementType;
- OUString aElementName;
- bool bRefreshLayout(false);
+ OUString aElementType;
+ OUString aElementName;
+ bool bRefreshLayout(false);
- parseResourceURL( Event.ResourceURL, aElementType, aElementName );
+ parseResourceURL( Event.ResourceURL, aElementType, aElementName );
if ( aElementType.equalsIgnoreAsciiCase( UIRESOURCETYPE_TOOLBAR ))
{
if ( xToolbarManager.is() )
@@ -2913,7 +2913,7 @@ void SAL_CALL LayoutManager::elementRemoved( const ui::ConfigurationEvent& Event
}
// No settings anymore, element must be destroyed
- if ( xContainerWindow.is() && bNoSettings )
+ if ( xContainerWindow.is() && bNoSettings )
{
if ( aElementType.equalsIgnoreAsciiCase("menubar") &&
aElementName.equalsIgnoreAsciiCase("menubar") )
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 40e88154d7e3..6380c4ae86ee 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -4075,7 +4075,7 @@ awt::Point ToolbarLayoutManager::getToolbarPos( const OUString& rResourceURL )
void ToolbarLayoutManager::setToolbarSize( const OUString& rResourceURL, const awt::Size& aSize )
{
- uno::Reference< awt::XWindow2 > xWindow( implts_getXWindow( rResourceURL ), uno::UNO_QUERY );
+ uno::Reference< awt::XWindow2 > xWindow( implts_getXWindow( rResourceURL ), uno::UNO_QUERY );
uno::Reference< awt::XDockableWindow > xDockWindow( xWindow, uno::UNO_QUERY );
UIElement aUIElement = implts_findToolbar( rResourceURL );
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index dc05a51ac6d3..0be9ad70e82e 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -816,7 +816,7 @@ void LoadEnv::impl_detectTypeAndFilter()
{
::comphelper::SequenceAsHashMap lFilterProps(xFilterCont->getByName(sFilter));
sal_Int32 nFlags = lFilterProps.getUnpackedValueOrDefault("Flags", sal_Int32(0));
- bIsOwnTemplate = ((nFlags & FILTERFLAG_TEMPLATEPATH) == FILTERFLAG_TEMPLATEPATH);
+ bIsOwnTemplate = ((nFlags & FILTERFLAG_TEMPLATEPATH) == FILTERFLAG_TEMPLATEPATH);
}
catch(const css::container::NoSuchElementException&)
{}
@@ -933,7 +933,7 @@ bool LoadEnv::impl_furtherDocsAllowed()
FrameAnalyzerFlags::Hidden);
sal_Int32 nOpenDocuments = aAnalyzer.m_lOtherVisibleFrames.size();
- bAllowed = (nOpenDocuments < nMaxOpenDocuments);
+ bAllowed = (nOpenDocuments < nMaxOpenDocuments);
}
}
catch(const css::uno::Exception&)
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 568c6ba0e6f6..60f4762146d5 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1801,8 +1801,8 @@ void AutoRecovery::implts_readConfig()
const OUString sRECOVERY_ITEM_BASE_IDENTIFIER(RECOVERY_ITEM_BASE_IDENTIFIER);
const css::uno::Sequence< OUString > lItems = xRecoveryList->getElementNames();
const OUString* pItems = lItems.getConstArray();
- sal_Int32 c = lItems.getLength();
- sal_Int32 i = 0;
+ sal_Int32 c = lItems.getLength();
+ sal_Int32 i = 0;
// REENTRANT -> --------------------------
aCacheLock.lock(LOCK_FOR_CACHE_ADD_REMOVE);
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index b638a1130752..3d1e844e9516 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -868,9 +868,10 @@ void SAL_CALL XFrameImpl::setCreator( const css::uno::Reference< css::frame::XFr
checkDisposed();
/* SAFE { */
+ {
SolarMutexClearableGuard aWriteLock;
- m_xParent = xCreator;
- aWriteLock.clear();
+ m_xParent = xCreator;
+ }
/* } SAFE */
css::uno::Reference< css::frame::XDesktop > xIsDesktop( xCreator, css::uno::UNO_QUERY );
@@ -1172,8 +1173,7 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL XFrameImpl::findFrame( const
xTarget = xParent;
else
{
- sal_Int32 nRightFlags = nSearchFlags;
- nRightFlags &= ~css::frame::FrameSearchFlag::CHILDREN;
+ sal_Int32 nRightFlags = nSearchFlags & ~css::frame::FrameSearchFlag::CHILDREN;
xTarget = xParent->findFrame(sTargetFrameName, nRightFlags);
}
}
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index fe422707e3dd..070d62a6752b 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -1055,7 +1055,7 @@ void PathSettings::impl_rebuildPropertyDescriptor()
for (auto const& path : m_lPaths)
{
const PathSettings::PathInfo& rPath = path.second;
- css::beans::Property* pProp = nullptr;
+ css::beans::Property* pProp = nullptr;
pProp = &(m_lPropDesc[i]);
pProp->Name = rPath.sPathName;
@@ -1284,8 +1284,8 @@ PathSettings::PathInfo* PathSettings::impl_getPathAccess(sal_Int32 nHandle)
return nullptr;
const css::beans::Property& rProp = m_lPropDesc[nHandle];
- OUString sProp = impl_extractBaseFromPropName(rProp.Name);
- PathSettings::PathHash::iterator rPath = m_lPaths.find(sProp);
+ OUString sProp = impl_extractBaseFromPropName(rProp.Name);
+ PathSettings::PathHash::iterator rPath = m_lPaths.find(sProp);
if (rPath != m_lPaths.end())
return &(rPath->second);
@@ -1302,9 +1302,9 @@ const PathSettings::PathInfo* PathSettings::impl_getPathAccessConst(sal_Int32 nH
if (nHandle > (m_lPropDesc.getLength()-1))
return nullptr;
- const css::beans::Property& rProp = m_lPropDesc[nHandle];
- OUString sProp = impl_extractBaseFromPropName(rProp.Name);
- PathSettings::PathHash::const_iterator rPath = m_lPaths.find(sProp);
+ const css::beans::Property& rProp = m_lPropDesc[nHandle];
+ OUString sProp = impl_extractBaseFromPropName(rProp.Name);
+ PathSettings::PathHash::const_iterator rPath = m_lPaths.find(sProp);
if (rPath != m_lPaths.end())
return &(rPath->second);
diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx
index 06b938db0410..4dd6bcc0bb0d 100644
--- a/framework/source/tabwin/tabwindow.cxx
+++ b/framework/source/tabwin/tabwindow.cxx
@@ -665,7 +665,7 @@ css::uno::Sequence< css::beans::NamedValue > SAL_CALL TabWindow::getTabProps( ::
throw css::lang::IndexOutOfBoundsException();
const OUString& aTitle = pTabControl->GetPageText( sal_uInt16( ID ));
- nPos = pTabControl->GetPagePos( sal_uInt16( ID ));
+ nPos = pTabControl->GetPagePos( sal_uInt16( ID ));
css::uno::Sequence< css::beans::NamedValue > aSeq
{
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 8f7aba6c9d83..62b1dcf9047a 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -271,7 +271,7 @@ void SAL_CALL ControlMenuController::statusChanged( const FeatureStateEvent& Eve
break;
}
- if ( MENU_ITEM_NOTFOUND == nPrevInConversion )
+ if ( MENU_ITEM_NOTFOUND == nPrevInConversion )
// none of the items which precede the nSID-slot in the source menu are present in our conversion menu
nPrevInConversion = sal::static_int_cast< sal_uInt16 >(-1); // put the item at the first position
diff --git a/framework/source/uielement/progressbarwrapper.cxx b/framework/source/uielement/progressbarwrapper.cxx
index c44a2ce6db99..76e2dda4c262 100644
--- a/framework/source/uielement/progressbarwrapper.cxx
+++ b/framework/source/uielement/progressbarwrapper.cxx
@@ -304,9 +304,9 @@ uno::Reference< uno::XInterface > SAL_CALL ProgressBarWrapper::getRealInterface(
uno::Reference< lang::XComponent >(
static_cast< cppu::OWeakObject* >( this ),
uno::UNO_QUERY ));
- xComp.set(static_cast< cppu::OWeakObject* >( pWrapper ),
+ xComp.set(static_cast< cppu::OWeakObject* >( pWrapper ),
uno::UNO_QUERY );
- m_xProgressBarIfacWrapper = xComp;
+ m_xProgressBarIfacWrapper = xComp;
}
return xComp;