[Libreoffice-commits] .: svtools/source

2013-01-28 Thread Libreoffice Gerrit user
 svtools/source/control/roadmap.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 78fde59e65bf1fbf8290e60b8cbe4b34e3489b93
Author: Arnaud Versini arnaud.vers...@gmail.com
Date:   Mon Jan 28 20:04:03 2013 +0100

Resolving crash in wizards fdo#59931 by NULL checking

Change-Id: Iccc3f3b2913f21a3831ce55c706aa4dd1da53ad6
Reviewed-on: https://gerrit.libreoffice.org/1909
Reviewed-by: Stephan Bergmann sberg...@redhat.com
Tested-by: Stephan Bergmann sberg...@redhat.com

diff --git a/svtools/source/control/roadmap.cxx 
b/svtools/source/control/roadmap.cxx
index a0239cf..6a23688 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -700,7 +700,10 @@ namespace svt
 SetFont( aFont );
 RoadmapTypes::ItemId curItemID = GetCurrentRoadmapItemID();
 RoadmapItem* pLabelItem = GetByID( curItemID );
-
pLabelItem-ToggleBackgroundColor(rStyleSettings.GetHighlightColor());
+if (pLabelItem != NULL)
+{
+
pLabelItem-ToggleBackgroundColor(rStyleSettings.GetHighlightColor());
+}
 Invalidate();
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2013-01-21 Thread Libreoffice Gerrit user
 svtools/source/control/inettbc.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9d7544b7502f27b961115ef9ad373b5e570d0dd4
Author: Korrawit Pruegsanusak detective.conan.1...@gmail.com
Date:   Tue Jan 22 11:49:20 2013 +0700

Hopefully fix windows build

Change-Id: Ib4ca01df58da4129d5262c344c7c092925e19caa

diff --git a/svtools/source/control/inettbc.cxx 
b/svtools/source/control/inettbc.cxx
index 3773605..c0c93a1d3c 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -1034,7 +1034,7 @@ long SvtURLBox::Notify( NotifyEvent rEvt )
 {
 #ifndef UNX
 // pb: don't select automatically on unix #93251#
-SetSelection( Selection( 0, GetText().Len() ) );
+SetSelection( Selection( 0, GetText().getLength() ) );
 #endif
 }
 else if ( EVENT_LOSEFOCUS == rEvt.GetType() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2013-01-15 Thread Libreoffice Gerrit user
 svtools/source/misc/langhelp.cxx |   17 -
 1 file changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 1e1b1687c8518f6d1c7ee77b18d464ac1c00852b
Author: Andras Timar ati...@suse.com
Date:   Tue Jan 15 10:35:20 2013 +0100

fdo#59158 About dialog Website button link fix for zh-CN and zh-TW

Change-Id: I85007bf689bb6c7119a4971f0bd925beccb8bd30

diff --git a/svtools/source/misc/langhelp.cxx b/svtools/source/misc/langhelp.cxx
index e4168a8..e8827cd 100644
--- a/svtools/source/misc/langhelp.cxx
+++ b/svtools/source/misc/langhelp.cxx
@@ -30,13 +30,20 @@
 #include vcl/svapp.hxx
 #include rtl/ustring.hxx
 
-void localizeWebserviceURI( ::rtl::OUString rURI )
+void localizeWebserviceURI( OUString rURI )
 {
-::rtl::OUString aLang = 
Application::GetSettings().GetUILanguageTag().getLanguage();
-if ( aLang.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(pt))
-  
Application::GetSettings().GetUILanguageTag().getCountry().equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(br))
 )
+OUString aLang = 
Application::GetSettings().GetUILanguageTag().getLanguage();
+if ( aLang.equalsIgnoreAsciiCase(pt)
+  
Application::GetSettings().GetUILanguageTag().getCountry().equalsIgnoreAsciiCase(br)
 )
 {
-aLang = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( pt-br ));
+aLang = OUString(pt-br);
+}
+if ( aLang.equalsIgnoreAsciiCase(zh) )
+{
+if ( 
Application::GetSettings().GetUILanguageTag().getCountry().equalsIgnoreAsciiCase(cn)
 )
+aLang = OUString(zh-cn);
+if ( 
Application::GetSettings().GetUILanguageTag().getCountry().equalsIgnoreAsciiCase(tw)
 )
+aLang = OUString(zh-tw);
 }
 
 rURI += aLang;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2013-01-01 Thread Libreoffice Gerrit user
 svtools/source/config/miscopt.cxx |   23 ---
 1 file changed, 12 insertions(+), 11 deletions(-)

New commits:
commit 4ae569eb3e6d587aed6885b46c78f0d9bcbbb0b2
Author: LeMoyne Castle lemoyne.cas...@gmail.com
Date:   Mon Dec 31 00:18:35 2012 -0700

Minimal fix fdo#58766 Macro Recorder opt not saved

Load of the last Misc. config item is skipped due to
its index  == # of strings in array in GetPropertyNames.
Omission in middle drops last item -
never gets to the Enable Macro Recorder option.

Change-Id: If99e0aa89e82ffc362f5e4bda712881a546e510a
Reviewed-on: https://gerrit.libreoffice.org/1523
Reviewed-by: Tor Lillqvist t...@iki.fi
Tested-by: Tor Lillqvist t...@iki.fi

diff --git a/svtools/source/config/miscopt.cxx 
b/svtools/source/config/miscopt.cxx
index c3666d0..d79ad29 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -43,28 +43,29 @@ using namespace ::com::sun::star;
 #define ASCII_STR(s)OUString( 
RTL_CONSTASCII_USTRINGPARAM(s) )
 #define ROOTNODE_MISC   ASCII_STR(Office.Common/Misc)
 
+// PROPERTYHANDLE defines must be sequential from zero for Commit/Load
 #define PROPERTYNAME_PLUGINSENABLED ASCII_STR(PluginsEnabled)
-#define PROPERTYHANDLE_PLUGINSENABLED   0
+#define PROPERTYHANDLE_PLUGINSENABLED   0
 #define PROPERTYNAME_SYMBOLSET  ASCII_STR(SymbolSet)
-#define PROPERTYHANDLE_SYMBOLSET1
+#define PROPERTYHANDLE_SYMBOLSET1
 #define PROPERTYNAME_TOOLBOXSTYLE   ASCII_STR(ToolboxStyle)
-#define PROPERTYHANDLE_TOOLBOXSTYLE 2
+#define PROPERTYHANDLE_TOOLBOXSTYLE 2
 #define PROPERTYNAME_USESYSTEMFILEDIALOGASCII_STR(UseSystemFileDialog)
-#define PROPERTYHANDLE_USESYSTEMFILEDIALOG  3
+#define PROPERTYHANDLE_USESYSTEMFILEDIALOG  3
 #define PROPERTYNAME_SYMBOLSTYLEASCII_STR(SymbolStyle)
-#define PROPERTYHANDLE_SYMBOLSTYLE  4
+#define PROPERTYHANDLE_SYMBOLSTYLE  4
 #define PROPERTYNAME_USESYSTEMPRINTDIALOG   ASCII_STR(UseSystemPrintDialog)
-#define PROPERTYHANDLE_USESYSTEMPRINTDIALOG 5
+#define PROPERTYHANDLE_USESYSTEMPRINTDIALOG 5
 #define PROPERTYNAME_SHOWLINKWARNINGDIALOG  ASCII_STR(ShowLinkWarningDialog)
-#define PROPERTYHANDLE_SHOWLINKWARNINGDIALOG 7
+#define PROPERTYHANDLE_SHOWLINKWARNINGDIALOG6
 #define PROPERTYNAME_DISABLEUICUSTOMIZATION ASCII_STR(DisableUICustomization)
-#define PROPERTYHANDLE_DISABLEUICUSTOMIZATION   8
+#define PROPERTYHANDLE_DISABLEUICUSTOMIZATION   7
 #define PROPERTYNAME_ALWAYSALLOWSAVEASCII_STR(AlwaysAllowSave)
-#define PROPERTYHANDLE_ALWAYSALLOWSAVE  9
+#define PROPERTYHANDLE_ALWAYSALLOWSAVE  8
 #define PROPERTYNAME_EXPERIMENTALMODE   ASCII_STR(ExperimentalMode)
-#define PROPERTYHANDLE_EXPERIMENTALMODE 10
+#define PROPERTYHANDLE_EXPERIMENTALMODE 9
 #define PROPERTYNAME_MACRORECORDERMODE   ASCII_STR(MacroRecorderMode)
-#define PROPERTYHANDLE_MACRORECORDERMODE11
+#define PROPERTYHANDLE_MACRORECORDERMODE10
 
 #define VCL_TOOLBOX_STYLE_FLAT  ((sal_uInt16)0x0004) // from 
vcl/toolbox.hxx
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-12-20 Thread Libreoffice Gerrit user
 svtools/source/control/tabbar.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 53f23ca68dda1011f97bb28d672c7198e9e12c90
Author: Issa Alkurtass ialkurt...@kacst.edu.sa
Date:   Mon Dec 17 13:06:24 2012 +0300

fdo#56970 Fixed insert new sheet button for different directionality

Fixed position of insert new sheet button (+) when using a sheet with
a different directionality than that of the interface.

Change-Id: Ifc7020c4eb7a1686c23b4d827c47494b88a236b5
Reviewed-on: https://gerrit.libreoffice.org/1385
Tested-by: Lior Kaplan kaplanl...@gmail.com
Reviewed-by: Eike Rathke er...@redhat.com

diff --git a/svtools/source/control/tabbar.cxx 
b/svtools/source/control/tabbar.cxx
index 25efc70..4438779a 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -1760,8 +1760,12 @@ Rectangle TabBar::ImplGetInsertTabRect(ImplTabBarItem* 
pItem) const
 if (mbHasInsertTab  pItem)
 {
 Rectangle aInsTabRect = pItem-maRect;
-aInsTabRect.setX(
-aInsTabRect.getX() + aInsTabRect.getWidth() - TABBAR_OFFSET_X - 
TABBAR_OFFSET_X2);
+if ( !mbMirrored )
+aInsTabRect.setX(
+aInsTabRect.getX() + aInsTabRect.getWidth() - TABBAR_OFFSET_X 
- TABBAR_OFFSET_X2);
+else
+aInsTabRect.setX(
+aInsTabRect.getX() - 3*TABBAR_OFFSET_X - TABBAR_OFFSET_X2);
 aInsTabRect.setWidth(32);
 return aInsTabRect;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-12-17 Thread Libreoffice Gerrit user
 svtools/source/graphic/grfmgr2.cxx |   14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 3d969a60852d505cfa02a6b3410d4461718138ba
Author: Werner Koerner wk66...@gmail.com
Date:   Thu Dec 13 21:38:02 2012 +0100

fdo#58196 Viewing: Reenable mirroring for scaled-down images

commit I6feb744712956a92d6140d079dc3a85ee8511930 (Stepwise
rebuild bitmap rendering from scratch to avoid rendering bugs)
missed horizontal and vertical flipping for images scaled down
by more than about 60%.

Change-Id: I68241792d2b43edde33f478c998d447debd8fd13
Reviewed-on: https://gerrit.libreoffice.org/1332
Reviewed-by: Michael Stahl mst...@redhat.com
Tested-by: Michael Stahl mst...@redhat.com

diff --git a/svtools/source/graphic/grfmgr2.cxx 
b/svtools/source/graphic/grfmgr2.cxx
index b992144..4aeccf9 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -436,7 +436,7 @@ sal_Bool ImplCreateRotatedScaled( const BitmapEx rBmpEx, 
const GraphicAttr rAt
 }
 }
 }
