[Libreoffice-commits] .: sc/source

2012-04-24 Thread Ivan Timofeev
 sc/source/ui/navipi/navipi.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 1a87849f1971bf6802cc3d6395181b6ff0ceeed1
Author: Ivan Timofeev timofeev@gmail.com
Date:   Tue Apr 24 21:22:16 2012 +0400

fdo#34999: UI: Navigator row selector pane exceeds reserved grey area

diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index c6d4afa..5eabf0a 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -675,7 +675,9 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, 
SfxChildWindowContext* pCW, Win
 
 aTitleBase = GetText();
 
-long nListboxYPos = aTbxCmd.GetPosPixel().Y() + 
aTbxCmd.GetSizePixel().Height() + 4;
+long nListboxYPos =
+Max( aTbxCmd.GetPosPixel().Y() + aTbxCmd.GetSizePixel().Height(),
+ aEdRow.GetPosPixel().Y() + aEdRow.GetSizePixel().Height() ) + 4;
 aLbEntries.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y);
 
 nBorderOffset = aLbEntries.GetPosPixel().X();
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: cui/source i18nutil/inc i18nutil/source sd/inc sd/source vcl/source

2012-04-23 Thread Ivan Timofeev
 cui/source/tabpages/page.cxx  |4 ++--
 cui/source/tabpages/page.h|3 ++-
 cui/source/tabpages/page.src  |3 ++-
 i18nutil/inc/i18nutil/paper.hxx   |7 ---
 i18nutil/source/utility/paper.cxx |6 --
 sd/inc/sdenumdef.hxx  |2 +-
 sd/source/core/drawdoc2.cxx   |2 +-
 sd/source/ui/app/sdmod1.cxx   |   10 ++
 sd/source/ui/dlg/dlgass.cxx   |6 ++
 sd/source/ui/dlg/dlgass.src   |   10 ++
 sd/source/ui/inc/dlgass.hrc   |1 +
 vcl/source/gdi/print.cxx  |2 +-
 vcl/source/src/print.src  |1 -
 13 files changed, 44 insertions(+), 13 deletions(-)

New commits:
commit 9c99dac0968c405537cd6094a46c7f6de01ccc4e
Author: Rob Snelders programm...@ertai.nl
Date:   Wed Apr 18 23:30:26 2012 +0200

fdo#42986 Add Presentationsize 16:9 Widescreen

diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index efa495b..417b311 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -989,7 +989,7 @@ IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox 
*, pBox )
 {
 // Draw: if paper format the margin shall be 1 cm
 long nTmp = 0;
-sal_Bool bScreen = ( PAPER_SCREEN == ePaper );
+sal_Bool bScreen = (( PAPER_SCREEN_4_3 == ePaper )|| ( 
PAPER_SCREEN_16_9 == ePaper));
 
 if ( !bScreen )
 // no margin if screen
@@ -1400,7 +1400,7 @@ int SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet )
 sal_uInt16 nPos = aPaperSizeBox.GetSelectEntryPos();
 Paper ePaper = (Paper)(sal_uLong)aPaperSizeBox.GetEntryData( nPos );
 
-if ( ePaper != PAPER_SCREEN  IsMarginOutOfRange() )
+if ( ePaper != PAPER_SCREEN_4_3  ePaper != PAPER_SCREEN_16_9  
IsMarginOutOfRange() )
 {
 if ( QueryBox( this, WB_YES_NO | WB_DEF_NO, aPrintRangeQueryText 
).Execute() == RET_NO )
 {
diff --git a/cui/source/tabpages/page.h b/cui/source/tabpages/page.h
index bc7ad78..87858fe 100644
--- a/cui/source/tabpages/page.h
+++ b/cui/source/tabpages/page.h
@@ -54,7 +54,7 @@
 #define PAPERSIZE_C65   16
 #define PAPERSIZE_DL17
 #define PAPERSIZE_DIA   18
-#define PAPERSIZE_SCREEN19
+#define PAPERSIZE_SCREEN_4_319
 #define PAPERSIZE_C 20
 #define PAPERSIZE_D 21
 #define PAPERSIZE_E 22
@@ -74,6 +74,7 @@
 #define PAPERSIZE_B6_JIS36
 #define PAPERSIZE_POSTCARD_JP   46
 #define PAPERSIZE_A656
+#define PAPERSIZE_SCREEN_16_9   78
 
 #endif
 
diff --git a/cui/source/tabpages/page.src b/cui/source/tabpages/page.src
index 91873c7..2137ff2 100644
--- a/cui/source/tabpages/page.src
+++ b/cui/source/tabpages/page.src
@@ -452,7 +452,8 @@ StringArray RID_SVXSTRARY_PAPERSIZE_DRAW
  C5 Envelope ; PAPERSIZE_C5 ;  ;
  C4 Envelope ; PAPERSIZE_C4 ;  ;
  Dia Slide ; PAPERSIZE_DIA ;  ;
- Screen ; PAPERSIZE_SCREEN ;  ;
+ Screen 4:3 ; PAPERSIZE_SCREEN_4_3 ;  ;
+ Screen 16:9 ; PAPERSIZE_SCREEN_16_9 ;  ;
  Japanese Postcard ; PAPERSIZE_POSTCARD_JP;  ;
 };
 };
diff --git a/i18nutil/inc/i18nutil/paper.hxx b/i18nutil/inc/i18nutil/paper.hxx
index d5be9ec..98b88bd 100644
--- a/i18nutil/inc/i18nutil/paper.hxx
+++ b/i18nutil/inc/i18nutil/paper.hxx
@@ -58,7 +58,7 @@ enum Paper
 PAPER_ENV_C65,
 PAPER_ENV_DL,
 PAPER_SLIDE_DIA,
-PAPER_SCREEN,
+PAPER_SCREEN_4_3,
 PAPER_C,
 PAPER_D,
 PAPER_E,
@@ -116,11 +116,12 @@ enum Paper
 PAPER_ARCHB,
 PAPER_ARCHC,
 PAPER_ARCHD,
-PAPER_ARCHE
+PAPER_ARCHE,
+PAPER_SCREEN_16_9
 };
 
 // defined for 'equal size' test with the implementation array
-#define NUM_PAPER_ENTRIES   (PAPER_ARCHE - PAPER_A0 + 1)
+#define NUM_PAPER_ENTRIES   (PAPER_SCREEN_16_9 - PAPER_A0 + 1)
 
 // -
 // - Paper -
diff --git a/i18nutil/source/utility/paper.cxx 
b/i18nutil/source/utility/paper.cxx
index 63b5cff..a79089d 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -93,7 +93,7 @@ static PageDesc aDinTab[] =
 { MM2MM100( 114 ),   MM2MM100( 229 ),EnvC65, NULL },
 { MM2MM100( 110 ),   MM2MM100( 220 ),EnvDL,  DL },
 { MM2MM100( 180),MM2MM100( 270 ),NULL,  NULL }, //Dia
-{ MM2MM100( 210),MM2MM100( 280 ),NULL,  NULL }, //Screen
+{ MM2MM100( 210),MM2MM100( 280 ),NULL,  NULL }, //Screen 4:3
 { IN2MM100( 17 ),IN2MM100( 22 ), AnsiC,  CSheet },
 { IN2MM100( 22 ),IN2MM100( 34 ), AnsiD,  DSheet },
 { IN2MM100( 34 ),IN2MM100( 44 ), AnsiE,  ESheet },
@@ -155,7 +155,9 @@ static PageDesc aDinTab[] =
 { IN2MM100( 12 ),IN2MM100( 18 ), ARCHB,  NULL },
 { IN2MM100( 18 ),IN2MM100( 24 ), ARCHC,  NULL },
 { IN2MM100( 24 ),IN2MM100( 36 ), ARCHD,  NULL },
-{ IN2MM100( 36 ),IN2MM100( 48 ), ARCHE,  NULL }
+{ IN2MM100( 36 ),IN2MM100( 48 ), ARCHE,  NULL },

[Libreoffice-commits] .: 3 commits - vcl/source vcl/win

2012-04-14 Thread Ivan Timofeev
 vcl/source/window/menu.cxx   |5 -
 vcl/win/source/gdi/salnativewidgets-luna.cxx |   21 +
 2 files changed, 17 insertions(+), 9 deletions(-)

New commits:
commit 3a603d376a2bc2b839be3b89a8ecf8df1c42260b
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Apr 14 20:51:20 2012 +0400

vcl: win: adjust some coordinates

diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx 
b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index 3b0051a..888b1a7 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -986,7 +986,7 @@ sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, 
RECT rc,
 RECT aGutterRC = rc;
 if( Application::GetSettings().GetLayoutRTL() )
 {
-aGutterRC.right -= aValue.getNumericVal();
+aGutterRC.right -= aValue.getNumericVal()+1;
 aGutterRC.left = aGutterRC.right-3;
 }
 else
@@ -1043,9 +1043,9 @@ sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, 
RECT rc,
 {
 // adjust for gutter position
 if( Application::GetSettings().GetLayoutRTL() )
-rc.right -= aValue.getNumericVal();
+rc.right -= aValue.getNumericVal()+1;
 else
-rc.left += aValue.getNumericVal();
+rc.left += aValue.getNumericVal()+1;
 Rectangle aRect( ImplGetThemeRect( hTheme, hDC,
 MENU_POPUPSEPARATOR, 0, Rectangle( rc.left, rc.top, 
rc.right, rc.bottom ) ) );
 // center the separator inside the passed rectangle
commit 7179a362dd5788c4c4f7197d15abfa17e0cad584
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Apr 14 20:48:11 2012 +0400

vcl: win: fix RTL checkmark backgrounds fdo#42537

diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx 
b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index bcf80cd..3b0051a 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -1015,13 +1015,18 @@ sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, 
RECT rc,
 if( aValue.getType() == CTRL_MENU_POPUP )
 {
 const MenupopupValue rMVal( static_castconst 
MenupopupValue(aValue) );
-aBGRect.left   = rMVal.maItemRect.Left();
 aBGRect.top= rMVal.maItemRect.Top();
 aBGRect.bottom = rMVal.maItemRect.Bottom()+1; // see 
below in drawNativeControl
-aBGRect.right  = rMVal.getNumericVal();
-
-// FIXME: magic
-aBGRect.left += 1; aBGRect.top += 1; aBGRect.bottom 
+=1;
+if( Application::GetSettings().GetLayoutRTL() )
+{
+aBGRect.right = rMVal.maItemRect.Right()+1;
+aBGRect.left = aBGRect.right - 
(rMVal.getNumericVal()-rMVal.maItemRect.Left());
+}
+else
+{
+aBGRect.right = rMVal.getNumericVal();
+aBGRect.left  = rMVal.maItemRect.Left();
+}
 }
 iState = (nState  CTRL_STATE_ENABLED) ? MCB_NORMAL : 
MCB_DISABLED;
 ImplDrawTheme( hTheme, hDC, MENU_POPUPCHECKBACKGROUND, 
iState, aBGRect, aCaption );
commit 532904765073c827bed3181d97c217909db1843f
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Apr 14 20:42:23 2012 +0400

vcl: hack: pData-aSz.Width() is set only for MenuBar, use aOutSz.Width()

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 73283f3..eaca00d 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2751,7 +2751,10 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, 
long nStartY, MenuItemDa
 aTmpPos.Y() = aOuterCheckRect.Top() + 
(aOuterCheckRect.GetHeight() - nCtrlHeight)/2;
 
 Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, 
nCtrlHeight ) );
-MenupopupValue aVal( nTextPos-GUTTERBORDER, 
Rectangle( aPos, pData-aSz ) );
+Size aSz( pData-aSz );
+aSz.Width() = aOutSz.Width() - 2*nOuterSpace;
+Rectangle aItemRect( aPos, aSz );
+MenupopupValue aVal( nTextPos-GUTTERBORDER, 
aItemRect );
 pWin-DrawNativeControl( CTRL_MENU_POPUP, nPart,
  aCheckRect,
  nState,
___
Libreoffice-commits mailing list

[Libreoffice-commits] .: vcl/win

2012-04-11 Thread Ivan Timofeev
 vcl/win/source/gdi/salnativewidgets-luna.cxx |   18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

New commits:
commit a4cc4d3ec982ac61100b337125983afa0bb6fbc3
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Apr 11 21:34:06 2012 +0400

vcl: win: fix RTL menu separator and gutter, checkmarks are still misplaced

diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx 
b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index 2bc2f4b..bcf80cd 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -984,8 +984,16 @@ sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, 
RECT rc,
 if( nPart == PART_ENTIRE_CONTROL )
 {
 RECT aGutterRC = rc;
-aGutterRC.left += aValue.getNumericVal();
-aGutterRC.right = aGutterRC.left+3;
+if( Application::GetSettings().GetLayoutRTL() )
+{
+aGutterRC.right -= aValue.getNumericVal();
+aGutterRC.left = aGutterRC.right-3;
+}
+else
+{
+aGutterRC.left += aValue.getNumericVal();
+aGutterRC.right = aGutterRC.left+3;
+}
 return
 ImplDrawTheme( hTheme, hDC, MENU_POPUPBACKGROUND, 0, rc, 
aCaption ) 
 ImplDrawTheme( hTheme, hDC, MENU_POPUPGUTTER, 0, aGutterRC, 
aCaption )
@@ -1028,7 +1036,11 @@ sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, 
RECT rc,
 }
 else if( nPart == PART_MENU_SEPARATOR )
 {
-rc.left += aValue.getNumericVal(); // adjust for gutter 
position
+// adjust for gutter position
+if( Application::GetSettings().GetLayoutRTL() )
+rc.right -= aValue.getNumericVal();
+else
+rc.left += aValue.getNumericVal();
 Rectangle aRect( ImplGetThemeRect( hTheme, hDC,
 MENU_POPUPSEPARATOR, 0, Rectangle( rc.left, rc.top, 
rc.right, rc.bottom ) ) );
 // center the separator inside the passed rectangle
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: xmloff/source

2012-04-11 Thread Ivan Timofeev
 xmloff/source/chart/SchXMLExport.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9c323a4bbe0f7dec33523e87e1c1010dd832d4bf
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Apr 11 22:18:22 2012 +0400

fix windows build

diff --git a/xmloff/source/chart/SchXMLExport.cxx 
b/xmloff/source/chart/SchXMLExport.cxx
index 0d253d2..6632b47 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -3137,7 +3137,7 @@ void SchXMLExportHelper_Impl::exportErrorBar( const 
Referencebeans::XPropertySe
 {
 Any aAny;
 
-aAny = xSeriesProp-getPropertyValue( bYError ? ErrorBarY : 
ErrorBarX );
+aAny = xSeriesProp-getPropertyValue( bYError ? 
rtl::OUString(ErrorBarY) : rtl::OUString(ErrorBarX) );
 aAny = xErrorBarProp;
 
 if ( xErrorBarProp.is() )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - oox/source svx/inc svx/source

2012-04-09 Thread Ivan Timofeev
 oox/source/drawingml/customshapeproperties.cxx|1 +
 oox/source/token/properties.txt   |1 +
 svx/inc/svx/EnhancedCustomShape2d.hxx |1 +
 svx/inc/svx/svdoashp.hxx  |1 +
 svx/source/customshapes/EnhancedCustomShape2d.cxx |5 +
 svx/source/customshapes/EnhancedCustomShapeEngine.cxx |   10 --
 svx/source/svdraw/svdoashp.cxx|   12 
 7 files changed, 29 insertions(+), 2 deletions(-)

New commits:
commit d2e74fcd33c36d190c0cefa9615e810e2e713a24
Author: Muthu Subramanian sumu...@suse.com
Date:   Mon Apr 9 18:24:11 2012 +0530

fdo43752: PPTX import fix affected odp imports.

Related bugs: n#719989, n#719997
(cherry picked from commit 1c44b263d789b4c20e9178c6432300e301df94d6)

Signed-off-by: Ivan Timofeev timofeev@gmail.com

diff --git a/oox/source/drawingml/customshapeproperties.cxx 
b/oox/source/drawingml/customshapeproperties.cxx
index 1b0cac2..020d87a 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -158,6 +158,7 @@ void CustomShapeProperties::pushToPropSet( const 
::oox::core::FilterBase /* rFi
 aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX );
 aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY );
 aPropertyMap[ PROP_TextPreRotateAngle ] = Any( mnTextRotateAngle );
+aPropertyMap[ PROP_IsPostRotateAngle ] = true; // For OpenXML Imports
 Sequence PropertyValue  aSeq = 
aPropertyMap.makePropertyValueSequence();
 aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
 
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index b754f1d..0cc7bf4 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -242,6 +242,7 @@ IsLoaded
 IsNumbering
 IsOutlineSymbolsSet
 IsPlaceholderDependent
+IsPostRotateAngle
 IsSharedFormula
 IsStartOfNewPage
 IsTextWrapped
diff --git a/svx/inc/svx/EnhancedCustomShape2d.hxx 
b/svx/inc/svx/EnhancedCustomShape2d.hxx
index 415385c..0d9da95 100644
--- a/svx/inc/svx/EnhancedCustomShape2d.hxx
+++ b/svx/inc/svx/EnhancedCustomShape2d.hxx
@@ -182,6 +182,7 @@ class EnhancedCustomShape2d : public SfxItemSet
 sal_BoolIsFlipVert() { return bFlipV; };
 sal_BoolIsFlipHorz() { return bFlipH; };
 sal_Int32   GetRotateAngle() { return nRotateAngle; };
+SVX_DLLPUBLIC bool  IsPostRotate() const;
 
 SVX_DLLPUBLIC SdrObject*CreateLineGeometry();
 SVX_DLLPUBLIC SdrObject*CreateObject( sal_Bool 
bLineGeometryNeededOnly );
diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx
index 013e150..0f54019 100644
--- a/svx/inc/svx/svdoashp.hxx
+++ b/svx/inc/svx/svdoashp.hxx
@@ -145,6 +145,7 @@ public:
 
 sal_Bool IsMirroredX() const;
 sal_Bool IsMirroredY() const;
+bool IsPostRotate() const;
 void SetMirroredX( const sal_Bool bMirroredX );
 void SetMirroredY( const sal_Bool bMirroredY );
 
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx 
b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 3e5f340..d0fa902 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2330,6 +2330,11 @@ void EnhancedCustomShape2d::ApplyGluePoints( SdrObject* 
pObj )
 }
 }
 
+bool EnhancedCustomShape2d::IsPostRotate() const
+{
+return pCustomShapeObj-ISA( SdrObjCustomShape ) ? 
((SdrObjCustomShape*)pCustomShapeObj)-IsPostRotate() : false;
+}
+
 SdrObject* EnhancedCustomShape2d::CreateLineGeometry()
 {
 return CreateObject( sal_True );
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx 
b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index a92a962..b8a2be0 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -276,6 +276,7 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL 
EnhancedCustomShapeEngine::rende
 
 EnhancedCustomShape2d aCustomShape2d( pSdrObjCustomShape );
 sal_Int32 nRotateAngle = aCustomShape2d.GetRotateAngle();
+bool bPostRotateAngle = aCustomShape2d.IsPostRotate();
 
 sal_Bool bFlipV = aCustomShape2d.IsFlipVert();
 sal_Bool bFlipH = aCustomShape2d.IsFlipHorz();
@@ -315,6 +316,11 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL 
EnhancedCustomShapeEngine::rende
 }
 pRenderedShape-Shear( 
pSdrObjCustomShape-GetSnapRect().Center(), nShearWink, nTan, sal_False);
 }
+if( !bPostRotateAngle  nRotateAngle )
+{
+double a = nRotateAngle * F_PI18000;
+pRenderedShape-NbcRotate( 
pSdrObjCustomShape-GetSnapRect().Center(), nRotateAngle, sin( a ), cos

[Libreoffice-commits] .: 2 commits - starmath/source

2012-04-08 Thread Ivan Timofeev
 starmath/source/node.cxx  |4 ++--
 starmath/source/parse.cxx |4 +---
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 5f80687188db3a29fb0c3a5fe587aeeb3e13dccd
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sun Apr 8 14:11:11 2012 +0400

Revert fdo#41739: Math: do not skip newline on error

This reverts commit f52138deee9e129d0566f06d1d2138b6b159d16a. It was the 
cause
of infinite recursive loops (huh, why, that was obvious!).

diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index e5c1ff4..b386cf3 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -2424,9 +2424,7 @@ void SmParser::Error(SmParseError eError)
 
 AddError(eError, pSNode);
 
-// Even if the newline token is unexpected, do not skip it. (fdo#41739)
-if (m_aCurToken.eType != TNEWLINE)
-NextToken();
+NextToken();
 }
 
 
commit eab7e131ecebe4cdefcdcb1ad176bbdce83cb467
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Apr 7 21:20:48 2012 +0400

starmath: fix DEBUG_ENABLE_DUMPASDOT build

diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 09d2ee8..e05f188 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -647,8 +647,8 @@ void SmNode::DumpAsDot(std::ostream out, String* label, 
int number, int id, in
 //Dump subnodes
 int myid = id;
 const SmNode *pNode;
-USHORT nSize = GetNumSubNodes();
-for (USHORT i = 0; i  nSize;  i++)
+sal_uInt16 nSize = GetNumSubNodes();
+for (sal_uInt16 i = 0; i  nSize;  i++)
 if (NULL != (pNode = GetSubNode(i)))
 pNode-DumpAsDot(out, NULL, i, ++id, myid);
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source sfx2/inc sfx2/source sw/source

2012-04-05 Thread Ivan Timofeev
 sc/source/ui/view/tabview.cxx|   25 +
 sfx2/inc/sfx2/viewsh.hxx |   11 ---
 sfx2/source/view/viewimp.hxx |3 ---
 sfx2/source/view/viewsh.cxx  |8 
 sw/source/ui/uiview/viewport.cxx |   38 ++
 5 files changed, 11 insertions(+), 74 deletions(-)

New commits:
commit c5154a179f435cc23798057895b0db8312bcd6f6
Author: Ivan Timofeev timofeev@gmail.com
Date:   Thu Apr 5 21:08:26 2012 +0400

SfxViewShell::GetScrollingMode always returns SCROLLING_DEFAULT

diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index a2784e1..219f9d2 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -407,13 +407,6 @@ void ScTabView::DoResize( const Point rOffset, const 
Size rSize, bool bInner )
 bool bHOutline   = bOutlMode  lcl_HasColOutline(aViewData);
 bool bVOutline   = bOutlMode  lcl_HasRowOutline(aViewData);
 
-//  Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden:
-SfxScrollingMode eMode = aViewData.GetViewShell()-GetScrollingMode();
-if ( eMode == SCROLLING_NO )
-bHScroll = bVScroll = false;
-else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO )   //! Auto 
???
-bHScroll = bVScroll = true;
-
 if ( aViewData.GetDocShell()-IsPreview() )
 bHScroll = bVScroll = bTabControl = bHeaders = bOutlMode = bHOutline = 
bVOutline = false;
 
@@ -899,16 +892,7 @@ void ScTabView::GetBorderSize( SvBorder rBorder, const 
Size /* rSize */ )
 
 IMPL_LINK_NOARG(ScTabView, TabBarResize)
 {
-sal_Bool bHScrollMode = aViewData.IsHScrollMode();
-
-//  Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden:
-SfxScrollingMode eMode = aViewData.GetViewShell()-GetScrollingMode();
-if ( eMode == SCROLLING_NO )
-bHScrollMode = false;
-else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO )   //! Auto 
???
-bHScrollMode = sal_True;
-
-if( bHScrollMode )
+if (aViewData.IsHScrollMode())
 {
 const long nOverlap = 0;// ScrollBar::GetWindowOverlapPixel();
 long nSize = pTabControl-GetSplitSize();
@@ -1572,13 +1556,6 @@ void ScTabView::UpdateShow()
 sal_Bool bShowH = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE );
 sal_Bool bShowV = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE );
 
-//  Scrollbar-Einstellungen koennen vom Sfx ueberschrieben werden:
-SfxScrollingMode eMode = aViewData.GetViewShell()-GetScrollingMode();
-if ( eMode == SCROLLING_NO )
-bHScrollMode = bVScrollMode = false;
-else if ( eMode == SCROLLING_YES || eMode == SCROLLING_AUTO )   //! Auto 
???
-bHScrollMode = bVScrollMode = sal_True;
-
 if ( aViewData.GetDocShell()-IsPreview() )
 bHScrollMode = bVScrollMode = bTabMode = bHeader = bOutlMode = 
bHOutline = bVOutline = false;
 
diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx
index 869de36..d2da4cb 100644
--- a/sfx2/inc/sfx2/viewsh.hxx
+++ b/sfx2/inc/sfx2/viewsh.hxx
@@ -83,14 +83,6 @@ class NotifyEvent;
 #define SFX_PRINTERROR_NONE  0
 #define SFX_PRINTERROR_BUSY  1
 
-enum SfxScrollingMode
-{
-SCROLLING_NO,
-SCROLLING_YES,
-SCROLLING_AUTO,
-SCROLLING_DEFAULT
-};
-
 // Verified using www.apple.com and Netscape 3.01
 #define DEFAULT_MARGIN_WIDTH 8
 #define DEFAULT_MARGIN_HEIGHT 12
@@ -207,9 +199,6 @@ public:
 virtual voidJumpToMark( const String rMark );
 voidVisAreaChanged(const Rectangle rRect);
 
-// Behavior Flags
-SfxScrollingModeGetScrollingMode() const;
-
 // Misc
 virtual sal_uInt16  PrepareClose( sal_Bool bUI = sal_True, 
sal_Bool bForBrowsing = sal_False );
 virtual String  GetSelectionText( sal_Bool bCompleteWords = 
sal_False );
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index 3d77c18..31dfdc7 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -63,11 +63,8 @@ struct SfxViewShell_Impl
 boolm_bHasPrintOptions;
 boolm_bPlugInsActive;
 boolm_bIsShowView;
-// FIXME UNUSED ???
-//boolm_bOwnsMenu;
 boolm_bGotOwnership;
 boolm_bGotFrameOwnership;
-SfxScrollingModem_eScroll;
 sal_uInt16  m_nFamily;
 ::rtl::ReferenceSfxBaseController m_pController;
 ::std::auto_ptr ::svt::AcceleratorExecute m_pAccExec;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 3c6a2de..dc7cdf6 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -301,7 +301,6 @@ SfxViewShell_Impl::SfxViewShell_Impl(sal_uInt16 const 
nFlags)
 ,   m_bIsShowView(SFX_VIEW_NO_SHOW != (nFlags  SFX_VIEW_NO_SHOW))
 ,   m_bGotOwnership(false

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

2012-04-04 Thread Ivan Timofeev
 sw/source/ui/index/cnttab.cxx |   12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

New commits:
commit 33619919036457e3a37c4c47a8cef274d55253a8
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Apr 4 19:22:52 2012 +0400

reuse existent function

diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index bdcf6da..63248e7 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -3430,18 +3430,10 @@ IMPL_LINK(SwTokenWindow, ScrollHdl, ImageButton*, pBtn )
 if(nMove)
 {
 // move the complete list
+MoveControls(nMove);
 
 Control *pCtrl = 0;
 
-for (ctrl_iterator it = aControlList.begin(); it != 
aControlList.end(); ++it)
-{
-pCtrl = *it;
-
-Point aPos = pCtrl-GetPosPixel();
-aPos.X() += nMove;
-pCtrl-SetPosPixel(aPos);
-}
-
 pCtrl = *(aControlList.begin());
 aLeftScrollWin.Enable(pCtrl-GetPosPixel().X()  0);
 
commit b49f69aee6f48fb9367a2a9548182dcd84eb5296
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Apr 4 18:38:07 2012 +0400

fdo#40948: TOC dialog, Entries tab: the right arrow button does not work

regression from 39b8a5f87f55abe53488c9c3c35b65fb0df84cd.

diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 0d41a0b..bdcf6da 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -3415,7 +3415,7 @@ IMPL_LINK(SwTokenWindow, ScrollHdl, ImageButton*, pBtn )
 {
 //move the right neighbor  to the right edge right aligned
 ctrl_reverse_iterator itRight = it;
---it;
+--itRight;
 Control *pRight = *itRight;
 nMove = nSpace - pRight-GetPosPixel().X() - 
pRight-GetSizePixel().Width();
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: framework/source

2012-04-03 Thread Ivan Timofeev
 framework/source/services/backingwindow.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 4e24d472f693c458b17d2ba1fb6c883aaf9c3b27
Author: Ivan Timofeev timofeev@gmail.com
Date:   Tue Apr 3 20:40:14 2012 +0400

fix the initial font size in the Start Center

Recover the code that was for some reason removed in commit
78e8d5f0d62f910b8561a1c4fd7ebd8ae4cfb9f8.

diff --git a/framework/source/services/backingwindow.cxx 
b/framework/source/services/backingwindow.cxx
index d930f77..ca0e9e7 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -239,6 +239,9 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
 maButtonImageSize.Width() += 12;
 maButtonImageSize.Height() += 12;
 
+// set a slighly larger font than normal labels on the texts
+maTextFont.SetSize( Size( 0, 11 ) );
+maTextFont.SetWeight( WEIGHT_NORMAL );
 }
 
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 9 commits - sc/inc sc/source

2012-03-28 Thread Ivan Timofeev
 sc/inc/chartpos.hxx  |   10 +-
 sc/source/core/tool/chartpos.cxx |  161 +++
 2 files changed, 88 insertions(+), 83 deletions(-)

New commits:
commit 6b170f3d0aa519c6fd4e3ee92421f5a87ab511e3
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Mar 28 21:06:03 2012 +0400

WaE: declaration of 'it' shadows a previous local

diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 7ab9e43..78ea6e7 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -409,8 +409,7 @@ void ScChartPositioner::CreatePositionMap()
 sal_uLong nInsRow = (bNoGlue ? nNoGlueRow : nRow1);
 for ( nRow = nRow1; nRow = nRow2; nRow++, nInsRow++ )
 {
-RowMap::const_iterator it = pCol-find( nInsRow );
-if ( it == pCol-end() )
+if ( pCol-find( nInsRow ) == pCol-end() )
 {
 pCol-insert( RowMap::value_type( nInsRow, new 
ScAddress( nCol, nRow, nTab ) ) );
 }
commit 82e0247c7a36aedf7ecf55488360f9abeb89726a
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Mar 28 21:03:17 2012 +0400

remove the wrongly placed semicolon

diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 0d963f1..7ab9e43 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -565,7 +565,7 @@ ScChartPositionMap::ScChartPositionMap( SCCOL nChartCols, 
SCROW nChartRows,
 ppData[ nIndex ] = pPosIter-second;
 ++pPosIter;
 }
-for ( ; nRow  nRowCount; nRow++, nIndex++ ) ;
+for ( ; nRow  nRowCount; nRow++, nIndex++ )
 ppData[ nIndex ] = NULL;
 
 ++pColIter;
commit 8affd7e908fe695c548da702cafe76a8b031fdef
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Mar 28 18:54:13 2012 +0400

this iterator should point to where the insert should start to search

diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index cdc27f6..0d963f1 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -399,7 +399,7 @@ void ScChartPositioner::CreatePositionMap()
 if ( it == pCols-end() )
 {
 pCol = new RowMap;
-pCols-insert(it, ColumnMap::value_type( nInsCol, pCol ) );
+pCols-insert( ColumnMap::value_type( nInsCol, pCol ) );
 }
 else
 pCol = it-second;
@@ -412,7 +412,7 @@ void ScChartPositioner::CreatePositionMap()
 RowMap::const_iterator it = pCol-find( nInsRow );
 if ( it == pCol-end() )
 {
-pCol-insert(it, RowMap::value_type( nInsRow, new 
ScAddress( nCol, nRow, nTab ) ) );
+pCol-insert( RowMap::value_type( nInsRow, new 
ScAddress( nCol, nRow, nTab ) ) );
 }
 }
 }
commit 8627b0a297d6a2b7461bb53da2f434c397cb2603
Author: Ivan Timofeev timofeev@gmail.com
Date:   Tue Mar 27 23:03:03 2012 +0400

there was Table::Insert, let's use map::insert as a replacement

diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index bae4802..cdc27f6 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -475,7 +475,7 @@ void ScChartPositioner::CreatePositionMap()
 {
 sal_uLong nKey = it1-first;
 for (ColumnMap::const_iterator it2 = ++pCols-begin(); it2 != 
pCols-end(); ++it2 )
-(*it2-second)[ nKey ] =  NULL; // keine Daten
+it2-second-insert( RowMap::value_type( nKey, NULL )); // 
keine Daten
 }
 }
 }
commit d976045c9d0296d2418687e0049ee49f9ebeded5
Author: Ivan Timofeev timofeev@gmail.com
Date:   Tue Mar 27 22:34:48 2012 +0400

if/else branches contain same code

diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index cd3a4c9..bae4802 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -395,28 +395,15 @@ void ScChartPositioner::CreatePositionMap()
 for ( nCol = nCol1; nCol = nCol2; ++nCol, ++nInsCol )
 {
 RowMap* pCol = NULL;
-if ( bNoGlue || eGlue == SC_CHARTGLUE_ROWS )
-{   // meistens gleiche Cols
-ColumnMap::const_iterator it = pCols-find( nInsCol );
-if ( it == pCols-end() )
-{
-pCol = new RowMap;
-pCols-insert(it, ColumnMap::value_type( nInsCol, pCol 
) );
-}
-else
-pCol = it-second;
+ColumnMap

[Libreoffice-commits] .: starmath/source

2012-03-22 Thread Ivan Timofeev
 starmath/source/parse.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit f52138deee9e129d0566f06d1d2138b6b159d16a
Author: Ivan Timofeev timofeev@gmail.com
Date:   Thu Mar 22 10:03:03 2012 +0400

fdo#41739: Math: do not skip newline on error

diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index b386cf3..e5c1ff4 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -2424,7 +2424,9 @@ void SmParser::Error(SmParseError eError)
 
 AddError(eError, pSNode);
 
-NextToken();
+// Even if the newline token is unexpected, do not skip it. (fdo#41739)
+if (m_aCurToken.eType != TNEWLINE)
+NextToken();
 }
 
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2012-03-15 Thread Ivan Timofeev
 sc/source/filter/html/htmlpars.cxx |3 ++-
 sc/source/filter/inc/eeparser.hxx  |8 +---
 sc/source/filter/rtf/eeimpars.cxx  |   28 
 3 files changed, 23 insertions(+), 16 deletions(-)

New commits:
commit 96328945afe8f920df41741931163ba56b7b2820
Author: Noel Grandin n...@peralex.com
Date:   Wed Mar 14 14:00:35 2012 +0200

Convert tools/table.hxx to std::map in ScEEParser class in SC module

diff --git a/sc/source/filter/html/htmlpars.cxx 
b/sc/source/filter/html/htmlpars.cxx
index 323e1a2..b9f9fb8 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -58,6 +58,7 @@
 #include vcl/svapp.hxx
 #include tools/urlobj.hxx
 #include tools/tenccvt.hxx
+#include tools/table.hxx
 
 #include htmlpars.hxx
 #include global.hxx
@@ -331,7 +332,7 @@ sal_uLong ScHTMLLayoutParser::Read( SvStream rStream, 
const String rBaseURL )
 {
 aSize.Width() = *pOff - nOff;
 aSize = pDefaultDev-PixelToLogic( aSize, MapMode( MAP_TWIP ) );
-pColWidths-Insert( j-1, (void*)aSize.Width() );
+maColWidths[ j-1 ] = aSize.Width();
 nOff = *pOff;
 }
 return nErr;
diff --git a/sc/source/filter/inc/eeparser.hxx 
b/sc/source/filter/inc/eeparser.hxx
index dc1daf1..9c272d0 100644
--- a/sc/source/filter/inc/eeparser.hxx
+++ b/sc/source/filter/inc/eeparser.hxx
@@ -32,7 +32,6 @@
 #include tools/string.hxx
 #include tools/gen.hxx
 #include vcl/graph.hxx
-#include tools/table.hxx
 #include svl/itemset.hxx
 #include editeng/editdata.hxx
 #include address.hxx
@@ -108,6 +107,8 @@ struct ScEEParseEntry
 
 class EditEngine;
 
+typedef std::mapSCCOL, sal_uInt16 ColWidthsMap;
+
 class ScEEParser
 {
 protected:
@@ -116,7 +117,7 @@ protected:
 SfxItemPool*pDocPool;
 ::std::vector ScEEParseEntry*  maList;
 ScEEParseEntry* pActEntry;
-Table*  pColWidths;
+ColWidthsMapmaColWidths;
 int nLastToken;
 SCCOL   nColCnt;
 SCROW   nRowCnt;
@@ -131,7 +132,8 @@ public:
 
 virtual sal_uLong   Read( SvStream, const String rBaseURL ) = 0;
 
-Table*  GetColWidths() const { return pColWidths; }
+const ColWidthsMap GetColWidths() const { return maColWidths; }
+ColWidthsMap   GetColWidths() { return maColWidths; }
 voidGetDimensions( SCCOL nCols, SCROW nRows ) const
 { nCols = nColMax; nRows = nRowMax; }
 
diff --git a/sc/source/filter/rtf/eeimpars.cxx 
b/sc/source/filter/rtf/eeimpars.cxx
index 2fb0484..d34e135 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -52,6 +52,7 @@
 #include unotools/syslocale.hxx
 #include unotools/charclass.hxx
 #include comphelper/string.hxx
+#include tools/table.hxx
 
 #include eeimport.hxx
 #include global.hxx
@@ -431,14 +432,17 @@ void ScEEImport::WriteToDocument( sal_Bool bSizeColsRows, 
double nOutputFactor,
 if ( bSizeColsRows )
 {
 // Spaltenbreiten
-Table* pColWidths = mpParser-GetColWidths();
-if ( pColWidths-Count() )
+ColWidthsMap rColWidths = mpParser-GetColWidths();
+if ( !rColWidths.empty() )
 {
 nProgress = 0;
 pProgress-SetState( nProgress, nEndCol - nStartCol + 1 );
 for ( SCCOL nCol = nStartCol; nCol = nEndCol; nCol++ )
 {
-sal_uInt16 nWidth = (sal_uInt16)(sal_uLong) pColWidths-Get( 
nCol );
+sal_uInt16 nWidth = 0;
+ColWidthsMap::const_iterator it = rColWidths.find( nCol );
+if ( it != rColWidths.end() )
+nWidth = it-second;
 if ( nWidth )
 mpDoc-SetColWidth( nCol, nTab, nWidth );
 pProgress-SetState( ++nProgress );
@@ -513,20 +517,22 @@ sal_Bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, 
SCTAB /*nTab*/, ScEEPa
 nDir = pI-nDir;
 }
 // Spaltenbreiten
-Table* pColWidths = mpParser-GetColWidths();
-long nThisWidth = (long) pColWidths-Get( nCol );
+ColWidthsMap rColWidths = mpParser-GetColWidths();
+long nThisWidth = 0;
+ColWidthsMap::const_iterator it = rColWidths.find( nCol );
+if ( it != rColWidths.end() )
+nThisWidth = it-second;
 long nColWidths = nThisWidth;
 SCCOL nColSpanCol = nCol + pE-nColOverlap;
 for ( SCCOL nC = nCol + 1; nC  nColSpanCol; nC++ )
 {
-nColWidths += (long) pColWidths-Get( nC );
+ColWidthsMap::const_iterator it2 = rColWidths.find( nC   );
+if ( it2 != rColWidths.end() )
+nColWidths += it2-second;
 }
 if ( nWidth  nColWidths )
 {   // Differenz nur in der ersten Spalte eintragen
-if ( nThisWidth )
-pColWidths-Replace( nCol, (void*)(nWidth - nColWidths + 
nThisWidth) );
-else
-pColWidths-Insert( nCol, (void*)(nWidth - nColWidths) );
+

[Libreoffice-commits] .: sw/source

2012-03-13 Thread Ivan Timofeev
 sw/source/ui/uiview/viewport.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f1040f9fa7e3af5ccc91a4cbc0ff781dd372107d
Author: Ivan Timofeev timofeev@gmail.com
Date:   Tue Mar 13 17:19:57 2012 +0400

always use the *real* visibility of the SwScrollbar, part 2

diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 0e09076..d6b723d 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -833,7 +833,7 @@ void SwView::CalcAndSetBorderPixel( SvBorder rToFill, 
sal_Bool /*bInner*/ )
 
 const StyleSettings rSet = GetEditWin().GetSettings().GetStyleSettings();
 const long nTmp = rSet.GetScrollBarSize();
-if( pVScrollbar-IsVisible(sal_False) )
+if( pVScrollbar-IsVisible(sal_True) )
 {
 if(bRightVRuler)
 rToFill.Left() = nTmp;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: editeng/source

2012-03-12 Thread Ivan Timofeev
 editeng/source/editeng/impedit.hxx  |6 ++--
 editeng/source/editeng/impedit3.cxx |   50 ++--
 editeng/source/editeng/impedit4.cxx |4 +-
 3 files changed, 25 insertions(+), 35 deletions(-)

New commits:
commit f2d0fcc26be481c2f872056fb3b8402169d124d8
Author: Bartosz Kosiorek gan...@poczta.onet.pl
Date:   Sat Mar 10 22:16:16 2012 +0100

Replace VARARR_SORT with std

diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index 2076d29..5196703 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -905,7 +905,7 @@ public:
 LanguageTypeGetDefaultLanguage() const { return eDefLanguage; }
 
 
-LanguageTypeGetLanguage( const EditSelection rSelection ) const;
+LanguageTypeGetLanguage( const EditSelection rSelection ) const;
 LanguageTypeGetLanguage( const EditPaM rPaM, sal_uInt16* pEndPos 
= NULL ) const;
 ::com::sun::star::lang::Locale GetLocale( const EditPaM rPaM ) const;
 
@@ -945,12 +945,12 @@ public:
 //adds one or more portions of text to the SpellPortions depending on 
language changes
 voidAddPortionIterated(
 EditView rEditView,
-const EditSelection rSel,
+const EditSelection rSel,
 ::com::sun::star::uno::Reference 
::com::sun::star::linguistic2::XSpellAlternatives  xAlt,
 ::svx::SpellPortions rToFill);
 //adds one portion to the SpellPortions
 voidAddPortion(
-const EditSelection rSel,
+const EditSelection rSel,
 ::com::sun::star::uno::Reference 
::com::sun::star::linguistic2::XSpellAlternatives  xAlt,
 ::svx::SpellPortions rToFill,
 bool bIsField );
diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index d37d8d9..a7919a2 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -68,6 +68,7 @@
 
 #include editeng/unolingu.hxx
 
+#include set
 #include math.h
 #include vcl/svapp.hxx
 #include vcl/metric.hxx
@@ -86,9 +87,6 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::linguistic2;
 
-SV_DECL_VARARR_SORT( SortedPositions, sal_uInt32, 16 )
-SV_IMPL_VARARR_SORT( SortedPositions, sal_uInt32 );
-
 #define CH_HYPH '-'
 
 #define RESDIFF 10
@@ -2252,14 +2250,14 @@ sal_uInt16 ImpEditEngine::SplitTextPortion( 
ParaPortion* pPortion, sal_uInt16 nP
 return nSplitPortion;
 }
 
-void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16 
rStart /* , sal_Bool bCreateBlockPortions */ )
+void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16 
rStart )
 {
 sal_uInt16 nStartPos = rStart;
 ContentNode* pNode = pParaPortion-GetNode();
 DBG_ASSERT( pNode-Len(), CreateTextPortions should not be used for empty 
paragraphs! );
 
-SortedPositions aPositions;
-aPositions.Insert( (sal_uInt32) 0 );
+::std::set sal_uInt32  aPositions;
+aPositions.insert( 0 );
 
 sal_uInt16 nAttr = 0;
 EditCharAttrib* pAttrib = GetAttrib( pNode-GetCharAttribs().GetAttribs(), 
nAttr );
@@ -2267,23 +2265,23 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* 
pParaPortion, sal_uInt16 r
 {
 // Insert Start and End into the Array...
 // The Insert method does not allow for duplicate values
-aPositions.Insert( pAttrib-GetStart() );
-aPositions.Insert( pAttrib-GetEnd() );
+aPositions.insert( pAttrib-GetStart() );
+aPositions.insert( pAttrib-GetEnd() );
 nAttr++;
 pAttrib = GetAttrib( pNode-GetCharAttribs().GetAttribs(), nAttr );
 }
-aPositions.Insert( pNode-Len() );
+aPositions.insert( pNode-Len() );
 
 if ( pParaPortion-aScriptInfos.empty() )
 ((ImpEditEngine*)this)-InitScriptTypes( GetParaPortions().GetPos( 
pParaPortion ) );
 
 const ScriptTypePosInfos rTypes = pParaPortion-aScriptInfos;
 for ( size_t nT = 0; nT  rTypes.size(); nT++ )
-aPositions.Insert( rTypes[nT].nStartPos );
+aPositions.insert( rTypes[nT].nStartPos );
 
 const WritingDirectionInfos rWritingDirections = 
pParaPortion-aWritingDirectionInfos;
 for ( size_t nD = 0; nD  rWritingDirections.size(); nD++ )
-aPositions.Insert( rWritingDirections[nD].nStartPos );
+aPositions.insert( rWritingDirections[nD].nStartPos );
 
 if ( mpIMEInfos  mpIMEInfos-nLen  mpIMEInfos-pAttribs  ( 
mpIMEInfos-aPos.GetNode() == pNode ) )
 {
@@ -2292,11 +2290,11 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* 
pParaPortion, sal_uInt16 r
 {
 if ( mpIMEInfos-pAttribs[n] != nLastAttr )
 {
-aPositions.Insert( mpIMEInfos-aPos.GetIndex() + n );

[Libreoffice-commits] .: sax/source

2012-03-12 Thread Ivan Timofeev
 sax/source/expatwrap/xml2utf.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 53f661b3140fe728fe3b8f421841dcb8e6f716ab
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Mar 12 22:26:05 2012 +0400

sax: no matching function for call to 'max(int, sal_Int32)'

diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx
index b49d3dc..2fb07f5 100644
--- a/sax/source/expatwrap/xml2utf.cxx
+++ b/sax/source/expatwrap/xml2utf.cxx
@@ -57,7 +57,7 @@ sal_Int32 XMLFile2UTFConverter::readAndConvert( 
Sequencesal_Int8 seq , sal_In
 if( ! m_bStarted ) {
 // it should be possible to find the encoding attribute
 // within the first 512 bytes == 128 chars in UCS-4
-nMaxToRead = ::std::max( 512 , nMaxToRead );
+nMaxToRead = ::std::max( sal_Int32(512) , nMaxToRead );
 }
 
 sal_Int32 nRead;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2012-03-11 Thread Ivan Timofeev
 oox/source/core/xmlfilterbase.cxx |5 -
 unusedcode.easy   |1 -
 2 files changed, 6 deletions(-)

New commits:
commit b6ff047a572189a2b000ffbd437e573e518773db
Author: Petr Vorel petr.vo...@gmail.com
Date:   Sun Mar 11 19:02:40 2012 +0400

remove unused code

diff --git a/oox/source/core/xmlfilterbase.cxx 
b/oox/source/core/xmlfilterbase.cxx
index f5868bf..f1aebdd 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -672,11 +672,6 @@ XmlFilterBase XmlFilterBase::exportDocumentProperties( 
Reference XDocumentProp
 return *this;
 }
 
-::oox::drawingml::chart::ChartConverter* XmlFilterBase::getChartConverter()
-{
-return 0;
-}
-
 // protected --
 
 Reference XInputStream  XmlFilterBase::implGetInputStream( MediaDescriptor 
rMediaDesc ) const
diff --git a/unusedcode.easy b/unusedcode.easy
index 5f8063a..38f62a8 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -910,7 +910,6 @@ oox::AttributeConversion::decodeUnsignedHex(rtl::OUString 
const)
 
oox::ContainerHelper::insertByIndex(com::sun::star::uno::Referencecom::sun::star::container::XIndexContainer
 const, int, com::sun::star::uno::Any const)
 oox::GraphicHelper::convertScreenPixelToHmm(com::sun::star::awt::Point const) 
const
 
oox::core::PowerPointExport::WriteTextStyle(boost::shared_ptrsax_fastparser::FastSerializerHelper,
 int, int)
-oox::core::XmlFilterBase::getChartConverter()
 
oox::drawingml::ChartExport::exportDataSeq(com::sun::star::uno::Referencecom::sun::star::chart2::data::XDataSequence
 const, int)
 oox::drawingml::ChartExport::exportXAxis(oox::drawingml::AxisIdPair)
 oox::drawingml::ChartExport::exportYAxis(oox::drawingml::AxisIdPair)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2012-03-06 Thread Ivan Timofeev
 sw/source/ui/inc/basesh.hxx|3 ---
 sw/source/ui/shells/basesh.cxx |   11 +++
 2 files changed, 3 insertions(+), 11 deletions(-)

New commits:
commit ee77e4a776de74de06ffb51ebe3a9f597e532e8a
Author: Ivan Timofeev timofeev@gmail.com
Date:   Tue Mar 6 19:26:34 2012 +0400

repair the No Fill button which sets a transparent background in Writer

see commit 836d98646203e0d9d3916571ed55d6572c2cb3dc

diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index b700bf7..e78f2a3 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -2263,6 +2263,11 @@ void SwBaseShell::ExecBckCol(SfxRequest rReq)
 aBrushItem.SetColor( rNewColor );
 
GetView().GetViewFrame()-GetBindings().SetState(rNewColorItem);
 }
+else
+{
+aBrushItem.SetColor( COL_TRANSPARENT );
+rReq.AppendItem( SvxColorItem( Color( COL_TRANSPARENT ), 
nSlot ) );
+}
 }
 break;
 
commit f57e65477038e0151e1d69599351173ed2fdd044
Author: Winfried Donkers o...@dci-electronics.nl
Date:   Sat Mar 3 09:55:11 2012 +0100

fdo#45671 writer par. bg color simplified code

diff --git a/sw/source/ui/inc/basesh.hxx b/sw/source/ui/inc/basesh.hxx
index d544922..93ef626 100644
--- a/sw/source/ui/inc/basesh.hxx
+++ b/sw/source/ui/inc/basesh.hxx
@@ -50,7 +50,6 @@ struct DBTextStruct_Impl;
 class SwBaseShell: public SfxShell
 {
 SwView  rView;
-static ColormBackgroundColor;
 
 // DragMode
 static FlyMode eFrameMode;
@@ -121,8 +120,6 @@ public:
 static voidSetFrmMode( FlyMode eMode, SwWrtShell *pShell );  // with 
update!
 static void   _SetFrmMode( FlyMode eMode )   { eFrameMode = eMode; }
 static FlyMode  GetFrmMode() { return eFrameMode;  }
-Color   GetBackgroundColor()   { return  
mBackgroundColor; }
-voidSetBackgroundColor( const Color clr ) { mBackgroundColor = 
clr;   }
 };
 
 
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index f8369bf..b700bf7 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -1927,9 +1927,6 @@ void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell 
*pSh )
 /*
 Beschreibung:   Ctor
  */
-// STATIC DATA ---
-Color  SwBaseShell::mBackgroundColor = COL_TRANSPARENT;
-// ---
 
 SwBaseShell::SwBaseShell(SwView rVw) :
 SfxShell( rVw ),
@@ -2264,15 +2261,8 @@ void SwBaseShell::ExecBckCol(SfxRequest rReq)
 pArgs-Get(SID_BACKGROUND_COLOR);
 const Color rNewColor = rNewColorItem.GetValue();
 aBrushItem.SetColor( rNewColor );
-SetBackgroundColor( rNewColor );
 
GetView().GetViewFrame()-GetBindings().SetState(rNewColorItem);
 }
-else
-{
-// call without arguments, use last used background color
-aBrushItem.SetColor( GetBackgroundColor() );
-rReq.AppendItem( SvxColorItem( GetBackgroundColor(), nSlot 
) );
- }
 }
 break;
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: toolkit/inc toolkit/source

2012-03-05 Thread Ivan Timofeev
 toolkit/inc/toolkit/controls/unocontrolmodel.hxx |6 -
 toolkit/source/controls/unocontrolmodel.cxx  |  135 +++
 2 files changed, 48 insertions(+), 93 deletions(-)

New commits:
commit d578654354cc15b4d491b441412c1eb41a878b10
Author: Noel Grandin n...@peralex.com
Date:   Wed Feb 29 11:07:02 2012 +0200

Convert ImplPropertyTable from tools/table.hxx to std::map

 In the process, remove the ImplControlProperty struct,
 since it was duplicating information already stored in the
 key of the map.

diff --git a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx 
b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx
index 7aba0ec..13c3b38 100644
--- a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx
@@ -50,8 +50,9 @@
 #include comphelper/uno3.hxx
 
 #include list
+#include map
 
-class ImplPropertyTable;
+typedef std::mapsal_uInt16, ::com::sun::star::uno::Any ImplPropertyTable;
 
 //  
 //  class UnoControlModel
@@ -71,7 +72,7 @@ class TOOLKIT_DLLPUBLIC UnoControlModel :public 
UnoControlModel_Base
 ,public ::cppu::OPropertySetHelper
 {
 private:
-ImplPropertyTable*  mpData;
+ImplPropertyTable   maData;
 EventListenerMultiplexermaDisposeListeners;
 
 protected:
@@ -112,7 +113,6 @@ protected:
 public:
 UnoControlModel( const ::com::sun::star::uno::Reference 
::com::sun::star::lang::XMultiServiceFactory  i_factory );
 UnoControlModel( const UnoControlModel rModel );
-~UnoControlModel();
 
 virtual UnoControlModel*Clone() const = 0;
 
diff --git a/toolkit/source/controls/unocontrolmodel.cxx 
b/toolkit/source/controls/unocontrolmodel.cxx
index e00e791..53c5af0 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -60,6 +60,7 @@
 #include uno/data.h
 
 #include memory
+#include set
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -67,34 +68,6 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::i18n;
 using ::com::sun::star::awt::FontDescriptor;
 
-struct ImplControlProperty
-{
-private:
-sal_uInt16  nId;
-::com::sun::star::uno::Any  aValue;
-
-public:
-ImplControlProperty( const ImplControlProperty rProp ) : aValue( 
rProp.aValue )
-{
-nId = rProp.nId;
-}
-
-ImplControlProperty( sal_uInt16 nT )
-{
-nId = nT;
-}
-
-ImplControlProperty( sal_uInt16 nT, const ::com::sun::star::uno::Any 
rValue ) : aValue( rValue )
-{
-nId = nT;
-}
-
-sal_uInt16  GetId() const  
 { return nId; }
-const ::com::sun::star::uno::Any   GetValue() const   
 { return aValue; }
-voidSetValue( const 
::com::sun::star::uno::Any rValue ){ aValue = rValue; }
-};
-
-DECLARE_TABLE( ImplPropertyTable, ImplControlProperty* )
 
 #define UNOCONTROL_STREAMVERSION(short)2
 
@@ -160,7 +133,6 @@ UnoControlModel::UnoControlModel()
 OSL_ENSURE( false, UnoControlModel::UnoControlModel: not implemented. 
Well, not really. );
 // just implemented to let the various FooImplInheritanceHelper compile, 
you should use the
 // version taking a service factory
-mpData = new ImplPropertyTable;
 }
 
 UnoControlModel::UnoControlModel( const Reference XMultiServiceFactory  
i_factory )
@@ -172,31 +144,16 @@ UnoControlModel::UnoControlModel( const Reference 
XMultiServiceFactory  i_fac
 {
 // Die Properties muessen vom Model in die Tabelle gestopft werden,
 // nur vorhandene Properties sind gueltige Properties, auch wenn VOID.
-mpData = new ImplPropertyTable;
 }
 
 UnoControlModel::UnoControlModel( const UnoControlModel rModel )
 : UnoControlModel_Base()
 , MutexAndBroadcastHelper()
 , OPropertySetHelper( BrdcstHelper )
+, maData( rModel.maData )
 , maDisposeListeners( *this )
 , maContext( rModel.maContext )
 {
-mpData = new ImplPropertyTable;
-
-for ( sal_uInt32 n = rModel.mpData-Count(); n; )
-{
-ImplControlProperty* pProp = rModel.mpData-GetObject( --n );
-ImplControlProperty* pNew = new ImplControlProperty( *pProp );
-mpData-Insert( pNew-GetId(), pNew );
-}
-}
-
-UnoControlModel::~UnoControlModel()
-{
-for ( sal_uInt32 n = mpData-Count(); n; )
-delete mpData-GetObject( --n );
-delete mpData;
 }
 
 UnoControlModel* UnoControlModel::Clone() const
@@ -207,11 +164,12 @@ UnoControlModel* UnoControlModel::Clone() const
 
 ::com::sun::star::uno::Sequencesal_Int32 
UnoControlModel::ImplGetPropertyIds() const
 {
-sal_uInt32 nIDs = mpData-Count();
+sal_uInt32 nIDs = maData.size();
 

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

2012-03-05 Thread Ivan Timofeev
 svtools/source/edit/textdat2.hxx |8 +--
 svtools/source/edit/textdata.cxx |5 --
 svtools/source/edit/texteng.cxx  |   84 +++
 unusedcode.easy  |   12 -
 4 files changed, 47 insertions(+), 62 deletions(-)

New commits:
commit b5bc28fbb20d7432f243ce2808d8a535f02b0b5f
Author: Maciej Rumianowski maciej.rumianow...@gmail.com
Date:   Sat Feb 25 16:07:42 2012 +0100

Remove unused code TESortedPositions and TEWritingDirectionInfos

diff --git a/unusedcode.easy b/unusedcode.easy
index 6aa0aaf..52a52e8 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -360,18 +360,6 @@ SwpHtStart::Insert(SwTxtAttr const**, unsigned short)
 SwpHtStart::Insert(SwpHtStart const*, unsigned short, unsigned short)
 SwpHtStart::Remove(SwTxtAttr const*, unsigned short)
 SystemChildWindow::SystemChildWindow(Window*, ResId const)
-TESortedPositions::Insert(TESortedPositions const*, unsigned short, unsigned 
short)
-TESortedPositions::Insert(unsigned long const, unsigned short)
-TESortedPositions::Insert(unsigned long const*, unsigned short)
-TESortedPositions::Remove(unsigned long const, unsigned short)
-TESortedPositions::Remove(unsigned short, unsigned short)
-TESortedPositions_SAR::Replace(unsigned long const, unsigned short)
-TESortedPositions_SAR::Replace(unsigned long const*, unsigned short, unsigned 
short)
-TESortedPositions_SAR::_ForEach(unsigned short, unsigned short, unsigned char 
(*)(unsigned long const, void*), void*)
-TEWritingDirectionInfos::Insert(TEWritingDirectionInfos const*, unsigned 
short, unsigned short, unsigned short)
-TEWritingDirectionInfos::Replace(TEWritingDirectionInfo const, unsigned short)
-TEWritingDirectionInfos::Replace(TEWritingDirectionInfo const*, unsigned 
short, unsigned short)
-TEWritingDirectionInfos::_ForEach(unsigned short, unsigned short, unsigned 
char (*)(TEWritingDirectionInfo const, void*), void*)
 TaskBar::TaskBar(Window*, long)
 TaskStatusFieldItem::TaskStatusFieldItem()
 TempFile::IsValid() const
commit bf12ddb08f60aa261f83e1688c5d589a69eea0dd
Author: Maciej Rumianowski maciej.rumianow...@gmail.com
Date:   Sat Feb 25 15:34:30 2012 +0100

Replace VARARR TEWritingDirectionInfos with std::vector

diff --git a/svtools/source/edit/textdat2.hxx b/svtools/source/edit/textdat2.hxx
index 945fd23..c34f5ec 100644
--- a/svtools/source/edit/textdat2.hxx
+++ b/svtools/source/edit/textdat2.hxx
@@ -35,6 +35,8 @@
 #include vcl/virdev.hxx
 #include vcl/cursor.hxx
 
+#include vector
+
 class TextNode;
 class TextView;
 
@@ -117,8 +119,6 @@ struct TEWritingDirectionInfo
 }
 };
 
-SV_DECL_VARARR( TEWritingDirectionInfos, TEWritingDirectionInfo, 0 )
-
 class TextLine
 {
 private:
@@ -202,7 +202,7 @@ private:
 
 TextLines   maLines;
 TETextPortionList   maTextPortions;
-TEWritingDirectionInfos maWritingDirectionInfos;
+std::vectorTEWritingDirectionInfo maWritingDirectionInfos;
 
 
 sal_uInt16  mnInvalidPosStart;
@@ -233,7 +233,7 @@ public:
 TextNode*   GetNode() const { return mpNode; }
 TextLines  GetLines()  { return maLines; }
 TETextPortionList  GetTextPortions()   { return maTextPortions; }
-TEWritingDirectionInfos GetWritingDirectionInfos() { return 
maWritingDirectionInfos; }
+std::vectorTEWritingDirectionInfo GetWritingDirectionInfos() { return 
maWritingDirectionInfos; }
 
 
 sal_uInt16  GetLineNumber( sal_uInt16 nIndex, sal_Bool 
bInclEnd );
diff --git a/svtools/source/edit/textdata.cxx b/svtools/source/edit/textdata.cxx
index 4023c86..894887d 100644
--- a/svtools/source/edit/textdata.cxx
+++ b/svtools/source/edit/textdata.cxx
@@ -33,7 +33,6 @@
 #include tools/debug.hxx
 
 SV_IMPL_PTRARR( TextLines, TextLinePtr );
-SV_IMPL_VARARR( TEWritingDirectionInfos, TEWritingDirectionInfo );
 
 
 // -
@@ -173,7 +172,7 @@ void TEParaPortion::MarkInvalid( sal_uInt16 nStart, short 
nDiff )
 }
 }
 
-maWritingDirectionInfos.Remove( 0, maWritingDirectionInfos.Count() );
+maWritingDirectionInfos.clear();
 
 mbInvalid = sal_True;
 }
@@ -191,7 +190,7 @@ void TEParaPortion::MarkSelectionInvalid( sal_uInt16 
nStart, sal_uInt16 /*nEnd*/
 //  nInvalidPosEnd = pNode-Len();
 }
 
-maWritingDirectionInfos.Remove( 0, maWritingDirectionInfos.Count() );
+maWritingDirectionInfos.clear();
 
 mnInvalidDiff = 0;
 mbInvalid = sal_True;
diff --git a/svtools/source/edit/texteng.cxx b/svtools/source/edit/texteng.cxx
index f727de2..6baf8a9 100644
--- a/svtools/source/edit/texteng.cxx
+++ b/svtools/source/edit/texteng.cxx
@@ -65,6 +65,7 @@
 #include unicode/ubidi.h
 
 #include set
+#include vector
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -1835,9 +1836,9 @@ void TextEngine::CreateTextPortions( sal_uLong nPara, 
sal_uInt16 nStartPos )
 }
 aPositions.insert( 

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

2012-03-04 Thread Ivan Timofeev
 sc/inc/viewuno.hxx  |   63 +++
 sc/source/ui/unoobj/viewuno.cxx |  160 ++--
 2 files changed, 106 insertions(+), 117 deletions(-)

New commits:
commit 07342a6aac8c32823fde4be163bb9132ed17d537
Author: Noel Grandin n...@peralex.com
Date:   Wed Feb 29 13:11:18 2012 +0200

Convert usages of SV_DECL_PTRARR_DEL to boost::ptr_vector

* Make typedefs private to class ScTabViewObj
* rename field aSelectionListeners to aSelectionChgListeners

diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx
index 723cf89..cf867b7 100644
--- a/sc/inc/viewuno.hxx
+++ b/sc/inc/viewuno.hxx
@@ -51,38 +51,13 @@
 #include com/sun/star/datatransfer/XTransferableSupplier.hpp
 
 #include address.hxx
+#include boost/ptr_container/ptr_vector.hpp
 
 class ScTabViewShell;
 class ScPreviewShell;
 
 #define SC_VIEWPANE_ACTIVE  0x
 
-
-typedef ::com::sun::star::uno::Reference
-::com::sun::star::sheet::XRangeSelectionListener * 
XRangeSelectionListenerPtr;
-SV_DECL_PTRARR_DEL( XRangeSelectionListenerArr_Impl, 
XRangeSelectionListenerPtr, 4 )
-
-typedef ::com::sun::star::uno::Reference
-::com::sun::star::sheet::XRangeSelectionChangeListener * 
XRangeSelectionChangeListenerPtr;
-SV_DECL_PTRARR_DEL( XRangeSelectionChangeListenerArr_Impl, 
XRangeSelectionChangeListenerPtr, 4 )
-
-typedef ::com::sun::star::uno::Reference
-::com::sun::star::view::XSelectionChangeListener * 
XSelectionChangeListenerPtr;
-SV_DECL_PTRARR_DEL( XSelectionChangeListenerArr_Impl, 
XSelectionChangeListenerPtr, 4 )
-
-typedef ::com::sun::star::uno::Reference
-::com::sun::star::beans::XPropertyChangeListener * 
XViewPropertyChangeListenerPtr;
-SV_DECL_PTRARR_DEL( XViewPropertyChangeListenerArr_Impl, 
XViewPropertyChangeListenerPtr, 4 )
-
-typedef ::com::sun::star::uno::Reference
-::com::sun::star::awt::XEnhancedMouseClickHandler * 
XMouseClickHandlerPtr;
-SV_DECL_PTRARR_DEL( XMouseClickHandlerArr_Impl, XMouseClickHandlerPtr, 4 )
-
-typedef ::com::sun::star::uno::Reference
-::com::sun::star::sheet::XActivationEventListener * 
XActivationEventListenerPtr;
-SV_DECL_PTRARR_DEL( XActivationEventListenerArr_Impl, 
XActivationEventListenerPtr, 4 )
-
-
 //  ScViewPaneBase not derived from OWeakObject
 //  to avoid duplicate OWeakObject in ScTabViewObj
 
@@ -194,13 +169,37 @@ class ScTabViewObj : public ScViewPaneBase,
  public com::sun::star::sheet::XSelectedSheetsSupplier
 {
 private:
+typedef ::com::sun::star::uno::Reference
+::com::sun::star::sheet::XRangeSelectionListener  
XRangeSelectionListenerUnoRef;
+typedef boost::ptr_vectorXRangeSelectionListenerUnoRef 
XRangeSelectionListenerVector;
+
+typedef ::com::sun::star::uno::Reference
+::com::sun::star::sheet::XRangeSelectionChangeListener  
XRangeSelectionChangeListenerUnoRef;
+typedef boost::ptr_vectorXRangeSelectionChangeListenerUnoRef 
XRangeSelectionChangeListenerVector;
+
+typedef ::com::sun::star::uno::Reference
+::com::sun::star::view::XSelectionChangeListener  
XSelectionChangeListenerUnoRef;
+typedef boost::ptr_vectorXSelectionChangeListenerUnoRef 
XSelectionChangeListenerVector;
+
+typedef ::com::sun::star::uno::Reference
+::com::sun::star::beans::XPropertyChangeListener  
XViewPropertyChangeListenerUnoRef;
+typedef boost::ptr_vectorXViewPropertyChangeListenerUnoRef 
XViewPropertyChangeListenerVector;
+
+typedef ::com::sun::star::uno::Reference
+::com::sun::star::awt::XEnhancedMouseClickHandler  
XMouseClickHandlerUnoRef;
+typedef boost::ptr_vectorXMouseClickHandlerUnoRef 
XMouseClickHandlerVector;
+
+typedef ::com::sun::star::uno::Reference
+::com::sun::star::sheet::XActivationEventListener  
XActivationEventListenerUnoRef;
+typedef boost::ptr_vectorXActivationEventListenerUnoRef 
XActivationEventListenerVector;
+
 SfxItemPropertySet  aPropSet;
-XSelectionChangeListenerArr_ImplaSelectionListeners;
-XRangeSelectionListenerArr_Impl aRangeSelListeners;
-XRangeSelectionChangeListenerArr_Impl   aRangeChgListeners;
-XViewPropertyChangeListenerArr_Impl aPropertyChgListeners;
-XMouseClickHandlerArr_Impl  aMouseClickHandlers;
-XActivationEventListenerArr_ImplaActivationListeners;
+XSelectionChangeListenerVector  aSelectionChgListeners;
+XRangeSelectionListenerVector   aRangeSelListeners;
+XRangeSelectionChangeListenerVector aRangeChgListeners;
+XViewPropertyChangeListenerVector   aPropertyChgListeners;
+XMouseClickHandlerVectoraMouseClickHandlers;
+XActivationEventListenerVector  aActivationListeners;
 SCTAB   nPreviousTab;
 sal_BoolbDrawSelModeSet;
 sal_Bool

[Libreoffice-commits] .: 3 commits - editeng/source sd/util

2012-03-02 Thread Ivan Timofeev
 editeng/source/editeng/editdoc.hxx  |   14 --
 editeng/source/editeng/impedit4.cxx |   15 ++-
 sd/util/sd.flt  |1 -
 3 files changed, 14 insertions(+), 16 deletions(-)

New commits:
commit c1cf8dac6d54f3d0876803ca9dffce23df7241da
Author: Ivan Timofeev timofeev@gmail.com
Date:   Fri Mar 2 18:44:42 2012 +0400

there was the object comparison, not the pointer comparison

diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index d28d664..fd4fa31 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -814,7 +814,16 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem 
rItem, SvStream rOutput,
 case EE_CHAR_FONTINFO_CJK:
 case EE_CHAR_FONTINFO_CTL:
 {
-sal_uInt32 n = std::find(rFontTable.begin(), rFontTable.end(), 
(SvxFontItem*)rItem ) - rFontTable.begin();
+sal_uInt32 n = 0;
+for (size_t i = 0; i  rFontTable.size(); ++i)
+{
+if (*rFontTable[i] == rItem)
+{
+n = i;
+break;
+}
+}
+
 rOutput  OOO_STRING_SVTOOLS_RTF_F;
 rOutput.WriteNumber( n );
 }
commit 0ecb2bd92a9dadb2e01ee5b960a48ed0552e7c06
Author: Ivan Timofeev timofeev@gmail.com
Date:   Fri Mar 2 10:25:47 2012 +0400

remove traces of SvxFontTable

diff --git a/editeng/source/editeng/editdoc.hxx 
b/editeng/source/editeng/editdoc.hxx
index 32bfb24..e9b196c 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -139,20 +139,6 @@ typedef ContentAttribsInfo* ContentAttribsInfoPtr;
 SV_DECL_PTRARR( ContentInfoArray, ContentAttribsInfoPtr, 1 )
 
 //  --
-//  class SvxFontTable
-//  --
-DECLARE_TABLE( DummyFontTable, SvxFontItem* )
-
-class SvxFontTable : public DummyFontTable
-{
-public:
-SvxFontTable();
-~SvxFontTable();
-
-sal_uLong   GetId( const SvxFontItem rFont );
-};
-
-//  --
 //  class SvxColorList
 //  --
 typedef ContentNode* ContentNodePtr;
diff --git a/sd/util/sd.flt b/sd/util/sd.flt
index 83c7634..215ef8e 100644
--- a/sd/util/sd.flt
+++ b/sd/util/sd.flt
@@ -46,7 +46,6 @@ SelRange
 SortedPositions_SAR
 SvxACorrChars
 SvxColorList
-SvxFontTable
 SvxRTFStyleType
 SvxTabStopArr_SAR
 TextPortionList
commit 9e137b29e1cca1d460017f2a1b276be969002d80
Author: Ivan Timofeev timofeev@gmail.com
Date:   Fri Mar 2 10:24:17 2012 +0400

fix memory leak

diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 07d8074..d28d664 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -688,6 +688,10 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream rOutput, 
EditSelection aSel )
 rOutput  }};// 1xparentheses paragraphs, 1xparentheses RTF document
 rOutput.Flush();
 
+std::vectorSvxFontItem*::iterator it;
+for (it = aFontTable.begin(); it != aFontTable.end(); ++it)
+delete *it;
+
 #if (OSL_DEBUG_LEVEL  2)  !defined( UNX )
 {
 SvFileStream aStream( String( RTL_CONSTASCII_USTRINGPARAM ( 
d:\\rtf_out.rtf ) ), STREAM_WRITE|STREAM_TRUNC );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/source

2012-02-27 Thread Ivan Timofeev
 vcl/aqua/source/dtrans/HtmlFmtFlt.cxx   |4 ++--
 vcl/aqua/source/dtrans/PictToBmpFlt.cxx |4 ++--
 vcl/source/gdi/print3.cxx   |2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit c581d33dec47a4c411a034482876543f6357d1e8
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Feb 27 17:12:33 2012 +0400

there is no Sequence::isEmpty()

diff --git a/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx 
b/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
index 275f5a1..0bd461d 100644
--- a/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
+++ b/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
@@ -65,9 +65,9 @@ const std::string TAG_END_BODY = std::string(/BODY);
 
 Sequencesal_Int8 SAL_CALL TextHtmlToHTMLFormat(Sequencesal_Int8 aTextHtml)
 {
-OSL_ASSERT(!aTextHtml.isEmpty());
+OSL_ASSERT(aTextHtml.getLength()  0);
 
-if (aTextHtml.isEmpty())
+if (!(aTextHtml.getLength()  0))
 return Sequencesal_Int8();
 
 // fill the buffer with dummy values to calc the exact length
diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx 
b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
index 4b3d371..3eb4fb8 100644
--- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
+++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
@@ -161,7 +161,7 @@ bool ImageToBMP( com::sun::star::uno::Sequencesal_Int8 
aPict,
 {
 aBmp.realloc( [pOut length] );
 [pOut getBytes: aBmp.getArray() length: aBmp.getLength()];
-bResult = (!aBmp.isEmpty());
+bResult = (aBmp.getLength() != 0);
 }
 }
 }
@@ -190,7 +190,7 @@ bool BMPToImage( com::sun::star::uno::Sequencesal_Int8 
aBmp,
 {
 aPict.realloc( [pOut length] );
 [pOut getBytes: aPict.getArray() length: aPict.getLength()];
-bResult = (!aPict.isEmpty());
+bResult = (aPict.getLength() != 0);
 }
 }
 }
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index abdece6..482491d 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1336,7 +1336,7 @@ void PrinterController::setValue( const 
beans::PropertyValue i_rValue )
 
 void PrinterController::setUIOptions( const Sequence beans::PropertyValue  
i_rOptions )
 {
-DBG_ASSERT( mpImplData-maUIOptions.isEmpty(), setUIOptions called twice 
! );
+DBG_ASSERT( mpImplData-maUIOptions.getLength() == 0, setUIOptions called 
twice ! );
 
 mpImplData-maUIOptions = i_rOptions;
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basegfx/inc

2012-02-26 Thread Ivan Timofeev
 basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 0499a44cddae31dff5ce1959aba8aa64119dea90
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sun Feb 26 16:29:47 2012 +0400

definition was removed, remove declaration as well

diff --git a/basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx 
b/basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx
index 03fd079..d125d47 100644
--- a/basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx
+++ b/basegfx/inc/basegfx/polygon/b3dpolygonclipper.hxx
@@ -62,9 +62,6 @@ namespace basegfx
 // version for Polygons
 BASEGFX_DLLPUBLIC B3DPolyPolygon clipPolygonOnOrthogonalPlane(const 
B3DPolygon rCandidate, B3DOrientation ePlaneOrthogonal, bool bClipPositive, 
double fPlaneOffset, bool bStroke);
 
-// versions for B2DRange, clips only against X,Y
-BASEGFX_DLLPUBLIC B3DPolyPolygon clipPolygonOnRange(const B3DPolygon 
rCandidate, const B2DRange rRange, bool bInside, bool bStroke);
-
 } // end of namespace tools
 } // end of namespace basegfx
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - basegfx/inc basegfx/source svl/inc svl/source unusedcode.easy

2012-02-19 Thread Ivan Timofeev
 basegfx/inc/basegfx/polygon/b2dpolygontools.hxx |   10 --
 basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx |   27 ---
 basegfx/source/polygon/b2dpolygontools.cxx  |   37 --
 basegfx/source/polygon/b2dpolypolygontools.cxx  |   26 ---
 svl/inc/svl/listeneriter.hxx|7 -
 svl/source/notify/listeneriter.cxx  |   74 
 unusedcode.easy |9 --
 7 files changed, 190 deletions(-)

New commits:
commit af79fcb204efeafb48659ed4a97433b7e2cc2f84
Author: Elton Chung el...@layerjet.com
Date:   Sun Feb 19 15:41:32 2012 +0800

Remove unused code

diff --git a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx 
b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx
index d86abb3..1bee9b3 100644
--- a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx
+++ b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx
@@ -130,12 +130,6 @@ namespace basegfx
 // if 0.0 it is calculated using getLength(...)
 BASEGFX_DLLPUBLIC B2DPolygon getSnippetAbsolute(const B2DPolygon 
rCandidate, double fFrom, double fTo, double fLength = 0.0);
 
-// get a snippet from given polygon for relative distances. The 
polygon is assumed
-// to be opened (not closed). fFrom and fTo need to be in range [0.0 
.. 1.0], where
-// fTo = fFrom. If length is given, it is assumed the correct polygon 
length,
-// if 0.0 it is calculated using getLength(...)
-BASEGFX_DLLPUBLIC B2DPolygon getSnippetRelative(const B2DPolygon 
rCandidate, double fFrom = 0.0, double fTo = 1.0, double fLength = 0.0);
-
 // Continuity check for point with given index
 BASEGFX_DLLPUBLIC B2VectorContinuity getContinuityInPoint(const 
B2DPolygon rCandidate, sal_uInt32 nIndex);
 
@@ -351,10 +345,6 @@ namespace basegfx
 // by several trivial sub-segments
 BASEGFX_DLLPUBLIC B2DPolygon createSimplifiedPolygon(const 
B2DPolygon);
 
-// calculate the distance to the given endless ray and return. The 
relative position on the edge is returned in Cut.
-// That position may be less than 0.0 or more than 1.0
-BASEGFX_DLLPUBLIC double getDistancePointToEndlessRay(const B2DPoint 
rPointA, const B2DPoint rPointB, const B2DPoint rTestPoint, double rCut);
-
 // calculate the smallest distance to given edge and return. The 
relative position on the edge is returned in Cut.
 // That position is in the range [0.0 .. 1.0] and the returned 
distance is adapted accordingly to the start or end
 // point of the edge
diff --git a/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx 
b/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx
index 37d2cb5..6962596 100644
--- a/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx
+++ b/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx
@@ -78,19 +78,6 @@ namespace basegfx
 // in bWithBorder flag. It is assumed that the orientations of the 
given polygon are correct.
 BASEGFX_DLLPUBLIC bool isInside(const B2DPolyPolygon rCandidate, 
const B2DPoint rPoint, bool bWithBorder = false);
 
-/** get range of PolyPolygon. Control points are included.
-
-For detailed description look at getRangeWithControlPoints(const 
B2DPolygon).
-This method just expands by the range of every sub-Polygon.
-
-@param rCandidate
-The B2DPolyPolygon eventually containing bezier segments
-
-@return
-The outer range including control points
-*/
-BASEGFX_DLLPUBLIC B2DRange getRangeWithControlPoints(const 
B2DPolyPolygon rCandidate);
-
 /** Get the range of a polyPolygon
 
 For detailed description look at getRange(const B2DPolygon).
@@ -241,20 +228,6 @@ namespace basegfx
 // #i76891# Try to remove existing curve segments if they are simply 
edges
 BASEGFX_DLLPUBLIC B2DPolyPolygon simplifyCurveSegments(const 
B2DPolyPolygon rCandidate);
 
-/** split each edge of a polyPolygon in exactly nSubEdges equidistant 
edges
-
-@param rCandidate
-The source polyPolygon. If too small (no edges), nSubEdges too 
small (2)
-or neither bHandleCurvedEdgesnor bHandleStraightEdges it will just 
be returned.
-Else for each edge nSubEdges will be created. Closed state is 
preserved.
-
-@param nSubEdges
-@param bHandleCurvedEdges
-@param bHandleStraightEdges
-Please take a look at reSegmentPolygonEdges description, these are 
the same.
-*/
-BASEGFX_DLLPUBLIC B2DPolyPolygon reSegmentPolyPolygonEdges(const 
B2DPolyPolygon rCandidate, sal_uInt32 nSubEdges, bool bHandleCurvedEdges, bool 
bHandleStraightEdges);
-
 //
 // comparators with tolerance for 2D PolyPolygons
 BASEGFX_DLLPUBLIC bool equal(const B2DPolyPolygon 

[Libreoffice-commits] .: svx/inc unusedcode.easy

2012-02-18 Thread Ivan Timofeev
 svx/inc/svx/contdlg.hxx |8 
 unusedcode.easy |6 --
 2 files changed, 14 deletions(-)

New commits:
commit 5d7b70f8c8e912ebca068cf57058a92b0b05809f
Author: Elton Chung el...@layerjet.com
Date:   Sat Feb 18 23:15:40 2012 +0800

Remove unused code

diff --git a/svx/inc/svx/contdlg.hxx b/svx/inc/svx/contdlg.hxx
index cb88430..1c48248 100644
--- a/svx/inc/svx/contdlg.hxx
+++ b/svx/inc/svx/contdlg.hxx
@@ -86,17 +86,11 @@ public:
Window* pParent, const ResId rResId );
 ~SvxContourDlg();
 
-voidSetExecState( sal_Bool bEnable );
-
-voidSetGraphic( const Graphic rGraphic );
-voidSetGraphicLinked( sal_Bool bLinked );
 const Graphic  GetGraphic() const;
 sal_BoolIsGraphicChanged() const;
 
-voidSetPolyPolygon( const PolyPolygon rPolyPoly );
 PolyPolygon GetPolyPolygon();
 
-voidSetEditingObject( void* pObj );
 const void* GetEditingObject() const;
 
 voidUpdate( const Graphic rGraphic, sal_Bool 
bGraphicLinked,
@@ -105,8 +99,6 @@ public:
 static PolyPolygon  CreateAutoContour(  const Graphic rGraphic,
 const Rectangle* pRect = NULL,
 const sal_uIntPtr nFlags = 0L );
-static void ScaleContour( PolyPolygon rContour, const Graphic 
rGraphic,
-  const MapUnit eUnit, const Size 
rDisplaySize );
 };
 
 /*
diff --git a/unusedcode.easy b/unusedcode.easy
index 4f8892c..6abc24b 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -280,12 +280,6 @@ 
SvxChartDataDescrItem::SvxChartDataDescrItem(SvxChartDataDescr, unsigned short)
 SvxChartTextOrientItem::SvxChartTextOrientItem(SvxChartTextOrient, unsigned 
short)
 SvxColorValueSet::SvxColorValueSet(Window*, long)
 SvxColumnItem::GetVisibleRight() const
-SvxContourDlg::ScaleContour(PolyPolygon, Graphic const, MapUnit, Size const)
-SvxContourDlg::SetEditingObject(void*)
-SvxContourDlg::SetExecState(unsigned char)
-SvxContourDlg::SetGraphic(Graphic const)
-SvxContourDlg::SetGraphicLinked(unsigned char)
-SvxContourDlg::SetPolyPolygon(PolyPolygon const)
 SvxDoCapitals::Do(String const, unsigned short, unsigned short, unsigned char)
 SvxDrawOutlinerViewForwarder::SetShapePos(Point const)
 SvxDrawPage::SvxDrawPage()
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/source

2012-02-18 Thread Ivan Timofeev
 vcl/source/window/splitwin.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 46506f82d1d514194aa2b472f6a74398c404fa9d
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Feb 18 22:24:11 2012 +0400

fix build

diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index dfe66d1..4d5c8ad 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1435,12 +1435,14 @@ void SplitWindow::ImplSetWindowSize( long nDelta )
 SetSizePixel( aSize );
 break;
 case WINDOWALIGN_BOTTOM:
+{
 maDragRect.Top() += nDelta;
 Point aPos = GetPosPixel();
 aPos.Y() -= nDelta;
 aSize.Height() += nDelta;
 SetPosSizePixel( aPos, aSize );
 break;
+}
 case WINDOWALIGN_LEFT:
 aSize.Width() += nDelta;
 SetSizePixel( aSize );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - editeng/inc editeng/source

2012-02-15 Thread Ivan Timofeev
 editeng/inc/editeng/forbiddencharacterstable.hxx |   27 +---
 editeng/source/misc/forbiddencharacterstable.cxx |   50 +--
 editeng/source/uno/UnoForbiddenCharsTable.cxx|7 +--
 3 files changed, 27 insertions(+), 57 deletions(-)

New commits:
commit 843eafc765a3d1d0ea4c9a89855c73e81784aa8b
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Feb 15 20:44:26 2012 +0400

tweak Convert tools/table.hxx in editeng/forbiddencharacterstable.hxx...

* remove 'const' from GetForbiddenCharacters
* CharInfoMap - Map
* pInf - pForbiddenCharacters
* remove 'inline' from the function defined within the class definition
* some code simplifications

diff --git a/editeng/inc/editeng/forbiddencharacterstable.hxx 
b/editeng/inc/editeng/forbiddencharacterstable.hxx
index afe6d5b..55db6db 100644
--- a/editeng/inc/editeng/forbiddencharacterstable.hxx
+++ b/editeng/inc/editeng/forbiddencharacterstable.hxx
@@ -45,17 +45,17 @@ namespace lang {
 class EDITENG_DLLPUBLIC SvxForbiddenCharactersTable : public 
salhelper::SimpleReferenceObject
 {
 public:
-typedef std::mapsal_uInt16, com::sun::star::i18n::ForbiddenCharacters 
CharInfoMap;
+typedef std::mapsal_uInt16, com::sun::star::i18n::ForbiddenCharacters 
Map;
 private:
-mutable CharInfoMap maCharInfoMap;
+Map maMap;
 ::com::sun::star::uno::Reference 
::com::sun::star::lang::XMultiServiceFactory  mxMSF;
 
 public:
 SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference 
::com::sun::star::lang::XMultiServiceFactory  xMSF);
 ~SvxForbiddenCharactersTable() {}
 
-inline CharInfoMap Map() { return maCharInfoMap; }
-const com::sun::star::i18n::ForbiddenCharacters* GetForbiddenCharacters( 
sal_uInt16 nLanguage, sal_Bool bGetDefault ) const;
+Map GetMap() { return maMap; }
+const com::sun::star::i18n::ForbiddenCharacters* GetForbiddenCharacters( 
sal_uInt16 nLanguage, sal_Bool bGetDefault );
 voidSetForbiddenCharacters(  sal_uInt16 nLanguage , const 
com::sun::star::i18n::ForbiddenCharacters );
 voidClearForbiddenCharacters( sal_uInt16 nLanguage );
 };
diff --git a/editeng/source/misc/forbiddencharacterstable.cxx 
b/editeng/source/misc/forbiddencharacterstable.cxx
index e809282..9760b0f 100644
--- a/editeng/source/misc/forbiddencharacterstable.cxx
+++ b/editeng/source/misc/forbiddencharacterstable.cxx
@@ -39,31 +39,29 @@ SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( 
::com::sun::star::uno:
 mxMSF = xMSF;
 }
 
-const com::sun::star::i18n::ForbiddenCharacters* 
SvxForbiddenCharactersTable::GetForbiddenCharacters( sal_uInt16 nLanguage, 
sal_Bool bGetDefault ) const
+const com::sun::star::i18n::ForbiddenCharacters* 
SvxForbiddenCharactersTable::GetForbiddenCharacters( sal_uInt16 nLanguage, 
sal_Bool bGetDefault )
 {
-com::sun::star::i18n::ForbiddenCharacters* pInf = NULL;
-CharInfoMap::iterator it = maCharInfoMap.find( nLanguage );
-if ( it != maCharInfoMap.end() )
-pInf = (it-second);
-if ( !pInf  bGetDefault  mxMSF.is() )
+com::sun::star::i18n::ForbiddenCharacters* pForbiddenCharacters = NULL;
+Map::iterator it = maMap.find( nLanguage );
+if ( it != maMap.end() )
+pForbiddenCharacters = (it-second);
+else if ( bGetDefault  mxMSF.is() )
 {
 LocaleDataWrapper aWrapper( mxMSF, SvxCreateLocale( nLanguage ) );
-maCharInfoMap[ nLanguage ] = aWrapper.getForbiddenCharacters();
-pInf = maCharInfoMap[ nLanguage ];
+maMap[ nLanguage ] = aWrapper.getForbiddenCharacters();
+pForbiddenCharacters = maMap[ nLanguage ];
 }
-return pInf;
+return pForbiddenCharacters;
 }
 
 void SvxForbiddenCharactersTable::SetForbiddenCharacters( sal_uInt16 
nLanguage, const com::sun::star::i18n::ForbiddenCharacters rForbiddenChars )
 {
-maCharInfoMap[ nLanguage ] = rForbiddenChars;
+maMap[ nLanguage ] = rForbiddenChars;
 }
 
 void SvxForbiddenCharactersTable::ClearForbiddenCharacters( sal_uInt16 
nLanguage )
 {
-CharInfoMap::iterator it = maCharInfoMap.find( nLanguage );
-if ( it != maCharInfoMap.end() )
-maCharInfoMap.erase( it );
+maMap.erase( nLanguage );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/uno/UnoForbiddenCharsTable.cxx 
b/editeng/source/uno/UnoForbiddenCharsTable.cxx
index 5d2c79e..5957520 100644
--- a/editeng/source/uno/UnoForbiddenCharsTable.cxx
+++ b/editeng/source/uno/UnoForbiddenCharsTable.cxx
@@ -117,15 +117,15 @@ Sequence Locale  SAL_CALL 
SvxUnoForbiddenCharsTable::getLocales()
 {
 SolarMutexGuard aGuard;
 
-const sal_Int32 nCount = mxForbiddenChars.is() ? 
mxForbiddenChars-Map().size() : 0;
+const sal_Int32 nCount = mxForbiddenChars.is() ? 
mxForbiddenChars-GetMap().size() : 0;
 
 Sequence Locale  aLocales( nCount );
 if( nCount )
 {
 Locale* pLocales = aLocales.getArray();
 
-for( SvxForbiddenCharactersTable::CharInfoMap::iterator

[Libreoffice-commits] .: sw/source

2012-02-13 Thread Ivan Timofeev
 sw/source/core/layout/paintfrm.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 19d80a257b0e5c9d45985e49f33493f38c5d5f10
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Feb 13 19:34:58 2012 +0400

Header/Footer: don't show in web layout mode

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 74abd70..206bdc9 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3489,6 +3489,7 @@ void SwPageFrm::PaintDecorators( ) const
  !pGlobalShell-GetViewOptions()-IsPDFExport() 
  !pGlobalShell-IsPreView() 
  !pGlobalShell-GetViewOptions()-IsReadonly() 
+ !pGlobalShell-GetViewOptions()-getBrowseMode() 
  ( pGlobalShell-IsShowHeaderFooterSeparator( Header ) ||
pGlobalShell-IsShowHeaderFooterSeparator( Footer ) ) )
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/inc oox/source

2012-02-13 Thread Ivan Timofeev
 oox/inc/oox/xls/unitconverter.hxx |1 -
 oox/source/xls/formulabase.cxx|3 ---
 oox/source/xls/unitconverter.cxx  |1 -
 3 files changed, 5 deletions(-)

New commits:
commit c2ad01cc22d79aeed31d97220430d9a9fd4fd2b1
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Feb 13 20:12:57 2012 +0400

remove unused fields

diff --git a/oox/inc/oox/xls/unitconverter.hxx 
b/oox/inc/oox/xls/unitconverter.hxx
index a6ae756..e3cd263 100644
--- a/oox/inc/oox/xls/unitconverter.hxx
+++ b/oox/inc/oox/xls/unitconverter.hxx
@@ -110,7 +110,6 @@ private:
 
 DoubleVectormaCoeffs;   /// Coefficients for unit 
conversion.
 OoxErrorCodeMap maOoxErrCodes;  /// Maps error code strings to 
BIFF error constants.
-BiffErrorCodeMapmaBiffErrCodes; /// Maps BIFF error constants to 
error code strings.
 sal_Int32   mnNullDate; /// Nulldate of this workbook 
(number of days since -01-01).
 };
 
diff --git a/oox/source/xls/formulabase.cxx b/oox/source/xls/formulabase.cxx
index 0b10950..98925d7 100644
--- a/oox/source/xls/formulabase.cxx
+++ b/oox/source/xls/formulabase.cxx
@@ -833,7 +833,6 @@ struct FunctionProviderImpl
 typedef RefMap sal_uInt16, FunctionInfo   FuncIdMap;
 
 FunctionInfoVector  maFuncs;/// All function infos in one list.
-FuncNameMap maOdfFuncs; /// Maps ODF function names to 
function data.
 FuncNameMap maOoxFuncs; /// Maps OOXML function names to 
function data.
 FuncIdMap   maBiff12Funcs;  /// Maps BIFF12 function indexes 
to function data.
 FuncIdMap   maBiffFuncs;/// Maps BIFF2-BIFF8 function 
indexes to function data.
@@ -931,8 +930,6 @@ void FunctionProviderImpl::initFunc( const FunctionData 
rFuncData, sal_uInt8 nM
 
 // insert the function info into the member maps
 maFuncs.push_back( xFuncInfo );
-if( !xFuncInfo-maOdfFuncName.isEmpty() )
-maOdfFuncs[ xFuncInfo-maOdfFuncName ] = xFuncInfo;
 if( !xFuncInfo-maOoxFuncName.isEmpty() )
 maOoxFuncs[ xFuncInfo-maOoxFuncName ] = xFuncInfo;
 if( xFuncInfo-mnBiff12FuncId != NOID )
diff --git a/oox/source/xls/unitconverter.cxx b/oox/source/xls/unitconverter.cxx
index 2438023..636fb72 100644
--- a/oox/source/xls/unitconverter.cxx
+++ b/oox/source/xls/unitconverter.cxx
@@ -239,7 +239,6 @@ sal_uInt8 UnitConverter::calcBiffErrorCode( const OUString 
rErrorCode ) const
 void UnitConverter::addErrorCode( sal_uInt8 nErrorCode, const OUString 
rErrorCode )
 {
 maOoxErrCodes[ rErrorCode ]  = nErrorCode;
-maBiffErrCodes[ nErrorCode ] = rErrorCode;
 }
 
 double UnitConverter::getCoefficient( Unit eUnit ) const
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2012-02-13 Thread Ivan Timofeev
 sc/source/core/data/cell.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit ee38b167c86c8f96aa41dca861cae327c6df5915
Author: Kohei Yoshida kohei.yosh...@suse.com
Date:   Mon Feb 13 12:26:50 2012 -0500

fdo#45916: Ensure formula cell's pCode isn't NULL even when compilation 
fails.

diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 2f3df26..b74f08e 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -777,6 +777,9 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const 
ScAddress rPos,
 aPos( rPos )
 {
 Compile( rFormula, true, eGrammar );// bNoListening, Insert does that
+if (!pCode)
+// We need to have a non-NULL token array instance at all times.
+pCode = new ScTokenArray;
 }
 
 // Wird von den Importfiltern verwendet
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source

2012-02-13 Thread Ivan Timofeev
 sc/source/core/data/cell.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 202019a7671ff9f4f1431513cd606a6bf1bcddef
Author: Kohei Yoshida kohei.yosh...@suse.com
Date:   Mon Feb 13 12:26:50 2012 -0500

fdo#45916: Ensure formula cell's pCode isn't NULL even when compilation 
fails.

Signed-off-by: Ivan Timofeev timofeev@gmail.com

diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 155f4bd..8ddc540 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -782,6 +782,9 @@ ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const 
ScAddress rPos,
 aPos( rPos )
 {
 Compile( rFormula, true, eGrammar );// bNoListening, Insert does that
+if (!pCode)
+// We need to have a non-NULL token array instance at all times.
+pCode = new ScTokenArray;
 }
 
 // Wird von den Importfiltern verwendet
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2012-02-13 Thread Ivan Timofeev
 sc/source/core/data/cell.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit bf789d4a40711b7b04b969e3330373a2f947b994
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Feb 13 22:46:38 2012 +0400

make the return statement more visible

diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index b74f08e..74e9330 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -1056,7 +1056,8 @@ void ScFormulaCell::GetResultDimensions( SCSIZE rCols, 
SCSIZE rRows )
 void ScFormulaCell::Compile( const String rFormula, bool bNoListening,
 const FormulaGrammar::Grammar eGrammar )
 {
-if ( pDocument-IsClipOrUndo() ) return;
+if ( pDocument-IsClipOrUndo() )
+return;
 bool bWasInFormulaTree = pDocument-IsInFormulaTree( this );
 if ( bWasInFormulaTree )
 pDocument-RemoveFromFormulaTree( this );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/inc oox/source unusedcode.easy

2012-02-11 Thread Ivan Timofeev
 oox/inc/oox/xls/formulabase.hxx  |   38 --
 oox/source/xls/formulabase.cxx   |   39 ---
 oox/source/xls/formulaparser.cxx |   13 -
 unusedcode.easy  |5 -
 4 files changed, 95 deletions(-)

New commits:
commit 731a8d7d5bd47bc17f21065f195170da711f3277
Author: Elton Chung el...@layerjet.com
Date:   Fri Feb 10 22:16:49 2012 +0800

Remove unused code

diff --git a/oox/inc/oox/xls/formulabase.hxx b/oox/inc/oox/xls/formulabase.hxx
index b3e403a..0a3b35a 100644
--- a/oox/inc/oox/xls/formulabase.hxx
+++ b/oox/inc/oox/xls/formulabase.hxx
@@ -705,14 +705,6 @@ public:
 
 // 
 
-/** Generates a cell address string in Calc's absolute $Sheet.$A$1 notation
-from the passed cell address.
-
-@param rAddress  The cell address to be converted to a string.
- */
-::rtl::OUString generateApiAddressString(
-const ::com::sun::star::table::CellAddress 
rAddress ) const;
-
 /** Generates a cell range string in Calc's absolute $Sheet.$A$1:$A$
 notation from the passed cell range address.
 
@@ -721,13 +713,6 @@ public:
 ::rtl::OUString generateApiRangeString(
 const ::com::sun::star::table::CellRangeAddress 
rRange ) const;
 
-/** Generates a cell range list string in Calc's absolute $Sheet.$A$1:$A$1
-notation from the passed cell range addresses.
-
-@param rRanges  The list of cell ranges to be converted to a string.
- */
-::rtl::OUString generateApiRangeListString( const ApiCellRangeList 
rRanges ) const;
-
 /** Generates a string in Calc formula notation from the passed string.
 
 @param rString  The string value.
@@ -760,29 +745,6 @@ public:
 ::com::sun::star::uno::Any
 extractReference( const ApiTokenSequence rTokens ) 
const;
 
-/** Tries to extract a single cell address from a formula token sequence.
-
-@param orAddress  (output parameter) If the token sequence is valid,
-this parameter will contain the extracted cell address. If the
-token sequence contains unexpected tokens, nothing meaningful is
-inserted, and the function returns false.
-
-@param rTokens  The token sequence to be parsed. Should contain exactly
-one cell address token. The token sequence may contain whitespace
-tokens.
-
-@param bAllowRelative  True = it is allowed that rTokens contains
-relative references (based on cell A1 of the current sheet).
-False = only real absolute references will be accepted.
-
-@return  True, if the token sequence contains a valid cell address
-which has been extracted to orAddress, false otherwise.
- */
-boolextractCellAddress(
-::com::sun::star::table::CellAddress orAddress,
-const ApiTokenSequence rTokens,
-bool bAllowRelative ) const;
-
 /** Tries to extract a cell range address from a formula token sequence.
 
 @param orAddress  (output parameter) If the token sequence is valid,
diff --git a/oox/source/xls/formulabase.cxx b/oox/source/xls/formulabase.cxx
index 477a8f9..e9ffa95 100644
--- a/oox/source/xls/formulabase.cxx
+++ b/oox/source/xls/formulabase.cxx
@@ -1494,15 +1494,6 @@ OUString 
FormulaProcessorBase::generateRangeList2dString( const ApiCellRangeList
 
 // 
 
-OUString FormulaProcessorBase::generateApiAddressString( const CellAddress 
rAddress ) const
-{
-OUString aCellName;
-PropertySet aCellProp( getCellFromDoc( rAddress ) );
-aCellProp.getProperty( aCellName, PROP_AbsoluteName );
-OSL_ENSURE( !aCellName.isEmpty(), 
FormulaProcessorBase::generateApiAddressString - cannot create cell address 
string );
-return aCellName;
-}
-
 OUString FormulaProcessorBase::generateApiRangeString( const CellRangeAddress 
rRange ) const
 {
 OUString aRangeName;
@@ -1512,22 +1503,6 @@ OUString FormulaProcessorBase::generateApiRangeString( 
const CellRangeAddress r
 return aRangeName;
 }
 
-OUString FormulaProcessorBase::generateApiRangeListString( const 
ApiCellRangeList rRanges ) const
-{
-OUStringBuffer aBuffer;
-for( ApiCellRangeList::const_iterator aIt = rRanges.begin(), aEnd = 
rRanges.end(); aIt != aEnd; ++aIt )
-{
-OUString aRangeName = generateApiRangeString( *aIt );
-if( !aRangeName.isEmpty() )
-{
-if( aBuffer.getLength()  0 )
-aBuffer.append( API_TOKEN_SEP );
-aBuffer.append( aRangeName );
-}
-}
-return aBuffer.makeStringAndClear();
-}
-
 OUString FormulaProcessorBase::generateApiString( const OUString rString )
 {
 

[Libreoffice-commits] .: cui/source

2012-02-06 Thread Ivan Timofeev
 cui/source/dialogs/about.src |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 66e4c5851b7ef27d375e2bdb482e723f6e0ce1f0
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Feb 6 18:50:58 2012 +0400

correct TDF link

diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src
index ddbd25e..fe06366 100644
--- a/cui/source/dialogs/about.src
+++ b/cui/source/dialogs/about.src
@@ -112,7 +112,7 @@ ModalDialog RID_DEFAULTABOUT
 };
 String ABOUT_TDF_LINK
 {
-Text[ en-US ] = http://http://www.documentfoundation.org/;;
+Text[ en-US ] = http://www.documentfoundation.org/;;
 };
 String ABOUT_FEATURESSTR_LINK
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: l10ntools/inc l10ntools/source

2012-02-06 Thread Ivan Timofeev
 l10ntools/inc/export.hxx|2 
 l10ntools/source/export.cxx |  199 +---
 2 files changed, 60 insertions(+), 141 deletions(-)

New commits:
commit e747a4e87e6abf581a5b0c381f706b581c2a0fbc
Author: Christina Rossmanith chrrossman...@web.de
Date:   Sun Feb 5 15:03:30 2012 +0100

Reduced duplicate code (simian) / l10ntools

diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index d8e3c96..ba086b5 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -352,7 +352,7 @@ private:
 
 sal_Bool PrepareTextToMerge(rtl::OString rText, sal_uInt16 nTyp,
 rtl::OString rLangIndex, ResData *pResData);
-
+void ResData2Output( PFormEntrys *pEntry, sal_uInt16 nType, const 
rtl::OString rTextType );
 void MergeRest( ResData *pResData, sal_uInt16 nMode = MERGE_MODE_NORMAL );
 void ConvertMergeContent( rtl::OString rText );
 
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 204214f..b41ff8a 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -1859,6 +1859,58 @@ sal_Bool Export::PrepareTextToMerge(rtl::OString rText, 
sal_uInt16 nTyp,
 return sal_True;
 }
 
+void Export::ResData2Output( PFormEntrys *pEntry, sal_uInt16 nType, const 
rtl::OString rTextType )
+{
+sal_Bool bAddSemicolon = sal_False;
+sal_Bool bFirst = sal_True;
+rtl::OString sCur;
+
+for( unsigned int n = 0; n  aLanguages.size(); n++ ){
+sCur = aLanguages[ n ];
+
+rtl::OString sText;
+sal_Bool bText = pEntry-GetTransex3Text( sText, nType, sCur , 
sal_True );
+if ( bText  !sText.isEmpty()  sText != - ) {
+rtl::OString sOutput;
+if ( bNextMustBeDefineEOL)  {
+if ( bFirst )
+sOutput += \t\\\n;
+else
+sOutput += ;\t\\\n;
+}
+bFirst=sal_False;
+sOutput += \t;
+
+sOutput += rTextType;
+
+if ( ! Export::isSourceLanguage( sCur ) ) {
+sOutput += [ ;
+sOutput += sCur;
+sOutput +=  ] ;
+}
+sOutput += = ;
+ConvertMergeContent( sText );
+sOutput += sText;
+
+if ( bDefine )
+sOutput += ;\\\n;
+else if ( !bNextMustBeDefineEOL )
+sOutput += ;\n;
+else
+bAddSemicolon = sal_True;
+for ( sal_uInt16 j = 1; j  nLevel; j++ )
+sOutput += \t;
+WriteToMerged( sOutput , true );
+}
+}
+
+
+if ( bAddSemicolon ) {
+rtl::OString sOutput( ; );
+WriteToMerged( sOutput , false );
+}
+}
+
 /*/
 void Export::MergeRest( ResData *pResData, sal_uInt16 nMode )
 /*/
@@ -1876,150 +1928,17 @@ void Export::MergeRest( ResData *pResData, sal_uInt16 
nMode )
 case MERGE_MODE_NORMAL : {
 PFormEntrys *pEntry = pMergeDataFile-GetPFormEntrys( pResData );
 
-bool bWriteNoSlash = false;
-if ( pEntry  pResData-bText ) {
-
-sal_Bool bAddSemikolon = sal_False;
-sal_Bool bFirst = sal_True;
-rtl::OString sCur;
-for( unsigned int n = 0; n  aLanguages.size(); n++ ){
-sCur = aLanguages[ n ];
-
-rtl::OString sText;
-sal_Bool bText = pEntry-GetTransex3Text( sText, 
STRING_TYP_TEXT, sCur , sal_True );
-if ( bText  !sText.isEmpty()  sText != - ) {
-rtl::OString sOutput;
-if ( bNextMustBeDefineEOL)  {
-if ( bFirst )
-sOutput += \t\\\n;
-else
-sOutput += ;\t\\\n;
-}
-bFirst=sal_False;
-sOutput += \t;
-sOutput += pResData-sTextTyp;
-if ( ! Export::isSourceLanguage( sCur ) ) {
-sOutput += [ ;
-sOutput += sCur;
-sOutput +=  ] ;
-}
-sOutput += = ;
-ConvertMergeContent( sText );
-sOutput += sText;
+if ( pEntry ) {
+if ( pResData-bText )
+ResData2Output( pEntry, STRING_TYP_TEXT, 
pResData-sTextTyp );
 
-if ( bDefine  bWriteNoSlash )
-sOutput += ;\n;
+if ( pResData-bQuickHelpText )
+ResData2Output( pEntry, STRING_TYP_QUICKHELPTEXT, 
rtl::OString(QuickHelpText) );
 
-if ( bDefine 

[Libreoffice-commits] .: sc/inc sc/source unusedcode.easy vbahelper/inc vbahelper/source xmloff/inc xmloff/source

2012-02-05 Thread Ivan Timofeev
 sc/inc/cellsuno.hxx |4 --
 sc/source/filter/xml/XMLExportDDELinks.cxx  |   17 --
 sc/source/filter/xml/XMLExportDDELinks.hxx  |2 -
 sc/source/filter/xml/xmlfilti.cxx   |   11 --
 sc/source/filter/xml/xmlfilti.hxx   |2 -
 sc/source/ui/unoobj/cellsuno.cxx|   33 
 sc/source/ui/vba/vbacommentshape.cxx|6 ---
 sc/source/ui/vba/vbacommentshape.hxx|3 -
 sc/source/ui/vba/vbawindows.cxx |5 ---
 sc/source/ui/vba/vbawindows.hxx |1 
 unusedcode.easy |   16 -
 vbahelper/inc/vbahelper/vbashape.hxx|1 
 vbahelper/inc/vbahelper/vbashapes.hxx   |1 
 vbahelper/source/vbahelper/vbacommandbarcontrol.cxx |5 ---
 vbahelper/source/vbahelper/vbacommandbarcontrol.hxx |1 
 vbahelper/source/vbahelper/vbashape.cxx |6 ---
 vbahelper/source/vbahelper/vbashapes.cxx|   28 
 xmloff/inc/SchXMLExport.hxx |2 -
 xmloff/source/chart/SchXMLExport.cxx|   28 
 xmloff/source/chart/SchXMLPlotAreaContext.cxx   |8 
 xmloff/source/chart/SchXMLPlotAreaContext.hxx   |2 -
 21 files changed, 182 deletions(-)

New commits:
commit 9c06348b32bd799241f23b1c2d75a46cf498d015
Author: Elton Chung el...@layerjet.com
Date:   Sun Feb 5 14:39:47 2012 +0800

Remove unused code.

diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index 8d17087..c2733bd 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -869,10 +869,6 @@ public:
 
 // XML import needs to set results at formula 
cells,
 // not meant for any other purpose.
-voidSetFormulaResultString( const ::rtl::OUString 
rResult );
-voidSetFormulaResultDouble( double fResult );
-voidSetFormulaWithGrammar( const ::rtl::OUString 
rFormula,
-const ::rtl::OUString rFormulaNmsp, const 
formula::FormulaGrammar::Grammar );
 const ScAddressGetPosition() const { return aCellPos; }
 
 voidInputEnglishString( const ::rtl::OUString rText );
diff --git a/sc/source/filter/xml/XMLExportDDELinks.cxx 
b/sc/source/filter/xml/XMLExportDDELinks.cxx
index 81734b9..e828f74 100644
--- a/sc/source/filter/xml/XMLExportDDELinks.cxx
+++ b/sc/source/filter/xml/XMLExportDDELinks.cxx
@@ -54,23 +54,6 @@ ScXMLExportDDELinks::~ScXMLExportDDELinks()
 {
 }
 
-bool ScXMLExportDDELinks::CellsEqual(const bool bPrevEmpty, const bool 
bPrevString, const String sPrevValue, const double fPrevValue,
- const bool bEmpty, const bool bString, const String 
sValue, const double fValue) const
-{
-if (bEmpty == bPrevEmpty)
-if (bEmpty)
-return true;
-else if (bString == bPrevString)
-if (bString)
-return (sPrevValue == sValue);
-else
-return (fPrevValue == fValue);
-else
-return false;
-else
-return false;
-}
-
 void ScXMLExportDDELinks::WriteCell(const ScMatrixValue aVal, sal_Int32 
nRepeat)
 {
 bool bString = ScMatrix::IsNonValueType(aVal.nType);
diff --git a/sc/source/filter/xml/XMLExportDDELinks.hxx 
b/sc/source/filter/xml/XMLExportDDELinks.hxx
index 74171a9..e92fa20 100644
--- a/sc/source/filter/xml/XMLExportDDELinks.hxx
+++ b/sc/source/filter/xml/XMLExportDDELinks.hxx
@@ -39,8 +39,6 @@ class ScXMLExportDDELinks
 {
 ScXMLExportrExport;
 
-boolCellsEqual(const bool bPrevEmpty, const bool 
bPrevString, const String sPrevValue, const double fPrevValue,
-const bool bEmpty, const bool bString, 
const String sValue, const double fValue) const;
 voidWriteCell(const ScMatrixValue aVal, sal_Int32 
nRepeat);
 voidWriteTable(const sal_Int32 nPos);
 public:
diff --git a/sc/source/filter/xml/xmlfilti.cxx 
b/sc/source/filter/xml/xmlfilti.cxx
index 54b7f62..a680370 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -167,17 +167,6 @@ void ScXMLFilterContext::EndElement()
 
pDatabaseRangeContext-SetFilterConditionSourceRangeAddress(aConditionSourceRangeAddress);
 }
 
-void ScXMLFilterContext::SetCaseSensitive(bool b)
-{
-mrQueryParam.bCaseSens = b;
-}
-
-void ScXMLFilterContext::SetUseRegularExpressions(bool b)
-{
-if (!bUseRegularExpressions)
-bUseRegularExpressions = b;
-}
-
 void ScXMLFilterContext::OpenConnection(bool b)
 {
 maConnStack.push_back(ConnStackItem(b));
diff --git a/sc/source/filter/xml/xmlfilti.hxx 
b/sc/source/filter/xml/xmlfilti.hxx
index 759f954..952b705 100644
--- a/sc/source/filter/xml/xmlfilti.hxx

[Libreoffice-commits] .: editeng/source

2012-02-05 Thread Ivan Timofeev
 editeng/source/editeng/edtspell.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 1c85118414d91bc0b881f03ad7fac20454ec43a0
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sun Feb 5 22:02:12 2012 +0400

fix debug build

diff --git a/editeng/source/editeng/edtspell.cxx 
b/editeng/source/editeng/edtspell.cxx
index eda0d61..a2340aa 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -505,7 +505,6 @@ bool WrongList::operator==(const WrongList rCompare) const
 return true;
 }
 
-#ifdef DBG_UTIL
 sal_Bool WrongList::DbgIsBuggy() const
 {
 // Check if the ranges overlap.
@@ -524,7 +523,6 @@ sal_Bool WrongList::DbgIsBuggy() const
 }
 return bError;
 }
-#endif
 
 //
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sd/inc

2012-02-01 Thread Ivan Timofeev
 sd/inc/cusshow.hxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit ab8f1757cedf0029bf3bec40cfe48069a33151be
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Feb 1 15:05:27 2012 +0400

add comments

diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx
index 74c6cfa..64593fa 100644
--- a/sd/inc/cusshow.hxx
+++ b/sd/inc/cusshow.hxx
@@ -69,8 +69,14 @@ public:
 // @@@ copy ctor, but no copy assignment? @@@
 SdCustomShow( const SdCustomShow rShow );
 
+/** Provides a direct access to the collection of the SdPage objects. */
 PageVec PagesVector();
+/**
+ * Replaces all occurences of pOldPage with pNewPage.
+ * If pNewPage is 0 then removes all occurences of pOldPage.
+ */
 void ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage );
