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

2017-07-20 Thread Albert Thuswaldner
 sc/source/filter/lotus/lotattr.cxx  |9 +
 sc/source/filter/lotus/lotform.cxx  |   22 +++---
 sc/source/filter/lotus/lotimpop.cxx |   10 +-
 sc/source/filter/lotus/lotread.cxx  |8 
 sc/source/filter/lotus/tool.cxx |4 ++--
 5 files changed, 27 insertions(+), 26 deletions(-)

New commits:
commit 91325884de5d3c3f838cfdcb1c70d42e5edab149
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Mon Jul 17 18:37:44 2017 +0200

tdf#43157 - Clean up OSL_ENSURE and OSL_FAIL in sc/filter/lotus

Change-Id: I88e794752dff1bd46faac71234322d603c10bed9
Reviewed-on: https://gerrit.libreoffice.org/40075
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com>

diff --git a/sc/source/filter/lotus/lotattr.cxx 
b/sc/source/filter/lotus/lotattr.cxx
index 342207d48e3b..d88b963e866b 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -169,8 +169,8 @@ void LotAttrCache::LotusToScBorderLine( sal_uInt8 nLine, 
::editeng::SvxBorderLin
 
 const SvxColorItem& LotAttrCache::GetColorItem( const sal_uInt8 nLotIndex ) 
const
 {
-OSL_ENSURE( nLotIndex > 0 && nLotIndex < 7,
-"-LotAttrCache::GetColorItem(): caller hast to check index!" );
+// *LotAttrCache::GetColorItem(): caller has to check index!
+assert( nLotIndex > 0 && nLotIndex < 7 );
 
 return *ppColorItems[ nLotIndex - 1 ];
 }
@@ -178,7 +178,8 @@ const SvxColorItem& LotAttrCache::GetColorItem( const 
sal_uInt8 nLotIndex ) cons
 const Color& LotAttrCache::GetColor( const sal_uInt8 nLotIndex ) const
 {
 // color <-> index fits background, but not for fonts (0 <-> 7)!
-OSL_ENSURE( nLotIndex < 8, "*LotAttrCache::GetColor(): Index > 7, caller 
hast to check index!" );
+// *LotAttrCache::GetColor(): Index > 7, caller hast to check index!"
+assert( nLotIndex < 8 );
 
 return pColTab[ nLotIndex ];
 }
@@ -187,7 +188,7 @@ void LotAttrCol::SetAttr( const SCROW nRow, const 
ScPatternAttr& rAttr )
 {
 // Actually with the current implementation of MAXROWCOUNT>=64k and nRow
 // being read as sal_uInt16 there's no chance that nRow would be invalid..
-OSL_ENSURE( ValidRow(nRow), "*LotAttrCol::SetAttr(): ... and failed?!" );
+SAL_WARN_IF( !ValidRow(nRow), "sc", "*LotAttrCol::SetAttr(): ... and 
failed?!" );
 
 std::vector<std::unique_ptr >::reverse_iterator iterLast = 
aEntries.rbegin();
 
diff --git a/sc/source/filter/lotus/lotform.cxx 
b/sc/source/filter/lotus/lotform.cxx
index 106c19e3218b..d3c886656145 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -43,7 +43,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const 
sal_Char* pExtStri
 
 boolbAddIn = false;
 
-OSL_ENSURE( nAnz < 128, "-LotusToSc::DoFunc(): Too many (128)!" );
+SAL_WARN_IF( nAnz > 128, "sc", "-LotusToSc::DoFunc(): Too many (128)!" );
 
 if( eOc == ocNoName )
 {
@@ -84,7 +84,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const 
sal_Char* pExtStri
 switch( eOc )
 {
 case ocIndex:
-OSL_ENSURE( nAnz > 2, "+LotusToSc::DoFunc(): ocIndex needs at 
least 2 parameters!" );
+SAL_WARN_IF( nAnz < 2, "sc", "+LotusToSc::DoFunc(): ocIndex needs 
at least 2 parameters!" );
 nMerk0 = eParam[ 0 ];
 eParam[ 0 ] = eParam[ 1 ];
 eParam[ 1 ] = nMerk0;
@@ -93,7 +93,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const 
sal_Char* pExtStri
 break;
 case ocIRR:
 {
-OSL_ENSURE( nAnz == 2, "+LotusToSc::DoFunc(): ocIRR needs 2 
parameters!" );
+SAL_WARN_IF( nAnz != 2, "sc", "+LotusToSc::DoFunc(): ocIRR needs 2 
parameters!" );
 nMerk0 = eParam[ 0 ];
 eParam[ 0 ] = eParam[ 1 ];
 eParam[ 1 ] = nMerk0;
@@ -128,7 +128,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, 
const sal_Char* pExtStri
 case ocRate:
 {
 // new quantity = 4!
-OSL_ENSURE( nAnz == 3,
+SAL_WARN_IF( nAnz != 3, "sc",
 "*LotusToSc::DoFunc(): ZINS() needs 3 parameters!" );
 nAnz = 4;
 eParam[ 3 ] = eParam[ 0 ];  // 3. -> 1.
@@ -139,7 +139,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, 
const sal_Char* pExtStri
 break;
 case ocNper:
 {
-OSL_ENSURE( nAnz == 3,
+SAL_WARN_IF( nAnz != 3, "sc",
 "*LotusToSc::DoFunc(): TERM() or CTERM() need 3 parameters!" );
 nAnz = 4;
   

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

2016-06-19 Thread Albert Thuswaldner
 sc/source/filter/lotus/filter.cxx   |2 
 sc/source/filter/lotus/lotform.cxx  |  136 ++--
 sc/source/filter/lotus/lotimpop.cxx |2 
 sc/source/filter/lotus/lotus.cxx|6 -
 sc/source/filter/lotus/memory.cxx   |2 
 sc/source/filter/lotus/op.cxx   |4 -
 sc/source/filter/lotus/optab.cxx|2 
 7 files changed, 77 insertions(+), 77 deletions(-)

New commits:
commit 290f3629554e04f72398cdab44c76f2356c93925
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Sun Jun 19 19:05:00 2016 +0200

tdf#39468 translated german comments in sc/filters/lotus

Change-Id: Icf87fadd9a9ffb344d4f1134a54b300fdb86a7b7
Reviewed-on: https://gerrit.libreoffice.org/26481
Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com>
Tested-by: Jenkins <c...@libreoffice.org>

diff --git a/sc/source/filter/lotus/filter.cxx 
b/sc/source/filter/lotus/filter.cxx
index be0bf63f..d833dd8 100644
--- a/sc/source/filter/lotus/filter.cxx
+++ b/sc/source/filter/lotus/filter.cxx
@@ -108,7 +108,7 @@ generate_Opcodes(LotusContext , SvStream& aStream,
 
 WKTYP ScanVersion(LotusContext , SvStream& aStream)
 {
-// PREC:pWKDatei:   pointer to open file
+// PREC:pWKFile:   pointer to open file
 // POST:return: type of file
 sal_uInt16 nOpcode(0), nVersNr(0), nRecLen(0);
 
diff --git a/sc/source/filter/lotus/lotform.cxx 
b/sc/source/filter/lotus/lotform.cxx
index 29fe909..75ce429 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -190,7 +190,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, 
const sal_Char* pExtStri
 
 if( eOc == ocPMT )
 {   // special case ocPMT, ignore (negate?) last parameter!
-// zusaetzlich: 1. -> 3., 3. -> 2., 2. -> 1.
+// additionally: 1. -> 3., 3. -> 2., 2. -> 1.
 OSL_ENSURE( nAnz == 3,
 "+LotusToSc::DoFunc(): ocPMT needs 3 parameters!" );
 aPool << eParam[ 1 ] << ocSep << eParam[ 0 ] << ocSep
@@ -233,7 +233,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, 
const sal_Char* pExtStri
 
 void LotusToSc::LotusRelToScRel( sal_uInt16 nCol, sal_uInt16 nRow, 
ScSingleRefData& rSRD )
 {
-// Col
+// Column
 if( nCol & 0x8000 )
 {
 if( nCol & 0x0080 )
@@ -650,7 +650,7 @@ void LotusToSc::Convert( const ScTokenArray*& rpErg, 
sal_Int32& rRest )
 OSL_ENSURE( nBytesLeft <= 0, "*LotusToSc::Convert(): what happens with the 
rest?" );
 
 if( rRest )
-aIn.SeekRel( nBytesLeft );  // eventuellen Rest/Ueberlauf korrigieren
+aIn.SeekRel( nBytesLeft );  // Correct any remainder/overflow
 
 rRest = 0;
 }
@@ -663,14 +663,14 @@ FUNC_TYPE LotusToSc::IndexToType( sal_uInt8 nIndex )
 FT_Variable,//1 Variable
 FT_Range,   //2 Range
 FT_Return,  //3 return
-FT_Braces,  //4 Bracket
-FT_ConstInt,//5 2-Byte-Integer
-FT_ConstString, //6 ASCII-String
+FT_Braces,  //4 Braces
+FT_ConstInt,//5 2-Byte integer
+FT_ConstString, //6 ASCII string
 FT_NOP, //7 NOP
 FT_Neg, //8 Negation
 FT_Op,  //9 Addition
 FT_Op,  //   10 Subtraction
-FT_Op,  //   11 Multiplikation
+FT_Op,  //   11 Multiplication
 FT_Op,  //   12 Division
 FT_Op,  //   13 Power of
 FT_Op,  //   14 equal
@@ -696,15 +696,15 @@ FUNC_TYPE LotusToSc::IndexToType( sal_uInt8 nIndex )
 FT_FuncFix1,//   34 Integer INT()
 FT_FuncFix1,//   35 Square Root
 FT_FuncFix1,//   36 Log10
-FT_FuncFix1,//   37 Natural Logarithmus
+FT_FuncFix1,//   37 Natural Logarithm
 FT_FuncFix0,//   38 PI
 FT_FuncFix1,//   39 Sine
 FT_FuncFix1,//   40 Cosine
 FT_FuncFix1,//   41 Tangens
-FT_FuncFix2,//   42 Arcus-Tangens 2 (4.Quadrant) <- TODO: 
correct?
-FT_FuncFix1,//   43 Arcus-Tangens (2.Quadrant)
-FT_FuncFix1,//   44 Arcus-Sinus
-FT_FuncFix1,//   45 Arcus-Cosinus
+FT_FuncFix2,//   42 Arctangens 2 (4.Quadrant) <- TODO: correct?
+FT_FuncFix1,//   43 Arctangens (2.Quadrant)
+FT_FuncFix1,//   44 Arcsine
+FT_FuncFix1,//   45 Arccosine
 FT_FuncFix1,//   46 Exponential function
 FT_FuncFix2,//   47 Modulo
 FT_FuncVar, //   48 Selection
@@ -758,7 +758,7 @@ FUNC_TYPE LotusToSc::IndexToType( sal_uInt8 nIndex )
 FT_FuncFix3, 

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

2015-11-04 Thread Albert Thuswaldner
 sc/source/ui/view/tabvwsh4.cxx |  174 +++--
 1 file changed, 83 insertions(+), 91 deletions(-)

New commits:
commit f9334da94ff8d6442865aa7f388fe1294d4b407e
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Sun Oct 11 21:01:00 2015 +0200

tdf#39468 translated german comments in tabvwsh4.cxx

Change-Id: I18b1c0384d996fc9a8637c86a439185ae3964fd0
Reviewed-on: https://gerrit.libreoffice.org/19416
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 13eef44..0ef1f40 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -106,27 +106,27 @@ void ScTabViewShell::Activate(bool bMDI)
 {
 SfxViewShell::Activate(bMDI);
 bIsActive = true;
-//  hier kein GrabFocus, sonst gibt's Probleme wenn etwas inplace editiert 
wird!
+// here no GrabFocus, otherwise there will be problems when something is 
edited inplace!
 
 if ( bMDI )
 {
-//  fuer Eingabezeile (ClearCache)
+// for input row (ClearCache)
 ScModule* pScMod = SC_MOD();
 pScMod->ViewShellChanged();
 
 ActivateView( true, bFirstActivate );
 
-//  AutoCorrect umsetzen, falls der Writer seins neu angelegt hat
+// update AutoCorrect, if Writer has newly created this
 UpdateDrawTextOutliner();
 
-//  RegisterNewTargetNames gibts nicht mehr
+// RegisterNewTargetNames does not exist anymore
 
 SfxViewFrame* pThisFrame  = GetViewFrame();
 if ( pInputHandler && pThisFrame->HasChildWindow(FID_INPUTLINE_STATUS) 
)
 {
-//  eigentlich nur beim Reload (letzte Version) noetig:
-//  Das InputWindow bleibt stehen, aber die View mitsamt 
InputHandler wird
-//  neu angelegt, darum muss der InputHandler am InputWindow 
gesetzt werden.
+// actually only required for Reload (last version):
+// The InputWindow remains, but the View along with the 
InputHandler is newly created,
+// that is why the InputHandler must be set at the InputWindow.
 SfxChildWindow* pChild = 
pThisFrame->GetChildWindow(FID_INPUTLINE_STATUS);
 if (pChild)
 {
@@ -182,7 +182,7 @@ void ScTabViewShell::Activate(bool bMDI)
 pHdl->SetRefScale( GetViewData().GetZoomX(), 
GetViewData().GetZoomY() );
 }
 
-//  Aenderungs-Dialog aktualisieren
+// update change dialog
 
 if ( pThisFrame->HasChildWindow(FID_CHG_ACCEPT) )
 {
@@ -212,10 +212,6 @@ void ScTabViewShell::Activate(bool bMDI)
 //  don't call CheckSelectionTransfer here - activating a view should not 
change the
 //  primary selection (may be happening just because the mouse was moved 
over the window)
 
-//  Wenn Referenzeingabe-Tip-Hilfe hier wieder angezeigt werden soll 
(ShowRefTip),
-//  muss sie beim Verschieben der View angepasst werden (gibt sonst 
Probleme unter OS/2
-//  beim Umschalten zwischen Dokumenten)
-
 ContextChangeEventMultiplexer::NotifyContextChange(
 GetController(),
 ::sfx2::sidebar::EnumContext::Context_Default);
@@ -252,7 +248,7 @@ void ScTabViewShell::Deactivate(bool bMDI)
 GetViewData().GetDocShell()->UpdateOle((), true);
 
 if ( pHdl )
-pHdl->NotifyChange( NULL, true ); // Timer-verzoegert wg. 
Dokumentwechsel
+pHdl->NotifyChange( NULL, true ); // timer-delayed due to document 
switching
 
 if (pScActiveViewShell == this)
 pScActiveViewShell = NULL;
@@ -261,17 +257,17 @@ void ScTabViewShell::Deactivate(bool bMDI)
 }
 else
 {
-HideNoteMarker();   // Notiz-Anzeige
+HideNoteMarker();   // note marker
 
 if ( pHdl )
-pHdl->HideTip();// Formel-AutoEingabe-Tip abschalten
+pHdl->HideTip();// Hide formula auto input tip
 }
 }
 
 void ScTabViewShell::SetActive()
 {
-// Die Sfx-View moechte sich gerne selbst aktivieren, weil dabei noch
-// magische Dinge geschehen (z.B. stuerzt sonst evtl. der Gestalter ab)
+// SFX-View would like to activate itself, since then magical things would 
happen
+// (eg else the designer may crash)
 ActiveGrabFocus();
 }
 
@@ -309,8 +305,8 @@ bool ScTabViewShell::PrepareClose(bool bUI)
 return SfxViewShell::PrepareClose(bUI);
 }
 
-//  Zoom fuer In-Place berechnen
-//  aus Verhaeltnis von VisArea und Fenstergroesse des GridWin
+// calculate zoom for in-place
+// from the ratio of VisArea and window size of GridWin
 
 void ScTabViewShell::UpdateOleZoom()
 {
@@ -370,9 +366,9 @@ void ScTabViewShell::InnerResizePixel( const Point , 
const Size  )
 aNewSize.Height() += aBorder.Top() + aBorder.Bottom();
 }
 
-DoResize( rOfs, aNewSize, t

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

2015-10-16 Thread Albert Thuswaldner
 sc/source/ui/view/tabvwsh3.cxx |   78 -
 1 file changed, 39 insertions(+), 39 deletions(-)

New commits:
commit e36a18201b945cdd4c14f9504a3e5d681faa65aa
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Sun Oct 11 13:40:18 2015 +0200

tdf#39468 translated german comments in tabvwsh3.cxx

Change-Id: I483c1aafe68da805ce194968153f1e6506327c51
Reviewed-on: https://gerrit.libreoffice.org/19300
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 2e9d63f..85b0a96 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -121,7 +121,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 const SfxItemSet*   pReqArgs= rReq.GetArgs();
 sal_uInt16  nSlot   = rReq.GetSlot();
 
-if (nSlot != SID_CURRENTCELL)   // der kommt beim MouseButtonUp
+if (nSlot != SID_CURRENTCELL)   // comes with MouseButtonUp
 HideListBox();  // Autofilter-DropDown-Listbox
 
 switch ( nSlot )
@@ -134,7 +134,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 {
 OUString aFileName = static_cast(pItem)->GetValue();
 
-// Einfuege-Position
+// insert position
 
 Point aInsertPos;
 if ( pReqArgs->GetItemState(FN_PARAM_1,true,) == 
SfxItemState::SET )
@@ -142,13 +142,13 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 else
 aInsertPos = GetInsertPos();
 
-//  als Link?
+// as Link?
 
 bool bAsLink = false;
 if ( pReqArgs->GetItemState(FN_PARAM_2,true,) == 
SfxItemState::SET )
 bAsLink = static_cast(pItem)->GetValue();
 
-// ausfuehren
+// execute
 
 PasteFile( aInsertPos, aFileName, bAsLink );
 }
@@ -166,7 +166,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 
 case SID_CHANGE_PRINTAREA:
 {
-if ( pReqArgs ) // OK aus Dialog
+if ( pReqArgs ) // OK from dialog
 {
 OUString aPrintStr;
 OUString aRowStr;
@@ -190,7 +190,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 break;
 
 case SID_ADD_PRINTAREA:
-case SID_DEFINE_PRINTAREA:  // Menue oder Basic
+case SID_DEFINE_PRINTAREA:  // menu or basic
 {
 bool bAdd = ( nSlot == SID_ADD_PRINTAREA );
 if ( pReqArgs )
@@ -203,7 +203,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 }
 else
 {
-SetPrintRanges( false, NULL, NULL, NULL, bAdd );  // 
aus Selektion
+SetPrintRanges( false, NULL, NULL, NULL, bAdd );  // 
from selection
 rReq.Done();
 }
 }
@@ -230,7 +230,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 break;
 
 case FID_RESET_PRINTZOOM:
-SetPrintZoom( 100, 0 ); // 100%, nicht auf Seiten
+SetPrintZoom( 100, 0 ); // 100%, not on pages
 rReq.Done();
 break;
 
@@ -308,10 +308,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 aScAddress.SetTab( nTab );
 
 aScRange = ScRange( aScAddress, aScAddress );
-// Zellen sollen nicht markiert werden
+// cells should not be marked
 bMark = false;
 }
-// Ist es benahmster Bereich (erst Namen dann DBBereiche) ?
+// Is it a named area (first named ranges then database 
ranges)?
 else
 {
 ScRangeUtil aRangeUtil;
@@ -330,7 +330,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 sal_Int32 nNumeric = aAddress.toInt32();
 if ( nNumeric > 0 && nNumeric <= MAXROW+1 )
 {
-//  1-basierte Zeilennummer
+// one-based row numbers
 
 aScAddress.SetRow( (SCROW)(nNumeric - 1) );
 aScAddress.SetCol( rViewData.GetCurX() );
@@ -344,7 +344,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
 if ( !ValidRow(aScRange.aStart.Row()) || 
!ValidRow(aScRange.aEnd.Row()) )
 nResult = 0;
 
-// wir haben was gefunden
+// we have found something
 if( nResult &am

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

2015-10-16 Thread Albert Thuswaldner
 sc/source/ui/view/tabvwsh8.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 7387baaa128f2b005addabc7f6a3ac0aca55a78c
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Sun Oct 11 13:49:11 2015 +0200

tdf#39468 translated german comments in tabvwsh8.cxx

Change-Id: Iae5d5138e8a030bb6beb0ec646949892b96e2a63
Reviewed-on: https://gerrit.libreoffice.org/19301
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/view/tabvwsh8.cxx b/sc/source/ui/view/tabvwsh8.cxx
index 65ac59e..7485f11 100644
--- a/sc/source/ui/view/tabvwsh8.cxx
+++ b/sc/source/ui/view/tabvwsh8.cxx
@@ -42,10 +42,10 @@ void ScTabViewShell::SetDefaultFrameLine( const 
::editeng::SvxBorderLine* pLine
 bool ScTabViewShell::HasSelection( bool bText ) const
 {
 bool bHas = false;
-ScViewData* pData = const_cast<ScViewData*>(()); // const 
weggecasted
+ScViewData* pData = const_cast<ScViewData*>(());
 if ( bText )
 {
-//  Text enthalten: Anzahl2 >= 1
+// Content contained: Count2 >= 1
 ScDocument* pDoc = pData->GetDocument();
 ScMarkData& rMark = pData->GetMarkData();
 ScAddress aCursor( pData->GetCurX(), pData->GetCurY(), 
pData->GetTabNo() );
@@ -69,11 +69,11 @@ void ScTabViewShell::UIDeactivated( SfxInPlaceClient* 
pClient )
 {
 ClearHighlightRanges();
 
-//  Move an der ViewShell soll eigentlich vom Sfx gerufen werden, wenn sich
-//  das Frame-Window wegen unterschiedlicher Toolboxen o.ae. verschiebt
-//  (um nicht aus Versehen z.B. Zeichenobjekte zu verschieben, #56515#).
-//  Dieser Mechanismus funktioniert aber momentan nicht, darum hier der 
Aufruf
-//  per Hand (im Move wird verglichen, ob die Position wirklich geaendert 
ist).
+// Move in the ViewShell should really be called from Sfx, when the
+// frame window is moved due to different toolboxes or other things
+// (to not  move painted objects by mistake, #56515#).
+// this mechanism does however not work at the moment, that is why this
+// call is here (in Move it is checked if the position has really changed).
 ForceMove();
 SfxViewShell::UIDeactivated( pClient );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-16 Thread Albert Thuswaldner
 sc/source/ui/view/tabvwsh9.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f1bcf41baea1636ff33f2c918ebb4a4fa589d10a
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Sun Oct 11 20:15:35 2015 +0200

tdf#39468 translated german comments in tabvwsh9.cxx

Change-Id: Iaab7081df2f15e7228f7f99184a048abd26decc7
Reviewed-on: https://gerrit.libreoffice.org/19307
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index fdd4c26..adaad13 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -157,7 +157,7 @@ void ScTabViewShell::GetImageMapState( SfxItemSet& rSet )
 {
 case SID_IMAP:
 {
-//  Disabled wird nicht mehr...
+// We don't disable this anymore
 
 bool bThere = false;
 SfxViewFrame* pThisFrame = GetViewFrame();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-12 Thread Albert Thuswaldner
 sc/source/ui/view/dbfunc3.cxx |2 +-
 sc/source/ui/view/gridwin.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit cd9e1d918ed6bc5ab475c1cc7c87aa6e6b507ed3
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Sat Oct 10 00:09:54 2015 +0200

tdf#39468 additional comments translated in dbfunc3.cxx and grindwin.cxx

Change-Id: I0d610a49adc0e87ff1a4e98244cb14f585239586
Reviewed-on: https://gerrit.libreoffice.org/19291
Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 6755a4d..b57419d 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -2176,7 +2176,7 @@ void ScDBFunc::RepeatDB( bool bRecord )
 else
 Query( aQueryParam, NULL, false );
 
-//  bei nicht-inplace kann die Tabelle umgestellt worden sein
+// if not inplace the sheet may have changed
 if ( !aQueryParam.bInplace && aQueryParam.nDestTab != nTab )
 SetTabNo( nTab );
 }
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 5c6cb5e..21640bf 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3420,7 +3420,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
 pViewData->GetView()->UpdateCopySourceOverlay();
 return;
 }
-// wenn semi-Modeless-SfxChildWindow-Dialog oben, keine KeyInputs:
+// if semi-modeless SfxChildWindow dialog above, then no KeyInputs:
 else if( !pViewData->IsAnyFillMode() )
 {
 if (rKeyCode.GetCode() == KEY_ESCAPE)
@@ -5249,7 +5249,7 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, 
bool bUp )
 // only redrawing what has been changed...
 lcl_PaintRefChanged( pDocSh, aOld, aNew );
 
-// oly redraw new frame (synchronously)
+// only redraw new frame (synchronously)
 pDocSh->Broadcast( ScIndexHint( SC_HINT_SHOWRANGEFINDER, nRFIndex ) );
 
 Update();   // what you move, will be seen immediately
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-12 Thread Albert Thuswaldner
 sc/source/ui/view/tabvwsh2.cxx |   36 ++--
 1 file changed, 18 insertions(+), 18 deletions(-)

New commits:
commit eb3429dbb0948308bf81ddc0d0a8fe6447119460
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Sun Oct 11 20:11:00 2015 +0200

tdf#39468 translated german comments in tabvwsh2.cxx

Change-Id: I14879cdebe95926ce24a8c3e821488aeb1f98bc0
Reviewed-on: https://gerrit.libreoffice.org/19306
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 9080743..2d639a0 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -50,7 +50,7 @@
 
 SdrView* ScTabViewShell::GetDrawView() const
 {
-return const_cast<ScTabViewShell*>(this)->GetScDrawView();// 
GetScDrawView ist nicht-const
+return const_cast<ScTabViewShell*>(this)->GetScDrawView();// 
GetScDrawView is non-const
 }
 
 void ScTabViewShell::WindowChanged()
@@ -94,8 +94,8 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
 return;
 }
 
-//  Pseudo-Slots von Draw-Toolbox auswerten
-//! wird das ueberhaupt noch gebraucht ?
+// evaluate pseudo slots in draw toolbox
+//! is this still really needed ?
 
 if (nNewId == SID_INSERT_DRAW && pArgs)
 {
@@ -124,7 +124,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
 case SVX_SNAP_DRAW_CAPTION_VERTICAL: nNewId = 
SID_DRAW_CAPTION_VERTICAL; break;
 }
 }
-else// sal_uInt16-Item vom Controller
+else// sal_uInt16 item from controller
 {
 rReq.Done();
 return;
@@ -152,7 +152,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
 }
 bool bSwitchCustom = ( !sStringItemValue.isEmpty() && 
!sDrawCustom.isEmpty() && sStringItemValue != sDrawCustom );
 
-if (nNewId == SID_INSERT_FRAME) // vom Tbx-Button
+if (nNewId == SID_INSERT_FRAME) // from Tbx button
 nNewId = SID_DRAW_TEXT;
 
 //  CTRL-SID_OBJECT_SELECT is used to select the first object,
@@ -171,17 +171,17 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
 else if ( nNewId == nDrawSfxId && ( nNewId != SID_FM_CREATE_CONTROL ||
 nNewFormId == nFormSfxId || nNewFormId == 
0 ) && !bSwitchCustom )
 {
-//  #i52871# if a different custom shape is selected, the slot id can 
be the same,
-//  so the custom shape type string has to be compared, too.
+// #i52871# if a different custom shape is selected, the slot id can 
be the same,
+// so the custom shape type string has to be compared, too.
 
-//  SID_FM_CREATE_CONTROL mit nNewFormId==0 (ohne Parameter) kommt 
beim Deaktivieren
-//  aus FuConstruct::SimpleMouseButtonUp
-//  Execute fuer die Form-Shell, um im Controller zu deselektieren
+// SID_FM_CREATE_CONTROL with nNewFormId==0 (without parameter) comes
+// from FuConstruct::SimpleMouseButtonUp when deactivating
+// Execute for the form shell, to deselect the controller
 if ( nNewId == SID_FM_CREATE_CONTROL )
 {
 GetViewData().GetDispatcher().Execute(SID_FM_LEAVE_CREATE);
 GetViewFrame()->GetBindings().InvalidateAll(false);
-//! was fuer einen Slot braucht der komische Controller wirklich, 
um das anzuzeigen
+//! what kind of slot does the weird controller really need to 
display this
 }
 
 bEx = !bEx;
@@ -192,10 +192,10 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
 
 if ( nDrawSfxId == SID_FM_CREATE_CONTROL && nNewId != nDrawSfxId )
 {
-//  Wechsel von Control- zu Zeichenfunktion -> im Control-Controller 
deselektieren
+// switching from control- to paint function -> deselect in 
control-controller
 GetViewData().GetDispatcher().Execute(SID_FM_LEAVE_CREATE);
 GetViewFrame()->GetBindings().InvalidateAll(false);
-//! was fuer einen Slot braucht der komische Controller wirklich, um 
das anzuzeigen
+//! what kind of slot does the weird controller really need to display 
this
 }
 
 SetDrawSelMode(bEx);
@@ -204,7 +204,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
 
 if ( bSelectFirst )
 {
-//  select first draw object if none is selected yet
+// select first draw object if none is selected yet
 if(!pView->AreObjectsMarked())
 {
 // select first object
@@ -220,7 +220,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
 nDrawSfxId = nNewId;
 sDrawCustom.clear();// value is set below for custom shapes
 
-if ( nNewId != SID_DRA

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

2015-10-09 Thread Albert Thuswaldner
 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d5dc2a2a726dd151fb30fae25478511dce929dfa
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Mon Oct 5 21:02:35 2015 +0200

tdf#93243 replace boost::bind with C++11 lambdas Cell...PropertyPanel.cxx

Change-Id: Id2d892742cd69da2deba51775bd04ecbec32f436
Reviewed-on: https://gerrit.libreoffice.org/19170
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Noel Grandin <noelgran...@gmail.com>

diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx 
b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index e3b77fd..4ae02d3 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -195,7 +195,7 @@ IMPL_LINK_TYPED(CellAppearancePropertyPanel, 
TbxCellBorderSelectHdl, ToolBox*, p
 mpCellBorderStylePopup.reset(
 new CellBorderStylePopup(
 this,
-
::boost::bind(::CreateCellBorderStylePopupControl, 
this, _1)));
+[this] (svx::sidebar::PopupContainer* pParent) { return 
this->CreateCellBorderStylePopupControl(pParent); } ));
 }
 
 if(mpCellBorderStylePopup.get())
@@ -217,7 +217,7 @@ IMPL_LINK_TYPED(CellAppearancePropertyPanel, 
TbxLineStyleSelectHdl, ToolBox*, pT
 mpCellLineStylePopup.reset(
 new CellLineStylePopup(
 this,
-
::boost::bind(::CreateCellLineStylePopupControl, 
this, _1)));
+[this] (svx::sidebar::PopupContainer* pParent) { return 
this->CreateCellBorderStylePopupControl(pParent); } ));
 }
 
 if(mpCellLineStylePopup.get())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-09 Thread Albert Thuswaldner
 sc/workben/test.cxx |  121 +---
 1 file changed, 60 insertions(+), 61 deletions(-)

New commits:
commit e695f173ccd3cd6c01c7191b98bb452fd387eb6d
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Fri Oct 9 19:59:49 2015 +0200

tdf#39468 translated german comments in test.cxx

Change-Id: Ie40fdafe89d2feed45306b50a358a02b077ceb52
Reviewed-on: https://gerrit.libreoffice.org/19287
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Michael Stahl <mst...@redhat.com>

diff --git a/sc/workben/test.cxx b/sc/workben/test.cxx
index f6b32ad..6da55df 100644
--- a/sc/workben/test.cxx
+++ b/sc/workben/test.cxx
@@ -46,7 +46,7 @@
 #include 
 #include 
 
-//! das muss als Konstante in irgendeine idl-Datei
+//! this needs be in some IDL file as a constant 
 #define TEXTCONTROLCHAR_PARAGRAPH_BREAK 0
 
 class MyFixedText : public FixedText
@@ -194,7 +194,7 @@ MyWindow::MyWindow( vcl::Window *pParent ) :
 aCountField.SetValue(1);
 
 aCountButton.SetPosSizePixel( Point(10,40), Size(100,30) );
-aCountButton.SetText("hochzaehlen");
+aCountButton.SetText("increment");
 
 aTimeText.SetPosSizePixel( Point(10,80), Size(100,20) );
 
@@ -211,10 +211,10 @@ MyWindow::MyWindow( vcl::Window *pParent ) :
 aBlaButton.SetText("Bla");
 
 aTabButton.SetPosSizePixel( Point(10,310), Size(100,30) );
-aTabButton.SetText("Tabellen");
+aTabButton.SetText("sheets");
 
 aViewButton.SetPosSizePixel( Point(10,360), Size(100,30) );
-aViewButton.SetText("Pfui");
+aViewButton.SetText("Ugh");
 
 aCountButton.SetClickHdl(LINK(this, MyWindow, CountHdl));
 aTextButton.SetClickHdl(LINK(this, MyWindow, TextHdl));
@@ -239,7 +239,7 @@ MyWindow::MyWindow( vcl::Window *pParent ) :
 XSpreadsheetDocumentRef lcl_GetDocument()
 {
 XServiceManagerRef xProv = getGlobalServiceManager();
-OSL_ENSURE( xProv.is(), "Kein ServiceManager!" );
+OSL_ENSURE( xProv.is(), "no ServiceManager!" );
 
 XServiceRegistryRef xReg = 
(XServiceRegistry*)xProv->queryInterface(XServiceRegistry::getSmartUik());
 if ( !xReg )
@@ -254,8 +254,8 @@ XSpreadsheetDocumentRef lcl_GetDocument()
 xSSI->newInstance()->queryInterface( 
XModelCollection::getSmartUik() );
 sal_uInt16 nCount = aCollRef->getCount();
 
-XSpreadsheetDocumentRef xModel; // Calc-Model
-for (sal_uInt16 nMod=0; nModgetItemByIndex( nMod );
 if ( aRef )
@@ -271,9 +271,9 @@ XSpreadsheetDocumentRef lcl_GetDocument()
 XInterfaceRef lcl_GetView()
 {
 XInterfaceRef xView;
-XSpreadsheetDocumentRef xDoc = lcl_GetDocument();   // Calc-Model
+XSpreadsheetDocumentRef xDoc = lcl_GetDocument();   // calc model
 if (xDoc)
-xView = xDoc->getDDELinks();//! temporaer zum Testen !
+xView = xDoc->getDDELinks();//! temporary for test !
 
 return xView;
 }
@@ -322,24 +322,24 @@ void lcl_SetText( const XTextRef& xText )
 XParagraphCursorRef xPara = (XParagraphCursor*)
 
xCursor->queryInterface(XParagraphCursor::getSmartUik());
 
-if (!xPos.is() || !xControl.is() || !xPara.is()) return;// PropertySet 
kann fehlen
+if (!xPos.is() || !xControl.is() || !xPara.is()) return;// PropertySet 
can be missing
 
-xText->setText(L"bla fasel");
+xText->setText(L"bla babbel");
 xCursor->gotoEnd(false);
 xControl->insertControlCharacter( TEXTCONTROLCHAR_PARAGRAPH_BREAK );
 xPos->collapseToEnd();
-xPos->setText(L"s\xFClz");  // zweiter Absatz
+xPos->setText(L"s\xFClz");  // second paragraph
 
 xCursor->gotoStart(false);
 xPara->gotoEndOfParagraph(false);
-xCursor->goLeft(5, true);   // letzte 5 Zeichen im 1. Absatz
+xCursor->goLeft(5, true);   // last 5 characters in the first 
paragraph
 if (xProp.is())
 xProp->setPropertyValue(L"Bold", UsrAny((sal_Bool)true));
 }
 
 void lcl_DoCount()
 {
-XSpreadsheetDocumentRef xDoc = lcl_GetDocument();   // Calc-Model
+XSpreadsheetDocumentRef xDoc = lcl_GetDocument();   // calc model
 if (xDoc)
 {
 XActionLockableRef xLock = (XActionLockable*)
@@ -347,7 +347,7 @@ void lcl_DoCount()
 XCalculateRef xCalc = (XCalculate*)
 xDoc->queryInterface(XCalculate::getSmartUik());
 if (xLock)
-xLock->addActionLock(); // nicht 
zwischendurch painten
+xLock->addActionLock(); // don't paint in 
between
 if (xCalc)
 xCalc->setAutomaticCalculation(false);
 
@@ -363,8 +363,7 @@ voi

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

2015-10-09 Thread Albert Thuswaldner
 sc/source/ui/styleui/styledlg.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 48069490a1623f43455401ef0c74a2b19237be56
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Fri Oct 9 18:24:39 2015 +0200

tdf#39468 translated german comments in styledlg.cxx

Change-Id: Ib6ad2fff04dbbcdb3d5f527d0a23c771409dc6e3
Reviewed-on: https://gerrit.libreoffice.org/19285
Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sc/source/ui/styleui/styledlg.cxx 
b/sc/source/ui/styleui/styledlg.cxx
index bb5ced1..bbcd544 100644
--- a/sc/source/ui/styleui/styledlg.cxx
+++ b/sc/source/ui/styleui/styledlg.cxx
@@ -69,7 +69,7 @@ ScStyleDlg::ScStyleDlg( vcl::Window* pParent,
 OSL_ENSURE(pFact, "Dialog creation failed!");
 switch ( nRscId )
 {
-case RID_SCDLG_STYLES_PAR:  // Zellformatvorlagen
+case RID_SCDLG_STYLES_PAR:  // cell format styles
 {
 SvtCJKOptions aCJKOptions;
 OSL_ENSURE(pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_NUMBERFORMAT ), "GetTabPageCreatorFunc fail!");
@@ -102,7 +102,7 @@ ScStyleDlg::ScStyleDlg( vcl::Window* pParent,
 }
 break;
 
-case RID_SCDLG_STYLES_PAGE: // Seitenvorlagen
+case RID_SCDLG_STYLES_PAGE: // page styles
 {
 OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), 
"GetTabPageCreatorFunc fail!");
 OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ), 
"GetTabPageRangesFunc fail!");
@@ -135,7 +135,7 @@ void ScStyleDlg::PageCreated( sal_uInt16 nPageId, 
SfxTabPage& rTabPage )
 const SfxPoolItem* pInfoItem
 = pDocSh->GetItem( SID_ATTR_NUMBERFORMAT_INFO );
 
-OSL_ENSURE( pInfoItem, "NumberInfoItem nicht gefunden!" );
+OSL_ENSURE( pInfoItem, "NumberInfoItem not found!" );
 
 aSet.Put (SvxNumberInfoItem( static_cast(*pInfoItem) ) );
 rTabPage.PageCreated(aSet);
@@ -145,7 +145,7 @@ void ScStyleDlg::PageCreated( sal_uInt16 nPageId, 
SfxTabPage& rTabPage )
 const SfxPoolItem* pInfoItem
 = pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST );
 
-OSL_ENSURE( pInfoItem, "FontListItem nicht gefunden!" );
+OSL_ENSURE( pInfoItem, "FontListItem not found!" );
 
 aSet.Put (SvxFontListItem(static_cast(*pInfoItem).GetFontList(), SID_ATTR_CHAR_FONTLIST));
 rTabPage.PageCreated(aSet);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-05 Thread Albert Thuswaldner
 sc/source/filter/excel/excimp8.cxx |   13 ++---
 sc/source/filter/inc/excimp8.hxx   |6 ++
 2 files changed, 8 insertions(+), 11 deletions(-)

New commits:
commit 7d82dfca4d78841930a4411371c3d211badeccdb
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Sun Oct 4 11:43:44 2015 +0200

tdf#93243 replace boost::bind with C++11 lambdas in excimp8.cxx

Change-Id: I810b524ce59703ca298e3c171f590c5dd75396de
Reviewed-on: https://gerrit.libreoffice.org/19122
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Noel Grandin <noelgran...@gmail.com>

diff --git a/sc/source/filter/excel/excimp8.cxx 
b/sc/source/filter/excel/excimp8.cxx
index eba2d5c..e1ecf4b 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -846,7 +846,7 @@ void XclImpAutoFilterData::EnableRemoveFilter()
 void XclImpAutoFilterBuffer::Insert( RootData* pRoot, const ScRange& rRange)
 {
 if( !GetByTab( rRange.aStart.Tab() ) )
-maFilters.push_back( new XclImpAutoFilterData( pRoot, rRange) );
+maFilters.push_back( XclImpAutoFilterSharePtr(new 
XclImpAutoFilterData( pRoot, rRange) ));
 }
 
 void XclImpAutoFilterBuffer::AddAdvancedRange( const ScRange& rRange )
@@ -865,17 +865,16 @@ void XclImpAutoFilterBuffer::AddExtractPos( const 
ScRange& rRange )
 
 void XclImpAutoFilterBuffer::Apply()
 {
-std::for_each(maFilters.begin(),maFilters.end(),
-boost::bind(::Apply,_1));
+for( const auto& rFilterPtr : maFilters )
+rFilterPtr->Apply();
 }
 
 XclImpAutoFilterData* XclImpAutoFilterBuffer::GetByTab( SCTAB nTab )
 {
-boost::ptr_vector::iterator it;
-for( it = maFilters.begin(); it != maFilters.end(); ++it )
+for( const auto& rFilterPtr : maFilters )
 {
-if( it->Tab() == nTab )
-return &(*it);
+if( rFilterPtr->Tab() == nTab )
+return rFilterPtr.get();
 }
 return NULL;
 }
diff --git a/sc/source/filter/inc/excimp8.hxx b/sc/source/filter/inc/excimp8.hxx
index e50cfd4..2ce1135 100644
--- a/sc/source/filter/inc/excimp8.hxx
+++ b/sc/source/filter/inc/excimp8.hxx
@@ -22,8 +22,6 @@
 
 #include 
 
-#include 
-
 #include "imp_op.hxx"
 #include "root.hxx"
 #include "excscen.hxx"
@@ -123,8 +121,8 @@ public:
 XclImpAutoFilterData*   GetByTab( SCTAB nTab );
 
 private:
-
-boost::ptr_vector maFilters;
+typedef std::shared_ptr XclImpAutoFilterSharePtr;
+std::vector maFilters;
 };
 
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-10-05 Thread Albert Thuswaldner
 sc/source/ui/undo/undoblk.cxx  |4 ++--
 sc/source/ui/undo/undoblk3.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c501c6545369da7936fd4a0d52b6cc01f5663860
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Sun Oct 4 11:30:35 2015 +0200

tdf#39468 translated german comments in undoblk*.cxx

Change-Id: Ia4bb41737c014946f22974640768a0232dc87f49
Reviewed-on: https://gerrit.libreoffice.org/19121
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Michael Stahl <mst...@redhat.com>

diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index d1db3b4..3c88e47 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -462,7 +462,7 @@ void ScUndoDeleteCells::DoChange( const bool bUndo )
 }
 }
 
-// Zeichnen
+// paint
 sal_uInt16 nPaint = PAINT_GRID;
 switch (eCmd)
 {
@@ -2279,7 +2279,7 @@ ScUndoBorder::~ScUndoBorder()
 
 OUString ScUndoBorder::GetComment() const
 {
-return ScGlobal::GetRscString( STR_UNDO_SELATTRLINES ); //! eigener 
String?
+return ScGlobal::GetRscString( STR_UNDO_SELATTRLINES ); //! own string?
 }
 
 void ScUndoBorder::Undo()
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 4a891da..95b0077 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -1574,7 +1574,7 @@ ScUndoRemoveAreaLink::~ScUndoRemoveAreaLink()
 
 OUString ScUndoRemoveAreaLink::GetComment() const
 {
-return ScGlobal::GetRscString( STR_UNDO_REMOVELINK );   //! eigener Text ??
+return ScGlobal::GetRscString( STR_UNDO_REMOVELINK );   //! own text ??
 }
 
 void ScUndoRemoveAreaLink::Undo()
@@ -1735,7 +1735,7 @@ void ScUndoUpdateAreaLink::Redo()
 aOldArea, aOldRange );
 if (pLink)
 {
-pLink->SetSource( aNewDoc, aNewFlt, aNewOpt, aNewArea );// 
neue Werte im Link
+pLink->SetSource( aNewDoc, aNewFlt, aNewOpt, aNewArea );// new 
values in link
 pLink->SetDestArea( aNewRange );
 pLink->SetRefreshDelay( nNewRefresh );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[WIP] Remove boost dependency in sc/source/filter/excel/excimp8.cxx

2015-09-13 Thread Albert Thuswaldner
Hi,
It would be great if I could get some advice on how to move forward on
removing more of the boost dependency.

Originally I was working on this:
[bug 93243] replace boost::bind with C++11 lambdas

Line 18: sc/source/filter/excel/excimp8.cxx
std::for_each(maFilters.begin(),maFilters.end(),
boost::bind(::Apply,_1));

Searching the code I hav found examples where this type of for_each
loop is replaced by a simple for loop:

for( const auto& rFilterPtr : maFilters )
rFilterPtr->Apply();

This requires some additional modificatioins to the code which can be
seen in the attached patch.

The question which is left is what to do with what the function below
should return:

XclImpAutoFilterData* XclImpAutoFilterBuffer::GetByTab( SCTAB nTab )

Should i modify it to return XclImpAutoFilterSharePtr instead?
Am I on the right track in general?

Thanks for the help!

/Albert
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index eba2d5c..5718d42 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -846,7 +846,7 @@ void XclImpAutoFilterData::EnableRemoveFilter()
 void XclImpAutoFilterBuffer::Insert( RootData* pRoot, const ScRange& rRange)
 {
 if( !GetByTab( rRange.aStart.Tab() ) )
-maFilters.push_back( new XclImpAutoFilterData( pRoot, rRange) );
+maFilters.push_back( XclImpAutoFilterSharePtr(new XclImpAutoFilterData( pRoot, rRange) ));
 }
 
 void XclImpAutoFilterBuffer::AddAdvancedRange( const ScRange& rRange )
@@ -865,17 +865,17 @@ void XclImpAutoFilterBuffer::AddExtractPos( const ScRange& rRange )
 
 void XclImpAutoFilterBuffer::Apply()
 {
-std::for_each(maFilters.begin(),maFilters.end(),
-boost::bind(::Apply,_1));
+for( const auto& rFilterPtr : maFilters )
+rFilterPtr->Apply();
 }
 
 XclImpAutoFilterData* XclImpAutoFilterBuffer::GetByTab( SCTAB nTab )
 {
-boost::ptr_vector::iterator it;
+std::vector::iterator it;
 for( it = maFilters.begin(); it != maFilters.end(); ++it )
 {
 if( it->Tab() == nTab )
-return &(*it);
+return (*it);
 }
 return NULL;
 }
diff --git a/sc/source/filter/inc/excimp8.hxx b/sc/source/filter/inc/excimp8.hxx
index e50cfd4..a3bfc8a 100644
--- a/sc/source/filter/inc/excimp8.hxx
+++ b/sc/source/filter/inc/excimp8.hxx
@@ -22,7 +22,8 @@
 
 #include 
 
-#include 
+//#include 
+//#include 
 
 #include "imp_op.hxx"
 #include "root.hxx"
@@ -123,8 +124,8 @@ public:
 XclImpAutoFilterData*   GetByTab( SCTAB nTab );
 
 private:
-
-boost::ptr_vector maFilters;
+typedef std::shared_ptr XclImpAutoFilterSharePtr;
+std::vector maFilters;
 };
 
 #endif
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2015-09-11 Thread Albert Thuswaldner
 sc/source/ui/view/hdrcont.cxx |   22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit ee9a98966a4c1388dcf47757eeaa380d47f6a6a2
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Tue Sep 8 19:26:13 2015 +0200

tdf#39468 translated german comments in hdrcont.cxx

Change-Id: I0dae68656f1dbe3828e58eb177ce9e98a071fe20
Reviewed-on: https://gerrit.libreoffice.org/18418
Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com>

diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index 18f3ce1..6bcc0bb 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -68,7 +68,7 @@ ScHeaderControl::ScHeaderControl( vcl::Window* pParent, 
SelectionEngine* pSelect
 EnableRTL( false );
 
 aNormFont = GetFont();
-aNormFont.SetTransparent( true );   //! WEIGHT_NORMAL hart setzen ???
+aNormFont.SetTransparent( true );   //! hard-set WEIGHT_NORMAL ???
 aBoldFont = aNormFont;
 aBoldFont.SetWeight( WEIGHT_BOLD );
 
@@ -85,7 +85,7 @@ ScHeaderControl::ScHeaderControl( vcl::Window* pParent, 
SelectionEngine* pSelect
 nWidth = nSmallWidth = aSize.Width();
 nBigWidth = LogicToPixel( Size( GetTextWidth(OUString("888")), 0 ) 
).Width() + 5;
 
-SetBackground();// sonst Probleme auf OS/2 !?!?!
+SetBackground();
 }
 
 void ScHeaderControl::SetWidth( long nNew )
@@ -127,7 +127,7 @@ void ScHeaderControl::DoPaint( SCCOLROW nStart, SCCOLROW 
nEnd )
 
 void ScHeaderControl::SetMark( bool bNewSet, SCCOLROW nNewStart, SCCOLROW 
nNewEnd )
 {
-bool bEnabled = SC_MOD()->GetInputOptions().GetMarkHeader();//! cachen?
+bool bEnabled = SC_MOD()->GetInputOptions().GetMarkHeader();//! cache?
 if (!bEnabled)
 bNewSet = false;
 
@@ -237,8 +237,8 @@ void ScHeaderControl::DrawShadedRect( long nStart, long 
nEnd, const Color& rBase
 
 void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const 
Rectangle& rRect )
 {
-//  fuer VCL ist es wichtig, wenig Aufrufe zu haben, darum werden die 
aeusseren
-//  Linien zusammengefasst
+// It is important for VCL to have few calls, that is why the outer lines 
are
+// grouped together
 
 const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
 bool bHighContrast = rStyleSettings.GetHighContrastMode();
@@ -295,8 +295,8 @@ void ScHeaderControl::Paint( vcl::RenderContext& 
/*rRenderContext*/, const Recta
 nInitScrPos = GetSizePixel().Width() - 1;
 }
 
-//  aeussere Linien komplett durchzeichnen
-//  Zuerst Ende der letzten Zelle finden
+// complete the painting of the outer lines
+// first find the end of the last cell
 
 long nLineEnd = nInitScrPos - nLayoutSign;
 
@@ -550,7 +550,7 @@ void ScHeaderControl::Paint( vcl::RenderContext& 
/*rRenderContext*/, const Recta
 break;
 }
 
-//  bei Selektion der ganzen Zeile/Spalte:
+// when selecting the complete row/column:
 //  InvertRect( Rectangle( aScrPos, aEndPos ) );
 }
 nScrPos += nSizePix * nLayoutSign;  // also if before the 
visible area
@@ -701,8 +701,8 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& 
rMEvt )
 
 if (IsMouseCaptured())
 {
-//  Tracking statt CaptureMouse, damit sauber abgebrochen werden 
kann
-//! Irgendwann sollte die SelectionEngine selber StartTracking 
rufen!?!
+// tracking instead of CaptureMouse, so it can be cancelled cleanly
+//! someday SelectionEngine itself should call StartTracking!?!
 ReleaseMouse();
 StartTracking();
 }
@@ -932,7 +932,7 @@ void ScHeaderControl::RequestHelp( const HelpEvent& rHEvt )
 Window::RequestHelp(rHEvt);
 }
 
-//  Dummys fuer virtuelle Methoden
+//  dummies for virtual methods
 
 SCCOLROW ScHeaderControl::GetHiddenCount( SCCOLROW nEntryNo ) const
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-09-09 Thread Albert Thuswaldner
 sc/source/ui/drawfunc/drawsh2.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 083c865f9af70a12dfed52b07785e303eb61b397
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Tue Sep 8 19:57:48 2015 +0200

tdf#93243 replace boost::bind with C++11 lambdas in drawsh2.cxx

Change-Id: Id9098c07d7aff62adb26165611a545efcfe87a34
Reviewed-on: https://gerrit.libreoffice.org/18419
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Noel Grandin <noelgran...@gmail.com>

diff --git a/sc/source/ui/drawfunc/drawsh2.cxx 
b/sc/source/ui/drawfunc/drawsh2.cxx
index e01639d..d582b3a 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -50,15 +50,13 @@
 #include 
 #include 
 
-#include 
-
 using namespace com::sun::star;
 
 ScDrawShell::ScDrawShell( ScViewData* pData ) :
 SfxShell(pData->GetViewShell()),
 pViewData( pData ),
 mpSelectionChangeHandler(new svx::sidebar::SelectionChangeHandler(
-::boost::bind(::GetSidebarContextName, this),
+[this] () { return this->GetSidebarContextName(); },
 GetFrame()->GetFrame().GetController(),
 sfx2::sidebar::EnumContext::Context_Cell))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-09-08 Thread Albert Thuswaldner
 sc/source/ui/view/tabvwshc.cxx |   24 
 sc/source/ui/view/tabvwshd.cxx |2 +-
 2 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 607197f6ce494ed8672b0e5c44d975ad942f00fa
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Fri Sep 4 21:00:11 2015 +0200

tdf#39468 translated german comments in tabvwshc.cxx and tabvwshd.cxx

Change-Id: I1dd4c8a27bb63a91bead11d386748cd9cf2fe31c
Reviewed-on: https://gerrit.libreoffice.org/18349
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 38502d2..6b8118e 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -118,8 +118,8 @@ VclPtr ScTabViewShell::CreateRefDialog(
 SfxChildWinInfo* pInfo,
 vcl::Window* pParent, sal_uInt16 nSlotId )
 {
-//  Dialog nur aufmachen, wenn ueber ScModule::SetRefDialog gerufen, damit
-//  z.B. nach einem Absturz offene Ref-Dialoge nicht wiederkommen 
(#42341#).
+// only open dialog when called through ScModule::SetRefDialog,
+// so that it does not re appear for instance after a crash (#42341#).
 
 if ( SC_MOD()->GetCurRefDlgId() != nSlotId )
 return NULL;
@@ -236,7 +236,7 @@ VclPtr ScTabViewShell::CreateRefDialog(
 
 case SID_DEFINE_DBNAME:
 {
-//  wenn auf einem bestehenden Bereich aufgerufen, den markieren
+// when called for an existing range, then mark
 GetDBData( true, SC_DB_OLD );
 const ScMarkData& rMark = GetViewData().GetMarkData();
 if ( !rMark.IsMarked() && !rMark.IsMultiMarked() )
@@ -268,7 +268,7 @@ VclPtr ScTabViewShell::CreateRefDialog(
 
 aArgSet.Put( aItem );
 
-// aktuelle Tabelle merken (wg. RefInput im Dialog)
+// mark current sheet (due to RefInput in dialog)
 GetViewData().SetRefTabNo( GetViewData().GetTabNo() );
 
 pResult = VclPtr::Create( pB, pCW, pParent, 
aArgSet );
@@ -295,7 +295,7 @@ VclPtr ScTabViewShell::CreateRefDialog(
   (),
) );
 
-// aktuelle Tabelle merken (wg. RefInput im Dialog)
+// mark current sheet (due to RefInput in dialog)
 GetViewData().SetRefTabNo( GetViewData().GetTabNo() );
 
 pResult = VclPtr::Create( pB, pCW, pParent, aArgSet );
@@ -406,7 +406,7 @@ VclPtr ScTabViewShell::CreateRefDialog(
 
 case SID_OPENDLG_PIVOTTABLE:
 {
-//  all settings must be in pDialogDPObject
+// all settings must be in pDialogDPObject
 
 if( pDialogDPObject )
 {
@@ -427,7 +427,7 @@ VclPtr ScTabViewShell::CreateRefDialog(
 
 case SID_OPENDLG_FUNCTION:
 {
-//  Dialog schaut selber, was in der Zelle steht
+// dialog checks, what is in the cell
 
 pResult = VclPtr::Create( pB, pCW, pParent, 
(),ScGlobal::GetStarCalcFunctionMgr() );
 }
@@ -443,7 +443,7 @@ VclPtr ScTabViewShell::CreateRefDialog(
 
 case FID_CHG_SHOW:
 {
-//  Dialog schaut selber, was in der Zelle steht
+// dialog checks, what is in the cell
 
 pResult = VclPtr::Create( pB, pCW, pParent, 
() );
 }
@@ -451,7 +451,7 @@ VclPtr ScTabViewShell::CreateRefDialog(
 
 case WID_SIMPLE_REF:
 {
-//  Dialog schaut selber, was in der Zelle steht
+// dialog checks, what is in the cell
 
 ScViewData& rViewData = GetViewData();
 rViewData.SetRefTabNo( rViewData.GetTabNo() );
@@ -518,9 +518,9 @@ VclPtr ScTabViewShell::CreateRefDialog(
 
 if (pResult)
 {
-//  Die Dialoge gehen immer mit eingeklapptem Zusaetze-Button auf,
-//  darum muss die Groesse ueber das Initialize gerettet werden
-//  (oder den Zusaetze-Status mit speichern !!!)
+// the dialogs are always displayed with the option button collapsed,
+// the size has to be carried over initialize
+// (or store the option status !!!)
 
 Size aSize = pResult->GetSizePixel();
 pResult->Initialize( pInfo );
diff --git a/sc/source/ui/view/tabvwshd.cxx b/sc/source/ui/view/tabvwshd.cxx
index de13fc6..1602ef5 100644
--- a/sc/source/ui/view/tabvwshd.cxx
+++ b/sc/source/ui/view/tabvwshd.cxx
@@ -32,7 +32,7 @@
 
 // STATIC DATA ---
 
-//! Parent-Window fuer Dialoge
+//! parent window for dialogs
 //! Problem: OLE Server!
 
 vcl::Window* ScTabViewShell::GetDialogParent()
___
Libreoffice-commits mailing list
libreoffice-comm...@l

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

2015-09-08 Thread Albert Thuswaldner
 sc/source/ui/view/hintwin.cxx  |4 ++--
 sc/source/ui/view/notemark.cxx |6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 5aa58e499a1fbd4e54692233d1b7f8c6237ad8e2
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Tue Sep 8 19:05:03 2015 +0200

tdf#39468 translated german comments in hintwin.cxx and notemark.cxx

Change-Id: Ifedea7c26689a2760b6ba9ee4713f942c62bbdab
Reviewed-on: https://gerrit.libreoffice.org/18417
Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com>

diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx
index b9d5113..c0e630e 100644
--- a/sc/source/ui/view/hintwin.cxx
+++ b/sc/source/ui/view/hintwin.cxx
@@ -29,8 +29,8 @@ ScHintWindow::ScHintWindow( vcl::Window* pParent, const 
OUString& rTit, const OU
 aTitle( rTit ),
 aMessage( convertLineEnd(rMsg, LINEEND_CR) )
 {
-//  Hellgelb, wie Notizen in detfunc.cxx
-Color aYellow( 255,255,192 );   // hellgelb
+// pale yellow, the same as for notes in detfunc.cxx
+Color aYellow( 255,255,192 );   // pale yellow
 SetBackground( aYellow );
 
 aTextFont = GetFont();
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 64b63ac..24ae12d 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -86,8 +86,8 @@ IMPL_LINK_NOARG_TYPED(ScNoteMarker, TimeHdl, Timer *, void)
 OutputDevice* pPrinter = pDoc->GetRefDevice();
 if (pPrinter)
 {
-//  Am Outliner des Draw-Model ist auch der Drucker als RefDevice 
gesetzt,
-//  und es soll einheitlich aussehen.
+// On the outliner of the draw model also the printer is set as 
RefDevice,
+// and it should look uniform.
 Outliner& rOutliner = pModel->GetDrawOutliner();
 rOutliner.SetRefDevice(pPrinter);
 }
@@ -101,7 +101,7 @@ IMPL_LINK_NOARG_TYPED(ScNoteMarker, TimeHdl, Timer *, void)
 aRect = pObject->GetCurrentBoundRect();
 }
 
-// Page einfuegen damit das Model sie kennt und auch deleted
+// Insert page so that the model recognise it and also deleted
 pModel->InsertPage( pPage );
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-09-08 Thread Albert Thuswaldner
 sc/source/ui/view/printfun.cxx |   12 ++--
 sc/source/ui/view/tabcont.cxx  |   32 
 2 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit a49d4ead6f3e90e5acc0ac264933a2472915b891
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Tue Sep 8 18:50:32 2015 +0200

tdf#39468 translated german comments in printfun.cxx and tabcont.cxx

Change-Id: I33618d35285506798492a96af98fc8d7edff9173
Reviewed-on: https://gerrit.libreoffice.org/18415
Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com>

diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index cff117f..e6e6f7b 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -205,7 +205,7 @@ void ScPrintFunc::Construct( const ScPrintOptions* pOptions 
)
 
 InitParam(pOptions);
 
-pPageData = NULL;   // wird nur zur Initialisierung gebraucht
+pPageData = NULL;   // is only needed for initialisation
 }
 
 ScPrintFunc::ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, SCTAB 
nTab,
@@ -650,7 +650,7 @@ bool ScPrintFunc::AdjustPrintArea( bool bNew )
 nStartCol = 0;
 nStartRow = 0;
 if (!pDoc->GetPrintArea( nPrintTab, nEndCol, nEndRow, bNotes ))
-return false;   // nix
+return false;   // nothing
 }
 else
 {
@@ -1213,13 +1213,13 @@ static void lcl_DrawGraphic( const SvxBrushItem 
, vcl::RenderContext *pOu
 }
 }
 
-//  Rahmen wird nach innen gezeichnet
+// The frame is drawn inwards
 
 void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
 const SvxBoxItem* pBorderData, const 
SvxBrushItem* pBackground,
 const SvxShadowItem* pShadow )
 {
-//! direkte Ausgabe aus SvxBoxItem !!!
+//! direct output from SvxBoxItem !!!
 
 if (pBorderData)
 if ( !pBorderData->GetTop() && !pBorderData->GetBottom() && 
!pBorderData->GetLeft() &&
@@ -1227,7 +1227,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, 
long nScrW, long nScrH,
 pBorderData = NULL;
 
 if (!pBorderData && !pBackground && !pShadow)
-return; // nichts zu tun
+return; // nothing to do
 
 long nLeft   = 0;
 long nRight  = 0;
@@ -2877,7 +2877,7 @@ void ScPrintFunc::CalcZoom( sal_uInt16 nRangeNo ) 
  // calcu
 }
 else
 {
-OSL_ENSURE( aTableParam.bScaleNone, "kein Scale-Flag gesetzt" );
+OSL_ENSURE( aTableParam.bScaleNone, "no scale flag is set" );
 nZoom = 100;
 CalcPages();
 }
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index abe0aac..53f5e85 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -167,8 +167,8 @@ void ScTabControl::MouseButtonDown( const MouseEvent& rMEvt 
)
 ScModule* pScMod = SC_MOD();
 if ( !pScMod->IsModalMode() && !pScMod->IsFormulaMode() && !IsInEditMode() 
)
 {
-//  View aktivieren
-pViewData->GetViewShell()->SetActive(); // Appear und 
SetViewFrame
+// activate View
+pViewData->GetViewShell()->SetActive(); // Appear and 
SetViewFrame
 pViewData->GetView()->ActiveGrabFocus();
 }
 
@@ -237,9 +237,9 @@ void ScTabControl::Select()
 SCTAB nCount = pDoc->GetTableCount();
 SCTAB i;
 
-if ( pScMod->IsTableLocked() )  // darf jetzt nicht umgeschaltet 
werden ?
+if ( pScMod->IsTableLocked() )  // may not be switched now ?
 {
-//  den alten Zustand des TabControls wiederherstellen:
+// restore the old state of TabControls
 
 for (i=0; i<nCount; i++)
 SelectPage( static_cast(i)+1, rMark.GetTableSelect(i) 
);
@@ -249,14 +249,14 @@ void ScTabControl::Select()
 }
 
 sal_uInt16 nCurId = GetCurPageId();
-if (!nCurId) return;// kann vorkommen, wenn bei Excel-Import 
alles versteckt ist
+if (!nCurId) return;// for Excel import it can happen that 
everything is hidden
 sal_uInt16 nPage = nCurId - 1;
 
-// OLE-inplace deaktivieren
+// OLE-inplace deactivate
 if ( nPage != static_cast(pViewData->GetTabNo()) )
 pViewData->GetView()->DrawMarkListHasChanged();
 
-//  InputEnterHandler nur wenn nicht Referenzeingabe
+//  InputEnterHandler onlw when not reference input
 
 bool bRefMode = pScMod->IsFormulaMode();
 if (!bRefMode)
@@ -270,7 +270,7 @@ void ScTabControl::Select()
 pViewData->GetView()->SetTabNo( static_cast(nPage) );
 else
 {
-//  Tabelle fuer Basic ist 1

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

2015-09-08 Thread Albert Thuswaldner
 sc/source/ui/view/preview.cxx |6 +++---
 sc/source/ui/view/prevwsh.cxx |6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit dd0ceb50c2d95ac0587db2c983ac58f2e3b13028
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Tue Sep 8 18:56:12 2015 +0200

tdf#39468 translated german comments in preview.cxx and prevwsh.cxx

Change-Id: Id990e30019a0a1d94755227edeee3cb01fc0e870
Reviewed-on: https://gerrit.libreoffice.org/18416
Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com>

diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 666abee..9d4b150 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -164,7 +164,7 @@ void ScPreview::UpdateDrawView()// nTab must be 
right
 SdrPage* pPage = pModel->GetPage(nTab);
 if ( pDrawView && ( !pDrawView->GetSdrPageView() || 
pDrawView->GetSdrPageView()->GetPage() != pPage ) )
 {
-//  die angezeigte Page der DrawView umzustellen (s.u.) 
funktioniert nicht ?!?
+// convert the displayed Page of drawView (see below) does not 
work?!?
 delete pDrawView;
 pDrawView = NULL;
 }
@@ -299,7 +299,7 @@ void ScPreview::CalcPages()
 DoInvalidate();
 }
 
-void ScPreview::RecalcPages()   // only nPageNo is changed
+void ScPreview::RecalcPages()   // only nPageNo is changed
 {
 if (!bValid)
 return; // then CalcPages is called
@@ -410,7 +410,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* 
pFillLocation )
 aPage.Select( aPageRange );
 
 long nPrinted = pPrintFunc->DoPrint( aPage, nTabStart, nDisplayStart, 
bDoPrint, pFillLocation );
-OSL_ENSURE(nPrinted<=1, "was'n nu los?");
+OSL_ENSURE(nPrinted<=1, "What is happening?");
 
 SetMapMode(aMMMode);
 
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 60a9fb7..7c4f303 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -544,11 +544,11 @@ void ScPreviewShell::Activate(bool bMDI)
 {
 SfxViewShell::Activate(bMDI);
 
-//! Basic etc. -> auslagern in eigene Datei (s. tabvwsh4)
+//! Basic etc. -> outsource to its own file (see tabvwsh4)
 
 if (bMDI)
 {
-// InputHdl ist jetzt meistens Null, keine Assertion mehr!
+// InputHdl is now mostly Null, no moreasssertion!
 ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
 if ( pInputHdl )
 pInputHdl->NotifyChange( NULL );
@@ -1173,7 +1173,7 @@ void ScPreviewShell::RemoveAccessibilityObject( 
SfxListener& rObject )
 rObject.EndListening( *pAccessibilityBroadcaster );
 else
 {
-OSL_FAIL("kein Accessibility-Broadcaster?");
+OSL_FAIL("no accessibility broadcaster?");
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-09-07 Thread Albert Thuswaldner
 sc/source/ui/view/tabvwsha.cxx |   13 ++---
 sc/source/ui/view/tabvwshb.cxx |   26 +-
 2 files changed, 19 insertions(+), 20 deletions(-)

New commits:
commit 9df5942d439febfc6adacddfc23ba304dfaaafba
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Sun Sep 6 13:30:36 2015 +0200

tdf#39468 translated german comments in tabvwsha.cxx and tabvwshb.cxx

Change-Id: I78c0f32498ae559604f78706db85141bbebf89ad
Reviewed-on: https://gerrit.libreoffice.org/18359
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index fe2dbad..e8e7ca5 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -118,7 +118,7 @@ bool ScTabViewShell::GetFunction( OUString& rFuncStr, 
sal_uInt16 nErrCode )
 sal_uInt32 nNumFmt = 0;
 if ( eFunc != SUBTOTAL_FUNC_CNT && eFunc != SUBTOTAL_FUNC_CNT2 
&& eFunc != SUBTOTAL_FUNC_SELECTION_COUNT)
 {
-//  Zahlformat aus Attributen oder Formel
+// number format from attributes or formula
 pDoc->GetNumberFormat( nPosX, nPosY, nTab, nNumFmt );
 }
 
@@ -653,11 +653,10 @@ void ScTabViewShell::UpdateInputHandler( bool bForce /* = 
sal_False */, bool bSt
 pDoc->GetInputString( nPosX, nPosY, nTab, aString );
 if (eType == CELLTYPE_STRING)
 {
-//  Bei Bedarf ein ' vorneweg, damit der String nicht 
ungewollt
-//  als Zahl interpretiert wird, und um dem Benutzer zu 
zeigen,
-//  dass es ein String ist (#35060#).
-//! Auch bei Zahlformat "Text"? -> dann beim Editieren 
wegnehmen
-
+// Put a ' in front if necessary, so that the string is not
+// unintentionally interpreted as a number, and to show the
+// user that it is a string (#35060#).
+//! also for numberformat "Text"? -> then remove when 
editing
 SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
 sal_uInt32 nNumFmt;
 pDoc->GetNumberFormat( nPosX, nPosY, nTab, nNumFmt );
@@ -682,7 +681,7 @@ void ScTabViewShell::UpdateInputHandler( bool bForce /* = 
sal_False */, bool bSt
 }
 
 SfxBindings& rBindings = GetViewFrame()->GetBindings();
-rBindings.Invalidate( SID_STATUS_SUM ); // immer zusammen mit 
Eingabezeile
+rBindings.Invalidate( SID_STATUS_SUM ); // always together with 
the input row
 rBindings.Invalidate( SID_ATTR_SIZE );
 rBindings.Invalidate( SID_TABLE_CELL );
 }
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index f861b7b..3dc426e 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -69,12 +69,12 @@ using namespace com::sun::star;
 
 void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj )
 {
-//  wird aus dem Paint gerufen
+// is called from paint
 
 uno::Reference < embed::XEmbeddedObject > xObj = pObj->GetObjRef();
 vcl::Window* pWin = GetActiveWin();
 
-//  wenn schon connected ist, nicht nochmal SetObjArea/SetSizeScale
+// when already connected do not execute SetObjArea/SetSizeScale again
 
 SfxInPlaceClient* pClient = FindIPClient( xObj, pWin );
 if ( !pClient )
@@ -87,11 +87,11 @@ void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj )
 
 Fraction aScaleWidth (aDrawSize.Width(),  aOleSize.Width() );
 Fraction aScaleHeight(aDrawSize.Height(), aOleSize.Height() );
-aScaleWidth.ReduceInaccurate(10);   // kompatibel zum SdrOle2Obj
+aScaleWidth.ReduceInaccurate(10);   // compatible with SdrOle2Obj
 aScaleHeight.ReduceInaccurate(10);
 pClient->SetSizeScale(aScaleWidth,aScaleHeight);
 
-// sichtbarer Ausschnitt wird nur inplace veraendert!
+// visible section is only changed inplace!
 // the object area must be set after the scaling since it triggers the 
resizing
 aRect.SetSize( aOleSize );
 pClient->SetObjArea( aRect );
@@ -102,7 +102,7 @@ void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj )
 
 bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
 {
-// Gueltigkeits-Hinweisfenster nicht ueber dem Objekt stehenlassen
+// Do not leave the hint message box on top of the object
 RemoveHintWindow();
 
 uno::Reference < embed::XEmbeddedObject > xObj = pObj->GetObjRef();
@@ -154,12 +154,12 @@ bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, 
long nVerb )
 
 Fraction aScaleWidth (aDrawSize.Width(),  aOleSize.Width() );
 Fraction aScaleHeight(aDrawSiz

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

2015-09-07 Thread Albert Thuswaldner
 sc/source/ui/view/tabview3.cxx |  260 -
 1 file changed, 129 insertions(+), 131 deletions(-)

New commits:
commit bd1d1cbcd39463446ec243c66941e999a65d1da2
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Sun Sep 6 21:43:48 2015 +0200

tdf#39468 translated german comments in tabview3.cxx

Change-Id: Idbd3b5a6bf0008409cf1b4f3764e1b34f4284de9
Reviewed-on: https://gerrit.libreoffice.org/18361
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index b434c4a..2cbc080 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -93,7 +93,7 @@ ScRange lcl_getSubRangeByIndex( const ScRange& rRange, 
sal_Int32 nIndex )
 
 using namespace com::sun::star;
 
-// ---  Public-Funktionen
+// ---  public functions
 
 void ScTabView::ClickCursor( SCCOL nPosX, SCROW nPosY, bool bControl )
 {
@@ -191,7 +191,7 @@ void ScTabView::InvalidateAttribs()
 
 rBindings.Invalidate( SID_STYLE_APPLY );
 rBindings.Invalidate( SID_STYLE_FAMILY2 );
-// StarCalc kennt nur Absatz- bzw. Zellformat-Vorlagen
+// StarCalc knows only paragraph- or cell format templates
 
 rBindings.Invalidate( SID_ATTR_CHAR_FONT );
 rBindings.Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
@@ -271,22 +271,22 @@ void ScTabView::InvalidateAttribs()
 rBindings.Invalidate( SID_NUMBER_TIME );
 }
 
-//  SetCursor - Cursor setzen, zeichnen, InputWin updaten
-//  oder Referenz verschicken
-//  ohne Optimierung wegen BugId 29307
+//  SetCursor - Cursor, set, draw, update InputWin
+//  or send reference
+//  without optimising due to BugId 29307
 
 void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew )
 {
 SCCOL nOldX = aViewData.GetCurX();
 SCROW nOldY = aViewData.GetCurY();
 
-//  DeactivateIP nur noch bei MarkListHasChanged
+//  DeactivateIP only for MarkListHasChanged
 
 if ( nPosX != nOldX || nPosY != nOldY || bNew )
 {
 ScTabViewShell* pViewShell = aViewData.GetViewShell();
 bool bRefMode = pViewShell && pViewShell->IsRefInputMode();
-if ( aViewData.HasEditView( aViewData.GetActivePart() ) && !bRefMode ) 
// 23259 oder so
+if ( aViewData.HasEditView( aViewData.GetActivePart() ) && !bRefMode ) 
// 23259 or so
 {
 UpdateInputLine();
 }
@@ -332,20 +332,20 @@ void ScTabView::CheckSelectionTransfer()
 }
 }
 
-// Eingabezeile / Menues updaten
-//  CursorPosChanged ruft SelectionChanged
-//  SelectionChanged ruft CellContentChanged
+// update input row / menus
+// CursorPosChanged calls SelectionChanged
+// SelectionChanged calls CellContentChanged
 
 void ScTabView::CellContentChanged()
 {
 SfxBindings& rBindings = aViewData.GetBindings();
 
-rBindings.Invalidate( SID_ATTR_SIZE );  // -> Fehlermeldungen anzeigen
+rBindings.Invalidate( SID_ATTR_SIZE );  // -> show error message
 rBindings.Invalidate( SID_THESAURUS );
 rBindings.Invalidate( SID_HYPERLINK_GETLINK );
 rBindings.Invalidate( SID_ROWCOL_SELCOUNT );
 
-InvalidateAttribs();// Attribut-Updates
+InvalidateAttribs();// attribut updates
 
 aViewData.GetViewShell()->UpdateInputHandler();
 }
@@ -369,14 +369,14 @@ void ScTabView::SelectionChanged()
 SfxBindings& rBindings = aViewData.GetBindings();
 
 rBindings.Invalidate( SID_CURRENTCELL );// -> Navigator
-rBindings.Invalidate( SID_AUTO_FILTER );// -> Menue
+rBindings.Invalidate( SID_AUTO_FILTER );// -> Menu
 rBindings.Invalidate( FID_NOTE_VISIBLE );
 rBindings.Invalidate( FID_SHOW_NOTE );
 rBindings.Invalidate( FID_HIDE_NOTE );
 rBindings.Invalidate( SID_DELETE_NOTE );
 rBindings.Invalidate( SID_ROWCOL_SELCOUNT );
 
-//  Funktionen, die evtl disabled werden muessen
+//  functions than may need to be disabled
 
 rBindings.Invalidate( FID_INS_ROWBRK );
 rBindings.Invalidate( FID_INS_COLBRK );
@@ -419,7 +419,7 @@ void ScTabView::SelectionChanged()
 
 rBindings.Invalidate( FID_CHG_COMMENT );
 
-//  nur wegen Zellschutz:
+// only due to  protect cell:
 
 rBindings.Invalidate( SID_CELL_FORMAT_RESET );
 rBindings.Invalidate( SID_DELETE );
@@ -445,17 +445,17 @@ void ScTabView::SelectionChanged()
 void ScTabView::CursorPosChanged()
 {
 bool bRefMode = SC_MOD()->IsFormulaMode();
-if ( !bRefMode ) // Abfrage, damit RefMode bei Tabellenwechsel funktioniert
+if ( !bRefMode ) // check that RefMode works when switching sheets
 aViewData.GetDocShell()->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW ) 
);
 
-//  Broadcast, damit andere Views des Dokuments auch umschalten
+//  Broadcast, so that other Views of the document al

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

2015-09-07 Thread Albert Thuswaldner
 sc/source/ui/view/tabview.cxx  |  137 +++--
 sc/source/ui/view/tabview2.cxx |   64 ---
 2 files changed, 96 insertions(+), 105 deletions(-)

New commits:
commit 24782e3126b9084fe0530a2642d864b1466dd82a
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Sun Sep 6 20:37:32 2015 +0200

tdf#39468 translated german comments in tabview.cxx and tabview2.cxx

Change-Id: I37d8752fa6a5b532c8fce3175bf42d3c8c93b3a8
Reviewed-on: https://gerrit.libreoffice.org/18360
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 443f7ef..87d0f09 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -154,7 +154,7 @@ void ScCornerButton::MouseButtonDown( const MouseEvent& 
rMEvt )
 if (!bDisable)
 {
 ScTabViewShell* pViewSh = pViewData->GetViewShell();
-pViewSh->SetActive();   // Appear und 
SetViewFrame
+pViewSh->SetActive();   // Appear and 
SetViewFrame
 pViewSh->ActiveGrabFocus();
 
 bool bControl = rMEvt.IsMod1();
@@ -244,8 +244,8 @@ void ScTabView::InitScrollBar( ScrollBar& rScrollBar, long 
nMaxVal )
 {
 rScrollBar.SetRange( Range( 0, nMaxVal ) );
 rScrollBar.SetLineSize( 1 );
-rScrollBar.SetPageSize( 1 );// wird getrennt abgefragt
-rScrollBar.SetVisibleSize( 10 );// wird bei Resize neu gesetzt
+rScrollBar.SetPageSize( 1 );// is queried seperately
+rScrollBar.SetVisibleSize( 10 );// is reset by Resize
 
 rScrollBar.SetScrollHdl( LINK(this, ScTabView, ScrollHdl) );
 rScrollBar.SetEndScrollHdl( LINK(this, ScTabView, EndScrollHdl) );
@@ -372,7 +372,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& 
rSize, bool bInner )
 
 UpdateShow();
 
-if (bHScroll || bVScroll)   // Scrollbars horizontal oder vertikal
+if (bHScroll || bVScroll)   // Scrollbars horizontal or vertical
 {
 long nScrollBarSize = rStyleSettings.GetScrollBarSize();
 if (bVScroll)
@@ -496,7 +496,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& 
rSize, bool bInner )
 {
 long nSizeUp = 0;   // upper scroll bar
 long nSizeSp = 0;   // splitter
-long nSizeDn;   // unterer Scrollbar
+long nSizeDn;   // lower scroll bar
 
 switch (aViewData.GetVSplitMode())
 {
@@ -527,7 +527,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& 
rSize, bool bInner )
 }
 }
 
-//  SetDragRectPixel auch ohne Scrollbars etc., wenn schon gesplittet ist
+//  SetDragRectPixel also whithout Scrollbars etc., when already split
 if ( bHScroll || aViewData.GetHSplitMode() != SC_SPLIT_NONE )
 pHSplitter->SetDragRectPixel(
 Rectangle( nPosX, nPosY, nPosX+nSizeX, nPosY+nSizeY ), pFrameWin );
@@ -576,7 +576,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& 
rSize, bool bInner )
 nPosY += nOutlineY;
 }
 
-if (bHeaders)   // Spalten/Zeilen-Header
+if (bHeaders)   // column/row header
 {
 nBarX = pRowBar[SC_SPLIT_BOTTOM]->GetSizePixel().Width();
 nBarY = pColBar[SC_SPLIT_LEFT]->GetSizePixel().Height();
@@ -588,7 +588,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& 
rSize, bool bInner )
 else
 nBarX = nBarY = 0;
 
-//  Splitter auswerten
+// evaluate splitter
 
 long nLeftSize   = nSizeX;
 long nRightSize  = 0;
@@ -602,7 +602,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& 
rSize, bool bInner )
 long nSplitHeight = rSize.Height();
 if ( aViewData.GetHSplitMode() == SC_SPLIT_FIX )
 {
-//  Fixier-Splitter nicht mit Scrollbar/TabBar ueberlappen lassen
+// Do not allow freeze splitter to overlap scroll bar/tab bar
 if ( bHScroll )
 nSplitHeight -= aHScrollLeft->GetSizePixel().Height();
 else if ( bTabControl && pTabControl )
@@ -629,7 +629,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& 
rSize, bool bInner )
 nBottomSize = nSizeY - nTopSize - nSplitSizeY;
 }
 
-//  ShowHide fuer pColOutline / pRowOutline passiert in UpdateShow
+//  ShowHide for pColOutline / pRowOutline happens in UpdateShow
 
 if (bHOutline)  // Outline-Controls
 {
@@ -675,7 +675,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& 
rSize, bool bInner )

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

2015-09-07 Thread Albert Thuswaldner
 sc/source/ui/view/tabvwshg.cxx |   12 ++--
 sc/source/ui/view/tabvwshh.cxx |   16 
 2 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 33ca969387e2e4f92bad159619a5610e67272246
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Fri Sep 4 20:08:30 2015 +0200

tdf#39468 translated german comments in tabvwshg.cxx and tabvwshh.cxx

Change-Id: I4c978a1d2f2a63eae08e30a2f349b445b4a98ecc
Reviewed-on: https://gerrit.libreoffice.org/18347
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx
index 0387b74..7711cfe 100644
--- a/sc/source/ui/view/tabvwshg.cxx
+++ b/sc/source/ui/view/tabvwshg.cxx
@@ -41,7 +41,7 @@ void ScTabViewShell::InsertURLButton( const OUString& rName, 
const OUString& rUR
 const OUString& rTarget,
 const Point* pInsPos )
 {
-//  Tabelle geschuetzt ?
+// protected sheet ?
 
 ScViewData& rViewData = GetViewData();
 ScDocument* pDoc = rViewData.GetDocument();
@@ -66,7 +66,7 @@ void ScTabViewShell::InsertURLButton( const OUString& rName, 
const OUString& rUR
 return;
 
 uno::Reference xControlModel = 
pUnoCtrl->GetUnoControlModel();
-OSL_ENSURE( xControlModel.is(), "UNO-Control ohne Model" );
+OSL_ENSURE( xControlModel.is(), "UNO control without model" );
 if( !xControlModel.is() )
 return;
 
@@ -102,7 +102,7 @@ void ScTabViewShell::InsertURLButton( const OUString& 
rName, const OUString& rUR
 else
 aPos = GetInsertPos();
 
-// Groesse wie in 3.1:
+// Size as in 3.1:
 Size aSize = GetActiveWin()->PixelToLogic(Size(140, 20));
 
 if ( pDoc->IsNegativePage(nTab) )
@@ -110,10 +110,10 @@ void ScTabViewShell::InsertURLButton( const OUString& 
rName, const OUString& rUR
 
 pObj->SetLogicRect(Rectangle(aPos, aSize));
 
-//  am alten VC-Button musste die Position/Groesse nochmal explizit
-//  gesetzt werden - das scheint mit UnoControls nicht noetig zu sein
+// for the old VC-Button the position/size had to be set explicitly once 
more
+// that seems not to be needed with UnoControls
 
-//  nicht markieren wenn Ole
+// do not mark when Ole
 pDrView->InsertObjectSafe( pObj, *pDrView->GetSdrPageView() );
 }
 
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index 971edda..4d32414 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -58,7 +58,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
 sal_uInt16 nSlotId = rReq.GetSlot();
 const SfxItemSet* pReqArgs = rReq.GetArgs();
 
-//  Objekte aktivieren/deaktivieren immer auf der sichtbaren View
+// Always activate/deactivate object in the visible View
 
 ScTabViewShell* pVisibleSh = this;
 if ( nSlotId == SID_OLE_SELECT || nSlotId == SID_OLE_ACTIVATE || nSlotId 
== SID_OLE_DEACTIVATE )
@@ -71,7 +71,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
 case SID_OLE_SELECT:
 case SID_OLE_ACTIVATE:
 {
-//  in beiden Faellen erstmal auf der sichtbaren View 
selektieren
+// In both cases, first select in the visible View
 
 OUString aName;
 SdrView* pDrView = GetSdrView();
@@ -83,7 +83,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
 }
 pVisibleSh->SelectObject( aName );
 
-//  aktivieren
+// activate
 
 if ( nSlotId == SID_OLE_ACTIVATE )
 pVisibleSh->DoVerb( 0 );
@@ -106,7 +106,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
 if ( nNewVal < 0 )
 nNewVal = 0;
 
-//! von irgendwas in 1/100mm umrechnen ??
+//! convert from something into 1/100mm ??
 
 SdrView* pDrView = GetSdrView();
 if ( pDrView )
@@ -135,7 +135,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
 }
 #if HAVE_FEATURE_SCRIPTING
 if (!bDone)
-SbxBase::SetError( ERRCODE_SBX_BAD_PARAMETER );  // 
Basic-Fehler
+SbxBase::SetError( ERRCODE_SBX_BAD_PARAMETER );  // basic 
error
 #endif
 }
 break;
@@ -143,7 +143,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq )
 }
 }
 
-static uno::Reference < embed::XEmbeddedObject > lcl_GetSelectedObj( SdrView* 
pDrView )   //! Member von ScDrawView?
+static uno::Reference < embed::XEmbeddedObject > lcl_GetSelectedObj( SdrView* 
pDrView 

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

2015-09-07 Thread Albert Thuswaldner
 sc/source/ui/view/tabvwshe.cxx |   30 +++---
 sc/source/ui/view/tabvwshf.cxx |6 +++---
 2 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 89689cd6eb6329de5440170b9ad971542363c2b9
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Fri Sep 4 20:54:13 2015 +0200

tdf#39468 translated german comments in tabvwshe.cxx and tabvwshf.cxx

Change-Id: I7474d6ac1c7128ca5b22478b2abb3799c083e99c
Reviewed-on: https://gerrit.libreoffice.org/18348
Reviewed-by: Eike Rathke <er...@redhat.com>
Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index e218181..e3d03d1 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -59,8 +59,8 @@ OUString ScTabViewShell::GetSelectionText( bool bWholeWord )
 ScDocument* pDoc = GetViewData().GetDocument();
 if ( bInFormatDialog && aRange.aStart.Row() != aRange.aEnd.Row() )
 {
-// Range auf eine Datenzeile begrenzen
-// (nur wenn der Aufruf aus einem Format-Dialog kommt)
+// limit range to one data row
+// (only when  the call comes from a format dialog)
 ScHorizontalCellIterator aIter( pDoc, aRange.aStart.Tab(),
 aRange.aStart.Col(), aRange.aStart.Row(),
 aRange.aEnd.Col(), aRange.aEnd.Row() );
@@ -100,10 +100,10 @@ OUString ScTabViewShell::GetSelectionText( bool 
bWholeWord )
 aObj.ExportString( aExportOUString );
 aStrSelection = convertLineEnd(aExportOUString, LINEEND_CR);
 
-//  Tab/CR durch Space ersetzen, wenn fuer Dialog oder per 
Basic/SelectionTextExt,
-//  oder wenn es eine einzelne Zeile ist.
-//  Sonst mehrzeilig mit Tabs beibehalten (z.B. Mail oder 
Basic/SelectionText).
-//  Fuer Mail werden die Tabs dann spaeter in (mehrere) Spaces 
gewandelt.
+// replace Tab/CR with space, if for dialog or through 
Basic/SelectionTextExt,
+// or when it is a single row.
+// Otherwise keep Tabs in multi-row (for instance mail or 
Basic/SelectionText).
+// for mail the Tabs are then later changed into (multiple) spaces.
 
 if ( bInFormatDialog || bWholeWord || aRange.aEnd.Row() == 
aRange.aStart.Row() )
 {
@@ -121,7 +121,7 @@ void ScTabViewShell::InsertURL( const OUString& rName, 
const OUString& rURL, con
 sal_uInt16 nMode )
 {
 SvxLinkInsertMode eMode = (SvxLinkInsertMode) nMode;
-bool bAsText = ( eMode != HLINK_BUTTON );   // Default ist jetzt Text
+bool bAsText = ( eMode != HLINK_BUTTON );   // default is now text
 
 if ( bAsText )
 {
@@ -227,7 +227,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
 if ( pReqArgs &&
  SfxItemState::SET == 
pReqArgs->GetItemState(SID_SEARCH_ITEM, false, ) )
 {
-OSL_ENSURE( pItem->ISA(SvxSearchItem), "falsches Item" );
+OSL_ENSURE( pItem->ISA(SvxSearchItem), "wrong Item" );
 const SvxSearchItem* pSearchItem = static_cast(pItem);
 
 ScGlobal::SetSearchItem( *pSearchItem );
@@ -260,13 +260,13 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
 if (pReqArgs && SfxItemState::SET ==
 pReqArgs->GetItemState(SID_SEARCH_ITEM, false, 
))
 {
-//  Search-Item merken
-OSL_ENSURE( pItem->ISA(SvxSearchItem), "falsches Item" );
+// remember search item
+OSL_ENSURE( pItem->ISA(SvxSearchItem), "wrong Item" );
 ScGlobal::SetSearchItem( *static_cast(pItem ));
 }
 else
 {
-OSL_FAIL("SID_SEARCH_ITEM ohne Parameter");
+OSL_FAIL("SID_SEARCH_ITEM without Parameter");
 }
 break;
 case FID_SEARCH:
@@ -276,11 +276,11 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
 {
 if (pReqArgs && SfxItemState::SET == 
pReqArgs->GetItemState(nSlot, false, ))
 {
-//  SearchItem holen
+// get search item
 
 SvxSearchItem aSearchItem = ScGlobal::GetSearchItem();
 
-//  SearchItem fuellen
+// fill search item
 
 aSearchItem.SetSearchString(static_cast(pItem)->GetValue());
 if(SfxItemState::SET == pReqArgs->GetItemState(FN_PARAM_1, 
false, ))
@@ -295,7 +295,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
 el

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

2015-09-03 Thread Albert Thuswaldner
 sc/source/ui/view/output2.cxx |  192 --
 1 file changed, 92 insertions(+), 100 deletions(-)

New commits:
commit 95822dba748e417e4ccc7c21bca63118f971958a
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Tue Jul 21 21:44:44 2015 +0200

tdf#39468 translated german comments in output2.cxx

Change-Id: I0175f688d1daaecf94c599093c58ec439eef9475
Reviewed-on: https://gerrit.libreoffice.org/17277
Reviewed-by: Samuel Mehrbrodt <s.mehrbr...@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbr...@gmail.com>

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 97fd6da..bbdd147 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -73,7 +73,7 @@
 
 using namespace com::sun::star;
 
-//! Autofilter-Breite mit column.cxx zusammenfassen
+//! Merge Autofilter width with column.cxx
 #define DROPDOWN_BITMAP_SIZE18
 
 #define DRAWTEXT_MAX32767
@@ -84,12 +84,12 @@ const sal_uInt16 SC_SHRINKAGAIN_MAX = 7;
 
 class ScDrawStringsVars
 {
-ScOutputData*   pOutput;// Verbindung
+ScOutputData*   pOutput;// connection
 
-const ScPatternAttr* pPattern;  // Attribute
-const SfxItemSet*   pCondSet;   // aus bedingter Formatierung
+const ScPatternAttr* pPattern;  // attribute
+const SfxItemSet*   pCondSet;   // from conditional formatting
 
-vcl::Font   aFont;  // aus Attributen erzeugt
+vcl::Font   aFont;  // created from attributes
 FontMetric  aMetric;
 longnAscentPixel;   // always pixels
 SvxCellOrientation  eAttrOrient;
@@ -136,7 +136,7 @@ public:
 
 voidSetPatternSimple( const ScPatternAttr* pNew, const SfxItemSet* 
pSet );
 
-bool SetText( ScRefCellValue& rCell );   // TRUE -> pOldPattern vergessen
+bool SetText( ScRefCellValue& rCell );   // TRUE -> drop pOldPattern
 voidSetHashText();
 void SetTextToWidthOrHash( ScRefCellValue& rCell, long nWidth );
 voidSetAutoText( const OUString& rAutoText );
@@ -291,13 +291,13 @@ void ScDrawStringsVars::SetPattern(
 pPattern = pNew;
 pCondSet = pSet;
 
-//  pPattern auswerten
+// évaluate pPattern
 
 OutputDevice* pDev = pOutput->mpDev;
 OutputDevice* pRefDevice = pOutput->mpRefDevice;
 OutputDevice* pFmtDevice = pOutput->pFmtDevice;
 
-//  Font
+// font
 
 ScAutoFontColorMode eColorMode;
 if ( pOutput->mbUseStyleColor )
@@ -318,7 +318,7 @@ void ScDrawStringsVars::SetPattern(
 ,  );
 aFont.SetAlign(ALIGN_BASELINE);
 
-//  Orientierung
+// orientation
 
 eAttrOrient = pPattern->GetCellOrientation( pCondSet );
 
@@ -373,14 +373,14 @@ void ScDrawStringsVars::SetPattern(
 bRotated = false;
 break;
 default:
-OSL_FAIL("Falscher SvxCellOrientation Wert");
+OSL_FAIL("Invalid SvxCellOrientation value");
 nRot = 0;
 bRotated = false;
 break;
 }
 aFont.SetOrientation( nRot );
 
-//  Syntax-Modus
+// syntax mode
 
 if (pOutput->mbSyntaxMode)
 pOutput->SetSyntaxColor(, rCell);
@@ -391,9 +391,8 @@ void ScDrawStringsVars::SetPattern(
 
 aMetric = pFmtDevice->GetFontMetric();
 
-//  Wenn auf dem Drucker das Leading 0 ist, gibt es Probleme
-//  -> Metric vom Bildschirm nehmen (wie EditEngine!)
-
+// if there is the leading 0 on a printer device, we have problems
+// -> take metric from the screen (as for EditEngine!)
 if ( pFmtDevice->GetOutDevType() == OUTDEV_PRINTER && 
aMetric.GetIntLeading() == 0 )
 {
 OutputDevice* pDefaultDev = Application::GetDefaultDevice();
@@ -413,25 +412,23 @@ void ScDrawStringsVars::SetPattern(
 Color aOLineColor( static_cast(pPattern->GetItem( 
ATTR_FONT_OVERLINE, pCondSet )).GetColor() );
 pDev->SetOverlineColor( aOLineColor );
 
-//  Zahlenformat
+// number format
 
 nValueFormat = pPattern->GetNumberFormat( 
pOutput->mpDoc->GetFormatTable(), pCondSet );
 
-//  Raender
-
+// margins
 pMargin = static_cast(>GetItem( 
ATTR_MARGIN, pCondSet ));
 if ( eAttrHorJust == SVX_HOR_JUSTIFY_LEFT || eAttrHorJust == 
SVX_HOR_JUSTIFY_RIGHT )
 nIndent = static_cast(pPattern->GetItem( 
ATTR_INDENT, pCondSet )).GetValue();
 else
 nIndent = 0;
 
-//  "Shrink to fit"
+// "Shrink to fit"
 
 bShrink = static_cast(pPattern->GetItem( 
ATTR_SHRINKTOFIT, pCondSet )).GetValue();
 
-//  zumindest die Text-Groesse muss neu geholt werden
-//! unterscheiden, und den Text nicht neu vom Numberformatter holen?
-
+// at least the text size needs to

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

2015-09-03 Thread Albert Thuswaldner
 sc/source/ui/view/viewdata.cxx |   92 -
 1 file changed, 46 insertions(+), 46 deletions(-)

New commits:
commit 16f9460f2d033165bf50017b28f339d5b96f3de1
Author: Albert Thuswaldner <albert.thuswald...@gmail.com>
Date:   Fri Jul 31 01:20:01 2015 +0200

tdf#39468 translated german comments in viewdata.cxx

Change-Id: I62e70891c3ae74c4e5daa05014d084e37a7c9710
Reviewed-on: https://gerrit.libreoffice.org/17469
Reviewed-by: Samuel Mehrbrodt <s.mehrbr...@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbr...@gmail.com>

diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index d6400db..1e64916 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -453,7 +453,7 @@ ScDocument* ScViewData::GetDocument() const
 else if (pDocShell)
 return >GetDocument();
 
-OSL_FAIL("kein Document an ViewData");
+OSL_FAIL("no document on ViewData");
 return NULL;
 }
 
@@ -533,7 +533,7 @@ void ScViewData::CopyTab( SCTAB nSrcTab, SCTAB nDestTab )
 
 if (nDestTab > MAXTAB)
 {
-OSL_FAIL("Zuviele Tabellen");
+OSL_FAIL("too many sheets");
 return;
 }
 
@@ -928,7 +928,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
 if (pEditView[eWhich]->GetWindow() != pWin)
 {
 pEditView[eWhich]->SetWindow(pWin);
-OSL_FAIL("EditView Window geaendert");
+OSL_FAIL("EditView Window has changed");
 }
 }
 else
@@ -1001,10 +1001,10 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
 
 long nSizeXPix;
 if (bBreak && !bAsianVertical)
-nSizeXPix = aPixRect.GetWidth();// Papersize -> kein 
H-Scrolling
+nSizeXPix = aPixRect.GetWidth();// papersize -> no horizontal 
scrolling
 else
 {
-OSL_ENSURE(pView,"keine View fuer EditView");
+OSL_ENSURE(pView,"no View for EditView");
 
 if ( bGrowCentered )
 {
@@ -1022,7 +1022,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
 if ( nSizeXPix <= 0 )
 nSizeXPix = aPixRect.GetWidth();// editing outside to the 
right of the window -> keep cell width
 }
-OSL_ENSURE(pView,"keine View fuer EditView");
+OSL_ENSURE(pView,"no View for EditView");
 long nSizeYPix = pView->GetGridHeight(WhichV(eWhich)) - aPixRect.Top();
 if ( nSizeYPix <= 0 )
 nSizeYPix = aPixRect.GetHeight();   // editing outside below the 
window -> keep cell height
@@ -1459,7 +1459,7 @@ void ScViewData::SetTabNo( SCTAB nNewTab )
 {
 if (!ValidTab(nNewTab))
 {
-OSL_FAIL("falsche Tabellennummer");
+OSL_FAIL("wrong sheet number");
 return;
 }
 
@@ -1468,7 +1468,7 @@ void ScViewData::SetTabNo( SCTAB nNewTab )
 pThisTab = maTabData[nTabNo];
 
 CalcPPT();  //  for common column width correction
-RecalcPixPos(); //! nicht immer noetig!
+RecalcPixPos(); //! not always needed!
 }
 
 void ScViewData::SetActivePart( ScSplitPos eNewActive )
@@ -1478,14 +1478,14 @@ void ScViewData::SetActivePart( ScSplitPos eNewActive )
 
 Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScHSplitPos eWhich 
) const
 {
-OSL_ENSURE( eWhich==SC_SPLIT_LEFT || eWhich==SC_SPLIT_RIGHT, "Falsche 
Position" );
+OSL_ENSURE( eWhich==SC_SPLIT_LEFT || eWhich==SC_SPLIT_RIGHT, "wrong 
position" );
 ScSplitPos ePos = ( eWhich == SC_SPLIT_LEFT ) ? SC_SPLIT_BOTTOMLEFT : 
SC_SPLIT_BOTTOMRIGHT;
 return GetScrPos( nWhereX, nWhereY, ePos );
 }
 
 Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScVSplitPos eWhich 
) const
 {
-OSL_ENSURE( eWhich==SC_SPLIT_TOP || eWhich==SC_SPLIT_BOTTOM, "Falsche 
Position" );
+OSL_ENSURE( eWhich==SC_SPLIT_TOP || eWhich==SC_SPLIT_BOTTOM, "wrong 
position" );
 ScSplitPos ePos = ( eWhich == SC_SPLIT_TOP ) ? SC_SPLIT_TOPLEFT : 
SC_SPLIT_BOTTOMLEFT;
 return GetScrPos( nWhereX, nWhereY, ePos );
 }
@@ -1616,7 +1616,7 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW 
nWhereY, ScSplitPos eWhich,
 //  Number of cells on a screen
 SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, 
sal_uInt16 nScrSizeX ) const
 {
-OSL_ENSURE( nDir==1 || nDir==-1, "falscher CellsAt Aufruf" );
+OSL_ENSURE( nDir==1 || nDir==-1, "wrong CellsAt call" );
 
 if (pView)
 const_cast<ScViewData*>(this)->aScrSize.Width()  = 
pView->GetGridWidth(eWhichX);
@@ -1626,9 +1626,9 @@ SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, 
ScHSplitPos eWhichX, sal_
 if (nScrSizeX == SC_SIZE_NONE) nScrSizeX = (sal_uInt16) aScrSize.Width();
 
 if (nDir==1)
- 

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

2015-07-30 Thread Albert Thuswaldner
 sc/source/ui/view/viewfun2.cxx |8 +++
 sc/source/ui/view/viewfun3.cxx |4 +--
 sc/source/ui/view/viewfun4.cxx |   42 -
 3 files changed, 27 insertions(+), 27 deletions(-)

New commits:
commit 3f5ccbe76025a1528a6850c67adf31e8728248a0
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Thu Jul 30 00:50:50 2015 +0200

tdf#39468 translated german comments in viewfunc*.cxx

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

diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index ce0457a..8ee3c3f 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1628,7 +1628,7 @@ void ScViewFunc::AutoFormat( sal_uInt16 nFormatNo, bool 
bRecord )
 ErrorMessage(STR_NOMULTISELECT);
 }
 
-//  Suchen  Ersetzen
+// Search  Replace
 
 bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
 bool bAddUndo, bool bIsApi )
@@ -1888,7 +1888,7 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* 
pSearchItem,
 return bFound;
 }
 
-//  Zielwertsuche
+// Goal Seek
 
 void ScViewFunc::Solve( const ScSolveParam rParam )
 {
@@ -2551,7 +2551,7 @@ void ScViewFunc::MoveTable(
 
 if (!pDestShell)
 {
-OSL_FAIL(Dest-Doc nicht gefunden !!!);
+OSL_FAIL(Destination document not found !!!);
 return;
 }
 
@@ -2704,7 +2704,7 @@ void ScViewFunc::MoveTable(
 if (pSdrView)
 pSdrView-ClearPageView();
 
-pDestViewSh-TabChanged();  // Pages auf dem Drawing-Layer
+pDestViewSh-TabChanged();  // pages on the drawing layer
 }
 pDestShell-PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB,
 PAINT_GRID | PAINT_TOP | PAINT_LEFT |
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 4091230..6262601 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1032,8 +1032,8 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, 
ScDocument* pClipDoc,
 SCCOL nBlockAddX = nEndCol-nStartCol;
 SCROW nBlockAddY = nEndRow-nStartRow;
 
-//  Nachfrage, wenn die Selektion groesser als 1 Zeile/Spalte, aber 
kleiner
-//  als das Clipboard ist (dann wird ueber die Selektion hinaus 
eingefuegt)
+// request, if the selection is greater than one row/column, but 
smaller
+// as the Clipboard (then inserting is done beyond the selection)
 
 //  ClipSize is not size, but difference
 if ( ( nBlockAddX != 0  nBlockAddX  nDestSizeX ) ||
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 30320b9..c071a8c 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -318,12 +318,12 @@ void ScViewFunc::DoThesaurus( bool bRecord )
 bool bIsEditMode = GetViewData().HasEditView(eWhich);
 if (bRecord  !rDoc.IsUndoEnabled())
 bRecord = false;
-if (bIsEditMode)// Edit-Mode 
aktiv
+if (bIsEditMode)// edit mode 
active
 {
 GetViewData().GetEditView(eWhich, pEditView, nCol, nRow);
 pEditSel.reset(new ESelection(pEditView-GetSelection()));
 SC_MOD()-InputEnterHandler();
-GetViewData().GetBindings().Update();  // sonst kommt der Sfx 
durcheinander...
+GetViewData().GetBindings().Update();  // otherwise the Sfx 
becomes mixed-up...
 }
 else
 {
@@ -383,7 +383,7 @@ void ScViewFunc::DoThesaurus( bool bRecord )
 eState = pEditView-StartThesaurus();
 OSL_ENSURE(eState != EE_SPELL_NOSPELLER, No SpellChecker);
 
-if (eState == EE_SPELL_ERRORFOUND)  // sollte spaeter durch 
Wrapper geschehen!
+if (eState == EE_SPELL_ERRORFOUND)  // should happen later 
through Wrapper!
 {
 LanguageType eLnge = ScViewUtil::GetEffLanguage( rDoc, ScAddress( 
nCol, nRow, nTab ) );
 OUString aErr = SvtLanguageTable::GetLanguageString(eLnge);
@@ -442,7 +442,7 @@ void ScViewFunc::DoSheetConversion( const 
ScConversionParam rConvParam, bool bR
 bool bIsEditMode = rViewData.HasEditView(eWhich);
 if (bRecord  !rDoc.IsUndoEnabled())
 bRecord = false;
-if (bIsEditMode)// Edit-Mode 
aktiv
+if (bIsEditMode)// edit mode 
active
 {
 rViewData.GetEditView(eWhich, pEditView, nCol, nRow);
 SC_MOD()-InputEnterHandler();
@@ -489,7 +489,7 @@ void ScViewFunc::DoSheetConversion( const 
ScConversionParam rConvParam, bool bR
 }
 }
 
-//  ab hier kein return mehr
+// from here

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

2015-07-29 Thread Albert Thuswaldner
 sc/source/ui/view/output.cxx  |   32 
 sc/source/ui/view/output3.cxx |2 +-
 2 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit 12047823544c13060966e5f422875a56d5e80727
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Thu Jul 23 13:33:34 2015 +0200

tdf#39468 translated german comments in output.cxx and output2.cxx

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

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index cef48f9..a84aa3b 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -389,7 +389,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext 
rRenderContext, bool bGrid, bool
 
 if ( bPage )
 {
-//  Seitenumbrueche auch in ausgeblendeten suchen
+// Search also in hidden part for page breaks
 SCCOL nCol = nXplus1;
 while (nCol = MAXCOL)
 {
@@ -1677,8 +1677,8 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext 
rRenderContext, const Co
 {
 Polygon aPoly( 4, aPoints );
 
-//  ohne Pen wird bei DrawPolygon rechts 
und unten
-//  ein Pixel weggelassen...
+// for DrawPolygon, whitout Pen one pixel 
is left out
+// to the right and below...
 if ( rColor.GetTransparency() == 0 )
 rRenderContext.SetLineColor(rColor);
 else
@@ -1693,8 +1693,8 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext 
rRenderContext, const Co
 Polygon aPoly( 4, aPoints );
 const Color* pColor = pInfo-pColorScale.get();
 
-//  ohne Pen wird bei DrawPolygon rechts und unten
-//  ein Pixel weggelassen...
+// for DrawPolygon, whitout Pen one pixel is left 
out
+// to the right and below...
 if ( pColor-GetTransparency() == 0 )
 rRenderContext.SetLineColor(*pColor);
 else
@@ -1706,9 +1706,9 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext 
rRenderContext, const Co
 
 svx::frame::Style aTopLine, aBottomLine, aLeftLine, 
aRightLine;
 
-if ( nX  nX1 || nX  nX2 ) // Attribute in 
FillInfo nicht gesetzt
+if ( nX  nX1 || nX  nX2 ) // Attributes in 
FillInfo not set
 {
-//! Seitengrenzen fuer Druck beruecksichtigen !
+//! consider page borders for printing !
 const ::editeng::SvxBorderLine* pLeftLine;
 const ::editeng::SvxBorderLine* pTopLine;
 const ::editeng::SvxBorderLine* pRightLine;
@@ -1794,10 +1794,10 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext 
rRenderContext, const Co
 nPosX += nColWidth * nLayoutSign;
 }
 
-//  erst hinterher im zweiten Schritt die Linien fuer normale 
Ausgabe loeschen
+// delete the lines for normal output only afterwards in the 
second step
 
 nX = nX1  0 ? (nX1-1) : static_castSCCOL(0);
-for (; nX=nX2+1; nX++) // sichtbarer Teil +- 1
+for (; nX=nX2+1; nX++) // visible part +- 1
 {
 sal_uInt16 nArrX = nX + 1;
 CellInfo rInfo = rThisRowInfo.pCellInfo[nArrX];
@@ -1806,8 +1806,8 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext 
rRenderContext, const Co
 {
 size_t nCol = lclGetArrayColFromCellInfoX( nArrX, nX1, 
nX2, bLayoutRTL );
 
-//  horizontal: angrenzende Linie verlaengern
-//  (nur, wenn die gedrehte Zelle eine Umrandung hat)
+// horizontal: extend adjacent line
+// (only when the rotated cell has a border)
 sal_uInt16 nDir = rInfo.nRotateDir;
 if ( rArray.GetCellStyleTop( nCol, nRow ).Prim() )
 {
@@ -2267,17 +2267,17 @@ void ScOutputData::DrawChangeTrack()
 ScChangeTrack* pTrack = mpDoc-GetChangeTrack();
 ScChangeViewSettings* pSettings = mpDoc-GetChangeViewSettings();
 if ( !pTrack || !pTrack-GetFirst() || !pSettings || 
!pSettings-ShowChanges() )
-return; // nix da oder abgeschaltet
+return; // nothing

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

2015-07-19 Thread Albert Thuswaldner
 sc/source/ui/view/gridwin.cxx |  389 --
 1 file changed, 186 insertions(+), 203 deletions(-)

New commits:
commit 7d537fb4730db4268aec847973299a3e1ca96bf2
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sat Jul 18 00:50:17 2015 +0200

tdf#39468 translated german comments in gridview.cxx

Change-Id: I4f7596e65e46de7819f4d5531c576d0d4651fc7e
Reviewed-on: https://gerrit.libreoffice.org/17176
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index c6ba729..1a3afa7 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -154,7 +154,6 @@ const sal_uInt8 SC_NESTEDBUTTON_UP   = 2;
 #define SC_AUTOFILTER_EMPTY 3
 #define SC_AUTOFILTER_NOTEMPTY  4
 
-//  Modi fuer die FilterListBox
 enum ScFilterBoxMode
 {
 SC_FILTERBOX_FILTER,
@@ -241,7 +240,7 @@ public:
 boolHasDates() const{ return mbListHasDates; }
 };
 
-//  ListBox in einem FloatingWindow (pParent)
+//  ListBox in a FloatingWindow (pParent)
 ScFilterListBox::ScFilterListBox( vcl::Window* pParent, ScGridWindow* pGrid,
   SCCOL nNewCol, SCROW nNewRow, 
ScFilterBoxMode eNewMode ) :
 ListBox( pParent, WB_AUTOHSCROLL ),
@@ -375,10 +374,9 @@ vcl::Window* 
ScFilterFloatingWindow::GetPreferredKeyInputWindow()
 
 static bool lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange rRange )
 {
-//  wenn es ein editierbarer Bereich ist, und rechts unten eine 
Matrix-Zelle
-//  mit Origin links oben liegt, enthaelt der Bereich genau die Matrix.
-//! Direkt die MatrixEdges Funktionen von der Column herausreichen ???
-
+// If it is a editable range and if there is a Matrix cell at the bottom 
right with an
+// origin top left then the range will be set to contain the exact matrix.
+//! Extract the MatrixEdges functions directly from the column ???
 if ( !pDoc-IsBlockEditable( rRange.aStart.Tab(), 
rRange.aStart.Col(),rRange.aStart.Row(),
 rRange.aEnd.Col(),rRange.aEnd.Row() ) )
 return false;
@@ -419,9 +417,9 @@ static bool lcl_GetHyperlinkCell(
 if (rCell.isEmpty())
 {
 if ( rPosX = 0 )
-return false;   // alles leer bis links
+return false;   // everything empty to 
the links
 else
---rPosX;// weitersuchen
+--rPosX;// continue search
 }
 else
 {
@@ -436,7 +434,7 @@ static bool lcl_GetHyperlinkCell(
 else if (rCell.meType == CELLTYPE_FORMULA  
rCell.mpFormula-IsHyperLinkCell())
 bFound = true;
 else
-return false;   // andere Zelle
+return false;   // other cell
 }
 }
 while ( !bFound );
@@ -444,7 +442,7 @@ static bool lcl_GetHyperlinkCell(
 return bFound;
 }
 
-//  WB_DIALOGCONTROL noetig fuer UNO-Controls
+//  WB_DIALOGCONTROL needed for UNO-Controls
 ScGridWindow::ScGridWindow( vcl::Window* pParent, ScViewData* pData, 
ScSplitPos eWhichPos )
 :   Window( pParent, WB_CLIPCHILDREN | WB_DIALOGCONTROL ),
 DropTargetHelper( this ),
@@ -521,7 +519,7 @@ ScGridWindow::ScGridWindow( vcl::Window* pParent, 
ScViewData* pData, ScSplitPos
 eVWhich = SC_SPLIT_BOTTOM;
 break;
 default:
-OSL_FAIL(GridWindow: falsche Position);
+OSL_FAIL(GridWindow: wrong position);
 }
 
 SetBackground();
@@ -582,7 +580,7 @@ void ScGridWindow::ClickExtern()
 IMPL_LINK_NOARG(ScGridWindow, PopupModeEndHdl)
 {
 if (mpFilterBox)
-mpFilterBox-SetCancelled(); // nicht mehr auswaehlen
+mpFilterBox-SetCancelled(); // cancel select
 GrabFocus();
 return 0;
 }
@@ -967,13 +965,13 @@ void ScGridWindow::DoScenarioMenu( const ScRange 
rScenRange )
 mpFilterBox.disposeAndClear();
 mpFilterFloat.disposeAndClear();
 
-SCCOL nCol = rScenRange.aEnd.Col(); // Zelle unterhalb des Buttons
+SCCOL nCol = rScenRange.aEnd.Col(); // Cell is below the Buttons
 SCROW nRow = rScenRange.aStart.Row();
 if (nRow == 0)
 {
-nRow = rScenRange.aEnd.Row() + 1;   // Bereich ganz oben - Button 
unterhalb
+nRow = rScenRange.aEnd.Row() + 1;   // Range at very the top - Button 
below
 if (nRowMAXROW) nRow = MAXROW;
-//! Texthoehe addieren (wenn sie an der View gespeichert ist...)
+//! Add text height (if it is stored in the View...)
 }
 
 ScDocument* pDoc = pViewData-GetDocument();
@@ -992,8 +990,8 @@ void ScGridWindow::DoScenarioMenu( const ScRange 
rScenRange )
 Rectangle

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

2015-07-19 Thread Albert Thuswaldner
 sc/source/ui/view/gridwin2.cxx |   54 -
 sc/source/ui/view/gridwin3.cxx |6 ++--
 2 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit d26eb83f0a5180b4ec9a58f5238dfde50ccfba04
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sat Jul 18 15:20:19 2015 +0200

tdf#39468 translated german comments in gridview2.cxx and gridview3.cxx

Change-Id: Ia385720ac604296cbcccadb6a99f1b965a90ad10
Reviewed-on: https://gerrit.libreoffice.org/17181
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 18b04a6..d2f97e3 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -231,7 +231,7 @@ void ScGridWindow::DoPushPivotButton( SCCOL nCol, SCROW 
nRow, const MouseEvent
 }
 else
 {
-OSL_FAIL(Da is ja garnix);
+OSL_FAIL(Nothing here);
 }
 }
 
@@ -670,7 +670,7 @@ void ScGridWindow::UpdateDragRect( bool bShowRange, const 
Rectangle rPosRect )
 UpdateDragRectOverlay();
 }
 
-//  Page-Break-Modus
+//  Page-Break Mode
 
 sal_uInt16 ScGridWindow::HitPageBreak( const Point rMouse, ScRange* pSource,
 SCCOLROW* pBreak, SCCOLROW* pPrev )
@@ -696,7 +696,7 @@ sal_uInt16 ScGridWindow::HitPageBreak( const Point rMouse, 
ScRange* pSource,
 Point aTL = pViewData-GetScrPos( nPosX, nPosY, eWhich );
 Point aBR = pViewData-GetScrPos( nPosX+1, nPosY+1, eWhich );
 
-//  Horizontal mehr Toleranz als vertikal, weil mehr Platz ist
+//  Horizontal more  tolerances as as for vertical, because there is 
more space
 if ( nMouseX = aTL.X() + 4 )
 {
 bHori = true;
@@ -705,7 +705,7 @@ sal_uInt16 ScGridWindow::HitPageBreak( const Point rMouse, 
ScRange* pSource,
 else if ( nMouseX = aBR.X() - 6 )
 {
 bHori = true;
-nHitX = nPosX+1;// linker Rand der naechsten 
Zelle
+nHitX = nPosX+1;// left edge of the next cell
 }
 if ( nMouseY = aTL.Y() + 2 )
 {
@@ -715,7 +715,7 @@ sal_uInt16 ScGridWindow::HitPageBreak( const Point rMouse, 
ScRange* pSource,
 else if ( nMouseY = aBR.Y() - 4 )
 {
 bVert = true;
-nHitY = nPosY+1;// oberer Rand der naechsten 
Zelle
+nHitY = nPosY+1;// upper edge of the next cell
 }
 
 if ( bHori || bVert )
@@ -757,7 +757,7 @@ sal_uInt16 ScGridWindow::HitPageBreak( const Point rMouse, 
ScRange* pSource,
 if (nFound)
 aSource = aRange;
 
-//  Umbrueche
+//  breaks
 
 if ( bVert  bInsideH  !nFound )
 {
@@ -796,18 +796,18 @@ sal_uInt16 ScGridWindow::HitPageBreak( const Point 
rMouse, ScRange* pSource,
 }
 
 if (pSource)
-*pSource = aSource; // Druckbereich
+*pSource = aSource; // print break
 if (pBreak)
-*pBreak = nBreak;   // X/Y Position des verchobenen Seitenumbruchs
+*pBreak = nBreak;   // X/Y position of the moved page break
 if (pPrev)
-*pPrev = nPrev; // X/Y Anfang der Seite, die am Umbruch zuende 
ist
+*pPrev = nPrev; // X/Y begining of the page, which is above 
the break
 return nFound;
 }
 
 void ScGridWindow::PagebreakMove( const MouseEvent rMEvt, bool bUp )
 {
-//! Scrolling und Umschalten mit RFMouseMove zusammenfassen !
-//! (Weginvertieren vor dem Scrolling ist anders)
+//! Combine scrolling and switching with RFMouseMove !
+//! (Inverting before scrolling is different)
 
 //  Scrolling
 
@@ -824,7 +824,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent rMEvt, 
bool bUp )
 nDy = 1;
 if ( nDx != 0 || nDy != 0 )
 {
-if ( bPagebreakDrawn )  // weginvertieren
+if ( bPagebreakDrawn )  // invert
 {
 bPagebreakDrawn = false;
 UpdateDragRectOverlay();
@@ -835,7 +835,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent rMEvt, 
bool bUp )
 bTimer = true;
 }
 
-//  Umschalten bei Fixierung (damit Scrolling funktioniert)
+// Switching when fixating (so Scrolling works)
 
 if ( eWhich == pViewData-GetActivePart() ) //??
 {
@@ -858,9 +858,9 @@ void ScGridWindow::PagebreakMove( const MouseEvent rMEvt, 
bool bUp )
 }
 }
 
-//  ab hier neu
+// from here new
 
-//  gesucht wird eine Position zwischen den Zellen (vor nPosX / nPosY)
+// Searching for a position between the cells (before nPosX / nPosY)
 SCsCOL nPosX;
 SCsROW nPosY;
 pViewData-GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
@@ -927,23 +927,23 @@ void ScGridWindow

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

2015-07-19 Thread Albert Thuswaldner
 sc/source/ui/view/gridwin4.cxx |  121 +++--
 sc/source/ui/view/gridwin5.cxx |   30 +-
 2 files changed, 74 insertions(+), 77 deletions(-)

New commits:
commit 7175ee2b17b47f983646a180c67843c958aa4f25
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sat Jul 18 23:10:28 2015 +0200

fdo#39468 translated german comments in gridview4.cxx and gridview5.cxx

Change-Id: I2537bedfab6856787d9b75e919cd3973a514bd3c
Reviewed-on: https://gerrit.libreoffice.org/17184
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 4432653a..2a054d6 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -71,9 +71,9 @@ static void lcl_LimitRect( Rectangle rRect, const Rectangle 
rVisible )
 if ( rRect.Top() rVisible.Top()-1 )rRect.Top()= 
rVisible.Top()-1;
 if ( rRect.Bottom()  rVisible.Bottom()+1 ) rRect.Bottom() = 
rVisible.Bottom()+1;
 
-// auch wenn das inner-Rectangle nicht sichtbar ist, muss evtl.
-// die Titelzeile gezeichnet werden, darum kein Rueckgabewert mehr.
-// Wenn's weit daneben liegt, wird lcl_DrawOneFrame erst gar nicht gerufen.
+// The header row must be drawn also when the inner rectangle is not 
visable,
+// that is why there is no return value anymore.
+// When it is far away, then lcl_DrawOneFrame is not even called.
 }
 
 static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const Rectangle 
rInnerPixel,
@@ -81,8 +81,8 @@ static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const 
Rectangle rInnerP
 double nPPTX, double nPPTY, const Fraction rZoomY,
 ScDocument* pDoc, ScViewData* pButtonViewData, bool 
bLayoutRTL )
 {
-//  pButtonViewData wird nur benutzt, um die Button-Groesse zu setzen,
-//  darf ansonsten NULL sein!
+// pButtonViewData is only used to set the the button size,
+// can otherwise be NULL!
 
 Rectangle aInner = rInnerPixel;
 if ( bLayoutRTL )
@@ -123,7 +123,7 @@ static void lcl_DrawOneFrame( vcl::RenderContext* pDev, 
const Rectangle rInnerP
 
 pDev-SetLineColor();
 pDev-SetFillColor( rColor );
-//  links, oben, rechts, unten
+//  left, top, right, bottom
 pDev-DrawRect( Rectangle( aOuter.Left(),  aOuter.Top(),aInner.Left(), 
 aOuter.Bottom() ) );
 pDev-DrawRect( Rectangle( aOuter.Left(),  aOuter.Top(),
aOuter.Right(), aInner.Top()) );
 pDev-DrawRect( Rectangle( aInner.Right(), aOuter.Top(),
aOuter.Right(), aOuter.Bottom() ) );
@@ -185,14 +185,14 @@ static void lcl_DrawScenarioFrames( OutputDevice* pDev, 
ScViewData* pViewData, S
 if ( nTab+1nTabCount  pDoc-IsScenario(nTab+1)  
!pDoc-IsScenario(nTab) )
 {
 if ( nX1  0 ) --nX1;
-if ( nY1=2 ) nY1 -= 2; // Hack: Titelzeile beruehrt zwei 
Zellen
+if ( nY1=2 ) nY1 -= 2; // Hack: Header row affects two 
cells
 else if ( nY1  0 ) --nY1;
 if ( nX2  MAXCOL ) ++nX2;
-if ( nY2  MAXROW-1 ) nY2 += 2; // Hack: Titelzeile beruehrt zwei 
Zellen
+if ( nY2  MAXROW-1 ) nY2 += 2; // Hack: Header row affects two 
cells
 else if ( nY2  MAXROW ) ++nY2;
 ScRange aViewRange( nX1,nY1,nTab, nX2,nY2,nTab );
 
-//! Ranges an der Table cachen
+//! cache the ranges in table
 
 ScMarkData aMarks;
 for (SCTAB i=nTab+1; inTabCount  pDoc-IsScenario(i); i++)
@@ -206,13 +206,13 @@ static void lcl_DrawScenarioFrames( OutputDevice* pDev, 
ScViewData* pViewData, S
 for (size_t j = 0, n = xRanges-size(); j  n; ++j)
 {
 ScRange aRange = *(*xRanges)[j];
-//  Szenario-Rahmen immer dann auf zusammengefasste Zellen 
erweitern, wenn
-//  dadurch keine neuen nicht-ueberdeckten Zellen mit umrandet 
werden
+// Always extend scenario frame to merged cells where no new 
non-covered cells
+// are framed
 pDoc-ExtendTotalMerge( aRange );
 
-//! - Repaint beim Zusammenfassen erweitern !!!
+//! - Extend repaint when merging !!!
 
-if ( aRange.Intersects( aViewRange ) )  //! Platz fuer 
Text/Button?
+if ( aRange.Intersects( aViewRange ) )  //! Space for 
Text/Button?
 {
 Point aStartPos = pViewData-GetScrPos(
 aRange.aStart.Col(), aRange.aStart.Row(), 
eWhich, true );
@@ -240,7 +240,7 @@ static void lcl_DrawScenarioFrames( OutputDevice* pDev, 
ScViewData* pViewData, S
 if (aCurrent.isEmpty())
 aCurrent = ScGlobal::GetRscString( STR_EMPTYDATA );
 
-//! eigener Text (keins) statt (leer) ???
+//! Own text (None) instead of (Empty

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

2015-07-19 Thread Albert Thuswaldner
 sc/source/ui/view/drawvie3.cxx |   12 -
 sc/source/ui/view/drawvie4.cxx |   14 ---
 sc/source/ui/view/drawview.cxx |   50 -
 3 files changed, 36 insertions(+), 40 deletions(-)

New commits:
commit e97e4baf5433ccf782101ad1eb3d07db1867f648
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sun Jul 19 11:09:37 2015 +0200

fdo#39468 translated german comments in drawview*.cxx

Change-Id: I18cfceb16a5405684a9c36e8b517c6afc3eda05b
Reviewed-on: https://gerrit.libreoffice.org/17188
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx
index 74ad8e6..7e79ef9 100644
--- a/sc/source/ui/view/drawvie3.cxx
+++ b/sc/source/ui/view/drawvie3.cxx
@@ -53,7 +53,7 @@ ScDrawView::ScDrawView( OutputDevice* pOut, ScViewData* pData 
) :
 Construct();
 }
 
-// Verankerung setzen
+// set anchor
 
 void ScDrawView::SetPageAnchored()
 {
@@ -169,7 +169,7 @@ void adjustAnchoredPosition(const SdrHint rHint, const 
ScDocument rDoc, SCTAB
 
 void ScDrawView::Notify( SfxBroadcaster rBC, const SfxHint rHint )
 {
-if (dynamic_castconst ScTabDeletedHint*(rHint))
// Tabelle geloescht
+if (dynamic_castconst ScTabDeletedHint*(rHint))
// Sheet has been deleted
 {
 SCTAB nDelTab = static_castconst ScTabDeletedHint(rHint).GetTab();
 if (ValidTab(nDelTab))
@@ -179,7 +179,7 @@ void ScDrawView::Notify( SfxBroadcaster rBC, const 
SfxHint rHint )
 HideSdrPage();
 }
 }
-else if (dynamic_castconst ScTabSizeChangedHint*(rHint))   
// Groesse geaendert
+else if (dynamic_castconst ScTabSizeChangedHint*(rHint))   
// Size has been changed
 {
 if ( nTab == static_castconst ScTabSizeChangedHint(rHint).GetTab() )
 UpdateWorkArea();
@@ -206,10 +206,10 @@ void ScDrawView::UpdateIMap( SdrObject* pObj )
 if ( pIMapInfo )
 pImageMap = pIMapInfo-GetImageMap();
 
-// Target-Liste besorgen
+// handle target list
 pViewData-GetViewShell()-GetViewFrame()-GetTargetList( aTargetList 
);
 
-// Grafik vom Objekt besorgen
+// handle graphics from object
 if ( pObj-ISA( SdrGrafObj ) )
 aGraphic = static_castSdrGrafObj*(pObj)-GetGraphic();
 else
@@ -219,7 +219,7 @@ void ScDrawView::UpdateIMap( SdrObject* pObj )
 aGraphic = *pGraphic;
 }
 
-ScIMapDlgSet( aGraphic, pImageMap, aTargetList, pObj );// aus 
imapwrap
+ScIMapDlgSet( aGraphic, pImageMap, aTargetList, pObj );// from 
imapwrap
 }
 }
 
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index 108d714..73794d2 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -119,7 +119,6 @@ bool ScDrawView::BeginDrag( vcl::Window* pWindow, const 
Point rStartPos )
 //  there's no need to call SchDLL::Update for the charts in the 
clipboard doc.
 //  Update with the data (including NumberFormatter) from the live 
document would
 //  also store the NumberFormatter in the clipboard chart (#88749#)
-// lcl_RefreshChartData( pModel, pViewData-GetDocument() );
 
 ScDocShell* pDocSh = pViewData-GetDocShell();
 
@@ -132,9 +131,9 @@ bool ScDrawView::BeginDrag( vcl::Window* pWindow, const 
Point rStartPos )
 uno::Referencedatatransfer::XTransferable xTransferable( 
pTransferObj );
 
 pTransferObj-SetDrawPersist( aDragShellRef );// keep persist for 
ole objects alive
-pTransferObj-SetDragSource( this );// copies selection
+pTransferObj-SetDragSource( this );   // copies selection
 
-SC_MOD()-SetDragObject( NULL, pTransferObj );  // for internal DD
+SC_MOD()-SetDragObject( NULL, pTransferObj ); // for internal DD
 pTransferObj-StartDrag( pWindow, DND_ACTION_COPYMOVE | 
DND_ACTION_LINK );
 }
 
@@ -237,9 +236,7 @@ void getRangeFromOle2Object(const SdrOle2Obj rObj, 
std::vectorOUString rRang
 getRangeFromDataSource(xDataSource, rRangeRep);
 }
 
-/**
- * Get all cell ranges that are referenced by the selected chart objects.
- */
+// Get all cell ranges that are referenced by the selected chart objects.
 void getChartSourceRanges(ScDocument* pDoc, const SdrMarkList rObjs, 
std::vectorScRange rRanges)
 {
 std::vectorOUString aRangeReps;
@@ -435,7 +432,7 @@ uno::Referencedatatransfer::XTransferable 
ScDrawView::CopyToTransferable()
 return xTransferable;
 }
 
-//  Korrektur fuer 100% berechnen, unabhaengig von momentanen Einstellungen
+// Calculate correction for 100%, regardless of current settings
 
 void ScDrawView::CalcNormScale( Fraction rFractX, Fraction rFractY ) const
 {
@@ -511,8 +508,7 @@ void ScDrawView

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

2015-07-19 Thread Albert Thuswaldner
 sc/source/ui/view/editsh.cxx   |   38 +-
 sc/source/ui/view/formatsh.cxx |  147 ++---
 2 files changed, 70 insertions(+), 115 deletions(-)

New commits:
commit 791f2fa12dcffe3de68f14e657eafd80157d2c5b
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sun Jul 19 01:01:27 2015 +0200

fdo#39468 translated german comments in editsh.cxx and formatsh.cxx

Change-Id: Icf2afd6f841692d0f63f5989d720a703bf98568c
Reviewed-on: https://gerrit.libreoffice.org/17185
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 676ba7c..37169ff 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -160,13 +160,13 @@ void lclInsertCharacter( EditView* pTableView, EditView* 
pTopView, sal_Unicode c
 void ScEditShell::Execute( SfxRequest rReq )
 {
 const SfxItemSet*   pReqArgs= rReq.GetArgs();
-sal_uInt16  nSlot   = rReq.GetSlot();
+sal_uInt16  nSlot   = rReq.GetSlot();
 SfxBindingsrBindings   = pViewData-GetBindings();
 
 ScInputHandler* pHdl = GetMyInputHdl();
-OSL_ENSURE(pHdl,kein ScInputHandler);
+OSL_ENSURE(pHdl,no ScInputHandler);
 
-EditView* pTopView   = pHdl-GetTopView();  // hat Eingabezeile den 
Focus?
+EditView* pTopView   = pHdl-GetTopView();  // Has thee input cell the 
focus?
 EditView* pTableView = pHdl-GetTableView();
 
 OSL_ENSURE(pTableView,no EditView :-();
@@ -187,7 +187,7 @@ void ScEditShell::Execute( SfxRequest rReq )
 
 switch ( nSlot )
 {
-case FID_INS_CELL_CONTENTS: // Insert-Taste, weil als Acc definiert
+case FID_INS_CELL_CONTENTS: // Insert taste, while defined as Acc
 bIsInsertMode = !pTableView-IsInsertMode();
 pTableView-SetInsertMode( bIsInsertMode );
 if (pTopView)
@@ -358,7 +358,7 @@ void ScEditShell::Execute( SfxRequest rReq )
 if ( pFontItem )
 {
 OUString aFontName(pFontItem-GetValue());
-vcl::Font aFont(aFontName, Size(1,1)); // Size nur wg. 
CTOR
+vcl::Font aFont(aFontName, Size(1,1)); // Size just 
because CTOR
 aNewItem = SvxFontItem( aFont.GetFamily(), 
aFont.GetName(),
 aFont.GetStyleName(), aFont.GetPitch(),
 aFont.GetCharSet(), ATTR_FONT  );
@@ -390,7 +390,7 @@ void ScEditShell::Execute( SfxRequest rReq )
 aSetItem.PutItemForScriptType( nSetScript, aNewItem );
 aSet.Put( aSetItem.GetItemSet(), false );
 
-//  SetAttribs an der View selektiert ein Wort, wenn 
nichts selektiert ist
+// SetAttribs on the View selects a word, when nothing is 
selected
 pTableView-GetEditEngine()-QuickSetAttribs( aSet, 
pTableView-GetSelection() );
 pTableView-InsertText(aString);
 if (pTopView)
@@ -483,7 +483,7 @@ void ScEditShell::Execute( SfxRequest rReq )
 if (pEngine-GetParagraphCount() == 1)
 {
 OUString aText = pEngine-GetText();
-ESelection aSel = pEditView-GetSelection();// 
aktuelle View
+ESelection aSel = pEditView-GetSelection();// current 
View
 
 ScDocument* pDoc = pViewData-GetDocument();
 ScRefFinder aFinder(aText, pViewData-GetCurPos(), pDoc, 
pDoc-GetAddressConvention());
@@ -500,7 +500,7 @@ void ScEditShell::Execute( SfxRequest rReq )
 pTopView-SetSelection( aNewSel );
 }
 
-//  Referenz wird selektiert - beim Tippen nicht 
ueberschreiben
+// refenence is being selected - do not overwrite 
when typing
 bSetSelIsRef = true;
 }
 }
@@ -525,7 +525,7 @@ void ScEditShell::Execute( SfxRequest rReq )
 const SvxURLField* pURLField = GetURLField();
 if ( pURLField )
 {
-//  altes Feld selektieren
+// select old field
 
 ESelection aSel = pTableView-GetSelection();
 aSel.Adjust();
@@ -533,7 +533,7 @@ void ScEditShell::Execute( SfxRequest rReq )
 aSel.nEndPos = aSel.nStartPos + 1;
 pTableView-SetSelection( aSel );
 
-//  neues Feld einfuegen
+// insert new field
 
 SvxURLField aURLField( rURL, rName, 
SVXURLFORMAT_REPR

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

2015-07-19 Thread Albert Thuswaldner
 sc/source/ui/view/dbfunc3.cxx |   96 +-
 1 file changed, 48 insertions(+), 48 deletions(-)

New commits:
commit c7c7ae8a5d73c0439de4798f5130da933eebc7a2
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sun Jul 19 11:46:10 2015 +0200

fdo#39468 translated german comments in dbfunc3.cxx

Change-Id: I3fd45e8d72c060d439effe7404648b4989221674
Reviewed-on: https://gerrit.libreoffice.org/17190
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index e80cdc9..26466f6 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -86,9 +86,9 @@ using ::std::vector;
 
 // STATIC DATA ---
 
-//  Outliner
+//  outliner
 
-//  Outline-Gruppierung erzeugen
+// create outline grouping
 
 void ScDBFunc::MakeOutline( bool bColumns, bool bRecord )
 {
@@ -103,7 +103,7 @@ void ScDBFunc::MakeOutline( bool bColumns, bool bRecord )
 ErrorMessage(STR_NOMULTISELECT);
 }
 
-//  Outline-Gruppierung loeschen
+// delete outline grouping
 
 void ScDBFunc::RemoveOutline( bool bColumns, bool bRecord )
 {
@@ -118,7 +118,7 @@ void ScDBFunc::RemoveOutline( bool bColumns, bool bRecord )
 ErrorMessage(STR_NOMULTISELECT);
 }
 
-//  Menue-Status: Outlines loeschen
+//  menu status: delete outlines
 
 void ScDBFunc::TestRemoveOutline( bool rCol, bool rRow )
 {
@@ -141,9 +141,9 @@ void ScDBFunc::TestRemoveOutline( bool rCol, bool rRow )
 bool bColMarked = ( nStartRow == 0  nEndRow == MAXROW );
 bool bRowMarked = ( nStartCol == 0  nEndCol == MAXCOL );
 
-//  Spalten
+// columns
 
-if ( !bRowMarked || bColMarked )// nicht wenn ganze Zeilen 
markiert
+if ( !bRowMarked || bColMarked )// not when entire rows 
are marked
 {
 ScOutlineArray rArray = pTable-GetColArray();
 ScSubOutlineIterator aColIter( rArray );
@@ -156,9 +156,9 @@ void ScDBFunc::TestRemoveOutline( bool rCol, bool rRow )
 }
 }
 
-//  Zeilen
+// rows
 
-if ( !bColMarked || bRowMarked )// nicht wenn ganze 
Spalten markiert
+if ( !bColMarked || bRowMarked )// not when entire columns 
are marked
 {
 ScOutlineArray rArray = pTable-GetRowArray();
 ScSubOutlineIterator aRowIter( rArray );
@@ -189,12 +189,12 @@ void ScDBFunc::RemoveAllOutlines( bool bRecord )
 UpdateScrollBars();
 }
 
-//  Auto-Outlines
+// auto outlines
 
 void ScDBFunc::AutoOutline( bool bRecord )
 {
 SCTAB nTab = GetViewData().GetTabNo();
-ScRange aRange( 0,0,nTab, MAXCOL,MAXROW,nTab ); // ganze Tabelle, wenn 
nichts markiert
+ScRange aRange( 0,0,nTab, MAXCOL,MAXROW,nTab ); // the complete sheet, 
if nothing is marked
 ScMarkData rMark = GetViewData().GetMarkData();
 if ( rMark.IsMarked() || rMark.IsMultiMarked() )
 {
@@ -207,7 +207,7 @@ void ScDBFunc::AutoOutline( bool bRecord )
 aFunc.AutoOutline( aRange, bRecord );
 }
 
-//  Outline-Ebene auswaehlen
+// select outline level
 
 void ScDBFunc::SelectLevel( bool bColumns, sal_uInt16 nLevel, bool bRecord, 
bool bPaint )
 {
@@ -221,7 +221,7 @@ void ScDBFunc::SelectLevel( bool bColumns, sal_uInt16 
nLevel, bool bRecord, bool
 UpdateScrollBars();
 }
 
-//  einzelne Outline-Gruppe einblenden
+// show individual outline groups
 
 void ScDBFunc::ShowOutline( bool bColumns, sal_uInt16 nLevel, sal_uInt16 
nEntry, bool bRecord, bool bPaint )
 {
@@ -235,7 +235,7 @@ void ScDBFunc::ShowOutline( bool bColumns, sal_uInt16 
nLevel, sal_uInt16 nEntry,
 UpdateScrollBars();
 }
 
-//  einzelne Outline-Gruppe ausblenden
+// hide individual outline groups
 
 void ScDBFunc::HideOutline( bool bColumns, sal_uInt16 nLevel, sal_uInt16 
nEntry, bool bRecord, bool bPaint )
 {
@@ -249,7 +249,7 @@ void ScDBFunc::HideOutline( bool bColumns, sal_uInt16 
nLevel, sal_uInt16 nEntry,
 UpdateScrollBars();
 }
 
-//  Menue-Status: markierten Bereich ein-/ausblenden
+// menu status: show/hide marked range
 
 bool ScDBFunc::OutlinePossible(bool bHide)
 {
@@ -273,7 +273,7 @@ bool ScDBFunc::OutlinePossible(bool bHide)
 SCCOLROW nStart;
 SCCOLROW nEnd;
 
-//  Spalten
+// columns
 
 ScOutlineArray rColArray = pTable-GetColArray();
 ScSubOutlineIterator aColIter( rColArray );
@@ -295,7 +295,7 @@ bool ScDBFunc::OutlinePossible(bool bHide)
 }
 }
 
-//  Zeilen
+// rows
 
 ScOutlineArray rRowArray = pTable-GetRowArray();
 ScSubOutlineIterator aRowIter( rRowArray );
@@ -322,7 +322,7 @@ bool ScDBFunc::OutlinePossible(bool bHide

Re: minutes of ESC call ...

2015-03-28 Thread Albert Thuswaldner
On Thu, Mar 26, 2015 at 5:11 PM, Michael Meeks
michael.me...@collabora.com wrote:
 + make sure to create a new openid if you are using the Google openID 
 (all)
 [ still need to get this done ! ]

I wonder a bit what the real alternatives are here? It seems to me
that OpenId is on the ropes. I would like to avoid having to get yet
another account somwhere, just to get acess to openid just to be able
to login into gerrit. Have other ways to login been considered?


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


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

2015-02-16 Thread Albert Thuswaldner
 sc/source/core/data/documen7.cxx |   38 ++--
 sc/source/core/data/documen8.cxx |   28 -
 sc/source/core/data/documen9.cxx |   38 +---
 sc/source/core/data/document.cxx |  116 ++-
 4 files changed, 103 insertions(+), 117 deletions(-)

New commits:
commit 37eefa01acaf44f2c523d58c8a83568dc9763bd1
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sun Feb 8 16:41:10 2015 +0100

Translated remaining german commments in sc/source/core/data/documenX.cxx

Change-Id: I637c592aeb53830be2f32153462df7d9a189e844
Reviewed-on: https://gerrit.libreoffice.org/14370
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index babd82e..36b0223 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -76,7 +76,7 @@ void ScDocument::Broadcast( const ScHint rHint )
 TrackFormulas( rHint.GetId() );
 }
 
-//  Repaint fuer bedingte Formate mit relativen Referenzen:
+// Repaint for conditional formats with relative references:
 for(SCTAB nTab = 0; nTab  static_castSCTAB(maTabs.size()); ++nTab)
 {
 if(!maTabs[nTab])
@@ -133,7 +133,7 @@ void ScDocument::BroadcastCells( const ScRange rRange, 
sal_uLong nHint, bool bB
 TrackFormulas(nHint);
 }
 
-//  Repaint fuer bedingte Formate mit relativen Referenzen:
+// Repaint for conditional formats with relative references:
 for (SCTAB nTab = nTab1; nTab = nTab2; ++nTab)
 {
 ScTable* pTab = FetchTable(nTab);
@@ -336,11 +336,11 @@ void ScDocument::PutInFormulaTree( ScFormulaCell* pCell )
 {
 OSL_ENSURE( pCell, PutInFormulaTree: pCell Null );
 RemoveFromFormulaTree( pCell );
-// anhaengen
+// append
 if ( pEOFormulaTree )
 pEOFormulaTree-SetNext( pCell );
 else
-pFormulaTree = pCell;   // kein Ende, kein Anfang..
+pFormulaTree = pCell;   // No end, no beginning..
 pCell-SetPrevious( pEOFormulaTree );
 pCell-SetNext( 0 );
 pEOFormulaTree = pCell;
@@ -423,20 +423,20 @@ void ScDocument::CalcFormulaTree( bool bOnlyForced, bool 
bProgressBar, bool bSet
 while ( pCell )
 {
 if ( pCell-GetDirty() )
-pCell = pCell-GetNext();   // alles klar
+pCell = pCell-GetNext();   // all clear
 else
 {
 if ( pCell-GetCode()-IsRecalcModeAlways() )
 {
-// pCell wird im SetDirty neu angehaengt!
+// pCell is set to Dirty again!
 ScFormulaCell* pNext = pCell-GetNext();
 pCell-SetDirty();
-// falls pNext==0 und neue abhaengige hinten angehaengt
-// wurden, so macht das nichts, da die alle bDirty sind
+// if pNext==0 and new dependencies were appended at the 
end,
+// this does not matter since they all are bDirty
 pCell = pNext;
 }
 else
-{   // andere simpel berechnen
+{   // calculate the other single
 if( bSetAllDirty )
 pCell-SetDirtyVar();
 pCell = pCell-GetNext();
@@ -451,8 +451,8 @@ void ScDocument::CalcFormulaTree( bool bOnlyForced, bool 
bProgressBar, bool bSet
 ScFormulaCell* pLastNoGood = 0;
 while ( pCell )
 {
-// Interpret setzt bDirty zurueck und callt Remove, auch der 
referierten!
-// bei RECALCMODE_ALWAYS bleibt die Zelle
+// Interpret resets bDirty and calls Remove, also the referenced!
+// the Cell remains when RECALCMODE_ALWAYS.
 if ( bOnlyForced )
 {
 if ( pCell-GetCode()-IsRecalcModeForced() )
@@ -463,7 +463,7 @@ void ScDocument::CalcFormulaTree( bool bOnlyForced, bool 
bProgressBar, bool bSet
 pCell-Interpret();
 }
 if ( pCell-GetPrevious() || pCell == pFormulaTree )
-{   // (IsInFormulaTree(pCell)) kein Remove gewesen = next
+{   // (IsInFormulaTree(pCell)) no Remove was called = next
 pLastNoGood = pCell;
 pCell = pCell-GetNext();
 }
@@ -524,13 +524,13 @@ void ScDocument::ClearFormulaTree()
 void ScDocument::AppendToFormulaTrack( ScFormulaCell* pCell )
 {
 OSL_ENSURE( pCell, AppendToFormulaTrack: pCell Null );
-// Zelle kann nicht in beiden Listen gleichzeitig sein
+// The cell can not be in both lists at the same time
 RemoveFromFormulaTrack( pCell );
 RemoveFromFormulaTree( pCell );
 if ( pEOFormulaTrack )
 pEOFormulaTrack-SetNextTrack( pCell );
 else
-pFormulaTrack = pCell

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

2015-02-13 Thread Albert Thuswaldner
 sc/source/core/data/table1.cxx |   93 ++--
 sc/source/core/data/table2.cxx |  104 -
 sc/source/core/data/table3.cxx |   92 +---
 3 files changed, 143 insertions(+), 146 deletions(-)

New commits:
commit 8893a361238ce8e151f1db65a36a8c2506d26594
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Thu Feb 12 21:20:00 2015 +0100

Translated german commments in sc/source/core/data/table1-3.cxx

Change-Id: Ic28cb4f9371caf39e783f39fd8a117260b962bfe
Reviewed-on: https://gerrit.libreoffice.org/14451
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 1aa5430..7ace7b5 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -86,15 +86,15 @@ void GetOptimalHeightsInColumn(
 {
 SCSIZE nCount = static_castSCSIZE(nEndRow-nStartRow+1);
 
-//  zuerst einmal ueber den ganzen Bereich
-//  (mit der letzten Spalte in der Hoffnung, dass die am ehesten noch auf
-//   Standard formatiert ist)
+//  first, one time over the whole range
+//  (with the last column in the hope that they most likely still are
+//  on standard format)
 
 std::vectorsal_uInt16 rHeights = rCxt.getHeightArray();
 
 pCol[MAXCOL].GetOptimalHeight(rCxt, nStartRow, nEndRow, 0, 0);
 
-//  daraus Standardhoehe suchen, die im unteren Bereich gilt
+//  from there search for the standard height that is in use in the lower 
part
 
 sal_uInt16 nMinHeight = rHeights[nCount-1];
 SCSIZE nPos = nCount-1;
@@ -103,14 +103,14 @@ void GetOptimalHeightsInColumn(
 SCROW nMinStart = nStartRow + nPos;
 
 sal_uLong nWeightedCount = 0;
-for (SCCOL nCol=0; nColMAXCOL; nCol++) // MAXCOL schon oben
+for (SCCOL nCol=0; nColMAXCOL; nCol++) // MAXCOL already above
 {
 pCol[nCol].GetOptimalHeight(rCxt, nStartRow, nEndRow, nMinHeight, 
nMinStart);
 
 if (pProgress)
 {
 sal_uLong nWeight = pCol[nCol].GetWeightedCount();
-if (nWeight)// nochmal denselben Status muss auch nicht 
sein
+if (nWeight)// does not have to be the same Status
 {
 nWeightedCount += nWeight;
 pProgress-SetState( nWeightedCount + nProgressStart );
@@ -326,9 +326,9 @@ ScTable::~ScTable()
 {
 aCol[nCol].FreeNotes();
 }
-//  nicht im dtor die Pages in der falschen Reihenfolge loeschen
-//  (nTab stimmt dann als Page-Number nicht!)
-//  In ScDocument::Clear wird hinterher per Clear am Draw Layer alles 
geloescht.
+//  In the dtor, don't delete the pages in the wrong order.
+//  (or else nTab does not reflect the page number!)
+//  In ScDocument::Clear is afterwards used from Clear at the Draw 
Layer to delete everything.
 
 ScDrawLayer* pDrawLayer = pDocument-GetDrawLayer();
 if (pDrawLayer)
@@ -422,10 +422,10 @@ void ScTable::SetLink( sal_uInt8 nMode,
 const OUString rTab, sal_uLong nRefreshDelay )
 {
 nLinkMode = nMode;
-aLinkDoc = rDoc;// Datei
+aLinkDoc = rDoc;// File
 aLinkFlt = rFlt;// Filter
-aLinkOpt = rOpt;// Filter-Optionen
-aLinkTab = rTab;// Tabellenname in Quelldatei
+aLinkOpt = rOpt;// Filter options
+aLinkTab = rTab;// Sheet name in source file
 nLinkRefreshDelay = nRefreshDelay;  // refresh delay in seconds, 0==off
 
 if (IsStreamValid())
@@ -449,7 +449,7 @@ long ScTable::GetNeededSize( SCCOL nCol, SCROW nRow,
 bool bWidth, bool bTotalSize )
 {
 ScNeededSizeOptions aOptions;
-aOptions.bSkipMerged = false;   // zusammengefasste mitzaehlen
+aOptions.bSkipMerged = false;   // count merged cells
 aOptions.bTotalSize  = bTotalSize;
 
 return aCol[nCol].GetNeededSize
@@ -568,7 +568,7 @@ bool ScTable::GetPrintArea( SCCOL rEndCol, SCROW rEndRow, 
bool bNotes, bool bF
 SCROW nMaxY = 0;
 SCCOL i;
 
-for (i=0; i=MAXCOL; i++)   // Daten testen
+for (i=0; i=MAXCOL; i++)   // Test data
 {
 if (!aCol[i].IsEmptyData())
 {
@@ -600,7 +600,7 @@ bool ScTable::GetPrintArea( SCCOL rEndCol, SCROW rEndRow, 
bool bNotes, bool bF
 
 SCCOL nMaxDataX = nMaxX;
 
-for (i=0; i=MAXCOL; i++)   // Attribute testen
+for (i=0; i=MAXCOL; i++)   // Test attribute
 {
 SCROW nLastRow;
 if (aCol[i].GetLastVisibleAttr( nLastRow, bFullFormattedArea ))
@@ -612,7 +612,7 @@ bool ScTable::GetPrintArea( SCCOL rEndCol, SCROW rEndRow, 
bool bNotes, bool bF
 }
 }
 
-if (nMaxX == MAXCOL)// Attribute rechts weglassen
+if (nMaxX == MAXCOL

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

2015-02-13 Thread Albert Thuswaldner
 sc/source/core/data/table4.cxx |2 +-
 sc/source/core/data/table5.cxx |   18 +-
 sc/source/core/data/table6.cxx |   24 
 3 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit 7f5a0495eb5579101f58d9fec10153486c91a40a
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Thu Feb 12 21:40:57 2015 +0100

Translated german commments in sc/source/core/data/table4-6.cxx

Change-Id: I18343a3c571269f9b326ffd1acc6e10e3f82d2a2
Reviewed-on: https://gerrit.libreoffice.org/14452
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index b7840ee..1fc9884 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -286,7 +286,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 nRow = sal::static_int_castSCROW( nRow + nAddY );
 }
 else
-bVal = false;   // kein Datum passt auch nicht
+bVal = false;   // No date is also not ok
 }
 if (bVal)
 {
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index dac0786..2d45f1a 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -100,7 +100,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
 sal_uInt16 nAreaCount = GetPrintRangeCount();
 if ( nAreaCount  1 )
 {
-//  bei mehreren Bereichen nichts anzeigen:
+// Show nothing, when multiple ranges
 
 for (nX=0; nXMAXCOL; nX++)
 RemoveColBreak(nX, true, false);
@@ -119,7 +119,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
 nEndCol = pArea-aEnd.Col();
 nEndRow = pArea-aEnd.Row();
 }
-}   // sonst alles
+}   // otherwise show everything
 }
 
 // get bSkipColBreaks/bSkipRowBreaks flags:
@@ -151,7 +151,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
 long nPageSizeX = aPageSizeTwips.Width();
 long nPageSizeY = aPageSizeTwips.Height();
 
-//  Anfang: Breaks loeschen
+//  Beginning: Remove breaks
 
 for (nX=0; nXnStartCol; nX++)
 RemoveColBreak(nX, true, false);
@@ -162,7 +162,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
 if (nStartRow  0)
 SetRowBreak(nStartRow, true, false);  // AREABREAK
 
-//  Mittelteil: Breaks verteilen
+//  Middle part: Distribute breaks
 
 bool bRepeatCol = ( nRepeatStartX != SCCOL_REPEAT_NONE );
 bool bColFound = false;
@@ -288,7 +288,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
 nSizeY += nThisY;
 }
 
-//  Ende: Breaks loeschen
+//  End: Remove Break
 
 if (nEndCol  MAXCOL)
 {
@@ -1072,7 +1072,7 @@ Size ScTable::GetPageSize() const
 if ( bPageSizeValid )
 return aPageSizeTwips;
 else
-return Size();  // leer
+return Size();  // blank
 }
 
 void ScTable::SetRepeatArea( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, 
SCROW nEndRow )
@@ -1150,7 +1150,7 @@ void ScTable::SetPageStyle( const OUString rName )
 InvalidateTextWidth(NULL, NULL, false, false);
 }
 
-if ( pNewStyle )// auch ohne den alten (fuer 
UpdateStdNames)
+if ( pNewStyle )// also without the old one (for 
UpdateStdNames)
 aPageStyle = aStrNew;
 
 if (IsStreamValid())
@@ -1184,7 +1184,7 @@ void ScTable::InvalidateTextWidth( const ScAddress* 
pAdrFrom, const ScAddress* p
 rCol.SetScriptType(nRow, SC_SCRIPTTYPE_UNKNOWN);
 
 if ( bBroadcast )
-{   // nur bei CalcAsShown
+{   // Only with CalcAsShown
 switch (aCell.meType)
 {
 case CELLTYPE_VALUE :
@@ -1224,7 +1224,7 @@ void ScTable::InvalidateTextWidth( const ScAddress* 
pAdrFrom, const ScAddress* p
 aCol[nCol].SetScriptType(nRow, SC_SCRIPTTYPE_UNKNOWN);
 
 if ( bBroadcast )
-{   // nur bei CalcAsShown
+{   // Only with CalcAsShown
 switch (aCell.meType)
 {
 case CELLTYPE_VALUE :
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 5272a48..3375df4 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -134,10 +134,10 @@ bool ScTable::SearchCell(const SvxSearchItem 
rSearchItem, SCCOL nCol, SCROW nRo
 if ( bFound 
 ( (rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE)
 ||(rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL

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

2015-02-12 Thread Albert Thuswaldner
 sc/source/core/data/dptabres.cxx |2 
 sc/source/core/data/drwlayer.cxx |   52 +--
 sc/source/core/data/fillinfo.cxx |  106 +++
 sc/source/core/data/markdata.cxx |8 +-
 sc/source/core/data/patattr.cxx  |   51 +-
 5 files changed, 109 insertions(+), 110 deletions(-)

New commits:
commit 16fd6c99f7e97e67991dfecd03684795320e47e9
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sun Feb 8 20:37:15 2015 +0100

Translated german comments in sc/source/core/data/

Change-Id: I82ca987d5d74d8137b9ed02e085f390191344bb0
Reviewed-on: https://gerrit.libreoffice.org/14371
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 00eecec..cd78a5d 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -57,7 +57,7 @@ using ::com::sun::star::uno::Sequence;
 
 namespace {
 
-sal_uInt16 nFuncStrIds[12] = // passend zum enum ScSubTotalFunc
+sal_uInt16 nFuncStrIds[12] = // matching enum ScSubTotalFunc
 {
 0,  // SUBTOTAL_FUNC_NONE
 STR_FUN_TEXT_AVG,   // SUBTOTAL_FUNC_AVE
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 9d68ca3..1ec9d13 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -193,7 +193,7 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const 
OUString rName ) :
 bAdjustEnabled( true ),
 bHyphenatorSet( false )
 {
-pGlobalDrawPersist = NULL;  // nur einmal benutzen
+pGlobalDrawPersist = NULL;  // Only use once
 
 SfxObjectShell* pObjSh = pDocument ? pDocument-GetDocumentShell() : NULL;
 XColorListRef pXCol = XColorList::GetStdColorList();
@@ -239,7 +239,7 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const 
OUString rName ) :
 rAdmin.NewLayer(OUString(hidden),   SC_LAYER_HIDDEN);
 // Controls is new - must also be created when loading
 
-//  Link fuer URL-Fields setzen
+// Set link for URL-Fields
 ScModule* pScMod = SC_MOD();
 Outliner rOutliner = GetDrawOutliner();
 rOutliner.SetCalcFieldValueHdl( LINK( pScMod, ScModule, CalcFieldValueHdl 
) );
@@ -267,7 +267,7 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const 
OUString rName ) :
 if( pDoc )
 EnableUndo( pDoc-IsUndoEnabled() );
 
-//  URL-Buttons haben keinen Handler mehr, machen alles selber
+//  URL-Buttons have no handler anymore, all is done by themselves
 
 if( !nInst++ )
 {
@@ -352,11 +352,11 @@ void ScDrawLayer::ScRemovePage( SCTAB nTab )
 if (bRecording)
 {
 SdrPage* pPage = GetPage(static_castsal_uInt16(nTab));
-AddCalcUndo(new SdrUndoDelPage(*pPage));// Undo-Action wird 
Owner der Page
-RemovePage( static_castsal_uInt16(nTab) );   
 // nur austragen, nicht loeschen
+AddCalcUndo(new SdrUndoDelPage(*pPage));// Undo-Action becomes 
the page owner
+RemovePage( static_castsal_uInt16(nTab) );// just deliver, not 
deleting
 }
 else
-DeletePage( static_castsal_uInt16(nTab) );   
 // einfach weg damit
+DeletePage( static_castsal_uInt16(nTab) );// just get rid of it
 
 ResetTab(nTab, pDoc-GetTableCount()-1);
 }
@@ -383,7 +383,7 @@ void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, 
sal_uInt16 nNewPos)
 SdrPage* pOldPage = GetPage(nOldPos);
 SdrPage* pNewPage = GetPage(nNewPos);
 
-// kopieren
+// Copying
 
 if (pOldPage  pNewPage)
 {
@@ -513,9 +513,9 @@ void ScDrawLayer::SetPageSize( sal_uInt16 nPageNo, const 
Size rSize, bool bUpda
 Broadcast( ScTabSizeChangedHint( static_castSCTAB(nPageNo) ) );  
 // SetWorkArea() an den Views
 }
 
-// Detektivlinien umsetzen (an neue Hoehen/Breiten anpassen)
-//  auch wenn Groesse gleich geblieben ist
-//  (einzelne Zeilen/Spalten koennen geaendert sein)
+// Implement Detective lines (adjust to new heights / widths)
+//  even if size is still the same
+//  (individual rows/columns can have been changed))
 
 bool bNegativePage = pDoc  pDoc-IsNegativePage( 
static_castSCTAB(nPageNo) );
 
@@ -640,7 +640,7 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, 
ScDrawObjData rData, bool bNegati
 TwipsToMM( aPos.X() );
 TwipsToMM( aPos.Y() );
 
-//  Berechnung und Werte wie in detfunc.cxx
+// Calculations and values as in detfunc.cxx
 
 Size aSize( (long)( TwipsToHmm( pDoc-GetColWidth( nCol1, nTab1) ) ),
 (long)( TwipsToHmm( pDoc-GetRowHeight( nRow1, nTab1) ) ) 
);
@@ -880,7 +880,7 @@ bool ScDrawLayer::GetPrintArea( ScRange rRange, bool 
bSetHor, bool bSetVer ) co
 long nStartX = LONG_MAX;
 long nStartY = LONG_MAX

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

2015-02-12 Thread Albert Thuswaldner
 sc/source/core/data/sortparam.cxx |8 +++---
 sc/source/core/data/stlpool.cxx   |   40 +-
 sc/source/core/data/stlsheet.cxx  |   29 
 sc/source/core/data/subtotalparam.cxx |2 -
 4 files changed, 40 insertions(+), 39 deletions(-)

New commits:
commit 7da33e8c5396f324a2427536138d84b8b032e24e
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sun Feb 8 21:19:19 2015 +0100

Translated german comments in sc/source/core/data/ #2

Change-Id: Ia8a0235b8acb5c76c195e280a75256f6b82684bb
Reviewed-on: https://gerrit.libreoffice.org/14372
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sc/source/core/data/sortparam.cxx 
b/sc/source/core/data/sortparam.cxx
index 235201d..b876577 100644
--- a/sc/source/core/data/sortparam.cxx
+++ b/sc/source/core/data/sortparam.cxx
@@ -94,7 +94,7 @@ ScSortParam ScSortParam::operator=( const ScSortParam r )
 bool ScSortParam::operator==( const ScSortParam rOther ) const
 {
 bool bEqual = false;
-// Anzahl der Sorts gleich?
+// Number of Sorts the same?
 sal_uInt16 nLast  = 0;
 sal_uInt16 nOtherLast = 0;
 sal_uInt16 nSortSize = GetSortKeyCount();
@@ -156,7 +156,7 @@ ScSortParam::ScSortParam( const ScSubTotalParam rSub, 
const ScSortParam rOld )
 {
 sal_uInt16 i;
 
-//  zuerst die Gruppen aus den Teilergebnissen
+//  first the groups from the partial results
 if (rSub.bDoSort)
 for (i=0; iMAXSUBTOTAL; i++)
 if (rSub.bGroupActive[i])
@@ -168,7 +168,7 @@ ScSortParam::ScSortParam( const ScSubTotalParam rSub, 
const ScSortParam rOld )
 maKeyState.push_back(key);
 }
 
-//  dann dahinter die alten Einstellungen
+//  then the old settings
 for (i=0; i  rOld.GetSortKeyCount(); i++)
 if (rOld.maKeyState[i].bDoSort)
 {
@@ -177,7 +177,7 @@ ScSortParam::ScSortParam( const ScSubTotalParam rSub, 
const ScSortParam rOld )
 for (sal_uInt16 j = 0; j  GetSortKeyCount(); j++)
 if ( maKeyState[j].nField == nThisField )
 bDouble = true;
-if (!bDouble)   // ein Feld nicht zweimal eintragen
+if (!bDouble)   // do not enter a field twice
 {
 ScSortKeyState key;
 key.bDoSort = true;
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index a7dfe9c..fce5fa1 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -129,7 +129,7 @@ void ScStyleSheetPool::Remove( SfxStyleSheetBase* pStyle )
 void ScStyleSheetPool::CopyStyleFrom( ScStyleSheetPool* pSrcPool,
   const OUString rName, SfxStyleFamily 
eFamily )
 {
-//  this ist Dest-Pool
+//  this is the Dest-Pool
 
 SfxStyleSheetBase* pStyleSheet = pSrcPool-Find( rName, eFamily );
 if (pStyleSheet)
@@ -180,13 +180,13 @@ void ScStyleSheetPool::CopyStyleFrom( ScStyleSheetPool* 
pSrcPool,
 }
 }
 
-//  Standard-Vorlagen
+//  Standard templates
 
 #define SCSTR(id)   ScGlobal::GetRscString(id)
 
 void ScStyleSheetPool::CopyStdStylesFrom( ScStyleSheetPool* pSrcPool )
 {
-//  Default-Styles kopieren
+//  Copy Default styles
 
 CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD), 
SFX_STYLE_FAMILY_PARA );
 CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_RESULT),   
SFX_STYLE_FAMILY_PARA );
@@ -214,13 +214,13 @@ static void lcl_CheckFont( SfxItemSet rSet, LanguageType 
eLang, sal_uInt16 nFon
 
 void ScStyleSheetPool::CreateStandardStyles()
 {
-//  neue Eintraege auch bei CopyStdStylesFrom eintragen
+//  Add new entries even for CopyStdStylesFrom
 
 Color   aColBlack   ( COL_BLACK );
 Color   aColGrey( COL_LIGHTGRAY );
 OUStringaStr;
 sal_Int32   nStrLen;
-OUStringaHelpFile;//XXX JN welcher Text???
+OUStringaHelpFile;//which text???
 SfxItemSet* pSet= NULL;
 SfxItemSet* pHFSet  = NULL;
 SvxSetItem* pHFSetItem  = NULL;
@@ -237,7 +237,7 @@ void ScStyleSheetPool::CreateStandardStyles()
 
 OUString  aStrStandard = ScGlobal::GetRscString(STR_STYLENAME_STANDARD);
 
-// Zellformatvorlagen:
+// Cell format templates:
 
 // 1. Standard
 
@@ -270,7 +270,7 @@ void ScStyleSheetPool::CreateStandardStyles()
 //if ( eCtl == LANGUAGE_THAI )
 //pSet-Put( SvxFontHeightItem( 300, 100, ATTR_CTL_FONT_HEIGHT ) );   
// 15 pt
 
-// 2. Ergebnis
+// 2. Result
 
 pSheet = static_castScStyleSheet*( Make( SCSTR( STR_STYLENAME_RESULT ),
 SFX_STYLE_FAMILY_PARA,
@@ -282,7 +282,7 @@ void ScStyleSheetPool::CreateStandardStyles()
 pSet-Put( SvxPostureItem( ITALIC_NORMAL, ATTR_FONT_POSTURE ) );
 pSet-Put

[Libreoffice-commits] core.git: Changes to 'refs/changes/16/3816/2'

2014-09-29 Thread Albert Thuswaldner

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


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

2014-09-29 Thread Albert Thuswaldner

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


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

2014-09-29 Thread Albert Thuswaldner

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


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

2014-09-29 Thread Albert Thuswaldner

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


[Libreoffice-commits] core.git: Changes to 'refs/changes/70/3370/2'

2014-09-29 Thread Albert Thuswaldner

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


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

2014-09-29 Thread Albert Thuswaldner

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


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

2014-09-29 Thread Albert Thuswaldner

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


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

2014-09-29 Thread Albert Thuswaldner

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


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

2014-09-29 Thread Albert Thuswaldner

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


[Libreoffice-commits] core.git: Changes to 'refs/changes/72/3772/3'

2014-09-29 Thread Albert Thuswaldner

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


[Libreoffice-commits] core.git: Changes to 'refs/changes/72/3772/2'

2014-09-29 Thread Albert Thuswaldner

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


[Libreoffice-commits] core.git: Changes to 'refs/changes/01/3801/2'

2014-09-29 Thread Albert Thuswaldner

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


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

2014-09-29 Thread Albert Thuswaldner

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


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

2014-09-29 Thread Albert Thuswaldner

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


[Libreoffice-commits] core.git: Changes to 'refs/changes/17/3217/3'

2014-09-29 Thread Albert Thuswaldner

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


[Libreoffice-commits] core.git: Changes to 'refs/changes/17/3217/2'

2014-09-29 Thread Albert Thuswaldner

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


[Libreoffice-commits] core.git: Changes to 'refs/changes/80/3380/2'

2014-09-29 Thread Albert Thuswaldner

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


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

2014-09-29 Thread Albert Thuswaldner

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


[Libreoffice-commits] core.git: Changes to 'refs/changes/50/3350/2'

2014-09-29 Thread Albert Thuswaldner

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


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

2014-09-29 Thread Albert Thuswaldner

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


Re: problems with opening document

2013-08-09 Thread Albert Thuswaldner
Hi Marc,
Please CC the dev-list when replying to keep the email thread consistent.
Use replay-all.
On Fri, Aug 9, 2013 at 8:37 AM, Marc Baert marc.baert.f...@gmail.comwrote:

  Hi Albert,

 I'm working with the version 4.0.4.2.  That one gives me problems.


 Hmm, seems then as we have a regression here in a point release (bugfix
release).


  I shall install the version 4.2.0.0.


Sadly enough 4.2 is still alpha, I would not recommend using this for
normal work. I don't know, but you might want to try with LO 4.1, maybe the
problem was fixed during this release cycle.

Anyhow I would ask you to please consider reporting this bug, I know we are
working on automatic regression testing based on files attached to
bugreports. Thus by reporting the bug you would help with ensuring that
this problem doesn't creep into any future version!

/Albert




  Thanks


 Op 9/08/2013 0:38, Albert Thuswaldner schreef:

  Sorry for the spamming, but I just finished a new dev build and tested
 your file once more,

 - With LO Version: 4.2.0.0.alpha0+ Build ID:
 f807403faa3a20a6b4e95c9e8441cd637e3e548d it opens fine.

 /Albert


 On Fri, Aug 9, 2013 at 12:17 AM, Albert Thuswaldner 
 albert.thuswald...@gmail.com wrote:

  Hmm, the thing that is dumped by the core is this:

 Program terminated with signal 11, Segmentation fault.
 #0  SvxShape::HasSdrObjectOwnership (this=0x0) at
 /home/thuswa/work/libo2/svx/source/unodraw/unoshape.cxx:269
 269 if ( !mpImpl-mbHasSdrObjectOwnership )

 Maybe this gives a hint to some Writer dev what might have gone wrong
 here.
 /Albert



 On Thu, Aug 8, 2013 at 11:55 PM, Albert Thuswaldner 
 albert.thuswald...@gmail.com wrote:

Hi Marc,
 Just did a quick check opening your file:

 - With LO Version 4.0.2.1 (Build ID: 400m0(Build:1)) it opens fine.
 - With my not so recent dev build Version: 4.1.0.0.alpha1+ Build ID:
 37690fe74c4c585564c67c1ff7b8be353cf6803 it crashes due to a segmentation
 fault (core dump file generated by my build is sadly not that verbose)

 What version of LO are you using?

 You might want to open a bugreport on this issue and attached the file.

 https://wiki.documentfoundation.org/BugReport

 It would help if you did.

 Thanks,

 /Albert





  On Thu, Aug 8, 2013 at 11:07 PM, Marc Baert 
 marc.baert.f...@gmail.comwrote:

  Dear All,

 I can not open the document in annexe.  With openoffice I can open
 it.


 Kind regards,


 --

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






image/jpegnaamloos.JPG___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: problems with opening document

2013-08-08 Thread Albert Thuswaldner
Hi Marc,
Just did a quick check opening your file:

- With LO Version 4.0.2.1 (Build ID: 400m0(Build:1)) it opens fine.
- With my not so recent dev build Version: 4.1.0.0.alpha1+ Build ID:
37690fe74c4c585564c67c1ff7b8be353cf6803 it crashes due to a segmentation
fault (core dump file generated by my build is sadly not that verbose)

What version of LO are you using?

You might want to open a bugreport on this issue and attached the file.

https://wiki.documentfoundation.org/BugReport

It would help if you did.

Thanks,

/Albert





On Thu, Aug 8, 2013 at 11:07 PM, Marc Baert marc.baert.f...@gmail.comwrote:

  Dear All,

 I can not open the document in annexe.  With openoffice I can open it.


 Kind regards,


 --

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


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


Re: problems with opening document

2013-08-08 Thread Albert Thuswaldner
Hmm, the thing that is dumped by the core is this:

Program terminated with signal 11, Segmentation fault.
#0  SvxShape::HasSdrObjectOwnership (this=0x0) at
/home/thuswa/work/libo2/svx/source/unodraw/unoshape.cxx:269
269 if ( !mpImpl-mbHasSdrObjectOwnership )

Maybe this gives a hint to some Writer dev what might have gone wrong here.
/Albert



On Thu, Aug 8, 2013 at 11:55 PM, Albert Thuswaldner 
albert.thuswald...@gmail.com wrote:

 Hi Marc,
 Just did a quick check opening your file:

 - With LO Version 4.0.2.1 (Build ID: 400m0(Build:1)) it opens fine.
 - With my not so recent dev build Version: 4.1.0.0.alpha1+ Build ID:
 37690fe74c4c585564c67c1ff7b8be353cf6803 it crashes due to a segmentation
 fault (core dump file generated by my build is sadly not that verbose)

 What version of LO are you using?

 You might want to open a bugreport on this issue and attached the file.

 https://wiki.documentfoundation.org/BugReport

 It would help if you did.

 Thanks,

 /Albert





 On Thu, Aug 8, 2013 at 11:07 PM, Marc Baert marc.baert.f...@gmail.comwrote:

  Dear All,

 I can not open the document in annexe.  With openoffice I can open it.


 Kind regards,


 --

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



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


Re: problems with opening document

2013-08-08 Thread Albert Thuswaldner
Sorry for the spamming, but I just finished a new dev build and tested your
file once more,

- With LO Version: 4.2.0.0.alpha0+ Build ID:
f807403faa3a20a6b4e95c9e8441cd637e3e548d it opens fine.

/Albert


On Fri, Aug 9, 2013 at 12:17 AM, Albert Thuswaldner 
albert.thuswald...@gmail.com wrote:

 Hmm, the thing that is dumped by the core is this:

 Program terminated with signal 11, Segmentation fault.
 #0  SvxShape::HasSdrObjectOwnership (this=0x0) at
 /home/thuswa/work/libo2/svx/source/unodraw/unoshape.cxx:269
 269 if ( !mpImpl-mbHasSdrObjectOwnership )

 Maybe this gives a hint to some Writer dev what might have gone wrong here.
 /Albert



 On Thu, Aug 8, 2013 at 11:55 PM, Albert Thuswaldner 
 albert.thuswald...@gmail.com wrote:

 Hi Marc,
 Just did a quick check opening your file:

 - With LO Version 4.0.2.1 (Build ID: 400m0(Build:1)) it opens fine.
 - With my not so recent dev build Version: 4.1.0.0.alpha1+ Build ID:
 37690fe74c4c585564c67c1ff7b8be353cf6803 it crashes due to a segmentation
 fault (core dump file generated by my build is sadly not that verbose)

 What version of LO are you using?

 You might want to open a bugreport on this issue and attached the file.

 https://wiki.documentfoundation.org/BugReport

 It would help if you did.

 Thanks,

 /Albert





  On Thu, Aug 8, 2013 at 11:07 PM, Marc Baert 
 marc.baert.f...@gmail.comwrote:

  Dear All,

 I can not open the document in annexe.  With openoffice I can open it.


 Kind regards,


 --

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




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


[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sc/source

2013-05-07 Thread Albert Thuswaldner
 sc/source/ui/dbgui/tpsort.cxx |   40 
 sc/source/ui/inc/tpsort.hxx   |1 +
 2 files changed, 25 insertions(+), 16 deletions(-)

New commits:
commit 104edfdc77147b49f32df55e8b48a3aef4542c87
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sat May 4 01:39:24 2013 +0200

fdo#51828 - UI: Sort: can use more than 3 criteria once only - additional 
fix

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

diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 4ee9d11..034afec 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -184,7 +184,6 @@ void ScTabPageSortFields::Reset( const SfxItemSet /* 
rArgSet */ )
 {
 maSortKeyItems[i].m_pLbSort-SelectEntryPos( GetFieldSelPos(
 aSortData.maKeyState[i].nField ) );
-
 (aSortData.maKeyState[i].bAscending)
 ? maSortKeyItems[i].m_pBtnUp-Check()
 : maSortKeyItems[i].m_pBtnDown-Check();
@@ -234,6 +233,10 @@ void ScTabPageSortFields::Reset( const SfxItemSet /* 
rArgSet */ )
 pDlg-SetByRows ( bSortByRows );
 pDlg-SetHeaders( bHasHeader );
 }
+
+// Make sure that there is always a last undefined sort key
+if ( maSortKeyItems[nSortKeyCount - 1].m_pLbSort-GetSelectEntryPos()  0 )
+SetLastSortKey( nSortKeyCount );
 }
 
 // ---
@@ -443,6 +446,25 @@ sal_uInt16 ScTabPageSortFields::GetFieldSelPos( SCCOLROW 
nField )
 return nFieldPos;
 }
 
+void ScTabPageSortFields::SetLastSortKey( sal_uInt16 nItem )
+{
+// Extend local SortParam copy
+const ScSortKeyState atempKeyState = { false, 0, true };
+aSortData.maKeyState.push_back( atempKeyState );
+
+// Add Sort Key Item
+++nSortKeyCount;
+maSortKeyCtrl.AddSortKey( nSortKeyCount );
+maSortKeyItems[nItem].m_pLbSort-SetSelectHdl(
+ LINK( this, ScTabPageSortFields, SelectHdl ) );
+
+FillFieldLists( nItem );
+
+// Set Status
+maSortKeyItems[nItem].m_pBtnUp-Check();
+maSortKeyItems[nItem].m_pLbSort-SelectEntryPos( 0 );
+}
+
 // ---
 // Handler:
 //-
@@ -451,26 +473,12 @@ IMPL_LINK( ScTabPageSortFields, SelectHdl, ListBox *, pLb 
)
 {
 rtl::OUString aSelEntry = pLb-GetSelectEntry();
 ScSortKeyItems::iterator pIter;
-sal_uInt16 nSortKeyIndex = nSortKeyCount;
 
 // If last listbox is enabled add one item
 if ( maSortKeyItems.back().m_pLbSort == pLb )
 if ( aSelEntry != aStrUndefined )
 {
-// Extend local SortParam copy
-const ScSortKeyState atempKeyState = { false, 0, true };
-aSortData.maKeyState.push_back( atempKeyState );
-
-// Add Sort Key Item
-++nSortKeyCount;
-maSortKeyCtrl.AddSortKey( nSortKeyCount );
-maSortKeyItems[nSortKeyIndex].m_pLbSort-SetSelectHdl( LINK( this, 
ScTabPageSortFields, SelectHdl ) );
-
-FillFieldLists( nSortKeyIndex );
-
-// Set Status
-maSortKeyItems[nSortKeyIndex].m_pBtnUp-Check();
-maSortKeyItems[nSortKeyIndex].m_pLbSort-SelectEntryPos( 0 );
+SetLastSortKey( nSortKeyCount );
 return 0;
 }
 
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 8ce4a42..b230581 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -95,6 +95,7 @@ private:
 voidInit();
 voidFillFieldLists  ( sal_uInt16 nStartField );
 sal_uInt16  GetFieldSelPos  ( SCCOLROW nField );
+voidSetLastSortKey( sal_uInt16 nItem );
 
 // Handler 
 DECL_LINK( SelectHdl, ListBox * );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - sc/source

2013-05-07 Thread Albert Thuswaldner
 sc/source/ui/dbgui/tpsort.cxx |   40 
 sc/source/ui/inc/tpsort.hxx   |1 +
 2 files changed, 25 insertions(+), 16 deletions(-)

New commits:
commit e4c614bbd75f3103e1e88f9840645cc2c1f78a14
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sat May 4 01:39:24 2013 +0200

fdo#51828 - UI: Sort: can use more than 3 criteria once only - additional 
fix

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

diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 4ee9d11..034afec 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -184,7 +184,6 @@ void ScTabPageSortFields::Reset( const SfxItemSet /* 
rArgSet */ )
 {
 maSortKeyItems[i].m_pLbSort-SelectEntryPos( GetFieldSelPos(
 aSortData.maKeyState[i].nField ) );
-
 (aSortData.maKeyState[i].bAscending)
 ? maSortKeyItems[i].m_pBtnUp-Check()
 : maSortKeyItems[i].m_pBtnDown-Check();
@@ -234,6 +233,10 @@ void ScTabPageSortFields::Reset( const SfxItemSet /* 
rArgSet */ )
 pDlg-SetByRows ( bSortByRows );
 pDlg-SetHeaders( bHasHeader );
 }
+
+// Make sure that there is always a last undefined sort key
+if ( maSortKeyItems[nSortKeyCount - 1].m_pLbSort-GetSelectEntryPos()  0 )
+SetLastSortKey( nSortKeyCount );
 }
 
 // ---
@@ -443,6 +446,25 @@ sal_uInt16 ScTabPageSortFields::GetFieldSelPos( SCCOLROW 
nField )
 return nFieldPos;
 }
 
+void ScTabPageSortFields::SetLastSortKey( sal_uInt16 nItem )
+{
+// Extend local SortParam copy
+const ScSortKeyState atempKeyState = { false, 0, true };
+aSortData.maKeyState.push_back( atempKeyState );
+
+// Add Sort Key Item
+++nSortKeyCount;
+maSortKeyCtrl.AddSortKey( nSortKeyCount );
+maSortKeyItems[nItem].m_pLbSort-SetSelectHdl(
+ LINK( this, ScTabPageSortFields, SelectHdl ) );
+
+FillFieldLists( nItem );
+
+// Set Status
+maSortKeyItems[nItem].m_pBtnUp-Check();
+maSortKeyItems[nItem].m_pLbSort-SelectEntryPos( 0 );
+}
+
 // ---
 // Handler:
 //-
@@ -451,26 +473,12 @@ IMPL_LINK( ScTabPageSortFields, SelectHdl, ListBox *, pLb 
)
 {
 rtl::OUString aSelEntry = pLb-GetSelectEntry();
 ScSortKeyItems::iterator pIter;
-sal_uInt16 nSortKeyIndex = nSortKeyCount;
 
 // If last listbox is enabled add one item
 if ( maSortKeyItems.back().m_pLbSort == pLb )
 if ( aSelEntry != aStrUndefined )
 {
-// Extend local SortParam copy
-const ScSortKeyState atempKeyState = { false, 0, true };
-aSortData.maKeyState.push_back( atempKeyState );
-
-// Add Sort Key Item
-++nSortKeyCount;
-maSortKeyCtrl.AddSortKey( nSortKeyCount );
-maSortKeyItems[nSortKeyIndex].m_pLbSort-SetSelectHdl( LINK( this, 
ScTabPageSortFields, SelectHdl ) );
-
-FillFieldLists( nSortKeyIndex );
-
-// Set Status
-maSortKeyItems[nSortKeyIndex].m_pBtnUp-Check();
-maSortKeyItems[nSortKeyIndex].m_pLbSort-SelectEntryPos( 0 );
+SetLastSortKey( nSortKeyCount );
 return 0;
 }
 
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 8ce4a42..b230581 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -95,6 +95,7 @@ private:
 voidInit();
 voidFillFieldLists  ( sal_uInt16 nStartField );
 sal_uInt16  GetFieldSelPos  ( SCCOLROW nField );
+voidSetLastSortKey( sal_uInt16 nItem );
 
 // Handler 
 DECL_LINK( SelectHdl, ListBox * );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PATCH] Calc sort: Use method GetSortKeyCount from SortParam

2013-05-07 Thread Albert Thuswaldner (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3816

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/16/3816/1

Calc sort: Use method GetSortKeyCount from SortParam

Change-Id: I4500ba71abeba5fe8293cea22b10fd910e46059f
---
M sc/source/ui/dbgui/tpsort.cxx
1 file changed, 3 insertions(+), 3 deletions(-)



diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 4499600..1479313 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -169,13 +169,13 @@
 if ( aSortData.maKeyState[0].bDoSort )
 {
 // Make sure that the all sort keys are reset
-for ( sal_uInt16 i=nSortKeyCount; iaSortData.maKeyState.size(); i++ )
+for ( sal_uInt16 i=nSortKeyCount; iaSortData.GetSortKeyCount(); i++ )
 {
 maSortKeyCtrl.AddSortKey(i+1);
 maSortKeyItems[i].m_pLbSort-SetSelectHdl( LINK( this,
  ScTabPageSortFields, SelectHdl ) );
 }
-nSortKeyCount = aSortData.maKeyState.size();
+nSortKeyCount = aSortData.GetSortKeyCount();
 FillFieldLists(0);
 
 for ( sal_uInt16 i=0; inSortKeyCount; i++ )
@@ -265,7 +265,7 @@
 if ( nSortPos[i] == LISTBOX_ENTRY_NOTFOUND ) nSortPos[i] = 0;
 }
 
-if( nSortKeyCount = aNewSortData.maKeyState.size() )
+if( nSortKeyCount = aNewSortData.GetSortKeyCount() )
 aNewSortData.maKeyState.resize(nSortKeyCount);
 
 if ( nSortPos[0]  0 )

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4500ba71abeba5fe8293cea22b10fd910e46059f
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Albert Thuswaldner albert.thuswald...@gmail.com

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


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

2013-05-07 Thread Albert Thuswaldner
 sc/source/ui/dbgui/tpsort.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 9a0846b56a46c43e9f4ce7372a9cd89efc50954a
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Tue May 7 20:19:54 2013 +0200

Calc sort: Use method GetSortKeyCount from SortParam

Change-Id: I4500ba71abeba5fe8293cea22b10fd910e46059f
Reviewed-on: https://gerrit.libreoffice.org/3816
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 4499600..1479313 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -169,13 +169,13 @@ void ScTabPageSortFields::Reset( const SfxItemSet /* 
rArgSet */ )
 if ( aSortData.maKeyState[0].bDoSort )
 {
 // Make sure that the all sort keys are reset
-for ( sal_uInt16 i=nSortKeyCount; iaSortData.maKeyState.size(); i++ )
+for ( sal_uInt16 i=nSortKeyCount; iaSortData.GetSortKeyCount(); i++ )
 {
 maSortKeyCtrl.AddSortKey(i+1);
 maSortKeyItems[i].m_pLbSort-SetSelectHdl( LINK( this,
  ScTabPageSortFields, SelectHdl ) );
 }
-nSortKeyCount = aSortData.maKeyState.size();
+nSortKeyCount = aSortData.GetSortKeyCount();
 FillFieldLists(0);
 
 for ( sal_uInt16 i=0; inSortKeyCount; i++ )
@@ -265,7 +265,7 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet 
rArgSet )
 if ( nSortPos[i] == LISTBOX_ENTRY_NOTFOUND ) nSortPos[i] = 0;
 }
 
-if( nSortKeyCount = aNewSortData.maKeyState.size() )
+if( nSortKeyCount = aNewSortData.GetSortKeyCount() )
 aNewSortData.maKeyState.resize(nSortKeyCount);
 
 if ( nSortPos[0]  0 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Help with saving state to vector with arbitrary length

2013-05-06 Thread Albert Thuswaldner
Hi,
While removing the limit of 3 sort criteria in Calc, I more or less
intentionally left out fixing the saving of state.

The state is set here:
http://opengrok.libreoffice.org/xref/core/sc/source/ui/view/cellsh2.cxx#507

and retrived here:
http://opengrok.libreoffice.org/xref/core/sc/source/ui/view/cellsh2.cxx#429

As can be seen in the code above the state is only saved for 3 sort
criteria. The state is kept by six RIDs FN_PARAM_1 to FN_PARAM_6, one
integer to keep record of the position in the dropdown list, and one
boolean to hold the sort order for each criteria.

How do I solve this now when the there can be an arbitary number of
sort criteria? Is it possible to save the state as two vectors
one integer vector, and one bool vector? Vectors with arbitrary lengths.

Thanks for your help.

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


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

2013-05-06 Thread Albert Thuswaldner
 sc/source/ui/dbgui/tpsort.cxx |   40 
 sc/source/ui/inc/tpsort.hxx   |1 +
 2 files changed, 25 insertions(+), 16 deletions(-)

New commits:
commit b9cd66b970a2b76d6f07ead71b9df7a9232ff5af
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sat May 4 01:39:24 2013 +0200

fdo#51828 - UI: Sort: can use more than 3 criteria once only - additional 
fix

Change-Id: I569766945d96eae74479e310d674c9420e9a2b4b
Reviewed-on: https://gerrit.libreoffice.org/3772
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 6731e71..fd62073 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -184,7 +184,6 @@ void ScTabPageSortFields::Reset( const SfxItemSet /* 
rArgSet */ )
 {
 maSortKeyItems[i].m_pLbSort-SelectEntryPos( GetFieldSelPos(
 aSortData.maKeyState[i].nField ) );
-
 (aSortData.maKeyState[i].bAscending)
 ? maSortKeyItems[i].m_pBtnUp-Check()
 : maSortKeyItems[i].m_pBtnDown-Check();
@@ -234,6 +233,10 @@ void ScTabPageSortFields::Reset( const SfxItemSet /* 
rArgSet */ )
 pDlg-SetByRows ( bSortByRows );
 pDlg-SetHeaders( bHasHeader );
 }
+
+// Make sure that there is always a last undefined sort key
+if ( maSortKeyItems[nSortKeyCount - 1].m_pLbSort-GetSelectEntryPos()  0 )
+SetLastSortKey( nSortKeyCount );
 }
 
 // ---
@@ -443,6 +446,25 @@ sal_uInt16 ScTabPageSortFields::GetFieldSelPos( SCCOLROW 
nField )
 return nFieldPos;
 }
 
+void ScTabPageSortFields::SetLastSortKey( sal_uInt16 nItem )
+{
+// Extend local SortParam copy
+const ScSortKeyState atempKeyState = { false, 0, true };
+aSortData.maKeyState.push_back( atempKeyState );
+
+// Add Sort Key Item
+++nSortKeyCount;
+maSortKeyCtrl.AddSortKey( nSortKeyCount );
+maSortKeyItems[nItem].m_pLbSort-SetSelectHdl(
+ LINK( this, ScTabPageSortFields, SelectHdl ) );
+
+FillFieldLists( nItem );
+
+// Set Status
+maSortKeyItems[nItem].m_pBtnUp-Check();
+maSortKeyItems[nItem].m_pLbSort-SelectEntryPos( 0 );
+}
+
 // ---
 // Handler:
 //-
@@ -451,26 +473,12 @@ IMPL_LINK( ScTabPageSortFields, SelectHdl, ListBox *, pLb 
)
 {
 OUString aSelEntry = pLb-GetSelectEntry();
 ScSortKeyItems::iterator pIter;
-sal_uInt16 nSortKeyIndex = nSortKeyCount;
 
 // If last listbox is enabled add one item
 if ( maSortKeyItems.back().m_pLbSort == pLb )
 if ( aSelEntry != aStrUndefined )
 {
-// Extend local SortParam copy
-const ScSortKeyState atempKeyState = { false, 0, true };
-aSortData.maKeyState.push_back( atempKeyState );
-
-// Add Sort Key Item
-++nSortKeyCount;
-maSortKeyCtrl.AddSortKey( nSortKeyCount );
-maSortKeyItems[nSortKeyIndex].m_pLbSort-SetSelectHdl( LINK( this, 
ScTabPageSortFields, SelectHdl ) );
-
-FillFieldLists( nSortKeyIndex );
-
-// Set Status
-maSortKeyItems[nSortKeyIndex].m_pBtnUp-Check();
-maSortKeyItems[nSortKeyIndex].m_pLbSort-SelectEntryPos( 0 );
+SetLastSortKey( nSortKeyCount );
 return 0;
 }
 
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 8ce4a42..b230581 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -95,6 +95,7 @@ private:
 voidInit();
 voidFillFieldLists  ( sal_uInt16 nStartField );
 sal_uInt16  GetFieldSelPos  ( SCCOLROW nField );
+voidSetLastSortKey( sal_uInt16 nItem );
 
 // Handler 
 DECL_LINK( SelectHdl, ListBox * );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PATCH libreoffice-4-0] fdo#51828 - UI: Sort: can use more than 3 criteria once only...

2013-05-06 Thread Albert Thuswaldner (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3801

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/01/3801/1

fdo#51828 - UI: Sort: can use more than 3 criteria once only - additional fix

Change-Id: I220b3755d3ea30bd9aa25b175f7f3eea7590ebdb
---
M sc/source/ui/dbgui/tpsort.cxx
M sc/source/ui/inc/tpsort.hxx
2 files changed, 25 insertions(+), 16 deletions(-)



diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 6731e71..fd62073 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -184,7 +184,6 @@
 {
 maSortKeyItems[i].m_pLbSort-SelectEntryPos( GetFieldSelPos(
 aSortData.maKeyState[i].nField ) );
-
 (aSortData.maKeyState[i].bAscending)
 ? maSortKeyItems[i].m_pBtnUp-Check()
 : maSortKeyItems[i].m_pBtnDown-Check();
@@ -234,6 +233,10 @@
 pDlg-SetByRows ( bSortByRows );
 pDlg-SetHeaders( bHasHeader );
 }
+
+// Make sure that there is always a last undefined sort key
+if ( maSortKeyItems[nSortKeyCount - 1].m_pLbSort-GetSelectEntryPos()  0 )
+SetLastSortKey( nSortKeyCount );
 }
 
 // ---
@@ -443,6 +446,25 @@
 return nFieldPos;
 }
 
+void ScTabPageSortFields::SetLastSortKey( sal_uInt16 nItem )
+{
+// Extend local SortParam copy
+const ScSortKeyState atempKeyState = { false, 0, true };
+aSortData.maKeyState.push_back( atempKeyState );
+
+// Add Sort Key Item
+++nSortKeyCount;
+maSortKeyCtrl.AddSortKey( nSortKeyCount );
+maSortKeyItems[nItem].m_pLbSort-SetSelectHdl(
+ LINK( this, ScTabPageSortFields, SelectHdl ) );
+
+FillFieldLists( nItem );
+
+// Set Status
+maSortKeyItems[nItem].m_pBtnUp-Check();
+maSortKeyItems[nItem].m_pLbSort-SelectEntryPos( 0 );
+}
+
 // ---
 // Handler:
 //-
@@ -451,26 +473,12 @@
 {
 OUString aSelEntry = pLb-GetSelectEntry();
 ScSortKeyItems::iterator pIter;
-sal_uInt16 nSortKeyIndex = nSortKeyCount;
 
 // If last listbox is enabled add one item
 if ( maSortKeyItems.back().m_pLbSort == pLb )
 if ( aSelEntry != aStrUndefined )
 {
-// Extend local SortParam copy
-const ScSortKeyState atempKeyState = { false, 0, true };
-aSortData.maKeyState.push_back( atempKeyState );
-
-// Add Sort Key Item
-++nSortKeyCount;
-maSortKeyCtrl.AddSortKey( nSortKeyCount );
-maSortKeyItems[nSortKeyIndex].m_pLbSort-SetSelectHdl( LINK( this, 
ScTabPageSortFields, SelectHdl ) );
-
-FillFieldLists( nSortKeyIndex );
-
-// Set Status
-maSortKeyItems[nSortKeyIndex].m_pBtnUp-Check();
-maSortKeyItems[nSortKeyIndex].m_pLbSort-SelectEntryPos( 0 );
+SetLastSortKey( nSortKeyCount );
 return 0;
 }
 
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 8ce4a42..b230581 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -95,6 +95,7 @@
 voidInit();
 voidFillFieldLists  ( sal_uInt16 nStartField );
 sal_uInt16  GetFieldSelPos  ( SCCOLROW nField );
+voidSetLastSortKey( sal_uInt16 nItem );
 
 // Handler 
 DECL_LINK( SelectHdl, ListBox * );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I220b3755d3ea30bd9aa25b175f7f3eea7590ebdb
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Albert Thuswaldner albert.thuswald...@gmail.com

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


[PATCH] fdo#51828 - UI: Sort: can use more than 3 criteria once only...

2013-05-03 Thread Albert Thuswaldner (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3772

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/72/3772/1

fdo#51828 - UI: Sort: can use more than 3 criteria once only - additional fix

Change-Id: I569766945d96eae74479e310d674c9420e9a2b4b
---
M sc/source/ui/dbgui/tpsort.cxx
M sc/source/ui/inc/tpsort.hxx
2 files changed, 26 insertions(+), 16 deletions(-)



diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 6731e71..69551f0 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -178,13 +178,13 @@
 nSortKeyCount = aSortData.maKeyState.size();
 FillFieldLists(0);
 
+
 for ( sal_uInt16 i=0; inSortKeyCount; i++ )
 {
 if (aSortData.maKeyState[i].bDoSort )
 {
 maSortKeyItems[i].m_pLbSort-SelectEntryPos( GetFieldSelPos(
 aSortData.maKeyState[i].nField ) );
-
 (aSortData.maKeyState[i].bAscending)
 ? maSortKeyItems[i].m_pBtnUp-Check()
 : maSortKeyItems[i].m_pBtnDown-Check();
@@ -234,6 +234,10 @@
 pDlg-SetByRows ( bSortByRows );
 pDlg-SetHeaders( bHasHeader );
 }
+
+// Make sure that there is always a last undefined sort key
+if ( maSortKeyItems[nSortKeyCount - 1].m_pLbSort-GetSelectEntryPos()  0 )
+SetLastSortKey( nSortKeyCount );
 }
 
 // ---
@@ -443,6 +447,25 @@
 return nFieldPos;
 }
 
+void ScTabPageSortFields::SetLastSortKey( sal_uInt16 nItem )
+{
+// Extend local SortParam copy
+const ScSortKeyState atempKeyState = { false, 0, true };
+aSortData.maKeyState.push_back( atempKeyState );
+
+// Add Sort Key Item
+++nSortKeyCount;
+maSortKeyCtrl.AddSortKey( nSortKeyCount );
+maSortKeyItems[nItem].m_pLbSort-SetSelectHdl(
+ LINK( this, ScTabPageSortFields, SelectHdl ) );
+
+FillFieldLists( nItem );
+
+// Set Status
+maSortKeyItems[nItem].m_pBtnUp-Check();
+maSortKeyItems[nItem].m_pLbSort-SelectEntryPos( 0 );
+}
+
 // ---
 // Handler:
 //-
@@ -451,26 +474,12 @@
 {
 OUString aSelEntry = pLb-GetSelectEntry();
 ScSortKeyItems::iterator pIter;
-sal_uInt16 nSortKeyIndex = nSortKeyCount;
 
 // If last listbox is enabled add one item
 if ( maSortKeyItems.back().m_pLbSort == pLb )
 if ( aSelEntry != aStrUndefined )
 {
-// Extend local SortParam copy
-const ScSortKeyState atempKeyState = { false, 0, true };
-aSortData.maKeyState.push_back( atempKeyState );
-
-// Add Sort Key Item
-++nSortKeyCount;
-maSortKeyCtrl.AddSortKey( nSortKeyCount );
-maSortKeyItems[nSortKeyIndex].m_pLbSort-SetSelectHdl( LINK( this, 
ScTabPageSortFields, SelectHdl ) );
-
-FillFieldLists( nSortKeyIndex );
-
-// Set Status
-maSortKeyItems[nSortKeyIndex].m_pBtnUp-Check();
-maSortKeyItems[nSortKeyIndex].m_pLbSort-SelectEntryPos( 0 );
+SetLastSortKey( nSortKeyCount );
 return 0;
 }
 
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 8ce4a42..b230581 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -95,6 +95,7 @@
 voidInit();
 voidFillFieldLists  ( sal_uInt16 nStartField );
 sal_uInt16  GetFieldSelPos  ( SCCOLROW nField );
+voidSetLastSortKey( sal_uInt16 nItem );
 
 // Handler 
 DECL_LINK( SelectHdl, ListBox * );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I569766945d96eae74479e310d674c9420e9a2b4b
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Albert Thuswaldner albert.thuswald...@gmail.com

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


Re: Killing the gerrit to dev-list spam ...

2013-05-02 Thread Albert Thuswaldner
Hi,
On Wed, May 1, 2013 at 9:33 PM, Bjoern Michaelsen
bjoern.michael...@canonical.com wrote:

 So, is there anyone who is _not_ a sponsored developer opposing to kill the 
 mail
 spammage? If so:

 - could this be mitigated by a separate gerrit-patches mailing list?
 - could this be mitigated by a daily digest of gerrit news?
 - could this be mitigated by other means?

I vote to have a daily digest with just the newly subbmitted patches.
I think it is important with some sort of visibility of the patch flow
on the dev-list, for general heads-up on what is going on, and more
importantly as an instrument to reduce risk of duplication of work.

I'm against having a separate mailinglist for this.i wouldn't
subscribe to this list, and I guess newcomers will simply miss out on
this. In this case pointing to those summaries ought to be enough
https://gerrit.libreoffice.org/#/q/status:open,n,z
https://gerrit.libreoffice.org/#/q/status:merged,n,z
https://gerrit.libreoffice.org/#/q/status:abandoned,n,z

http://cgit.freedesktop.org/libreoffice/core/log

Maybe these links could be inluded into the daily digest as part of
some standard introduction.

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


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

2013-04-15 Thread Albert Thuswaldner
 sc/source/ui/dbgui/sortkeydlg.cxx |9 +
 sc/source/ui/dbgui/tpsort.cxx |   25 +
 sc/source/ui/inc/sortkeydlg.hxx   |2 +-
 sc/source/ui/inc/tpsort.hxx   |1 +
 4 files changed, 20 insertions(+), 17 deletions(-)

New commits:
commit 42726853bb90eab11bf4fde8b0358ca3c3354529
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sat Apr 13 09:34:54 2013 +0200

Calc Sort: Introducing new method AddKeyItem to avoid code duplication

Change-Id: Ic34b5958472a7d2c19ff686914309b6699e237c4
Reviewed-on: https://gerrit.libreoffice.org/3370
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx 
b/sc/source/ui/dbgui/sortkeydlg.cxx
index 006dad5..3e09076 100644
--- a/sc/source/ui/dbgui/sortkeydlg.cxx
+++ b/sc/source/ui/dbgui/sortkeydlg.cxx
@@ -156,11 +156,12 @@ IMPL_LINK( ScSortKeyCtrl, ScrollHdl, ScrollBar*, 
pScrollBar )
 
 // ---
 
-void ScSortKeyCtrl::AddSortKey( sal_uInt16 nItem )
+void ScSortKeyCtrl::AddSortKey( sal_uInt16 nItemIndex )
 {
-m_rVertScroll.SetRangeMax( nItem );
-m_rVertScroll.DoScroll( nItem );
-m_aSortWin.AddSortKey( nItem );
+++nItemIndex;
+m_rVertScroll.SetRangeMax( nItemIndex );
+m_rVertScroll.DoScroll( nItemIndex );
+m_aSortWin.AddSortKey( nItemIndex );
 checkAutoVScroll();
 }
 
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 6731e71..f153cf7 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -141,10 +141,7 @@ void ScTabPageSortFields::Init()
 
 // Create three sort key dialogs by default
 for ( sal_uInt16 i=0; inSortKeyCount; i++ )
-{
-maSortKeyCtrl.AddSortKey(i+1);
-maSortKeyItems[i].m_pLbSort-SetSelectHdl( LINK( this, 
ScTabPageSortFields, SelectHdl ) );
-}
+AddSortKeyItem(i);
 }
 
 // ---
@@ -170,11 +167,8 @@ void ScTabPageSortFields::Reset( const SfxItemSet /* 
rArgSet */ )
 {
 // Make sure that the all sort keys are reset
 for ( sal_uInt16 i=nSortKeyCount; iaSortData.maKeyState.size(); i++ )
-{
-maSortKeyCtrl.AddSortKey(i+1);
-maSortKeyItems[i].m_pLbSort-SetSelectHdl( LINK( this,
- ScTabPageSortFields, SelectHdl ) );
-}
+AddSortKeyItem(i);
+
 nSortKeyCount = aSortData.maKeyState.size();
 FillFieldLists(0);
 
@@ -443,6 +437,15 @@ sal_uInt16 ScTabPageSortFields::GetFieldSelPos( SCCOLROW 
nField )
 return nFieldPos;
 }
 
+//
+
+void ScTabPageSortFields::AddSortKeyItem( sal_uInt16 nItemIndex )
+{
+maSortKeyCtrl.AddSortKey( nItemIndex );
+maSortKeyItems[nItemIndex].m_pLbSort-SetSelectHdl(
+LINK( this, ScTabPageSortFields, SelectHdl ) );
+}
+
 // ---
 // Handler:
 //-
@@ -463,9 +466,7 @@ IMPL_LINK( ScTabPageSortFields, SelectHdl, ListBox *, pLb )
 
 // Add Sort Key Item
 ++nSortKeyCount;
-maSortKeyCtrl.AddSortKey( nSortKeyCount );
-maSortKeyItems[nSortKeyIndex].m_pLbSort-SetSelectHdl( LINK( this, 
ScTabPageSortFields, SelectHdl ) );
-
+AddSortKeyItem( nSortKeyIndex );
 FillFieldLists( nSortKeyIndex );
 
 // Set Status
diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx
index 060e8ad..7718663 100644
--- a/sc/source/ui/inc/sortkeydlg.hxx
+++ b/sc/source/ui/inc/sortkeydlg.hxx
@@ -99,7 +99,7 @@ private:
 public:
 ScSortKeyCtrl(SfxTabPage* pParent, ScSortKeyItems mrSortKeyItems);
 void setScrollRange();
-void AddSortKey( sal_uInt16 nItem );
+void AddSortKey( sal_uInt16 nItemIndex );
 };
 
 #endif // SC_SORTKEYDLG_HXX
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 8ce4a42..e4d82c6 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -95,6 +95,7 @@ private:
 voidInit();
 voidFillFieldLists  ( sal_uInt16 nStartField );
 sal_uInt16  GetFieldSelPos  ( SCCOLROW nField );
+voidAddSortKeyItem( sal_uInt16 nItemIndex );
 
 // Handler 
 DECL_LINK( SelectHdl, ListBox * );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/inc sc/source sc/uiconfig sc/UIConfig_scalc.mk

2013-04-15 Thread Albert Thuswaldner
 sc/UIConfig_scalc.mk|1 
 sc/inc/sc.hrc   |1 
 sc/inc/scabstdlg.hxx|8 +-
 sc/source/ui/attrdlg/scdlgfact.cxx  |   20 +
 sc/source/ui/attrdlg/scdlgfact.hxx  |9 ++
 sc/source/ui/dbgui/sortdlg.cxx  |   25 +++
 sc/source/ui/inc/sortdlg.hrc|7 -
 sc/source/ui/inc/sortdlg.hxx|8 --
 sc/source/ui/src/sortdlg.src|   48 -
 sc/source/ui/view/cellsh2.cxx   |2 
 sc/uiconfig/scalc/ui/sortwarning.ui |  127 
 11 files changed, 162 insertions(+), 94 deletions(-)

New commits:
commit db8b11b876ed26fb70cf90f86337395dd2e78f64
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sun Apr 14 12:41:42 2013 +0200

Calc: converted sort warning dialog to .ui

Change-Id: I2bc44990efb62183507f46b22bfd8e09edf02eb6
Reviewed-on: https://gerrit.libreoffice.org/3380
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index fe4e049..3d3c47f 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -75,6 +75,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/sortcriteriapage \
sc/uiconfig/scalc/ui/sortkey \
sc/uiconfig/scalc/ui/sortoptionspage \
+   sc/uiconfig/scalc/ui/sortwarning \
sc/uiconfig/scalc/ui/textimportoptions \
sc/uiconfig/scalc/ui/textimportcsv \
 ))
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index b0bfb20..7e1 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1080,7 +1080,6 @@
 
 #define RID_SCDLG_CONFLICTS (SC_DIALOGS_START + 145)
 #define RID_SCDLG_SHAREDOCUMENT (SC_DIALOGS_START + 146)
-#define RID_SCDLG_SORT_WARNING  (SC_DIALOGS_START + 147)
 #define RID_SCDLG_TABPROTECTION (SC_DIALOGS_START + 148)
 #define RID_SCDLG_RETYPEPASS(SC_DIALOGS_START + 150)
 #define RID_SCDLG_RETYPEPASS_INPUT  (SC_DIALOGS_START + 151)
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 4e9ffaa..2e80c1c 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -46,6 +46,7 @@ class SfxStyleSheetBase;
 class ScDPObject;
 struct ScPivotFuncData;
 struct ScDPNumGroupInfo;
+class ScSortWarningDlg;
 class ScTabViewShell;
 class ScConditionalFormat;
 class ScConditionalFormatList;
@@ -293,6 +294,10 @@ public:
 virtual sal_uInt16  GetSelectEntryPos(sal_uInt16 nPos) const = 0;
 };
 
+class AbstractScSortWarningDlg : public VclAbstractDialog  //add for 
ScSortWarningDlg
+{
+};
+
 class AbstractScStringInputDlg :  public VclAbstractDialog  //add for 
ScStringInputDlg
 {
 public:
@@ -345,7 +350,8 @@ public:
 const String   rStrLabel,
 int nId,
 sal_Bool
bColDefault = sal_True ) = 0;
-virtual VclAbstractDialog * CreateScSortWarningDlg ( Window* pParent, 
const String rExtendText, const String rCurrentText, int nId ) = 0;  //add 
for ScSortWarningDlg
+
+virtual AbstractScSortWarningDlg * CreateScSortWarningDlg(Window* pParent, 
const String rExtendText, const String rCurrentText ) = 0; //add for 
ScSortWarningDlg
 
 virtual AbstractScCondFormatManagerDlg* CreateScCondFormatMgrDlg(Window* 
pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList,
 const 
ScAddress rPos, int nId ) = 0;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index acf411b..1283a3b 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -109,6 +109,7 @@ IMPL_ABSTDLG_BASE(AbstractScDPDateGroupDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScDPShowDetailDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScNewScenarioDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScShowTabDlg_Impl);
+IMPL_ABSTDLG_BASE(AbstractScSortWarningDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScStringInputDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScTabBgColorDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScImportOptionsDlg_Impl);
@@ -729,23 +730,10 @@ VclAbstractDialog *  
ScAbstractDialogFactory_Impl::CreateScColOrRowDlg(Window*
 return 0;
 }
 
-
-
-VclAbstractDialog * ScAbstractDialogFactory_Impl::CreateScSortWarningDlg( 
Window* pParent, const String rExtendText,
-  
const String rCurrentText, int nId )
+AbstractScSortWarningDlg* 
ScAbstractDialogFactory_Impl::CreateScSortWarningDlg( Window* pParent, const 
String rExtendText, const String rCurrentText )
 {
-Dialog * pDlg=NULL;
-switch ( nId )
-{
-case RID_SCDLG_SORT_WARNING:
-pDlg = new ScSortWarningDlg( pParent, rExtendText, rCurrentText );
-break;
-default:
-break;
-}
-if( pDlg )
-return new

[PATCH] Calc: converted sort warning dialog to .ui

2013-04-14 Thread Albert Thuswaldner (via Code Review)
=use_underlineTrue/property
+  /object
+  packing
+property name=expandFalse/property
+property name=fillTrue/property
+property name=position0/property
+  /packing
+/child
+child
+  object class=GtkButton id=current
+property name=label translatable=yesCurrent 
selection/property
+property name=visibleTrue/property
+property name=can_focusTrue/property
+property name=receives_defaultTrue/property
+  /object
+  packing
+property name=expandFalse/property
+property name=fillTrue/property
+property name=position1/property
+  /packing
+/child
+child
+  object class=GtkButton id=cancel
+property name=labelgtk-cancel/property
+property name=visibleTrue/property
+property name=can_focusTrue/property
+property name=receives_defaultTrue/property
+property name=use_stockTrue/property
+  /object
+  packing
+property name=expandFalse/property
+property name=fillTrue/property
+property name=position2/property
+  /packing
+/child
+  /object
+  packing
+property name=expandFalse/property
+property name=fillTrue/property
+property name=padding6/property
+property name=position1/property
+  /packing
+/child
+child
+  object class=GtkLabel id=sorttip
+property name=visibleTrue/property
+property name=can_focusFalse/property
+property name=halignstart/property
+property name=valignstart/property
+property name=margin_left6/property
+property name=margin_right6/property
+property name=margin_top6/property
+property name=margin_bottom6/property
+property name=xalign0/property
+property name=label translatable=yesTip: The sort range 
can be detected automatically. Place the cell cursor inside a list and execute 
sort. The whole range of neighboring non-empty cells will then be 
sorted./property
+property name=wrapTrue/property
+property name=wrap_modeword-char/property
+property name=max_width_chars72/property
+  /object
+  packing
+property name=expandFalse/property
+property name=fillTrue/property
+property name=position2/property
+  /packing
+/child
+  /object
+/child
+  /object
+/child
+  /object
+/interface

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2bc44990efb62183507f46b22bfd8e09edf02eb6
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Albert Thuswaldner albert.thuswald...@gmail.com

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


[PATCH] Calc Sort: Introducing new method AddKeyItem to avoid code d...

2013-04-13 Thread Albert Thuswaldner (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3370

To pull it, you can do:

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

Calc Sort: Introducing new method AddKeyItem to avoid code duplication

Change-Id: Ic34b5958472a7d2c19ff686914309b6699e237c4
---
M sc/source/ui/dbgui/sortkeydlg.cxx
M sc/source/ui/dbgui/tpsort.cxx
M sc/source/ui/inc/sortkeydlg.hxx
M sc/source/ui/inc/tpsort.hxx
4 files changed, 20 insertions(+), 17 deletions(-)



diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx 
b/sc/source/ui/dbgui/sortkeydlg.cxx
index 006dad5..3e09076 100644
--- a/sc/source/ui/dbgui/sortkeydlg.cxx
+++ b/sc/source/ui/dbgui/sortkeydlg.cxx
@@ -156,11 +156,12 @@
 
 // ---
 
-void ScSortKeyCtrl::AddSortKey( sal_uInt16 nItem )
+void ScSortKeyCtrl::AddSortKey( sal_uInt16 nItemIndex )
 {
-m_rVertScroll.SetRangeMax( nItem );
-m_rVertScroll.DoScroll( nItem );
-m_aSortWin.AddSortKey( nItem );
+++nItemIndex;
+m_rVertScroll.SetRangeMax( nItemIndex );
+m_rVertScroll.DoScroll( nItemIndex );
+m_aSortWin.AddSortKey( nItemIndex );
 checkAutoVScroll();
 }
 
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 6731e71..f153cf7 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -141,10 +141,7 @@
 
 // Create three sort key dialogs by default
 for ( sal_uInt16 i=0; inSortKeyCount; i++ )
-{
-maSortKeyCtrl.AddSortKey(i+1);
-maSortKeyItems[i].m_pLbSort-SetSelectHdl( LINK( this, 
ScTabPageSortFields, SelectHdl ) );
-}
+AddSortKeyItem(i);
 }
 
 // ---
@@ -170,11 +167,8 @@
 {
 // Make sure that the all sort keys are reset
 for ( sal_uInt16 i=nSortKeyCount; iaSortData.maKeyState.size(); i++ )
-{
-maSortKeyCtrl.AddSortKey(i+1);
-maSortKeyItems[i].m_pLbSort-SetSelectHdl( LINK( this,
- ScTabPageSortFields, SelectHdl ) );
-}
+AddSortKeyItem(i);
+
 nSortKeyCount = aSortData.maKeyState.size();
 FillFieldLists(0);
 
@@ -443,6 +437,15 @@
 return nFieldPos;
 }
 
+//
+
+void ScTabPageSortFields::AddSortKeyItem( sal_uInt16 nItemIndex )
+{
+maSortKeyCtrl.AddSortKey( nItemIndex );
+maSortKeyItems[nItemIndex].m_pLbSort-SetSelectHdl(
+LINK( this, ScTabPageSortFields, SelectHdl ) );
+}
+
 // ---
 // Handler:
 //-
@@ -463,9 +466,7 @@
 
 // Add Sort Key Item
 ++nSortKeyCount;
-maSortKeyCtrl.AddSortKey( nSortKeyCount );
-maSortKeyItems[nSortKeyIndex].m_pLbSort-SetSelectHdl( LINK( this, 
ScTabPageSortFields, SelectHdl ) );
-
+AddSortKeyItem( nSortKeyIndex );
 FillFieldLists( nSortKeyIndex );
 
 // Set Status
diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx
index 060e8ad..7718663 100644
--- a/sc/source/ui/inc/sortkeydlg.hxx
+++ b/sc/source/ui/inc/sortkeydlg.hxx
@@ -99,7 +99,7 @@
 public:
 ScSortKeyCtrl(SfxTabPage* pParent, ScSortKeyItems mrSortKeyItems);
 void setScrollRange();
-void AddSortKey( sal_uInt16 nItem );
+void AddSortKey( sal_uInt16 nItemIndex );
 };
 
 #endif // SC_SORTKEYDLG_HXX
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
index 8ce4a42..e4d82c6 100644
--- a/sc/source/ui/inc/tpsort.hxx
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -95,6 +95,7 @@
 voidInit();
 voidFillFieldLists  ( sal_uInt16 nStartField );
 sal_uInt16  GetFieldSelPos  ( SCCOLROW nField );
+voidAddSortKeyItem( sal_uInt16 nItemIndex );
 
 // Handler 
 DECL_LINK( SelectHdl, ListBox * );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic34b5958472a7d2c19ff686914309b6699e237c4
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Albert Thuswaldner albert.thuswald...@gmail.com

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


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

2013-04-11 Thread Albert Thuswaldner
 sc/source/ui/dbgui/tpsort.cxx |   13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 15e0ef908c9e54527276500cf7a537055c374850
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sat Apr 6 21:43:48 2013 +0200

fdo#51828 - UI: Sort: can use more than 3 criteria once only

Change-Id: I7480e8d606e1eafde45635e36dfafa4232f529cb
Reviewed-on: https://gerrit.libreoffice.org/3217
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 4c56058..6731e71 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -168,9 +168,19 @@ void ScTabPageSortFields::Reset( const SfxItemSet /* 
rArgSet */ )
 // ListBox selection:
 if ( aSortData.maKeyState[0].bDoSort )
 {
+// Make sure that the all sort keys are reset
+for ( sal_uInt16 i=nSortKeyCount; iaSortData.maKeyState.size(); i++ )
+{
+maSortKeyCtrl.AddSortKey(i+1);
+maSortKeyItems[i].m_pLbSort-SetSelectHdl( LINK( this,
+ ScTabPageSortFields, SelectHdl ) );
+}
+nSortKeyCount = aSortData.maKeyState.size();
+FillFieldLists(0);
+
 for ( sal_uInt16 i=0; inSortKeyCount; i++ )
 {
-if ( i  aSortData.maKeyState.size()  
aSortData.maKeyState[i].bDoSort )
+if (aSortData.maKeyState[i].bDoSort )
 {
 maSortKeyItems[i].m_pLbSort-SelectEntryPos( GetFieldSelPos(
 aSortData.maKeyState[i].nField ) );
@@ -193,7 +203,6 @@ void ScTabPageSortFields::Reset( const SfxItemSet /* 
rArgSet */ )
 maSortKeyItems[i].DisableField();
 else
 maSortKeyItems[i].EnableField();
-
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PATCH libreoffice-4-0] fdo#51828 - UI: Sort: can use more than 3 criteria once only

2013-04-11 Thread Albert Thuswaldner (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3350

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/50/3350/1

fdo#51828 - UI: Sort: can use more than 3 criteria once only

Change-Id: I7480e8d606e1eafde45635e36dfafa4232f529cb
Reviewed-on: https://gerrit.libreoffice.org/3217
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com
---
M sc/source/ui/dbgui/tpsort.cxx
1 file changed, 11 insertions(+), 2 deletions(-)



diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 4c56058..6731e71 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -168,9 +168,19 @@
 // ListBox selection:
 if ( aSortData.maKeyState[0].bDoSort )
 {
+// Make sure that the all sort keys are reset
+for ( sal_uInt16 i=nSortKeyCount; iaSortData.maKeyState.size(); i++ )
+{
+maSortKeyCtrl.AddSortKey(i+1);
+maSortKeyItems[i].m_pLbSort-SetSelectHdl( LINK( this,
+ ScTabPageSortFields, SelectHdl ) );
+}
+nSortKeyCount = aSortData.maKeyState.size();
+FillFieldLists(0);
+
 for ( sal_uInt16 i=0; inSortKeyCount; i++ )
 {
-if ( i  aSortData.maKeyState.size()  
aSortData.maKeyState[i].bDoSort )
+if (aSortData.maKeyState[i].bDoSort )
 {
 maSortKeyItems[i].m_pLbSort-SelectEntryPos( GetFieldSelPos(
 aSortData.maKeyState[i].nField ) );
@@ -193,7 +203,6 @@
 maSortKeyItems[i].DisableField();
 else
 maSortKeyItems[i].EnableField();
-
 }
 else
 {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7480e8d606e1eafde45635e36dfafa4232f529cb
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Albert Thuswaldner albert.thuswald...@gmail.com
Gerrit-Reviewer: Caolán McNamara caol...@redhat.com

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


[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sc/source

2013-04-11 Thread Albert Thuswaldner
 sc/source/ui/dbgui/tpsort.cxx |   13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 0ed9aab7615ae471abe1aecc4b7665c45ed85aaf
Author: Albert Thuswaldner albert.thuswald...@gmail.com
Date:   Sat Apr 6 21:43:48 2013 +0200

fdo#51828 - UI: Sort: can use more than 3 criteria once only

Change-Id: I7480e8d606e1eafde45635e36dfafa4232f529cb
Reviewed-on: https://gerrit.libreoffice.org/3217
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com
Reviewed-on: https://gerrit.libreoffice.org/3350
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 78d04ac..4ee9d11 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -168,9 +168,19 @@ void ScTabPageSortFields::Reset( const SfxItemSet /* 
rArgSet */ )
 // ListBox selection:
 if ( aSortData.maKeyState[0].bDoSort )
 {
+// Make sure that the all sort keys are reset
+for ( sal_uInt16 i=nSortKeyCount; iaSortData.maKeyState.size(); i++ )
+{
+maSortKeyCtrl.AddSortKey(i+1);
+maSortKeyItems[i].m_pLbSort-SetSelectHdl( LINK( this,
+ ScTabPageSortFields, SelectHdl ) );
+}
+nSortKeyCount = aSortData.maKeyState.size();
+FillFieldLists(0);
+
 for ( sal_uInt16 i=0; inSortKeyCount; i++ )
 {
-if ( i  aSortData.maKeyState.size()  
aSortData.maKeyState[i].bDoSort )
+if (aSortData.maKeyState[i].bDoSort )
 {
 maSortKeyItems[i].m_pLbSort-SelectEntryPos( GetFieldSelPos(
 aSortData.maKeyState[i].nField ) );
@@ -193,7 +203,6 @@ void ScTabPageSortFields::Reset( const SfxItemSet /* 
rArgSet */ )
 maSortKeyItems[i].DisableField();
 else
 maSortKeyItems[i].EnableField();
-
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [PATCH] WIP: Convert scalc delete contents dialog to .ui

2013-04-09 Thread Albert Thuswaldner
On Tue, Apr 9, 2013 at 5:30 PM, Caolán McNamara caol...@redhat.com wrote:

 On Mon, 2013-04-08 at 17:52 +0200, Albert Thuswaldner wrote:

  I almost completed the conversion of the Delete Contents dialog in
  Calc (see patch #1)

 What's missing from your patch is the .ui file itself, do a git
 add /path/to/that/file.ui and git commit --amend


Oops, updated the patch accordingly.


  What I didn't manage to do was to completely kill the resource id
  RID_SCDLG_DELCONT
 
  How to handle these things are not covered in your tutorial, at least
  I could not find that...

 Yeah, so the removal of .src and .hrc stuff is a happy-sideeffect of
 moving to .ui files, but there are some cases where some .src contents
 remain (until e.g. we move over to gettext) and some cases where .hrc
 defines have been reused for non-resource files purposes (where the
 long-term thing will be to just move them into .hxx files)

 But in this particular case it so happens (common enough occurrence)
 that the remaining .hrc define can be removed anyway. See attached.


Ok, great. Thanks for the explanation, if I come across similar things in
the future I guess I can use this as a reference. For this time assume that
you commit your patch with these fixes on top of mine?


  I am also scratching my head over the hid key in the help file, not
  sure I got that right ( see patch #2 )

 Looks about right to me. What I would do in addition is to take one of
 the two duplicated hid/.uno:Delete bookmarks and change one to be the
 fallback toplevel dialog help e.g.
 hid/modules/scalc/ui/deletecontents/DeleteContentsDialog


 Ok, I updated patch #2


 C.


Thanks for your help, much appreciated.
/Albert


0001-Convert-scalc-delete-contents-dialog-to-.ui.patch
Description: Binary data


0001-Modified-help-text-for-scalc-Delete-Contents-Dialog-.patch
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] WIP: Convert scalc delete contents dialog to .ui

2013-04-08 Thread Albert Thuswaldner
Hi Caolán,
Thanks for your excellent tutorial on WidgetLayout conversion:

https://wiki.documentfoundation.org/Development/WidgetLayout#HOWTO:_Step_by_step_dialog_conversion

With the help of this I almost completed the conversion of the Delete
Contents dialog in Calc (see patch #1)

What I didn't manage to do was to completely kill the resource id
 RID_SCDLG_DELCONT due to these two rows:

http://opengrok.libreoffice.org/xref/core/sc/source/ui/attrdlg/scdlgfact.cxx#882
http://opengrok.libreoffice.org/xref/core/sc/source/ui/view/cellsh1.cxx

How to handle these things are not covered in your tutorial, at least I
could not find that...

I am also scratching my head over the hid key in the help file, not sure I
got that right ( see patch #2

Some help on this would be great.

Thanks in advance
/Albert


0001-WIP-Convert-scalc-delete-contents-dialog-to-.ui.patch
Description: Binary data


0001-Modified-help-text-for-scalc-Delete-Contents-Dialog-.patch
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] WIP: Convert scalc delete contents dialog to .ui

2013-04-08 Thread Albert Thuswaldner
Correction, the second reference is:
http://opengrok.libreoffice.org/xref/core/sc/source/ui/view/cellsh1.cxx#362

/Albert


On Mon, Apr 8, 2013 at 5:52 PM, Albert Thuswaldner 
albert.thuswald...@gmail.com wrote:

 Hi Caolán,
 Thanks for your excellent tutorial on WidgetLayout conversion:


 https://wiki.documentfoundation.org/Development/WidgetLayout#HOWTO:_Step_by_step_dialog_conversion

 With the help of this I almost completed the conversion of the Delete
 Contents dialog in Calc (see patch #1)

 What I didn't manage to do was to completely kill the resource id
  RID_SCDLG_DELCONT due to these two rows:


 http://opengrok.libreoffice.org/xref/core/sc/source/ui/attrdlg/scdlgfact.cxx#882
 http://opengrok.libreoffice.org/xref/core/sc/source/ui/view/cellsh1.cxx

 How to handle these things are not covered in your tutorial, at least I
 could not find that...

 I am also scratching my head over the hid key in the help file, not sure I
 got that right ( see patch #2

 Some help on this would be great.

 Thanks in advance
 /Albert


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


[PATCH] fdo#51828 - UI: Sort: can use more than 3 criteria once only

2013-04-06 Thread Albert Thuswaldner (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3217

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/17/3217/1

fdo#51828 - UI: Sort: can use more than 3 criteria once only

Change-Id: I7480e8d606e1eafde45635e36dfafa4232f529cb
---
M sc/source/ui/dbgui/tpsort.cxx
1 file changed, 12 insertions(+), 2 deletions(-)



diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index cb69736..75d0113 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -168,9 +168,20 @@
 // ListBox selection:
 if ( aSortData.maKeyState[0].bDoSort )
 {
+// Make sure that the all sort keys are reset
+for ( sal_uInt16 i=nSortKeyCount; iaSortData.maKeyState.size(); i++ )
+{
+maSortKeyCtrl.AddSortKey(i+1);
+maSortKeyItems[i].m_pLbSort-SetSelectHdl( LINK( this,
+ ScTabPageSortFields, SelectHdl ) );
+}
+nSortKeyCount = aSortData.maKeyState.size();
+FillFieldLists(0);
+
+
 for ( sal_uInt16 i=0; inSortKeyCount; i++ )
 {
-if ( i  aSortData.maKeyState.size()  
aSortData.maKeyState[i].bDoSort )
+if (aSortData.maKeyState[i].bDoSort )
 {
 maSortKeyItems[i].m_pLbSort-SelectEntryPos( GetFieldSelPos(
 aSortData.maKeyState[i].nField ) );
@@ -193,7 +204,6 @@
 maSortKeyItems[i].DisableField();
 else
 maSortKeyItems[i].EnableField();
-
 }
 else
 {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7480e8d606e1eafde45635e36dfafa4232f529cb
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Albert Thuswaldner albert.thuswald...@gmail.com

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


Re: A solution to calculation of odd roots of negative numbers with Calc

2012-07-17 Thread Albert Thuswaldner
Hi,

On Tue, Jul 17, 2012 at 8:29 PM, marlon orlando barahona alvarez
ingma...@gmail.com wrote:
 Is dificult add this correction to Calc? I have seen reports of this bug
 with date 2004.


I have read the bug report you mentioned:
https://issues.apache.org/ooo/show_bug.cgi?id=37129

and I tend to agree with the conclusion of comment 11 that it wold be
wrong to alter the behavior of the POWER function for this particular
case, (since there are multiple roots).

I think it would be better to use the proposed workaround:

SIGN(X)*ABS(X)^(1/3)
or
SIGN(X)*POWER(ABS(X), 1/3)

this is more honest since you with this expression explicitly state
that you want the the real cubic root.

In the end I'm not an Calc core developer, I'm CC-ing the list, see
what the others have to say about this.

/Albert

 2012/7/16 marlon orlando barahona alvarez ingma...@gmail.com

 Oh, I forgot to mention that I tried with index (1/5), (1/7) and Calc work
 perfectly.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: A solution to calculation of odd roots of negative numbers with Calc

2012-07-16 Thread Albert Thuswaldner
On Mon, Jul 16, 2012 at 7:14 PM, marlon orlando barahona alvarez
ingma...@gmail.com wrote:
 when we try to calculate the cube root of -27 (using the formula = POWER
 (A1, 1/3) -3 Calc should give us but gives us the message # VALUE!

Sorry, It was a long time since I went to the university, but I if I'm
correct you want to calculate:
(-27)^(1/3) (note it is the same as 3x(-1)^(1/3) which to my mind
results in an complex number (not -3) thus the #VALUE!.

just to double check:
http://www.wolframalpha.com/input/?i=%28-27%29^%281%2F3%29lk=4
/Albert
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: A solution to calculation of odd roots of negative numbers with Calc

2012-07-16 Thread Albert Thuswaldner
On Mon, Jul 16, 2012 at 10:18 PM, Ruslan Kabatsayev
b7.10110...@gmail.com wrote:
 On Mon, Jul 16, 2012 at 11:13 PM, Albert Thuswaldner
 albert.thuswald...@gmail.com wrote:
 Sorry, It was a long time since I went to the university, but I if I'm
 correct you want to calculate:
 (-27)^(1/3) (note it is the same as 3x(-1)^(1/3) which to my mind
 results in an complex number (not -3) thus the #VALUE!.

 just to double check:
 http://www.wolframalpha.com/input/?i=%28-27%29^%281%2F3%29lk=4

 Well, in fact, there're 3 roots, one of which is -3:
 http://www.wolframalpha.com/input/?i=-27%3D%3Da^3

Ahh, you're right, sorry for the noise.

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


Re: libmspub update, running out of virtual memory

2012-07-15 Thread Albert Thuswaldner
On Fri, Jul 13, 2012 at 1:41 AM, Rafael Dominguez venccsra...@gmail.com wrote:
 After the update to libmspub-0.0.1 a day ago, my gcc terminates with
 the error running out of virtual memory when compiling the
 PolygonUtils.cpp file (i got 4GB ram),
 im using gcc 4.4.5 in Gentoo Linux. My build parameters are

 --enable-python=system --disable-epm --with-system-boost
 --enable-crashdump --with-system-zlib --with-system-stdlibs
 --with-system-openssl --with-system-db --with-system-curl
 --with-system-cppunit --without-ppds --with-system-cairo
 --with-junit=/home/ralph/Proyectos/junit-4.10.jar --enable-symbols
 --enable-werror


 Could it be possible because the file is too big???

Hmm, After upgrading master for the first time in a while, my build
fails at the same spot.

log for /home/thuswa/work/libo2/libmspub
Compiling: 
libmspub/unxlngi6.pro/misc/build/libmspub-0.0.1/src/lib/PolygonUtils.cpp
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See http://bugs.opensuse.org/ for instructions.
dmake:  Error code 1, while making
'../../../../../../unxlngi6.pro/slo/PolygonUtils.obj'
dmake:  Error code 255, while making './unxlngi6.pro/misc/build/so_built_mspub'

Does anyone know what's going on here?

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


Re: [PATCH] - avoid a memset

2012-06-12 Thread Albert Thuswaldner
Hi,

On Tue, Jun 12, 2012 at 10:53 PM, Marion  Christophe JAILLET
christophe.jail...@wanadoo.fr wrote:
 Hi,

 first try to send a patch for libreoffice,

Great!

 Has nothing much is explained on http://www.libreoffice.org/developers-2/,

Follow the second link on that page to the Development wiki page:
http://wiki.documentfoundation.org/Development

 please feel free to tell me how to improve my submissions.

How to prepare a patch:
http://wiki.documentfoundation.org/Development#Preparing_patches

Otherwise feel free to ask, I find this mailing rather friendly and helpful.

Hope it helps.

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


Re: [PATCH] [WIP] fdo#45747 - [EasyHack] remove the limitation to 3 sort entries in calc, part 2

2012-06-06 Thread Albert Thuswaldner
HI Marcus,
Sorry for not replying until now. Forgot to CC the list again...

On Tue, Jun 5, 2012 at 3:13 AM, Markus Mohrhard
markus.mohrh...@googlemail.com wrote:
 Hey Albert,


 I already had a quick look at the closing problem and it seems it is
 not a crash. It looks more like a missing close handler which results
 in the parent window being closed which is in this case the LibO
 window but I need to spend some more time on it. I will spend next
 week on your patch and make sure that it is ready for 3-6.

 I finally had time to fix the issue with your patch and pushed it to master.

 The problem has been that vcl's window class destructor checks that
 all child windows are destroyed in dbgutil builds and your design did
 not ensure this. The changes that I did to your patch are in
 http://cgit.freedesktop.org/libreoffice/core/commit/?id=57e35b0ed54a2e74c107493869e72ab7eb86222a.

 I also fixed a crash that I noticed when using more than 3 sort
 entries. I checked and the dialog looks good now.

Thanks for fixing this and getting it into 3.6! Also thanks for your
support during this work, I could not have done this without your
help. I'm very happy to see this being finished, although not so happy
about how long it took me to do this, but at least I learned a lot
along the way.

 Thanks a lot for this amazing work. I added it to the 3.6 release notes page.

I added a reference to the bug and a screenshot to the release notes.

 Regards,
 Markus

I have a few things lined up which I want to do next. For instance, do
you mind if I take a stab at this one:
https://bugs.freedesktop.org/show_bug.cgi?id=43937
I guess to fix this bug the best would be to implement the same
UI-magic here, as what I just did for the sort dialog.


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


Re: [PATCH] [WIP] fdo#45747 - [EasyHack] remove the limitation to 3 sort entries in calc, part 2

2012-05-23 Thread Albert Thuswaldner
Hi Andras,
Thanks for taking your time to reply.

On Tue, May 22, 2012 at 5:50 PM, Andras Timar tima...@gmail.com wrote:
 Hi Albert,

 2012/5/18 Markus Mohrhard markus.mohrh...@googlemail.com:

 This one is quite simple. we need to move the identifiers out of the 0
 to 255 range.

 Andras, do you have an idea what range is useable in sc for this? I
 think most of the 256 to 999 range is already used but I have no idea
 where to check this.

 Sorry, I did not notice this mail. I hope it's not too late. Please
 find attached a Perl script. You can move this script and scen-US.res
 in a folder, run 'perl ./index.pl scen-US.res | sort -n' and you will
 see the used global identifiers in sc module.

I ran your script and it worked as expected. I've updated the global
ids accordingly. Thanks for your help. :)

 However, I find peculiar
 that you put a Listbox and and Fixedline outside a dialog context, on
 their own. If it works, why not, it just looks strange to me. :)

Well I'm only copying an existing design based on Marcus advice. So it
is not my crazy idea. ;)

/Albert
From d5b4a11f9e271cacf61a5e191bb98e364f0c3ca4 Mon Sep 17 00:00:00 2001
From: Albert Thuswaldner albert.thuswald...@gmail.com
Date: Mon, 21 May 2012 23:04:12 +0200
Subject: [PATCH] fdo#45747 remove the limitation to 3 sort entries in calc part2

Change-Id: I699c424f536b0096b35d3db3aee371793e9e56c4
---
 sc/Library_scui.mk|1 +
 sc/inc/helpids.h  |1 +
 sc/inc/sc.hrc |4 +-
 sc/source/ui/dbgui/sortkeydlg.cxx |  196 
 sc/source/ui/dbgui/tpsort.cxx |  255 -
 sc/source/ui/inc/sortdlg.hrc  |   21 ++--
 sc/source/ui/inc/sortkeydlg.hxx   |  107 
 sc/source/ui/inc/tpsort.hxx   |   28 +
 sc/source/ui/src/sortdlg.src  |  142 +++--
 9 files changed, 483 insertions(+), 272 deletions(-)
 create mode 100644 sc/source/ui/dbgui/sortkeydlg.cxx
 create mode 100644 sc/source/ui/inc/sortkeydlg.hxx

diff --git a/sc/Library_scui.mk b/sc/Library_scui.mk
index 9af5a63..37478a2 100644
--- a/sc/Library_scui.mk
+++ b/sc/Library_scui.mk
@@ -72,6 +72,7 @@ $(eval $(call gb_Library_add_exception_objects,scui,\
 sc/source/ui/dbgui/scuiasciiopt \
 sc/source/ui/dbgui/scuiimoptdlg \
 sc/source/ui/dbgui/sortdlg \
+sc/source/ui/dbgui/sortkeydlg \
 sc/source/ui/dbgui/subtdlg \
 sc/source/ui/dbgui/textimportoptions \
 sc/source/ui/dbgui/tpsort \
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index 8d41ab7..7c5955c 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -88,6 +88,7 @@
 #define HID_SC_FORM_ARGSSC_HID_SC_FORM_ARGS
 #define HID_SCPAGE_SORT_FIELDS  SC_HID_SCPAGE_SORT_FIELDS
 #define HID_SCPAGE_SORT_OPTIONS SC_HID_SCPAGE_SORT_OPTIONS
+#define HID_SCPAGE_SORTKEY_FIELDS   SC_HID_SCPAGE_SORTKEY_FIELDS
 #define HID_SCPAGE_SUBT_OPTIONS SC_HID_SCPAGE_SUBT_OPTIONS
 #define HID_SCPAGE_SUBT_GROUP   SC_HID_SCPAGE_SUBT_GROUP
 #define HID_SCPAGE_PROTECTION   SC_HID_SCPAGE_PROTECTION
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 59b6564..ee8c042 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1225,7 +1225,9 @@
 #define RID_POPUP_FILTER(SC_DIALOGS_START + 153)
 #define RID_SCDLG_TAB_BG_COLOR  (SC_DIALOGS_START + 154)
 
-#define SC_DIALOGS_END  (SC_DIALOGS_START + 155)
+#define RID_SCPAGE_SORTKEY_FIELDS   (SC_DIALOGS_START + 155)
+#define RID_SCDLG_SORTKEY   (SC_DIALOGS_START + 156)
+#define SC_DIALOGS_END  (SC_DIALOGS_START + 157)
 
 #ifndef STD_MASKCOLOR
 #define STD_MASKCOLOR Color { Red = 0xFF00; Green = 0x; Blue = 0xFF00; }
diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx
new file mode 100644
index 000..0801b8d
--- /dev/null
+++ b/sc/source/ui/dbgui/sortkeydlg.cxx
@@ -0,0 +1,196 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the License); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ *  Copyright (C) 2012 Albert Thuswaldner albert.thuswald...@gmail.com (initial developer)
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository

[PATCH] Corrected max inital worksheet number in debughelper message

2012-05-21 Thread Albert Thuswaldner
Hi,
A simple fix of a debughelper message, which I forgot to correct in
one of my previous path.
/Albert
From b4e9b7ff4c371b18d787d5482c28f219f018af84 Mon Sep 17 00:00:00 2001
From: Albert Thuswaldner albert.thuswald...@gmail.com
Date: Mon, 21 May 2012 23:02:12 +0200
Subject: [PATCH] Corrected max inital worksheet number in debughelper message

Change-Id: Icd40cc3bdc70e0ff55c82a6a4099411d1da47f56
---
 sc/source/ui/vba/vbaapplication.cxx |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index bb31732..d962395 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1030,7 +1030,7 @@ void SAL_CALL ScVbaApplication::setSheetsInNewWorkbook( sal_Int32 SheetsInNewWor
 if ( SheetsInNewWorkbook  MININITTAB
   || SheetsInNewWorkbook  MAXINITTAB )
 {
-DebugHelper::exception( OUString(RTL_CONSTASCII_USTRINGPARAM(The number must be between 1 and 1)),
+DebugHelper::exception( OUString(RTL_CONSTASCII_USTRINGPARAM(The number must be between 1 and 1024)),
 uno::Exception(), SbERR_METHOD_FAILED, OUString() );
 }
 else
-- 
1.7.3.4

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


Re: [PATCH] [WIP] fdo#45747 - [EasyHack] remove the limitation to 3 sort entries in calc, part 2

2012-05-21 Thread Albert Thuswaldner
Hi Markus,

Forgot to CC the list in my previous mail, sorry for the noise.
The patch in the last mail was also wrong.

On Fri, May 18, 2012 at 12:10 PM, Markus Mohrhard
markus.mohrh...@googlemail.com wrote:
 Hello Albert,

 Sorry that it took me a bit to review your patch but my master trees
 are totally screwed for my own feature. I now checked your patch and
 solved the conflicts that were related to my last fix for sort
 dialogs. Attached you'll find a patch that applies cleanly on master.

Thanks.

 I checked the dialog and it looks like we need to move some items a
 bit.

Yea, that's related to different themes/widget set, I guess. It looks
great on my computer running LO under KDE. I had a fixed offset which
dictated the spacing between two sort key items, in the new patch I
now calculate the spacing based on position and height of the widgets.
Still not perfect, needs some wiggling.
It would be great if someone could help out with this :)

 I've attached a simple patch showing how to do this. The patch will
 not compile but shows already the basic ideas. The idea is to move the
 ScSortKeyItems variable into tpsort and only pass a reference. I think
 a good final step is to use a boost::ptr_vector which will control the
 lifetime of the contained objects.

Thanks for the code pointer regarding the reference, It was along the
line what I was thinking. I've now implemented this using
boost::ptr_vector in the new patch. It seems to work, however
strangely enough LO now segfaults on exit of the sort dialog. The
stack trace suggest the problem to be in the Window class, however
boost::ptr_vector should take care of the deletion of its members, so
no dedicated destructor should be necessary. I'm confused...

Could you have a look at this problem. Thanks. I'm feeling the heat of
the feature freeze...

/Albert
From 1237b47bd646285deebc792a469e509640233b79 Mon Sep 17 00:00:00 2001
From: Albert Thuswaldner albert.thuswald...@gmail.com
Date: Mon, 21 May 2012 23:04:12 +0200
Subject: [PATCH] fdo#45747 remove the limitation to 3 sort entries in calc part2

Change-Id: I699c424f536b0096b35d3db3aee371793e9e56c4
---
 sc/Library_scui.mk|1 +
 sc/inc/helpids.h  |1 +
 sc/inc/sc.hrc |4 +-
 sc/source/ui/dbgui/sortkeydlg.cxx |  196 
 sc/source/ui/dbgui/tpsort.cxx |  255 -
 sc/source/ui/inc/sortdlg.hrc  |   23 ++--
 sc/source/ui/inc/sortkeydlg.hxx   |  107 
 sc/source/ui/inc/tpsort.hxx   |   28 +
 sc/source/ui/src/sortdlg.src  |  142 +++--
 9 files changed, 485 insertions(+), 272 deletions(-)
 create mode 100644 sc/source/ui/dbgui/sortkeydlg.cxx
 create mode 100644 sc/source/ui/inc/sortkeydlg.hxx

diff --git a/sc/Library_scui.mk b/sc/Library_scui.mk
index 9af5a63..37478a2 100644
--- a/sc/Library_scui.mk
+++ b/sc/Library_scui.mk
@@ -72,6 +72,7 @@ $(eval $(call gb_Library_add_exception_objects,scui,\
 sc/source/ui/dbgui/scuiasciiopt \
 sc/source/ui/dbgui/scuiimoptdlg \
 sc/source/ui/dbgui/sortdlg \
+sc/source/ui/dbgui/sortkeydlg \
 sc/source/ui/dbgui/subtdlg \
 sc/source/ui/dbgui/textimportoptions \
 sc/source/ui/dbgui/tpsort \
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index 8d41ab7..7c5955c 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -88,6 +88,7 @@
 #define HID_SC_FORM_ARGSSC_HID_SC_FORM_ARGS
 #define HID_SCPAGE_SORT_FIELDS  SC_HID_SCPAGE_SORT_FIELDS
 #define HID_SCPAGE_SORT_OPTIONS SC_HID_SCPAGE_SORT_OPTIONS
+#define HID_SCPAGE_SORTKEY_FIELDS   SC_HID_SCPAGE_SORTKEY_FIELDS
 #define HID_SCPAGE_SUBT_OPTIONS SC_HID_SCPAGE_SUBT_OPTIONS
 #define HID_SCPAGE_SUBT_GROUP   SC_HID_SCPAGE_SUBT_GROUP
 #define HID_SCPAGE_PROTECTION   SC_HID_SCPAGE_PROTECTION
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 59b6564..ee8c042 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1225,7 +1225,9 @@
 #define RID_POPUP_FILTER(SC_DIALOGS_START + 153)
 #define RID_SCDLG_TAB_BG_COLOR  (SC_DIALOGS_START + 154)
 
-#define SC_DIALOGS_END  (SC_DIALOGS_START + 155)
+#define RID_SCPAGE_SORTKEY_FIELDS   (SC_DIALOGS_START + 155)
+#define RID_SCDLG_SORTKEY   (SC_DIALOGS_START + 156)
+#define SC_DIALOGS_END  (SC_DIALOGS_START + 157)
 
 #ifndef STD_MASKCOLOR
 #define STD_MASKCOLOR Color { Red = 0xFF00; Green = 0x; Blue = 0xFF00; }
diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx
new file mode 100644
index 000..0801b8d
--- /dev/null
+++ b/sc/source/ui/dbgui/sortkeydlg.cxx
@@ -0,0 +1,196 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3

Re: [PATCH] [WIP] fdo#45747 - [EasyHack] remove the limitation to 3 sort entries in calc, part 2

2012-05-14 Thread Albert Thuswaldner
Hi Marcus,
Here is an updated patch which I hope you have time to review. I'm
sure that there are things that can be done differently, but basically
the patch works.

I have found two problems myself that I need help resolving:

1.) Compile time waring about resources ids. There is probably a
simple fix for this, I think I understand the problem but not what to
do about it.
f4099: /home/thuswa/work/libo2/sc/source/ui/src/sortdlg.src, line
60: Warning in the object (Type: ListBox, 15):
Global resources should have an identifier = 256.

Pos = MAP_APPFONT ( 172 , 11 ) ;
^
f4099: /home/thuswa/work/libo2/sc/source/ui/src/sortdlg.src, line
68: Warning in the object (Type: RadioButton, 16):
Global resources should have an identifier = 256.

Pos = MAP_APPFONT ( 172 , 25 ) ;
^
f4099: /home/thuswa/work/libo2/sc/source/ui/src/sortdlg.src, line
75: Warning in the object (Type: RadioButton, 17):
Global resources should have an identifier = 256.

Pos = MAP_APPFONT ( 6 , 0 ) ;
^
f4099: /home/thuswa/work/libo2/sc/source/ui/src/sortdlg.src, line
82: Warning in the object (Type: FixedLine, 14):
Global resources should have an identifier = 256.
[ build DEP ] SRS:sc/res


2.) to return a pointer to the vector containing the ui widgets is of
course not ideal, see below:

ScSortKeyItems* ScSortKeyWindow::AddSortKey( sal_uInt16 nItem )
ScSortKeyItems* ScSortKeyCtrl::AddSortKey( sal_uInt16 nItem )

Instead I probably should create a reference when I initialize
ScSortKeyCtrl and ScSortKeyWindow, but I'm not exactly sure how to do
this.

Thanks for your help.
/Albert
From 19c965f654ec408b6a7ad4b44d390033ef5729d0 Mon Sep 17 00:00:00 2001
From: Albert Thuswaldner albert.thuswald...@gmail.com
Date: Thu, 26 Apr 2012 23:35:46 +0200
Subject: [PATCH] fdo#45747 - remove the limitation to 3 sort entries in calc, part 2

---
 sc/Library_scui.mk|1 +
 sc/inc/helpids.h  |1 +
 sc/inc/sc.hrc |4 +-
 sc/source/ui/dbgui/sortkeydlg.cxx |  213 +
 sc/source/ui/dbgui/tpsort.cxx |  186 ++--
 sc/source/ui/inc/sortdlg.hrc  |   23 ++--
 sc/source/ui/inc/sortkeydlg.hxx   |  110 +++
 sc/source/ui/inc/tpsort.hxx   |   24 +
 sc/source/ui/src/sortdlg.src  |  141 +
 9 files changed, 473 insertions(+), 230 deletions(-)
 create mode 100644 sc/source/ui/dbgui/sortkeydlg.cxx
 create mode 100644 sc/source/ui/inc/sortkeydlg.hxx

diff --git a/sc/Library_scui.mk b/sc/Library_scui.mk
index 9af5a63..37478a2 100644
--- a/sc/Library_scui.mk
+++ b/sc/Library_scui.mk
@@ -72,6 +72,7 @@ $(eval $(call gb_Library_add_exception_objects,scui,\
 sc/source/ui/dbgui/scuiasciiopt \
 sc/source/ui/dbgui/scuiimoptdlg \
 sc/source/ui/dbgui/sortdlg \
+sc/source/ui/dbgui/sortkeydlg \
 sc/source/ui/dbgui/subtdlg \
 sc/source/ui/dbgui/textimportoptions \
 sc/source/ui/dbgui/tpsort \
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index 5eec0d1..03b9f40 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -88,6 +88,7 @@
 #define HID_SC_FORM_ARGSSC_HID_SC_FORM_ARGS
 #define HID_SCPAGE_SORT_FIELDS  SC_HID_SCPAGE_SORT_FIELDS
 #define HID_SCPAGE_SORT_OPTIONS SC_HID_SCPAGE_SORT_OPTIONS
+#define HID_SCPAGE_SORTKEY_FIELDS   SC_HID_SCPAGE_SORTKEY_FIELDS
 #define HID_SCPAGE_SUBT_OPTIONS SC_HID_SCPAGE_SUBT_OPTIONS
 #define HID_SCPAGE_SUBT_GROUP   SC_HID_SCPAGE_SUBT_GROUP
 #define HID_SCPAGE_PROTECTION   SC_HID_SCPAGE_PROTECTION
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index f8b1875..25b90fe 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1221,7 +1221,9 @@
 #define RID_POPUP_FILTER(SC_DIALOGS_START + 153)
 #define RID_SCDLG_TAB_BG_COLOR  (SC_DIALOGS_START + 154)
 
-#define SC_DIALOGS_END  (SC_DIALOGS_START + 155)
+#define RID_SCPAGE_SORTKEY_FIELDS   (SC_DIALOGS_START + 155)
+#define RID_SCDLG_SORTKEY   (SC_DIALOGS_START + 156)
+#define SC_DIALOGS_END  (SC_DIALOGS_START + 157)
 
 #ifndef STD_MASKCOLOR
 #define STD_MASKCOLOR Color { Red = 0xFF00; Green = 0x; Blue = 0xFF00; }
diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx
new file mode 100644
index 000..747f886
--- /dev/null
+++ b/sc/source/ui/dbgui/sortkeydlg.cxx
@@ -0,0 +1,213 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the License); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software

Re: [PATCH] [WIP] fdo#45747 - [EasyHack] remove the limitation to 3 sort entries in calc, part 2

2012-05-08 Thread Albert Thuswaldner
Servus Markus,

Just an update on what I've been doing on this.

On Sun, Apr 29, 2012 at 4:37 PM, Markus Mohrhard
markus.mohrh...@googlemail.com wrote:
 So far so good I think, then comes the ugly bits:

 1.) Obviously I'm using the wrong widget class for ScSortKeyDlg since
 each dialog opens in a separate window and are not embedded in the
 main dialog.
 Which widget should I use here?

 Yeap. You need to derive from a Control and not from a Window. A good
 example for such a concept is SfxDocumentInfoDialog with the
 CustomProperties* classes. They already implement something similar
 and we can copy most of the ideas from there.

I've solved this part like this:
Tab page class - Controller class - Window class - Struct
{FixedLine, ListBox, RadioBtnUp, RadiobtnDown }

Basically copying the set-up of SfxDocumentInfoDialog, I've tested
this part and it works like a charm!


 2.)  Related to the above is the question about how to position the
 sort key dialogs relative to each other.

 We need to write the code that calculates the position of sort
 entries. We will position them inside another control so the
 positioning has to be done only relative to the control.

I've implemented the scroll handler but I haven't tested it yet.


 3.)  The Listbox handler. The handler is used to enable/disable the
 widigets of the subsequent sort key(s). Now that each sort key is an
 instance of its own I'm not sure how to get the signal across form
 one instance to the other. Can I catch this event in the control
 class?

 There are at least two solutions to this. First one is to give the
 sort entry a reference to the class that needs to know about it or
 implement the handler already in that class.

This part was simple, It is basically the same handler as before, only
slightly modifed. For now i put this implementation in the Window
class, but I'm thinking of moving it back were it was before i.e in
the tabpage class. I've tested this as it is now and it works!

Overall I'm still contemplating a bit where to put the code containing
all the the logic behind the dialog. My second attempt here was to
move everything from the tab page class to the window class, but I
this turned out to create more messy code than I had anticipated.

So now I'm opting to keep much of the code intact in the tab page
class. I need to re-wind a bit here, before I have a working patch to
submit.

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


[PATCH] [WIP] fdo#45747 - [EasyHack] remove the limitation to 3 sort entries in calc, part 2

2012-04-26 Thread Albert Thuswaldner
Hi Markus,
So I have hacked a bit on the UI for the new sort dialog in calc. I'm
posting my work-in-progress patch hoping to get confirmation that I'm
on the right track and also help with the specific issues below.

As you suggested I've used the same concept for as in namedlg, where I
created ScSortKeyDlg class which defines the dialog for a single sort
key entry. this class is then instantiated via a control class.

So far so good I think, then comes the ugly bits:

1.) Obviously I'm using the wrong widget class for ScSortKeyDlg since
each dialog opens in a separate window and are not embedded in the
main dialog.
Which widget should I use here?

2.)  Related to the above is the question about how to position the
sort key dialogs relative to each other.

3.)  The Listbox handler. The handler is used to enable/disable the
widigets of the subsequent sort key(s). Now that each sort key is an
instance of its own I'm not sure how to get the signal across form
one instance to the other. Can I catch this event in the control
class?

Any hints on the above are much appreciated.

Thanks in advance.

/Albert
From 5414d27131c1b914e19e712e3c6115f0dbdc0c28 Mon Sep 17 00:00:00 2001
From: Albert Thuswaldner albert.thuswald...@gmail.com
Date: Thu, 26 Apr 2012 23:35:46 +0200
Subject: [PATCH] fdo#45747 - remove the limitation to 3 sort entries in calc, part 2

---
 sc/AllLangResTarget_sc.mk |1 +
 sc/Library_scui.mk|1 +
 sc/inc/helpids.h  |1 +
 sc/inc/sc.hrc |4 +-
 sc/source/ui/dbgui/sortkeydlg.cxx |  154 +++
 sc/source/ui/dbgui/tpsort.cxx |  182 ++---
 sc/source/ui/inc/sortdlg.hrc  |   13 +---
 sc/source/ui/inc/sortkeydlg.hrc   |   40 
 sc/source/ui/inc/sortkeydlg.hxx   |   84 +
 sc/source/ui/inc/tpsort.hxx   |   24 +
 sc/source/ui/src/sortdlg.src  |   96 +--
 sc/source/ui/src/sortkeydlg.src   |   67 ++
 toolkit/src2xml/src-sc.lst|1 +
 toolkit/src2xml/src.lst   |1 +
 14 files changed, 430 insertions(+), 239 deletions(-)
 create mode 100644 sc/source/ui/dbgui/sortkeydlg.cxx
 create mode 100644 sc/source/ui/inc/sortkeydlg.hrc
 create mode 100644 sc/source/ui/inc/sortkeydlg.hxx
 create mode 100644 sc/source/ui/src/sortkeydlg.src

diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index 09526bd..aab2146 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -78,6 +78,7 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
 sc/source/ui/src/dbnamdlg.src \
 sc/source/ui/src/opredlin.src \
 sc/source/ui/src/sortdlg.src \
+sc/source/ui/src/sortkeydlg.src \
 sc/source/ui/src/attrdlg.src \
 sc/source/ui/src/filter.src \
 sc/source/ui/cctrl/checklistmenu.src \
diff --git a/sc/Library_scui.mk b/sc/Library_scui.mk
index 9af5a63..37478a2 100644
--- a/sc/Library_scui.mk
+++ b/sc/Library_scui.mk
@@ -72,6 +72,7 @@ $(eval $(call gb_Library_add_exception_objects,scui,\
 sc/source/ui/dbgui/scuiasciiopt \
 sc/source/ui/dbgui/scuiimoptdlg \
 sc/source/ui/dbgui/sortdlg \
+sc/source/ui/dbgui/sortkeydlg \
 sc/source/ui/dbgui/subtdlg \
 sc/source/ui/dbgui/textimportoptions \
 sc/source/ui/dbgui/tpsort \
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index 5eec0d1..03b9f40 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -88,6 +88,7 @@
 #define HID_SC_FORM_ARGSSC_HID_SC_FORM_ARGS
 #define HID_SCPAGE_SORT_FIELDS  SC_HID_SCPAGE_SORT_FIELDS
 #define HID_SCPAGE_SORT_OPTIONS SC_HID_SCPAGE_SORT_OPTIONS
+#define HID_SCPAGE_SORTKEY_FIELDS   SC_HID_SCPAGE_SORTKEY_FIELDS
 #define HID_SCPAGE_SUBT_OPTIONS SC_HID_SCPAGE_SUBT_OPTIONS
 #define HID_SCPAGE_SUBT_GROUP   SC_HID_SCPAGE_SUBT_GROUP
 #define HID_SCPAGE_PROTECTION   SC_HID_SCPAGE_PROTECTION
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index f8b1875..25b90fe 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1221,7 +1221,9 @@
 #define RID_POPUP_FILTER(SC_DIALOGS_START + 153)
 #define RID_SCDLG_TAB_BG_COLOR  (SC_DIALOGS_START + 154)
 
-#define SC_DIALOGS_END  (SC_DIALOGS_START + 155)
+#define RID_SCPAGE_SORTKEY_FIELDS   (SC_DIALOGS_START + 155)
+#define RID_SCDLG_SORTKEY   (SC_DIALOGS_START + 156)
+#define SC_DIALOGS_END  (SC_DIALOGS_START + 157)
 
 #ifndef STD_MASKCOLOR
 #define STD_MASKCOLOR Color { Red = 0xFF00; Green = 0x; Blue = 0xFF00; }
diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx
new file mode 100644
index 000..93ac1e3
--- /dev/null
+++ b/sc/source/ui/dbgui/sortkeydlg.cxx
@@ -0,0 +1,154 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode

Re: [PATCH] Use global constants for initial tab count bounds checking

2012-04-18 Thread Albert Thuswaldner
Hi Kohei,
Sorry for double posting, forgot to CC the list.

On Wed, Apr 18, 2012 at 02:21, Kohei Yoshida kohei.yosh...@gmail.com wrote:
 On Wed, 2012-04-18 at 00:41 +0200, Albert Thuswaldner wrote:
 Hi Kohei,
 This patch makes the bounds checking of the initial tab count more
 consistent with the actual limits.

 Actually we intentionally limit the number of initial sheets to 1024
 even though the document can have up to 1 sheets.

 This is to prevent users to accidentally set the initial sheets too
 high, since that could cause the memory usage of even a blank document
 to exceed the available system memory, and it becomes very difficult to
 revert the setting once it's set.

Ok, good to know. IMHO it is even more important to sort this thing
out. I've updated my patch with a new proposed solution.
/Albert
From 9565e78318123cffdd244c65081d3ff54373d411 Mon Sep 17 00:00:00 2001
From: Albert Thuswaldner albert.thuswald...@gmail.com
Date: Wed, 18 Apr 2012 00:31:02 +0200
Subject: [PATCH] Use global constants for initial tab count bounds checking

---
 sc/inc/address.hxx  |6 +-
 sc/source/ui/optdlg/tpdefaults.cxx  |   11 ---
 sc/source/ui/vba/vbaapplication.cxx |5 +++--
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index 6c45311..8d209c9 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -95,7 +95,11 @@ const SCROW   MAXROW = MAXROWCOUNT - 1;
 const SCCOL   MAXCOL = MAXCOLCOUNT - 1;
 const SCTAB   MAXTAB = MAXTABCOUNT - 1;
 const SCCOLROWMAXCOLROW  = MAXROW;
-
+// Limit the initial tab count to prevent users to set the count too high,
+// which could cause the memory usage of blank documents to exceed the
+// available system memory.
+const SCTAB   MAXINITTABCOUNT = 1024;
+const SCTAB   MININITTABCOUNT = 1;
 
 // Special values
 const SCTAB SC_TAB_APPEND = SCTAB_MAX;
diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx
index bc5b988..36ff088 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -36,9 +36,6 @@
 #include defaultsoptions.hxx
 #include document.hxx
 
-#define INIT_SHEETS_MIN 1
-#define INIT_SHEETS_MAX 1024
-
 using ::rtl::OUString;
 
 ScTpDefaultsOptions::ScTpDefaultsOptions(Window *pParent, const SfxItemSet rCoreSet) :
@@ -119,10 +116,10 @@ int ScTpDefaultsOptions::DeactivatePage(SfxItemSet* /*pSet*/)
 void ScTpDefaultsOptions::CheckNumSheets()
 {
 sal_Int64 nVal = aEdNSheets.GetValue();
-if (nVal  INIT_SHEETS_MAX)
-aEdNSheets.SetValue(INIT_SHEETS_MAX);
-if (nVal  INIT_SHEETS_MIN)
-aEdNSheets.SetValue(INIT_SHEETS_MIN);
+if (nVal  MAXINITTABCOUNT)
+aEdNSheets.SetValue(MAXINITTABCOUNT);
+if (nVal  MININITTABCOUNT)
+aEdNSheets.SetValue(MININITTABCOUNT);
 }
 
 void ScTpDefaultsOptions::CheckPrefix(Edit* pEdit)
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 478e8f4..ae4b232 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -945,9 +945,10 @@ sal_Int32 SAL_CALL ScVbaApplication::getSheetsInNewWorkbook() throw (uno::Runtim
 
 void SAL_CALL ScVbaApplication::setSheetsInNewWorkbook( sal_Int32 SheetsInNewWorkbook ) throw (script::BasicErrorException, uno::RuntimeException)
 {
-if ( SheetsInNewWorkbook  1 || SheetsInNewWorkbook  MAXTAB )
+if ( SheetsInNewWorkbook  MININITTABCOUNT
+  || SheetsInNewWorkbook  MAXINITTABCOUNT )
 {
-DebugHelper::exception( OUString(RTL_CONSTASCII_USTRINGPARAM(The number must be between 1 and 255)),
+DebugHelper::exception( OUString(RTL_CONSTASCII_USTRINGPARAM(The number must be between 1 and 1)),
 uno::Exception(), SbERR_METHOD_FAILED, OUString() );
 }
 else
-- 
1.7.3.4

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


[PATCH] Have operators of ScViewOptions and ScPrintOptions return bool instead of int

2012-04-17 Thread Albert Thuswaldner
Hi Kohei,
I have various small fixes related to Calc options in store which
accumulated while poking around in this part of the code.

Here is the first one.

/Albert
From 44c021da20b3695385ab48623c194c6e172ed8ba Mon Sep 17 00:00:00 2001
From: Albert Thuswaldner albert.thuswald...@gmail.com
Date: Sun, 15 Apr 2012 17:15:20 +0200
Subject: [PATCH] Have operators of ScViewOptions and ScPrintOptions return bool instead of int

---
 sc/inc/printopt.hxx  |4 ++--
 sc/inc/viewopti.hxx  |4 ++--
 sc/source/core/tool/printopt.cxx |4 ++--
 sc/source/core/tool/viewopti.cxx |2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/sc/inc/printopt.hxx b/sc/inc/printopt.hxx
index 5883e7c..8e32b7c 100644
--- a/sc/inc/printopt.hxx
+++ b/sc/inc/printopt.hxx
@@ -52,8 +52,8 @@ public:
 voidSetDefaults();
 
 const ScPrintOptions   operator=  ( const ScPrintOptions rCpy );
-int operator== ( const ScPrintOptions rOpt ) const;
-int operator!= ( const ScPrintOptions rOpt ) const;
+booloperator== ( const ScPrintOptions rOpt ) const;
+booloperator!= ( const ScPrintOptions rOpt ) const;
 };
 
 //==
diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx
index 0c763ce..b82f566 100644
--- a/sc/inc/viewopti.hxx
+++ b/sc/inc/viewopti.hxx
@@ -83,8 +83,8 @@ public:
 
 voidSetDefaults();
 const ScGridOptionsoperator=  ( const ScGridOptions rCpy );
-int operator== ( const ScGridOptions rOpt ) const;
-int operator!= ( const ScGridOptions rOpt ) const { return !(operator==(rOpt)); }
+booloperator== ( const ScGridOptions rOpt ) const;
+booloperator!= ( const ScGridOptions rOpt ) const { return !(operator==(rOpt)); }
 };
 
 //==
diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx
index 095e594..215989b 100644
--- a/sc/source/core/tool/printopt.cxx
+++ b/sc/source/core/tool/printopt.cxx
@@ -74,13 +74,13 @@ const ScPrintOptions ScPrintOptions::operator=( const ScPrintOptions rCpy )
 return *this;
 }
 
-int ScPrintOptions::operator==( const ScPrintOptions rOpt ) const
+bool ScPrintOptions::operator==( const ScPrintOptions rOpt ) const
 {
 return bSkipEmpty == rOpt.bSkipEmpty
  bAllSheets == rOpt.bAllSheets;
 }
 
-int ScPrintOptions::operator!=( const ScPrintOptions rOpt ) const
+bool ScPrintOptions::operator!=( const ScPrintOptions rOpt ) const
 {
 return !(operator==(rOpt));
 }
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 7c40d22..b20c57d 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -105,7 +105,7 @@ const ScGridOptions ScGridOptions::operator=( const ScGridOptions rCpy )
 
 //
 
-int ScGridOptions::operator==( const ScGridOptions rCpy ) const
+bool ScGridOptions::operator==( const ScGridOptions rCpy ) const
 {
 return (   nFldDrawX== rCpy.nFldDrawX
  nFldDivisionX== rCpy.nFldDivisionX
-- 
1.7.3.4

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


[PATCH] Removed duplicate set/get methods for initial tab count (fails while linking vbaobj.uno.so)

2012-04-17 Thread Albert Thuswaldner
Hi,
This patch removes the duplicate Get/Set methods in appoptio.hxx which
the vba api uses. There was a long discussion back in the day about
this:

http://lists.freedesktop.org/archives/libreoffice/2011-June/013114.html

I CC:ing Noel Power if he as some opinion regarding this.

Now to the problem with this patch:

This patch makes the build fail in when linking vbaobj.uno.so:

/home/thuswa/work/libo2/workdir/unxlngi6.pro/CxxObject/sc/source/ui/vba/vbaapplication.o:
In function `ScVbaApplication::getSheetsInNewWorkbook()':
/home/thuswa/work/libo2/sc/source/ui/vba/vbaapplication.cxx:942:
undefined reference to `ScModule::GetDefaultsOptions()'
/home/thuswa/work/libo2/workdir/unxlngi6.pro/CxxObject/sc/source/ui/vba/vbaapplication.o:
In function `ScVbaApplication::setSheetsInNewWorkbook(long)':
/home/thuswa/work/libo2/sc/source/ui/vba/vbaapplication.cxx:955:
undefined reference to `ScModule::GetDefaultsOptions()'
collect2: ld returned 1 exit status
make[1]: *** 
[/home/thuswa/work/libo2/workdir/unxlngi6.pro/LinkTarget/Library/vbaobj.uno.so]
Error 1
make[1]: *** Waiting for unfinished jobs
make: *** [sc] Error 2

I cant find a logical reason why this fails. The scmod.hxx which
defines the symbol is included as before, also considering the minimal
changes that I have made to the file:

diff --git a/sc/source/ui/vba/vbaapplication.cxx
b/sc/source/ui/vba/vbaapplication.cxx
index d0201a4..478e8f4 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -79,7 +79,7 @@
 #include global.hxx
 #include scmod.hxx
 #include docoptio.hxx
-#include appoptio.hxx
+#include defaultsoptions.hxx

 #include osl/file.hxx
 #include rtl/instance.hxx
@@ -939,8 +939,8 @@ ScVbaApplication::setEnableCancelKey(sal_Int32
/*lEnableCancelKey*/) throw (uno:

 sal_Int32 SAL_CALL ScVbaApplication::getSheetsInNewWorkbook() throw
(uno::RuntimeException)
 {
-const ScAppOptions rAppOpt = SC_MOD()-GetAppOptions();
-return rAppOpt.GetTabCountInNewSpreadsheet();
+const ScDefaultsOptions rOpt = SC_MOD()-GetDefaultsOptions();
+return rOpt.GetInitTabCount();
 }

 void SAL_CALL ScVbaApplication::setSheetsInNewWorkbook( sal_Int32
SheetsInNewWorkbook ) throw (script::BasicErrorException,
uno::RuntimeException)
@@ -952,8 +952,8 @@ void SAL_CALL
ScVbaApplication::setSheetsInNewWorkbook( sal_Int32 SheetsInNewWor
 }
 else
 {
-ScAppOptions rAppOpt = const_cast ScAppOptions
(SC_MOD()-GetAppOptions());
-rAppOpt.SetTabCountInNewSpreadsheet( SheetsInNewWorkbook );
+ScDefaultsOptions rOpt = const_cast ScDefaultsOptions
(SC_MOD()-GetDefaultsOptions());
+rOpt.SetInitTabCount( SheetsInNewWorkbook );
 }
 }


Is the vba part of the code treated in some special way? Wild guess:
all symbols are not automatically exported to here (don't know if that
is even possible)? Or what might be the problem?

Thanks for your help.
/Albert
From 8bac82d6ae0aea9d20c0ab90a0f608c5dd0f9bb1 Mon Sep 17 00:00:00 2001
From: Albert Thuswaldner albert.thuswald...@gmail.com
Date: Tue, 17 Apr 2012 20:25:53 +0200
Subject: [PATCH] Removed duplicate set/get methods for initial tab count

---
 sc/inc/appoptio.hxx |5 -
 sc/source/core/tool/appoptio.cxx|4 
 sc/source/ui/vba/vbaapplication.cxx |   10 +-
 sc/source/ui/view/tabvwsh4.cxx  |   11 +--
 4 files changed, 6 insertions(+), 24 deletions(-)

diff --git a/sc/inc/appoptio.hxx b/sc/inc/appoptio.hxx
index b7f5fe8..d4cc424 100644
--- a/sc/inc/appoptio.hxx
+++ b/sc/inc/appoptio.hxx
@@ -46,10 +46,6 @@ public:
 
 voidSetDefaults();
 
-// Set or get the initial tab count for new spreadsheet, it is used by VBA API currently.
-voidSetTabCountInNewSpreadsheet( SCTAB nCount )  { nTabCountInNewSpreadsheet = nCount; }
-SCTAB   GetTabCountInNewSpreadsheet() const  { return nTabCountInNewSpreadsheet;   }
-
 voidSetAppMetric( FieldUnit eUnit ) { eMetric = eUnit;  }
 FieldUnit   GetAppMetric() const{ return eMetric;   }
 voidSetZoom( sal_uInt16 nNew )  { nZoom = nNew; }
@@ -94,7 +90,6 @@ public:
 const ScAppOptions operator=   ( const ScAppOptions rOpt );
 
 private:
-SCTAB   nTabCountInNewSpreadsheet;
 FieldUnit   eMetric;
 sal_uInt16  nLRUFuncCount;
 sal_uInt16* pLRUList;
diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx
index 9b352b8..b864804 100644
--- a/sc/source/core/tool/appoptio.cxx
+++ b/sc/source/core/tool/appoptio.cxx
@@ -78,9 +78,6 @@ ScAppOptions::~ScAppOptions()
 
 void ScAppOptions::SetDefaults()
 {
-// Set default tab count for new spreadsheet.
-nTabCountInNewSpreadsheet = 0;
-
 if ( ScOptionsUtil::IsMetricSystem() )
 eMetric = FUNIT_CM; // default for countries with metric system
 else
@@ -118,7 +115,6 @@ void ScAppOptions::SetDefaults()
 
 const ScAppOptions ScAppOptions::operator=( const

  1   2   >