[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 5 commits - filter/source sc/source sd/source vcl/inc vcl/source

2011-12-29 Thread Pierre-André Jacquod
 filter/source/pdf/impdialog.cxx |   13 
 filter/source/pdf/impdialog.hrc |1 
 filter/source/pdf/impdialog.hxx |2 
 filter/source/pdf/impdialog.src |   12 
 filter/source/pdf/pdfexport.cxx |4 
 filter/source/pdf/pdfexport.hxx |1 
 filter/source/pdf/pdffilter.cxx |1 
 sc/source/core/tool/dbdata.cxx  |6 
 sd/source/ui/unoidl/unomodel.cxx|  498 ++--
 vcl/inc/vcl/pdfextoutdevdata.hxx|4 
 vcl/source/gdi/pdfextoutdevdata.cxx |9 
 11 files changed, 298 insertions(+), 253 deletions(-)

New commits:
commit 146fa8dabe816d35e7b879172baa00027575d3b2
Author: Julien Nabet serval2...@yahoo.fr
Date:   Wed Dec 28 23:15:03 2011 +0100

Fix order init

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index cae790a..182af3c 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -453,9 +453,9 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent,
 maCbAllowDuplicateFieldNames( this, PDFFilterResId( 
CB_ALLOWDUPLICATEFIELDNAMES ) ),
 
 maCbExportBookmarks( this, PDFFilterResId( CB_EXPORTBOOKMARKS ) ),
+maCbExportHiddenSlides( this, PDFFilterResId( CB_EXPORTHIDDENSLIDES ) ),
 maCbExportNotes( this, PDFFilterResId( CB_EXPORTNOTES ) ),
 maCbExportNotesPages( this, PDFFilterResId( CB_EXPORTNOTESPAGES ) ),
-maCbExportHiddenSlides( this, PDFFilterResId( CB_EXPORTHIDDENSLIDES ) ),
 maCbExportEmptyPages( this, PDFFilterResId( CB_EXPORTEMPTYPAGES ) ),
 maCbAddStream( this, PDFFilterResId( CB_ADDSTREAM ) ),
 maFtAddStreamDescription( this, PDFFilterResId( FT_ADDSTREAMDESCRIPTION ) 
),
commit 6ea45acb55294fe99dbe44dec1ff844ab0989111
Author: Julien Nabet serval2...@yahoo.fr
Date:   Wed Dec 28 22:55:15 2011 +0100

Fix init order

diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx 
b/vcl/source/gdi/pdfextoutdevdata.cxx
index a2d856d..23d81a4 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -511,8 +511,8 @@ PDFExtOutDevData::PDFExtOutDevData( const OutputDevice 
rOutDev ) :
 mbTransitionEffects ( sal_True ),
 mbUseLosslessCompression( sal_True ),
 mbReduceImageResolution ( sal_False ),
-mbExportNDests  ( sal_False ),
 mbExportHiddenSlides( sal_False ),
+mbExportNDests  ( sal_False ),
 mnFormsFormat   ( 0 ),
 mnPage  ( -1 ),
 mpPageSyncData  ( NULL ),
commit 0fcf0fa0a6760d85e791bd4a63fe6a0a75e59ea5
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Sat Dec 24 00:16:59 2011 +0100

option to export hidden slides to pdf files

This add the checkbox hidden pages to the PDF export general tab
and if checked, export also to PDF the hidden slides

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 25dbbd1..cae790a 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -93,6 +93,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
 mbExportFormFields( sal_True ),
 mbAllowDuplicateFieldNames( sal_False ),
 mbExportBookmarks( sal_True ),
+mbExportHiddenSlides ( sal_False),
 mnOpenBookmarkLevels( -1 ),
 
 mbHideViewerToolbar( sal_False ),
@@ -194,6 +195,8 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
 mbExportNotes = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( ExportNotes  ) ), sal_False );
 
 mbExportBookmarks = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( ExportBookmarks ) ), sal_True );
