This is an automated email from the ASF dual-hosted git repository. mseidel pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push: new 01cec6d620 Fixed typos, cleanup 01cec6d620 is described below commit 01cec6d620143fc02deecf66cdb0013880d92ac2 Author: mseidel <msei...@apache.org> AuthorDate: Tue Mar 4 16:21:57 2025 +0100 Fixed typos, cleanup --- main/framework/inc/macros/debug/mutex.hxx | 20 ++-- main/framework/inc/macros/debug/registration.hxx | 14 +-- main/registry/inc/registry/reflwrit.hxx | 78 +++++++------- main/sal/inc/rtl/locale.h | 18 ++-- main/starmath/source/toolbox.src | 5 +- main/sw/source/ui/uiview/view2.cxx | 114 ++++++++++----------- main/vbahelper/source/msforms/vbacombobox.cxx | 101 +++++++++--------- .../tools/standalone/mscsfit/signer.cxx | 82 +++++++-------- 8 files changed, 213 insertions(+), 219 deletions(-) diff --git a/main/framework/inc/macros/debug/mutex.hxx b/main/framework/inc/macros/debug/mutex.hxx index 1cf839babe..3336244c72 100644 --- a/main/framework/inc/macros/debug/mutex.hxx +++ b/main/framework/inc/macros/debug/mutex.hxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,20 +7,18 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - #ifndef __FRAMEWORK_MACROS_DEBUG_MUTEX_HXX_ #define __FRAMEWORK_MACROS_DEBUG_MUTEX_HXX_ @@ -45,13 +43,13 @@ _____________________________________________________________________________________________________________*/ #ifndef LOGFILE_MUTEX - #define LOGFILE_MUTEX "mutex.log" + #define LOGFILE_MUTEX "mutex.log" #endif /*_____________________________________________________________________________________________________________ - LOG_LOCKTYPE( _EFALLBACK, _ECURRENT ) + LOG_LOCKTYPE( _EFALLBACK, _ECURRENT ) - Write informations about current set lock type for whole framework project to special file. + Write information about current set lock type for whole framework project to special file. _____________________________________________________________________________________________________________*/ #define LOG_LOCKTYPE( _EFALLBACK, _ECURRENT ) \ @@ -97,12 +95,12 @@ #else // #ifdef ENABLE_MUTEXDEBUG /*_____________________________________________________________________________________________________________ - If right testmode is'nt set - implements these macro with normal functionality! + If right testmode isn't set - implements these macro with normal functionality! We need the guard but not the log mechanism. _____________________________________________________________________________________________________________*/ #undef LOGFILE_MUTEX - #define LOG_LOCKTYPE( _EFALLBACK, _ECURRENT ) + #define LOG_LOCKTYPE( _EFALLBACK, _ECURRENT ) #endif // #ifdef ENABLE_MUTEXDEBUG diff --git a/main/framework/inc/macros/debug/registration.hxx b/main/framework/inc/macros/debug/registration.hxx index bfca6bf591..b019089ae6 100644 --- a/main/framework/inc/macros/debug/registration.hxx +++ b/main/framework/inc/macros/debug/registration.hxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,20 +7,18 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - #ifndef __FRAMEWORK_MACROS_DEBUG_REGISTRATION_HXX_ #define __FRAMEWORK_MACROS_DEBUG_REGISTRATION_HXX_ @@ -60,7 +58,7 @@ #else // #ifdef ENABLE_REGISTRATIONDEBUG /*_____________________________________________________________________________________________________________ - If right testmode is'nt set - implements these macro empty! + If right testmode isn't set - implements these macro empty! _____________________________________________________________________________________________________________*/ #undef LOGFILE_REGISTRATION @@ -73,3 +71,5 @@ //***************************************************************************************************************** #endif // #ifndef __FRAMEWORK_MACROS_DEBUG_REGISTRATION_HXX_ + + diff --git a/main/registry/inc/registry/reflwrit.hxx b/main/registry/inc/registry/reflwrit.hxx index f98fa08f37..b5b1f524c0 100644 --- a/main/registry/inc/registry/reflwrit.hxx +++ b/main/registry/inc/registry/reflwrit.hxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,20 +7,18 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - #ifndef _REGISTRY_REFLWRIT_HXX_ #define _REGISTRY_REFLWRIT_HXX_ @@ -29,13 +27,11 @@ #include "registry/registrydllapi.h" #include <rtl/ustring.hxx> -/// Implememetation handle +// Implememetation handle typedef void* TypeWriterImpl; /**************************************************************************** - C-Api - *****************************************************************************/ #ifdef __cplusplus @@ -43,7 +39,7 @@ extern "C" { #endif /** specifies a collection of function pointers which represents the complete registry type writer C-API. - + This funtions pointers are used by the C++ wrapper to call the C-API. */ struct RegistryTypeWriter_Api @@ -86,15 +82,15 @@ class RegistryTypeWriter public: /** Constructor. - + @param RTTypeClass specifies the type of the new blob. @param typeName specifies the full qualified type name with '/' as separator. @param superTypeName specifies the full qualified type name of the base type with '/' as separator. - @param fieldCount specifies the number of fields (eg. number of attrbutes/properties, + @param fieldCount specifies the number of fields (e.g. number of attributes/properties, enum values or constants). @param methodCount specifies the number of methods. - @param referenceCount specifies the number of references (eg. number of supported interfaces, + @param referenceCount specifies the number of references (e.g. number of supported interfaces, exported services ...) */ inline RegistryTypeWriter(RTTypeClass RTTypeClass, @@ -104,36 +100,36 @@ public: sal_uInt16 methodCount, sal_uInt16 referenceCount); - /// Copy constructcor + // Copy constructcor inline RegistryTypeWriter(const RegistryTypeWriter& toCopy); /** Destructor. The Destructor frees the internal data block. The pointer (returned by getBlop) will be set to NULL. - */ + */ inline ~RegistryTypeWriter(); - /// Assign operator + // Assign operator inline RegistryTypeWriter& operator == (const RegistryTypeWriter& toAssign); /** @deprecated sets the unique identifier for an interface type. An earlier version of UNO used an unique identifier for interfaces. In the - current version of UNO this uik was eliminated and this function is + current version of UNO this uik was eliminated and this function is not longer used. - */ + */ inline void setUik(const RTUik& uik); /** sets a documentation string for the type. This documentation should be the same as the documentation which is provided for this type in IDL. - */ + */ inline void setDoku(const ::rtl::OUString& doku); /** sets the IDL filename where this type is defined. - */ + */ inline void setFileName(const ::rtl::OUString& fileName); /** sets the data for a field member of a type blob. @@ -146,8 +142,8 @@ public: @param access specifies the access mode of the field. @param constValue specifies the value of the field. The value is only interesting for enum values or constants. - */ - inline void setFieldData( sal_uInt16 index, + */ + inline void setFieldData( sal_uInt16 index, const ::rtl::OUString& name, const ::rtl::OUString& typeName, const ::rtl::OUString& doku, @@ -164,7 +160,7 @@ public: @param paramCount specifies the number of parameters. @param excCount specifies the number of exceptions. @param doku specifies the documentation string of the field. - */ + */ inline void setMethodData(sal_uInt16 index, const ::rtl::OUString& name, const ::rtl::OUString& returnTypeName, @@ -180,7 +176,7 @@ public: @param type specifies the full qualified typename. @param name specifies the name. @param mode specifies the parameter mode. - */ + */ inline void setParamData(sal_uInt16 index, sal_uInt16 paramIndex, const ::rtl::OUString& type, @@ -188,11 +184,11 @@ public: RTParamMode mode); /** sets the data for the specified exception of a method. - + @param index indicates the index of the method. @param excIndex specifies the index of the exception. @param type specifies the full qualified typename of the exception. - */ + */ inline void setExcData(sal_uInt16 index, sal_uInt16 excIndex, const ::rtl::OUString& type); @@ -201,22 +197,22 @@ public: The pointer will be invalid (NULL) if the instance of the RegistryTypeWriter will be destroyed. - */ + */ inline const sal_uInt8* getBlop(); /** returns the size of the new type blob in bytes. - */ + */ inline sal_uInt32 getBlopSize(); /** sets the data for a reference member. - + @param index indicates the index of the reference. @param name specifies the name. @param refType specifies the full qualified typename of the reference. @param doku specifies the documentation string of the reference. @param access specifies the access mode of the reference. - */ - inline void setReferenceData( sal_uInt16 index, + */ + inline void setReferenceData( sal_uInt16 index, const ::rtl::OUString& name, RTReferenceType refType, const ::rtl::OUString& doku, @@ -224,11 +220,11 @@ public: protected: - /// stores the registry type writer Api. + // stores the registry type writer Api. const RegistryTypeWriter_Api* m_pApi; - /// stores the handle of an implementation class + // stores the handle of an implementation class TypeWriterImpl m_hImpl; -}; +}; @@ -253,17 +249,17 @@ inline RegistryTypeWriter::RegistryTypeWriter(RTTypeClass RTTypeClass, inline RegistryTypeWriter::RegistryTypeWriter(const RegistryTypeWriter& toCopy) : m_pApi(toCopy.m_pApi) , m_hImpl(toCopy.m_hImpl) -{ - m_pApi->acquire(m_hImpl); +{ + m_pApi->acquire(m_hImpl); } inline RegistryTypeWriter::~RegistryTypeWriter() -{ +{ m_pApi->release(m_hImpl); } inline RegistryTypeWriter& RegistryTypeWriter::operator == (const RegistryTypeWriter& toAssign) -{ +{ if (m_hImpl != toAssign.m_hImpl) { m_pApi->release(m_hImpl); @@ -274,7 +270,7 @@ inline RegistryTypeWriter& RegistryTypeWriter::operator == (const RegistryTypeWr return *this; } -inline void RegistryTypeWriter::setFieldData( sal_uInt16 index, +inline void RegistryTypeWriter::setFieldData( sal_uInt16 index, const ::rtl::OUString& name, const ::rtl::OUString& typeName, const ::rtl::OUString& doku, @@ -340,7 +336,7 @@ inline sal_uInt32 RegistryTypeWriter::getBlopSize() } -inline void RegistryTypeWriter::setReferenceData( sal_uInt16 index, +inline void RegistryTypeWriter::setReferenceData( sal_uInt16 index, const ::rtl::OUString& name, RTReferenceType refType, const ::rtl::OUString& doku, @@ -350,3 +346,5 @@ inline void RegistryTypeWriter::setReferenceData( sal_uInt16 index, } #endif + +/* vim: set noet sw=4 ts=4: */ diff --git a/main/sal/inc/rtl/locale.h b/main/sal/inc/rtl/locale.h index b05f7798d0..091b516dd2 100644 --- a/main/sal/inc/rtl/locale.h +++ b/main/sal/inc/rtl/locale.h @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,20 +7,18 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - #ifndef _RTL_LOCALE_H_ #define _RTL_LOCALE_H_ @@ -37,7 +35,7 @@ extern "C" { #endif /** - The implementation structur of a locale. Do not create this structure + The implementation structure of a locale. Do not create this structure direct. Only use the functions rtl_locale_register and rtl_locale_setDefault. The strings Language, Country and Variant are constants, so it is not necessary to acquire and release them. @@ -62,7 +60,7 @@ typedef struct _rtl_Locale sal_Int32 HashCode; } rtl_Locale; -#if defined( SAL_W32) || defined(SAL_OS2) +#if defined( SAL_W32) || defined(SAL_OS2) #pragma pack(pop) #endif @@ -123,9 +121,9 @@ rtl_uString * SAL_CALL rtl_locale_getVariant( rtl_Locale * This ); sal_Int32 SAL_CALL rtl_locale_hashCode( rtl_Locale * This ); /** - Returns true if the locals are equal, otherwis false. + Returns true if the locals are equal, otherwise false. */ -sal_Int32 SAL_CALL rtl_locale_equals( rtl_Locale * This, rtl_Locale * obj ); +sal_Int32 SAL_CALL rtl_locale_equals( rtl_Locale * This, rtl_Locale * obj ); #ifdef __cplusplus } diff --git a/main/starmath/source/toolbox.src b/main/starmath/source/toolbox.src index 5c37539938..a01d80db7b 100644 --- a/main/starmath/source/toolbox.src +++ b/main/starmath/source/toolbox.src @@ -27,7 +27,6 @@ #define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x0000; Blue = 0xff00; } #define IMAGE_STDBTN_COLOR_HC IMAGE_STDBTN_COLOR - FloatingWindow RID_TOOLBOXWINDOW { HelpId = HID_SMA_OPERATOR_WIN ; @@ -888,7 +887,7 @@ FloatingWindow RID_TOOLBOXWINDOW ToolBox TOOLBOX_CAT_F { - // attributs + // attributes HelpId = HID_SMA_ATTRIBUTES_TBX ; Pos = MAP_APPFONT ( 0, 45 ) ; Size = MAP_APPFONT ( 65, 95 ) ; @@ -1231,7 +1230,7 @@ FloatingWindow RID_TOOLBOXWINDOW { Identifier = RID_CSUPX ; HelpId = HID_SMA_CSUPX ; - Text [ en-US ] = "Superscript Top"; + Text [ en-US ] = "Superscript Top" ; }; ToolBoxItem { diff --git a/main/sw/source/ui/uiview/view2.cxx b/main/sw/source/ui/uiview/view2.cxx index fdd44840f3..6999d1a350 100644 --- a/main/sw/source/ui/uiview/view2.cxx +++ b/main/sw/source/ui/uiview/view2.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,20 +7,18 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" @@ -181,7 +179,7 @@ static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, sal_uInt16 nWhi } /*--------------------------------------------------------------------------- - Beschreibung: String fuer die Seitenanzeige in der Statusbar basteln. + Beschreibung: String für die Seitenanzeige in der Statusbar basteln. ----------------------------------------------------------------------------*/ String SwView::GetPageStr( sal_uInt16 nPg, sal_uInt16 nLogPg, @@ -209,33 +207,33 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter, sal_Bool bLink, GraphicFilter *pFlt, Graphic* pPreviewGrf, sal_Bool bRule ) { - SwWait aWait( *GetDocShell(), true ); + SwWait aWait( *GetDocShell(), true ); - Graphic aGrf; - int nRes = GRFILTER_OK; - if ( pPreviewGrf ) - aGrf = *pPreviewGrf; - else - { - if( !pFlt ) - pFlt = GraphicFilter::GetGraphicFilter(); - nRes = GraphicFilter::LoadGraphic( rPath, rFilter, aGrf, pFlt /*, nFilter*/ ); - } + Graphic aGrf; + int nRes = GRFILTER_OK; + if ( pPreviewGrf ) + aGrf = *pPreviewGrf; + else + { + if( !pFlt ) + pFlt = GraphicFilter::GetGraphicFilter(); + nRes = GraphicFilter::LoadGraphic( rPath, rFilter, aGrf, pFlt /*, nFilter*/ ); + } - if( GRFILTER_OK == nRes ) - { - SwFlyFrmAttrMgr aFrmMgr( sal_True, GetWrtShellPtr(), FRMMGR_TYPE_GRF ); - SwWrtShell &rSh = GetWrtShell(); + if( GRFILTER_OK == nRes ) + { + SwFlyFrmAttrMgr aFrmMgr( sal_True, GetWrtShellPtr(), FRMMGR_TYPE_GRF ); + SwWrtShell &rSh = GetWrtShell(); - // #123922# determine if we really want to insert or replace the graphic at a selected object - const bool bReplaceMode(rSh.HasSelection() && nsSelectionType::SEL_FRM == rSh.GetSelectionType()); + // #123922# determine if we really want to insert or replace the graphic at a selected object + const bool bReplaceMode(rSh.HasSelection() && nsSelectionType::SEL_FRM == rSh.GetSelectionType()); if(bReplaceMode) { // #123922# Do same as in D&D, ReRead graphic and all is done rSh.ReRead( - bLink ? rPath : String(), - bLink ? rFilter : String(), + bLink ? rPath : String(), + bLink ? rFilter : String(), &aGrf); } else @@ -260,11 +258,11 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter, rSh.Insert( aEmptyStr, aEmptyStr, aGrf, &aFrmMgr ); } - // nach dem EndAction ist es zu spaet, weil die Shell dann schon zerstoert sein kann + // nach dem EndAction ist es zu spät, weil die Shell dann schon zerstört sein kann rSh.EndAction(); - } - } - return nRes; + } + } + return nRes; } @@ -277,7 +275,7 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq ) sal_Bool bReturn = sal_False; SwDocShell* pDocShell = GetDocShell(); sal_uInt16 nHtmlMode = ::GetHtmlMode(pDocShell); - // im HTML-Mode nur verknuepft einfuegen + // im HTML-Mode nur verknüpft einfügen FileDialogHelper* pFileDlg = new FileDialogHelper( SFXWB_GRAPHIC | SFXWB_SHOWSTYLES ); pFileDlg->SetTitle(SW_RESSTR(STR_INSERT_GRAPHIC )); pFileDlg->SetContext( FileDialogHelper::SW_INSERT_GRAPHIC ); @@ -484,7 +482,7 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq ) } else { - // set the specific graphic attrbutes to the graphic + // set the specific graphic attributes to the graphic bReturn = sal_True; AutoCaption( GRAPHIC_CAP ); rReq.Done(); @@ -804,7 +802,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) const sal_uInt16 nCurIdx = pWrtShell->GetCurPageDesc(); SwPageDesc aPageDesc( pWrtShell->GetPageDesc( nCurIdx ) ); ::ItemSetToPageDesc( *pArgs, aPageDesc ); - // Den Descriptor der Core veraendern. + // Den Descriptor der Core verändern. pWrtShell->ChgPageDesc( nCurIdx, aPageDesc ); } } @@ -857,7 +855,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) while( pWrtShell->GotoPrevTOXBase() ) ; // aufs erste Verzeichnis springen - // falls wir nicht mehr in einem stehen, dann zum naechsten + // falls wir nicht mehr in einem stehen, dann zum nächsten // springen. const SwTOXBase* pBase = pWrtShell->GetCurTOX(); if( !pBase ) @@ -874,8 +872,8 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) pWrtShell->ApplyAutoMark(); bAutoMarkApplied = sal_True; } - // JP 15.07.96: das pBase wird nur fuer die Schnittstelle - // benoetigt. Muss mal umgetstellt werden!!! + // JP 15.07.96: das pBase wird nur für die Schnittstelle + // benötigt. Muss mal umgestellt werden!!! pWrtShell->UpdateTableOf( *pBase ); if( pWrtShell->GotoNextTOXBase() ) @@ -1023,7 +1021,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) { SwDBData aData; aData = rSh.GetDBData(); - rSh.EnterStdMode(); // Wechsel in Textshell erzwingen; ist fuer + rSh.EnterStdMode(); // Wechsel in Textshell erzwingen; ist für // das Mischen von DB-Feldern notwendig. AttrChangedNotify( &rSh ); pNewDBMgr->SetMergeType( DBMGR_MERGE ); @@ -1133,7 +1131,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) case SID_ALIGN_ANY_BOTTOM : nAlias = SID_OBJECT_ALIGN_DOWN ; break; } } - //special handling for the draw shell + // special handling for the draw shell if(nAlias && (nSelectionType & (nsSelectionType::SEL_DRW))) { SfxAllEnumItem aEnumItem(SID_OBJECT_ALIGN, nAlias - SID_OBJECT_ALIGN_LEFT); @@ -1141,14 +1139,14 @@ void __EXPORT SwView::Execute(SfxRequest &rReq) SID_OBJECT_ALIGN, SFX_CALLMODE_ASYNCHRON, &aEnumItem, 0L); } else if(nAlias) - //these slots are either re-mapped to text or object alignment + // these slots are either re-mapped to text or object alignment GetViewFrame()->GetDispatcher()->Execute( nAlias, SFX_CALLMODE_ASYNCHRON); } break; case SID_RESTORE_EDITING_VIEW: { - //#i33307# restore editing position + // #i33307# restore editing position Point aCrsrPos; bool bSelectObj; if(pViewImpl->GetRestorePosition(aCrsrPos, bSelectObj)) @@ -1204,7 +1202,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) ASSERT( nWhich, "leeres Set"); if (Application::IsAccessibilityEnabled()) { - //get section chang event + // get section change event const SwSection* CurrSect = rShell.GetCurrSection(); if( CurrSect ) { @@ -1220,7 +1218,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) rShell.FireSectionChangeEvent(2, 1); nOldSectionName = String(); } - //get column change event + // get column change event if(rShell.bColumnChange()) { rShell.FireColumnChangeEvent(2, 1); @@ -1233,7 +1231,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) { case FN_STAT_PAGE: /* -//JP 07.01.00: is a nice feature - show the selektion of DrawObjects +//JP 07.01.00: is a nice feature - show the selection of DrawObjects if( rShell.IsObjSelected() //??? || rShell.IsFrmSelected() ) @@ -1250,7 +1248,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) rShell.GetPageNumber( -1, rShell.IsCrsrVisible(), nPage, nLogPage, sDisplay ); rSet.Put( SfxStringItem( FN_STAT_PAGE, GetPageStr( nPage, nLogPage, sDisplay) )); - //if existing page number is not equal to old page number, send out this event. + // if existing page number is not equal to old page number, send out this event. if (nOldPageNum != nLogPage ) { if (nOldPageNum != 0) @@ -1570,7 +1568,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) } /*-------------------------------------------------------------------- - Beschreibung: Execute fuer die Stauszeile + Beschreibung: Execute für die Stauszeile --------------------------------------------------------------------*/ @@ -2132,7 +2130,7 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe } pDocSh->RegisterTransfer( *pMedium ); pMedium->DownLoad(); // ggfs. den DownLoad anstossen - if( aRef.Is() && 1 < aRef->GetRefCount() ) // noch gueltige Ref? + if( aRef.Is() && 1 < aRef->GetRefCount() ) // noch gültige Ref? { SwReader* pRdr; Reader *pRead = pDocSh->StartConvertFrom( *pMedium, &pRdr, pWrtShell ); @@ -2149,10 +2147,10 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe SwWait aWait( *GetDocShell(), true ); pWrtShell->StartAllAction(); if ( pWrtShell->HasSelection() ) - pWrtShell->DelRight(); // Selektionen loeschen + pWrtShell->DelRight(); // Selektionen löschen if( pRead ) { - nErrno = pRdr->Read( *pRead ); // und Dokument einfuegen + nErrno = pRdr->Read( *pRead ); // und Dokument einfügen delete pRdr; } else @@ -2168,7 +2166,7 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe { SfxRequest aReq( FN_UPDATE_TOX, SFX_CALLMODE_SLOT, GetPool() ); Execute( aReq ); - pWrtShell->SetUpdateTOX( sal_False ); // wieder zurueck setzen + pWrtShell->SetUpdateTOX( sal_False ); // wieder zurück setzen } if( pDoc ) @@ -2209,7 +2207,7 @@ extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, SfxObjectShellLock& xLoc SwWait aWait( *GetDocShell(), true ); pWrtShell->StartAllAction(); - pWrtShell->EnterStdMode(); // Selektionen loeschen + pWrtShell->EnterStdMode(); // Selektionen löschen if( bCompare ) nFound = pWrtShell->CompareDoc( *((SwDocShell*)&xDocSh)->GetDoc() ); @@ -2316,7 +2314,7 @@ void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument) { if(!GetWrtShell().IsAnyDatabaseFieldInDoc()) { - //check availability of data sources (except biblio source) + // check availability of data sources (except biblio source) uno::Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); uno::Reference<XNameAccess> xDBContext; if( xMgr.is() ) @@ -2341,7 +2339,7 @@ void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument) } else { - //take an existing data source or create a new one? + // take an existing data source or create a new one? SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); AbstractMailMergeFieldConnectionsDlg* pConnectionsDlg = pFact->CreateMailMergeFieldConnectionsDlg( @@ -2405,7 +2403,7 @@ void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument) SwDBData aData; SwWrtShell &rSh = GetWrtShell(); aData = rSh.GetDBData(); - rSh.EnterStdMode(); // Wechsel in Textshell erzwingen; ist fuer + rSh.EnterStdMode(); // Wechsel in Textshell erzwingen; ist für // das Mischen von DB-Feldern notwendig. AttrChangedNotify( &rSh ); pNewDBMgr->SetMergeType( DBMGR_MERGE ); @@ -2425,7 +2423,7 @@ void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument) } else { - //call documents and template dialog + // call documents and template dialog SfxApplication* pSfxApp = SFX_APP(); Window* pTopWin = pSfxApp->GetTopWindow(); SvtDocumentTemplateDialog* pDocTemplDlg = new SvtDocumentTemplateDialog( pTopWin ); @@ -2492,9 +2490,9 @@ IMPL_LINK( SwView, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) pRed->ReInitDlg( GetDocShell() ); } } - } - } - return 0; + } + } + return 0; } void SwView::ExecuteScan( SfxRequest& rReq ) @@ -2502,3 +2500,5 @@ void SwView::ExecuteScan( SfxRequest& rReq ) if (pViewImpl) pViewImpl->ExecuteScan(rReq) ; } + +/* vim: set noet sw=4 ts=4: */ diff --git a/main/vbahelper/source/msforms/vbacombobox.cxx b/main/vbahelper/source/msforms/vbacombobox.cxx index 695e3810f6..68ff987c0b 100644 --- a/main/vbahelper/source/msforms/vbacombobox.cxx +++ b/main/vbahelper/source/msforms/vbacombobox.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,20 +7,18 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ - - #include "vbacombobox.hxx" #include "vbanewfont.hxx" #include <ooo/vba/msforms/fmStyle.hpp> @@ -33,7 +31,6 @@ using namespace com::sun::star; using namespace ooo::vba; - //SelectedItems list of integer indexes //StringItemList list of items @@ -44,47 +41,47 @@ const static rtl::OUString CONTROLSOURCEPROP( RTL_CONSTASCII_USTRINGPARAM("DataF ScVbaComboBox::ScVbaComboBox( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, AbstractGeometryAttributes* pGeomHelper, bool bDialogType ) : ComboBoxImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper ), mbDialogType( bDialogType ) { - mpListHelper.reset( new ListControlHelper( m_xProps ) ); + mpListHelper.reset( new ListControlHelper( m_xProps ) ); try { - // grab the default value property name - m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName; + // grab the default value property name + m_xProps->getPropertyValue( CONTROLSOURCEPROP ) >>= sSourceName; + } + catch( uno::Exception& ) + { } - catch( uno::Exception& ) - { - } - if( sSourceName.getLength() == 0 ) - sSourceName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ) ); + if( sSourceName.getLength() == 0 ) + sSourceName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ) ); } // Attributes -// Value, [read] e.g. getValue returns the value of ooo Text propery e.g. the value in +// Value, [read] e.g. getValue returns the value of ooo Text property e.g. the value in // the drop down -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaComboBox::getValue() throw (uno::RuntimeException) { return m_xProps->getPropertyValue( sSourceName ); } -void SAL_CALL +void SAL_CALL ScVbaComboBox::setListIndex( const uno::Any& _value ) throw (uno::RuntimeException) { - sal_Int16 nIndex = 0; - if( _value >>= nIndex ) - { - uno::Sequence< rtl::OUString > sItems; - m_xProps->getPropertyValue( ITEMS ) >>= sItems; - if( ( nIndex >= 0 ) && ( sItems.getLength() > nIndex ) ) - { - rtl::OUString sText = sItems[ nIndex ]; - m_xProps->setPropertyValue( TEXT, uno::makeAny( sText ) ); - } - } + sal_Int16 nIndex = 0; + if( _value >>= nIndex ) + { + uno::Sequence< rtl::OUString > sItems; + m_xProps->getPropertyValue( ITEMS ) >>= sItems; + if( ( nIndex >= 0 ) && ( sItems.getLength() > nIndex ) ) + { + rtl::OUString sText = sItems[ nIndex ]; + m_xProps->setPropertyValue( TEXT, uno::makeAny( sText ) ); + } + } } -uno::Any SAL_CALL +uno::Any SAL_CALL ScVbaComboBox::getListIndex() throw (uno::RuntimeException) { uno::Sequence< rtl::OUString > sItems; @@ -102,25 +99,25 @@ ScVbaComboBox::getListIndex() throw (uno::RuntimeException) OSL_TRACE("getListIndex returning %d", index ); return uno::makeAny( index ); } - - } - } + + } + } OSL_TRACE("getListIndex returning %d", -1 ); return uno::makeAny( sal_Int32( -1 ) ); } // Value, [write]e.g. setValue sets the value in the drop down, and if the value is one // of the values in the list then the selection is also set -void SAL_CALL +void SAL_CALL ScVbaComboBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException) { - // booleans are converted to uppercase strings + // booleans are converted to uppercase strings m_xProps->setPropertyValue( sSourceName, uno::Any( extractStringFromAny( _value, ::rtl::OUString(), true ) ) ); } // see Value -::rtl::OUString SAL_CALL +::rtl::OUString SAL_CALL ScVbaComboBox::getText() throw (uno::RuntimeException) { rtl::OUString result; @@ -128,26 +125,26 @@ ScVbaComboBox::getText() throw (uno::RuntimeException) return result; } -void SAL_CALL +void SAL_CALL ScVbaComboBox::setText( const ::rtl::OUString& _text ) throw (uno::RuntimeException) { setValue( uno::makeAny( _text ) ); // seems the same } // Methods -void SAL_CALL +void SAL_CALL ScVbaComboBox::AddItem( const uno::Any& pvargItem, const uno::Any& pvargIndex ) throw (uno::RuntimeException) { mpListHelper->AddItem( pvargItem, pvargIndex ); } -void SAL_CALL +void SAL_CALL ScVbaComboBox::removeItem( const uno::Any& index ) throw (uno::RuntimeException) { mpListHelper->removeItem( index ); } -void SAL_CALL +void SAL_CALL ScVbaComboBox::Clear( ) throw (uno::RuntimeException) { mpListHelper->Clear(); @@ -165,8 +162,8 @@ ScVbaComboBox::getListCount() throw (uno::RuntimeException) { return mpListHelper->getListCount(); } - -uno::Any SAL_CALL + +uno::Any SAL_CALL ScVbaComboBox::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) throw (uno::RuntimeException) { return mpListHelper->List( pvargIndex, pvarColumn ); @@ -174,7 +171,7 @@ ScVbaComboBox::List( const ::uno::Any& pvargIndex, const uno::Any& pvarColumn ) sal_Int32 SAL_CALL ScVbaComboBox::getStyle() throw (uno::RuntimeException) { - return msforms::fmStyle::fmStyleDropDownCombo; + return msforms::fmStyle::fmStyleDropDownCombo; } void SAL_CALL ScVbaComboBox::setStyle( sal_Int32 /*nStyle*/ ) throw (uno::RuntimeException) @@ -183,7 +180,7 @@ void SAL_CALL ScVbaComboBox::setStyle( sal_Int32 /*nStyle*/ ) throw (uno::Runtim sal_Int32 SAL_CALL ScVbaComboBox::getDropButtonStyle() throw (uno::RuntimeException) { - return msforms::fmDropButtonStyle::fmDropButtonStyleArrow; + return msforms::fmDropButtonStyle::fmDropButtonStyleArrow; } void SAL_CALL ScVbaComboBox::setDropButtonStyle( sal_Int32 /*nDropButtonStyle*/ ) throw (uno::RuntimeException) @@ -192,7 +189,7 @@ void SAL_CALL ScVbaComboBox::setDropButtonStyle( sal_Int32 /*nDropButtonStyle*/ sal_Int32 SAL_CALL ScVbaComboBox::getDragBehavior() throw (uno::RuntimeException) { - return msforms::fmDragBehavior::fmDragBehaviorDisabled; + return msforms::fmDragBehavior::fmDragBehaviorDisabled; } void SAL_CALL ScVbaComboBox::setDragBehavior( sal_Int32 /*nDragBehavior*/ ) throw (uno::RuntimeException) @@ -201,7 +198,7 @@ void SAL_CALL ScVbaComboBox::setDragBehavior( sal_Int32 /*nDragBehavior*/ ) thro sal_Int32 SAL_CALL ScVbaComboBox::getEnterFieldBehavior() throw (uno::RuntimeException) { - return msforms::fmEnterFieldBehavior::fmEnterFieldBehaviorSelectAll; + return msforms::fmEnterFieldBehavior::fmEnterFieldBehaviorSelectAll; } void SAL_CALL ScVbaComboBox::setEnterFieldBehavior( sal_Int32 /*nEnterFieldBehavior*/ ) throw (uno::RuntimeException) @@ -210,7 +207,7 @@ void SAL_CALL ScVbaComboBox::setEnterFieldBehavior( sal_Int32 /*nEnterFieldBehav sal_Int32 SAL_CALL ScVbaComboBox::getListStyle() throw (uno::RuntimeException) { - return msforms::fmListStyle::fmListStylePlain; + return msforms::fmListStyle::fmListStylePlain; } void SAL_CALL ScVbaComboBox::setListStyle( sal_Int32 /*nListStyle*/ ) throw (uno::RuntimeException) @@ -219,7 +216,7 @@ void SAL_CALL ScVbaComboBox::setListStyle( sal_Int32 /*nListStyle*/ ) throw (uno sal_Int32 SAL_CALL ScVbaComboBox::getTextAlign() throw (uno::RuntimeException) { - return msforms::fmTextAlign::fmTextAlignLeft; + return msforms::fmTextAlign::fmTextAlignLeft; } void SAL_CALL ScVbaComboBox::setTextAlign( sal_Int32 /*nTextAlign*/ ) throw (uno::RuntimeException) @@ -228,12 +225,12 @@ void SAL_CALL ScVbaComboBox::setTextAlign( sal_Int32 /*nTextAlign*/ ) throw (uno sal_Int32 SAL_CALL ScVbaComboBox::getTextLength() throw (uno::RuntimeException) { - return getText().getLength(); + return getText().getLength(); } uno::Reference< msforms::XNewFont > SAL_CALL ScVbaComboBox::getFont() throw (uno::RuntimeException) { - return new VbaNewFont( this, mxContext, m_xProps ); + return new VbaNewFont( this, mxContext, m_xProps ); } rtl::OUString& @@ -243,7 +240,7 @@ ScVbaComboBox::getServiceImplName() return sImplName; } -uno::Sequence< rtl::OUString > +uno::Sequence< rtl::OUString > ScVbaComboBox::getServiceNames() { static uno::Sequence< rtl::OUString > aServiceNames; @@ -254,3 +251,5 @@ ScVbaComboBox::getServiceNames() } return aServiceNames; } + +/* vim: set noet sw=4 ts=4: */ diff --git a/main/xmlsecurity/tools/standalone/mscsfit/signer.cxx b/main/xmlsecurity/tools/standalone/mscsfit/signer.cxx index cd9080c9d3..9e487c2a27 100644 --- a/main/xmlsecurity/tools/standalone/mscsfit/signer.cxx +++ b/main/xmlsecurity/tools/standalone/mscsfit/signer.cxx @@ -1,5 +1,5 @@ /************************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -7,16 +7,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * *************************************************************/ /** -- C++ Source File -- **/ @@ -85,22 +85,22 @@ int SAL_CALL main( int argc, char **argv ) for( int hhh = 0 ; hhh < 4 ; hhh ++ ) { - //Init libxml and libxslt libraries + // Init libxml and libxslt libraries xmlInitParser(); LIBXML_TEST_VERSION xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; xmlSubstituteEntitiesDefault(1); #ifndef XMLSEC_NO_XSLT - xmlIndentTreeOutput = 1; + xmlIndentTreeOutput = 1; #endif // XMLSEC_NO_XSLT - //Initialize the crypto engine + // Initialize the crypto engine if( argc == 5 ) { n_pCertStore = argv[4] ; n_hStoreHandle = CertOpenSystemStore( NULL, n_pCertStore ) ; if( n_hStoreHandle == NULL ) { - fprintf( stderr, "Can not open the system cert store %s\n", n_pCertStore ) ; + fprintf( stderr, "Cannot open the system cert store %s\n", n_pCertStore ) ; return 1 ; } } else { @@ -109,39 +109,39 @@ int SAL_CALL main( int argc, char **argv ) } xmlSecMSCryptoAppInit( n_pCertStore ) ; - //Load XML document + // Load XML document doc = xmlParseFile( argv[1] ) ; if( doc == NULL || xmlDocGetRootElement( doc ) == NULL ) { fprintf( stderr , "### Cannot load template xml document!\n" ) ; goto done ; } - //Find the signature template + // Find the signature template tplNode = xmlSecFindNode( xmlDocGetRootElement( doc ), xmlSecNodeSignature, xmlSecDSigNs ) ; if( tplNode == NULL ) { fprintf( stderr , "### Cannot find the signature template!\n" ) ; goto done ; } - //Find the element with ID attribute - //Here we only try to find the "document" node. + // Find the element with ID attribute + // Here we only try to find the "document" node. tarNode = xmlSecFindNode( xmlDocGetRootElement( doc ), ( xmlChar* )"document", ( xmlChar* )"http://openoffice.org/2000/office" ) ; if( tarNode == NULL ) { tarNode = xmlSecFindNode( xmlDocGetRootElement( doc ), ( xmlChar* )"document", NULL ) ; } - //Find the "id" attrbute in the element + // Find the "id" attribute in the element if( tarNode != NULL ) { if( ( idAttr = xmlHasProp( tarNode, ( xmlChar* )"id" ) ) != NULL ) { - //NULL + // NULL } else if( ( idAttr = xmlHasProp( tarNode, ( xmlChar* )"Id" ) ) != NULL ) { - //NULL + // NULL } else { idAttr = NULL ; } } - //Add ID to DOM + // Add ID to DOM if( idAttr != NULL ) { idValue = xmlNodeListGetString( tarNode->doc, idAttr->children, 1 ) ; if( idValue == NULL ) { @@ -150,27 +150,27 @@ int SAL_CALL main( int argc, char **argv ) } if( xmlAddID( NULL, doc, idValue, idAttr ) == NULL ) { - fprintf( stderr , "### Can not add the ID value!\n" ) ; + fprintf( stderr , "### Cannot add the ID value!\n" ) ; goto done ; } } - //Reference handler - //Find the signature reference + // Reference handler + // Find the signature reference tarNode = xmlSecFindNode( tplNode, xmlSecNodeReference, xmlSecDSigNs ) ; if( tarNode == NULL ) { fprintf( stderr , "### Cannot find the signature reference!\n" ) ; goto done ; } - //Find the "URI" attrbute in the reference + // Find the "URI" attribute in the reference uriAttr = xmlHasProp( tarNode, ( xmlChar* )"URI" ) ; if( tarNode == NULL ) { fprintf( stderr , "### Cannot find URI of the reference!\n" ) ; goto done ; } - //Get the "URI" attrbute value + // Get the "URI" attribute value uriValue = xmlNodeListGetString( tarNode->doc, uriAttr->children, 1 ) ; if( uriValue == NULL ) { fprintf( stderr , "### the URI value is NULL!\n" ) ; @@ -187,7 +187,7 @@ int SAL_CALL main( int argc, char **argv ) fprintf( stdout , "### Find the URI [%s]\n", OUStringToOString( *uri , RTL_TEXTENCODING_ASCII_US ).getStr() ) ; Reference< XInputStream > xStream = createStreamFromFile( *uri ) ; if( !xStream.is() ) { - fprintf( stderr , "### Can not get the URI stream!\n" ) ; + fprintf( stderr , "### Cannot get the URI stream!\n" ) ; goto done ; } @@ -203,7 +203,7 @@ int SAL_CALL main( int argc, char **argv ) "ServicesManager - " "Cannot get service manager" ) ; - //Create signature template + // Create signature template Reference< XInterface > element = xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.security.bridge.xmlsec.XMLElementWrapper_XmlSecImpl" ) , xContext ) ; OSL_ENSURE( element.is() , @@ -225,10 +225,10 @@ int SAL_CALL main( int argc, char **argv ) "Signer - " "Cannot get implementation of \"xsec.XMLElement\"" ) ; - //Set signature template + // Set signature template pElement->setNativeElement( tplNode ) ; - //Build XML Signature template + // Build XML Signature template Reference< XInterface > signtpl = xManager->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.xml.crypto.XMLSignatureTemplate" ) , xContext ) ; OSL_ENSURE( signtpl.is() , @@ -240,15 +240,15 @@ int SAL_CALL main( int argc, char **argv ) "Signer - " "Cannot get interface of \"XXMLSignatureTemplate\" from service \"xsec.XMLSignatureTemplate\"" ) ; - //Import the signature template + // Import the signature template xTemplate->setTemplate( xElement ) ; - //Import the URI/Stream binding + // Import the URI/Stream binding if( xUriBinding.is() ) xTemplate->setBinding( xUriBinding ) ; - //Create security environment - //Build Security Environment + // Create security environment + // Build Security Environment Reference< XInterface > xsecenv = xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.SecurityEnvironment_MSCryptImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , @@ -260,7 +260,7 @@ int SAL_CALL main( int argc, char **argv ) "Signer - " "Cannot get interface of \"XSecurityEnvironment\" from service \"xsec.SecurityEnvironment\"" ) ; - //Setup key slot and certDb + // Setup key slot and certDb Reference< XUnoTunnel > xEnvTunnel( xsecenv , UNO_QUERY ) ; OSL_ENSURE( xElement.is() , "Signer - " @@ -271,7 +271,7 @@ int SAL_CALL main( int argc, char **argv ) "Signer - " "Cannot get implementation of \"xsec.SecurityEnvironment\"" ) ; - //Setup key slot and certDb + // Setup key slot and certDb if( n_hStoreHandle != NULL ) { pSecEnv->setCryptoSlot( n_hStoreHandle ) ; pSecEnv->setCertDb( n_hStoreHandle ) ; @@ -279,7 +279,7 @@ int SAL_CALL main( int argc, char **argv ) pSecEnv->enableDefaultCrypt( sal_True ) ; } - //Build XML Security Context + // Build XML Security Context Reference< XInterface > xmlsecctx = xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl"), xContext ) ; OSL_ENSURE( xsecenv.is() , @@ -293,7 +293,7 @@ int SAL_CALL main( int argc, char **argv ) xSecCtx->addSecurityEnvironment( xSecEnv ) ; - //Generate XML signature + // Generate XML signature Reference< XInterface > xmlsigner = xManager->createInstanceWithContext( OUString::createFromAscii("com.sun.star.xml.security.bridge.xmlsec.XMLSignature_MSCryptImpl"), xContext ) ; OSL_ENSURE( xmlsigner.is() , @@ -305,14 +305,14 @@ int SAL_CALL main( int argc, char **argv ) "Signer - " "Cannot get interface of \"XXMLSignature\" from service \"xsec.XMLSignature\"" ) ; - //perform signature + // perform signature xTemplate = xSigner->generate( xTemplate , xSecEnv ) ; OSL_ENSURE( xTemplate.is() , "Signer - " - "Cannot generate the xml signature" ) ; - + "Cannot generate the xml signature" ) ; + SecurityOperationStatus m_nStatus = xTemplate->getStatus(); - + if (m_nStatus == SecurityOperationStatus_OPERATION_SUCCEEDED) { fprintf( stdout, "Operation succeeds.\n") ; @@ -328,11 +328,11 @@ int SAL_CALL main( int argc, char **argv ) dstFile = fopen( argv[2], "w" ) ; if( dstFile == NULL ) { - fprintf( stderr , "### Can not open file %s\n", argv[2] ) ; + fprintf( stderr , "### Cannot open file %s\n", argv[2] ) ; goto done ; } - //Save result + // Save result xmlDocDump( dstFile, doc ) ; done: @@ -352,7 +352,7 @@ done: /* Shutdown libxslt/libxml */ #ifndef XMLSEC_NO_XSLT - xsltCleanupGlobals(); + xsltCleanupGlobals(); #endif /* XMLSEC_NO_XSLT */ xmlCleanupParser(); @@ -360,3 +360,5 @@ done: return 0; } + +/* vim: set noet sw=4 ts=4: */