summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@pardus.org.tr>2018-04-12 21:53:29 +0300
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-04-17 09:59:42 +0200
commit66ed9797ba8f61994a187dfcc189f375dcd0cdcc (patch)
tree19dadc10a843b9d4b906b116b6c888af5b8e0c19 /sd
parent3564b46992fc30e212011c19043a2553178ccbca (diff)
Simplify calls to Menu::CheckItem
in cui, dbaccess, vcl, sc, sd Change-Id: I328d81cf6cd5a7e31fb21a758e4b2670e7df1b91 Reviewed-on: https://gerrit.libreoffice.org/52797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx32
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx6
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx8
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx4
4 files changed, 25 insertions, 25 deletions
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 457ab8c8ba9e..72df60f6dab4 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -637,13 +637,13 @@ void RotationPropertyBox::updateMenu()
bool bDirection = nValue >= 0;
nValue = (nValue < 0 ? -nValue : nValue);
- mpMenu->CheckItem(mpMenu->GetItemId("90"), nValue == 90);
- mpMenu->CheckItem(mpMenu->GetItemId("180"), nValue == 180);
- mpMenu->CheckItem(mpMenu->GetItemId("360"), nValue == 360);
- mpMenu->CheckItem(mpMenu->GetItemId("720"), nValue == 720);
+ mpMenu->CheckItem("90", nValue == 90);
+ mpMenu->CheckItem("180", nValue == 180);
+ mpMenu->CheckItem("360", nValue == 360);
+ mpMenu->CheckItem("720", nValue == 720);
- mpMenu->CheckItem(mpMenu->GetItemId("closewise"), bDirection);
- mpMenu->CheckItem(mpMenu->GetItemId("counterclock"), !bDirection);
+ mpMenu->CheckItem("closewise", bDirection);
+ mpMenu->CheckItem("counterclock", !bDirection);
}
IMPL_LINK_NOARG(RotationPropertyBox, implModifyHdl, Edit&, void)
@@ -754,14 +754,14 @@ void ScalePropertyBox::updateMenu()
{
sal_Int64 nValue = mpMetric->GetValue();
- mpMenu->CheckItem(mpMenu->GetItemId("25"), nValue == 25);
- mpMenu->CheckItem(mpMenu->GetItemId("50"), nValue == 50);
- mpMenu->CheckItem(mpMenu->GetItemId("150"), nValue == 150);
- mpMenu->CheckItem(mpMenu->GetItemId("400"), nValue == 400);
+ mpMenu->CheckItem("25", nValue == 25);
+ mpMenu->CheckItem("50", nValue == 50);
+ mpMenu->CheckItem("150", nValue == 150);
+ mpMenu->CheckItem("400", nValue == 400);
- mpMenu->CheckItem(mpMenu->GetItemId("hori"), mnDirection == 1);
- mpMenu->CheckItem(mpMenu->GetItemId("vert"), mnDirection == 2);
- mpMenu->CheckItem(mpMenu->GetItemId("both"), mnDirection == 3);
+ mpMenu->CheckItem("hori", mnDirection == 1);
+ mpMenu->CheckItem("vert", mnDirection == 2);
+ mpMenu->CheckItem("both", mnDirection == 3);
}
IMPL_LINK_NOARG(ScalePropertyBox, implModifyHdl, Edit&, void)
@@ -928,9 +928,9 @@ FontStylePropertyBox::~FontStylePropertyBox()
void FontStylePropertyBox::update()
{
// update menu
- mpMenu->CheckItem(mpMenu->GetItemId("bold"), mfFontWeight == awt::FontWeight::BOLD);
- mpMenu->CheckItem(mpMenu->GetItemId("italic"), meFontSlant == awt::FontSlant_ITALIC);
- mpMenu->CheckItem(mpMenu->GetItemId("underline"), mnFontUnderline != awt::FontUnderline::NONE );
+ mpMenu->CheckItem("bold", mfFontWeight == awt::FontWeight::BOLD);
+ mpMenu->CheckItem("italic", meFontSlant == awt::FontSlant_ITALIC);
+ mpMenu->CheckItem("underline", mnFontUnderline != awt::FontUnderline::NONE );
// update sample edit
vcl::Font aFont( mpEdit->GetFont() );
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 5008b9f631ea..59de6e7e1811 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -904,9 +904,9 @@ VclPtr<PopupMenu> CustomAnimationList::CreateContextMenu()
pEntry = static_cast< CustomAnimationListEntry* >(NextSelected( pEntry ));
}
- mxMenu->CheckItem(mxMenu->GetItemId("onclick"), nNodeType == EffectNodeType::ON_CLICK);
- mxMenu->CheckItem(mxMenu->GetItemId("withprev"), nNodeType == EffectNodeType::WITH_PREVIOUS);
- mxMenu->CheckItem(mxMenu->GetItemId("afterprev"), nNodeType == EffectNodeType::AFTER_PREVIOUS);
+ mxMenu->CheckItem("onclick", nNodeType == EffectNodeType::ON_CLICK);
+ mxMenu->CheckItem("withprev", nNodeType == EffectNodeType::WITH_PREVIOUS);
+ mxMenu->CheckItem("afterprev", nNodeType == EffectNodeType::AFTER_PREVIOUS);
mxMenu->EnableItem(mxMenu->GetItemId("options"), nEntries == 1);
mxMenu->EnableItem(mxMenu->GetItemId("timing"), nEntries == 1);
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index bdf41e19a65b..dfd97e4a057a 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -1122,25 +1122,25 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( const Reference< XAnno
if ( aSet.GetItemState( EE_CHAR_WEIGHT ) == SfxItemState::SET )
{
if( aSet.Get( EE_CHAR_WEIGHT ).GetWeight() == WEIGHT_BOLD )
- pMenu->CheckItem(pMenu->GetItemId("bold"));
+ pMenu->CheckItem("bold");
}
if ( aSet.GetItemState( EE_CHAR_ITALIC ) == SfxItemState::SET )
{
if( aSet.Get( EE_CHAR_ITALIC ).GetPosture() != ITALIC_NONE )
- pMenu->CheckItem(pMenu->GetItemId("italic"));
+ pMenu->CheckItem("italic");
}
if ( aSet.GetItemState( EE_CHAR_UNDERLINE ) == SfxItemState::SET )
{
if( aSet.Get( EE_CHAR_UNDERLINE ).GetLineStyle() != LINESTYLE_NONE )
- pMenu->CheckItem(pMenu->GetItemId("underline"));
+ pMenu->CheckItem("underline");
}
if ( aSet.GetItemState( EE_CHAR_STRIKEOUT ) == SfxItemState::SET )
{
if( aSet.Get( EE_CHAR_STRIKEOUT ).GetStrikeout() != STRIKEOUT_NONE )
- pMenu->CheckItem(pMenu->GetItemId("strike"));
+ pMenu->CheckItem("strike");
}
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pAnnotationWindow ) );
pMenu->EnableItem(pMenu->GetItemId("paste"), aDataHelper.GetFormatCount() != 0);
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index aade2af55ce0..b3c78d89978e 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1930,7 +1930,7 @@ IMPL_LINK_NOARG(SlideshowImpl, ContextMenuHdl, void*, void)
VclPtr<PopupMenu> pMenu(aBuilder.get_menu("menu"));
// Adding button to display if in Pen mode
- pMenu->CheckItem(pMenu->GetItemId("pen"), mbUsePen);
+ pMenu->CheckItem("pen", mbUsePen);
const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode();
pMenu->EnableItem(pMenu->GetItemId("next"), mpSlideController->getNextSlideIndex() != -1);
@@ -1996,7 +1996,7 @@ IMPL_LINK_NOARG(SlideshowImpl, ContextMenuHdl, void*, void)
PopupMenu* pBlankMenu = pMenu->GetPopupMenu(pMenu->GetItemId("screen"));
if( pBlankMenu )
{
- pBlankMenu->CheckItem((mpShowWindow->GetBlankColor() == COL_WHITE) ? pBlankMenu->GetItemId("white") : pBlankMenu->GetItemId("black"));
+ pBlankMenu->CheckItem((mpShowWindow->GetBlankColor() == COL_WHITE) ? "white" : "black");
}
}