summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-01-08 16:48:20 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-01-09 22:11:40 +0100
commit08be15ebedd173dbc86fbbdf33667d7fa45ec1bc (patch)
treea2105c8d978c911d657d852c38acd5290282e0d6 /cui
parenta04abeb9363dfe774f93321868676a50cb9eec56 (diff)
tdf#122527 dot symbols in chart menubutton not working
a few problems here *) each symbol was drawn on top of the previous one instead of clearing it *) some spurious placeholder text in the menu entry *) m_nSymbolType not set correctly on activation of a submenu entry *) under gtk3 adding entries to the submenus didn't inform the menubutton of their addition *) we can drop m_xMenu because set_item_sensitive can be used instead, which didn't exist at the initial time of writing Change-Id: Id339992c4192f3782fddfd56cb3e9b67cfcbe2a2 Reviewed-on: https://gerrit.libreoffice.org/65978 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/inc/cuitabline.hxx1
-rw-r--r--cui/source/tabpages/tpline.cxx17
2 files changed, 9 insertions, 9 deletions
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index 639ad645c7ce..284a0e656a55 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -148,7 +148,6 @@ private:
std::unique_ptr<weld::MetricSpinButton> m_xMtrEndWidth;
std::unique_ptr<weld::CheckButton> m_xTsbCenterEnd;
std::unique_ptr<weld::CheckButton> m_xCbxSynchronize;
- std::unique_ptr<weld::Menu> m_xMenu;
std::unique_ptr<weld::Menu> m_xGalleryMenu;
std::unique_ptr<weld::Menu> m_xSymbolsMenu;
std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index dad85068f793..b4498348c8ed 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -108,7 +108,6 @@ SvxLineTabPage::SvxLineTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs
, m_xMtrEndWidth(m_xBuilder->weld_metric_spin_button("MTR_FLD_END_WIDTH", FieldUnit::CM))
, m_xTsbCenterEnd(m_xBuilder->weld_check_button("TSB_CENTER_END"))
, m_xCbxSynchronize(m_xBuilder->weld_check_button("CBX_SYNCHRONIZE"))
- , m_xMenu(m_xBuilder->weld_menu("menuSELECT"))
, m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, "CTL_PREVIEW", m_aCtlPreview))
, m_xFLEdgeStyle(m_xBuilder->weld_widget("FL_EDGE_STYLE"))
, m_xGridEdgeCaps(m_xBuilder->weld_widget("gridEDGE_CAPS"))
@@ -1410,7 +1409,7 @@ IMPL_LINK_NOARG(SvxLineTabPage, MenuCreateHdl_Impl, weld::ToggleButton&, void)
aBitmap.Scale(nScale, nScale);
}
- pVD->SetOutputSizePixel(aBitmap.GetSizePixel(), false);
+ pVD->SetOutputSizePixel(aBitmap.GetSizePixel());
pVD->DrawBitmapEx(Point(), aBitmap);
m_xGalleryMenu->append(pInfo->sItemId, *pUIName, *pVD);
}
@@ -1422,7 +1421,7 @@ IMPL_LINK_NOARG(SvxLineTabPage, MenuCreateHdl_Impl, weld::ToggleButton&, void)
}
if (m_aGrfNames.empty())
- m_xMenu->set_sensitive("gallery", false);
+ m_xSymbolMB->set_item_sensitive("gallery", false);
}
if (!m_xSymbolsMenu && m_pSymbolList)
@@ -1494,15 +1493,15 @@ IMPL_LINK_NOARG(SvxLineTabPage, MenuCreateHdl_Impl, weld::ToggleButton&, void)
double(MAX_BMP_HEIGHT) / static_cast<double>(aSize.Height());
aBitmapEx.Scale(nScale, nScale);
}
- pVD->SetOutputSizePixel(aBitmapEx.GetSizePixel(), false);
+ pVD->SetOutputSizePixel(aBitmapEx.GetSizePixel());
pVD->DrawBitmapEx(Point(), aBitmapEx);
- m_xSymbolsMenu->append(pInfo->sItemId, "foo", *pVD);
+ m_xSymbolsMenu->append(pInfo->sItemId, "", *pVD);
}
pInvisibleSquare=pPage->RemoveObject(0);
SdrObject::Free(pInvisibleSquare);
if (m_aGrfNames.empty())
- m_xMenu->set_sensitive("symbols", false);
+ m_xSymbolMB->set_item_sensitive("symbols", false);
}
}
}
@@ -1522,10 +1521,12 @@ IMPL_LINK(SvxLineTabPage, GraphicHdl_Impl, const OString&, rIdent, void)
{
SvxBmpItemInfo* pInfo = m_aGalleryBrushItems[sNumber.toUInt32()].get();
pGraphic = pInfo->pBrushItem->GetGraphic();
+ m_nSymbolType = SVX_SYMBOLTYPE_BRUSHITEM;
}
else if (rIdent.startsWith("symbol", &sNumber))
{
- SvxBmpItemInfo* pInfo = m_aSymbolBrushItems[sNumber.toUInt32()].get();
+ m_nSymbolType = sNumber.toUInt32();
+ SvxBmpItemInfo* pInfo = m_aSymbolBrushItems[m_nSymbolType].get();
pGraphic = pInfo->pBrushItem->GetGraphic();
}
else if (rIdent == "automatic")
@@ -1559,7 +1560,7 @@ IMPL_LINK(SvxLineTabPage, GraphicHdl_Impl, const OString&, rIdent, void)
return;
}
- if(pGraphic)
+ if (pGraphic)
{
Size aSize = SvxNumberFormat::GetGraphicSizeMM100(pGraphic);
aSize = OutputDevice::LogicToLogic(aSize, MapMode(MapUnit::Map100thMM), MapMode(m_ePoolUnit));