-else
+else // scaleByAveraging
 {
 double aSumRed, aSumGreen, aSumBlue, aCount;
 BitmapColor aColor;
@@ -452,6 +452,11 @@ sal_Bool ImplCreateRotatedScaled( const BitmapEx rBmpEx, 
const GraphicAttr rAt
 double aUnrotatedX = ( pCosX[ x ] - nSinY ) / 256.0;
 double aUnrotatedY = ( pSinX[ x ] + nCosY ) / 256.0;
 
+if ( bHMirr )
+aUnrotatedX = aUnrotatedWidth - aUnrotatedX - 1;
+if ( bVMirr )
+aUnrotatedY = aUnrotatedHeight - aUnrotatedY - 1;
+
 if( ( aUnrotatedX = 0 )  ( aUnrotatedX  
aUnrotatedWidth ) 
 ( aUnrotatedY = 0 )  ( aUnrotatedY  
aUnrotatedHeight ) )
 {
@@ -563,7 +568,7 @@ sal_Bool ImplCreateRotatedScaled( const BitmapEx rBmpEx, 
const GraphicAttr rAt
 }
 }
 }
-else
+else // scaleByAveraging
 {
 const BitmapColor   aTrans( 
pWriteAccess-GetBestMatchingColor( Color( COL_WHITE ) ) );
 BitmapColor aResultColor( 0 );
@@ -580,6 +585,11 @@ sal_Bool ImplCreateRotatedScaled( const BitmapEx rBmpEx, 
const GraphicAttr rAt
 double aUnrotatedX = ( pCosX[ x ] - nSinY 
) / 256.0;
 double aUnrotatedY = ( pSinX[ x ] + nCosY 
) / 256.0;
 
+if ( bHMirr )
+aUnrotatedX = aUnrotatedWidth - 
aUnrotatedX - 1;
+if ( bVMirr )
+aUnrotatedY = aUnrotatedHeight - 
aUnrotatedY - 1;
+
 if( ( aUnrotatedX = 0 )  ( aUnrotatedX 
 aUnrotatedWidth ) 
 ( aUnrotatedY = 0 )  ( aUnrotatedY 
 aUnrotatedHeight ) )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-12-06 Thread Libreoffice Gerrit user
 svtools/source/filter/wmf/emfwr.cxx |  204 +++-
 svtools/source/filter/wmf/emfwr.hxx |   12 ++
 2 files changed, 215 insertions(+), 1 deletion(-)

New commits:
commit f1fee2a65c8c1968798e1246a4b455d9160d8eb9
Author: Muthu Subramanian sumu...@suse.com
Date:   Thu Dec 6 12:21:24 2012 +0530

n#780748: Basic EMF+ implementation.

* Minimalistic implementation of EMF+ export
* Currently exports transparent polygons.

diff --git a/svtools/source/filter/wmf/emfwr.cxx 
b/svtools/source/filter/wmf/emfwr.cxx
index c4caf02..39e33c0 100644
--- a/svtools/source/filter/wmf/emfwr.cxx
+++ b/svtools/source/filter/wmf/emfwr.cxx
@@ -130,6 +130,9 @@
 #define WIN_SRCPAINT0x00EE0086L
 #define WIN_SRCAND  0x008800C6L
 #define WIN_SRCINVERT   0x00660046L
+#define WIN_EMR_COMMENT_EMFSPOOL0xL
+#define WIN_EMR_COMMENT_EMFPLUS 0x2B464D45L
+#define WIN_EMR_COMMENT_PUBLIC  0x43494447L
 
 #define HANDLE_INVALID  0x
 #define MAXHANDLES  65000
@@ -154,10 +157,194 @@
 
 #define MM_ANISOTROPIC  8
 
+typedef enum
+{
+  EmfPlusHeader = 0x4001,
+  EmfPlusEndOfFile  = 0x4002,
+  EmfPlusComment= 0x4003,
+  EmfPlusGetDC  = 0x4004,
+  EmfPlusMultiFormatStart   = 0x4005,
+  EmfPlusMultiFormatSection = 0x4006,
+  EmfPlusMultiFormatEnd = 0x4007,
+  EmfPlusObject = 0x4008,
+  EmfPlusClear  = 0x4009,
+  EmfPlusFillRects  = 0x400A,
+  EmfPlusDrawRects  = 0x400B,
+  EmfPlusFillPolygon= 0x400C,
+  EmfPlusDrawLines  = 0x400D,
+  EmfPlusFillEllipse= 0x400E,
+  EmfPlusDrawEllipse= 0x400F,
+  EmfPlusFillPie= 0x4010,
+  EmfPlusDrawPie= 0x4011,
+  EmfPlusDrawArc= 0x4012,
+  EmfPlusFillRegion = 0x4013,
+  EmfPlusFillPath   = 0x4014,
+  EmfPlusDrawPath   = 0x4015,
+  EmfPlusFillClosedCurve= 0x4016,
+  EmfPlusDrawClosedCurve= 0x4017,
+  EmfPlusDrawCurve  = 0x4018,
+  EmfPlusDrawBeziers= 0x4019,
+  EmfPlusDrawImage  = 0x401A,
+  EmfPlusDrawImagePoints= 0x401B,
+  EmfPlusDrawstring = 0x401C,
+  EmfPlusSetRenderingOrigin = 0x401D,
+  EmfPlusSetAntiAliasMode   = 0x401E,
+  EmfPlusSetTextRenderingHint   = 0x401F,
+  EmfPlusSetTextContrast= 0x4020,
+  EmfPlusSetInterpolationMode   = 0x4021,
+  EmfPlusSetPixelOffsetMode = 0x4022,
+  EmfPlusSetCompositingMode = 0x4023,
+  EmfPlusSetCompositingQuality  = 0x4024,
+  EmfPlusSave   = 0x4025,
+  EmfPlusRestore= 0x4026,
+  EmfPlusBeginContainer = 0x4027,
+  EmfPlusBeginContainerNoParams = 0x4028,
+  EmfPlusEndContainer   = 0x4029,
+  EmfPlusSetWorldTransform  = 0x402A,
+  EmfPlusResetWorldTransform= 0x402B,
+  EmfPlusMultiplyWorldTransform = 0x402C,
+  EmfPlusTranslateWorldTransform= 0x402D,
+  EmfPlusScaleWorldTransform= 0x402E,
+  EmfPlusRotateWorldTransform   = 0x402F,
+  EmfPlusSetPageTransform   = 0x4030,
+  EmfPlusResetClip  = 0x4031,
+  EmfPlusSetClipRect= 0x4032,
+  EmfPlusSetClipPath= 0x4033,
+  EmfPlusSetClipRegion  = 0x4034,
+  EmfPlusOffsetClip = 0x4035,
+  EmfPlusDrawDriverstring   = 0x4036,
+  EmfPlusStrokeFillPath = 0x4037,
+  EmfPlusSerializableObject = 0x4038,
+  EmfPlusSetTSGraphics  = 0x4039,
+  EmfPlusSetTSClip  = 0x403A
+} EmfPlusRecordType;
+
+
 // -
 // - EMFWriter -
 // -
 
+void EMFWriter::ImplBeginCommentRecord( sal_Int32 nCommentType )
+{
+ImplBeginRecord( WIN_EMR_GDICOMMENT );
+m_rStm.SeekRel( 4 );
+m_rStm (sal_Int32) nCommentType;
+}
+
+void EMFWriter::ImplEndCommentRecord()
+{
+if( mbRecordOpen )
+{
+sal_Int32 nActPos = m_rStm.Tell();
+m_rStm.Seek( mnRecordPos + 8 );
+m_rStm  (sal_uInt32)( nActPos - mnRecordPos - 0xc );
+m_rStm.Seek( nActPos );
+}
+ImplEndRecord();
+}
+
+void EMFWriter::ImplBeginPlusRecord( sal_uInt16 nType, sal_uInt16 nFlags )
+{
+DBG_ASSERT( !mbRecordPlusOpen, Another EMF+ record is already opened! );
+
+if( !mbRecordPlusOpen )
+{
+mbRecordPlusOpen = sal_True;
+mnRecordPlusPos = m_rStm.Tell();
+
+m_rStm  (sal_uInt16) nType  (sal_uInt16) nFlags;
+m_rStm.SeekRel( 8 );
+}
+}
+
+// 
-
+
+void 

[Libreoffice-commits] .: svtools/source

2012-11-22 Thread Libreoffice Gerrit user
 svtools/source/contnr/templwin.src |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0d402b449e82e1bf6bdf3415769c5b342130490e
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Nov 22 10:06:39 2012 +0100

Do not overlap FT_DOCTEMPLATE_LINK, BTN_DOCTEMPLATE_PACKAGE

Change-Id: I6edcd6641dbcd62ceb49f5b975eea6a40a47f6ab

diff --git a/svtools/source/contnr/templwin.src 
b/svtools/source/contnr/templwin.src
index 34ba25d..a38a25d 100644
--- a/svtools/source/contnr/templwin.src
+++ b/svtools/source/contnr/templwin.src
@@ -193,7 +193,7 @@ ModalDialog DLG_DOCTEMPLATE
 {
 Left = TRUE ;
 Pos = MAP_APPFONT ( 6 , 208 ) ;
-Size = MAP_APPFONT ( 311 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
+Size = MAP_APPFONT ( 200, RSC_CD_FIXEDTEXT_HEIGHT ) ;
 Text [ en-US ] = ~Get more templates online...;
 };
 FixedLine FL_DOCTEMPLATE
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-11-21 Thread Libreoffice Gerrit user
 svtools/source/filter/wmf/winmtf.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 33e63a1562cbb63b6db36812d159eac2cfa8fcc7
Author: Thorsten Behrens tbehr...@suse.com
Date:   Wed Nov 21 01:12:08 2012 +0100

Fix fdo#57353 correct moveTo handling for emf path recording

A moveTo following an existing path really should create a new
subpath, not add to the existing one. It's the equivalent of lifting
the pen.

Change-Id: I196ca9435f8b4225837add964aec7afceb1d6d88

diff --git a/svtools/source/filter/wmf/winmtf.cxx 
b/svtools/source/filter/wmf/winmtf.cxx
index 2d30b8d..63b0996 100644
--- a/svtools/source/filter/wmf/winmtf.cxx
+++ b/svtools/source/filter/wmf/winmtf.cxx
@@ -1101,7 +1101,13 @@ void WinMtfOutput::MoveTo( const Point rPoint, sal_Bool 
bRecordPath )
 {
 Point aDest( ImplMap( rPoint ) );
 if ( bRecordPath )
+{
+// fdo#57353 create new subpath for subsequent moves
+if ( aPathObj.Count() )
+if ( aPathObj[ aPathObj.Count() - 1 ].GetSize() )
+aPathObj.Insert( Polygon(), POLYPOLY_APPEND );
 aPathObj.AddPoint( aDest );
+}
 maActPos = aDest;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-11-21 Thread Libreoffice Gerrit user
 svtools/source/control/fmtfield.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 679628f248a94d54e78c8531d13e65f3ae221876
Author: Michael Meeks michael.me...@suse.com
Date:   Wed Nov 21 21:11:17 2012 +

initialize nCheckPos before passing it, undefined to SvNumberFormatter

Change-Id: I8e80de82354ed0adf66b39175a5c9b993c541821

diff --git a/svtools/source/control/fmtfield.cxx 
b/svtools/source/control/fmtfield.cxx
index 9bb3c4f..cf73f48 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -715,8 +715,8 @@ void FormattedField::SetThousandsSep(sal_Bool 
_bUseSeparator)
 // generate a new format ...
 OUString sFmtDescription = 
ImplGetFormatter()-GenerateFormat(m_nFormatKey, eLang, _bUseSeparator, IsRed, 
nPrecision, nAnzLeading);
 // ... and introduce it to the formatter
-sal_Int32 nCheckPos;
-sal_uInt32  nNewKey;
+sal_Int32 nCheckPos = 0;
+sal_uInt32 nNewKey;
 short nType;
 ImplGetFormatter()-PutEntry(sFmtDescription, nCheckPos, nType, nNewKey, 
eLang);
 
@@ -758,7 +758,7 @@ void FormattedField::SetDecimalDigits(sal_uInt16 
_nPrecision)
 // generate a new format ...
 OUString sFmtDescription = 
ImplGetFormatter()-GenerateFormat(m_nFormatKey, eLang, bThousand, IsRed, 
_nPrecision, nAnzLeading);
 // ... and introduce it to the formatter
-sal_Int32 nCheckPos;
+sal_Int32 nCheckPos = 0;
 sal_uInt32 nNewKey;
 short nType;
 ImplGetFormatter()-PutEntry(sFmtDescription, nCheckPos, nType, nNewKey, 
eLang);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-11-12 Thread Libreoffice Gerrit user
 svtools/source/graphic/graphic.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit aa09c0b8b2899c61300c90fa3472381e4d0eaf25
Author: Arnaud Versini arnaud.vers...@gmail.com
Date:   Sun Nov 11 11:45:38 2012 +0100

Use memcmp instead of rtl_compareMemory in svtools

Change-Id: Id051a39774446595b5082316a470c23246de8124
Reviewed-on: https://gerrit.libreoffice.org/1034
Reviewed-by: Tor Lillqvist t...@iki.fi
Tested-by: Tor Lillqvist t...@iki.fi

diff --git a/svtools/source/graphic/graphic.cxx 
b/svtools/source/graphic/graphic.cxx
index f6121f2..f0e5e7f 100644
--- a/svtools/source/graphic/graphic.cxx
+++ b/svtools/source/graphic/graphic.cxx
@@ -24,6 +24,7 @@
 #include vcl/graph.hxx
 #include graphic.hxx
 #include comphelper/servicehelper.hxx
+#include string.h
 
 using namespace com::sun::star;
 
@@ -277,7 +278,7 @@ const ::Graphic* Graphic::getImplementation( const 
uno::Reference uno::XInterfa
 sal_Int64 SAL_CALL Graphic::getSomething( const uno::Sequence sal_Int8  rId 
)
 throw( uno::RuntimeException )
 {
-return( ( rId.getLength() == 16  0 == rtl_compareMemory( 
getImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) ?
+return( ( rId.getLength() == 16  0 == memcmp( 
getImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) ?
 reinterpret_cast sal_Int64 ( mpGraphic ) :
 0 );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-11-02 Thread Libreoffice Gerrit user
 svtools/source/svhtml/parhtml.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9fdf86df4eb65a0cd2a178998daf751afc34805e
Author: Louis Possoz louis.pos...@quelfutur.org
Date:   Fri Oct 26 16:18:34 2012 +0200

Fix bug 50931 : Cannot import HTML br/ and hr/

Change-Id: Ia4932c2e1f451ae45675a32de42a5cf971224211
Reviewed-on: https://gerrit.libreoffice.org/915
Tested-by: Michael Stahl mst...@redhat.com
Reviewed-by: Michael Stahl mst...@redhat.com

diff --git a/svtools/source/svhtml/parhtml.cxx 
b/svtools/source/svhtml/parhtml.cxx
index 2cf6ebb..743ecec 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -1115,7 +1115,7 @@ int HTMLParser::_GetNextToken()
 if( MAX_LEN == sTmpBuffer.getLength() )
 aToken += String(sTmpBuffer.makeStringAndClear());
 nNextCh = GetNextChar();
-} while( '' != nNextCh  !HTML_ISSPACE( nNextCh ) 
+} while( '' != nNextCh  '/' != nNextCh  
!HTML_ISSPACE( nNextCh ) 
  IsParserWorking()  !rInput.IsEof() );
 
 if( sTmpBuffer.getLength() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-31 Thread Libreoffice Gerrit user
 svtools/source/contnr/treelist.cxx |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 8b774b7eb1bb78245214775113830418624bbecf
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Oct 31 17:27:42 2012 +

fix crash traversing tools-options with keyboard

Change-Id: Ieba85dd0093c9f704090075d2eb75f1eefdd72de

diff --git a/svtools/source/contnr/treelist.cxx 
b/svtools/source/contnr/treelist.cxx
index 2ec20bd..ea451b6 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -1751,9 +1751,14 @@ void SvTreeList::ResortChildren( SvTreeListEntry* 
pParent )
 SvTreeListEntry* p = *it;
 sal_uLong nListPos = ULONG_MAX;
 GetInsertionPos(p, pParent, nListPos);
-SvTreeListEntries::iterator itPos = pParent-maChildren.begin();
-std::advance(itPos, nListPos);
-pParent-maChildren.insert(itPos, p);
+if (nListPos  pParent-maChildren.size())
+{
+SvTreeListEntries::iterator itPos = pParent-maChildren.begin();
+std::advance(itPos, nListPos);
+pParent-maChildren.insert(itPos, p);
+}
+else
+pParent-maChildren.push_back(p);
 if (!p-maChildren.empty())
 // Recursively sort child entries.
 ResortChildren(p);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-30 Thread Libreoffice Gerrit user
 svtools/source/contnr/treelist.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 551e8e10bc46bb82c0c99c65cd2df85fc4329cdf
Author: David Tardon dtar...@redhat.com
Date:   Tue Oct 30 07:05:02 2012 +0100

fix typo

Change-Id: I326409a90162395150a72dcb108b180a07f1afb9

diff --git a/svtools/source/contnr/treelist.cxx 
b/svtools/source/contnr/treelist.cxx
index a97c02b..e489c7c 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -786,7 +786,7 @@ SvTreeListEntry* SvTreeList::NextVisible(const SvListView* 
pView,SvTreeListEntry
 
 if ( pView-IsExpanded(pActEntry) )
 {
-OSL_ENSURE(!pActEntry-mpChildren.empty(), Pass entry is supposed to 
have child entries.);
+OSL_ENSURE(!pActEntry-maChildren.empty(), Pass entry is supposed to 
have child entries.);
 
 nDepth++;
 pActEntry = pActEntry-maChildren[0];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-30 Thread Libreoffice Gerrit user
 svtools/source/contnr/treelist.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit c38d460d8112079c83c6a5175bdc8cc019328c1c
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Oct 30 10:02:58 2012 +0100

Reapply eda255b38d871bb7d20432e5730cc8c68b3e2942

... SvTreeList: fix singular iterator compare assertions after commits 
that
broke it again.

Change-Id: I527fe37e2a0a9f6fbba468261892379920f02c10

diff --git a/svtools/source/contnr/treelist.cxx 
b/svtools/source/contnr/treelist.cxx
index e489c7c..895ef97 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -1378,7 +1378,8 @@ SvTreeList::GetChildIterators(const SvTreeListEntry* 
pParent) const
 {
 typedef std::pairSvTreeListEntries::const_iterator, 
SvTreeListEntries::const_iterator IteratorPair;
 
-IteratorPair aRet;
+static const SvTreeListEntries dummy; // prevent singular iterator asserts
+IteratorPair aRet(dummy.begin(), dummy.end());
 
 if (!pParent)
 pParent = pRootItem;
@@ -1398,7 +1399,8 @@ std::pairSvTreeListEntries::iterator, 
SvTreeListEntries::iterator
 {
 typedef std::pairSvTreeListEntries::iterator, 
SvTreeListEntries::iterator IteratorPair;
 
-IteratorPair aRet;
+static SvTreeListEntries dummy; // prevent singular iterator asserts
+IteratorPair aRet(dummy.begin(), dummy.end());
 
 if (!pParent)
 pParent = pRootItem;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-30 Thread Libreoffice Gerrit user
 svtools/source/filter/wmf/winmtf.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit d941d4d723afbc0b9e88bd19cb50ad711158e3a5
Author: Radek Doulik r...@novell.com
Date:   Tue Oct 30 15:26:43 2012 +0100

fix character positions translation (partial fix for n#757387)

Change-Id: I042d6de9533f0f33e1fb64c3b92dc1bafaa6149f

diff --git a/svtools/source/filter/wmf/winmtf.cxx 
b/svtools/source/filter/wmf/winmtf.cxx
index 3cc3ef9..23a8c90 100644
--- a/svtools/source/filter/wmf/winmtf.cxx
+++ b/svtools/source/filter/wmf/winmtf.cxx
@@ -1459,9 +1459,10 @@ void WinMtfOutput::DrawText( Point rPosition, String 
rText, sal_Int32* pDXArry
 
 for( i = 0, nSum = 0; i  nLen; i++ )
 {
-sal_Int32 nTemp = ImplMap( Size( pDXArry[ i ], 0 ) ).Width();
-nSum += nTemp;
-pDXArry[ i ] = nSum;
+if ( i ) {
+pDXArry[ i - 1 ] = ImplMap( Size( nSum, 0 ) ).Width();
+}
+nSum += pDXArry[ i ];
 }
 }
 if ( mnLatestTextLayoutMode != mnTextLayoutMode )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-30 Thread Libreoffice Gerrit user
 svtools/source/contnr/treelist.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b72fca4ec4ad00786192bad68eba245cdeb6a692
Author: Miklos Vajna vmik...@suse.cz
Date:   Tue Oct 30 17:24:59 2012 +0100

SvTreeList::GetEntry: detect an out-of-bound and return NULL in that case

That's how this worked prior to stlification.

Change-Id: I4b1a9735c92efc181a2d1f47cafb04d2855fdfe2

diff --git a/svtools/source/contnr/treelist.cxx 
b/svtools/source/contnr/treelist.cxx
index 895ef97..1716e27 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -1862,7 +1862,7 @@ SvTreeListEntry* SvTreeList::GetEntry( SvTreeListEntry* 
pParent, sal_uLong nPos
 SvTreeListEntry* SvTreeList::GetEntry( sal_uLong nRootPos ) const
 {
 SvTreeListEntry* pRet = 0;
-if ( nEntryCount )
+if ( nEntryCount  nRootPos  pRootItem-maChildren.size())
 pRet = pRootItem-maChildren[nRootPos];
 return pRet;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-30 Thread Libreoffice Gerrit user
 svtools/source/contnr/treelist.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 9106fc3aa811002bf66b69951a754daccff98d67
Author: Kohei Yoshida kohei.yosh...@gmail.com
Date:   Tue Oct 30 16:24:18 2012 -0400

Avoiding deleting the removed entry.

The tree list entries are now stored in ptr_vector. We no longer
have to manually call delete on it whenever it gets removed from the
list.

Change-Id: Id183aadbdc3b1565d1c702dc0fc099df9dcb6e2c

diff --git a/svtools/source/contnr/treelist.cxx 
b/svtools/source/contnr/treelist.cxx
index 1716e27..f3bf0bc 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -1257,6 +1257,8 @@ bool SvTreeList::Remove( const SvTreeListEntry* pEntry )
 SvTreeListEntries rList = pParent-maChildren;
 bool bLastEntry = false;
 
+Broadcast(LISTACTION_REMOVED, const_castSvTreeListEntry*(pEntry));
+
 if ( pEntry-HasChildListPos() )
 {
 size_t nListPos = pEntry-GetChildListPos();
@@ -1273,7 +1275,6 @@ bool SvTreeList::Remove( const SvTreeListEntry* pEntry )
 rList.erase(it);
 }
 
-
 // moved to end of method because it is used later with Broadcast
 
 if (!rList.empty()  !bLastEntry)
@@ -1284,9 +1285,7 @@ bool SvTreeList::Remove( const SvTreeListEntry* pEntry )
 #ifdef CHECK_INTEGRITY
 CheckIntegrity();
 #endif
-Broadcast(LISTACTION_REMOVED, const_castSvTreeListEntry*(pEntry));
 
-delete pEntry; // deletes any children as well
 return true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-29 Thread Libreoffice Gerrit user
 svtools/source/contnr/treelist.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 04f4a0c1366d1863b93d7d84a8534791696b7477
Author: Kohei Yoshida kohei.yosh...@gmail.com
Date:   Mon Oct 29 21:55:06 2012 -0400

Somehow this change was lost during git rebase.

Change-Id: Ic20584b5da2920dc8f2761b7f2c65c58713c5895

diff --git a/svtools/source/contnr/treelist.cxx 
b/svtools/source/contnr/treelist.cxx
index 9714697..a97c02b 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -1378,8 +1378,7 @@ SvTreeList::GetChildIterators(const SvTreeListEntry* 
pParent) const
 {
 typedef std::pairSvTreeListEntries::const_iterator, 
SvTreeListEntries::const_iterator IteratorPair;
 
-static const SvTreeEntryList dummy; // prevent singular iterator asserts
-IteratorPair aRet(dummy.begin(), dummy.end());
+IteratorPair aRet;
 
 if (!pParent)
 pParent = pRootItem;
@@ -1399,8 +1398,7 @@ std::pairSvTreeListEntries::iterator, 
SvTreeListEntries::iterator
 {
 typedef std::pairSvTreeListEntries::iterator, 
SvTreeListEntries::iterator IteratorPair;
 
-static SvTreeEntryList dummy; // prevent singular iterator asserts
-IteratorPair aRet(dummy.begin(), dummy.end());
+IteratorPair aRet;
 
 if (!pParent)
 pParent = pRootItem;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-23 Thread Libreoffice Gerrit user
 svtools/source/filter/igif/gifread.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit 4aa33cae65dd90f60873922dfb0c3f9b106537f9
Author: Tor Lillqvist t...@iki.fi
Date:   Tue Oct 23 11:40:12 2012 +0300

Make loading CVE-2008-5937-1.gif fail (as expected) also on 64-bit Mac OS X

Change-Id: Ia300ebf0c1365699869f386c7257519bcedf2687

diff --git a/svtools/source/filter/igif/gifread.cxx 
b/svtools/source/filter/igif/gifread.cxx
index 5f91b61..8d41882 100644
--- a/svtools/source/filter/igif/gifread.cxx
+++ b/svtools/source/filter/igif/gifread.cxx
@@ -96,6 +96,20 @@ sal_Bool GIFReader::CreateBitmaps( long nWidth, long 
nHeight, BitmapPalette* pPa
 {
 const Size aSize( nWidth, nHeight );
 
+#ifdef __LP64__
+// Don't bother allocating a bitmap of a size that would fail on a
+// 32-bit system. We have at least one unit tests that is expected
+// to fail (loading a 65535*65535 size GIF
+// svtools/qa/cppunit/data/gif/fail/CVE-2008-5937-1.gif), but
+// which doesn't fail on 64-bit Mac OS X at least. Why the loading
+// fails on 64-bit Linux, no idea.
+if (nWidth = 64000  nHeight = 64000)
+{
+bStatus = sal_False;
+return bStatus;
+}
+#endif
+
 if( bGCTransparent )
 {
 const Color aWhite( COL_WHITE );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-22 Thread Libreoffice Gerrit user
 svtools/source/contnr/treelist.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit eda255b38d871bb7d20432e5730cc8c68b3e2942
Author: Michael Stahl mst...@redhat.com
Date:   Mon Oct 22 20:17:01 2012 +0200

SvTreeList: fix singular iterator compare assertions

... which will be introduced tomorrow by 3fa955d7

Change-Id: I5d74a1c018fab69102382d6ea0b2739dd102e5bc

diff --git a/svtools/source/contnr/treelist.cxx 
b/svtools/source/contnr/treelist.cxx
index 48e6df7..8f15941 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -1444,7 +1444,8 @@ 
std::pairSvTreeEntryList::const_iterator,SvTreeEntryList::const_iterator
 {
 typedef 
std::pairSvTreeEntryList::const_iterator,SvTreeEntryList::const_iterator 
IteratorPair;
 
-IteratorPair aRet;
+static const SvTreeEntryList dummy; // prevent singular iterator asserts
+IteratorPair aRet(dummy.begin(), dummy.end());
 
 if (!pParent)
 pParent = pRootItem;
@@ -1464,7 +1465,8 @@ 
std::pairSvTreeEntryList::iterator,SvTreeEntryList::iterator
 {
 typedef std::pairSvTreeEntryList::iterator,SvTreeEntryList::iterator 
IteratorPair;
 
-IteratorPair aRet;
+static SvTreeEntryList dummy; // prevent singular iterator asserts
+IteratorPair aRet(dummy.begin(), dummy.end());
 
 if (!pParent)
 pParent = pRootItem;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-18 Thread Libreoffice Gerrit user
 svtools/source/contnr/treelistentry.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 4bc089dff22765614e0cb988a88ea71706ad3f00
Author: David Tardon dtar...@redhat.com
Date:   Thu Oct 18 14:31:43 2012 +0200

fix debug build

Change-Id: Iadafeabc9c70841f8c40a5a585e5c77e079718e9

diff --git a/svtools/source/contnr/treelistentry.cxx 
b/svtools/source/contnr/treelistentry.cxx
index 8026400..24abb16 100644
--- a/svtools/source/contnr/treelistentry.cxx
+++ b/svtools/source/contnr/treelistentry.cxx
@@ -30,8 +30,6 @@
 #include svtools/treelist.hxx
 #include svtools/treelistbox.hxx
 
-#include tools/debug.hxx
-
 void SvTreeListEntry::SetListPositions()
 {
 if( pChildren )
@@ -56,7 +54,6 @@ void SvTreeListEntry::InvalidateChildrensListPositions()
 
 void SvTreeListEntry::DeleteItems_Impl()
 {
-DBG_CHKTHIS(SvLBoxEntry,0);
 sal_uInt16 nCount = aItems.size();
 while( nCount )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-12 Thread Libreoffice Gerrit user
 svtools/source/control/inettbc.cxx  |1 -
 svtools/source/dialogs/filedlg2.cxx |9 +++--
 2 files changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 49ebf4f91d14af51bc3772c675de19b5891e3d36
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Oct 12 11:38:40 2012 +0100

loplugin: unused string and misleading if/else indent

Change-Id: Idd0c4195e5988b3a0ee64282463db44e43d0c597

diff --git a/svtools/source/control/inettbc.cxx 
b/svtools/source/control/inettbc.cxx
index b0d80e7..490a818 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -725,7 +725,6 @@ void SvtURLBox::TryAutoComplete( sal_Bool bForce )
 {
 if( Application::AnyInput( VCL_INPUT_KEYBOARD ) ) return;
 
-String aMatchString;
 String aCurText = GetText();
 Selection aSelection( GetSelection() );
 if( aSelection.Max() != aCurText.Len()  !bForce )
diff --git a/svtools/source/dialogs/filedlg2.cxx 
b/svtools/source/dialogs/filedlg2.cxx
index 2e13038..b5b2dfd 100644
--- a/svtools/source/dialogs/filedlg2.cxx
+++ b/svtools/source/dialogs/filedlg2.cxx
@@ -316,13 +316,11 @@ IMPL_LINK( ImpPathDialog, ClickHdl, Button*, pBtn )
 }
 }
 }
-else
-if ( pBtn == pCancelBtn )
+else if ( pBtn == pCancelBtn )
 {
 GetPathDialog()-EndDialog( sal_False );
 }
-else
-if ( pBtn == pHomeBtn )
+else if ( pBtn == pHomeBtn )
 {
 ::rtl::OUString aHomeDir;
 osl::Security aSecurity;
@@ -336,8 +334,7 @@ IMPL_LINK( ImpPathDialog, ClickHdl, Button*, pBtn )
 }
 }
 }
-else
-if ( pBtn == pNewDirBtn )
+else if ( pBtn == pNewDirBtn )
 {
 DirEntry aFile( pEdit-GetText() );
 if( ! aFile.Exists()  ! FileStat( aFile ).IsKind( FSYS_KIND_WILD ) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-09 Thread Libreoffice Gerrit user
 svtools/source/filter/exportdialog.cxx |   14 --
 svtools/source/filter/exportdialog.hrc |1 -
 svtools/source/filter/exportdialog.hxx |1 -
 svtools/source/filter/exportdialog.src |7 ---
 4 files changed, 23 deletions(-)

New commits:
commit e8624cc0e2777ffcc7d06bd76ff7372921125589
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Oct 9 09:05:23 2012 +0100

maCbJPGPreview is never enabled, remove it

Change-Id: I765185bf2c51f37ab7d7209098fa0dcb1ba60b7c

diff --git a/svtools/source/filter/exportdialog.cxx 
b/svtools/source/filter/exportdialog.cxx
index ef226f9..dafa648 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -596,7 +596,6 @@ ExportDialog::ExportDialog( FltCallDialogParameter rPara,
 maFtJPGMax  ( this, ResId( FT_JPG_MAX, 
*rPara.pResMgr ) ),
 maFtPNGMin  ( this, ResId( FT_PNG_MIN, 
*rPara.pResMgr ) ),
 maFtPNGMax  ( this, ResId( FT_PNG_MAX, 
*rPara.pResMgr ) ),
-maCbJPGPreview  ( this, ResId( CB_JPG_PREVIEW, 
*rPara.pResMgr ) ),
 maCbInterlaced  ( this, ResId( CB_INTERLACED, 
*rPara.pResMgr ) ),
 maCbRLEEncoding ( this, ResId( CB_RLE_ENCODING, 
*rPara.pResMgr ) ),
 maFlGIFDrawingObjects   ( this, ResId( FL_GIF_DRAWING_OBJECTS, 
*rPara.pResMgr ) ),
@@ -710,11 +709,6 @@ ExportDialog::ExportDialog( FltCallDialogParameter rPara,
 maRbBinary.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
 maRbText.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
 
-
-// JPG Preview
-//  maCbJPGPreview.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
-maCbJPGPreview.Enable( sal_False );
-
 maSbJPGPreviewVert.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) );
 maSbJPGPreviewHorz.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) );
 maSbZoom.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) );
@@ -875,8 +869,6 @@ void ExportDialog::createFilterOptions( vcl::RowOrColumn 
rLayout )
 createScrollBar( *xRows.get() );
 xRows-addWindow( maFtJPGMin );
 xRows-addWindow( maFtJPGMax );
-if ( maCbJPGPreview.IsEnabled() )
-xRows-addWindow( maCbJPGPreview );
 
 boost::shared_ptr vcl::Spacer  xSpacer( new vcl::Spacer( 
rLayout, 2 ) );
 rLayout.addChild( xSpacer );
@@ -891,8 +883,6 @@ void ExportDialog::createFilterOptions( vcl::RowOrColumn 
rLayout )
 maNfCompression.SetMax( 100 );
 maNfCompression.SetValue( nQuality );
 maNfCompression.SetStrictFormat( sal_True );
-if ( maCbJPGPreview.IsEnabled() )
-maCbJPGPreview.Check( sal_False );
 }
 break;
 case FORMAT_PNG :
@@ -1160,10 +1150,6 @@ sal_Int32 static GetZoomValueFromThumbPos( sal_Int32 
nThumbPos )
 
 void ExportDialog::updatePreview()
 {
-// JPG
-//  maCbJPGPreview.Enable( IsTempExportAvailable() );
-
-//  if ( maCbJPGPreview.IsEnabled()  maCbJPGPreview.IsChecked() )
 if ( mbPreview )
 {
 long nScrollBarSize = 
Application::GetSettings().GetStyleSettings().GetScrollBarSize();
diff --git a/svtools/source/filter/exportdialog.hrc 
b/svtools/source/filter/exportdialog.hrc
index abe2515..3e6aa98 100644
--- a/svtools/source/filter/exportdialog.hrc
+++ b/svtools/source/filter/exportdialog.hrc
@@ -64,7 +64,6 @@
 #define RB_EPS_COMPRESSION_LZW  7
 #define RB_EPS_COMPRESSION_NONE 8
 
-#define CB_JPG_PREVIEW  1
 #define CB_INTERLACED   2
 #define CB_RLE_ENCODING 3
 #define CB_SAVE_TRANSPARENCY4
diff --git a/svtools/source/filter/exportdialog.hxx 
b/svtools/source/filter/exportdialog.hxx
index 388cb94..784d01c 100644
--- a/svtools/source/filter/exportdialog.hxx
+++ b/svtools/source/filter/exportdialog.hxx
@@ -77,7 +77,6 @@ private:
 FixedText   maFtJPGMax;
 FixedText   maFtPNGMin;
 FixedText   maFtPNGMax;
-CheckBoxmaCbJPGPreview;
 CheckBoxmaCbInterlaced;
 CheckBoxmaCbRLEEncoding;
 FixedLine   maFlGIFDrawingObjects;
diff --git a/svtools/source/filter/exportdialog.src 
b/svtools/source/filter/exportdialog.src
index 2d1dfc7..eba4251 100644
--- a/svtools/source/filter/exportdialog.src
+++ b/svtools/source/filter/exportdialog.src
@@ -258,13 +258,6 @@ ModalDialog DLG_EXPORT
 Size = MAP_APPFONT ( 41 , 10 ) ;
 Text [ en-US ] = 9 is smallest file size and slowest loading. ;
 };
-CheckBox CB_JPG_PREVIEW
-{
-HelpID = svtools:CheckBox:DLG_EXPORT:CB_JPG_PREVIEW;
-Hide = TRUE;
-Size = MAP_APPFONT ( 60 , 10 ) ;
-Text [ en-US ] = Preview ;
-};
 CheckBox CB_INTERLACED
 {
 HelpID = svtools:CheckBox:DLG_EXPORT:CB_INTERLACED;
___
Libreoffice-commits mailing list

[Libreoffice-commits] .: svtools/source

2012-10-09 Thread Libreoffice Gerrit user
 svtools/source/filter/exportdialog.cxx |  158 +
 svtools/source/filter/exportdialog.hrc |6 -
 svtools/source/filter/exportdialog.hxx |6 -
 svtools/source/filter/exportdialog.src |   52 --
 4 files changed, 6 insertions(+), 216 deletions(-)

New commits:
commit 54985c634fbcc6b8ba78a004712c20a5f93ce7c2
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Oct 9 09:14:14 2012 +0100

cut out always-hidden controls from graphic ExportDialog

Change-Id: Ia94c0418d2a0e93f35f9521ab0614eb110f593a5

diff --git a/svtools/source/filter/exportdialog.cxx 
b/svtools/source/filter/exportdialog.cxx
index dafa648..24339bc 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -620,11 +620,6 @@ ExportDialog::ExportDialog( FltCallDialogParameter rPara,
 msEstimatedSizePix2 ( ResId( STR_ESTIMATED_SIZE_PIX_2, 
*rPara.pResMgr ).toString() ),
 msEstimatedSizeVec  ( ResId( STR_ESTIMATED_SIZE_VEC, 
*rPara.pResMgr ).toString() ),
 maFlButtons ( this, ResId( FL_BUTTONS, 
*rPara.pResMgr ) ),
-maFbJPGPreview  ( this, ResId( FB_JPG_PREVIEW, 
*rPara.pResMgr ) ),
-maSbZoom( this, ResId( SB_ZOOM, *rPara.pResMgr 
) ),
-maNfZoom( this, ResId( NF_ZOOM, *rPara.pResMgr 
) ),
-maSbJPGPreviewHorz  ( this, ResId( SB_JPG_PREVIEW_HORZ, 
*rPara.pResMgr ) ),
-maSbJPGPreviewVert  ( this, ResId( SB_JPG_PREVIEW_VERT, 
*rPara.pResMgr ) ),
 maBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr 
) ),
 maBtnCancel ( this, ResId( BTN_CANCEL, 
*rPara.pResMgr ) ),
 maBtnHelp   ( this, ResId( BTN_HELP, 
*rPara.pResMgr ) ),
@@ -640,7 +635,6 @@ ExportDialog::ExportDialog( FltCallDialogParameter rPara,
 mnMaxFilesizeForRealtimePreview( 0 ),
 mpTempStream( new SvMemoryStream() ),
 maOriginalSize  ( awt::Size( 0, 0 ) ),
-mbPreview   ( sal_False ),
 mbIsPixelFormat ( bIsPixelFormat ),
 mbExportSelection   ( bExportSelection ),
 mbPreserveAspectRatio   ( sal_True )
@@ -709,10 +703,6 @@ ExportDialog::ExportDialog( FltCallDialogParameter rPara,
 maRbBinary.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
 maRbText.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
 
-maSbJPGPreviewVert.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) );
-maSbJPGPreviewHorz.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) );
-maSbZoom.SetScrollHdl( LINK( this, ExportDialog, UpdateHdl ) );
-
 // BMP
 maCbRLEEncoding.SetClickHdl( LINK( this, ExportDialog, UpdateHdl ) );
 
@@ -1116,7 +1106,7 @@ void ExportDialog::setupLayout()
 maLayout.show();
 maDialogSize = maLayout.getOptimalSize( WINDOWSIZE_PREFERRED );
 maLayout.setManagedArea( Rectangle( Point(), maDialogSize ) );
-SetOutputSizePixel( Size( mbPreview ? maDialogSize.Width() * 2 : 
maDialogSize.Width(), maDialogSize.Height() ) );
+SetOutputSizePixel( maDialogSize );
 
 maRectFlButtons = Rectangle( maFlButtons.GetPosPixel(), 
maFlButtons.GetSizePixel() );
 maRectBtnHelp   = Rectangle( maBtnHelp.GetPosPixel(), 
maBtnHelp.GetSizePixel() );
@@ -1138,150 +1128,14 @@ static rtl::OUString ImpValueOfInKB( const sal_Int64 
rVal )
 return aVal.makeStringAndClear();
 }
 
-sal_Int32 static GetZoomValueFromThumbPos( sal_Int32 nThumbPos )
-{
-sal_Int32 nProz = 0;
-if ( nThumbPos = 50 )
-nProz = nThumbPos * 2;  // so a range of 50 represents 
100%
-else
-nProz = ( ( nThumbPos - 50 ) * 60 ) + 100;  // we want to scale up to 
3000%
-return nProz;
-}
-
 void ExportDialog::updatePreview()
 {
-if ( mbPreview )
-{
-long nScrollBarSize = 
Application::GetSettings().GetStyleSettings().GetScrollBarSize();
-
-Point   aPreviewPos( maDialogSize.Width(), 0 );
-SizeaPreviewSize( maDialogSize.Width(), 
maFlButtons.GetPosPixel().Y() );
-
-Point   aFixedBitmapPos( aPreviewPos );
-SizeaFixedBitmapSize( aPreviewSize );
-
-maSbZoom.Show( sal_False );
-maSbZoom.SetPosPixel( Point( aPreviewPos.X(), aPreviewPos.Y() ) );
-maSbZoom.SetSizePixel( Size( aPreviewSize.Width() / 4, nScrollBarSize 
) );
-maNfZoom.Show( sal_False );
-maNfZoom.SetPosPixel( Point( aPreviewPos.X() + aPreviewSize.Width() / 
4, aPreviewPos.Y() ) );
-maNfZoom.SetSizePixel( Size( aPreviewSize.Width() / 6, nScrollBarSize 
) );
-maNfZoom.SetValue( GetZoomValueFromThumbPos( maSbZoom.GetThumbPos() ) 
);
-maFbJPGPreview.Show( sal_True );
-
-sal_Int32 nZoom = GetZoomValueFromThumbPos( maSbZoom.GetThumbPos() );
-double 

[Libreoffice-commits] .: svtools/source

2012-10-09 Thread Libreoffice Gerrit user
 svtools/source/filter/exportdialog.cxx |1 -
 svtools/source/filter/exportdialog.hrc |1 -
 svtools/source/filter/exportdialog.hxx |1 -
 svtools/source/filter/exportdialog.src |6 --
 4 files changed, 9 deletions(-)

New commits:
commit f9a12d8dd35882b5d58a12b70ff8d2f9ee8b6acf
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Oct 9 09:24:35 2012 +0100

FL_PBM_OPTIONS never shown either

Change-Id: I9866e2234960a6525212431d9e6dbad17359d1b6

diff --git a/svtools/source/filter/exportdialog.cxx 
b/svtools/source/filter/exportdialog.cxx
index 24339bc..b2a7d38 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -589,7 +589,6 @@ ExportDialog::ExportDialog( FltCallDialogParameter rPara,
 maLbColorDepth  ( this, ResId( LB_COLOR_DEPTH, 
*rPara.pResMgr ) ),
 maFlJPGQuality  ( this, ResId( FL_JPG_QUALITY, 
*rPara.pResMgr ) ),
 maFlMode( this, ResId( FL_MODE, *rPara.pResMgr 
) ),
-maFlPBMOptions  ( this, ResId( FL_PBM_OPTIONS, 
*rPara.pResMgr ) ),
 maSbCompression ( this, ResId( SB_COMPRESSION, 
*rPara.pResMgr ) ),
 maNfCompression ( this, ResId( NF_COMPRESSION, 
*rPara.pResMgr ) ),
 maFtJPGMin  ( this, ResId( FT_JPG_MIN, 
*rPara.pResMgr ) ),
diff --git a/svtools/source/filter/exportdialog.hrc 
b/svtools/source/filter/exportdialog.hrc
index 6bcb10c..23df23b 100644
--- a/svtools/source/filter/exportdialog.hrc
+++ b/svtools/source/filter/exportdialog.hrc
@@ -27,7 +27,6 @@
 #define FL_COMPRESSION  4
 #define FL_MODE 5
 #define FL_GIF_DRAWING_OBJECTS  6
-#define FL_PBM_OPTIONS  7
 #define FL_EPS_PREVIEW  8
 #define FL_EPS_VERSION  9
 #define FL_EPS_COLOR_FORMAT 10
diff --git a/svtools/source/filter/exportdialog.hxx 
b/svtools/source/filter/exportdialog.hxx
index 83168d2..f98d971 100644
--- a/svtools/source/filter/exportdialog.hxx
+++ b/svtools/source/filter/exportdialog.hxx
@@ -70,7 +70,6 @@ private:
 ListBox maLbColorDepth;
 FixedLine   maFlJPGQuality;
 FixedLine   maFlMode;
-FixedLine   maFlPBMOptions;
 ScrollBar   maSbCompression;
 NumericFieldmaNfCompression;
 FixedText   maFtJPGMin;
diff --git a/svtools/source/filter/exportdialog.src 
b/svtools/source/filter/exportdialog.src
index 92abe18..ef82a6c 100644
--- a/svtools/source/filter/exportdialog.src
+++ b/svtools/source/filter/exportdialog.src
@@ -208,12 +208,6 @@ ModalDialog DLG_EXPORT
 Size = MAP_APPFONT ( 110 , 8 ) ;
 Text [ en-US ] = Mode ;
 };
-FixedLine FL_PBM_OPTIONS
-{
-Hide = TRUE;
-Size = MAP_APPFONT ( 110 , 8 ) ;
-Text [ en-US ] = File Format ;
-};
 ScrollBar SB_COMPRESSION
 {
 Hide = TRUE;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source unusedcode.easy

2012-10-09 Thread Libreoffice Gerrit user
 svtools/source/config/toolpanelopt.cxx |   29 -
 unusedcode.easy|2 --
 2 files changed, 31 deletions(-)

New commits:
commit ac8d3988890e0dbd19afb496033725a9878a86cc
Author: Marcos Paulo de Souza marcos.souza@gmail.com
Date:   Sun Oct 7 21:23:27 2012 -0300

Remove more unused methods

Change-Id: I5c6bb319458b1ce60cedfe0e2b0f5eaa8ba55e9d
Signed-off-by: Marcos Paulo de Souza marcos.souza@gmail.com
Reviewed-on: https://gerrit.libreoffice.org/837
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/svtools/source/config/toolpanelopt.cxx 
b/svtools/source/config/toolpanelopt.cxx
index 2f58022..94bebef 100644
--- a/svtools/source/config/toolpanelopt.cxx
+++ b/svtools/source/config/toolpanelopt.cxx
@@ -99,8 +99,6 @@ class SvtToolPanelOptions_Impl : public ConfigItem
 bool m_bVisibleHandoutView;
 bool m_bVisibleSlideSorterView;
 
-void AddListenerLink( const Link rLink );
-void RemoveListenerLink( const Link rLink );
 void CallListeners();
 
 private:
@@ -251,23 +249,6 @@ void SvtToolPanelOptions_Impl::Load( const Sequence 
OUString  rPropertyNames
 }
 }
 
-void SvtToolPanelOptions_Impl::AddListenerLink( const Link rLink )
-{
-aList.push_back( rLink );
-}
-
-void SvtToolPanelOptions_Impl::RemoveListenerLink( const Link rLink )
-{
-for ( ::std::listLink::iterator iter = aList.begin(); iter != 
aList.end(); ++iter )
-{
-if ( *iter == rLink )
-{
-aList.erase(iter);
-break;
-}
-}
-}
-
 void SvtToolPanelOptions_Impl::CallListeners()
 {
 for ( ::std::listLink::const_iterator iter = aList.begin(); iter != 
aList.end(); ++iter )
@@ -428,14 +409,4 @@ Mutex  SvtToolPanelOptions::GetInitMutex()
 return theSvtToolPanelOptionsMutex::get();
 }
 
-void SvtToolPanelOptions::AddListenerLink( const Link rLink )
-{
-m_pDataContainer-AddListenerLink( rLink );
-}
-
-void SvtToolPanelOptions::RemoveListenerLink( const Link rLink )
-{
-m_pDataContainer-RemoveListenerLink( rLink );
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unusedcode.easy b/unusedcode.easy
index b836d67..91d2995 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -10,8 +10,6 @@ 
ScVbaFormatooo::vba::excel::XStyle::setNumberFormat(com::sun::star::lang::Loca
 SvLBoxTreeList::Clone(SvListEntry*, unsigned long) const
 SvLBoxTreeList::Prev(SvListEntry*, unsigned short*) const
 SvTreeEntryList::front()
-SvtToolPanelOptions::AddListenerLink(Link const)
-SvtToolPanelOptions::RemoveListenerLink(Link const)
 SvxAutoCorrect::DeleteText(String const, unsigned short)
 TextEngine::GetLeftMargin() const
 ThumbnailView::GetItemCount() const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-08 Thread Libreoffice Gerrit user
 svtools/source/inc/sgvmain.hxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit cf955c621269011eaa71ee7e51647203f6120110
Author: Tor Lillqvist tlillqv...@suse.com
Date:   Mon Oct 8 18:19:26 2012 +0300

Don't repeat my mistake in the future

Change-Id: I5b5e4464c9a7345aa9ca230100aae0d7fcee91ee

diff --git a/svtools/source/inc/sgvmain.hxx b/svtools/source/inc/sgvmain.hxx
index 9d023d5..fcf7473 100644
--- a/svtools/source/inc/sgvmain.hxx
+++ b/svtools/source/inc/sgvmain.hxx
@@ -99,6 +99,12 @@ struct ObjAreaType {
 sal_uInt8   FFarbe;   //  [Index]
 sal_uInt8   FBFarbe;  //  [Index]
 sal_uInt8   FIntens;  //  [%]
+// Despite the Dummy in the name, and not being used anywhere in
+// the code, these two fields are *essential*. These structs are
+// 1:1 mappings of actual on-disk/wire file format structures...
+// So don't clean the unused dummy fields away. (Actually it
+// might well be that many other fields around here are never used
+// in our code either.)
 sal_uInt8   FDummy1;  //
 sal_Int16  FDummy2;  //
 sal_uInt16 FMuster;  //  [Index] inkl. Invers, Transparenz
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-07 Thread Libreoffice Gerrit user
 svtools/source/misc/svtaccessiblefactory.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 7da6319de0038e5751cf7c8f9f8bca7e1813bb63
Author: Tor Lillqvist t...@iki.fi
Date:   Sun Oct 7 11:29:28 2012 +0300

WaE: 's_hAccessibleImplementationModule' defined but not used

Change-Id: I8caf2951876d47873b325f306515ec840692b856

diff --git a/svtools/source/misc/svtaccessiblefactory.cxx 
b/svtools/source/misc/svtaccessiblefactory.cxx
index 013e946..587c4d5 100644
--- a/svtools/source/misc/svtaccessiblefactory.cxx
+++ b/svtools/source/misc/svtaccessiblefactory.cxx
@@ -58,7 +58,9 @@ namespace svt
 #ifdef UNLOAD_ON_LAST_CLIENT_DYING
 static oslInterlockedCount  
s_nAccessibleFactoryAccesss = 0;
 #endif // UNLOAD_ON_LAST_CLIENT_DYING
+#ifndef DISABLE_DYNLOADING
 static oslModule
s_hAccessibleImplementationModule = NULL;
+#endif
 static GetSvtAccessibilityComponentFactory  
s_pAccessibleFactoryFunc = NULL;
 static ::rtl::Reference IAccessibleFactorys_pFactory;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-10-07 Thread Libreoffice Gerrit user
 svtools/source/control/ctrlbox.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fa30508fd3b2224e76e1ac7c150df9040518e7aa
Author: Fridrich Å trba fridrich.st...@bluewin.ch
Date:   Mon Oct 8 07:33:09 2012 +0200

Fix svtools with Visual Studio 2010

Change-Id: I445173e8f469c409801d803ef22cb499935ba19b

diff --git a/svtools/source/control/ctrlbox.cxx 
b/svtools/source/control/ctrlbox.cxx
index 9b82dd9..fc99145 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -832,7 +832,7 @@ sal_uInt16 LineListBox::InsertEntry( const XubString rStr, 
sal_uInt16 nPos )
 if ( nPos  pLineList-size() ) {
 ImpLineList::iterator it = pLineList-begin();
 ::std::advance( it, nPos );
-pLineList-insert( it, NULL );
+pLineList-insert( it, reinterpret_castImpLineListData *(NULL) );
 } else {
 pLineList-push_back( NULL );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-09-28 Thread Libreoffice Gerrit user
 svtools/source/control/ctrlbox.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e05ba1446b1d65f0cb84130b060241065da8
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Sep 28 12:49:36 2012 +0100

Related: fdo#39626 bootstrap.ini is windows-only, use generic mechanism

Change-Id: If3cb8451b8af874b82512f1b731654d918d0a196

diff --git a/svtools/source/control/ctrlbox.cxx 
b/svtools/source/control/ctrlbox.cxx
index 1ee9589..9b82dd9 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1143,7 +1143,7 @@ void FontNameBox::LoadMRUEntries( const String 
aFontMRUEntriesFile, xub_Unicode
 
 void FontNameBox::InitFontMRUEntriesFile()
 {
-rtl::OUString 
sUserConfigDir(RTL_CONSTASCII_USTRINGPARAM(${$BRAND_BASE_DIR/program/bootstrap.ini:UserInstallation}));
+rtl::OUString sUserConfigDir(${$BRAND_BASE_DIR/program/ SAL_CONFIGFILE( 
bootstrap) ::UserInstallation});
 rtl::Bootstrap::expandMacros(sUserConfigDir);
 
 maFontMRUEntriesFile = sUserConfigDir;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-09-23 Thread Libreoffice Gerrit user
 svtools/source/edit/syntaxhighlight.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 3b3c20212e4d50bf70232541fd7e43d516e4db62
Author: Andras Timar ati...@suse.com
Date:   Sun Sep 23 14:57:10 2012 +0200

add missing basic keywords to syntax highlighter

Change-Id: I920ad01c0ea338795afeb16e44cd8ec09e5fc5d6

diff --git a/svtools/source/edit/syntaxhighlight.cxx 
b/svtools/source/edit/syntaxhighlight.cxx
index 49e559e..a1e3bc0 100644
--- a/svtools/source/edit/syntaxhighlight.cxx
+++ b/svtools/source/edit/syntaxhighlight.cxx
@@ -41,6 +41,7 @@ static const char* strListBasicKeyWords[] = {
 and,
 any,
 append,
+attrubute,
 as,
 base,
 binary,
@@ -80,6 +81,7 @@ static const char* strListBasicKeyWords[] = {
 end enum,
 end function,
 end if,
+end property,
 end select,
 end sub,
 end type,
@@ -126,6 +128,7 @@ static const char* strListBasicKeyWords[] = {
 optional,
 or,
 output,
+paramarray,
 preserve,
 print,
 private,
@@ -154,10 +157,12 @@ static const char* strListBasicKeyWords[] = {
 type,
 typeof,
 until,
+vbasupport,
 variant,
 wend,
 while,
 with,
+withevent,
 write,
 xor
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-09-23 Thread Libreoffice Gerrit user
 svtools/source/edit/syntaxhighlight.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 94bb5021c78570aa7b76614289669639f11cf53b
Author: Takeshi Abe t...@fixedpoint.jp
Date:   Sun Sep 23 23:52:31 2012 +0900

fix typo

Change-Id: I8bb811cfe06d409bebad586c16cf3837551f5a5f

diff --git a/svtools/source/edit/syntaxhighlight.cxx 
b/svtools/source/edit/syntaxhighlight.cxx
index a1e3bc0..8851766 100644
--- a/svtools/source/edit/syntaxhighlight.cxx
+++ b/svtools/source/edit/syntaxhighlight.cxx
@@ -41,7 +41,7 @@ static const char* strListBasicKeyWords[] = {
 and,
 any,
 append,
-attrubute,
+attribute,
 as,
 base,
 binary,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-09-23 Thread Libreoffice Gerrit user
 svtools/source/edit/syntaxhighlight.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2345948281e03671466dbf6e53544855b28a90d4
Author: Takeshi Abe t...@fixedpoint.jp
Date:   Sun Sep 23 23:56:05 2012 +0900

be in lexicographic order

Change-Id: I26b15fe1cc5f8f3066f241143d01615a7416eb5b

diff --git a/svtools/source/edit/syntaxhighlight.cxx 
b/svtools/source/edit/syntaxhighlight.cxx
index 8851766..4ac4171 100644
--- a/svtools/source/edit/syntaxhighlight.cxx
+++ b/svtools/source/edit/syntaxhighlight.cxx
@@ -41,8 +41,8 @@ static const char* strListBasicKeyWords[] = {
 and,
 any,
 append,
-attribute,
 as,
+attribute,
 base,
 binary,
 boolean,
@@ -157,8 +157,8 @@ static const char* strListBasicKeyWords[] = {
 type,
 typeof,
 until,
-vbasupport,
 variant,
+vbasupport,
 wend,
 while,
 with,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-09-14 Thread Libreoffice Gerrit user
 svtools/source/table/tabledatawindow.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 3d934d48606acf8c5c96d0d8b96e2f202db1f37d
Author: Norbert Thiebaud nthieb...@gmail.com
Date:   Mon Aug 20 22:01:08 2012 -0500

gridfixes: #i112465# delegate RequestHelp to the base class,

when we do not have own help to display

Change-Id: I953144aa0921e849df14e9de31010e8904dffc5f
Reviewed-on: https://gerrit.libreoffice.org/539
Reviewed-by: Miklos Vajna vmik...@suse.cz
Tested-by: Miklos Vajna vmik...@suse.cz

diff --git a/svtools/source/table/tabledatawindow.cxx 
b/svtools/source/table/tabledatawindow.cxx
index cc84f53..4f69758 100644
--- a/svtools/source/table/tabledatawindow.cxx
+++ b/svtools/source/table/tabledatawindow.cxx
@@ -142,18 +142,26 @@ namespace svt { namespace table
 
 if ( !sHelpText.isEmpty() )
 {
+// hide the standard (singleton) help window, so we do not have 
two help windows open at the same time
+Help::HideBalloonAndQuickHelp();
+
 Rectangle const aControlScreenRect(
 OutputToScreenPixel( Point( 0, 0 ) ),
 GetOutputSizePixel()
 );
 
 if ( m_nTipWindowHandle )
+{
 Help::UpdateTip( m_nTipWindowHandle, this, aControlScreenRect, 
sHelpText );
+}
 else
 m_nTipWindowHandle = Help::ShowTip( this, aControlScreenRect, 
sHelpText, nHelpStyle );
 }
 else
+{
 impl_hideTipWindow();
+Window::RequestHelp( rHEvt );
+}
 }
 
 
//--
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-09-14 Thread Libreoffice Gerrit user
 svtools/source/table/tablecontrol_impl.cxx |  587 -
 svtools/source/table/tablecontrol_impl.hxx |   41 +-
 2 files changed, 373 insertions(+), 255 deletions(-)

New commits:
commit a1f695dea516dfb7199390f750ca8744bb7df912
Author: Frank Schoenheit [fs] frank.schoenh...@oracle.com
Date:   Mon Mar 28 10:56:24 2011 +0200

UNFINISHED: column resizing refactoring

Change-Id: Iac8db5ee848f35f19f8fe4eb431485559600be49

diff --git a/svtools/source/table/tablecontrol_impl.cxx 
b/svtools/source/table/tablecontrol_impl.cxx
index 521bb2d..df6bbbc 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -47,6 +47,7 @@
 #include tools/diagnose_ex.h
 
 #include functional
+#include numeric
 
 #define MIN_COLUMN_WIDTH_PIXEL  4
 
@@ -499,7 +500,7 @@ namespace svt { namespace table
 
 // recalc some model-dependent cached info
 impl_ni_updateCachedModelValues();
-impl_ni_updateScrollbars();
+impl_ni_relayout();
 
 // completely invalidate
 m_rAntiImpl.Invalidate();
@@ -547,8 +548,8 @@ namespace svt { namespace table
 if ( i_first = m_nCurRow )
 goTo( m_nCurColumn, m_nCurRow + insertedRows );
 
-// adjust scrollbars
-impl_ni_updateScrollbars();
+// relayout, since the scrollbar need might have changed
+impl_ni_relayout();
 
 // notify A1YY events
 if ( impl_isAccessibleAlive() )
@@ -608,8 +609,8 @@ namespace svt { namespace table
 m_nCurRow = ROW_INVALID;
 }
 
-// adjust scrollbars
-impl_ni_updateScrollbars();
+// relayout, since the scrollbar need might have changed
+impl_ni_relayout();
 
 // notify A11Y events
 if ( impl_isAccessibleAlive() )
@@ -639,8 +640,7 @@ namespace svt { namespace table
 void TableControl_Impl::columnInserted( ColPos const i_colIndex )
 {
 m_nColumnCount = m_pModel-getColumnCount();
-impl_ni_updateColumnWidths();
-impl_ni_updateScrollbars();
+impl_ni_relayout();
 
 m_rAntiImpl.Invalidate();
 
@@ -651,8 +651,7 @@ namespace svt { namespace table
 void TableControl_Impl::columnRemoved( ColPos const i_colIndex )
 {
 m_nColumnCount = m_pModel-getColumnCount();
-impl_ni_updateColumnWidths();
-impl_ni_updateScrollbars();
+impl_ni_relayout();
 
 m_rAntiImpl.Invalidate();
 
@@ -663,8 +662,7 @@ namespace svt { namespace table
 void TableControl_Impl::allColumnsRemoved()
 {
 m_nColumnCount = m_pModel-getColumnCount();
-impl_ni_updateColumnWidths();
-impl_ni_updateScrollbars();
+impl_ni_relayout();
 
 m_rAntiImpl.Invalidate();
 }
@@ -681,11 +679,8 @@ namespace svt { namespace table
 
//--
 void TableControl_Impl::tableMetricsChanged()
 {
-long const oldRowHeaderWidthPixel = m_nRowHeaderWidthPixel;
 impl_ni_updateCachedTableMetrics();
-if ( oldRowHeaderWidthPixel != m_nRowHeaderWidthPixel )
-impl_ni_updateColumnWidths();
-impl_ni_updateScrollbars();
+impl_ni_relayout();
 m_rAntiImpl.Invalidate();
 }
 
@@ -715,9 +710,8 @@ namespace svt { namespace table
 {
 if ( !m_bUpdatingColWidths )
 {
-impl_ni_updateColumnWidths( i_column );
+impl_ni_relayout( i_column );
 invalidate( TableAreaAll );
-impl_ni_updateScrollbars();
 }
 
 nGroup = ~COL_ATTRS_WIDTH;
@@ -793,67 +787,157 @@ namespace svt { namespace table
 
//--
 void TableControl_Impl::impl_ni_updateCachedModelValues()
 {
-m_pInputHandler.reset();
-m_nColumnCount = m_nRowCount = 0;
-
-impl_ni_updateCachedTableMetrics();
-impl_ni_updateColumnWidths();
-
 m_pInputHandler = m_pModel-getInputHandler();
 if ( !m_pInputHandler )
 m_pInputHandler.reset( new DefaultInputHandler );
 
 m_nColumnCount = m_pModel-getColumnCount();
+if ( m_nLeftColumn = m_nColumnCount )
+m_nLeftColumn = ( m_nColumnCount  0 ) ? m_nColumnCount - 1 : 0;
+
 m_nRowCount = m_pModel-getRowCount();
+if ( m_nTopRow = m_nRowCount )
+m_nTopRow = ( m_nRowCount  0 ) ? m_nRowCount - 1 : 0;
+
+impl_ni_updateCachedTableMetrics();
 }
 
 
//--
-void TableControl_Impl::impl_ni_updateColumnWidths( ColPos const 
i_assumeInflexibleColumnsUpToIncluding )
+namespace
 {
-ENSURE_OR_RETURN_VOID( !m_bUpdatingColWidths, 

[Libreoffice-commits] .: svtools/source

2012-09-14 Thread Libreoffice Gerrit user
 svtools/source/table/mousefunction.cxx |   19 +++
 1 file changed, 3 insertions(+), 16 deletions(-)

New commits:
commit dd0431a537ea6f042dcb476000e230fe144c6114
Author: Norbert Thiebaud nthieb...@gmail.com
Date:   Mon Sep 3 14:37:31 2012 -0500

gridfixes: fixed selection handling, part I

RowSelection::HandleMouseDown: always forward to the SelectionEngine,
even if the hit row is already selected.
This ensures proper de-selection handling in case of Ctrl+Click

Change-Id: I46fd63332101fd078c6341c94575dc69f48f8a68
Reviewed-on: https://gerrit.libreoffice.org/549
Reviewed-by: Miklos Vajna vmik...@suse.cz
Tested-by: Miklos Vajna vmik...@suse.cz

diff --git a/svtools/source/table/mousefunction.cxx 
b/svtools/source/table/mousefunction.cxx
index 83d7212..8e400a5 100644
--- a/svtools/source/table/mousefunction.cxx
+++ b/svtools/source/table/mousefunction.cxx
@@ -207,27 +207,14 @@ namespace svt { namespace table
 TableCell const tableCell( i_tableControl.hitTest( 
i_event.GetPosPixel() ) );
 if ( tableCell.nRow = 0 )
 {
-bool bSetCursor = false;
 if ( i_tableControl.getSelEngine()-GetSelectionMode() == 
NO_SELECTION )
 {
-bSetCursor = true;
+i_tableControl.activateCell( tableCell.nColumn, tableCell.nRow 
);
+handled = true;
 }
 else
 {
-if ( !i_tableControl.isRowSelected( tableCell.nRow ) )
-{
-handled = 
i_tableControl.getSelEngine()-SelMouseButtonDown( i_event );
-}
-else
-{
-bSetCursor = true;
-}
-}
-
-if ( bSetCursor )
-{
-i_tableControl.activateCell( tableCell.nColumn, tableCell.nRow 
);
-handled = true;
+handled = i_tableControl.getSelEngine()-SelMouseButtonDown( 
i_event );
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-09-14 Thread Libreoffice Gerrit user
 svtools/source/table/tablecontrol_impl.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 712c1c41721bc50a8106fa3b5892a617b3ee542a
Author: Norbert Thiebaud nthieb...@gmail.com
Date:   Mon Sep 3 16:11:42 2012 -0500

gridfixes: impl_ni_relayout: update the child window position/size last

it relies on the other calculations (in particular calculation of the
column widths) being finished

Change-Id: I599aa5b2938e2aa810980c00ac8f598b4f4fcfcb
Reviewed-on: https://gerrit.libreoffice.org/551
Reviewed-by: Miklos Vajna vmik...@suse.cz
Tested-by: Miklos Vajna vmik...@suse.cz

diff --git a/svtools/source/table/tablecontrol_impl.cxx 
b/svtools/source/table/tablecontrol_impl.cxx
index df6bbbc..aca789e 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -1237,9 +1237,6 @@ namespace svt { namespace table
 }
 }
 
-// show or hide the scrollbars as needed
-impl_ni_positionChildWindows( aDataCellPlayground, 
bNeedVerticalScrollbar, bNeedHorizontalScrollbar );
-
 // the initial call to impl_ni_calculateColumnWidths assumed that we 
need a vertical scrollbar. If, by now,
 // we know that this is not the case, re-calculate the column widths.
 if ( !bNeedVerticalScrollbar )
@@ -1293,6 +1290,9 @@ namespace svt { namespace table
 colPos-move( offsetPixel );
 }
 }
+
+// show or hide the scrollbars as needed, and position the data window
+impl_ni_positionChildWindows( aDataCellPlayground, 
bNeedVerticalScrollbar, bNeedHorizontalScrollbar );
 }
 
 
//--
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-09-14 Thread Libreoffice Gerrit user
 svtools/source/table/gridtablerenderer.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit b68f053b765f37fc43fc2d67c57686c121acdfbf
Author: Norbert Thiebaud nthieb...@gmail.com
Date:   Mon Sep 3 16:20:38 2012 -0500

gridfixes: lcl_getAlignmentTextDrawFlags: row header w/o columns

care the rare cases that the table has row headers, but no columns at all

Change-Id: Iece17add6f5e0adf425c33f0817e8b1be953e1a7
Reviewed-on: https://gerrit.libreoffice.org/552
Reviewed-by: Miklos Vajna vmik...@suse.cz
Tested-by: Miklos Vajna vmik...@suse.cz

diff --git a/svtools/source/table/gridtablerenderer.cxx 
b/svtools/source/table/gridtablerenderer.cxx
index 8e227b6..8196a8b 100644
--- a/svtools/source/table/gridtablerenderer.cxx
+++ b/svtools/source/table/gridtablerenderer.cxx
@@ -170,7 +170,9 @@ namespace svt { namespace table
 }
 
 sal_uLong nHorzFlag = TEXT_DRAW_LEFT;
-HorizontalAlignment const eHorzAlign = 
i_impl.rModel.getColumnModel( i_columnPos )-getHorizontalAlign();
+HorizontalAlignment const eHorzAlign = 
i_impl.rModel.getColumnCount()  0
+?  
i_impl.rModel.getColumnModel( i_columnPos )-getHorizontalAlign()
+:  HorizontalAlignment_CENTER;
 switch ( eHorzAlign )
 {
 case HorizontalAlignment_CENTER:nHorzFlag = TEXT_DRAW_CENTER;  
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-09-14 Thread Libreoffice Gerrit user
 svtools/source/table/tablecontrol_impl.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5deceabaa6859e136c1954f56556ee5d0cd599f8
Author: Norbert Thiebaud nthieb...@gmail.com
Date:   Mon Sep 3 19:20:28 2012 -0500

gridfixes: impl_ni_calculateColumnWidths: re-calculate the proper values

for distributePixel/takeAwayPixel before finally using it to correct
the rounding errors

Change-Id: I6f3b178400db0696df0289331be94d69f1d4f0d2
Reviewed-on: https://gerrit.libreoffice.org/555
Reviewed-by: Miklos Vajna vmik...@suse.cz
Tested-by: Miklos Vajna vmik...@suse.cz

diff --git a/svtools/source/table/tablecontrol_impl.cxx 
b/svtools/source/table/tablecontrol_impl.cxx
index 17bf771..26ee5d0 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -1069,6 +1069,7 @@ namespace svt { namespace table
 while ( startOver );
 
 // are there pixels left (might be caused by rounding errors)?
+distributePixel = gridWidthPixel - ::std::accumulate( 
o_newColWidthsPixel.begin(), o_newColWidthsPixel.end(), 0 );
 while ( ( distributePixel  0 )  ( flexibleColumnCount  0 ) 
)
 {
 // yes = ignore relative flexibilities, and subsequently 
distribute single pixels to all flexible
@@ -1143,6 +1144,7 @@ namespace svt { namespace table
 while ( startOver );
 
 // are there pixels left (might be caused by rounding errors)?
+takeAwayPixel = ::std::accumulate( 
o_newColWidthsPixel.begin(), o_newColWidthsPixel.end(), 0 ) - gridWidthPixel;
 while ( ( takeAwayPixel  0 )  ( flexibleColumnCount  0 ) )
 {
 // yes = ignore relative flexibilities, and subsequently 
take away pixels from all flexible
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-09-14 Thread Libreoffice Gerrit user
 svtools/source/table/tablecontrol_impl.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 906cce25456604d1eeac723c3862168797ab8f48
Author: Norbert Thiebaud nthieb...@gmail.com
Date:   Mon Sep 3 19:27:48 2012 -0500

gridfixes: impl_getColumnForOrdinate:no need to subs m_nRowHeaderWidthPixel

m_aColumnWidths already contains it

Change-Id: I404c58fb0b32db7b7b7bf60be997f81709908ceb
Reviewed-on: https://gerrit.libreoffice.org/556
Reviewed-by: Miklos Vajna vmik...@suse.cz
Tested-by: Miklos Vajna vmik...@suse.cz

diff --git a/svtools/source/table/tablecontrol_impl.cxx 
b/svtools/source/table/tablecontrol_impl.cxx
index 26ee5d0..da7adb4 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -2491,18 +2491,16 @@ namespace svt { namespace table
 if ( i_ordinate  m_nRowHeaderWidthPixel )
 return COL_ROW_HEADERS;
 
-long const ordinate = i_ordinate - m_nRowHeaderWidthPixel;
-
 ColumnPositions::const_iterator lowerBound = ::std::lower_bound(
 m_aColumnWidths.begin(),
 m_aColumnWidths.end(),
-MutableColumnMetrics(ordinate+1, ordinate+1),
+MutableColumnMetrics(i_ordinate+1, i_ordinate+1),
 ColumnInfoPositionLess()
 );
 if ( lowerBound == m_aColumnWidths.end() )
 {
 // point is *behind* the start of the last column ...
-if ( ordinate  m_aColumnWidths.rbegin()-getEnd() )
+if ( i_ordinate  m_aColumnWidths.rbegin()-getEnd() )
 // ... but still before its end
 return m_nColumnCount - 1;
 return COL_INVALID;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-09-14 Thread Libreoffice Gerrit user
 svtools/source/toolpanel/drawerlayouter.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6dfd1803a9c6768dfade488d53761ded839af907
Author: Norbert Thiebaud nthieb...@gmail.com
Date:   Mon Aug 20 23:05:07 2012 -0500

gridfixes: use long instead of sal_uInt32, to prevent pb on 64bit platforms

Change-Id: Ib612223a5626d4b525b4e86277c0a5623c0955e8
Reviewed-on: https://gerrit.libreoffice.org/540
Reviewed-by: Miklos Vajna vmik...@suse.cz
Tested-by: Miklos Vajna vmik...@suse.cz

diff --git a/svtools/source/toolpanel/drawerlayouter.cxx 
b/svtools/source/toolpanel/drawerlayouter.cxx
index ea46fae..bb7cb45 100644
--- a/svtools/source/toolpanel/drawerlayouter.cxx
+++ b/svtools/source/toolpanel/drawerlayouter.cxx
@@ -87,7 +87,7 @@ namespace svt
 const size_t nUpperBound = !!aActivePanel ? *aActivePanel : 
nPanelCount - 1;
 for ( size_t i=0; i=nUpperBound; ++i )
 {
-long nDrawerHeight = m_aDrawers[i]-GetPreferredHeightPixel();
+long const nDrawerHeight = 
m_aDrawers[i]-GetPreferredHeightPixel();
 m_aDrawers[i]-SetPosSizePixel(
 aUpperDrawerPos, Size( nWidth, nDrawerHeight ) );
 aUpperDrawerPos.Move( 0, nDrawerHeight );
@@ -97,7 +97,7 @@ namespace svt
 Point aLowerDrawerPos( i_rDeckPlayground.BottomLeft() );
 for ( size_t j = nPanelCount - 1; j  nUpperBound; --j )
 {
-long nDrawerHeight = m_aDrawers[j]-GetPreferredHeightPixel();
+long const nDrawerHeight = 
m_aDrawers[j]-GetPreferredHeightPixel();
 m_aDrawers[j]-SetPosSizePixel(
 Point( aLowerDrawerPos.X(), aLowerDrawerPos.Y() - 
nDrawerHeight + 1 ),
 Size( nWidth, nDrawerHeight )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-09-14 Thread Libreoffice Gerrit user
 svtools/source/table/tablecontrol.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 19e1c3add521959f3c75dee9fe8243d1a1555be6
Author: Frank Schoenheit [fs] frank.schoenh...@oracle.com
Date:   Fri Mar 4 11:56:45 2011 +0100

gridfixes: fixed assertion

Change-Id: I89756b173835d0356fee7fbb166d1998bd0415ac
Reviewed-on: https://gerrit.libreoffice.org/533
Reviewed-by: Michael Stahl mst...@redhat.com
Reviewed-by: Miklos Vajna vmik...@suse.cz
Tested-by: Miklos Vajna vmik...@suse.cz

diff --git a/svtools/source/table/tablecontrol.cxx 
b/svtools/source/table/tablecontrol.cxx
index 1726ea2..9451185 100644
--- a/svtools/source/table/tablecontrol.cxx
+++ b/svtools/source/table/tablecontrol.cxx
@@ -222,7 +222,7 @@ namespace svt { namespace table
 void TableControl::SelectRow( RowPos const i_rowIndex, bool const i_select 
)
 {
 ENSURE_OR_RETURN_VOID( ( i_rowIndex = 0 )  ( i_rowIndex  
m_pImpl-getModel()-getRowCount() ),
-TableControl::SelectRow: no control (anymore)! );
+TableControl::SelectRow: invalid row index! );
 
 if ( i_select )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-09-14 Thread Libreoffice Gerrit user
 svtools/source/table/cellvalueconversion.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 04ddb79f5016c09503edcd50de35d40a2789c854
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Sep 14 13:29:08 2012 +0200

fix debug message

It did not compile, and not using the deprecated macro fixes that
as a side-effect.

Change-Id: I97b8cd2ff1a650ec9d38cbf7eeb8780177a7fd7a

diff --git a/svtools/source/table/cellvalueconversion.cxx 
b/svtools/source/table/cellvalueconversion.cxx
index 27c9ed3..677283a 100644
--- a/svtools/source/table/cellvalueconversion.cxx
+++ b/svtools/source/table/cellvalueconversion.cxx
@@ -421,12 +421,7 @@ namespace svt
 }
 else
 {
-#if OSL_DEBUG_LEVEL  0
-::rtl::OStringBuffer message( lcl_getValueNormalizer: 
unsupported type ' );
-message.append( ::rtl::OUStringToOString( sTypeName, 
RTL_TEXTENCODING_ASCII_US ) );
-message.append( '! );
-OSL_ENSURE( false, message.makeStringAndClear() );
-#endif
+SAL_WARN( svtools.table, unsupported type '  
sTypeName  '! );
 }
 io_data.aNormalizers[ sTypeName ] = o_formatter;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source vcl/inc vcl/source

2012-09-02 Thread Libreoffice Gerrit user
 svtools/source/graphic/grfmgr2.cxx |  726 ++---
 vcl/inc/vcl/bitmap.hxx |   18 
 vcl/inc/vcl/bitmapex.hxx   |5 
 vcl/source/gdi/bitmap3.cxx |  233 ---
 vcl/source/gdi/bitmapex.cxx|   56 --
 5 files changed, 613 insertions(+), 425 deletions(-)

New commits:
commit 4b161067d46ddd48b4602ccdcc4d1b2545e2ac83
Author: Tomaž Vajngerl qui...@gmail.com
Date:   Sun Sep 2 17:23:03 2012 +0200

Stepwise rebuild bitmap rendering from scratch to avoid rendering bugs.

Bitmap rendering was rebuild from the original state and checked for
rendering bugs at every change. Currently the implementation supports
scaling by averagin for RGB channels an for alpha channel in some
cases. For scaling factor  0.6, the original bilinear scaling is
used. Implementation is currently still in outdev2 but is decoupled
and will be moved to its proper place into bitmap and bitmapex.

Change-Id: I6feb744712956a92d6140d079dc3a85ee8511930

diff --git a/svtools/source/graphic/grfmgr2.cxx 
b/svtools/source/graphic/grfmgr2.cxx
index 2cc7ae3..299f883 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -46,6 +46,7 @@
 
 #define WATERMARK_LUM_OFFSET50
 #define WATERMARK_CON_OFFSET-70
+#define MAP( cVal0, cVal1, nFrac )  
((sal_uInt8)long)(cVal0)20L)+nFrac*((long)(cVal1)-(cVal0)))20L))
 
 // --
 // - GraphicManager -
@@ -264,172 +265,659 @@ sal_Bool GraphicManager::ImplDraw( OutputDevice* pOut, 
const Point rPt,
 return bRet;
 }
 
-sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice,
-   const Point rPoint, const Size rSize,
-   const BitmapEx rBitmapEx, const 
GraphicAttr rAttributes,
-   const sal_uLong nFlags, BitmapEx* 
pResultBitmapEx )
+sal_Bool ImplCreateRotatedScaled( const BitmapEx rBmpEx, const GraphicAttr 
rAttributes,
+sal_uInt16 nRot10, const Size rUnrotatedSzPix,
+long nStartX, long nEndX, long nStartY, long 
nEndY,
+BitmapEx rOutBmpEx )
 {
-boolbRet = false;
+const long  aUnrotatedWidth  = rUnrotatedSzPix.Width();
+const long  aUnrotatedHeight = rUnrotatedSzPix.Height();
+const long  aBitmapWidth  = rBmpEx.GetSizePixel().Width();
+const long  aBitmapHeight = rBmpEx.GetSizePixel().Height();
 
-Point   aUnrotatedPointInPixels( pOutputDevice-LogicToPixel( rPoint ) 
);
-SizeaUnrotatedSizeInPixels(  pOutputDevice-LogicToPixel( rSize ) 
);
+longnX, nY, nTmpX, nTmpY, nTmpFX, nTmpFY, nTmp;
+double  fTmp;
 
-if( aUnrotatedSizeInPixels.Width() = 0  || 
aUnrotatedSizeInPixels.Height() = 0)
-return false;
+boolbHMirr = ( rAttributes.GetMirrorFlags()  BMP_MIRROR_HORZ ) != 0;
+boolbVMirr = ( rAttributes.GetMirrorFlags()  BMP_MIRROR_VERT ) != 0;
+
+long*   pMapIX = new long[ aUnrotatedWidth ];
+long*   pMapFX = new long[ aUnrotatedWidth ];
+long*   pMapIY = new long[ aUnrotatedHeight ];
+long*   pMapFY = new long[ aUnrotatedHeight ];
+
+const double fScaleX = ( aUnrotatedWidth  - 1 ) / (double) ( aBitmapWidth  
- 1 );
+const double fScaleY = ( aUnrotatedHeight - 1 ) / (double) ( aBitmapHeight 
- 1 );
 
-Point   aOutPointInPixels;
-SizeaOutSizeInPixels;
-BitmapExaBitmapEx( rBitmapEx );
-int nRotation = rAttributes.GetRotation() % 3600;
+const double fRevScaleX = 1.0 / fScaleX;
+const double fRevScaleY = 1.0 / fScaleY;
 
-if( nRotation != 0 )
+int x,y;
+
+// create horizontal mapping table
+for( x = 0, nTmpX = aBitmapWidth - 1L, nTmp = aBitmapWidth - 2L; x  
aUnrotatedWidth; x++ )
 {
-Polygon aPoly( Rectangle( rPoint, rSize ) );
-aPoly.Rotate( rPoint, nRotation );
-const Rectangle aRotationBoundRect( aPoly.GetBoundRect() );
-aOutPointInPixels = pOutputDevice-LogicToPixel( 
aRotationBoundRect.TopLeft() );
-aOutSizeInPixels  = pOutputDevice-LogicToPixel( 
aRotationBoundRect.GetSize() );
+fTmp = x * fRevScaleX;
+
+if( bHMirr )
+fTmp = nTmpX - fTmp;
+
+pMapIX[ x ] = MinMax( fTmp, 0, nTmp );
+pMapFX[ x ] = (long) ( ( fTmp - pMapIX[ x ] ) * 1048576.0 );
 }
-else
+
+// create vertical mapping table
+for( y = 0, nTmpY = aBitmapHeight - 1L, nTmp = aBitmapHeight - 2L; y  
aUnrotatedHeight; y++ )
 {
-aOutPointInPixels = aUnrotatedPointInPixels;
-aOutSizeInPixels  = aUnrotatedSizeInPixels;
+fTmp = y * fRevScaleY;
+
+if( bVMirr )
+fTmp = nTmpY - fTmp;
+
+pMapIY[ y ] = MinMax( fTmp, 0, nTmp );
+pMapFY[ y ] = (long) ( ( fTmp - pMapIY[ y ] ) * 1048576.0 );
 }
 
-Point   aOutPoint;
-Size

[Libreoffice-commits] .: svtools/source

2012-08-23 Thread Libreoffice Gerrit user
 svtools/source/misc/langtab.src |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 51b0ada7403b7959cd0753218bff34b7cd4a7a24
Author: Andras Timar ati...@suse.com
Date:   Thu Aug 23 15:36:27 2012 +0200

Moldovan - Romanian (Moldova)

Change-Id: I5d754099ca0ce2a82d1d89df4ab2b146b1cc2f4e

diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src
index bf44bbc..12a8deb 100644
--- a/svtools/source/misc/langtab.src
+++ b/svtools/source/misc/langtab.src
@@ -144,7 +144,6 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE
  Malayalam ; LANGUAGE_MALAYALAM ;  ;
  Manipuri ; LANGUAGE_MANIPURI ;  ;
  Marathi ; LANGUAGE_MARATHI ;  ;
- Moldovan ; LANGUAGE_ROMANIAN_MOLDOVA ;  ;
  Nepali (Nepal) ; LANGUAGE_NEPALI ;  ;
  Nepali (India) ; LANGUAGE_NEPALI_INDIA ;  ;
  Norwegian, Bokmål ; LANGUAGE_NORWEGIAN_BOKMAL ;  ;
@@ -156,7 +155,8 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE
  Portuguese (Brazil) ; LANGUAGE_PORTUGUESE_BRAZILIAN ;  ;
  Punjabi ; LANGUAGE_PUNJABI ;  ;
  Rhaeto-Romance ; LANGUAGE_RHAETO_ROMAN ;  ;
- Romanian ; LANGUAGE_ROMANIAN ;  ;
+ Romanian (Romania) ; LANGUAGE_ROMANIAN ;  ;
+ Romanian (Moldova) ; LANGUAGE_ROMANIAN_MOLDOVA ;  ;
  Russian ; LANGUAGE_RUSSIAN ;  ;
  Sanskrit ; LANGUAGE_SANSKRIT ;  ;
  Serbian Cyrillic (Serbia and Montenegro) ; 
LANGUAGE_SERBIAN_CYRILLIC ;  ;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-08-22 Thread Libreoffice Gerrit user
 svtools/source/misc/langtab.src |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 055751056187b2e15a7bfee84000c86b91c75d1e
Author: Andras Timar ati...@suse.com
Date:   Wed Aug 22 21:31:07 2012 +0200

fdo#51911 add Moldovan (ro-MD) to language selection list

Change-Id: I916097048b6c8767745bcdd56430d5d2cc832e71

diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src
index f67f9de..bf44bbc 100644
--- a/svtools/source/misc/langtab.src
+++ b/svtools/source/misc/langtab.src
@@ -144,6 +144,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE
  Malayalam ; LANGUAGE_MALAYALAM ;  ;
  Manipuri ; LANGUAGE_MANIPURI ;  ;
  Marathi ; LANGUAGE_MARATHI ;  ;
+ Moldovan ; LANGUAGE_ROMANIAN_MOLDOVA ;  ;
  Nepali (Nepal) ; LANGUAGE_NEPALI ;  ;
  Nepali (India) ; LANGUAGE_NEPALI_INDIA ;  ;
  Norwegian, Bokmål ; LANGUAGE_NORWEGIAN_BOKMAL ;  ;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source vcl/inc vcl/source

2012-08-14 Thread Tomaž Vajngerl
 svtools/source/graphic/grfmgr2.cxx |   60 +--
 vcl/inc/vcl/alpha.hxx  |  187 ++---
 vcl/source/gdi/alpha.cxx   |   57 ++-
 vcl/source/gdi/bitmap3.cxx |6 -
 vcl/source/gdi/bitmapex.cxx|   53 ++
 5 files changed, 191 insertions(+), 172 deletions(-)

New commits:
commit 42801a0e690a63c3a94b1d8256b6c7cd64856bd2
Author: Tomaž Vajngerl qui...@gmail.com
Date:   Tue Aug 14 20:39:14 2012 +0200

Fix transparent bitmap rendering.

Convert transparent mask to 8bit-grey after scale/rotate/crop
transformation. Use correct perspective at rendering.

Change-Id: I80b19d7bec880b0c58709c7c5bee6199cbc815c9

diff --git a/svtools/source/graphic/grfmgr2.cxx 
b/svtools/source/graphic/grfmgr2.cxx
index dc6c3c7..f738998 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -270,43 +270,43 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* 
pOutputDevice,
const sal_uLong nFlags, BitmapEx* 
pResultBitmapEx )
 {
 boolbRet = false;
-Point   aOutPointInPixels;
-SizeaOutSizeInPixels;
-int nRotation = rAttributes.GetRotation() % 3600;
 
 Point   aUnrotatedPointInPixels( pOutputDevice-LogicToPixel( rPoint ) 
);
 SizeaUnrotatedSizeInPixels(  pOutputDevice-LogicToPixel( rSize ) 
);
 
-BitmapExaBitmapEx( rBitmapEx );
-
-if( !aUnrotatedSizeInPixels.Width() || !aUnrotatedSizeInPixels.Height() )
+if( aUnrotatedSizeInPixels.Width() = 0  || 
aUnrotatedSizeInPixels.Height() = 0)
 return false;
 
-if( nRotation )
+Point   aOutPointInPixels;
+SizeaOutSizeInPixels;
+BitmapExaBitmapEx( rBitmapEx );
+int nRotation = rAttributes.GetRotation() % 3600;
+
+if( nRotation != 0 )
 {
 Polygon aPoly( Rectangle( rPoint, rSize ) );
 aPoly.Rotate( rPoint, nRotation );
 const Rectangle aRotationBoundRect( aPoly.GetBoundRect() );
 aOutPointInPixels = pOutputDevice-LogicToPixel( 
aRotationBoundRect.TopLeft() );
-aOutSizeInPixels = pOutputDevice-LogicToPixel( 
aRotationBoundRect.GetSize() );
+aOutSizeInPixels  = pOutputDevice-LogicToPixel( 
aRotationBoundRect.GetSize() );
 }
 else
 {
 aOutPointInPixels = aUnrotatedPointInPixels;
-aOutSizeInPixels = aUnrotatedSizeInPixels;
+aOutSizeInPixels  = aUnrotatedSizeInPixels;
 }
 
 Point   aOutPoint;
 SizeaOutSize;
 
 const Size rBitmapSizePixels = rBitmapEx.GetSizePixel();
-Rectangle   aCropRectangle(-1, -1, -1, -1);
+Rectangle   aCropRectangle(0, 0, 0, 0);
+
 boolisHorizontalMirrored = ( rAttributes.GetMirrorFlags()  
BMP_MIRROR_HORZ ) != 0;
 boolisVerticalMirrored   = ( rAttributes.GetMirrorFlags()  
BMP_MIRROR_VERT ) != 0;
 
-
 // calculate output sizes
-if( !pResultBitmapEx )
+if( true || !pResultBitmapEx )
 {
 Rectangle aBitmapRectangle( aOutPointInPixels, aOutSizeInPixels );
 Rectangle aOutRect( Point(), pOutputDevice-GetOutputSizePixel() );
@@ -316,9 +316,7 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* 
pOutputDevice,
 const Region aPaintRegion( ( (Window*) pOutputDevice 
)-GetPaintRegion() );
 
 if( !aPaintRegion.IsNull() )
-{
 aOutRect.Intersection( pOutputDevice-LogicToPixel( 
aPaintRegion.GetBoundRect() ) );
-}
 }
 aOutRect.Intersection( aBitmapRectangle );
 
@@ -346,31 +344,28 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* 
pOutputDevice,
 }
 
 
-if( aCropRectangle.GetWidth() = 0  aCropRectangle.GetHeight() = 0)
+if( aCropRectangle.GetWidth() = 0  aCropRectangle.GetHeight() = 0 )
 return false;
 
 // do transformation
-
 if( !isHorizontalMirrored 
 !isVerticalMirrored 
 !nRotation 
 aOutSizeInPixels == rBitmapSizePixels)
 {
+// simple copy thorugh
 aOutPoint = pOutputDevice-PixelToLogic( aOutPointInPixels );
 aOutSize = pOutputDevice-PixelToLogic( aOutSizeInPixels );
 bRet = true;
 }
 else
 {
-// calculate scaling factors
-double fScaleX = aUnrotatedSizeInPixels.Width()  / (double) 
rBitmapSizePixels.Width();
-double fScaleY = aUnrotatedSizeInPixels.Height() / (double) 
rBitmapSizePixels.Height();
-
 // mirror the image - this should not impact the picture dimenstions
 if( isHorizontalMirrored || isVerticalMirrored )
 bRet = aBitmapEx.Mirror( rAttributes.GetMirrorFlags() );
 
-if (nRotation)
+// prepare rotation if needed
+if (nRotation != 0)
 {
 Polygon aPoly( Rectangle( Point(), aUnrotatedSizeInPixels) );
 aPoly.Rotate( Point(), nRotation );
@@ -382,7 +377,12 @@ sal_Bool 

[Libreoffice-commits] .: svtools/source

2012-08-13 Thread Ivan Timofeev
 svtools/source/control/ruler.cxx |   12 
 1 file changed, 12 deletions(-)

New commits:
commit 7fbab3fc351212cd8474159391bc744cee2d7e68
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Aug 13 17:25:32 2012 +0400

remove duplicate code, thanks to Petr Mladek for spotting

Change-Id: I136dc9e314197ac100f1f0d12d1f485dc659af9f

diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index d7f4e79..7e17e6d 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -2120,18 +2120,6 @@ void Ruler::Resize()
 mbCalc = sal_True;
 }
 
-// Wenn Ruler eine Groesse hat, dann Groesse vom VirtualDevice setzen
-if ( (mnVirWidth  RULER_MIN_SIZE) ||
- ((aWinSize.Width()  RULER_MIN_SIZE)  (aWinSize.Height()  
RULER_MIN_SIZE)) )
-{
-if ( mnWinStyle  WB_HORZ )
-mnVirWidth = aWinSize.Width()-mnVirOff;
-else
-mnVirWidth = aWinSize.Height()-mnVirOff;
-if ( mnVirWidth  RULER_MIN_SIZE )
-mnVirWidth = 0;
-}
-
 // Gegebenenfalls ein Teil vom Rand loeschen, da 3D-Effekt/Trennlinie am
 // Fensterrand
 if ( bVisible )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-08-09 Thread Caolán McNamara
 svtools/source/filter/wmf/winwmf.cxx |   67 +++
 1 file changed, 61 insertions(+), 6 deletions(-)

New commits:
commit 919632bd5e6ab0e7fab1fccb588e9535df64c75d
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Aug 8 21:39:50 2012 +0100

validate polypolygon point counts

Change-Id: Ibf6bdf48e5855583f14cd2be36f1e4896a396d32

diff --git a/svtools/source/filter/wmf/winwmf.cxx 
b/svtools/source/filter/wmf/winwmf.cxx
index abcc09b..e2c7421 100644
--- a/svtools/source/filter/wmf/winwmf.cxx
+++ b/svtools/source/filter/wmf/winwmf.cxx
@@ -28,6 +28,7 @@
 
 
 #include winmtf.hxx
+#include boost/scoped_array.hpp
 #include vcl/gdimtf.hxx
 #include svtools/wmf.hxx
 #include rtl/crc.h
@@ -354,28 +355,55 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
 
 case W_META_POLYPOLYGON:
 {
+bool bRecordOk = true;
 sal_uInt16  nPoly = 0;
 Point*  pPtAry;
 // Number of polygons:
 *pWMF  nPoly;
 // Number of points of each polygon. Determine total number of 
points
-sal_uInt16* pnPoints = new sal_uInt16[ nPoly ];
+boost::scoped_arraysal_uInt16 xPolygonPointCounts(new 
sal_uInt16[nPoly]);
+sal_uInt16* pnPoints = xPolygonPointCounts.get();
 sal_uInt16 nPoints = 0;
 for(sal_uInt16 i = 0; i  nPoly; i++ )
 {
 *pWMF  pnPoints[i];
+
+if (pnPoints[i]  SAL_MAX_UINT16 - nPoints)
+{
+bRecordOk = false;
+break;
+}
+
 nPoints += pnPoints[i];
 }
+
+SAL_WARN_IF(!bRecordOk, svtools, polypolygon record has more 
polygons that we can handle);
+
+bRecordOk = pWMF-good();
+
+if (!bRecordOk)
+{
+pWMF-SetError( SVSTREAM_FILEFORMAT_ERROR );
+break;
+}
+
 // Polygon points are:
-pPtAry  = new Point[nPoints];
+boost::scoped_arrayPoint xPolygonPoints(new Point[nPoints]);
+pPtAry = xPolygonPoints.get();
 for (sal_uInt16 i = 0; i  nPoints; i++ )
 pPtAry[ i ] = ReadPoint();
 
+bRecordOk = pWMF-good();
+
+if (!bRecordOk)
+{
+pWMF-SetError( SVSTREAM_FILEFORMAT_ERROR );
+break;
+}
+
 // Produce PolyPolygon Actions
 PolyPolygon aPolyPoly( nPoly, pnPoints, pPtAry );
 pOut-DrawPolyPolygon( aPolyPoly );
-delete[] pPtAry;
-delete[] pnPoints;
 }
 break;
 
@@ -1329,16 +1357,43 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle 
rPlaceableBound, SvStream* pSt
 
 case W_META_POLYPOLYGON:
 {
+bool bRecordOk = true;
 sal_uInt16 nPoly, nPoints = 0;
 *pStm  nPoly;
 for(sal_uInt16 i = 0; i  nPoly; i++ )
 {
-sal_uInt16 nP;
+sal_uInt16 nP = 0;
 *pStm  nP;
-nPoints = nPoints + nP;
+if (nP  SAL_MAX_UINT16 - nPoints)
+{
+bRecordOk = false;
+break;
+}
+nPoints += nP;
 }
+
+SAL_WARN_IF(!bRecordOk, svtools, polypolygon record has 
more polygons that we can handle);
+
+bRecordOk = pStm-good();
+
+if (!bRecordOk)
+{
+pStm-SetError( SVSTREAM_FILEFORMAT_ERROR );
+bRet = sal_False;
+break;
+}
+
 for (sal_uInt16 i = 0; i  nPoints; i++ )
 GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode );
+
+bRecordOk = pStm-good();
+
+if (!bRecordOk)
+{
+pStm-SetError( SVSTREAM_FILEFORMAT_ERROR );
+bRet = sal_False;
+break;
+}
 }
 break;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-08-08 Thread Ivan Timofeev
 svtools/source/control/ruler.cxx |   16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

New commits:
commit 84d5e639b08a1f96b41b7b5b6af51c703b0cd620
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Aug 8 16:46:19 2012 +0400

fdo#50654: update virtual device width on modifying WB_EXTRAFIELD flag

Writer sets this flag dynamically via Ruler::SetStyle depending on
the text direction, the flag is set by default and gets unset for the
vertical ruler, because the initial text direction is horizontal,
see SwView::StateTabWin.

Ruler::SetStyle calls Ruler::ImplInitExtraField, which modifies mnVirOff,
however mnVirWidth depends on mnVirOff, but gets updated only in Resize.

This patch copies the code from Resize to ImplInitExtraField, we cannot
just call Resize from ImplInitExtraField due to possible infinite recursion.

Change-Id: Ic7bb897059295aebe86c11977c37419017b55787

diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index a422eb5..d7f4e79 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -1204,6 +1204,8 @@ void Ruler::ImplFormat()
 
 void Ruler::ImplInitExtraField( sal_Bool bUpdate )
 {
+Size aWinSize = GetOutputSizePixel();
+
 // Extra-Field beruecksichtigen
 if ( mnWinStyle  WB_EXTRAFIELD )
 {
@@ -1213,7 +1215,6 @@ void Ruler::ImplInitExtraField( sal_Bool bUpdate )
 maExtraRect.Bottom() = RULER_OFF+mnVirHeight-1;
 if(mpData-bTextRTL)
 {
-Size aWinSize = GetOutputSizePixel();
 if(mnWinStyle  WB_HORZ)
 maExtraRect.Move(aWinSize.Width() - maExtraRect.GetWidth() - 
maExtraRect.Left(), 0);
 else
@@ -1230,6 +1231,19 @@ void Ruler::ImplInitExtraField( sal_Bool bUpdate )
 mnVirOff = 0;
 }
 
+// mnVirWidth depends on mnVirOff
+if ( (mnVirWidth  RULER_MIN_SIZE) ||
+ ((aWinSize.Width()  RULER_MIN_SIZE)  (aWinSize.Height()  
RULER_MIN_SIZE)) )
+{
+if ( mnWinStyle  WB_HORZ )
+mnVirWidth = aWinSize.Width()-mnVirOff;
+else
+mnVirWidth = aWinSize.Height()-mnVirOff;
+
+if ( mnVirWidth  RULER_MIN_SIZE )
+mnVirWidth = 0;
+}
+
 if ( bUpdate )
 {
 mbCalc  = sal_True;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source unusedcode.easy

2012-08-02 Thread Caolán McNamara
 svtools/source/misc/itemdel.cxx |   18 --
 unusedcode.easy |1 -
 2 files changed, 19 deletions(-)

New commits:
commit 7480f766e95368fb1418dcfd9470f73b5ef3440e
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Aug 2 09:07:47 2012 +0100

remove now pointless pItemDesruptList

This pItemDesruptList is pointless now. We're registering the 
delete-when-idle
items in their ctor's and deregistering in their dtor's which get called 
from
the idle callback. The idea of pItemDesruptList appears to be for use in
deleting any items at exit time whose idle callback didn't get called 
already.

Which was done by DeleteOnIdleItems which itself was removed a while ago
because nothing was calling it (for years). Some experiments in making it a
simple singleton and/or one that hooks off default component dispose or
XDesktop dispose shows that its crash city, so lets just remove the unused
stuff outright rather than trying to fight to get some 12+ year unused 
appendix
used.

Change-Id: Ie0256d6987cf89a2a12db297065af09674547b3e

diff --git a/svtools/source/misc/itemdel.cxx b/svtools/source/misc/itemdel.cxx
index 5d4daca..f620a7e 100644
--- a/svtools/source/misc/itemdel.cxx
+++ b/svtools/source/misc/itemdel.cxx
@@ -55,10 +55,6 @@ public:
  ~SfxItemDesruptor_Impl();
 };
 
-typedef std::vectorSfxItemDesruptor_Impl* SfxItemDesruptorList_Impl;
-
-static SfxItemDesruptorList_Impl *pItemDesruptList = NULL;
-
 // 
 SfxItemDesruptor_Impl::SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt ):
 pItem(pItemToDesrupt),
@@ -71,13 +67,6 @@ SfxItemDesruptor_Impl::SfxItemDesruptor_Impl( SfxPoolItem 
*pItemToDesrupt ):
 
 // im Idle abarbeiten
 GetpApp()-InsertIdleHdl( aLink, 1 );
-
-// und in Liste eintragen (damit geflusht werden kann)
-SfxItemDesruptorList_Impl* rpList = pItemDesruptList;
-if ( !rpList )
-rpList = new SfxItemDesruptorList_Impl;
-SfxItemDesruptor_Impl *pThis = this;
-rpList-push_back( pThis );
 }
 
 // 
@@ -88,13 +77,6 @@ SfxItemDesruptor_Impl::~SfxItemDesruptor_Impl()
 // aus Idle-Handler austragen
 GetpApp()-RemoveIdleHdl( aLink );
 
-// und aus Liste austragen
-SfxItemDesruptorList_Impl* rpList = pItemDesruptList;
-DBG_ASSERT( rpList, no DesruptorList );
-const SfxItemDesruptor_Impl *pThis = this;
-if ( rpList ) HACK(warum?)
-rpList-erase( std::find( rpList-begin(), rpList-end(), pThis ) );
-
 // reset RefCount (was set to SFX_ITEMS_SPECIAL before!)
 pItem-SetRefCount( 0 );
 //DBG_CHKOBJ( pItem, SfxPoolItem, 0 );
diff --git a/unusedcode.easy b/unusedcode.easy
index 25f2c4d..74d4aa0 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -139,5 +139,4 @@ sd::LeftImpressPaneShell::RegisterInterface(SfxModule*)
 sd::ToolPanelPaneShell::RegisterInterface(SfxModule*)
 sd::ViewShellBase::RegisterFactory(unsigned short)
 std::__cxx1998::vectorSfxFilter*, std::allocatorSfxFilter* ::~vector()
-std::__cxx1998::vectorSfxItemDesruptor_Impl*, 
std::allocatorSfxItemDesruptor_Impl* ::~vector()
 std::__cxx1998::vectorstd::pairstd::basic_stringchar, 
std::char_traitschar, std::allocatorchar , std::basic_stringchar, 
std::char_traitschar, std::allocatorchar  , 
std::allocatorstd::pairstd::basic_stringchar, std::char_traitschar, 
std::allocatorchar , std::basic_stringchar, std::char_traitschar, 
std::allocatorchar::~vector()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-07-25 Thread Noel Power
 svtools/source/edit/textview.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit f5a625f61a4f0209a4ec74b919241593a56b5500
Author: Uray M. János uray.ja...@gmail.com
Date:   Wed Jul 25 09:42:12 2012 +0200

fdo#40152 replace with empty string in Basic IDE

Change-Id: I2ee41160e5cb10694ccdb5a1cdaf7d4abfeb23bb

diff --git a/svtools/source/edit/textview.cxx b/svtools/source/edit/textview.cxx
index e03ef2e..481572b 100644
--- a/svtools/source/edit/textview.cxx
+++ b/svtools/source/edit/textview.cxx
@@ -1367,7 +1367,7 @@ void TextView::InsertNewText( const rtl::OUString rStr, 
sal_Bool bSelect )
 */
 sal_Int32 nLen = rStr.getLength();
 sal_Int32 nPos = 0;
-while( nLen )
+do
 {
 sal_Int32 nChunkLen = nLen  65534 ? 65534 : nLen;
 String aChunk( rStr.copy( nPos, nChunkLen ) );
@@ -1390,6 +1390,8 @@ void TextView::InsertNewText( const rtl::OUString rStr, 
sal_Bool bSelect )
 nLen -= nChunkLen;
 nPos += nChunkLen;
 }
+while( nLen );
+
 mpImpl-mpTextEngine-UndoActionEnd();
 
 mpImpl-mpTextEngine-FormatAndUpdate( this );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source vcl/inc vcl/source

2012-07-25 Thread Tomaž Vajngerl
 svtools/source/graphic/grfmgr2.cxx |   41 ---
 vcl/inc/vcl/bitmapex.hxx   |2 
 vcl/source/gdi/bitmap3.cxx |  191 ++---
 vcl/source/gdi/bitmapex.cxx|   15 +-
 4 files changed, 47 insertions(+), 202 deletions(-)

New commits:
commit 085e747b6ca4148b35f37daf622a5ee79710cd66
Author: Tomaž Vajngerl qui...@gmail.com
Date:   Wed Jul 25 23:50:33 2012 +0200

Fix bitmap resizing issue when using ScaleRotateCrop with BitmapEx.

Change-Id: I1fd08d94c506580ed7557066448ccb10adb9b16d

diff --git a/svtools/source/graphic/grfmgr2.cxx 
b/svtools/source/graphic/grfmgr2.cxx
index f3b6a07..dc6c3c7 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -304,11 +304,11 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* 
pOutputDevice,
 boolisHorizontalMirrored = ( rAttributes.GetMirrorFlags()  
BMP_MIRROR_HORZ ) != 0;
 boolisVerticalMirrored   = ( rAttributes.GetMirrorFlags()  
BMP_MIRROR_VERT ) != 0;
 
-Rectangle   aBitmapRectangle( aOutPointInPixels, aOutSizeInPixels );
 
 // calculate output sizes
 if( !pResultBitmapEx )
 {
+Rectangle aBitmapRectangle( aOutPointInPixels, aOutSizeInPixels );
 Rectangle aOutRect( Point(), pOutputDevice-GetOutputSizePixel() );
 
 if( pOutputDevice-GetOutDevType() == OUTDEV_WINDOW )
@@ -332,7 +332,6 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* 
pOutputDevice,
 aOutRect.Top()- aBitmapRectangle.Top(),
 aOutRect.Right()  - aBitmapRectangle.Left(),
 aOutRect.Bottom() - aBitmapRectangle.Top() );
-
 }
 }
 else
@@ -352,14 +351,11 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* 
pOutputDevice,
 
 // do transformation
 
-// #105229# Don't scale if output size equals bitmap size
-// #107226# Copy through only if we're not mirroring
 if( !isHorizontalMirrored 
 !isVerticalMirrored 
-aOutSizeInPixels == rBitmapSizePixels 
-!nRotation)
+!nRotation 
+aOutSizeInPixels == rBitmapSizePixels)
 {
-// #107226# Use original dimensions when just copying through
 aOutPoint = pOutputDevice-PixelToLogic( aOutPointInPixels );
 aOutSize = pOutputDevice-PixelToLogic( aOutSizeInPixels );
 bRet = true;
@@ -374,20 +370,33 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* 
pOutputDevice,
 if( isHorizontalMirrored || isVerticalMirrored )
 bRet = aBitmapEx.Mirror( rAttributes.GetMirrorFlags() );
 
-// depending on the flags, scale the image to the desired proportions
-// use FAST scale if no smooth scale is desired
-if( nFlags  GRFMGR_DRAW_SMOOTHSCALE)
+if (nRotation)
 {
 Polygon aPoly( Rectangle( Point(), aUnrotatedSizeInPixels) );
 aPoly.Rotate( Point(), nRotation );
 Rectangle aNewBound( aPoly.GetBoundRect() );
-Rectangle aCropRectangle2 (
-aCropRectangle.Left() + aNewBound.Left(),
-aCropRectangle.Top() + aNewBound.Top(),
-aCropRectangle.Right() + aNewBound.Left(),
-aCropRectangle.Bottom() + aNewBound.Top());
 
-bRet = aBitmapEx.ScaleCropRotate( fScaleX, fScaleY, 
aCropRectangle2, nRotation, COL_TRANSPARENT );
+aCropRectangle = Rectangle (
+aCropRectangle.Left()   + aNewBound.Left(),
+aCropRectangle.Top()+ aNewBound.Top(),
+aCropRectangle.Right()  + aNewBound.Left(),
+aCropRectangle.Bottom() + aNewBound.Top() );
+}
+if( nFlags  GRFMGR_DRAW_SMOOTHSCALE)
+{
+bRet = aBitmapEx.ScaleCropRotate( fScaleX, fScaleY, 
aCropRectangle, nRotation, COL_TRANSPARENT );
+}
+else
+{
+aCropRectangle = Rectangle (
+aCropRectangle.Left()   / fScaleX,
+aCropRectangle.Right()  / fScaleX,
+aCropRectangle.Top()/ fScaleY,
+aCropRectangle.Bottom() / fScaleY );
+
+bRet = aBitmapEx.Crop( aCropRectangle );
+if (bRet)
+bRet = aBitmapEx.Scale( fScaleX, fScaleY );
 }
 }
 
diff --git a/vcl/inc/vcl/bitmapex.hxx b/vcl/inc/vcl/bitmapex.hxx
index a29c271..437c70a 100644
--- a/vcl/inc/vcl/bitmapex.hxx
+++ b/vcl/inc/vcl/bitmapex.hxx
@@ -60,7 +60,7 @@ private:
 SizeaBitmapSize;
 Color   aTransparentColor;
 TransparentType eTransparent;
-sal_BoolbAlpha;
+sal_BoolbAlpha;
 
 public:
 
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index b1a028c..edae9e1 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ 

[Libreoffice-commits] .: svtools/source

2012-07-24 Thread Michael Stahl
 svtools/source/misc/langtab.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 117fb70532aeae01327bfe0d828ef8a2d4793b85
Author: Michael Stahl mst...@redhat.com
Date:   Tue Jul 24 15:14:53 2012 +0200

fdo#51659: static assertion for STR_ARR_SVT_LANGUAGE_TABLE

Change-Id: I5588198452a609dd541d51ac7a84cd5773949ae7

diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx
index 9168daf..92c91a6 100644
--- a/svtools/source/misc/langtab.cxx
+++ b/svtools/source/misc/langtab.cxx
@@ -26,6 +26,7 @@
  *
  /
 
+#include boost/static_assert.hpp
 
 #include tools/shl.hxx
 
@@ -122,6 +123,12 @@ SVT_DLLPUBLIC const String ApplyLreOrRleEmbedding( const 
String rText )
 
 //
 
+namespace {
+BOOST_STATIC_ASSERT(
+16642 == STR_ARR_SVT_LANGUAGE_TABLE);
+//The value of STR_ARR_SVT_LANGUAGE_TABLE has changed. 
wizards/com/sun/star/wizards/letter/LocaleCodes.java has this value hard coded, 
please adapt it to your change.
+}
+
 SvtLanguageTable::SvtLanguageTable() :
 ResStringArray( SvtResId( STR_ARR_SVT_LANGUAGE_TABLE ) )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-07-24 Thread Lionel Elie Mamane
 svtools/source/brwbox/editbrowsebox.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 9bd5e75b95d7b380f9be95913c949221dc4c0d67
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Jul 24 17:15:55 2012 +0200

forcing repaint has catastrophic performance implications; invalidate only

In Base:
1) Open a big table (hundreds of rows)
2) Only the first 40 to 100 rows are fetched into the cache and shown
   (depending on screen / window size).
3) Move to last row (click on icon ||)
4) The last 40 to 100 rows are fetched into the cache; the data of the
   first 40/100 rows is pushed out of the cache.
5) The first 40 to 100 rows are fetched, just so that the call to
   rWindow.Paint() can do its job, because they are not in the cache
   anymore (!). The last 40/100 rows are pushed out of the cache.
6) The last 40 to 100 rows are fetched into the cache and displayed;
   the first 40/100 rows are pushed out of the cache *again*.

Steps 5 and 6 are obviously *very* stupid.

Change-Id: Ic11b893ea9440c2c5a142bd3c77c95d6730aa723

diff --git a/svtools/source/brwbox/editbrowsebox.cxx 
b/svtools/source/brwbox/editbrowsebox.cxx
index 129b9f4..3560f2d 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -927,8 +927,6 @@ namespace svt
 if (nNewRow != nEditRow)
 {
 Window rWindow = GetDataWindow();
-// don't paint too much
-// update the status immediatly if possible
 if ((nEditRow = 0)  (GetBrowserFlags()  
EBBF_NO_HANDLE_COLUMN_CONTENT) == 0)
 {
 Rectangle aRect = GetFieldRectPixel(nEditRow, 0, sal_False );
@@ -937,7 +935,7 @@ namespace svt
 // probably because it is part of a bitfield
 pTHIS-bPaintStatus = static_cast sal_Bool 
 (( GetBrowserFlags()  EBBF_HANDLE_COLUMN_TEXT ) == 
EBBF_HANDLE_COLUMN_TEXT );
-rWindow.Paint(aRect);
+rWindow.Invalidate(aRect);
 pTHIS-bPaintStatus = sal_True;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-07-24 Thread Lionel Elie Mamane
 svtools/source/brwbox/editbrowsebox.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6faebe5fb2d57110feabecb5202bcb993c92f4bd
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Jul 24 17:59:11 2012 +0200

janitorial: C++-style cast instead of legacy C-style cast

Change-Id: I86cd5d87751c5a9dd31a392e2b3847e8f5741524

diff --git a/svtools/source/brwbox/editbrowsebox.cxx 
b/svtools/source/brwbox/editbrowsebox.cxx
index 3560f2d..598c8a5 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -898,7 +898,7 @@ namespace svt
 return sal_False;
 }
 
-EditBrowseBox * pTHIS = (EditBrowseBox *) this;
+EditBrowseBox * pTHIS = const_castEditBrowseBox * (this);
 
 // save the cell content if
 // a) a selection is beeing made
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-07-19 Thread Stephan Bergmann
 svtools/source/contnr/imivctl2.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c68afc22fe8b1f90033cbe7d328a74daeae18e22
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Jul 19 09:21:51 2012 +0200

Work around Mac GCC error

Change-Id: I7fcd84e923c0971f420cfd3f298e5a1d0b111d1a

diff --git a/svtools/source/contnr/imivctl2.cxx 
b/svtools/source/contnr/imivctl2.cxx
index de19b97..5582403 100644
--- a/svtools/source/contnr/imivctl2.cxx
+++ b/svtools/source/contnr/imivctl2.cxx
@@ -128,7 +128,7 @@ SvxIconChoiceCtrlEntry* 
IcnCursor_Impl::SearchCol(sal_uInt16 nCol, sal_uInt16 nT
 IconChoiceMap::iterator mapIt = pColumns-find( nCol );
 if ( mapIt == pColumns-end() )
 return 0;
-SvxIconChoiceCtrlEntryPtrVec rList = mapIt-second;
+SvxIconChoiceCtrlEntryPtrVec const  rList = mapIt-second;
 const sal_uInt16 nCount = rList.size();
 if( !nCount )
 return 0;
@@ -203,7 +203,7 @@ SvxIconChoiceCtrlEntry* 
IcnCursor_Impl::SearchRow(sal_uInt16 nRow, sal_uInt16 nL
 IconChoiceMap::iterator mapIt = pRows-find( nRow );
 if ( mapIt == pRows-end() )
 return 0;
-SvxIconChoiceCtrlEntryPtrVec rList = mapIt-second;
+SvxIconChoiceCtrlEntryPtrVec const  rList = mapIt-second;
 const sal_uInt16 nCount = rList.size();
 if( !nCount )
 return 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source vcl/inc vcl/unx

2012-07-16 Thread David Tardon
 svtools/source/control/tabbar.cxx|   42 ---
 vcl/inc/vcl/salnativewidgets.hxx |5 ---
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |6 
 3 files changed, 7 insertions(+), 46 deletions(-)

New commits:
commit 720e2906921ed10d9d8ec62a0121813fac9c622a
Author: Ruslan Kabatsayev b7.10110...@gmail.com
Date:   Mon Jul 16 01:33:02 2012 +0400

Revert Make bottom tabbar items follow native theme

This reverts commit 17ea32a1a36d81a0a12df12adbe15e8eaf1c7c62.

diff --git a/svtools/source/control/tabbar.cxx 
b/svtools/source/control/tabbar.cxx
index 0c43549..a922241 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -1098,20 +1098,14 @@ public:
 
 void drawOutputAreaBorder()
 {
-Size aOutputSize = mrParent.GetOutputSizePixel();
-Rectangle aOutRect = mrParent.GetPageArea();
-
-Rectangle 
borderRect(Point(aOutRect.Left(),-10),Size(aOutputSize.Width(),12));
-if( mrParent.IsNativeControlSupported(CTRL_FRAME,PART_ENTIRE_CONTROL) 

-
mrParent.DrawNativeControl(CTRL_FRAME,PART_ENTIRE_CONTROL,borderRect,
-
CTRL_STATE_ENABLED,ImplControlValue(FRAME_DRAW_IN),rtl::OUString()) )
-return;
-
 WinBits nWinStyle = mrParent.GetStyle();
 
 // Bei Border oben und unten einen Strich extra malen
 if ( (nWinStyle  WB_BORDER) || (nWinStyle  WB_TOPBORDER) )
 {
+Size aOutputSize = mrParent.GetOutputSizePixel();
+Rectangle aOutRect = mrParent.GetPageArea();
+
 // Bei 3D-Tabs wird auch der Border in 3D gemalt
 if ( nWinStyle  WB_3DTAB )
 {
@@ -1204,27 +1198,6 @@ public:
 
 void drawTab()
 {
-ControlState nState(CTRL_STATE_ENABLED);
-if( mbSelected )
-nState|=CTRL_STATE_SELECTED;
-TabitemValue tiValue;
-tiValue.mnPosition|=TABITEM_IS_AT_BOTTOM;
-Rectangle tabRect(maRect);
-tabRect.Left()+=5;
-tabRect.Right()-=4;
-tabRect.Bottom()+=1;
-if( !mbSelected )
-{
-tabRect.Bottom()-=2;
-tabRect.Top()+=2;
-}
-if( 
mrParent.IsNativeControlSupported(CTRL_TAB_ITEM,PART_ENTIRE_CONTROL) 
-   
mrParent.DrawNativeControl(CTRL_TAB_ITEM,PART_ENTIRE_CONTROL,tabRect,
-   nState,tiValue,rtl::OUString()) )
-{
-return;
-}
-
 mrParent.SetLineColor(mpStyleSettings-GetDarkShadowColor());
 
 // Je nach Status die richtige FillInBrush setzen
@@ -1449,12 +1422,9 @@ void TabBar::Paint( const Rectangle )
 
 if ( bCurrent )
 {
-
if(!IsNativeControlSupported(CTRL_TAB_ITEM,PART_ENTIRE_CONTROL))
-{
-SetLineColor();
-SetFillColor(aSelectColor);
-aDrawer.drawOverTopBorder(mnWinStyle  WB_3DTAB);
-}
+SetLineColor();
+SetFillColor(aSelectColor);
+aDrawer.drawOverTopBorder(mnWinStyle  WB_3DTAB);
 return;
 }
 
diff --git a/vcl/inc/vcl/salnativewidgets.hxx b/vcl/inc/vcl/salnativewidgets.hxx
index 2ae9473..40d4fbd 100644
--- a/vcl/inc/vcl/salnativewidgets.hxx
+++ b/vcl/inc/vcl/salnativewidgets.hxx
@@ -366,20 +366,16 @@ class VCL_DLLPUBLIC SliderValue : public ImplControlValue
 #define TABITEM_RIGHTALIGNED   0x002   // the tabitem is aligned with the 
right border of the TabControl
 #define TABITEM_FIRST_IN_GROUP 0x004   // the tabitem is the first in group of 
tabitems
 #define TABITEM_LAST_IN_GROUP  0x008   // the tabitem is the last in group of 
tabitems
-/* This constant is independent from the ones above */
-#define TABITEM_IS_AT_BOTTOM   0x001   // the tabitem at the bottom of the 
TabControl
 
 class VCL_DLLPUBLIC TabitemValue : public ImplControlValue
 {
 public:
 unsigned intmnAlignment;
-unsigned intmnPosition;
 
 inline TabitemValue()
 : ImplControlValue( CTRL_TAB_ITEM, BUTTONVALUE_DONTKNOW, 0 )
 {
 mnAlignment = 0;
-mnPosition = 0;
 };
 virtual ~TabitemValue();
 virtual TabitemValue* clone() const;
@@ -390,7 +386,6 @@ class VCL_DLLPUBLIC TabitemValue : public ImplControlValue
 sal_Bool isNotAligned() const   { return (mnAlignment  
(TABITEM_LEFTALIGNED | TABITEM_RIGHTALIGNED)) == 0; }
 sal_Bool isFirst() const{ return (mnAlignment  
TABITEM_FIRST_IN_GROUP) != 0; }
 sal_Bool isLast() const { return (mnAlignment  
TABITEM_LAST_IN_GROUP) != 0; }
-sal_Bool isAtBottom() const { return (mnPosition  
TABITEM_IS_AT_BOTTOM) != 0; }
 };
 
 /* SpinbuttonValue:
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 6b18e7a..c9b1c30 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ 

[Libreoffice-commits] .: svtools/source vcl/inc vcl/source

2012-07-06 Thread Noel Power
 svtools/source/brwbox/ebbcontrols.cxx |   24 +++-
 vcl/inc/vcl/button.hxx|   15 +--
 vcl/source/control/button.cxx |   18 --
 3 files changed, 44 insertions(+), 13 deletions(-)

New commits:
commit a1345cd93a57ec7d9352f2c71ec2664332ce5e76
Author: Noel Power noel.po...@novell.com
Date:   Fri Jul 6 11:19:57 2012 +0100

fdo#51336 - change vcl checkbox no-label behaviour

Change-Id: I352c6041cc520dc76c302190dcf3a6945f5ac85f

diff --git a/svtools/source/brwbox/ebbcontrols.cxx 
b/svtools/source/brwbox/ebbcontrols.cxx
index 1d7b025..b0ab801 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -253,6 +253,28 @@ namespace svt
 //= CheckBoxControl
 //==
 //--
+
+class CBCntrlTriState : public TriStateBox
+{
+CBCntrlTriState( const CBCntrlTriState  );
+CBCntrlTriState operator= ( const CBCntrlTriState  );
+protected:
+virtual void ImplHandleHoriAlign( const Point rPos, const Size rSize,
+const Size rImageSize, Rectangle 
rStateRect )
+{
+WinBits nWinStyle = GetStyle();
+if ( nWinStyle  WB_CENTER )
+rStateRect.Left() = 
rPos.X()+((rSize.Width()-rImageSize.Width())/2);
+else if ( nWinStyle  WB_RIGHT )
+rStateRect.Left() = rPos.X()+rSize.Width()-rImageSize.Width();
+else
+rStateRect.Left() = rPos.X();
+}
+public:
+CBCntrlTriState( Window* pParent, WinBits nStyle = 0 ) : TriStateBox( 
pParent, nStyle ) {}
+CBCntrlTriState( Window* pParent, const ResId rResId ) : TriStateBox( 
pParent, rResId ) {}
+};
+
 CheckBoxControl::CheckBoxControl(Window* pParent, WinBits nWinStyle)
:Control(pParent, nWinStyle)
 {
@@ -267,7 +289,7 @@ namespace svt
 
 EnableChildTransparentMode();
 
-pBox = new TriStateBox(this,WB_CENTER|WB_VCENTER);
+pBox = new CBCntrlTriState(this,WB_CENTER|WB_VCENTER);
 pBox-EnableChildTransparentMode();
 pBox-SetPaintTransparent( sal_True );
 pBox-SetClickHdl( LINK( this, CheckBoxControl, OnClick ) );
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index 51b6034..64f7581 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -401,7 +401,6 @@ public:
 
 class VCL_DLLPUBLIC CheckBox : public Button
 {
-private:
 Rectangle   maStateRect;
 Rectangle   maMouseRect;
 TriStatemeState;
@@ -420,7 +419,7 @@ private:
 SAL_DLLPRIVATE void ImplDrawCheckBox( bool bLayout = false );
 SAL_DLLPRIVATE long ImplGetImageToTextDistance() const;
 SAL_DLLPRIVATE Size ImplGetCheckImageSize() const;
-
+private:
 // Copy assignment is forbidden and not implemented.
 SAL_DLLPRIVATE  CheckBox(const CheckBox );
 SAL_DLLPRIVATE  CheckBox operator= (const CheckBox );
@@ -428,15 +427,19 @@ private:
 protected:
 using Control::ImplInitSettings;
 using Window::ImplInit;
+// allows the behaviour of horizontal placement of the checbox image to be
+// overridden.
+virtual void ImplHandleHoriAlign( const Point rPos, const Size rSize,
+const Size rImageSize, Rectangle 
rStateRect );
 SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
 SAL_DLLPRIVATE void ImplLoadRes( const ResId rResId );
-SAL_DLLPRIVATE virtual void FillLayoutData() const;
-SAL_DLLPRIVATE virtual const Font
+   virtual void FillLayoutData() const;
+   virtual const Font
 GetCanonicalFont( const StyleSettings _rStyle 
) const;
-SAL_DLLPRIVATE virtual const Color
+   virtual const Color
 GetCanonicalTextColor( const StyleSettings 
_rStyle ) const;
 
-SAL_DLLPRIVATE virtual void ImplDrawCheckBoxState();
+   virtual void ImplDrawCheckBoxState();
 SAL_DLLPRIVATE const Rectangle GetStateRect() const { return maStateRect; 
}
 SAL_DLLPRIVATE const Rectangle GetMouseRect() const { return maMouseRect; 
}
 public:
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 6d5a8f9..e3ed723 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -3251,12 +3251,9 @@ void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong 
nDrawFlags,
 }
 else
 {
-if ( nWinStyle  WB_CENTER )
-rStateRect.Left() = 
rPos.X()+((rSize.Width()-rImageSize.Width())/2);
-else if ( nWinStyle  WB_RIGHT )
-rStateRect.Left() = rPos.X()+rSize.Width()-rImageSize.Width();
-else
-rStateRect.Left() = 

[Libreoffice-commits] .: svtools/source

2012-07-04 Thread Bjoern Michaelsen
 svtools/source/config/colorcfg.cxx |   12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

New commits:
commit 2d06094c701262ef54604be206c25dd87a77d224
Author: Benjamin Drung bdr...@debian.org
Date:   Fri Jun 8 00:19:25 2012 +0200

fdo#35365 Set the default font color to black and the document color to 
white.

The font and document color of a Writer document or an Impress presentation
should not be derived from a desktop theme. A Writer documents needs to look
good on paper. An Impress presentation may have it's own theme. The 
appearance
of a document should not change by changing the desktop theme.

With this change a document looks the same on any computer if the user do 
not
change the default colors.

Change-Id: Ia42ca7882f0d2dd1f2a304db5e4b5aaba23244fc

diff --git a/svtools/source/config/colorcfg.cxx 
b/svtools/source/config/colorcfg.cxx
index abdb852..4f899af 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -412,12 +412,12 @@ Color ColorConfig::GetDefaultColor(ColorConfigEntry 
eEntry)
 {
 static const sal_Int32 aAutoColors[] =
 {
-0, // DOCCOLOR
+COL_WHITE, // DOCCOLOR
 0xc0c0c0, // DOCBOUNDARIES
 0x808080, // APPBACKGROUND
 0xc0c0c0, // OBJECTBOUNDARIES
 0xc0c0c0, // TABLEBOUNDARIES
-0, // FONTCOLOR
+COL_BLACK, // FONTCOLOR
 0xcc, // LINKS
 0x80, // LINKSVISITED
 0xff, // SPELL
@@ -462,18 +462,10 @@ Color ColorConfig::GetDefaultColor(ColorConfigEntry 
eEntry)
 Color aRet;
 switch(eEntry)
 {
-case DOCCOLOR :
-aRet = 
Application::GetSettings().GetStyleSettings().GetWindowColor();
-break;
-
 case APPBACKGROUND :
 aRet = 
Application::GetSettings().GetStyleSettings().GetWorkspaceColor();
 break;
 
-case FONTCOLOR :
-aRet = 
Application::GetSettings().GetStyleSettings().GetWindowTextColor();
-break;
-
 case LINKS :
 aRet = 
Application::GetSettings().GetStyleSettings().GetLinkColor();
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-06-30 Thread Andras Timar
 svtools/source/dialogs/so3res.src |4 
 1 file changed, 4 deletions(-)

New commits:
commit 611334aa74f97768717376da637bea9baac015aa
Author: Andras Timar ati...@suse.com
Date:   Sat Jun 30 15:07:58 2012 +0200

remove one more unused string

Change-Id: I83942f6408b32b68631dde5d260fa8c8e01bdbfd

diff --git a/svtools/source/dialogs/so3res.src 
b/svtools/source/dialogs/so3res.src
index 0319175..3ff2eeb 100644
--- a/svtools/source/dialogs/so3res.src
+++ b/svtools/source/dialogs/so3res.src
@@ -176,10 +176,6 @@ Resource RID_SO_ERRCTX
 Text [ en-US ] = $(ERR) activating object ;
 };
 };
-String STR_INS_APPLET
-{
-Text [ en-US ] = Inserts an applet object into your document. When the 
object is activated, the applet is automatically executed. ;
-};
 String STR_ERROR_OBJNOCREATE
 {
 Text [ en-US ] = Object % could not be inserted. ;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-05-24 Thread Stephan Bergmann
 svtools/source/contnr/templwin.cxx |2 +-
 svtools/source/contnr/templwin.hxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 226b81d0f300a62da9351d1fc011b88f93f0b2b0
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu May 24 10:58:31 2012 +0200

returning reference to temporary [-Werror]

Change-Id: Ib37f1fc9658cb50227463cf2aa1421ba47b2ec9f

diff --git a/svtools/source/contnr/templwin.cxx 
b/svtools/source/contnr/templwin.cxx
index b1b85c2..98cf194 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -594,7 +594,7 @@ SvtDocInfoTable_Impl::SvtDocInfoTable_Impl() :
 }
 // ---
 
-const String SvtDocInfoTable_Impl::GetString( long nId ) const
+rtl::OUString SvtDocInfoTable_Impl::GetString( long nId ) const
 {
 sal_uInt32 nPos( FindIndex( nId ) );
 
diff --git a/svtools/source/contnr/templwin.hxx 
b/svtools/source/contnr/templwin.hxx
index 207efeb..d945cf7 100644
--- a/svtools/source/contnr/templwin.hxx
+++ b/svtools/source/contnr/templwin.hxx
@@ -173,7 +173,7 @@ private:
 public:
 SvtDocInfoTable_Impl();
 
-const String   GetString( long nId ) const;
+rtl::OUString GetString( long nId ) const;
 };
 
 class SvtFrameWindow_Impl : public Window
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-05-16 Thread Jan Holesovsky
 svtools/source/control/ruler.cxx |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit cd28abc0496b72828c48815b4336a6b1321cb817
Author: Jan Holesovsky ke...@suse.cz
Date:   Wed May 16 17:22:43 2012 +0200

ruler: More off-by-one drawing problems fixed (hopefully all of them now).

Change-Id: Icd566610229fe080bb45b746459abed15112c225

diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 9877407..31cd5ce 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -1166,8 +1166,8 @@ void Ruler::ImplFormat()
 
 // Obere/untere Kante ausgeben
 maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
-ImplVDrawLine( nVirLeft, nVirTop+1, nM1 - 1, nVirTop+1 ); //top left line
-ImplVDrawLine( nM2 +1, nVirTop+1, nP2 -1, nVirTop+1 );  //top right 
line
+ImplVDrawLine( nVirLeft, nVirTop+1, nM1, nVirTop+1 ); //top left line
+ImplVDrawLine( nM2, nVirTop+1, nP2 -1, nVirTop+1 );  //top right line
 
 // Jetzt wird zwischen dem Schatten ausgegeben
 nVirTop++;
@@ -1177,19 +1177,19 @@ void Ruler::ImplFormat()
 maVirDev.SetLineColor();
 maVirDev.SetFillColor( rStyleSettings.GetWorkspaceColor() );
 if ( nM1  nVirLeft )
-ImplVDrawRect( nP1, nVirTop+1, nM1-1, nVirBottom ); //left gray 
rectangle
+ImplVDrawRect( nP1, nVirTop+1, nM1, nVirBottom ); //left gray rectangle
 if ( nM2  nP2 )
-ImplVDrawRect( nM2+1, nVirTop+1, nP2, nVirBottom ); //right gray 
rectangle
+ImplVDrawRect( nM2, nVirTop+1, nP2, nVirBottom ); //right gray 
rectangle
 if ( nM2-nM1  0 )
 {
 maVirDev.SetFillColor( rStyleSettings.GetWindowColor() );
-ImplVDrawRect( nM1, nVirTop, nM2-1, nVirBottom ); //center rectangle
+ImplVDrawRect( nM1+1, nVirTop, nM2-1, nVirBottom ); //center rectangle
 }
 maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
 if ( nM1  nVirLeft )
 {
-ImplVDrawLine( nM1-1, nVirTop+1, nM1-1, nVirBottom );//right line of 
the left rectangle
-ImplVDrawLine( nP1, nVirBottom, nM1-1, nVirBottom );//bottom line of 
the left rectangle
+ImplVDrawLine( nM1, nVirTop+1, nM1, nVirBottom );//right line of the 
left rectangle
+ImplVDrawLine( nP1, nVirBottom, nM1, nVirBottom );//bottom line of the 
left rectangle
 if ( nP1 = nVirLeft )
 {
 ImplVDrawLine( nP1, nVirTop+1, nP1, nVirBottom );//left line of 
the left rectangle
@@ -1198,8 +1198,8 @@ void Ruler::ImplFormat()
 }
 if ( nM2  nP2 )
 {
-ImplVDrawLine( nM2+1, nVirBottom, nP2-1, nVirBottom );//bottom line of 
the right rectangle
-ImplVDrawLine( nM2+1, nVirTop+1, nM2+1, nVirBottom );//left line of 
the right rectangle
+ImplVDrawLine( nM2, nVirBottom, nP2-1, nVirBottom );//bottom line of 
the right rectangle
+ImplVDrawLine( nM2, nVirTop+1, nM2, nVirBottom );//left line of the 
right rectangle
 if ( nP2 = nVirRight+1 )
 ImplVDrawLine( nP2-1, nVirTop+1, nP2-1, nVirBottom );//right line 
of the right rectangle
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-05-15 Thread Jan Holesovsky
 svtools/source/control/ruler.cxx |   35 ++-
 1 file changed, 22 insertions(+), 13 deletions(-)

New commits:
commit a490c019787bbea83a7a8419978d3c1efaf5450f
Author: Jan Holesovsky ke...@suse.cz
Date:   Tue May 15 15:00:13 2012 +0200

ruler: Fixed many off-by-one drawing problems.

Change-Id: I3aab81682310cbf1da8af6dc0a5d71eb8e3140e4

diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 0dd5031..9877407 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -288,6 +288,9 @@ void Ruler::ImplInit( WinBits nWinBits )
 
 // Default-Groesse setzen
 long nDefHeight = GetTextHeight() + RULER_OFF*2 + RULER_TEXTOFF*2 + 
mnBorderWidth;
+if ( ( nDefHeight % 2 ) != 0 )
+++nDefHeight;
+
 Size aDefSize;
 if ( nWinBits  WB_HORZ )
 aDefSize.Height() = nDefHeight;
@@ -550,8 +553,6 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long 
nStart, long nCenter )
 long nX;
 long nY;
 long n = 0;
-long nTxtWidth2;
-long nTxtHeight2 = GetTextHeight()/2;
 long nTick = 0;
 while ( ((nStart-n) = nMin) || ((nStart+n) = nMax) )
 {
@@ -564,7 +565,11 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long 
nStart, long nCenter )
 if ( (mpData-nMargin1Style  RULER_STYLE_INVISIBLE) || 
(mpData-nMargin1 != 0) )
 {
 aNumStr = (sal_Unicode)'0';
-nTxtWidth2 = maVirDev.GetTextWidth( aNumStr )/2;
+Rectangle aRect;
+GetTextBoundRect( aRect, aNumStr );
+long nTxtWidth2 = aRect.Right() / 2 + 1;
+long nTxtHeight2 = aRect.Bottom() / 2 + 1;
+
 if ( (mnWinStyle  WB_HORZ)^mpData-bTextRTL )
 nX = nStart-nTxtWidth2;
 else
@@ -590,7 +595,11 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long 
nStart, long nCenter )
 aNumStr = UniString::CreateFromInt32( nTick / 
nTickUnit );
 else
 aNumStr = UniString::CreateFromInt32( nTick / 
aImplRulerUnitTab[mnUnitIndex].nTickUnit );
-nTxtWidth2 = GetTextWidth( aNumStr )/2;
+
+Rectangle aRect;
+GetTextBoundRect( aRect, aNumStr );
+long nTxtWidth2 = aRect.Right() / 2 + 1;
+long nTxtHeight2 = aRect.Bottom() / 2 + 1;
 
 nX = nStart+n;
 //different orientation needs a different starting position
@@ -787,7 +796,7 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long 
nVirTop, long nVirBottom
 {
 const StyleSettings rStyleSettings = 
GetSettings().GetStyleSettings();
 maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
-ImplVDrawLine( n, nVirTop, n, nVirBottom-1 );
+ImplVDrawLine( n, nVirTop+1, n, nVirBottom-1 );
 }
 else if ( nIndentStyle == RULER_INDENT_BOTTOM )
 {
@@ -1157,8 +1166,8 @@ void Ruler::ImplFormat()
 
 // Obere/untere Kante ausgeben
 maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
-ImplVDrawLine( nVirLeft, nVirTop, nM1 - 1, nVirTop ); //top left line
-ImplVDrawLine( nM2 +1, nVirTop, nP2 -1, nVirTop );  //top right line
+ImplVDrawLine( nVirLeft, nVirTop+1, nM1 - 1, nVirTop+1 ); //top left line
+ImplVDrawLine( nM2 +1, nVirTop+1, nP2 -1, nVirTop+1 );  //top right 
line
 
 // Jetzt wird zwischen dem Schatten ausgegeben
 nVirTop++;
@@ -1168,9 +1177,9 @@ void Ruler::ImplFormat()
 maVirDev.SetLineColor();
 maVirDev.SetFillColor( rStyleSettings.GetWorkspaceColor() );
 if ( nM1  nVirLeft )
-ImplVDrawRect( nP1, nVirTop, nM1-1, nVirBottom ); //left gray rectangle
+ImplVDrawRect( nP1, nVirTop+1, nM1-1, nVirBottom ); //left gray 
rectangle
 if ( nM2  nP2 )
-ImplVDrawRect( nM2+1, nVirTop, nP2, nVirBottom ); //right gray 
rectangle
+ImplVDrawRect( nM2+1, nVirTop+1, nP2, nVirBottom ); //right gray 
rectangle
 if ( nM2-nM1  0 )
 {
 maVirDev.SetFillColor( rStyleSettings.GetWindowColor() );
@@ -1179,20 +1188,20 @@ void Ruler::ImplFormat()
 maVirDev.SetLineColor( rStyleSettings.GetShadowColor() );
 if ( nM1  nVirLeft )
 {
-ImplVDrawLine( nM1-1, nVirTop, nM1-1, nVirBottom );//right line of the 
left rectangle
+ImplVDrawLine( nM1-1, nVirTop+1, nM1-1, nVirBottom );//right line of 
the left rectangle
 ImplVDrawLine( nP1, nVirBottom, nM1-1, nVirBottom );//bottom line of 
the left rectangle
 if ( nP1 = nVirLeft )
 {
-ImplVDrawLine( nP1, nVirTop, nP1, nVirBottom );//left line of the 
left rectangle
+ImplVDrawLine( nP1, nVirTop+1, nP1, nVirBottom );//left 

[Libreoffice-commits] .: svtools/source

2012-05-14 Thread Stephan Bergmann
 svtools/source/filter/FilterConfigCache.hxx |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit eda52d5e73d8918f354036cf7db3acfab43b36d7
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon May 14 16:14:02 2012 +0200

FilterConfigCache not used outside svtools

Change-Id: I75c88b83903c7510291b9d021fd4837b2c8d5e4c

diff --git a/svtools/source/filter/FilterConfigCache.hxx 
b/svtools/source/filter/FilterConfigCache.hxx
index a944a6d..66e55c2 100644
--- a/svtools/source/filter/FilterConfigCache.hxx
+++ b/svtools/source/filter/FilterConfigCache.hxx
@@ -30,7 +30,6 @@
 #ifndef _FILTER_CONFIG_CACHE_HXX_
 #define _FILTER_CONFIG_CACHE_HXX_
 
-#include svtools/svtdllapi.h
 #include tools/string.hxx
 #include com/sun/star/uno/Sequence.h
 #include com/sun/star/uno/Reference.h
@@ -42,7 +41,7 @@
 #define INCLUDED_VECTOR
 #endif
 
-class SVT_DLLPUBLIC FilterConfigCache
+class FilterConfigCache
 {
 struct FilterConfigCacheEntry
 {
@@ -93,8 +92,8 @@ class SVT_DLLPUBLIC FilterConfigCache
 
 static const char*  InternalFilterListForSvxLight[];
 
-SVT_DLLPRIVATE void ImplInit();
-SVT_DLLPRIVATE void ImplInitSmart();
+void ImplInit();
+void ImplInitSmart();
 
 public :
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-05-14 Thread Miklos Vajna
 svtools/source/control/ctrlbox.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 82b0450450d62328e7aede5ac23ba30055219728
Author: Miklos Vajna vmik...@suse.cz
Date:   Mon May 14 17:03:45 2012 +0200

n#760294 svtools: allow border gap  1pt

Change-Id: I3ac70ea343edde406e78845a112aabcbd8ff65b1

diff --git a/svtools/source/control/ctrlbox.cxx 
b/svtools/source/control/ctrlbox.cxx
index cd528ec..a4a6e47 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -61,6 +61,7 @@
 #define EXTRAFONTSIZE 5
 #define GAPTOEXTRAPREVIEW 10
 #define MAXPREVIEWWIDTH 120
+#define MINGAPWIDTH 2
 
 #define FONTNAMEBOXMRUENTRIESFILE /user/config/fontnameboxmruentries
 
@@ -338,9 +339,9 @@ long BorderWidthImpl::GetGap( long nWidth ) const
 if ( ( m_nFlags  CHANGE_DIST )  0 )
 result = static_castlong(m_nRateGap * nWidth);
 
-// Avoid having too small distances (less than 1pt)
-if ( result  20  m_nRate1  0  m_nRate2  0 )
-result = 20;
+// Avoid having too small distances (less than 0.1pt)
+if ( result  MINGAPWIDTH  m_nRate1  0  m_nRate2  0 )
+result = MINGAPWIDTH;
 
 return result;
 }
@@ -380,7 +381,7 @@ long BorderWidthImpl::GuessWidth( long nLine1, long nLine2, 
long nGap )
 
 bool bGapChange = ( m_nFlags  CHANGE_DIST )  0;
 double nWidthGap = lcl_getGuessedWidth( nGap, m_nRateGap, bGapChange );
-if ( bGapChange  nGap  20 )
+if ( bGapChange  nGap  MINGAPWIDTH )
 aToCompare.push_back( nWidthGap );
 else if ( !bGapChange  nWidthGap  0 )
 bInvalid = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-05-09 Thread Caolán McNamara
 svtools/source/svhtml/htmlout.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 3ea961725a8488082e3741df98cbea358d807c87
Author: Gordon Lack gordon.l...@dsl.pipex.com
Date:   Wed May 9 13:51:44 2012 +0100

Incorrect character written out when saved in HTML format

Change-Id: I0ac19bf724be64004aeaecad67e95627a098975f

diff --git a/svtools/source/svhtml/htmlout.cxx 
b/svtools/source/svhtml/htmlout.cxx
index d35d4af..54ab173 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -411,10 +411,15 @@ rtl::OString lcl_ConvertCharToHTML( sal_Unicode c,
 switch( c )
 {
 case 0xA0:  // is a hard blank
+pStr = OOO_STRING_SVTOOLS_HTML_S_nbsp;
+break;
+// This was labelled as:
 //!! the TextConverter has a problem with this character - so change it to
 // a hard space - that's the same as our 5.2
-case 0x2011:// is a hard hyphen
-pStr = OOO_STRING_SVTOOLS_HTML_S_nbsp;
+//   but that just breaks html output.  Setting the numberic html entity
+//   seems fine.
+case 0x2011:   // is a hard hyphen
+pStr = #8209;
 break;
 case 0xAD:  // is a soft hyphen
 pStr = OOO_STRING_SVTOOLS_HTML_S_shy;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-05-09 Thread Caolán McNamara
 svtools/source/svhtml/htmlout.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 2221e0a0be16ffc0402b336ad308feff8a693a8a
Author: Caolán McNamara caol...@redhat.com
Date:   Wed May 9 13:53:58 2012 +0100

remove comment, it'll only confuse matters

Change-Id: I3268dd37834b4a2ece084e4d0843e7c38cc39c83

diff --git a/svtools/source/svhtml/htmlout.cxx 
b/svtools/source/svhtml/htmlout.cxx
index 54ab173..18e1752 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -413,12 +413,7 @@ rtl::OString lcl_ConvertCharToHTML( sal_Unicode c,
 case 0xA0:  // is a hard blank
 pStr = OOO_STRING_SVTOOLS_HTML_S_nbsp;
 break;
-// This was labelled as:
-//!! the TextConverter has a problem with this character - so change it to
-// a hard space - that's the same as our 5.2
-//   but that just breaks html output.  Setting the numberic html entity
-//   seems fine.
-case 0x2011:   // is a hard hyphen
+case 0x2011:// is a hard hyphen
 pStr = #8209;
 break;
 case 0xAD:  // is a soft hyphen
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-05-09 Thread Lubos Lunak
 svtools/source/control/ctrltool.cxx |   79 
 1 file changed, 44 insertions(+), 35 deletions(-)

New commits:
commit 13e6af8860f42daf49474a7ae9779baa0f8f2630
Author: Caolán McNamara caol...@redhat.com
Date:   Tue May 8 16:08:16 2012 +0100

Related: fdo#34814 check if a missing font is a known symbol font

Change-Id: I85f8e3fe7a30a59b2e458706b927d8f9c3a65abc

diff --git a/svtools/source/control/ctrltool.cxx 
b/svtools/source/control/ctrltool.cxx
index 01459ad..3fdd515 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -583,7 +583,30 @@ XubString FontList::GetFontMapText( const FontInfo rInfo 
) const
 }
 }
 
-// ---
+namespace
+{
+FontInfo makeMissing(ImplFontListFontInfo* pFontNameInfo, const 
rtl::OUString rName,
+FontWeight eWeight, FontItalic eItalic)
+{
+FontInfo aInfo;
+// Falls der Fontname stimmt, uebernehmen wir soviel wie moeglich
+if (pFontNameInfo)
+{
+aInfo = *pFontNameInfo;
+aInfo.SetStyleName(rtl::OUString());
+}
+
+aInfo.SetWeight(eWeight);
+aInfo.SetItalic(eItalic);
+
+//If this is a known but uninstalled symbol font which we can remap to
+//OpenSymbol then toggle its charset to be a symbol font
+if (ConvertChar::GetRecodeData(rName, rtl::OUString(OpenSymbol)))
+aInfo.SetCharSet(RTL_TEXTENCODING_SYMBOL);
+
+return aInfo;
+}
+}
 
 FontInfo FontList::Get( const XubString rName, const XubString rStyleName ) 
const
 {
@@ -612,54 +635,50 @@ FontInfo FontList::Get( const XubString rName, const 
XubString rStyleName ) co
 FontInfo aInfo;
 if ( !pFontInfo )
 {
-if ( pFontNameInfo )
-aInfo = *pFontNameInfo;
+FontWeight eWeight = WEIGHT_DONTKNOW;
+FontItalic eItalic = ITALIC_NONE;
 
 if ( rStyleName == maNormal )
 {
-aInfo.SetItalic( ITALIC_NONE );
-aInfo.SetWeight( WEIGHT_NORMAL );
+eItalic = ITALIC_NONE;
+eWeight = WEIGHT_NORMAL;
 }
 else if ( rStyleName == maNormalItalic )
 {
-aInfo.SetItalic( ITALIC_NORMAL );
-aInfo.SetWeight( WEIGHT_NORMAL );
+eItalic = ITALIC_NORMAL;
+eWeight = WEIGHT_NORMAL;
 }
 else if ( rStyleName == maBold )
 {
-aInfo.SetItalic( ITALIC_NONE );
-aInfo.SetWeight( WEIGHT_BOLD );
+eItalic = ITALIC_NONE;
+eWeight = WEIGHT_BOLD;
 }
 else if ( rStyleName == maBoldItalic )
 {
-aInfo.SetItalic( ITALIC_NORMAL );
-aInfo.SetWeight( WEIGHT_BOLD );
+eItalic = ITALIC_NORMAL;
+eWeight = WEIGHT_BOLD;
 }
 else if ( rStyleName == maLight )
 {
-aInfo.SetItalic( ITALIC_NONE );
-aInfo.SetWeight( WEIGHT_LIGHT );
+eItalic = ITALIC_NONE;
+eWeight = WEIGHT_LIGHT;
 }
 else if ( rStyleName == maLightItalic )
 {
-aInfo.SetItalic( ITALIC_NORMAL );
-aInfo.SetWeight( WEIGHT_LIGHT );
+eItalic = ITALIC_NORMAL;
+eWeight = WEIGHT_LIGHT;
 }
 else if ( rStyleName == maBlack )
 {
-aInfo.SetItalic( ITALIC_NONE );
-aInfo.SetWeight( WEIGHT_BLACK );
+eItalic = ITALIC_NONE;
+eWeight = WEIGHT_BLACK;
 }
 else if ( rStyleName == maBlackItalic )
 {
-aInfo.SetItalic( ITALIC_NORMAL );
-aInfo.SetWeight( WEIGHT_BLACK );
-}
-else
-{
-aInfo.SetItalic( ITALIC_NONE );
-aInfo.SetWeight( WEIGHT_DONTKNOW );
+eItalic = ITALIC_NORMAL;
+eWeight = WEIGHT_BLACK;
 }
+aInfo = makeMissing(pFontNameInfo, rName, eWeight, eItalic);
 }
 else
 aInfo = *pFontInfo;
@@ -700,17 +719,7 @@ FontInfo FontList::Get( const XubString rName,
 // Attribute nachgebildet werden
 FontInfo aInfo;
 if ( !pFontInfo )
-{
-// Falls der Fontname stimmt, uebernehmen wir soviel wie moeglich
-if ( pFontNameInfo )
-{
-aInfo = *pFontNameInfo;
-aInfo.SetStyleName( XubString() );
-}
-
-aInfo.SetWeight( eWeight );
-aInfo.SetItalic( eItalic );
-}
+aInfo = makeMissing(pFontNameInfo, rName, eWeight, eItalic);
 else
 aInfo = *pFontInfo;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-05-09 Thread Lubos Lunak
 svtools/source/control/ctrltool.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit df45d9d1c037b27291c2173c4d0bfa6e3a42a73f
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed May 9 19:19:11 2012 +0200

work around -Wreturn-type with compilers that cannot figure it out 
themselves

diff --git a/svtools/source/control/ctrltool.cxx 
b/svtools/source/control/ctrltool.cxx
index ffa4fbb..8561167 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -126,12 +126,11 @@ private:
 //sort normal to the start
 static int sortWeightValue(FontWeight eWeight)
 {
-if (eWeight == WEIGHT_NORMAL)
-return 0;
 if (eWeight  WEIGHT_NORMAL)
 return eWeight + 1;
 if (eWeight  WEIGHT_NORMAL)
 return eWeight - 1;
+return 0; // eWeight == WEIGHT_NORMAL
 }
 
 static StringCompare ImplCompareFontInfo( ImplFontListFontInfo* pInfo1,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-05-08 Thread Noel Power
 svtools/source/contnr/svimpbox.cxx |   10 --
 1 file changed, 10 deletions(-)

New commits:
commit 6a64e5bbd43e262d87e291dcc411628efac61fde
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon May 7 22:31:34 2012 +0400

Revert Set the listbox height to an integer multiple of the listbox 
entry...

This reverts commit 16c9d63da67897e51960f3684d8d05b06f2c8f81.

Conflicts:

svtools/source/contnr/svimpbox.cxx

Change-Id: I8e030e3b85fbf31d8369646e55048b830a83486e

diff --git a/svtools/source/contnr/svimpbox.cxx 
b/svtools/source/contnr/svimpbox.cxx
index 574a800..fe806c3 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -1352,18 +1352,8 @@ void SvImpLBox::InitScrollBarBox()
 void SvImpLBox::Resize()
 {
 Size aSize( pView-Control::GetOutputSizePixel());
-long nEntryHeight = pView-GetEntryHeight();
-
 if( aSize.Width() = 0 || aSize.Height() = 0 )
 return;
-if( nEntryHeight )
-{
-  // Set the view height to an integer multiple of the entry height.
-  int nEntryCount = (int) aSize.Height() / nEntryHeight;
-  aSize.Height() = pView-GetEntryHeight() * nEntryCount;
-  pView-Control::SetOutputSizePixel( aSize );
-}
-
 nFlags |= F_IN_RESIZE;
 InitScrollBarBox();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-03-26 Thread Caolán McNamara
 svtools/source/filter/wmf/winmtf.cxx |   23 ---
 svtools/source/filter/wmf/winmtf.hxx |3 ---
 2 files changed, 26 deletions(-)

New commits:
commit 6bc1f24ceb2152e791301cd80ed579c26d275a69
Author: Santiago Martinez smvar...@gmail.com
Date:   Sun Mar 25 18:24:32 2012 +0200

Remove unused code in svtools.

diff --git a/svtools/source/filter/wmf/winmtf.cxx 
b/svtools/source/filter/wmf/winmtf.cxx
index 090886e..d9597ff 100644
--- a/svtools/source/filter/wmf/winmtf.cxx
+++ b/svtools/source/filter/wmf/winmtf.cxx
@@ -658,13 +658,6 @@ void WinMtfOutput::SelectObject( sal_Int32 nIndex )
 
 
//---
 
-void WinMtfOutput::SetFont( const Font rFont )
-{
-maFont = rFont;
-}
-
-//---
-
 const Font WinMtfOutput::GetFont() const
 {
 return maFont;
@@ -679,13 +672,6 @@ void WinMtfOutput::SetTextLayoutMode( const sal_uInt32 
nTextLayoutMode )
 
 
//---
 
-sal_uInt32 WinMtfOutput::GetTextLayoutMode() const
-{
-return mnTextLayoutMode;
-}
-
-//---
-
 void WinMtfOutput::SetBkMode( sal_uInt32 nMode )
 {
 mnBkMode = nMode;
@@ -1151,15 +1137,6 @@ void WinMtfOutput::LineTo( const Point rPoint, sal_Bool 
bRecordPath )
 
 
//---
 
-void WinMtfOutput::DrawLine( const Point rSource, const Point rDest )
-{
-UpdateClipRegion();
-UpdateLineStyle();
-mpGDIMetaFile-AddAction( new MetaLineAction( ImplMap( rSource), ImplMap( 
rDest ), maLineStyle.aLineInfo ) );
-}
-
-//---
-
 void WinMtfOutput::DrawRect( const Rectangle rRect, sal_Bool bEdge )
 {
 UpdateClipRegion();
diff --git a/svtools/source/filter/wmf/winmtf.hxx 
b/svtools/source/filter/wmf/winmtf.hxx
index 6f5e778..bf81be5 100644
--- a/svtools/source/filter/wmf/winmtf.hxx
+++ b/svtools/source/filter/wmf/winmtf.hxx
@@ -696,10 +696,8 @@ public:
 voidSelectObject( sal_Int32 nIndex );
 CharSet GetCharSet(){ return maFont.GetCharSet(); };
 WinMtfFillStyleGetFillStyle () { return maFillStyle; }
-voidSetFont( const Font rFont );
 const Font GetFont() const;
 voidSetTextLayoutMode( const sal_uInt32 nLayoutMode );
-sal_uInt32  GetTextLayoutMode() const;
 
 voidClearPath(){ aPathObj.Init(); };
 voidClosePath(){ aPathObj.ClosePath(); };
@@ -708,7 +706,6 @@ public:
 voidMoveTo( const Point rPoint, sal_Bool bRecordPath = 
sal_False );
 voidLineTo( const Point rPoint, sal_Bool bRecordPath = 
sal_False );
 voidDrawPixel( const Point rSource, const Color rColor );
-voidDrawLine( const Point rSource, const Point rDest );
 voidDrawRect( const Rectangle rRect, sal_Bool bEdge = 
sal_True );
 voidDrawRoundRect( const Rectangle rRect, const Size 
rSize );
 voidDrawEllipse( const Rectangle rRect );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-03-22 Thread Markus Mohrhard
 svtools/source/control/valueacc.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit ffc7968ef27d662bdb2b7418eb0344039312f0bb
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Fri Mar 23 02:56:41 2012 +0100

Memcheck: Jump depends on unitialised variable

diff --git a/svtools/source/control/valueacc.cxx 
b/svtools/source/control/valueacc.cxx
index 22680c4..37c48c2 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -48,6 +48,7 @@ ValueSetItem::ValueSetItem( ValueSet rParent )
 : mrParent(rParent)
 , mnId(0)
 , meType(VALUESETITEM_NONE)
+, mbVisible(true)
 , mpData(NULL)
 , mpxAcc(NULL)
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-03-14 Thread Stephan Bergmann
 svtools/source/contnr/DocumentInfoPreview.cxx |   18 --
 svtools/source/contnr/fileview.cxx|   18 +++---
 svtools/source/contnr/templwin.cxx|   10 +-
 svtools/source/contnr/templwin.src|1 -
 4 files changed, 20 insertions(+), 27 deletions(-)

New commits:
commit 3d69d78bed225039741213f1d6bb435468f3a818
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Mar 14 19:45:08 2012 +0100

Some visual clean up

diff --git a/svtools/source/contnr/DocumentInfoPreview.cxx 
b/svtools/source/contnr/DocumentInfoPreview.cxx
index 805ed0a..b27df17 100644
--- a/svtools/source/contnr/DocumentInfoPreview.cxx
+++ b/svtools/source/contnr/DocumentInfoPreview.cxx
@@ -138,17 +138,15 @@ void ODocumentInfoPreview::fill(
 void ODocumentInfoPreview::insertEntry(
 rtl::OUString const  title, rtl::OUString const  value)
 {
-rtl::OUString p1(rtl::OUString(\n) + title + rtl::OUString(:));
-m_pEditWin.InsertText(p1);
-m_pEditWin.SetAttrib(
-TextAttribFontWeight(WEIGHT_BOLD), m_pEditWin.GetParagraphCount() - 1,
-0, p1.getLength());
-rtl::OUString p2(rtl::OUString(\n) + value);
-m_pEditWin.InsertText(p2);
+if (m_pEditWin.GetText().Len() != 0) {
+m_pEditWin.InsertText(rtl::OUString(\n\n));
+}
+rtl::OUString caption(title + rtl::OUString(:\n));
+m_pEditWin.InsertText(caption);
 m_pEditWin.SetAttrib(
-TextAttribFontWeight(WEIGHT_NORMAL),
-m_pEditWin.GetParagraphCount() - 1, 0, p2.getLength());
-m_pEditWin.InsertText(rtl::OUString(\n));
+TextAttribFontWeight(WEIGHT_BOLD), m_pEditWin.GetParagraphCount() - 2,
+0, caption.getLength() - 1);
+m_pEditWin.InsertText(value);
 }
 
 void ODocumentInfoPreview::insertNonempty(long id, rtl::OUString const  value)
diff --git a/svtools/source/contnr/fileview.cxx 
b/svtools/source/contnr/fileview.cxx
index b686831..de0c2af 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -187,6 +187,7 @@ private:
 sal_BoolmbAutoResize: 1;
 sal_BoolmbEnableDelete  : 1;
 sal_BoolmbEnableRename  : 1;
+boolmbShowHeader;
 
 voidDeleteEntries();
 voidDoQuickSearch( const xub_Unicode rChar );
@@ -722,10 +723,9 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* 
pParentWin,
 mbResizeDisabled( sal_False ),
 mbAutoResize( sal_False ),
 mbEnableDelete  ( sal_True ),
-mbEnableRename  ( sal_True )
-
+mbEnableRename  ( sal_True ),
+mbShowHeader( (nFlags  FILEVIEW_SHOW_NONE) == 0 )
 {
-const bool bViewHeader = (nFlags  FILEVIEW_SHOW_NONE) == 0;
 Size aBoxSize = pParentWin-GetSizePixel();
 mpHeaderBar = new HeaderBar( pParentWin, WB_BUTTONSTYLE | WB_BOTTOMBORDER 
);
 mpHeaderBar-SetPosSizePixel( Point( 0, 0 ), 
mpHeaderBar-CalcWindowSizePixel() );
@@ -760,7 +760,7 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* 
pParentWin,
 SetSelectionMode( MULTIPLE_SELECTION );
 
 Show();
-if( bViewHeader )
+if( mbShowHeader )
 mpHeaderBar-Show();
 
 maResetQuickSearch.SetTimeout( QUICK_SEARCH_TIMEOUT );
@@ -806,9 +806,13 @@ void ViewTabListBox_Impl::Resize()
 if ( mbResizeDisabled || !aBoxSize.Width() )
 return;
 
-Size aBarSize = mpHeaderBar-GetSizePixel();
-aBarSize.Width() = mbAutoResize ? aBoxSize.Width() : 
GetSizePixel().Width();
-mpHeaderBar-SetSizePixel( aBarSize );
+Size aBarSize;
+if ( mbShowHeader )
+{
+aBarSize = mpHeaderBar-GetSizePixel();
+aBarSize.Width() = mbAutoResize ? aBoxSize.Width() : 
GetSizePixel().Width();
+mpHeaderBar-SetSizePixel( aBarSize );
+}
 
 if ( mbAutoResize )
 {
diff --git a/svtools/source/contnr/templwin.cxx 
b/svtools/source/contnr/templwin.cxx
index 3bdb0f7..a2a8315 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -427,7 +427,6 @@ SvtFileViewWindow_Impl::SvtFileViewWindow_Impl( 
SvtTemplateWindow* pParent ) :
 aFileView.SetStyle( aFileView.GetStyle() | WB_DIALOGCONTROL | WB_TABSTOP );
 aFileView.SetHelpId( HID_TEMPLATEDLG_FILEVIEW );
 aFileView.Show();
-aFileView.SetPosPixel( Point( 0, 0 ) );
 aFileView.EnableAutoResize();
 aFileView.EnableContextMenu( sal_False );
 aFileView.EnableDelete( sal_False );
@@ -528,14 +527,7 @@ Sequence ::rtl::OUString  
SvtFileViewWindow_Impl::GetNewDocContents() const
 
 void SvtFileViewWindow_Impl::Resize()
 {
-Size aWinSize = GetOutputSizePixel();
-
-static int  x = 0;
-static int  y = 0;
-
-aWinSize.nA += x;
-aWinSize.nB += y;
-aFileView.SetSizePixel( aWinSize );
+aFileView.SetSizePixel(GetOutputSizePixel());
 }
 
 String SvtFileViewWindow_Impl::GetSelectedFile() const
diff --git a/svtools/source/contnr/templwin.src 

[Libreoffice-commits] .: svtools/source svx/source sw/source

2012-02-22 Thread Michael Meeks
 svtools/source/graphic/grfmgr.cxx   |5 -
 svtools/source/graphic/provider.cxx |3 ---
 svx/source/xml/xmlgrhlp.cxx |5 -
 sw/source/core/graphic/ndgrf.cxx|   33 -
 4 files changed, 46 deletions(-)

New commits:
commit fdb9d721c18fb3c3f81f7384ad544e72e969f448
Author: Michael Meeks michael.me...@suse.com
Date:   Wed Feb 22 14:24:52 2012 +

revert slew of debug code committed in error

diff --git a/svtools/source/graphic/grfmgr.cxx 
b/svtools/source/graphic/grfmgr.cxx
index 2124d62..7c2de86 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -422,17 +422,12 @@ String GraphicObject::GetLink() const
 
 void GraphicObject::SetUserData()
 {
-fprintf (stderr, SetUserData to null from '%s'\n,
- mpUserData ? rtl::OUStringToOString(*mpUserData, 
RTL_TEXTENCODING_UTF8).getStr() : null);
 if( mpUserData )
 delete mpUserData, mpUserData = NULL;
 }
 
 void GraphicObject::SetUserData( const String rUserData )
 {
-fprintf (stderr, SetUserData to '%s' from '%s'\n,
- rtl::OUStringToOString(rUserData, RTL_TEXTENCODING_UTF8).getStr(),
- mpUserData ? rtl::OUStringToOString(*mpUserData, 
RTL_TEXTENCODING_UTF8).getStr() : null);
 delete mpUserData, mpUserData = new String( rUserData );
 }
 
diff --git a/svtools/source/graphic/provider.cxx 
b/svtools/source/graphic/provider.cxx
index 185e9dc..d5bcf46 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -867,7 +867,6 @@ void SAL_CALL GraphicProvider::storeGraphic( const 
uno::Reference ::graphic::XG
 
 if( pGraphic  ( pGraphic-GetType() != GRAPHIC_NONE ) )
 {
-fprintf (stderr, provider.cxx - write graphic: ! 
0x%lx\n, (long)pGraphic-GetChecksum() );
 ::Graphic aGraphic( *pGraphic );
 ImplApplyFilterData( aGraphic, aFilterDataSeq );
 
@@ -885,8 +884,6 @@ void SAL_CALL GraphicProvider::storeGraphic( const 
uno::Reference ::graphic::XG
 }
 aMemStrm.Seek( STREAM_SEEK_TO_END );
 pOStm-Write( aMemStrm.GetData(), aMemStrm.Tell() );
-
-fprintf (stderr, provider.cxx - after write graphic: ! 
0x%lx\n, (long)pGraphic-GetChecksum() );
 }
 }
 }
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 9f2c6c8..d73c19e 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -621,8 +621,6 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const 
::rtl::OUString rPictureSt
 }
 else if( aGraphic.GetType() == GRAPHIC_GDIMETAFILE )
 {
-fprintf (stderr, xmlgrhlp.cxx - write meta-file ! 
0x%lx\n,
- (long)aGraphic.GetChecksum() );
 pStream-SetVersion( SOFFICE_FILEFORMAT_8 );
 pStream-SetCompressMode( COMPRESSMODE_ZBITMAP );
 
@@ -645,9 +643,6 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const 
::rtl::OUString rPictureSt
 rMtf.Write( *pStream, 
GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC );
 
 bRet = ( pStream-GetError() == 0 );
-
-fprintf (stderr, xmlgrhlp.cxx - done write meta-file ! 
0x%lx\n,
- (long)aGraphic.GetChecksum() );
 }
 }
 uno::Reference  embed::XTransactedObject  xStorage(
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 907e1f0..151d795 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -63,14 +63,6 @@
 
 using namespace com::sun::star;
 
-static void dbg (SwGrfNode *pNode)
-{
-fprintf (stderr, SwGrfNode created: '%s' 0x%lx\n,
- rtl::OUStringToOString(pNode-GetGrfObj().GetUserData(),
-RTL_TEXTENCODING_UTF8).getStr(),
- (long)pNode-GetGrf().GetChecksum());
-}
-
 // 
 // SwGrfNode
 // 
@@ -91,7 +83,6 @@ SwGrfNode::SwGrfNode(
 
 bGrafikArrived = sal_True;
 ReRead(rGrfName,rFltName, pGraphic, 0, sal_False);
-dbg(this);
 }
 
 SwGrfNode::SwGrfNode( const SwNodeIndex  rWhere,
@@ -109,7 +100,6 @@ SwGrfNode::SwGrfNode( const SwNodeIndex  rWhere,
 bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel= bLoadLowResGrf =
 bFrameInPaint = bScaleImageMap = sal_False;
 bGrafikArrived = sal_True;
-dbg(this);
 }
 
 // Konstruktor fuer den SW/G-Reader. Dieser ctor wird verwendet,
@@ -145,7 +135,6 @@ SwGrfNode::SwGrfNode( const SwNodeIndex  rWhere,
 ((SwBaseLink*)refLink)-Connect();
 }
 }
-dbg(this);
 }
 
 sal_Bool SwGrfNode::ReRead(
@@ -398,9 +387,6 @@ sal_Bool SwGrfNode::ImportGraphic( SvStream rStrm )
 const String aGraphicURL( aGrfObj.GetUserData() );
   

[Libreoffice-commits] .: svtools/source

2012-02-15 Thread Stephan Bergmann
 svtools/source/misc/imap2.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 715ac8c1b402e33930317a69bbdd61ad88133740
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Feb 15 21:55:57 2012 +0100

Fixed some more apparent misuses of RTL_CONSTASCII_USTRINGPARAM

diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx
index 60225a8..c29525b 100644
--- a/svtools/source/misc/imap2.cxx
+++ b/svtools/source/misc/imap2.cxx
@@ -536,8 +536,8 @@ sal_uLong ImageMap::ImpDetectFormat( SvStream rIStm )
 aStr = aStr.toAsciiLowerCase();
 
 if ( (aStr.indexOfL(RTL_CONSTASCII_STRINGPARAM(rect)) != -1) ||
- (aStr.indexOfL(RTL_CONSTASCII_USTRINGPARAM(circ)) != -1) ||
- (aStr.indexOfL(RTL_CONSTASCII_USTRINGPARAM(poly)) != -1) )
+ (aStr.indexOfL(RTL_CONSTASCII_STRINGPARAM(circ)) != -1) ||
+ (aStr.indexOfL(RTL_CONSTASCII_STRINGPARAM(poly)) != -1) )
 {
 if ( ( aStr.indexOf('(') != -1 ) 
  ( aStr.indexOf(')') != -1 ) )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source unusedcode.easy

2012-02-09 Thread Caolán McNamara
 svtools/source/graphic/descriptor.cxx |7 ---
 svtools/source/graphic/descriptor.hxx |2 --
 unusedcode.easy   |1 -
 3 files changed, 10 deletions(-)

New commits:
commit 295cc6c5bce83c48aa92254687b2251c09115e67
Author: Greg Kroah-Hartman gre...@linuxfoundation.org
Date:   Thu Feb 9 17:07:48 2012 +

unographic: delete unused GraphicDescriptor::isValid()

diff --git a/svtools/source/graphic/descriptor.cxx 
b/svtools/source/graphic/descriptor.cxx
index a2441c9..378162d 100644
--- a/svtools/source/graphic/descriptor.cxx
+++ b/svtools/source/graphic/descriptor.cxx
@@ -116,13 +116,6 @@ void GraphicDescriptor::init( const uno::Reference 
io::XInputStream  rxIStm,
 
 // 
--
 
-bool GraphicDescriptor::isValid() const
-{
-return( mpGraphic ? ( mpGraphic-GetType() != GRAPHIC_NONE ) : ( meType != 
GRAPHIC_NONE ) );
-}
-
-// 
--
-
 void GraphicDescriptor::implCreate( SvStream rIStm, const ::rtl::OUString* 
pURL )
 {
 String aURL;
diff --git a/svtools/source/graphic/descriptor.hxx 
b/svtools/source/graphic/descriptor.hxx
index 2eeff29..a2b7e26 100644
--- a/svtools/source/graphic/descriptor.hxx
+++ b/svtools/source/graphic/descriptor.hxx
@@ -89,8 +89,6 @@ public:
 void init( const ::rtl::OUString rURL ) throw();
 void init( const ::com::sun::star::uno::Reference 
::com::sun::star::io::XInputStream  rxIStm, const ::rtl::OUString rURL ) 
throw();
 
-bool isValid() const;
-
 static ::rtl::OUString getImplementationName_Static() throw();
 static ::com::sun::star::uno::Sequence ::rtl::OUString   
getSupportedServiceNames_Static() throw();
 
diff --git a/unusedcode.easy b/unusedcode.easy
index a8e8543..d6d3b58 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1541,7 +1541,6 @@ 
ucbhelper::Content::getPropertyValues(com::sun::star::uno::Sequenceint const)
 ucbhelper::Content::insertNewContent(rtl::OUString const, 
com::sun::star::uno::Sequenceint const, 
com::sun::star::uno::Sequencecom::sun::star::uno::Any const, 
com::sun::star::uno::Referencecom::sun::star::io::XInputStream const, 
ucbhelper::Content)
 
ucbhelper::ContentBroker::ContentBroker(com::sun::star::uno::Referencecom::sun::star::lang::XMultiServiceFactory
 const, std::__debug::vectorucbhelper::ContentProviderData, 
std::allocatorucbhelper::ContentProviderData  const)
 ucbhelper::SimpleCertificateValidationRequest::getResponse() const
-unographic::GraphicDescriptor::isValid() const
 utl::NodeValueAccessor::bind(com::sun::star::uno::Any*)
 utl::OConfigurationNode::appendNode(rtl::OUString const, 
utl::OConfigurationNode const) const
 utl::TransliterationWrapper::compareSubstring(String const, int, int, String 
const, int, int) const
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-02-05 Thread Matteo Casalin
 svtools/source/control/valueset.cxx |   26 ++
 1 file changed, 10 insertions(+), 16 deletions(-)

New commits:
commit a0e7d661e0d36e3069b77f6f4b1f55352efbee9a
Author: Matteo Casalin matteo.casa...@gmx.com
Date:   Sun Feb 5 12:23:31 2012 +0100

Removed unused variable

diff --git a/svtools/source/control/valueset.cxx 
b/svtools/source/control/valueset.cxx
index cc1d9e6..0c58242 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -339,7 +339,6 @@ void ValueSet::Format()
 WinBits nStyle = GetStyle();
 longnTxtHeight = GetTextHeight();
 longnOff;
-longnSpace;
 longnNoneHeight;
 longnNoneSpace;
 ScrollBar*  pDelScrBar = NULL;
@@ -367,7 +366,6 @@ void ValueSet::Format()
 }
 else
 nOff = 0;
-nSpace = mnSpacing;
 
 // consider size, if NameField does exist
 if ( nStyle  WB_NAMEFIELD )
@@ -388,7 +386,7 @@ void ValueSet::Format()
 if ( nStyle  WB_NONEFIELD )
 {
 nNoneHeight = nTxtHeight+nOff;
-nNoneSpace = nSpace;
+nNoneSpace = mnSpacing;
 if ( nStyle  WB_RADIOSEL )
 nNoneHeight += 8;
 }
@@ -414,7 +412,7 @@ void ValueSet::Format()
 {
 if ( mnUserItemWidth )
 {
-mnCols = (sal_uInt16)((aWinSize.Width()-nScrBarWidth+nSpace) / 
(mnUserItemWidth+nSpace));
+mnCols = (sal_uInt16)((aWinSize.Width()-nScrBarWidth+mnSpacing) / 
(mnUserItemWidth+mnSpacing));
 if ( !mnCols )
 mnCols = 1;
 }
@@ -437,7 +435,7 @@ void ValueSet::Format()
 mnVisLines = mnUserVisLines;
 else if ( mnUserItemHeight )
 {
-mnVisLines = (nCalcHeight-nNoneSpace+nSpace) / 
(mnUserItemHeight+nSpace);
+mnVisLines = (nCalcHeight-nNoneSpace+mnSpacing) / 
(mnUserItemHeight+mnSpacing);
 if ( !mnVisLines )
 mnVisLines = 1;
 }
@@ -454,8 +452,8 @@ void ValueSet::Format()
 }
 
 // calculate item size
-long nColSpace  = (mnCols-1)*nSpace;
-long nLineSpace = ((mnVisLines-1)*nSpace)+nNoneSpace;
+long nColSpace  = (mnCols-1)*mnSpacing;
+long nLineSpace = ((mnVisLines-1)*mnSpacing)+nNoneSpace;
 long nItemWidth;
 long nItemHeight;
 if ( mnUserItemWidth  !mnUserCols )
@@ -583,7 +581,7 @@ void ValueSet::Format()
 // If want also draw parts of items in the last line,
 // then we add one more line if parts of these line are
 // visible
-if ( y+(mnVisLines*(nItemHeight+nSpace))  aWinSize.Height() )
+if ( y+(mnVisLines*(nItemHeight+mnSpacing))  aWinSize.Height() )
 nLastItem += mnCols;
 }
 for ( size_t i = 0; i  nItemCount; i++ )
@@ -612,10 +610,10 @@ void ValueSet::Format()
 if ( !((i+1) % mnCols) )
 {
 x = nStartX;
-y += nItemHeight+nSpace;
+y += nItemHeight+mnSpacing;
 }
 else
-x += nItemWidth+nSpace;
+x += nItemWidth+mnSpacing;
 }
 else
 {
@@ -640,7 +638,7 @@ void ValueSet::Format()
 if ( nStyle  WB_NONEFIELD )
 {
 aPos.Y() = nStartY+nNoneHeight+1;
-aSize.Height() = ((nItemHeight+nSpace)*mnVisLines)-2-nSpace;
+aSize.Height() = 
((nItemHeight+mnSpacing)*mnVisLines)-2-mnSpacing;
 }
 mpScrBar-SetPosSizePixel( aPos, aSize );
 mpScrBar-SetRangeMax( mnLines );
@@ -2380,7 +2378,6 @@ Size ValueSet::CalcWindowSizePixel( const Size 
rItemSize, sal_uInt16 nDesireCol
 SizeaSize( rItemSize.Width()*nCalcCols, 
rItemSize.Height()*nCalcLines );
 WinBits nStyle = GetStyle();
 longnTxtHeight = GetTextHeight();
-longnSpace;
 longn;
 
 if ( nStyle  WB_ITEMBORDER )
@@ -2398,12 +2395,9 @@ Size ValueSet::CalcWindowSizePixel( const Size 
rItemSize, sal_uInt16 nDesireCol
 
 if ( mnSpacing )
 {
-nSpace = mnSpacing;
 aSize.Width()  += mnSpacing*(nCalcCols-1);
 aSize.Height() += mnSpacing*(nCalcLines-1);
 }
-else
-nSpace = 0;
 
 if ( nStyle  WB_NAMEFIELD )
 {
@@ -2414,7 +2408,7 @@ Size ValueSet::CalcWindowSizePixel( const Size 
rItemSize, sal_uInt16 nDesireCol
 
 if ( nStyle  WB_NONEFIELD )
 {
-aSize.Height() += nTxtHeight + n + nSpace;
+aSize.Height() += nTxtHeight + n + mnSpacing;
 if ( nStyle  WB_RADIOSEL )
 aSize.Height() += 8;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-01-31 Thread Julien Nabet
 svtools/source/filter/filter.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4d83e7010870fb8d74b19c28f1c4cd3fa616f514
Author: Julien Nabet serval2...@yahoo.fr
Date:   Tue Jan 31 22:56:20 2012 +0100

Fix Possible inefficient checking for 'rChunkData' emptiness

diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx
index bd95ab7..ee1f329 100644
--- a/svtools/source/filter/filter.cxx
+++ b/svtools/source/filter/filter.cxx
@@ -1961,7 +1961,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic 
rGraphic, const String
 if ( aAdditionalChunkSequence[ j 
].Value = aByteSeq )
 {
 std::vector 
vcl::PNGWriter::ChunkData  rChunkData = aPNGWriter.GetChunks();
-if ( rChunkData.size() )
+if ( !rChunkData.empty() )
 {
 sal_uInt32 nChunkLen = 
aByteSeq.getLength();
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-01-30 Thread Julien Nabet
 svtools/source/filter/sgvtext.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 10bfc4df5335c6cd2ae700df7485668d896998b5
Author: Julien Nabet serval2...@yahoo.fr
Date:   Mon Jan 30 21:21:34 2012 +0100

Replace literal control characters (thank you Eike !)

diff --git a/svtools/source/filter/sgvtext.cxx 
b/svtools/source/filter/sgvtext.cxx
index 8848c1f..28f950b 100644
--- a/svtools/source/filter/sgvtext.cxx
+++ b/svtools/source/filter/sgvtext.cxx
@@ -136,10 +136,10 @@ extern SgfFontLst* pSgfFonts;
 //EscBold, 
EscLSlnt,EscRSlnt,EscUndln,EscDbUnd,EscKaptF,EscStrik,EscDbStk,
 //EscSupSc,EscSubSc,Esc2DShd,Esc3DShd,Esc4DShd];
 // Justify muss spaetestens am Anfang des Absatzes stehen
-#define  EscSet'' /* Flag setzen  
 */
-#define  EscReset  '' /* Flag loeschen
 */
+#define  EscSet'\x1e' /* Flag setzen   
*/
+#define  EscReset  '\x1f' /* Flag loeschen 
*/
 #define  EscDeflt  '\x11' /* Flag auf default setzen   
 */
-#define  EscToggl  '' /* Flag Toggeln 
 */
+#define  EscToggl  '\x1d' /* Flag Toggeln  
*/
 #define  EscRelat  '%'
 #define  EscNoFlg  0
 #define  EscNoVal  -2147483647 /* -MaxLongInt */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-01-23 Thread Caolán McNamara
 svtools/source/misc/filechangedchecker.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1bc228f769be2999c10beefe224517804bb0316c
Author: Mariusz Dykierek mariuszdykie...@gmail.com
Date:   Mon Jan 23 12:52:55 2012 +

Same expression on both sides of || in if condition

diff --git a/svtools/source/misc/filechangedchecker.cxx 
b/svtools/source/misc/filechangedchecker.cxx
index 514841f..50d73da 100644
--- a/svtools/source/misc/filechangedchecker.cxx
+++ b/svtools/source/misc/filechangedchecker.cxx
@@ -83,7 +83,7 @@ bool FileChangedChecker::hasFileChanged()
 // Check if the seconds time stamp has any difference
 // If so, then our file has changed meanwhile
 if( newTime.Seconds != mLastModTime.Seconds ||
-newTime.Seconds != mLastModTime.Seconds )
+newTime.Nanosec != mLastModTime.Nanosec )
 {
 // Since the file has changed, set the new status as the file status 
and
 // return True
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-01-16 Thread Stephan Bergmann
 svtools/source/control/calendar.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e770d5300054d56545bba3c16635a14e92fde807
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Jan 16 16:01:25 2012 +0100

Fix #ifdef SAL_LOG_INFO region.

diff --git a/svtools/source/control/calendar.cxx 
b/svtools/source/control/calendar.cxx
index 0cf3041..0b291e0 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -217,10 +217,10 @@ void Calendar::ImplInit( WinBits nWinStyle )
 {
 #ifdef SAL_LOG_INFO
 lang::Locale aLoc( Application::GetAppLocaleDataWrapper().getLocale() 
);
-#endif
 SAL_INFO( svtools, Calendar::ImplInit: No ``gregorian'' calendar 
available for locale ``
  aLoc.Language  -  aLoc.Country
  '' and other calendars aren't supported. Using en-US 
fallback. );
+#endif
 
 /* If we ever wanted to support other calendars than Gregorian a lot of
  * rewrite would be necessary to internally replace use of class Date
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2012-01-14 Thread Matteo Casalin
 svtools/source/control/valueacc.cxx |2 
 svtools/source/control/valueimp.hxx |3 
 svtools/source/control/valueset.cxx |  175 +---
 3 files changed, 68 insertions(+), 112 deletions(-)

New commits:
commit e4938058e2cc21c705507c365c46f9bfb9ac828c
Author: Matteo Casalin matteo.casa...@poste.it
Date:   Tue Jan 3 14:43:58 2012 +0100

VALUESETITEM_SPACE is never set: remove related code

diff --git a/svtools/source/control/valueacc.cxx 
b/svtools/source/control/valueacc.cxx
index a8a544b..73e2dea 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -444,7 +444,7 @@ uno::Reference accessibility::XAccessible  SAL_CALL 
ValueSetAcc::getAccessible
 {
 ValueSetItem* pItem = (*mpParent-mpImpl-mpItemList)[ nItemPos ];
 
-if( ( pItem-meType != VALUESETITEM_SPACE )  
!pItem-maRect.IsEmpty() )
+if( !pItem-maRect.IsEmpty() )
xRet = pItem-GetAccessible( mbIsTransientChildrenDisabled );
 }
 }
diff --git a/svtools/source/control/valueimp.hxx 
b/svtools/source/control/valueimp.hxx
index 0a5398d..e393208 100644
--- a/svtools/source/control/valueimp.hxx
+++ b/svtools/source/control/valueimp.hxx
@@ -67,8 +67,7 @@ enum ValueSetItemType
 VALUESETITEM_NONE,
 VALUESETITEM_IMAGE,
 VALUESETITEM_COLOR,
-VALUESETITEM_USERDRAW,
-VALUESETITEM_SPACE
+VALUESETITEM_USERDRAW
 };
 
 // 
diff --git a/svtools/source/control/valueset.cxx 
b/svtools/source/control/valueset.cxx
index a8fdbab..cc1d9e6 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -213,9 +213,6 @@ void ValueSet::ImplInitScrollBar()
 
 void ValueSet::ImplFormatItem( ValueSetItem* pItem )
 {
-if ( pItem-meType == VALUESETITEM_SPACE )
-return;
-
 Rectangle aRect = pItem-maRect;
 WinBits nStyle = GetStyle();
 if ( nStyle  WB_ITEMBORDER )
@@ -1078,14 +1075,7 @@ ValueSetItem* ValueSet::ImplGetItem( size_t nPos )
 
 ValueSetItem* ValueSet::ImplGetFirstItem()
 {
-for ( size_t i = 0, nItemCount = mpImpl-mpItemList-size(); i  
nItemCount; ++i ) {
-ValueSetItem* pItem = (*mpImpl-mpItemList)[ i ];
-if ( pItem-meType != VALUESETITEM_SPACE ) {
-return pItem;
-}
-}
-
-return NULL;
+return mpImpl-mpItemList-size() ? (*mpImpl-mpItemList)[ 0 ] : NULL;
 }
 
 // ---
@@ -1098,7 +1088,7 @@ sal_uInt16 ValueSet::ImplGetVisibleItemCount() const
 {
 ValueSetItem* pItem = (*mpImpl-mpItemList)[ n ];
 
-if( pItem-meType != VALUESETITEM_SPACE  !pItem-maRect.IsEmpty() )
+if( !pItem-maRect.IsEmpty() )
 nRet++;
 }
 
@@ -1116,7 +1106,7 @@ ValueSetItem* ValueSet::ImplGetVisibleItem( sal_uInt16 
nVisiblePos )
 {
 ValueSetItem* pItem = (*mpImpl-mpItemList)[ n ];
 
-if( ( pItem-meType != VALUESETITEM_SPACE )  
!pItem-maRect.IsEmpty()  ( nVisiblePos == nFoundPos++ ) )
+if( !pItem-maRect.IsEmpty()  ( nVisiblePos == nFoundPos++ ) )
 pRet = pItem;
 }
 
@@ -1181,7 +1171,7 @@ void ValueSet::ImplTracking( const Point rPos, sal_Bool 
bRepeat )
 }
 
 ValueSetItem* pItem = ImplGetItem( ImplGetItem( rPos ) );
-if ( pItem  (pItem-meType != VALUESETITEM_SPACE) )
+if ( pItem )
 {
 if( GetStyle()  WB_MENUSTYLEVALUESET )
 mbHighlight = sal_True;
@@ -1209,7 +1199,7 @@ void ValueSet::ImplEndTracking( const Point rPos, 
sal_Bool bCancel )
 else
 pItem = ImplGetItem( ImplGetItem( rPos ) );
 
-if ( pItem  (pItem-meType != VALUESETITEM_SPACE) )
+if ( pItem )
 {
 SelectItem( pItem-mnId );
 if ( !mbSelection  !(GetStyle()  WB_NOPOINTERFOCUS) )
@@ -1236,7 +1226,7 @@ void ValueSet::MouseButtonDown( const MouseEvent rMEvt )
 if ( mbSelection )
 {
 mbHighlight = sal_True;
-if ( pItem  (pItem-meType != VALUESETITEM_SPACE) )
+if ( pItem )
 {
 mnOldItemId  = mnSelItemId;
 mnHighItemId = mnSelItemId;
@@ -1247,7 +1237,7 @@ void ValueSet::MouseButtonDown( const MouseEvent rMEvt )
 }
 else
 {
-if ( pItem  (pItem-meType != VALUESETITEM_SPACE)  
!rMEvt.IsMod2() )
+if ( pItem  !rMEvt.IsMod2() )
 {
 if ( rMEvt.GetClicks() == 1 )
 {
@@ -1341,67 +1331,44 @@ void ValueSet::KeyInput( const KeyEvent rKEvt )
 switch ( rKEvt.GetKeyCode().GetCode() )
 {
 case KEY_HOME:
-if ( mpNoneItem )
-nItemPos = VALUESET_ITEM_NONEITEM;
-else
-{
-nItemPos = 0;
-while ( ImplGetItem( nItemPos )-meType == VALUESETITEM_SPACE )
-nItemPos++;
-}
+nItemPos = mpNoneItem ? VALUESET_ITEM_NONEITEM : 0;
 

[Libreoffice-commits] .: svtools/source

2012-01-11 Thread Lionel Elie Mamane
 svtools/source/brwbox/brwbox1.cxx   |   22 +-
 svtools/source/brwbox/brwbox2.cxx   |   22 --
 svtools/source/brwbox/brwbox3.cxx   |2 +-
 svtools/source/brwbox/brwhead.cxx   |2 +-
 svtools/source/brwbox/datwin.cxx|2 +-
 svtools/source/brwbox/editbrowsebox.cxx |   12 +---
 6 files changed, 29 insertions(+), 33 deletions(-)

New commits:
commit a3261b16471995832f6791b5831c640c72948a95
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Jan 11 18:55:14 2012 +0100

fdo#44283: finish 8a17792f2e5 (Handle/invalid column ID cleanup)

diff --git a/svtools/source/brwbox/brwbox1.cxx 
b/svtools/source/brwbox/brwbox1.cxx
index cca40ce..5ddaa03 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -307,9 +307,9 @@ void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const 
XubString rText,
 
 if ( getDataWindow()-pHeaderBar )
 {
-// Handlecolumn nicht in der Headerbar
+// Handle column not in the header bar
 sal_uInt16 nHeaderPos = nPos;
-if (nHeaderPos != HEADERBAR_APPEND  !GetColumnId(0))
+if (nHeaderPos != HEADERBAR_APPEND  GetColumnId(0) == HandleColumnId 
)
 nHeaderPos--;
 getDataWindow()-pHeaderBar-InsertItem(
 nItemId, rText, nWidth, nBits, nHeaderPos );
@@ -347,7 +347,7 @@ void BrowseBox::FreezeColumn( sal_uInt16 nItemId, sal_Bool 
bFreeze )
 DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
 
 // never unfreeze the handle-column
-if ( nItemId == 0  !bFreeze )
+if ( nItemId == HandleColumnId  !bFreeze )
 return;
 
 // get the position in the current array
@@ -424,12 +424,8 @@ void BrowseBox::FreezeColumn( sal_uInt16 nItemId, sal_Bool 
bFreeze )
 
 void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos )
 {
-// never set pos of the handle-column
-if ( nColumnId == 0 )
-return;
-
-// do not move handle column
-if (nPos == 0  !(*pCols)[ 0 ]-GetId())
+// never set pos of the handle column
+if ( nColumnId == HandleColumnId )
 return;
 
 // get the position in the current array
@@ -504,7 +500,7 @@ void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, 
sal_uInt16 nPos )
 if ( getDataWindow()-pHeaderBar )
 {
 sal_uInt16 nNewPos = nPos;
-if ( !GetColumnId(0) )
+if ( GetColumnId(0) == HandleColumnId )
 --nNewPos;
 getDataWindow()-pHeaderBar-MoveItem(nColumnId,nNewPos);
 }
@@ -550,7 +546,7 @@ void BrowseBox::SetColumnTitle( sal_uInt16 nItemId, const 
String rTitle )
 DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
 
 // never set title of the handle-column
-if ( nItemId == 0 )
+if ( nItemId == HandleColumnId )
 return;
 
 // get the position in the current array
@@ -2383,8 +2379,8 @@ void BrowseBox::SetMode( BrowserMode nMode )
 if ( pDataWin )
 pDataWin-Invalidate();
 
-// kein Cursor auf Handle-Column
-if ( nCurColId == 0 )
+// no cursor on handle column
+if ( nCurColId == HandleColumnId )
 nCurColId = GetColumnId( 1 );
 
 m_nCurrentMode = nMode;
diff --git a/svtools/source/brwbox/brwbox2.cxx 
b/svtools/source/brwbox/brwbox2.cxx
index 92c29de..9a4a7b2 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -416,8 +416,8 @@ void BrowseBox::DrawCursor()
 else
 bReallyHide |= ( GetCursorHideCount()  0 );
 
-// keine Cursor auf Handle-Column
-if ( nCurColId == 0 )
+// no cursor on handle column
+if ( nCurColId == HandleColumnId )
 nCurColId = GetColumnId(1);
 
 // Cursor-Rechteck berechnen
@@ -1682,8 +1682,8 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent 
rEvt )
 // DataRow?
 if ( rEvt.GetRow() = 0 )
 {
-// Zeilenselektion?
-if ( rEvt.GetColumnId() == 0 || !bColumnCursor )
+// line selection?
+if ( rEvt.GetColumnId() == HandleColumnId || !bColumnCursor )
 {
 if ( bMultiSelection )
 {
@@ -1757,7 +1757,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent 
rEvt )
 }
 else
 {
-if ( bMultiSelection  rEvt.GetColumnId() == 0 )
+if ( bMultiSelection  rEvt.GetColumnId() == HandleColumnId )
 {
 // toggle all-selection
 if ( uRow.pSel-GetSelectCount()  ( GetRowCount() / 2 ) )
@@ -1990,7 +1990,7 @@ void BrowseBox::Dispatch( sal_uInt16 nId )
 if ( bColumnCursor )
 {
 sal_uInt16 nNewId = GetColumnId(ColCount() -1);
-bDone = (nNewId != 0)  GoToColumnId( nNewId );
+bDone = nNewId != HandleColumnId  GoToColumnId( nNewId );
 break;

[Libreoffice-commits] .: svtools/source

2012-01-11 Thread August Sodora
 svtools/source/control/inettbc.cxx |  107 ++---
 1 file changed, 30 insertions(+), 77 deletions(-)

New commits:
commit 116d77f97329a064f67da99fd4c25260008c9ba4
Author: August Sodora aug...@gmail.com
Date:   Wed Jan 11 20:46:25 2012 -0500

SvStringsDtor-std::vector

diff --git a/svtools/source/control/inettbc.cxx 
b/svtools/source/control/inettbc.cxx
index b9b526c..e33809b 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -68,8 +68,6 @@
 #include vector
 #include algorithm
 
-// ---
-
 using namespace ::rtl;
 using namespace ::ucbhelper;
 using namespace ::utl;
@@ -81,34 +79,30 @@ using namespace ::com::sun::star::task;
 using namespace ::com::sun::star::ucb;
 using namespace ::com::sun::star::uno;
 
-// ---
 class SvtURLBox_Impl
 {
 public:
-SvStringsDtor*  pURLs;
-SvStringsDtor*  pCompletions;
+std::vectorrtl::OUString  aURLs;
+std::vectorrtl::OUString  aCompletions;
 const IUrlFilter*   pUrlFilter;
 ::std::vector WildCardm_aFilters;
 
 static sal_Bool TildeParsing( String aText, String aBaseUrl );
 
 inline SvtURLBox_Impl( )
-:pURLs( NULL )
-,pCompletions( NULL )
-,pUrlFilter( NULL )
+:pUrlFilter( NULL )
 {
 FilterMatch::createWildCardFilterList(String(),m_aFilters);
 }
 };
 
-// ---
 class SvtMatchContext_Impl : public ::osl::Thread
 {
 static ::osl::Mutex*pDirMutex;
 
-SvStringsDtor   aPickList;
-SvStringsDtor*  pCompletions;
-SvStringsDtor*  pURLs;
+std::vectorrtl::OUString  aPickList;
+std::vectorrtl::OUString  aCompletions;
+std::vectorrtl::OUString  aURLs;
 svtools::AsynchronLink  aLink;
 String  aBaseURL;
 String  aText;
@@ -124,7 +118,7 @@ class SvtMatchContext_Impl : public ::osl::Thread
 virtual void SAL_CALL   Cancel();
 voidInsert( const String rCompletion, const 
String rURL, sal_Bool bForce = sal_False);
 voidReadFolder( const String rURL, const 
String rMatch, sal_Bool bSmart );
-voidFillPicklist( SvStringsDtor rPickList );
+voidFillPicklist(std::vectorrtl::OUString 
rPickList);
 
 public:
 static ::osl::Mutex*   GetMutex();
@@ -144,7 +138,6 @@ public:
 return pDirMutex;
 }
 
-//-
 SvtMatchContext_Impl::SvtMatchContext_Impl(
 SvtURLBox* pBoxP, const String rText )
 : aLink( STATIC_LINK( this, SvtMatchContext_Impl, Select_Impl ) )
@@ -155,9 +148,6 @@ SvtMatchContext_Impl::SvtMatchContext_Impl(
 , bOnlyDirectories( pBoxP-bOnlyDirectories )
 , bNoSelection( pBoxP-bNoSelection )
 {
-pURLs = new SvStringsDtor;
-pCompletions = new SvStringsDtor;
-
 aLink.CreateMutex();
 
 FillPicklist( aPickList );
@@ -165,16 +155,12 @@ SvtMatchContext_Impl::SvtMatchContext_Impl(
 create();
 }
 
-//-
 SvtMatchContext_Impl::~SvtMatchContext_Impl()
 {
 aLink.ClearPendingCall();
-delete pURLs;
-delete pCompletions;
 }
 
-//-
-void SvtMatchContext_Impl::FillPicklist( SvStringsDtor rPickList )
+void SvtMatchContext_Impl::FillPicklist(std::vectorrtl::OUString rPickList)
 {
 // Einlesung der Historypickliste
 Sequence Sequence PropertyValue   seqPicklist = 
SvtHistoryOptions().GetList( eHISTORY );
@@ -195,22 +181,19 @@ void SvtMatchContext_Impl::FillPicklist( SvStringsDtor 
rPickList )
 {
 seqPropertySet[nProperty].Value = sTitle;
 aURL.SetURL( sTitle );
-const StringPtr pStr = new String( aURL.GetMainURL( 
INetURLObject::DECODE_WITH_CHARSET ) );
-rPickList.Insert( pStr, (sal_uInt16) nItem );
+rPickList.insert(rPickList.begin() + nItem, 
aURL.GetMainURL(INetURLObject::DECODE_WITH_CHARSET));
 break;
 }
 }
 }
 }
 
-//-
 void SAL_CALL SvtMatchContext_Impl::Cancel()
 {
 // Cancel button pressed
 terminate();
 }
 
-//-
 void SvtMatchContext_Impl::Stop()
 {
 bStop = sal_True;
@@ -219,7 +202,6 @@ void SvtMatchContext_Impl::Stop()
 terminate();
 }
 
-//-
 void 

[Libreoffice-commits] .: svtools/source

2011-12-19 Thread Caolán McNamara
 svtools/source/filter/filter.cxx |   36 ++--
 1 file changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 71b63586c5fe33fdf836ecb417d11f9c2d4e4b72
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Dec 19 14:48:43 2011 +

Resolves: fdo#43082 can't claim its not a DXF just because didn't see 
SECTION

typedetection doesn't know about 999 COMMENT, it should really.

diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx
index ef07514..f61990b 100644
--- a/svtools/source/filter/filter.cxx
+++ b/svtools/source/filter/filter.cxx
@@ -497,36 +497,36 @@ static sal_Bool ImpPeekGraphicFormat( SvStream rStream, 
String rFormatExtensio
 //--- DXF 
 if( !bTest || ( rFormatExtension.CompareToAscii( DXF, 3 ) == 
COMPARE_EQUAL ) )
 {
-bSomethingTested=sal_True;
+//Binary DXF File Format
+if( strncmp( (const char*) sFirstBytes, AutoCAD Binary DXF, 18 ) == 
0 )
+{
+rFormatExtension = UniString::CreateFromAscii( DXF, 3 );
+return sal_True;
+}
 
+//ASCII DXF File Format
 i=0;
 while (i256  sFirstBytes[i]=32)
-i++;
+++i;
 
-if (i256)
+if (i256  sFirstBytes[i]=='0')
 {
-if( sFirstBytes[i]=='0' )
-i++;
-else
-i=256;
-}
-while( i256  sFirstBytes[i]=32 )
-i++;
+++i;
 
-if (i+7256)
-{
-if (strncmp((char*)(sFirstBytes+i),SECTION,7)==0)
+//only now do we have sufficient data to make a judgement
+//based on a '0' + 'SECTION' == DXF argument
+bSomethingTested=sal_True;
+
+while( i256  sFirstBytes[i]=32 )
+++i;
+
+if (i+7256  (strncmp((const 
char*)(sFirstBytes+i),SECTION,7)==0))
 {
 rFormatExtension = UniString::CreateFromAscii( DXF, 3 );
 return sal_True;
 }
 }
 
-if( strncmp( (char*) sFirstBytes, AutoCAD Binary DXF, 18 ) == 0 )
-{
-rFormatExtension = UniString::CreateFromAscii( DXF, 3 );
-return sal_True;
-}
 }
 
 //--- PCT 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source tools/inc tools/source

2011-12-19 Thread Thorsten Behrens
 svtools/source/filter/filter.cxx |1 
 tools/inc/tools/stream.hxx   |1 
 tools/source/generic/color.cxx   |  146 +-
 tools/source/generic/gen.cxx |  396 ---
 tools/source/generic/poly.cxx|   98 -
 5 files changed, 15 insertions(+), 627 deletions(-)

New commits:
commit 864bc59e66e92eabeef26222301607a7a5745bea
Author: Matteo Casalin matteo.casa...@poste.it
Date:   Sat Dec 17 11:18:58 2011 +0100

Removed COMPRESSMODE_FULL support from SvStream

diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx
index f61990b..8047b7b 100644
--- a/svtools/source/filter/filter.cxx
+++ b/svtools/source/filter/filter.cxx
@@ -2034,7 +2034,6 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic 
rGraphic, const String
 
 SvMemoryStream aMemStm( 65535, 65535 );
 
-aMemStm.SetCompressMode( COMPRESSMODE_FULL 
);
 ( (GDIMetaFile) aGraphic.GetGDIMetaFile() 
).Write( aMemStm );
 
 xActiveDataSource-setOutputStream( 
::com::sun::star::uno::Reference ::com::sun::star::io::XOutputStream (
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index 1554776..66312b7 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -90,7 +90,6 @@ typedef sal_uInt16 StreamMode;
 #define NUMBERFORMAT_INT_BIGENDIAN  (sal_uInt16)0x
 #define NUMBERFORMAT_INT_LITTLEENDIAN   (sal_uInt16)0x
 
-#define COMPRESSMODE_FULL   (sal_uInt16)0x
 #define COMPRESSMODE_NONE   (sal_uInt16)0x
 #define COMPRESSMODE_ZBITMAP(sal_uInt16)0x0001
 #define COMPRESSMODE_NATIVE (sal_uInt16)0x0010
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index 6ee5b0d..f06d3d1 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -296,88 +296,18 @@ SvStream operator( SvStream rIStream, Color rColor )
 DBG_ASSERTWARNING( rIStream.GetVersion(), Color:: - Solar-Version not 
set on rIStream );
 
 sal_uInt16  nColorName;
-sal_uInt16  nRed;
-sal_uInt16  nGreen;
-sal_uInt16  nBlue;
 
 rIStream  nColorName;
 
 if ( nColorName  COL_NAME_USER )
 {
-if ( rIStream.GetCompressMode() == COMPRESSMODE_FULL )
-{
-unsigned char   cAry[6];
-sal_uInt16  i = 0;
-
-nRed= 0;
-nGreen  = 0;
-nBlue   = 0;
-
-if ( nColorName  COL_RED_2B )
-i += 2;
-else if ( nColorName  COL_RED_1B )
-i++;
-if ( nColorName  COL_GREEN_2B )
-i += 2;
-else if ( nColorName  COL_GREEN_1B )
-i++;
-if ( nColorName  COL_BLUE_2B )
-i += 2;
-else if ( nColorName  COL_BLUE_1B )
-i++;
-
-rIStream.Read( cAry, i );
-i = 0;
-
-if ( nColorName  COL_RED_2B )
-{
-nRed = cAry[i];
-nRed = 8;
-i++;
-nRed |= cAry[i];
-i++;
-}
-else if ( nColorName  COL_RED_1B )
-{
-nRed = cAry[i];
-nRed = 8;
-i++;
-}
-if ( nColorName  COL_GREEN_2B )
-{
-nGreen = cAry[i];
-nGreen = 8;
-i++;
-nGreen |= cAry[i];
-i++;
-}
-else if ( nColorName  COL_GREEN_1B )
-{
-nGreen = cAry[i];
-nGreen = 8;
-i++;
-}
-if ( nColorName  COL_BLUE_2B )
-{
-nBlue = cAry[i];
-nBlue = 8;
-i++;
-nBlue |= cAry[i];
-i++;
-}
-else if ( nColorName  COL_BLUE_1B )
-{
-nBlue = cAry[i];
-nBlue = 8;
-i++;
-}
-}
-else
-{
-rIStream  nRed;
-rIStream  nGreen;
-rIStream  nBlue;
-}
+sal_uInt16 nRed;
+sal_uInt16 nGreen;
+sal_uInt16 nBlue;
+
+rIStream  nRed;
+rIStream  nGreen;
+rIStream  nBlue;
 
 rColor.mnColor = RGB_COLORDATA( nRed8, nGreen8, nBlue8 );
 }
@@ -441,64 +371,10 @@ SvStream operator( SvStream rOStream, const Color 
rColor )
 nGreen  = (nGreen8) + nGreen;
 nBlue   = (nBlue8) + nBlue;
 
-if ( rOStream.GetCompressMode() == COMPRESSMODE_FULL )
-{
-unsigned char   cAry[6];
-sal_uInt16  i = 0;
-
-if ( nRed  0x00FF )
-{
-nColorName |= COL_RED_2B;
-cAry[i] = (unsigned char)(nRed  0xFF);
-

[Libreoffice-commits] .: svtools/source

2011-12-17 Thread Matus Kukan
 svtools/source/graphic/graphic.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3744cd818383fd954125a6567856e92198792cf1
Author: Matúš Kukan matus.ku...@gmail.com
Date:   Sat Dec 17 13:29:50 2011 +0100

gcc-trunk: avoid confusion

diff --git a/svtools/source/graphic/graphic.hxx 
b/svtools/source/graphic/graphic.hxx
index 7b4f5e0..a1efca0 100644
--- a/svtools/source/graphic/graphic.hxx
+++ b/svtools/source/graphic/graphic.hxx
@@ -58,7 +58,7 @@ public:
 Graphic();
 ~Graphic() throw();
 
-using unographic::GraphicDescriptor::init;
+using ::unographic::GraphicDescriptor::init;
 void init( const ::Graphic rGraphic ) throw();
 
 static const ::Graphic* getImplementation( const 
::com::sun::star::uno::Reference ::com::sun::star::uno::XInterface  rxIFace 
) throw();
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2011-12-14 Thread Michael Meeks
 svtools/source/filter/jpeg/jpeg.cxx |   37 
 1 file changed, 21 insertions(+), 16 deletions(-)

New commits:
commit fe40da4cb640819d869d1c925869bc87ede9bbfe
Author: Michael Meeks michael.me...@suse.com
Date:   Wed Dec 14 10:02:39 2011 +

Cleanup jpeg bitmap creation  loading code

diff --git a/svtools/source/filter/jpeg/jpeg.cxx 
b/svtools/source/filter/jpeg/jpeg.cxx
index 6a70340..3143264 100644
--- a/svtools/source/filter/jpeg/jpeg.cxx
+++ b/svtools/source/filter/jpeg/jpeg.cxx
@@ -328,17 +328,26 @@ JPEGReader::~JPEGReader()
 
 // 
 
-void* JPEGReader::CreateBitmap( void* pParam )
+void* JPEGReader::CreateBitmap( void* _pParam )
 {
-SizeaSize( ((JPEGCreateBitmapParam*)pParam)-nWidth,
-((JPEGCreateBitmapParam*)pParam)-nHeight );
-sal_BoolbGray = ((JPEGCreateBitmapParam*)pParam)-bGray != 0;
+JPEGCreateBitmapParam *pParam = (JPEGCreateBitmapParam *) _pParam;
+
+if (pParam-nWidth  SAL_MAX_INT32/8 || pParam-nHeight  SAL_MAX_INT32/8)
+return NULL; // avoid overflows later
+
+SizeaSize( pParam-nWidth, pParam-nHeight );
+sal_BoolbGray = pParam-bGray != 0;
 
 void* pBmpBuf = NULL;
 
 if( pAcc )
 aBmp.ReleaseAccess( pAcc );
 
+sal_uInt64 nSize = aSize.Width();
+nSize *= aSize.Height();
+if (nSize  SAL_MAX_INT32 / 24)
+return NULL;
+
 if( bGray )
 {
 BitmapPalette aGrayPal( 256 );
@@ -359,12 +368,11 @@ void* JPEGReader::CreateBitmap( void* pParam )
 unsigned long nUnit = ((JPEGCreateBitmapParam*)pParam)-density_unit;
 
 if( ( ( 1 == nUnit ) || ( 2 == nUnit ) ) 
-( (JPEGCreateBitmapParam*) pParam )-X_density 
-( (JPEGCreateBitmapParam*) pParam )-Y_density )
+pParam-X_density  pParam-Y_density )
 {
 Point   aEmptyPoint;
-FractionaFractX( 1, 
((JPEGCreateBitmapParam*)pParam)-X_density );
-FractionaFractY( 1, 
((JPEGCreateBitmapParam*)pParam)-Y_density );
+FractionaFractX( 1, pParam-X_density );
+FractionaFractY( 1, pParam-Y_density );
 MapMode aMapMode( nUnit == 1 ? MAP_INCH : MAP_CM, aEmptyPoint, 
aFractX, aFractY );
 SizeaPrefSize = OutputDevice::LogicToLogic( aSize, 
aMapMode, MAP_100TH_MM );
 
@@ -377,8 +385,6 @@ void* JPEGReader::CreateBitmap( void* pParam )
 
 if( pAcc )
 {
-long nAlignedWidth;
-
 const sal_uLong nFormat = pAcc-GetScanlineFormat();
 
 if(
@@ -387,16 +393,15 @@ void* JPEGReader::CreateBitmap( void* pParam )
   )
 {
 pBmpBuf = pAcc-GetBuffer();
-nAlignedWidth = pAcc-GetScanlineSize();
-((JPEGCreateBitmapParam*)pParam)-bTopDown = pAcc-IsTopDown();
+pParam-nAlignedWidth = pAcc-GetScanlineSize();
+pParam-bTopDown = pAcc-IsTopDown();
 }
 else
 {
-nAlignedWidth = AlignedWidth4Bytes( aSize.Width() * ( bGray ? 8 : 
24 ) );
-((JPEGCreateBitmapParam*)pParam)-bTopDown = sal_True;
-pBmpBuf = pBuffer = rtl_allocateMemory( nAlignedWidth * 
aSize.Height() );
+pParam-nAlignedWidth = AlignedWidth4Bytes( aSize.Width() * ( 
bGray ? 8 : 24 ) );
+pParam-bTopDown = sal_True;
+pBmpBuf = pBuffer = rtl_allocateMemory( pParam-nAlignedWidth * 
aSize.Height() );
 }
-((JPEGCreateBitmapParam*)pParam)-nAlignedWidth = nAlignedWidth;
 }
 
 return pBmpBuf;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2011-12-11 Thread Julien Nabet
 svtools/source/svhtml/htmlout.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit a1b970a10e00b34ab6d8608cb02247b8f0195573
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Dec 11 13:07:04 2011 +0100

Remove ByteString

diff --git a/svtools/source/svhtml/htmlout.cxx 
b/svtools/source/svhtml/htmlout.cxx
index deb530b..cf3f746 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -885,9 +885,8 @@ SvStream HTMLOutFuncs::OutScript( SvStream rStrm,
 {
 // Wir schreiben das Modul mm ANSI-Zeichensatz, aber mit
 // System-Zeilenumbruechen raus.
-ByteString sSource(rtl::OUStringToOString(rSource, eDestEnc));
-sSource.ConvertLineEnd( GetSystemLineEnd() );
-rStrm  sSource.GetBuffer();
+rtl::OString sSource(rtl::OUStringToOString(rSource, eDestEnc));
+rStrm  sSource.getStr()  sNewLine;
 }
 rStrm  sNewLine;
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source sw/source

2011-10-25 Thread Thorsten Behrens
 svtools/source/filter/filter.cxx |   28 ++--
 sw/source/core/graphic/ndgrf.cxx |   10 +-
 2 files changed, 31 insertions(+), 7 deletions(-)

New commits:
commit c0913d78c258f7e49b52f45909b2cebbd9fb6103
Author: Thorsten Behrens tbehr...@suse.com
Date:   Tue Oct 25 21:02:03 2011 +0200

Fix fdo#41995 fallout - recognize .svg in odf containers

More code paths that needed fixing - Writer sports its own Graphic
loading implementation, so that had the need for the stream name
fwd-ing, too. The svg deep type detection was necessary for e.g. the
flat odf - which has inline svg without any filename.

diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx
index b10a4ab..ddab749 100644
--- a/svtools/source/filter/filter.cxx
+++ b/svtools/source/filter/filter.cxx
@@ -667,6 +667,30 @@ static sal_Bool ImpPeekGraphicFormat( SvStream rStream, 
String rFormatExtensio
 // just a simple test for the extension
 if( rFormatExtension.CompareToAscii( SVG, 3 ) == COMPARE_EQUAL )
 return sal_True;
+
+sal_uLong nSize = ( nStreamLen  1024 ) ? 1024 : nStreamLen;
+std::vectorsal_uInt8 aBuf(nSize);
+
+rStream.Seek( nStreamPos );
+rStream.Read( aBuf[0], nSize );
+
+// read the first 1024 bytes  check a few magic string
+// constants (heuristically)
+sal_Int8 aMagic1[] = {'', 's', 'v', 'g'};
+if( std::search(aBuf.begin(), aBuf.end(),
+aMagic1, aMagic1+SAL_N_ELEMENTS(aMagic1)) != 
aBuf.end() )
+{
+rFormatExtension = UniString::CreateFromAscii( SVG, 3 );
+return sal_True;
+}
+
+sal_Int8 aMagic2[] = {'D', 'O', 'C', 'T', 'Y', 'P', 'E', ' ', 's', 
'v', 'g'};
+if( std::search(aBuf.begin(), aBuf.end(),
+aMagic2, aMagic2+SAL_N_ELEMENTS(aMagic2)) != 
aBuf.end() )
+{
+rFormatExtension = UniString::CreateFromAscii( SVG, 3 );
+return sal_True;
+}
 }
 
 //--- TGA 
@@ -743,7 +767,7 @@ sal_uInt16 GraphicFilter::ImpTestOrFindFormat( const 
String rPath, SvStream rS
 else
 {
 String aTmpStr( pConfig-GetImportFormatExtension( rFormat ) );
-if( !ImpPeekGraphicFormat( rStream, aTmpStr, sal_True ) )
+if( !ImpPeekGraphicFormat( rStream, aTmpStr.ToUpperAscii(), sal_True ) 
)
 return GRFILTER_FORMATERROR;
 if ( pConfig-GetImportFormatExtension( rFormat 
).EqualsIgnoreCaseAscii( pcd ) )
 {
@@ -2180,7 +2204,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData*, 
pData )
 {
 // Import
 nFormat = GetImportFormatNumberForShortName( String( 
aShortName.GetBuffer(), RTL_TEXTENCODING_UTF8 ) );
-nRet = ImportGraphic( pData-maGraphic, String(), pData-mrStm ) 
== 0;
+nRet = ImportGraphic( pData-maGraphic, String(), pData-mrStm, 
nFormat ) == 0;
 }
 else if( aShortName.Len() )
 {
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index b407c9b..11d9555 100755
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -386,12 +386,11 @@ Size SwGrfNode::GetTwipSize() const
 sal_Bool SwGrfNode::ImportGraphic( SvStream rStrm )
 {
 Graphic aGraphic;
-if( !GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, String(), 
rStrm ) )
+const String aGraphicURL( aGrfObj.GetUserData() );
+if( !GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, 
aGraphicURL, rStrm ) )
 {
-const String aUserData( aGrfObj.GetUserData() );
-
 aGrfObj.SetGraphic( aGraphic );
-aGrfObj.SetUserData( aUserData );
+aGrfObj.SetUserData( aGraphicURL );
 return sal_True;
 }
 
@@ -879,7 +878,8 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const 
SwNodeIndex rIdx ) const
 SvStream* pStrm = _GetStreamForEmbedGrf( refPics, aStrmName );
 if ( pStrm )
 {
-GraphicFilter::GetGraphicFilter().ImportGraphic( aTmpGrf, 
String(), *pStrm );
+const String aGraphicURL( aGrfObj.GetUserData() );
+GraphicFilter::GetGraphicFilter().ImportGraphic( aTmpGrf, 
aGraphicURL, *pStrm );
 delete pStrm;
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2011-10-24 Thread Caolán McNamara
 svtools/source/misc/sampletext.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 21696eadc88f67b4900a580bcd90284b8f449e75
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Oct 24 11:06:01 2011 +0100

seperate words in hebrew text preview

diff --git a/svtools/source/misc/sampletext.cxx 
b/svtools/source/misc/sampletext.cxx
index e1b52c9..33a49c6 100644
--- a/svtools/source/misc/sampletext.cxx
+++ b/svtools/source/misc/sampletext.cxx
@@ -145,9 +145,9 @@ rtl::OUString 
makeShortRepresentativeTextForScript(UScriptCode eScript)
 case USCRIPT_HEBREW:
 {
 const sal_Unicode aHebr[] = {
-0x05D0, 0x05B8, 0x05DC, 0x05B6, 0x05E3, 0x05D1, 0x05B5, 0x05BC,
-0x05D9, 0x05EA, 0x0020, 0x05E2, 0x05B4, 0x05D1, 0x05B0, 0x05E8,
-0x05B4, 0x05D9
+0x05D0, 0x05B8, 0x05DC, 0x05B6, 0x05E3, 0x05BE, 0x05D1, 0x05B5,
+0x05BC, 0x05D9, 0x05EA, 0x0020, 0x05E2, 0x05B4, 0x05D1, 0x05B0,
+0x05E8, 0x05B4, 0x05D9
 };
 sSampleText = rtl::OUString(aHebr, SAL_N_ELEMENTS(aHebr));
 break;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2011-10-13 Thread Julien Nabet
 svtools/source/filter/jpeg/jpeg.cxx |8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 93e971ac54e94ad58b4199e5d635133e738c28a1
Author: Julien Nabet serval2...@yahoo.fr
Date:   Thu Oct 13 22:18:00 2011 +0200

A cppcheck cleaning with some simplification

diff --git a/svtools/source/filter/jpeg/jpeg.cxx 
b/svtools/source/filter/jpeg/jpeg.cxx
index 14a6988..f72d9fb 100644
--- a/svtools/source/filter/jpeg/jpeg.cxx
+++ b/svtools/source/filter/jpeg/jpeg.cxx
@@ -193,7 +193,7 @@ extern C void init_source (j_decompress_ptr cinfo)
 
 long StreamRead( SvStream* pSvStm, void* pBuffer, long nBufferSize )
 {
-longnRead;
+longnRead = 0;
 
 if( pSvStm-GetError() != ERRCODE_IO_PENDING )
 {
@@ -203,8 +203,6 @@ long StreamRead( SvStream* pSvStm, void* pBuffer, long 
nBufferSize )
 
 if( pSvStm-GetError() == ERRCODE_IO_PENDING )
 {
-nRead = 0;
-
 // Damit wir wieder an die alte Position
 // seeken koennen, setzen wir den Error temp.zurueck
 pSvStm-ResetError();
@@ -212,8 +210,6 @@ long StreamRead( SvStream* pSvStm, void* pBuffer, long 
nBufferSize )
 pSvStm-SetError( ERRCODE_IO_PENDING );
 }
 }
-else
-nRead = 0;
 
 return nRead;
 }
@@ -225,7 +221,7 @@ extern C boolean fill_input_buffer (j_decompress_ptr 
cinfo)
 
   nbytes = StreamRead(src-infile, src-buffer, BUF_SIZE);
 
-  if (nbytes = 0) {
+  if (!nbytes) {
 if (src-start_of_file) /* Treat empty input file as fatal error */
   ERREXIT(cinfo, JERR_INPUT_EMPTY);
 WARNMS(cinfo, JWRN_JPEG_EOF);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2011-10-05 Thread Caolán McNamara
 svtools/source/filter/wmf/winmtf.hxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 03268fc84e1c3a0fb588ddff340b052f70c5100a
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Oct 5 14:01:15 2011 +0100

rejig this to remove self-assign

diff --git a/svtools/source/filter/wmf/winmtf.hxx 
b/svtools/source/filter/wmf/winmtf.hxx
index 693190c..a7c0b48 100644
--- a/svtools/source/filter/wmf/winmtf.hxx
+++ b/svtools/source/filter/wmf/winmtf.hxx
@@ -738,9 +738,9 @@ public:
 const Point rEndAngle
 );
 voidDrawPolygon( Polygon rPolygon, sal_Bool bRecordPath = 
sal_False );
-voidDrawPolygon( Polygon rPolygon, sal_Bool bDrawTo, 
sal_Bool bRecordPath)
-{ //only for the template compatibility
-bDrawTo = bDrawTo; //to avoid complaints about 
unused parameter
+voidDrawPolygon( Polygon rPolygon, sal_Bool /*bDrawTo*/, 
sal_Bool bRecordPath)
+{
+//For ReadAndDrawPolygon template compatibility
 DrawPolygon(rPolygon, bRecordPath);
 }
 voidDrawPolyPolygon( PolyPolygon rPolyPolygon, sal_Bool 
bRecordPath = sal_False );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svtools/source

2011-09-27 Thread Caolán McNamara
 svtools/source/filter/wmf/enhwmf.cxx |  136 +--
 svtools/source/filter/wmf/winmtf.hxx |3 
 2 files changed, 55 insertions(+), 84 deletions(-)

New commits:
commit f6a34255af1339cd7132b7527dc0c10c10d38249
Author: Marc-Andre Laverdiere marc-an...@atc.tcs.com
Date:   Mon Sep 19 17:27:50 2011 +0530

Minor refactoring on WMF loading

diff --git a/svtools/source/filter/wmf/enhwmf.cxx 
b/svtools/source/filter/wmf/enhwmf.cxx
index 10fa8f3..618f13d 100644
--- a/svtools/source/filter/wmf/enhwmf.cxx
+++ b/svtools/source/filter/wmf/enhwmf.cxx
@@ -351,14 +351,14 @@ void EnhWMFReader::ReadGDIComment()
  * pWMF: the stream containings the polygons
  * */
 template class T
-Polygon WMFReadPolygon(sal_uInt16 nStartIndex, sal_uInt16 nPoints, SvStream 
rWMF)
+Polygon EnhWMFReader::ReadPolygon(sal_uInt16 nStartIndex, sal_uInt16 nPoints)
 {
 Polygon aPolygon(nPoints);
-for (sal_uInt16 i = nStartIndex ; i  nPoints  rWMF.good(); i++ )
+for (sal_uInt16 i = nStartIndex ; i  nPoints  pWMF-good(); i++ )
 {
 T nX, nY;
-rWMF  nX  nY;
-if (!rWMF.good())
+*pWMF  nX  nY;
+if (pWMF-good())
 break;
 aPolygon[ i ] = Point( nX, nY );
 }
@@ -366,6 +366,44 @@ Polygon WMFReadPolygon(sal_uInt16 nStartIndex, sal_uInt16 
nPoints, SvStream rWM
 return aPolygon;
 }
 
+template class T
+void EnhWMFReader::ReadAndDrawPolyPolygon()
+{
+sal_uInt32  i, nPoly, nGesPoints, nPoints;
+pWMF-SeekRel( 0x10 );
+// Number of polygons
+*pWMF  nPoly  nGesPoints;
+if ( pWMF-good() 
+( nGesPoints  SAL_MAX_UINT32 / sizeof(Point) )  //check against 
numeric overflowing
+( nPoly  SAL_MAX_UINT32 / sizeof(sal_uInt16) ) 
+( (  nPoly * sizeof( sal_uInt16 ) ) = ( nEndPos - pWMF-Tell() ) ))
+{
+//Get number of points in each polygon
+sal_uInt16 * pnPoints = new sal_uInt16[ nPoly ];
+for ( i = 0; i  nPoly  pWMF-good(); i++ )
+{
+*pWMF  nPoints;
+pnPoints[ i ] = (sal_uInt16)nPoints;
+} //end for
+if ( pWMF-good()  ( nGesPoints * (sizeof(T)+sizeof(T)) ) = ( 
nEndPos - pWMF-Tell() ) )
+{
+// Get polygon points
+Point * pPtAry  = new Point[ nGesPoints ];
+for ( i = 0; i  nGesPoints  pWMF-good(); i++ )
+{
+T nX, nY;
+*pWMF  nX  nY;
+pPtAry[ i ] = Point( nX, nY );
+} //end for
+// Create PolyPolygon Actions
+PolyPolygon aPolyPoly( (sal_uInt16)nPoly, pnPoints, pPtAry );
+pOut-DrawPolyPolygon( aPolyPoly, bRecordPath );
+delete[] pPtAry;
+} //end if
+delete[] pnPoints;
+} //end if
+}
+
 sal_Bool EnhWMFReader::ReadEnhWMF()
 {
 sal_uInt32  nStretchBltMode = 0;
@@ -452,7 +490,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 i++;
 nPoints++;
 }
-Polygon aPoly = WMFReadPolygonsal_Int32(i, nPoints, *pWMF);
+Polygon aPoly = ReadPolygonsal_Int32(i, nPoints);
 pOut-DrawPolyBezier( aPoly, bFlag, bRecordPath );
 }
 break;
@@ -461,7 +499,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 {
 pWMF-SeekRel( 16 );
 *pWMF  nPoints;
-Polygon aPoly = WMFReadPolygonsal_Int32(0, nPoints, *pWMF);
+Polygon aPoly = ReadPolygonsal_Int32(0, nPoints);
 pOut-DrawPolygon( aPoly, bRecordPath );
 }
 break;
@@ -478,7 +516,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 i++;
 nPoints++;
 }
-Polygon aPolygon = WMFReadPolygonsal_Int32(i, nPoints, 
*pWMF);
+Polygon aPolygon = ReadPolygonsal_Int32(i, nPoints);
 pOut-DrawPolyLine( aPolygon, bFlag, bRecordPath );
 }
 break;
@@ -523,42 +561,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
 
 case EMR_POLYPOLYGON :
 {
-sal_uInt32  i, nPoly, nGesPoints;
-pWMF-SeekRel( 0x10 );
-
-// Number of polygons:
-*pWMF  nPoly  nGesPoints;
-
-if ( ( nGesPoints  SAL_MAX_UINT32 / sizeof(Point) )  ( 
nPoly  SAL_MAX_UINT32 / sizeof(sal_uInt16) ) )
-{
-if ( ( nPoly * sizeof(sal_uInt16) ) = ( nEndPos - 
pWMF-Tell() ) )
-{
-sal_uInt16* pnPoints = new sal_uInt16[ nPoly ];
-
-for ( i = 0; i  nPoly; i++ )
-{
-*pWMF  nPoints;
-pnPoints[ i ] = (sal_uInt16)nPoints;
-}
-
-if ( ( nGesPoints * 
(sizeof(sal_uInt32)+sizeof(sal_uInt32)) ) = ( nEndPos - pWMF-Tell() ) )
-{
-