+/** Removes all occurences of pPage. */
 void RemovePage( const SdPage* pPage );
 
 void   SetName(const String rName);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2012-01-31 Thread Ivan Timofeev
 sc/source/ui/src/globstr.src |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0a9d8c07ddf054930e1b000cc3c972a3d217d71c
Author: Ivan Timofeev timofeev@gmail.com
Date:   Tue Jan 31 12:42:08 2012 +0400

':' is not allowed in sheet names as well

diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index 18e924b..2e852ec 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -687,7 +687,7 @@ Resource RID_GLOBSTR
 };
 String STR_INVALIDTABNAME
 {
-Text [ en-US ] = Invalid sheet name.\nThe sheet name must not be a 
duplicate of an existing name \nand may not contain the characters [ ] * ? / 
\\ ;
+Text [ en-US ] = Invalid sheet name.\nThe sheet name must not be a 
duplicate of an existing name \nand may not contain the characters [ ] * ? : / 
\\ ;
 };
 String STR_SCENARIO
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/inc vcl/win

2012-01-31 Thread Ivan Timofeev
 vcl/inc/win/saldata.hxx|1 -
 vcl/win/source/gdi/salgdi3.cxx |   39 ---
 2 files changed, 40 deletions(-)

New commits:
commit c1d04217e87e175017898f918cd77fe6529ec0da
Author: Christina Rossmanith chrrossman...@web.de
Date:   Tue Jan 31 11:40:22 2012 +0100

