summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/sfx2/docmacromode.hxx2
-rw-r--r--sfx2/inc/sfx2/objsh.hxx12
-rw-r--r--sfx2/inc/sfx2/sfxbasemodel.hxx2
-rw-r--r--sfx2/inc/sfx2/sfxsids.hrc1
-rw-r--r--sfx2/inc/sfx2/titledockwin.hxx2
-rw-r--r--sfx2/qa/complex/sfx2/DocumentProperties.java4
-rw-r--r--sfx2/source/appl/appcfg.cxx20
-rw-r--r--sfx2/source/appl/appinit.cxx4
-rw-r--r--sfx2/source/appl/appopen.cxx10
-rw-r--r--sfx2/source/appl/appquit.cxx2
-rw-r--r--sfx2/source/appl/appserv.cxx2
-rw-r--r--sfx2/source/appl/childwin.cxx2
-rw-r--r--sfx2/source/appl/impldde.cxx18
-rw-r--r--sfx2/source/bastyp/bitset.cxx2
-rw-r--r--sfx2/source/bastyp/fltlst.cxx2
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx2
-rw-r--r--sfx2/source/config/evntconf.cxx2
-rw-r--r--sfx2/source/dialog/dockwin.cxx2
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx2
-rw-r--r--sfx2/source/dialog/tabdlg.cxx3
-rw-r--r--sfx2/source/doc/Metadatable.cxx2
-rw-r--r--sfx2/source/doc/docfile.cxx6
-rw-r--r--sfx2/source/doc/doctempl.cxx2
-rw-r--r--sfx2/source/doc/docvor.cxx2
-rw-r--r--sfx2/source/doc/graphhelp.cxx2
-rw-r--r--sfx2/source/doc/objcont.cxx2
-rw-r--r--sfx2/source/doc/objserv.cxx6
-rw-r--r--sfx2/source/doc/objstor.cxx18
-rw-r--r--sfx2/source/doc/objuno.cxx6
-rw-r--r--sfx2/source/doc/objxtor.cxx2
-rw-r--r--sfx2/source/doc/printhelper.cxx20
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx11
-rw-r--r--sfx2/source/menu/virtmenu.cxx11
-rw-r--r--sfx2/source/notify/eventsupplier.cxx6
-rw-r--r--sfx2/source/sidebar/SidebarDockingWindow.cxx5
-rw-r--r--sfx2/source/view/frmload.cxx4
-rw-r--r--sfx2/source/view/ipclient.cxx2
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx4
-rw-r--r--sfx2/source/view/viewprn.cxx2
-rw-r--r--sfx2/source/view/viewsh.cxx4
40 files changed, 127 insertions, 86 deletions
diff --git a/sfx2/inc/sfx2/docmacromode.hxx b/sfx2/inc/sfx2/docmacromode.hxx
index c716b0e428e5..cf9e9ac6729c 100644
--- a/sfx2/inc/sfx2/docmacromode.hxx
+++ b/sfx2/inc/sfx2/docmacromode.hxx
@@ -107,7 +107,7 @@ namespace sfx2
virtual ::rtl::OUString
getDocumentLocation() const = 0;
- /** returns a zip-storage based on the last commited version of the document,
+ /** returns a zip-storage based on the last committed version of the document,
for readonly access
The storage is intended to be used for signing. An implementation is
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index cda7eb3ae561..dc2826139f8b 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -214,8 +214,16 @@ private:
sal_Bool bHasName :1, // sal_True := bestehendes Objekt, sal_False := es ist ein neues Objekt
bIsTmp :1; // temp. Storage
sal_Bool bIsInGenerateThumbnail; //optimize thumbnail generate and store procedure to improve odt saving performance, i120030
- virtual void BeforeLoading( SfxMedium&, const ::rtl::OUString &, const ::rtl::OUString & ){};
- virtual void AfterLoading( SfxMedium&, const ::rtl::OUString &, const ::rtl::OUString & ){};
+
+protected:
+ // methods called in implementation of <ImportFrom(..)>
+ virtual void BeforeLoading( SfxMedium&, const ::rtl::OUString &, const ::rtl::OUString & )
+ {
+ };
+
+ virtual void AfterLoading( SfxMedium&, const ::rtl::OUString &, const ::rtl::OUString & )
+ {
+ };
private:
//#if 0 // _SOLAR__PRIVATE
diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx
index 0af678a5ee18..2bdc403759c7 100644
--- a/sfx2/inc/sfx2/sfxbasemodel.hxx
+++ b/sfx2/inc/sfx2/sfxbasemodel.hxx
@@ -386,7 +386,7 @@ public:
/**___________________________________________________________________________________________________
@short get implementation id
- @descr This ID is neccessary for UNO-caching. If there no ID, cache is disabled.
+ @descr This ID is necessary for UNO-caching. If there no ID, cache is disabled.
Another way, cache is enabled.
@seealso XTypeProvider
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index 2b5e8044a706..801e18e100a7 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -837,6 +837,7 @@
#define SID_OPT_MIDDLE_MOUSE (SID_OPTIONS_START + 97)
#define SID_ATTR_PRETTYPRINTING (SID_OPTIONS_START + 98)
#define SID_HELP_STYLESHEET (SID_OPTIONS_START + 99)
+#define SID_ATTR_ODFENCRYPTION (SID_OPTIONS_START + 100)
// slot IDs from SVX (svxids.hrc) ---------------------------------------------
diff --git a/sfx2/inc/sfx2/titledockwin.hxx b/sfx2/inc/sfx2/titledockwin.hxx
index 0a76023caf36..b12a71ee22a6 100644
--- a/sfx2/inc/sfx2/titledockwin.hxx
+++ b/sfx2/inc/sfx2/titledockwin.hxx
@@ -145,7 +145,7 @@ namespace sfx2
Link m_aEndDockingHdl;
- /** The border that is painted arround the inner window. The bevel
+ /** The border that is painted around the inner window. The bevel
shadow lines are part of the border, so where the border is 0 no
such line is painted.
*/
diff --git a/sfx2/qa/complex/sfx2/DocumentProperties.java b/sfx2/qa/complex/sfx2/DocumentProperties.java
index fde9ccfc1e7f..beda027fb445 100644
--- a/sfx2/qa/complex/sfx2/DocumentProperties.java
+++ b/sfx2/qa/complex/sfx2/DocumentProperties.java
@@ -277,7 +277,7 @@ public class DocumentProperties
xDP.setModificationDate(dt);
assertTrue("setModificationDate",
dt.Year == xDP.getModificationDate().Year);
- str = "i didnt do it";
+ str = "i didn't do it";
xDP.setPrintedBy(str);
assertTrue("setPrintedBy", str.equals(xDP.getPrintedBy()));
dt.Year = 2024;
@@ -338,7 +338,7 @@ public class DocumentProperties
// differently some day...
boolean b = true;
double d = 3.1415;
- // note that Time is only supported for backward compatibilty!
+ // note that Time is only supported for backward compatibility!
Time t = new Time();
t.Hours = 1;
t.Minutes = 16;
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 892dfbb7def6..c7e4b2c8e5bc 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -205,6 +205,16 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
bRet = sal_False;
}
break;
+ case SID_ATTR_ODFENCRYPTION:
+ {
+ bRet = sal_True;
+ if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_USESHA1INODF12) &&
+ !aSaveOptions.IsReadOnly(SvtSaveOptions::E_USEBLOWFISHINODF12))
+ if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_ODFENCRYPTION ),
+ !(aSaveOptions.IsUseSHA1InODF12() && aSaveOptions.IsUseBlowfishInODF12()))))
+ bRet = sal_False;
+ }
+ break;
case SID_ATTR_PRETTYPRINTING:
{
bRet = sal_True;
@@ -563,6 +573,16 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
aSaveOptions.SetBackup( ( (const SfxBoolItem*)pItem )->GetValue() );
}
+ // ODF Encryption
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_ODFENCRYPTION ), sal_True, &pItem ) )
+ {
+ DBG_ASSERT(dynamic_cast< const SfxBoolItem* >(pItem), "BoolItem expected");
+ sal_Bool bItemValue = static_cast< const SfxBoolItem*>(pItem)->GetValue();
+
+ aSaveOptions.SetUseSHA1InODF12( !bItemValue );
+ aSaveOptions.SetUseBlowfishInODF12( !bItemValue );
+ }
+
// PrettyPrinting
if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ), sal_True, &pItem ) )
{
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index f0aa20ecf110..11d1bdcfbbf9 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -172,8 +172,8 @@ void SAL_CALL SfxTerminateListener_Impl::notifyTermination( const EventObject& a
Sequence< ::rtl::OUString > SAL_CALL SfxTerminateListener_Impl::getSupportedServiceNames() throw (RuntimeException)
{
- // Note: That service does not realy exists .-)
- // But this implementation is not thought to be registered realy within our service.rdb.
+ // Note: That service does not really exists .-)
+ // But this implementation is not thought to be registered really within our service.rdb.
// At least we need the implementation name only to identify these service at the global desktop instance.
// The desktop must know, which listener will terminate the SfxApplication in real !
// It must call this special listener as last one ... otherwise we shutdown the SfxApplication BEFORE other listener
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 3cd4e2c11f74..aa18d7ae92e4 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -268,7 +268,7 @@ private:
{
// check the encryption data
// if the data correct is the stream will be opened successfuly
- // and immediatelly closed
+ // and immediately closed
::comphelper::OStorageHelper::SetCommonStorageEncryptionData( mxStorage, rEncryptionData );
mxStorage->openStreamElement(
@@ -552,7 +552,7 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
aReq.AppendItem( SfxFrameItem( SID_DOCFRAME, GetFrame() ) );
aReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii( "_default" ) ) );
- // TODO/LATER: Should the other arguments be transfered as well?
+ // TODO/LATER: Should the other arguments be transferred as well?
SFX_REQUEST_ARG( rReq, pDefaultPathItem, SfxStringItem, SID_DEFAULTFILEPATH);
if ( pDefaultPathItem )
aReq.AppendItem( *pDefaultPathItem );
@@ -762,7 +762,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, sal_False ) );
// This helper wraps an existing (or may new created InteractionHandler)
- // intercept all incoming interactions and provide usefull informations
+ // intercept all incoming interactions and provide useful informations
// later if the following transaction was finished.
::framework::PreventDuplicateInteraction* pHandler = new ::framework::PreventDuplicateInteraction(::comphelper::getProcessServiceFactory());
@@ -1217,7 +1217,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
Reference < XController > xController;
// if ( ( !bIsBlankTarget && pFrame ) || pLinkItem || !rReq.IsSynchronCall() )
// {
- // if a frame is given, it must be used for the starting point of the targetting mechanism
+ // if a frame is given, it must be used for the starting point of the targeting mechanism
// this code is also used if asynchronous loading is possible, because loadComponent always is synchron
if ( !xTargetFrame.is() )
{
@@ -1252,7 +1252,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if( bHidden || pLinkItem || rReq.IsSynchronCall() )
{
// if loading must be done synchron, we must wait for completion to get a return value
- // find frame by myself; I must konw the exact frame to get the controller for the return value from it
+ // find frame by myself; I must know the exact frame to get the controller for the return value from it
//if( aTarget.getLength() )
// xTargetFrame = xTargetFrame->findFrame( aTarget, FrameSearchFlag::ALL );
Reference < XComponent > xComp;
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index c1c5cb4f931b..142e894d1e8c 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -156,7 +156,7 @@ void SfxApplication::Deinitialize()
//TODO/CLEANTUP
//ReleaseArgs could be used instead!
/* This leak is intended !
- Otherwise the TestTool cant use .uno:QuitApp ...
+ Otherwise the TestTool can't use .uno:QuitApp ...
because every destructed ItemSet work's on an already
released pool pointer .-)
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 51b02d0a57ce..4bfb2653a688 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -197,7 +197,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
{
/* Dont save the request for closing the application and try it later
again. This is an UI bound functionality ... and the user will try it again
- if the dialog is closed. But we shouldnt close the application automaticly
+ if the dialog is closed. But we shouldn't close the application automatically
if this dialog is closed by the user ...
So we ignore this request now and wait for a new user decision.
*/
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index aec148d5af50..75505236e0b5 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -827,7 +827,7 @@ void SfxChildWindow::SetFrame( const ::com::sun::star::uno::Reference< ::com::su
pImp->xListener = ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >( new DisposeListener( this, pImp ) );
// Set new frame in data container
- // and build new listener connection, if neccessary.
+ // and build new listener connection, if necessary.
pImp->xFrame = rFrame;
if( pImp->xFrame.is() )
pImp->xFrame->addEventListener( pImp->xListener );
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index c4d8ae6463b4..3fbcaa77cc9a 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -49,6 +49,8 @@
#include <svl/svdde.hxx>
#include <sot/formats.hxx>
+#include <unotools/securityoptions.hxx>
+
#define DDELINK_COLD 0
#define DDELINK_HOT 1
@@ -255,15 +257,23 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
}
#if defined(WNT)
-
- // Server nicht da, starten und nochmal versuchen
- if( !bInWinExec )
+ // check the suitability of starting the DDE server
+ const SvtSecurityOptions aSecOpts;
+ bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE);
+ bForbidden |= (sServer.SearchChar( L":./%\\") != STRING_NOTFOUND);
+ static const char* aBadServers[] = { "cmd", "rundll32" };
+ for( int i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i)
+ bForbidden |= (sServer.CompareIgnoreCaseToAscii( aBadServers[i]) == COMPARE_EQUAL);
+
+ // try to start the DDE server if it is not there already
+ bForbidden |= (bInWinExec != sal_False);
+ if( !bForbidden )
{
ByteString aCmdLine( sServer, RTL_TEXTENCODING_ASCII_US );
aCmdLine.Append( ".exe " );
aCmdLine.Append( ByteString( sTopic, RTL_TEXTENCODING_ASCII_US ) );
- if( WinExec( aCmdLine.GetBuffer(), SW_SHOWMINIMIZED ) < 32 )
+ if( WinExec( aCmdLine.GetBuffer(), SW_SHOWMINIMIZED ) < 32 ) // TODO: use CreateProcess() instead
nError = DDELINK_ERROR_APP;
else
{
diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx
index dabff64d083b..6171362d9afc 100644
--- a/sfx2/source/bastyp/bitset.cxx
+++ b/sfx2/source/bastyp/bitset.cxx
@@ -84,7 +84,7 @@ BitSet BitSet::operator<<( sal_uInt16 nOffset ) const
//--------------------------------------------------------------------
-// substracts nOffset from each bit-value in the set
+// subtracts nOffset from each bit-value in the set
BitSet BitSet::operator>>( sal_uInt16 ) const
{
diff --git a/sfx2/source/bastyp/fltlst.cxx b/sfx2/source/bastyp/fltlst.cxx
index 08e2a699a79b..edf6100a799c 100644
--- a/sfx2/source/bastyp/fltlst.cxx
+++ b/sfx2/source/bastyp/fltlst.cxx
@@ -50,7 +50,7 @@ using namespace ::com::sun::star;
/*-************************************************************************************************************//**
@short ctor
- @descr These initialize an instance of a SfxFilterListener class. Created object listen automaticly
+ @descr These initialize an instance of a SfxFilterListener class. Created object listen automatically
on right FilterFactory-Service for all changes and synchronize right SfxFilterContainer with
corresponding framework-cache.
We use given "sFactory" value to decide which query must be used to fill "pContainer" with new values.
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index 9ead3516cd26..7458376d1186 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -80,7 +80,7 @@ SfxHTMLParser::SfxHTMLParser( SvStream& rStream, sal_Bool bIsNewDoc,
DBG_ASSERT( !IsSwitchToUCS2(),
"SfxHTMLParser::SfxHTMLParser: Switch to UCS2?" );
- // Altough the real default encoding is ISO8859-1, we use MS-1252
+ // Although the real default encoding is ISO8859-1, we use MS-1252
// als default encoding.
SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index 0aa3f183ffaa..5873aa4779e3 100644
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -258,7 +258,7 @@ void PropagateEvent_Impl( SfxObjectShell *pDoc, rtl::OUString aEventName, const
{ DBG_ERRORFILE( "PropagateEvents_Impl: caught NoSuchElementException" ); }
}
else {
- DBG_WARNING( "PropagateEvents_Impl: Got unkown event" );
+ DBG_WARNING( "PropagateEvents_Impl: Got unknown event" );
}
}
}
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 1171521492d3..34e1b8f4676a 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -1413,7 +1413,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle&
aSmallDockingRect.SetPos(rPos);
Rectangle aIntersectRect = aInRect.GetIntersection( aSmallDockingRect );
if ( aIntersectRect == aSmallDockingRect )
- // docking rectangle completely inside (shrinked) inner area -> floating mode
+ // docking rectangle completely inside (shrunk) inner area -> floating mode
bBecomesFloating = sal_True;
}
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index 230ffeb5feed..5c4966dd8bf8 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -1233,7 +1233,7 @@ namespace sfx2
::std::list< FilterGroup >::iterator pIter = aAllFilters.begin();
++pIter;
::std::for_each(
- pIter, // first filter group was handled seperately, see above
+ pIter, // first filter group was handled separately, see above
aAllFilters.end(),
AppendFilterGroup( _rxFilterManager, &_rFileDlgImpl ) );
}
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index c03a4e4a5c79..ac89649318af 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -1404,10 +1404,11 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
//UUUU fallback to 1st page when requested one does not exist
if(!pDataObject && pTabCtrl->GetPageCount())
{
+ OSL_ENSURE(false, "Requested TabPage not found in the TabDialog, fallback to 1st page (!)");
pTabCtrl->SetCurPageId(pTabCtrl->GetPageId(0));
nId = pTabCtrl->GetCurPageId();
pTabPage = dynamic_cast< SfxTabPage* >(pTabCtrl->GetTabPage(nId));
- Data_Impl* pDataObject = Find(*pImpl->pData, nId);
+ pDataObject = Find(*pImpl->pData, nId);
}
DBG_ASSERT( pDataObject, "Id nicht bekannt" );
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 9441d23d2f67..4e2c67b2269d 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -83,7 +83,7 @@
These serve only to track the position in an XML ID list in a document
registry, so that future actions can insert objects at the right position.
Unfortunately, inserting dummy objects seems to be necessary:
- <ul><li>it is not sufficent to just remember the saved id, because then
+ <ul><li>it is not sufficient to just remember the saved id, because then
the relative priorities might change when executing the undo</li>
<li>it is not sufficient to record the position as an integer, because
if we delete a text node and then undo, the node will be copied(!),
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 2b44a05e6cae..708a484306fe 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2533,7 +2533,7 @@ void SfxMedium::UseInteractionHandler( sal_Bool bUse )
::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >
SfxMedium::GetInteractionHandler()
{
- // if interaction isnt allowed explicitly ... return empty reference!
+ // if interaction isn't allowed explicitly ... return empty reference!
if ( !pImp->bUseInteractionHandler )
return ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >();
@@ -2546,7 +2546,7 @@ SfxMedium::GetInteractionHandler()
return xHandler;
}
- // if default interaction isnt allowed explicitly ... return empty reference!
+ // if default interaction isn't allowed explicitly ... return empty reference!
if ( !pImp->bAllowDefaultIntHdl )
return ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >();
@@ -3405,7 +3405,7 @@ sal_Bool SfxMedium::IsReadOnly()
{
sal_Bool bReadOnly = sal_False;
- // a) ReadOnly filter cant produce read/write contents!
+ // a) ReadOnly filter can't produce read/write contents!
bReadOnly = (
(pFilter ) &&
((pFilter->GetFilterFlags() & SFX_FILTER_OPENREADONLY) == SFX_FILTER_OPENREADONLY)
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index a76a3f978d7a..78c0bb85ee8f 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -134,7 +134,7 @@ class DocTempl_EntryData_Impl
{
RegionData_Impl* mpParent;
- // the following member must be SfxObjectShellLock since it controlls that SfxObjectShell lifetime by design
+ // the following member must be SfxObjectShellLock since it controls that SfxObjectShell lifetime by design
// and users of this class expect it to be so.
SfxObjectShellLock mxObjShell;
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index 15f9da8568f1..65e8de41481c 100644
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -420,7 +420,7 @@ ImpPath_Impl::ImpPath_Impl( const ImpPath_Impl& rCopy ) :
Implementierungsklasse; Darstellung einer Position in der Outline-
Listbox als sal_uInt16-Array; dieses beschreibt die Position jeweil
- als relative Postion zum "ubergeordneten Eintrag
+ als relative Position zum "ubergeordneten Eintrag
*/
class Path
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index d8955f55e46c..792d122d71d1 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -356,7 +356,7 @@ sal_Bool GraphicHelper::createThumb_Impl( const GDIMetaFile& rMtf,
const_cast< GDIMetaFile& >( rMtf ).WindStart();
const_cast< GDIMetaFile& >( rMtf ).Play( &aVDev, aBackPosPix, aDrawSize );
- // draw overlay if neccessary
+ // draw overlay if necessary
if ( pOverlay )
aVDev.DrawBitmapEx( aOverlayRect.TopLeft(), aOverlayRect.GetSize(), *pOverlay );
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 01e49b26c58e..052955447deb 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -247,7 +247,7 @@ void SfxObjectShell::UpdateTime_Impl(
util::Duration editDuration(sal_False, 0, 0, 0,
secs/3600, (secs%3600)/60, secs%60, 0);
- // Initialize some local member! Its neccessary for wollow operations!
+ // Initialize some local member! Its necessary for wollow operations!
DateTime aNow ; // Date and time at current moment
Time n24Time (24,0,0,0) ; // Time-value for 24 hours - see follow calculation
sal_uIntPtr nDays = 0 ; // Count of days between now and last editing
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index bdbcaec50132..6bf76f409c63 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -658,8 +658,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
GetMedium()->SetUpdatePickList( sal_True );
// TODO: in future it must be done in followind way
- // if document is opened from GUI it is immediatelly appeares in the picklist
- // if the document is a new one then it appeares in the picklist immediatelly
+ // if document is opened from GUI it is immediately appeares in the picklist
+ // if the document is a new one then it appeares in the picklist immediately
// after SaveAs operation triggered from GUI
}
catch( task::ErrorCodeIOException& aErrorEx )
@@ -1002,7 +1002,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
{
/*
- search for filter cant work correctly ...
+ search for filter can't work correctly ...
Because it's not clear, which export filter for which office module
must be searched. On the other side it can be very expensive doing so.
The best solution would be: on installation time we should know if pdf feature
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 2c9fe1e34fe4..e130de7cf051 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -299,10 +299,10 @@ sal_Bool SfxObjectShell::PutURLContentsToVersionStream_Impl(
uno::Reference< embed::XStorage > xTempStorage =
::comphelper::OStorageHelper::GetStorageFromURL( aTempURL, embed::ElementModes::READWRITE );
- // the password will be transfered from the xStorage to xTempStorage by storage implemetation
+ // the password will be transferred from the xStorage to xTempStorage by storage implemetation
xStorage->copyToStorage( xTempStorage );
- // the temporary storage was commited by the previous method and it will die by refcount
+ // the temporary storage was committed by the previous method and it will die by refcount
}
catch ( uno::Exception& )
{
@@ -1253,9 +1253,9 @@ sal_Bool SfxObjectShell::SaveTo_Impl
// The active storage must be switched. The simple saving is not enough.
// The problem is that the target medium contains target MediaDescriptor.
- // In future the switch of the persistance could be done on stream level:
+ // In future the switch of the persistence could be done on stream level:
// a new wrapper service will be implemented that allows to exchange
- // persistance on the fly. So the real persistance will be set
+ // persistence on the fly. So the real persistence will be set
// to that stream only after successful commit of the storage.
// TODO/LATER:
// create wrapper stream based on the URL
@@ -1264,7 +1264,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
// commit the new storage
// call saveCompleted based with this new storage ( get rid of old storage and "frees" URL )
// commit the wrapper stream ( the stream will connect the URL only on commit, after that it will hold it )
- // if the last step is failed the stream should stay to be transacted and should be commited on any flush
+ // if the last step is failed the stream should stay to be transacted and should be committed on any flush
// so we can forget the stream in any way and the next storage commit will flush it
AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Save: Own to Own" ) ) );
@@ -1629,7 +1629,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
{
pMedium->Close();
- // target medium is still not commited, it should not be closed
+ // target medium is still not committed, it should not be closed
// commit the package storage and close it, but leave the streams open
rMedium.StorageCommit_Impl();
rMedium.CloseStorage();
@@ -2014,7 +2014,7 @@ sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, sal_Bool bCommit )
}
catch( uno::Exception& )
{
- DBG_ERROR( "The strotage was not commited on DoSaveAs!\n" );
+ DBG_ERROR( "The strotage was not committed on DoSaveAs!\n" );
}
}
}
@@ -2938,7 +2938,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl
DBG_ERROR("Salvage item present in Itemset, check the parameters!");
#endif
- // should be unneccessary - too hot to handle!
+ // should be unnecessary - too hot to handle!
pMergedParams->ClearItem( SID_DOC_SALVAGE );
// take over the new merged itemset
@@ -3526,7 +3526,7 @@ sal_Bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed::
}
catch( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Cant check storage consistency!\n" );
+ OSL_ENSURE( sal_False, "Can't check storage consistency!\n" );
}
return sal_True;
diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx
index dac80ffc1ec9..5e73366b37e7 100644
--- a/sfx2/source/doc/objuno.cxx
+++ b/sfx2/source/doc/objuno.cxx
@@ -692,7 +692,7 @@ void SAL_CALL SfxDocumentInfoObject::removeProperty(const ::rtl::OUString& sName
::rtl::OUStringBuffer sMsg(256);
sMsg.appendAscii("The property \"" );
sMsg.append (sName );
- sMsg.appendAscii("\" cant be removed. Its a fix property of the DocumentInfo service.");
+ sMsg.appendAscii("\" can't be removed. Its a fix property of the DocumentInfo service.");
throw ::com::sun::star::beans::NotRemoveableException(
sMsg.makeStringAndClear(),
@@ -721,7 +721,7 @@ void SAL_CALL SfxDocumentInfoObject::setFastPropertyValue(sal_Int32 nHandle, co
lang::WrappedTargetException)
{
// Attention: Only fix properties should be provided by this method.
- // Dynamic properties has no handle in real ... because it cant be used inside multithreaded environments :-)
+ // Dynamic properties has no handle in real ... because it can't be used inside multithreaded environments :-)
::osl::ClearableMutexGuard aGuard( _pImp->_aMutex );
@@ -937,7 +937,7 @@ void SAL_CALL SfxDocumentInfoObject::setFastPropertyValue(sal_Int32 nHandle, co
lang::WrappedTargetException)
{
// Attention: Only fix properties should be provided by this method.
- // Dynamic properties has no handle in real ... because it cant be used inside multithreaded environments :-)
+ // Dynamic properties has no handle in real ... because it can't be used inside multithreaded environments :-)
::osl::MutexGuard aGuard( _pImp->_aMutex );
::com::sun::star::uno::Any aValue;
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 01141e9bb42f..5591e1d224ac 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -494,7 +494,7 @@ SfxObjectShell* SfxObjectShell::GetFirst
{
SfxObjectShellArr_Impl &rDocs = SFX_APP()->GetObjectShells_Impl();
- // seach for a SfxDocument of the specified type
+ // search for a SfxDocument of the specified type
for ( sal_uInt16 nPos = 0; nPos < rDocs.Count(); ++nPos )
{
SfxObjectShell* pSh = rDocs.GetObject( nPos );
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 85e1d7b26f47..b3d02ef689b6 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -484,7 +484,7 @@ class ImplUCBPrintWatcher : public ::osl::Thread
SfxPrinter* m_pPrinter;
/// this describes the target location for the printed temp file
String m_sTargetURL;
- /// it holds the temp file alive, till the print job will finish and remove it from disk automaticly if the object die
+ /// it holds the temp file alive, till the print job will finish and remove it from disk automatically if the object die
::utl::TempFile* m_pTempFile;
public:
@@ -510,11 +510,11 @@ class ImplUCBPrintWatcher : public ::osl::Thread
}
/* } SAFE */
- // lock for further using of our member isn't neccessary - because
+ // lock for further using of our member isn't necessary - because
// we truns alone by defenition. Nobody join for us nor use us ...
ImplUCBPrintWatcher::moveAndDeleteTemp(&m_pTempFile,m_sTargetURL);
- // finishing of this run() method will call onTerminate() automaticly
+ // finishing of this run() method will call onTerminate() automatically
// kill this thread there!
}
@@ -526,7 +526,7 @@ class ImplUCBPrintWatcher : public ::osl::Thread
}
/* static helper to move the temp. file to the target location by using the ucb
- It's static to be useable from outside too. So it's not realy neccessary to start
+ It's static to be useable from outside too. So it's not really necessary to start
the thread, if finishing of the job was detected outside this thread.
But it must be called without using a corresponding thread for the given parameter!
*/
@@ -598,7 +598,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// by executing the slot. Because if it is a ucb relevant URL we must wait for
// finishing the print job and move the temporary local file by using the ucb
// to the right location. But in case of no file name is given or it is already
- // a local one we can supress this special handling. Because then vcl makes all
+ // a local one we can suppress this special handling. Because then vcl makes all
// right for us.
String sUcbUrl;
::utl::TempFile* pUCBPrintTempFile = NULL;
@@ -635,7 +635,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// reasons. Otherwhise we break to much external code ...
// We try to convert it to a file URL. If its possible
// we put the system path to the item set and let vcl work with it.
- // No ucb or thread will be neccessary then. In case it couldnt be
+ // No ucb or thread will be necessary then. In case it couldn't be
// converted its not an URL nor a system path. Then we can't accept
// this parameter and have to throw an exception.
::rtl::OUString sSystemPath(sTemp);
@@ -670,7 +670,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// it's an ucb target. So we must use a temp. file for vcl
// and move it after printing by using the ucb.
// Create a temp file on the heap (because it must delete the
- // real file on disk automaticly if it die - bt we have to share it with
+ // real file on disk automatically if it die - bt we have to share it with
// some other sources ... e.g. the ImplUCBPrintWatcher).
// And we put the name of this temp file to the descriptor instead
// of the URL. The URL we save for later using seperatly.
@@ -763,11 +763,11 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// Ok - may be execution before has finished (or started!) printing.
// And may it was a printing to a file.
- // Now we have to check if we can move the file (if neccessary) via ucb to his right location.
+ // Now we have to check if we can move the file (if necessary) via ucb to his right location.
// Cases:
// a) printing finished => move the file directly and forget the watcher thread
// b) printing is asynchron and runs currently => start watcher thread and exit this method
- // This thread make all neccessary things by itself.
+ // This thread make all necessary things by itself.
if (pUCBPrintTempFile!=NULL)
{
// a)
@@ -778,7 +778,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
else
{
// Note: we create(d) some ressource on the heap. (thread and tep file)
- // They will be delected by the thread automaticly if he finish his run() method.
+ // They will be delected by the thread automatically if he finish his run() method.
ImplUCBPrintWatcher* pWatcher = new ImplUCBPrintWatcher( pPrinter, pUCBPrintTempFile, sUcbUrl );
pWatcher->create();
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 79d648980604..1c6793297a65 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -510,7 +510,7 @@ SfxSaveGuard::~SfxSaveGuard()
// storing at the same time. Further m_bSuicide was set to sal_True only if close(sal_True) was called.
// So the owner ship was delegated to the place where a veto exception was thrown.
// Now we have to call close() again and delegate the owner ship to the next one, which
- // cant accept that. Close(sal_False) cant work in this case. Because then the document will may be never closed ...
+ // can't accept that. Close(sal_False) can't work in this case. Because then the document will may be never closed ...
if ( m_pData->m_bSuicide )
{
@@ -1431,7 +1431,7 @@ void SAL_CALL SfxBaseModel::removeModifyListener(const uno::Reference< XMODIFYLI
void SAL_CALL SfxBaseModel::close( sal_Bool bDeliverOwnership ) throw (util::CloseVetoException, uno::RuntimeException)
{
- static ::rtl::OUString MSG_1 = ::rtl::OUString::createFromAscii("Cant close while saving.");
+ static ::rtl::OUString MSG_1 = ::rtl::OUString::createFromAscii("Can't close while saving.");
::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( impl_isDisposed() || m_pData->m_bClosed || m_pData->m_bClosing )
@@ -1610,7 +1610,8 @@ void SAL_CALL SfxBaseModel::storeSelf( const uno::Sequence< beans::PropertyVa
if ( !aSeqArgs[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VersionComment" ) ) )
&& !aSeqArgs[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Author" ) ) )
&& !aSeqArgs[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ) ) )
- && !aSeqArgs[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StatusIndicator" ) ) ) )
+ && !aSeqArgs[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StatusIndicator" ) ) )
+ && !aSeqArgs[nInd].Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FailOnWarning" ) ) ) )
{
m_pData->m_pObjectShell->AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "unexpected parameter for storeSelf, might be no problem if SaveAs is executed." ) ) );
m_pData->m_pObjectShell->StoreLog();
@@ -2489,7 +2490,7 @@ void SAL_CALL SfxBaseModel::removeDocumentEventListener( const uno::Reference< d
void SAL_CALL SfxBaseModel::notifyDocumentEvent( const ::rtl::OUString&, const uno::Reference< frame::XController2 >&, const uno::Any& )
throw ( lang::IllegalArgumentException, lang::NoSupportException, uno::RuntimeException )
{
- throw lang::NoSupportException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SfxBaseModel controlls all the sent notifications itself!" ) ), uno::Reference< uno::XInterface >() );
+ throw lang::NoSupportException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SfxBaseModel controls all the sent notifications itself!" ) ), uno::Reference< uno::XInterface >() );
}
//________________________________________________________________________________________________________
@@ -2833,7 +2834,7 @@ void SfxBaseModel::impl_store( const ::rtl::OUString& sURL
else
{
// if the password is changed a special error should be used in case of shared document
- throw task::ErrorCodeIOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cant change password for shared document." ) ), uno::Reference< uno::XInterface >(), ERRCODE_SFX_SHARED_NOPASSWORDCHANGE );
+ throw task::ErrorCodeIOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can't change password for shared document." ) ), uno::Reference< uno::XInterface >(), ERRCODE_SFX_SHARED_NOPASSWORDCHANGE );
}
}
}
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index ad94ad1a37fd..3b3d424c2ca9 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -341,20 +341,17 @@ void SfxVirtualMenu::CreateFromSVMenu()
if ( pSVMenu->IsMenuBar() )
{
+ Reference<com::sun::star::lang::XMultiServiceFactory> aXMultiServiceFactory(::comphelper::getProcessServiceFactory());
sal_uInt16 nPos = pSVMenu->GetItemPos( SID_MDIWINDOWLIST );
if ( nPos != MENU_ITEM_NOTFOUND && xFrame.is() )
{
// Retrieve addon popup menus and add them to our menu bar
- Reference< com::sun::star::frame::XModel > xModel;
- Reference< com::sun::star::frame::XController > xController( xFrame->getController(), UNO_QUERY );
- if ( xController.is() )
- xModel = Reference< com::sun::star::frame::XModel >( xController->getModel(), UNO_QUERY );
- framework::AddonMenuManager::MergeAddonPopupMenus( xFrame, xModel, nPos, (MenuBar *)pSVMenu );
+ framework::AddonMenuManager::MergeAddonPopupMenus( xFrame, nPos, (MenuBar *)pSVMenu, aXMultiServiceFactory );
}
// Merge the Add-Ons help menu items into the Office help menu
if ( xFrame.is() )
- framework::AddonMenuManager::MergeAddonHelpMenu( xFrame, (MenuBar *)pSVMenu );
+ framework::AddonMenuManager::MergeAddonHelpMenu( xFrame, (MenuBar *)pSVMenu, aXMultiServiceFactory );
// Set addon menu pointer here to avoid problems. When accessibility is enabled, the whole menu
// is created immediately!
@@ -870,7 +867,7 @@ void SfxVirtualMenu::InsertAddOnsMenuItem( Menu* pMenu )
PopupMenu* pAddonMenu = NULL;
try
{
- pAddonMenu = framework::AddonMenuManager::CreateAddonMenu( xFrame );
+ pAddonMenu = framework::AddonMenuManager::CreateAddonMenu( xFrame, aXMultiServiceFactory );
}
catch ( ::com::sun::star::lang::WrappedTargetException )
{
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 2ce81e7d85f0..60c7636d7b5e 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -642,7 +642,7 @@ void SAL_CALL SfxGlobalEvents_Impl::notifyDocumentEvent( const ::rtl::OUString&
const css::uno::Reference< css::frame::XController2 >& /*_ViewController*/, const css::uno::Any& /*_Supplement*/ )
throw (css::lang::IllegalArgumentException, css::lang::NoSupportException, css::uno::RuntimeException)
{
- // we're a multiplexer only, no chance to generate artifical events here
+ // we're a multiplexer only, no chance to generate artificial events here
throw css::lang::NoSupportException(::rtl::OUString(), *this);
}
@@ -710,7 +710,7 @@ void SAL_CALL SfxGlobalEvents_Impl::insert( const css::uno::Any& aElement )
aElement >>= xDoc;
if (!xDoc.is())
throw css::lang::IllegalArgumentException(
- ::rtl::OUString::createFromAscii("Cant locate at least the model parameter."),
+ ::rtl::OUString::createFromAscii("Can't locate at least the model parameter."),
static_cast< css::container::XSet* >(this),
0);
@@ -747,7 +747,7 @@ void SAL_CALL SfxGlobalEvents_Impl::remove( const css::uno::Any& aElement )
aElement >>= xDoc;
if (!xDoc.is())
throw css::lang::IllegalArgumentException(
- ::rtl::OUString::createFromAscii("Cant locate at least the model parameter."),
+ ::rtl::OUString::createFromAscii("Can't locate at least the model parameter."),
static_cast< css::container::XSet* >(this),
0);
diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index e19e2bd937fd..0795cbc04a92 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -84,7 +84,10 @@ void SidebarDockingWindow::DoDispose (void)
void SidebarDockingWindow::GetFocus()
{
- mpSidebarController->GetFocusManager().GrabFocus();
+ if (mpSidebarController.is())
+ {
+ mpSidebarController->GetFocusManager().GrabFocus();
+ }
}
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index cbbb8113810a..555b43697e45 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -234,7 +234,7 @@ namespace
return sal_False;
// default must be set to true, because some return values
- // cant be checked, but nonetheless indicate "success"!
+ // can't be checked, but nonetheless indicate "success"!
sal_Bool bSuccess = sal_True;
// On the other side some special slots return a boolean state,
@@ -530,7 +530,7 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
if ( !aDescriptor.has( "Referer" ) )
aDescriptor.put( "Referer", ::rtl::OUString() );
- // TODO: is this needed? finally, when loading is successfull, then there should be no need for this item,
+ // TODO: is this needed? finally, when loading is successful, then there should be no need for this item,
// as the document can always obtain its frame. In particular, there might be situations where this frame
// is accessed, but already disposed: Imagine the user loading a document, opening a second view on it, and
// then closing the first view/frame.
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 2a90eaa31805..0cb8ec183c5e 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -247,7 +247,7 @@ void SAL_CALL SfxInPlaceClient_Impl::saveObject()
// and the user didn't request saving the changes
return;
- // the common persistance is supported by objects and links
+ // the common persistence is supported by objects and links
uno::Reference< embed::XCommonEmbedPersist > xPersist( m_xObject, uno::UNO_QUERY );
if ( !xPersist.is() )
throw uno::RuntimeException();
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 2353897ef69d..de33a09ca5a9 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -668,7 +668,7 @@ sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( ::com::
{
::vos::OGuard aGuard( Application::GetSolarMutex() );
- // ignore dublicate calls, which doesnt change anything real
+ // ignore dublicate calls, which doesn't change anything real
if (bSuspend == m_pData->m_bSuspendState)
return sal_True;
@@ -1419,7 +1419,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
if ( !bHasPluginMode && !bHasJumpMark )
{
// Note that this might not be the ideal place here. Restoring view data should, IMO, be the
- // responsibility of the loader, not an implementation detail burried here deep within the controller's
+ // responsibility of the loader, not an implementation detail buried here deep within the controller's
// implementation.
// What I think should be done to replace the below code:
// - change SfxBaseController::restoreViewData to also accept a PropertyValue[] (it currently accepts
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index e0fab5a00629..b3c5351feaf6 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -334,7 +334,7 @@ void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nSt
}
case view::PrintableState_JOB_ABORTED :
{
- // printing not succesful, reset DocInfo
+ // printing not successful, reset DocInfo
uno::Reference<document::XDocumentProperties> xDocProps(mpObjectShell->getDocProperties());
xDocProps->setPrintedBy(m_aLastPrintedBy);
xDocProps->setPrintDate(m_aLastPrinted);
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index f863b7c1bad2..c0d1d30ae397 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -213,7 +213,7 @@ throw ( uno::RuntimeException )
xNotify->removeClipboardListener( xThis );
// Make asynchronous call to avoid locking SolarMutex which is the
- // root for many deadlocks, especially in conjuction with the "Windows"
+ // root for many deadlocks, especially in conjunction with the "Windows"
// based single thread apartment clipboard code!
AsyncExecuteInfo* pInfo = new AsyncExecuteInfo( ASYNCEXECUTE_CMD_DISPOSING, xThis, this );
Application::PostUserEvent( STATIC_LINK( 0, SfxClipboardChangeListener, AsyncExecuteHdl_Impl ), pInfo );
@@ -223,7 +223,7 @@ void SAL_CALL SfxClipboardChangeListener::changedContents( const datatransfer::c
throw ( RuntimeException )
{
// Make asynchronous call to avoid locking SolarMutex which is the
- // root for many deadlocks, especially in conjuction with the "Windows"
+ // root for many deadlocks, especially in conjunction with the "Windows"
// based single thread apartment clipboard code!
uno::Reference< datatransfer::clipboard::XClipboardListener > xThis( static_cast< datatransfer::clipboard::XClipboardListener* >( this ));
AsyncExecuteInfo* pInfo = new AsyncExecuteInfo( ASYNCEXECUTE_CMD_CHANGEDCONTENTS, xThis, this );