summaryrefslogtreecommitdiff
path: root/sw/source/ui/app
diff options
context:
space:
mode:
authorJoren De Cuyper <joren.libreoffice@telenet.be>2013-03-17 14:42:47 +0100
committerTor Lillqvist <tml@iki.fi>2013-03-18 08:21:34 +0000
commite01daa86e757dab289bfa60576ce235b31eba720 (patch)
treede13f2ca4924576fc23db74a669503bc8ad56383 /sw/source/ui/app
parentb1fc129c6b973a65080abe5ea5145b012c05108d (diff)
Comment cleanup and several indentation fixes
Change-Id: Ib3e51969b2d2624e69a2270c5446b7ac1095a2b5 Reviewed-on: https://gerrit.libreoffice.org/2789 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'sw/source/ui/app')
-rw-r--r--sw/source/ui/app/appenv.cxx1
-rw-r--r--sw/source/ui/app/apphdl.cxx21
-rw-r--r--sw/source/ui/app/applab.cxx1
-rw-r--r--sw/source/ui/app/appopt.cxx30
-rw-r--r--sw/source/ui/app/docsh.cxx58
-rw-r--r--sw/source/ui/app/docsh2.cxx30
-rw-r--r--sw/source/ui/app/docshdrw.cxx8
-rw-r--r--sw/source/ui/app/docshini.cxx163
-rw-r--r--sw/source/ui/app/docst.cxx86
-rw-r--r--sw/source/ui/app/docstyle.cxx130
-rw-r--r--sw/source/ui/app/error.src12
-rw-r--r--sw/source/ui/app/mainwn.cxx1
-rw-r--r--sw/source/ui/app/swmodul1.cxx16
-rw-r--r--sw/source/ui/app/swmodule.cxx1
-rw-r--r--sw/source/ui/app/swwait.cxx1
15 files changed, 148 insertions, 411 deletions
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index 3b47034110ec..d0f64ab5dc0d 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -505,5 +505,4 @@ void SwModule::InsertEnv( SfxRequest& rReq )
delete pDlg;
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index 0bbbd3653519..d9b62fc3342c 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -101,14 +101,11 @@
using namespace ::com::sun::star;
-/*--------------------------------------------------------------------
- Description: Slotmaps for the application's methods
- --------------------------------------------------------------------*/
+// Slotmaps for the application's methods
// here are the SlotID's being included
// see Idl-file
-//
#define SwModule
#define ViewSettings
#define PrintSettings
@@ -126,12 +123,7 @@ SFX_IMPL_INTERFACE( SwModule, SfxModule, SW_RES(RID_SW_NAME) )
SW_RES(RID_MODULE_TOOLBOX) );
}
-
-/*--------------------------------------------------------------------
- Description: other states
- --------------------------------------------------------------------*/
-
-
+// other states
void SwModule::StateOther(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
@@ -235,10 +227,8 @@ static SwView* lcl_LoadDoc(SwView* pView, const String& rURL)
return pNewView;
}
-/*--------------------------------------------------------------------
- Description: start field dialog
- --------------------------------------------------------------------*/
+// start field dialog
void NewXForms( SfxRequest& rReq ); // implementation: below
namespace
@@ -651,10 +641,7 @@ void SwModule::ExecOther(SfxRequest& rReq)
}
}
-/*--------------------------------------------------------------------
- Description: Catch notifications
- --------------------------------------------------------------------*/
-
+// Catch notifications
// Catch hint for DocInfo
void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index 7b751486aa95..d840bf84824e 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -401,5 +401,4 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
delete pNewDBMgr;
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx
index eb41720a33fa..d16452fa5f77 100644
--- a/sw/source/ui/app/appopt.cxx
+++ b/sw/source/ui/app/appopt.cxx
@@ -95,9 +95,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
pAppView = 0; // with View, there's nothing to win here
}
- /********************************************************************/
- /* Options/Edit */
- /********************************************************************/
+ // Options/Edit
SfxItemSet* pRet = new SfxItemSet (GetPool(), FN_PARAM_DOCDISP, FN_PARAM_ELEM,
SID_PRINTPREVIEW, SID_PRINTPREVIEW,
SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
@@ -260,9 +258,8 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
SfxBindings *pBindings = pAppView ? &pAppView->GetViewFrame()->GetBindings()
: NULL;
- /*---------------------------------------------------------------------
- Interpret the page Documentview
- -----------------------------------------------------------------------*/
+
+ // Interpret the page Documentview
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, sal_False, &pItem ))
{
const SwDocDisplayItem* pDocDispItem = (const SwDocDisplayItem*)pItem;
@@ -288,10 +285,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
}
}
- /*---------------------------------------------------------------------
- Elements - interpret Item
- -----------------------------------------------------------------------*/
-
+ // Elements - interpret Item
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, sal_False, &pItem ) )
{
const SwElemItem* pElemItem = (const SwElemItem*)pItem;
@@ -343,10 +337,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
}
}
-
- /*------------------------------------------------
- Background only in WebDialog
- --------------------------------------------------*/
+ // Background only in WebDialog
if(SFX_ITEM_SET == rSet.GetItemState(RES_BACKGROUND))
{
const SvxBrushItem& rBrushItem = (const SvxBrushItem&)rSet.Get(
@@ -354,10 +345,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
aViewOpt.SetRetoucheColor( rBrushItem.GetColor() );
}
- /*--------------------------------------------------------------------
- Interpret page Grid Settings
- ----------------------------------------------------------------------*/
-
+ // Interpret page Grid Settings
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, sal_False, &pItem ))
{
const SvxGridItem* pGridItem = (const SvxGridItem*)pItem;
@@ -384,10 +372,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
}
}
- /*--------------------------------------------------------------------
- Interpret Writer Printer Options
- ----------------------------------------------------------------------*/
-
+ // Interpret Writer Printer Options
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, sal_False, &pItem ))
{
SwPrintOptions* pOpt = GetPrtOptions(!bTextDialog);
@@ -576,5 +561,4 @@ SfxTabPage* SwModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxI
return pRet;
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 08492512353c..92f10005545c 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -123,14 +123,9 @@ SFX_IMPL_INTERFACE( SwDocShell, SfxObjectShell, SW_RES(0) )
TYPEINIT2(SwDocShell, SfxObjectShell, SfxListener);
-//-------------------------------------------------------------------------
SFX_IMPL_OBJECTFACTORY(SwDocShell, SvGlobalName(SO3_SW_CLASSID), SFXOBJECTSHELL_STD_NORMAL|SFXOBJECTSHELL_HASMENU, "swriter" )
-/*--------------------------------------------------------------------
- Description: Prepare loading
- --------------------------------------------------------------------*/
-
-
+// Prepare loading
Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
SwCrsrShell *pCrsrShell,
SwPaM* pPaM )
@@ -219,10 +214,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
return pRead;
}
-/*--------------------------------------------------------------------
- Description: Loading
- --------------------------------------------------------------------*/
-
+// Loading
sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::ConvertFrom" );
@@ -279,11 +271,7 @@ sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
return bOk;
}
-/*--------------------------------------------------------------------
- Description: Saving the Default-Format, Stg present
- --------------------------------------------------------------------*/
-
-
+// Saving the Default-Format, Stg present
sal_Bool SwDocShell::Save()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::Save" );
@@ -372,11 +360,7 @@ sal_Bool SwDocShell::Save()
return !IsError( nErr );
}
-/*--------------------------------------------------------------------
- Description: Save using the Defaultformat
- --------------------------------------------------------------------*/
-
-
+// Save using the Defaultformat
sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveAs" );
@@ -504,9 +488,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
return !IsError( nErr );
}
-/*--------------------------------------------------------------------
- Description: Save all Formats
- --------------------------------------------------------------------*/
+// Save all Formats
static SwSrcView* lcl_GetSourceView( SwDocShell* pSh )
{
// are we in SourceView?
@@ -748,16 +730,9 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
return !IsError( nErrno );
}
-/*--------------------------------------------------------------------
- Description: Hands off
- --------------------------------------------------------------------*/
-
-
-/*--------------------------------------------------------------------
- Description: ??? do not yet activate, must deliver TRUE
- --------------------------------------------------------------------*/
-
+// Hands off
+// do not yet activate, must deliver TRUE
sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveCompleted" );
@@ -793,10 +768,7 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
return bRet;
}
-/*--------------------------------------------------------------------
- Description: Draw()-Overload for OLE2 (Sfx)
- --------------------------------------------------------------------*/
-
+// Draw()-Overload for OLE2 (Sfx)
void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
sal_uInt16 nAspect )
{
@@ -1067,11 +1039,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
}
}
-/*--------------------------------------------------------------------
- Description: OLE-Hdls
- --------------------------------------------------------------------*/
-
-
+// OLE-Hdls
IMPL_LINK( SwDocShell, Ole2ModifiedHdl, void *, p )
{
// the Status is handed over from Doc (see doc.cxx)
@@ -1083,11 +1051,7 @@ IMPL_LINK( SwDocShell, Ole2ModifiedHdl, void *, p )
return 0;
}
-/*--------------------------------------------------------------------
- Description: return Pool here, because virtual
- --------------------------------------------------------------------*/
-
-
+// return Pool here, because virtual
SfxStyleSheetBasePool* SwDocShell::GetStyleSheetPool()
{
return mxBasePool.get();
@@ -1333,6 +1297,4 @@ bool SwDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal
return bRes;
}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index b10260b8be47..b454fb304553 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -123,10 +123,7 @@ using ::rtl::OUString;
using namespace ::sfx2;
extern bool FindPhyStyle( SwDoc& , const String& , SfxStyleFamily );
-/*--------------------------------------------------------------------
- Description: create DocInfo (virtual)
- --------------------------------------------------------------------*/
-
+// create DocInfo (virtual)
SfxDocumentInfoDialog* SwDocShell::CreateDocumentInfoDialog(
Window *pParent, const SfxItemSet &rSet)
{
@@ -229,10 +226,7 @@ static void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVB
}
}
-/*--------------------------------------------------------------------
- Description: Notification on DocInfo changes
- --------------------------------------------------------------------*/
-
+// Notification on DocInfo changes
void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if( !pDoc )
@@ -310,10 +304,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
}
-/*--------------------------------------------------------------------
- Description: Notification Close Doc
- --------------------------------------------------------------------*/
-
+// Notification Close Doc
sal_uInt16 SwDocShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
{
sal_uInt16 nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
@@ -334,10 +325,7 @@ sal_uInt16 SwDocShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
return nRet;
}
-/*--------------------------------------------------------------------
- Description: Organizer
- --------------------------------------------------------------------*/
-
+// Organizer
sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
sal_uInt16 nSourceIdx1, // SourcePool: uppermost content level (templates/macros)
sal_uInt16 nSourceIdx2, // Index in the content
@@ -548,10 +536,7 @@ sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
return bRet;
}
-/*--------------------------------------------------------------------
- Description: template Remove
- --------------------------------------------------------------------*/
-
+// template Remove
sal_Bool SwDocShell::Remove(sal_uInt16 nIdx1, // see Insert
sal_uInt16 nIdx2,
sal_uInt16 nIdx3)
@@ -799,7 +784,6 @@ void SwDocShell::Execute(SfxRequest& rReq)
while( pFlt )
{
// --> OD #i117339#
-// if( pFlt && pFlt->IsAllowedAsTemplate() )
if( pFlt && pFlt->IsAllowedAsTemplate() &&
( pFlt->GetUserData() == "CXML" ||
pFlt->GetUserData() == "CXMLV" ) )
@@ -1772,9 +1756,7 @@ sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL,
return nErr;
}
-/*--------------------------------------------------------------------
- Get a client for an embedded object if possible.
- --------------------------------------------------------------------*/
+// Get a client for an embedded object if possible.
SfxInPlaceClient* SwDocShell::GetIPClient( const ::svt::EmbeddedObjectRef& xObjRef )
{
SfxInPlaceClient* pResult = NULL;
diff --git a/sw/source/ui/app/docshdrw.cxx b/sw/source/ui/app/docshdrw.cxx
index 5979c0fa6d7d..c9319cb5579d 100644
--- a/sw/source/ui/app/docshdrw.cxx
+++ b/sw/source/ui/app/docshdrw.cxx
@@ -31,11 +31,7 @@
using namespace ::com::sun::star;
-/*--------------------------------------------------------------------
- Description: Load Document
- --------------------------------------------------------------------*/
-
-
+// Load Document
void SwDocShell::InitDraw()
{
SdrModel *pDrDoc = pDoc->GetDrawModel();
@@ -56,6 +52,4 @@ void SwDocShell::InitDraw()
PutItem( SvxColorListItem( XColorList::GetStdColorList(), SID_COLOR_TABLE ));
}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx
index 55ece7305d4c..108a4b98b60b 100644
--- a/sw/source/ui/app/docshini.cxx
+++ b/sw/source/ui/app/docshini.cxx
@@ -94,13 +94,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
using ::rtl::OUString;
-
-
-/*--------------------------------------------------------------------
- Description: Load Document
- --------------------------------------------------------------------*/
-
-
+// Load Document
sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::InitNew" );
@@ -335,11 +329,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
return bRet;
}
-/*--------------------------------------------------------------------
- Description: Ctor with SfxCreateMode ?????
- --------------------------------------------------------------------*/
-
-
+// Ctor with SfxCreateMode ?????
SwDocShell::SwDocShell( SfxObjectCreateMode eMode ) :
SfxObjectShell ( eMode ),
pDoc(0),
@@ -354,11 +344,7 @@ SwDocShell::SwDocShell( SfxObjectCreateMode eMode ) :
Init_Impl();
}
-/*--------------------------------------------------------------------
- Description: Ctor / Dtor
- --------------------------------------------------------------------*/
-
-
+// Ctor / Dtor
SwDocShell::SwDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
SfxObjectShell ( i_nSfxCreationFlags ),
pDoc(0),
@@ -373,11 +359,7 @@ SwDocShell::SwDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
Init_Impl();
}
-/*--------------------------------------------------------------------
- Description: Ctor / Dtor
- --------------------------------------------------------------------*/
-
-
+// Ctor / Dtor
SwDocShell::SwDocShell( SwDoc *pD, SfxObjectCreateMode eMode ):
SfxObjectShell ( eMode ),
pDoc(pD),
@@ -392,12 +374,8 @@ SwDocShell::SwDocShell( SwDoc *pD, SfxObjectCreateMode eMode ):
Init_Impl();
}
-/*--------------------------------------------------------------------
- Description: Dtor
- --------------------------------------------------------------------*/
-
-
- SwDocShell::~SwDocShell()
+// Dtor
+SwDocShell::~SwDocShell()
{
// disable chart related objects now because in ~SwDoc it may be to late for this
if( pDoc )
@@ -431,11 +409,8 @@ void SwDocShell::Init_Impl()
// set map unit to twip
SetMapUnit( MAP_TWIP );
}
-/*--------------------------------------------------------------------
- Description: AddLink
- --------------------------------------------------------------------*/
-
+// AddLink
void SwDocShell::AddLink()
{
if( !pDoc )
@@ -457,11 +432,7 @@ void SwDocShell::AddLink()
pDoc->SetOle2Link(LINK(this, SwDocShell, Ole2ModifiedHdl));
}
-/*--------------------------------------------------------------------
- Description: create new FontList Change Printer
- --------------------------------------------------------------------*/
-
-
+// create new FontList Change Printer
void SwDocShell::UpdateFontList()
{
if(!bInUpdateFontList)
@@ -478,11 +449,7 @@ void SwDocShell::UpdateFontList()
}
}
-/*--------------------------------------------------------------------
- Description: RemoveLink
- --------------------------------------------------------------------*/
-
-
+// RemoveLink
void SwDocShell::RemoveLink()
{
// disconnect Uno-Object
@@ -517,11 +484,7 @@ void SwDocShell::ReactivateModel()
((SwXTextDocument*)xDoc.get())->Reactivate(this);
}
-/*--------------------------------------------------------------------
- Description: Load, Default-Format
- --------------------------------------------------------------------*/
-
-
+// Load, Default-Format
sal_Bool SwDocShell::Load( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::Load" );
@@ -536,74 +499,72 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium )
// Loading
// for MD
- OSL_ENSURE( !mxBasePool.is(), "who hasn't destroyed their Pool?" );
- mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
- if(GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
- {
- SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
- nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
- }
+ OSL_ENSURE( !mxBasePool.is(), "who hasn't destroyed their Pool?" );
+ mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
+ if(GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
+ {
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
+ nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
+ }
SwWait aWait( *this, sal_True );
sal_uInt32 nErr = ERR_SWG_READ_ERROR;
switch( GetCreateMode() )
{
-
- case SFX_CREATE_MODE_ORGANIZER:
- {
- if( ReadXML )
+ case SFX_CREATE_MODE_ORGANIZER:
{
- ReadXML->SetOrganizerMode( sal_True );
- SwReader aRdr( rMedium, aEmptyStr, pDoc );
- nErr = aRdr.Read( *ReadXML );
- ReadXML->SetOrganizerMode( sal_False );
+ if( ReadXML )
+ {
+ ReadXML->SetOrganizerMode( sal_True );
+ SwReader aRdr( rMedium, aEmptyStr, pDoc );
+ nErr = aRdr.Read( *ReadXML );
+ ReadXML->SetOrganizerMode( sal_False );
+ }
}
- }
- break;
+ break;
- case SFX_CREATE_MODE_INTERNAL:
- case SFX_CREATE_MODE_EMBEDDED:
- {
- // for MWERKS (Mac-Compiler): can't cast autonomously
- SwTransferable::InitOle( this, *pDoc );
- }
- // suppress SfxProgress, when we are Embedded
- SW_MOD()->SetEmbeddedLoadSave( sal_True );
- // no break;
+ case SFX_CREATE_MODE_INTERNAL:
+ case SFX_CREATE_MODE_EMBEDDED:
+ {
+ // for MWERKS (Mac-Compiler): can't cast autonomously
+ SwTransferable::InitOle( this, *pDoc );
+ }
+ // suppress SfxProgress, when we are Embedded
+ SW_MOD()->SetEmbeddedLoadSave( sal_True );
+ // no break;
- case SFX_CREATE_MODE_STANDARD:
- case SFX_CREATE_MODE_PREVIEW:
- {
- Reader *pReader = ReadXML;
- if( pReader )
+ case SFX_CREATE_MODE_STANDARD:
+ case SFX_CREATE_MODE_PREVIEW:
{
- // set Doc's DocInfo at DocShell-Medium
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "before ReadDocInfo" );
- SwReader aRdr( rMedium, aEmptyStr, pDoc );
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "before Read" );
- nErr = aRdr.Read( *pReader );
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "after Read" );
-
- // If a XML document is loaded, the global doc/web doc
- // flags have to be set, because they aren't loaded
- // by this formats.
- if( ISA( SwWebDocShell ) )
- {
- if( !pDoc->get(IDocumentSettingAccess::HTML_MODE) )
- pDoc->set(IDocumentSettingAccess::HTML_MODE, true);
- }
- if( ISA( SwGlobalDocShell ) )
+ Reader *pReader = ReadXML;
+ if( pReader )
{
- if( !pDoc->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- pDoc->set(IDocumentSettingAccess::GLOBAL_DOCUMENT, true);
+ // set Doc's DocInfo at DocShell-Medium
+ RTL_LOGFILE_CONTEXT_TRACE( aLog, "before ReadDocInfo" );
+ SwReader aRdr( rMedium, aEmptyStr, pDoc );
+ RTL_LOGFILE_CONTEXT_TRACE( aLog, "before Read" );
+ nErr = aRdr.Read( *pReader );
+ RTL_LOGFILE_CONTEXT_TRACE( aLog, "after Read" );
+
+ // If a XML document is loaded, the global doc/web doc
+ // flags have to be set, because they aren't loaded
+ // by this formats.
+ if( ISA( SwWebDocShell ) )
+ {
+ if( !pDoc->get(IDocumentSettingAccess::HTML_MODE) )
+ pDoc->set(IDocumentSettingAccess::HTML_MODE, true);
+ }
+ if( ISA( SwGlobalDocShell ) )
+ {
+ if( !pDoc->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
+ pDoc->set(IDocumentSettingAccess::GLOBAL_DOCUMENT, true);
+ }
}
}
- }
- break;
-
- default:
- OSL_ENSURE( !this, "Load: new CreateMode?" );
+ break;
+ default:
+ OSL_ENSURE( !this, "Load: new CreateMode?" );
}
UpdateFontList();
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index d158bb9f282f..a769e3a4d52f 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -253,12 +253,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
}
}
-
-/*--------------------------------------------------------------------
- Description: evaluate StyleSheet-Requests
- --------------------------------------------------------------------*/
-
-
+// evaluate StyleSheet-Requests
void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
{
sal_uInt16 nSlot = rReq.GetSlot();
@@ -599,7 +594,7 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl)
m_xBasePool->Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *m_xTmp.get() ) );
pDoc->SetModified();
- if( !m_bModified ) // Bug 57028
+ if( !m_bModified )
{
pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
}
@@ -609,11 +604,7 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl)
return m_nRet;
}
-/*--------------------------------------------------------------------
- Description: Edit
- --------------------------------------------------------------------*/
-
-
+// Edit
sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uInt16 nFamily, sal_uInt16 nMask,
sal_Bool bNew, sal_uInt16 nPageId, SwWrtShell* pActShell,
sal_Bool bBasic )
@@ -846,11 +837,7 @@ sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uIn
return nRet;
}
-/*--------------------------------------------------------------------
- Description: Delete
- --------------------------------------------------------------------*/
-
-
+// Delete
sal_uInt16 SwDocShell::Delete(const String &rName, sal_uInt16 nFamily)
{
SfxStyleSheetBase *pStyle = mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
@@ -886,11 +873,7 @@ sal_uInt16 SwDocShell::Hide(const String &rName, sal_uInt16 nFamily, bool bHidde
return sal_False;
}
-/*--------------------------------------------------------------------
- Description: apply template
- --------------------------------------------------------------------*/
-
-
+// apply template
sal_uInt16 SwDocShell::ApplyStyles(const String &rName, sal_uInt16 nFamily,
SwWrtShell* pShell, sal_uInt16 nMode )
{
@@ -953,12 +936,7 @@ sal_uInt16 SwDocShell::ApplyStyles(const String &rName, sal_uInt16 nFamily,
return nFamily;
}
-/*--------------------------------------------------------------------
- Description: start watering-can
- --------------------------------------------------------------------*/
-
-
-
+// start watering-can
sal_uInt16 SwDocShell::DoWaterCan(const String &rName, sal_uInt16 nFamily)
{
OSL_ENSURE(GetWrtShell(), "No Shell, no Styles");
@@ -1012,11 +990,7 @@ sal_uInt16 SwDocShell::DoWaterCan(const String &rName, sal_uInt16 nFamily)
return nFamily;
}
-/*--------------------------------------------------------------------
- Description: update template
- --------------------------------------------------------------------*/
-
-
+// update template
sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell)
{
SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell();
@@ -1077,7 +1051,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWr
{
pCurrWrtShell->StartAllAction();
pCurrWrtShell->FillByEx(pChar);
- // also apply template to remove hard set attributes
+ // also apply template to remove hard set attributes
pCurrWrtShell->EndAllAction();
}
@@ -1101,11 +1075,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWr
return nFamily;
}
-/*--------------------------------------------------------------------
- Description: NewByExample
- --------------------------------------------------------------------*/
-
-
+// NewByExample
sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily,
sal_uInt16 nMask, SwWrtShell* pShell )
{
@@ -1141,24 +1111,24 @@ sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily,
sal_uInt16 nId = pColl->GetPoolFmtId() & 0x87ff;
switch( nMask & 0x0fff )
{
- case SWSTYLEBIT_TEXT:
- nId |= COLL_TEXT_BITS;
- break;
- case SWSTYLEBIT_CHAPTER:
- nId |= COLL_DOC_BITS;
- break;
- case SWSTYLEBIT_LIST:
- nId |= COLL_LISTS_BITS;
- break;
- case SWSTYLEBIT_IDX:
- nId |= COLL_REGISTER_BITS;
- break;
- case SWSTYLEBIT_EXTRA:
- nId |= COLL_EXTRA_BITS;
- break;
- case SWSTYLEBIT_HTML:
- nId |= COLL_HTML_BITS;
- break;
+ case SWSTYLEBIT_TEXT:
+ nId |= COLL_TEXT_BITS;
+ break;
+ case SWSTYLEBIT_CHAPTER:
+ nId |= COLL_DOC_BITS;
+ break;
+ case SWSTYLEBIT_LIST:
+ nId |= COLL_LISTS_BITS;
+ break;
+ case SWSTYLEBIT_IDX:
+ nId |= COLL_REGISTER_BITS;
+ break;
+ case SWSTYLEBIT_EXTRA:
+ nId |= COLL_EXTRA_BITS;
+ break;
+ case SWSTYLEBIT_HTML:
+ nId |= COLL_HTML_BITS;
+ break;
}
pColl->SetPoolFmtId(nId);
@@ -1318,6 +1288,4 @@ Bitmap SwDocShell::GetStyleFamilyBitmap( SfxStyleFamily eFamily )
return SfxObjectShell::GetStyleFamilyBitmap( eFamily );
}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index a2c124e51485..dc36e110d3d2 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -104,11 +104,8 @@ SwImplShellAction::~SwImplShellAction()
}
}
-/*--------------------------------------------------------------------
- Description: find/create SwCharFormate
- possibly fill Style
- --------------------------------------------------------------------*/
-
+// find/create SwCharFormate
+// possibly fill Style
static SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
@@ -149,12 +146,8 @@ static SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
return pFmt;
}
-
-/*--------------------------------------------------------------------
- Description: find/create ParaFormats
- fill Style
- --------------------------------------------------------------------*/
-
+// find/create ParaFormats
+// fill Style
static SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
@@ -192,12 +185,7 @@ static SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
return pColl;
}
-
-/*--------------------------------------------------------------------
- Description: Border formats
- --------------------------------------------------------------------*/
-
-
+// Border formats
static SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
@@ -231,11 +219,7 @@ static SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
return pFmt;
}
-/*--------------------------------------------------------------------
- Description: Page descriptors
- --------------------------------------------------------------------*/
-
-
+// Page descriptors
static const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
@@ -344,12 +328,7 @@ bool FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam )
return false;
}
-
-/*--------------------------------------------------------------------
- Description: Add Strings to the list of templates
- --------------------------------------------------------------------*/
-
-
+// Add Strings to the list of templates
void SwPoolFmtList::Append( char cChar, const String& rStr )
{
String aStr = rtl::OUString(cChar);
@@ -360,21 +339,14 @@ void SwPoolFmtList::Append( char cChar, const String& rStr )
push_back(aStr);
}
-/*--------------------------------------------------------------------
- Description: Erase the list completely
- --------------------------------------------------------------------*/
-
-
+// Erase the list completely
void SwPoolFmtList::Erase()
{
clear();
}
-/*--------------------------------------------------------------------
- Description: UI-sided implementation of StyleSheets
- uses the Core-Engine
- --------------------------------------------------------------------*/
-
+// UI-sided implementation of StyleSheets
+// uses the Core-Engine
SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
const String& rName,
SwDocStyleSheetPool* _rPool,
@@ -433,11 +405,7 @@ SwDocStyleSheet::SwDocStyleSheet( const SwDocStyleSheet& rOrg) :
{
}
-/*--------------------------------------------------------------------
- Description: Reset
- --------------------------------------------------------------------*/
-
-
+// Reset
void SwDocStyleSheet::Reset()
{
aName.Erase();
@@ -446,10 +414,7 @@ void SwDocStyleSheet::Reset()
SetPhysical(sal_False);
}
-/*--------------------------------------------------------------------
- Description: virtual methods
- --------------------------------------------------------------------*/
-
+// virtual methods
void SwDocStyleSheet::SetHidden( sal_Bool bValue )
{
bool bChg = false;
@@ -608,11 +573,7 @@ const String& SwDocStyleSheet::GetParent() const
return aParent;
}
-/*--------------------------------------------------------------------
- Description: Follower
- --------------------------------------------------------------------*/
-
-
+// Follower
const String& SwDocStyleSheet::GetFollow() const
{
if( !bPhysical )
@@ -623,11 +584,7 @@ const String& SwDocStyleSheet::GetFollow() const
return aFollow;
}
-/*--------------------------------------------------------------------
- Description: What Linkage is possible
- --------------------------------------------------------------------*/
-
-
+// What Linkage is possible
bool SwDocStyleSheet::HasFollowSupport() const
{
switch(nFamily)
@@ -643,11 +600,7 @@ bool SwDocStyleSheet::HasFollowSupport() const
return false;
}
-/*--------------------------------------------------------------------
- Description: Parent ?
- --------------------------------------------------------------------*/
-
-
+// Parent ?
bool SwDocStyleSheet::HasParentSupport() const
{
bool bRet = false;
@@ -675,9 +628,7 @@ bool SwDocStyleSheet::HasClearParentSupport() const
return bRet;
}
-/*--------------------------------------------------------------------
- Description: determine textual description
- --------------------------------------------------------------------*/
+// determine textual description
String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
{
IntlWrapper aIntlWrapper( SvtSysLocale().GetLanguageTag() );
@@ -849,11 +800,7 @@ String SwDocStyleSheet::GetDescription()
return GetDescription(SFX_MAPUNIT_CM);
}
-/*--------------------------------------------------------------------
- Description: Set names
- --------------------------------------------------------------------*/
-
-
+// Set names
bool SwDocStyleSheet::SetName( const String& rStr)
{
if( !rStr.Len() )
@@ -974,11 +921,7 @@ bool SwDocStyleSheet::SetName( const String& rStr)
return true;
}
-/*--------------------------------------------------------------------
- Description: hierarchy of deduction
- --------------------------------------------------------------------*/
-
-
+// hierarchy of deduction
bool SwDocStyleSheet::SetParent( const String& rStr)
{
SwFmt* pFmt = 0, *pParent = 0;
@@ -1029,11 +972,7 @@ bool SwDocStyleSheet::SetParent( const String& rStr)
return bRet;
}
-/*--------------------------------------------------------------------
- Description: Set Follower
- --------------------------------------------------------------------*/
-
-
+// Set Follower
bool SwDocStyleSheet::SetFollow( const String& rStr)
{
if( rStr.Len() && !SfxStyleSheetBase::SetFollow( rStr ))
@@ -1086,10 +1025,7 @@ bool SwDocStyleSheet::SetFollow( const String& rStr)
return true;
}
-/*--------------------------------------------------------------------
- Description: extract ItemSet to Name and Family, Mask
- --------------------------------------------------------------------*/
-
+// extract ItemSet to Name and Family, Mask
SfxItemSet& SwDocStyleSheet::GetItemSet()
{
if(!bPhysical)
@@ -1602,10 +1538,7 @@ static void lcl_DeleteInfoStyles( sal_uInt16 nFamily, std::vector<void*>& rArr,
}
}
-/*--------------------------------------------------------------------
- Description: determine the format
- --------------------------------------------------------------------*/
-
+// determine the format
sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
{
sal_Bool bRet = sal_False;
@@ -1791,11 +1724,7 @@ sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
return bRet;
}
-/*--------------------------------------------------------------------
- Description: Create new format in Core
- --------------------------------------------------------------------*/
-
-
+// Create new format in Core
void SwDocStyleSheet::Create()
{
switch(nFamily)
@@ -1914,11 +1843,7 @@ void SwDocStyleSheet::PresetNameAndFamily(const String& rName)
aName.Erase( 0, 1 );
}
-/*--------------------------------------------------------------------
- Description: Is the format physically present yet
- --------------------------------------------------------------------*/
-
-
+// Is the format physically present yet
void SwDocStyleSheet::SetPhysical(sal_Bool bPhys)
{
bPhysical = bPhys;
@@ -2101,10 +2026,7 @@ void SwDocStyleSheet::SetHelpId( const OUString& r, sal_uLong nId )
}
}
-/*--------------------------------------------------------------------
- Description: methods for DocStyleSheetPool
- --------------------------------------------------------------------*/
-
+// methods for DocStyleSheetPool
SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, sal_Bool bOrg )
: SfxStyleSheetBasePool( rDocument.GetAttrPool() )
, mxStyleSheet( new SwDocStyleSheet( rDocument, aEmptyStr, this, SFX_STYLE_FAMILY_CHAR, 0 ) )
@@ -2325,7 +2247,6 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
}
-
bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
const String &rStyle, const String &rParent )
{
@@ -2563,7 +2484,6 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
}
// PoolFormate
- //
if( bAll )
{
if( !rDoc.get(IDocumentSettingAccess::HTML_MODE) )
@@ -2778,7 +2698,6 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
}
// PoolFormate
- //
if ( bAll )
AppendStyleList(SwStyleNameMapper::GetFrmFmtUINameArray(),
bIsSearchUsed, bSearchHidden, bOnlyHidden, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, cFRAME);
@@ -2966,5 +2885,4 @@ void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint )
}
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/error.src b/sw/source/ui/app/error.src
index cb22c8169438..b2a2433de078 100644
--- a/sw/source/ui/app/error.src
+++ b/sw/source/ui/app/error.src
@@ -24,10 +24,6 @@
#include "swerror.h"
#include "comcore.hrc" // MS: Why are there resources at the Core-Side now
-/*--------------------------------------------------------------------
- Description: Strings
- --------------------------------------------------------------------*/
-
String STR_COMCORE_READERROR
{
Text [ en-US ] = "Read-Error" ;
@@ -36,9 +32,8 @@ String STR_COMCORE_CANT_SHOW
{
Text [ en-US ] = "Graphic cannot be displayed." ;
};
-/*--------------------------------------------------------------------
- Description: Boxes
- --------------------------------------------------------------------*/
+
+
InfoBox ERR_CLPBRD_WRITE
{
Message [ en-US ] = "Error while copying to the clipboard." ;
@@ -145,7 +140,8 @@ Resource RID_SW_ERRHDL
{
Text [ en-US ] = "The structure of a linked table cannot be modified." ;
};
- // -------------------- Warnings -----------------------------------
+
+
String WARN_CODE ( ERRCODE_CLASS_READ , WARN_SWG_NO_DRAWINGS )
{
Text [ en-US ] = "No drawings could be read." ;
diff --git a/sw/source/ui/app/mainwn.cxx b/sw/source/ui/app/mainwn.cxx
index 2a5385b83beb..304862f8da62 100644
--- a/sw/source/ui/app/mainwn.cxx
+++ b/sw/source/ui/app/mainwn.cxx
@@ -143,5 +143,4 @@ void RescheduleProgress( SwDocShell *pDocShell )
}
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index fba5f71cfb71..024aafd614d0 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -139,11 +139,7 @@ SwView* SwModule::GetNextView(SwView* pView)
return pNView;
}
-/*------------------------------------------------------------------------
- Description: New Master for the settings is set; this affects the
- current view and all following.
-------------------------------------------------------------------------*/
-
+// New Master for the settings is set; this affects the current view and all following.
void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
sal_uInt16 nDest )
{
@@ -283,10 +279,7 @@ void SwModule::ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_Bo
}
}
-/*-------------------------------------------------
-set the usrpref 's char unit attribute and set ruler
-'s unit as char if the "apply char unit" is checked
---------------------------------------------------*/
+//set the usrpref 's char unit attribute and set rulers unit as char if the "apply char unit" is checked
void SwModule::ApplyUserCharUnit(sal_Bool bApplyChar, sal_Bool bWeb)
{
SwMasterUsrPref* pPref;
@@ -521,10 +514,7 @@ void SwModule::GetDeletedAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet)
lcl_FillAuthorAttr(nAuthor, rSet, pModuleConfig->GetDeletedAuthorAttr());
}
-/*--------------------------------------------------------------------
- Description: For future extension:
- --------------------------------------------------------------------*/
-
+// For future extension:
void SwModule::GetFormatAuthorAttr( sal_uInt16 nAuthor, SfxItemSet &rSet )
{
lcl_FillAuthorAttr( nAuthor, rSet, pModuleConfig->GetFormatAuthorAttr() );
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index 8d2c6266a874..074d23cab9f2 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -431,5 +431,4 @@ void SwModule::RemoveAttrPool()
SfxItemPool::Free(pAttrPool);
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/swwait.cxx b/sw/source/ui/app/swwait.cxx
index f938ae8ee23e..377353ca0950 100644
--- a/sw/source/ui/app/swwait.cxx
+++ b/sw/source/ui/app/swwait.cxx
@@ -60,5 +60,4 @@ SwWait::~SwWait()
rDoc.LeaveWait( bLock );
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */