[PATCH] Fix icu version checks.

2013-06-03 Thread Mark Wielaard (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/4139

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/39/4139/1

Fix icu version checks.

commit 30c303 Make charmap.cxx compile with icu = 4.4. was incomplete
and had wrong version checks. After ICU 4.8 (4.8.1.1) the next version
of ICU was 49 (49.1) so U_ICU_VERSION_MAJOR_NUM contains two digets (49),
earlier that it was just one digit (4). The correct header to include to
do version checks is unicode/uversion.h. USCRIPT_MANDAEAN is the old
alias of USCRIPT_MANDAIC (same numeric value). U_JG_FARSI_YEH is only
available since ICU 4.4. Note that on older icu versions (4.2.1) the
200B (ZWSP) Zero Width Space breakiterator testcase fails (others
succeed).

Change-Id: If73c1402239a28546077437e9382f0bd38642bad
---
M i18npool/qa/cppunit/test_breakiterator.cxx
M i18nutil/source/utility/unicode.cxx
M svx/source/dialog/charmap.cxx
M sw/source/core/text/porlay.cxx
4 files changed, 13 insertions(+), 6 deletions(-)



diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx 
b/i18npool/qa/cppunit/test_breakiterator.cxx
index b3ec68f..4ba6a79 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -19,7 +19,7 @@
 #include com/sun/star/i18n/WordType.hpp
 #include unotest/bootstrapfixturebase.hxx
 
-#include unicode/uvernum.h
+#include unicode/uversion.h
 
 #include rtl/strbuf.hxx
 #include rtl/ustrbuf.hxx
@@ -236,6 +236,8 @@
 }
 
 //See https://bugs.freedesktop.org/show_bug.cgi?id=49629
+//Note that the breakiterator test will fail on older icu versions
+//(4.2.1) for the 200B (ZWSP) Zero Width Space testcase.
 sal_Unicode aBreakTests[] = { ' ', 1, 2, 3, 4, 5, 6, 7, 0x91, 0x92, 
0x200B, 0xE8FF, 0xF8FF };
 for (int mode = i18n::WordType::ANY_WORD; mode = 
i18n::WordType::WORD_COUNT; ++mode)
 {
diff --git a/i18nutil/source/utility/unicode.cxx 
b/i18nutil/source/utility/unicode.cxx
index 2c2dd42..b46a7f6 100644
--- a/i18nutil/source/utility/unicode.cxx
+++ b/i18nutil/source/utility/unicode.cxx
@@ -826,15 +826,15 @@
 case USCRIPT_TAI_VIET:
 sRet = blt;
 break;
+case USCRIPT_MANDAEAN: /* Aliased to USCRIPT_MANDAIC in icu 4.6. */
+sRet = mic;
+break;
 #if (U_ICU_VERSION_MAJOR_NUM  4) || (U_ICU_VERSION_MAJOR_NUM == 4  
U_ICU_VERSION_MINOR_NUM = 4)
 case USCRIPT_NABATAEAN: //no language with an assigned code yet
 sRet = mis;
 break;
 case USCRIPT_PALMYRENE: //no language with an assigned code yet
 sRet = mis;
-break;
-case USCRIPT_MANDAIC:
-sRet = mic;
 break;
 case USCRIPT_BAMUM:
 sRet = bax;
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index bc6c83e..907d9f8 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -1302,7 +1302,7 @@
 case UBLOCK_DOMINO_TILES:
 aAllSubsets.push_back( Subset( 0x1F030, 0x1F09F, 
RID_SUBSETSTR_DOMINO_TILES ) );
 break;
-#if U_ICU_VERSION_MAJOR_NUM = 44
+#if (U_ICU_VERSION_MAJOR_NUM  4) || (U_ICU_VERSION_MAJOR_NUM == 4  
U_ICU_VERSION_MINOR_NUM = 4)
 case UBLOCK_SAMARITAN:
 aAllSubsets.push_back( Subset( 0x0800, 0x083F, 
RID_SUBSETSTR_SAMARITAN ) );
 break;
