[Libreoffice-commits] core.git: sfx2/source svx/source sw/source
Maxim Monastirsky (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 3 07:59:25 UTC 2020
sfx2/source/control/emojipopup.cxx | 2 +-
sfx2/source/dialog/charmappopup.cxx | 2 +-
svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx | 2 +-
svx/source/sidebar/text/TextCharacterSpacingPopup.cxx | 2 +-
svx/source/tbxctrls/layctrl.cxx | 4 ++--
sw/source/uibase/sidebar/PageColumnPopup.cxx | 2 +-
sw/source/uibase/sidebar/PageMarginPopup.cxx | 2 +-
sw/source/uibase/sidebar/PageOrientationPopup.cxx | 2 +-
sw/source/uibase/sidebar/PageSizePopup.cxx | 2 +-
9 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit da09a3cf14ea2c7690b98ec32639125087bcf18f
Author: Maxim Monastirsky <momonasmon at gmail.com>
AuthorDate: Sun Aug 2 18:45:21 2020 +0300
Commit: Maxim Monastirsky <momonasmon at gmail.com>
CommitDate: Mon Aug 3 09:58:50 2020 +0200
Remove pointless check
This check was originally introduced by me for a few toolbar
controllers (save, underline, currency), as an attempt to reuse
the same controllers also for non-split buttons (see tdf#98745
and tdf#101672). But since then it was copy-pasted to other
places where it probably makes no sense.
Change-Id: I7af2a3f5864ced88c91f330e87f32046d0c21383
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99960
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
diff --git a/sfx2/source/control/emojipopup.cxx b/sfx2/source/control/emojipopup.cxx
index a0161fe2dbd7..7254d844a831 100644
--- a/sfx2/source/control/emojipopup.cxx
+++ b/sfx2/source/control/emojipopup.cxx
@@ -31,7 +31,7 @@ void EmojiPopup::initialize( const css::uno::Sequence< css::uno::Any >& rArgumen
ToolBox* pToolBox = nullptr;
sal_uInt16 nId = 0;
- if (getToolboxId(nId, &pToolBox) && pToolBox->GetItemCommand(nId) == m_aCommandURL)
+ if (getToolboxId(nId, &pToolBox))
pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWNONLY | pToolBox->GetItemBits(nId));
}
diff --git a/sfx2/source/dialog/charmappopup.cxx b/sfx2/source/dialog/charmappopup.cxx
index 7788a45c73c0..f8a791889c37 100644
--- a/sfx2/source/dialog/charmappopup.cxx
+++ b/sfx2/source/dialog/charmappopup.cxx
@@ -35,7 +35,7 @@ void CharmapPopup::initialize( const css::uno::Sequence< css::uno::Any >& rArgum
ToolBox* pToolBox = nullptr;
sal_uInt16 nId = 0;
- if (getToolboxId(nId, &pToolBox) && pToolBox->GetItemCommand(nId) == m_aCommandURL)
+ if (getToolboxId(nId, &pToolBox))
pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWNONLY | pToolBox->GetItemBits(nId));
}
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx
index 28bbf44c13dc..2d2e59f79f78 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx
@@ -43,7 +43,7 @@ void SvxLineSpacingToolBoxControl::initialize( const css::uno::Sequence< css::un
ToolBox* pToolBox = nullptr;
sal_uInt16 nId = 0;
- if (getToolboxId(nId, &pToolBox) && pToolBox->GetItemCommand(nId) == m_aCommandURL)
+ if (getToolboxId(nId, &pToolBox))
pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWNONLY | pToolBox->GetItemBits(nId));
}
diff --git a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx
index 5c1bf67dcc89..7957b1794e46 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx
@@ -39,7 +39,7 @@ void TextCharacterSpacingPopup::initialize( const css::uno::Sequence< css::uno::
ToolBox* pToolBox = nullptr;
sal_uInt16 nId = 0;
- if (getToolboxId(nId, &pToolBox) && pToolBox->GetItemCommand(nId) == m_aCommandURL)
+ if (getToolboxId(nId, &pToolBox))
pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWNONLY | pToolBox->GetItemBits(nId));
}
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 88b110e8c1f1..a08029b4be88 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -695,7 +695,7 @@ void SvxTableToolBoxControl::initialize( const css::uno::Sequence< css::uno::Any
ToolBox* pToolBox = nullptr;
sal_uInt16 nId = 0;
- if (getToolboxId(nId, &pToolBox) && pToolBox->GetItemCommand(nId) == m_aCommandURL)
+ if (getToolboxId(nId, &pToolBox))
pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWNONLY | pToolBox->GetItemBits(nId));
}
@@ -753,7 +753,7 @@ void SvxColumnsToolBoxControl::initialize( const css::uno::Sequence< css::uno::A
ToolBox* pToolBox = nullptr;
sal_uInt16 nId = 0;
- if (getToolboxId(nId, &pToolBox) && pToolBox->GetItemCommand(nId) == m_aCommandURL)
+ if (getToolboxId(nId, &pToolBox))
pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWNONLY | pToolBox->GetItemBits(nId));
}
diff --git a/sw/source/uibase/sidebar/PageColumnPopup.cxx b/sw/source/uibase/sidebar/PageColumnPopup.cxx
index b0b9e07fc883..e0fcd0d055c5 100644
--- a/sw/source/uibase/sidebar/PageColumnPopup.cxx
+++ b/sw/source/uibase/sidebar/PageColumnPopup.cxx
@@ -32,7 +32,7 @@ void PageColumnPopup::initialize( const css::uno::Sequence< css::uno::Any >& rAr
ToolBox* pToolBox = nullptr;
sal_uInt16 nId = 0;
- if (getToolboxId(nId, &pToolBox) && pToolBox->GetItemCommand(nId) == m_aCommandURL)
+ if (getToolboxId(nId, &pToolBox))
pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWNONLY | pToolBox->GetItemBits(nId));
}
diff --git a/sw/source/uibase/sidebar/PageMarginPopup.cxx b/sw/source/uibase/sidebar/PageMarginPopup.cxx
index 8223386c2a48..776248452a82 100644
--- a/sw/source/uibase/sidebar/PageMarginPopup.cxx
+++ b/sw/source/uibase/sidebar/PageMarginPopup.cxx
@@ -31,7 +31,7 @@ void PageMarginPopup::initialize( const css::uno::Sequence< css::uno::Any >& rAr
ToolBox* pToolBox = nullptr;
sal_uInt16 nId = 0;
- if (getToolboxId(nId, &pToolBox) && pToolBox->GetItemCommand(nId) == m_aCommandURL)
+ if (getToolboxId(nId, &pToolBox))
pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWNONLY | pToolBox->GetItemBits(nId));
}
diff --git a/sw/source/uibase/sidebar/PageOrientationPopup.cxx b/sw/source/uibase/sidebar/PageOrientationPopup.cxx
index 9b34f3c1dee0..e25090a7a9fb 100644
--- a/sw/source/uibase/sidebar/PageOrientationPopup.cxx
+++ b/sw/source/uibase/sidebar/PageOrientationPopup.cxx
@@ -32,7 +32,7 @@ void PageOrientationPopup::initialize( const css::uno::Sequence< css::uno::Any >
ToolBox* pToolBox = nullptr;
sal_uInt16 nId = 0;
- if (getToolboxId(nId, &pToolBox) && pToolBox->GetItemCommand(nId) == m_aCommandURL)
+ if (getToolboxId(nId, &pToolBox))
pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWNONLY | pToolBox->GetItemBits(nId));
}
diff --git a/sw/source/uibase/sidebar/PageSizePopup.cxx b/sw/source/uibase/sidebar/PageSizePopup.cxx
index 0c69f73ba721..1d1f26c8aa11 100644
--- a/sw/source/uibase/sidebar/PageSizePopup.cxx
+++ b/sw/source/uibase/sidebar/PageSizePopup.cxx
@@ -32,7 +32,7 @@ void PageSizePopup::initialize( const css::uno::Sequence< css::uno::Any >& rArgu
ToolBox* pToolBox = nullptr;
sal_uInt16 nId = 0;
- if (getToolboxId(nId, &pToolBox) && pToolBox->GetItemCommand(nId) == m_aCommandURL)
+ if (getToolboxId(nId, &pToolBox))
pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWNONLY | pToolBox->GetItemBits(nId));
}
More information about the Libreoffice-commits
mailing list