Removed unused ImplSalLogFontToFontA()

diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index 2d6bbf1..cc3a9e4 100644
--- a/vcl/inc/win/saldata.hxx
+++ b/vcl/inc/win/saldata.hxx
@@ -239,7 +239,6 @@ sal_Bool ImplSalPreDispatchMsg( MSG* pMsg );
 void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT nDispatchResult );
 
 // \WIN\SOURCE\GDI\SALGDI3.CXX
-void ImplSalLogFontToFontA( HDC hDC, const LOGFONTA rLogFont, Font rFont );
 void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW rLogFont, Font rFont );
 bool ImplIsFontAvailable( HDC hDC, const UniString rName );
 
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 6b6b917..692005d 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1011,45 +1011,6 @@ static ImplWinFontData* ImplLogMetricToDevFontDataW( 
const ENUMLOGFONTEXW* pLogF
 
 // ---
 
-void ImplSalLogFontToFontA( HDC hDC, const LOGFONTA rLogFont, Font rFont )
-{
-String aFontName( ImplSalGetUniString( rLogFont.lfFaceName ) );
-if ( aFontName.Len() )
-{
-rFont.SetName( aFontName );
-rFont.SetCharSet( ImplCharSetToSal( rLogFont.lfCharSet ) );
-rFont.SetFamily( ImplFamilyToSal( rLogFont.lfPitchAndFamily ) );
-rFont.SetPitch( ImplLogPitchToSal( rLogFont.lfPitchAndFamily ) );
-rFont.SetWeight( ImplWeightToSal( rLogFont.lfWeight ) );
-
-long nFontHeight = rLogFont.lfHeight;
-if ( nFontHeight  0 )
-nFontHeight = -nFontHeight;
-long nDPIY = GetDeviceCaps( hDC, LOGPIXELSY );
-if( !nDPIY )
-nDPIY = 600;
-nFontHeight *= 72;
-nFontHeight += nDPIY/2;
-nFontHeight /= nDPIY;
-rFont.SetSize( Size( 0, nFontHeight ) );
-rFont.SetOrientation( (short)rLogFont.lfEscapement );
-if ( rLogFont.lfItalic )
-rFont.SetItalic( ITALIC_NORMAL );
-else
-rFont.SetItalic( ITALIC_NONE );
-if ( rLogFont.lfUnderline )
-rFont.SetUnderline( UNDERLINE_SINGLE );
-else
-rFont.SetUnderline( UNDERLINE_NONE );
-if ( rLogFont.lfStrikeOut )
-rFont.SetStrikeout( STRIKEOUT_SINGLE );
-else
-rFont.SetStrikeout( STRIKEOUT_NONE );
-}
-}
-
-// ---
-
 void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW rLogFont, Font rFont )
 {
 XubString aFontName( reinterpret_castconst 
xub_Unicode*(rLogFont.lfFaceName) );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sd/inc sd/source

2012-01-31 Thread Ivan Timofeev
 sd/inc/cusshow.hxx|1 +
 sd/source/core/cusshow.cxx|7 ++-
 sd/source/core/drawdoc_animations.cxx |6 +-
 sd/source/ui/unoidl/unocpres.cxx  |   10 --
 4 files changed, 16 insertions(+), 8 deletions(-)

New commits:
commit f2e17f8f6b6724d7e56d6583d79434372f6221bd
Author: Ivan Timofeev timofeev@gmail.com
Date:   Tue Jan 31 21:38:43 2012 +0400

erase garbage after std::remove

this fixes commit 5a71069339b3a3c118f3015d978799ef66db7564

diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx
index 1bd3614..74c6cfa 100644
--- a/sd/inc/cusshow.hxx
+++ b/sd/inc/cusshow.hxx
@@ -71,6 +71,7 @@ public:
 
 PageVec PagesVector();
 void ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage );
+void RemovePage( const SdPage* pPage );
 
 void   SetName(const String rName);
 String GetName() const;
diff --git a/sd/source/core/cusshow.cxx b/sd/source/core/cusshow.cxx
index dcdb343..d3233b7 100644
--- a/sd/source/core/cusshow.cxx
+++ b/sd/source/core/cusshow.cxx
@@ -106,7 +106,7 @@ void SdCustomShow::ReplacePage( const SdPage* pOldPage, 
const SdPage* pNewPage )
 {
 if( !pNewPage )
 {
-::std::remove(maPages.begin(), maPages.end(), pOldPage);
+RemovePage(pOldPage);
 }
 else
 {
@@ -114,6 +114,11 @@ void SdCustomShow::ReplacePage( const SdPage* pOldPage, 
const SdPage* pNewPage )
 }
 }
 
+void SdCustomShow::RemovePage( const SdPage* pPage )
+{
+maPages.erase(::std::remove(maPages.begin(), maPages.end(), pPage), 
maPages.end());
+}
+
 void   SdCustomShow::SetName(const String rName)
 {
 aName = rName;
diff --git a/sd/source/core/drawdoc_animations.cxx 
b/sd/source/core/drawdoc_animations.cxx
index de62ec5..375dd4d 100644
--- a/sd/source/core/drawdoc_animations.cxx
+++ b/sd/source/core/drawdoc_animations.cxx
@@ -43,11 +43,7 @@ void SdDrawDocument::ReplacePageInCustomShows( const SdPage* 
pOldPage, const SdP
 for (sal_uLong i = 0; i  mpCustomShowList-Count(); i++)
 {
 SdCustomShow* pCustomShow = (SdCustomShow*) 
mpCustomShowList-GetObject(i);
-if( pNewPage == 0 )
-::std::remove(pCustomShow-PagesVector().begin(), 
pCustomShow-PagesVector().end(),
-pOldPage);
-else
-pCustomShow-ReplacePage(pOldPage,pNewPage);
+pCustomShow-ReplacePage(pOldPage, pNewPage);
 }
 }
 }
diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx
index e0aa857..e44f61e 100644
--- a/sd/source/ui/unoidl/unocpres.cxx
+++ b/sd/source/ui/unoidl/unocpres.cxx
@@ -144,10 +144,16 @@ void SAL_CALL SdXCustomPresentation::removeByIndex( 
sal_Int32 Index )
 
 if( xPage.is() )
 {
-SvxDrawPage* pPage = SvxDrawPage::getImplementation(  xPage );
+SvxDrawPage* pPage = SvxDrawPage::getImplementation( xPage );
 if(pPage)
-::std::remove(mpSdCustomShow-PagesVector().begin(), 
mpSdCustomShow-PagesVector().end(),
+{
+SdCustomShow::PageVec::iterator it = std::find(
+mpSdCustomShow-PagesVector().begin(),
+mpSdCustomShow-PagesVector().end(),
 pPage-GetSdrPage());
+if (it != mpSdCustomShow-PagesVector().end())
+mpSdCustomShow-PagesVector().erase(it);
+}
 }
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2012-01-28 Thread Ivan Timofeev
 sc/source/ui/vba/vbachart.cxx |   33 -
 sc/source/ui/vba/vbachart.hxx |1 -
 unusedcode.easy   |1 -
 3 files changed, 35 deletions(-)

New commits:
commit 2b507836fc88f294ef55652174b66dc706125599
Author: Santiago Martinez smvar...@gmail.com
Date:   Fri Jan 27 21:45:33 2012 +0100

Remove unused code as listed in unusedcode.easy

diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx
index 94d2900..db9d23e 100644
--- a/sc/source/ui/vba/vbachart.cxx
+++ b/sc/source/ui/vba/vbachart.cxx
@@ -1028,39 +1028,6 @@ ScVbaChart::assignDiagramAttributes()
 xTwoAxisYSupplier.set( mxDiagramPropertySet, uno::UNO_QUERY_THROW );
 }
 
-bool
-ScVbaChart::isSeriesIndexValid(sal_Int32 _seriesindex) throw( 
script::BasicErrorException )
-{
-bool bret = false;
-try
-{
-uno::Reference chart::XChartDataArray  xChartDataArray( 
mxChartDocument-getData(), uno::UNO_QUERY_THROW );
-//TODO I guess we have to differentiate between XlRowCol
-if ( !xChartDataArray.is() )
-{
-if (getPlotBy() == xlRows)
-{
-if ((_seriesindex  
xChartDataArray-getRowDescriptions().getLength() )  (_seriesindex = 0))
-bret = true;
-}
-else
-{
-if ((_seriesindex  
xChartDataArray-getColumnDescriptions().getLength() )  (_seriesindex = 0))
-bret = true;
-}
-}
-}
-catch (const uno::Exception)
-{
-throw script::BasicErrorException( rtl::OUString(), uno::Reference 
uno::XInterface (), SbERR_METHOD_FAILED, rtl::OUString() );
-}
-if (!bret)
-{
-throw script::BasicErrorException( rtl::OUString(), uno::Reference 
uno::XInterface (), SbERR_OUT_OF_RANGE, rtl::OUString() );
-}
-return bret;
-}
-
 
 uno::Reference beans::XPropertySet 
 ScVbaChart::getAxisPropertySet(sal_Int32 _nAxisType, sal_Int32 _nAxisGroup) 
throw ( script::BasicErrorException )
diff --git a/sc/source/ui/vba/vbachart.hxx b/sc/source/ui/vba/vbachart.hxx
index 104cc55..e984ecf 100644
--- a/sc/source/ui/vba/vbachart.hxx
+++ b/sc/source/ui/vba/vbachart.hxx
@@ -74,7 +74,6 @@ public:
 
 // Non-interface
 css::uno::Reference css::beans::XPropertySet  xDiagramPropertySet() 
const { return mxDiagramPropertySet; }
-bool isSeriesIndexValid(sal_Int32 _seriesindex) throw( 
css::script::BasicErrorException );
 bool is3D() throw ( css::uno::RuntimeException );
 css::uno::Reference css::beans::XPropertySet  
getAxisPropertySet(sal_Int32 _nAxisType, sal_Int32 _nAxisGroup) throw ( 
css::script::BasicErrorException );
 // Methods
diff --git a/unusedcode.easy b/unusedcode.easy
index 7b9b2c4..15b998c 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -215,7 +215,6 @@ ScValidationEntries_Impl::Insert(ScValidationEntries_Impl 
const*, unsigned short
 ScValidationEntries_Impl::Remove(ScValidationData* const, unsigned short)
 ScValidationEntries_Impl::Remove(unsigned short, unsigned short)
 ScValueCell::ScValueCell()
-ScVbaChart::isSeriesIndexValid(int)
 ScVbaColorFormat::setColorFormat(short)
 
ScVbaCommandBarControl::ScVbaCommandBarControl(com::sun::star::uno::Referenceooo::vba::XHelperInterface
 const, com::sun::star::uno::Referencecom::sun::star::uno::XComponentContext 
const, com::sun::star::uno::Referencecom::sun::star::container::XIndexAccess 
const, boost::shared_ptrVbaCommandBarHelper, 
com::sun::star::uno::Referencecom::sun::star::container::XIndexAccess const, 
rtl::OUString const, int, unsigned char)
 
ScVbaCommentShape::ScVbaCommentShape(com::sun::star::uno::Referenceooo::vba::XHelperInterface
 const, com::sun::star::uno::Referencecom::sun::star::uno::XComponentContext 
const, com::sun::star::uno::Referencecom::sun::star::drawing::XShape const, 
com::sun::star::uno::Referenceooo::vba::excel::XComment const, 
com::sun::star::uno::Referencecom::sun::star::drawing::XShapes const, 
com::sun::star::uno::Referencecom::sun::star::frame::XModel const, int)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/inc sfx2/source

2012-01-28 Thread Ivan Timofeev
 sfx2/inc/sfx2/dispatch.hxx   |1 -
 sfx2/source/control/dispatch.cxx |   12 +---
 sfx2/source/view/viewfrm.cxx |3 ---
 3 files changed, 1 insertion(+), 15 deletions(-)

New commits:
commit ff2c26f586c87452a23f307f4b63568e5276538c
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Jan 28 22:06:19 2012 +0400

bUILocked is always false

diff --git a/sfx2/inc/sfx2/dispatch.hxx b/sfx2/inc/sfx2/dispatch.hxx
index c517632..5aa01d9 100644
--- a/sfx2/inc/sfx2/dispatch.hxx
+++ b/sfx2/inc/sfx2/dispatch.hxx
@@ -198,7 +198,6 @@ public:
 SAL_DLLPRIVATE sal_Bool IsUpdated_Impl() const;
 SAL_DLLPRIVATE int GetShellAndSlot_Impl( sal_uInt16 nSlot, SfxShell 
**ppShell, const SfxSlot **ppSlot,
   sal_Bool bOwnShellsOnly, 
sal_Bool bModal, sal_Bool bRealSlot=sal_True );
-SAL_DLLPRIVATE void LockUI_Impl( sal_Bool bLock = sal_True );
 SAL_DLLPRIVATE void SetReadOnly_Impl( sal_Bool  bOn );
 SAL_DLLPRIVATE sal_Bool GetReadOnly_Impl() const;
 SAL_DLLPRIVATE sal_Bool IsSlotEnabledByFilter_Impl( sal_uInt16 nSID ) 
const;
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 5ad8d58..1f722c0 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -145,7 +145,6 @@ struct SfxDispatcher_Impl
 std::vectorsal_uInt32 aChildWins;
 sal_uInt16   nActionLevel;  // in EnterAction
 sal_uInt32   nEventId;  // EventId UserEvent
-sal_Bool bUILocked; // Update disconnected (no flicker)
 sal_Bool bNoUI; // UI only from Parent Dispatcher
 sal_Bool bReadOnly; // Document is ReadOnly
 sal_Bool bQuiet;// Only use parent dispatcher
@@ -330,7 +329,6 @@ void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent )
 pImp-bLocked = sal_False;
 pImp-bActive = sal_False;
 pImp-pParent = NULL;
-pImp-bUILocked = sal_False;
 pImp-bNoUI = sal_False;
 pImp-bReadOnly = sal_False;
 pImp-bQuiet = sal_False;
@@ -1305,7 +1303,7 @@ void SfxDispatcher::Update_Impl( sal_Bool bForce )
 
 Flush();
 
-if ( !pImp-pFrame || pImp-bUILocked )
+if ( !pImp-pFrame )
 return;
 
 SFX_APP();  // -Wall is this required???
@@ -2183,14 +2181,6 @@ sal_uInt32 SfxDispatcher::GetObjectBarId( sal_uInt16 
nPos ) const
 return pImp-aObjBars[nPos].nResId;
 }
 
-void SfxDispatcher::LockUI_Impl( sal_Bool bLock )
-{
-sal_Bool bWasLocked = pImp-bUILocked;
-pImp-bUILocked = bLock;
-if ( !bLock  bWasLocked )
-Update_Impl( sal_True );
-}
-
 //-
 void SfxDispatcher::HideUI( sal_Bool bHide )
 {
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index b6584e0..e342fad 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1876,9 +1876,6 @@ void SfxViewFrame::SetActiveChildFrame_Impl( SfxViewFrame 
*pViewFrame )
 {
 if ( pViewFrame != pImp-pActiveChild )
 {
-if ( !pImp-pActiveChild )
-GetDispatcher()-LockUI_Impl( sal_False );
-
 pImp-pActiveChild = pViewFrame;
 
 Reference XFramesSupplier  xFrame( GetFrame().GetFrameInterface(), 
UNO_QUERY );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sfx2/source

2012-01-26 Thread Ivan Timofeev
 sfx2/source/view/sfxbasecontroller.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e2407767b39df00c4057a8174391ab70b97a39a5
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Jan 25 23:37:30 2012 +0400

remember that map has been initialized

diff --git a/sfx2/source/view/sfxbasecontroller.cxx 
b/sfx2/source/view/sfxbasecontroller.cxx
index f8903d6..932c2f5 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -193,6 +193,7 @@ sal_Int16 MapGroupIDToCommandGroup( sal_Int16 nGroupID )
 GroupIDCommandGroupMap[i].nCommandGroup ));
 ++i;
 }
+bGroupIDMapInitialized = sal_True;
 }
 
 GroupHashMap::const_iterator pIter = mHashMap.find( nGroupID );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - sfx2/source

2012-01-24 Thread Ivan Timofeev
 sfx2/source/appl/workwin.cxx |2 
 sfx2/source/view/viewsh.cxx  |  528 +--
 2 files changed, 261 insertions(+), 269 deletions(-)

New commits:
commit b46d71a558d935bac5c1f484e9635338b1654728
Author: Ivan Timofeev timofeev@gmail.com
Date:   Tue Jan 24 17:21:56 2012 +0400

remove unused #define SFX_ITEMTYPE_STATBAR in workwin.cxx

diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index f400096..9281858 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1630,8 +1630,6 @@ void SfxWorkWindow::SetStatusBar_Impl( sal_uInt32 nResId, 
SfxShell*, SfxBindings
 aStatBar.nId = sal::static_int_castsal_uInt16(nResId);
 }
 
-#define SFX_ITEMTYPE_STATBAR 4
-
 void SfxWorkWindow::UpdateStatusBar_Impl()
 {
 Reference ::com::sun::star::beans::XPropertySet  xPropSet( 
GetFrameInterface(), UNO_QUERY );
commit 853768873d2ebc8b9e63bf4f0a16e5867b0a1504
Author: Ivan Timofeev timofeev@gmail.com
Date:   Tue Jan 24 17:00:27 2012 +0400

sfx2: fix indentation in viewsh.cxx

diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index c1bf067..70d0d14 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -199,7 +199,7 @@ IMPL_STATIC_LINK_NOINSTANCE( SfxClipboardChangeListener, 
AsyncExecuteHdl_Impl, A
 }
 
 void SAL_CALL SfxClipboardChangeListener::disposing( const lang::EventObject 
/*rEventObject*/ )
-throw ( uno::RuntimeException )
+throw ( uno::RuntimeException )
 {
 // Either clipboard or ViewShell is going to be destroyed - no interest 
in listening anymore
 uno::Reference lang::XComponent  xCtrl( m_xCtrl );
@@ -219,7 +219,7 @@ throw ( uno::RuntimeException )
 }
 
 void SAL_CALL SfxClipboardChangeListener::changedContents( const 
datatransfer::clipboard::ClipboardEvent )
-throw ( RuntimeException )
+throw ( RuntimeException )
 {
 // Make asynchronous call to avoid locking SolarMutex which is the
 // root for many deadlocks, especially in conjuction with the Windows
@@ -315,7 +315,7 @@ SfxViewShell_Impl::SfxViewShell_Impl(sal_uInt16 const 
nFlags)
 //=
 SFX_IMPL_INTERFACE(SfxViewShell,SfxShell,SfxResId(0))
 {
-SFX_CHILDWINDOW_REGISTRATION( SID_MAIL_CHILDWIN );
+SFX_CHILDWINDOW_REGISTRATION( SID_MAIL_CHILDWIN );
 }
 
 TYPEINIT2(SfxViewShell,SfxShell,SfxListener);
@@ -345,12 +345,12 @@ static ::rtl::OUString 
impl_retrieveFilterNameFromTypeAndModule(
 {
 ::comphelper::SequenceAsHashMap aFilterPropsHM( 
xEnumeration-nextElement() );
 ::rtl::OUString aFilterName = aFilterPropsHM.getUnpackedValueOrDefault(
-
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(Name)),
-::rtl::OUString() );
+::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(Name)),
+::rtl::OUString() );
 
 sal_Int32 nFilterFlags = aFilterPropsHM.getUnpackedValueOrDefault(
-
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(Flags)),
-sal_Int32( 0 ) );
+::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(Flags)),
+sal_Int32( 0 ) );
 
 if ( nFilterFlags  nFlags )
 {
@@ -388,36 +388,36 @@ enum ETypeFamily
 switch(eTypeFamily)
 {
 case E_MS_DOC:
- {
-if (sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
com.sun.star.text.TextDocument ) ))
-sType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
writer_MS_Word_97 ));
-else
-if (sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
com.sun.star.sheet.SpreadsheetDocument ) ))
-sType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
calc_MS_Excel_97 ));
-else
-if (sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
com.sun.star.drawing.DrawingDocument ) ))
-sType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
impress_MS_PowerPoint_97 ));
-else
-if (sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
com.sun.star.presentation.PresentationDocument ) ))
-sType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
impress_MS_PowerPoint_97 ));
- }
- break;
+{
+if (sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
com.sun.star.text.TextDocument ) ))
+sType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
writer_MS_Word_97 ));
+else
+if (sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
com.sun.star.sheet.SpreadsheetDocument ) ))
+sType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
calc_MS_Excel_97 ));
+else

[Libreoffice-commits] .: sd/source

2012-01-22 Thread Ivan Timofeev
 sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 799f2de5d1085d845ec498af0a7932965c42ed68
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sun Jan 22 14:53:11 2012 +0400

fdo#43705: fix incomplete updating of the page preview pane in Draw

This regression was introduced in f215333002882872129066828228d3343a903331.
As stated in PageObjectPainter::PaintPageObject:
  The page object layouter is quite volatile.
The rest of usages of mpPageObjectLayouter looks sane, but who knows...

diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx 
b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
index c376e45..8a2ae0b 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -167,6 +167,7 @@ void PageObjectPainter::PaintPageObject (
 
 void PageObjectPainter::NotifyResize (const bool bForce)
 {
+mpPageObjectLayouter = mrLayouter.GetPageObjectLayouter();
 if (bForce || ! mpPageObjectLayouter)
 InvalidateBitmaps();
 else
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: extensions/source svx/inc

2012-01-18 Thread Ivan Timofeev
 extensions/source/bibliography/bib.hrc |1 
 svx/inc/globlmn_tmpl.hrc   |  721 -
 2 files changed, 722 deletions(-)

New commits:
commit bb921f1df6bb12671777e3f3e4a8caa6f7791c3d
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Jan 18 23:23:05 2012 +0400

svx: remove unused definitions in globlmn_tmpl.hrc

diff --git a/extensions/source/bibliography/bib.hrc 
b/extensions/source/bibliography/bib.hrc
index 480a820..9ca5f3d 100644
--- a/extensions/source/bibliography/bib.hrc
+++ b/extensions/source/bibliography/bib.hrc
@@ -62,7 +62,6 @@
 #define RID_MAIN_ME_DBSOURCE(RID_BIB_MENU +10)
 #define RID_MAIN_DELETE_RECORD  (RID_BIB_MENU +11)
 #define RID_MAIN_INSERT_RECORD  (RID_BIB_MENU +12)
-#define MN_TEMPLATES(RID_BIB_MENU +13)  // to make makro 
ITEM_FILE_DOCTEMPLATE happy...
 
 #define RID_POPUP_ME_VIEW   (RID_BIB_MENU +50)
 
diff --git a/svx/inc/globlmn_tmpl.hrc b/svx/inc/globlmn_tmpl.hrc
index 632a4c5..f6b8f73 100755
--- a/svx/inc/globlmn_tmpl.hrc
+++ b/svx/inc/globlmn_tmpl.hrc
@@ -50,21 +50,6 @@
 Command = .uno:ChangeControlType ; \
 Text [ en-US ] = ~Replace with;   \
 
-#define ITEM_FORMAT_TEMPLATECATALOG \
-Identifier = SID_STYLE_CATALOG ; \
-Command = .uno:StyleCatalog ; \
-Text [ en-US ] = ~Catalog... ; \
-
-#define ITEM_FORMAT_TEMPLATE \
-Identifier = SID_STYLE_DESIGNER ; \
-Command = .uno:DesignerDialog ; \
-Text [ en-US ] = St~ylist ; \
-
-#define ITEM_FORMAT_AUTOFORMAT \
-Identifier = SID_AUTOFORMAT ; \
-Command = .uno:AutoFormat ; \
-Text [ en-US ] = Auto~Format... ;\
-
 #define ITEM_FORMAT_CHAR_DLG \
 Identifier = SID_CHAR_DLG ; \
 Command = .uno:FontDialog ; \
@@ -261,394 +246,22 @@
 Command = .uno:ToggleObjectBezierMode ; \
 Text [ en-US ] = Edit ~Points ;\
 
-#define ITEM_FILE_PICKLIST \
-Identifier = SID_PICKLIST ; \
-Command = .uno:PickList ; \
-Text [ en-US ] = ~File ;  \
-
-#define ITEM_FILE_NEWDOC \
-Identifier = SID_NEWDOCDIRECT ; \
-Command = .uno:AddDirect ; \
-Text [ en-US ] = ~New ;\
-
-#define ITEM_FILE_OPENDOC \
-Identifier = SID_OPENDOC ; \
-Command = .uno:Open ; \
-Text [ en-US ] = ~Open... ;\
-
-
-#define ITEM_FILE_AUTOPILOT \
-MenuItem\
-{\
-Identifier = SID_AUTOPILOTMENU ; \
-Command = .uno:AutoPilotMenu ; \
-Text [ en-US ] = A~utoPilot ; \
-};
-
-#define ITEM_FILE_CLOSEDOC \
-Identifier = SID_CLOSEDOC ; \
-Command = .uno:CloseDoc ; \
-Text [ en-US ] = ~Close ;\
-
-#define ITEM_FILE_SAVEDOC \
-Identifier = SID_SAVEDOC ; \
-Command = .uno:Save ; \
-Text [ en-US ] = ~Save ;  \
-
-#define ITEM_FILE_SAVEDOCS \
-Identifier = SID_SAVEDOCS ; \
-Command = .uno:SaveAll ; \
-Text [ en-US ] = Sa~ve All ; \
-
-#define ITEM_FILE_SAVEASDOC \
-Identifier = SID_SAVEASDOC ; \
-Command = .uno:SaveAs ; \
-Text [ en-US ] = Save ~As... ;\
-
-#define ITEM_FILE_EXPORTDOC \
-Identifier = SID_EXPORTDOC ; \
-Command = .uno:ExportTo ; \
-Text [ en-US ] = Expor~t... ;   \
-
-#define ITEM_FILE_EXPORTDOCASPDF \
-Identifier = SID_EXPORTDOCASPDF ; \
-Command = .uno:ExportToPDF ; \
-Text [ en-US ] = Export as P~DF... ;  \
-
-#define ITEM_FILE_VERSIONDIALOG \
-Identifier = SID_VERSION ; \
-Command = .uno:VersionDialog ; \
-Text [ en-US ] = Versions... ; \
-
-#define ITEM_FILE_LASTVERSIONDOC \
-Identifier = SID_RELOAD ; \
-Command = .uno:Reload ; \
-Text [ en-US ] = Reload ;\
-
-#define ITEM_FILE_DOCINFO \
-Identifier = SID_DOCINFO ; \
-Command = .uno:SetDocumentProperties ; \
-Text [ en-US ] = Propert~ies... ;\
-
-#define ITEM_FILE_DOCTEMPLATE \
-Identifier = MN_TEMPLATES;  \
-Command = .uno:TemplateMenu ; \
-Text [ en-US ] = ~Templates ;\
-SubMenu = Menu  \
-{   \
-ItemList =  \
-{   \
-MenuItem\
-{   \
-Identifier = SID_ORGANIZER ; \
-Command = .uno:Organizer ; \
-Text [ en-US ] = ~Organize...;\
-};  \
-MenuItem\
-{   \
-Identifier = SID_TEMPLATE_ADDRESSBOKSOURCE; \
-Command = .uno:AddressBookSource ; \
-Text [ en-US ] = ~Address Book Source...; \
-};  \
-MenuItem\
-{   \
-Identifier = SID_DOCTEMPLATE ;  \
-Command = .uno:SaveAsTemplate ;   \
-Text [ en-US ] = ~Save...;\
-};  \
-MenuItem

[Libreoffice-commits] .: framework/source

2012-01-15 Thread Ivan Timofeev
 framework/source/services/backingwindow.cxx |   20 ++--
 framework/source/services/backingwindow.hxx |2 +-
 2 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 1f628c7bf8361086be2044d0d6aa8bbf3f128162
Author: Tomcsik Bence tomcsikbe...@gmail.com
Date:   Sat Jan 14 00:14:45 2012 +0100

The Open... button's more room problem solved fdo#33794

By adding a int i_nExtraWidth parameter to the layoutButton function
there will be enough space for the open button and its black triangle.

diff --git a/framework/source/services/backingwindow.cxx 
b/framework/source/services/backingwindow.cxx
index a28f80f..2db5879 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -572,33 +572,33 @@ void BackingWindow::initControls()
 }
 
 // layout the buttons
-layoutButton( WRITER_URL, 0, aFileNewAppsAvailable,
+layoutButton( WRITER_URL, 0, 0, aFileNewAppsAvailable,
   aModuleOptions, SvtModuleOptions::E_SWRITER,
   maWriterButton, aMnemns );
-layoutButton( DRAW_URL, 1, aFileNewAppsAvailable,
+layoutButton( DRAW_URL, 1, 0, aFileNewAppsAvailable,
   aModuleOptions, SvtModuleOptions::E_SDRAW,
   maDrawButton, aMnemns );
 nYPos += maButtonImageSize.Height() + 10;
-layoutButton( CALC_URL, 0, aFileNewAppsAvailable,
+layoutButton( CALC_URL, 0, 0, aFileNewAppsAvailable,
   aModuleOptions, SvtModuleOptions::E_SCALC,
   maCalcButton, aMnemns );
-layoutButton( BASE_URL, 1, aFileNewAppsAvailable,
+layoutButton( BASE_URL, 1, 0, aFileNewAppsAvailable,
   aModuleOptions, SvtModuleOptions::E_SDATABASE,
   maDBButton, aMnemns );
 nYPos += maButtonImageSize.Height() + 10;
-layoutButton( IMPRESS_WIZARD_URL, 0, aFileNewAppsAvailable,
+layoutButton( IMPRESS_WIZARD_URL, 0, 0, aFileNewAppsAvailable,
   aModuleOptions, SvtModuleOptions::E_SIMPRESS,
   maImpressButton, aMnemns );
-layoutButton( MATH_URL, 1, aFileNewAppsAvailable,
+layoutButton( MATH_URL, 1, 0, aFileNewAppsAvailable,
   aModuleOptions, SvtModuleOptions::E_SMATH,
   maMathButton, aMnemns );
 
 nYPos += 3*maButtonImageSize.Height() / 2;
 
-layoutButton( NULL, 0, aFileNewAppsAvailable,
+layoutButton( NULL, 0, 18, aFileNewAppsAvailable,
   aModuleOptions, SvtModuleOptions::E_SWRITER,
   maOpenButton, aMnemns, maOpenString );
-layoutButton( NULL, 1, aFileNewAppsAvailable,
+layoutButton( NULL, 1, 0, aFileNewAppsAvailable,
   aModuleOptions, SvtModuleOptions::E_SWRITER,
   maTemplateButton, aMnemns, maTemplateString );
 nYPos += 10;
@@ -664,7 +664,7 @@ void BackingWindow::loadImage( const ResId i_rId, 
PushButton i_rButton )
 }
 
 void BackingWindow::layoutButton(
-  const char* i_pURL, int nColumn,
+  const char* i_pURL, int nColumn, int i_nExtraWidth,
   const std::setrtl::OUString i_rURLS,
   SvtModuleOptions i_rOpt, SvtModuleOptions::EModule 
i_eMod,
   PushButton i_rBtn,
@@ -690,7 +690,7 @@ void BackingWindow::layoutButton(
 
 long nTextWidth = i_rBtn.GetTextWidth( i_rBtn.GetText() );
 
-nTextWidth += maButtonImageSize.Width() + 8; // add some fuzz to be on the 
safe side
+nTextWidth += maButtonImageSize.Width() + 8 + i_nExtraWidth; // add some 
fuzz to be on the safe side
 if( nColumn = 0  nColumn  
static_castint(SAL_N_ELEMENTS(mnColumnWidth)) )
 {
 if( nTextWidth  mnColumnWidth[nColumn] )
diff --git a/framework/source/services/backingwindow.hxx 
b/framework/source/services/backingwindow.hxx
index 410862f..179a632 100644
--- a/framework/source/services/backingwindow.hxx
+++ b/framework/source/services/backingwindow.hxx
@@ -144,7 +144,7 @@ namespace framework
 
 void loadImage( const ResId i_rId, PushButton i_rButton );
 
-void layoutButton( const char* i_pURL, int nColumn, const 
std::setrtl::OUString i_rURLS,
+void layoutButton( const char* i_pURL, int nColumn, int i_nExtraWidth, 
const std::setrtl::OUString i_rURLS,
SvtModuleOptions i_rOpt, SvtModuleOptions::EModule 
i_eMod,
PushButton i_rBtn,
MnemonicGenerator i_rMnemonicGen,
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: cui/source

2012-01-12 Thread Ivan Timofeev
 cui/source/customize/eventdlg.src |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b90940233f34d6cb468a2b4b8a38a78973e1d579
Author: Ivan Timofeev timofeev@gmail.com
Date:   Thu Jan 12 18:08:11 2012 +0400

move overlapped controls

diff --git a/cui/source/customize/eventdlg.src 
b/cui/source/customize/eventdlg.src
index c4ef082..4159a2d 100644
--- a/cui/source/customize/eventdlg.src
+++ b/cui/source/customize/eventdlg.src
@@ -65,7 +65,7 @@ TabPage RID_SVXPAGE_EVENTS
 {
 HelpID = cui:ListBox:RID_SVXPAGE_EVENTS:LB_SAVEIN;
 Border = TRUE ;
-Pos = MAP_APPFONT ( 54 , 238 ) ;
+Pos = MAP_APPFONT ( 62 , 238 ) ;
 Size = MAP_APPFONT ( 132 , 53 ) ;
 DropDown = TRUE ;
 };
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: cui/source

2012-01-07 Thread Ivan Timofeev
 cui/source/options/optdict.src |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit bcaa334ad6cba9b339a72bfdf9d5e74a7773cacd
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Jan 7 09:29:29 2012 +0400

move overlapped controls

diff --git a/cui/source/options/optdict.src b/cui/source/options/optdict.src
index 31a8f9a..009aa34 100644
--- a/cui/source/options/optdict.src
+++ b/cui/source/options/optdict.src
@@ -122,8 +122,8 @@ ModalDialog RID_SFXDLG_EDITDICT
 {
 HelpID = cui:ListBox:RID_SFXDLG_EDITDICT:LB_ALLDICTS;
 Border = TRUE ;
-Pos = MAP_APPFONT ( 82 , 9 ) ;
-Size = MAP_APPFONT ( 121 , 62 ) ;
+Pos = MAP_APPFONT ( 100 , 9 ) ;
+Size = MAP_APPFONT ( 103 , 62 ) ;
 DropDown = TRUE ;
 };
 FixedText FT_DICTLANG
@@ -136,8 +136,8 @@ ModalDialog RID_SFXDLG_EDITDICT
 {
 HelpID = cui:ListBox:RID_SFXDLG_EDITDICT:LB_DICTLANG;
 Border = TRUE ;
-Pos = MAP_APPFONT ( 82 , 25 ) ;
-Size = MAP_APPFONT ( 121 , 66 ) ;
+Pos = MAP_APPFONT ( 100 , 25 ) ;
+Size = MAP_APPFONT ( 103 , 66 ) ;
 DropDown = TRUE ;
 };
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - cui/source

2012-01-07 Thread Ivan Timofeev
 cui/source/options/optdict.src |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 5907a4c1b8af1f73e966b4c1fe517dee0a3815f1
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Jan 7 09:29:29 2012 +0400

move overlapped controls

diff --git a/cui/source/options/optdict.src b/cui/source/options/optdict.src
index 31a8f9a..009aa34 100644
--- a/cui/source/options/optdict.src
+++ b/cui/source/options/optdict.src
@@ -122,8 +122,8 @@ ModalDialog RID_SFXDLG_EDITDICT
 {
 HelpID = cui:ListBox:RID_SFXDLG_EDITDICT:LB_ALLDICTS;
 Border = TRUE ;
-Pos = MAP_APPFONT ( 82 , 9 ) ;
-Size = MAP_APPFONT ( 121 , 62 ) ;
+Pos = MAP_APPFONT ( 100 , 9 ) ;
+Size = MAP_APPFONT ( 103 , 62 ) ;
 DropDown = TRUE ;
 };
 FixedText FT_DICTLANG
@@ -136,8 +136,8 @@ ModalDialog RID_SFXDLG_EDITDICT
 {
 HelpID = cui:ListBox:RID_SFXDLG_EDITDICT:LB_DICTLANG;
 Border = TRUE ;
-Pos = MAP_APPFONT ( 82 , 25 ) ;
-Size = MAP_APPFONT ( 121 , 66 ) ;
+Pos = MAP_APPFONT ( 100 , 25 ) ;
+Size = MAP_APPFONT ( 103 , 66 ) ;
 DropDown = TRUE ;
 };
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: chart2/source dbaccess/source extensions/source sc/source svl/inc svl/source svx/source sw/source xmloff/source

2012-01-07 Thread Ivan Timofeev
 chart2/source/controller/dialogs/DataBrowser.cxx  |3 ---
 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx |3 ---
 chart2/source/controller/dialogs/tp_AxisPositions.cxx |3 ---
 chart2/source/controller/dialogs/tp_Scale.cxx |3 ---
 dbaccess/source/ui/browser/sbagrid.cxx|1 -
 dbaccess/source/ui/control/FieldDescControl.cxx   |1 -
 dbaccess/source/ui/dlg/dlgattr.cxx|1 -
 dbaccess/source/ui/misc/UITools.cxx   |2 --
 extensions/source/propctrlr/usercontrol.hxx   |1 -
 sc/source/core/data/documen2.cxx  |1 -
 sc/source/core/data/documen8.cxx  |1 -
 sc/source/core/data/document.cxx  |1 -
 sc/source/core/inc/core_pch.hxx   |2 --
 sc/source/filter/inc/filt_pch.hxx |2 --
 sc/source/ui/inc/ui_pch.hxx   |2 --
 sc/source/ui/view/cellsh1.cxx |1 -
 sc/source/ui/view/formatsh.cxx|1 -
 sc/source/ui/view/tabvwsh5.cxx|1 -
 sc/source/ui/view/tabvwsha.cxx|1 -
 svl/inc/svl/zforlist.hxx  |6 --
 svl/source/numbers/numuno.cxx |2 --
 svx/source/items/numfmtsh.cxx |1 -
 sw/source/core/doc/docfmt.cxx |1 -
 sw/source/core/doc/tblcpy.cxx |1 -
 sw/source/core/doc/tblrwcl.cxx|1 -
 sw/source/core/docnode/ndcopy.cxx |1 -
 sw/source/ui/shells/tabsh.cxx |1 -
 sw/source/ui/utlui/numfmtlb.cxx   |1 -
 xmloff/source/style/xmlnumfe.cxx  |1 -
 xmloff/source/style/xmlnumfi.cxx  |1 -
 30 files changed, 48 deletions(-)

New commits:
commit 5b031b4ea68df5ca210a5631c801414b476d8094
Author: Marcel Metz mm...@adrian-broher.net
Date:   Sat Jan 7 22:14:05 2012 +0400

Remove superfluous _ZFORLIST_DECLARE_TABLE definition.

diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx 
b/chart2/source/controller/dialogs/DataBrowser.cxx
index 5de9287..182a36f 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -29,9 +29,6 @@
 
 // header for class SvNumberformat
 #ifndef _ZFORMAT_HXX
-#ifndef _ZFORLIST_DECLARE_TABLE
-#define _ZFORLIST_DECLARE_TABLE
-#endif
 #include svl/zformat.hxx
 #endif
 // header for SvNumberFormatter
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx 
b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index ba13051..e3a6d22 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -27,9 +27,6 @@
  /
 
 #ifndef _ZFORLIST_HXX
-#ifndef _ZFORLIST_DECLARE_TABLE
-#define _ZFORLIST_DECLARE_TABLE
-#endif
 #include svl/zforlist.hxx
 #endif
 
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx 
b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index 8632c4a..b51b303 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -49,9 +49,6 @@
 
 // header for class SvNumberformat
 #ifndef _ZFORMAT_HXX
-#ifndef _ZFORLIST_DECLARE_TABLE
-#define _ZFORLIST_DECLARE_TABLE
-#endif
 #include svl/zformat.hxx
 #endif
 
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx 
b/chart2/source/controller/dialogs/tp_Scale.cxx
index 39ce58b..fd456ff 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -49,9 +49,6 @@
 
 // header for class SvNumberformat
 #ifndef _ZFORMAT_HXX
-#ifndef _ZFORLIST_DECLARE_TABLE
-#define _ZFORLIST_DECLARE_TABLE
-#endif
 #include svl/zformat.hxx
 #endif
 
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx 
b/dbaccess/source/ui/browser/sbagrid.cxx
index 7ba5def..6fc1751 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -38,7 +38,6 @@
 #define ITEMID_NUMBERINFO   SID_ATTR_NUMBERFORMAT_INFO
 
 
-#define _ZFORLIST_DECLARE_TABLE
 #include svx/numinf.hxx
 #include svx/dbaexchange.hxx
 #include com/sun/star/ui/dialogs/XExecutableDialog.hpp
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx 
b/dbaccess/source/ui/control/FieldDescControl.cxx
index ecdd3b8..c100d9d 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -48,7 +48,6 @@
 #include svx/svxids.hrc
 #include svx/algitem.hxx
 #include svl/itempool.hxx
-#define 

[Libreoffice-commits] .: sd/source

2012-01-06 Thread Ivan Timofeev
 sd/source/ui/dlg/present.src |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e2b57677d3fcb184606b4efb02c79b3e4847c1a0
Author: Ivan Timofeev timofeev@gmail.com
Date:   Fri Jan 6 17:08:54 2012 +0400

fdo#44294: overlapped controls

diff --git a/sd/source/ui/dlg/present.src b/sd/source/ui/dlg/present.src
index b53facb..6ee3fd8 100644
--- a/sd/source/ui/dlg/present.src
+++ b/sd/source/ui/dlg/present.src
@@ -86,8 +86,8 @@ ModalDialog DLG_START_PRESENTATION
 {
 HelpID = sd:ListBox:DLG_START_PRESENTATION:LB_DIAS;
 Border = TRUE ;
-Pos = MAP_APPFONT ( 82, 24 ) ;
-Size = MAP_APPFONT ( 111, 80 ) ;
+Pos = MAP_APPFONT ( 96, 24 ) ;
+Size = MAP_APPFONT ( 97, 80 ) ;
 TabStop = TRUE ;
 DropDown = TRUE ;
  //DDExtraWidth = TRUE;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sd/source

2012-01-06 Thread Ivan Timofeev
 sd/source/ui/dlg/present.src |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 58174c2a1e9291cf8cef63dcd51fd6357233c797
Author: Ivan Timofeev timofeev@gmail.com
Date:   Fri Jan 6 17:08:54 2012 +0400

fdo#44294: overlapped controls

diff --git a/sd/source/ui/dlg/present.src b/sd/source/ui/dlg/present.src
index b53facb..6ee3fd8 100644
--- a/sd/source/ui/dlg/present.src
+++ b/sd/source/ui/dlg/present.src
@@ -86,8 +86,8 @@ ModalDialog DLG_START_PRESENTATION
 {
 HelpID = sd:ListBox:DLG_START_PRESENTATION:LB_DIAS;
 Border = TRUE ;
-Pos = MAP_APPFONT ( 82, 24 ) ;
-Size = MAP_APPFONT ( 111, 80 ) ;
+Pos = MAP_APPFONT ( 96, 24 ) ;
+Size = MAP_APPFONT ( 97, 80 ) ;
 TabStop = TRUE ;
 DropDown = TRUE ;
  //DDExtraWidth = TRUE;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-28 Thread Ivan Timofeev
 dbaccess/source/ui/dlg/CollectionView.cxx |2 -
 svtools/inc/svtools/fileview.hxx  |7 +--
 svtools/source/contnr/fileview.cxx|   60 +++---
 svtools/source/contnr/templwin.cxx|2 -
 4 files changed, 26 insertions(+), 45 deletions(-)

New commits:
commit f10fc42189b3d3f6dd180234da9777e53e92b7e4
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Dec 28 20:00:03 2011 +0400

fdo#44204: shrink the first column in the open dialog, remove unused flags

diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx 
b/dbaccess/source/ui/dlg/CollectionView.cxx
index 8370e39..a41a366 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -80,7 +80,7 @@ OCollectionView::OCollectionView( Window * pParent
 , m_aFTCurrentPath( this, ModuleRes( FT_EXPLORERFILE_CURRENTPATH ) )
 , m_aNewFolder( this, ModuleRes( BTN_EXPLORERFILE_NEWFOLDER ) )
 , m_aUp(this, ModuleRes( BTN_EXPLORERFILE_UP ) )
-, m_aView(  this, ModuleRes( CTRL_VIEW ) ,FILEVIEW_SHOW_TITLE )
+, m_aView(  this, ModuleRes( CTRL_VIEW ), FILEVIEW_SHOW_ONLYTITLE )
 , m_aFTName(this, ModuleRes( FT_EXPLORERFILE_FILENAME ) )
 , m_aName(  this, ModuleRes( ED_EXPLORERFILE_FILENAME ) )
 , m_aFL(this, ModuleRes( FL_1 ) )
diff --git a/svtools/inc/svtools/fileview.hxx b/svtools/inc/svtools/fileview.hxx
index d56826f..ec40c05 100644
--- a/svtools/inc/svtools/fileview.hxx
+++ b/svtools/inc/svtools/fileview.hxx
@@ -43,11 +43,8 @@
 #define FILEVIEW_ONLYFOLDER 0x0001
 #define FILEVIEW_MULTISELECTION 0x0002
 
-#define FILEVIEW_SHOW_TITLE 0x0010
-#define FILEVIEW_SHOW_SIZE  0x0020
-#define FILEVIEW_SHOW_DATE  0x0040
-#define FILEVIEW_SHOW_ALL   0x0070
-#define FILEVIEW_SHOW_NONE  0x0080
+#define FILEVIEW_SHOW_ONLYTITLE 0x0010
+#define FILEVIEW_SHOW_NONE  0x0020
 
 class ViewTabListBox_Impl;
 class SvtFileView_Impl;
diff --git a/svtools/source/contnr/fileview.cxx 
b/svtools/source/contnr/fileview.cxx
index 4f17f34..f726a09 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -722,24 +722,29 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* 
pParentWin,
 mbEnableRename  ( sal_True )
 
 {
-sal_Bool bViewHeader = true;
+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() );
 
 HeaderBarItemBits nBits = ( HIB_LEFT | HIB_VCENTER | HIB_CLICKABLE );
-if ((nFlags  FILEVIEW_SHOW_NONE) == FILEVIEW_SHOW_NONE)
-bViewHeader = false;
+if (nFlags  FILEVIEW_SHOW_ONLYTITLE)
+{
+long pTabs[] = { 2, 20, 600 };
+SetTabs(pTabs[0], MAP_PIXEL);
+
+mpHeaderBar-InsertItem(COLUMN_TITLE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE)), 600, nBits | HIB_UPARROW);
+}
 else
 {
-if (nFlags  FILEVIEW_SHOW_TITLE)
-mpHeaderBar-InsertItem(COLUMN_TITLE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE)), 600, nBits | HIB_UPARROW);
-if (nFlags  FILEVIEW_SHOW_ALL)
-mpHeaderBar-InsertItem(COLUMN_TYPE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TYPE)), 140, nBits);
-if (nFlags  FILEVIEW_SHOW_SIZE)
-mpHeaderBar-InsertItem(COLUMN_SIZE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_SIZE)), 80, nBits);
-if (nFlags  FILEVIEW_SHOW_DATE)
-mpHeaderBar-InsertItem(COLUMN_DATE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_DATE)), 500, nBits);
+long pTabs[] = { 5, 20, 180, 320, 400, 600 };
+SetTabs(pTabs[0], MAP_PIXEL);
+SetTabJustify(2, AdjustRight); // column Size
+
+mpHeaderBar-InsertItem(COLUMN_TITLE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE)), 180, nBits | HIB_UPARROW);
+mpHeaderBar-InsertItem(COLUMN_TYPE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TYPE)), 140, nBits);
+mpHeaderBar-InsertItem(COLUMN_SIZE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_SIZE)), 80, nBits);
+mpHeaderBar-InsertItem(COLUMN_DATE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_DATE)), 500, nBits);
 }
 
 Size aHeadSize = mpHeaderBar-GetSizePixel();
@@ -748,6 +753,8 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* 
pParentWin,
 InitHeaderBar( mpHeaderBar );
 SetHighlightRange();
 SetEntryHeight( ROW_HEIGHT );
+if (nFlags  FILEVIEW_MULTISELECTION)
+SetSelectionMode( MULTIPLE_SELECTION );
 
 Show();
 if( bViewHeader )
@@ -1211,7 +1218,7 @@ SvtFileView::SvtFileView( Window* pParent, const ResId 
rResId,
 
 Control( pParent, rResId )
 {
-sal_Int8 nFlags = FILEVIEW_SHOW_ALL;
+sal_Int8 nFlags = 0;
 if ( bOnlyFolder )
 nFlags |= FILEVIEW_ONLYFOLDER;
 if ( bMultiSelection

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - dbaccess/source svtools/inc svtools/source

2011-12-28 Thread Ivan Timofeev
 dbaccess/source/ui/dlg/CollectionView.cxx |2 -
 svtools/inc/svtools/fileview.hxx  |7 +--
 svtools/source/contnr/fileview.cxx|   60 +++---
 svtools/source/contnr/templwin.cxx|2 -
 4 files changed, 26 insertions(+), 45 deletions(-)

New commits:
commit 150c18ecb0d0eb0dbcef50bb1d76b7c549255104
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Dec 28 20:00:03 2011 +0400

fdo#44204: shrink the first column in the open dialog, remove unused flags

diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx 
b/dbaccess/source/ui/dlg/CollectionView.cxx
index 23e4762..af28a0b 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -80,7 +80,7 @@ OCollectionView::OCollectionView( Window * pParent
 , m_aFTCurrentPath( this, ModuleRes( FT_EXPLORERFILE_CURRENTPATH ) )
 , m_aNewFolder( this, ModuleRes( BTN_EXPLORERFILE_NEWFOLDER ) )
 , m_aUp(this, ModuleRes( BTN_EXPLORERFILE_UP ) )
-, m_aView(  this, ModuleRes( CTRL_VIEW ) ,FILEVIEW_SHOW_TITLE )
+, m_aView(  this, ModuleRes( CTRL_VIEW ), FILEVIEW_SHOW_ONLYTITLE )
 , m_aFTName(this, ModuleRes( FT_EXPLORERFILE_FILENAME ) )
 , m_aName(  this, ModuleRes( ED_EXPLORERFILE_FILENAME ) )
 , m_aFL(this, ModuleRes( FL_1 ) )
diff --git a/svtools/inc/svtools/fileview.hxx b/svtools/inc/svtools/fileview.hxx
index d56826f..ec40c05 100644
--- a/svtools/inc/svtools/fileview.hxx
+++ b/svtools/inc/svtools/fileview.hxx
@@ -43,11 +43,8 @@
 #define FILEVIEW_ONLYFOLDER 0x0001
 #define FILEVIEW_MULTISELECTION 0x0002
 
-#define FILEVIEW_SHOW_TITLE 0x0010
-#define FILEVIEW_SHOW_SIZE  0x0020
-#define FILEVIEW_SHOW_DATE  0x0040
-#define FILEVIEW_SHOW_ALL   0x0070
-#define FILEVIEW_SHOW_NONE  0x0080
+#define FILEVIEW_SHOW_ONLYTITLE 0x0010
+#define FILEVIEW_SHOW_NONE  0x0020
 
 class ViewTabListBox_Impl;
 class SvtFileView_Impl;
diff --git a/svtools/source/contnr/fileview.cxx 
b/svtools/source/contnr/fileview.cxx
index 4f17f34..f726a09 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -722,24 +722,29 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* 
pParentWin,
 mbEnableRename  ( sal_True )
 
 {
-sal_Bool bViewHeader = true;
+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() );
 
 HeaderBarItemBits nBits = ( HIB_LEFT | HIB_VCENTER | HIB_CLICKABLE );
-if ((nFlags  FILEVIEW_SHOW_NONE) == FILEVIEW_SHOW_NONE)
-bViewHeader = false;
+if (nFlags  FILEVIEW_SHOW_ONLYTITLE)
+{
+long pTabs[] = { 2, 20, 600 };
+SetTabs(pTabs[0], MAP_PIXEL);
+
+mpHeaderBar-InsertItem(COLUMN_TITLE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE)), 600, nBits | HIB_UPARROW);
+}
 else
 {
-if (nFlags  FILEVIEW_SHOW_TITLE)
-mpHeaderBar-InsertItem(COLUMN_TITLE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE)), 600, nBits | HIB_UPARROW);
-if (nFlags  FILEVIEW_SHOW_ALL)
-mpHeaderBar-InsertItem(COLUMN_TYPE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TYPE)), 140, nBits);
-if (nFlags  FILEVIEW_SHOW_SIZE)
-mpHeaderBar-InsertItem(COLUMN_SIZE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_SIZE)), 80, nBits);
-if (nFlags  FILEVIEW_SHOW_DATE)
-mpHeaderBar-InsertItem(COLUMN_DATE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_DATE)), 500, nBits);
+long pTabs[] = { 5, 20, 180, 320, 400, 600 };
+SetTabs(pTabs[0], MAP_PIXEL);
+SetTabJustify(2, AdjustRight); // column Size
+
+mpHeaderBar-InsertItem(COLUMN_TITLE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TITLE)), 180, nBits | HIB_UPARROW);
+mpHeaderBar-InsertItem(COLUMN_TYPE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_TYPE)), 140, nBits);
+mpHeaderBar-InsertItem(COLUMN_SIZE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_SIZE)), 80, nBits);
+mpHeaderBar-InsertItem(COLUMN_DATE, 
String(SvtResId(STR_SVT_FILEVIEW_COLUMN_DATE)), 500, nBits);
 }
 
 Size aHeadSize = mpHeaderBar-GetSizePixel();
