[Libreoffice-commits] core.git: 5 commits - chart2/source cui/source cui/uiconfig extensions/source l10ntools/source vcl/source
Caolán McNamara
caolanm at redhat.com
Mon Apr 18 13:03:36 UTC 2016
chart2/source/model/template/PieChartType.hxx | 2 +-
cui/source/dialogs/postdlg.cxx | 7 +++----
cui/source/options/optfltr.hxx | 2 +-
cui/uiconfig/ui/comment.ui | 11 -----------
extensions/source/bibliography/loadlisteneradapter.hxx | 2 +-
extensions/source/propctrlr/browserpage.hxx | 2 +-
extensions/source/propctrlr/browserview.hxx | 2 +-
l10ntools/source/gConvSrc.cxx | 2 +-
l10ntools/source/gL10nMem.cxx | 2 +-
l10ntools/source/gLang.cxx | 8 ++++----
vcl/source/app/svmain.cxx | 4 ++--
11 files changed, 16 insertions(+), 28 deletions(-)
New commits:
commit 2b9a215805ef50c1af727721d78465398ad53223
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 18 13:54:15 2016 +0100
postit dialog is too tall
the initial size hack has come unstuck, do it the now-standard
way or explicitly setting an initial size in code
Change-Id: I89c73e433b1974514fa2a68eb9bd5373142c313a
diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index 9f37eee..d5c1f44 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -109,10 +109,9 @@ SvxPostItDialog::SvxPostItDialog(vcl::Window* pParent, const SfxItemSet& rCoreSe
ShowLastAuthor(aAuthorStr, aDateStr);
- //lock to initial .ui placeholder size before replacing contents
- Size aSize(m_pEditED->get_preferred_size());
- m_pEditED->set_width_request(aSize.Width());
- m_pEditED->set_height_request(aSize.Height());
+ //lock to an initial size before replacing contents
+ m_pEditED->set_width_request(m_pEditED->approximate_char_width() * 40);
+ m_pEditED->set_height_request(m_pEditED->GetTextHeight() * 10);
m_pEditED->SetText(convertLineEnd(aTextStr, GetSystemLineEnd()));
diff --git a/cui/uiconfig/ui/comment.ui b/cui/uiconfig/ui/comment.ui
index f00b628..f25f37f 100644
--- a/cui/uiconfig/ui/comment.ui
+++ b/cui/uiconfig/ui/comment.ui
@@ -206,7 +206,6 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="wrap_mode">char</property>
- <property name="buffer">textbuffer1</property>
</object>
</child>
</object>
@@ -309,14 +308,4 @@
<property name="can_focus">False</property>
<property name="stock">gtk-go-forward</property>
</object>
- <object class="GtkTextBuffer" id="textbuffer1">
- <property name="text">12345678901234567890123456789012345
-2
-3
-4
-5
-6
-7
-8</property>
- </object>
</interface>
commit e1184f131bbce6b5856d428743562021e0f69206
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 18 09:43:58 2016 +0100
cppcheck: cstyleCast
Change-Id: Id3d126c1e5dc21d683c2717e5e16ca0cd64114a5
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index bc0cbec..8e0d1ec 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -610,8 +610,8 @@ static HANDLE hThreadID = 0;
static unsigned __stdcall _threadmain( void *pArgs )
{
OleInitialize( nullptr );
- ((WorkerThreadData*)pArgs)->pWorker( ((WorkerThreadData*)pArgs)->pThreadData );
- delete (WorkerThreadData*)pArgs;
+ static_cast<WorkerThreadData*>(pArgs)->pWorker( static_cast<WorkerThreadData*>(pArgs)->pThreadData );
+ delete static_cast<WorkerThreadData*>(pArgs);
OleUninitialize();
hThreadID = 0;
return 0;
commit a0fc0182efb3ce1daea5cfe70ce2e3a6f4996709
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 18 09:43:22 2016 +0100
cppcheck: unused variables
Change-Id: Ief3d2cd7af2047e49ea026d8a94d7532769a820c
diff --git a/l10ntools/source/gConvSrc.cxx b/l10ntools/source/gConvSrc.cxx
index 1ce32ad..2be9ce6 100644
--- a/l10ntools/source/gConvSrc.cxx
+++ b/l10ntools/source/gConvSrc.cxx
@@ -159,7 +159,7 @@ void convert_src::setList(char *syyText)
void convert_src::setNL(char *syyText, bool bMacro)
{
int nL;
- string sKey, x;
+ string sKey;
copySource(syyText);
diff --git a/l10ntools/source/gLang.cxx b/l10ntools/source/gLang.cxx
index 8317786..1e008c0ba 100644
--- a/l10ntools/source/gLang.cxx
+++ b/l10ntools/source/gLang.cxx
@@ -260,7 +260,7 @@ void handler::run()
void handler::loadL10MEM(bool onlyTemplates)
{
string sLoad = msPoDir + "templates/";
- vector<string>::iterator siLang;
+//FIX vector<string>::iterator siLang;
// no convert
mcMemory.setConvert(false, false);
@@ -296,7 +296,7 @@ void handler::loadL10MEM(bool onlyTemplates)
void handler::runConvert()
{
vector<string>::iterator siSource;
- vector<string>::iterator siLang;
+//FIX vector<string>::iterator siLang;
// convert
commit 3339789afd583249fbab09435c81398669b4343b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 18 09:38:34 2016 +0100
cppcheck: catchExceptionByValue
Change-Id: Id8e2fc67a1de4f608188d070f0f536576ad0e69a
diff --git a/l10ntools/source/gLang.cxx b/l10ntools/source/gLang.cxx
index bc0776b..8317786 100644
--- a/l10ntools/source/gLang.cxx
+++ b/l10ntools/source/gLang.cxx
@@ -397,7 +397,7 @@ int main(int argc, char *argv[])
handler::showUsage(myErr);
exit(-1);
}
- catch(string sErr) {
+ catch(const string& sErr) {
handler::showUsage(sErr);
exit(-1);
}
@@ -411,7 +411,7 @@ int main(int argc, char *argv[])
handler::showRunTimeError(myErr);
exit(-1);
}
- catch(string sErr) {
+ catch(const string& sErr) {
handler::showRunTimeError(sErr);
exit(-1);
}
commit 0154776f2d0bc13e44411e67f6b02bd5032b18a0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 18 09:34:32 2016 +0100
cppcheck: noExplicitConstructor
Change-Id: Iee9d28c9630a144e4da8e46e58f01a4be99aa961
diff --git a/chart2/source/model/template/PieChartType.hxx b/chart2/source/model/template/PieChartType.hxx
index 7d200ec..34b3b30 100644
--- a/chart2/source/model/template/PieChartType.hxx
+++ b/chart2/source/model/template/PieChartType.hxx
@@ -27,7 +27,7 @@ namespace chart
class PieChartType : public ChartType
{
public:
- PieChartType(
+ explicit PieChartType(
css::uno::Reference< css::uno::XComponentContext > const & xContext );
virtual ~PieChartType();
diff --git a/cui/source/options/optfltr.hxx b/cui/source/options/optfltr.hxx
index d18bd23..c2376c9 100644
--- a/cui/source/options/optfltr.hxx
+++ b/cui/source/options/optfltr.hxx
@@ -68,7 +68,7 @@ class OfaMSFilterTabPage2 : public SfxTabPage
virtual void KeyInput( const KeyEvent& rKEvt ) override;
public:
- MSFltrSimpleTable(SvSimpleTableContainer& rParent)
+ explicit MSFltrSimpleTable(SvSimpleTableContainer& rParent)
: SvSimpleTable(rParent, 0)
{
}
diff --git a/extensions/source/bibliography/loadlisteneradapter.hxx b/extensions/source/bibliography/loadlisteneradapter.hxx
index 1ef0432..1b84c65 100644
--- a/extensions/source/bibliography/loadlisteneradapter.hxx
+++ b/extensions/source/bibliography/loadlisteneradapter.hxx
@@ -77,7 +77,7 @@ namespace bib
virtual ~OComponentAdapterBase();
public:
- OComponentAdapterBase(
+ explicit OComponentAdapterBase(
const css::uno::Reference< css::lang::XComponent >& _rxComp
);
diff --git a/extensions/source/propctrlr/browserpage.hxx b/extensions/source/propctrlr/browserpage.hxx
index 01677a2..86bbfb9 100644
--- a/extensions/source/propctrlr/browserpage.hxx
+++ b/extensions/source/propctrlr/browserpage.hxx
@@ -37,7 +37,7 @@ namespace pcr
virtual void StateChanged(StateChangedType nType) override;
public:
- OBrowserPage(vcl::Window* pParent);
+ explicit OBrowserPage(vcl::Window* pParent);
virtual ~OBrowserPage();
virtual void dispose() override;
diff --git a/extensions/source/propctrlr/browserview.hxx b/extensions/source/propctrlr/browserview.hxx
index b8cd2aa..12885d4 100644
--- a/extensions/source/propctrlr/browserview.hxx
+++ b/extensions/source/propctrlr/browserview.hxx
@@ -44,7 +44,7 @@ namespace pcr
virtual bool Notify( NotifyEvent& _rNEvt ) override;
public:
- OPropertyBrowserView( vcl::Window* pParent);
+ explicit OPropertyBrowserView( vcl::Window* pParent);
virtual ~OPropertyBrowserView();
virtual void dispose() override;
diff --git a/l10ntools/source/gL10nMem.cxx b/l10ntools/source/gL10nMem.cxx
index e9af2b0..93e1852 100644
--- a/l10ntools/source/gL10nMem.cxx
+++ b/l10ntools/source/gL10nMem.cxx
@@ -34,7 +34,7 @@ l10nMem *myMem;
class l10nMem_lang_list_entry
{
public:
- l10nMem_lang_list_entry(const string& sName)
+ explicit l10nMem_lang_list_entry(const string& sName)
: msName(sName),
mbChanged(false)
{}
More information about the Libreoffice-commits
mailing list