accessibility/source/standard/vclxaccessiblebox.cxx    |    2 
 basctl/source/basicide/basidesh.cxx                    |    2 
 basic/source/runtime/runtime.cxx                       |    2 
 connectivity/source/drivers/file/FDatabaseMetaData.cxx |    2 
 editeng/source/items/numitem.cxx                       |    2 
 editeng/source/misc/svxacorr.cxx                       |    6 +
 sc/source/ui/view/viewfun2.cxx                         |    4 -
 sd/source/ui/annotations/annotationwindow.cxx          |    2 
 svl/source/items/stylepool.cxx                         |    3 
 sw/inc/fesh.hxx                                        |   12 ++-
 sw/source/core/frmedt/fecopy.cxx                       |   18 ++--
 sw/source/uibase/dochdl/swdtflvr.cxx                   |   68 ++++++++---------
 sw/source/uibase/inc/swdtflvr.hxx                      |    9 +-
 13 files changed, 69 insertions(+), 63 deletions(-)

New commits:
commit 2a6bf436ceb909b37199f7b94f21cdef60356c24
Author: Noel Grandin <noelgran...@gmail.com>
Date:   Sat Jun 6 19:12:22 2015 +0200

    convert SW_PASTESDR to scoped enum
    
    Change-Id: I7c33bb425ea1f32cc810205e025290a957ea68aa

diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 14112a6..c3e5683 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -160,9 +160,13 @@ struct SwGetCurColNumPara
     SwGetCurColNumPara() : pFrameFormat( 0 ), pPrtRect( 0 ), pFrmRect( 0 ) {}
 };
 
-#define SW_PASTESDR_INSERT      1
-#define SW_PASTESDR_REPLACE     2
-#define SW_PASTESDR_SETATTR     3
+enum class SwPasteSdr
+{
+    NONE        = 0,
+    Insert      = 1,
+    Replace     = 2,
+    SetAttr     = 3
+};
 
 #define SW_ADD_SELECT   1
 #define SW_ENTER_GROUP  2
@@ -547,7 +551,7 @@ public:
      Return value indicates if it was converted. */
     bool GetDrawObjGraphic( SotClipboardFormatId nFormat, Graphic& rGrf ) 
const;
 
-    void Paste( SvStream& rStm, sal_uInt16 nAction, const Point* pPt = 0 );
+    void Paste( SvStream& rStm, SwPasteSdr nAction, const Point* pPt = 0 );
     bool Paste( const Graphic &rGrf, const OUString& rURL );
     bool Paste( SotDataObject& rObj, const Point& rPt );
 
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index ef1a64a..612f631 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1327,7 +1327,7 @@ static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( 
SdrModel* _pModel )
     }
 }
 
-void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt )
+void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt )
 {
     SET_CURR_SHELL( this );
     StartAllAction();
@@ -1361,12 +1361,12 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 
nAction, const Point* pPt )
         SdrObject* pClpObj = pModel->GetPage(0)->GetObj(0);
         SdrObject* pOldObj = pView->GetMarkedObjectList().GetMark( 0 
)->GetMarkedSdrObj();
 
-        if( SW_PASTESDR_SETATTR == nAction && pOldObj->ISA(SwVirtFlyDrawObj) )
-            nAction = SW_PASTESDR_REPLACE;
+        if( SwPasteSdr::SetAttr == nAction && pOldObj->ISA(SwVirtFlyDrawObj) )
+            nAction = SwPasteSdr::Replace;
 
         switch( nAction )
         {
-        case SW_PASTESDR_REPLACE:
+        case SwPasteSdr::Replace:
             {
                 const SwFrameFormat* pFormat(0);
                 const SwFrm* pAnchor(0);
@@ -1382,7 +1382,7 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 
nAction, const Point* pPt )
                     {
                         // if there is a textframe in the header/footer:
                         // do not replace but insert
-                        nAction = SW_PASTESDR_INSERT;
+                        nAction = SwPasteSdr::Insert;
                         break;
                     }
                 }
@@ -1451,7 +1451,7 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 
nAction, const Point* pPt )
             }
             break;
 
