[Libreoffice-commits] core.git: 2 commits - chart2/source cui/source cui/uiconfig
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Sep 11 07:56:45 UTC 2018
chart2/source/view/main/ShapeFactory.cxx | 1
cui/source/inc/numpages.hxx | 11 +++-----
cui/source/tabpages/numpages.cxx | 42 ++++++++++++++-----------------
cui/uiconfig/ui/pickoutlinepage.ui | 22 ++++++++++++++--
4 files changed, 46 insertions(+), 30 deletions(-)
New commits:
commit bc65992929392d597070237471aa4d5a7eec674d
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Sep 10 13:59:18 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Sep 11 09:56:34 2018 +0200
weld SvxNumPickTabPage
Change-Id: I575927d125af684e1133d6b46c0f637d996cbb88
Reviewed-on: https://gerrit.libreoffice.org/60265
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index bef652167040..920ffbf6b3c1 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -41,7 +41,6 @@ class NumValueSet;
class SvxColorListBox;
class SvxNumRule;
class SvxBmpNumValueSet;
-class SvxNumValueSet;
class SvxBrushItem;
class ValueSet;
@@ -160,7 +159,6 @@ class SvxNumPickTabPage final : public SfxTabPage
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
- VclPtr<SvxNumValueSet> m_pExamplesVS;
OUString sNumCharFmtName;
OUString sBulletCharFormatName;
@@ -173,13 +171,14 @@ class SvxNumPickTabPage final : public SfxTabPage
bool bModified : 1;
bool bPreset : 1;
+ std::unique_ptr<NumValueSet> m_xExamplesVS;
+ std::unique_ptr<weld::CustomWeld> m_xExamplesVSWin;
- DECL_LINK(NumSelectHdl_Impl, ValueSet*, void);
- DECL_LINK(DoubleClickHdl_Impl, ValueSet*, void);
+ DECL_LINK(NumSelectHdl_Impl, SvtValueSet*, void);
+ DECL_LINK(DoubleClickHdl_Impl, SvtValueSet*, void);
public:
- SvxNumPickTabPage(vcl::Window* pParent,
- const SfxItemSet& rSet);
+ SvxNumPickTabPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~SvxNumPickTabPage() override;
virtual void dispose() override;
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index f8a411f9ff4f..58cdf26ee997 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -510,21 +510,20 @@ void SvxBulletPickTabPage::PageCreated(const SfxAllItemSet& aSet)
sBulletCharFormatName = pBulletCharFmt->GetValue();
}
-
-SvxNumPickTabPage::SvxNumPickTabPage(vcl::Window* pParent,
- const SfxItemSet& rSet)
- : SfxTabPage(pParent, "PickOutlinePage", "cui/ui/pickoutlinepage.ui", &rSet)
+SvxNumPickTabPage::SvxNumPickTabPage(TabPageParent pParent, const SfxItemSet& rSet)
+ : SfxTabPage(pParent, "cui/ui/pickoutlinepage.ui", "PickOutlinePage", &rSet)
, nActNumLvl(SAL_MAX_UINT16)
, nNumItemId(SID_ATTR_NUMBERING_RULE)
, bModified(false)
, bPreset(false)
+ , m_xExamplesVS(new NumValueSet)
+ , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xExamplesVS))
{
SetExchangeSupport();
- get(m_pExamplesVS, "valueset");
- m_pExamplesVS->init(NumberingPageType::OUTLINE);
- m_pExamplesVS->SetSelectHdl(LINK(this, SvxNumPickTabPage, NumSelectHdl_Impl));
- m_pExamplesVS->SetDoubleClickHdl(LINK(this, SvxNumPickTabPage, DoubleClickHdl_Impl));
+ m_xExamplesVS->init(NumberingPageType::OUTLINE);
+ m_xExamplesVS->SetSelectHdl(LINK(this, SvxNumPickTabPage, NumSelectHdl_Impl));
+ m_xExamplesVS->SetDoubleClickHdl(LINK(this, SvxNumPickTabPage, DoubleClickHdl_Impl));
Reference<XDefaultNumberingProvider> xDefNum = SvxNumOptionsTabPageHelper::GetNumberingProvider();
if(xDefNum.is())
@@ -556,7 +555,7 @@ SvxNumPickTabPage::SvxNumPickTabPage(vcl::Window* pParent,
{
}
Reference<XNumberingFormatter> xFormat(xDefNum, UNO_QUERY);
- m_pExamplesVS->SetOutlineNumberingSettings(aOutlineAccess, xFormat, rLocale);
+ m_xExamplesVS->SetOutlineNumberingSettings(aOutlineAccess, xFormat, rLocale);
}
}
@@ -567,16 +566,15 @@ SvxNumPickTabPage::~SvxNumPickTabPage()
void SvxNumPickTabPage::dispose()
{
- pActNum.reset();
- pSaveNum.reset();
- m_pExamplesVS.clear();
+ m_xExamplesVSWin.reset();
+ m_xExamplesVS.reset();
SfxTabPage::dispose();
}
-VclPtr<SfxTabPage> SvxNumPickTabPage::Create( TabPageParent pParent,
- const SfxItemSet* rAttrSet)
+VclPtr<SfxTabPage> SvxNumPickTabPage::Create(TabPageParent pParent,
+ const SfxItemSet* rAttrSet)
{
- return VclPtr<SvxNumPickTabPage>::Create(pParent.pParent, *rAttrSet);
+ return VclPtr<SvxNumPickTabPage>::Create(pParent, *rAttrSet);
}
bool SvxNumPickTabPage::FillItemSet( SfxItemSet* rSet )
@@ -610,13 +608,13 @@ void SvxNumPickTabPage::ActivatePage(const SfxItemSet& rSet)
if(pActNum && *pSaveNum != *pActNum)
{
*pActNum = *pSaveNum;
- m_pExamplesVS->SetNoSelection();
+ m_xExamplesVS->SetNoSelection();
}
if(pActNum && (!lcl_IsNumFmtSet(pActNum.get(), nActNumLvl) || bIsPreset))
{
- m_pExamplesVS->SelectItem(1);
- NumSelectHdl_Impl(m_pExamplesVS);
+ m_xExamplesVS->SelectItem(1);
+ NumSelectHdl_Impl(m_xExamplesVS.get());
bPreset = true;
}
bPreset |= bIsPreset;
@@ -658,7 +656,7 @@ void SvxNumPickTabPage::Reset( const SfxItemSet* rSet )
}
// all levels are changed here
-IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void)
+IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl, SvtValueSet*, void)
{
if(pActNum)
{
@@ -667,7 +665,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void)
const FontList* pList = nullptr;
- SvxNumSettingsArr_Impl& rItemArr = aNumSettingsArrays[m_pExamplesVS->GetSelectedItemId() - 1];
+ SvxNumSettingsArr_Impl& rItemArr = aNumSettingsArrays[m_xExamplesVS->GetSelectedItemId() - 1];
const vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont();
SvxNumSettings_Impl* pLevelSettings = nullptr;
@@ -740,9 +738,9 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void)
}
}
-IMPL_LINK_NOARG(SvxNumPickTabPage, DoubleClickHdl_Impl, ValueSet*, void)
+IMPL_LINK_NOARG(SvxNumPickTabPage, DoubleClickHdl_Impl, SvtValueSet*, void)
{
- NumSelectHdl_Impl(m_pExamplesVS);
+ NumSelectHdl_Impl(m_xExamplesVS.get());
PushButton& rOk = GetTabDialog()->GetOKButton();
rOk.GetClickHdl().Call(&rOk);
}
diff --git a/cui/uiconfig/ui/pickoutlinepage.ui b/cui/uiconfig/ui/pickoutlinepage.ui
index bfcbdf12a5d9..a1360ea11d3f 100644
--- a/cui/uiconfig/ui/pickoutlinepage.ui
+++ b/cui/uiconfig/ui/pickoutlinepage.ui
@@ -18,11 +18,29 @@
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
- <object class="svxlo-SvxNumValueSet" id="valueset">
+ <object class="GtkScrolledWindow" id="valuesetwin">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="vscrollbar_policy">never</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkViewport">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkDrawingArea" id="valueset">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
</child>
</object>
commit 063e92004b65411dbee7fc12ab00c78aa9c69a86
Author: Balazs Varga <balazs.varga991 at gmail.com>
AuthorDate: Tue Sep 4 16:27:17 2018 +0200
Commit: László Németh <nemeth at numbertext.org>
CommitDate: Tue Sep 11 09:56:19 2018 +0200
tdf#108028 OOXML: Fix line breaking of chart title
With adding the "TextMaximumFrameWidth" property to the chart title's
textbox property, it breaks chart titles longer then the chart width,
as in OOXML reference implementation. LibreOffice previously distorted
the text and squeezed the chart. This patch will fix it.
Change-Id: Ic086d25b49e9c5cf9c6f2c79f141592749adc7d8
Reviewed-on: https://gerrit.libreoffice.org/59991
Tested-by: Jenkins
Tested-by: László Németh <nemeth at numbertext.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index d488cc197680..c545cc99ebf3 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -2407,6 +2407,7 @@ uno::Reference< drawing::XShape >
aValueMap.insert( { "TextVerticalAdjust", uno::Any(drawing::TextVerticalAdjust_CENTER) } ); //drawing::TextVerticalAdjust
aValueMap.insert( { "TextAutoGrowHeight", uno::Any(true) } ); // sal_Bool
aValueMap.insert( { "TextAutoGrowWidth", uno::Any(true) } ); // sal_Bool
+ aValueMap.insert( { "TextMaximumFrameWidth", uno::Any(rSize.Width) } ); // sal_Int32
//set name/classified ObjectID (CID)
if( !aName.isEmpty() )
More information about the Libreoffice-commits
mailing list