@@ -748,6 +753,8 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( Window* 
pParentWin,
 InitHeaderBar( mpHeaderBar );
 SetHighlightRange();
 SetEntryHeight( ROW_HEIGHT );
+if (nFlags  FILEVIEW_MULTISELECTION)
+SetSelectionMode( MULTIPLE_SELECTION );
 
 Show();
 if( bViewHeader )
@@ -1211,7 +1218,7 @@ SvtFileView::SvtFileView( Window* pParent, const ResId 
rResId,
 
 Control( pParent, rResId )
 {
-sal_Int8 nFlags = FILEVIEW_SHOW_ALL;
+sal_Int8 nFlags = 0;
 if ( bOnlyFolder )
 nFlags |= FILEVIEW_ONLYFOLDER;
 if ( bMultiSelection

[Libreoffice-commits] .: formula/source fpicker/source

2011-12-26 Thread Ivan Timofeev
 formula/source/core/api/FormulaCompiler.cxx   |4 ++--
 formula/source/ui/dlg/formula.cxx |   18 +-
 formula/source/ui/dlg/funcpage.cxx|2 +-
 formula/source/ui/dlg/parawin.cxx |2 +-
 fpicker/source/office/OfficeControlAccess.cxx |2 +-
 fpicker/source/office/OfficeFilePicker.cxx|   16 
 fpicker/source/office/OfficeFolderPicker.cxx  |2 +-
 fpicker/source/office/commonpicker.cxx|8 
 fpicker/source/office/fpsmartcontent.cxx  |2 +-
 fpicker/source/office/iodlg.cxx   |2 +-
 10 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit 3e4f51f112248b4e586f5bd86388099737ed17e9
Author: Olivier Hallot olivier.hal...@alta.org.br
Date:   Sun Dec 25 19:31:22 2011 -0200

Fix for fdo43460 Part XIX getLength() to isEmpty()

Part XIX
Module
formula and fpicker

diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index b721c3b..ee6530c 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -296,9 +296,9 @@ uno::Sequence sheet::FormulaToken  
FormulaCompiler::OpCodeMap::createSequenceO
 // Check for existence not needed here, only name-mapping is of
 // interest.
 }
-if (!aIntName.getLength())
+if (aIntName.isEmpty())
 aIntName = _rCompiler.FindAddInFunction(*pName, !isEnglish()); 
   // bLocalFirst=false for english
-if (!aIntName.getLength())
+if (aIntName.isEmpty())
 pToken-OpCode = getOpCodeUnknown();
 else
 {
diff --git a/formula/source/ui/dlg/formula.cxx 
b/formula/source/ui/dlg/formula.cxx
index d298795..4197ae4 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -404,19 +404,19 @@ void FormulaDlg_Impl::PreNotify( NotifyEvent rNEvt )
 if(pWin!=NULL)
 {
 aActivWinId = pWin-GetUniqueId();
-if(aActivWinId.getLength()==0)
+if(aActivWinId.isEmpty())
 {
 Window* pParent=pWin-GetParent();
 while(pParent!=NULL)
 {
 aActivWinId=pParent-GetUniqueId();
 
-if(aActivWinId.getLength()!=0) break;
+if(!aActivWinId.isEmpty()) break;
 
 pParent=pParent-GetParent();
 }
 }
-if(aActivWinId.getLength())
+if(!aActivWinId.isEmpty())
 {
 
 FormEditData* pData = m_pHelper-getFormEditData();
@@ -861,7 +861,7 @@ void FormulaDlg_Impl::FillControls(sal_Bool rbNext, 
sal_Bool rbPrev)
 aFtEditName.Show();
 pParaWin-Show();
 const rtl::OString aHelpId = pFuncDesc-getHelpId();
-if ( aHelpId.getLength() )
+if ( !aHelpId.isEmpty() )
 pMEdit-SetHelpId(aHelpId);
 }
 
@@ -1284,7 +1284,7 @@ void FormulaDlg_Impl::SaveArg( sal_uInt16 nEd )
 sal_uInt16 i;
 for(i=0;i=nEd;i++)
 {
-if ( m_aArguments[i].getLength() == 0 )
+if ( m_aArguments[i].isEmpty() )
 m_aArguments[i] = 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ));
 }
 if(pParaWin-GetArgument(nEd).Len()!=0)
@@ -1744,14 +1744,14 @@ rtl::OString FormulaDlg_Impl::FindFocusWin(Window *pWin)
 if(pWin-HasFocus())
 {
 aUniqueId=pWin-GetUniqueId();
-if(aUniqueId.getLength()==0)
+if(aUniqueId.isEmpty())
 {
 Window* pParent=pWin-GetParent();
 while(pParent!=NULL)
 {
 aUniqueId=pParent-GetUniqueId();
 
-if(aUniqueId.getLength()!=0) break;
+if(!aUniqueId.isEmpty()) break;
 
 pParent=pParent-GetParent();
 }
@@ -1765,7 +1765,7 @@ rtl::OString FormulaDlg_Impl::FindFocusWin(Window *pWin)
 {
 Window* pChild=pWin-GetChild(i);
 aUniqueId=FindFocusWin(pChild);
-if(aUniqueId.getLength()0) break;
+if(!aUniqueId.isEmpty()) break;
 }
 }
 return aUniqueId;
@@ -1885,7 +1885,7 @@ FormulaDlg::FormulaDlg( SfxBindings* pB, SfxChildWindow* 
pCW,
 ,_pHelper,_pFunctionMgr,_pDlg))
 {
 FreeResource();
-if(!GetHelpId().getLength())//Hack which hides the HelpId for a model 
Dialog in SfxModelessDialog
+if(GetHelpId().isEmpty())//Hack which hides the HelpId for a model 
Dialog in SfxModelessDialog
 SetHelpId(GetUniqueId());   //and will be changed in a UniqueId,
 //at this point we reverse it.
 SetText(m_pImpl-aTitle1);
diff --git a/formula/source/ui/dlg/funcpage.cxx 
b/formula/source/ui/dlg/funcpage.cxx
index ea3bbaa..22ea529 100644

[Libreoffice-commits] .: vcl/source

2011-12-23 Thread Ivan Timofeev
 vcl/source/window/menu.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 22ebb32863f7874ccd1d39881140a0bbcbc5f72a
Author: Ivan Timofeev timofeev@gmail.com
Date:   Fri Dec 23 19:10:18 2011 +0400

don't hide images in menus (fdo#31471, fdo#41264)

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 65a83a5..c44f906 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -960,7 +960,7 @@ void Menu::ImplInit()
 {
 mnHighlightedItemPos = ITEMPOS_INVALID;
 mpSalMenu   = NULL;
-nMenuFlags  = 0;
+nMenuFlags  = MENU_FLAG_SHOWCHECKIMAGES;
 nDefaultItem= 0;
 //bIsMenuBar  = sal_False;  // this is now set in the ctor, must not 
be changed here!!!
 nSelectedId = 0;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: drawinglayer/source dtrans/source editeng/source

2011-12-23 Thread Ivan Timofeev
 drawinglayer/source/primitive2d/controlprimitive2d.cxx |2 -
 dtrans/source/cnttype/mcnttype.cxx |   18 -
 dtrans/source/test/test_dtrans.cxx |2 -
 editeng/source/editeng/editview.cxx|4 +--
 editeng/source/editeng/impedit2.cxx|2 -
 editeng/source/editeng/impedit4.cxx|2 -
 editeng/source/editeng/textconv.cxx|2 -
 editeng/source/items/frmitems.cxx  |4 +--
 editeng/source/items/textitem.cxx  |6 ++---
 editeng/source/items/xmlcnitm.cxx  |2 -
 editeng/source/misc/hangulhanja.cxx|8 +++
 editeng/source/misc/unolingu.cxx   |8 +++
 editeng/source/rtf/rtfgrf.cxx  |2 -
 editeng/source/uno/unofield.cxx|4 +--
 editeng/source/uno/unonrule.cxx|2 -
 15 files changed, 34 insertions(+), 34 deletions(-)

New commits:
commit b575f4b1a2a2217282cddc995951b350936b47b1
Author: Gustavo Buzzatti Pacheco gbpach...@gmail.com
Date:   Fri Dec 23 10:25:18 2011 -0200

Fix for fdo43460 Part XIV getLength() to isEmpty()

Part XIV
Modules
drawinglayer, dtrans, editeng

diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx 
b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
index 178e170..3d7f8d1 100644
--- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
@@ -69,7 +69,7 @@ namespace drawinglayer
 
 if(aValue = aUnoControlTypeName)
 {
-if(aUnoControlTypeName.getLength())
+if(!aUnoControlTypeName.isEmpty())
 {
 uno::Reference lang::XMultiServiceFactory  
xFactory( comphelper::getProcessServiceFactory() );
 
diff --git a/dtrans/source/cnttype/mcnttype.cxx 
b/dtrans/source/cnttype/mcnttype.cxx
index 66d7376..52fdbe6 100644
--- a/dtrans/source/cnttype/mcnttype.cxx
+++ b/dtrans/source/cnttype/mcnttype.cxx
@@ -140,7 +140,7 @@ OUString SAL_CALL CMimeContentType::getParameterValue( 
const OUString aName ) t
 
 void SAL_CALL CMimeContentType::init( const OUString aCntType ) throw( 
IllegalArgumentException )
 {
-if ( !aCntType.getLength( ) )
+if ( aCntType.isEmpty( ) )
 throw IllegalArgumentException( );
 
 m_nPos = 0;
@@ -200,7 +200,7 @@ void SAL_CALL CMimeContentType::type( void )
 throw IllegalArgumentException( );
 
 // parse
-while(  m_nxtSym.getLength( ) )
+while(  !m_nxtSym.isEmpty( ) )
 {
 if ( isInRange( m_nxtSym, TOKEN ) )
 m_MediaType += m_nxtSym;
@@ -230,7 +230,7 @@ void SAL_CALL CMimeContentType::subtype( void )
 if ( !isInRange( m_nxtSym, TOKEN ) )
 throw IllegalArgumentException( );
 
-while( m_nxtSym.getLength( ) )
+while( !m_nxtSym.isEmpty( ) )
 {
 if ( isInRange( m_nxtSym, TOKEN ) )
 m_MediaSubtype += m_nxtSym;
@@ -252,7 +252,7 @@ void SAL_CALL CMimeContentType::subtype( void )
 
 void SAL_CALL CMimeContentType::trailer( void )
 {
-while( m_nxtSym.getLength( ) )
+while( !m_nxtSym.isEmpty( ) )
 {
 if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM(()) )
 {
@@ -298,7 +298,7 @@ OUString SAL_CALL CMimeContentType::pName( )
 {
 OUString pname;
 
-while( m_nxtSym.getLength( ) )
+while( !m_nxtSym.isEmpty( ) )
 {
 if ( isInRange( m_nxtSym, TOKEN ) )
 pname += m_nxtSym;
@@ -332,7 +332,7 @@ OUString SAL_CALL CMimeContentType::pValue( )
 // remove the last quote-sign
 pvalue = pvalue.copy(0, pvalue.getLength() - 1);
 
-if ( !pvalue.getLength( ) )
+if ( pvalue.isEmpty( ) )
 throw IllegalArgumentException( );
 }
 else if ( isInRange( m_nxtSym, TOKEN ) ) // unquoted pvalue
@@ -356,7 +356,7 @@ OUString SAL_CALL CMimeContentType::quotedPValue( )
 OUString pvalue;
 sal_Bool bAfterQuoteSign = sal_False;
 
-while ( m_nxtSym.getLength( ) )
+while ( !m_nxtSym.isEmpty( ) )
 {
 if ( bAfterQuoteSign  ((m_nxtSym == SPACE)||(m_nxtSym == SEMICOLON) 
) )
 break;
@@ -384,7 +384,7 @@ OUString SAL_CALL CMimeContentType::nonquotedPValue( )
 {
 OUString pvalue;
 
-while ( m_nxtSym.getLength( ) )
+while ( !m_nxtSym.isEmpty( ) )
 {
 if ( isInRange( m_nxtSym, TOKEN ) )
 pvalue += m_nxtSym;
@@ -404,7 +404,7 @@ OUString SAL_CALL CMimeContentType::nonquotedPValue( )
 
 void SAL_CALL CMimeContentType::comment( void )
 {
-while ( m_nxtSym.getLength( ) )
+while ( !m_nxtSym.isEmpty( ) )
 {
 if ( isInRange( m_nxtSym, TOKEN + SPACE ) )
 getSym( );
diff --git a/dtrans/source/test/test_dtrans.cxx 
b/dtrans/source/test/test_dtrans.cxx
index 

[Libreoffice-commits] .: cui/source

2011-12-20 Thread Ivan Timofeev
 cui/source/customize/acccfg.cxx   |8 
 cui/source/customize/cfg.cxx  |   26 +-
 cui/source/customize/cfgutil.cxx  |   10 +-
 cui/source/customize/macropg.cxx  |6 +++---
 cui/source/customize/selector.cxx |   10 +-
 cui/source/dialogs/SpellDialog.cxx|   14 +++---
 cui/source/dialogs/about.cxx  |4 ++--
 cui/source/dialogs/colorpicker.cxx|2 +-
 cui/source/dialogs/hangulhanjadlg.cxx |2 +-
 cui/source/dialogs/hldocntp.cxx   |4 ++--
 cui/source/dialogs/hlinettp.cxx   |2 +-
 cui/source/dialogs/hlmarkwn.cxx   |6 +++---
 cui/source/dialogs/insdlg.cxx |2 +-
 cui/source/dialogs/scriptdlg.cxx  |   28 ++--
 cui/source/dialogs/thesdlg.cxx|8 
 cui/source/inc/acccfg.hxx |2 +-
 cui/source/options/dbregister.cxx |2 +-
 cui/source/options/optcolor.cxx   |2 +-
 cui/source/options/optgdlg.cxx|   10 +-
 cui/source/options/optlingu.cxx   |   24 
 cui/source/options/optsave.cxx|   18 +-
 cui/source/options/treeopt.cxx|   22 +++---
 cui/source/tabpages/autocdlg.cxx  |2 +-
 cui/source/tabpages/numpages.cxx  |8 
 cui/source/tabpages/tpbitmap.cxx  |2 +-
 cui/source/tabpages/tpcolor.cxx   |2 +-
 cui/source/tabpages/tpgradnt.cxx  |2 +-
 cui/source/tabpages/tphatch.cxx   |2 +-
 cui/source/tabpages/tplnedef.cxx  |2 +-
 cui/source/tabpages/tplneend.cxx  |2 +-
 30 files changed, 117 insertions(+), 117 deletions(-)

New commits:
commit 1375183d465fb17db513dfe16ac522e48573a4c0
Author: Olivier Hallot olivier.hal...@alta.org.br
Date:   Fri Dec 16 17:29:07 2011 -0200

Fix for fdo43460 Part XI getLength() to isEmpty()

Part XI
Module
cui

diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 159272f..9a2a918 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -1015,7 +1015,7 @@ void SfxAcceleratorConfigPage::Apply(const 
css::uno::Reference css::ui::XAccele
 
 try
 {
-if (sCommand.getLength())
+if (!sCommand.isEmpty())
 xAccMgr-setKeyEvent(aAWTKey, sCommand);
 else
 xAccMgr-removeKeyEvent(aAWTKey);
@@ -1233,7 +1233,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, LoadHdl, 
sfx2::FileDialogHelper*, EMPTYARG
 if ( ERRCODE_NONE == m_pFileDlg-GetError() )
 sCfgName = m_pFileDlg-GetPath();
 
-if ( !sCfgName.getLength() )
+if ( sCfgName.isEmpty() )
 return 0;
 
 GetTabDialog()-EnterWait();
@@ -1317,7 +1317,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, SaveHdl, 
sfx2::FileDialogHelper*, EMPTYARG
 if ( ERRCODE_NONE == m_pFileDlg-GetError() )
 sCfgName = m_pFileDlg-GetPath();
 
-if ( !sCfgName.getLength() )
+if ( sCfgName.isEmpty() )
 return 0;
 
 GetTabDialog()-EnterWait();
@@ -1358,7 +1358,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, SaveHdl, 
sfx2::FileDialogHelper*, EMPTYARG
 // set the correct media type if the storage was new created
 ::rtl::OUString sMediaType;
 xUIConfigProps-getPropertyValue(MEDIATYPE_PROPNAME) = 
sMediaType;
-if (!sMediaType.getLength())
+if (sMediaType.isEmpty())
 xUIConfigProps-setPropertyValue(MEDIATYPE_PROPNAME, 
css::uno::makeAny(MEDIATYPE_UICONFIG));
 
 xCfgMgr = css::uno::Reference css::ui::XUIConfigurationManager 
(m_xSMGR-createInstance(SERVICE_UICONFIGMGR), css::uno::UNO_QUERY_THROW);
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index de19df3..35de842 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -481,7 +481,7 @@ OUString GetUIModuleName( const OUString aModuleId, const 
uno::Reference css::
 }
 }
 
-if ( aModuleUIName.getLength() == 0 )
+if ( aModuleUIName.isEmpty() )
 aModuleUIName = GetModuleName( aModuleId );
 
 return aModuleUIName;
@@ -613,7 +613,7 @@ ConvertSvxConfigEntry(
 // as an empty string.
 // It will be initialised again later using the command to label map.
 aPropSeq[2].Name = aDescriptorLabel;
-if ( pEntry-HasChangedName() == sal_False  
pEntry-GetCommand().getLength() )
+if ( pEntry-HasChangedName() == sal_False  
!pEntry-GetCommand().isEmpty() )
 {
 sal_Bool isDefaultName = sal_False;
 try
@@ -694,7 +694,7 @@ ConvertToolbarEntry(
 // as an empty string.
 // It will be initialised again later using the command to label map.
 aPropSeq[2].Name = aDescriptorLabel;
-if ( pEntry-HasChangedName() == sal_False  
pEntry-GetCommand().getLength() )
+if ( pEntry-HasChangedName() == sal_False  
!pEntry-GetCommand().isEmpty() )
 {
 sal_Bool isDefaultName = 

[Libreoffice-commits] .: sw/source

2011-12-18 Thread Ivan Timofeev
 sw/source/ui/dbui/mmmergepage.src |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 2ca2b35f728ac341748836839a4579a6ff668f54
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Dec 19 09:23:33 2011 +0400

mailmerge: move overlapped controls

diff --git a/sw/source/ui/dbui/mmmergepage.src 
b/sw/source/ui/dbui/mmmergepage.src
index a66480a..93b9390 100644
--- a/sw/source/ui/dbui/mmmergepage.src
+++ b/sw/source/ui/dbui/mmmergepage.src
@@ -69,8 +69,8 @@ TabPage DLG_MM_MERGE_PAGE
 Edit   ED_FIND
 {
 HelpID = sw:Edit:DLG_MM_MERGE_PAGE:ED_FIND;
-Pos = MAP_APPFONT ( 55 ,114 ) ;
-Size = MAP_APPFONT ( 140 , 12 ) ;
+Pos = MAP_APPFONT ( 65 ,114 ) ;
+Size = MAP_APPFONT ( 130 , 12 ) ;
 Border = TRUE;
 };
 PushButton PB_FIND
@@ -83,21 +83,21 @@ TabPage DLG_MM_MERGE_PAGE
 CheckBox   CB_WHOLEWORDS
 {
 HelpID = sw:CheckBox:DLG_MM_MERGE_PAGE:CB_WHOLEWORDS;
-Pos = MAP_APPFONT ( 55 , 131 ) ;
+Pos = MAP_APPFONT ( 65 , 131 ) ;
 Size = MAP_APPFONT ( 180 , 10 ) ;
 Text [ en-US ] = Whole wor~ds only;
 };
 CheckBox   CB_BACKWARDS
 {
 HelpID = sw:CheckBox:DLG_MM_MERGE_PAGE:CB_BACKWARDS;
-Pos = MAP_APPFONT ( 55 , 144 ) ;
+Pos = MAP_APPFONT ( 65 , 144 ) ;
 Size = MAP_APPFONT ( 180 , 10 ) ;
 Text [ en-US ] = Back~wards;
 };
 CheckBox   CB_MATCHCASE
 {
 HelpID = sw:CheckBox:DLG_MM_MERGE_PAGE:CB_MATCHCASE;
-Pos = MAP_APPFONT ( 55 , 157 ) ;
+Pos = MAP_APPFONT ( 65 , 157 ) ;
 Size = MAP_APPFONT ( 180 , 10 ) ;
 Text [ en-US ] = Ma~tch case;
 };
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source

2011-12-18 Thread Ivan Timofeev
 sw/source/ui/dbui/mmmergepage.src |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 3c6197f501c1b6d59ebb4dabad5a129b62c6f051
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Dec 19 09:23:33 2011 +0400

mailmerge: move overlapped controls

diff --git a/sw/source/ui/dbui/mmmergepage.src 
b/sw/source/ui/dbui/mmmergepage.src
index a66480a..93b9390 100644
--- a/sw/source/ui/dbui/mmmergepage.src
+++ b/sw/source/ui/dbui/mmmergepage.src
@@ -69,8 +69,8 @@ TabPage DLG_MM_MERGE_PAGE
 Edit   ED_FIND
 {
 HelpID = sw:Edit:DLG_MM_MERGE_PAGE:ED_FIND;
-Pos = MAP_APPFONT ( 55 ,114 ) ;
-Size = MAP_APPFONT ( 140 , 12 ) ;
+Pos = MAP_APPFONT ( 65 ,114 ) ;
+Size = MAP_APPFONT ( 130 , 12 ) ;
 Border = TRUE;
 };
 PushButton PB_FIND
@@ -83,21 +83,21 @@ TabPage DLG_MM_MERGE_PAGE
 CheckBox   CB_WHOLEWORDS
 {
 HelpID = sw:CheckBox:DLG_MM_MERGE_PAGE:CB_WHOLEWORDS;
-Pos = MAP_APPFONT ( 55 , 131 ) ;
+Pos = MAP_APPFONT ( 65 , 131 ) ;
 Size = MAP_APPFONT ( 180 , 10 ) ;
 Text [ en-US ] = Whole wor~ds only;
 };
 CheckBox   CB_BACKWARDS
 {
 HelpID = sw:CheckBox:DLG_MM_MERGE_PAGE:CB_BACKWARDS;
-Pos = MAP_APPFONT ( 55 , 144 ) ;
+Pos = MAP_APPFONT ( 65 , 144 ) ;
 Size = MAP_APPFONT ( 180 , 10 ) ;
 Text [ en-US ] = Back~wards;
 };
 CheckBox   CB_MATCHCASE
 {
 HelpID = sw:CheckBox:DLG_MM_MERGE_PAGE:CB_MATCHCASE;
-Pos = MAP_APPFONT ( 55 , 157 ) ;
+Pos = MAP_APPFONT ( 65 , 157 ) ;
 Size = MAP_APPFONT ( 180 , 10 ) ;
 Text [ en-US ] = Ma~tch case;
 };
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sd/source

2011-12-18 Thread Ivan Timofeev
 sd/source/ui/animations/SlideTransitionPane.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e81e5108b90340419264fa2562cc6b96837fee52
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Dec 19 10:01:29 2011 +0400

impress: slide transition pane: use proper control width

diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx 
b/sd/source/ui/animations/SlideTransitionPane.cxx
index bff23fe..6e7862d 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -714,7 +714,7 @@ void SlideTransitionPane::updateLayout()
 aCtrlSize = maFT_SOUND.GetSizePixel();
 if( bStack )
 aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
-aCtrlSize.setWidth( nFTSoundWidth );
+aCtrlSize.setWidth( nFTSoundWidth - 2 * nOffsetX );
 maFT_SOUND.SetPosSizePixel( aUpperLeft, aCtrlSize );
 
 aUpperLeft.setX( nIndent );
@@ -728,7 +728,7 @@ void SlideTransitionPane::updateLayout()
 aCtrlSize = maFT_SPEED.GetSizePixel();
 if( bStack )
 aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
-aCtrlSize.setWidth( nFTSpeedWidth );
+aCtrlSize.setWidth( nFTSpeedWidth - 2 * nOffsetX );
 maFT_SPEED.SetPosSizePixel( aUpperLeft, aCtrlSize );
 
 // fixed line Modify Transition
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sd/source

2011-12-18 Thread Ivan Timofeev
 sd/source/ui/animations/SlideTransitionPane.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 418dcec256481791721fb13fd4cdfe07074403fb
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Dec 19 10:01:29 2011 +0400

impress: slide transition pane: use proper control width

diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx 
b/sd/source/ui/animations/SlideTransitionPane.cxx
index bff23fe..6e7862d 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -714,7 +714,7 @@ void SlideTransitionPane::updateLayout()
 aCtrlSize = maFT_SOUND.GetSizePixel();
 if( bStack )
 aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
-aCtrlSize.setWidth( nFTSoundWidth );
+aCtrlSize.setWidth( nFTSoundWidth - 2 * nOffsetX );
 maFT_SOUND.SetPosSizePixel( aUpperLeft, aCtrlSize );
 
 aUpperLeft.setX( nIndent );
@@ -728,7 +728,7 @@ void SlideTransitionPane::updateLayout()
 aCtrlSize = maFT_SPEED.GetSizePixel();
 if( bStack )
 aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
-aCtrlSize.setWidth( nFTSpeedWidth );
+aCtrlSize.setWidth( nFTSpeedWidth - 2 * nOffsetX );
 maFT_SPEED.SetPosSizePixel( aUpperLeft, aCtrlSize );
 
 // fixed line Modify Transition
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/source

2011-12-17 Thread Ivan Timofeev
 vcl/source/window/decoview.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f26635c3869a85ae03dba3dfb833276f13ffc478
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Dec 17 17:11:54 2011 +0400

fix decoration drawing

diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 38dbe74..6b6bc1a 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -747,7 +747,7 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle 
rRect,
 rRect.Right(), rRect.Bottom() ) );
 pDev-SetLineColor( rStyleSettings.GetShadowColor() );
 pDev-DrawRect( Rectangle( rRect.Left(), rRect.Top(),
-rRect.Right()+1, rRect.Bottom()+1 
) );
+rRect.Right()-1, rRect.Bottom()-1 
) );
 
 // adjust target rectangle
 rRect.Left()   += 2;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: cppuhelper/source cppu/source cpputools/source

2011-12-17 Thread Ivan Timofeev
 cppu/source/uno/EnvStack.cxx |2 -
 cppu/source/uno/lbenv.cxx|4 +--
 cppu/source/uno/lbmap.cxx|6 ++---
 cppuhelper/source/bootstrap.cxx  |8 +++---
 cppuhelper/source/component_context.cxx  |2 -
 cppuhelper/source/factory.cxx|2 -
 cppuhelper/source/propertysetmixin.cxx   |2 -
 cppuhelper/source/propshlp.cxx   |8 +++---
 cppuhelper/source/servicefactory.cxx |   14 +--
 cppuhelper/source/shlib.cxx  |4 +--
 cpputools/source/registercomponent/registercomponent.cxx |   16 ++---
 cpputools/source/regsingleton/regsingleton.cxx   |2 -
 cpputools/source/unoexe/unoexe.cxx   |   18 +++
 13 files changed, 44 insertions(+), 44 deletions(-)

New commits:
commit 1b99d8800e399f45404ab62827163a873d2a1aec
Author: Olivier Hallot olivier.hal...@alta.org.br
Date:   Thu Dec 15 17:29:53 2011 -0200

Fix for fdo43460 Part X getLength() to isEmpty()

Part X
Module
cppu
cppuhelper
cpputools

diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx
index d1ff292..9542440 100644
--- a/cppu/source/uno/EnvStack.cxx
+++ b/cppu/source/uno/EnvStack.cxx
@@ -203,7 +203,7 @@ static int s_getNextEnv(uno_Environment ** ppEnv, 
uno_Environment * pCurrEnv, un
 res = 1;
 }
 
-if (nextPurpose.getLength())
+if (!nextPurpose.isEmpty())
 {
 rtl::OUString next_envDcp(s_uno_envDcp);
 next_envDcp += nextPurpose;
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index 08e7035..ba3465c 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -1031,7 +1031,7 @@ inline void EnvironmentsData::getRegisteredEnvironments(
   iPos != aName2EnvMap.end(); ++iPos )
 {
 uno_Environment * pWeak = iPos-second;
-if (!rEnvDcp.getLength() ||
+if (rEnvDcp.isEmpty() ||
 rEnvDcp.equals( pWeak-pTypeName ))
 {
 ppFound[nSize] = 0;
@@ -1116,7 +1116,7 @@ static uno_Environment * initDefaultEnvironment(
 that-releaseInterface = unoenv_releaseInterface;
 
 OUString envPurpose = cppu::EnvDcp::getPurpose(rEnvDcp);
-if (envPurpose.getLength())
+if (!envPurpose.isEmpty())
 {
 rtl::OUString libStem = 
envPurpose.copy(envPurpose.lastIndexOf(':') + 1);
 libStem += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(_uno_uno) 
);
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index ec56c05..84e2cc7 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -312,7 +312,7 @@ static inline OUString getBridgeName(
 SAL_THROW( () )
 {
 OUStringBuffer aBridgeName( 16 );
-if (rAddPurpose.getLength())
+if (!rAddPurpose.isEmpty())
 {
 aBridgeName.append( rAddPurpose );
 aBridgeName.append( (sal_Unicode)'_' );
@@ -469,7 +469,7 @@ static Mapping getMediateMapping(
 }
 
 // connect to uno
-if (rAddPurpose.getLength()) // insert purpose mapping between new ano_uno 
- uno
+if (!rAddPurpose.isEmpty()) // insert purpose mapping between new ano_uno 
- uno
 {
 // create anonymous uno env
 Environment aAnUno;
@@ -540,7 +540,7 @@ void SAL_CALL uno_getMapping(
 }
 
 // See if an identity mapping does fit.
-if (!aRet.is()  pFrom == pTo  !aAddPurpose.getLength())
+if (!aRet.is()  pFrom == pTo  aAddPurpose.isEmpty())
 aRet = createIdentityMapping(pFrom);
 
 if (!aRet.is())
diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx
index 399af07..2fb8ccd 100644
--- a/cppuhelper/source/bootstrap.cxx
+++ b/cppuhelper/source/bootstrap.cxx
@@ -81,13 +81,13 @@ namespace cppu
 OUString const  get_this_libpath()
 {
 static OUString s_path;
-if (0 == s_path.getLength())
+if (s_path.isEmpty())
 {
 OUString path;
 Module::getUrlFromAddress( 
reinterpret_castoslGenericFunction(get_this_libpath), path );
 path = path.copy( 0, path.lastIndexOf( '/' ) );
 MutexGuard guard( Mutex::getGlobalMutex() );
-if (0 == s_path.getLength())
+if (s_path.isEmpty())
 s_path = path;
 }
 return s_path;
@@ -317,7 +317,7 @@ Reference registry::XSimpleRegistry  nestRegistries(
 sal_Int32 index;
 Reference registry::XSimpleRegistry  lastRegistry;
 
-if(write_rdb.getLength()) // is there a write registry given?
+if(!write_rdb.isEmpty()) // is there a write registry given?
 {
 lastRegistry.set(xSimRegFac-createInstance(), UNO_QUERY);
 
@@ -533,7 +533,7 @@ Reference XComponentContext  SAL_CALL bootstrap()
 throw BootstrapException(
 OUSTR(cannot convert soffice installation path to 

[Libreoffice-commits] .: 2 commits - configmgr/source vcl/source

2011-12-16 Thread Ivan Timofeev
 configmgr/source/access.cxx|   16 
 configmgr/source/childaccess.cxx   |6 +++---
 configmgr/source/components.cxx|2 +-
 configmgr/source/configurationprovider.cxx |   22 +++---
 configmgr/source/data.cxx  |   12 ++--
 configmgr/source/propertynode.cxx  |2 +-
 configmgr/source/valueparser.cxx   |6 +++---
 configmgr/source/writemodfile.cxx  |6 +++---
 configmgr/source/xcdparser.cxx |4 ++--
 configmgr/source/xcuparser.cxx |6 +++---
 vcl/source/window/printdlg.cxx |3 +++
 11 files changed, 44 insertions(+), 41 deletions(-)

New commits:
commit c4ccdda15a66ae6d8751da7401f5ea4f46df0c04
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Dec 17 11:53:26 2011 +0400

fdo#34641: set initial focus to Number of copies

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 6119555..b1c9b4b 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -902,6 +902,9 @@ PrintDialog::PrintDialog( Window* i_pParent, const 
boost::shared_ptrPrinterCont
 // setup dependencies
 checkControlDependencies();
 
+// set initial focus to Number of copies
+maJobPage.maCopyCountField.GrabFocus();
+maJobPage.maCopyCountField.SetSelection( Selection(0, 0x) );
 }
 
 PrintDialog::~PrintDialog()
commit 4a0ab53cf44be11053a095470ad8cb426487dbc6
Author: Olivier Hallot olivier.hal...@alta.org.br
Date:   Wed Dec 14 10:59:15 2011 -0200

Fix for fdo43460 Part VIII getLength() to isEmpty()

Part VIII
Module
comfigmgr

diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index b6617b4..694e081 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -615,7 +615,7 @@ rtl::OUString Access::getHierarchicalName() throw 
(css::uno::RuntimeException) {
 path.append(root-getAbsolutePathRepresentation());
 }
 rtl::OUString rel(getRelativePathRepresentation());
-if (path.getLength() != 0  rel.getLength() != 0) {
+if (path.getLength() != 0  !rel.isEmpty()) {
 path.append(sal_Unicode('/'));
 }
 path.append(rel);
@@ -631,7 +631,7 @@ rtl::OUString Access::composeHierarchicalName(
 assert(thisIs(IS_ANY));
 osl::MutexGuard g(*lock_);
 checkLocalizedPropertyAccess();
-if (aRelativeName.getLength() == 0 || aRelativeName[0] == '/') {
+if (aRelativeName.isEmpty() || aRelativeName[0] == '/') {
 throw css::lang::IllegalArgumentException(
 rtl::OUString(
 RTL_CONSTASCII_USTRINGPARAM(
@@ -671,7 +671,7 @@ void Access::setName(rtl::OUString const  aName)
 rtl::Reference Access  parent(getParentAccess());
 if (parent.is()) {
 rtl::Reference Node  node(getNode());
-if (node-getTemplateName().getLength() != 0) {
+if (! node-getTemplateName().isEmpty()) {
 rtl::Reference ChildAccess  other(
 parent-getChild(aName));
 if (other.get() == this) {
@@ -1817,7 +1817,7 @@ void Access::initBroadcasterAndChanges(
 case Node::KIND_GROUP:
 case Node::KIND_SET:
 if (i-second.children.empty()) {
-if (child-getNode()-getTemplateName().getLength() != 0) {
+if (!child-getNode()-getTemplateName().isEmpty()) {
 for (ContainerListeners::iterator j(
  containerListeners_.begin());
  j != containerListeners_.end(); ++j)
@@ -2054,7 +2054,7 @@ rtl::Reference ChildAccess  Access::getUnmodifiedChild(
 rtl::Reference ChildAccess  Access::getSubChild(rtl::OUString const  path) {
 sal_Int32 i = 0;
 // For backwards compatibility, allow absolute paths where meaningful:
-if (path.getLength() != 0  path[0] == '/') {
+if (!path.isEmpty()  path[0] == '/') {
 ++i;
 if (!getRootAccess().is()) {
 return rtl::Reference ChildAccess ();
@@ -2101,13 +2101,13 @@ rtl::Reference ChildAccess  
Access::getSubChild(rtl::OUString const  path) {
 switch (p-kind()) {
 case Node::KIND_LOCALIZED_PROPERTY:
 if (!Components::allLocales(getRootAccess()-getLocale()) ||
-templateName.getLength() != 0)
+!templateName.isEmpty())
 {
 return rtl::Reference ChildAccess ();
 }
 break;
 case Node::KIND_SET:
-if (templateName.getLength() != 0 
+if (!templateName.isEmpty() 
 !dynamic_cast SetNode * (p.get())-isValidTemplate(
 templateName))
 {
@@ -2211,7 +2211,7 @@ void Access::checkFinalized() {
 }
 
 void

[Libreoffice-commits] .: comphelper/source

2011-12-13 Thread Ivan Timofeev
 comphelper/source/container/embeddedobjectcontainer.cxx   |   30 
+++
 comphelper/source/eventattachermgr/eventattachermgr.cxx   |2 
 comphelper/source/misc/docpasswordhelper.cxx  |   16 +--
 comphelper/source/misc/documentinfo.cxx   |   18 ++--
 comphelper/source/misc/locale.cxx |4 
 comphelper/source/misc/logging.cxx|4 
 comphelper/source/misc/mediadescriptor.cxx|4 
 comphelper/source/misc/mimeconfighelper.cxx   |   42 
+-
 comphelper/source/misc/numbers.cxx|2 
 comphelper/source/misc/regpathhelper.cxx  |8 -
 comphelper/source/misc/sequenceashashmap.cxx  |4 
 comphelper/source/misc/storagehelper.cxx  |2 
 comphelper/source/misc/string.cxx |2 
 comphelper/source/officeinstdir/officeinstallationdirectories.cxx |   10 +-
 comphelper/source/property/genericpropertyset.cxx |4 
 comphelper/source/property/propagg.cxx|2 
 comphelper/source/property/property.cxx   |2 
 comphelper/source/property/propertybag.cxx|2 
 comphelper/source/xml/ofopxmlhelper.cxx   |   16 +--
 19 files changed, 87 insertions(+), 87 deletions(-)

New commits:
commit 00a67c0f9056729695e6004707d64b448756fa6f
Author: Olivier Hallot olivier.hal...@alta.org.br
Date:   Mon Dec 12 23:01:55 2011 -0200

Fix for fdo43460 Part VII getLength() to isEmpty()

Part VII
Module
comphelper

diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx 
b/comphelper/source/container/embeddedobjectcontainer.cxx
index 30edd51..8300443 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -324,7 +324,7 @@ uno::Reference  embed::XEmbeddedObject  
EmbeddedObjectContainer::GetEmbeddedOb
 {
 RTL_LOGFILE_CONTEXT( aLog, comphelper (mv76033) 
comphelper::EmbeddedObjectContainer::GetEmbeddedObject );
 
-OSL_ENSURE( rName.getLength(), Empty object name!);
+OSL_ENSURE( !rName.isEmpty(), Empty object name!);
 
 uno::Reference  embed::XEmbeddedObject  xObj;
 EmbeddedObjectContainerNameMap::iterator aIt = 
pImpl-maObjectContainer.find( rName );
@@ -402,7 +402,7 @@ uno::Reference  embed::XEmbeddedObject  
EmbeddedObjectContainer::CreateEmbedde
 {
 RTL_LOGFILE_CONTEXT( aLog, comphelper (mv76033) 
comphelper::EmbeddedObjectContainer::CreateEmbeddedObject );
 
-if ( !rNewName.getLength() )
+if ( rNewName.isEmpty() )
 rNewName = CreateUniqueObjectName();
 
 OSL_ENSURE( !HasEmbeddedObject(rNewName), Object to create already 
exists!);
@@ -444,7 +444,7 @@ void EmbeddedObjectContainer::AddEmbeddedObject( const 
::com::sun::star::uno::Re
 RTL_LOGFILE_CONTEXT( aLog, comphelper (mv76033) 
comphelper::EmbeddedObjectContainer::AddEmbeddedObject );
 
 #if OSL_DEBUG_LEVEL  1
-OSL_ENSURE( rName.getLength(), Added object doesn't have a name!);
+OSL_ENSURE( !rName.isEmpty(), Added object doesn't have a name!);
 uno::Reference  container::XNameAccess  xAccess( pImpl-mxStorage, 
uno::UNO_QUERY );
 uno::Reference  embed::XEmbedPersist  xEmb( xObj, uno::UNO_QUERY );
 uno::Reference  embed::XLinkageSupport  xLink( xEmb, uno::UNO_QUERY );
@@ -508,7 +508,7 @@ sal_Bool EmbeddedObjectContainer::StoreEmbeddedObject( 
const uno::Reference  em
 RTL_LOGFILE_CONTEXT( aLog, comphelper (mv76033) 
comphelper::EmbeddedObjectContainer::StoreEmbeddedObject );
 
 uno::Reference  embed::XEmbedPersist  xPersist( xObj, uno::UNO_QUERY );
-if ( !rName.getLength() )
+if ( rName.isEmpty() )
 rName = CreateUniqueObjectName();
 
 #if OSL_DEBUG_LEVEL  1
@@ -561,7 +561,7 @@ uno::Reference  embed::XEmbeddedObject  
EmbeddedObjectContainer::InsertEmbedde
 {
 RTL_LOGFILE_CONTEXT( aLog, comphelper (mv76033) 
comphelper::EmbeddedObjectContainer::InsertEmbeddedObject( InputStream ) );
 
-if ( !rNewName.getLength() )
+if ( rNewName.isEmpty() )
 rNewName = CreateUniqueObjectName();
 
 // store it into the container storage
@@ -623,7 +623,7 @@ uno::Reference  embed::XEmbeddedObject  
EmbeddedObjectContainer::InsertEmbedde
 {
 RTL_LOGFILE_CONTEXT( aLog, comphelper (mv76033) 
comphelper::EmbeddedObjectContainer::InsertEmbeddedObject( MediaDescriptor ) );
 
-if ( !rNewName.getLength() )
+if ( rNewName.isEmpty() )
 rNewName = CreateUniqueObjectName();
 
 uno::Reference  embed::XEmbeddedObject  xObj;
@@ -658,7 +658,7 @@ uno::Reference  embed::XEmbeddedObject  
EmbeddedObjectContainer::InsertEmbedde
 {
 RTL_LOGFILE_CONTEXT( aLog, comphelper (mv76033) 
comphelper::EmbeddedObjectContainer::InsertEmbeddedLink );
 
-

[Libreoffice-commits] .: basic/source binaryurp/source bridges/source

2011-12-12 Thread Ivan Timofeev
 basic/source/uno/scriptcont.cxx |4 ++--
 binaryurp/source/bridge.cxx |8 
 binaryurp/source/bridgefactory.cxx  |4 ++--
 binaryurp/source/reader.cxx |4 ++--
 binaryurp/source/unmarshal.cxx  |4 ++--
 binaryurp/source/writer.cxx |2 +-
 bridges/source/cpp_uno/shared/vtablefactory.cxx |4 ++--
 bridges/source/jni_uno/jni_data.cxx |2 +-
 8 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 9201704ede70498a850bee6d15f0340d58f3889c
Author: Olivier Hallot olivier.hal...@alta.org.br
Date:   Sat Dec 10 17:29:21 2011 -0200

Fix for fdo43460 Part IV getLength to isEmpty

Part IV
Module
basic (small fix per demand from Ivan Timofeev)
binaryurp
bridges

diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index c6fbc5d..9dd01a1 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -473,8 +473,8 @@ void SAL_CALL 
SfxScriptLibraryContainer::changeLibraryPassword( const OUString
 if( OldPassword == NewPassword )
 return;
 
-sal_Bool bOldPassword = ( !OldPassword.isEmpty() );
-sal_Bool bNewPassword = ( !NewPassword.isEmpty() );
+sal_Bool bOldPassword = !OldPassword.isEmpty();
+sal_Bool bNewPassword = !NewPassword.isEmpty();
 sal_Bool bStorage = mxStorage.is()  !pImplLib-mbLink;
 
 if( pImplLib-mbReadOnly || (bOldPassword  
!pImplLib-mbPasswordProtected) )
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index b491a2a..389284d 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -345,7 +345,7 @@ css::uno::UnoInterfaceReference 
Bridge::registerIncomingInterface(
 rtl::OUString const  oid, css::uno::TypeDescription const  type)
 {
 assert(type.is());
-if (oid.getLength() == 0) {
+if (oid.isEmpty()) {
 return css::uno::UnoInterfaceReference();
 }
 css::uno::UnoInterfaceReference obj(findStub(oid, type));
@@ -427,7 +427,7 @@ rtl::OUString Bridge::registerOutgoingInterface(
 css::uno::UnoInterfaceReference Bridge::findStub(
 rtl::OUString const  oid, css::uno::TypeDescription const  type)
 {
-assert(oid.getLength() != 0  type.is());
+assert(!oid.isEmpty()  type.is());
 osl::MutexGuard g(mutex_);
 Stubs::iterator i(stubs_.find(oid));
 if (i != stubs_.end()) {
@@ -449,7 +449,7 @@ css::uno::UnoInterfaceReference Bridge::findStub(
 void Bridge::releaseStub(
 rtl::OUString const  oid, css::uno::TypeDescription const  type)
 {
-assert(oid.getLength() != 0  type.is());
+assert(!oid.isEmpty()  type.is());
 css::uno::UnoInterfaceReference obj;
 bool unused;
 {
@@ -814,7 +814,7 @@ Bridge::~Bridge() {
 css::uno::Reference css::uno::XInterface  Bridge::getInstance(
 rtl::OUString const  sInstanceName) throw (css::uno::RuntimeException)
 {
-if (sInstanceName.getLength() == 0) {
+if (sInstanceName.isEmpty()) {
 throw css::uno::RuntimeException(
 rtl::OUString(
 RTL_CONSTASCII_USTRINGPARAM(
diff --git a/binaryurp/source/bridgefactory.cxx 
b/binaryurp/source/bridgefactory.cxx
index 5c91055..0edbaa0 100644
--- a/binaryurp/source/bridgefactory.cxx
+++ b/binaryurp/source/bridgefactory.cxx
@@ -80,7 +80,7 @@ void BridgeFactory::removeBridge(
 assert(bridge.is());
 rtl::OUString n(bridge-getName());
 osl::MutexGuard g(*this);
-if (n.getLength() == 0) {
+if (n.isEmpty()) {
 BridgeList::iterator i(
 std::find(unnamed_.begin(), unnamed_.end(), bridge));
 if (i != unnamed_.end()) {
@@ -154,7 +154,7 @@ css::uno::Reference css::bridge::XBridge  
BridgeFactory::createBridge(
 static_cast cppu::OWeakObject * (this), -1);
 }
 b.set(new Bridge(this, sName, aConnection, anInstanceProvider));
-if (sName.getLength() == 0) {
+if (sName.isEmpty()) {
 unnamed_.push_back(
 css::uno::Reference css::bridge::XBridge (b.get()));
 } else {
diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index c052fad..e6b6f06 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -215,7 +215,7 @@ void Reader::readMessage(Unmarshal  unmarshal) {
 rtl::OUString oid;
 if (newOid) {
 oid = unmarshal.readOid();
-if (oid.getLength() == 0) {
+if (oid.isEmpty()) {
 throw css::io::IOException(
 rtl::OUString(
 RTL_CONSTASCII_USTRINGPARAM(
@@ -224,7 +224,7 @@ void Reader::readMessage(Unmarshal  unmarshal) {
 }
 lastOid_ = oid;
 } else {
-if (lastOid_.getLength() == 0) {
+if (lastOid_.isEmpty()) {
 throw css::uno::RuntimeException(
 rtl::OUString(
 RTL_CONSTASCII_USTRINGPARAM(
diff --git a/binaryurp

[Libreoffice-commits] .: codemaker/source

2011-12-12 Thread Ivan Timofeev
 codemaker/source/codemaker/global.cxx|8 ++---
 codemaker/source/codemaker/unotype.cxx   |2 -
 codemaker/source/cppumaker/cppumaker.cxx |2 -
 codemaker/source/cppumaker/cpputype.cxx  |   46 +++
 codemaker/source/cppumaker/includes.cxx  |2 -
 codemaker/source/javamaker/classfile.cxx |8 ++---
 codemaker/source/javamaker/javamaker.cxx |2 -
 7 files changed, 35 insertions(+), 35 deletions(-)

New commits:
commit fd866ac8f184c0910883963c9c12b45a239a9227
Author: Olivier Hallot olivier.hal...@alta.org.br
Date:   Mon Dec 12 18:19:01 2011 -0200

Fix for fdo43460 Part VI getLength() to isEmpty()

Part VI
Module
codemaker

diff --git a/codemaker/source/codemaker/global.cxx 
b/codemaker/source/codemaker/global.cxx
index 36d06f0..af87ee8 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -116,7 +116,7 @@ OString createFileNameFromType( const OString destination,
 fileNameBuf.append(/, 1);
 
 OString tmpStr(type);
-if (prefix.getLength()  0)
+if (!prefix.isEmpty())
 {
 tmpStr = type.replaceAt(type.lastIndexOf('/')+1, 0, prefix);
 }
@@ -298,7 +298,7 @@ FileStream::FileStream()
 FileStream::FileStream(const OString name, FileAccessMode mode)
 : m_file(NULL)
 {
-if ( name.getLength()  0 )
+if ( !name.isEmpty() )
 {
 OUString sUrl(convertToFileUrl(name));
 #ifdef SAL_UNX
@@ -338,7 +338,7 @@ void FileStream::createTempFile(const OString sPath)
 OUString sTmpPath;
 OUString sTmpName;
 
-if (sPath.getLength()  0)
+if (!sPath.isEmpty())
 sTmp = sPath;
 
 sTmpPath = convertToFileUrl(sTmp);
@@ -364,7 +364,7 @@ void FileStream::createTempFile(const OString sPath)
 
 void FileStream::open(const OString name, FileAccessMode mode)
 {
-if ( name.getLength()  0 )
+if ( !name.isEmpty() )
 {
 oslFileError ret =  osl_File_E_None;
 if ((ret = osl_openFile(convertToFileUrl(name).pData, m_file, 
checkAccessMode(mode))) == osl_File_E_None)
diff --git a/codemaker/source/codemaker/unotype.cxx 
b/codemaker/source/codemaker/unotype.cxx
index 0432a29..0ae8e43 100644
--- a/codemaker/source/codemaker/unotype.cxx
+++ b/codemaker/source/codemaker/unotype.cxx
@@ -56,7 +56,7 @@ codemaker::UnoType::Sort 
codemaker::UnoType::getSort(rtl::OString const  type)
 }
 
 bool codemaker::UnoType::isSequenceType(rtl::OString const  type) {
-return type.getLength()  0  type[0] == '[';
+return !type.isEmpty()  type[0] == '[';
 }
 
 rtl::OString codemaker::UnoType::decompose(
diff --git a/codemaker/source/cppumaker/cppumaker.cxx 
b/codemaker/source/cppumaker/cppumaker.cxx
index e6cee20..0b9d8c0 100644
--- a/codemaker/source/cppumaker/cppumaker.cxx
+++ b/codemaker/source/cppumaker/cppumaker.cxx
@@ -202,7 +202,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 } else
 {
 tmpName = typeName.copy(0, 
typeName.lastIndexOf('.')).replace('.', '/');
-if (tmpName.getLength() == 0)
+if (tmpName.isEmpty())
 tmpName = /;
 else
 tmpName.replace('.', '/');
diff --git a/codemaker/source/cppumaker/cpputype.cxx 
b/codemaker/source/cppumaker/cpputype.cxx
index f2007e5..3a436ca 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -253,7 +253,7 @@ sal_Bool CppuType::dumpFile(CppuOptions* pOptions,
 }
 
 OString sFileName = createFileNameFromType(sOutPath, sName, sExtension);
-if (sFileName.getLength() == 0)
+if (sFileName.isEmpty())
 return sal_False;
 
 sal_Bool bFileExists = fileExists( sFileName );
@@ -539,7 +539,7 @@ void CppuType::dumpNormalGetCppuType(FileStream o)
 m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
 }
 sal_Bool bIsBaseException = sal_False;
-if (superType.getLength()  0)
+if (!superType.isEmpty())
 {
 if ( superType.equals(com/sun/star/uno/Exception) )
 {
@@ -599,7 +599,7 @@ void CppuType::dumpNormalGetCppuType(FileStream o)
 
 o  indent()  typelib_static_compound_type_init( the_type, 
getTypeClass(m_typeName, sal_True)  , \  
m_typeName.replace('/', '.')  \, ;
-if ( superType.getLength()  0 || bIsBaseException )
+if ( !superType.isEmpty() || bIsBaseException )
 {
 if ( bIsBaseException )
 {
@@ -658,7 +658,7 @@ void CppuType::dumpComprehensiveGetCppuType(FileStream o)
 superType = rtl::OUStringToOString(
 m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
 }
-if (superType.getLength()  0) {
+if (!superType.isEmpty()) {
 o  indent()
const ::com::sun::star::uno::Type rSuperType = ::cppu::UnoType 
;
 dumpType(o, superType, false, false, false, true);
@@ -712,7 +712,7 @@ void 

[Libreoffice-commits] .: basctl/source

2011-12-10 Thread Ivan Timofeev
 basctl/source/basicide/basicrenderable.cxx |4 ++--
 basctl/source/basicide/baside2.cxx |2 +-
 basctl/source/basicide/bastype2.cxx|2 +-
 basctl/source/basicide/localizationmgr.cxx |6 +++---
 basctl/source/basicide/moduldl2.cxx|2 +-
 basctl/source/basicide/scriptdocument.cxx  |6 +++---
 basctl/source/dlged/dlgedobj.cxx   |2 +-
 7 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 1688a9d9235dd2ee4f3b9497308efd41f7a3fb6f
Author: Olivier Hallot olivier.hal...@alta.org.br
Date:   Fri Dec 9 22:23:22 2011 -0200

Fix for fdo43460 Part II getLength to isEmpty

Part II
Module
basctl

diff --git a/basctl/source/basicide/basicrenderable.cxx 
b/basctl/source/basicide/basicrenderable.cxx
index 1da202f..d2de323 100644
--- a/basctl/source/basicide/basicrenderable.cxx
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -120,7 +120,7 @@ sal_Int32 SAL_CALL BasicRenderable::getRendererCount (
 if( nContent == 1 )
 {
 rtl::OUString aPageRange( getStringValue( PageRange ) );
-if( aPageRange.getLength() )
+if( !aPageRange.isEmpty() )
 {
 StringRangeEnumerator aRangeEnum( aPageRange, 0, nCount-1 
);
 sal_Int32 nSelCount = aRangeEnum.size();
@@ -179,7 +179,7 @@ void SAL_CALL BasicRenderable::render (
 if( nContent == 1 )
 {
 rtl::OUString aPageRange( getStringValue( PageRange ) );
-if( aPageRange.getLength() )
+if( !aPageRange.isEmpty() )
 {
 sal_Int32 nPageCount = mpWindow-countPages( pPrinter );
 StringRangeEnumerator aRangeEnum( aPageRange, 0, 
nPageCount-1 );
diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index d1a1589..cf245ca 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -341,7 +341,7 @@ sal_Bool ModulWindow::BasicExecute()
 if ( !pMethod )
 {
 // If not in a method then prompt the user
-return ( BasicIDE::ChooseMacro( uno::Reference frame::XModel 
(), sal_False, rtl::OUString() ).getLength()  0 ) ? sal_True : sal_False;
+return ( !BasicIDE::ChooseMacro( uno::Reference frame::XModel 
(), sal_False, rtl::OUString() ).isEmpty() );
 }
 if ( pMethod )
 {
diff --git a/basctl/source/basicide/bastype2.cxx 
b/basctl/source/basicide/bastype2.cxx
index c3ce38a..abacd01 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -773,7 +773,7 @@ void BasicTreeListBox::GetRootEntryBitmaps( const 
ScriptDocument rDocument, Ima
 }
 }
 
-if ( sFactoryURL.getLength() )
+if ( !sFactoryURL.isEmpty() )
 {
 rImage = SvFileInformationManager::GetFileImage( INetURLObject( 
sFactoryURL ), sal_False );
 }
diff --git a/basctl/source/basicide/localizationmgr.cxx 
b/basctl/source/basicide/localizationmgr.cxx
index cf034d8..59f2316 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -185,7 +185,7 @@ void 
LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou
 aPureIdStr += aDot;
 aPureIdStr += aDialogName;
 aPureIdStr += aDot;
-if( aCtrlName.getLength() )
+if( !aCtrlName.isEmpty() )
 {
 aPureIdStr += aCtrlName;
 aPureIdStr += aDot;
@@ -245,7 +245,7 @@ sal_Int32 
LocalizationMgr::implHandleControlResourceProperties
 // Replace string by id, add id+string to StringResource
 if( eMode == SET_IDS )
 {
-bool bEscAlreadyExisting = (aPropStr.getLength()  
aPropStr.getStr()[0] == '' );
+bool bEscAlreadyExisting = (!aPropStr.isEmpty()  
aPropStr.getStr()[0] == '' );
 if( bEscAlreadyExisting )
 continue;
 
@@ -435,7 +435,7 @@ sal_Int32 
LocalizationMgr::implHandleControlResourceProperties
 for ( i = 0; i  nPropStringCount; ++i )
 {
 ::rtl::OUString aPropStr = pPropStrings[i];
-bool bEscAlreadyExisting = (aPropStr.getLength() 
 aPropStr.getStr()[0] == '' );
+bool bEscAlreadyExisting = (!aPropStr.isEmpty()  
aPropStr.getStr()[0] == '' );
 if( bEscAlreadyExisting )
 {
 pIdStrings[i] = aPropStr;
diff --git a/basctl/source/basicide/moduldl2.cxx 
b/basctl/source/basicide/moduldl2.cxx
index ebc662c..c8960a4 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1332,7 +1332,7 @@ void 

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sd/source

2011-12-09 Thread Ivan Timofeev
 sd/source/ui/dlg/navigatr.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 8c763915fbb11a261dbbf64280cabeefb7ca6c6a
Author: Ivan Timofeev timofeev@gmail.com
Date:   Fri Dec 9 21:23:50 2011 +0400

fdo#39528: do not lose height of tree list box in Navigator

diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index bb5bf26..3fb63a9 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -555,10 +555,11 @@ void SdNavigatorWin::Resize()
 maToolbox.SetOutputSizePixel( aObjSize );
 
 // Umgroessern der TreeLB
-aObjSize = maTlbObjects.Control::GetOutputSizePixel();
+aObjSize = maTlbObjects.GetSizePixel();
 aObjSize.Width() += aDiffSize.Width();
-aObjSize.Height() += aDiffSize.Height();
-maTlbObjects.SetOutputSizePixel( aObjSize );
+aObjSize.Height() = maLbDocs.GetPosPixel().Y() + aDiffSize.Height() -
+maTlbObjects.GetPosPixel().Y() - 4;
+maTlbObjects.SetSizePixel( aObjSize );
 
 Point aPt( 0, aDiffSize.Height() );
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2011-12-08 Thread Ivan Timofeev
 sw/source/core/crsr/callnk.cxx |2 +-
 sw/source/core/crsr/crsrsh.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit dc61ebdc93a777f4f41c1ae837bdb6098ecffcce
Author: Ivan Timofeev timofeev@gmail.com
Date:   Thu Dec 8 22:55:27 2011 +0400

fdo#42147: fix crash

it is not valid to use (type  ND_TEXTNODE) before casting to SwTxtNode,
type of SwCntntNode has the ND_TEXTNODE bit as well, but SwCntntNode is not
derived from SwTxtNode.

diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 66e7f45..a6373da 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -70,7 +70,7 @@ SwCallLink::SwCallLink( SwCrsrShell  rSh )
 nNdTyp = rNd.GetNodeType();
 bHasSelection = ( *pCrsr-GetPoint() != *pCrsr-GetMark() );
 
-if( ND_TEXTNODE  nNdTyp )
+if( rNd.IsTxtNode() )
 nLeftFrmPos = SwCallLink::getLayoutFrm( rShell.GetLayout(), 
(SwTxtNode)rNd, nCntnt,
 !rShell.ActionPend() );
 else
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index ca32947..5617665 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -223,7 +223,7 @@ void SwCrsrShell::StartAction()
 nAktCntnt = pCurCrsr-GetPoint()-nContent.GetIndex();
 nAktNdTyp = rNd.GetNodeType();
 bAktSelection = *pCurCrsr-GetPoint() != *pCurCrsr-GetMark();
-if( ND_TEXTNODE  nAktNdTyp )
+if( rNd.IsTxtNode() )
 nLeftFrmPos = SwCallLink::getLayoutFrm( GetLayout(), 
(SwTxtNode)rNd, nAktCntnt, sal_True );
 else
 nLeftFrmPos = 0;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 4 commits - starmath/inc starmath/source

2011-12-04 Thread Ivan Timofeev
 starmath/inc/view.hxx  |1 
 starmath/source/cursor.cxx |   23 +++---
 starmath/source/view.cxx   |   47 ++---
 3 files changed, 41 insertions(+), 30 deletions(-)

New commits:
commit 68c1f757962a8f2789821ff636bc397d1edd0051
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sun Dec 4 15:11:23 2011 +0400

visual formula editor: implement selection by mouse

diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index d716e72..5781e26 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -103,6 +103,7 @@ public:
 
 // Window
 virtual voidMouseButtonDown(const MouseEvent rMEvt);
+virtual voidMouseMove(const MouseEvent rMEvt);
 virtual voidGetFocus();
 virtual voidLoseFocus();
 
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index c9a0ffd..4dbc8a8 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -182,9 +182,7 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent 
rMEvt)
 return;
 
 if (IsInlineEditEnabled()) {
-// if it was clicked inside the formula then get the appropriate 
node
-if (pTree-OrientedDist(aPos) = 0)
-pViewShell-GetDoc()-GetCursor().MoveTo(this, aPos, 
!rMEvt.IsShift());
+pViewShell-GetDoc()-GetCursor().MoveTo(this, aPos, 
!rMEvt.IsShift());
 return;
 }
 const SmNode *pNode = 0;
@@ -214,6 +212,22 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent 
rMEvt)
 }
 }
 
+void SmGraphicWindow::MouseMove(const MouseEvent rMEvt)
+{
+ScrollableWindow::MouseMove(rMEvt);
+
+if (rMEvt.IsLeft()  IsInlineEditEnabled())
+{
+Point aPos(PixelToLogic(rMEvt.GetPosPixel()) - GetFormulaDrawPos());
+pViewShell-GetDoc()-GetCursor().MoveTo(this, aPos, false);
+
+CaretBlinkStop();
+SetIsCursorVisible(true);
+CaretBlinkStart();
+RepaintViewShellDoc();
+}
+}
+
 bool SmGraphicWindow::IsInlineEditEnabled() const
 {
 return pViewShell-IsInlineEditEnabled();
commit 558b5ea32a99654dcb63526f107726f7aec4747f
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sun Dec 4 15:05:46 2011 +0400

visual formula editor: copy/cut/paste for any keyboard layout

diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 66626a0..c9a0ffd 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -421,8 +421,17 @@ void SmGraphicWindow::KeyInput(const KeyEvent rKEvt)
 ScrollableWindow::KeyInput(rKEvt);
 return;
 }
-sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
+
 SmCursor rCursor = pViewShell-GetDoc()-GetCursor();
+KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
+if (eFunc == KEYFUNC_COPY)
+rCursor.Copy();
+else if (eFunc == KEYFUNC_CUT)
+rCursor.Cut();
+else if (eFunc == KEYFUNC_PASTE)
+rCursor.Paste();
+else {
+sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
 switch(nCode)
 {
 case KEY_LEFT:
@@ -491,15 +500,6 @@ void SmGraphicWindow::KeyInput(const KeyEvent rKEvt)
 case KEY_EQUAL:
 rCursor.InsertElement(EqualElement);
 break;
-case KEY_COPY:
-rCursor.Copy();
-break;
-case KEY_CUT:
-rCursor.Cut();
-break;
-case KEY_PASTE:
-rCursor.Paste();
-break;
 default:
 {
 sal_Unicode code = rKEvt.GetCharCode();
@@ -507,12 +507,6 @@ void SmGraphicWindow::KeyInput(const KeyEvent rKEvt)
 
 if(code == ' ') {
 rCursor.InsertElement(BlankElement);
-}else if(code == 'c'  rKEvt.GetKeyCode().IsMod1()) {
-rCursor.Copy();
-}else if(code == 'x'  rKEvt.GetKeyCode().IsMod1()) {
-rCursor.Cut();
-}else if(code == 'v'  rKEvt.GetKeyCode().IsMod1()) {
-rCursor.Paste();
 }else if(code == '^') {
 rCursor.InsertSubSup(RSUP);
 }else if(code == '(') {
@@ -539,6 +533,7 @@ void SmGraphicWindow::KeyInput(const KeyEvent rKEvt)
 }
 }
 }
+}
 CaretBlinkStop();
 CaretBlinkStart();
 SetIsCursorVisible(true);
commit 5a227745095d3a700ca01e062264aa5afd080c8a
Author: Ivan Timofeev timofeev@gmail.com
Date:   Fri Dec 2 22:07:34 2011 +0400

visual formula editor: place cursor on numerator when creating empty 
fraction

diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index b7f518f..c2d7f4f 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -977,7 +977,8 @@ void SmCursor::InsertFraction() {
 PatchLineList(pLineList, it);
 
 //Finish editing
-FinishEdit(pLineList, pLineParent, nParentIndex, SmCaretPos(pDenom, 1));
+SmNode *pSelectedNode = bEmptyFraction ? pNum : pDenom;
+FinishEdit(pLineList, pLineParent

[Libreoffice-commits] .: basctl/source

2011-12-04 Thread Ivan Timofeev
 basctl/source/basicide/breakpoint.hxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit aa948e1c25dfa07f6bc47d1077a74ec61982b9c4
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Dec 5 08:31:45 2011 +0400

add missing include for size_t

diff --git a/basctl/source/basicide/breakpoint.hxx 
b/basctl/source/basicide/breakpoint.hxx
index 16cdfa3..a989144 100644
--- a/basctl/source/basicide/breakpoint.hxx
+++ b/basctl/source/basicide/breakpoint.hxx
@@ -28,6 +28,7 @@
 #ifndef _BREAKPOINT_HXX
 #define _BREAKPOINT_HXX
 
+#include cstddef
 #include vector
 
 class SbModule;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: starmath/source

2011-12-02 Thread Ivan Timofeev
 starmath/source/cursor.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2292904f85ab6c360c30914e8621e516f8ae1388
Author: Ivan Timofeev timofeev@gmail.com
Date:   Fri Dec 2 17:21:15 2011 +0400

visual formula editor: fix insertion of -

diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index 1b66fa1..f1eeb0d 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -1040,7 +1040,7 @@ void SmCursor::InsertElement(SmFormulaElement element){
 SmToken token;
 token.eType = TMINUS;
 token.cMathChar = MS_MINUS;
-token.nGroup = MS_PLUS;
+token.nGroup = TGUNOPER | TGSUM;
 token.nLevel = 5;
 token.aText.AssignAscii(-);
 pNewNode = new SmMathSymbolNode(token);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: starmath/source

2011-12-02 Thread Ivan Timofeev
 starmath/source/cursor.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit c1baeb25ad3a5d6afb59f9329a634f742a7a9e5a
Author: Ivan Timofeev timofeev@gmail.com
Date:   Fri Dec 2 20:54:38 2011 +0400

visual formula editor: fix insertion of symbols from catalog

diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index f1eeb0d..2f50532 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -1113,7 +1113,6 @@ void SmCursor::InsertSpecial(XubString aString) {
 Delete();
 
 aString = comphelper::string::strip(aString, ' ');
-aString = comphelper::string::stripStart(aString, '%');
 
 //Create instance of special node
 SmToken token;
@@ -1121,7 +1120,7 @@ void SmCursor::InsertSpecial(XubString aString) {
 token.cMathChar = '\0';
 token.nGroup = 0;
 token.nLevel = 5;
-token.aText = aString; //Don't know if leading % should  be removed
+token.aText = aString;
 SmSpecialNode* pSpecial = new SmSpecialNode(token);
 
 //Prepare the special node
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/Library_sw.mk sw/source

2011-11-29 Thread Ivan Timofeev
 sw/Library_sw.mk |3 
 sw/source/core/inc/sortedobjs.hxx|7 
 sw/source/core/inc/sortedobjsimpl.hxx|   64 --
 sw/source/core/layout/sortedobjs.cxx |  240 +++-
 sw/source/core/layout/sortedobjsimpl.cxx |  302 ---
 5 files changed, 235 insertions(+), 381 deletions(-)

New commits:
commit 1e19c59d51b2184bbc2f7b794fe411946553548f
Author: Ivan Timofeev timofeev@gmail.com
Date:   Tue Nov 29 21:43:38 2011 +0400

merge SwSortedObjsImpl into SwSortedObjs

diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index fe1da1c..40e70f3 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -2,7 +2,7 @@
 #*
 #
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-# 
+#
 # Copyright 2000, 2011 Oracle and/or its affiliates.
 #
 # OpenOffice.org - a multi-platform office productivity suite
@@ -315,7 +315,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
 sw/source/core/layout/sectfrm \
 sw/source/core/layout/softpagebreak \
 sw/source/core/layout/sortedobjs \
-sw/source/core/layout/sortedobjsimpl \
 sw/source/core/layout/ssfrm \
 sw/source/core/layout/swselectionlist \
 sw/source/core/layout/tabfrm \
diff --git a/sw/source/core/inc/sortedobjs.hxx 
b/sw/source/core/inc/sortedobjs.hxx
index 720ff08..afb770a 100644
--- a/sw/source/core/inc/sortedobjs.hxx
+++ b/sw/source/core/inc/sortedobjs.hxx
@@ -27,10 +27,11 @@
  /
 #ifndef _SORTEDOBJS_HXX
 #define _SORTEDOBJS_HXX
-class SwSortedObjsImpl;
-class SwAnchoredObject;
 
 #include sal/types.h
+#include vector
+
+class SwAnchoredObject;
 
 /** class for collecting anchored objects
 
@@ -56,7 +57,7 @@ class SwAnchoredObject;
 class SwSortedObjs
 {
 private:
-SwSortedObjsImpl* mpImpl;
+std::vector SwAnchoredObject*  maSortedObjLst;
 
 public:
 SwSortedObjs();
diff --git a/sw/source/core/inc/sortedobjsimpl.hxx 
b/sw/source/core/inc/sortedobjsimpl.hxx
deleted file mode 100644
index 1b23cd1..000
--- a/sw/source/core/inc/sortedobjsimpl.hxx
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * http://www.openoffice.org/license.html
- * for a copy of the LGPLv3 License.
- *
- /
-#ifndef _SORTEDOBJSIMPL_HXX
-#define _SORTEDOBJSIMPL_HXX
-
-#include vector
-#include sal/types.h
-#include fmtanchr.hxx
-
-class SwAnchoredObject;
-class SwTxtFrm;
-
-class SwSortedObjsImpl
-{
-private:
-std::vector SwAnchoredObject*  maSortedObjLst;
-
-public:
-SwSortedObjsImpl();
-~SwSortedObjsImpl();
-
-sal_uInt32 Count() const;
-
-SwAnchoredObject* operator[]( sal_uInt32 _nIndex );
-
-bool Insert( SwAnchoredObject _rAnchoredObj );
-
-bool Remove( SwAnchoredObject _rAnchoredObj );
-
-bool Contains( const SwAnchoredObject _rAnchoredObj ) const;
-
-bool Update( SwAnchoredObject _rAnchoredObj );
-
-sal_uInt32 ListPosOf( const SwAnchoredObject _rAnchoredObj ) const;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/sortedobjs.cxx 
b/sw/source/core/layout/sortedobjs.cxx
index c5eb79f..3d116ca 100644
--- a/sw/source/core/layout/sortedobjs.cxx
+++ b/sw/source/core/layout/sortedobjs.cxx
@@ -27,51 +27,271 @@
  /
 
 #include sortedobjs.hxx
-#include sortedobjsimpl.hxx
+
+#include algorithm
+#include anchoredobject.hxx
+#include fmtanchr.hxx
+#include fmtsrnd.hxx
+#include fmtwrapinfluenceonobjpos.hxx
+#include frmfmt.hxx
+#include pam.hxx
+#include svx/svdobj.hxx
+#include IDocumentDrawModelAccess.hxx
+
+
+using namespace ::com::sun::star;
+
 
 SwSortedObjs

[Libreoffice-commits] .: sw/source

2011-11-24 Thread Ivan Timofeev
 sw/source/core/inc/frame.hxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 2ebe5c9e8adafd51285a3e38e109631ed8f9cf3d
Author: Ivan Timofeev timofeev@gmail.com
Date:   Thu Nov 24 18:58:42 2011 +0400

remove private copy ctor, base class SwClient is noncopyable

diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index d331a8b..7e4a389 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -354,8 +354,6 @@ class SwFrm: public SwClient, public SfxBroadcaster
 SwFrm* _GetIndNext();
 void SetDirFlags( sal_Bool bVert );
 
-SwFrm( SwFrm  );   //Kopieren ist nicht erlaubt.
-
 const SwLayoutFrm* ImplGetNextLayoutLeaf( bool bFwd ) const;
 
 protected:
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - sw/source vcl/source

2011-11-18 Thread Ivan Timofeev
 sw/source/ui/inc/pview.hxx|1 +
 sw/source/ui/uno/unotxdoc.cxx |   16 +---
 vcl/source/gdi/print3.cxx |5 -
 3 files changed, 14 insertions(+), 8 deletions(-)

New commits:
commit ce888a74614aa83e17a34e557f416acb262419a1
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Nov 16 15:47:51 2011 +0400

fix fdo#42178: crash when printing from Page Preview

diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx
index e9902fb..329ba5e 100644
--- a/sw/source/ui/inc/pview.hxx
+++ b/sw/source/ui/inc/pview.hxx
@@ -273,6 +273,7 @@ public:
 voidShowVScrollbar(sal_Bool bShow);
 
 sal_uInt16  GetPageCount() const{ return mnPageCount; }
+sal_uInt16  GetSelectedPage() const {return aViewWin.SelectedPage();}
 
 sal_BoolHandleWheelCommands( const CommandEvent );
 
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index c849fa7..4a1ef26 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -187,10 +187,20 @@ SwPrintUIOptions * lcl_GetPrintUIOptions(
 const SwPrintData rPrintData = pDocShell-GetDoc()-getPrintData();
 
 // Get current page number
+sal_uInt16 nCurrentPage = 1;
 SwWrtShell* pSh = pDocShell-GetWrtShell();
-SwPaM* pShellCrsr = pSh-GetCrsr();
-sal_uInt16 nCurrentPage = pShellCrsr-GetPageNum(sal_True, 0);
-
+if (pSh)
+{
+SwPaM* pShellCrsr = pSh-GetCrsr();
+nCurrentPage = pShellCrsr-GetPageNum(sal_True, 0);
+}
+else
+{
+const SwPagePreView* pPreView = dynamic_cast const SwPagePreView* 
(pView);
+OSL_ENSURE(pPreView, Unexpected type of the view shell);
+if (pPreView)
+nCurrentPage = pPreView-GetSelectedPage();
+}
 return new SwPrintUIOptions( nCurrentPage, bWebDoc, bSwSrcView, 
bHasSelection, bHasPostIts, rPrintData );
 }
 
commit 639f7b562c0e3304e3b087d86ea2a1134bc0d044
Author: Ivan Timofeev timofeev@gmail.com
Date:   Fri Nov 18 15:58:27 2011 +0400

fix UI updating in the print dialog

diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index c2b0e87..3d13fd8 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -869,11 +869,6 @@ PrinterController::PageSize 
PrinterController::getPageFile( int i_nUnfilteredPag
 Sequence PropertyValue  aPageParm( getPageParametersProtected( 
i_nUnfilteredPage ) );
 const MapMode aMapMode( MAP_100TH_MM );
 
-if (mpImplData-meJobState != view::PrintableState_JOB_STARTED)
-{   // rhbz#657394: check that we are still printing...
-return PrinterController::PageSize();
-}
-
 mpImplData-mpPrinter-Push();
 mpImplData-mpPrinter-SetMapMode( aMapMode );
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2011-11-18 Thread Ivan Timofeev
 sw/source/ui/uno/unotxdoc.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3bdce622e0847b769a8d0d6e7b5f6f5f8e1ef3c0
Author: Ivan Timofeev timofeev@gmail.com
Date:   Fri Nov 18 22:14:38 2011 +0400

forgot to consider printing from html source

diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 4a1ef26..53e047c 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -194,7 +194,7 @@ SwPrintUIOptions * lcl_GetPrintUIOptions(
 SwPaM* pShellCrsr = pSh-GetCrsr();
 nCurrentPage = pShellCrsr-GetPageNum(sal_True, 0);
 }
-else
+else if (!bSwSrcView)
 {
 const SwPagePreView* pPreView = dynamic_cast const SwPagePreView* 
(pView);
 OSL_ENSURE(pPreView, Unexpected type of the view shell);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2011-11-17 Thread Ivan Timofeev
 sw/source/core/bastyp/calc.cxx  |3 +--
 sw/source/core/crsr/crsrsh.cxx  |7 ++-
 sw/source/core/doc/docedt.cxx   |   12 
 sw/source/core/doc/docfld.cxx   |6 ++
 sw/source/core/doc/docfmt.cxx   |2 +-
 sw/source/core/doc/docnew.cxx   |   11 +++
 sw/source/core/doc/docredln.cxx |2 +-
 sw/source/core/docnode/ndtbl.cxx|2 +-
 sw/source/core/docnode/node.cxx |3 +--
 sw/source/core/frmedt/fefly1.cxx|3 +--
 sw/source/core/layout/atrfrm.cxx|   13 +
 sw/source/core/layout/calcmove.cxx  |6 ++
 sw/source/core/layout/fly.cxx   |3 +--
 sw/source/core/layout/ssfrm.cxx |3 +--
 sw/source/core/text/itradj.cxx  |3 +--
 sw/source/core/text/itrform2.cxx|7 ++-
 sw/source/core/text/porlay.cxx  |6 ++
 sw/source/core/text/txtdrop.cxx |3 +--
 sw/source/core/txtnode/fmtatr2.cxx  |2 +-
 sw/source/core/txtnode/ndtxt.cxx|3 +--
 sw/source/core/unocore/unoframe.cxx |3 +--
 sw/source/core/unocore/unosett.cxx  |2 +-
 sw/source/core/unocore/unotbl.cxx   |3 +--
 sw/source/filter/ascii/parasc.cxx   |3 +--
 sw/source/filter/html/htmlplug.cxx  |6 ++
 sw/source/filter/ww1/fltshell.cxx   |6 ++
 sw/source/filter/ww8/ww8par.cxx |6 ++
 sw/source/filter/ww8/ww8par2.cxx|5 ++---
 sw/source/ui/app/applab.cxx |4 +---
 sw/source/ui/dbui/dbinsdlg.cxx  |3 +--
 sw/source/ui/dialog/uiregionsw.cxx  |6 ++
 sw/source/ui/dochdl/swdtflvr.cxx|3 +--
 sw/source/ui/docvw/edtwin.cxx   |   19 +++
 sw/source/ui/envelp/labprt.cxx  |3 +--
 sw/source/ui/ribbar/inputwin.cxx|3 +--
 sw/source/ui/table/tautofmt.cxx |2 +-
 sw/source/ui/uiview/formatclipboard.cxx |   23 +--
 sw/source/ui/uiview/pview.cxx   |3 +--
 sw/source/ui/uiview/viewdraw.cxx|3 +--
 sw/source/ui/uno/SwXFilterOptions.cxx   |3 +--
 sw/source/ui/utlui/glbltree.cxx |3 +--
 sw/source/ui/utlui/initui.cxx   |3 +--
 sw/source/ui/utlui/numfmtlb.cxx |3 +--
 43 files changed, 76 insertions(+), 142 deletions(-)

New commits:
commit 3616dfb094089589b5c9082fc96702ad1155045f
Author: Ivan Timofeev timofeev@gmail.com
Date:   Thu Nov 17 22:13:42 2011 +0400

redundant if not-null checks on delete

diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index ecee9a2..78ee52c 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -1626,8 +1626,7 @@ SwHash::SwHash( const String rStr ) :
 
 SwHash::~SwHash()
 {
-if( pNext )
-delete pNext;
+delete pNext;
 }
 
 void DeleteHashTable( SwHash **ppHashTable, sal_uInt16 nCount )
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index f402e02..7f859ed 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -120,11 +120,8 @@ void CheckRange( SwCursor* pCurCrsr )
  * Bereich gehoert !
  */
 pTmp = (SwPaM*)pTmp-GetNext();
-if( pTmpDel )
-{
-delete pTmpDel; // hebe alten Bereich auf
-pTmpDel = 0;
-}
+delete pTmpDel; // hebe alten Bereich auf
+pTmpDel = 0;
 }
 }
 
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 3f15e8c..b4c8e07 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -691,11 +691,8 @@ _SaveRedlEndPosForRestore::_SaveRedlEndPosForRestore( 
const SwNodeIndex rInsIdx
 
 _SaveRedlEndPosForRestore::~_SaveRedlEndPosForRestore()
 {
-if( pSavArr )
-{
-delete pSavArr;
-delete pSavIdx;
-}
+delete pSavArr;
+delete pSavIdx;
 }
 
 void _SaveRedlEndPosForRestore::_Restore()
@@ -1236,8 +1233,7 @@ bool SwDoc::MoveNodeRange( SwNodeRange rRange, 
SwNodeIndex rPos,
 GetIDocumentUndoRedo().AppendUndo(pUndo);
 }
 
-if( pSaveInsPos )
-delete pSaveInsPos;
+delete pSaveInsPos;
 
 if( bUpdateFtn )
 {
@@ -2500,7 +2496,7 @@ SetRedlineMode( eOld );
 // in die Autokorrektur
 void SwDoc::SetAutoCorrExceptWord( SwAutoCorrExceptWord* pNew )
 {
-if( pACEWord  pNew != pACEWord )
+if( pNew != pACEWord )
 delete pACEWord;
 pACEWord = pNew;
 }
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 3a81493..e5cd57e 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -673,8 +673,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
 }
 }
 
-if( pCalc )
-delete pCalc;
+delete pCalc;
 }
 
 void SwDoc::UpdatePageFlds( SfxPoolItem* pMsgHnt )
@@ -2210,8 +2209,7 @@ void SwDocUpdtFld::MakeFldList( SwDoc rDoc, int bAll

[Libreoffice-commits] .: 2 commits - cui/source sd/source starmath/source sw/source vcl/source

2011-11-06 Thread Ivan Timofeev
 cui/source/dialogs/scriptdlg.cxx  |4 ++--
 sd/source/ui/view/sdview.cxx  |2 +-
 starmath/source/unomodel.cxx  |4 ++--
 sw/source/core/crsr/viscrs.cxx|2 +-
 sw/source/core/doc/docdesc.cxx|   17 +++--
 sw/source/core/text/itrform2.cxx  |   10 --
 sw/source/filter/xml/xmlitmpr.cxx |2 +-
 sw/source/ui/uiview/view2.cxx |3 ++-
 vcl/source/window/decoview.cxx|2 +-
 9 files changed, 21 insertions(+), 25 deletions(-)

New commits:
commit 5122e3413b06125ff45fd10e1ac1f0e58c24afcc
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sun Nov 6 13:20:56 2011 +0400

cppcheck: avoid possible null pointer dereferences

diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 8670778..2e34358 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -623,7 +623,7 @@ sal_Bool View::IsPresObjSelected(sal_Bool bOnPage, sal_Bool 
bOnMasterPage, sal_B
 if ( pObj  ( bCheckPresObjListOnly || pObj-IsEmptyPresObj() || 
pObj-GetUserCall() ) )
 {
 pPage = (SdPage*) pObj-GetPage();
-bMasterPage = pPage-IsMasterPage();
+bMasterPage = pPage  pPage-IsMasterPage();
 
 if ( (bMasterPage  bOnMasterPage) || (!bMasterPage  bOnPage) )
 {
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 4ac9297..fae2579 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -882,9 +882,9 @@ void SmModel::_getPropertyValues( const PropertyMapEntry 
**ppEntries, Any *pValu
 for (size_t i = 0; i  aSymbols.size(); ++i)
 {
 const SmSym * pSymbol = aSymbols[ i ];
-const bool bIsUsedSymbol = rUsedSymbols.find( 
pSymbol-GetName() ) != rUsedSymbols.end();
 if (pSymbol  !pSymbol-IsPredefined() 
-(!bUsedSymbolsOnly || bIsUsedSymbol))
+(!bUsedSymbolsOnly ||
+ rUsedSymbols.find( pSymbol-GetName() ) != 
rUsedSymbols.end()))
 {
 aVector.push_back ( pSymbol );
 nCount++;
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 52312a0..7310b07 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -611,8 +611,9 @@ void SwDoc::PrtDataChanged()
 if ( pTmpRoot )
 {
 ViewShell *pSh = GetCurrentViewShell();
-if( !pSh-GetViewOptions()-getBrowseMode() ||
-pSh-GetViewOptions()-IsPrtFormat() )
+if( pSh 
+(!pSh-GetViewOptions()-getBrowseMode() ||
+ pSh-GetViewOptions()-IsPrtFormat()) )
 {
 if ( GetDocShell() )
 pWait = new SwWait( *GetDocShell(), sal_True );
@@ -632,16 +633,12 @@ void SwDoc::PrtDataChanged()
 std::setSwRootFrm* aAllLayouts = GetAllLayouts();
 std::for_each( aAllLayouts.begin(), 
aAllLayouts.end(),std::bind2nd(std::mem_fun(SwRootFrm::InvalidateAllCntnt), 
INV_SIZE));
 
-if ( pSh )
+do
 {
-do
-{
-pSh-InitPrt( pPrt );
-pSh = (ViewShell*)pSh-GetNext();
-}
-while ( pSh != GetCurrentViewShell() );
+pSh-InitPrt( pPrt );
+pSh = (ViewShell*)pSh-GetNext();
 }
-
+while ( pSh != GetCurrentViewShell() );
 }
 }
 if ( bDraw  pDrawModel )
diff --git a/sw/source/filter/xml/xmlitmpr.cxx 
b/sw/source/filter/xml/xmlitmpr.cxx
index 27c66e9..d61b4df 100644
--- a/sw/source/filter/xml/xmlitmpr.cxx
+++ b/sw/source/filter/xml/xmlitmpr.cxx
@@ -77,7 +77,7 @@ SvXMLItemMapEntry* SvXMLItemMapEntries::getByName(  
sal_uInt16 nNameSpace,
 pMap++;
 }
 
-return (pMap-eLocalName != XML_TOKEN_INVALID) ? pMap : NULL;
+return (pMap  (pMap-eLocalName != XML_TOKEN_INVALID)) ? pMap : NULL;
 }
 
 SvXMLItemMapEntry* SvXMLItemMapEntries::getByIndex( sal_uInt16 nIndex ) const
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 7b69a02..afc6093 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -2282,10 +2282,11 @@ void SwView::GenerateFormLetter(sal_Bool 
bUseCurrentDocument)
 rSh.EnterStdMode(); // Wechsel in Textshell erzwingen; ist fuer
 // das Mischen von DB-Feldern notwendig.
 AttrChangedNotify( rSh );
-pNewDBMgr-SetMergeType( DBMGR_MERGE );
 
 if (pNewDBMgr)
 {
+pNewDBMgr-SetMergeType( DBMGR_MERGE );
+
 SequencePropertyValue aProperties(3);
 PropertyValue* pValues = aProperties.getArray();
 pValues[0].Name = C2U(DataSourceName);
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index ba41187..ab61741 100644
--- a/vcl/source

[Libreoffice-commits] .: 2 commits - svx/source

2011-11-06 Thread Ivan Timofeev
 svx/source/unodraw/UnoGraphicExporter.cxx |   84 --
 1 file changed, 36 insertions(+), 48 deletions(-)

New commits:
commit da5ec5d1e0823cf53f3f70c074cd3d314b89d4e3
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Nov 7 09:01:50 2011 +0400

use boost::scoped_ptr

diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx 
b/svx/source/unodraw/UnoGraphicExporter.cxx
index 0b60214..c0b66a4 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -724,15 +724,14 @@ bool GraphicExporter::GetGraphic( ExportSettings 
rSettings, Graphic aGraphic,
 Size aNewSize;
 
 // create a view
-SdrView*pView;
-
+boost::scoped_ptr SdrView  pView;
 if( PTR_CAST( FmFormModel, mpDoc ) )
 {
-pView = new FmFormView( PTR_CAST( FmFormModel, mpDoc ), 
aVDev );
+pView.reset(new FmFormView( PTR_CAST( FmFormModel, mpDoc 
), aVDev ));
 }
 else
 {
-pView = new SdrView( mpDoc, aVDev );
+pView.reset(new SdrView( mpDoc, aVDev ));
 }
 
 pView-SetBordVisible( sal_False );
@@ -773,7 +772,6 @@ bool GraphicExporter::GetGraphic( ExportSettings 
rSettings, Graphic aGraphic,
 aGraphic = Graphic(aMtf);
 
 pView-HideSdrPage();
-delete pView;
 
 if( rSettings.mbTranslucent )
 {
commit bc858110c2c8c7292a19ed849fd190b2d4aad0b7
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Nov 7 08:57:49 2011 +0400

cppcheck: drop redundant check

diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx 
b/svx/source/unodraw/UnoGraphicExporter.cxx
index 956773a..0b60214 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -739,51 +739,41 @@ bool GraphicExporter::GetGraphic( ExportSettings 
rSettings, Graphic aGraphic,
 pView-SetPageVisible( sal_False );
 pView-ShowSdrPage( pPage );
 
-if ( pView  pPage )
-{
-pView-SetBordVisible( sal_False );
-pView-SetPageVisible( sal_False );
-pView-ShowSdrPage( pPage );
-
-const Point aNewOrg( pPage-GetLftBorder(), 
pPage-GetUppBorder() );
-aNewSize = Size( aSize.Width() - pPage-GetLftBorder() - 
pPage-GetRgtBorder(),
-  aSize.Height() - 
pPage-GetUppBorder() - pPage-GetLwrBorder() );
-const Rectangle aClipRect( aNewOrg, aNewSize );
-MapMode aVMap( aMap );
-
-aVDev.Push();
-aVMap.SetOrigin( Point( -aNewOrg.X(), -aNewOrg.Y() ) );
-aVDev.SetRelativeMapMode( aVMap );
-aVDev.IntersectClipRegion( aClipRect );
-
-// Use new StandardCheckVisisbilityRedirector
-ImplExportCheckVisisbilityRedirector aRedirector( 
mpCurrentPage );
-
-pView-CompleteRedraw(aVDev, Region(Rectangle(Point(), 
aNewSize)), aRedirector);
-
-aVDev.Pop();
-
-aMtf.Stop();
-aMtf.WindStart();
-aMtf.SetPrefMapMode( aMap );
-aMtf.SetPrefSize( aNewSize );
-
-// AW: Here the current version was filtering out the 
META_CLIPREGION_ACTIONs
-// from the metafile. I asked some other developers why 
this was done, but no
-// one knew a direct reason. Since it's in for long time, 
it may be an old
-// piece of code. MetaFiles save and load ClipRegions with 
polygons with preserving
-// the polygons, so a resolution-indepent roundtrip is 
supported. Removed this
-// code since it destroys some MetaFiles where ClipRegions 
are used. Anyways,
-// just filtering them out is a hack, at least the 
encapsulated content would need
-// to be clipped geometrically.
-aGraphic = Graphic(aMtf);
-}
-
-if ( pView )
-{
-pView-HideSdrPage();
-delete pView;
-}
+const Point aNewOrg( pPage-GetLftBorder(), 
pPage-GetUppBorder() );
+aNewSize = Size( aSize.Width() - pPage-GetLftBorder() - 
pPage-GetRgtBorder(),
+ aSize.Height() - pPage-GetUppBorder() - 
pPage-GetLwrBorder() );
+const Rectangle aClipRect( aNewOrg, aNewSize );
+MapMode aVMap( aMap );
+
+aVDev.Push();
+aVMap.SetOrigin( Point( -aNewOrg.X(), -aNewOrg.Y

[Libreoffice-commits] .: wizards/com

2011-11-04 Thread Ivan Timofeev
 wizards/com/sun/star/wizards/ui/event/DataAware.java|   11 ---
 wizards/com/sun/star/wizards/ui/event/MethodInvocation.java |   11 +++
 2 files changed, 7 insertions(+), 15 deletions(-)

New commits:
commit 504b384dd1c74838f34d5caa27f3e916bb309a8c
Author: Ivan Timofeev timofeev@gmail.com
Date:   Fri Nov 4 13:08:38 2011 +0400

suppress warnings about inexact argument type

diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.java 
b/wizards/com/sun/star/wizards/ui/event/DataAware.java
index be7260d..608203c 100644
--- a/wizards/com/sun/star/wizards/ui/event/DataAware.java
+++ b/wizards/com/sun/star/wizards/ui/event/DataAware.java
@@ -291,15 +291,12 @@ public abstract class DataAware {
  * @param obj the object which contains the property.
  * @return the get method reflection object.
  */
-private static Class[] EMPTY_ARRAY = new Class[0];
-
 protected Method createGetMethod(String propName, Object obj)
 {
 Method m = null;
 try
 { //try to get a get method.
-
-m = obj.getClass().getMethod(get + propName, EMPTY_ARRAY);
+m = obj.getClass().getMethod(get + propName, (Class[]) null);
 }
 catch (NoSuchMethodException ex1)
 {
@@ -307,13 +304,13 @@ public abstract class DataAware {
 }
 return m;
 }
-
+
 /* (non-Javadoc)
  * @see 
com.sun.star.wizards.ui.event.DataAware.Value#get(java.lang.Object)
  */
 public Object get(Object target) {
 try {
-return getMethod.invoke(target, EMPTY_ARRAY);
+return getMethod.invoke(target, (Object[]) null);
 } catch (IllegalAccessException ex1) {
 ex1.printStackTrace();
 } catch (InvocationTargetException ex2) {
@@ -329,7 +326,7 @@ public abstract class DataAware {
 return new short[0];
 }
 return null;
-
+
 }
 
 protected Method createSetMethod(String propName, Object obj, Class 
paramClass) {
diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java 
b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java
index adea073..621158e 100644
--- a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java
+++ b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java
@@ -42,10 +42,6 @@ import java.lang.reflect.Method;
  */
 public class MethodInvocation
 {
-
-static final Class[] EMPTY_ARRAY =
-{
-};
 //the method to invoke.
 Method mMethod;
 //the object to invoke the method on.
@@ -66,7 +62,7 @@ public class MethodInvocation
 
 public MethodInvocation(String methodName, Object obj, Class paramClass) 
throws NoSuchMethodException
 {
-this(paramClass == null ? obj.getClass().getMethod(methodName, null) : 
obj.getClass().getMethod(methodName, new Class[]
+this(paramClass == null ? obj.getClass().getMethod(methodName, 
(Class[]) null) : obj.getClass().getMethod(methodName, new Class[]
 {
 paramClass
 }), obj, paramClass);
@@ -86,12 +82,11 @@ public class MethodInvocation
 {
 if (mWithParam)
 {
-return mMethod.invoke(mObject, (Object) param
-);
+return mMethod.invoke(mObject, (Object) param);
 }
 else
 {
-return mMethod.invoke(mObject, EMPTY_ARRAY);
+return mMethod.invoke(mObject, (Object[]) null);
 }
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source sd/source svx/source sw/source

2011-11-04 Thread Ivan Timofeev
 basic/source/comp/exprtree.cxx |8 +++-
 sd/source/ui/view/sdview2.cxx  |2 +-
 svx/source/svdraw/svdpage.cxx  |   10 +-
 sw/source/ui/dbui/dbmgr.cxx|4 +++-
 4 files changed, 16 insertions(+), 8 deletions(-)

New commits:
commit 9b94d385f94562049bf93f2fc0dd0558d6a56dd1
Author: Ivan Timofeev timofeev@gmail.com
Date:   Fri Nov 4 23:01:17 2011 +0400

cppcheck: avoid possible null pointer dereferences

diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx
index 1c7ec1b..41caa05 100644
--- a/basic/source/comp/exprtree.cxx
+++ b/basic/source/comp/exprtree.cxx
@@ -983,8 +983,14 @@ SbiExpression* SbiExprList::Get( short n )
 
 void SbiExprList::addExpression( SbiExpression* pExpr )
 {
+if( !pFirst )
+{
+pFirst = pExpr;
+return;
+}
+
 SbiExpression* p = pFirst;
-while( p  p-pNext )
+while( p-pNext )
 p = p-pNext;
 
 p-pNext = pExpr;
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 68e9a1f..b1a87b1 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -466,10 +466,10 @@ void View::DragFinished( sal_Int8 nDropAction )
 nm--;
 SdrMark* pM=mpDragSrcMarkList-GetMark(nm);
 SdrObject* pObj=pM-GetMarkedSdrObj();
-sal_uInt32 nOrdNum=pObj-GetOrdNumDirect();
 
 if( pObj  pObj-GetPage() )
 {
+sal_uInt32 nOrdNum=pObj-GetOrdNumDirect();
 #ifdef DBG_UTIL
 SdrObject* pChkObj =
 #endif
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 77f739b..63fe525 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -152,10 +152,10 @@ void SdrObjList::CopyObjects(const SdrObjList rSrcList)
 SdrObject* pSO=rSrcList.GetObj(no);
 
 SdrObject* pDO = pSO-Clone();
-pDO-SetModel(pModel);
-pDO-SetPage(pPage);
 
 if (pDO!=NULL) {
+pDO-SetModel(pModel);
+pDO-SetPage(pPage);
 NbcInsertObject(pDO,CONTAINER_APPEND,aReason);
 } else {
 nCloneErrCnt++;
@@ -425,11 +425,11 @@ SdrObject* SdrObjList::NbcRemoveObject(sal_uIntPtr 
nObjNum)
 SdrObject* pObj=maList[nObjNum];
 RemoveObjectFromContainer(nObjNum);
 
-// flushViewObjectContacts() clears the VOC's and those invalidate
-pObj-GetViewContact().flushViewObjectContacts(true);
-
 DBG_ASSERT(pObj!=NULL,Object zum Removen nicht gefunden);
 if (pObj!=NULL) {
+// flushViewObjectContacts() clears the VOC's and those invalidate
+pObj-GetViewContact().flushViewObjectContacts(true);
+
 DBG_ASSERT(pObj-IsInserted(),ZObjekt hat keinen Inserted-Status);
 pObj-SetInserted(sal_False); // Ruft u.a. den UserCall
 pObj-SetObjList(NULL);
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index a732303..cd0baba 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -1779,6 +1779,8 @@ sal_Bool SwNewDBMgr::GetColumnCnt(const String 
rSourceName, const String rTabl
 aData.nCommandType = -1;
 pFound = FindDSData(aData, sal_False);
 }
+if (!pFound)
+return sal_False;
 //check validity of supplied record Id
 if(pFound-aSelection.getLength())
 {
@@ -1795,7 +1797,7 @@ sal_Bool SwNewDBMgr::GetColumnCnt(const String 
rSourceName, const String rTabl
 if(!bFound)
 return sal_False;
 }
-if(pFound  pFound-xResultSet.is()  !pFound-bAfterSelection)
+if(pFound-xResultSet.is()  !pFound-bAfterSelection)
 {
 sal_Int32 nOldRow = 0;
 try
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2011-11-02 Thread Ivan Timofeev
 sw/source/core/doc/doc.cxx |   95 +++--
 1 file changed, 15 insertions(+), 80 deletions(-)

New commits:
commit 0847d1cb9868396cbcdf59b1a389dc88bcd5b71e
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Oct 31 11:59:07 2011 +0400

simplify determination of pages to print

diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index c512862..b3d9472 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1253,92 +1253,27 @@ void SwDoc::CalculatePagesForPrinting(
 // #i103700# printing selections should not allow for automatic inserting 
empty pages
 bool bPrintEmptyPages   = bPrintSelection ? false : 
rOptions.IsPrintEmptyPages( bIsPDFExport );
 
-Range aPages( 1, nDocPageCount );
-
-MultiSelection aMulti( aPages );
-aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
-aMulti.Select( aPages );
-
-const SwPageFrm *pStPage  = dynamic_castconst SwPageFrm*( 
rLayout.Lower() );
-const SwFrm *pEndPage = pStPage;
-
-sal_uInt16 nFirstPageNo = 0;
-sal_uInt16 nLastPageNo  = 0;
-
-for( sal_uInt16 i = 1; i = (sal_uInt16)aPages.Max(); ++i )
-{
-if( i  (sal_uInt16)aPages.Min() )
-{
-if( !pStPage-GetNext() )
-break;
-pStPage = (SwPageFrm*)pStPage-GetNext();
-pEndPage= pStPage;
-}
-else if( i == (sal_uInt16)aPages.Min() )
-{
-nFirstPageNo = i;
-nLastPageNo = nFirstPageNo;
-if( !pStPage-GetNext() || (i == (sal_uInt16)aPages.Max()) )
-break;
-pEndPage = pStPage-GetNext();
-}
-else if( i  (sal_uInt16)aPages.Min() )
-{
-nLastPageNo = i;
-if( !pEndPage-GetNext() || (i == (sal_uInt16)aPages.Max()) )
-break;
-pEndPage = pEndPage-GetNext();
-}
-}
+std::map sal_Int32, sal_Int32  rPrinterPaperTrays = 
rData.GetPrinterPaperTrays();
+std::set sal_Int32  rValidPages = rData.GetValidPagesSet();
+rValidPages.clear();
 
-OSL_ENSURE( nFirstPageNo, first page not found!  Should not happen! );
-if (nFirstPageNo)
+sal_Int32 nPageNum = 1;
+const SwPageFrm *pStPage = dynamic_castconst SwPageFrm*( rLayout.Lower() 
);
+while (pStPage  nPageNum = nDocPageCount)
 {
-// HACK: Hier muss von der MultiSelection noch eine akzeptable Moeglichkeit
-// geschaffen werden, alle Seiten von Seite x an zu deselektieren.
-// Z.B. durch SetTotalRange 
+const bool bPrintThisPage =
+( (bPrintRightPages  pStPage-OnRightPage()) ||
+  (bPrintLeftPages  !pStPage-OnRightPage()) ) 
+( bPrintEmptyPages || pStPage-Frm().Height() );
 
-//  aMulti.Select( Range( nLastPageNo+1, SELECTION_MAX ), 
sal_False );
-MultiSelection aTmpMulti( Range( 1, nLastPageNo ) );
-long nTmpIdx = aMulti.FirstSelected();
-static long nEndOfSelection = SFX_ENDOFSELECTION;
-while ( nEndOfSelection != nTmpIdx  nTmpIdx = long(nLastPageNo) )
+if (bPrintThisPage)
 {
-aTmpMulti.Select( nTmpIdx );
-nTmpIdx = aMulti.NextSelected();
+rValidPages.insert( nPageNum );
+rPrinterPaperTrays[ nPageNum ] = lcl_GetPaperBin( pStPage );
 }
-aMulti = aTmpMulti;
-// Ende des HACKs
-
-sal_uInt16 nPageNo = nFirstPageNo;
-
-std::map sal_Int32, sal_Int32  rPrinterPaperTrays = 
rData.GetPrinterPaperTrays();
-std::set sal_Int32  rValidPages = rData.GetValidPagesSet();
-rValidPages.clear();
-while ( pStPage )
-{
-const sal_Bool bRightPg = pStPage-OnRightPage();
-if ( aMulti.IsSelected( nPageNo ) 
-( (bRightPg  bPrintRightPages) ||
-(!bRightPg  bPrintLeftPages) ) )
-{
-// Feature - Print empty pages
-if ( bPrintEmptyPages || pStPage-Frm().Height() )
-{
-rValidPages.insert( nPageNo );
-rPrinterPaperTrays[ nPageNo ] = lcl_GetPaperBin( pStPage );
-}
-}
 
-if ( pStPage == pEndPage )
-{
-pStPage = 0;
-}
-else
-{   ++nPageNo;
-pStPage = (SwPageFrm*)pStPage-GetNext();
-}
-}
+++nPageNum;
+pStPage = (SwPageFrm*)pStPage-GetNext();
 }
 
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - sw/source tools/inc tools/source

2011-10-23 Thread Ivan Timofeev
 sw/source/core/doc/doc.cxx |6 ++-
 tools/inc/tools/multisel.hxx   |   40 ++
 tools/source/memtools/multisel.cxx |   56 -
 3 files changed, 33 insertions(+), 69 deletions(-)

New commits:
commit a47a5ed0a5ffd948d48e02e5a9f0e2064096e7d4
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sun Oct 23 21:35:00 2011 +0400

always explicitly handle empty string of ranges

diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 96a1629..4580328 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1584,13 +1584,15 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
 rValidPagesSet.clear();
 rValidStartFrms.clear();
 
-rtl::OUString aPageRange = rOptions.getStringValue( PageRange, 
rtl::OUString() );
+rtl::OUString aPageRange;
 // PageContent :
 // 0 - print all pages (default if aPageRange is empty)
 // 1 - print range according to PageRange
 // 2 - print selection
 const sal_Int32 nContent = rOptions.getIntValue( PrintContent, 0 );
-if (0 == nContent)
+if (nContent == 1)
+aPageRange = rOptions.getStringValue( PageRange, rtl::OUString() );
+if (aPageRange.getLength() == 0)// empty string - print all
 {
 // set page range to print to 'all pages'
 aPageRange = OUString::valueOf( (sal_Int32)1 );
diff --git a/tools/inc/tools/multisel.hxx b/tools/inc/tools/multisel.hxx
index 8e4879f..47f56f2 100644
--- a/tools/inc/tools/multisel.hxx
+++ b/tools/inc/tools/multisel.hxx
@@ -191,8 +191,6 @@ public:
 - the string - means the sequence i_nMinNumber to i_nMaxNumber
 - single number that doesn't fit in [i_nMinNumber,i_nMaxNumber] will be 
ignored
 - range that doesn't fit in [i_nMinNumber,i_nMaxNumber] will be adjusted
-- an empty string as input is valid and will result in the range [min,max] 
if given
-  or an empty vector, if not
 */
 static bool getRangesFromString( const rtl::OUString i_rPageRange,
  std::vector sal_Int32  o_rPageVector,
diff --git a/tools/source/memtools/multisel.cxx 
b/tools/source/memtools/multisel.cxx
index 13275a8..68a9eac 100644
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -831,16 +831,6 @@ bool StringRangeEnumerator::setRange( const rtl::OUString 
i_rNewRange, bool i_b
 mnCount = 0;
 maSequence.clear();
 
-// we love special cases
-if( i_rNewRange.getLength() == 0 )
-{
-if( mnMin = 0  mnMax = 0 )
-{
-insertRange( mnMin, mnMax, mnMin != mnMax, ! i_bStrict );
-}
-return true;
-}
-
 const sal_Unicode* pInput = i_rNewRange.getStr();
 rtl::OUStringBuffer aNumberBuf( 16 );
 std::vector sal_Int32  aNumbers;
commit 3d5caa7ce38c9441d05b01c6fe5ff3bd51de
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sun Oct 23 17:45:34 2011 +0400

StringRangeEnumerator cleanup

* do not allow default unbounded min and max, syntax of the input string
  requires them
* simplify logic, remove unused methods, make the class immutable, actualize
  documentation

diff --git a/tools/inc/tools/multisel.hxx b/tools/inc/tools/multisel.hxx
index a979c23..8e4879f 100644
--- a/tools/inc/tools/multisel.hxx
+++ b/tools/inc/tools/multisel.hxx
@@ -122,7 +122,9 @@ class TOOLS_DLLPUBLIC StringRangeEnumerator
 sal_Int32  mnMin;
 sal_Int32  mnMax;
 sal_Int32  mnOffset;
+bool   mbValidInput;
 
+bool setRange( const rtl::OUString i_rNewRange, bool i_bStrict = false );
 bool insertRange( sal_Int32 nFirst, sal_Int32 nLast, bool bSequence, bool 
bMayAdjust );
 bool insertJoinedRanges( const std::vector sal_Int32  rNumbers, bool 
i_bStrict );
 bool checkValue( sal_Int32, const std::set sal_Int32 * i_pPossibleValues 
= NULL ) const;
@@ -152,10 +154,9 @@ public:
 
 friend class StringRangeEnumerator::Iterator;
 
-StringRangeEnumerator() : mnCount( 0 ), mnMin( -1 ), mnMax( -1 ), 
mnOffset( -1 ) {}
 StringRangeEnumerator( const rtl::OUString i_rInput,
-   sal_Int32 i_nMinNumber = -1,
-   sal_Int32 i_nMaxNumber = -1,
+   sal_Int32 i_nMinNumber,
+   sal_Int32 i_nMaxNumber,
sal_Int32 i_nLogicalOffset = -1
);
 
@@ -163,14 +164,7 @@ public:
 Iterator begin( const std::set sal_Int32 * i_pPossibleValues = NULL ) 
const;
 Iterator end( const std::set sal_Int32 * i_pPossibleValues = NULL ) 
const;
 
-sal_Int32 getMin() const { return mnMin; }
-void setMin( sal_Int32 i_nMinValue ) { mnMin = i_nMinValue; }
-sal_Int32 getMax() const { return mnMax; }
-void

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

2011-10-20 Thread Ivan Timofeev
 tools/inc/tools/multisel.hxx   |3 
 tools/source/memtools/multisel.cxx |  158 -
 2 files changed, 161 deletions(-)

New commits:
commit d72701bba66817fbd0ddcb8dea969aea49f8426a
Author: Ivan Timofeev timofeev@gmail.com
Date:   Thu Oct 20 23:11:17 2011 +0400

bye-bye old range parser

diff --git a/tools/inc/tools/multisel.hxx b/tools/inc/tools/multisel.hxx
index 6d3c3de..a979c23 100644
--- a/tools/inc/tools/multisel.hxx
+++ b/tools/inc/tools/multisel.hxx
@@ -71,9 +71,6 @@ public:
 MultiSelection();
 MultiSelection( const MultiSelection rOrig );
 MultiSelection( const Range rRange );
-MultiSelection( const UniString rString,
-sal_Unicode cRange = '-',
-sal_Unicode cSep = ';' );
 ~MultiSelection();
 
 MultiSelection operator= ( const MultiSelection rOrig );
diff --git a/tools/source/memtools/multisel.cxx 
b/tools/source/memtools/multisel.cxx
index 1a21f0a..4d6d577 100644
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -137,164 +137,6 @@ MultiSelection::MultiSelection():
 
 // ---
 
-MultiSelection::MultiSelection( const UniString rString, sal_Unicode cRange, 
sal_Unicode cSep ):
-aTotRange(0,RANGE_MAX),
-nCurSubSel(0),
-nSelCount(0),
-bCurValid(sal_False),
-bSelectNew(sal_False)
-{
-// Dies ist nur ein Schnellschuss und sollte bald optimiert,
-// an die verschiedenen Systeme (UNIX etc.)
-// und die gewuenschte Eingabe-Syntax angepasst werden.
-
-UniString   aStr( rString );
-sal_Unicode*pStr   = aStr.GetBufferAccess();
-sal_Unicode*pOld = pStr;
-sal_BoolbReady = sal_False;
-sal_BoolbUntil = sal_False;
-xub_StrLen  nCut   = 0;
-
-// Hier normieren wir den String, sodass nur Ziffern,
-// Semikola als Trenn- und Minus als VonBis-Zeichen
-// uebrigbleiben, z.B. 99-117;55;34;-17;37-43
-while ( *pOld )
-{
-switch( *pOld )
-{
-case '0':
-case '1':
-case '2':
-case '3':
-case '4':
-case '5':
-case '6':
-case '7':
-case '8':
-case '9':
-DBG_ASSERT( *pOld != cRange, digit for range char not 
allowed );
-DBG_ASSERT( *pOld != cSep, digit for separator not allowed );
-if( bReady )
-{
-*pStr++ = ';';
-nCut++;
-bReady = sal_False;
-}
-*pStr++ = *pOld;
-nCut++;
-bUntil = sal_False;
-break;
-
-case '-':
-case ':':
-case '/':
-if ( *pOld != cSep )
-{
-if ( !bUntil )
-{
-*pStr++ = '-';
-nCut++;
-bUntil = sal_True;
-}
-bReady = sal_False;
-}
-else
-bReady = sal_True;
-break;
-
-case ' ':
-DBG_ASSERT( *pOld != cRange, SPACE for range char not 
allowed );
-DBG_ASSERT( *pOld != cSep, SPACE for separator not allowed );
-bReady = !bUntil;
-break;
-
-default:
-if ( *pOld == cRange )
-{
-if ( !bUntil )
-{
-*pStr++ = '-';
-nCut++;
-bUntil = sal_True;
-}
-bReady = sal_False;
-}
-else
-bReady = sal_True;
-break;
-}
-
-pOld++;
-}
-aStr.ReleaseBufferAccess( nCut );
-
-// Jetzt wird der normierte String ausgewertet ..
-UniString   aNumStr;
-Range   aRg( 1, RANGE_MAX );
-const sal_Unicode*  pCStr = aStr.GetBuffer();
-longnPage = 1;
-longnNum  = 1;
-bUntil = sal_False;
-while ( *pCStr )
-{
-switch ( *pCStr )
-{
-case '0':
-case '1':
-case '2':
-case '3':
-case '4':
-case '5':
-case '6':
-case '7':
-case '8':
-case '9':
-aNumStr += *pCStr;
-break;
-case ';':
-nNum = aNumStr.ToInt32();
-if ( bUntil )
-{
-if ( !aNumStr.Len() )
-nNum = RANGE_MAX

[Libreoffice-commits] .: 2 commits - filter/source sc/source sw/inc sw/source

2011-10-19 Thread Ivan Timofeev
 filter/source/pdf/pdfexport.cxx |   42 ++--
 filter/source/pdf/pdfexport.hxx |8 
 sc/source/ui/unoobj/docuno.cxx  |   26 +-
 sw/inc/EnhancedPDFExportHelper.hxx  |6 
 sw/source/core/text/EnhancedPDFExportHelper.cxx |  220 +---
 5 files changed, 207 insertions(+), 95 deletions(-)

New commits:
commit 5ad4d151dac1eb887d92200330e31af269d8d1fd
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Oct 19 21:52:17 2011 +0400

migrate to StringRangeEnumerator in pdfexport

diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 43d665d..9e1d4ef 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -168,8 +168,12 @@ PDFExport::~PDFExport()
 
 // 
-
 
-sal_Bool PDFExport::ExportSelection( vcl::PDFWriter rPDFWriter, Reference 
com::sun::star::view::XRenderable  rRenderable, Any rSelection,
-MultiSelection aMultiSelection, Sequence PropertyValue  rRenderOptions, 
sal_Int32 nPageCount )
+sal_Bool PDFExport::ExportSelection( vcl::PDFWriter rPDFWriter,
+Reference com::sun::star::view::XRenderable  rRenderable,
+const Any rSelection,
+const StringRangeEnumerator rRangeEnum,
+Sequence PropertyValue  rRenderOptions,
+sal_Int32 nPageCount )
 {
 sal_BoolbRet = sal_False;
 try
@@ -192,11 +196,12 @@ sal_Bool PDFExport::ExportSelection( vcl::PDFWriter 
rPDFWriter, Reference com:
 vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( 
vcl::PDFExtOutDevData, pOut-GetExtOutDevData() );
 if ( nPageCount )
 {
-sal_Int32 nSel = aMultiSelection.FirstSelected();
 sal_Int32 nCurrentPage(0);
-while ( nSel != sal_Int32(SFX_ENDOFSELECTION) )
+StringRangeEnumerator::Iterator aIter = rRangeEnum.begin();
+StringRangeEnumerator::Iterator aEnd  = rRangeEnum.end();
+while ( aIter != aEnd )
 {
-Sequence PropertyValueaRenderer( 
rRenderable-getRenderer( nSel - 1, rSelection, rRenderOptions ) );
+Sequence PropertyValueaRenderer( 
rRenderable-getRenderer( *aIter, rSelection, rRenderOptions ) );
 awt::Size   aPageSize;
 
 for( sal_Int32 nProperty = 0, nPropertyCount = 
aRenderer.getLength(); nProperty  nPropertyCount; ++nProperty )
@@ -221,9 +226,9 @@ sal_Bool PDFExport::ExportSelection( vcl::PDFWriter 
rPDFWriter, Reference com:
 
 // #i35176#
 // IsLastPage property.
-const sal_Int32 nCurrentRenderer = nSel - 1;
-nSel = aMultiSelection.NextSelected();
-if ( pLastPage  sal_Int32(SFX_ENDOFSELECTION) == nSel )
+const sal_Int32 nCurrentRenderer = *aIter;
+++aIter;
+if ( pLastPage  aIter == aEnd )
 *pLastPage = sal_True;
 
 rRenderable-render( nCurrentRenderer, rSelection, 
rRenderOptions );
@@ -862,8 +867,6 @@ sal_Bool PDFExport::Export( const OUString rFile, const 
Sequence PropertyValue
 }
 
 const sal_Int32 nPageCount = xRenderable-getRendererCount( 
aSelection, aRenderOptions );
-const Range aRange( 1, nPageCount );
-MultiSelection  aMultiSelection;
 
 if ( mbExportNotesPages  aCreator.EqualsAscii( Impress ) )
 {
@@ -874,21 +877,20 @@ sal_Bool PDFExport::Export( const OUString rFile, const 
Sequence PropertyValue
 
 if( !aPageRange.getLength() )
 {
-aMultiSelection.SetTotalRange( aRange );
-aMultiSelection.Select( aRange );
-}
-else
-{
-aMultiSelection = MultiSelection( aPageRange );
-aMultiSelection.SetTotalRange( aRange );
+aPageRange = OUStringBuffer()
+.append( static_cast sal_Int32 ( 1 ) )
+.append( static_cast sal_Unicode ( '-' ) )
+.append( nPageCount ).makeStringAndClear();
 }
+StringRangeEnumerator aRangeEnum( aPageRange, 0, nPageCount-1 
);
+
 if ( mxStatusIndicator.is() )
 {
 ByteString aResMgrName( pdffilter );
 ResMgr* pResMgr = ResMgr::CreateResMgr( 
aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() );
 if ( pResMgr )
 {
-sal_Int32 nTotalPageCount = 
aMultiSelection.GetSelectCount();
+sal_Int32 nTotalPageCount = aRangeEnum.size

[Libreoffice-commits] .: tools/source

2011-10-12 Thread Ivan Timofeev
 tools/source/memtools/multisel.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit aaa6e59711d3ba9b143d3719c78a815d96c3b1df
Author: Ivan Timofeev timofeev@gmail.com
Date:   Wed Oct 12 17:06:45 2011 +0400

treat - as entire range

diff --git a/tools/source/memtools/multisel.cxx 
b/tools/source/memtools/multisel.cxx
index bf504e5..1a21f0a 100644
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -1024,16 +1024,17 @@ bool StringRangeEnumerator::setRange( const 
rtl::OUString i_rNewRange, bool i_b
 aNumberBuf.append( *pInput++ );
 if( aNumberBuf.getLength() )
 {
-if( bSequence  aNumbers.empty() )
-aNumbers.push_back( mnMin );
-
 sal_Int32 nNumber = aNumberBuf.makeStringAndClear().toInt32() + 
mnOffset;
 aNumbers.push_back( nNumber );
 bSequence = false;
 }
 
 if( *pInput == sal_Unicode('-') )
+{
 bSequence = true;
+if( aNumbers.empty() )
+aNumbers.push_back( mnMin );
+}
 else if( *pInput == sal_Unicode(',') || *pInput == sal_Unicode(';') )
 {
 if( bSequence  !aNumbers.empty() )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - basctl/source tools/inc tools/source

2011-10-08 Thread Ivan Timofeev
 basctl/source/basicide/basicrenderable.cxx |   30 +---
 tools/inc/tools/multisel.hxx   |3 
 tools/source/memtools/multisel.cxx |   99 ++---
 3 files changed, 71 insertions(+), 61 deletions(-)

New commits:
commit e0ffea7232fe4bd52424b321562baa809686fb09
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Oct 8 22:25:09 2011 +0400

migrate to StringRangeEnumerator in Basic

diff --git a/basctl/source/basicide/basicrenderable.cxx 
b/basctl/source/basicide/basicrenderable.cxx
index 1671238..b3e787d 100644
--- a/basctl/source/basicide/basicrenderable.cxx
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -121,10 +121,13 @@ sal_Int32 SAL_CALL BasicRenderable::getRendererCount (
 if( nContent == 1 )
 {
 rtl::OUString aPageRange( getStringValue( PageRange ) );
-MultiSelection aSel( aPageRange );
-long nSelCount = aSel.GetSelectCount();
-if( nSelCount = 0  nSelCount  nCount )
-nCount = nSelCount;
+if( aPageRange.getLength() )
+{
+StringRangeEnumerator aRangeEnum( aPageRange, 0, nCount-1 
);
+sal_Int32 nSelCount = aRangeEnum.size();
+if( nSelCount = 0 )
+nCount = nSelCount;
+}
 }
 }
 else
@@ -177,12 +180,19 @@ void SAL_CALL BasicRenderable::render (
 if( nContent == 1 )
 {
 rtl::OUString aPageRange( getStringValue( PageRange ) );
-MultiSelection aSel( aPageRange );
-long nSelect = aSel.FirstSelected();
-while( nSelect != long(SFX_ENDOFSELECTION)  nRenderer-- )
-nSelect = aSel.NextSelected();
-if( nSelect != long(SFX_ENDOFSELECTION) )
-mpWindow-printPage( sal_Int32(nSelect-1), pPrinter );
+if( aPageRange.getLength() )
+{
+sal_Int32 nPageCount = mpWindow-countPages( pPrinter );
+StringRangeEnumerator aRangeEnum( aPageRange, 0, 
nPageCount-1 );
+StringRangeEnumerator::Iterator it = aRangeEnum.begin();
+for( ; it != aRangeEnum.end()  nRenderer; --nRenderer )
+++it;
+
+sal_Int32 nPage = ( it != aRangeEnum.end() ) ? *it : 
nRenderer;
+mpWindow-printPage( nPage, pPrinter );
+}
+else
+mpWindow-printPage( nRenderer, pPrinter );
 }
 else
 mpWindow-printPage( nRenderer, pPrinter );
commit 9cbc1c3253f1c7ac7507ec89ed879d157c809bb6
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Oct 8 22:24:21 2011 +0400

no need to return size_t instead of sal_Int32

diff --git a/tools/inc/tools/multisel.hxx b/tools/inc/tools/multisel.hxx
index 733682f..6d3c3de 100644
--- a/tools/inc/tools/multisel.hxx
+++ b/tools/inc/tools/multisel.hxx
@@ -162,7 +162,7 @@ public:
sal_Int32 i_nLogicalOffset = -1
);
 
-size_t size() const { return size_t(mnCount); }
+sal_Int32 size() const { return mnCount; }
 Iterator begin( const std::set sal_Int32 * i_pPossibleValues = NULL ) 
const;
 Iterator end( const std::set sal_Int32 * i_pPossibleValues = NULL ) 
const;
 
diff --git a/tools/source/memtools/multisel.cxx 
b/tools/source/memtools/multisel.cxx
index 395082e..bf504e5 100644
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -1168,7 +1168,7 @@ bool StringRangeEnumerator::getRangesFromString( const 
OUString i_rPageRange,
 
 //Even if the input range wasn't completely valid, return what ranges could
 //be extracted from the input.
-o_rPageVector.reserve( aEnum.size() );
+o_rPageVector.reserve( static_cast size_t ( aEnum.size() ) );
 for( StringRangeEnumerator::Iterator it = aEnum.begin( i_pPossibleValues );
  it != aEnum.end( i_pPossibleValues ); ++it )
 {
commit 6dcfa9d2aefc161ce61ea9b007d8997be3f31af9
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sat Oct 8 22:20:42 2011 +0400

allow parsing of joined ranges

i.e. 1-4-2 means 1,2,3,4,3,2 now. This is for eliminating ambiguity,
it is doubtful whether users will find this useful.

diff --git a/tools/inc/tools/multisel.hxx b/tools/inc/tools/multisel.hxx
index bb74783..733682f 100644
--- a/tools/inc/tools/multisel.hxx
+++ b/tools/inc/tools/multisel.hxx
@@ -127,6 +127,7 @@ class TOOLS_DLLPUBLIC StringRangeEnumerator
 sal_Int32  mnOffset;
 
 bool insertRange( sal_Int32 nFirst, sal_Int32 nLast, bool bSequence, bool 
bMayAdjust );
+bool insertJoinedRanges( const std::vector sal_Int32  rNumbers, bool 
i_bStrict );
 bool checkValue( sal_Int32, const std::set