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

Markus Mohrhard mmohrhard at kemper.freedesktop.org
Mon Dec 26 06:19:47 PST 2011


 sc/source/ui/app/inputhdl.cxx              |    2 +-
 sc/source/ui/view/preview.cxx              |    4 ++--
 vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 21223d2be0d7aac9dc07d730f6365ce9c39f5faf
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Dec 26 14:56:25 2011 +0100

    fix assertion error in GtkFolderPicker during recovery dialog

diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
index e8e4578..ec1b0c8 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
@@ -89,7 +89,7 @@ void SAL_CALL SalGtkFolderPicker::setDisplayDirectory( const rtl::OUString& aDir
 
     OString aTxt = unicodetouri( aDirectory );
 
-    if( aTxt.lastIndexOf('/') == aTxt.getLength() - 1 )
+    if( aTxt.lastIndexOf('/') == aTxt.getLength() - 1 && !aTxt.isEmpty() )
         aTxt = aTxt.copy( 0, aTxt.getLength() - 1 );
 
     OSL_TRACE( "setting path to %s", aTxt.getStr() );
commit b12191787a4b03549acb2c6dff4946265cc64e77
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Dec 26 14:55:45 2011 +0100

    missing pointer check in new multiline input code, fdo#43856

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 7620df7..c0e3cc6 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3413,7 +3413,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
                         if (pData)
                         {
                             pEngine->SetText( *pData );
-                            if ( pInputWin->IsMultiLineInput() )
+                            if ( pInputWin && pInputWin->IsMultiLineInput() )
                                 aString = ScEditUtil::GetMultilineString(*pEngine);
                             else
                                 aString = GetEditText(pEngine);
commit ee154f70a1b6b1c8483e0c66f0f5dc6ad6e576e0
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Dec 26 14:54:31 2011 +0100

    move OSL_FAIL to correct location

diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 1c0d37a..4d72ef9 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -732,8 +732,6 @@ void ScPreview::SetPageNo( long nPage )
 
 long ScPreview::GetFirstPage(SCTAB nTabP)
 {
-    if (nTabP >= static_cast<SCTAB>(nPages.size()) )
-        OSL_FAIL("nPages out ouf bounds, FIX IT");
     SCTAB nDocTabCount = pDocShell->GetDocument()->GetTableCount();
     if (nTabP >= nDocTabCount)
         nTabP = nDocTabCount-1;
@@ -742,6 +740,8 @@ long ScPreview::GetFirstPage(SCTAB nTabP)
     if (nTabP>0)
     {
         CalcPages();
+        if (nTabP >= static_cast<SCTAB>(nPages.size()) )
+            OSL_FAIL("nPages out ouf bounds, FIX IT");
         UpdateDrawView();       // Tabelle evtl. geaendert
 
         for (SCTAB i=0; i<nTabP; i++)


More information about the Libreoffice-commits mailing list