+if ( mbIsPresentation )
+mbExportHiddenSlides = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( ExportHiddenSlides ) ), sal_False );
 mnOpenBookmarkLevels = maConfigItem.ReadInt32( OUString( 
RTL_CONSTASCII_USTRINGPARAM( OpenBookmarkLevels ) ), -1 );
 mbUseTransitionEffects = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( UseTransitionEffects  ) ), sal_True );
 mbIsSkipEmptyPages = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( IsSkipEmptyPages  ) ), sal_False );
@@ -333,6 +336,8 @@ Sequence PropertyValue  ImpPDFTabDialog::GetFilterData()
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
ExportNotes ) ), mbExportNotes );
 
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
ExportBookmarks ) ), mbExportBookmarks );
+if ( mbIsPresentation )
+maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
ExportHiddenSlides ) ), mbExportHiddenSlides );
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
UseTransitionEffects ) ), mbUseTransitionEffects );
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
IsSkipEmptyPages ) ), mbIsSkipEmptyPages );
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
IsAddStream ) ), mbAddStream );
@@ -450,6 +455,7 @@ 

[Libreoffice-commits] .: 4 commits - filter/source sc/source sd/source vcl/inc vcl/source

2011-12-28 Thread Pierre-André Jacquod
 filter/source/pdf/impdialog.cxx |   13 
 filter/source/pdf/impdialog.hrc |1 
 filter/source/pdf/impdialog.hxx |2 
 filter/source/pdf/impdialog.src |   12 
 filter/source/pdf/pdfexport.cxx |4 
 filter/source/pdf/pdfexport.hxx |1 
 filter/source/pdf/pdffilter.cxx |1 
 sc/source/core/tool/dbdata.cxx  |6 
 sc/source/ui/unoobj/cursuno.cxx |2 
 sc/source/ui/vba/vbarange.cxx   |2 
 sd/source/ui/unoidl/unomodel.cxx|  498 ++--
 vcl/inc/vcl/pdfextoutdevdata.hxx|4 
 vcl/source/gdi/pdfextoutdevdata.cxx |9 
 13 files changed, 300 insertions(+), 255 deletions(-)

New commits:
commit 7da3f1bad5f7791756f8450391d94ba78b3d10cc
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Sat Dec 24 00:16:59 2011 +0100

option to export hidden slides to pdf files

This add the checkbox hidden pages to the PDF export general tab
and if checked, export also to PDF the hidden slides

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 2f0682c..b10bf68 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -93,6 +93,7 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
 mbExportFormFields( sal_True ),
 mbAllowDuplicateFieldNames( sal_False ),
 mbExportBookmarks( sal_True ),
+mbExportHiddenSlides ( sal_False),
 mnOpenBookmarkLevels( -1 ),
 
 mbHideViewerToolbar( sal_False ),
@@ -194,6 +195,8 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
 mbExportNotes = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( ExportNotes  ) ), sal_False );
 
 mbExportBookmarks = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( ExportBookmarks ) ), sal_True );
+if ( mbIsPresentation )
+mbExportHiddenSlides = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( ExportHiddenSlides ) ), sal_False );
 mnOpenBookmarkLevels = maConfigItem.ReadInt32( OUString( 
RTL_CONSTASCII_USTRINGPARAM( OpenBookmarkLevels ) ), -1 );
 mbUseTransitionEffects = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( UseTransitionEffects  ) ), sal_True );
 mbIsSkipEmptyPages = maConfigItem.ReadBool( OUString( 
RTL_CONSTASCII_USTRINGPARAM( IsSkipEmptyPages  ) ), sal_False );
@@ -341,6 +344,8 @@ Sequence PropertyValue  ImpPDFTabDialog::GetFilterData()
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
ExportNotes ) ), mbExportNotes );
 
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
ExportBookmarks ) ), mbExportBookmarks );
+if ( mbIsPresentation )
+maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
ExportHiddenSlides ) ), mbExportHiddenSlides );
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
UseTransitionEffects ) ), mbUseTransitionEffects );
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
IsSkipEmptyPages ) ), mbIsSkipEmptyPages );
 maConfigItem.WriteBool( OUString( RTL_CONSTASCII_USTRINGPARAM( 
IsAddStream ) ), mbAddStream );
@@ -458,6 +463,7 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage( Window* pParent,
 maCbExportBookmarks( this, PDFFilterResId( CB_EXPORTBOOKMARKS ) ),
 maCbExportNotes( this, PDFFilterResId( CB_EXPORTNOTES ) ),
 maCbExportNotesPages( this, PDFFilterResId( CB_EXPORTNOTESPAGES ) ),
+maCbExportHiddenSlides( this, PDFFilterResId( CB_EXPORTHIDDENSLIDES ) ),
 maCbExportEmptyPages( this, PDFFilterResId( CB_EXPORTEMPTYPAGES ) ),
 maCbAddStream( this, PDFFilterResId( CB_ADDSTREAM ) ),
 maFtAddStreamDescription( this, PDFFilterResId( FT_ADDSTREAMDESCRIPTION ) 
),
@@ -569,6 +575,9 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const 
ImpPDFTabDialog* paParent
 {
 maCbExportNotesPages.Show( sal_True );
 maCbExportNotesPages.Check( paParent-mbExportNotesPages );
+maCbExportHiddenSlides.Show( sal_True);
+maCbExportHiddenSlides.Check( paParent-mbExportHiddenSlides );
+
 }
 else
 {
@@ -581,6 +590,8 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const 
ImpPDFTabDialog* paParent
 maCbEmbedStandardFonts.SetPosPixel( Point( aPos.X(), aPos.Y() - 
nCheckBoxHeight ) );
 maCbExportNotesPages.Show( sal_False );
 maCbExportNotesPages.Check( sal_False );
+maCbExportHiddenSlides.Show( sal_False);
+maCbExportHiddenSlides.Check( sal_False );
 }
 
 maCbExportEmptyPages.Check( !paParent-mbIsSkipEmptyPages );
@@ -606,6 +617,8 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( 
ImpPDFTabDialog* paParent )
 if ( mbIsPresentation )
 paParent-mbExportNotesPages = maCbExportNotesPages.IsChecked();
 paParent-mbExportBookmarks = maCbExportBookmarks.IsChecked();
+if ( mbIsPresentation )
+paParent-mbExportHiddenSlides = maCbExportHiddenSlides.IsChecked();
 
 paParent-mbIsSkipEmptyPages =  !maCbExportEmptyPages.IsChecked();

[Libreoffice-commits] .: vcl/inc

2011-12-28 Thread Pierre-André Jacquod
 vcl/inc/vcl/pdfextoutdevdata.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9cc02548dec9b953eb186052d424d981cb2addea
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Thu Dec 29 00:02:18 2011 +0100

change order of var in PDFExtOutDevData to suppress waring

diff --git a/vcl/inc/vcl/pdfextoutdevdata.hxx b/vcl/inc/vcl/pdfextoutdevdata.hxx
index c1be576..244a11b 100644
--- a/vcl/inc/vcl/pdfextoutdevdata.hxx
+++ b/vcl/inc/vcl/pdfextoutdevdata.hxx
@@ -92,8 +92,8 @@ class VCL_DLLPUBLIC PDFExtOutDevData : public ExtOutDevData
 sal_BoolmbReduceImageResolution;
 sal_BoolmbExportFormFields;
 sal_BoolmbExportBookmarks;
-sal_BoolmbExportHiddenSlides;
 sal_BoolmbExportNDests; //i56629
+sal_BoolmbExportHiddenSlides;
 sal_Int32   mnFormsFormat;
 sal_Int32   mnPage;
 com::sun::star::lang::LocalemaDocLocale;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/inc

2011-12-28 Thread Pierre-André Jacquod
 vcl/inc/vcl/pdfextoutdevdata.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3bcee0e100e9fdadc2c5b15036caaf2ed53ac6dc
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Thu Dec 29 00:05:51 2011 +0100

Revert change order of var in PDFExtOutDevData to suppress waring

since already corrected in an other way.
this reverts commit 9cc02548dec9b953eb186052d424d981cb2addea.

diff --git a/vcl/inc/vcl/pdfextoutdevdata.hxx b/vcl/inc/vcl/pdfextoutdevdata.hxx
index 244a11b..c1be576 100644
--- a/vcl/inc/vcl/pdfextoutdevdata.hxx
+++ b/vcl/inc/vcl/pdfextoutdevdata.hxx
@@ -92,8 +92,8 @@ class VCL_DLLPUBLIC PDFExtOutDevData : public ExtOutDevData
 sal_BoolmbReduceImageResolution;
 sal_BoolmbExportFormFields;
 sal_BoolmbExportBookmarks;
-sal_BoolmbExportNDests; //i56629
 sal_BoolmbExportHiddenSlides;
+sal_BoolmbExportNDests; //i56629
 sal_Int32   mnFormsFormat;
 sal_Int32   mnPage;
 com::sun::star::lang::LocalemaDocLocale;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - sc/source

2011-12-04 Thread Pierre-André Jacquod
 sc/source/core/data/table1.cxx |   82 -
 1 file changed, 48 insertions(+), 34 deletions(-)

New commits:
commit e42ee773ffc12e38d596ce2aa016f0849c4e5ac6
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Tue Nov 29 09:10:26 2011 +0100

reduce scope of var and better comment of function GetDataArea

diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 3c142c1..06b8203 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -743,17 +743,19 @@ bool ScTable::GetDataStart( SCCOL rStartCol, SCROW 
rStartRow ) const
 void ScTable::GetDataArea( SCCOL rStartCol, SCROW rStartRow, SCCOL rEndCol, 
SCROW rEndRow,
bool bIncludeOld, bool bOnlyDown ) const
 {
-// bIncludeOld = true ensure that the returned area contains at least the 
initial area,
-//  independently of the case if this area has empty rows / 
columns at its borders
-// bOnlyDown = true means extend the inputed area only down, i.e increase 
only rEndRow
+// return the smallest area containing at least all contiguous cells 
having data. This area
+// is a square containing also empty cells. It may shrink or extend the 
area given as input
+// Flags as modifiers:
+//
+// bIncludeOld = true ensure that the returned area contains at least 
the initial area,
+//   independently of the emptniess of rows / columns 
(i.e. does not allow shrinking)
+// bOnlyDown = true means extend / shrink the inputed area only down, 
i.e modifiy only rEndRow
+
 bool bLeft = false;
 bool bRight  = false;
 bool bTop = false;
 bool bBottom = false;
-bool bChanged;
-bool bFound;
-SCCOL i;
-SCROW nTest;
+bool bChanged = false;
 
 do
 {
@@ -784,12 +786,12 @@ void ScTable::GetDataArea( SCCOL rStartCol, SCROW 
rStartRow, SCCOL rEndCol, S
 
 if (rStartRow  0)
 {
-nTest = rStartRow-1;
-bFound = false;
-for (i=rStartCol; i=rEndCol  !bFound; i++)
+SCROW nTest = rStartRow-1;
+bool needExtend = false;
+for ( SCCOL i = rStartCol; i=rEndCol  !needExtend; i++)
 if (aCol[i].HasDataAt(nTest))
-bFound = true;
-if (bFound)
+needExtend = true;
+if (needExtend)
 {
 --rStartRow;
 bChanged = true;
@@ -800,12 +802,12 @@ void ScTable::GetDataArea( SCCOL rStartCol, SCROW 
rStartRow, SCCOL rEndCol, S
 
 if (rEndRow  MAXROW)
 {
-nTest = rEndRow+1;
-bFound = false;
-for (i=rStartCol; i=rEndCol  !bFound; i++)
+SCROW nTest = rEndRow+1;
+bool needExtend = false;
+for ( SCCOL i = rStartCol; i=rEndCol  !needExtend; i++)
 if (aCol[i].HasDataAt(nTest))
-bFound = true;
-if (bFound)
+needExtend = true;
+if (needExtend)
 {
 ++rEndRow;
 bChanged = true;
@@ -830,7 +832,7 @@ void ScTable::GetDataArea( SCCOL rStartCol, SCROW 
rStartRow, SCCOL rEndCol, S
 bool shrink = true;
 do
 {
-for (i=rStartCol; i=rEndCol  shrink; i++)
+for ( SCCOL i = rStartCol; i=rEndCol  shrink; i++)
 if (aCol[i].HasDataAt(rStartRow))
 shrink = false;
 if (shrink)
@@ -846,7 +848,7 @@ void ScTable::GetDataArea( SCCOL rStartCol, SCROW 
rStartRow, SCCOL rEndCol, S
 bool shrink = true;
 do
 {
-for (i=rStartCol; i=rEndCol  shrink; i++)
+for ( SCCOL i = rStartCol; i=rEndCol  shrink; i++)
 if (aCol[i].HasDataAt(rEndRow))
 shrink = false;
 if (shrink)
commit 2e5023f974dd94dfeec0554ce07d0544f9ce7638
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Mon Nov 28 10:10:15 2011 +0100

if empty row / col leads to shrink area, suppress all empty rows/col

and not just the last one, leaving the other within the selection
area

diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 2262eca..3c142c1 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -817,22 +817,25 @@ void ScTable::GetDataArea( SCCOL rStartCol, SCROW 
rStartRow, SCCOL rEndCol, S
 
 if ( !bIncludeOld  !bOnlyDown )
 {
-if ( !bLeft  rStartCol  MAXCOL  rStartCol  rEndCol )
-if ( aCol[rStartCol].IsEmptyBlock(rStartRow,rEndRow) )
+if ( !bLeft )
+while ( aCol[rStartCol].IsEmptyBlock(rStartRow,rEndRow)  
rStartCol  MAXCOL  rStartCol  rEndCol)
 ++rStartCol;
 
-if ( 

[Libreoffice-commits] .: sc/source

2011-11-27 Thread Pierre-André Jacquod
 sc/source/core/data/table1.cxx |7 +--
 sc/source/core/tool/dbdata.cxx |2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 88611e702a18d2a281c22b6d9c28e881be3df223
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Sun Nov 27 18:17:32 2011 +0100

fdo#42286 call correctly GetDataArea to avoid unwanted shrinking

GetDataArea flags documented and call from ExtendedDataArea adapted.

diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index b746ffc..3cf1ca1 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -741,9 +741,12 @@ bool ScTable::GetDataStart( SCCOL rStartCol, SCROW 
rStartRow ) const
 void ScTable::GetDataArea( SCCOL rStartCol, SCROW rStartRow, SCCOL rEndCol, 
SCROW rEndRow,
bool bIncludeOld, bool bOnlyDown ) const
 {
-bool bLeft   = false;
+// bIncludeOld = true ensure that the returned area contains at least the 
initial area,
+//  independently of the case if this area has empty rows / 
columns at its borders
+// bOnlyDown = true means extend the inputed area only down, i.e increase 
only rEndRow
+bool bLeft = false;
 bool bRight  = false;
-bool bTop= false;
+bool bTop = false;
 bool bBottom = false;
 bool bChanged;
 bool bFound;
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index e897630..7014601 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -548,7 +548,7 @@ void ScDBData::ExtendDataArea(ScDocument* pDoc)
 // Extend the DB area to include data rows immediately below.
 SCCOL nCol1a = nStartCol, nCol2a = nEndCol;
 SCROW nRow1a = nStartRow, nRow2a = nEndRow;
-pDoc-GetDataArea(nTable, nCol1a, nRow1a, nCol2a, nRow2a, false, false);
+pDoc-GetDataArea(nTable, nCol1a, nRow1a, nCol2a, nRow2a, true, true);
 nEndRow = nRow2a;
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2011-10-07 Thread Pierre-André Jacquod
 vcl/aqua/source/gdi/salatsuifontutils.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 78b1cc1a08d712212152a1e57400c8b07654e471
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Fri Oct 7 20:40:01 2011 +0200

Revert cppcheck scope reduction in vcl/..salatsuifontutils.cxx

This reverts commit e45b962f49829d5c60c913383b2132b579af3fab.
this is the most probale cause of the breakage on MacOSX tinderbox.
Do not really understand why it should break, but I do not see other
potential guilty commits... No MacOSX at hand... so revert and see

diff --git a/vcl/aqua/source/gdi/salatsuifontutils.cxx 
b/vcl/aqua/source/gdi/salatsuifontutils.cxx
index d9d2c8e..e124b3c 100644
--- a/vcl/aqua/source/gdi/salatsuifontutils.cxx
+++ b/vcl/aqua/source/gdi/salatsuifontutils.cxx
@@ -237,6 +237,7 @@ static bool GetDevFontAttributes( ATSUFontID nFontID, 
ImplDevFontAttributes rDF
 return false;
 int nBestNameValue = 0;
 int nBestStyleValue = 0;
+FontLanguageCode eBestLangCode = 0;
 const FontLanguageCode eUILangCode = 
Application::GetSettings().GetUILanguage();
 typedef std::vectorchar NameBuffer;
 NameBuffer aNameBuffer( 256 );
@@ -332,7 +333,7 @@ static bool GetDevFontAttributes( ATSUFontID nFontID, 
ImplDevFontAttributes rDF
 {
 // get the best family name
 nBestNameValue = nNameValue;
-FontLanguageCode eBestLangCode = eFontNameLanguage;
+eBestLangCode = eFontNameLanguage;
 rDFA.maName = aUtf16Name;
 }
 break;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 13 commits - autodoc/source connectivity/workben rsc/source slideshow/source tools/source vcl/source

2011-09-26 Thread Pierre-André Jacquod
 autodoc/source/display/html/hdimpl.cxx |   11 -
 autodoc/source/parser/cpp/cx_c_pp.cxx  |4 
 connectivity/workben/testmoz/main.cxx  |2 
 rsc/source/res/rscflag.cxx |   22 +-
 slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx |2 
 tools/source/generic/poly.cxx  |   14 -
 vcl/source/fontsubset/cff.cxx  |2 
 vcl/source/fontsubset/sft.cxx  |   31 ++-
 vcl/source/gdi/bitmap3.cxx |   25 +-
 vcl/source/gdi/outdev2.cxx |   10 -
 vcl/source/gdi/outdev3.cxx |9 -
 vcl/source/window/toolbox.cxx  |   90 
+-
 12 files changed, 83 insertions(+), 139 deletions(-)

New commits:
commit 1f1607a5e6ea2b88f072ba2109522de671f20dbf
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Sat Sep 24 18:08:14 2011 +0200

cppcheck: reduce scope of var in rsc rscflag.cxx

diff --git a/rsc/source/res/rscflag.cxx b/rsc/source/res/rscflag.cxx
index aeaf2fd..6e224fc 100644
--- a/rsc/source/res/rscflag.cxx
+++ b/rsc/source/res/rscflag.cxx
@@ -69,10 +69,10 @@ sal_uInt32 RscFlag::Size()
 */
 ERRTYPE RscFlag::SetNotConst( const RSCINST  rInst, Atom nConst )
 {
-sal_uInt32 i = 0, nFlag = 0;
+sal_uInt32 i = 0;
 
 if( nEntries != (i = GetConstPos( nConst )) ){
-nFlag = 1  (i % (sizeof( sal_uInt32 ) * 8) );
+sal_uInt32 nFlag = 1  (i % (sizeof( sal_uInt32 ) * 8) );
 i = i / (sizeof( sal_uInt32 ) * 8);
 ((RscFlagInst *)rInst.pData)[ i ].nFlags = ~nFlag;
 ((RscFlagInst *)rInst.pData)[ i ].nDfltFlags = ~nFlag;
@@ -89,10 +89,10 @@ ERRTYPE RscFlag::SetNotConst( const RSCINST  rInst, Atom 
nConst )
 */
 ERRTYPE RscFlag::SetConst( const RSCINST  rInst, Atom nConst, sal_Int32 
/*nVal*/ )
 {
-sal_uInt32 i = 0, nFlag = 0;
+sal_uInt32 i = 0;
 
 if( nEntries != (i = GetConstPos( nConst )) ){
-nFlag = 1  (i % (sizeof( sal_uInt32 ) * 8) );
+sal_uInt32 nFlag = 1  (i % (sizeof( sal_uInt32 ) * 8) );
 i = i / (sizeof( sal_uInt32 ) * 8);
 ((RscFlagInst *)rInst.pData)[ i ].nFlags |= nFlag;
 ((RscFlagInst *)rInst.pData)[ i ].nDfltFlags = ~nFlag;
@@ -129,7 +129,6 @@ RSCINST RscFlag::CreateBasic( RSCINST * pInst )
 RSCINST RscFlag::Create( RSCINST * pInst, const RSCINST  rDflt, sal_Bool 
bOwnClass )
 {
 RSCINST aInst = CreateBasic( pInst );
-sal_uInt32  i = 0;
 
 if( !bOwnClass  rDflt.IsInst() )
 bOwnClass = rDflt.pClass-InHierarchy( this );
@@ -138,7 +137,7 @@ RSCINST RscFlag::Create( RSCINST * pInst, const RSCINST  
rDflt, sal_Bool bOwnCl
 memmove( aInst.pData, rDflt.pData, Size() );
 else
 {
-for( i = 0; i  Size() / sizeof( RscFlagInst ); i++ )
+for( sal_uInt32 i = 0; i  Size() / sizeof( RscFlagInst ); i++ )
 {
 ((RscFlagInst *)aInst.pData)[ i ].nFlags = 0;
 ((RscFlagInst *)aInst.pData)[ i ].nDfltFlags = 0x;
@@ -157,13 +156,14 @@ RSCINST RscFlag::CreateClient( RSCINST * pInst, const 
RSCINST  rDfltI,
sal_Bool bOwnClass, Atom nConstId )
 {
 RSCINST aInst = CreateBasic( pInst );
-sal_uInt32 i = 0, nFlag = 0;
+sal_uInt32 i = 0;
 
 if( !bOwnClass  rDfltI.IsInst() )
 bOwnClass = rDfltI.pClass-InHierarchy( this );
 
-if( nEntries != (i = GetConstPos( nConstId )) ){
-nFlag = 1  (i % (sizeof( sal_uInt32 ) * 8) );
+if( nEntries != (i = GetConstPos( nConstId )) )
+{
+sal_uInt32 nFlag = 1  (i % (sizeof( sal_uInt32 ) * 8) );
 i = i / (sizeof( sal_uInt32 ) * 8);
 if( bOwnClass ){
 ((RscFlagInst *)aInst.pData)[ i ].nFlags =
@@ -251,13 +251,11 @@ sal_Bool RscFlag::IsValueDefault( const RSCINST  rInst, 
CLASS_DATA pDef,
 
 sal_Bool RscFlag::IsValueDefault( const RSCINST  rInst, CLASS_DATA pDef )
 {
-sal_uInt32 i = 0;
-
 if( pDef ){
 sal_uInt32  Flag = 0, nIndex = 0;
 
 Flag = 1;
-for( i = 0; i  nEntries; i++ ){
+for( sal_uInt32 i = 0; i  nEntries; i++ ){
 nIndex = i / (sizeof( sal_uInt32 ) * 8);
 if( (((RscFlagInst *)rInst.pData)[ nIndex ].nFlags  Flag)
   != (((RscFlagInst *)pDef)[ nIndex ].nFlags  Flag)  )
commit d04bd631731c45627caa4b7f5dc4aea2c4fa9f9e
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Sat Sep 24 17:58:01 2011 +0200

cppcheck: reduce scope of var in tools/ poly.cxx

diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 419575d..4ba1ef0 100644
---