Michael Weghorn license statement

2014-09-11 Thread Michael Weghorn

Hi,

all of my past and future contributions to LibreOffice may be licensed 
under the MPLv2/LGPLv3+ dual license.


Best regards,
Michael Weghorn

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Changes to 'refs/changes/92/11392/1'

2014-09-29 Thread Michael Weghorn

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2018-06-12 Thread Michael Weghorn
 sw/source/uibase/dbui/dbmgr.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 89f896d2cfd84b711583f98a6343e9835a9aed11
Author: Michael Weghorn 
Date:   Mon Jun 11 17:20:44 2018 +0200

tdf#118113 MM: Make sure page count is up to date

Since the page layout may have changed, e.g. due to
the visibility status of hidden sections having changed
in the call to 'pWorkShell->SwViewShell::UpdateFields()',
it's necessary to recalculate the layout to ensure that
the correct page count is retrieved when calling
'pWorkShell->CalcLayout()'.

This fixes a regression introduced by the performance
optimization done in commit
ae5afe9bcebdd220a457829d47882fe8a0cf69fd, while
still avoiding to have to do the expensive layout for the
target document.

Change-Id: I46f1b68758e4df330c17358a8e852e8b040a9520
Reviewed-on: https://gerrit.libreoffice.org/55636
Tested-by: Jenkins 
Reviewed-by: Luboš Luňák 

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 54e678280616..6d8694e905df 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1502,6 +1502,8 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
 ++targetDocPageCount; // Docs always start on odd pages 
(so offset must be even).
 SwNodeIndex appendedDocStart = pTargetDoc->AppendDoc( 
*pWorkDoc,
 nStartingPageNo, !bWorkDocInitialized, targetDocPageCount, 
nDocNo);
+// ensure layout is up to date in order to get correct page 
count
+pWorkShell->CalcLayout();
 targetDocPageCount += pWorkShell->GetPageCnt();
 
 if ( (nMaxDumpDocs < 0) || (nDocNo <= nMaxDumpDocs) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa

2018-06-12 Thread Michael Weghorn
 sw/qa/extras/mailmerge/data/tdf118113.ods |binary
 sw/qa/extras/mailmerge/data/tdf118113.odt |binary
 sw/qa/extras/mailmerge/mailmerge.cxx  |   42 ++
 3 files changed, 42 insertions(+)

New commits:
commit ab665e1c939ec231338f9eac256d37cb1c5afcc9
Author: Michael Weghorn 
Date:   Tue Jun 12 08:19:51 2018 +0200

tdf#118113 Add unit test

The unit test uses the sample documents attached
to the Bugzilla issue.

Change-Id: I7233903212b9c79930e1b1af737d915755f737e9
Reviewed-on: https://gerrit.libreoffice.org/55656
Reviewed-by: Luboš Luňák 
Tested-by: Jenkins 

diff --git a/sw/qa/extras/mailmerge/data/tdf118113.ods 
b/sw/qa/extras/mailmerge/data/tdf118113.ods
new file mode 100644
index ..1d7e3cfb5dec
Binary files /dev/null and b/sw/qa/extras/mailmerge/data/tdf118113.ods differ
diff --git a/sw/qa/extras/mailmerge/data/tdf118113.odt 
b/sw/qa/extras/mailmerge/data/tdf118113.odt
new file mode 100644
index ..89e7bc304869
Binary files /dev/null and b/sw/qa/extras/mailmerge/data/tdf118113.odt differ
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx 
b/sw/qa/extras/mailmerge/mailmerge.cxx
index da7b168b61e3..5a647efff1c0 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -677,6 +677,48 @@ DECLARE_FILE_MAILMERGE_TEST(testTdf102010, "empty.odt", 
"10-testing-addresses.od
 loadMailMergeDocument( 1 );
 }
 
+DECLARE_SHELL_MAILMERGE_TEST(testTdf118113, "tdf118113.odt", "tdf118113.ods", 
"testing-addresses")
+{
+executeMailMerge();
+
+// The document contains a text box anchored to the page and a 
conditionally hidden
+// section that is only shown for one of the 4 recipients, namely the 3rd 
record.
+// In case the hidden section is shown, the page count is 3 for a single 
data entry, otherwise 1.
+// Previously, the page number was calculated incorrectly which led to the
+// text box being anchored to the wrong page.
+
+SwXTextDocument* pTextDoc = dynamic_cast(mxMMComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
+// 3 documents with 1 page size each + 1 document with 3 pages
+// + an additional page after each of the first 3 documents to make
+// sure that each document starts on an odd page number
+sal_uInt16 nPhysPages = 
pTextDoc->GetDocShell()->GetWrtShell()->GetPhyPageNum();
+CPPUNIT_ASSERT_EQUAL(sal_uInt16(9), nPhysPages);
+
+// verify that there is a text box for each data record
+uno::Reference 
xDrawPageSupplier(mxMMComponent, uno::UNO_QUERY);
+uno::Reference 
xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xDraws->getCount());
+
+// verify the text box for each data record is anchored to the first page 
of the given data record's pages
+std::vector expectedPageNumbers {1, 3, 5, 9};
+uno::Reference xPropertySet;
+for (sal_Int32 i = 0; i < xDraws->getCount(); i++)
+{
+xPropertySet.set(xDraws->getByIndex(i), uno::UNO_QUERY);
+
+text::TextContentAnchorType nAnchorType;
+CPPUNIT_ASSERT(xPropertySet->getPropertyValue( UNO_NAME_ANCHOR_TYPE ) 
>>= nAnchorType);
+CPPUNIT_ASSERT_EQUAL( text::TextContentAnchorType_AT_PAGE, nAnchorType 
);
+
+sal_uInt16 nAnchorPageNo = {};
+CPPUNIT_ASSERT(xPropertySet->getPropertyValue( UNO_NAME_ANCHOR_PAGE_NO 
) >>= nAnchorPageNo);
+
+CPPUNIT_ASSERT_EQUAL(expectedPageNumbers.at(i), nAnchorPageNo);
+}
+}
+
+
 namespace
 {
 constexpr char const* const EmptyValuesLegacyData[][8]
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - sw/source

2018-06-12 Thread Michael Weghorn
 sw/source/uibase/dbui/dbmgr.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit da482424a86f848155d1db14ef5b4a28af62f61d
Author: Michael Weghorn 
Date:   Mon Jun 11 17:20:44 2018 +0200

tdf#118113 MM: Make sure page count is up to date

Since the page layout may have changed, e.g. due to
the visibility status of hidden sections having changed
in the call to 'pWorkShell->SwViewShell::UpdateFields()',
it's necessary to recalculate the layout to ensure that
the correct page count is retrieved when calling
'pWorkShell->CalcLayout()'.

This fixes a regression introduced by the performance
optimization done in commit
ae5afe9bcebdd220a457829d47882fe8a0cf69fd, while
still avoiding to have to do the expensive layout for the
target document.

Change-Id: I46f1b68758e4df330c17358a8e852e8b040a9520
Reviewed-on: https://gerrit.libreoffice.org/55636
Tested-by: Jenkins 
Reviewed-by: Luboš Luňák 
(cherry picked from commit 89f896d2cfd84b711583f98a6343e9835a9aed11)
Reviewed-on: https://gerrit.libreoffice.org/55699
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 36a14daf5982..2f2e76a072c3 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1445,6 +1445,8 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
 ++targetDocPageCount; // Docs always start on odd pages 
(so offset must be even).
 SwNodeIndex appendedDocStart = pTargetDoc->AppendDoc( 
*pWorkDoc,
 nStartingPageNo, !bWorkDocInitialized, targetDocPageCount, 
nDocNo);
+// ensure layout is up to date in order to get correct page 
count
+pWorkShell->CalcLayout();
 targetDocPageCount += pWorkShell->GetPageCnt();
 
 if ( (nMaxDumpDocs < 0) || (nDocNo <= nMaxDumpDocs) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/source

2018-06-12 Thread Michael Weghorn
 sw/source/uibase/dbui/dbmgr.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit e8a46b0171a49e6b49a2e7b89c8bdfef84ef41ef
Author: Michael Weghorn 
Date:   Mon Jun 11 17:20:44 2018 +0200

tdf#118113 MM: Make sure page count is up to date

Since the page layout may have changed, e.g. due to
the visibility status of hidden sections having changed
in the call to 'pWorkShell->SwViewShell::UpdateFields()',
it's necessary to recalculate the layout to ensure that
the correct page count is retrieved when calling
'pWorkShell->CalcLayout()'.

This fixes a regression introduced by the performance
optimization done in commit
ae5afe9bcebdd220a457829d47882fe8a0cf69fd, while
still avoiding to have to do the expensive layout for the
target document.

Change-Id: I46f1b68758e4df330c17358a8e852e8b040a9520
Reviewed-on: https://gerrit.libreoffice.org/55636
Tested-by: Jenkins 
Reviewed-by: Luboš Luňák 
(cherry picked from commit 89f896d2cfd84b711583f98a6343e9835a9aed11)
Reviewed-on: https://gerrit.libreoffice.org/55707
    Reviewed-by: Michael Weghorn 

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 9b29507fa46b..77e8297f8892 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1550,6 +1550,8 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
 ++targetDocPageCount; // Docs always start on odd pages 
(so offset must be even).
 SwNodeIndex appendedDocStart = pTargetDoc->AppendDoc( 
*pWorkDoc,
 nStartingPageNo, !bWorkDocInitialized, targetDocPageCount, 
nDocNo);
+// ensure layout is up to date in order to get correct page 
count
+pWorkShell->CalcLayout();
 targetDocPageCount += pWorkShell->GetPageCnt();
 
 if ( (nMaxDumpDocs < 0) || (nDocNo <= nMaxDumpDocs) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: scp2/InstallScript_setup_osl.mk scp2/Module_scp2.mk

2018-06-13 Thread Michael Weghorn
 scp2/InstallScript_setup_osl.mk |2 +-
 scp2/Module_scp2.mk |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f971bdb026735fdecd777d0d2edc515124f9e822
Author: Michael Weghorn 
Date:   Tue Jun 5 08:29:21 2018 +0200

Build kde-integration for '--enable-gtk3-kde5' as well

The relevant files ('libvclplug_gtk3_kde5lo.so',
'lo_kde5filepicker') resulting from the '--enable-gtk3-kde5'
build option are put into the kde-integration package
(e.g. a Debian package when the '--with-package-format=deb'
option is given).

However, so far that package was only created at all when
one of the options '--enable-kde4', '--enable-qt5' or
'--enable-kde5' was given in addition.

Since those are not needed for the gtk3_kde5 vclplug, also
build the kde-integration when none of the others is
built in addition.

Change-Id: I86eb71ac7879c7226c9eaa89774b68125212a75c
Reviewed-on: https://gerrit.libreoffice.org/55310
Tested-by: Jenkins 
Reviewed-by: Michael Weghorn 

diff --git a/scp2/InstallScript_setup_osl.mk b/scp2/InstallScript_setup_osl.mk
index 8ce3e2ecef79..a37a4552c139 100644
--- a/scp2/InstallScript_setup_osl.mk
+++ b/scp2/InstallScript_setup_osl.mk
@@ -35,7 +35,7 @@ $(eval $(call gb_InstallScript_use_modules,setup_osl,\
$(if $(filter TRUE,$(ENABLE_EVOAB2) $(ENABLE_GIO) $(ENABLE_GTK) 
$(ENABLE_GTK3)),\
scp2/gnome \
) \
-   $(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_QT5) $(ENABLE_KDE5)),\
+   $(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_QT5) $(ENABLE_KDE5) 
$(ENABLE_GTK3_KDE5)),\
scp2/kde \
) \
$(if $(filter TRUE,$(ENABLE_ONLINE_UPDATE)),\
diff --git a/scp2/Module_scp2.mk b/scp2/Module_scp2.mk
index 1c3ed8df600f..c414e09045cb 100644
--- a/scp2/Module_scp2.mk
+++ b/scp2/Module_scp2.mk
@@ -39,7 +39,7 @@ $(eval $(call gb_Module_add_targets,scp2,\
$(if $(filter TRUE,$(ENABLE_EVOAB2) $(ENABLE_GIO) $(ENABLE_GTK) 
$(ENABLE_GTK3)),\
InstallModule_gnome \
) \
-   $(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_QT5) $(ENABLE_KDE5)),\
+   $(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_QT5) $(ENABLE_KDE5) 
$(ENABLE_GTK3_KDE5)),\
InstallModule_kde \
) \
 ))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - scp2/InstallScript_setup_osl.mk scp2/Module_scp2.mk

2018-06-13 Thread Michael Weghorn
 scp2/InstallScript_setup_osl.mk |2 +-
 scp2/Module_scp2.mk |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 453ebb206b68d5cc0e88d8c646e704e601fb68b5
Author: Michael Weghorn 
Date:   Tue Jun 5 08:29:21 2018 +0200

Build kde-integration for '--enable-gtk3-kde5' as well

The relevant files ('libvclplug_gtk3_kde5lo.so',
'lo_kde5filepicker') resulting from the '--enable-gtk3-kde5'
build option are put into the kde-integration package
(e.g. a Debian package when the '--with-package-format=deb'
option is given).

However, so far that package was only created at all when
one of the options '--enable-kde4', '--enable-qt5' or
'--enable-kde5' was given in addition.

Since those are not needed for the gtk3_kde5 vclplug, also
build the kde-integration when none of the others is
built in addition.

Change-Id: I86eb71ac7879c7226c9eaa89774b68125212a75c
Reviewed-on: https://gerrit.libreoffice.org/55310
Tested-by: Jenkins 
Reviewed-by: Michael Weghorn 
(cherry picked from commit f971bdb026735fdecd777d0d2edc515124f9e822)
Reviewed-on: https://gerrit.libreoffice.org/55737

diff --git a/scp2/InstallScript_setup_osl.mk b/scp2/InstallScript_setup_osl.mk
index 8ce3e2ecef79..a37a4552c139 100644
--- a/scp2/InstallScript_setup_osl.mk
+++ b/scp2/InstallScript_setup_osl.mk
@@ -35,7 +35,7 @@ $(eval $(call gb_InstallScript_use_modules,setup_osl,\
$(if $(filter TRUE,$(ENABLE_EVOAB2) $(ENABLE_GIO) $(ENABLE_GTK) 
$(ENABLE_GTK3)),\
scp2/gnome \
) \
-   $(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_QT5) $(ENABLE_KDE5)),\
+   $(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_QT5) $(ENABLE_KDE5) 
$(ENABLE_GTK3_KDE5)),\
scp2/kde \
) \
$(if $(filter TRUE,$(ENABLE_ONLINE_UPDATE)),\
diff --git a/scp2/Module_scp2.mk b/scp2/Module_scp2.mk
index 1c3ed8df600f..c414e09045cb 100644
--- a/scp2/Module_scp2.mk
+++ b/scp2/Module_scp2.mk
@@ -39,7 +39,7 @@ $(eval $(call gb_Module_add_targets,scp2,\
$(if $(filter TRUE,$(ENABLE_EVOAB2) $(ENABLE_GIO) $(ENABLE_GTK) 
$(ENABLE_GTK3)),\
InstallModule_gnome \
) \
-   $(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_QT5) $(ENABLE_KDE5)),\
+   $(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_QT5) $(ENABLE_KDE5) 
$(ENABLE_GTK3_KDE5)),\
InstallModule_kde \
) \
 ))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - scp2/InstallScript_setup_osl.mk scp2/Module_scp2.mk

2018-06-13 Thread Michael Weghorn
 scp2/InstallScript_setup_osl.mk |2 +-
 scp2/Module_scp2.mk |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6f28259479d28570dbb7258531bfe264d03da1fc
Author: Michael Weghorn 
Date:   Tue Jun 5 08:29:21 2018 +0200

Build kde-integration for '--enable-gtk3-kde5' as well

The relevant files ('libvclplug_gtk3_kde5lo.so',
'lo_kde5filepicker') resulting from the '--enable-gtk3-kde5'
build option are put into the kde-integration package
(e.g. a Debian package when the '--with-package-format=deb'
option is given).

However, so far that package was only created at all when
one of the options '--enable-kde4', '--enable-qt5' or
'--enable-kde5' was given in addition.

Since those are not needed for the gtk3_kde5 vclplug, also
build the kde-integration when none of the others is
built in addition.

Reviewed-on: https://gerrit.libreoffice.org/55310
Tested-by: Jenkins 
Reviewed-by: Michael Weghorn 
(cherry picked from commit f971bdb026735fdecd777d0d2edc515124f9e822)

Conflicts:
scp2/InstallScript_setup_osl.mk
scp2/Module_scp2.mk

Change-Id: I86eb71ac7879c7226c9eaa89774b68125212a75c
Reviewed-on: https://gerrit.libreoffice.org/55738
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/scp2/InstallScript_setup_osl.mk b/scp2/InstallScript_setup_osl.mk
index ca9f4cfe3c9d..7a6c550763af 100644
--- a/scp2/InstallScript_setup_osl.mk
+++ b/scp2/InstallScript_setup_osl.mk
@@ -36,7 +36,7 @@ $(eval $(call gb_InstallScript_use_modules,setup_osl,\
$(if $(filter TRUE,$(ENABLE_EVOAB2) $(ENABLE_GIO) $(ENABLE_GTK) 
$(ENABLE_GTK3)),\
scp2/gnome \
) \
-   $(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_KDE5)),\
+   $(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_KDE5) $(ENABLE_GTK3_KDE5)),\
scp2/kde \
) \
$(if $(filter TRUE,$(ENABLE_ONLINE_UPDATE)),\
diff --git a/scp2/Module_scp2.mk b/scp2/Module_scp2.mk
index 63204839f2b7..87b45f501a73 100644
--- a/scp2/Module_scp2.mk
+++ b/scp2/Module_scp2.mk
@@ -42,7 +42,7 @@ $(eval $(call gb_Module_add_targets,scp2,\
$(if $(filter TRUE,$(ENABLE_EVOAB2) $(ENABLE_GIO) $(ENABLE_GTK) 
$(ENABLE_GTK3)),\
InstallModule_gnome \
) \
-   $(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_KDE5)),\
+   $(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_KDE5) $(ENABLE_GTK3_KDE5)),\
InstallModule_kde \
) \
$(if $(filter TRUE,$(ENABLE_TDE)),\
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Test::testLineSpacing equality assertion failed

2018-06-18 Thread Michael Weghorn
Hi Paul and Szymon,

I had the same issue in the past on Debian testing.

The cause seems to be that the test is using the "Liberation Sans" font.
By now, there is another version v2 of the Liberation fonts which seems
to behave differently from what v1 did in that test case.

As a workaround, installing the "fonts-liberation" package and
uninstalling "fonts-liberation2" made the test pass for me on Debian
testing.

@Szymon: Do you possibly have a quick idea on what the best way to deal
with this is?
(I'm asking since the test was added by your commit
2bd27176356c1c670fde1a59d3ffafd10ad0e4ee).

Regards,
Michael


On 2018-06-14 08:04, Paul Menzel wrote:
> Dear LibreOffice folks,
> 
> 
> On ppc64le with Ubuntu 18.04 and latest LibreOffice from master one test
> fails.
> 
> ```
> $ uname -m
> ppc64le
> $ git describe --dirty
> libreoffice-6-1-branch-point-989-g23fa8a6ed053
> $ git log --oneline -1
> 23fa8a6ed053 (HEAD -> master) weld SvxCharPositionPage
> $ ./autogen.sh \
>     --with-system-libatomic_ops \
>     --with-system-libpng \
>     --with-boost-system \
>     --with-system-nss \
>     --with-system-postgresql
> […]
> $ make
> […]
> $ make check
> […]
> [SCK] hyphen
> /dev/shm/libreoffice-core/editeng/qa/unit/core-test.cxx:202:(anonymous
> namespace)::Test::testLineSpacing
> equality assertion failed
> - Expected: 122
> - Actual  : 108
> 
> (anonymous namespace)::Test::testLineSpacing finished in: 214ms
> (anonymous namespace)::Test::testConstruction finished in: 1ms
> (anonymous namespace)::Test::testUnoTextFields finished in: 1ms
> text is 201d
> (anonymous namespace)::Test::testAutocorrect finished in: 5ms
> (anonymous namespace)::Test::testHyperlinkCopyPaste finished in: 20ms
> (anonymous namespace)::Test::testCopyPaste finished in: 9ms
> (anonymous namespace)::Test::testMultiParaSelCopyPaste finished in: 9ms
> (anonymous namespace)::Test::testTabsCopyPaste finished in: 12ms
> (anonymous namespace)::Test::testHyperlinkSearch finished in: 6ms
> (anonymous namespace)::Test::testBoldItalicCopyPaste finished in: 17ms
> (anonymous namespace)::Test::testUnderlineCopyPaste finished in: 11ms
> (anonymous namespace)::Test::testMultiParaCopyPaste finished in: 10ms
> (anonymous namespace)::Test::testParaBoldItalicCopyPaste finished in: 12ms
> (anonymous namespace)::Test::testParaStartCopyPaste finished in: 8ms
> (anonymous namespace)::Test::testSectionAttributes finished in: 1ms
> (anonymous namespace)::Test::testLargeParaCopyPaste finished in: 11ms
> (anonymous namespace)::Test::testTransliterate finished in: 1ms
> (anonymous namespace)::Test::testHoriAlignIgnoreTrailingWhitespace
> finished in: 0ms
> core-test.cxx:202:Assertion
> Test name: (anonymous namespace)::Test::testLineSpacing
> equality assertion failed
> - Expected: 122
> - Actual  : 108
> 
> Failures !!!
> Run: 18   Failure total: 1   Failures: 1   Errors: 0
> […]
> ```
> 
> 
> Kind regards,
> 
> Paul
> 
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Save Libreoffice Writer

2018-09-29 Thread Michael Weghorn
On 26/09/2018 00.58, Jacinto José Franco wrote:
> Keep  CTRL+S pressend and Libreoffice crash.

Is this the same bug as described in
https://bugs.documentfoundation.org/show_bug.cgi?id=119802 ?
If so, it should already be fixed and the fix will be available with
LibreOffice 6.1.2.

Otherwise, it would be great if you could open a new bug report in
LibreOffice's issue tracker and mention what version of LibreOffice
you're using.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


gtk3 include handling - Improving IDE support

2018-12-16 Thread Michael Weghorn
Hi,

one issue with the existing Qt Creator integration for LibreOffice,
provided by the 'qtcreator-ide-integration' make target, is that gtk3
includes cannot be found in Qt Creator (leading to incorrect
code-completion, error detection, ...).

As far as I understand, the following is basically what happens (with
steps 1 and 2 being part of the "normal" build process, steps 3 and 4
specific to building the IDE integration):

1) 'configure.ac': the gtk3-related compiler flags are determined using
'PKG_CHECK_MODULES' and exported as 'GTK3_CFLAGS'.

2) 'vcl/Library_vclplug_gtk3.mk': 'gb_Library_add_cxxflags' is called to
set the flags, using the 'GTK3_CFLAGS' variable set in step 1

3) 'gbuildtojson' writes the JSON file
'workdir/GbuildToJson/Library/libvclplug_gtk3lo.so', based on the
information set among others in step 2

4) 'bin/gbuild-to-ide' reads that JSON file and generates IDE-specific
config files (e.g. '.pro' files in the case of Qt Creator)


Looking at the JSON file generated in step 3, one can see that the
'-isystem' compiler flags end up in the 'CXXFLAGS' section, while only
the 'INCLUDE' section is taken into account for includes when generating
the '.pro' file for Qt Creator in step 4, thus eventually causing the
problem that included files are not found by Qt Creator.


2 potential approaches to improve this came to my mind:


1) make sure the include-related compiler flags actually end up in the
'INCLUDE' section in the generated JSON file

As far as I can see, 'gb_Library_set_include' is the way to set the
'-I'/'-isystem' compiler flags in gbuild, and that approach is used for
pretty much all other libraries.
https://gerrit.libreoffice.org/#/c/65207 demonstrates this approach.


2) adapt gbuild-to-ide to detect include-related compiler flags even if
set via 'gb_Library_add_cxxflags'

https://gerrit.libreoffice.org/#/c/65206 demonstrates a way to do this
for Qt Creator.


To me, approach 1 seems cleaner, but since I'm far from being a gbuild
expert, I'm unable to assess all the implications and would be very
thankful for any opinions on this, either here or in the corresponding
gerrit changes.

Regards,
Michael


PS: Another approach might be to have the IDE use *all* compiler flags,
but at least for qtcreator, that would at least require splitting up the
project into more '.pro' files (one per library/executable, if not even
further). Currently, one '.pro' file is generated per top-level directory.

PPS: While I just encountered this for 'vclplug_gtk3' so far, the same
might be the case for other targets.



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: new contributor

2018-12-16 Thread Michael Weghorn
Hi,

welcome and thanks for your interest in contributing to LibreOffice!

> where i can see the beginner level bugs to get hold of libreoffice environment

Those are called "Easy Hacks". The wiki page
https://wiki.documentfoundation.org/Development/EasyHacks contains more
information on those (and links at the end that will get you to a list
of existing Easy Hacks).

On 15/12/2018 15.43, jayaraj s wrote:
> I am interested in contributing to libreoffice.
> 
> As i read in get involved page
> 
> I am accepting that all of my past&future contribution to
> Libreoffice may be licensed under the MPLv2/LGPLv3+ dual license.
> 
> where i can see the beginner level bugs to get hold of libreoffice
> environment
> 
> 
> 
> 
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
> 



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: gtk3 include handling - Improving IDE support

2018-12-17 Thread Michael Weghorn
On 17/12/2018 09.14, Stephan Bergmann wrote:

> Indeed, for better or worse, e.g. all the *_CFLAGS in
> RepositoryExternal.mk are passed into gb_LinkTarget_set_include, not
> gb_LinkTarget_set_cxxflags.  Feel free to go with this approach, I'd say
> in vcl/Library_vclplug_gtk3.mk, I'd say.

Thanks for the quick reply! I'll go with the updated
https://gerrit.libreoffice.org/#/c/65207 then.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: minutes of ESC call ...

2019-05-23 Thread Michael Weghorn
On 23/05/2019 17.19, Jan-Marek Glogowski wrote:
> IMHO that leaves us with:
> 1. don't allow to load the qt5 plugin in 6.2 at all
> 2. switch qt5 to cairo in 6.2 only
> 3. cope with the eventual bug fallout, when 6.2 becomes still (which I think
> won't be large, but who knows)
> 
> Honestly I would go with 3. Eventually even 2.

Sounds reasonable to me (both, 3. and 2.).
> P.S. and if kde5 doesn't make it into still, qt5 will be gone too.

That depends. My understanding of the discussion so far (s.a.
tdf#124044) was that kde5 wouldn't be the default (on Plasma/LXQt) if
not considered "ready" in time for 6.2.5. This could e.g. easily be
achieved by reverting commit f2bf002e90bf5cc74cf190d66507e59b78ba73e9
("Add autodetection for KDE5 VCL Plugin").
In this case, people manually setting "SAL_USE_VCLPLUGIN" would still be
able to choose qt5 or kde5, but IMHO people doing so should know what
they're doing... (matching case 3 from above).
I don't have strong opinion on that, though.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: minutes of ESC call ...

2019-05-30 Thread Michael Weghorn
Hi everyone,

a quick follow-up:

> * Pending Action Items:
> + run the certification script (Kendy)
> + make Qt5 backend experimental (Jmux)

Just talked to jmux on IRC. Since making qt5 experimental doesn't work
easily (s. Jan-Marek's email [1]), the suggestion is to just keep it as
is, i.e. qt5 is never used by default, but people can select it by
setting the SAL_USE_VCLPLUGIN=qt5 environment  variable (and set
SAL_VCL_QT5_USE_CAIRO in addition to get Cairo rendering).

This is the third option from the 3 Jan-Marek suggested:
> IMHO that leaves us with:
> 1. don't allow to load the qt5 plugin in 6.2 at all
> 2. switch qt5 to cairo in 6.2 only
> 3. cope with the eventual bug fallout, when 6.2 becomes still (which I think
> won't be large, but who knows)


[1] https://lists.freedesktop.org/archives/libreoffice/2019-May/082835.html



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Using Amazon Corretto as Oracle JDK replacement for building LibreOffice on Windows

2019-05-30 Thread Michael Weghorn
Hi,

On 30/05/2019 14.46, Kaganski Mike wrote:
> Since Oracle JDK versions prior to 12 are now unavailable from the 
> official site [1] for unregistered users (and version 12 is said to 
> still have problems/needs workarounds [2]), I decided to give Amazon 
> Corretto [3] a try.

As a side note, AdoptOpenJDK [1] also worked fine for a master build
when I tried recently (that was on a 64bit Windows).

[1] https://adoptopenjdk.net/



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Jenkins_Callgrind broken after: Drop extra define ENABLE_GTKSINK

2019-06-06 Thread Michael Weghorn
Hi Luke,

this happens when both gtk3 and gstreamer-0.10 are enabled for the build.

When this popped up, some people asked the question whether gstreamer
0.10 is still relevant after all (in which case this needs to be fixed,
which should be quite straight-forward), or gstreamer-0.10 can be
dropped completely (which also will make the problem go away), s.a.
comment in the Gerrit change [1].

This will be discussed in the ESC call to start in a few minutes and
fixed then.

Michael

[1] https://gerrit.libreoffice.org/#/c/73270/

On 06/06/2019 15.43, Luke Benes wrote:
> Michael,
> 
> https://cgit.freedesktop.org/libreoffice/core/commit/?id=34bbf192a7753205bb64d14e4eec4ce303317396
> 
> broke Jenkins_Callgrind 
> https://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER&brief-log=1559555453.4509
> 
> https://ci.libreoffice.org/computer/vm139/builds
> 
> with this error:
> avmedia/source/gstreamer/gstplayer.hxx:33:14: fatal error: gtk/gtk.h: No such 
> file or directory
> 
> 
> Does Jenkins_Callgrind need to be upgraded?
> 
> -Luke
> 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Jenkins_Callgrind broken after: Drop extra define ENABLE_GTKSINK

2019-06-06 Thread Michael Weghorn
On 06/06/2019 15.58, Michael Weghorn wrote:
> This will be discussed in the ESC call to start in a few minutes and
> fixed then.

Since ESC decision is to drop gstreamer-0.10,
https://gerrit.libreoffice.org/#/c/73608/
("distro-config: Drop '--enable-gstreamer-0-10' everywhere") should
quickly fix the build issue for all affected Jenkins jobs and I'll
remove the gstreamer-0.10 code after all in a subsequent step.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: [Libreoffice-commits] core.git: avmedia/Library_avmediagst.mk avmedia/source vcl/qt5

2019-06-17 Thread Michael Weghorn
On 10/06/2019 14.19, Jan-Marek Glogowski wrote:
> The only halfway sane way I could come up with would be to move an abstract
> interface of the gstreamer sink loading into VCL, and just use symbol lookup 
> in
> there, so no gstreamer linkage for VCL. avmedia already depends on VCL. I 
> don't
> think we support any other avmedia backend then gstreamer on Linux, so that
> should be fine. At the point of avmedia usage, all required libraries are
> already loaded by the VCL plugin and avmedia.
> 
> The whole backend depending code just uses one gstreamer symbol:
> gst_element_factory_make.

For the record, Jan-Marek has implemented this in commit [1] ("Don't
link avmediagst with gtk3 and qt5").

Regards,
  Michael


[1]
https://gerrit.libreoffice.org/plugins/gitiles/core/+/a6201725d760cbce832d4de029b418bb7334df6a%5E!
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Fwd: Suggestion

2019-06-24 Thread Michael Weghorn
Hi,

Heiko wrote an answer to your email in May already, but it went to the
mailing list only, so in case you weren't subscribed, you probably just
didn't get it.

You can also read it here:
https://lists.freedesktop.org/archives/libreoffice/2019-May/082756.html

Michael

On 24/06/2019 03.20, Ricardo Ruff wrote:
> dear Sirs,
> 
> Awaiting your comments
> 
> Regards,
> 
> Ricardo Ruff F.
> 
>> Inicio del mensaje reenviado:
>>
>> *De: *Ricardo Ruff mailto:rr...@zayex.cl>>
>> *Asunto: **Suggestion*
>> *Fecha: *14 de mayo de 2019, 16:00:25 CLT
>> *Para: *libreoffice@lists.freedesktop.org
>> 
>>
>> Dear Sirs,
>>
>> I am a user of Libre Office since searching in the Web a software of
>> open source that not depend of the big Companies that manage the world
>> with their closed source softwares. I congratulate you in keeping
>> Libre Office adding constant improvements.  
>>
>> As I am a user of MAC computers for many years, I am writing you only
>> to suggest if you can study the possibility of change something in
>> your Spreadsheet. I would like use the Libre Office spreadsheet, but I
>> use normally a spreadsheet of MAC whose name is Numbers. This
>> spreadsheet has the advantage of other spreadsheets because you can
>> open a file which have a lot of sheets with their own names, and each
>> of them with many tables, each one with also its proper name. 
>>
>> In the normal spreadsheets of Excel and all of others you can not have
>> this advantage, that helps a lot to work. If you want I can send you a
>> file and you can study this possibility.
>>
>> Await your comments.
>>
>> Regards,
>>
>> Ricardo Ruff F.
>> Phone: 56 2 2243 2093
>> Cel: 9 4042 2153
> 
> 
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
> 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: We'd like to continue the production of the 32-bit deb packages

2019-08-13 Thread Michael Weghorn
On 14/08/2019 03.44, escuelaslinux wrote:
> Well, today I tried by using Debian 10 (Maybe it would work by going to the
> source, right?)
> 
> Wrong. It was an awful experience.
> 
> After seven hours in which the fans were at max, I didn't realize that the
> make process hanged. No warning, no memory overflow messages (This VM has 6
> GB of RAM assigned, BTW).
> 
> [...]

I built LibreOffice from git tag 'libreoffice-6.3.0.3' in an i386 Debian
buster (Debian 10) (s)chroot (host is Debian testing amd64) and that
went fine with the following autogen.input (i.e. the one you pasted
previously except for the '--with-external-tar' flag):

$ cat autogen.input
--without-system-postgresql
--without-junit
--without-java
--without-help
--without-doxygen
--disable-odk
--disable-gstreamer-1-0
--disable-gstreamer-0-10
--disable-firebird-sdbc
--with-lang=es en-US
--with-myspell-dicts
--enable-debug
#--with-external-tar=/home/linux/libreoffice/libreoffice/core/external/tarballs
--without-krb5
--without-gssapi
CC=gcc -mfpmath=sse -msse2
CXX=g++ -mfpmath=sse -msse2


[Some of the 'sal' unit tests failed, so I commented those out and then
the build including unit tests went fine. The unit test failures I got
look like they were caused solely by the (s)chroot setup, and could
probably be fixed by configuring the chroot properly; output:

#Initializing ...
#
#logonUser function need root/Administrator account to test.
#You can test by login with root/Administrator, and execute:
#testshl2 -forward "username password"
../../../wntmsci9/bin/Security.dll
#  where username and password are forwarded account info.
#if no text forwarded, this function will be skipped.
warn:vcl.app:30539:30539:sal/cppunittester/cppunittester.cxx:470:
Fatal exception: assertion failed
- Expression: ( pw = getpwuid( getuid() ) ) != nullptr
- getpwuid: no password entry



Error: a unit test failed, please do one of:

make CppunitTest_sal_osl_security CPPUNITTRACE="gdb --args"
# for interactive debugging on Linux
make CppunitTest_sal_osl_security VALGRIND=memcheck
# for memory checking
make CppunitTest_sal_osl_security DEBUGCPPUNIT=TRUE
# for exception catching

You can limit the execution to just one particular test by:

make CPPUNIT_TEST_NAME="testXYZ" ...above mentioned params...
]
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: We'd like to continue the production of the 32-bit deb packages

2019-08-14 Thread Michael Weghorn
On 14/08/2019 15.34, dreamn...@gmail.com wrote:
> Would be possible to re-create your build with the following
> autogen.input, and let me know if it worked for you?
> 
> --disable-gstreamer-0-10
> --with-lang=es
> --with-myspell-dicts
> --with-distro=LibreOfficeLinux
> --enable-release-build
> --with-package-format=deb
> --disable-dependency-tracking
> --with-jdk-home=/your/path/to/your/jdk

I just ran 'make distclean', then updated autogen.input and started a
new build and will let you know of the result.

I put '--with-distro=LibreOfficeLinux' first, otherwise the
'--disable-gstreamer-0-10' flag is overriden by
'--enable-gstreamer-0-10' set in distro-configs/LibreOfficeLinux.conf,
so this is the content of the autogen.input I'm using:

--with-distro=LibreOfficeLinux
--disable-gstreamer-0-10
--with-lang=es
--with-myspell-dicts
--enable-release-build
--with-package-format=deb
--disable-dependency-tracking
--with-jdk-home=/usr/lib/jvm/java-11-openjdk-i386/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: We'd like to continue the production of the 32-bit deb packages

2019-08-14 Thread Michael Weghorn
On 14/08/2019 16.18, Michael Weghorn wrote:
> I just ran 'make distclean', then updated autogen.input and started a
> new build and will let you know of the result.
> 
> I put '--with-distro=LibreOfficeLinux' first, otherwise the
> '--disable-gstreamer-0-10' flag is overriden by
> '--enable-gstreamer-0-10' set in distro-configs/LibreOfficeLinux.conf,
> so this is the content of the autogen.input I'm using:
> 
> --with-distro=LibreOfficeLinux
> --disable-gstreamer-0-10
> --with-lang=es
> --with-myspell-dicts
> --enable-release-build
> --with-package-format=deb
> --disable-dependency-tracking
> --with-jdk-home=/usr/lib/jvm/java-11-openjdk-i386/

That build succeeded as well in my buster chroot.


(with sal unit tests temporarily disabled due to issues with current
chroot setup as described earlier:

$ git diff
diff --git a/sal/Module_sal.mk b/sal/Module_sal.mk
index 4d7a84ee4e61..129d703a81fd 100644
--- a/sal/Module_sal.mk
+++ b/sal/Module_sal.mk
@@ -23,15 +23,6 @@ $(eval $(call gb_Module_add_targets,sal,\
Executable_osl_process_child \
 ))

-$(eval $(call gb_Module_add_check_targets,sal,\
-   $(if $(filter
TRUE,$(DISABLE_DYNLOADING)),,CppunitTest_Module_DLL) \
-   $(if $(filter WNT,$(OS)),CppunitTest_sal_comtools) \
-   CppunitTest_sal_osl_security \
-   CppunitTest_sal_osl \
-   CppunitTest_sal_rtl \
-   CppunitTest_sal_types \
-))
-
 endif

 # vim: set noet sw=4 ts=4:
)
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: We'd like to continue the production of the 32-bit deb packages

2019-08-14 Thread Michael Weghorn
On 14/08/2019 19.21, dreamn...@gmail.com wrote:
> Would be possible to download your generated deb files from some
> file-sharing service?

If necessary, I'll probably find a way to upload them somewhere next
week. (I'll be away for the next days.) However, that won't help in the
long run, so I'll think it'd be better if you can get your build setup
working.

> 
> I'm still struggling with compilation issues.
> 1) After the bad experience with Debian 10, I downloaded Debian 9.9 in
> the hope that would make a better compilation choice, but, alas, Debian
> 9 includes a version of gcc already unsupported by LibreOffice, it
> requires at least gcc 7. As far as I could found, upgrading gcc on
> Debian 9 is an ugly chore, so I went back to installing Debian 10...
> 2) But, this time, instead of choosing LXQT, I chose LXDE and used
> LXTerminal. Now it compiled until the make error without a single hang.
> I don't know if LXQT of tis default terminal were the culprits of the
> frequent crashes, or something else, but at least I reached the make
> error on Debian 10.
> 
> I paste the error produced in Debian 10. It seems to be still cpunittest
> related.
> 
> Would be wise to apply your diff here, or it is not related since I'm
> not running a chroot environment but a VM?

The diff wouldn't help, since the tests that fail for you are unrelated
to the ones I temporarily disabled.

Maybe you want to try setting up an i386 chroot on an amd64 host as
well? That might work better than using a i386 virtual machine (e.g.
with regard to memory limitations) and I guess this should also work
just fine on a host running Escuelas Linux.

The steps I took to set up the chroot for use with schroot were roughly:

Create chroot:

sudo debootstrap --arch=i386 buster /some/path/to/chroot/buster-i386

Create entry in /etc/schroot/schroot.conf:

[buster-i386]
description=Debian buster (stable) 32-bit
directory=/some/path/to/chroot/buster-i386
users=
root-users=
personality=linux32

After that, you can change into the chroot using

schroot -c buster-i386

or (to work as root):

schroot -c buster-i386 -u root

and then set up the build dependencies, clone LibreOffice and build from
there as usual.



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: We'd like to continue the production of the 32-bit deb packages

2019-08-19 Thread Michael Weghorn
On 15/08/2019 12.45, dreamn...@gmail.com wrote:
> Well, I think I figured out the correct deletion of lines at
> sal/Module_sal.mk file, since I got no errors related to sal after
> making those changes.

OK; once the other issues are dealt with, the schroot setup should
probably be updated to make disabling those tests unnecessary, but let's
do that in a follow-up step...

Regarding your test failure

> ScFiltersTest::testSheetNamesXLSX finished in: 47ms
> Exception in thread "main" java.lang.NullPointerException
> at
> org.odftoolkit.odfvalidator.ODFValidator.getValidatorForSchema(ODFValidator.java:286)
> at
> org.odftoolkit.odfvalidator.ODFValidator.getManifestValidator(ODFValidator.java:186)
> at
> org.odftoolkit.odfvalidator.ODFRootPackageValidator.validateManifest(ODFRootPackageValidator.java:170)
> at
> org.odftoolkit.odfvalidator.ODFRootPackageValidator.validatePre(ODFRootPackageValidator.java:93)
> at
> org.odftoolkit.odfvalidator.ODFPackageValidator._validate(ODFPackageValidator.java:111)
> at
> org.odftoolkit.odfvalidator.ODFPackageValidator.validate(ODFPackageValidator.java:81)
> at
> org.odftoolkit.odfvalidator.ODFValidator.validateFile(ODFValidator.java:163)
> at org.odftoolkit.odfvalidator.ODFValidator.validate(ODFValidator.java:125)
> at org.odftoolkit.odfvalidator.Main.main(Main.java:314)
> expected height 6001 actual 5999
> expected width 2001 actual 2001
> expected left 6000 actual 5976
> expected right -2000 actual -1998
> expected startrow 0 actual 0
> expected startcol 5 actual 5
> expected endrow 3 actual 3
> expected endcol 7 actual 7
> /home/linux/libreoffice-6.3.0.4/test/source/bootstrapfixture.cxx:199:ScFiltersTest::testLegacyCellAnchoredRotatedShape
> equality assertion failed
> - Expected: 0
> - Actual  : 256
> - failed to execute: sh
> /home/linux/libreoffice-6.3.0.4/bin/odfvalidator.sh -M
> /home/linux/libreoffice-6.3.0.4/schema/libreoffice/OpenDocument-manifest-schema-v1.3+libreoffice.rng
> -D
> /home/linux/libreoffice-6.3.0.4/schema/libreoffice/OpenDocument-dsig-schema-v1.3+libreoffice.rng
> -O
> /home/linux/libreoffice-6.3.0.4/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng
> -m /home/linux/libreoffice-6.3.0.4/schema/mathml2/mathml2.xsd
> /tmp/lu5683d1zw.tmp > /tmp/lu5683d201.tmp

please see the mail thread starting at [1] which seems to be about the
same issue that is specific to building from the tarballs and which was
fixed recently by commit c78dd0a726b32d922a0d75a26a51d4c30612368c
("configure: don't enable export validation if there are no schemas") [2].


[1]
https://lists.freedesktop.org/archives/libreoffice/2019-August/083288.html
[2] https://gerrit.libreoffice.org/#/c/77383/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: We'd like to continue the production of the 32-bit deb packages

2019-08-19 Thread Michael Weghorn

On 16/08/2019 20.43, dreamn...@gmail.com wrote:
> Finally sort of solved.

Good to hear.

> 
> We were not able to get ‘make’ without cppunit errors. Tried numerous
> times on VMs with Escuelas Linux and Bodhi Linux (both based on Ubuntu
> 18.04) and on Debian 10 (on a VM and on a schroot environment).
> 

Depending on what the exact unit test failures are, the previous email
might or might not help. (I somehow missed this email at first when I
replied to the other one...)



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Reverting patch

2019-08-21 Thread Michael Weghorn
Hi Regina,

On 21/08/2019 21.44, Regina Henschel wrote:
> it is about https://gerrit.libreoffice.org/#/c/77882/
> That reverts a patch, that I had made 9 months ago, because it had
> introduced a regression, see bug 126271. I have submitted the revert to
> master.
> 
> Unfortunately, this regression is in LibreOffice 6.3 too.
> 
> Of cause I have tested locally with my clone from master, that reverting
> the patch solves the regression. How can I test, that it solves the
> problem for 6.3 too?
> 
> The "cherry pick" button in Gerrit provides "LibreOffice 6-3",
> "LibreOffice 6-3-0" and "LibreOffice 6-3-1". Which item would be the
> correct one? Will that produce a new patch in Gerrit with the correct
> target automatically? Or what are the next steps for me?

'libreoffice-6-3' is the branch to use next and once that patch is
merged, it will be available for LibreOffice 6.3.2. If it's a critical
fix that should make it to 6.3.1 as well, the patch should then be
cherry-picked to 'libreoffice-6-3-1' in addition.
[1] contains some information on the different branches that are used
for development.

For the particular patch you mention, it seems Xisco has already done
the cherry-pick for 6.2 and 6.3, s. [2] and [3].

If you want to explicitly test this actually works as expected, you can
build the respective branch with the patch on top, which you can
checkout e.g. using the command shown when you click on the "Download"
button in the gerrit patch (the one shown for "Checkout").

Kind regards,
Michael

[1] https://wiki.documentfoundation.org/Development/Branches
[2] https://gerrit.libreoffice.org/#/c/77939/1
[3] https://gerrit.libreoffice.org/#/c/77940/1
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Reverting patch

2019-08-22 Thread Michael Weghorn
Hi Regina,

On 22/08/2019 13.12, Regina Henschel wrote:
> Hi Michael,
> 
> I need help with some basics.
> 
> Michael Weghorn schrieb am 22-Aug-19 um 08:41:
> 
>> If you want to explicitly test this actually works as expected, you can
>> build the respective branch
> 
> How to "build the respective branch" ?

After you have checked out the gerrit patch, you can build it the same
way as you build master, i.e. run './autogen.sh' and then 'make'.

The checkout will be the branch that the gerrit patch has been
cherry-picked to, e.g. the libreoffice-6-3 branch for [1] + your patch
on top, so you can test whether this works as expected for LibreOffice 6.3.

> 
>  with the patch on top, which you can
>> checkout e.g. using the command shown when you click on the "Download"
>> button in the gerrit patch (the one shown for "Checkout").
> 
> That part is clear. I have done such already for master, to test patches
> from other developers.
> 
> Kind regards
> Regina

Kind regards,
Michael

[1] https://gerrit.libreoffice.org/#/c/77939/1
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Review for "improve import/export of line styles"

2019-09-01 Thread Michael Weghorn
Hi Regina,

On 01/09/2019 19.44, Regina Henschel wrote:
> please have a look at https://gerrit.libreoffice.org/#/c/78372/
> 
> An important question is whether you agree that I have changed the
> import and export of our own line styles so that no prstDash line styles
> are used for them. Instead I export them as custDash elements and
> reconstruct them in the import.
> 
> I have not added tests yet. Please tell me, what you think would be good
> to test.
> 
> You know I always have a hard time with C++. So I welcome hints on how
> to implement something better.

I can't really say anything about your questions regarding line styles...

> 
> And technical question: What do I need to do locally in Git, so that the
> information, that the no longer needed file "lo_preset_dashes.odt" has
> to be deleted, is included in my commit?

You can use 'git rm /lo_preset_dashes.odt' to mark that file
for deletion.

Kind regards,
Michael
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: We'd like to continue the production of the 32-bit deb packages

2019-07-31 Thread Michael Weghorn
Hi!

I'm not sure on how to get the exact same build result as the official
LibreOffice deb packages, but in general, building LibreOffice and
creating the packages requires these steps:

1) install build dependencies

2)
./autogen.sh 
3)
make


I suppose using the following command in step 1 should give a result
pretty close to the official TDF builds:

./autogen.sh --with-distro=LibreOfficeLinux --enable-release-build
--with-package-format=deb --with-lang=ALL --disable-dependency-tracking

In particular, '--with-package-format=deb' will enable building the deb
packages.
(You can also create a file 'autogen.input' and put the options there
and then just call './autogen.sh' instead of explicitly passing the
options to autogen.sh every time.)

Some general instructions on building LibreOffice can also be found in
the wiki [1] and there's also a page on release builds [2], though I
can't say how up to date that one is (e.g. the info on build host being
CentOS 5 is a bit outdated).

I haven't built Libreoffice from the tar files so far (and can't test at
the moment), but you'll probably have to extract the
'libreoffice-dictionaries-?.?.?.?.tar.xz',
'libreoffice-help-?.?.?.?.tar.xz' and
'libreoffice-translations-?.?.?.?.tar.xz' into the extracted
'libreoffice-?.?.?.?.tar.xz'.
(Alternatively, you can build from git, where those are handled as git
submodules. LibreOffice release versions can be recognized by their git
tags.)

If there are any further questions, please just ask on this mailing list
or on IRC in channel #libreoffice-dev.

Best regards,
Michael

[1] https://wiki.documentfoundation.org/Development
[2] https://wiki.documentfoundation.org/Development/ReleaseBuilds

On 26/07/2019 17.01, dreamn...@gmail.com wrote:
> Hi! Greetings from the Escuelas Linux team. We are small Linux
> distribution that can be downloaded from
> https://sourceforge.net/projects/escuelaslinux/.
> Some more references about our activity can be found by doing an
> Internet search, or on own Facebook account, escuelas.linux
> 
> We still provide a 32-bit edition of our distro, because among our users
> there are a lot of low-income public schools, in which are still in use
> old computers with about 512 MB to a 1 GB of RAM. That amount of RAM
> would make running a Linux 64-bit system awfully slow, so we have to
> accommodate to the needs and possibilities of what is available in poor
> areas, those in which even having an old computer is still somehow a luxury.
> 
> We perfectly understand that TDF releasing 32-bit Linux LibreOffice
> packages was not worth anymore, given the small amount of downloads.
> Certainly some of those downloads were made by us, as we only required
> one download of a given LibreOffice version to have it installed in our
> distro and be used in hundreds of computers. A lot of those computers
> could not even be traceable, since there are no Internet connection in
> poor or remote schools. But we believe that even if we reported who and
> where are those schools, that would be still a small amount to be worth
> the effort and resources required to match the bigger amounts of
> downloads that seems to be receiving the LibreOffice 32-bit Windows
> counterpart.
> 
> Given that TDF ended the provision of Linux 32-bit distribution neutral
> binaries, but not the 32-bit compatibility, we would like to step up to
> produce by ourselves the 32-bit distribution neutral deb packages from
> LibreOffice 6.3 and up. We are not aware of other distros or volunteers
> releasing the most recent LibreOffice version to date (6.3) as 32-bit
> distribution independent binaries.
> 
> Recently, the official LibreOffice Blog published instructions about how
> to compile LibreOffice on Linux. However, we’d like to be able not only
> to compile LibreOffice, but we would like to learn how to be able to
> produce by ourselves the same set of 32-bit distribution-independent deb
> packages that were compressed as a .tar.gz, that is, the LibreOffice
> binaries (LibreOffice_?.?.?_Linux_x86-_deb.tar.gz), the translated user
> interface (the LibreOffice_?.?.?_Linux_x86-_deb_langpack_??.tar.gz) and
> the offline help (LibreOffice_?.?.?_Linux_x86-_deb_helppack_??.tar.gz).
> As for the user interface and the offline packages, our main focus would
> be Spanish language.
> 
> On the download section is always available the following source code
> packages:
> libreoffice-?.?.?.?.tar.xz
> libreoffice-dictionaries-?.?.?.?.tar.xz
> libreoffice-help-?.?.?.?.tar.xz
> libreoffice-translations-?.?.?.?.tar.xz
> 
> But, given our inexperience, we don’t know how to use this source
> packages to produce the same set of 32-bit deb packages as were
> previously provided by TDF. Since LibreOffice is distributed in a lot of
> languages, we guess that the user interface and offline packages are not
> created manually one by one by hand, some useful scripts could have been
> created to automate as far as possible those tasks.
> 
> So, we respectfully as

Re: LO 6.2.6.1 pre-release

2019-07-31 Thread Michael Weghorn
Hi Dan,

On 31/07/2019 19.20, Dan Lewis wrote:
>    I have recently downloaded the x86_64 version (DEB) of the
> pre-release. After installing it, I have tried to open it. It fails to
> open. I use Ubuntu 18.04 which has icons on the left side of the screen.
> Clicking this produced the screen shot for a while before it
> disappeared. Opening it in a terminal:
> /opt/libreoffice6.2/program/sbase. I got the same results. When I
> replaced sbase with swriter, I still got the same result. Any others
> notice this problem? This looks like a show stopper to me.

please create a bug report for this in Bugzilla [1] and also include any
output you get when trying to start LibreOffice in a terminal.

Best regards,
Michael

[1] https://bugs.documentfoundation.org/



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: We'd like to continue the production of the 32-bit deb packages

2019-08-07 Thread Michael Weghorn
Is there more output for the failing unit test that indicates what might
be going wrong? You can e.g. also paste larger output at
http://paste.debian.net/ or some similar service.

As a workaround, you can also try building LibreOffice without running
the unit tests for now, by using 'make build-nocheck' instead of the
plain 'make' command.

On 07/08/2019 00.12, dreamn...@gmail.com wrote:
> Well, I did a third compile try, but it failed again.
> 
> This time first I did a clean up:
> 
> ---
> make clean
> --
> 
> Then I did a ./configure, passing CFLAGS and CFLAGSXX as:
> 
> ---
> ./configure CFLAGS='-mfpmath=sse -msse2' CFLAGSCXX='-mfpmath=sse -msse2'
> --with-jdk-home=/usr/lib/jvm/default-java
> ---
> 
> ./configure is in fact reading those flags, as can be seen on the
> relevant part of its output:
> 
> ---
> checking whether to use link-time optimization... no
> checking for explicit AFLAGS... no
> checking for explicit CFLAGS... -mfpmath=sse -msse2
> checking for explicit CXXFLAGS... -mfpmath=sse -msse2
> checking for explicit OBJCFLAGS... no
> checking for explicit OBJCXXFLAGS... no
> checking for explicit LDFLAGS... no
> -
> 
> Then I did a make, again passing the CFLAGS(XX) as parameters:
> 
> 
> make CLAGS='-mfpmath=sse -msse2' CFLAGSCXX='-mfpmath=sse -msse2'
> 
> 
> But it failed again at the CpuunitTest stuff, although the error message
> is a bit different from the previous ones:
> 
> -
> Failures !!!
> Run: 52   Failure total: 1   Failures: 1   Errors: 0
> 
> Error: a unit test failed, please do one of:
> 
> make CppunitTest_sw_layoutwriter CPPUNITTRACE="gdb --args"
>     # for interactive debugging on Linux
> make CppunitTest_sw_layoutwriter VALGRIND=memcheck
>     # for memory checking
> make CppunitTest_sw_layoutwriter DEBUGCPPUNIT=TRUE
>     # for exception catching
> 
> You can limit the execution to just one particular test by:
> 
> make CPPUNIT_TEST_NAME="testXYZ" ...above mentioned params...
> 
> /home/linux/libreoffice/libreoffice/solenv/gbuild/CppunitTest.mk:113:
> recipe for target
> '/home/linux/libreoffice/libreoffice/workdir/CppunitTest/sw_layoutwriter.test'
> failed
> make[1]: ***
> [/home/linux/libreoffice/libreoffice/workdir/CppunitTest/sw_layoutwriter.test]
> Error 1
> make[1]: *** Waiting for unfinished jobs
> Makefile:282: recipe for target 'build' failed
> make: *** [build] Error 2
> -
> 
> So... what else could be done to reach the goal of building LIbreOffice
> 32-bit?
> 
> Thanks again in advance.
> 
> El lun., 5 ago. 2019 a las 16:40, dreamn...@gmail.com
> <mailto:dreamn...@gmail.com> ( <mailto:dreamn...@gmail.com>>) escribió:
> 
> 
> Well, based on the info that Stephan kindly passed, I tried 'make'
> with the following parameters:
> 
> make ENVCFLAGS="-mfpmath=sse -msse2" ENVCFLAGSCXX="-mfpmath=sse -msse2"
> 
> However, it threw the same error as before.
> 
> I intentionally did not type 'make clean' beforehand because:
> 
> 1) I'm assumming that those additional flags would be applied in the
> code that fails to compile. I *think* that if it didn't not work
> again, that would mean that the issue is something else?
> 2) I'm willing to do a 'make clean' if my above assumption is
> incorrect, even if that means another 7 hours of hard work for my
> poor computer. However, as I stated before, for this scenario I'm
> following the instructions from
> 
> 
> https://blog.documentfoundation.org/blog/2019/06/12/start-developing-libreoffice-download-the-source-code-and-build-on-linux/
> 
> But I have no idea which version of LibreOffice I'm compiling. To be
> worth all the extra efforts that a 'make clean' represents, I'd like
> to be sure that I'm trying to compile LibreOffice 6.3.
> 
> Is there a way to prove or instruct that LibreOffice 6.3 is the
> selected one to compile?
> 
> Best Regards and Thanks in advance.
> 
> El lun., 5 ago. 2019 a las 9:53, dreamn...@gmail.com
> <mailto:dreamn...@gmail.com> ( <mailto:dreamn...@gmail.com>>) escribió:
> 
> Well, my first compile attempts had not been very good.
> 
> I followed the instructions kindly provided by Michael Weghorn,
> and downloaded and uncompress the source packages
> libreoffice-6

Re: We'd like to continue the production of the 32-bit deb packages

2019-08-08 Thread Michael Weghorn
On 08/08/2019 19.07, dreamn...@gmail.com wrote:
> Thanks Michael for the head up about build-nocheck. I used it as a last
> resort, because I am still unable to have 'make' finished without an
> error if I don't add that parameter.

Eike is of course right that disabling unit tests is not a good idea in
the long run, in particular if you plan to provide the packages for
"production use", so once the build with disabled unit tests works, the
cause for the failing unit test(s) should be observed.

Unfortunately, there are some "flaky" unit tests, so it might be that
the problem isn't even your build setup by itself. One thing to try
might be to just temporarily disable the specific test that fails
(probably in 'sw/CppunitTest_sw_layoutwriter.mk' according to the output
you pasted previously).
As mentioned before, the more output might help to further narrow the
issue down.

With regard to the build problem you described:

On 08/08/2019 17.36, dreamn...@gmail.com wrote:> Now I'm on the stage of
trying to build distributable deb files. As suggested before, I added
the following lines to autogen.input
> 
> --with-distro=LibreOfficeLinux
> --enable-release-build
> --with-package-format=deb
> --disable-dependency-tracking
> 
> [...]
> 
> However, something is still missing, because make build-nocheck now throws 
> the following error:
> 
> /home/linux/libreoffice/libreoffice/configmgr/source/components.cxx:287: 
> error: undefined reference to 
> 'configmgr::dconf::writeModifications(configmgr::Components&, 
> configmgr::Data&)'
> /home/linux/libreoffice/libreoffice/configmgr/source/components.cxx:531: 
> error: undefined reference to 'configmgr::dconf::readLayer(configmgr::Data&, 
> int)'
> /home/linux/libreoffice/libreoffice/configmgr/source/components.cxx:533: 
> error: undefined reference to 'configmgr::dconf::readLayer(configmgr::Data&, 
> int)'
> collect2: error: ld returned 1 exit status
> /home/linux/libreoffice/libreoffice/Library_merged.mk:11: recipe for target 
> '/home/linux/libreoffice/libreoffice/instdir/program/libmergedlo.so' failed
> make[1]: *** 
> [/home/linux/libreoffice/libreoffice/instdir/program/libmergedlo.so] Error 1
> make[1]: *** Waiting for unfinished jobs
> Makefile:282: recipe for target 'build' failed
> make: *** [build] Error 2
> 
> Any idea what could be missing to successfully build the .deb files?

The autogen param '--with-distro=LibreOfficeLinux' you added also
involves '--disable-dconf', and at a quick glance this looks like the
problem might be caused by artifacts from the previous build still lying
around.

Can you please try whether this goes away with a clean build (it might
be sufficient to just run 'make configmgr.clean' and then 'make' (or
'make build-nocheck')?



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: We'd like to continue the production of the 32-bit deb packages

2019-08-10 Thread Michael Weghorn
phandler.cxx:325:
> OOXMLDocPropHandler::startFastElement: unknown element 2748
> warn:oox:26598:26598:oox/source/docprop/docprophandler.cxx:325:
> OOXMLDocPropHandler::startFastElement: unknown element 3197
> warn:legacy.osl:26598:26598:oox/source/helper/graphichelper.cxx:120:
> GraphicHelper::GraphicHelper - cannot get target frame
> warn:sfx.doc:26598:26598:sfx2/source/doc/objxtor.cxx:711:
> DBG_UNHANDLED_EXCEPTION in const
> com::sun::star::uno::Reference&
> {anonymous}::lcl_getOrCreateLibraryContainer(bool,
> com::sun::star::uno::Reference&,
> const com::sun::star::uno::Reference&)
> exception: com.sun.star.lang.IllegalArgumentException ArgumentPosition: 0
> ScFiltersTest::testEnhancedProtectionXLSX finished in: 65ms
> warn:sc:26598:26598:sc/source/filter/orcus/orcusfiltersimpl.cxx:149:
> Unable to load styles from xml file! failed to load
> warn:sfx.doc:26598:26598:sfx2/source/doc/objxtor.cxx:711:
> DBG_UNHANDLED_EXCEPTION in const
> com::sun::star::uno::Reference&
> {anonymous}::lcl_getOrCreateLibraryContainer(bool,
> com::sun::star::uno::Reference&,
> const com::sun::star::uno::Reference&)
> exception: com.sun.star.lang.IllegalArgumentException ArgumentPosition: 0
> ScFiltersTest::testSortWithSharedFormulasODS finished in: 228ms
> warn:sc:26598:26598:sc/source/filter/orcus/orcusfiltersimpl.cxx:149:
> Unable to load styles from xml file! failed to load
> warn:sfx.doc:26598:26598:sfx2/source/doc/objxtor.cxx:711:
> DBG_UNHANDLED_EXCEPTION in const
> com::sun::star::uno::Reference&
> {anonymous}::lcl_getOrCreateLibraryContainer(bool,
> com::sun::star::uno::Reference&,
> const com::sun::star::uno::Reference&)
> exception: com.sun.star.lang.IllegalArgumentException ArgumentPosition: 0
> ScFiltersTest::testSortWithSheetExternalReferencesODS finished in: 115ms
> filters-test.cxx:145:Assertion
> Test name: ScFiltersTest::testCVEs
> equality assertion failed
> - Expected: 1
> - Actual  : 0
> -
> file:///home/linux/libreoffice/libreoffice/sc/qa/unit/data/qpro/pass/ofz14090-1.wb2
> 
> Failures !!!
> Run: 20   Failure total: 1   Failures: 1   Errors: 0
> warn:vcl.schedule.deinit:26598:26598:vcl/source/app/scheduler.cxx:173:
> DeInit task: Timer a: 1 p: 1 graphic::Manager maSwapOutTimer 1ms
> (0x11995cc)
> warn:vcl.schedule.deinit:26598:26598:vcl/source/app/scheduler.cxx:173:
> DeInit task: Timer a: 1 p: 1 sc ScModule IdleTimer 150ms (0x107d6c4)
> (ignored)
> warn:vcl.schedule.deinit:26598:26598:vcl/source/app/scheduler.cxx:194:
> DeInit active tasks: 2 (ignored: 1)
> warn:fwk.desktop:26598:26598:framework/source/services/desktop.cxx:1073:
> Desktop disposed before terminating it
> warn:unotools.config:26598:26598:unotools/source/config/configmgr.cxx:140:
> ConfigManager not empty
> 
> Error: a unit test failed, please do one of:
> 
> make CppunitTest_sc_filters_test CPPUNITTRACE="gdb --args"
>     # for interactive debugging on Linux
> make CppunitTest_sc_filters_test VALGRIND=memcheck
>     # for memory checking
> make CppunitTest_sc_filters_test DEBUGCPPUNIT=TRUE
>     # for exception catching
> 
> You can limit the execution to just one particular test by:
> 
> make CPPUNIT_TEST_NAME="testXYZ" ...above mentioned params...
> 
> /home/linux/libreoffice/libreoffice/solenv/gbuild/CppunitTest.mk:113:
> recipe for target
> '/home/linux/libreoffice/libreoffice/workdir/CppunitTest/sc_filters_test.test'
> failed
> make[1]: ***
> [/home/linux/libreoffice/libreoffice/workdir/CppunitTest/sc_filters_test.test]
> Error 1
> make[1]: *** Waiting for unfinished jobs
> Makefile:282: recipe for target 'build' failed
> make: *** [build] Error 2
> 
> 
> Hope this helps to pinpoint what could be the issue to compile
> LibreOffice without using build-nocheck, in order to be able to later
> add to autogen.input the building .deb directives for the next attempt.
> 
> 
> 
> El jue., 8 ago. 2019 a las 14:42, Michael Weghorn ( <mailto:m.wegh...@posteo.de>>) escribió:
> 
> On 08/08/2019 19.07, dreamn...@gmail.com
> <mailto:dreamn...@gmail.com> wrote:
> > Thanks Michael for the head up about build-nocheck. I used it as a
> last
> > resort, because I am still unable to have 'make' finished without an
> > error if I don't add that parameter.
> 
> Eike is of course right that disabling unit tests is not a good idea in
> the long run, in particular if you plan to provide the packages for
> "production use", so once the build with disabled unit tests works, the
> cause for the failing unit test(s) should be observed.
> 
> Unfortunately, there are some

Re: We'd like to continue the production of the 32-bit deb packages

2019-08-11 Thread Michael Weghorn
Can you give a few more details on your build environment (distro,...)?
If this is Escuelas Linux, can you possibly also quickly try whether the
same happens with e.g. Debian?
If I remember correctly, you mentioned that you wanted to set up a VM.
If I find the time, I might want to try to reproduce the issue locally -
though I can't promise.

Which way are you currently using to retrieve the sources (git or
tarballs) and what version of LibreOffice are you trying to build?

On 11/08/2019 02.18, dreamn...@gmail.com wrote:
> Thanks.
> 
> Added:
> 
> CC=gcc -mfpmath=sse -msse2
> CXX=g++ -mfpmath=sse -msse2
> 
> To autogen.input
> 
> Then
> make clean
> ./autogen.sh
> make
> 
> However, the compile process still crashes. Here are the last lines of
> the output:
> 
> [...]




signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Custom Java Sidebar for Libre Office

2019-10-14 Thread Michael Weghorn
Hi,

> I am developing an extension for LibreOffice where in i need to load
> HTML content. I use JFrame for this.  
> I want to make my java dialog to act as a sidebar for LibreOffice. 
> Or is there a way i can make my Java dialog as a child of Libre Office.
can you be more explicit what you mean by "make my Java dialog as a
child of LibreOffice"?

Maybe looking at how the existing "WollMux" Java extension handles this
may help: https://github.com/WollMux/WollMux

For WollMux 18.0, almost all dialogs are implemented as Java dialogs,
while 18.1 uses the LibreOffice sidebar for most things.

I don't have deeper knowledge of how the sidebar can be used from
extensions, but I'd guess that embedding a JFrame into it is not easily
possible. (Doing it in own Java dialogs should work, however.)

Best regards,
Michael
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Libreoffice-commits] core.git: include/svtools

2014-12-02 Thread Michael Weghorn
 include/svtools/headbar.hxx |  230 +---
 1 file changed, 111 insertions(+), 119 deletions(-)

New commits:
commit 13658762d2a6a0f33ad23ab6b9295ee93d2280bc
Author: Michael Weghorn 
Date:   Tue Dec 2 20:28:07 2014 +0100

fdo#39468 translate German comments

Change-Id: I37b5fe348d5e3f54d505b04951761b52ff13bd26
Reviewed-on: https://gerrit.libreoffice.org/13280
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/svtools/headbar.hxx b/include/svtools/headbar.hxx
index 39210b4..af7e0f6 100644
--- a/include/svtools/headbar.hxx
+++ b/include/svtools/headbar.hxx
@@ -26,154 +26,146 @@
 
 /*
 
-Beschreibung
+Description
 
 
 class HeaderBar
 
-Diese Klasse dient zur Anzeige einer Ueberschiftszeile. Diese kann Texte,
-Images oder beides anzeigen. Man kann die Items in der Groesse aendern,
-verschieben oder anklicken. In vielen Faellen macht es zum Beispiel Sinn,
-dieses Control mit einer SvTabListBox zu verbinden.
+This class serves for displaying a header bar. A header bar can display
+texts, images or both of them. The items can be changed in size, dragged or
+clicked at. In many cases, it makes, for example, sense to use this control
+in combination with a SvTabListBox.
 
 --
 
 WinBits
 
-WB_BORDER   Oben und unten wird ein Border gezeichnet
-WB_BOTTOMBORDER Unten wird ein Border gezeichnet
-WB_BUTTONSTYLE  Die Items sehen aus wie Buttons, ansonsten sind sie flach
-WB_3DLOOK   3D-Darstellung
-WB_DRAG Items koennen verschoben werden
+WB_BORDER   a border is drawn in the top and in the bottom
+WB_BOTTOMBORDER a border is drawn in the bottom
+WB_BUTTONSTYLE  The items look like buttons, otherwise they are flat.
+WB_3DLOOK   3D look
+WB_DRAG items can be dragged
 WB_STDHEADERBAR WB_BUTTONSTYLE | WB_BOTTOMBORDER
 
 --
 
 ItemBits
 
-HIB_LEFTInhalt wird im Item linksbuendig ausgegeben
-HIB_CENTER  Inhalt wird im Item zentriert ausgegeben
-HIB_RIGHT   Inhalt wird im Item rechtsbuendig ausgegeben
-HIB_TOP Inhalt wird im Item an der oberen Kante ausgegeben
-HIB_VCENTER Inhalt wird im Item vertikal zentiert ausgegeben
-HIB_BOTTOM  Inhalt wird im Item an der unteren Kante ausgegeben
-HIB_LEFTIMAGE   Bei Text und Image, wird Image links vom Text ausgegeben
-HIB_RIGHTIMAGE  Bei Text und Image, wird Image rechts vom Text ausgegeben
-HIB_FIXED   Item laesst sich nicht in der Groesse aendern
-HIB_FIXEDPOSItem laesst sich nicht verschieben
-HIB_CLICKABLE   Item laesst sich anklicken
-(Select-Handler wird erst bei MouseButtonUp gerufen)
-HIB_FLATItem wird flach dargestellt, auch wenn WB_BUTTONSTYLE 
gesetzt ist
-HIB_DOWNARROW   Es wird ein Pfeil nach unter hinter dem Text ausgegeben,
-welcher zum Beispiel angezeigt werden sollte, wenn nach
-diesem Item eine dazugehoerende Liste absteigend sortiert
-ist. Der Status des Pfeils kann mit SetItemBits()
-gesetzt/zurueckgesetzt werden.
-HIB_UPARROW Es wird ein Pfeil nach oben hinter dem Text ausgegeben,
-welcher zum Beispiel angezeigt werden sollte, wenn nach
-diesem Item eine dazugehoerende Liste aufsteigend sortiert
-ist.Der Status des Pfeils kann mit SetItemBits()
-gesetzt/zurueckgesetzt werden.
-HIB_USERDRAWZu diesem Item wird auch der UserDraw-Handler gerufen.
+HIB_LEFTcontent is displayed in the item left-justified
+HIB_CENTER  content is displayed in the item centred
+HIB_RIGHT   content is displayed in the item right-justified
+HIB_TOP content is displayed in the item at the upper border
+HIB_VCENTER content is displayed in the item vertically centred
+HIB_BOTTOM  content is displayed in the item at the bottom border
+HIB_LEFTIMAGE   in case of text and image, the image is displayed left of 
the text
+HIB_RIGHTIMAGE  in case of text and image, the image is displayed right of 
the text
+HIB_FIXED   item cannot be changed in size
+HIB_FIXEDPOSitem cannot be moved
+HIB_CLICKABLE   item is clickable
+(select handler is only called on MouseButtonUp)
+HIB_FLATitem is displayed in a flat way, even if WB_BUTTONSTYLE is 
set
+HIB_DOWNARROW   An arrow pointing downwards is displayed behind the text,
+which should, for example, be shown, when after this item,
+a corresponding list is sorted in descending order.
+The status of the

[Libreoffice-commits] core.git: basic/source

2014-12-06 Thread Michael Weghorn
 basic/source/classes/eventatt.cxx |2 +-
 basic/source/classes/sbunoobj.cxx |2 +-
 basic/source/comp/scanner.cxx |3 +--
 basic/source/runtime/ddectrl.cxx  |3 +--
 basic/source/uno/namecont.cxx |3 +--
 5 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 93124f771062eb2917212c16a64b0a67f5baaff4
Author: Michael Weghorn 
Date:   Sat Dec 6 01:31:14 2014 +0100

reduce scope of local variables

This eliminates some of the warnings from Cppcheck report of
2014-11-29.

Change-Id: Ic4bf3bd8f5982d2ea2f25a28c0dd61084c59af11
Reviewed-on: https://gerrit.libreoffice.org/13331
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/basic/source/classes/eventatt.cxx 
b/basic/source/classes/eventatt.cxx
index 3718e16..d7f97ab 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -464,9 +464,9 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& 
rPar, bool bWrite )
 uno::Reference< beans::XPropertySet > xDlgModPropSet( xDialogModel, 
uno::UNO_QUERY );
 if( xDlgModPropSet.is() )
 {
-bool bDecoration = true;
 try
 {
+bool bDecoration = true;
 OUString aDecorationPropName("Decoration");
 Any aDecorationAny = xDlgModPropSet->getPropertyValue( 
aDecorationPropName );
 aDecorationAny >>= bDecoration;
diff --git a/basic/source/classes/sbunoobj.cxx 
b/basic/source/classes/sbunoobj.cxx
index 36e419e..0627a7f 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -3630,7 +3630,6 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const 
TypeId& rBCType,
 // Parameter count -1 because of Param0 == this
 sal_uInt32 nParamCount = pParams ? ((sal_uInt32)pParams->Count() - 
1) : 0;
 Sequence args;
-bool bOutParams = false;
 
 Reference< XServiceConstructorDescription > xCtor = 
pUnoCtor->getServiceCtorDesc();
 Sequence< Reference< XParameter > > aParameterSeq = 
xCtor->getParameters();
@@ -3689,6 +3688,7 @@ void SbUnoService::SFX_NOTIFY( SfxBroadcaster& rBC, const 
TypeId& rBCType,
 
 if( !bParameterError )
 {
+bool bOutParams = false;
 if( nAllocParamCount > 0 )
 {
 args.realloc( nAllocParamCount );
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 6065e26..7708bc9 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -440,7 +440,6 @@ bool SbiScanner::NextSym()
 // Hex literals are signed Integers ( as defined by basic
 // e.g. -2,147,483,648 through 2,147,483,647 (signed)
 sal_uInt32 lu = 0;
-int i;
 bool bBufOverflow = false;
 while(nCol < aLine.getLength() &&  
theBasicCharClass::get().isAlphaNumeric(aLine[nCol] & 0xFF, bCompatible))
 {
@@ -461,7 +460,7 @@ bool SbiScanner::NextSym()
 *p = 0;
 for( p = buf; *p; ++p )
 {
-i = (*p & 0xFF) - '0';
+int i = (*p & 0xFF) - '0';
 if( i > 9 ) i -= 7;
 lu = ( lu * base ) + i;
 if( !ndig-- )
diff --git a/basic/source/runtime/ddectrl.cxx b/basic/source/runtime/ddectrl.cxx
index 9641289..2557c9e 100644
--- a/basic/source/runtime/ddectrl.cxx
+++ b/basic/source/runtime/ddectrl.cxx
@@ -140,10 +140,9 @@ SbError SbiDdeControl::Terminate( size_t nChannel )
 
 SbError SbiDdeControl::TerminateAll()
 {
-DdeConnection *conv;
 for (size_t nChannel = 0; nChannel < aConvList.size(); ++nChannel)
 {
-conv = aConvList[nChannel];
+DdeConnection *conv = aConvList[nChannel];
 
 if (conv != DDE_FREECHANNEL)
 {
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index d95596d..f9a5fd5 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1681,11 +1681,10 @@ bool SfxLibraryContainer::implLoadLibraryIndexFile(  
SfxLibrary* pLib,
 {
 Reference< XParser > xParser = xml::sax::Parser::create(mxContext);
 
-bool bLink = false;
 bool bStorage = false;
 if( pLib )
 {
-bLink = pLib->mbLink;
+bool bLink = pLib->mbLink;
 bStorage = xStorage.is() && !bLink;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: chart2/source

2014-12-06 Thread Michael Weghorn
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx|8 

 chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx   |3 
+--
 chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx |4 
++--
 chart2/source/tools/AxisHelper.cxx |2 
+-
 chart2/source/tools/ThreeDHelper.cxx   |2 
+-
 chart2/source/view/axes/Tickmarks_Equidistant.cxx  |3 
+--
 chart2/source/view/charttypes/Splines.cxx  |3 
+--
 chart2/source/view/main/GL3DRenderer.cxx   |8 
+++-
 chart2/source/view/main/VDataSeries.cxx|4 
+---
 9 files changed, 15 insertions(+), 22 deletions(-)

New commits:
commit 3948dee43526998b2e70dfe6ec2e4e46ef829abd
Author: Michael Weghorn 
Date:   Sat Dec 6 21:35:03 2014 +0100

reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I864a4e84326633d33f09324247cbe439fba801c8
Reviewed-on: https://gerrit.libreoffice.org/13336
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index a2c544f..38ff60a 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1539,11 +1539,11 @@ void WrappedVerticalProperty::setPropertyValue( const 
Any& rOuterValue, const Re
 Any WrappedVerticalProperty::getPropertyValue( const Reference< 
beans::XPropertySet >& /*xInnerPropertySet*/ ) const
 throw (beans::UnknownPropertyException, 
lang::WrappedTargetException, uno::RuntimeException)
 {
-bool bFound = false;
-bool bAmbiguous = false;
 Reference< chart2::XDiagram > xDiagram( 
m_spChart2ModelContact->getChart2Diagram() );
 if( xDiagram.is() )
 {
+bool bFound = false;
+bool bAmbiguous = false;
 bool bVertical = DiagramHelper::getVertical( xDiagram, bFound, 
bAmbiguous );
 if( bFound )
 m_aOuterValue <<= bVertical;
@@ -1883,11 +1883,11 @@ void WrappedSolidTypeProperty::setPropertyValue( const 
Any& rOuterValue, const R
 Any WrappedSolidTypeProperty::getPropertyValue( const Reference< 
beans::XPropertySet >& /*xInnerPropertySet*/ ) const
 throw (beans::UnknownPropertyException, 
lang::WrappedTargetException, uno::RuntimeException)
 {
-bool bFound = false;
-bool bAmbiguous = false;
 Reference< chart2::XDiagram > xDiagram( 
m_spChart2ModelContact->getChart2Diagram() );
 if( xDiagram.is() )
 {
+bool bFound = false;
+bool bAmbiguous = false;
 sal_Int32 nGeometry = DiagramHelper::getGeometry3D( xDiagram, bFound, 
bAmbiguous );
 if( bFound )
 m_aOuterValue <<= nGeometry;
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx 
b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
index a4930b3..d9f3cca 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
@@ -130,12 +130,11 @@ 
ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage( vcl::Window* pWindow
 m_pMFPerspective->Enable( m_pCbxPerspective->IsChecked() );
 
 //RightAngledAxes
-bool bRightAngledAxes = false;
-
 uno::Reference< chart2::XDiagram > xDiagram( m_xSceneProperties, 
uno::UNO_QUERY );
 if( ChartTypeHelper::isSupportingRightAngledAxes(
 DiagramHelper::getChartTypeByIndex( xDiagram, 0 ) ) )
 {
+bool bRightAngledAxes = false;
 m_xSceneProperties->getPropertyValue( "RightAngledAxes" ) >>= 
bRightAngledAxes;
 m_pCbxRightAngledAxes->SetToggleHdl( LINK( this, 
ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled ));
 m_pCbxRightAngledAxes->Check( bRightAngledAxes );
diff --git 
a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx 
b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index 362f3d9..52451c9 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -246,11 +246,11 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( 
sal_uInt16 nWhichId, const Sf
 
 case SCHATTR_BAR_CONNECT:
 {
-bool bOldConnectBars = false;
 m_bConnectBars = static_cast< const SfxBoolItem & >(
 rItemSet.Get( nWhichId )).GetValue();
 if( m_bSupportingBarConnectors )
 {
+bool bOldConnectBars = false;
 uno::Reference< beans::XPropertySet > xDiagramProperti

[Libreoffice-commits] core.git: accessibility/source avmedia/source basctl/source basegfx/source

2014-12-08 Thread Michael Weghorn
 accessibility/source/extended/accessiblelistboxentry.cxx |5 ++---
 avmedia/source/gstreamer/gstplayer.cxx   |3 +--
 basctl/source/basicide/basides1.cxx  |2 +-
 basctl/source/basicide/basobj2.cxx   |3 ++-
 basctl/source/basicide/bastype3.cxx  |2 +-
 basctl/source/basicide/moduldl2.cxx  |2 +-
 basctl/source/dlged/dlged.cxx|3 ++-
 basegfx/source/polygon/b2dpolygonclipper.cxx |6 ++
 basegfx/source/polygon/b3dpolygontools.cxx   |2 +-
 9 files changed, 13 insertions(+), 15 deletions(-)

New commits:
commit 3338f479182a5face7f143bdc4b9ea9067028887
Author: Michael Weghorn 
Date:   Sat Dec 6 01:07:11 2014 +0100

reduce scope of local variables

This eliminates some of the warnings from Cppcheck report of
2014-11-29.

Change-Id: Id5bf885de12a6de262d2cca9fa71627ac67f50d9
Reviewed-on: https://gerrit.libreoffice.org/13330
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx 
b/accessibility/source/extended/accessiblelistboxentry.cxx
index fc296b4..a0aa0a7 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -460,12 +460,11 @@ namespace accessibility
 sal_uInt16 iRealItemCount = 0;
 sal_uInt16 iCount = 0;
 sal_uInt16 iTotleItemCount = pEntry->ItemCount();
-SvLBoxItem* pItem;
 while( iCount < iTotleItemCount )
 {
-pItem = pEntry->GetItem( iCount );
+const SvLBoxItem* pItem = pEntry->GetItem( iCount );
 if ( pItem->GetType() == SV_ITEM_ID_LBOXSTRING &&
- !static_cast( pItem )->GetText().isEmpty() )
+ !static_cast( pItem 
)->GetText().isEmpty() )
 {
 iRealItemCount++;
 }
diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index cc44a4a..88e62cf 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -304,14 +304,13 @@ GstBusSyncReply Player::processSyncMessage( GstMessage 
*message )
 }
 if( mnWidth == 0 ) {
 GstPad *pad = NULL;
-GstCaps *caps;
 
 g_signal_emit_by_name( mpPlaybin, "get-video-pad", 0, &pad );
 
 if( pad ) {
 int w = 0, h = 0;
 
-caps = gst_pad_get_current_caps( pad );
+GstCaps *caps = gst_pad_get_current_caps( pad );
 
 if( gst_structure_get( gst_caps_get_structure( caps, 0 ),
"width", G_TYPE_INT, &w,
diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index d981296..e5d4da4 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -87,7 +87,6 @@ void Shell::ExecuteCurrent( SfxRequest& rReq )
 // memorize item because of the adjustments...
 GetExtraData()->SetSearchItem(rSearchItem);
 sal_Int32 nFound = 0;
-bool bCanceled = false;
 if (rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL)
 {
 sal_uInt16 nActModWindows = 0;
@@ -115,6 +114,7 @@ void Shell::ExecuteCurrent( SfxRequest& rReq )
 }
 else
 {
+bool bCanceled = false;
 nFound = pCurWin->StartSearchAndReplace(rSearchItem);
 if ( !nFound && !rSearchItem.GetSelection() )
 {
diff --git a/basctl/source/basicide/basobj2.cxx 
b/basctl/source/basicide/basobj2.cxx
index 28a781c..9834875 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -240,7 +240,6 @@ OUString ChooseMacro( const uno::Reference< frame::XModel 
>& rxLimitToDocument,
 GetExtraData()->ChoosingMacro() = true;
 
 OUString aScriptURL;
-bool bError = false;
 SbMethod* pMethod = NULL;
 
 boost::scoped_ptr< MacroChooser > pChooser( new MacroChooser( NULL, true ) 
);
@@ -259,6 +258,8 @@ OUString ChooseMacro( const uno::Reference< frame::XModel 
>& rxLimitToDocument,
 {
 case Macro_OkRun:
 {
+bool bError = false;
+
 pMethod = pChooser->GetMacro();
 if ( !pMethod && pChooser->GetMode() == MacroChooser::Recording )
 pMethod = pChooser->CreateMacro();
diff --git a/basctl/source/basicide/bastype3.cxx 
b/basctl/source/basicide/bastype3.cxx
index 8cb3b2f..24122ea 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -190,9 +190,9 @@ SbxVariable* TreeListBox::FindVariable( 

[Libreoffice-commits] core.git: dbaccess/source

2014-12-08 Thread Michael Weghorn
 dbaccess/source/ui/dlg/ConnectionHelper.cxx|3 +--
 dbaccess/source/ui/dlg/queryfilter.cxx |5 ++---
 dbaccess/source/ui/dlg/tablespage.cxx  |6 ++
 dbaccess/source/ui/misc/WCPage.cxx |3 +--
 dbaccess/source/ui/querydesign/JoinTableView.cxx   |3 +--
 dbaccess/source/ui/querydesign/querycontroller.cxx |2 +-
 dbaccess/source/ui/tabledesign/TEditControl.cxx|3 +--
 dbaccess/source/ui/tabledesign/TableController.cxx |3 +--
 8 files changed, 10 insertions(+), 18 deletions(-)

New commits:
commit 141469eb831c054d6f4b56fcaa50a03e52429f11
Author: Michael Weghorn 
Date:   Mon Dec 8 21:09:53 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I8931ff46394923d672e08b3a5c9ab75bb6ffb0a9
Reviewed-on: https://gerrit.libreoffice.org/13385
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx 
b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 33863aa..7649be1 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -534,7 +534,6 @@ namespace dbaui
 IS_PATH_EXIST OConnectionHelper::pathExists(const OUString& _rURL, bool 
bIsFile) const
 {
 ::ucbhelper::Content aCheckExistence;
-bool bExists = false;
 IS_PATH_EXIST eExists = PATH_NOT_EXIST;
 Reference< ::com::sun::star::task::XInteractionHandler > 
xInteractionHandler(
 task::InteractionHandler::createWithParent(m_xORB, 0), UNO_QUERY );
@@ -545,7 +544,7 @@ namespace dbaui
 try
 {
 aCheckExistence = ::ucbhelper::Content(_rURL, xCmdEnv, 
comphelper::getProcessComponentContext());
-bExists = bIsFile? aCheckExistence.isDocument(): 
aCheckExistence.isFolder();
+const bool bExists = bIsFile? aCheckExistence.isDocument(): 
aCheckExistence.isFolder();
 eExists = bExists? PATH_EXIST: PATH_NOT_EXIST;
 }
 catch(const Exception&)
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx 
b/dbaccess/source/ui/dlg/queryfilter.cxx
index 7c3ad25..1274a03 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -297,11 +297,11 @@ bool DlgFilterCrit::getCondition(const ListBox& 
_rField,const ListBox& _rComp,co
 try
 {
 OUString sTableName;
-bool bFunction = false;
 _rFilter.Name = _rField.GetSelectEntry();
 Reference< XPropertySet > xColumn = getQueryColumn(_rFilter.Name);
 if ( xColumn.is() )
 {
+bool bFunction = false;
 Reference< XPropertySetInfo > xInfo = 
xColumn->getPropertySetInfo();
 if ( xInfo->hasPropertyByName(PROPERTY_REALNAME) )
 {
@@ -818,10 +818,9 @@ void DlgFilterCrit::fillLines(const 
Sequence >& _aValue
 {
 const Sequence* pOrIter = _aValues.getConstArray();
 const Sequence* pOrEnd   = pOrIter + _aValues.getLength();
-bool bOr = true;
 for(sal_uInt16 i=0;pOrIter != pOrEnd; ++pOrIter)
 {
-bOr = true;
+bool bOr = true;
 const PropertyValue* pAndIter   = pOrIter->getConstArray();
 const PropertyValue* pAndEnd= pAndIter + pOrIter->getLength();
 for(;pAndIter != pAndEnd; ++pAndIter)
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx 
b/dbaccess/source/ui/dlg/tablespage.cxx
index 9b8104c..ce9da40 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -162,8 +162,6 @@ namespace dbaui
 OUString sCatalog, sSchema, sName;
 
 SvTreeListEntry* pRootEntry = m_pTablesList->getAllObjectsEntry();
-bool bAllTables = false;
-bool bAllSchemas = false;
 
 const OUString* pIncludeTable = _rTables.getConstArray();
 for (sal_Int32 i=0; i<_rTables.getLength(); ++i, ++pIncludeTable)
@@ -173,8 +171,8 @@ namespace dbaui
 else
 sName = pIncludeTable->getStr();
 
-bAllTables = (1 == sName.getLength()) && ('%' == sName[0]);
-bAllSchemas = (1 == sSchema.getLength()) && ('%' == sSchema[0]);
+bool bAllTables = (1 == sName.getLength()) && ('%' == sName[0]);
+bool bAllSchemas = (1 == sSchema.getLength()) && ('%' == 
sSchema[0]);
 
 // the catalog entry
 SvTreeListEntry* pCatalog = 
m_pTablesList->GetEntryPosByName(sCatalog, pRootEntry);
diff --git a/dbaccess/source/ui/misc/WCPage.cxx 
b/dbaccess/source/ui/misc/WCPage.cxx
index ae647cf..5d2b824 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -277,11 +277,10 @@ bool OCopyTable::checkAppendData()
 ODatabaseExport::TColumnVector::const_iterator aDestIter= 
rDestColumns

[Libreoffice-commits] core.git: cli_ure/source connectivity/source

2014-12-08 Thread Michael Weghorn
 cli_ure/source/uno_bridge/cli_data.cxx  |4 +---
 connectivity/source/drivers/dbase/DTable.cxx|6 ++
 connectivity/source/drivers/dbase/dindexnode.cxx|3 +--
 connectivity/source/drivers/file/FStatement.cxx |3 +--
 connectivity/source/drivers/firebird/Util.cxx   |2 +-
 connectivity/source/drivers/hsqldb/HDriver.cxx  |3 +--
 connectivity/source/drivers/jdbc/PreparedStatement.cxx  |3 ++-
 connectivity/source/drivers/macab/MacabRecords.cxx  |3 +--
 connectivity/source/drivers/odbc/OPreparedStatement.cxx |5 +
 9 files changed, 11 insertions(+), 21 deletions(-)

New commits:
commit 54cbb57d4c3ccf1e1c8455ac413183edbdeb3416
Author: Michael Weghorn 
Date:   Mon Dec 8 19:36:22 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: Ib35eb591534c3f23adc3cb7b7fa9696dc5cbeabf
Reviewed-on: https://gerrit.libreoffice.org/13383
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/cli_ure/source/uno_bridge/cli_data.cxx 
b/cli_ure/source/uno_bridge/cli_data.cxx
index c1671d7..3efd7a4 100644
--- a/cli_ure/source/uno_bridge/cli_data.cxx
+++ b/cli_ure/source/uno_bridge/cli_data.cxx
@@ -1058,12 +1058,10 @@ void Bridge::map_to_uno(void * uno_data, 
System::Object^ cli_data,
 sal_Int32 nPos = 0;
 try
 {
-typelib_TypeDescriptionReference * member_type= NULL;
-
 OUString usUnoException("com.sun.star.uno.Exception");
 for (; nPos < nMembers; ++nPos)
 {
-member_type= comp_td->ppTypeRefs[nPos];
+typelib_TypeDescriptionReference * member_type= 
comp_td->ppTypeRefs[nPos];
 System::Object^ val= nullptr;
 if (cli_data != nullptr)
 {
diff --git a/connectivity/source/drivers/dbase/DTable.cxx 
b/connectivity/source/drivers/dbase/DTable.cxx
index 19fc244..8f10214 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2551,12 +2551,11 @@ void ODbaseTable::copyData(ODbaseTable* 
_pNewTable,sal_Int32 _nPos)
 (aRow->get())[nPos]->setBound(false);
 
 
-bool bOk = true;
 sal_Int32 nCurPos;
 OValueRefVector::Vector::iterator aIter;
 for(sal_uInt32 nRowPos = 0; nRowPos < m_aHeader.db_anz;++nRowPos)
 {
-bOk = seekRow( IResultSetHelper::BOOKMARK, nRowPos+1, nCurPos );
+bool bOk = seekRow( IResultSetHelper::BOOKMARK, nRowPos+1, nCurPos );
 if ( bOk )
 {
 bOk = fetchRow( aRow, *m_aColumns, true, true);
@@ -2698,8 +2697,6 @@ End:
 
 bool ODbaseTable::ReadMemo(sal_Size nBlockNo, ORowSetValue& aVariable)
 {
-bool bIsText = true;
-
 m_pMemoStream->Seek(nBlockNo * m_aMemoHeader.db_size);
 switch (m_aMemoHeader.db_typ)
 {
@@ -2732,6 +2729,7 @@ bool ODbaseTable::ReadMemo(sal_Size nBlockNo, 
ORowSetValue& aVariable)
 case MemoFoxPro:
 case MemodBaseIV: // dBase IV-Memofield with length
 {
+bool bIsText = true;
 char sHeader[4];
 m_pMemoStream->Read(sHeader,4);
 // Foxpro stores text and binary data
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx 
b/connectivity/source/drivers/dbase/dindexnode.cxx
index 01f66a9..65774cb 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -194,7 +194,6 @@ bool ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
 bool bAppend = nRowsLeft > 0;
 if (IsFull())
 {
-bool bResult = true;
 ONDXNode aSplitNode;
 if (bAppend)
 aSplitNode = rNode;
@@ -204,7 +203,7 @@ bool ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
 aSplitNode = (*this)[nCount-1];
 if(rNode.GetKey() <= aSplitNode.GetKey())
 {
-
+bool bResult = true;
 // this practically reduces the number of nodes by 1
 if (IsLeaf() && this == rIndex.m_aCurLeaf)
 {
diff --git a/connectivity/source/drivers/file/FStatement.cxx 
b/connectivity/source/drivers/file/FStatement.cxx
index d93fef8..d0d0ab2 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -574,11 +574,10 @@ void OStatement_Base::GetAssignValues()
 OSL_ENSURE(pInsertAtomCommalist != NULL,"OResultSet: 
pInsertAtomCommalist darf nicht NULL sein!");
 OSL_ENSURE(pInsertAtomCommalist->count() > 0,"OResultSet: 
pInsertAtomCommalist <= 0");
 
-OSQLParseNode * pRow_Value_Const;
 sal_Int32 nIndex=0;
 for (sal_uInt32 i = 0; i < pInsertAtomCommalist->count(); i++)

[Libreoffice-commits] core.git: crashrep/source cui/source

2014-12-08 Thread Michael Weghorn
 crashrep/source/win32/soreport.cxx|2 +-
 cui/source/customize/cfg.cxx  |   20 
 cui/source/customize/macropg.cxx  |4 ++--
 cui/source/dialogs/SpellDialog.cxx|3 +--
 cui/source/dialogs/cuigaldlg.cxx  |6 ++
 cui/source/dialogs/hangulhanjadlg.cxx |3 +--
 cui/source/dialogs/insdlg.cxx |3 +--
 cui/source/factory/dlgfact.cxx|3 +--
 cui/source/options/optchart.cxx   |6 ++
 cui/source/options/optlingu.cxx   |   10 --
 cui/source/tabpages/chardlg.cxx   |3 +--
 cui/source/tabpages/tpbitmap.cxx  |3 +--
 cui/source/tabpages/tpcolor.cxx   |3 +--
 cui/source/tabpages/tpgradnt.cxx  |3 +--
 cui/source/tabpages/tphatch.cxx   |3 +--
 cui/source/tabpages/tpline.cxx|3 +--
 cui/source/tabpages/tplnedef.cxx  |3 +--
 cui/source/tabpages/tpshadow.cxx  |3 ++-
 18 files changed, 32 insertions(+), 52 deletions(-)

New commits:
commit 5f6af01f13460909e7c3819e14edb2eb04788156
Author: Michael Weghorn 
Date:   Mon Dec 8 20:46:05 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I19d0070c5dc54c605a7924b750eee1538bed16b3
Reviewed-on: https://gerrit.libreoffice.org/13384
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/crashrep/source/win32/soreport.cxx 
b/crashrep/source/win32/soreport.cxx
index 4a4d2bf..ee8b7d0 100644
--- a/crashrep/source/win32/soreport.cxx
+++ b/crashrep/source/win32/soreport.cxx
@@ -564,11 +564,11 @@ static string xml_encode( const string &rString )
 
 static size_t fcopy( FILE *fpin, FILE *fpout )
 {
-char buffer[1024];
 size_t nBytesWritten = 0;
 
 if ( fpin && fpout )
 {
+char buffer[1024];
 size_t nBytes;
 while ( 0 != (nBytes = fread( buffer, 1, sizeof(buffer), fpin )) )
 {
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index b015f08..77d3afc 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -275,10 +275,9 @@ generateCustomName(
 // now check is there is an already existing entry with this name
 SvxEntries::const_iterator iter = entries->begin();
 
-SvxConfigEntry* pEntry;
 while ( iter != entries->end() )
 {
-pEntry = *iter;
+SvxConfigEntry* pEntry = *iter;
 
 if ( name.equals( pEntry->GetName() ) )
 {
@@ -314,10 +313,9 @@ generateCustomURL(
 // now check is there is an already existing entry with this url
 SvxEntries::const_iterator iter = entries->begin();
 
-SvxConfigEntry* pEntry;
 while ( iter != entries->end() )
 {
-pEntry = *iter;
+SvxConfigEntry* pEntry = *iter;
 
 if ( url.equals( pEntry->GetCommand() ) )
 {
@@ -1082,7 +1080,6 @@ bool MenuSaveInData::LoadSubMenus(
 uno::Reference< container::XIndexAccess >   xSubMenu;
 OUStringaCommandURL;
 OUStringaLabel;
-boolbIsUserDefined = true;
 
 sal_uInt16 nType( css::ui::ItemType::DEFAULT );
 
@@ -1091,6 +1088,7 @@ bool MenuSaveInData::LoadSubMenus(
 
 if ( bItem )
 {
+bool bIsUserDefined = true;
 if ( nType == css::ui::ItemType::DEFAULT )
 {
 uno::Any a;
@@ -2594,16 +2592,13 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog(
 // Copy the entries list passed in
 if ( entries != NULL )
 {
-SvxConfigEntry* pEntry;
-SvTreeListEntry* pLBEntry;
-
 mpEntries = new SvxEntries();
 SvxEntries::const_iterator iter = entries->begin();
 
 while ( iter != entries->end() )
 {
-pEntry = *iter;
-pLBEntry =
+SvxConfigEntry* pEntry = *iter;
+SvTreeListEntry* pLBEntry =
 m_pMenuListBox->InsertEntry( stripHotKey( pEntry->GetName() ) 
);
 pLBEntry->SetUserData( pEntry );
 mpEntries->push_back( pEntry );
@@ -4176,7 +4171,6 @@ bool ToolbarSaveInData::LoadToolbar(
 uno::Reference< container::XIndexAccess >   xSubMenu;
 OUStringaCommandURL;
 OUStringaLabel;
-boolbIsUserDefined = true;
 boolbIsVisible;
 sal_Int32   nStyle;
 
@@ -4187,6 +4181,7 @@ bool ToolbarSaveInData::LoadToolbar(
 
 if ( bItem )
 {
+bool bIsUserDefined = true;
 if ( nType == css::ui::ItemType::DEFAULT )
 {
 uno::Any a;
@@ -5238,7 +5233,6 @@ bool SvxIconSelectorDialog::ImportGraphic( const 
OUString& aURL )
 
 uno::Reference< graphic::XGraphic > xGraphic;
 com::sun::star::awt::Size aSize;
-bool bOK = true;
 aMediaProps[0].Value <

[Libreoffice-commits] core.git: include/svtools

2014-12-09 Thread Michael Weghorn
 include/svtools/tabbar.hxx |  421 +
 1 file changed, 203 insertions(+), 218 deletions(-)

New commits:
commit d4673820ad9194a25cd1990c179eee202309bd04
Author: Michael Weghorn 
Date:   Fri Dec 5 20:20:06 2014 +0100

fdo#39468 translate German comments

Change-Id: Ic91caa9268ea2be860acaa47ff45a4a5789a371c
Reviewed-on: https://gerrit.libreoffice.org/13321
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx
index bd38948..5dd5aab 100644
--- a/include/svtools/tabbar.hxx
+++ b/include/svtools/tabbar.hxx
@@ -36,256 +36,241 @@ struct ImplTabBarItem;
 typedef ::std::vector< ImplTabBarItem* > ImplTabBarList;
 
 
-// - Dokumentation -
 
 
 /*
 
-Erlaubte StyleBits
+Allowed StylbeBits
 --
 
-WB_SCROLL   - Die Tabs koennen ueber ein Extra-Feld gescrollt werden
-WB_MINSCROLL- Die Tabs koennen ueber 2 zusaetzliche Buttons gescrollt 
werden
-WB_RANGESELECT  - Zusammenhaengende Bereiche koennen selektiert werden
-WB_MULTISELECT  - Einzelne Tabs koennen selektiert werden
-WB_BORDER   - Oben und unten wird ein Strich gezeichnet
-WB_TOPBORDER- Oben wird ein Border gezeichnet
-WB_3DTAB- Die Tabs und der Border werden in 3D gezeichnet
-WB_DRAG - Vom TabBar wird ein StartDrag-Handler gerufen, wenn
-  Drag and Drop gestartet werden soll. Es wird ausserdem
-  im TabBar mit EnableDrop() Drag and Drop eingeschaltet.
-WB_SIZEABLE - Vom TabBar wird ein Split-Handler gerufen, wenn der Anwender
-  den TabBar in der Breite aendern will
+WB_SCROLL   - The tabs can be scrolled via an extra field
+WB_MINSCROLL- The tabs can be scrolled via 2 additional buttons
+WB_RANGESELECT  - Connected ranges can be selected
+WB_MULTISELECT  - single tabs can be selected
+WB_BORDER   - a border is drawn in the top and in the bottom
+WB_TOPBORDER- a border is drawn in the top
+WB_3DTAB- the tabs and the border are drawn in 3D
+WB_DRAG - A StartDrag handler is called by the TabBar, if drag
+  and drop should be started. In addition, drag and drop
+  is activated in the TabBar with EnableDrop().
+WB_SIZEABLE - a Split handler is called by the TabBar, if the user
+  wants to change the width of the TabBar
 WB_STDTABBAR- WB_BORDER
 
-Wenn man den TabBar zum Beispiel als Property-Bar benutzen moechte, sollten
-die WinBits WB_TOPBORDER und WB_3DTAB anstatt WB_BORDER gesetzt werden.
+If the TabBar should be used for example as Property bar, the WinBits
+WB_TOPBORDER and WB_3DTAB should be set instead of WB_BORDER.
 
 
-Erlaubte PageBits
+Allowed PageBits
 -
 
-TPB_SPECIAL - Andere Darstellung des TabTextes, zum Beispiel fuer
-  Szenario-Seiten.
+TPB_SPECIAL - Different display of the TabText, e.g. for scenario pages.
 
-
-Handler
+Handlers
 ---
 
-Select  - Wird gerufen, wenn eine Tab selektiert oder
-  deselektiert wird
-DoubleClick - Wird gerufen, wenn ein DoubleClick im TabBar ausgeloest
-  wurde. Innerhalb des Handlers liefert GetCurPageId() die
-  angeklickte Tab zurueck oder 0, wenn keine Tab angeklickt
-  wurde
-ActivatePage- Wird gerufen, wenn eine andere Seite aktiviert wird.
-  GetCurPageId() gibt die aktivierte Seite zurueck.
-DeactivatePage  - Wird gerufen, wenn eine Seite deaktiviert wird. Wenn
-  eine andere Seite aktiviert werden darf, muss sal_True
-  zurueckgegeben werden, wenn eine andere Seite von
-  der Aktivierung ausgeschlossen werden soll, muss
-  sal_False zurueckgegeben werden. GetCurPageId() gibt die
-  zu deaktivierende Seite zurueck.
+Select  - is called when a tab is selected or unselected
+DoubleClick - Is called when a DoubleClick has been fired in the
+  TabBar. Inside of the handler, GetCurPageId() returns
+  the clicked tab or 0, if no tab has been clicked.
+ActivatePage- Is called, if another page is activated.
+  GetCurPageId() returns the activated page.
+DeactivatePage  - Is called, when a page is deactivated. If another page
+  may be activated, true must be returned; if another
+  page shall be excluded from the activation, false must
+  be returned. GetCurPageId() returns the page to be
+  deactivated.
 
 
 
 Drag and Drop
 -
 
-Fuer Drag and Drop muss das WinBit WB_DRAG gesetzt werden. Ausserdem
-muss der Command-, QueryDrop-Handler und der Drop-Handler ueberlagert
-werden. Dabei muss in den Handlern folgendes implementiert werden:
-
-Command - Wenn in diesem Handler das Dragging gestartet werden
-  soll

[Libreoffice-commits] core.git: bridges/source canvas/source canvas/workben

2014-12-10 Thread Michael Weghorn
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx |4 +---
 bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx   |4 +---
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |4 +---
 bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx  |8 
 canvas/source/cairo/cairo_canvashelper.cxx  |3 +--
 canvas/source/directx/dx_canvasbitmap.cxx   |3 +--
 canvas/source/directx/dx_surfacegraphics.cxx|3 +--
 canvas/workben/canvasdemo.cxx   |3 +--
 8 files changed, 11 insertions(+), 21 deletions(-)

New commits:
commit 0e55feea6a6bb516c4198960b14192f363f08601
Author: Michael Weghorn 
Date:   Sat Dec 6 19:51:04 2014 +0100

reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I1122494e295af756ef3cc32717fe204505aeb9e3
Reviewed-on: https://gerrit.libreoffice.org/13335
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
index 9060584..a8f27b6 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
@@ -357,11 +357,9 @@ static void cpp_call(
 
 void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
 
-bool bSimpleReturn = true;
 if (pReturnTypeDescr)
 {
-if (arm::return_in_hidden_param( pReturnTypeRef ) )
-bSimpleReturn = false;
+bool bSimpleReturn = !arm::return_in_hidden_param( pReturnTypeRef );
 
 if (bSimpleReturn)
 pCppReturn = pUnoReturn; // direct way for simple types
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
index 752137f..0a25f48 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
@@ -406,11 +406,9 @@ static void cpp_call(
 
 void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
 
-bool bSimpleReturn = true;
 if (pReturnTypeDescr)
 {
-if (arm::return_in_hidden_param( pReturnTypeRef ) )
-bSimpleReturn = false;
+bool bSimpleReturn = !arm::return_in_hidden_param( pReturnTypeRef )
 
 if (bSimpleReturn)
 pCppReturn = pUnoReturn; // direct way for simple types
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index 01bb74a..342ab9c 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -316,15 +316,13 @@ static void cpp_call(
 void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
 
 bool bOverflow = false;
-bool bSimpleReturn = true;
 
 if (pReturnTypeDescr)
 {
 #if OSL_DEBUG_LEVEL > 2
 fprintf(stderr, "return type is %d\n", pReturnTypeDescr->eTypeClass);
 #endif
-if (ppc64::return_in_hidden_param(pReturnTypeRef))
-bSimpleReturn = false;
+bool bSimpleReturn =!ppc64::return_in_hidden_param(pReturnTypeRef);
 
 if (bSimpleReturn)
 {
diff --git a/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx
index ed0e6cf..c1815b4 100644
--- a/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx
@@ -42,10 +42,11 @@ static sal_Int32
 invoke_count_words(char * pPT)
 {
  sal_Int32 overflow = 0, gpr = 0, fpr = 0;
- int c;// character of parameter type being decoded
 
  while (*pPT != 'X') {
-   c = *pPT;
+   // character of parameter type being decoded
+   const int c = *pPT;
+
switch (c) {
case 'D':   /* type is double */
 if (fpr < 2) fpr++; else overflow+=2;
@@ -84,10 +85,9 @@ invoke_copy_to_stack(sal_Int32 * pStackLongs, char * pPT, 
sal_Int32* d_ov, sal_I
 sal_Int32 *d_gpr = d_ov + overflow;
 sal_Int64 *d_fpr = (sal_Int64 *)(d_gpr + 5);
 sal_Int32 gpr = 0, fpr = 0;
-char c;
 
  while (*pPT != 'X') {
-   c = *pPT;
+   const char c = *pPT;
switch (c) {
case 'D':   /* type is double */
 if (fpr < 2)
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx 
b/canvas/source/cairo/cairo_canvashelper.cxx
index c501d57..68e05fe 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -670,7 +670,6 @@ namespace cairocanvas
 
 static void addColorStops( Pattern* pPattern, const uno::Sequence< 
uno::Sequence< double > >& rColors, const uno::Sequence< double >& rStops, bool 
bReverseStops = false )
 {
-

[Libreoffice-commits] core.git: desktop/source dtrans/source editeng/source

2014-12-12 Thread Michael Weghorn
 desktop/source/deployment/registry/component/dp_component.cxx |2 +-
 desktop/source/pkgchk/unopkg/unopkg_app.cxx   |3 +--
 dtrans/source/win32/workbench/XTDo.cxx|2 +-
 editeng/source/editeng/editdoc.cxx|3 +--
 editeng/source/editeng/impedit2.cxx   |3 +--
 editeng/source/editeng/impedit4.cxx   |3 +--
 editeng/source/items/xmlcnitm.cxx |3 +--
 editeng/source/outliner/outliner.cxx  |3 +--
 8 files changed, 8 insertions(+), 14 deletions(-)

New commits:
commit 04b183a9bc792a53a9f081353a79486faa4f3872
Author: Michael Weghorn 
Date:   Thu Dec 11 23:32:12 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: Ifbc5a7a562e714f48dcfd51a75e9a4e0bfcde81c
Reviewed-on: https://gerrit.libreoffice.org/13443
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/desktop/source/deployment/registry/component/dp_component.cxx 
b/desktop/source/deployment/registry/component/dp_component.cxx
index 5c13755..26018f4 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -1307,10 +1307,10 @@ BackendImpl::ComponentPackageImpl::isRegistered_(
 if (m_registered == REG_UNINIT)
 {
 m_registered = REG_NOT_REGISTERED;
-bool bAmbiguousComponentName = false;
 const Reference xRDB( getRDB() );
 if (xRDB.is())
 {
+bool bAmbiguousComponentName = false;
 // lookup rdb for location URL:
 const Reference xRootKey(
 xRDB->getRootKey() );
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx 
b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 04dcac8..5bef9ed 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -187,7 +187,6 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
 bool option_verbose = false;
 bool option_bundled = false;
 bool option_suppressLicense = false;
-bool subcmd_add = false;
 bool subcmd_gui = false;
 OUString logFile;
 OUString repository;
@@ -239,7 +238,7 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main()
 osl_getCommandArg( nPos, &subCommand.pData );
 ++nPos;
 subCommand = subCommand.trim();
-subcmd_add = subCommand == "add";
+bool subcmd_add = subCommand == "add";
 subcmd_gui = subCommand == "gui";
 
 // sun-command options and packages:
diff --git a/dtrans/source/win32/workbench/XTDo.cxx 
b/dtrans/source/win32/workbench/XTDo.cxx
index 83b4464..8961285 100644
--- a/dtrans/source/win32/workbench/XTDo.cxx
+++ b/dtrans/source/win32/workbench/XTDo.cxx
@@ -127,12 +127,12 @@ STDMETHODIMP CXTDataObject::GetData( LPFORMATETC 
pFormatetc, LPSTGMEDIUM pmedium
 return E_INVALIDARG;
 
 HRESULT hr = E_FAIL;
-charpBuff[] = "Test OleClipboard";
 
 if ( CF_TEXT == pFormatetc->cfFormat )
 {
 CHGlobalHelper hGlobHlp( TRUE );
 
+charpBuff[] = "Test OleClipboard";
 hGlobHlp.Write( pBuff, sizeof( pBuff ), NULL );
 
 pmedium->tymed  = TYMED_HGLOBAL;
diff --git a/editeng/source/editeng/editdoc.cxx 
b/editeng/source/editeng/editdoc.cxx
index 9e2e29f..85419c6 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -1434,7 +1434,6 @@ void ContentNode::CollapsAttribs( sal_Int32 nIndex, 
sal_Int32 nDeleted, SfxItemP
 // Since features are treated differently than normal character attributes,
 // can also the order of the start list be change!
 bool bResort = false;
-bool bDelAttr = false;
 sal_Int32 nEndChanges = nIndex+nDeleted;
 
 sal_Int32 nAttr = 0;
@@ -1442,7 +1441,7 @@ void ContentNode::CollapsAttribs( sal_Int32 nIndex, 
sal_Int32 nDeleted, SfxItemP
 EditCharAttrib* pAttrib = GetAttrib(rAttribs, nAttr);
 while ( pAttrib )
 {
-bDelAttr = false;
+bool bDelAttr = false;
 if ( pAttrib->GetEnd() >= nIndex )
 {
 // Move all Attribute behind the insert point...
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index db8fe9c..1e2c2fc 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3002,13 +3002,12 @@ EditPaM ImpEditEngine::GetPaM( Point aDocPos, bool 
bSmart )
 OSL_ENSURE( GetUpdateMode(), "Must not be reached when Update=FALSE: 
GetPaM" );
 
 long nY = 0;
-long nTmpHeight;
 EditPaM aPaM;
 sal_Int32 nPortion;
 for ( nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
 {
 ParaPortion* pPortion = GetParaPortions(

[Libreoffice-commits] core.git: jvmfwk/plugins

2014-11-18 Thread Michael Weghorn
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 7bd4d1e9180e8c380e634bc231286034db151716
Author: Michael Weghorn 
Date:   Tue Nov 18 12:04:36 2014 +

remove duplicate code line

Change-Id: Ia1e9d2b31698db23029e4dd5f0f7659acff5d30f
Reviewed-on: https://gerrit.libreoffice.org/12951
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 9954f8a..e680b4d 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -217,7 +217,6 @@ javaPluginError jfw_plugin_getAllJavaInfos(
 OSL_ASSERT(sMinVersion);
 OSL_ASSERT(sMaxVersion);
 OSL_ASSERT(parJavaInfo);
-OSL_ASSERT(parJavaInfo);
 OSL_ASSERT(nLenInfoList);
 if (!sVendor || !sMinVersion || !sMaxVersion || !parJavaInfo || 
!nLenInfoList)
 return JFW_PLUGIN_E_INVALID_ARG;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: jvmfwk/inc jvmfwk/plugins jvmfwk/source

2014-11-19 Thread Michael Weghorn
 jvmfwk/inc/vendorplugin.hxx |   22 ++
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |   73 +++-
 jvmfwk/source/framework.cxx |   38 +-
 3 files changed, 58 insertions(+), 75 deletions(-)

New commits:
commit 772a36932e4803beaffdad87200e0162e1020e94
Author: Michael Weghorn 
Date:   Tue Nov 18 17:40:13 2014 +

changed type of parameters from rtl_uString to OUString

changed type of several parameters of the functions
jfw_plugin_getAllJavaInfos and jfw_plugin_getJavaInfoByPath
from rtl_uString to OUString

Change-Id: I80feb311542e6ccded9f9924f800c75a7e14a1e7
Signed-off-by: Stephan Bergmann 

diff --git a/jvmfwk/inc/vendorplugin.hxx b/jvmfwk/inc/vendorplugin.hxx
index 02ea040..3fd4d35 100644
--- a/jvmfwk/inc/vendorplugin.hxx
+++ b/jvmfwk/inc/vendorplugin.hxx
@@ -36,7 +36,7 @@
what version a JRE must have then it relies on certain features and bug
fixes of that version. Because a version 1.4.2_1 from vendor X may contain
different fixes as the same version from vendor Y it is important to see
-   version an vendor as one entity. One without the other does not guarantee
+   version and vendor as one entity. One without the other does not guarantee
the existence of a particular set of features or bug fixes. An 
implementation
of this API may support multiple vendors. 

@@ -83,11 +83,9 @@ typedef enum
 [in] only JREs from this vendor are examined. This parameter always 
contains
 a vendor string. That is, the string it is not empty.
 @param sMinVersion
-[in] represents the minimum version of a JRE. The string can be empty 
but
-a null pointer is not allowed.
+[in] represents the minimum version of a JRE. The string can be empty.
 @param sMaxVersion
-[in] represents the maximum version of a JRE. The string can be empty 
but
-a null pointer is not allowed.
+[in] represents the maximum version of a JRE. The string can be empty.
 @param arExcludeList
 [in] contains a list of "bad" versions. JREs which have one 
of these
 versions must not be returned by this function. It can be NULL.
@@ -111,9 +109,9 @@ typedef enum
 version strings.
  */
 javaPluginError jfw_plugin_getAllJavaInfos(
-rtl_uString *sVendor,
-rtl_uString *sMinVersion,
-rtl_uString *sMaxVersion,
+OUString const& sVendor,
+OUString const& sMinVersion,
+OUString const& sMaxVersion,
 rtl_uString * * arExcludeList,
 sal_Int32  nSizeExcludeList,
 JavaInfo*** parJavaInfo,
@@ -162,10 +160,10 @@ javaPluginError jfw_plugin_getAllJavaInfos(
a vendor which is not supported by this API implementation.
  */
 javaPluginError jfw_plugin_getJavaInfoByPath(
-rtl_uString *sLocation,
-rtl_uString *sVendor,
-rtl_uString *sMinVersion,
-rtl_uString *sMaxVersion,
+OUString const& sLocation,
+OUString const& sVendor,
+OUString const& sMinVersion,
+OUString const& sMaxVersion,
 rtl_uString * *arExcludeList,
 sal_Int32  nSizeExcludeList,
 JavaInfo ** ppInfo);
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index dd6335e..d0dac26 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -210,11 +210,9 @@ extern "C" void JNICALL abort_handler()
 @param aVendorInfo
 [in]  the object to be inspected whether it meets the version 
requirements
 @param sMinVersion
-[in] represents the minimum version of a JRE. The string can be empty 
but
-a null pointer is not allowed.
+[in] represents the minimum version of a JRE. The string can be empty.
 @param sMaxVersion
-[in] represents the maximum version of a JRE. The string can be empty 
but
-a null pointer is not allowed.
+[in] represents the maximum version of a JRE. The string can be empty.
 @param arExcludeList
 [in] contains a list of "bad" versions. JREs which have one 
of these
 versions must not be returned by this function. It can be NULL.
@@ -232,19 +230,16 @@ extern "C" void JNICALL abort_handler()
  */
 javaPluginError checkJavaVersionRequirements(
 rtl::Reference const & aVendorInfo,
-rtl_uString *sMinVersion,
-rtl_uString *sMaxVersion,
+OUString const& sMinVersion,
+OUString const& sMaxVersion,
 rtl_uString * * arExcludeList,
 sal_Int32  nLenList)
 {
-OUString ouMinVer(sMinVersion);
-OUString ouMaxVer(sMaxVersion);
-
-if (!ouMinVer.isEmpty())
+if (!sMinVersion.isEmpty())
 {
 try
 {
-if (aVendorInfo->compareVersions(ouMinVer) < 0)
+if (aVendorInfo->compareVersions(sMinVersion) < 0)
 return JF

[Libreoffice-commits] core.git: include/sfx2 include/svl

2014-11-22 Thread Michael Weghorn
 include/sfx2/zoomitem.hxx |   10 +-
 include/svl/filerec.hxx   |   14 +++---
 include/svl/mailenum.hxx  |   16 
 include/svl/ownlist.hxx   |   21 +
 include/svl/srchitem.hxx  |   22 +++---
 include/svl/urlbmk.hxx|   18 +++---
 include/svl/zformat.hxx   |6 ++
 7 files changed, 49 insertions(+), 58 deletions(-)

New commits:
commit 55e9fac7e642de3ee7190c3987a40a768172eb9f
Author: Michael Weghorn 
Date:   Sat Nov 22 18:30:38 2014 +0100

fdo#39468 translate German comments

Change-Id: Ic385faed251970c0c686b099023af9efca10a121
Reviewed-on: https://gerrit.libreoffice.org/13040
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/include/sfx2/zoomitem.hxx b/include/sfx2/zoomitem.hxx
index 90c5154..e086653 100644
--- a/include/sfx2/zoomitem.hxx
+++ b/include/sfx2/zoomitem.hxx
@@ -27,10 +27,10 @@
 
 enum SvxZoomType
 {
-SVX_ZOOM_PERCENT,   // GetValue() ist kein besonderer prozentualer Wert
-SVX_ZOOM_OPTIMAL,   // GetValue() entspricht der optimalen Gr"o\se
-SVX_ZOOM_WHOLEPAGE, // GetValue() entspricht der ganzen Seite
-SVX_ZOOM_PAGEWIDTH,  // GetValue() entspricht der Seitenbreite
+SVX_ZOOM_PERCENT,   // GetValue() is no special percentage value
+SVX_ZOOM_OPTIMAL,   // GetValue() corresponds to the optimal size
+SVX_ZOOM_WHOLEPAGE, // GetValue() corresponds to the whole page
+SVX_ZOOM_PAGEWIDTH,  // GetValue() corresponds to the page width
 SVX_ZOOM_PAGEWIDTH_NOBORDER  // GetValue() pagewidth without border
 };
 
@@ -38,7 +38,7 @@ enum SvxZoomType
 
 class SFX2_DLLPUBLIC SvxZoomItem: public SfxUInt16Item
 {
-sal_uInt16  nValueSet;  // erlaubte Werte (siehe #defines 
unten)
+sal_uInt16  nValueSet;  // allowed values (see #defines 
below)
 SvxZoomType eType;
 
 public:
diff --git a/include/svl/filerec.hxx b/include/svl/filerec.hxx
index d078ad1..9bc2922 100644
--- a/include/svl/filerec.hxx
+++ b/include/svl/filerec.hxx
@@ -356,9 +356,9 @@ public:
  *  which stores its own length so that it can be skipped by
  *  older versions and readers that do not known the record type (tag).
  *
- *  It contains multipl contents of the same type (tag) and the same
+ *  It contains multiple contents of the same type (tag) and the same
  *  version, which have been identified once and for all in the
- *  header of the reacord. All contents have a length which is
+ *  header of the record. All contents have a length which is
  *  known in advance and identical.
  *
  *  To be able to guarantee forward and backwards compatibility,
@@ -397,11 +397,11 @@ public:
 class SVL_DLLPUBLIC SfxMultiFixRecordWriter: public SfxSingleRecordWriter
 {
 protected:
-sal_uInt32  _nContentStartPos;  /*  Startposition des jeweiligen
-Contents - nur bei DBG_UTIL
-und f"ur Subklassen */
-sal_uInt32  _nContentSize;  //  Gr"o\se jedes Contents
-sal_uInt16  _nContentCount; //  jeweilige Anzahl der Contents
+sal_uInt32  _nContentStartPos;  /*  start position of respective
+content - only with DBG_UTIL
+and for subclasses */
+sal_uInt32  _nContentSize;  //  size of each content
+sal_uInt16  _nContentCount; //  number of contents
 
 SfxMultiFixRecordWriter( sal_uInt8 nRecordType,
  SvStream *pStream,
diff --git a/include/svl/mailenum.hxx b/include/svl/mailenum.hxx
index 70581f7..ceee806 100644
--- a/include/svl/mailenum.hxx
+++ b/include/svl/mailenum.hxx
@@ -66,16 +66,16 @@ enum MailReceiverRole
 
 enum MailAction
 {
-MAIL_ACTION_DYING,  // Server stirbt
-MAIL_ACTION_SEND,   // Mail wurde versendet
-MAIL_ACTION_READ,   // Mail wurde als gelesen gekennzeichnet
-MAIL_ACTION_REMOVED,// Mail wurde gel"oscht
-MAIL_ACTION_UPDATED,// alle Mails wurden neu eingelesen
-MAIL_ACTION_NEXT,   // Sprung zur n"achsten Mail
-MAIL_ACTION_PREV// Sprung zur vorherigen Mail
+MAIL_ACTION_DYING,  // server dies
+MAIL_ACTION_SEND,   // mail was sent
+MAIL_ACTION_READ,   // mail was marked as read
+MAIL_ACTION_REMOVED,// mail was deleted
+MAIL_ACTION_UPDATED,// all mails were updated
+MAIL_ACTION_NEXT,   // jump to next mail
+MAIL_ACTION_PREV// jump to previous mail
 };
 
-// Textformat zum Versenden von Nachrichten --
+// text format for the sending of messages --
 
 #define TXTFORMAT_ASCII ((sal_uInt8)0x01)
 #define TXTFORMAT_HTML  ((sal_uInt8)0x02)
diff --git a/include/svl/ownlist.hxx b/include/svl/

[Libreoffice-commits] core.git: jvmfwk/plugins

2015-01-08 Thread Michael Weghorn
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |   24 +---
 1 file changed, 7 insertions(+), 17 deletions(-)

New commits:
commit bb65b09678d4b6da657f6ccc180d8ff5096e3006
Author: Michael Weghorn 
Date:   Mon Dec 15 20:27:00 2014 +0100

avoid copying of vector

Change-Id: I06ce27f4fa52637bbeaa6d84fdecdf81364e15a7
Reviewed-on: https://gerrit.libreoffice.org/13489
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index de1d979..a73a007 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -456,13 +456,13 @@ javaPluginError jfw_plugin_getJavaInfosFromPath(
 vector> vecInfosFromPath;
 addJavaInfosFromPath(infos, vecInfosFromPath);
 
-vector > vecVerifiedInfos;
+vector vecVerifiedInfos;
 
-// copy JREs that meet version requirements to vecVerifiedInfos
+// copy infos of JREs that meet version requirements to vecVerifiedInfos
 typedef vector >::iterator it;
 for (it i= vecInfosFromPath.begin(); i != vecInfosFromPath.end(); ++i)
 {
-const rtl::Reference& cur = *i;
+const rtl::Reference& currentInfo = *i;
 
 typedef std::vector>::const_iterator 
ci_pl;
 for (ci_pl vendorInfo = vecVendorInfos.begin(); vendorInfo != 
vecVendorInfos.end(); ++vendorInfo)
@@ -470,10 +470,10 @@ javaPluginError jfw_plugin_getJavaInfosFromPath(
 const OUString& vendor = vendorInfo->first;
 jfw::VersionInfo versionInfo = vendorInfo->second;
 
-if (vendor.equals(cur->getVendor()))
+if (vendor.equals(currentInfo->getVendor()))
 {
 javaPluginError errorcode = checkJavaVersionRequirements(
-cur,
+currentInfo,
 versionInfo.sMinVersion,
 versionInfo.sMaxVersion,
 versionInfo.getExcludeVersions(),
@@ -481,7 +481,7 @@ javaPluginError jfw_plugin_getJavaInfosFromPath(
 
 if (errorcode == JFW_PLUGIN_E_NONE)
 {
-vecVerifiedInfos.push_back(*i);
+vecVerifiedInfos.push_back(createJavaInfo(currentInfo));
 }
 }
 }
@@ -490,17 +490,7 @@ javaPluginError jfw_plugin_getJavaInfosFromPath(
 if (vecVerifiedInfos.empty())
 return JFW_PLUGIN_E_NO_JRE;
 
-// Now vecVerifiedInfos contains all those JREs which meet the version 
requirements
-// Transfer them into the vector that is passed out.
-vector infosFromPath;
-
-typedef vector >::const_iterator cit;
-for (cit ii = vecVerifiedInfos.begin(); ii != vecVerifiedInfos.end(); ++ii)
-{
-infosFromPath.push_back(createJavaInfo(*ii));
-}
-
-javaInfosFromPath = infosFromPath;
+javaInfosFromPath = vecVerifiedInfos;
 
 return JFW_PLUGIN_E_NONE;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: stoc/source svl/source svtools/source

2015-01-11 Thread Michael Weghorn
 stoc/source/defaultregistry/defaultregistry.cxx|6 ++
 stoc/source/implementationregistration/implreg.cxx |3 +--
 svl/source/passwordcontainer/passwordcontainer.cxx |5 ++---
 svl/source/svdde/ddesvr.cxx|6 ++
 svtools/source/contnr/treelistbox.cxx  |   10 --
 svtools/source/contnr/treelistentry.cxx|3 +--
 svtools/source/control/calendar.cxx|9 +++--
 svtools/source/control/headbar.cxx |3 ++-
 svtools/source/control/roadmap.cxx |   10 +++---
 svtools/source/control/ruler.cxx   |   13 +
 svtools/source/control/tabbar.cxx  |9 -
 svtools/source/control/toolbarmenu.cxx |2 +-
 svtools/source/misc/imap.cxx   |6 +++---
 svtools/source/misc/imap2.cxx  |6 ++
 14 files changed, 35 insertions(+), 56 deletions(-)

New commits:
commit d5f48d742ac1fea9fd341244bbcea09bcd78b476
Author: Michael Weghorn 
Date:   Sat Jan 10 15:52:17 2015 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I46b9293eed0cba2ebca119cc1fb0a6334ea66308
Reviewed-on: https://gerrit.libreoffice.org/13844
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/stoc/source/defaultregistry/defaultregistry.cxx 
b/stoc/source/defaultregistry/defaultregistry.cxx
index 37ff4a47..aff3f14 100644
--- a/stoc/source/defaultregistry/defaultregistry.cxx
+++ b/stoc/source/defaultregistry/defaultregistry.cxx
@@ -822,7 +822,6 @@ Sequence< Reference< XRegistryKey > > SAL_CALL 
NestedKeyImpl::openKeys(  )
 }
 
 Sequence< Reference > retSeq(local + def - len);
-boolinsert = true;
 OUStringname;
 sal_Int32   lastIndex;
 
@@ -838,7 +837,7 @@ Sequence< Reference< XRegistryKey > > SAL_CALL 
NestedKeyImpl::openKeys(  )
 sal_uInt32 k = local;
 for (i=0; i < def; i++)
 {
-insert = true;
+bool insert = true;
 
 for (j=0 ; j < local; j++)
 {
@@ -902,7 +901,6 @@ Sequence< OUString > SAL_CALL NestedKeyImpl::getKeyNames(  )
 }
 
 Sequence  retSeq(local + def - len);
-boolinsert = true;
 
 for (i=0; i < local; i++)
 {
@@ -912,7 +910,7 @@ Sequence< OUString > SAL_CALL NestedKeyImpl::getKeyNames(  )
 sal_uInt32 k = local;
 for (i=0; i < def; i++)
 {
-insert = true;
+bool insert = true;
 
 for (j=0 ; j < local; j++)
 {
diff --git a/stoc/source/implementationregistration/implreg.cxx 
b/stoc/source/implementationregistration/implreg.cxx
index d0627d2..90d3ce2 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -505,13 +505,12 @@ static void deleteUserLink(const Reference < XRegistryKey 
>& xRootKey,
 linkName + spool().colon_old );
 if (xOldKey.is())
 {
-bool hasNoImplementations = false;
-
 if (xOldKey->getValueType() == RegistryValueType_ASCIILIST)
 {
 Sequence implEntries = xOldKey->getAsciiListValue();
 sal_Int32 length = implEntries.getLength();
 sal_Int32 equals = 0;
+bool hasNoImplementations = false;
 
 for (sal_Int32 i = 0; i < length; i++)
 {
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx 
b/svl/source/passwordcontainer/passwordcontainer.cxx
index aadd1f98..6588a4d 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -50,14 +50,13 @@ using namespace com::sun::star::ucb;
 static OUString createIndex( vector< OUString > lines )
 {
 OString aResult;
-const sal_Char* pLine;
 
 for( unsigned int i = 0; i < lines.size(); i++ )
 {
 if( i )
 aResult += OString( "__" );
 OString line = OUStringToOString( lines[i], RTL_TEXTENCODING_UTF8 );
-pLine = line.getStr();
+const sal_Char* pLine = line.getStr();
 
 while( *pLine )
 {
@@ -852,7 +851,6 @@ OUString PasswordContainer::GetMasterPassword( const 
Reference< XInteractionHand
 if( m_aMasterPasswd.isEmpty() && aHandler.is() )
 {
 OUString aEncodedMP;
-bool bAskAgain = false;
 bool bDefaultPassword = false;
 
 if( !m_pStorageFile->getEncodedMP( aEncodedMP ) )
@@ -865,6 +863,7 @@ OUString PasswordContainer::GetMasterPassword( const 
Reference< XInteractionHand
 
 if ( !bDefaultPassword )
 {
+bool bAskAgain = false;
 do {
 bAskAgain = false;
 
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index 24492be

[Libreoffice-commits] core.git: svx/source

2015-01-14 Thread Michael Weghorn
 svx/source/gallery2/gallery1.cxx  |3 +-
 svx/source/gallery2/galtheme.cxx  |2 -
 svx/source/svdraw/polypolygoneditor.cxx   |3 +-
 svx/source/svdraw/svdedtv2.cxx|2 -
 svx/source/svdraw/svdmark.cxx |3 --
 svx/source/svdraw/svdmrkv.cxx |3 --
 svx/source/table/accessibletableshape.cxx |3 --
 svx/source/tbxctrls/PaletteManager.cxx|2 -
 svx/source/tbxctrls/layctrl.cxx   |3 --
 svx/source/tbxctrls/linectrl.cxx  |3 --
 svx/source/tbxctrls/tbcontrl.cxx  |3 --
 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx |3 --
 svx/source/unodraw/UnoNameItemTable.cxx   |   15 
+++---
 svx/source/unodraw/XPropertyTable.cxx |   15 
+++---
 svx/source/unodraw/unomtabl.cxx   |6 
+---
 svx/source/unodraw/unoshape.cxx   |3 --
 svx/source/xoutdev/_xoutbmp.cxx   |3 +-
 svx/source/xoutdev/xattr.cxx  |3 --
 18 files changed, 30 insertions(+), 48 deletions(-)

New commits:
commit c752d8bdf099b4ba2ef2e145e0d9da42ba7e74d7
Author: Michael Weghorn 
Date:   Wed Jan 14 18:03:58 2015 +

fdo#39440 svx: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I8c63a767c62b3a666ad445a0a3095d1bb1224f5e
Reviewed-on: https://gerrit.libreoffice.org/13908
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index f483f3c..399f145 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -305,7 +305,6 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& 
rBaseURL, bool& rbDirIsReadO
 INetURLObject   aSdgURL( aThmURL); 
aSdgURL.SetExtension( s_sSDG_EXT );
 INetURLObject   aSdvURL( aThmURL ); 
aSdvURL.SetExtension( s_sSDV_EXT );
 OUStringaTitle;
-boolbReadOnly = false;
 
 try
 {
@@ -326,6 +325,8 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& 
rBaseURL, bool& rbDirIsReadO
 
 if( !aTitle.isEmpty() )
 {
+bool bReadOnly = false;
+
 try
 {
 aThmCnt.getPropertyValue( s_sIsReadOnly ) 
>>= bReadOnly;
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 120e8ac..7abdc6d 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -702,12 +702,12 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const 
INetURLObject& rURL, bo
 {
 OUStringaThemeName;
 sal_uInt16  nVersion;
-boolbThemeNameFromResource = false;
 
 pIStm->ReadUInt16( nVersion );
 
 if( nVersion <= 0x00ff )
 {
+bool bThemeNameFromResource = false;
 sal_uInt32  nThemeId = 0;
 
 OString aTmpStr = 
read_uInt16_lenPrefixed_uInt8s_ToOString(*pIStm);
diff --git a/svx/source/svdraw/polypolygoneditor.cxx 
b/svx/source/svdraw/polypolygoneditor.cxx
index d01ce75..594c2ae 100644
--- a/svx/source/svdraw/polypolygoneditor.cxx
+++ b/svx/source/svdraw/polypolygoneditor.cxx
@@ -75,11 +75,12 @@ bool PolyPolygonEditor::SetSegmentsKind(SdrPathSegmentKind 
eKind, const std::set
 {
 // do change at aNewPolyPolygon. Take a look at edge.
 basegfx::B2DPolygon 
aCandidate(maPolyPolygon.getB2DPolygon(nPolyNum));
-bool bCandidateChanged(false);
 const sal_uInt32 nCount(aCandidate.count());
 
 if(nCount && (nPntNum + 1 < nCount || aCandidate.isClosed()))
 {
+bool bCandidateChanged(false);
+
 // it's a valid edge, check control point usage
 const sal_uInt32 nNextIndex((nPntNum + 1) % nCount);
 const bool bContolUsed(aCandidate.areControlPointsUsed()
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index f4e7fb2..5f7850e 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1902,8 +1902,8 @@ SdrObject* SdrEditView::ImpConvertOneObj(SdrObject* p

[Libreoffice-commits] core.git: svx/source

2015-01-14 Thread Michael Weghorn
 svx/source/dialog/_bmpmask.cxx |   11 ---
 svx/source/dialog/dlgctrl.cxx  |   21 +++--
 svx/source/dialog/srchdlg.cxx  |4 +++-
 svx/source/engine3d/float3d.cxx|3 +--
 svx/source/fmcomp/fmgridcl.cxx |3 +--
 svx/source/fmcomp/fmgridif.cxx |3 +--
 svx/source/fmcomp/gridctrl.cxx |3 +--
 svx/source/form/datanavi.cxx   |3 +--
 svx/source/form/fmshimp.cxx|3 +--
 svx/source/form/navigatortree.cxx  |9 +++--
 svx/source/form/navigatortreemodel.cxx |3 +--
 11 files changed, 24 insertions(+), 42 deletions(-)

New commits:
commit ba3f0cfecdddf0275278987a75b5ee620744eb84
Author: Michael Weghorn 
Date:   Wed Jan 14 17:42:29 2015 +

fdo#39440 svx: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I800242bbac3092d2dbaa9098fc6355fe675872e1
Reviewed-on: https://gerrit.libreoffice.org/13906
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 75668ce..4c00773 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -701,16 +701,14 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
 Color   pDstCols[4];
 sal_uIntPtr pTols[4];
 sal_uInt16  nCount = InitColorArrays( pSrcCols, pDstCols, pTols );
-boolpTrans[4];
 
 // If no color is selected, we copy only the Mtf
 if( !nCount )
 aMtf = rMtf;
 else
 {
+boolpTrans[4];
 Color   aCol;
-longnVal;
-longnTol;
 longnR;
 longnG;
 longnB;
@@ -721,7 +719,6 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
 boost::scoped_array pMinB(new long[nCount]);
 boost::scoped_array pMaxB(new long[nCount]);
 sal_uInt16  i;
-boolbReplace;
 
 aMtf.SetPrefSize( rMtf.GetPrefSize() );
 aMtf.SetPrefMapMode( rMtf.GetPrefMapMode() );
@@ -729,9 +726,9 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
 // Prepare Color comparison array
 for( i = 0; i < nCount; i++ )
 {
-nTol = ( pTols[i] * 255L ) / 100L;
+long nTol = ( pTols[i] * 255L ) / 100L;
 
-nVal = ( (long) pSrcCols[i].GetRed() );
+long nVal = ( (long) pSrcCols[i].GetRed() );
 pMinR[i] = std::max( nVal - nTol, 0L );
 pMaxR[i] = std::min( nVal + nTol, 255L );
 
@@ -751,7 +748,7 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
 {
 MetaAction* pAction = rMtf.GetAction( nAct );
 
-bReplace = false;
+bool bReplace = false;
 
 switch( pAction->GetType() )
 {
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 2ecdcf8..c03b688 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1151,12 +1151,11 @@ void ColorLB::Fill( const XColorListRef &pColorTab )
 return;
 
 long nCount = pColorTab->Count();
-XColorEntry* pEntry;
 SetUpdateMode( false );
 
 for( long i = 0; i < nCount; i++ )
 {
-pEntry = pColorTab->GetColor( i );
+XColorEntry* pEntry = pColorTab->GetColor( i );
 InsertEntry( pEntry->GetColor(), pEntry->GetName() );
 }
 
@@ -1181,12 +1180,11 @@ void ColorLB::Modify( const XColorEntry& rEntry, 
sal_Int32 nPos )
 void FillAttrLB::Fill( const XColorListRef &pColorTab )
 {
 long nCount = pColorTab->Count();
-XColorEntry* pEntry;
 SetUpdateMode( false );
 
 for( long i = 0; i < nCount; i++ )
 {
-pEntry = pColorTab->GetColor( i );
+XColorEntry* pEntry = pColorTab->GetColor( i );
 InsertEntry( pEntry->GetColor(), pEntry->GetName() );
 }
 
@@ -1272,12 +1270,11 @@ void HatchingLB::Modify( const XHatchEntry& rEntry, 
sal_Int32 nPos, const Bitmap
 void FillAttrLB::Fill( const XHatchListRef &pList )
 {
 long nCount = pList->Count();
-XHatchEntry* pEntry;
 ListBox::SetUpdateMode( false );
 
 for( long i = 0; i < nCount; i++ )
 {
-pEntry = pList->GetHatch( i );
+XHatchEntry* pEntry = pList->GetHatch( i );
 const Bitmap aBitmap = pList->GetUiBitmap( i );
 if( !aBitmap.IsEmpty() )
 ListBox::InsertEntry(pEntry->GetName(), Image(aBitmap));
@@ -1315,14 +1312,13 @@ void GradientLB::Fill( const XGradientListRef &pList )
 return;
 
 mpList = pList;
-XGradientEntry* pEntry;
 long nCount = pList->Count();
 
 SetUpdateMode( false );
 
 for( long i = 0; i < nCount; i++ )
 {
-pEntry = pList->GetGradient( i );
+XGradient

[Libreoffice-commits] core.git: sw/source

2015-01-16 Thread Michael Weghorn
 sw/source/core/access/accmap.cxx|3 +--
 sw/source/core/access/accpara.cxx   |3 ++-
 sw/source/core/access/acctable.cxx  |   14 ++
 sw/source/core/bastyp/bparr.cxx |3 +--
 sw/source/core/bastyp/init.cxx  |4 +++-
 sw/source/core/crsr/crstrvl.cxx |7 +--
 sw/source/core/doc/CntntIdxStore.cxx|2 +-
 sw/source/core/doc/DocumentContentOperationsManager.cxx |3 +--
 sw/source/core/doc/DocumentStatisticsManager.cxx|2 +-
 sw/source/core/doc/doc.cxx  |   14 ++
 sw/source/core/doc/docbasic.cxx |4 +++-
 sw/source/core/doc/docchart.cxx |4 +++-
 sw/source/core/doc/docdraw.cxx  |3 ++-
 sw/source/core/doc/docedt.cxx   |3 ++-
 sw/source/core/doc/docfld.cxx   |2 +-
 sw/source/core/doc/doclay.cxx   |   12 +++-
 sw/source/core/doc/docnum.cxx   |3 ++-
 sw/source/core/doc/fmtcol.cxx   |2 +-
 sw/source/core/doc/gctable.cxx  |4 +++-
 sw/source/core/doc/number.cxx   |7 ---
 sw/source/core/doc/tblrwcl.cxx  |6 +++---
 sw/source/core/docnode/ndsect.cxx   |4 ++--
 sw/source/core/docnode/ndtbl.cxx|   10 --
 sw/source/core/docnode/node.cxx |8 +---
 24 files changed, 73 insertions(+), 54 deletions(-)

New commits:
commit ccaa5519cb978a640caa22ce2bcbd6c54fa44e26
Author: Michael Weghorn 
Date:   Thu Jan 15 17:16:31 2015 +

fdo#39440 sw: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I4c55c109f81407d5383932e4254e0f5f61d12cd7
Reviewed-on: https://gerrit.libreoffice.org/13939
Tested-by: Jenkins 
Reviewed-by: Björn Michaelsen 

diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 40eebd5..5b41a9c 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1277,13 +1277,12 @@ void SwAccessibleMap::InvalidateShapeInParaSelection()
 const SwFrm *pFrm = (*aIter).first;
 if(pFrm->IsFlyFrm())
 {
-bool bFrmChanged = false;
 uno::Reference < XAccessible > xAcc = (*aIter).second;
 
 if(xAcc.is())
 {
 SwAccessibleFrameBase *pAccFrame = (static_cast< 
SwAccessibleFrameBase * >(xAcc.get()));
-bFrmChanged = pAccFrame->SetSelectedState( true );
+bool bFrmChanged = pAccFrame->SetSelectedState( true );
 if (bFrmChanged)
 {
 const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm 
* >( pFrm );
diff --git a/sw/source/core/access/accpara.cxx 
b/sw/source/core/access/accpara.cxx
index b16f06a..e01e23d 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -3390,7 +3390,6 @@ sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( 
sal_Int32 selectionInd
 
 if(selectionIndex < 0) return sal_False;
 
-bool bRet = false;
 sal_Int32 nSelected = selectionIndex;
 
 // get the selection, and test whether it affects our text node
@@ -3398,6 +3397,8 @@ sal_Bool SAL_CALL SwAccessibleParagraph::removeSelection( 
sal_Int32 selectionInd
 
 if( pCrsr != NULL )
 {
+bool bRet = false;
+
 // get SwPosition for my node
 const SwTxtNode* pNode = GetTxtNode();
 sal_uLong nHere = pNode->GetIndex();
diff --git a/sw/source/core/access/acctable.cxx 
b/sw/source/core/access/acctable.cxx
index 629e08d..3582962 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -1791,11 +1791,10 @@ sal_Bool SAL_CALL SwAccessibleTable::selectRow( 
sal_Int32 row )
 if( isAccessibleColumnSelected( row ) )
 return sal_True;
 
-long lCol, lColumnCount, lChildIndex;
-lColumnCount = getAccessibleColumnCount();
-for(lCol = 0; lCol < lColumnCount; lCol ++)
+long lColumnCount = getAccessibleColumnCount();
+for(long lCol = 0; lCol < lColumnCount; lCol ++)
 {
-lChildIndex = getAccessibleIndex(row, lCol);
+long lChildIndex = getAccessibleIndex(row, lCol);
 selectAccessibleChild(lChildIndex);
 }
 
@@ -1809,12 +1808,11 @@ sal_Bool SAL_CALL SwAccessibleTable::selectColumn( 
sal_Int32 column )
 if( isAccessibleColumnSelected( column ) )
 return sal_True;
 
-long lRow, lRowCount, lChildIndex;
-lRowCount = getAccessibleRowCount();
+long lRowCount = getAccessibleRowCount()

[Libreoffice-commits] core.git: sw/source

2015-01-18 Thread Michael Weghorn
 sw/source/core/docnode/nodes.cxx|6 ++
 sw/source/core/docnode/section.cxx  |3 ++-
 sw/source/core/edit/acorrect.cxx|2 +-
 sw/source/core/edit/autofmt.cxx |3 +--
 sw/source/core/edit/edfld.cxx   |8 ++--
 sw/source/core/fields/docufld.cxx   |4 +++-
 sw/source/core/fields/expfld.cxx|   10 --
 sw/source/core/frmedt/fecopy.cxx|4 +++-
 sw/source/core/frmedt/fefly1.cxx|3 +--
 sw/source/core/frmedt/tblsel.cxx|   10 --
 sw/source/core/graphic/ndgrf.cxx|3 ++-
 sw/source/core/layout/pagechg.cxx   |3 +--
 sw/source/core/layout/tabfrm.cxx|   10 --
 sw/source/core/layout/trvlfrm.cxx   |4 ++--
 sw/source/core/layout/wsfrm.cxx |7 +++
 sw/source/core/swg/SwXMLTextBlocks1.cxx |3 ++-
 sw/source/core/table/swnewtable.cxx |9 +++--
 sw/source/core/table/swtable.cxx|3 +--
 18 files changed, 49 insertions(+), 46 deletions(-)

New commits:
commit d1aecd4353bd6ac3961a30df67de78f4b8f0a66b
Author: Michael Weghorn 
Date:   Fri Jan 16 13:00:37 2015 +

fdo#39440 sw: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: Iccdd4bebd46f274697597b13746c820aaadc99a4
Reviewed-on: https://gerrit.libreoffice.org/13960
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index b9c91ad..0530e2c 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -96,11 +96,10 @@ SwNodes::~SwNodes()
 delete pOutlineNds;
 
 {
-SwNode *pNode;
 SwNodeIndex aNdIdx( *this );
 while( true )
 {
-pNode = &aNdIdx.GetNode();
+SwNode *pNode = &aNdIdx.GetNode();
 if( pNode == pEndOfContent )
 break;
 
@@ -1023,7 +1022,6 @@ void SwNodes::SectionUp(SwNodeRange *pRange)
  */
 void SwNodes::SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & 
aEnd )
 {
-SwNode * pAktNode;
 SwNodeIndex aTmpIdx( aStart, +1 );
 // array forms a stack, holding all StartOfSelections
 SwSttNdPtrs aSttNdStack;
@@ -1034,7 +1032,7 @@ void SwNodes::SectionUpDown( const SwNodeIndex & aStart, 
const SwNodeIndex & aEn
 // (the indices are updated from the end node backwards to the start)
 for( ;; ++aTmpIdx )
 {
-pAktNode = &aTmpIdx.GetNode();
+SwNode * pAktNode = &aTmpIdx.GetNode();
 pAktNode->pStartOfSection = aSttNdStack[ aSttNdStack.size()-1 ];
 
 if( pAktNode->GetStartNode() )
diff --git a/sw/source/core/docnode/section.cxx 
b/sw/source/core/docnode/section.cxx
index 7e8953e..909edf4 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -1129,7 +1129,6 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, 
SwSectionNode& rSectNd )
 return ;
 
 const OUString sName( pDShell->GetMedium()->GetName() );
-SwBaseLink* pBLink;
 const OUString sMimeType( SotExchange::GetFormatMimeType( FORMAT_FILE ));
 uno::Any aValue;
 aValue <<= sName; // Arbitrary name
@@ -1137,6 +1136,8 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, 
SwSectionNode& rSectNd )
 const ::sfx2::SvBaseLinks& rLnks = 
pDoc->getIDocumentLinksAdministration().GetLinkManager().GetLinks();
 for( sal_uInt16 n = rLnks.size(); n; )
 {
+SwBaseLink* pBLink;
+
 ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]);
 if( pLnk && pLnk != &rUpdLnk &&
 OBJECT_CLIENT_FILE == pLnk->GetObjType() &&
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 216a033..ff480c7 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -487,7 +487,6 @@ void SwDontExpandItem::RestoreDontExpandItems( const 
SwPosition& rPos )
 {
 const size_t nSize = pTxtNd->GetpSwpHints()->Count();
 sal_Int32 nAttrStart;
-const sal_Int32* pAttrEnd;
 
 for( size_t n = 0; n < nSize; ++n )
 {
@@ -496,6 +495,7 @@ void SwDontExpandItem::RestoreDontExpandItems( const 
SwPosition& rPos )
 if( nAttrStart > nStart )   // beyond the area
 break;
 
+const sal_Int32* pAttrEnd;
 if( 0 != ( pAttrEnd = pHt->End() ) &&
 ( ( nAttrStart < nStart &&
 ( pHt->DontExpand() ? nStart < *pAttrEnd
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 4b81d4c..9fd46c1 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1192,9 +1192,8 @@ void SwAutoFormat::DelMoreLinesBlanks( bool 
bWithLineBreak

[Libreoffice-commits] core.git: tools/source ucb/source unoxml/source vbahelper/source

2015-01-18 Thread Michael Weghorn
 tools/source/generic/bigint.cxx |6 ++
 tools/source/generic/poly.cxx   |5 ++---
 ucb/source/sorter/sortresult.cxx|6 ++
 ucb/source/ucp/ftp/test_ftpurl.cxx  |4 ++--
 unoxml/source/xpath/xpathapi.cxx|5 ++---
 vbahelper/source/vbahelper/vbapagesetupbase.cxx |   20 
 6 files changed, 22 insertions(+), 24 deletions(-)

New commits:
commit 5901827bd44dc3600bf66c83882e6847439d59d6
Author: Michael Weghorn 
Date:   Sat Jan 17 00:37:31 2015 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I1cd8b118e2598b8b18fb445851a3bb41e554267b
Reviewed-on: https://gerrit.libreoffice.org/13967
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx
index 7804597..cf0df72 100644
--- a/tools/source/generic/bigint.cxx
+++ b/tools/source/generic/bigint.cxx
@@ -310,7 +310,6 @@ void BigInt::MultLong( const BigInt& rB, BigInt& rErg ) 
const
 void BigInt::DivLong( const BigInt& rB, BigInt& rErg ) const
 {
 inti, j;
-long   nTmp;
 sal_uInt16 nK, nQ, nMult;
 short  nLenB  = rB.nLen;
 short  nLenB1 = rB.nLen - 1;
@@ -329,7 +328,7 @@ void BigInt::DivLong( const BigInt& rB, BigInt& rErg ) const
 
 for (j = aTmpA.nLen - 1; j >= nLenB; j--)
 { // guess divisor
-nTmp = ( (long)aTmpA.nNum[j] << 16 ) + aTmpA.nNum[j - 1];
+long nTmp = ( (long)aTmpA.nNum[j] << 16 ) + aTmpA.nNum[j - 1];
 if (aTmpA.nNum[j] == aTmpB.nNum[nLenB1])
 nQ = 0x;
 else
@@ -379,7 +378,6 @@ void BigInt::DivLong( const BigInt& rB, BigInt& rErg ) const
 void BigInt::ModLong( const BigInt& rB, BigInt& rErg ) const
 {
 short  i, j;
-long   nTmp;
 sal_uInt16 nK, nQ, nMult;
 short  nLenB  = rB.nLen;
 short  nLenB1 = rB.nLen - 1;
@@ -398,7 +396,7 @@ void BigInt::ModLong( const BigInt& rB, BigInt& rErg ) const
 
 for (j = aTmpA.nLen - 1; j >= nLenB; j--)
 { // Guess divisor
-nTmp = ( (long)aTmpA.nNum[j] << 16 ) + aTmpA.nNum[j - 1];
+long nTmp = ( (long)aTmpA.nNum[j] << 16 ) + aTmpA.nNum[j - 1];
 if (aTmpA.nNum[j] == aTmpB.nNum[nLenB1])
 nQ = 0x;
 else
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index e949835..5df7ef3 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1069,7 +1069,6 @@ void Polygon::Rotate( const Point& rCenter, double fSin, 
double fCos )
 {
 ImplMakeUnique();
 
-long nX, nY;
 long nCenterX = rCenter.X();
 long nCenterY = rCenter.Y();
 
@@ -1077,8 +1076,8 @@ void Polygon::Rotate( const Point& rCenter, double fSin, 
double fCos )
 {
 Point& rPt = mpImplPolygon->mpPointAry[ i ];
 
-nX = rPt.X() - nCenterX;
-nY = rPt.Y() - nCenterY;
+const long nX = rPt.X() - nCenterX;
+const long nY = rPt.Y() - nCenterY;
 rPt.X() = (long) FRound( fCos * nX + fSin * nY ) + nCenterX;
 rPt.Y() = -(long) FRound( fSin * nX - fCos * nY ) + nCenterY;
 }
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index 7e1dde0..d5fcabf 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -1278,12 +1278,11 @@ sal_IntPtr SortedResultSet::FindPos( SortListData 
*pEntry,
 sal_IntPtr nEnd   = _nEnd;
 sal_IntPtr nMid = 0, nCompare = 0;
 
-SortListData*pMid;
 
 while ( nStart <= nEnd )
 {
 nMid = ( nEnd - nStart ) / 2 + nStart;
-pMid = maS2O.GetData( nMid );
+SortListData *pMid = maS2O.GetData( nMid );
 nCompare = Compare( pEntry, pMid );
 
 if ( !nCompare )
@@ -1771,12 +1770,11 @@ void SortedResultSet::ResortModified( EventList* pList )
 void SortedResultSet::ResortNew( EventList* pList )
 {
 sal_IntPtri, j, nNewPos, nVal;
-SortListData*pData;
 
 try {
 for ( i = mnLastSort; i<(sal_IntPtr)maS2O.Count(); i++ )
 {
-pData = (SortListData*) maModList.GetObject( i );
+SortListData *pData = (SortListData*) maModList.GetObject( i );
 nNewPos = FindPos( pData, 1, mnLastSort );
 if ( nNewPos != i )
 {
diff --git a/ucb/source/ucp/ftp/test_ftpurl.cxx 
b/ucb/source/ucp/ftp/test_ftpurl.cxx
index bbc99ca..b93d2b0 100644
--- a/ucb/source/ucp/ftp/test_ftpurl.cxx
+++ b/ucb/source/ucp/ftp/test_ftpurl.cxx
@@ -245,7 +245,7 @@ int test_ftpopen(void)
 
 FILE* file = url.open();
 if(file) {
-int nbuf,ndest;
+int nbuf;
 const int bffsz = 256;
 char buff[bffsz];
 char *dest = (char*) malloc(sizeof(char));
@@ -254,7 +254,7 @@ int test_ftpopen(void)
 memset((void*)buff, 0, bffsz);
   

[Libreoffice-commits] core.git: sw/source

2015-01-18 Thread Michael Weghorn
 sw/source/core/view/vnew.cxx|4 ++--
 sw/source/core/view/vprint.cxx  |6 --
 sw/source/filter/html/htmlflywriter.cxx |6 --
 sw/source/filter/html/htmlforw.cxx  |3 ++-
 sw/source/filter/html/htmlgrin.cxx  |9 +
 sw/source/filter/ww8/rtfexport.cxx  |8 +---
 sw/source/filter/ww8/ww8atr.cxx |8 
 sw/source/filter/ww8/ww8par2.cxx|6 ++
 sw/source/filter/ww8/ww8par3.cxx|3 +--
 9 files changed, 29 insertions(+), 24 deletions(-)

New commits:
commit a1fb4ac1991a8da2e527b64a0a01a88a8f2959e3
Author: Michael Weghorn 
Date:   Fri Jan 16 13:50:00 2015 +

fdo#39440 sw: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I7cbc1908d0e3c84f5864db34984d0740db891aef
Reviewed-on: https://gerrit.libreoffice.org/13962
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index 6fef158..31d0de4 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -309,14 +309,14 @@ SwViewShell::~SwViewShell()
 if( mpDoc && GetWin() )
 {
 SwNodes& rNds = mpDoc->GetNodes();
-SwGrfNode *pGNd;
 
 SwStartNode *pStNd;
 SwNodeIndex aIdx( *rNds.GetEndOfAutotext().StartOfSectionNode(), 1 
);
 while ( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
 {
 ++aIdx;
-if ( 0 != ( pGNd = aIdx.GetNode().GetGrfNode() ) )
+SwGrfNode *pGNd = aIdx.GetNode().GetGrfNode();
+if ( 0 != pGNd )
 {
 if( pGNd->IsAnimated() )
 {
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 70eb9c3..ef1d456 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -333,11 +333,13 @@ SwDoc * SwViewShell::FillPrtDoc( SwDoc *pPrtDoc, const 
SfxPrinter* pPrt)
 if (pPrt)
 pPrtDoc->getIDocumentDeviceAccess().setPrinter( new SfxPrinter(*pPrt), 
true, true );
 
-const SfxPoolItem* pCpyItem;
 const SfxItemPool& rPool = GetAttrPool();
 for( sal_uInt16 nWh = POOLATTR_BEGIN; nWh < POOLATTR_END; ++nWh )
-if( 0 != ( pCpyItem = rPool.GetPoolDefaultItem( nWh ) ) )
+{
+const SfxPoolItem* pCpyItem = rPool.GetPoolDefaultItem( nWh );
+if( 0 != pCpyItem )
 pPrtDoc->GetAttrPool().SetPoolDefaultItem( *pCpyItem );
+}
 
 // JP 29.07.99 - Bug 67951 - set all Styles from the SourceDoc into
 //  the PrintDoc - will be replaced!
diff --git a/sw/source/filter/html/htmlflywriter.cxx 
b/sw/source/filter/html/htmlflywriter.cxx
index 34c3f2d..dfbb5d0 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -1000,12 +1000,13 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& 
aHtml, const SwFrmFmt& rF
 // Umlauf fuer absatzgeb. Grafiken als  in den String
 // schreiben
 
-const sal_Char* pSurroundString = 0;
 if( (nFrameOptions & HTML_FRMOPT_BRCLEAR) &&
 ((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) ||
  (FLY_AT_CHAR == rFrmFmt.GetAnchor().GetAnchorId())) &&
 SfxItemState::SET == rItemSet.GetItemState( RES_SURROUND, true, &pItem 
))
 {
+const sal_Char* pSurroundString = 0;
+
 const SwFmtSurround* pSurround = static_cast(pItem);
 sal_Int16 eHoriOri = rFrmFmt.GetHoriOrient().GetHoriOrient();
 SwSurround eSurround = pSurround->GetSurround();
@@ -1911,11 +1912,12 @@ void SwHTMLWriter::CollectLinkTargets()
 {
 const SwFmtINetFmt* pINetFmt;
 const SwTxtINetFmt* pTxtAttr;
-const SwTxtNode* pTxtNd;
 
 sal_uInt32 n, nMaxItems = pDoc->GetAttrPool().GetItemCount2( 
RES_TXTATR_INETFMT );
 for( n = 0; n < nMaxItems; ++n )
 {
+const SwTxtNode* pTxtNd;
+
 if( 0 != (pINetFmt = static_cast(pDoc->GetAttrPool().GetItem2(
 RES_TXTATR_INETFMT, n ) ) ) &&
 0 != ( pTxtAttr = pINetFmt->GetTxtINetFmt()) &&
diff --git a/sw/source/filter/html/htmlforw.cxx 
b/sw/source/filter/html/htmlforw.cxx
index ea90350..2e95323 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -548,9 +548,10 @@ void SwHTMLWriter::OutHiddenControls(
 {
 sal_Int32 nCount = rFormComps->getCount();
 sal_Int32 nPos = 0;
-bool bDone = false;
 if( rPropSet.is() )
 {
+bool bDone = false;
+
 uno::Reference< form::XFormComponent > xFC( rPropSet, uno::UNO_QUERY );
 for( nPos=0; !bDone && nPos < nCount; nPos++ )
 {
diff --git a/sw/source/filter/html/htmlgrin.cxx 
b/sw/source/filter/html/htmlgrin.cxx
index 808e0ea..7da8891 100644
--- a/sw/source/filt

[Libreoffice-commits] core.git: vcl/source

2015-01-18 Thread Michael Weghorn
 vcl/source/font/PhysicalFontCollection.cxx |3 +--
 vcl/source/fontsubset/sft.cxx  |   15 ---
 vcl/source/fontsubset/ttcr.cxx |   13 -
 vcl/source/gdi/animate.cxx |4 +---
 vcl/source/gdi/impvect.cxx |6 ++
 vcl/source/gdi/octree.cxx  |   20 
 vcl/source/glyphs/graphite_layout.cxx  |3 +--
 vcl/source/outdev/gradient.cxx |   12 
 vcl/source/window/builder.cxx  |3 +--
 vcl/source/window/floatwin.cxx |3 +--
 10 files changed, 31 insertions(+), 51 deletions(-)

New commits:
commit 5f01eb5d7a3927d31b7dd268562a59e3dacdd8e8
Author: Michael Weghorn 
Date:   Sat Jan 17 01:18:38 2015 +0100

fdo#39440 vcl: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: Ibebfe89ad1874f5fa9e20fb76a534d9c2da01e3f
Reviewed-on: https://gerrit.libreoffice.org/13969
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/vcl/source/font/PhysicalFontCollection.cxx 
b/vcl/source/font/PhysicalFontCollection.cxx
index 6754e1b..5f51a3f 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -490,7 +490,6 @@ PhysicalFontFamily* 
PhysicalFontCollection::ImplFindByAttributes( sal_uLong nSea
 InitMatchData();
 PhysicalFontFamily* pFoundData = NULL;
 
-longnTestMatch;
 longnBestMatch = 4;
 sal_uLong   nBestType = 0;
 
@@ -517,7 +516,7 @@ PhysicalFontFamily* 
PhysicalFontCollection::ImplFindByAttributes( sal_uLong nSea
 //  Otherstyle, +Special, +Decorative,
 //   1000   Typewriter, Rounded, Gothic, Schollbook
 //100
-nTestMatch = 0;
+long nTestMatch = 0;
 
 // test CJK script attributes
 if ( nSearchType & IMPL_FONT_ATTR_CJK )
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 1adaf79..737a7a7 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -904,7 +904,7 @@ static int findname( const sal_uInt8 *name, sal_uInt16 n, 
sal_uInt16 platformID,
 {
 if (n == 0) return -1;
 
-int l = 0, r = n-1, i;
+int l = 0, r = n-1;
 sal_uInt32 t1, t2;
 sal_uInt32 m1, m2;
 
@@ -912,7 +912,7 @@ static int findname( const sal_uInt8 *name, sal_uInt16 n, 
sal_uInt16 platformID,
 m2 = (languageID << 16) | nameID;
 
 do {
-i = (l + r) >> 1;
+const int i = (l + r) >> 1;
 t1 = GetUInt32(name + 6, i * 12 + 0, 1);
 t2 = GetUInt32(name + 6, i * 12 + 4, 1);
 
@@ -1044,10 +1044,11 @@ static void GetNames(TrueTypeFont *t)
 bPSNameOK = false;
 if( !bPSNameOK )
 {
-bool bReplace = true;
 /* check if family is a suitable replacement */
 if( t->ufamily && t->family )
 {
+bool bReplace = true;
+
 for( i = 0; t->ufamily[ i ] != 0 && bReplace; i++ )
 if( t->ufamily[ i ] < 33 || t->ufamily[ i ] > 127 )
 bReplace = false;
@@ -1167,7 +1168,7 @@ static sal_uInt32 getGlyph6(const sal_uInt8 *cmap, 
sal_uInt32, sal_uInt32 c) {
 }
 
 static sal_uInt16 GEbinsearch(sal_uInt16 *ar, sal_uInt16 length, sal_uInt16 
toSearch) {
-signed int low, mid, high, lastfound = 0x;
+signed int low, high, lastfound = 0x;
 sal_uInt16 res;
 if(length == (sal_uInt16)0 || length == (sal_uInt16)0x) {
 return (sal_uInt16)0x;
@@ -1175,7 +1176,7 @@ static sal_uInt16 GEbinsearch(sal_uInt16 *ar, sal_uInt16 
length, sal_uInt16 toSe
 low = 0;
 high = length - 1;
 while(high >= low) {
-mid = (high + low)/2;
+int mid = (high + low)/2;
 res = Int16FromMOTA(*(ar+mid));
 if(res >= toSearch) {
 lastfound = mid;
@@ -1820,7 +1821,7 @@ int  CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, 
const char *fname,
 {
 ControlPoint *pa;
 PSPathElement *path;
-int i, j, r, n;
+int i, j, n;
 const sal_uInt8* table = getTable(ttf, O_head);
 TTGlyphMetrics metrics;
 int UPEm = ttf->unitsPerEm;
@@ -1909,7 +1910,7 @@ int  CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, 
const char *fname,
 
 for (i = 0; i < nGlyphs; i++) {
 fprintf(outf, h33, i);
-r = GetTTGlyphOutline(ttf, glyphArray[i] < ttf->nglyphs ? 
glyphArray[i] : 0, &pa, &metrics, 0);
+int r = GetTTGlyphOutline(ttf, glyphArray[i] < ttf->nglyphs ? 
glyphArray[i] : 0, &pa, &metrics, 0);
 
 if (r > 0) {
 n =  BSplineToPSPath(pa, r, &path);
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index 1f019cf..e65c7cc 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -482,16 +482,12 @@ static void True

[Libreoffice-commits] core.git: vcl/source vcl/unx vcl/win

2015-01-18 Thread Michael Weghorn
 vcl/source/window/menufloatingwindow.cxx |6 ++
 vcl/source/window/splitwin.cxx   |6 ++
 vcl/source/window/status.cxx |4 +---
 vcl/source/window/taskpanelist.cxx   |5 +++--
 vcl/source/window/toolbox.cxx|6 +++---
 vcl/unx/generic/app/salinst.cxx  |3 +--
 vcl/unx/generic/printer/ppdparser.cxx|8 +++-
 vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx |3 +--
 vcl/win/source/app/saldata.cxx   |3 +--
 vcl/win/source/gdi/gdiimpl.cxx   |3 +--
 10 files changed, 18 insertions(+), 29 deletions(-)

New commits:
commit f5f7a69628ad316298febe7b51234428a7896ff9
Author: Michael Weghorn 
Date:   Sat Jan 17 01:36:45 2015 +0100

fdo#39440 vcl: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: Ia3910e7f1b33d16866b7e606fd648f152f9fe67a
Reviewed-on: https://gerrit.libreoffice.org/13971
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/vcl/source/window/menufloatingwindow.cxx 
b/vcl/source/window/menufloatingwindow.cxx
index 3647960..e4b1124 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -70,11 +70,10 @@ void MenuFloatingWindow::doShutdown()
 if (!bKeyInput && pMenu && pMenu->pStartedFrom && 
!pMenu->pStartedFrom->IsMenuBar())
 {
 // #102461# remove highlight in parent
-MenuItemData* pData;
 size_t i, nCount = pMenu->pStartedFrom->pItemList->size();
 for(i = 0; i < nCount; i++)
 {
-pData = pMenu->pStartedFrom->pItemList->GetDataFromPos( i );
+MenuItemData* pData = 
pMenu->pStartedFrom->pItemList->GetDataFromPos( i );
 if( pData && ( pData->pSubMenu == pMenu ) )
 break;
 }
@@ -672,11 +671,10 @@ void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 
n, bool bStartPopupTime
 if (pMenu->pStartedFrom && !pMenu->pStartedFrom->IsMenuBar())
 {
 // #102461# make sure parent entry is highlighted as well
-MenuItemData* pData;
 size_t i, nCount = pMenu->pStartedFrom->pItemList->size();
 for(i = 0; i < nCount; i++)
 {
-pData = pMenu->pStartedFrom->pItemList->GetDataFromPos( i );
+MenuItemData* pData = 
pMenu->pStartedFrom->pItemList->GetDataFromPos( i );
 if( pData && ( pData->pSubMenu == pMenu ) )
 break;
 }
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index ab313f9..3dd3e8c 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -416,7 +416,6 @@ static void ImplCalcSet( ImplSplitSet* pSet,
 sal_uInt16  nAbsItems;
 longnCalcSize;
 longnSizeDelta;
-longnCurSize;
 longnSizeWinSize;
 longnNewSizeWinSize;
 longnTemp;
@@ -443,7 +442,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
 else
 nCalcSize = nSetWidth;
 nCalcSize -= (nVisItems-1)*pSet->mnSplitSize;
-nCurSize   = 0;
+long nCurSize   = 0;
 if ( pSet->mbCalcPix || (pSet->mnLastSize != nCalcSize) )
 {
 long nPercentFactor = 10;
@@ -2003,7 +2002,6 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt 
)
 ImplSplitItem*  pSplitItem;
 longnCurMaxSize;
 sal_uInt16  nTemp;
-boolbDown;
 boolbPropSmaller;
 
 mnMouseModifier = rMEvt.GetModifier();
@@ -2028,7 +2026,7 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt 
)
 
 if ( mpSplitSet->mpItems )
 {
-bDown = true;
+bool bDown = true;
 if ( (mpSplitSet == mpMainSet) && mbBottomRight )
 bDown = false;
 
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 5751c92..bca642e23 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -315,11 +315,9 @@ Rectangle StatusBar::ImplGetItemRectPos( sal_uInt16 nPos ) 
const
 
 sal_uInt16 StatusBar::ImplGetFirstVisiblePos() const
 {
-ImplStatusItem* pItem;
-
 for( size_t nPos = 0; nPos < mpItemList->size(); nPos++ )
 {
-pItem = (*mpItemList)[ nPos ];
+ImplStatusItem* pItem = (*mpItemList)[ nPos ];
 if ( pItem )
 {
 if ( pItem->mbVisible )
diff --git a/vcl/source/window/taskpanelist.cxx 
b/vcl/source/window/taskpanelist.cxx
index cc13f15..23b9648 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -162,12 +162,13 @@ bool TaskPaneList::HandleKeyEvent

[Libreoffice-commits] core.git: sw/source

2015-01-18 Thread Michael Weghorn
 sw/source/ui/config/optload.cxx |3 +--
 sw/source/ui/fldui/changedb.cxx |3 +--
 sw/source/ui/fldui/flddok.cxx   |4 ++--
 sw/source/ui/fldui/fldref.cxx   |6 ++
 sw/source/ui/frmdlg/column.cxx  |3 +--
 sw/source/ui/frmdlg/cption.cxx  |3 +--
 sw/source/ui/index/cnttab.cxx   |   12 
 sw/source/ui/misc/glossary.cxx  |3 +--
 sw/source/uibase/app/appenv.cxx |6 --
 sw/source/uibase/app/docsh2.cxx |   10 ++
 sw/source/uibase/config/uinums.cxx  |6 --
 sw/source/uibase/dochdl/swdtflvr.cxx|8 
 sw/source/uibase/docvw/PostItMgr.cxx|3 +--
 sw/source/uibase/frmdlg/colex.cxx   |3 +--
 sw/source/uibase/misc/redlndlg.cxx  |3 +--
 sw/source/uibase/shells/tabsh.cxx   |3 +--
 sw/source/uibase/uiview/formatclipboard.cxx |2 +-
 sw/source/uibase/uiview/pview.cxx   |6 ++
 sw/source/uibase/uiview/view.cxx|3 +--
 sw/source/uibase/uiview/viewtab.cxx |3 +--
 sw/source/uibase/uno/unotxdoc.cxx   |2 +-
 sw/source/uibase/wrtsh/wrtsh1.cxx   |9 ++---
 22 files changed, 51 insertions(+), 53 deletions(-)

New commits:
commit 54defd1bd3359c95e45891c7294847d0cebca753
Author: Michael Weghorn 
Date:   Fri Jan 16 22:59:20 2015 +0100

fdo#39440 sw: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I0de4e6278fb564c299722a9e23eb67d0999c4e31
Reviewed-on: https://gerrit.libreoffice.org/13966
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index b9cb029..e7dd53b 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -456,10 +456,9 @@ SwCaptionOptPage::SwCaptionOptPage( vcl::Window* pParent, 
const SfxItemSet& rSet
 sal_uInt16 nSelFmt = SVX_NUM_ARABIC;
 if (pSh)
 {
-SwFieldType* pFldType;
 for ( sal_uInt16 i = pMgr->GetFldTypeCount(); i; )
 {
-pFldType = pMgr->GetFldType(USHRT_MAX, --i);
+SwFieldType* pFldType = pMgr->GetFldType(USHRT_MAX, --i);
 if (pFldType->GetName().equals(m_pCategoryBox->GetText()))
 {
 nSelFmt = 
(sal_uInt16)static_cast(pFldType)->GetSeqFormat();
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index c76c889..9e917d4 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -219,12 +219,11 @@ IMPL_LINK_NOARG(SwChangeDBDlg, ButtonHdl)
 
 IMPL_LINK_NOARG(SwChangeDBDlg, TreeSelectHdl)
 {
-bool bEnable = false;
-
 SvTreeListEntry* pEntry = m_pAvailDBTLB->GetCurEntry();
 
 if (pEntry)
 {
+bool bEnable = false;
 if (m_pAvailDBTLB->GetParent(pEntry))
 bEnable = true;
 m_pDefineBT->Enable( bEnable );
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index b69efd9..db9632e 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -198,10 +198,10 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
 m_pTypeLB->SelectEntryPos(0);
 }
 
-size_t nCount;
-
 if (nOld != GetTypeSel())
 {
+size_t nCount;
+
 m_pDateFT->Hide();
 m_pTimeFT->Hide();
 
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 4be5ad3..605e2a3 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -522,10 +522,9 @@ void SwFldRefPage::UpdateSubType()
 const IDocumentOutlineNodes* pIDoc( 
pSh->getIDocumentOutlineNodesAccess() );
 pIDoc->getOutlineNodes( maOutlineNodes );
 bool bCertainTxtNodeSelected( false );
-SvTreeListEntry* pEntry = 0;
 for ( size_t nOutlIdx = 0; nOutlIdx < maOutlineNodes.size(); 
++nOutlIdx )
 {
-pEntry = m_pSelectionToolTipLB->InsertEntry(
+SvTreeListEntry* pEntry = m_pSelectionToolTipLB->InsertEntry(
 pIDoc->getOutlineText( nOutlIdx, true, true, 
false ) );
 pEntry->SetUserData( reinterpret_cast(nOutlIdx) );
 if ( ( IsFldEdit() &&
@@ -550,10 +549,9 @@ void SwFldRefPage::UpdateSubType()
 const IDocumentListItems* pIDoc( 
pSh->getIDocumentListItemsAccess() );
 pIDoc->getNumItems( maNumItems );
 bool bCertainTxtNodeSelected( false );
-SvTreeListEntry* pEntry = 0;
 for ( size_t nNumItemIdx = 0; nNumItemIdx < maNumItems.size(); 
++nNumItemIdx )
 {
-pEntry = m_pSelectionToolTipLB->InsertEntry(
+SvTreeListEntry* pEntry = m_pSelectionToolTipLB->InsertEntry(

[Libreoffice-commits] core.git: vcl/generic vcl/quartz vcl/source

2015-01-18 Thread Michael Weghorn
 vcl/generic/fontmanager/parseAFM.cxx |   18 ++
 vcl/generic/print/bitmap_gfx.cxx |3 +--
 vcl/generic/print/text_gfx.cxx   |3 ++-
 vcl/quartz/salgdicommon.cxx  |3 +--
 vcl/source/control/field2.cxx|3 ++-
 vcl/source/control/ilstbox.cxx   |7 ---
 vcl/source/filter/graphicfilter2.cxx |6 --
 vcl/source/filter/sgfbram.cxx|3 +--
 vcl/source/filter/sgvspln.cxx|   11 ---
 vcl/source/filter/sgvtext.cxx|9 +++--
 vcl/source/filter/wmf/enhwmf.cxx |4 ++--
 vcl/source/filter/wmf/winwmf.cxx |3 +--
 vcl/source/filter/wmf/wmfwr.cxx  |4 +---
 13 files changed, 32 insertions(+), 45 deletions(-)

New commits:
commit ec9c7ebb575b592e188c5f6b545570b11744d063
Author: Michael Weghorn 
Date:   Sat Jan 17 00:59:10 2015 +0100

fdo#39440 vcl: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: Ib6b9651b828287665f7248052855f0da2779806e
Reviewed-on: https://gerrit.libreoffice.org/13968
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/vcl/generic/fontmanager/parseAFM.cxx 
b/vcl/generic/fontmanager/parseAFM.cxx
index b3a7f7a..6d341ba 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -360,13 +360,12 @@ static int parseGlobals( FileInputStream* fp, 
GlobalFontInfo* gfi )
 {
 bool cont = true, save = (gfi != NULL);
 int error = ok;
-char *keyword;
 int direction = -1;
 int tokenlen;
 
 while (cont)
 {
-keyword = token(fp, tokenlen);
+char *keyword = token(fp, tokenlen);
 
 if (keyword == NULL)
 /* Have reached an early and unexpected EOF. */
@@ -564,11 +563,10 @@ static int parseCharWidths( FileInputStream* fp, int* cwi)
 {
 bool cont = true, save = (cwi != NULL);
 int pos = 0, error = ok, tokenlen;
-char *keyword;
 
 while (cont)
 {
-keyword = token(fp,tokenlen);
+char *keyword = token(fp,tokenlen);
 /* Have reached an early and unexpected EOF. */
 /* Set flag and stop parsing */
 if (keyword == NULL)
@@ -717,11 +715,10 @@ static int parseCharMetrics( FileInputStream* fp, 
FontInfo* fi)
 bool cont = true, firstTime = true;
 int error = ok, count = 0, tokenlen;
 CharMetricInfo *temp = fi->cmi;
-char *keyword;
 
 while (cont)
 {
-keyword = token(fp,tokenlen);
+char *keyword = token(fp,tokenlen);
 if (keyword == NULL)
 {
 error = earlyEOF;
@@ -873,11 +870,10 @@ static int parseTrackKernData( FileInputStream* fp, 
FontInfo* fi)
 {
 bool cont = true, save = (fi->tkd != NULL);
 int pos = 0, error = ok, tcount = 0, tokenlen;
-char *keyword;
 
 while (cont)
 {
-keyword = token(fp,tokenlen);
+char *keyword = token(fp,tokenlen);
 
 if (keyword == NULL)
 {
@@ -980,11 +976,10 @@ static int parsePairKernData( FileInputStream* fp, 
FontInfo* fi)
 {
 bool cont = true, save = (fi->pkd != NULL);
 int pos = 0, error = ok, pcount = 0, tokenlen;
-char *keyword;
 
 while (cont)
 {
-keyword = token(fp,tokenlen);
+char *keyword = token(fp,tokenlen);
 
 if (keyword == NULL)
 {
@@ -1109,11 +1104,10 @@ static int parseCompCharData( FileInputStream* fp, 
FontInfo* fi)
 {
 bool cont = true, firstTime = true, save = (fi->ccd != NULL);
 int pos = 0, j = 0, error = ok, ccount = 0, pcount = 0, tokenlen;
-char *keyword;
 
 while (cont)
 {
-keyword = token(fp,tokenlen);
+char *keyword = token(fp,tokenlen);
 if (keyword == NULL)
 /* Have reached an early and unexpected EOF. */
 /* Set flag and stop parsing */
diff --git a/vcl/generic/print/bitmap_gfx.cxx b/vcl/generic/print/bitmap_gfx.cxx
index 9a6d7e8..dc6997d 100644
--- a/vcl/generic/print/bitmap_gfx.cxx
+++ b/vcl/generic/print/bitmap_gfx.cxx
@@ -625,12 +625,11 @@ PrinterGfx::DrawPS2MonoImage (const PrinterBmp& rBitmap, 
const Rectangle& rArea)
 for (long nRow = rArea.Top(); nRow <= rArea.Bottom(); nRow++)
 {
 long  nBitPos = 0;
-unsigned char nBit= 0;
 unsigned char nByte   = 0;
 
 for (long nColumn = rArea.Left(); nColumn <= rArea.Right(); nColumn++)
 {
-nBit   = rBitmap.GetPixelIdx (nRow, nColumn);
+unsigned char nBit   = rBitmap.GetPixelIdx (nRow, nColumn);
 nByte |= nBit << (7 - nBitPos);
 
 if (++nBitPos == 8)
diff --git a/vcl/generic/print/text_gfx.cxx b/vcl/generic/print/text_gfx.cxx
index a262b82..eeaa029 100644
--- a/vcl/generic/print/text_gfx.cxx
+++ b/vcl/generic/print/text_gfx.cxx
@@ -442,7 +442,7 @@ bool PrinterGfx::drawVerticalizedText(
 
 int nTextScale   = maVirtualStatus.mnTextWidth ? 
maVirtualStatus.mnTextWidth : maVirtualStatus.mnT

[Libreoffice-commits] core.git: sw/source

2015-01-19 Thread Michael Weghorn
 sw/source/core/text/EnhancedPDFExportHelper.cxx |9 -
 sw/source/core/text/itradj.cxx  |3 +--
 sw/source/core/text/itrform2.cxx|3 ++-
 sw/source/core/text/txtdrop.cxx |3 +--
 sw/source/core/text/txtfrm.cxx  |3 +--
 sw/source/core/txtnode/atrftn.cxx   |2 +-
 sw/source/core/txtnode/ndtxt.cxx|6 ++
 sw/source/core/txtnode/thints.cxx   |9 ++---
 sw/source/core/undo/rolbck.cxx  |7 +++
 sw/source/core/undo/unattr.cxx  |3 +--
 sw/source/core/undo/undraw.cxx  |3 +--
 sw/source/core/undo/unins.cxx   |4 ++--
 sw/source/core/unocore/unochart.cxx |3 +--
 sw/source/core/unocore/unostyle.cxx |   18 ++
 sw/source/core/unocore/unotbl.cxx   |9 ++---
 15 files changed, 42 insertions(+), 43 deletions(-)

New commits:
commit 08f9bd504de9bcb267a0e71b07759080592bd0d8
Author: Michael Weghorn 
Date:   Fri Jan 16 13:24:42 2015 +

fdo#39440 sw: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I2368fc0a1c6dd73125d4770d06063ea3e3d8c713
Reviewed-on: https://gerrit.libreoffice.org/13961
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx 
b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 78bfda4..8b16c9c 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -325,7 +325,6 @@ bool SwTaggedPDFHelper::CheckReopenTag()
 {
 const SwFrm& rFrm = mpFrmInfo->mrFrm;
 const SwFrm* pKeyFrm = 0;
-void* pKey = 0;
 
 // Reopen an existing structure element if
 // - rFrm is not the first page frame (reopen Document tag)
@@ -356,7 +355,7 @@ bool SwTaggedPDFHelper::CheckReopenTag()
 
 if ( pKeyFrm )
 {
-pKey = lcl_GetKeyFromFrame( *pKeyFrm );
+void* pKey = lcl_GetKeyFromFrame( *pKeyFrm );
 
 if ( pKey )
 {
@@ -1258,10 +1257,11 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
 // FlyFrm: Figure, Formula, Control
 // fly in content or fly at page
 {
-bool bFormula = false;
 const SwFlyFrm* pFly = static_cast(pFrm);
 if ( pFly->Lower() && pFly->Lower()->IsNoTxtFrm() )
 {
+bool bFormula = false;
+
 const SwNoTxtFrm* pNoTxtFrm = static_cast(pFly->Lower());
 SwOLENode* pOLENd = 
const_cast(pNoTxtFrm->GetNode()->GetOLENode());
 if ( pOLENd )
@@ -1409,10 +1409,9 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
 rInf.GetIdx() - 1 :
 rInf.GetIdx();
 const SwTxtAttr* pHint = mpPorInfo->mrTxtPainter.GetAttr( nIdx 
);
-const SwField* pFld = 0;
 if ( pHint && RES_TXTATR_FIELD == pHint->Which() )
 {
-pFld = (SwField*)pHint->GetFmtFld().GetField();
+const SwField* pFld = 
(SwField*)pHint->GetFmtFld().GetField();
 if ( RES_GETREFFLD == pFld->Which() )
 {
 nPDFType = vcl::PDFWriter::Link;
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 56302ea..2c03d19 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -194,10 +194,9 @@ static bool lcl_CheckKashidaWidth ( SwScriptInfo& rSI, 
SwTxtSizeInfo& rInf, SwTx
 // check kashida width
 // if width is smaller than minimal kashida width allowed by fonts in the 
current line
 // drop one kashida after the other until kashida width is OK
-bool bAddSpaceChanged;
 while (rKashidas)
 {
-bAddSpaceChanged = false;
+bool bAddSpaceChanged = false;
 sal_Int32 nIdx = rItr.GetStart();
 sal_Int32 nEnd = rItr.GetEnd();
 while ( nIdx < nEnd )
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 3b5d6bc..e72a7e9 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -414,7 +414,6 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
 sal_uInt8 nNxtActual = rInf.GetFont()->GetActual();
 sal_uInt8 nLstActual = nNxtActual;
 sal_uInt16 nLstHeight = (sal_uInt16)rInf.GetFont()->GetHeight();
-bool bAllowBefore = false;
 bool bAllowBehind = false;
 const CharClass& rCC = GetAppCharClass();
 
@@ -443,6 +442,8 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo 

[Libreoffice-commits] core.git: winaccessibility/source writerfilter/source xmloff/source xmlscript/source xmlsecurity/source

2015-01-19 Thread Michael Weghorn
 winaccessibility/source/UAccCOM/AccTable.cxx  |   16 
+++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |3 -
 xmloff/source/chart/SchXMLExport.cxx  |3 -
 xmloff/source/chart/SchXMLImport.cxx  |3 -
 xmloff/source/draw/shapeexport.cxx|2 
 xmloff/source/forms/eventimport.cxx   |6 --
 xmloff/source/text/XMLRedlineExport.cxx   |3 -
 xmloff/source/text/XMLTextNumRuleInfo.cxx |2 
 xmloff/source/text/txtimp.cxx |3 -
 xmlscript/source/xmldlg_imexp/xmldlg_export.cxx   |2 
 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx |   12 +
 xmlsecurity/source/xmlsec/nss/secerror.cxx|6 --
 xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx |   21 
+++---
 13 files changed, 33 insertions(+), 49 deletions(-)

New commits:
commit bfe79b50bce44707cb2416e6ff6b7441491967bb
Author: Michael Weghorn 
Date:   Sat Jan 17 02:00:35 2015 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: If7ad3584b3124ed0b337836071af1a5bd0451d85
Reviewed-on: https://gerrit.libreoffice.org/13972
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/winaccessibility/source/UAccCOM/AccTable.cxx 
b/winaccessibility/source/UAccCOM/AccTable.cxx
index e739300..076e92a 100644
--- a/winaccessibility/source/UAccCOM/AccTable.cxx
+++ b/winaccessibility/source/UAccCOM/AccTable.cxx
@@ -663,11 +663,11 @@ STDMETHODIMP CAccTable::selectRow(long row)
 return E_FAIL;
 
 // Select row.
-longlCol, lColumnCount, lChildIndex;
+longlCol, lColumnCount;
 lColumnCount = GetXInterface()->getAccessibleColumnCount();
 for(lCol = 0; lCol < lColumnCount; lCol ++)
 {
-lChildIndex = GetXInterface()->getAccessibleIndex(row, lCol);
+long lChildIndex = GetXInterface()->getAccessibleIndex(row, lCol);
 pRSelection.get()->selectAccessibleChild(lChildIndex);
 }
 
@@ -707,11 +707,11 @@ STDMETHODIMP CAccTable::selectColumn(long column)
 return E_FAIL;
 
 // Select column.
-longlRow, lRowCount, lChildIndex;
+longlRow, lRowCount;
 lRowCount = GetXInterface()->getAccessibleRowCount();
 for(lRow = 0; lRow < lRowCount; lRow ++)
 {
-lChildIndex = GetXInterface()->getAccessibleIndex(lRow, column);
+long lChildIndex = GetXInterface()->getAccessibleIndex(lRow, 
column);
 pRSelection.get()->selectAccessibleChild(lChildIndex);
 }
 
@@ -754,11 +754,11 @@ STDMETHODIMP CAccTable::unselectRow(long row)
 return E_FAIL;
 
 // Select column.
-longlColumn, lColumnCount, lChildIndex;
+longlColumn, lColumnCount;
 lColumnCount = GetXInterface()->getAccessibleColumnCount();
 for(lColumn = 0; lColumn < lColumnCount; lColumn ++)
 {
-lChildIndex = GetXInterface()->getAccessibleIndex(row,lColumn);
+long lChildIndex = 
GetXInterface()->getAccessibleIndex(row,lColumn);
 pRSelection.get()->deselectAccessibleChild(lChildIndex);
 }
 
@@ -801,12 +801,12 @@ STDMETHODIMP CAccTable::unselectColumn(long column)
 return E_FAIL;
 
 // Unselect columns.
-longlRow, lRowCount, lChildIndex;
+longlRow, lRowCount;
 lRowCount = GetXInterface()->getAccessibleRowCount();
 
 for(lRow = 0; lRow < lRowCount; lRow ++)
 {
-lChildIndex = GetXInterface()->getAccessibleIndex(lRow, column);
+long lChildIndex = GetXInterface()->getAccessibleIndex(lRow, 
column);
 pRSelection.get()->deselectAccessibleChild(lChildIndex);
 }
 return S_OK;
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index e97c133..a77aba6 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2452,7 +2452,6 @@ void DomainMapper_Impl::ChainTextFrames()
 
 try
 {
-bool bIsTxbxChained = false ;
 sal_Int32 nTxbxId1  = 0 ; //holds id for the shape in outer loop
 sal_Int32 nTxbxId2  = 0 ; //holds id for the shape in inner loop
 sal_Int32 nTxbxSeq1 = 0 ; //holds seq number for the shape in outer 
loop
@@ -2465,7 +2464,7 @@ void DomainMapper_Impl::ChainTextFrames()
 for( std::vector >::iterator 
outer_itr = m_vTextFramesForChaining.begin();
  outer_itr != m_vTextFramesForC

[Libreoffice-commits] core.git: filter/source

2014-12-14 Thread Michael Weghorn
 filter/source/graphicfilter/ipcx/ipcx.cxx   |   10 +-
 filter/source/graphicfilter/ipsd/ipsd.cxx   |2 +-
 filter/source/graphicfilter/itiff/itiff.cxx |3 +--
 filter/source/msfilter/msdffimp.cxx |8 
 filter/source/msfilter/svdfppt.cxx  |6 --
 filter/source/svg/svgexport.cxx |3 +--
 6 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit ec382367c8dd90a0cd728fb18c03c186416bbaee
Author: Michael Weghorn 
Date:   Fri Dec 12 20:02:09 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I09fa7d6f87a73a2ecee9b84e792d5df82ca5b420
Reviewed-on: https://gerrit.libreoffice.org/13457
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx 
b/filter/source/graphicfilter/ipcx/ipcx.cxx
index 09604932..9622e9b 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -212,7 +212,7 @@ void PCXReader::ImplReadHeader()
 
 void PCXReader::ImplReadBody(BitmapWriteAccess * pAcc)
 {
-sal_uInt8   *pPlane[ 4 ], * pDest, * pSource1, * pSource2, * pSource3, 
*pSource4;
+sal_uInt8   *pPlane[ 4 ], * pDest;
 sal_uLong   i, nx, ny, np, nCount, nPercent;
 sal_uLong   nLastPercent = 0;
 sal_uInt8   nDat = 0, nCol = 0;
@@ -292,10 +292,10 @@ void PCXReader::ImplReadBody(BitmapWriteAccess * pAcc)
 }
 }
 }
-pSource1 = pPlane[ 0 ];
-pSource2 = pPlane[ 1 ];
-pSource3 = pPlane[ 2 ];
-pSource4 = pPlane[ 3 ];
+sal_uInt8 *pSource1 = pPlane[ 0 ];
+sal_uInt8 *pSource2 = pPlane[ 1 ];
+sal_uInt8 *pSource3 = pPlane[ 2 ];
+sal_uInt8 *pSource4 = pPlane[ 3 ];
 switch ( nBitsPerPlanePix + ( nPlanes << 8 ) )
 {
 // 2 colors
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx 
b/filter/source/graphicfilter/ipsd/ipsd.cxx
index 95b9e93..c6bbca3 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -339,7 +339,6 @@ bool PSDReader::ImplReadBody()
 {
 sal_uLong   nX, nY;
 charnRunCount = 0;
-signed char nBitCount = -1;
 sal_uInt8   nDat = 0, nDummy, nRed, nGreen, nBlue;
 BitmapColor aBitmapColor;
 nX = nY = 0;
@@ -348,6 +347,7 @@ bool PSDReader::ImplReadBody()
 {
 case 1 :
 {
+signed char nBitCount = -1;
 while ( nY < mpFileHeader->nRows )
 {
 if ( nBitCount == -1 )
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx 
b/filter/source/graphicfilter/itiff/itiff.cxx
index c778e80..19ab6c7 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -878,7 +878,6 @@ bool TIFFReader::ConvertScanline( sal_uLong nY )
 {
 sal_uInt8   nSamp[ 4 ];
 sal_uInt8   nSampLast[ 4 ] = { 0, 0, 0, 0 };
-longnBlack;
 
 for( nx = 0; nx < nImageWidth; nx++ )
 {
@@ -904,7 +903,7 @@ bool TIFFReader::ConvertScanline( sal_uLong nY )
 nSamp[ ns ]= (sal_uInt8) GetBits( pMap[ ns ], 
nx * nBitsPerSample, nBitsPerSample );
 }
 }
-nBlack = nSamp[ 3 ];
+const long nBlack = nSamp[ 3 ];
 nRed = (sal_uInt8) std::max( 0L, 255L - ( ( (long) nSamp[ 
0 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) *
 255L/(long)(nMaxSampleValue-nMinSampleValue) ) 
);
 nGreen = (sal_uInt8) std::max( 0L, 255L - ( ( (long) 
nSamp[ 1 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) *
diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index b4fb2f1..00320a3 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -446,12 +446,12 @@ void SvxMSDffManager::SolveSolver( const 
SvxMSDffSolverContainer& rSolver )
 Reference< XShape > aXConnector( 
pPtr->pCObj->getUnoShape(), UNO_QUERY );
 SdrGluePointList* pList = pO->ForceGluePointList();
 
-bool bValidGluePoint = false;
 sal_Int32 nId = nC;
 sal_uInt32 nInventor = pO->GetObjInventor();
 
 if( nInventor == SdrInventor )
 {
+bool bValidGluePoint = false;
 sal_uInt32 nObjId = pO->GetObjIdentifier();
 switch( nObjId )
 {
@@ -3591,12 +3591,12 @@ void SvxMSDffManager::ReadObjText( const OUString& 
rText, SdrObject* pObj )
 
 sal_Int32 nParaIndex = 0;
 sal_Int32 nParaSize;
-const sal_U

[Libreoffice-commits] core.git: filter/source

2014-12-14 Thread Michael Weghorn
 filter/source/graphicfilter/eos2met/eos2met.cxx |   19 +++
 filter/source/graphicfilter/epbm/epbm.cxx   |3 +--
 filter/source/graphicfilter/epict/epict.cxx |9 -
 filter/source/graphicfilter/eps/eps.cxx |3 +--
 filter/source/graphicfilter/icgm/actimpr.cxx|4 ++--
 filter/source/graphicfilter/icgm/cgm.cxx|3 +--
 filter/source/graphicfilter/icgm/class3.cxx |5 ++---
 filter/source/graphicfilter/idxf/dxf2mtf.cxx|3 +--
 filter/source/graphicfilter/ieps/ieps.cxx   |6 +++---
 filter/source/graphicfilter/ios2met/ios2met.cxx |4 ++--
 10 files changed, 24 insertions(+), 35 deletions(-)

New commits:
commit c1fcafb4ac234e8d9912d3bb6be978a6509593e3
Author: Michael Weghorn 
Date:   Fri Dec 12 19:34:29 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.
in addition: simplified some simple bool checks:
"if (!bVar)" instead of "if(bVar == false)"

Change-Id: I609b4a3ee7d43bbeeb91ba141af2c90511d0c8d7
Reviewed-on: https://gerrit.libreoffice.org/13455
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx 
b/filter/source/graphicfilter/eos2met/eos2met.cxx
index 8975fda..36ffc74 100644
--- a/filter/source/graphicfilter/eos2met/eos2met.cxx
+++ b/filter/source/graphicfilter/eos2met/eos2met.cxx
@@ -308,11 +308,9 @@ void METWriter::WriteClipRect( const Rectangle& rRect )
 
 void METWriter::CountActionsAndBitmaps(const GDIMetaFile * pMTF)
 {
-const MetaAction* pMA;
-
 for( size_t nAction = 0, nActionCount=pMTF->GetActionSize(); nAction < 
nActionCount; nAction++ )
 {
-pMA =  pMTF->GetAction(nAction);
+const MetaAction* pMA =  pMTF->GetAction(nAction);
 
 switch (pMA->GetType())
 {
@@ -398,16 +396,15 @@ void METWriter::WriteFieldId(sal_uInt32 nId)
 void METWriter::CreateChrSets(const GDIMetaFile * pMTF)
 {
 size_t nAction, nActionCount;
-const MetaAction * pMA;
 
-if (bStatus==false)
+if (!bStatus)
 return;
 
 nActionCount = pMTF->GetActionSize();
 
 for (nAction = 0; nAction < nActionCount; nAction++)
 {
-pMA = pMTF->GetAction(nAction);
+const MetaAction * pMA = pMTF->GetAction(nAction);
 
 switch (pMA->GetType())
 {
@@ -734,14 +731,12 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
 
 void METWriter::WriteImageObjects(const GDIMetaFile * pMTF)
 {
-const MetaAction*   pMA;
-
-if (bStatus==false)
+if (!bStatus)
 return;
 
 for ( size_t nAction = 0, nActionCount = pMTF->GetActionSize(); nAction < 
nActionCount; nAction++)
 {
-pMA = pMTF->GetAction(nAction);
+const MetaAction* pMA = pMTF->GetAction(nAction);
 
 switch (pMA->GetType())
 {
@@ -808,7 +803,7 @@ void METWriter::WriteImageObjects(const GDIMetaFile * pMTF)
 break;
 }
 
-if (bStatus==false)
+if (!bStatus)
 break;
 }
 
@@ -818,7 +813,7 @@ void METWriter::WriteImageObjects(const GDIMetaFile * pMTF)
 
 void METWriter::WriteDataDescriptor(const GDIMetaFile *)
 {
-if (bStatus==false)
+if (!bStatus)
 return;
 
 WriteFieldIntroducer(0,DscGrfObjMagic,0,0);
diff --git a/filter/source/graphicfilter/epbm/epbm.cxx 
b/filter/source/graphicfilter/epbm/epbm.cxx
index 5919b9a..1705cb1 100644
--- a/filter/source/graphicfilter/epbm/epbm.cxx
+++ b/filter/source/graphicfilter/epbm/epbm.cxx
@@ -160,10 +160,9 @@ void PBMWriter::ImplWriteBody()
 }
 else
 {
-int nxCount;
 for ( sal_uLong y = 0; y < mnHeight; y++ )
 {
-nxCount = 70;
+int nxCount = 70;
 for ( sal_uLong x = 0; x < mnWidth; x++ )
 {
 if (!( --nxCount ) )
diff --git a/filter/source/graphicfilter/epict/epict.cxx 
b/filter/source/graphicfilter/epict/epict.cxx
index 463f1d9..8d67795 100644
--- a/filter/source/graphicfilter/epict/epict.cxx
+++ b/filter/source/graphicfilter/epict/epict.cxx
@@ -195,13 +195,12 @@ void PictWriter::MayCallback()
 void PictWriter::CountActionsAndBitmaps(const GDIMetaFile & rMTF)
 {
 size_t  nAction, nActionCount;
-const MetaAction*   pMA;
 
 nActionCount = rMTF.GetActionSize();
 
 for (nAction=0; nAction < nActionCount; nAction++)
 {
-pMA = rMTF.GetAction( nAction );
+const MetaAction* pMA = rMTF.GetAction( nAction );
 
 switch( pMA->GetType() )
 {
@@ -223,7 +222,7 @@ void PictWriter::CountActionsAndBitmaps(const GDIMetaFile & 
rMTF)
 Polygon PictWriter::PolyPolygonToPolygon(const tools::PolyPolygon & rPolyPoly)
 {
 sal_uInt16 nCount,nSize1,nSize2,np,i1,i2,i3,nBestIdx1,nBestIdx2;
-long nDistSqr,nBestDistSqr, nCountdownTests;
+long nDistSqr;
  

[Libreoffice-commits] core.git: include/svtools svtools/source

2014-12-14 Thread Michael Weghorn
 include/svtools/stdmenu.hxx|   80 ++---
 include/svtools/svlbitm.hxx|6 +-
 include/svtools/svparser.hxx   |   70 +++-
 include/svtools/treelistentry.hxx  |   12 ++---
 svtools/source/control/stdmenu.cxx |2 
 5 files changed, 83 insertions(+), 87 deletions(-)

New commits:
commit 4595dc37e601c5a1f245af38ac728d6e45c2865c
Author: Michael Weghorn 
Date:   Fri Dec 12 22:30:32 2014 +0100

fdo#39468 translate German comments

Change-Id: I90deb0877940167c9d5e3ba630528e575af6dd66
Reviewed-on: https://gerrit.libreoffice.org/13459
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/include/svtools/stdmenu.hxx b/include/svtools/stdmenu.hxx
index 7f4e9af..504db1f 100644
--- a/include/svtools/stdmenu.hxx
+++ b/include/svtools/stdmenu.hxx
@@ -31,36 +31,34 @@ namespace vcl {
 
 /*
 
-Beschreibung
+Description
 
 
 class FontNameMenu
 
-Beschreibung
+Description
 
-Erlaubt die Auswahl von Fonts. Das Menu wird ueber Fill mit den FontNamen
-gefuellt. Fill sortiert automatisch die FontNamen (inkl. aller Umlaute und
-sprachabhaengig). Mit SetCurName()/GetCurName() kann der aktuelle Fontname
-gesetzt/abgefragt werden. Wenn SetCurName() mit einem leeren String
-aufgerufen wird, wird kein Eintrag als aktueller angezeigt (fuer DontKnow).
-Vor dem Selectaufruf wird der ausgewaehlte Name automatisch als aktueller
-gesetzt und wuerde beim naechsten Aufruf auch als aktueller Name angezeigt
-werden. Deshalb sollte vor PopupMenu::Execute() gegebenenfalls mit
-SetCurName() der aktuelle Fontname gesetzt werden.
+Allows the selection of fonts. The menu is filled with the FontNames by
+the method Fill(). Fill() automatically sorts the FontNames (incl. all
+umlauts and language-dependent). Using SetCurName()/GetCurName(), the
+current FontName can be set/requested. If SetCurName() is called with
+an empty string, no entry is displayed as the current one.
+Before the Select call, the selected name is automatically set as the
+current one and would be displayed as the current name on the next call.
+Because of this, the current FontName should be set using SetCurName()
+if necessary before calling PopupMenu::Execute().
 
-Da die Id's und der interne Aufbau des Menus nicht bekannt ist, muss ein
-Select-Handler gesetzt werden, um die Auswahl eines Namens mitzubekommen.
+As the Ids and the internal structure of the menu are not known, a
+Select handler must be set in order to notice the selection of a name.
 
-In dieses Menu koennen keine weiteren Items eingefuegt werden.
+No further items can be inserted into that menu.
 
-Spaeter soll auch das Menu die gleichen Bitmaps anzeigen, wie die
-FontNameBox. Auf den Systemen, wo Menues nicht automatisch scrollen,
-wird spaeter wohl ein A-Z Menu ziwschengeschaltet. Da ein Menu bei vielen
-installierten Fonts bisher schon immer lange gebraucht hat, sollte dieses
-Menu schon jetzt nur einmal erzeugt werden (da sonst das Kontextmenu bis
-zu 10-Sekunden fuer die Erzeugung brauchen koennte).
+Later on, the menu shall display the same bitmaps as the FontNameBox.
+On many systems, where menues don't scroll automatically, an A-Z menu
+might be interposed. As a menu has always needed long when many Fonts
+are installed, this menu should only be generated once.
 
-Querverweise
+References
 
 FontList; FontSizeMenu; FontNameBox
 
@@ -68,32 +66,32 @@ FontList; FontSizeMenu; FontNameBox
 
 class FontSizeMenu
 
-Beschreibung
+Description
 
-Erlaubt die Auswahl von Fontgroessen. Ueber Fill wird das FontSizeMenu
-gefuellt und ueber GetCurHeight() kann die ausgewaehlte Fontgroesse
-abgefragt werden. Mit SetCurHeight()/GetCurHeight() kann die aktuelle
-Fontgroesse gesetzt/abgefragt werden. Wenn SetCurHeight() mit 0 aufgerufen
-wird, wird kein Eintrag als aktueller angezeigt (fuer DontKnow). Vor dem
-Selectaufruf wird die ausgewaehlte Groesse automatisch als aktuelle gesetzt
-und wuerde beim naechsten Aufruf auch als aktuelle Groesse angezeigt werden.
-Deshalb sollte vor PopupMenu::Execute() gegebenenfalls mit SetCurHeight()
-die aktuelle Groesse gesetzt werden. Da die Groessen vom ausgewaehlten Font
-abhaengen, sollte nach einer Aenderung des Fontnamen das Menu mit Fill mit
-den Groessen des Fonts neu gefuellt werden.
+Allows the selection of font sizes. The FontSizeMenu is filled using
+Fill(). The selected font size can be queried using GetCurHeight().
+Using SetCurHeight()/GetCurHeight(), the current font size can be set/
+requested. If SetCurHeight() is called with 0, no entry is displayed
+as the current one.
+Before the Select call, the selected size is automatically set as the
+current one and would be displayed as the current size on the next call.
+Because of this, the current font size should be set using SetCurHeight()
+if necessary before calling PopupMenu::Execute(). As the font sizes
+dep

[Libreoffice-commits] core.git: dbaccess/source

2014-12-14 Thread Michael Weghorn
 dbaccess/source/core/api/OptimisticSet.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit c70d907c6bac7720338207355e41724ba1e97781
Author: Michael Weghorn 
Date:   Fri Dec 12 22:44:23 2014 +0100

fdo#39440 remove unused variables

This addresses 3 cppcheck "unusedVariable" warnings.

Change-Id: I2bf566458b84f34422cee08a3814ad5b04955e50
Reviewed-on: https://gerrit.libreoffice.org/13460
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/dbaccess/source/core/api/OptimisticSet.cxx 
b/dbaccess/source/core/api/OptimisticSet.cxx
index d3a3235..f48c0b1 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -184,7 +184,6 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& 
_rInsertRow ,const ORow
 
 ::std::map< OUString,bool > aResultSetChanged;
 TSQLStatements aKeyConditions;
-TSQLStatements aIndexConditions;
 TSQLStatements aSql;
 
 // here we build the condition part for the update statement
@@ -349,8 +348,6 @@ void SAL_CALL OptimisticSet::deleteRow(const ORowSetRow& 
_rDeleteRow,const conne
 {
 OUString aQuote  = getIdentifierQuoteString();
 TSQLStatements aKeyConditions;
-TSQLStatements aIndexConditions;
-TSQLStatements aSql;
 
 // here we build the condition part for the update statement
 SelectColumnsMetaData::const_iterator aIter = m_pColumnNames->begin();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2014-12-14 Thread Michael Weghorn
 sc/source/core/tool/address.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3c363adcbae442d1e56409be466f4c514b89d89a
Author: Michael Weghorn 
Date:   Fri Dec 12 23:00:27 2014 +0100

fdo#39440 eliminate redundant condition

addresses the following cppcheck "redundantCondition"
warning:
"Redundant condition: If n > 0, the comparison
n != -1 is always true."

Change-Id: I879b1e3a07b56560dd635a399b6079f9bd2f9590
Reviewed-on: https://gerrit.libreoffice.org/13461
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 1efcac7..c6deace 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1106,7 +1106,7 @@ static sal_uInt16 lcl_ScAddress_Parse_OOo( const 
sal_Unicode* p, ScDocument* pDo
 // Specified table name is not found in this document.  Assume 
this is an external document.
 aDocName = aTab;
 sal_Int32 n = aDocName.lastIndexOf('.');
-if (n != -1 && n > 0)
+if (n > 0)
 {
 // Extension found.  Strip it.
 aTab = aTab.replaceAt(n, 1, "");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: embeddedobj/source extensions/source

2014-12-14 Thread Michael Weghorn
 embeddedobj/source/general/docholder.cxx |6 +++---
 extensions/source/bibliography/framectr.cxx  |2 +-
 extensions/source/ole/unoconversionutilities.hxx |2 +-
 extensions/source/scanner/sane.cxx   |4 +++-
 extensions/source/scanner/sanedlg.cxx|2 +-
 extensions/source/update/check/updatecheck.cxx   |5 ++---
 6 files changed, 11 insertions(+), 10 deletions(-)

New commits:
commit aba7f4c0a3527ce0cee6e18385cf69778052402d
Author: Michael Weghorn 
Date:   Fri Dec 12 19:07:13 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I026999d6e995185c42df6770a1a700094540d08a
Reviewed-on: https://gerrit.libreoffice.org/13454
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/embeddedobj/source/general/docholder.cxx 
b/embeddedobj/source/general/docholder.cxx
index 9bb8581..b720f0e 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -695,11 +695,11 @@ bool DocumentHolder::ShowUI( const uno::Reference< 
::com::sun::star::frame::XLay
 }
 catch( const uno::Exception& ){}
 
-// make sure that lock state of LM is correct even if an exception is 
thrown in between
-bool bUnlock = false;
-bool bLock = false;
 if ( xOwnLM.is() && xDocAreaAcc.is() )
 {
+// make sure that lock state of LM is correct even if an exception 
is thrown in between
+bool bUnlock = false;
+bool bLock = false;
 try
 {
 // take over the control over the containers window
diff --git a/extensions/source/bibliography/framectr.cxx 
b/extensions/source/bibliography/framectr.cxx
index 8124063..ba2f7a8 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -323,7 +323,6 @@ throw (::com::sun::star::uno::RuntimeException, 
std::exception)
 {
 const CmdToInfoCache& rCmdCache = GetCommandToInfoCache();
 
-boolbGroupFound( false );
 frame::DispatchInformation  aDispatchInfo;
 std::list< frame::DispatchInformation > aDispatchInfoList;
 
@@ -332,6 +331,7 @@ throw (::com::sun::star::uno::RuntimeException, 
std::exception)
 ( nCommandGroup == frame::CommandGroup::DATA ) ||
 ( nCommandGroup == frame::CommandGroup::VIEW ))
 {
+bool bGroupFound = false;
 CmdToInfoCache::const_iterator pIter = rCmdCache.begin();
 while ( pIter != rCmdCache.end() )
 {
diff --git a/extensions/source/ole/unoconversionutilities.hxx 
b/extensions/source/ole/unoconversionutilities.hxx
index b263dbe..d0ab452 100644
--- a/extensions/source/ole/unoconversionutilities.hxx
+++ b/extensions/source/ole/unoconversionutilities.hxx
@@ -686,9 +686,9 @@ void UnoConversionUtilities::anyToVariant(VARIANT* 
pVariant, const Any& rAny,
 template
 void UnoConversionUtilities::anyToVariant(VARIANT* pVariant, const Any& 
rAny)
 {
-bool bIllegal = false;
 try
 {
+bool bIllegal = false;
 switch (rAny.getValueTypeClass())
 {
 case TypeClass_INTERFACE:
diff --git a/extensions/source/scanner/sane.cxx 
b/extensions/source/scanner/sane.cxx
index 84475d5..ccc597c 100644
--- a/extensions/source/scanner/sane.cxx
+++ b/extensions/source/scanner/sane.cxx
@@ -559,12 +559,13 @@ bool Sane::Start( BitmapTransporter& rBitmap )
 
 int nWidthMM= 0;
 int nHeightMM   = 0;
-double fTLx, fTLy, fBRx, fBRy, fResl = 0.0;
+double fTLx, fTLy, fResl = 0.0;
 int nOption;
 if( ( nOption = GetOptionByName( "tl-x" ) ) != -1   &&
 GetOptionValue( nOption, fTLx, 0 )  &&
 GetOptionUnit( nOption ) == SANE_UNIT_MM )
 {
+double fBRx;
 if( ( nOption = GetOptionByName( "br-x" ) ) != -1   &&
 GetOptionValue( nOption, fBRx, 0 )  &&
 GetOptionUnit( nOption ) == SANE_UNIT_MM )
@@ -576,6 +577,7 @@ bool Sane::Start( BitmapTransporter& rBitmap )
 GetOptionValue( nOption, fTLy, 0 )  &&
 GetOptionUnit( nOption ) == SANE_UNIT_MM )
 {
+double fBRy;
 if( ( nOption = GetOptionByName( "br-y" ) ) != -1   &&
 GetOptionValue( nOption, fBRy, 0 )  &&
 GetOptionUnit( nOption ) == SANE_UNIT_MM )
diff --git a/extensions/source/scanner/sanedlg.cxx 
b/extensions/source/scanner/sanedlg.cxx
index bc7ee8e..9a4e50c 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -761,11 +761,11 @@ IMPL_LINK( SaneDlg, ModifyHdl, Edit*, pEdit )
 }
 else if( pEdit == mpVectorBox )
 {
-char pBuf[256];
 mnCurrentElement = mpVectorBo

[Libreoffice-commits] core.git: include/svtools

2014-12-16 Thread Michael Weghorn
 include/svtools/htmlkywd.hxx |   56 +--
 include/svtools/htmlout.hxx  |4 +--
 include/svtools/imap.hxx |   40 +-
 include/svtools/imapcirc.hxx |6 ++--
 include/svtools/imaprect.hxx |6 ++--
 5 files changed, 54 insertions(+), 58 deletions(-)

New commits:
commit 390c62dfe435469fe550ff223be55cf0d1026253
Author: Michael Weghorn 
Date:   Tue Dec 16 18:32:29 2014 +0100

fdo#39468 translate German comments

Change-Id: I0a70863a9227cfc7e7b5616fe8fc8d14434ec9ce
Reviewed-on: https://gerrit.libreoffice.org/13496
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx
index 63c3f70..d114da8 100644
--- a/include/svtools/htmlkywd.hxx
+++ b/include/svtools/htmlkywd.hxx
@@ -25,7 +25,7 @@
 #define OOO_STRING_SVTOOLS_HTML_doctype40 \
 "HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\""
 
-// diese werden nur eingeschaltet
+// these are only switched on
 #define OOO_STRING_SVTOOLS_HTML_area "area"
 #define OOO_STRING_SVTOOLS_HTML_base "base"
 #define OOO_STRING_SVTOOLS_HTML_comment "!--"
@@ -43,7 +43,7 @@
 #define OOO_STRING_SVTOOLS_HTML_param "param"
 #define OOO_STRING_SVTOOLS_HTML_spacer "spacer"
 
-// diese werden wieder abgeschaltet
+// these are switched off again
 #define OOO_STRING_SVTOOLS_HTML_abbreviation "abbrev"
 #define OOO_STRING_SVTOOLS_HTML_acronym "acronym"
 #define OOO_STRING_SVTOOLS_HTML_address "address"
@@ -143,7 +143,7 @@
 #define OOO_STRING_SVTOOLS_HTML_plaintext2 "plaintext"
 #define OOO_STRING_SVTOOLS_HTML_sdfield "sdfield"
 
-// die Namen fuer alle Zeichen
+// names for all characters
 #define OOO_STRING_SVTOOLS_HTML_C_lt "lt"
 #define OOO_STRING_SVTOOLS_HTML_C_gt "gt"
 #define OOO_STRING_SVTOOLS_HTML_C_amp "amp"
@@ -400,9 +400,9 @@
 #define OOO_STRING_SVTOOLS_HTML_S_zwj "zwj"
 #define OOO_STRING_SVTOOLS_HTML_S_zwnj "zwnj"
 
-// HTML Attribut-Token (=Optionen)
+// HTML attribute tokens (=options)
 
-// Attribute ohne Wert
+// attributes without value
 #define OOO_STRING_SVTOOLS_HTML_O_checked "checked"
 #define OOO_STRING_SVTOOLS_HTML_O_compact "compact"
 #define OOO_STRING_SVTOOLS_HTML_O_declare "declare"
@@ -417,7 +417,7 @@
 #define OOO_STRING_SVTOOLS_HTML_O_sdfixed "sdfixed"
 #define OOO_STRING_SVTOOLS_HTML_O_selected "selected"
 
-// Attribute mit einem String als Wert
+// attributes with a string as value
 #define OOO_STRING_SVTOOLS_HTML_O_accesskey "accesskey"
 #define OOO_STRING_SVTOOLS_HTML_O_accept "accept"
 #define OOO_STRING_SVTOOLS_HTML_O_alt "alt"
@@ -447,12 +447,12 @@
 #define OOO_STRING_SVTOOLS_HTML_O_sdevent "sdevent-"
 #define OOO_STRING_SVTOOLS_HTML_O_sdaddparam "sdaddparam-"
 
-// Attribute mit einem SGML-Identifier als Wert
+// attributes with an SGML identifier as value
 #define OOO_STRING_SVTOOLS_HTML_O_id "id"
 #define OOO_STRING_SVTOOLS_HTML_O_target "target"
 #define OOO_STRING_SVTOOLS_HTML_O_to "to"
 
-// Attribute mit einem URI als Wert
+// attributes with an URI as value
 #define OOO_STRING_SVTOOLS_HTML_O_action "action"
 #define OOO_STRING_SVTOOLS_HTML_O_archive "archive"
 #define OOO_STRING_SVTOOLS_HTML_O_background "background"
@@ -464,7 +464,7 @@
 #define OOO_STRING_SVTOOLS_HTML_O_src "src"
 #define OOO_STRING_SVTOOLS_HTML_O_usemap "usemap"
 
-// Attribute mit einer Farbe als Wert (alle Netscape)
+// attributes with a colour as value (all Netscape)
 #define OOO_STRING_SVTOOLS_HTML_O_alink "alink"
 #define OOO_STRING_SVTOOLS_HTML_O_bgcolor "bgcolor"
 #define OOO_STRING_SVTOOLS_HTML_O_bordercolor "bordercolor"
@@ -475,7 +475,7 @@
 #define OOO_STRING_SVTOOLS_HTML_O_text "text"
 #define OOO_STRING_SVTOOLS_HTML_O_vlink "vlink"
 
-// Attribute mit einem numerischen Wert
+// attributes with a numerical value
 #define OOO_STRING_SVTOOLS_HTML_O_border "border"
 #define OOO_STRING_SVTOOLS_HTML_O_cellspacing "cellspacing"
 #define OOO_STRING_SVTOOLS_HTML_O_cellpadding "cellpadding"
@@ -499,7 +499,7 @@
 #define OOO_STRING_SVTOOLS_HTML_O_width "width"
 #define OOO_STRING_SVTOOLS_HTML_O_zindex "z-index"
 
-// Attribute mit Enum-Werten
+// attributes with enum values
 #define OOO_STRING_SVTOOLS_HTML_O_behavior "behavior"
 #define OOO_STRING_SVTOOLS_HTML_O_clear "clear"
 #define OOO_STRING_SVTOOLS_HTML_O_dir "dir"
@@ -519,7 +519,7 @@
 #define OOO_STRING_SVTOOLS_HTML_O_valuetype "valuetype"
 #define OOO_STRING_SVTOOLS_HTML_O_wrap "wrap"
 
-// Attribute mit Script-Code als Wert
+// attributes with 

[Libreoffice-commits] core.git: framework/source

2014-12-16 Thread Michael Weghorn
 framework/source/classes/menumanager.cxx|3 +-
 framework/source/fwe/classes/bmkmenu.cxx|3 +-
 framework/source/fwe/xml/menudocumenthandler.cxx|3 --
 framework/source/fwe/xml/statusbardocumenthandler.cxx   |3 --
 framework/source/fwe/xml/toolboxdocumenthandler.cxx |3 --
 framework/source/layoutmanager/toolbarlayoutmanager.cxx |   17 ++--
 framework/source/uielement/menubarmanager.cxx   |5 ++--
 framework/source/uielement/toolbarmanager.cxx   |2 -
 framework/source/uielement/toolbarsmenucontroller.cxx   |3 +-
 9 files changed, 20 insertions(+), 22 deletions(-)

New commits:
commit 38b8c1e8804c8556e71e1ec7c1f1350d75dc04bf
Author: Michael Weghorn 
Date:   Tue Dec 16 18:04:05 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I57f336c6ab3c418eac82397edeadecb4c1b168a7
Reviewed-on: https://gerrit.libreoffice.org/13495
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/framework/source/classes/menumanager.cxx 
b/framework/source/classes/menumanager.cxx
index 0abb093..c09cc87 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -507,11 +507,12 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
 {
 SolarMutexGuard g;
 
-int nRemoveItemCount = 0;
 int nItemCount   = pMenu->GetItemCount();
 
 if ( nItemCount > 0 )
 {
+int nRemoveItemCount = 0;
+
 // remove all old picklist entries from menu
 sal_uInt16 nPos = pMenu->GetItemPos( START_ITEMID_PICKLIST );
 for ( sal_uInt16 n = nPos; n < pMenu->GetItemCount(); )
diff --git a/framework/source/fwe/classes/bmkmenu.cxx 
b/framework/source/fwe/classes/bmkmenu.cxx
index 550da2a..bf1396b 100644
--- a/framework/source/fwe/classes/bmkmenu.cxx
+++ b/framework/source/fwe/classes/bmkmenu.cxx
@@ -136,11 +136,12 @@ void BmkMenu::Initialize()
 InsertSeparator();
 else
 {
-boolbImageSet = false;
 sal_uInt16  nId = CreateMenuId();
 
 if ( bShowMenuImages )
 {
+boolbImageSet = false;
+
 if ( !aImageId.isEmpty() )
 {
 Image aImage = GetImageFromURL( m_xFrame, aImageId, false 
);
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx 
b/framework/source/fwe/xml/menudocumenthandler.cxx
index 3d8945d..58e0389 100644
--- a/framework/source/fwe/xml/menudocumenthandler.cxx
+++ b/framework/source/fwe/xml/menudocumenthandler.cxx
@@ -184,10 +184,9 @@ throw(  SAXException, RuntimeException, std::exception )
 
 OUString ReadMenuDocumentHandlerBase::getErrorLineString()
 {
-char buffer[32];
-
 if ( m_xLocator.is() )
 {
+char buffer[32];
 snprintf( buffer, sizeof(buffer), "Line: %ld - ", static_cast( 
m_xLocator->getLineNumber() ));
 return OUString::createFromAscii( buffer );
 }
diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx 
b/framework/source/fwe/xml/statusbardocumenthandler.cxx
index a3bd46b..ddc360c 100644
--- a/framework/source/fwe/xml/statusbardocumenthandler.cxx
+++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx
@@ -469,10 +469,9 @@ OUString 
OReadStatusBarDocumentHandler::getErrorLineString()
 {
 SolarMutexGuard g;
 
-char buffer[32];
-
 if ( m_xLocator.is() )
 {
+char buffer[32];
 snprintf( buffer, sizeof(buffer), "Line: %ld - ", static_cast( 
m_xLocator->getLineNumber() ));
 return OUString::createFromAscii( buffer );
 }
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx 
b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index e6065a1..15c0ad3 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -639,10 +639,9 @@ OUString OReadToolBoxDocumentHandler::getErrorLineString()
 {
 SolarMutexGuard g;
 
-char buffer[32];
-
 if ( m_xLocator.is() )
 {
+char buffer[32];
 snprintf( buffer, sizeof(buffer), "Line: %ld - ", static_cast( 
m_xLocator->getLineNumber() ));
 return OUString::createFromAscii( buffer );
 }
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx 
b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 0811d5f..b044bad 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -482,8 +482,6 @@ bool ToolbarLayoutManager::createToolbar( const OUString& 
rResourceURL )
 }
 implts_setToolbarCreation( false );
 
-bool bVisible( false );
-bool bFloating( false );
 if ( xUIElement.is() )

[Libreoffice-commits] core.git: forms/source formula/source fpicker/source

2014-12-16 Thread Michael Weghorn
 forms/source/component/Grid.cxx|3 +--
 forms/source/runtime/formoperations.cxx|2 +-
 forms/source/xforms/xpathlib/xpathlib.cxx  |9 +++--
 formula/source/ui/dlg/FormulaHelper.cxx|4 ++--
 formula/source/ui/dlg/formula.cxx  |5 ++---
 fpicker/source/win32/filepicker/dibpreview.cxx |   16 +---
 6 files changed, 14 insertions(+), 25 deletions(-)

New commits:
commit afb5143639598bdc7f78ba000569d80e10d0fbe4
Author: Michael Weghorn 
Date:   Tue Dec 16 17:35:52 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I1d037e87c69b1a7de019f1abf1f729bf7e28d762
Reviewed-on: https://gerrit.libreoffice.org/13494
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index bb5469b..a3e727b 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -780,11 +780,10 @@ void OGridControlModel::write(const 
Reference& _rxOutStream
 // 2. Columns
 sal_Int32 nLen = getCount();
 _rxOutStream->writeLong(nLen);
-OGridColumn* pCol;
 for (sal_Int32 i = 0; i < nLen; i++)
 {
 // first the service name for the unerlying model
-pCol = getColumnImplementation(m_aItems[i]);
+OGridColumn* pCol = getColumnImplementation(m_aItems[i]);
 DBG_ASSERT(pCol != NULL, "OGridControlModel::write : such items should 
never reach it into my container !");
 _rxOutStream << pCol->getModelName();
 // then the object itself
diff --git a/forms/source/runtime/formoperations.cxx 
b/forms/source/runtime/formoperations.cxx
index a55451a..74e9782 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -1040,11 +1040,11 @@ namespace frm
 
 if ( m_xCursor.is() && ( m_xCursor == _rEvent.Source ) )
 {
-bool bIs = false;
 if  ( ( _rEvent.PropertyName == PROPERTY_ISMODIFIED )
|| ( _rEvent.PropertyName == PROPERTY_ISNEW )
 )
 {
+bool bIs = false;
 if ( ( _rEvent.NewValue >>= bIs ) && !bIs )
 m_bActiveControlModified = false;
 }
diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx 
b/forms/source/xforms/xpathlib/xpathlib.cxx
index 70c473e..e8183c3 100644
--- a/forms/source/xforms/xpathlib/xpathlib.cxx
+++ b/forms/source/xforms/xpathlib/xpathlib.cxx
@@ -153,10 +153,9 @@ void xforms_minFunction(xmlXPathParserContextPtr ctxt, int 
nargs)
 xmlNodeSetPtr pNodeSet = xmlXPathPopNodeSet(ctxt);
 if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE);
 double nMinimum = 0;
-double nNumber = 0;
 for (int i = 0; i <  xmlXPathNodeSetGetLength(pNodeSet); i++)
 {
-nNumber = xmlXPathCastNodeToNumber(xmlXPathNodeSetItem(pNodeSet, i));
+double nNumber = 
xmlXPathCastNodeToNumber(xmlXPathNodeSetItem(pNodeSet, i));
 if (xmlXPathIsNaN(nNumber))
 {
 xmlXPathReturnNumber(ctxt, xmlXPathNAN);
@@ -176,10 +175,9 @@ void xforms_maxFunction(xmlXPathParserContextPtr ctxt, int 
nargs)
 xmlNodeSetPtr pNodeSet = xmlXPathPopNodeSet(ctxt);
 if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE);
 double nMaximum = 0;
-double nNumber = 0;
 for (int i = 0; i <  xmlXPathNodeSetGetLength(pNodeSet); i++)
 {
-nNumber = xmlXPathCastNodeToNumber(xmlXPathNodeSetItem(pNodeSet, i));
+double nNumber = 
xmlXPathCastNodeToNumber(xmlXPathNodeSetItem(pNodeSet, i));
 if (xmlXPathIsNaN(nNumber))
 {
 xmlXPathReturnNumber(ctxt, xmlXPathNAN);
@@ -197,11 +195,10 @@ void 
xforms_countNonEmptyFunction(xmlXPathParserContextPtr ctxt, int nargs)
 if (nargs != 1) XP_ERROR(XPATH_INVALID_ARITY);
 xmlNodeSetPtr pNodeSet = xmlXPathPopNodeSet(ctxt);
 if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE);
-xmlChar *aString;
 sal_Int32 nNotEmpty = 0;
 for (int i = 0; i <  xmlXPathNodeSetGetLength(pNodeSet); i++)
 {
-aString = xmlXPathCastNodeToString(xmlXPathNodeSetItem(pNodeSet, i));
+const xmlChar *aString = 
xmlXPathCastNodeToString(xmlXPathNodeSetItem(pNodeSet, i));
 if (*aString != 0) nNotEmpty++;
 }
 xmlXPathReturnNumber(ctxt, nNotEmpty);
diff --git a/formula/source/ui/dlg/FormulaHelper.cxx 
b/formula/source/ui/dlg/FormulaHelper.cxx
index 6c999bd..38988e3 100644
--- a/formula/source/ui/dlg/FormulaHelper.cxx
+++ b/formula/source/ui/dlg/FormulaHelper.cxx
@@ -203,10 +203,10 @@ sal_Int32 FormulaHelper::GetFunctionStart( const 
OUString&   rFormula,
 sal_Int32  nFStart = FUNC_NOTFOUND;
 sal_Int32  nParPos = nStart;
 
-bool bRepeat, bFound;
+bool bRepeat;
 do
 {
-bFound  = false;
+bool bFound  = false

[Libreoffice-commits] core.git: helpcompiler/source

2014-12-16 Thread Michael Weghorn
 helpcompiler/source/HelpLinker.cxx |  271 ++---
 1 file changed, 135 insertions(+), 136 deletions(-)

New commits:
commit 28d9983e2c561528c27c0dd40c2c0ea5b46a270f
Author: Michael Weghorn 
Date:   Tue Dec 16 21:54:25 2014 +0100

indent try-block, remove obsolete comment

indent block one level deeper than block in
which it is contained

Change-Id: Ibefd1a87c2511f842f42f053d9e68feba8a6
Reviewed-on: https://gerrit.libreoffice.org/13498
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/helpcompiler/source/HelpLinker.cxx 
b/helpcompiler/source/HelpLinker.cxx
index fccd2d3..b285293 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -337,176 +337,175 @@ void HelpLinker::link() throw(HelpProcessingException, 
BasicCodeTagger::TaggerEx
 // catch HelpProcessingException to avoid locking data bases
 try
 {
+// lastly, initialize the indexBuilder
+if ( (!bExtensionMode || bIndexForExtension) && !helpFiles.empty())
+initIndexerPreProcessor();
 
-// lastly, initialize the indexBuilder
-if ( (!bExtensionMode || bIndexForExtension) && !helpFiles.empty())
-initIndexerPreProcessor();
-
-// here we start our loop over the hzip files.
-HashSet::iterator end = helpFiles.end();
-for (HashSet::iterator iter = helpFiles.begin(); iter != end; ++iter)
-{
-// process one file
-// streamTable contains the streams in the hzip file
-StreamTable streamTable;
-const std::string &xhpFileName = *iter;
-
-if (!bExtensionMode && xhpFileName.rfind(".xhp") != 
xhpFileName.length()-4)
+// here we start our loop over the hzip files.
+HashSet::iterator end = helpFiles.end();
+for (HashSet::iterator iter = helpFiles.begin(); iter != end; ++iter)
 {
-// only work on .xhp - files
-SAL_WARN("helpcompiler",
-"ERROR: input list entry '"
-<< xhpFileName
-<< "' has the wrong extension (only files with extension 
.xhp are accepted)");
+// process one file
+// streamTable contains the streams in the hzip file
+StreamTable streamTable;
+const std::string &xhpFileName = *iter;
 
-continue;
-}
+if (!bExtensionMode && xhpFileName.rfind(".xhp") != 
xhpFileName.length()-4)
+{
+// only work on .xhp - files
+SAL_WARN("helpcompiler",
+"ERROR: input list entry '"
+<< xhpFileName
+<< "' has the wrong extension (only files with 
extension .xhp are accepted)");
 
-fs::path langsourceRoot(sourceRoot);
-fs::path xhpFile;
+continue;
+}
 
-if( bExtensionMode )
-{
-// langsourceRoot == sourceRoot for extensions
-std::string xhpFileNameComplete( extensionPath );
-xhpFileNameComplete.append( '/' + xhpFileName );
-xhpFile = fs::path( xhpFileNameComplete );
-}
-else
-{
-langsourceRoot.append( "/" );
-if ( m_bUseLangRoot )
-langsourceRoot.append( lang + '/' );
-xhpFile = fs::path(xhpFileName, fs::native);
-}
+fs::path langsourceRoot(sourceRoot);
+fs::path xhpFile;
 
-HelpCompiler hc( streamTable, xhpFile, langsourceRoot, zipdir,
-compactStylesheet, embeddStylesheet, module, lang, bExtensionMode 
);
+if( bExtensionMode )
+{
+// langsourceRoot == sourceRoot for extensions
+std::string xhpFileNameComplete( extensionPath );
+xhpFileNameComplete.append( '/' + xhpFileName );
+xhpFile = fs::path( xhpFileNameComplete );
+}
+else
+{
+langsourceRoot.append( "/" );
+if ( m_bUseLangRoot )
+langsourceRoot.append( lang + '/' );
+xhpFile = fs::path(xhpFileName, fs::native);
+}
 
-HCDBG(std::cerr << "before compile of " << xhpFileName << std::endl);
-bool success = hc.compile();
-HCDBG(std::cerr << "after compile of " << xhpFileName << std::endl);
+HelpCompiler hc( streamTable, xhpFile, langsourceRoot, zipdir,
+compactStylesheet, embeddStylesheet, module, lang, 
bExtensionMode );
 
-if (!success && !bExtensionMode)
-{
-std::stringstream aStrStream;
- 

[Libreoffice-commits] core.git: hwpfilter/source

2014-12-16 Thread Michael Weghorn
 hwpfilter/source/formula.cxx   |7 +++
 hwpfilter/source/hcode.cxx |   11 +--
 hwpfilter/source/hwpeq.cxx |9 -
 hwpfilter/source/hwpfile.cxx   |   16 +---
 hwpfilter/source/hwpreader.cxx |4 ++--
 hwpfilter/source/solver.cxx|6 +++---
 6 files changed, 22 insertions(+), 31 deletions(-)

New commits:
commit e31657a1eaad12de1ad89aec5b50f8116f67fa3e
Author: Michael Weghorn 
Date:   Tue Dec 16 22:18:32 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I9812658e8a96dd35d686c7ae7a8b829267c5c8bc
Reviewed-on: https://gerrit.libreoffice.org/13499
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/hwpfilter/source/formula.cxx b/hwpfilter/source/formula.cxx
index 00114a9..ba29996 100644
--- a/hwpfilter/source/formula.cxx
+++ b/hwpfilter/source/formula.cxx
@@ -638,12 +638,11 @@ int Formula::parse()
  if( res ){
   makeMathML( res );
  }
- Node *tmpNode;
  int count = nodelist.size();
  for( int i = 0 ; i < count ; i++ ){
- tmpNode = nodelist.front();
- nodelist.pop_front();
-  delete tmpNode;
+ const Node *tmpNode = nodelist.front();
+ nodelist.pop_front();
+ delete tmpNode;
  }
 
  return 0;
diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx
index 42b7205..b674d5c 100644
--- a/hwpfilter/source/hcode.cxx
+++ b/hwpfilter/source/hcode.cxx
@@ -498,7 +498,6 @@ static hchar lineCharConv(hchar ch)
 static int KsSearch(hchar c)
 {
 int lo, hi, mid;
-hchar c2;
 
 lo = mid = 0;
 hi = 2350 - 1;
@@ -506,7 +505,7 @@ static int KsSearch(hchar c)
 while (lo <= hi)
 {
 mid = (lo + hi) >> 1;
-c2 = ksTbl[mid];
+hchar c2 = ksTbl[mid];
 if (c == c2)
 break;
 if (c < c2)
@@ -1187,11 +1186,11 @@ hchar_string hstr2ucsstr(hchar const* hstr)
 ::std::string hstr2ksstr(hchar const* hstr)
 {
 ::std::string ret;
-int res, j;
+int j;
  hchar dest[3];
 for( ; *hstr ; )
 {
-res = hcharconv(*hstr++, dest, KS);
+int res = hcharconv(*hstr++, dest, KS);
   for( j = 0 ; j < res ; j++ ){
   int c = dest[j];
   if( c < 32 )
@@ -1397,7 +1396,7 @@ char* base64_encode_string( const uchar *buf, unsigned 
int len )
 char * out;
 int inPos  = 0;
 int outPos = 0;
-int c1, c2, c3;
+int c1, c2;
 unsigned int i;
 
 out=(char *)malloc( (len*4/3)+8 );
@@ -1407,7 +1406,7 @@ char* base64_encode_string( const uchar *buf, unsigned 
int len )
 {
 c1 = buf[inPos++] & 0xFF;
 c2 = buf[inPos++] & 0xFF;
-c3 = buf[inPos++] & 0xFF;
+int c3 = buf[inPos++] & 0xFF;
 out[outPos++] = basis_64[(c1 & 0xFC) >> 2];
 out[outPos++] = basis_64[((c1 & 0x03) << 4) | ((c2 & 0xF0) >> 4)];
 out[outPos++] = basis_64[((c2 & 0x0F) << 2) | ((c3 & 0xC0) >> 6)];
diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx
index 2cc6ec2..baf3cf5 100644
--- a/hwpfilter/source/hwpeq.cxx
+++ b/hwpfilter/source/hwpeq.cxx
@@ -383,12 +383,12 @@ static const hwpeq eq_tbl[] = {
 static const hwpeq *lookup_eqn(char *str)
 {
   static const int eqCount = SAL_N_ELEMENTS(eq_tbl);
-  int   m, k, l = 0, r = eqCount;
+  int l = 0, r = eqCount;
   const hwpeq *result = 0;
 
   while( l < r ) {
-m = (l + r) / 2;
-k = strcmp(eq_tbl[m].key, str);
+const int m = (l + r) / 2;
+const int k = strcmp(eq_tbl[m].key, str);
 if( k == 0 ) {
   result = eq_tbl + m;
   break;
@@ -613,9 +613,8 @@ static int eq_word(MzString& outs, istream *strm, int 
status)
 
   if( 0 != (eq = lookup_eqn(keyword)) ) {
 int nargs = eq->nargs;
-int ch;
 while( nargs-- ) {
-  ch = read_white_space(state, strm);
+  const int ch = read_white_space(state, strm);
   if( ch != '{' ) state << '{';
   eq_word(state, strm, script_status);
   if( ch != '{' ) state << '}';
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index c4a0bfc..e248a3f 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -270,13 +270,10 @@ bool HWPFile::ReadParaList(std::list < HWPPara* > 
&aplist, unsigned char flag)
 
 bool HWPFile::TagsRead(void)
 {
-ulong tag;
-long size;
-
 while (true)
 {
-tag = Read4b();
-size = Read4b();
+ulong tag = Read4b();
+long size = Read4b();
 if (size <= 0 && tag > 0){
 continue;
   }
@@ -374,11 +371,10 @@ ColumnDef *HWPFile::GetColumnDef(int num)
 int HWPFile::GetPageMasterNum(int page)
 {
 std::list::iterator it = columnlist.begin();
-Colu

[Libreoffice-commits] core.git: i18npool/source i18nutil/source

2014-12-17 Thread Michael Weghorn
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |2 
 i18npool/source/localedata/localedata.cxx |   65 
++
 i18npool/source/search/levdis.cxx |4 
 i18npool/source/transliteration/textToPronounce_zh.cxx|5 
 i18nutil/source/utility/oneToOneMapping.cxx   |   12 -
 i18nutil/source/utility/widthfolding.cxx  |   12 -
 6 files changed, 32 insertions(+), 68 deletions(-)

New commits:
commit 652e09f734fefb9b49787e8e565d235d504a1e73
Author: Michael Weghorn 
Date:   Wed Dec 17 17:54:18 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I7e85aca5a86f993a9906525edffbd44a179dc245
Reviewed-on: https://gerrit.libreoffice.org/13510
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 684ef2b..d790c19 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -395,7 +395,6 @@ void lcl_formatPersianWord( sal_Int32 nNumber, OUString& 
rsResult )
 throw( IllegalArgumentException, RuntimeException )
 {
 OUStringBuffer aTemp(64);
-unsigned int nDigit;
 static const sal_Unicode asPersianWord_conjunction_data[] = 
{0x20,0x0648,0x20,0};
 OUString asPersianWord_conjunction( asPersianWord_conjunction_data );
 unsigned char nSection = 0;
@@ -409,6 +408,7 @@ void lcl_formatPersianWord( sal_Int32 nNumber, OUString& 
rsResult )
 aTemp.insert( 0, asPersianWord_conjunction).insert( 0, 
table_PersianWord_decadeX[nSection-1]);
 }
 
+unsigned int nDigit;
 if ((nDigit = nPart % 100) < 20)
 {
 if (!aTemp.isEmpty())
diff --git a/i18npool/source/localedata/localedata.cxx 
b/i18npool/source/localedata/localedata.cxx
index 85a16dc..875ab3c 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -369,13 +369,11 @@ LocaleDataImpl::~LocaleDataImpl()
 LocaleDataItem SAL_CALL
 LocaleDataImpl::getLocaleItem( const Locale& rLocale ) throw(RuntimeException, 
std::exception)
 {
-sal_Unicode **dataItem = NULL;
-
 MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, 
"getLocaleItem" );
 
 if ( func ) {
 sal_Int16 dataItemCount = 0;
-dataItem = func(dataItemCount);
+sal_Unicode **dataItem = func(dataItemCount);
 
 LocaleDataItem item(
 dataItem[0],
@@ -444,13 +442,11 @@ lcl_LookupTableHelper::lcl_LookupTableHelper()
 
 lcl_LookupTableHelper::~lcl_LookupTableHelper()
 {
-LocaleDataLookupTableItem* pItem = 0;
-
 std::vector::const_iterator 
aEnd(maLookupTable.end());
 std::vector::iterator 
aIter(maLookupTable.begin());
 
 for ( ; aIter != aEnd; ++aIter ) {
-pItem = *aIter;
+LocaleDataLookupTableItem* pItem = *aIter;
 delete pItem->module;
 delete pItem;
 }
@@ -480,13 +476,12 @@ oslGenericFunction SAL_CALL 
lcl_LookupTableHelper::getFunctionSymbolByName(
 (bFallback && aFallback.equalsAscii(aLibTable[i].pLocale)))
 {
 #ifndef DISABLE_DYNLOADING
-LocaleDataLookupTableItem* pCurrent = 0;
 OUStringBuffer aBuf(strlen(aLibTable[i].pLocale) + 1 + 
strlen(pFunction));
 {
 ::osl::MutexGuard aGuard( maMutex );
 for (size_t l = 0; l < maLookupTable.size(); l++)
 {
-pCurrent = maLookupTable[l];
+LocaleDataLookupTableItem* pCurrent = maLookupTable[l];
 if (pCurrent->dllName == aLibTable[i].pLib)
 {
 OSL_ASSERT( pOutCachedItem );
@@ -761,13 +756,11 @@ LocaleDataImpl::getAllCalendars( const Locale& rLocale ) 
throw(RuntimeException,
 Sequence< Currency2 > SAL_CALL
 LocaleDataImpl::getAllCurrencies2( const Locale& rLocale ) 
throw(RuntimeException, std::exception)
 {
-sal_Unicode **allCurrencies = NULL;
-
 MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, 
"getAllCurrencies" );
 
 if ( func ) {
 sal_Int16 currencyCount = 0;
-allCurrencies = func(currencyCount);
+sal_Unicode **allCurrencies = func(currencyCount);
 
 Sequence< Currency2 > seq(currencyCount);
 for(int i = 0, nOff = 0; i < currencyCount; i++, nOff += 8 ) {
@@ -896,14 +889,12 @@ LocaleDataImpl::getAllFormats( const Locale& rLocale ) 
throw(RuntimeException, s
 Sequence< OUString > SAL_CALL
 LocaleDataImpl::getDateAcceptancePatterns( const Locale& rLocale ) 
throw(RuntimeException, std::exce

[Libreoffice-commits] core.git: include/sot include/svl

2014-12-17 Thread Michael Weghorn
 include/sot/object.hxx   |8 
 include/sot/storage.hxx  |   29 ++---
 include/svl/macitem.hxx  |   12 +---
 include/svl/numuno.hxx   |4 ++--
 include/svl/poolitem.hxx |   16 ++--
 include/svl/style.hxx|   14 +++---
 6 files changed, 38 insertions(+), 45 deletions(-)

New commits:
commit 7efdc59d61c4f57780047627645caed81f3e654c
Author: Michael Weghorn 
Date:   Wed Dec 17 18:28:58 2014 +0100

fdo#39468 translate German comments

Change-Id: Ibcd2199db171c531018301631d76ec56924da23a
Reviewed-on: https://gerrit.libreoffice.org/13511
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/include/sot/object.hxx b/include/sot/object.hxx
index 0bcfdc7..9c52bdb 100644
--- a/include/sot/object.hxx
+++ b/include/sot/object.hxx
@@ -96,8 +96,8 @@ class SOT_DLLPUBLIC SotObject : virtual public SvRefBase
 friend class SotFactory;
 sal_uInt16  nOwnerLockCount;
 boolbOwner;
-boolbSVObject;// Ist Proxy, dann TRUE wenn andere Seite SV 
ist
-boolbInClose; // TRUE, im DoClose
+boolbSVObject;// is proxy, then TRUE if other side is SV
+boolbInClose; // TRUE, in DoClose
 
 protected:
 virtual ~SotObject();
@@ -115,7 +115,7 @@ public:
 virtual const SotFactory * GetSvFactory() const;
 virtual void *Cast( const SotFactory * );
 
-// Nur damit die Makros in So3 nicht ganz ausufern
+// only for the macros in So3 not to get out of hand
 virtual IUnknown *  GetInterface( const SvGlobalName & );
 
 boolOwner() const { return bOwner; }
@@ -127,7 +127,7 @@ public:
 boolIsInClose() const { return bInClose; }
 
 private:
-// Kopieren und Zuweisen dieses Objekttyps ist nicht erlaubt
+// copying and assigning this object type is not allowed
 SOT_DLLPRIVATE SotObject & operator = ( const SotObject & );
 SOT_DLLPRIVATE SotObject( const SotObject & );
 };
diff --git a/include/sot/storage.hxx b/include/sot/storage.hxx
index ce8466d..2104e70 100644
--- a/include/sot/storage.hxx
+++ b/include/sot/storage.hxx
@@ -52,7 +52,7 @@ class BaseStorageStream;
 class SOT_DLLPUBLIC SotStorageStream : virtual public SotObject, public 
SvStream
 {
 friend class SotStorage;
-BaseStorageStream * pOwnStm;// Zeiger auf den eigenen Stream
+BaseStorageStream * pOwnStm; // pointer to the own stream
 protected:
 virtual sal_uLong   GetData( void* pData, sal_uLong nSize ) 
SAL_OVERRIDE;
 virtual sal_uLong   PutData( const void* pData, sal_uLong nSize ) 
SAL_OVERRIDE;
@@ -103,13 +103,13 @@ class SOT_DLLPUBLIC SotStorage : virtual public SotObject
 friend class SotStorageStream;
 friend class SvStorage;
 
-BaseStorage *   m_pOwnStg;   // Zielstorage
-SvStream *  m_pStorStm;  // nur fuer SDSTORAGES
+BaseStorage *   m_pOwnStg;   // target storage
+SvStream *  m_pStorStm;  // only for SDSTORAGES
 sal_uLong   m_nError;
-OUStringm_aName; // Name des Storage
-boolm_bIsRoot;   // z.B.: File-Storage
+OUStringm_aName; // name of the storage
+boolm_bIsRoot;   // e.g.: File Storage
 boolm_bDelStm;
-OString m_aKey;  // aKey.Len != 0  -> Verschluesselung
+OString m_aKey;  // aKey.Len != 0  -> encryption
 longm_nVersion;
 
 protected:
@@ -170,40 +170,39 @@ public:
 voidSignAsRoot( bool b = true ) { m_bIsRoot = b; }
 voidSetDeleteStream( bool bDelete ) { m_bDelStm = bDelete; 
}
 
-// eigener Datenbereich
+// own data sector
 virtual voidSetClass( const SvGlobalName & rClass,
   sal_uLong bOriginalClipFormat,
   const OUString & rUserTypeName );
 virtual voidSetConvertClass( const SvGlobalName & rConvertClass,
  sal_uLong bOriginalClipFormat,
  const OUString & rUserTypeName );
-virtual SvGlobalName GetClassName();// Typ der Daten im Storage
+virtual SvGlobalName GetClassName(); // type of data in the storage
 virtual sal_uLong   GetFormat();
 virtual OUStringGetUserName();
 virtual boolShouldConvert();
 
-// Liste aller Elemente
+// list of all elements
 virtual voidFillInfoList( SvStorageInfoList * ) const;
 virtual boolCopyTo( SotStorage * pDestStg );
 virtual boolCommit();
 virtual boolRevert();
 
-/* Element Methoden */
-// Stream mit Verbindung zu Storage erzeugen,
-

[Libreoffice-commits] core.git: idl/source

2014-12-17 Thread Michael Weghorn
 idl/source/objects/types.cxx |7 ---
 1 file changed, 7 deletions(-)

New commits:
commit 36936c2580bf15117dd3bf775dd91340d16d3239
Author: Michael Weghorn 
Date:   Wed Dec 17 20:46:20 2014 +0100

remove if-block that has no effect

If the outer if-block is entered, 'aIsCollection' is
returned, no matter whether the inner if-block
is entered or not.

Change-Id: Ief33e6fe6e29d1dfe287095424dac92e7f7d06b0
Reviewed-on: https://gerrit.libreoffice.org/13512
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index fa2f50d..cd41795 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -92,15 +92,8 @@ bool SvMetaAttribute::GetAutomation() const
 
 bool SvMetaAttribute::GetIsCollection() const
 {
-bool bRet;
 if( aIsCollection.IsSet() || !GetRef() )
 {
-if ( aIsCollection.IsSet() )
-{
-bRet = aIsCollection;
-return bRet;
-}
-
 return aIsCollection;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: idlc/source l10ntools/source lingucomponent/source linguistic/source

2014-12-17 Thread Michael Weghorn
 idlc/source/astdump.cxx   |3 +--
 idlc/source/astenum.cxx   |9 +++--
 idlc/source/astoperation.cxx  |3 +--
 idlc/source/aststruct.cxx |3 +--
 idlc/source/idlccompile.cxx   |2 +-
 l10ntools/source/helpmerge.cxx|   13 +
 l10ntools/source/xmlparse.cxx |   18 ++
 lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx |   13 ++---
 linguistic/source/dicimp.cxx  |3 +--
 linguistic/source/gciterator.cxx  |3 +--
 10 files changed, 26 insertions(+), 44 deletions(-)

New commits:
commit a23f6eb3ae49dfc326c6e57a8ab95a840c0661d2
Author: Michael Weghorn 
Date:   Wed Dec 17 21:16:11 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: Ib16e4ecc0e0c43b2c1fb527eb0668a960ae9756e
Reviewed-on: https://gerrit.libreoffice.org/13513
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx
index 90b182c..e0f786b 100644
--- a/idlc/source/astdump.cxx
+++ b/idlc/source/astdump.cxx
@@ -69,11 +69,10 @@ bool AstModule::dump(RegistryKey& rKey)
 
 DeclList::const_iterator iter = getIteratorBegin();
 DeclList::const_iterator end = getIteratorEnd();
-AstDeclaration* pDecl = NULL;
 sal_uInt16 index = 0;
 while ( iter != end )
 {
-pDecl = *iter;
+AstDeclaration* pDecl = *iter;
 if ( pDecl->getNodeType() == NT_const &&
  pDecl->isInMainfile() )
 {
diff --git a/idlc/source/astenum.cxx b/idlc/source/astenum.cxx
index 1f330b1..32f8138 100644
--- a/idlc/source/astenum.cxx
+++ b/idlc/source/astenum.cxx
@@ -37,13 +37,11 @@ AstConstant* AstEnum::checkValue(AstExpression* pExpr)
 {
 DeclList::const_iterator iter = getIteratorBegin();
 DeclList::const_iterator end = getIteratorEnd();
-AstConstant*pConst = NULL;
-AstDeclaration* pDecl = NULL;
 
 while ( iter != end)
 {
-pDecl = *iter;
-pConst = static_cast(pDecl);
+AstDeclaration* pDecl = *iter;
+AstConstant* pConst = static_cast(pDecl);
 
 if (pConst->getConstValue()->compare(pExpr))
 return pConst;
@@ -80,11 +78,10 @@ bool AstEnum::dump(RegistryKey& rKey)
 
 DeclList::const_iterator iter = getIteratorBegin();
 DeclList::const_iterator end = getIteratorEnd();
-AstDeclaration* pDecl = NULL;
 sal_uInt16 index = 0;
 while ( iter != end )
 {
-pDecl = *iter;
+AstDeclaration* pDecl = *iter;
 if ( pDecl->getNodeType() == NT_enum_val )
 static_cast(pDecl)->dumpBlob(aBlob, index++, 
false);
 
diff --git a/idlc/source/astoperation.cxx b/idlc/source/astoperation.cxx
index 5a38c8a..ce67313 100644
--- a/idlc/source/astoperation.cxx
+++ b/idlc/source/astoperation.cxx
@@ -60,12 +60,11 @@ bool AstOperation::dumpBlob(typereg::Writer & rBlob, 
sal_uInt16 index)
 {
 DeclList::const_iterator iter = getIteratorBegin();
 DeclList::const_iterator end = getIteratorEnd();
-AstDeclaration* pDecl = NULL;
 RTParamMode paramMode;
 sal_uInt16 paramIndex = 0;
 while ( iter != end )
 {
-pDecl = *iter;
+AstDeclaration* pDecl = *iter;
 if ( pDecl->getNodeType() == NT_parameter )
 {
 AstParameter* pParam = static_cast(pDecl);
diff --git a/idlc/source/aststruct.cxx b/idlc/source/aststruct.cxx
index 482ee73..0a85a12 100644
--- a/idlc/source/aststruct.cxx
+++ b/idlc/source/aststruct.cxx
@@ -121,12 +121,11 @@ bool AstStruct::dump(RegistryKey& rKey)
 {
 DeclList::const_iterator iter = getIteratorBegin();
 DeclList::const_iterator end = getIteratorEnd();
-AstDeclaration* pDecl = NULL;
 AstMember*  pMember = NULL;
 sal_uInt16  index = 0;
 while ( iter != end )
 {
-pDecl = *iter;
+AstDeclaration* pDecl = *iter;
 if ( pDecl->getNodeType() == NT_member )
 {
 pMember = static_cast(pDecl);
diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx
index 45dbfbc..3d4ef7d 100644
--- a/idlc/source/idlccompile.cxx
+++ b/idlc/source/idlccompile.cxx
@@ -186,11 +186,11 @@ bool copyFile(const OString* source, const OString& 
target)
 }
 
 size_t totalSize = 512;
-size_t readSize  = 0;
 char   pBuffer[513];
 
 while ( !feof(pSource) )
 {
+size_t readSize;
 if ( (readSize = fread(pBuffer, 1, totalSize, pSource)) > 0 && 
!ferror(pSource) )
 {
 if ( (fwrite

[Libreoffice-commits] core.git: include/svtools

2014-12-18 Thread Michael Weghorn
 include/svtools/ruler.hxx |  314 ++
 1 file changed, 155 insertions(+), 159 deletions(-)

New commits:
commit a3181adc11bc707680424551369a24b3c65de921
Author: Michael Weghorn 
Date:   Thu Dec 18 23:48:12 2014 +0100

fdo#39468 translate German comments

Change-Id: I87ba3ac7aabbb297785eff5da6a5d498fdefd80c
Reviewed-on: https://gerrit.libreoffice.org/13534
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index 10a2bd0..06463cf 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -257,223 +257,219 @@ it has been dragged. There are the following query 
methods:
 relative to the set zero-offset.
 
 - GetDragAryPos()
-Liefert den Index im Array zurueck, wenn ein Border, Indent oder ein
-Tab gedragt wird. Achtung: Es wird die Array-Position waehrend des
-gesammten Drag-Vorgangs von dem Item im Array was vor dem Drag gesetzt
-war zurueckgeben. Dadurch ist es zum Beispiel auch moeglich, einen
-Tab nicht mehr anzuzeigen, wenn die Maus nach unten/rechts aus dem
-Lineal gezogen wird.
+Returns the index in the array if a border, an indent or a tab
+is being dragged. Attention: During a drag process, the array position
+of the item that has been set before the drag is returned.
+Therefore, it is for example also possible, to no longer show a tab
+if the mouse is dragged out of the ruler in bottom/right direction.
 
 - GetDragSize()
-Wenn Borders gedragt werden, kann hierueber abgefragt werden, ob
-die Groesse bzw. welche Seite oder die Position geaendert werden soll.
+If Borders are dragged, this can be used to query whether the size
+resp. which side or the position should be changed.
 RULER_DRAGSIZE_MOVE oder 0  - Move
-RULER_DRAGSIZE_1- Linke/obere Kante
-RULER_DRAGSIZE_2- Rechte/untere Kante
+RULER_DRAGSIZE_1- left/upper border
+RULER_DRAGSIZE_2- right/bottom border
 
 - IsDragDelete()
-Mit dieser Methode kann abgefragt werden, ob beim Draggen die
-Maus unten/rechts aus dem Fenster gezogen wurde. Damit kann
-zum Beispiel festgestellt werden, ob der Benutzer einen Tab
-loeschen will.
+This method can be used to query whether the mouse has been
+moved out of the window at the bottom/right while dragging.
+By this, it can for example be determined whether the user
+wants to delete a tab.
 
 - IsDragCanceled()
-Mit dieser Methode kann im EndDrag-Handler abgefragt werden,
-ob die Aktion abgebrochen wurde, indem der Anwender die
-Maus oben/links vom Fenster losgelassen hat oder ESC gedrueckt
-hat. In diesem Fall werden die Werte nicht uebernommen. Wird
-waehrend des Draggings die Maus oben/links aus dem Fenster
-gezogen, werden automatisch die alten Werte dargestellt, ohne das
-der Drag-Handler gerufen wird.
-Falls der Benutzer jedoch den Wert auf die alte Position
-zurueckgeschoben hat, liefert die Methode trotzdem sal_False. Falls
-dies vermieden werden soll, muss sich die Applikation im StartDrag-
-Handler den alten Wert merken und im EndDrag-Handler den Wert
-vergleichen.
+Using this Handler, it can be queried in the EndDrag handler
+whether the action was canceled by the user releasing the
+mouse at the top/left of the window or by pressing ESC.
+In this case, the values are not applied. If during the
+dragging, the mouse is dragged out of the window at the
+top/left, the old values are displayed automatically without
+the Drag handler being called.
+But if the user has moved the value to the old position, the
+method returns 'false' nevertheless.
+If this should be avoided, the application must remember the
+old value in the StartDrag handler and compare the value in the
+EndDrag handler.
 
 - GetDragScroll()
-Mit dieser Methode kann abgefragt werden, ob gescrollt werden
-soll. Es wird einer der folgenden Werte zurueckgegeben:
-RULER_SCROLL_NO - Drag-Position befindet sich
-  an keinem Rand und somit
-  muss nicht gescrollt werden.
-RULER_SCROLL_1  - Drag-Position befindet sich
-  am linken/oberen Rand und
-  somit sollte das Programm evt.
-  ein Srcoll ausloesen.
-RULER_SCROLL_2  - Drag-Position bef

[Libreoffice-commits] core.git: lotuswordpro/source oox/source package/source registry/source reportdesign/source

2014-12-19 Thread Michael Weghorn
 lotuswordpro/source/filter/lwpdoc.cxx  |   10 +++---
 lotuswordpro/source/filter/lwpfoundry.cxx  |3 +--
 lotuswordpro/source/filter/lwplayout.cxx   |4 +---
 lotuswordpro/source/filter/lwppagelayout.cxx   |2 +-
 lotuswordpro/source/filter/lwppara.cxx |5 ++---
 lotuswordpro/source/filter/lwpstory.cxx|3 +--
 lotuswordpro/source/filter/lwptablelayout.cxx  |3 +--
 lotuswordpro/source/filter/lwptblformula.cxx   |3 +--
 lotuswordpro/source/filter/xfilter/xfliststyle.cxx |6 ++
 oox/source/export/chartexport.cxx  |2 +-
 package/source/zippackage/ZipPackage.cxx   |6 --
 registry/source/regimpl.cxx|6 ++
 registry/source/registry.cxx   |8 ++--
 reportdesign/source/core/sdr/RptObject.cxx |4 ++--
 reportdesign/source/ui/dlg/Condition.cxx   |3 +--
 reportdesign/source/ui/dlg/GroupsSorting.cxx   |2 +-
 reportdesign/source/ui/report/ReportSection.cxx|3 ++-
 17 files changed, 28 insertions(+), 45 deletions(-)

New commits:
commit d41bc0f7b328ed6c69b2c2822de00165cdc62c61
Author: Michael Weghorn 
Date:   Fri Dec 19 08:47:29 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: Idcedd908c653d5a5700884f233ad134dde8be018
Reviewed-on: https://gerrit.libreoffice.org/13540
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/lotuswordpro/source/filter/lwpdoc.cxx 
b/lotuswordpro/source/filter/lwpdoc.cxx
index e2ab2a7..a2ff123 100644
--- a/lotuswordpro/source/filter/lwpdoc.cxx
+++ b/lotuswordpro/source/filter/lwpdoc.cxx
@@ -257,10 +257,9 @@ void LwpDocument::RegisterLayoutStyles()
 
 //set initial pagelayout in story for parsing pagelayout
 LwpDivInfo* pDivInfo = dynamic_cast (m_DivInfo.obj( 
VO_DIVISIONINFO).get());
-LwpPageLayout* pPageLayout = NULL;
 if(pDivInfo)
 {
-pPageLayout = 
dynamic_cast(pDivInfo->GetInitialLayoutID().obj(VO_PAGELAYOUT).get());
+LwpPageLayout* pPageLayout = 
dynamic_cast(pDivInfo->GetInitialLayoutID().obj(VO_PAGELAYOUT).get());
 if(pPageLayout)
 {
 //In Ole division, the content of pagelayout is VO_OLEOBJECT
@@ -540,11 +539,10 @@ LwpDocument* LwpDocument::GetPreviousDivision()
 }
 
 LwpDocument* pDivision = GetLastDivision();
-LwpDocument* pContentDivision = NULL;
 
 while(pDivision)
 {
-pContentDivision = pDivision->GetLastDivisionWithContents();
+LwpDocument* pContentDivision = 
pDivision->GetLastDivisionWithContents();
 if(pContentDivision)
 {
 return pContentDivision;
@@ -621,11 +619,9 @@ LwpDocument* LwpDocument::GetPreviousDivision()
 
 LwpDocument* pDivision = GetFirstDivision();
 
-LwpDocument*  pContentDivision = NULL;
-
 while (pDivision)
 {
-pContentDivision = 
pDivision->GetFirstDivisionWithContentsThatIsNotOLE();
+LwpDocument* pContentDivision = 
pDivision->GetFirstDivisionWithContentsThatIsNotOLE();
 if(pContentDivision)
 return pContentDivision;
 pDivision = pDivision->GetNextDivision();
diff --git a/lotuswordpro/source/filter/lwpfoundry.cxx 
b/lotuswordpro/source/filter/lwpfoundry.cxx
index 580f5fd..232afb8 100644
--- a/lotuswordpro/source/filter/lwpfoundry.cxx
+++ b/lotuswordpro/source/filter/lwpfoundry.cxx
@@ -488,7 +488,6 @@ LwpOrderedObject* 
LwpOrderedObjectManager::Enumerate(LwpOrderedObject * pLast)
 LwpListList* LwpOrderedObjectManager::GetNextActiveListList(LwpListList * 
pLast)
 {
 LwpListList* pList = NULL;
-LwpContent* pContent = NULL;
 if(pLast)
 pList = static_cast(pLast->GetNext().obj().get());
 else
@@ -502,7 +501,7 @@ LwpListList* 
LwpOrderedObjectManager::GetNextActiveListList(LwpListList * pLast)
 
 while(pList)
 {
-pContent = static_cast(pList->GetObject().obj().get());
+LwpContent* pContent = 
static_cast(pList->GetObject().obj().get());
 if(pContent && pContent->HasNonEmbeddedLayouts() &&
 !pContent->IsStyleContent())
 return pList;
diff --git a/lotuswordpro/source/filter/lwplayout.cxx 
b/lotuswordpro/source/filter/lwplayout.cxx
index 0c5c78d..594a375 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -447,8 +447,6 @@ void LwpAssociatedLayouts::Read(LwpObjectStream* pStrm)
 */
 LwpVirtualLayout* LwpAssociatedLayouts::GetLayout(LwpVirtualLayout 
*pStartLayout)
 {
-LwpVirtualLayout* pLayout = NULL;
-
 if (!pStartLayout && !m_OnlyLayout.IsNull())
 /* Looking for the first layout and there's only one layout in  the 
list.*/
 return dynamic_cast(m_OnlyLayout.obj().get());
@@ -456,7 +454,7 @@ LwpVirtualLayout* 
LwpAssociatedLayouts::GetLayou

[Libreoffice-commits] core.git: rsc/source

2014-12-19 Thread Michael Weghorn
 rsc/source/parser/rscdb.cxx |9 +++--
 rsc/source/prj/start.cxx|6 ++
 rsc/source/rsc/rsc.cxx  |6 ++
 rsc/source/tools/rscdef.cxx |   11 +++
 4 files changed, 10 insertions(+), 22 deletions(-)

New commits:
commit 5712983f18e7cdec16ea20a9b3d94a1586de543e
Author: Michael Weghorn 
Date:   Fri Dec 19 10:24:04 2014 +0100

fdo#39440 rsc: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I69454a75c8ce4aecf9e68f5887f38f8bf6fe6dca
Reviewed-on: https://gerrit.libreoffice.org/13543
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index 25d78f66..6af2194 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -329,18 +329,15 @@ void RscTypCont :: WriteInc( FILE * fOutput, sal_uLong 
lFileKey )
 }
 else
 {
-RscDepend * pDep;
-RscFile   * pFile;
-
 RscFile   * pFName = aFileTab.Get( lFileKey );
 if( pFName )
 {
 for ( size_t i = 0, n = pFName->aDepLst.size(); i < n; ++i )
 {
-pDep = pFName->aDepLst[ i ];
+RscDepend* pDep = pFName->aDepLst[ i ];
 if( pDep->GetFileKey() != lFileKey )
 {
-pFile = aFileTab.GetFile( pDep->GetFileKey() );
+RscFile* pFile = aFileTab.GetFile( pDep->GetFileKey() );
 if( pFile )
 {
 fprintf( fOutput, "#include " );
@@ -525,7 +522,6 @@ ERRTYPE RscTypCont::WriteRc( WriteRcContext& rContext )
 void RscTypCont :: WriteSrc( FILE * fOutput, sal_uLong nFileKey,
  bool bName )
 {
-RscFile *   pFName;
 RscEnumerateRef aEnumRef( this, pRoot, fOutput );
 
 unsigned char aUTF8BOM[3] = { 0xef, 0xbb, 0xbf };
@@ -534,6 +530,7 @@ void RscTypCont :: WriteSrc( FILE * fOutput, sal_uLong 
nFileKey,
 SAL_WARN_IF(!bSuccess, "rsc", "short write");
 if( bName )
 {
+RscFile* pFName;
 WriteInc( fOutput, nFileKey );
 
 if( NOFILE_INDEX == nFileKey )
diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx
index d42f0d8..fd2de94 100644
--- a/rsc/source/prj/start.cxx
+++ b/rsc/source/prj/start.cxx
@@ -157,7 +157,6 @@ static bool CallRsc2( RscStrList * pInputList,
   const OString &rSrsName, RscPtrPtr * pCmdLine )
 {
 int nRet;
-OString*  pString;
 RscVerbosity eVerbosity = RscVerbosityNormal;
 
 RscPtrPtr aNewCmdL;
@@ -196,7 +195,7 @@ static bool CallRsc2( RscStrList * pInputList,
 
 for ( size_t i = 0, n = pInputList->size(); i < n; ++i )
 {
-pString = (*pInputList)[ i ];
+OString* pString = (*pInputList)[ i ];
 aNewCmdL.Append( rsc_strdup( pString->getStr() ) );
 }
 
@@ -231,7 +230,6 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 char ** ppStr;
 RscPtrPtr   aCmdLine;   // Kommandozeile
 sal_uInt32  i;
-OString*pString;
 
 pStr = ::ResponseFile( &aCmdLine, argv, argc );
 if( pStr )
@@ -314,7 +312,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 
 for ( size_t k = 0, n = aInputList.size(); k < n; ++k )
 {
-pString = aInputList[ k ];
+OString* pString = aInputList[ k ];
 aTmpName = ::GetTmpFileName();
 if( !CallPrePro( *pString, aTmpName, &aCmdLine, bResponse ) )
 {
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 4b48405..3a2115b 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -390,7 +390,6 @@ void RscCompiler::EndCompile()
 if( !(pCL->nCommands & NOSYNTAX_FLAG) )
 {
 FILE* foutput;
-RscFile * pFN;
 
 if( NULL == (foutput = fopen( pCL->aOutputSrs.getStr(), "w" )) )
 pTC->pEH->FatalError( ERR_OPENFILE, RscId(), 
pCL->aOutputSrs.getStr() );
@@ -400,7 +399,7 @@ void RscCompiler::EndCompile()
 sal_uIntPtr aIndex = pTC->aFileTab.FirstIndex();
 while( aIndex != UNIQUEINDEX_ENTRY_NOTFOUND )
 {
-pFN = pTC->aFileTab.Get( aIndex );
+RscFile* pFN = pTC->aFileTab.Get( aIndex );
 if( !pFN->IsIncFile() )
 {
 pTC->WriteSrc( foutput, NOFILE_INDEX, false );
@@ -476,14 +475,13 @@ ERRTYPE RscCompiler :: ParseOneFile( sal_uLong lFileKey,
 aError = ERR_ERROR;
 else if( !pFName->bLoaded )
 {
-RscDepend * pDep;
 
 //Include-Dateien vorher lesen
 pFName->bLoaded = true; //Endlos Rekursion vermeiden
 
 for ( size_t i = 0; i < pFName->aDepLst.size() && aError.IsOk(); ++i )
   

[Libreoffice-commits] core.git: sal/osl sal/rtl sal/textenc sal/workben

2014-12-19 Thread Michael Weghorn
 sal/osl/unx/conditn.cxx |6 +---
 sal/osl/unx/nlsupport.cxx   |6 +---
 sal/osl/unx/pipe.cxx|   17 +
 sal/osl/unx/profile.cxx |   25 +++
 sal/osl/unx/signal.cxx  |   12 +
 sal/osl/unx/socket.cxx  |5 +--
 sal/osl/unx/system.cxx  |9 +++---
 sal/osl/w32/file_url.cxx|3 --
 sal/osl/w32/profile.cxx |   26 
 sal/rtl/cipher.cxx  |6 ++--
 sal/rtl/ustring.cxx |3 --
 sal/textenc/convertsimple.cxx   |3 --
 sal/textenc/tcvtbyte.cxx|6 +---
 sal/textenc/tcvtmb.cxx  |9 ++
 sal/workben/clipboardwben/testcopy/XTDataObject.cxx |3 +-
 sal/workben/testfile.cxx|   12 +++--
 16 files changed, 62 insertions(+), 89 deletions(-)

New commits:
commit 2ee336fb556ceb1d7e1ee8017c27539da7fe543b
Author: Michael Weghorn 
Date:   Fri Dec 19 11:07:02 2014 +0100

fdo#39440 sal: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: Id5f90757571e76a2c05a4cbd37020e1f6a6b2033
Reviewed-on: https://gerrit.libreoffice.org/13544
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/sal/osl/unx/conditn.cxx b/sal/osl/unx/conditn.cxx
index 1ba0f84..91d80d7 100644
--- a/sal/osl/unx/conditn.cxx
+++ b/sal/osl/unx/conditn.cxx
@@ -87,13 +87,12 @@ oslCondition SAL_CALL osl_createCondition()
 void SAL_CALL osl_destroyCondition(oslCondition Condition)
 {
 oslConditionImpl* pCond;
-int nRet = 0;
 
 if ( Condition )
 {
 pCond = (oslConditionImpl*)Condition;
 
-nRet = pthread_cond_destroy(&pCond->m_Condition);
+int nRet = pthread_cond_destroy(&pCond->m_Condition);
 SAL_WARN_IF(
 nRet != 0, "sal.osl",
 "pthread_cond_destroy failed, errno " << nRet << ", \""
@@ -225,7 +224,6 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition 
Condition, const Time
 {
 if ( ! pCond->m_State )
 {
-int ret;
 struct timeval  tp;
 struct timespec to;
 
@@ -237,7 +235,7 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition 
Condition, const Time
 /* spurious wake up prevention */
 do
 {
-ret = pthread_cond_timedwait(&pCond->m_Condition, 
&pCond->m_Lock, &to);
+const int ret = pthread_cond_timedwait(&pCond->m_Condition, 
&pCond->m_Lock, &to);
 if ( ret != 0 )
 {
 if ( ret == ETIME || ret == ETIMEDOUT )
diff --git a/sal/osl/unx/nlsupport.cxx b/sal/osl/unx/nlsupport.cxx
index 4afccaa..1fb6e02 100644
--- a/sal/osl/unx/nlsupport.cxx
+++ b/sal/osl/unx/nlsupport.cxx
@@ -65,8 +65,6 @@ _pair_search (const char *key, const _pair *base, unsigned 
int member )
 {
 unsigned int lower = 0;
 unsigned int upper = member;
-unsigned int current;
-int comparison;
 
 /* check for validity of input */
 if ( (key == NULL) || (base == NULL) || (member == 0) )
@@ -75,8 +73,8 @@ _pair_search (const char *key, const _pair *base, unsigned 
int member )
 /* binary search */
 while ( lower < upper )
 {
-current = (lower + upper) / 2;
-comparison = _pair_compare( key, base + current );
+const unsigned int current = (lower + upper) / 2;
+const int comparison = _pair_compare( key, base + current );
 if (comparison < 0)
 upper = current;
 else if (comparison > 0)
diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx
index ecddb66..337d412 100644
--- a/sal/osl/unx/pipe.cxx
+++ b/sal/osl/unx/pipe.cxx
@@ -115,7 +115,6 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, 
oslPipeOptions Option
 {
 oslPipe pPipe=0;
 rtl_String* strPipeName=0;
-sal_Char* pszPipeName=0;
 
 if ( ustrPipeName != 0 )
 {
@@ -124,7 +123,7 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, 
oslPipeOptions Option
 rtl_uString_getLength(ustrPipeName),
 osl_getThreadTextEncoding(),
 OUSTRING_TO_OSTRING_CVTFLAGS );
-pszPipeName = rtl_string_getStr(strPipeName);
+sal_Char* pszPipeName = rtl_string_getStr(strPipeName);
 pPipe = osl_psz_createPipe(pszPipeName, Options, Security);
 
 if ( strPipeName != 0 )
@@ -364,11 +363,6 @@ void SAL_CALL osl_releasePipe( oslPipe pPipe )
 void SAL_CALL osl_closePipe( oslPipe pPipe )

[Libreoffice-commits] core.git: sax/source sc/source

2014-12-20 Thread Michael Weghorn
 sax/source/tools/converter.cxx   |2 +-
 sc/source/core/data/attarray.cxx |   13 -
 sc/source/core/data/documen7.cxx |3 +--
 sc/source/core/data/fillinfo.cxx |3 +--
 sc/source/core/tool/callform.cxx |3 +--
 sc/source/core/tool/chgtrack.cxx |5 ++---
 sc/source/core/tool/interpr2.cxx |   10 +-
 sc/source/core/tool/interpr3.cxx |   22 ++
 sc/source/core/tool/interpr5.cxx |   36 
 sc/source/core/tool/interpr6.cxx |   12 
 10 files changed, 41 insertions(+), 68 deletions(-)

New commits:
commit 8abd002240e8d7666300bf6fa832a28988e9ed0a
Author: Michael Weghorn 
Date:   Fri Dec 19 13:06:58 2014 +0100

fdo#39440 sax, sc: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I589e13ee086cffee481954215a97960db656e633
Reviewed-on: https://gerrit.libreoffice.org/13548
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index a831269..e4d3c96 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -84,10 +84,10 @@ bool Converter::convertMeasure( sal_Int32& rValue,
 nVal += (rString[nPos] - '0');
 nPos++;
 }
-double nDiv = 1.;
 if( nPos < nLen && '.' == rString[nPos] )
 {
 nPos++;
+double nDiv = 1.;
 
 while( nPos < nLen &&
'0' <= rString[nPos] &&
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 65af7f6..0f7683c 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -107,14 +107,13 @@ void ScAttrArray::TestData() const
 void ScAttrArray::Reset( const ScPatternAttr* pPattern )
 {
 ScDocumentPool*  pDocPool = pDocument->GetPool();
-const ScPatternAttr* pOldPattern;
 ScAddressaAdrStart( nCol, 0, nTab );
 ScAddressaAdrEnd  ( nCol, 0, nTab );
 
 for (SCSIZE i=0; iGetItemSet(), pOldPattern->GetItemSet() ) )
@@ -180,7 +179,6 @@ bool ScAttrArray::Search( SCROW nRow, SCSIZE& nIndex ) const
 bool bFound = (nCount == 1);
 long nLo = 0;
 long nStartRow = 0;
-long nEndRow = 0;
 while ( !bFound && nLo <= nHi )
 {
 i = (nLo + nHi) / 2;
@@ -188,7 +186,7 @@ bool ScAttrArray::Search( SCROW nRow, SCSIZE& nIndex ) const
 nStartRow = (long) pData[i - 1].nRow;
 else
 nStartRow = -1;
-nEndRow = (long) pData[i].nRow;
+const long nEndRow = (long) pData[i].nRow;
 if (nEndRow < (long) nRow)
 nLo = ++i;
 else
@@ -1606,8 +1604,6 @@ bool ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW 
nEndRow, sal_Int16 nFlags
 
 void ScAttrArray::ClearItems( SCROW nStartRow, SCROW nEndRow, const 
sal_uInt16* pWhich )
 {
-const ScPatternAttr* pOldPattern;
-
 SCSIZE  nIndex;
 SCROW   nRow;
 SCROW   nThisRow;
@@ -1618,7 +1614,7 @@ void ScAttrArray::ClearItems( SCROW nStartRow, SCROW 
nEndRow, const sal_uInt16*
 
 while ( nThisRow <= nEndRow )
 {
-pOldPattern = pData[nIndex].pPattern;
+const ScPatternAttr* pOldPattern = pData[nIndex].pPattern;
 if ( pOldPattern->HasItemsSet( pWhich ) )
 {
 ScPatternAttr aNewPattern(*pOldPattern);
@@ -2147,7 +2143,6 @@ void ScAttrArray::DeleteArea(SCROW nStartRow, SCROW 
nEndRow)
 void ScAttrArray::DeleteHardAttr(SCROW nStartRow, SCROW nEndRow)
 {
 const ScPatternAttr* pDefPattern = pDocument->GetDefPattern();
-const ScPatternAttr* pOldPattern;
 
 SCSIZE  nIndex;
 SCROW   nRow;
@@ -2159,7 +2154,7 @@ void ScAttrArray::DeleteHardAttr(SCROW nStartRow, SCROW 
nEndRow)
 
 while ( nThisRow <= nEndRow )
 {
-pOldPattern = pData[nIndex].pPattern;
+const ScPatternAttr* pOldPattern = pData[nIndex].pPattern;
 
 if ( pOldPattern->GetItemSet().Count() )  // hard attributes ?
 {
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index af7337e..1871a24 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -589,13 +589,12 @@ void ScDocument::TrackFormulas( sal_uLong nHintId )
 {
 // outside the loop, check if any sheet has a "calculate" event script
 bool bCalcEvent = HasAnySheetEventScript( SC_SHEETEVENT_CALCULATE, 
true );
-SvtBroadcaster* pBC;
 ScFormulaCell* pTrack;
 ScFormulaCell* pNext;
 pTrack = pFormulaTrack;
 do
 {
-pBC = GetBroadcaster(pTrack->aPos);
+SvtBroadcaster* pBC = GetBroadcaster(pTrack->aPos);
 ScHint aHint(nHintId, pTrack->aPos);
 if (pBC)
 pBC->Broadcast( aHint );
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/sourc

[Libreoffice-commits] core.git: include/svtools include/svx

2014-12-20 Thread Michael Weghorn
 include/svtools/parhtml.hxx  |  111 
 include/svtools/rtfkeywd.hxx |6 -
 include/svx/svddrgv.hxx  |  196 +--
 3 files changed, 157 insertions(+), 156 deletions(-)

New commits:
commit 1ac3ad7743c7c98b83f7a8a4c3e03a83721b46b9
Author: Michael Weghorn 
Date:   Fri Dec 19 16:16:28 2014 +0100

fdo#39468 translate German comments

Change-Id: I36e3d7950d64a927ac6f081cf4b163fccd2f4786
Reviewed-on: https://gerrit.libreoffice.org/13549
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/include/svtools/parhtml.hxx b/include/svtools/parhtml.hxx
index 920c3b2..8ba1182 100644
--- a/include/svtools/parhtml.hxx
+++ b/include/svtools/parhtml.hxx
@@ -74,44 +74,44 @@ enum HTMLScriptLanguage
 
 struct HTMLOptionEnum
 {
-const sal_Char *pName;  // Wert einer HTML-Option
-sal_uInt16 nValue;  // und der dazugehoerige Wert eines Enums
+const sal_Char *pName;  // value of an HTML option
+sal_uInt16 nValue;  // and corresponding value of an enum
 };
 
-// Repraesentation einer HTML-Option (=Atrribut in einem Start-Tag)
-// Die Werte der Optionen werden immer als String gespeichert.
-// Die Methoden GetNumber, ... duerfen nur aufgerufen werden, wenn
-// die Option auch numerisch, ... ist.
-
+/** Representation of an HTML option (=attribute in a start tag).
+ * The values of the options are always stored as strings.
+ * The methods GetNumber,... may only be called if the option
+ * is actually numerical,...
+ */
 class SVT_DLLPUBLIC HTMLOption
 {
-OUString aValue;  // der Wert der Option (immer als String)
-OUString aToken;  // der Name der Option als String
-sal_uInt16 nToken;// und das entsprechende Token
+OUString aValue;  // value of the option (always as string)
+OUString aToken;  // name of the option as string
+sal_uInt16 nToken;// and respective token
 
 public:
 
 HTMLOption( sal_uInt16 nTyp, const OUString& rToken, const OUString& 
rValue );
 
-// der Name der Option ...
-sal_uInt16 GetToken() const { return nToken; }  // ... als Enum
-const OUString& GetTokenString() const { return aToken; } // ... als String
+// name of the option...
+sal_uInt16 GetToken() const { return nToken; }  // ... as enum
+const OUString& GetTokenString() const { return aToken; } // ... as string
 
-// der Wert der Option ...
-const OUString& GetString() const { return aValue; }  // ... als String
+// value of the option ...
+const OUString& GetString() const { return aValue; }  // ... as string
 
-sal_uInt32 GetNumber() const;   // ... als Zahl
-sal_Int32 GetSNumber() const;   // ... als Zahl
-void GetNumbers( std::vector &rNumbers,  // 
... als Zahlen
+sal_uInt32 GetNumber() const;   // ... as number
+sal_Int32 GetSNumber() const;   // ... as number
+void GetNumbers( std::vector &rNumbers,  // 
... as numbers
  bool bSpaceDelim=false ) const;
-void GetColor( Color& ) const;  // ... als Farbe
+void GetColor( Color& ) const;  // ... as color
 
-// ... als Enum pOptEnums ist ein HTMLOptionEnum-Array
+// ... as enum; pOptEnums is an HTMLOptionEnum array
 sal_uInt16 GetEnum( const HTMLOptionEnum *pOptEnums,
 sal_uInt16 nDflt=0 ) const;
 bool GetEnum( sal_uInt16 &rEnum, const HTMLOptionEnum *pOptEnums ) const;
 
-// ... und als ein par spezielle Enums
+// ... and as a few special enums
 HTMLInputType GetInputType() const; // 
 HTMLTableFrame GetTableFrame() const;   // 
 HTMLTableRules GetTableRules() const;   // 
@@ -123,37 +123,37 @@ typedef ::boost::ptr_vector HTMLOptions;
 class SVT_DLLPUBLIC HTMLParser : public SvParser
 {
 private:
-mutable HTMLOptions maOptions; // die Optionen des Start-Tags
+mutable HTMLOptions maOptions; // options of the start tag
 
-bool bNewDoc: 1;// neues Doc lesen ?
-bool bIsInHeader: 1;// scanne Header-Bereich
-bool bIsInBody  : 1;// scanne Body-Bereich
-bool bReadListing   : 1;// Lese Listings
-bool bReadXMP   : 1;// Lese XMP
-bool bReadPRE   : 1;// Lese preformatted Text
-bool bReadTextArea  : 1;// Lese TEXTAREA
-bool bReadScript: 1;// Lesen von 
-bool bReadStyle : 1;// Lesen von <STYLE>
-bool bEndTokenFound : 1;//  oder  gefunden
+bool bNewDoc: 1;// read new Doc?
+bool bIsInHeader: 1;// scan header section
+bool bIsInBody  : 1;// scan body section
+bool bReadListing   : 1;// read lis

[Libreoffice-commits] core.git: sc/source

2014-12-21 Thread Michael Weghorn
 sc/source/filter/dif/difimp.cxx|3 +--
 sc/source/filter/rtf/rtfparse.cxx  |3 +--
 sc/source/filter/xml/XMLExportIterator.cxx |5 +++--
 sc/source/filter/xml/xmlexprt.cxx  |5 ++---
 sc/source/filter/xml/xmlfonte.cxx  |4 ++--
 sc/source/ui/dbgui/filtdlg.cxx |2 +-
 sc/source/ui/dbgui/foptmgr.cxx |3 +--
 sc/source/ui/dbgui/sfiltdlg.cxx|3 +--
 sc/source/ui/dbgui/tpsort.cxx  |3 +--
 sc/source/ui/dbgui/tpsubt.cxx  |4 +---
 sc/source/ui/docshell/docfunc.cxx  |   15 ++-
 sc/source/ui/docshell/docsh4.cxx   |4 ++--
 sc/source/ui/docshell/docsh8.cxx   |4 ++--
 sc/source/ui/drawfunc/fuins2.cxx   |3 +--
 sc/source/ui/drawfunc/fusel.cxx|2 +-
 sc/source/ui/miscdlgs/acredlin.cxx |   15 ++-
 sc/source/ui/optdlg/tpusrlst.cxx   |2 +-
 sc/source/ui/pagedlg/areasdlg.cxx  |3 +--
 sc/source/ui/unoobj/cellsuno.cxx   |2 +-
 19 files changed, 35 insertions(+), 50 deletions(-)

New commits:
commit ea5effc3df7b89a9332ea5b1b1e6cd40bf37f081
Author: Michael Weghorn 
Date:   Sat Dec 20 16:48:11 2014 +0100

fdo#39440 sc: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I2eaf9a6792ca2c06a005385ec45c08f1292cba23

diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx
index 59d8238..6d5be2a 100644
--- a/sc/source/filter/dif/difimp.cxx
+++ b/sc/source/filter/dif/difimp.cxx
@@ -61,7 +61,6 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& 
rIn, ScDocument* pDoc,
 boolbOverflowWarn = false;
 
 OUString&   aData = aDifParser.aData;
-boolbData = false;
 
 rIn.Seek( 0 );
 
@@ -73,7 +72,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& 
rIn, ScDocument* pDoc,
 
 aPrgrsBar.Progress();
 
-bData = !aData.isEmpty();
+const bool bData = !aData.isEmpty();
 
 switch( eTopic )
 {
diff --git a/sc/source/filter/rtf/rtfparse.cxx 
b/sc/source/filter/rtf/rtfparse.cxx
index 87716da..ef818ce 100644
--- a/sc/source/filter/rtf/rtfparse.cxx
+++ b/sc/source/filter/rtf/rtfparse.cxx
@@ -266,7 +266,6 @@ void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ )
 
 void ScRTFParser::ProcToken( ImportInfo* pInfo )
 {
-ScEEParseEntry* pE;
 switch ( pInfo->nToken )
 {
 case RTF_TROWD: // denotes table row defauls, before RTF_CELLX
@@ -351,7 +350,7 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo )
 {   // Assign current Twips to MergeCell
 if ( !maList.empty() )
 {
-pE = maList.back();
+ScEEParseEntry* pE = maList.back();
 pE->nTwips = pActDefault->nTwips;
 }
 // Adjust selection of free-flying pActEntry
diff --git a/sc/source/filter/xml/XMLExportIterator.cxx 
b/sc/source/filter/xml/XMLExportIterator.cxx
index 9f9307e..f08e4dd 100644
--- a/sc/source/filter/xml/XMLExportIterator.cxx
+++ b/sc/source/filter/xml/XMLExportIterator.cxx
@@ -653,8 +653,6 @@ void ScMyNotEmptyCellsIterator::SetCellData( ScMyCell& 
rMyCell, const table::Cel
 rMyCell.bIsMatrixCovered = false;
 rMyCell.bIsMatrixBase = false;
 
-bool bIsMatrixBase = false;
-
 switch (rMyCell.maBaseCell.meType)
 {
 case CELLTYPE_VALUE:
@@ -672,11 +670,14 @@ void ScMyNotEmptyCellsIterator::SetCellData( ScMyCell& 
rMyCell, const table::Cel
 }
 
 if (rMyCell.maBaseCell.meType == CELLTYPE_FORMULA)
+{
+bool bIsMatrixBase = false;
 if (rExport.IsMatrix(rMyCell.maCellAddress, rMyCell.aMatrixRange, 
bIsMatrixBase))
 {
 rMyCell.bIsMatrixBase = bIsMatrixBase;
 rMyCell.bIsMatrixCovered = !bIsMatrixBase;
 }
+}
 }
 
 void ScMyNotEmptyCellsIterator::HasAnnotation(ScMyCell& aCell)
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index f468fca..d731f23 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -937,7 +937,6 @@ void ScXMLExport::ExportColumns(const sal_Int32 nTable, 
const table::CellRangeAd
 sal_Int32 nPrevColumn(0);
 bool bPrevIsVisible (true);
 bool bWasHeader (false);
-bool bIsHeader (false);
 bool bIsClosed (true);
 sal_Int32 nPrevIndex (-1);
 sal_Int32 nColumn;
@@ -947,7 +946,7 @@ void ScXMLExport::ExportColumns(const sal_Int32 nTable, 
const table::CellRangeAd
 bool bIsVisible(true);
 nIndex = pColumnStyles->GetStyleNameIndex(nTable, nColumn, bIsVisible);
 
-bIsHeader = bHasColumnHeader && (aColumnHeaderRange.StartColumn <= 
nColumn) && (nColumn <= aColumnHeaderRange.EndColumn);
+const bool bIsHeader = bHasColumnHeader &

[Libreoffice-commits] core.git: sc/source sc/workben

2014-12-21 Thread Michael Weghorn
 sc/source/ui/vba/vbachart.cxx   |4 ++--
 sc/source/ui/vba/vbarange.cxx   |   15 +++
 sc/source/ui/view/cellsh1.cxx   |7 ---
 sc/source/ui/view/drawvie3.cxx  |9 +++--
 sc/source/ui/view/output.cxx|9 +++--
 sc/source/ui/view/output2.cxx   |4 ++--
 sc/source/ui/view/viewfun3.cxx  |6 ++
 sc/source/ui/xmlsource/xmlsourcedlg.cxx |9 +++--
 sc/workben/dpcache/perf-test.cpp|3 +--
 9 files changed, 27 insertions(+), 39 deletions(-)

New commits:
commit 8870e068cc7368ffa14a6938836b370d2a188b64
Author: Michael Weghorn 
Date:   Sat Dec 20 20:47:39 2014 +0100

fdo#39440 sc: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: Icd031be4aeec07ba60804923e3506d64cf876dd8

diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx
index f9f8db7..dd89baa 100644
--- a/sc/source/ui/vba/vbachart.cxx
+++ b/sc/source/ui/vba/vbachart.cxx
@@ -923,9 +923,9 @@ ScVbaChart::is100PercentStacked() throw ( 
uno::RuntimeException )
 sal_Int32
 ScVbaChart::getSolidType(sal_Int32 _nDeep, sal_Int32 _nVertiStacked, sal_Int32 
_nVerti100PercentStacked, sal_Int32 _nVertiUnStacked, sal_Int32 _nHoriStacked, 
sal_Int32 _nHori100PercentStacked, sal_Int32 _nHoriUnStacked) throw ( 
script::BasicErrorException )
 {
-bool bIsVertical = true;
 try
 {
+bool bIsVertical = true;
 mxDiagramPropertySet->getPropertyValue(VERTICAL) >>= bIsVertical;
 bool bIsDeep = false;
 mxDiagramPropertySet->getPropertyValue(DEEP) >>= bIsDeep;
@@ -955,9 +955,9 @@ ScVbaChart::getSolidType(sal_Int32 _nDeep, sal_Int32 
_nVertiStacked, sal_Int32 _
 sal_Int32
 ScVbaChart::getStockUpDownValue(sal_Int32 _nUpDown, sal_Int32 _nNotUpDown) 
throw (script::BasicErrorException)
 {
-bool bUpDown = false;
 try
 {
+bool bUpDown = false;
 mxDiagramPropertySet->getPropertyValue(UPDOWN) >>= bUpDown;
 if (bUpDown)
 {
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 642ddec..6102226 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1190,7 +1190,6 @@ bool getScRangeListForAddress( const OUString& sName, 
ScDocShell* pDocSh, ScRang
 OUString sAddress = (*it).trim();
 // if a local name ( on the active sheet ) exists this will
 // take precedence over a global with the same name
-bool bLocalName = false;
 if ( !xNameAccess->hasByName( sAddress ) )
 {
 // try a local name
@@ -1199,7 +1198,7 @@ bool getScRangeListForAddress( const OUString& sName, 
ScDocShell* pDocSh, ScRang
 ScRangeName* pRangeName = rDoc.GetRangeName(nCurTab);
 if (pRangeName)
 {
-bLocalName = 
pRangeName->findByUpperName(ScGlobal::pCharClass->uppercase(sAddress)) != NULL;
+bool bLocalName = 
pRangeName->findByUpperName(ScGlobal::pCharClass->uppercase(sAddress)) != NULL;
 // TODO: Handle local names correctly.
 (void)bLocalName;
 }
@@ -2094,9 +2093,9 @@ ScVbaRange::Address(  const uno::Any& RowAbsolute, const 
uno::Any& ColumnAbsolut
 if ( !bVal )
 nFlags &= ~COL_ABSOLUTE;
 }
-bool bLocal = false;
 if ( External.hasValue() )
 {
+bool bLocal = false;
 External >>= bLocal;
 if (  bLocal )
 nFlags |= SCA_TAB_3D | SCA_FORCE_DOC;
@@ -3045,7 +3044,6 @@ ScVbaRange::Replace( const OUString& What, const 
OUString& Replacement, const un
 sal_Int16 nLook =  globalSearchOptions.GetWordOnly() ?  
excel::XlLookAt::xlPart : excel::XlLookAt::xlWhole;
 sal_Int16 nSearchOrder = globalSearchOptions.GetRowDirection() ? 
excel::XlSearchOrder::xlByRows : excel::XlSearchOrder::xlByColumns;
 
-bool bMatchCase = false;
 uno::Reference< util::XReplaceable > xReplace( mxRange, uno::UNO_QUERY );
 if ( xReplace.is() )
 {
@@ -3088,6 +3086,8 @@ ScVbaRange::Replace( const OUString& What, const 
OUString& Replacement, const un
 }
 if ( MatchCase.hasValue() )
 {
+bool bMatchCase = false;
+
 // SearchCaseSensitive
 MatchCase >>= bMatchCase;
 xDescriptor->setPropertyValue( SC_UNO_SRCHCASE, uno::makeAny( 
bMatchCase ) );
@@ -4470,7 +4470,6 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const 
uno::Any& Criteria1, const
 
 if (  !aField.hasValue() && ( Criteria1.hasValue() || Operator.hasValue() 
|| Criteria2.hasValue() ) )
 throw uno::RuntimeException();
-bool bAll = false;
 uno::Any Field( aField );
 if ( !( Field >>= nField ) )
 {
@@ -4488,6 +4487,8 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const 
uno::Any& Criteria1, 

[Libreoffice-commits] core.git: scaddins/source scripting/source sd/source

2014-12-21 Thread Michael Weghorn
 scaddins/source/analysis/bessel.cxx|8 ++--
 scaddins/source/analysis/financial.cxx |7 +++
 scripting/source/dlgprov/dlgprov.cxx   |2 +-
 scripting/source/stringresource/stringresource.cxx |2 +-
 sd/source/core/EffectMigration.cxx |7 +++
 sd/source/core/drawdoc.cxx |3 +--
 sd/source/core/drawdoc2.cxx|   12 +---
 sd/source/core/drawdoc4.cxx|6 ++
 sd/source/core/sdpage2.cxx |9 +++--
 sd/source/filter/eppt/epptso.cxx   |3 ++-
 sd/source/filter/eppt/pptx-text.cxx|2 +-
 11 files changed, 24 insertions(+), 37 deletions(-)

New commits:
commit 17fc7aa3b8fcd731fb05b5e17e23ee984d166a8f
Author: Michael Weghorn 
Date:   Sat Dec 20 21:09:40 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I390607e002e93cf7a6babc26d9be084d9f185058

diff --git a/scaddins/source/analysis/bessel.cxx 
b/scaddins/source/analysis/bessel.cxx
index 5a4581b..9161655 100644
--- a/scaddins/source/analysis/bessel.cxx
+++ b/scaddins/source/analysis/bessel.cxx
@@ -284,15 +284,13 @@ double BesselK( double fNum, sal_Int32 nOrder ) throw( 
IllegalArgumentException,
 case 1: return Besselk1( fNum );
 default:
 {
-double  fBkp;
-
 double  fTox = 2.0 / fNum;
 double  fBkm = Besselk0( fNum );
 double  fBk = Besselk1( fNum );
 
 for( sal_Int32 n = 1 ; n < nOrder ; n++ )
 {
-fBkp = fBkm + double( n ) * fTox * fBk;
+const double fBkp = fBkm + double( n ) * fTox * fBk;
 fBkm = fBk;
 fBk = fBkp;
 }
@@ -438,15 +436,13 @@ double BesselY( double fNum, sal_Int32 nOrder ) throw( 
IllegalArgumentException,
 case 1: return Bessely1( fNum );
 default:
 {
-double  fByp;
-
 double  fTox = 2.0 / fNum;
 double  fBym = Bessely0( fNum );
 double  fBy = Bessely1( fNum );
 
 for( sal_Int32 n = 1 ; n < nOrder ; n++ )
 {
-fByp = double( n ) * fTox * fBy - fBym;
+const double fByp = double( n ) * fTox * fBy - fBym;
 fBym = fBy;
 fBy = fByp;
 }
diff --git a/scaddins/source/analysis/financial.cxx 
b/scaddins/source/analysis/financial.cxx
index 7e79fba..81cf3c4 100644
--- a/scaddins/source/analysis/financial.cxx
+++ b/scaddins/source/analysis/financial.cxx
@@ -539,14 +539,13 @@ double SAL_CALL AnalysisAddIn::getXirr(
 static const sal_Int32 nMaxIter = 50;
 
 // Newton's method - try to find a fResultRate, so that 
lcl_sca_XirrResult() returns 0.
-double fNewRate, fRateEps, fResultValue;
 sal_Int32 nIter = 0;
 bool bContLoop;
 do
 {
-fResultValue = lcl_sca_XirrResult( aValues, aDates, fResultRate );
-fNewRate = fResultRate - fResultValue / lcl_sca_XirrResult_Deriv1( 
aValues, aDates, fResultRate );
-fRateEps = fabs( fNewRate - fResultRate );
+double fResultValue = lcl_sca_XirrResult( aValues, aDates, fResultRate 
);
+double fNewRate = fResultRate - fResultValue / 
lcl_sca_XirrResult_Deriv1( aValues, aDates, fResultRate );
+double fRateEps = fabs( fNewRate - fResultRate );
 fResultRate = fNewRate;
 bContLoop = (fRateEps > fMaxEps) && (fabs( fResultValue ) > fMaxEps);
 }
diff --git a/scripting/source/dlgprov/dlgprov.cxx 
b/scripting/source/dlgprov/dlgprov.cxx
index 3829429..c6b23ba 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -669,9 +669,9 @@ static const char aResourceResolverPropName[] = 
"ResourceResolver";
 uno::Reference< beans::XPropertySet > xDlgModPropSet( 
xCtrlMod, uno::UNO_QUERY );
 if( xDlgModPropSet.is() )
 {
-bool bDecoration = true;
 try
 {
+bool bDecoration = true;
 Any aDecorationAny = xDlgModPropSet->getPropertyValue( 
aDecorationPropName );
 aDecorationAny >>= bDecoration;
 if( !bDecoration )
diff --git a/scripting/source/stringresource/stringresource.cxx 
b/scripting/source/stringresource/stringresource.cxx
index cde4e73..667a900 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -543,10 +543,10 @@ void StringResourceImpl::removeLocale( const Locale& 
locale )
 sal_Int32 nLocaleCount = m_aLocaleItemVector.size();
 if( nLocaleCount > 1 )
 {
-LocaleItem* pF

[Libreoffice-commits] core.git: sd/source

2014-12-21 Thread Michael Weghorn
 sd/source/filter/html/htmlex.cxx   |6 ++
 sd/source/filter/ppt/pptin.cxx |9 +
 sd/source/ui/animations/CustomAnimationList.cxx|9 +++--
 sd/source/ui/dlg/custsdlg.cxx  |6 ++
 sd/source/ui/dlg/dlgassim.cxx  |3 +--
 sd/source/ui/dlg/sdtreelb.cxx  |5 ++---
 sd/source/ui/func/fuinsfil.cxx |3 +--
 sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx|6 ++
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |3 +--
 sd/source/ui/unoidl/unolayer.cxx   |3 +--
 sd/source/ui/unoidl/unopback.cxx   |3 +--
 sd/source/ui/view/drviews2.cxx |3 +--
 sd/source/ui/view/drviewsa.cxx |3 +--
 sd/source/ui/view/drviewsf.cxx |2 +-
 sd/source/ui/view/frmview.cxx  |6 ++
 sd/source/ui/view/outlview.cxx |6 ++
 sd/source/ui/view/sdview.cxx   |3 +--
 sd/source/ui/view/sdview2.cxx  |3 ++-
 sd/source/ui/view/sdview3.cxx  |4 ++--
 19 files changed, 33 insertions(+), 53 deletions(-)

New commits:
commit fb7c18884223f08818b44a9953b55c69a029c71c
Author: Michael Weghorn 
Date:   Sat Dec 20 21:45:16 2014 +0100

fdo#39440 sd: reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I14107ca24aa98f4111f542c3999866eb1a93a72b

diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 66544a2..23a3ce3 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -1035,12 +1035,11 @@ bool HtmlExport::CreateImagesForPresPages( bool 
bThumbnail)
 SdrTextObj* HtmlExport::GetLayoutTextObject(SdrPage* pPage)
 {
 const size_t nObjectCount = pPage->GetObjCount();
-SdrObject*  pObject  = NULL;
 SdrTextObj* pResult  = NULL;
 
 for (size_t nObject = 0; nObject < nObjectCount; ++nObject)
 {
-pObject = pPage->GetObj(nObject);
+SdrObject* pObject = pPage->GetObj(nObject);
 if (pObject->GetObjInventor() == SdrInventor &&
 pObject->GetObjIdentifier() == OBJ_OUTLINETEXT)
 {
@@ -1326,13 +1325,12 @@ void HtmlExport::WriteOutlinerParagraph(OUStringBuffer& 
aStr, SdrOutliner* pOutl
 
 sal_Int32 nCount = pOutliner->GetParagraphCount();
 
-Paragraph* pParagraph = NULL;
 
 sal_Int16 nCurrentDepth = -1;
 
 for (sal_Int32 nIndex = 0; nIndex < nCount; nIndex++)
 {
-pParagraph = pOutliner->GetParagraph(nIndex);
+Paragraph* pParagraph = pOutliner->GetParagraph(nIndex);
 if(pParagraph == NULL)
 continue;
 
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 70a8ba0..b01e1b6 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -872,8 +872,6 @@ bool ImplSdPPTImport::Import()
 {
 for ( sal_uInt16 nPage = 0; nPage < nPageAnz; nPage++ )
 {
-bool bNewAnimationsUsed = false;
-
 mePresChange = PRESCHANGE_SEMIAUTO;
 SetPageNum( nPage, PPT_SLIDEPAGE );
 SdPage* pPage = static_cast(MakeBlancPage( false ));
@@ -896,6 +894,8 @@ bool ImplSdPPTImport::Import()
 DffRecordHeader aPageHd;
 if ( SeekToAktPage( &aPageHd ) )
 {
+bool bNewAnimationsUsed = false;
+
 aPageHd.SeekToContent( rStCtrl );
 while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < 
aPageHd.GetRecEndFilePos() ) )
 {
@@ -2527,12 +2527,13 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, 
DffObjData& rObjData, voi
 pObj, PRESOBJ_PAGE );
 }
 
-bool bInhabitanceChecked = false;
-bool bAnimationInfoFound = false;
 DffRecordHeader aMasterShapeHd;
 
 if ( maShapeRecords.SeekToContent( rSt, DFF_msofbtClientData, 
SEEK_FROM_CURRENT_AND_RESTART ) )
 {
+bool bInhabitanceChecked = false;
+bool bAnimationInfoFound = false;
+
 DffRecordHeader& rHdClientData = *maShapeRecords.Current();
 while( true )
 {
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx 
b/sd/source/ui/animations/CustomAnimationList.cxx
index e62b84b..c29cd2e 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -541,9 +541,6 @@ void CustomAnimationList::update()
 long nLastVis = -1;
 long nFirstSelOld = -1;
 long nLastSelOld = -1;
-bool bMoved = false;
-bool bMove

[Libreoffice-commits] core.git: sdext/source sfx2/source shell/source starmath/source

2014-12-22 Thread Michael Weghorn
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |3 +--
 sfx2/source/appl/newhelp.cxx  |3 +--
 sfx2/source/appl/shutdowniconw32.cxx  |3 +--
 sfx2/source/appl/workwin.cxx  |6 ++
 sfx2/source/control/dispatch.cxx  |6 +++---
 sfx2/source/control/statcach.cxx  |8 
 sfx2/source/control/templatelocalview.cxx |3 ++-
 sfx2/source/doc/doctemplates.cxx  |9 -
 sfx2/source/doc/guisaveas.cxx |2 +-
 sfx2/source/doc/objcont.cxx   |3 ++-
 sfx2/source/doc/objstor.cxx   |5 ++---
 shell/source/backends/gconfbe/gconfaccess.cxx |3 +--
 starmath/source/visitors.cxx  |2 +-
 13 files changed, 25 insertions(+), 31 deletions(-)

New commits:
commit ea644f0e90d0c9585e73bdec240908803a38d4a6
Author: Michael Weghorn 
Date:   Mon Dec 22 17:57:48 2014 +0100

fdo#39440 reduce scope of local variables

This addresses some cppcheck warnings.

Change-Id: I404f121ee2e5020359a662f54ffe341f466cd1d5
Reviewed-on: https://gerrit.libreoffice.org/13608
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 129f2b9..4484e8f 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -149,11 +149,10 @@ bool ExtractJpegData(Stream* str, OutputBuffer& outBuf)
 int bytesToLen = -1;
 bool collectBytes = false;
 int startOfScan = 0;
-int b2 = -1;
 int b1 = -1;
 for (; ; )
 {
-b2 = b1;
+const int b2 = b1;
 b1 = str->getChar();
 
 if (b1 == -1)
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index b629a09..a2ae700 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -616,7 +616,6 @@ void IndexTabPage_Impl::InitializeIndex()
 if ( ( aAnySeq[0] >>= aKeywordList ) && ( aAnySeq[1] >>= 
aKeywordRefList ) &&
  ( aAnySeq[2] >>= aAnchorRefList ) && ( aAnySeq[3] >>= 
aTitleRefList ) )
 {
-bool insert;
 sal_uInt16 nPos;
 int ndx,tmp;
 OUString aIndex, aTempString;
@@ -634,7 +633,7 @@ void IndexTabPage_Impl::InitializeIndex()
 
 DBG_ASSERT( aRefList.getLength() == 
aAnchorList.getLength(),"reference list and title list of different length" );
 
-insert = ( ( ndx = aKeywordPair.indexOf( ';' ) ) == -1 ? 
sal_False : sal_True );
+const bool insert = ( ( ndx = aKeywordPair.indexOf( ';' ) 
) == -1 ? sal_False : sal_True );
 
 if ( insert )
 {
diff --git a/sfx2/source/appl/shutdowniconw32.cxx 
b/sfx2/source/appl/shutdowniconw32.cxx
index e20eb0d..40c6c20 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -238,7 +238,6 @@ static void deleteSystrayMenu( HMENU hMenu )
 return;
 
 MENUITEMINFOW mi;
-MYITEM *pMyItem;
 int pos=0;
 memset( &mi, 0, sizeof( mi ) );
 mi.cbSize = sizeof( mi );
@@ -246,7 +245,7 @@ static void deleteSystrayMenu( HMENU hMenu )
 
 while( GetMenuItemInfoW( hMenu, pos++, true, &mi ) )
 {
-pMyItem = (MYITEM*) mi.dwItemData;
+MYITEM *pMyItem = (MYITEM*) mi.dwItemData;
 if( pMyItem )
 {
 (pMyItem->text).clear();
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 6a9a716..01f827a 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1017,11 +1017,10 @@ void SfxWorkWindow::ReleaseChild_Impl( vcl::Window& 
rWindow )
 SfxChild_Impl* SfxWorkWindow::FindChild_Impl( const vcl::Window& rWindow ) 
const
 {
 
-SfxChild_Impl *pChild = 0;
 sal_uInt16 nCount = aChildren.size();
 for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos )
 {
-pChild = aChildren[nPos];
+SfxChild_Impl *pChild = aChildren[nPos];
 if ( pChild && pChild->pWin == &rWindow )
 return pChild;
 }
@@ -1759,11 +1758,10 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier 
eChild,
 // windows may have been registered and released without an update 
until now
 Sort_Impl();
 
-SfxChild_Impl *pChild = 0;
 sal_uInt16 n;
 for ( n=0; npWin == pWin )
 break;
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 4cf4e01..b42f32a 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -887,13 +887,1

Re: New options "Hide" and "With condition" in the bookmark dialog unclear

2019-11-26 Thread Michael Weghorn
On 26/11/2019 13.08, Heiko Tietze wrote:
> That's quite vague. I suggest to make it experimental until we have a 
> documentation. Should work for your customer anyway. Patch is here 
> https://gerrit.libreoffice.org/#/c/83509/

I was told that the WollMux extension uses the functionality via UNO
API, which will be unaffected by hiding the UI elements anyway
For some more background, s.a. tdf#101856 ("MAILMERGE Add conditional to
expand / collapse bookmarks").

Therefore, hiding the UI parts until the polishing has actually happened
sounds like a good idea, IMHO.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Linux daily builds failing

2019-12-09 Thread Michael Weghorn
Hi,

On 09/12/2019 20.01, Xisco Fauli wrote:
> Since that last successful build
> 
> tinderbox: buildname: Linux-rpm_deb-x86_64@86-TDF
> tinderbox: tree: MASTER
> tinderbox: pull time 2019-11-28 20:14:48
> tinderbox: git sha1s
> core:5030be4e85179147476b1e441eb618fb6ed58235
> 
> Linux daily builds are failing with this error:
> 
> [build CUT] services
> [build CUT] sc_ucalc
> [build LNK] CppunitTest/libtest_sc_filters_test.so
> [build LNK] CppunitTest/libtest_sc_tiledrendering.so
> [build CUT] sccomp_solver
> [build CUT] sccomp_swarmsolvertest
> /tinderbox/buildslave/build/instdir/program/libvclplug_qt5lo.so has 
> suspicious NEEDED: libxcb-icccm.so.4
> /tinderbox/buildslave/build/instdir/program/lo_kde5filepicker has suspicious 
> NEEDED: libxcb-icccm.so.4
> make[1]: *** 
> [/tinderbox/buildslave/source/libo-master/postprocess/CustomTarget_check_dynamic_objects.mk:22:
>  
> /tinderbox/buildslave/build/workdir/CustomTarget/postprocess/check_dynamic_objects/check.done]
>  Error 1
> make[1]: *** Waiting for unfinished jobs
> 
> Config used:  Running ./configure with '--with-system-dicts 
> --with-myspell-dicts --with-system-zlib --without-system-poppler 
> --without-system-openssl --without-system-libpng --without-system-libxml 
> --without-system-jpeg --without-system-jars --without-system-postgresql 
> --without-junit --with-help=html --without-helppack-integration 
> --with-linker-hash-style=both --with-fonts 
> --with-external-thes-dir=/usr/share/mythes 
> --with-external-hyph-dir=/usr/share/hyphen 
> --with-external-dict-dir=/usr/share/hunspell --enable-avahi --enable-dbus 
> --enable-extension-integration --enable-odk --enable-gtk3-kde5 --enable-kf5 
> --enable-gstreamer-1-0 --enable-evolution2 --enable-gio 
> --enable-scripting-beanshell --enable-scripting-javascript 
> --enable-ext-wiki-publisher --enable-ext-nlpsolver --enable-epm 
> --enable-python=internal --enable-online-update --enable-breakpad 
> --disable-dconf --enable-mergelibs --with-vendor=The Document Foundation 
> --with-lang=ALL --with-package-format=rpm deb --enable-gtk3 --ena
 ble-qt5 --enable-kde5 --disable-dependency-tracking 
--with-external-tar=/home/buildslave/source/lo-externalsrc 
--with-export-validation --enable-python=fully-internal 
--srcdir=/tinderbox/buildslave/source/libo-master 
--enable-option-checking=fatal'
> 
> Any idea where the problem might be?

That particular failure is because libxcb-icccm is used since commit
fe2baf9e84e0ca9aeaa683e37076f57fa3f38dca ("Qt5 fix missing
XCB_ICCCM_WM_HINT_WINDOW_GROUP"). [1]

I'll submit a patch to fix this.


[1]
https://gerrit.libreoffice.org/plugins/gitiles/core/+/fe2baf9e84e0ca9aeaa683e37076f57fa3f38dca%5E%21
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Linux daily builds failing

2019-12-10 Thread Michael Weghorn
On 10/12/2019 08.43, Michael Weghorn wrote:
> That particular failure is because libxcb-icccm is used since commit
> fe2baf9e84e0ca9aeaa683e37076f57fa3f38dca ("Qt5 fix missing
> XCB_ICCCM_WM_HINT_WINDOW_GROUP"). [1]
> 
> I'll submit a patch to fix this.

-> https://gerrit.libreoffice.org/#/c/84799/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: PDF processing

2020-03-04 Thread Michael Weghorn
Hi,

On 03/03/2020 12.26, Pietro Paolini wrote:
> I am quite curious about this fantastic feature of LibreOffice which
> allows me to open a PDF and edit it in the UI - even though it seems
> to screw the fonts a bit. I wanted to have a look at the source code
> to see if there is some sort of PDF "model" being built from the
> original PDF document, for instance a  set of objects each describing
> the graphic meanings of a particular region within the page.  I did
> not succeed very much as I am not familiar with the codebase and the
> project is quite big.
> 
> Can anybody point me in the right direction ? Is there a specific
> place where this PDF "normalization" takes place ?

At a quick glance, 'sdext/source/pdfimport' looks like a good place to
start with; I personally don't know more related to your more specific
question.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: ESC meeting minutes: 2020-03-05

2020-03-05 Thread Michael Weghorn
On 05/03/2020 16.38, Miklos Vajna wrote:
>    + Android viewer: core.git java viewer is currently broken on master
>  + both arch64 and x86 (crash on doc load, will investigate)
>  + have 2 changes in gerrit attempting to fix these problems
> (Michael W)

Merged now (and a 3rd patch for aarch64 in addition):

*
https://gerrit.libreoffice.org/plugins/gitiles/core/+diff/34c4800f6a8b9383418a2a7279accfbbac1762ac%5E%21
("Android Viewer: Set SfxWorkWindow::bIsFullScreen to true again")

*
https://gerrit.libreoffice.org/plugins/gitiles/core/+diff/7f049babd79ad14242dd346945c31a90607082ed%5E%21
("android hunspell: Disable for Android Viewer")

*
https://gerrit.libreoffice.org/plugins/gitiles/core/+diff/cd6b32ef1f3348ce8e529c5f808b704ff728c240%5E%21
("tdf#127781 Android Viewer: aarch64: Avoid throwing exceptions through
bridges")

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: ESC meeting minutes: 2020-03-05: Android Viewer

2020-03-06 Thread Michael Weghorn
Hi Terry,

On 06/03/2020 17.35, Terrence Enger wrote:
> On 05/03/2020 16.38, Miklos Vajna wrote:
>>>+ Android viewer: core.git java viewer is currently
> broken on master
>>>  + both arch64 and x86 (crash on doc load, will investigate)
>>>  + have
> 2 changes in gerrit attempting to fix these problems
>>> (Michael W)
>>
>> Merged now (and a 3rd patch
> for aarch64 in addition):
> 
> Sadly, on a Samsung J3 running adroid 8.0.0, running the daily build
> master~2020-03-05_23.57.27_LibreOfficeViewer-strippedUIEditing-debug.apk,
> which include the 3 commits you cited, I still see crashes (spinning
> wait-icon for a long time; go-back triggers message "LibreOffice
> Viewer keeps stopping.  (X) Close App").
> 
> This happens for the three files offered from the About menu, a .odt
> and a .ods that I have around, and new "untitled.odt".

The 3 above patches fix the cases I could observe that made Android
Viewer crash whenever trying to load a document (i.e. without selecting
"go-back").

There are certainly more ways in which the app can still crash, so can
you please retest whether it works when you "wait long enough" -- and
best use the latest daily build, which also includes a commit that makes
opening the first document after app installation faster. [1]

> BTW, I wonder if there is a bug report which would be a better place
> for this discussion.  Some near-candidates are
> 123290  android- cannot open files with writer (Android 9) 
> 127540  menu About > Show License crashes 
> 129348  Can't open files (new and existing) using the android app 
> but each of them is already RESOLVED.  I suspect that there are more
> possibilities.

Since I could reproduce the issue you describe, I have opened a new bug
report to keep track of that scenario: tdf#131195 [2]


As a side note, there's also tdf#127781 where it is mentioned that a
self-compiled app for aarch64 still crashes for the reporter, but I was
not able to reproduce that so far.



[1]
https://gerrit.libreoffice.org/plugins/gitiles/core/+diff/adbc858dd476651ac79300aaae25cf82e848cb69%5E%21
[2] https://bugs.documentfoundation.org/show_bug.cgi?id=131195
[3] https://bugs.documentfoundation.org/show_bug.cgi?id=127781



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: GSOC Application Problem

2020-04-01 Thread Michael Weghorn
On 01/04/2020 15.37, Yusuf Keten wrote:
> I've applied to GSOC. However, the timeline was pushed the end of the
> program back by 2 weeks. So, there is an error in my GSoC proposal
> timeline. They changed the timeline 2 days before the deadline. Is there
> anyone who has any idea what I can do about this problem?

Just for the minutes, from #libreoffice-dev right now:

[15:50]  yusufketen: I discussed with thorsten and we don't
think it is a problem
[15:51]  buovjaga: I was very worried about this, thank you
so much.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: LibreOffice build dependencies souce URI for Ubuntu (latest) ?

2019-10-29 Thread Michael Weghorn
Hi Cor,

On 28/10/2019 22.48, Cor Nouws wrote:
> Following this
>   https://wiki.documentfoundation.org/Development/Linux_Build_Dependencies
> 
> with #2, adding
>   deb-src http://archive.ubuntu.com/ubuntu/ distroname main
> to /apt/etc/sources.list
> 
> then apt-get update gives an error
> Err:7 http://archive.ubuntu.com/ubuntu distroname Release
> 
>   404  Not Found [IP: 2001:67c:1360:8001::21 80]
> 

"distroname" is a placeholder and needs to be replaced by the actual
code name for your Ubuntu version, which would e.g. be "bionic" for
Ubuntu 18.04 etc.

I've adapted the wiki accordingly. Please feel free to improve further
if you have more ideas.

Regards,
Michael
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Latest build is small and will not start

2019-05-03 Thread Michael Weghorn
Hi Rich,

On 29/04/2019 00.54, Rich Lakey wrote:
> master~2019-04-26_14.20.06_LibreOfficeDev_6.3.0.0.alpha0_Linux_x86-64_deb.tar.gz
> is 96.8 MB and Calc will not start.

Can you check a newer build?
e.g.
master~2019-05-02_14.29.16_LibreOfficeDev_6.3.0.0.alpha0_Linux_x86-64_deb.tar.gz
works just fine for me.

  Michael
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: Creating a localized build

2019-05-20 Thread Michael Weghorn
Hi Olivier,

On 19/05/2019 14.55, Olivier Hallot wrote:
> I'd like to create a Windows localized build with packaging for Guarani
> (gug) for l10n and i18n development purposes.
> 
> The main language is 'gug-PY' and second languae is 'es'.
> 
> Are there pages on how to proceed?. Most of the l10n pages are on
> translations.

I don't know whether there's existing documentation, but does adding the
following two autogen parameters help?

For l10n/i18n support:

--with-lang='gug es'

For the packaging (i.e. create MSI installer)

--with-package-format=msi

'gug-PY' doesn't seem to be a valid option for the '--with-lang'
parameter; not sure if just 'gug' is the right thing.

(I didn't test the full build myself, just that the '--with-lang' option
is accepted on Linux.)


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

  1   2   3   4   5   6   7   8   9   10   >