@@ -1382,7 +1382,7 @@
 aAllSubsets.push_back( Subset( 0x2A700, 0x2B73F, 
RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C ) );
 break;
 #endif
-#if U_ICU_VERSION_MAJOR_NUM = 46
+#if (U_ICU_VERSION_MAJOR_NUM  4) || (U_ICU_VERSION_MAJOR_NUM == 4  
U_ICU_VERSION_MINOR_NUM = 6)
 case UBLOCK_MANDAIC:
 aAllSubsets.push_back( Subset( 0x0840, 0x085F, 
RID_SUBSETSTR_MANDAIC ) );
 break;
@@ -1420,6 +1420,7 @@
 aAllSubsets.push_back( Subset( 0x2B740, 0x2B81F, 
RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D ) );
 break;
 #endif
+// Note ICU version 49 (NOT 4.9), so the MAJOR_NUM is two digits.
 #if U_ICU_VERSION_MAJOR_NUM = 49
 case UBLOCK_ARABIC_EXTENDED_A:
 aAllSubsets.push_back( Subset( 0x08A0, 0x08FF, 
RID_SUBSETSTR_ARABIC_EXTENDED_A ) );
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index b820b8b..edc8458 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -72,7 +72,11 @@
 #define isRehChar(c)IS_JOINING_GROUP((c), REH)
 #define isTehMarbutaChar(c) IS_JOINING_GROUP((c), TEH_MARBUTA)
 #define isWawChar(c)IS_JOINING_GROUP((c), WAW)
+#if (U_ICU_VERSION_MAJOR_NUM  4) || (U_ICU_VERSION_MAJOR_NUM == 4  
U_ICU_VERSION_MINOR_NUM = 4)
 #define isYehChar(c)(IS_JOINING_GROUP((c), YEH) || 
IS_JOINING_GROUP((c), FARSI_YEH))
+#else
+#define isYehChar(c)

[PATCH] propacc.cxx include limits.h for USHRT_MAX.

