summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-12-11 07:05:03 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-12-11 07:05:03 +0000
commitf439fd827172cf0bb5a0531c0198153912742a61 (patch)
tree9d7062b1ec407f1e6d9260cd4af0735d89646517 /sfx2
parent7527955227dfe1696cea8c40a7e74eaab59dca30 (diff)
CWS-TOOLING: integrate CWS cmcfixes51
2008-12-08 10:12:55 +0100 cmc r264975 : #i96203# protect with ifdefs to avoid unused symbol on mac 2008-12-05 12:23:47 +0100 cmc r264898 : CWS-TOOLING: rebase CWS cmcfixes51 to trunk@264807 (milestone: DEV300:m37) 2008-12-01 14:45:17 +0100 cmc r264606 : #i76655# ehlos apparently required 2008-11-28 17:49:30 +0100 cmc r264567 : #i96655# remove newly unused method 2008-11-28 10:41:28 +0100 cmc r264531 : #i96647# better ppc-bridges flushCode impl 2008-11-27 12:58:40 +0100 cmc r264478 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 12:32:49 +0100 cmc r264476 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 12:26:02 +0100 cmc r264475 : #i96655# redundant old table export helpers 2008-11-27 11:49:06 +0100 cmc r264473 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 11:38:35 +0100 cmc r264471 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 11:14:21 +0100 cmc r264467 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 11:06:22 +0100 cmc r264464 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 10:58:18 +0100 cmc r264462 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 10:41:44 +0100 cmc r264461 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 10:19:24 +0100 cmc r264460 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 10:13:39 +0100 cmc r264459 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 10:06:14 +0100 cmc r264458 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 09:59:54 +0100 cmc r264457 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 09:52:51 +0100 cmc r264456 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 09:48:26 +0100 cmc r264454 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 09:40:20 +0100 cmc r264452 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 09:35:26 +0100 cmc r264451 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 09:31:00 +0100 cmc r264450 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 09:24:08 +0100 cmc r264449 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 00:26:15 +0100 cmc r264443 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 00:21:01 +0100 cmc r264442 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-27 00:09:40 +0100 cmc r264441 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 23:51:56 +0100 cmc r264440 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 23:49:09 +0100 cmc r264439 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 18:09:54 +0100 cmc r264432 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 18:07:40 +0100 cmc r264431 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 17:28:02 +0100 cmc r264429 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 17:27:39 +0100 cmc r264428 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 17:18:36 +0100 cmc r264426 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 16:22:16 +0100 cmc r264415 : #i96624# make implicit braces and brackets explicit to avoid warnings 2008-11-26 16:00:23 +0100 cmc r264409 : #i90426# remove warnings from svtools 2008-11-26 15:59:17 +0100 cmc r264408 : #i90426# remove warnings 2008-11-26 15:47:32 +0100 cmc r264404 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 14:46:57 +0100 cmc r264394 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 14:19:50 +0100 cmc r264387 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 14:15:26 +0100 cmc r264386 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 14:11:26 +0100 cmc r264384 : #i96084# confirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 13:44:23 +0100 cmc r264380 : #i96084# comfirm existing logic with explicit brackets to remove new gcc warnings 2008-11-26 13:12:24 +0100 cmc r264372 : #i96604# silence new warnings 2008-11-26 12:35:02 +0100 cmc r264369 : #i96203# make qstarter work in 3-layer land 2008-11-26 12:33:04 +0100 cmc r264368 : #i96170# ensure gtypes are up and running
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/shutdownicon.cxx24
-rw-r--r--sfx2/source/control/bindings.cxx2
-rw-r--r--sfx2/source/control/dispatch.cxx4
-rw-r--r--sfx2/source/control/unoctitm.cxx10
-rw-r--r--sfx2/source/dialog/dockwin.cxx10
-rw-r--r--sfx2/source/dialog/splitwin.cxx2
-rw-r--r--sfx2/source/dialog/templdlg.cxx12
-rw-r--r--sfx2/source/doc/docfile.cxx8
-rw-r--r--sfx2/source/doc/objmisc.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx12
-rw-r--r--sfx2/source/doc/objuno.cxx2
-rw-r--r--sfx2/source/notify/eventsupplier.cxx2
-rw-r--r--sfx2/source/view/ipclient.cxx12
-rw-r--r--sfx2/source/view/orgmgr.cxx8
-rw-r--r--sfx2/source/view/viewfrm.cxx9
-rw-r--r--sfx2/source/view/viewsh.cxx2
16 files changed, 82 insertions, 39 deletions
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index d455786081..12fa73f436 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -63,10 +63,11 @@
#include <tools/urlobj.hxx>
#include <osl/security.hxx>
#include <osl/file.hxx>
-#include <unotools/bootstrap.hxx>
+#include <rtl/bootstrap.hxx>
#include <tools/link.hxx>
#ifdef UNX // need symlink
#include <unistd.h>
+#include <errno.h>
#endif
#include "sfxresid.hxx"
@@ -83,6 +84,12 @@ using namespace ::vos;
using namespace ::rtl;
using namespace ::sfx2;
+#ifdef ENABLE_QUICKSTART_APPLET
+# if !defined(WIN32) && !defined(QUARTZ)
+extern "C" { static void SAL_CALL thisModule() {} }
+# endif
+#endif
+
class SfxNotificationListener_Impl : public cppu::WeakImplHelper1< XDispatchResultListener >
{
public:
@@ -142,7 +149,7 @@ bool ShutdownIcon::LoadModule( osl::Module **pModule,
oslGenericFunction pTmpInit = NULL;
oslGenericFunction pTmpDeInit = NULL;
- if ( pPlugin->load( OUString (RTL_CONSTASCII_USTRINGPARAM( STRING( PLUGIN_NAME ) ) ) ) )
+ if ( pPlugin->loadRelative( &thisModule, OUString (RTL_CONSTASCII_USTRINGPARAM( STRING( PLUGIN_NAME ) ) ) ) )
{
pTmpInit = pPlugin->getFunctionSymbol(
OUString( RTL_CONSTASCII_USTRINGPARAM( "plugin_init_sys_tray" ) ) );
@@ -297,10 +304,12 @@ void ShutdownIcon::FromTemplate()
Reference < ::com::sun::star::frame::XDispatchProvider > xProv( xFrame, UNO_QUERY );
Reference < ::com::sun::star::frame::XDispatch > xDisp;
if ( xProv.is() )
+ {
if ( aTargetURL.Protocol.compareToAscii("slot:") == COMPARE_EQUAL )
xDisp = xProv->queryDispatch( aTargetURL, ::rtl::OUString(), 0 );
else
xDisp = xProv->queryDispatch( aTargetURL, ::rtl::OUString::createFromAscii("_blank"), 0 );
+ }
if ( xDisp.is() )
{
Sequence<PropertyValue> aArgs(1);
@@ -826,18 +835,21 @@ void ShutdownIcon::SetAutostart( bool bActivate )
#else // UNX
getDotAutostart( true );
- OUString aPath;
- ::utl::Bootstrap::locateBaseInstallation(aPath);
+ OUString aPath( RTL_CONSTASCII_USTRINGPARAM("${BRAND_BASE_DIR}/share/xdg/qstart.desktop" ) );
+ Bootstrap::expandMacros( aPath );
OUString aDesktopFile;
::osl::File::getSystemPathFromFileURL( aPath, aDesktopFile );
- aDesktopFile += OUString( RTL_CONSTASCII_USTRINGPARAM( "/share/xdg/qstart.desktop" ) );
OString aDesktopFileUnx = OUStringToOString( aDesktopFile,
osl_getThreadTextEncoding() );
OString aShortcutUnx = OUStringToOString( aShortcut,
osl_getThreadTextEncoding() );
- symlink( aDesktopFileUnx, aShortcutUnx );
+ if ((0 != symlink(aDesktopFileUnx, aShortcutUnx)) && (errno == EEXIST))
+ {
+ unlink(aShortcutUnx);
+ symlink(aDesktopFileUnx, aShortcutUnx);
+ }
ShutdownIcon *pIcon = ShutdownIcon::createInstance();
if( pIcon )
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 5659108c90..daa8412933 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -2084,7 +2084,7 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
// modifying the SfxObjectInterface-stack without SfxBindings => nothing to do
SfxViewFrame* pFrame = pDispatcher->GetFrame();
- if ( pFrame && pFrame->GetObjectShell()->IsInModalMode() || pSfxApp->IsDowning() || !pImp->pCaches->Count() )
+ if ( (pFrame && pFrame->GetObjectShell()->IsInModalMode()) || pSfxApp->IsDowning() || !pImp->pCaches->Count() )
{
DBG_PROFSTOP(SfxBindingsNextJob_Impl0);
return sal_True;
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 95ab93dbc3..7d42221e2e 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -884,7 +884,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
for (sal_uInt16 n=0; n<pImp->aChildWins.Count();)
{
SfxChildWindow *pWin = pWorkWin->GetChildWindow_Impl( (sal_uInt16) ( pImp->aChildWins[n] & 0xFFFF ) );
- if (!pWin || pWin && pWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT)
+ if (!pWin || (pWin && pWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT))
pImp->aChildWins.Remove(n);
else
n++;
@@ -1824,7 +1824,7 @@ sal_uInt32 SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp,
// bQuiet : own shells aren't considered for UI and SlotServer
// bNoUI: own Shells aren't considered fors UI
- if ( pImp->bQuiet || pImp->bNoUI || pImp->pFrame && pImp->pFrame->GetObjectShell()->IsPreview() )
+ if ( pImp->bQuiet || pImp->bNoUI || (pImp->pFrame && pImp->pFrame->GetObjectShell()->IsPreview()) )
return nHelpId;
sal_uInt32 nStatBarId=0;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index cf72f3c72b..b57cdd9ff5 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -671,9 +671,13 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchResultListener >& rListener ) throw( ::com::sun::star::uno::RuntimeException )
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
- if ( pDispatch &&
- ( aURL.Protocol.equalsAsciiL( ".uno:", 5 ) && aURL.Path == aDispatchURL.Path ||
- aURL.Protocol.equalsAsciiL( "slot:", 5 ) && aURL.Path.toInt32() == GetId() ) )
+ if (
+ pDispatch &&
+ (
+ (aURL.Protocol.equalsAsciiL( ".uno:", 5 ) && aURL.Path == aDispatchURL.Path) ||
+ (aURL.Protocol.equalsAsciiL( "slot:", 5 ) && aURL.Path.toInt32() == GetId())
+ )
+ )
{
/*
if ( !IsBound() && pBindings )
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 2235345c61..c48c43faed 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -157,7 +157,7 @@ BOOL SfxDockingWindow::PrepareToggleFloatingMode()
if (!pImp->bConstructed)
return TRUE;
- if ( Application::IsInModalMode() && IsFloatingMode() || !pMgr )
+ if ( (Application::IsInModalMode() && IsFloatingMode()) || !pMgr )
return FALSE;
if ( pImp->bDockingPrevented )
@@ -719,9 +719,13 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
if ( GetAlignment() != SFX_ALIGN_NOALIGNMENT )
{
// check if SfxWorkWindow is able to allow docking at its border
- if ( !pWorkWin->IsDockingAllowed() || !pWorkWin->IsInternalDockingAllowed() || ( GetFloatStyle() & WB_STANDALONE )
- && Application::IsInModalMode() )
+ if (
+ !pWorkWin->IsDockingAllowed() ||
+ !pWorkWin->IsInternalDockingAllowed() ||
+ ( (GetFloatStyle() & WB_STANDALONE) && Application::IsInModalMode()) )
+ {
SetAlignment( SFX_ALIGN_NOALIGNMENT );
+ }
}
// detect floating mode
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index 92da5d3c50..e35859a946 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -637,7 +637,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
USHORT nL=0, nP=0;
GetWindowPos( pD->pWin, nL, nP );
- if ( nL == nLine && nP == nPos || nL > nLine )
+ if ( (nL == nLine && nP == nPos) || nL > nLine )
{
DBG_ASSERT( nL == nLine || bNewLine || nPos > 0, "Falsche Parameter!" );
if ( nL == nLine && nPos == 0 && !bNewLine )
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index e0b30c8b72..26559e1fb6 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1396,10 +1396,12 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
SfxControllerItem *pCItem=pBoundItems[n];
BOOL bChecked = pItem && pItem->GetValue();
if( pCItem->IsBound() == bChecked )
+ {
if( !bChecked )
pCItem->ReBind();
else
pCItem->UnBind();
+ }
}
pBindings->LeaveRegistrations();
}
@@ -1573,9 +1575,13 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
{
SfxViewFrame *pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
SfxObjectShell *pDocShell = pViewFrame->GetObjectShell();
- if( bUpdate && (
- !IsCheckedItem(SID_STYLE_WATERCAN) || pDocShell
- && pDocShell->GetStyleSheetPool() != pStyleSheetPool) )
+ if (
+ bUpdate &&
+ (
+ !IsCheckedItem(SID_STYLE_WATERCAN) ||
+ (pDocShell && pDocShell->GetStyleSheetPool() != pStyleSheetPool)
+ )
+ )
{
bUpdate = FALSE;
Update_Impl();
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 620a935df5..5add688a10 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -515,7 +515,7 @@ Reference < XContent > SfxMedium::GetContent() const
{
SvtSaveOptions aOpt;
sal_Bool bIsRemote = IsRemote();
- if( bIsRemote && !aOpt.IsSaveRelINet() || !bRemote && !aOpt.IsSaveRelFSys() )
+ if( (bIsRemote && !aOpt.IsSaveRelINet()) || (!bRemote && !aOpt.IsSaveRelFSys()) )
return ::rtl::OUString();
}
@@ -1134,7 +1134,7 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading )
// or the document has been opened for editing explicitly
SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
- if ( !bLoading || pReadOnlyItem && !pReadOnlyItem->GetValue() )
+ if ( !bLoading || (pReadOnlyItem && !pReadOnlyItem->GetValue()) )
SetError( ERRCODE_IO_ACCESSDENIED );
else
GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, sal_True ) );
@@ -1826,8 +1826,8 @@ sal_Bool SfxMedium::TryDirectTransfer( const ::rtl::OUString& aURL, SfxItemSet&
aInsertArg.Data = xInStream;
SFX_ITEMSET_ARG( &aTargetSet, pRename, SfxBoolItem, SID_RENAME, sal_False );
SFX_ITEMSET_ARG( &aTargetSet, pOverWrite, SfxBoolItem, SID_OVERWRITE, sal_False );
- if ( pOverWrite && !pOverWrite->GetValue() // argument says: never overwrite
- || pRename && pRename->GetValue() ) // argument says: rename file
+ if ( (pOverWrite && !pOverWrite->GetValue()) // argument says: never overwrite
+ || (pRename && pRename->GetValue()) ) // argument says: rename file
aInsertArg.ReplaceExisting = sal_False;
else
aInsertArg.ReplaceExisting = sal_True; // default is overwrite existing files
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index a2659374c4..c3ef886929 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -2139,7 +2139,7 @@ String SfxObjectShell::UpdateTitle( SfxMedium* pMed, USHORT nDocViewNumber )
aTitle += String( SfxResId(STR_REPAIREDDOCUMENT) );
}
- if ( IsReadOnlyUI() || pMed && pMed->IsReadOnly() )
+ if ( IsReadOnlyUI() || (pMed && pMed->IsReadOnly()) )
aTitle += String( SfxResId(STR_READONLY) );
else if ( IsDocShared() )
aTitle += String( SfxResId(STR_SHARED) );
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index adb4a59624..351ba27685 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1215,8 +1215,10 @@ sal_Bool SfxObjectShell::SaveTo_Impl
// preserve only if the same filter has been used
bTryToPreservScriptSignature = pMedium->GetFilter() && pFilter && pMedium->GetFilter()->GetFilterName() == pFilter->GetFilterName();
- bNoPreserveForOasis = ( aODFVersion.equals( ODFVER_012_TEXT ) && nVersion == SvtSaveOptions::ODFVER_011
- || !aODFVersion.getLength() && nVersion == SvtSaveOptions::ODFVER_012 );
+ bNoPreserveForOasis = (
+ (aODFVersion.equals( ODFVER_012_TEXT ) && nVersion == SvtSaveOptions::ODFVER_011) ||
+ (!aODFVersion.getLength() && nVersion == SvtSaveOptions::ODFVER_012)
+ );
}
}
@@ -1226,7 +1228,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
{
SFX_ITEMSET_ARG( pMedSet, pSaveToItem, SfxBoolItem, SID_SAVETO, sal_False );
bCopyTo = GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ||
- pSaveToItem && pSaveToItem->GetValue();
+ (pSaveToItem && pSaveToItem->GetValue());
}
// use UCB for case sensitive/insensitive file name comparison
@@ -2622,7 +2624,7 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl
const SfxFilter* pFilter = GetFactory().GetFilterContainer()->GetFilter4FilterName( aFilterName );
if ( !pFilter
|| !pFilter->CanExport()
- || !bSaveTo && !pFilter->CanImport() )
+ || (!bSaveTo && !pFilter->CanImport()) )
{
SetError( ERRCODE_IO_INVALIDPARAMETER );
return sal_False;
@@ -2786,7 +2788,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl
// check if a "SaveTo" is wanted, no "SaveAs"
SFX_ITEMSET_ARG( pParams, pSaveToItem, SfxBoolItem, SID_SAVETO, sal_False );
- sal_Bool bCopyTo = GetCreateMode() == SFX_CREATE_MODE_EMBEDDED || pSaveToItem && pSaveToItem->GetValue();
+ sal_Bool bCopyTo = GetCreateMode() == SFX_CREATE_MODE_EMBEDDED || (pSaveToItem && pSaveToItem->GetValue());
// distinguish between "Save" and "SaveAs"
pImp->bIsSaving = sal_False;
diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx
index e56a9dbf7e..5de9fa044c 100644
--- a/sfx2/source/doc/objuno.cxx
+++ b/sfx2/source/doc/objuno.cxx
@@ -136,7 +136,7 @@ inline USHORT DaysInMonth( USHORT nMonth, USHORT nYear )
return aDaysInMonth[nMonth-1];
else
{
- if ( ((nYear % 4) == 0) && ((nYear % 100) != 0) ||
+ if ( (((nYear % 4) == 0) && ((nYear % 100) != 0)) ||
((nYear % 400) == 0) )
return aDaysInMonth[nMonth-1] + 1;
else
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index c7f9eb086d..a10d4f0075 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -540,7 +540,7 @@ void SfxEvents_Impl::BlowUpMacro( const ANY& rEvent, ANY& rRet, SfxObjectShell*
if ( aLibrary.compareToAscii("document") != 0 )
{
- if ( !aLibrary.getLength() || pDoc && ( String(aLibrary) == pDoc->GetTitle( SFX_TITLE_APINAME ) || String(aLibrary) == pDoc->GetTitle() ) )
+ if ( !aLibrary.getLength() || (pDoc && ( String(aLibrary) == pDoc->GetTitle( SFX_TITLE_APINAME ) || String(aLibrary) == pDoc->GetTitle() )) )
aLibrary = String::CreateFromAscii("document");
else
aLibrary = String::CreateFromAscii("application");
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index cd6530b70b..b6e34f22ac 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -868,8 +868,16 @@ sal_Bool SfxInPlaceClient::IsObjectUIActive() const
sal_Bool SfxInPlaceClient::IsObjectInPlaceActive() const
{
try {
- return ( m_pImp->m_xObject.is() && ( m_pImp->m_xObject->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE ) ||
- m_pImp->m_xObject.is() && ( m_pImp->m_xObject->getCurrentState() == embed::EmbedStates::UI_ACTIVE ) );
+ return(
+ (
+ m_pImp->m_xObject.is() &&
+ (m_pImp->m_xObject->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE)
+ ) ||
+ (
+ m_pImp->m_xObject.is() &&
+ (m_pImp->m_xObject->getCurrentState() == embed::EmbedStates::UI_ACTIVE)
+ )
+ );
}
catch( uno::Exception& )
{}
diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx
index 13c241eeaa..ede50724b4 100644
--- a/sfx2/source/view/orgmgr.cxx
+++ b/sfx2/source/view/orgmgr.cxx
@@ -312,9 +312,11 @@ SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
aFilePath, ( STREAM_READ | STREAM_SHARE_DENYWRITE ), FALSE, 0 );
const SfxFilter* pFilter = NULL;
pMed->UseInteractionHandler(TRUE);
- if( pSfxApp->GetFilterMatcher().GuessFilter( *pMed, &pFilter, SFX_FILTER_TEMPLATE, 0 ) ||
- pFilter && !pFilter->IsOwnFormat() ||
- pFilter && !pFilter->UsesStorage() )
+ if (
+ pSfxApp->GetFilterMatcher().GuessFilter(*pMed, &pFilter, SFX_FILTER_TEMPLATE, 0) ||
+ (pFilter && !pFilter->IsOwnFormat()) ||
+ (pFilter && !pFilter->UsesStorage())
+ )
{
pSfxApp->LoadTemplate( pEntry->aDocShell, aFilePath );
pEntry->bOwnFormat = FALSE;
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 5d7f9b9645..ab3aae96ec 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -2619,8 +2619,13 @@ void SfxViewFrame::ExecView_Impl
while ( pFrame )
{
SfxViewFrame *pView = pFrame->GetCurrentViewFrame();
- if ( nActFrame == nFrame || pView &&
- aName.CompareIgnoreCaseToAscii( pView->SfxShell::GetName() ) == COMPARE_EQUAL )
+ if (
+ nActFrame == nFrame ||
+ (
+ pView &&
+ aName.CompareIgnoreCaseToAscii( pView->SfxShell::GetName() ) == COMPARE_EQUAL
+ )
+ )
{
pRet = pView;
break;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index a83e4e8a40..7b523a4b2e 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1759,7 +1759,7 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan
// object in client is currently not active
// check if the object wants to be activated always or when it becomes at least partially visible
// TODO/LATER: maybe we should use the scaled area instead of the ObjArea?!
- if ( bAlwaysActive || bActiveWhenVisible && rVisArea.IsOver( pIPClient->GetObjArea() ) )
+ if ( bAlwaysActive || (bActiveWhenVisible && rVisArea.IsOver(pIPClient->GetObjArea())) )
{
try
{