[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - filter/source setup_native/source sw/source

Andre Fischer af at apache.org
Fri Jun 21 03:08:06 PDT 2013


 filter/source/msfilter/escherex.cxx          |   22 +++++++----
 setup_native/source/win32/nsis/ooobanner.bmp |binary
 setup_native/source/win32/nsis/ooobitmap.bmp |binary
 sw/source/ui/misc/redlndlg.cxx               |   51 ++++++++++++++-------------
 4 files changed, 41 insertions(+), 32 deletions(-)

New commits:
commit 70e8e4f79483c3c31c217c4493361d76af99544f
Author: Andre Fischer <af at apache.org>
Date:   Fri Jun 21 09:52:54 2013 +0000

    121256: Remember Any by value not by pointer before using it in outer scope.

diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index d126053..ad10d28 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -2707,8 +2707,10 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
             const rtl::OUString sHandles            ( RTL_CONSTASCII_USTRINGPARAM( "Handles" ) );
             const rtl::OUString sAdjustmentValues   ( RTL_CONSTASCII_USTRINGPARAM( "AdjustmentValues" ) );
 
-            const beans::PropertyValue* pAdjustmentValuesProp = NULL;
-            const beans::PropertyValue* pPathCoordinatesProp = NULL;
+            bool bHasAdjustmentValuesProp = false;
+            uno::Any aAdjustmentValuesProp;
+            bool bHasPathCoordinatesProp = false;
+            uno::Any aPathCoordinatesProp;
             sal_Int32 nAdjustmentsWhichNeedsToBeConverted = 0;
             uno::Sequence< beans::PropertyValues > aHandlesPropSeq;
             sal_Bool bPredefinedHandlesUsed = sal_True;
@@ -3157,7 +3159,10 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
                             else if ( rrProp.Name.equals( sPathCoordinates ) )
                             {
                                 if ( !bIsDefaultObject )
-                                    pPathCoordinatesProp = &rrProp;
+                                {
+                                    aPathCoordinatesProp = rrProp.Value;
+                                    bHasPathCoordinatesProp = true;
+                                }
                             }
                             else if ( rrProp.Name.equals( sPathGluePoints ) )
                             {
@@ -3785,13 +3790,14 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
                 {
                     // it is required, that the information which handle is polar has already be read,
                     // so we are able to change the polar value to a fixed float
-                    pAdjustmentValuesProp = &rProp;
+                    aAdjustmentValuesProp = rProp.Value;
+                    bHasAdjustmentValuesProp = true;
                 }
             }
-            if ( pAdjustmentValuesProp )
+            if ( bHasAdjustmentValuesProp )
             {
                 uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq;
-                if ( pAdjustmentValuesProp->Value >>= aAdjustmentSeq )
+                if ( aAdjustmentValuesProp >>= aAdjustmentSeq )
                 {
                     if ( bPredefinedHandlesUsed )
                         LookForPolarHandles( eShapeType, nAdjustmentsWhichNeedsToBeConverted );
@@ -3802,10 +3808,10 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
                             AddOpt( (sal_uInt16)( DFF_Prop_adjustValue + k ), (sal_uInt32)nValue );
                 }
             }
-            if( pPathCoordinatesProp )
+            if( bHasPathCoordinatesProp )
             {
                 com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeParameterPair > aCoordinates;
-                if ( pPathCoordinatesProp->Value >>= aCoordinates )
+                if ( aPathCoordinatesProp >>= aCoordinates )
                 {
                     // creating the vertices
                     if ( (sal_uInt16)aCoordinates.getLength() )
commit 1cf0f678f41407016388e17e75fb3f073b2febe6
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Fri Jun 21 08:59:33 2013 +0000

    121435: Change Tracking - Accept and Reject dialog - on accessing redline by index assure that index has valid value

diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index a3779ad..eb275d3 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -350,7 +350,7 @@ void SwRedlineAcceptDlg::InitAuthors()
     pFilterPage->ClearAuthors();
 
     String sParent;
-    sal_uInt16 nCount = pSh->GetRedlineCount();
+    const sal_uInt16 nRedlineCount = pSh->GetRedlineCount();
 
     bOnlyFormatedRedlines = sal_True;
     bHasReadonlySel = sal_False;
@@ -358,7 +358,7 @@ void SwRedlineAcceptDlg::InitAuthors()
     sal_uInt16 i;
 
     // Autoren ermitteln
-    for ( i = 0; i < nCount; i++)
+    for ( i = 0; i < nRedlineCount; i++)
     {
         const SwRedline& rRedln = pSh->GetRedline(i);
 
@@ -390,14 +390,18 @@ void SwRedlineAcceptDlg::InitAuthors()
     sal_Bool bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
     sal_Bool bSel = pTable->FirstSelected() != 0;
 
-    SvLBoxEntry* pSelEntry = pTable->FirstSelected();
-    while (pSelEntry)
     {
-        sal_uInt16 nPos = GetRedlinePos(*pSelEntry);
-        const SwRedline& rRedln = pSh->GetRedline( nPos );
-
-        bIsNotFormated |= nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType();
-        pSelEntry = pTable->NextSelected(pSelEntry);
+        SvLBoxEntry* pSelEntry = pTable->FirstSelected();
+        while (pSelEntry)
+        {
+            const sal_uInt16 nPos = GetRedlinePos(*pSelEntry);
+            if ( nPos < nRedlineCount )
+            {
+                const SwRedline& rRedln = pSh->GetRedline( nPos );
+                bIsNotFormated |= nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType();
+            }
+            pSelEntry = pTable->NextSelected(pSelEntry);
+        }
     }
 
     pTPView->EnableAccept( bEnable && bSel );
@@ -823,7 +827,7 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
     sal_uInt16 nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
 
     String sParent;
-    sal_uInt16 nCount = pSh->GetRedlineCount();
+    const sal_uInt16 nCount = pSh->GetRedlineCount();
     nEnd = Min((sal_uInt16)nEnd, (sal_uInt16)(nCount - 1)); // Handelt auch nEnd=USHRT_MAX (bis zum Ende) ab
 
     if (nEnd == USHRT_MAX)
@@ -949,7 +953,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept )
          aIter != aEnd;
          aIter++ )
     {
-        sal_uInt16 nPosition = GetRedlinePos( **aIter );
+        const sal_uInt16 nPosition = GetRedlinePos( **aIter );
         if( nPosition != USHRT_MAX )
             (pSh->*FnAccRej)( nPosition );
     }
@@ -1102,7 +1106,6 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
 
     sal_Bool bIsNotFormated = sal_False;
     sal_Bool bSel = sal_False;
-//  sal_Bool bReadonlySel = sal_False;
 
     //#98883# don't select redlines while the dialog is not focussed
     //#107938# But not only ask pTable if it has the focus. To move
@@ -1136,17 +1139,13 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
                 bSel = sal_True;
 
             // #98864# find the selected redline (ignore, if the redline is already gone)
-            sal_uInt16 nPos = GetRedlinePos(*pActEntry);
-            if( nPos != USHRT_MAX )
+            const sal_uInt16 nPos = GetRedlinePos(*pActEntry);
+            if ( nPos < pSh->GetRedlineCount() )
             {
 
                 const SwRedline& rRedln = pSh->GetRedline( nPos );
                 bIsNotFormated |= nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType();
 
-//JP 27.9.2001: make no sense if we handle readonly sections
-//          if( !bReadonlySel && rRedln.HasReadonlySel() )
-//              bReadonlySel = sal_True;
-
                 if (pSh->GotoRedline(nPos, sal_True))
                 {
                     pSh->SetInSelect();
@@ -1192,7 +1191,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
                 if (pTable->GetParent(pEntry))
                     pTopEntry = pTable->GetParent(pEntry);
 
-                sal_uInt16 nPos = GetRedlinePos(*pTopEntry);
+                const sal_uInt16 nPos = GetRedlinePos(*pTopEntry);
 
                 // Bei geschuetzten Bereichen kommentieren disablen
                 if ((pRed = pSh->GotoRedline(nPos, sal_True)) != 0)
@@ -1228,7 +1227,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
 
             switch( nRet )
             {
-                case MN_EDIT_COMMENT:
+            case MN_EDIT_COMMENT:
                 {
                     String sComment;
                     if (pEntry)
@@ -1236,14 +1235,18 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
                         if (pTable->GetParent(pEntry))
                             pEntry = pTable->GetParent(pEntry);
 
-                        sal_uInt16 nPos = GetRedlinePos(*pEntry);
+                        const sal_uInt16 nPos = GetRedlinePos(*pEntry);
+                        if ( nPos >= pSh->GetRedlineCount() )
+                        {
+                            break;
+                        }
                         const SwRedline &rRedline = pSh->GetRedline(nPos);
 
 
                         /* enable again once we have redline comments in the margin
                         sComment = rRedline.GetComment();
                         if ( sComment == String(::rtl::OUString::createFromAscii("")) )
-                            GetActiveView()->GetDocShell()->Broadcast(SwRedlineHint(&rRedline,SWREDLINE_INSERTED));
+                        GetActiveView()->GetDocShell()->Broadcast(SwRedlineHint(&rRedline,SWREDLINE_INSERTED));
                         const_cast<SwRedline&>(rRedline).Broadcast(SwRedlineHint(&rRedline,SWREDLINE_FOCUS));
                         */
 
@@ -1258,8 +1261,8 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
                         aSet.Put(SvxPostItAuthorItem(rRedline.GetAuthorString(), SID_ATTR_POSTIT_AUTHOR));
 
                         aSet.Put(SvxPostItDateItem( GetAppLangDateTimeString(
-                                    rRedline.GetRedlineData().GetTimeStamp() ),
-                                    SID_ATTR_POSTIT_DATE ));
+                            rRedline.GetRedlineData().GetTimeStamp() ),
+                            SID_ATTR_POSTIT_DATE ));
 
                         AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, sal_False );
                         DBG_ASSERT(pDlg, "Dialogdiet fail!");
commit 932fbb775018e3f6d3136cc5e1ab3826509eda36
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Fri Jun 21 08:33:36 2013 +0000

    122331: adjust images used in download Windows installer - ooobitmap.bmp seems to be broken, ooobanner.bmp was too high

diff --git a/setup_native/source/win32/nsis/ooobanner.bmp b/setup_native/source/win32/nsis/ooobanner.bmp
index 3af7218..d094241 100644
Binary files a/setup_native/source/win32/nsis/ooobanner.bmp and b/setup_native/source/win32/nsis/ooobanner.bmp differ
diff --git a/setup_native/source/win32/nsis/ooobitmap.bmp b/setup_native/source/win32/nsis/ooobitmap.bmp
index 66807c1..951e2ab 100644
Binary files a/setup_native/source/win32/nsis/ooobitmap.bmp and b/setup_native/source/win32/nsis/ooobitmap.bmp differ


More information about the Libreoffice-commits mailing list