2013-05-30 Thread Mark Wielaard (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/4111

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/11/4111/1

propacc.cxx include limits.h for USHRT_MAX.

Don't depend on accidental definition depending on the version of boost used.

Change-Id: Ib26afdde895411bdf827e1af21e490b59ef7f2d5
---
M basic/source/classes/propacc.cxx
1 file changed, 2 insertions(+), 0 deletions(-)



diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx
index 67cd65a..c5ca85e 100644
--- a/basic/source/classes/propacc.cxx
+++ b/basic/source/classes/propacc.cxx
@@ -23,6 +23,8 @@
 #include basic/sbstar.hxx
 #include sbunoobj.hxx
 
+#include limits.h // USHRT_MAX
+
 using com::sun::star::uno::Reference;
 using namespace com::sun::star;
 using namespace com::sun::star::uno;

-- 
To view, visit https://gerrit.libreoffice.org/4111
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib26afdde895411bdf827e1af21e490b59ef7f2d5
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Mark Wielaard m...@klomp.org

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


[PATCH] Make charmap.cxx compile with icu = 4.4.

2013-05-30 Thread Mark Wielaard (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/4112

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/12/4112/1

Make charmap.cxx compile with icu = 4.4.

configure.ac claims ICU = 4.2 is supported. Make it so.

Change-Id: Ia08bb492f41dcb88bc84550edb51ce5e89fe1103
---
M svx/source/dialog/charmap.cxx
1 file changed, 4 insertions(+), 0 deletions(-)



diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 23494a8..bc6c83e 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -1302,6 +1302,7 @@
 case UBLOCK_DOMINO_TILES:
 aAllSubsets.push_back( Subset( 0x1F030, 0x1F09F, 
RID_SUBSETSTR_DOMINO_TILES ) );
 break;
+#if U_ICU_VERSION_MAJOR_NUM = 44
 case UBLOCK_SAMARITAN:
 aAllSubsets.push_back( Subset( 0x0800, 0x083F, 
RID_SUBSETSTR_SAMARITAN ) );
 break;
@@ -1380,6 +1381,8 @@
 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C:
 aAllSubsets.push_back( Subset( 0x2A700, 0x2B73F, 
RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C ) );
 break;
+#endif
+#if U_ICU_VERSION_MAJOR_NUM = 46
 case UBLOCK_MANDAIC:
 aAllSubsets.push_back( Subset( 0x0840, 0x085F, 
RID_SUBSETSTR_MANDAIC ) );
 break;
@@ -1416,6 +1419,7 @@
 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D:
 aAllSubsets.push_back( Subset( 0x2B740, 0x2B81F, 
RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D ) );
 break;
+#endif
 #if U_ICU_VERSION_MAJOR_NUM = 49
 case UBLOCK_ARABIC_EXTENDED_A:
 aAllSubsets.push_back( Subset( 0x08A0, 0x08FF, 
RID_SUBSETSTR_ARABIC_EXTENDED_A ) );

-- 
To view, visit https://gerrit.libreoffice.org/4112
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia08bb492f41dcb88bc84550edb51ce5e89fe1103
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Mark Wielaard m...@klomp.org

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


[PATCH] Source files shouldn't have executable bit set.

2013-05-28 Thread Mark Wielaard (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/4070

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/70/4070/1

Source files shouldn't have executable bit set.

Change-Id: Iafad6249a7998d7c749c1ca2979a606078cfcb5e
---
M cli_ure/source/climaker/climaker_app.cxx
M cli_ure/source/climaker/climaker_share.h
M codemaker/source/cppumaker/cpputype.cxx
M codemaker/source/cppumaker/includes.cxx
M include/svtools/treelistentries.hxx
M l10ntools/inc/po.hxx
M l10ntools/source/po.cxx
M vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
8 files changed, 0 insertions(+), 0 deletions(-)



diff --git a/cli_ure/source/climaker/climaker_app.cxx 
b/cli_ure/source/climaker/climaker_app.cxx
old mode 100755
new mode 100644
diff --git a/cli_ure/source/climaker/climaker_share.h 
b/cli_ure/source/climaker/climaker_share.h
old mode 100755
new mode 100644
diff --git a/codemaker/source/cppumaker/cpputype.cxx 
b/codemaker/source/cppumaker/cpputype.cxx
old mode 100755
new mode 100644
diff --git a/codemaker/source/cppumaker/includes.cxx 
b/codemaker/source/cppumaker/includes.cxx
old mode 100755
new mode 100644
diff --git a/include/svtools/treelistentries.hxx 
b/include/svtools/treelistentries.hxx
old mode 100755
new mode 100644
diff --git a/l10ntools/inc/po.hxx b/l10ntools/inc/po.hxx
old mode 100755
new mode 100644
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
old mode 100755
new mode 100644
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
old mode 100755
new mode 100644

-- 
To view, visit https://gerrit.libreoffice.org/4070
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iafad6249a7998d7c749c1ca2979a606078cfcb5e
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Mark Wielaard m...@klomp.org

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


[PATCH] Fix memory leak in DrawViewShell::GetAttrState().

2013-05-24 Thread Mark Wielaard (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/4020

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/20/4020/1

Fix memory leak in DrawViewShell::GetAttrState().

DrawViewShell::GetAttrState() might create a temporary new SvxNumRule
object. Make sure it gets deleted when done.

Change-Id: I33ddd9df983193fe87dd076267043d202cdfc3d5
---
M sd/source/ui/view/drviewsf.cxx
1 file changed, 2 insertions(+), 1 deletion(-)



diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 4989cd2..89c90d0 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -630,9 +630,10 @@
 }
 }
 }
+  delete pNumRule;
 }
 }
-break;
+break;
 //End
 // Added by Li Hui for story 179.
 case FN_NUM_BULLET_ON:

-- 
To view, visit https://gerrit.libreoffice.org/4020
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33ddd9df983193fe87dd076267043d202cdfc3d5
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Mark Wielaard m...@klomp.org

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


[PATCH] Robustify and fix leak in NBOTypeMgrBase::ImplLoad().