-        case SW_PASTESDR_SETATTR:
+        case SwPasteSdr::SetAttr:
             {
                 SfxItemSet aSet( GetAttrPool() );
                 const SdrGrafObj* pSdrGrafObj = dynamic_cast< const 
SdrGrafObj* >(pClpObj);
@@ -1496,14 +1496,14 @@ void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 
nAction, const Point* pPt )
             break;
 
         default:
-            nAction = SW_PASTESDR_INSERT;
+            nAction = SwPasteSdr::Insert;
             break;
         }
     }
     else
-        nAction = SW_PASTESDR_INSERT;
+        nAction = SwPasteSdr::Insert;
 
-    if( SW_PASTESDR_INSERT == nAction )
+    if( SwPasteSdr::Insert == nAction )
     {
         ::sw::DrawUndoGuard drawUndoGuard(GetDoc()->GetIDocumentUndoRedo());
 
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index 456be91..08d28b3 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1320,7 +1320,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& 
rData,
             {
             case SotClipboardFormatId::DRAWING:
                 nRet = SwTransferable::_PasteSdrFormat( rData, rSh,
-                                                SW_PASTESDR_INSERT, pPt,
+                                                SwPasteSdr::Insert, pPt,
                                                 nActionFlags, 
bNeedToSelectBeforePaste);
                 break;
 
@@ -1359,7 +1359,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& 
rData,
             case SotClipboardFormatId::PNG:
             case SotClipboardFormatId::GDIMETAFILE:
                 nRet = SwTransferable::_PasteGrf( rData, rSh, nFormat,
-                                                SW_PASTESDR_INSERT,pPt,
+                                                SwPasteSdr::Insert,pPt,
                                                 nActionFlags, nDropAction, 
bNeedToSelectBeforePaste);
                 break;
 
@@ -1375,10 +1375,10 @@ bool SwTransferable::PasteData( TransferableDataHelper& 
rData,
             case SotClipboardFormatId::SIMPLE_FILE:
                 nRet = SwTransferable::_PasteFileName( rData, rSh, nFormat,
                                 ( EXCHG_IN_ACTION_MOVE == nClearedAction
-                                    ? SW_PASTESDR_REPLACE
+                                    ? SwPasteSdr::Replace
                                     : EXCHG_IN_ACTION_LINK == nClearedAction
-                                        ? SW_PASTESDR_SETATTR
-                                        : SW_PASTESDR_INSERT),
+                                        ? SwPasteSdr::SetAttr
+                                        : SwPasteSdr::Insert),
                                 pPt, nActionFlags, bMsg, 0 );
                 break;
 
@@ -1413,7 +1413,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& 
rData,
             case SotClipboardFormatId::INET_IMAGE:
             case SotClipboardFormatId::NETSCAPE_IMAGE:
                 nRet = SwTransferable::_PasteTargetURL( rData, rSh,
-                                                        SW_PASTESDR_INSERT,
+                                                        SwPasteSdr::Insert,
                                                         pPt, true );
                 break;
 
@@ -1426,7 +1426,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& 
rData,
             {
                 bool graphicInserted;
                 nRet = SwTransferable::_PasteFileName( rData, rSh, nFormat,
-                                            SW_PASTESDR_INSERT, pPt,
+                                            SwPasteSdr::Insert, pPt,
                                             nActionFlags, bMsg,
                                             &graphicInserted );
                 if( graphicInserted )
@@ -1483,7 +1483,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& 
rData,
             {
             case SotClipboardFormatId::DRAWING:
                 nRet = SwTransferable::_PasteSdrFormat( rData, rSh,
-                                                SW_PASTESDR_SETATTR, pPt,
+                                                SwPasteSdr::SetAttr, pPt,
                                                 nActionFlags, 
bNeedToSelectBeforePaste);
                 break;
             case SotClipboardFormatId::SVXB:
@@ -1495,7 +1495,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& 
rData,
             case SotClipboardFormatId::FILEGRPDESCRIPTOR:
             case SotClipboardFormatId::UNIFORMRESOURCELOCATOR:
                 nRet = SwTransferable::_PasteGrf( rData, rSh, nFormat,
-                                                SW_PASTESDR_SETATTR, pPt,
+                                                SwPasteSdr::SetAttr, pPt,
                                                 nActionFlags, nDropAction, 
bNeedToSelectBeforePaste);
                 break;
             default:
@@ -1506,7 +1506,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& 
rData,
 
         case EXCHG_OUT_ACTION_INSERT_DRAWOBJ:
             nRet = SwTransferable::_PasteSdrFormat( rData, rSh,
-                                                SW_PASTESDR_INSERT, pPt,
+                                                SwPasteSdr::Insert, pPt,
                                                 nActionFlags, 
bNeedToSelectBeforePaste);
             break;
         case EXCHG_OUT_ACTION_INSERT_SVXB:
@@ -1514,13 +1514,13 @@ bool SwTransferable::PasteData( TransferableDataHelper& 
rData,
         case EXCHG_OUT_ACTION_INSERT_BITMAP:
         case EXCHG_OUT_ACTION_INSERT_GRAPH:
             nRet = SwTransferable::_PasteGrf( rData, rSh, nFormat,
-                                                SW_PASTESDR_INSERT, pPt,
+                                                SwPasteSdr::Insert, pPt,
                                                 nActionFlags, nDropAction, 
bNeedToSelectBeforePaste);
             break;
 
         case EXCHG_OUT_ACTION_REPLACE_DRAWOBJ:
             nRet = SwTransferable::_PasteSdrFormat( rData, rSh,
-                                                SW_PASTESDR_REPLACE, pPt,
+                                                SwPasteSdr::Replace, pPt,
                                                 nActionFlags, 
bNeedToSelectBeforePaste);
             break;
 
@@ -1529,7 +1529,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& 
rData,
         case EXCHG_OUT_ACTION_REPLACE_BITMAP:
         case EXCHG_OUT_ACTION_REPLACE_GRAPH:
             nRet = SwTransferable::_PasteGrf( rData, rSh, nFormat,
-                                                SW_PASTESDR_REPLACE,pPt,
+                                                SwPasteSdr::Replace,pPt,
                                                 nActionFlags, nDropAction, 
bNeedToSelectBeforePaste);
             break;
 
@@ -1936,7 +1936,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& 
rData, SwWrtShell& rSh,
 
             if( nRet && ( nActionFlags &
                 ( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) ))
-                SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, false );
+                SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, 
0, false );
 
             // let the object be unloaded if possible
             SwOLEObj::UnloadObject( xObj, rSh.GetDoc(), 
embed::Aspects::MSOLE_CONTENT );
@@ -1946,7 +1946,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& 
rData, SwWrtShell& rSh,
 }
 
 bool SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
-                                    SwWrtShell& rSh, sal_uInt16 nAction,
+                                    SwWrtShell& rSh, SwPasteSdr nAction,
                                     const Point* pPt, bool bInsertGRF )
 {
     bool nRet = false;
@@ -1973,12 +1973,12 @@ bool SwTransferable::_PasteTargetURL( 
TransferableDataHelper& rData,
 
                 switch( nAction )
                 {
-                case SW_PASTESDR_INSERT:
+                case SwPasteSdr::Insert:
                     SwTransferable::SetSelInShell( rSh, false, pPt );
                     rSh.Insert( sURL, aEmptyOUStr, aGraphic );
                     break;
 
-                case SW_PASTESDR_REPLACE:
+                case SwPasteSdr::Replace:
                     if( rSh.IsObjSelected() )
                     {
                         rSh.ReplaceSdrObj( sURL, aEmptyOUStr, &aGraphic );
@@ -1989,7 +1989,7 @@ bool SwTransferable::_PasteTargetURL( 
TransferableDataHelper& rData,
                         rSh.ReRead( sURL, aEmptyOUStr, &aGraphic );
                     break;
 
-                case SW_PASTESDR_SETATTR:
+                case SwPasteSdr::SetAttr:
                     if( rSh.IsObjSelected() )
                         rSh.Paste( aGraphic, OUString() );
                     else if( OBJCNT_GRF == rSh.GetObjCntTypeOfSelection() )
@@ -2221,7 +2221,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& 
rData,
 }
 
 bool SwTransferable::_PasteSdrFormat(  TransferableDataHelper& rData,
-                                    SwWrtShell& rSh, sal_uInt16 nAction,
+                                    SwWrtShell& rSh, SwPasteSdr nAction,
                                     const Point* pPt, sal_uInt8 nActionFlags, 
bool bNeedToSelectBeforePaste)
 {
     bool nRet = false;
@@ -2242,13 +2242,13 @@ bool SwTransferable::_PasteSdrFormat(  
TransferableDataHelper& rData,
 
         if( nRet && ( nActionFlags &
             ( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) ))
-            SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, false );
+            SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, 0, 
false );
     }
     return nRet;
 }
 
 bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
-                                SotClipboardFormatId nFormat, sal_uInt16 
nAction, const Point* pPt,
+                                SotClipboardFormatId nFormat, SwPasteSdr 
nAction, const Point* pPt,
                                 sal_uInt8 nActionFlags, sal_Int8 nDropAction, 
bool bNeedToSelectBeforePaste)
 {
     bool nRet = false;
@@ -2283,7 +2283,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& 
rData, SwWrtShell& rSh,
     case SotClipboardFormatId::UNIFORMRESOURCELOCATOR:
         if( ( nRet = rData.GetINetBookmark( nFormat, aBkmk ) ))
         {
-            if( SW_PASTESDR_SETATTR == nAction )
+            if( SwPasteSdr::SetAttr == nAction )
                 nFormat = SotClipboardFormatId::NETSCAPE_BOOKMARK;
             else
                 bCheckForGrf = true;
@@ -2302,7 +2302,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& 
rData, SwWrtShell& rSh,
                         URIHelper::SmartRel2Abs(INetURLObject(), sText, 
Link<OUString *, bool>(), false ),
                         sDesc );
                 bCheckForGrf = true;
-                bCheckForImageMap = SW_PASTESDR_REPLACE == nAction;
+                bCheckForImageMap = SwPasteSdr::Replace == nAction;
             }
         }
         break;
@@ -2319,7 +2319,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& 
rData, SwWrtShell& rSh,
         nRet = GRFILTER_OK == GraphicFilter::LoadGraphic( aBkmk.GetURL(), 
aEmptyOUStr,
                                             aGraphic, &rFlt );
 
-        if( !nRet && SW_PASTESDR_SETATTR == nAction &&
+        if( !nRet && SwPasteSdr::SetAttr == nAction &&
             SotClipboardFormatId::SIMPLE_FILE == nFormat &&
             // only at frame selection
             rSh.IsFrmSelected() )
@@ -2354,19 +2354,19 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& 
rData, SwWrtShell& rSh,
 
         switch( nAction )
         {
-            case SW_PASTESDR_INSERT:
+            case SwPasteSdr::Insert:
             {
                 SwTransferable::SetSelInShell( rSh, false, pPt );
                 rSh.Insert( sURL, aEmptyOUStr, aGraphic );
                 break;
             }
 
-            case SW_PASTESDR_REPLACE:
+            case SwPasteSdr::Replace:
             {
                 if( rSh.IsObjSelected() )
                 {
                     // #i123922# for D&D on draw objects, do for now the same 
for
-                    // SW_PASTESDR_REPLACE (D&D) as for SW_PASTESDR_SETATTR 
(D&D and
+                    // SwPasteSdr::Replace (D&D) as for SwPasteSdr::SetAttr 
(D&D and
                     // CTRL+SHIFT). The code below replaces the draw object 
with
                     // a writer graphic; maybe this is an option later again 
if wanted
                     rSh.Paste( aGraphic, sURL );
@@ -2384,7 +2384,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& 
rData, SwWrtShell& rSh,
                 break;
             }
 
-            case SW_PASTESDR_SETATTR:
+            case SwPasteSdr::SetAttr:
             {
                 if( SotClipboardFormatId::NETSCAPE_BOOKMARK == nFormat )
                 {
@@ -2433,7 +2433,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& 
rData, SwWrtShell& rSh,
 
         if( nActionFlags &
             ( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) )
-            SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, false );
+            SwTransferable::_PasteTargetURL( rData, rSh, SwPasteSdr::NONE, 0, 
false );
     }
     else if( bCheckForImageMap )
     {
@@ -2532,7 +2532,7 @@ bool SwTransferable::_PasteAsHyperlink( 
TransferableDataHelper& rData,
 
 bool SwTransferable::_PasteFileName( TransferableDataHelper& rData,
                                     SwWrtShell& rSh, SotClipboardFormatId 
nFormat,
-                                    sal_uInt16 nAction, const Point* pPt,
+                                    SwPasteSdr nAction, const Point* pPt,
                     sal_uInt8 nActionFlags, bool /* bMsg */,
                     bool * graphicInserted)
 {
@@ -2570,7 +2570,7 @@ bool SwTransferable::_PasteFileName( 
TransferableDataHelper& rData,
 
                 //Own FileFormat? --> insert, not for StarWriter/Web
                 OUString sFileURL = URIHelper::SmartRel2Abs(INetURLObject(), 
sFile, Link<OUString *, bool>(), false );
-                const SfxFilter* pFlt = SW_PASTESDR_SETATTR == nAction
+                const SfxFilter* pFlt = SwPasteSdr::SetAttr == nAction
                         ? 0 : SwIoSystem::GetFileFilter(sFileURL);
                 if( pFlt && !rSh.GetView().GetDocShell()->ISA(SwWebDocShell) )
                 {
@@ -2585,8 +2585,8 @@ bool SwTransferable::_PasteFileName( 
TransferableDataHelper& rData,
                                                       InsertRegionDialog ), 
pSect );
                     nRet = true;
                     }
-                else if( SW_PASTESDR_SETATTR == nAction ||
-                        ( bIsURLFile && SW_PASTESDR_INSERT == nAction ))
+                else if( SwPasteSdr::SetAttr == nAction ||
+                        ( bIsURLFile && SwPasteSdr::Insert == nAction ))
                 {
                     //we can insert foreign files as links after all
 
@@ -2731,7 +2731,7 @@ bool SwTransferable::_PasteFileList( 
TransferableDataHelper& rData,
     if( rData.GetFileList( SotClipboardFormatId::FILE_LIST, aFileList ) &&
         aFileList.Count() )
     {
-        sal_uInt16 nAct = bLink ? SW_PASTESDR_SETATTR : SW_PASTESDR_INSERT;
+        SwPasteSdr nAct = bLink ? SwPasteSdr::SetAttr : SwPasteSdr::Insert;
         OUString sFlyNm;
         // iterate over the filelist
         for( sal_uLong n = 0, nEnd = aFileList.Count(); n < nEnd; ++n )
diff --git a/sw/source/uibase/inc/swdtflvr.hxx 
b/sw/source/uibase/inc/swdtflvr.hxx
index 039875b..a72b78e 100644
--- a/sw/source/uibase/inc/swdtflvr.hxx
+++ b/sw/source/uibase/inc/swdtflvr.hxx
@@ -37,6 +37,7 @@ class SwWrtShell;
 class SvxClipboardFormatItem;
 class SwFrameShell;
 class SwView_Impl;
+enum class SwPasteSdr;
 
 typedef sal_uInt16 TransferBufferType;
 namespace nsTransferBufferType
@@ -93,17 +94,17 @@ class SW_DLLPUBLIC SwTransferable : public 
TransferableHelper
     static bool _PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
                             SotClipboardFormatId nFormat, sal_uInt8 
nActionFlags, bool bMsg );
     static bool _PasteTargetURL( TransferableDataHelper& rData, SwWrtShell& 
rSh,
-                        sal_uInt16 nAction, const Point* pPt, bool bInsertGRF 
);
+                        SwPasteSdr nAction, const Point* pPt, bool bInsertGRF 
);
 
     static bool _PasteDDE( TransferableDataHelper& rData, SwWrtShell& 
rWrtShell,
                             bool bReReadGrf, bool bMsg );
 
     static bool _PasteSdrFormat(  TransferableDataHelper& rData,
-                                    SwWrtShell& rSh, sal_uInt16 nAction,
+                                    SwWrtShell& rSh, SwPasteSdr nAction,
                                     const Point* pPt, sal_uInt8 nActionFlags, 
bool bNeedToSelectBeforePaste);
 
     static bool _PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
-                                SotClipboardFormatId nFormat, sal_uInt16 
nAction, const Point* pPt,
+                                SotClipboardFormatId nFormat, SwPasteSdr 
nAction, const Point* pPt,
                                 sal_uInt8 nActionFlags, sal_Int8 nDropAction, 
bool bNeedToSelectBeforePaste);
 
     static bool _PasteImageMap( TransferableDataHelper& rData,
@@ -113,7 +114,7 @@ class SW_DLLPUBLIC SwTransferable : public 
TransferableHelper
                                         SwWrtShell& rSh, SotClipboardFormatId 
nFormat );
 
     static bool _PasteFileName( TransferableDataHelper& rData,
-                            SwWrtShell& rSh, SotClipboardFormatId nFormat, 
sal_uInt16 nAction,
+                            SwWrtShell& rSh, SotClipboardFormatId nFormat, 
SwPasteSdr nAction,
                             const Point* pPt, sal_uInt8 nActionFlags, bool 
bMsg, bool * graphicInserted );
 
     static bool _PasteDBData( TransferableDataHelper& rData, SwWrtShell& rSh,
commit 5a2e09989a4b9746a56f15fe7499067a4327fbae
Author: Noel Grandin <noelgran...@gmail.com>
Date:   Sun Jun 14 13:35:37 2015 +0200

    cppcheck:redundantCondition
    
    Change-Id: Ib8b6342d1da526df6104125ded546b3f053c448b

diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx 
b/accessibility/source/standard/vclxaccessiblebox.cxx
index 1e801a8..a20bcf0 100644
--- a/accessibility/source/standard/vclxaccessiblebox.cxx
+++ b/accessibility/source/standard/vclxaccessiblebox.cxx
@@ -182,7 +182,7 @@ void VCLXAccessibleBox::ProcessWindowEvent (const 
VclWindowEvent& rVclWindowEven
                         sText = xText->getText();
                     pList->UpdateSelection_Acc(sText, m_bIsDropDownBox);
 #if defined WNT
-                    if (m_bIsDropDownBox || ( !m_bIsDropDownBox && 
m_aBoxType==COMBOBOX))
+                    if (m_bIsDropDownBox || m_aBoxType==COMBOBOX)
                         
NotifyAccessibleEvent(AccessibleEventId::VALUE_CHANGED, Any(), Any());
 #endif
                 }
diff --git a/basctl/source/basicide/basidesh.cxx 
b/basctl/source/basicide/basidesh.cxx
index b31d18c..2501cdb 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -831,7 +831,7 @@ void Shell::RemoveWindow( BaseWindow* pWindow_, bool 
bDestroy, bool bAllowChange
             if ( pWindow_->GetDocument().isInVBAMode() )
             {
                 SbModule* pMod = StarBASIC::GetActiveModule();
-                if ( !pMod || !pMod->GetName().equals(pWindow_->GetName()))
+                if ( !pMod || !pMod->GetName().equals(pWindow_->GetName()) )
                 {
                     bStop = false;
                 }
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 53a1078..4ccf505 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1628,7 +1628,7 @@ inline bool checkUnoStructCopy( bool bVBA, 
SbxVariableRef& refVal, SbxVariableRe
     SbxDataType eVarType = refVar->GetType();
     SbxDataType eValType = refVal->GetType();
 
-    if ( !( !bVBA || refVar->GetType() != SbxEMPTY ) || !refVar->CanWrite() )
+    if ( ( bVBA && ( eVarType == SbxEMPTY ) ) || !refVar->CanWrite() )
         return false;
 
     if ( eValType != SbxOBJECT )
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx 
b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 36cf6e4..f75db5a 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -280,7 +280,7 @@ Reference< XResultSet > SAL_CALL 
ODatabaseMetaData::getTables(
                 if (aURL.getExtension().isEmpty())
                 {
                     sal_Unicode nChar = aURL.getBase()[0];
-                    if(match(tableNamePattern,aURL.getBase(),'\0') && ( 
!bCheckEnabled || (nChar < '0' || nChar > '9') ) )
+                    if( match(tableNamePattern,aURL.getBase(),'\0') && ( 
!bCheckEnabled || nChar < '0' || nChar > '9' ) )
                     {
                         aRow.push_back(new 
ORowSetValueDecorator(OUString(aURL.getBase())));
                         bNewRow = true;
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index f99fff5..c251214 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -398,7 +398,7 @@ void SvxNumberFormat::SetGraphicBrush( const SvxBrushItem* 
pBrushItem,
         delete pGraphicBrush;
         pGraphicBrush = 0;
     }
-    else if ( !pGraphicBrush || !(*pBrushItem == *pGraphicBrush) )
+    else if ( !pGraphicBrush || (*pBrushItem != *pGraphicBrush) )
     {
         delete pGraphicBrush;
         pGraphicBrush =  static_cast<SvxBrushItem*>(pBrushItem->Clone());
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index fc84b22..3095aff 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2876,8 +2876,10 @@ const SvxAutocorrWord* 
SvxAutocorrWordList::WordMatches(const SvxAutocorrWord *p
             sal_Int32 nFndPos = -1;
             do {
                 nFndPos = rTxt.indexOf( sTmp, nFndPos + 1);
-                not_suffix = (bWasWordDelim && (nSttWdPos >= nFndPos + 
sTmp.getLength()));
-            } while ( nFndPos != -1 && (!(left_wildcard || (!left_wildcard && 
(!nFndPos || IsWordDelim( rTxt[ nFndPos - 1 ])))) || not_suffix));
+                if (nFndPos == -1)
+                    break;
+                not_suffix = bWasWordDelim && (nSttWdPos >= (nFndPos + 
sTmp.getLength()));
+            } while ( (!left_wildcard && nFndPos && !IsWordDelim( rTxt[ 
nFndPos - 1 ])) || not_suffix );
 
             if ( nFndPos != -1 )
             {
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 40e85e9..9919956 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -545,8 +545,8 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool 
bSubTotal, bool bSetCursor
 
     const bool bEndRowEmpty = pDoc->IsBlockEmpty( nTab, nStartCol, nEndRow, 
nEndCol, nEndRow );
     const bool bEndColEmpty = pDoc->IsBlockEmpty( nTab, nEndCol, nStartRow, 
nEndCol, nEndRow );
-    bool bRow = ( ( nStartRow != nEndRow ) && ( bEndRowEmpty || !bEndColEmpty 
) );
-    bool bCol = ( ( nStartCol != nEndCol ) && ( bEndColEmpty || nStartRow == 
nEndRow ) );
+    bool bRow = ( nStartRow != nEndRow ) && ( bEndRowEmpty || !bEndColEmpty );
+    bool bCol = ( nStartCol != nEndCol ) && ( bEndColEmpty || nStartRow == 
nEndRow );
 
     // find an empty row for entering the result
     SCROW nInsRow = nEndRow;
diff --git a/sd/source/ui/annotations/annotationwindow.cxx 
b/sd/source/ui/annotations/annotationwindow.cxx
index bf7fb8a..587f815 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -177,7 +177,7 @@ void AnnotationTextWindow::KeyInput( const KeyEvent& 
rKeyEvt )
             bool bIsProtected = mpAnnotationWindow->IsProtected();
             if (!bIsProtected || !EditEngine::DoesKeyChangeText(rKeyEvt) )
 
-            bDone = mpOutlinerView->PostKeyEvent( rKeyEvt );
+                bDone = mpOutlinerView->PostKeyEvent( rKeyEvt );
         }
         if (bDone)
         {
diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx
index 301572d..31fbaf3 100644
--- a/svl/source/items/stylepool.cxx
+++ b/svl/source/items/stylepool.cxx
@@ -408,8 +408,7 @@ StylePool::SfxItemSet_Pointer_t 
StylePoolImpl::insertItemSet( const SfxItemSet&
         if( !rSet.GetPool()->IsItemFlag(pItem->Which(), 
SfxItemPoolFlags::POOLABLE ) )
             bNonPoolable = true;
         if ( !xFoundIgnorableItems.get() ||
-             ( xFoundIgnorableItems.get() &&
-               xFoundIgnorableItems->Put( *pItem ) == 0 ) )
+             (xFoundIgnorableItems->Put( *pItem ) == 0 ) )
         {
             pCurNode = pCurNode->findChildNode( *pItem );
         }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to