2013-05-24 Thread Mark Wielaard (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/4031

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/31/4031/1

Robustify and fix leak in NBOTypeMgrBase::ImplLoad().

The operator of SvStream doesn't initialize a variable if the stream
is faulty. So initialize the variables before usage. Also delete the
SvStream even if it was faulty.

Change-Id: I5a7f31016e060c3b9fb4f0fd1889f444877cb89d
---
M svx/source/sidebar/nbdtmg.cxx
1 file changed, 3 insertions(+), 3 deletions(-)



diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 0976150..a1eb0c1 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -184,8 +184,8 @@
 aFile.Append( filename);
 SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aFile.GetMainURL( 
INetURLObject::NO_DECODE ), STREAM_READ );
 if( pIStm ) {
-sal_uInt32  nVersion;
-sal_Int32   nNumIndex;
+sal_uInt32  nVersion = 0;
+sal_Int32   nNumIndex = 0;
 *pIStm  nVersion;
 if (nVersion==DEFAULT_NUMBERING_CACHE_FORMAT_VERSION) //first version
 {
@@ -209,8 +209,8 @@
 RelplaceNumRule(aNum,nNumIndex,mLevel);
 *pIStm  nNumIndex;
 }
-delete pIStm;
 }
+delete pIStm;
 }
 eCoreUnit = eOldCoreUnit;
 bIsLoading = false;

-- 
To view, visit https://gerrit.libreoffice.org/4031
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a7f31016e060c3b9fb4f0fd1889f444877cb89d
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Mark Wielaard m...@klomp.org

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


[PATCH] Splitter::ImplInitHorVer(bool) should always initialize all ...

2013-05-22 Thread Mark Wielaard (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/4007

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/07/4007/1

Splitter::ImplInitHorVer(bool) should always initialize all state.

When creating a new Splitter ImplInitHorVer(bool) should always
init all state independent from the current state because some
variables might not be initialized yet.

 Conditional jump or move depends on uninitialised value(s)
at 0x8293625: Splitter::ImplInitHorVer(bool) (split.cxx:70)
by 0x82936DF: Splitter::ImplInit(Window*, long) (split.cxx:100)
by 0x8293CC3: Splitter::Splitter(Window*, long) (split.cxx:157)
by 0x2686BC48: ScTabSplitter::ScTabSplitter(Window*, long, ScViewData*) 
(tabsplit.cxx:28)
...
  Uninitialised value was created by a heap allocation
at 0x4A08361: operator new(unsigned long) (vg_replace_malloc.c:298)
by 0x2687D8F1: ScTabView::Init() (tabview5.cxx:90)
by 0x2686C5D3: ScTabView::ScTabView(Window*, ScDocShell, ScTabViewShell*) 
(tabview.cxx:261)
...

The public method to change the internal state is Splitter::SetHorizontal()
which does check the current state (and calls Splitter::ImplInitHorVer()
only when there is a real state change). So the bNew != mbHorzSplit was
redundant anyway.

Change-Id: If84e8bff4c87d208416de3583202ce88d6982a99
---
M vcl/source/window/split.cxx
1 file changed, 18 insertions(+), 18 deletions(-)



diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 92a637e..13cc486 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -65,28 +65,28 @@
 
 // ---
 
+// Should only be called from a ImplInit method for initialization or
+// after checking bNew is different from the current mbHorzSplit value.
+// The public method that does that check is Splitter::SetHorizontal().
 void Splitter::ImplInitHorVer(bool bNew)
 {
-if(bNew != (bool)mbHorzSplit)
+mbHorzSplit = bNew;
+
+PointerStyle ePointerStyle;
+const StyleSettings rSettings = GetSettings().GetStyleSettings();
+
+if ( mbHorzSplit )
 {
-mbHorzSplit = bNew;
-
-PointerStyle ePointerStyle;
-const StyleSettings rSettings = GetSettings().GetStyleSettings();
-
-if ( mbHorzSplit )
-{
-ePointerStyle = POINTER_HSPLIT;
-SetSizePixel( Size( rSettings.GetSplitSize(), 
rSettings.GetScrollBarSize() ) );
-}
-else
-{
-ePointerStyle = POINTER_VSPLIT;
-SetSizePixel( Size( rSettings.GetScrollBarSize(), 
rSettings.GetSplitSize() ) );
-}
-
-SetPointer( Pointer( ePointerStyle ) );
+ePointerStyle = POINTER_HSPLIT;
+SetSizePixel( Size( rSettings.GetSplitSize(), 
rSettings.GetScrollBarSize() ) );
 }
+else
+{
+ePointerStyle = POINTER_VSPLIT;
+SetSizePixel( Size( rSettings.GetScrollBarSize(), 
rSettings.GetSplitSize() ) );
+}
+
+SetPointer( Pointer( ePointerStyle ) );
 }
 
 // ---

-- 
To view, visit https://gerrit.libreoffice.org/4007
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If84e8bff4c87d208416de3583202ce88d6982a99
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Mark Wielaard m...@klomp.org

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


[PATCH] Fix two SfxFilterMatcher_Impl memory leaks.

2013-05-21 Thread Mark Wielaard (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3989

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/89/3989/1

Fix two SfxFilterMatcher_Impl memory leaks.

First SfxFilterMatcher_Impl::InitForIterating() will set pList to either
the global filter array matcher pFilterArr, or to a new SfxFilterList_Impl.
This new SfxFilterList_Impl should be deleted in the destructor.

Second getSfxFilterMatcher_Impl() keeps a cache of SfxFilterMatcher_Impls.
If a SfxFilterMatcher_Impl for a given name doesn't exist yet a new one
will be created. But the cache stored objects by service name (aName), but
looked object up by factory name (rName). So it always created a new
SfxFilterMatcher_Impl instead of using the one from the aImplArr cache.

Change-Id: I7840aaddc861f609fbe14d5b6c0ea20d997f690f
---
M sfx2/source/bastyp/fltfnc.cxx
1 file changed, 9 insertions(+), 1 deletion(-)



diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 8d9a70c..42477d0 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -255,6 +255,14 @@
 , pList(0)
 {
 }
+~SfxFilterMatcher_Impl()
+{
+// SfxFilterMatcher_Impl::InitForIterating() will set pList to
+// either the global filter array matcher pFilterArr, or to
+// a new SfxFilterList_Impl.
+if (pList != pFilterArr)
+delete pList;
+}
 };
 
 namespace
@@ -287,7 +295,7 @@
 // previously
 SfxFilterMatcherArr_Impl::iterator aEnd = aImplArr.end();
 SfxFilterMatcherArr_Impl::iterator aIter =
-std::find_if(aImplArr.begin(), aEnd, hasName(rName));
+std::find_if(aImplArr.begin(), aEnd, hasName(aName));
 if (aIter != aEnd)
 return *aIter;
 

-- 
To view, visit https://gerrit.libreoffice.org/3989
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7840aaddc861f609fbe14d5b6c0ea20d997f690f
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Mark Wielaard m...@klomp.org

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


[PATCH] sal osl_getGlobalTimer: Don't confuse start and current time...

2013-05-20 Thread Mark Wielaard (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3979

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/79/3979/1

sal osl_getGlobalTimer: Don't confuse start and current time.

Change-Id: I575dd70d6b80d4f3279476037e509550cfa23fde
---
M sal/osl/unx/time.c
1 file changed, 2 insertions(+), 4 deletions(-)



diff --git a/sal/osl/unx/time.c b/sal/osl/unx/time.c
index 94a935e..227f502 100644
--- a/sal/osl/unx/time.c
+++ b/sal/osl/unx/time.c
@@ -298,8 +298,6 @@
 sal_uInt32 nSeconds;
 
 #if defined(MACOSX) || defined(IOS)
-startTime = mach_absolute_time();
-
 double diff = (double)(mach_absolute_time() - startTime) * 
adjust_time_factor * 1000;
 nSeconds = (sal_uInt32)diff;
 #else
@@ -307,9 +305,9 @@
 int res;
 
 #if defined(USE_CLOCK_GETTIME)
-res = clock_gettime(CLOCK_REALTIME, startTime);
+res = clock_gettime(CLOCK_REALTIME, currentTime);
 #else
-res = gettimeofday( startTime, NULL );
+res = gettimeofday( currentTime, NULL );
 #endif
 assert(res == 0);
 

-- 
To view, visit https://gerrit.libreoffice.org/3979
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I575dd70d6b80d4f3279476037e509550cfa23fde
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Mark Wielaard m...@klomp.org

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


[PATCH] valgrind support is useful independent from DBGUTIL support.

2013-05-19 Thread Mark Wielaard (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3966

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/66/3966/1

valgrind support is useful independent from DBGUTIL support.

Especially when valgrinding an optimized libreoffice build.

Change-Id: I7d2ac5476ba8561ce6afbf8c9472550fbe959c76
---
M configure.ac
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/configure.ac b/configure.ac
index 7174b9c..a1e4723 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5223,7 +5223,7 @@
 dnl ===
 dnl Check if valgrind headers are available
 dnl ===
-if test $cross_compiling = yes -o $ENABLE_DBGUTIL != TRUE; then
+if test $cross_compiling = yes; then
 ENABLE_VALGRIND=FALSE
 else
 prev_cppflags=$CPPFLAGS

-- 
To view, visit https://gerrit.libreoffice.org/3966
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d2ac5476ba8561ce6afbf8c9472550fbe959c76
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Mark Wielaard m...@klomp.org

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


[PATCH] Fix memory leak in mapToFontConfigLangTag.

2013-05-19 Thread Mark Wielaard (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3967

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/67/3967/1

Fix memory leak in mapToFontConfigLangTag.

FcGetLangs() will return a new FCStrSet that needs to be freed after usage.

Change-Id: Ie7fe0dd160fa59077d6a90878e70d0e034680812
---
M vcl/generic/fontmanager/fontconfig.cxx
1 file changed, 12 insertions(+), 0 deletions(-)



diff --git a/vcl/generic/fontmanager/fontconfig.cxx 
b/vcl/generic/fontmanager/fontconfig.cxx
index dc8dfa7..3e23fc9 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -811,11 +811,17 @@
 
 sLangAttrib = OUStringToOString(rLangTag.getBcp47(), 
RTL_TEXTENCODING_UTF8).toAsciiLowerCase();
 if (FcStrSetMember(pLangSet, (const FcChar8*)sLangAttrib.getStr()))
+{
+FcStrSetDestroy(pLangSet);
 return sLangAttrib;
+}
 
 sLangAttrib = OUStringToOString(rLangTag.getLanguageAndScript(), 
RTL_TEXTENCODING_UTF8).toAsciiLowerCase();
 if (FcStrSetMember(pLangSet, (const FcChar8*)sLangAttrib.getStr()))
+{
+FcStrSetDestroy(pLangSet);
 return sLangAttrib;
+}
 
 OString sLang = OUStringToOString(rLangTag.getLanguage(), 
RTL_TEXTENCODING_UTF8).toAsciiLowerCase();
 OString sRegion = OUStringToOString(rLangTag.getCountry(), 
RTL_TEXTENCODING_UTF8).toAsciiLowerCase();
@@ -824,11 +830,17 @@
 {
 sLangAttrib = sLang + OString('-') + sRegion;
 if (FcStrSetMember(pLangSet, (const FcChar8*)sLangAttrib.getStr()))
+{
+FcStrSetDestroy(pLangSet);
 return sLangAttrib;
+}
 }
 
 if (FcStrSetMember(pLangSet, (const FcChar8*)sLang.getStr()))
+{
+FcStrSetDestroy(pLangSet);
 return sLang;
+}
 
 return OString();
 #else

-- 
To view, visit https://gerrit.libreoffice.org/3967
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7fe0dd160fa59077d6a90878e70d0e034680812
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Mark Wielaard m...@klomp.org

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


[PATCH] Remove --disable-unix-qstart-libpng from distro-configs.

2013-05-14 Thread Mark Wielaard (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3900

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/00/3900/1

Remove --disable-unix-qstart-libpng from distro-configs.

commit cc858aca0ebf653eebceaf09e2316763d8d81051
configure: substantially de-bong libpng handling
Removed the unix-qstart-libpng configure option.
Also remove it from the distro-configs.

Change-Id: I99de8b99d531d7bedc76ac171050219801000284
---
M distro-configs/LibreOfficeLinux.conf
M distro-configs/LibreOfficeOpenBSD.conf
2 files changed, 0 insertions(+), 2 deletions(-)



diff --git a/distro-configs/LibreOfficeLinux.conf 
b/distro-configs/LibreOfficeLinux.conf
index 3836c73..1b841e4 100644
--- a/distro-configs/LibreOfficeLinux.conf
+++ b/distro-configs/LibreOfficeLinux.conf
@@ -38,6 +38,5 @@
 --enable-python=internal
 --enable-online-update
 --disable-gio
---disable-unix-qstart-libpng
 --disable-randr-link
 --disable-kde4
diff --git a/distro-configs/LibreOfficeOpenBSD.conf 
b/distro-configs/LibreOfficeOpenBSD.conf
index 6a52daf..3492b7e 100644
--- a/distro-configs/LibreOfficeOpenBSD.conf
+++ b/distro-configs/LibreOfficeOpenBSD.conf
@@ -7,7 +7,6 @@
 --disable-odk
 --disable-opengl
 --disable-randr-link
---disable-unix-qstart-libpng
 --enable-gstreamer-0-10
 --enable-lockdown
 --enable-ext-presenter-minimizer

-- 
To view, visit https://gerrit.libreoffice.org/3900
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99de8b99d531d7bedc76ac171050219801000284
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Mark Wielaard m...@klomp.org

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


[PATCH] Require at least gio 2.26 for the dbus support.

2013-05-14 Thread Mark Wielaard (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3904

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/04/3904/1

Require at least gio 2.26 for the dbus support.

Change-Id: I6276d55081098f567104f61fde896d1b66591522
---
M configure.ac
1 file changed, 3 insertions(+), 4 deletions(-)



diff --git a/configure.ac b/configure.ac
index dc578d7..30944ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9484,10 +9484,9 @@
 if test $ENABLE_GNOMEVFS = TRUE; then
 AC_MSG_ERROR([please use --enable-gio only together with 
--disable-gnome-vfs.])
 fi
-ENABLE_GIO=TRUE
-AC_MSG_RESULT([yes])
-PKG_CHECK_MODULES( GIO, gio-2.0 )
-AC_DEFINE(ENABLE_GIO)
+dnl Need at least 2.26 for the dbus support.
+PKG_CHECK_MODULES([GIO], [gio-2.0 = 2.26],
+  [ENABLE_GIO=TRUE], [ENABLE_GIO=])
 else
 AC_MSG_RESULT([no])
 fi

-- 
To view, visit https://gerrit.libreoffice.org/3904
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6276d55081098f567104f61fde896d1b66591522
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Mark Wielaard m...@klomp.org

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


[PATCH] datetime.cxx (ISO8601parseTime) ‘bFrac’ may be used uninitia...

2013-05-13 Thread Mark Wielaard (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3885

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/85/3885/1

datetime.cxx (ISO8601parseTime) ‘bFrac’ may be used uninitialized.

gcc 4.4.7 warns about the above because getISO8601TimeToken calls
impl_getISO8601TimeToken, but if impl_getISO8601TimeToken fails, then
o_bFraction will never be set.

Change-Id: I3dd9460391c0dcdef37110110ad623c1016f0ddc
---
M unotools/source/misc/datetime.cxx
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/unotools/source/misc/datetime.cxx 
b/unotools/source/misc/datetime.cxx
index cbfb169..93f60a6 100644
--- a/unotools/source/misc/datetime.cxx
+++ b/unotools/source/misc/datetime.cxx
@@ -392,7 +392,7 @@
 sal_Int32 n = 0;
 OUString tokInt;
 OUString tokFrac;
-bool bFrac;
+bool bFrac = false;
 // hours
 if (bSuccess  (bSuccess = getISO8601TimeToken(aTimeStr, n, tokInt, 
bFrac, tokFrac)))
 {

-- 
To view, visit https://gerrit.libreoffice.org/3885
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3dd9460391c0dcdef37110110ad623c1016f0ddc
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Mark Wielaard m...@klomp.org

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