include/svtools/DocumentToGraphicRenderer.hxx | 1 include/svtools/foldertree.hxx | 2 svtools/source/contnr/fileview.cxx | 2 svtools/source/contnr/foldertree.cxx | 8 +-- svtools/source/control/fmtfield.cxx | 8 --- svtools/source/filter/DocumentToGraphicRenderer.cxx | 3 - svtools/source/misc/templatefoldercache.cxx | 2 svtools/source/uno/wizard/wizardpagecontroller.cxx | 3 - svtools/source/uno/wizard/wizardpagecontroller.hxx | 1 tools/source/reversemap/bestreversemap.cxx | 4 - ucb/source/ucp/file/filinsreq.cxx | 5 - ucb/source/ucp/file/filinsreq.hxx | 1 ucb/source/ucp/file/filprp.cxx | 5 - ucb/source/ucp/file/filprp.hxx | 1 ucb/source/ucp/file/filtask.cxx | 3 - ucb/source/ucp/file/filtask.hxx | 1 unotools/source/config/extendedsecurityoptions.cxx | 49 ------------------- uui/source/masterpassworddlg.cxx | 3 - uui/source/masterpassworddlg.hxx | 1 uui/source/passworddlg.cxx | 3 - uui/source/passworddlg.hxx | 1 vbahelper/source/vbahelper/vbadocumentsbase.cxx | 7 +- xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx | 10 +-- xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx | 6 -- xmlhelp/source/cxxhelp/provider/urlparameter.cxx | 2 xmlhelp/source/cxxhelp/provider/urlparameter.hxx | 2 26 files changed, 25 insertions(+), 109 deletions(-)
New commits: commit 21373c757315b05e77aab50d9fc5d57d70a77c14 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Wed May 16 11:27:18 2018 +0200 loplugin:unusedfields in svtools Change-Id: Idbf5e0d715784a4141b3fc712d104f84bf04dfc6 Reviewed-on: https://gerrit.libreoffice.org/54450 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/svtools/DocumentToGraphicRenderer.hxx b/include/svtools/DocumentToGraphicRenderer.hxx index a7af217597c7..d6c322b12601 100644 --- a/include/svtools/DocumentToGraphicRenderer.hxx +++ b/include/svtools/DocumentToGraphicRenderer.hxx @@ -51,7 +51,6 @@ class SVT_DLLPUBLIC DocumentToGraphicRenderer css::uno::Reference<css::view::XRenderable> mxRenderable; css::uno::Reference<css::awt::XToolkit> mxToolkit; css::uno::Any maSelection; - bool mbSelectionOnly; bool mbIsWriter; std::vector<OUString> maChapterNames; diff --git a/include/svtools/foldertree.hxx b/include/svtools/foldertree.hxx index f6ab259fd815..5f71cbf244b9 100644 --- a/include/svtools/foldertree.hxx +++ b/include/svtools/foldertree.hxx @@ -37,8 +37,6 @@ private: Reference< XCommandEnvironment > m_xEnv; ::osl::Mutex m_aMutex; Sequence< OUString > m_aBlackList; - Image m_aFolderImage; - Image m_aFolderExpandedImage; OUString m_sLastUpdatedDir; diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 764a389f3cc0..fc41f053337e 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -339,7 +339,6 @@ public: IntlWrapper aIntlWrapper; OUString maViewURL; - OUString maAllFilter; OUString maCurrentFilter; Image maFolderImage; Link<SvtFileView*,void> maOpenDoneLink; @@ -1450,7 +1449,6 @@ SvtFileView_Impl::SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommand ,mxCmdEnv ( xEnv ) { - maAllFilter = "*.*"; mpView = VclPtr<ViewTabListBox_Impl>::Create( mpAntiImpl, this, nFlags ); mpCurView = mpView; mpIconView = VclPtr<IconView>::Create( mpAntiImpl, WB_TABSTOP ); diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx index b3ee18a60710..0384b0a47693 100644 --- a/svtools/source/contnr/foldertree.cxx +++ b/svtools/source/contnr/foldertree.cxx @@ -15,16 +15,16 @@ FolderTree::FolderTree( vcl::Window* pParent, WinBits nBits ) : SvTreeListBox( pParent, nBits | WB_SORT | WB_TABSTOP ) - , m_aFolderImage(BitmapEx(RID_BMP_FOLDER)) - , m_aFolderExpandedImage(BitmapEx(RID_BMP_FOLDER_OPEN)) { Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference< XInteractionHandler > xInteractionHandler( InteractionHandler::createWithParent(xContext, VCLUnoHelper::GetInterface(GetParentDialog())), UNO_QUERY_THROW ); m_xEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() ); - SetDefaultCollapsedEntryBmp( m_aFolderImage ); - SetDefaultExpandedEntryBmp( m_aFolderExpandedImage ); + Image aFolderImage(BitmapEx(RID_BMP_FOLDER)); + Image aFolderExpandedImage(BitmapEx(RID_BMP_FOLDER_OPEN)); + SetDefaultCollapsedEntryBmp( aFolderImage ); + SetDefaultExpandedEntryBmp( aFolderExpandedImage ); } void FolderTree::RequestingChildren( SvTreeListEntry* pEntry ) diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx index d966e0850136..4d81dff3ea36 100644 --- a/svtools/source/control/fmtfield.cxx +++ b/svtools/source/control/fmtfield.cxx @@ -75,8 +75,6 @@ namespace validation { private: TransitionTable m_aTransitions; - const sal_Unicode m_cThSep; - const sal_Unicode m_cDecSep; public: NumberValidator( const sal_Unicode _cThSep, const sal_Unicode _cDecSep ); @@ -122,8 +120,6 @@ namespace validation } NumberValidator::NumberValidator( const sal_Unicode _cThSep, const sal_Unicode _cDecSep ) - :m_cThSep( _cThSep ) - ,m_cDecSep( _cDecSep ) { // build up our transition table @@ -142,7 +138,7 @@ namespace validation lcl_insertSignTransitions( rRow, DIGIT_PRE_COMMA ); // common transitions for the two pre-comma states - lcl_insertCommonPreCommaTransitions( rRow, m_cThSep, m_cDecSep ); + lcl_insertCommonPreCommaTransitions( rRow, _cThSep, _cDecSep ); // the exponent may start here // (this would mean string like "_+e10_", but this is a valid fragment, though no valid number) @@ -154,7 +150,7 @@ namespace validation StateTransitions& rRow = m_aTransitions[ DIGIT_PRE_COMMA ]; // common transitions for the two pre-comma states - lcl_insertCommonPreCommaTransitions( rRow, m_cThSep, m_cDecSep ); + lcl_insertCommonPreCommaTransitions( rRow, _cThSep, _cDecSep ); // the exponent may start here lcl_insertStartExponentTransition( rRow ); diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx index fd3ce0c39be8..1c11438473ea 100644 --- a/svtools/source/filter/DocumentToGraphicRenderer.cxx +++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx @@ -48,7 +48,6 @@ DocumentToGraphicRenderer::DocumentToGraphicRenderer( const Reference<XComponent mxController( mxModel->getCurrentController() ), mxRenderable (mxDocument, uno::UNO_QUERY ), mxToolkit( VCLUnoHelper::CreateToolkit() ), - mbSelectionOnly( bSelectionOnly ), mbIsWriter( false ) { try @@ -64,7 +63,7 @@ DocumentToGraphicRenderer::DocumentToGraphicRenderer( const Reference<XComponent { } - if (!(mbSelectionOnly && mxController.is())) + if (!(bSelectionOnly && mxController.is())) return; try diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index f27abc4e2071..41141d1ba0c9 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -105,7 +105,6 @@ namespace svt private: INetURLObject m_aURL; - OUString m_sLocalName; // redundant - last segment of m_aURL util::DateTime m_aLastModified; // date of last modification as reported by UCP TemplateFolderContent m_aSubContents; // sorted (by name) list of the children @@ -143,7 +142,6 @@ namespace svt :m_aURL( _rURL ) { DBG_ASSERT( INetProtocol::NotValid != m_aURL.GetProtocol(), "TemplateContent::TemplateContent: invalid URL!" ); - m_sLocalName = m_aURL.getName(); implResetDate(); } diff --git a/svtools/source/uno/wizard/wizardpagecontroller.cxx b/svtools/source/uno/wizard/wizardpagecontroller.cxx index 1cef7220476d..70364d67034e 100644 --- a/svtools/source/uno/wizard/wizardpagecontroller.cxx +++ b/svtools/source/uno/wizard/wizardpagecontroller.cxx @@ -49,14 +49,13 @@ namespace svt { namespace uno const sal_Int16 i_nPageId ) :m_xController( i_rController ) ,m_xWizardPage() - ,m_nPageId( i_nPageId ) { ENSURE_OR_THROW( m_xController.is(), "no controller" ); try { m_xWizardPage.set( m_xController->createPage( Reference< XWindow >( i_rParent.GetComponentInterface(), UNO_QUERY_THROW ), - m_nPageId + i_nPageId ), UNO_SET_THROW ); Reference< XWindow > xPageWindow( m_xWizardPage->getWindow(), UNO_SET_THROW ); diff --git a/svtools/source/uno/wizard/wizardpagecontroller.hxx b/svtools/source/uno/wizard/wizardpagecontroller.hxx index f38d4a50b1bc..7d11c292cf8a 100644 --- a/svtools/source/uno/wizard/wizardpagecontroller.hxx +++ b/svtools/source/uno/wizard/wizardpagecontroller.hxx @@ -56,7 +56,6 @@ namespace svt { namespace uno private: const css::uno::Reference< css::ui::dialogs::XWizardController > m_xController; css::uno::Reference< css::ui::dialogs::XWizardPage > m_xWizardPage; - const sal_Int16 m_nPageId; }; commit 9ffdf7adc00d8e9d931184d3008f4e505e4a5024 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Wed May 16 10:05:56 2018 +0200 loplugin:unusedfields in tools..xmlhelp Change-Id: I5e909a8def86ce9ad150440e6c6ad304e855cc69 Reviewed-on: https://gerrit.libreoffice.org/54415 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/tools/source/reversemap/bestreversemap.cxx b/tools/source/reversemap/bestreversemap.cxx index a03711abbdfc..4650d21781c6 100644 --- a/tools/source/reversemap/bestreversemap.cxx +++ b/tools/source/reversemap/bestreversemap.cxx @@ -17,14 +17,12 @@ struct Encoder { rtl_UnicodeToTextConverter m_aConverter; bool m_bCapable; - rtl_TextEncoding m_nEncoding; const char *m_pEncoding; Encoder(rtl_TextEncoding nEncoding, const char *pEncoding) : m_bCapable(true) - , m_nEncoding(nEncoding) , m_pEncoding(pEncoding) { - m_aConverter = rtl_createUnicodeToTextConverter(m_nEncoding); + m_aConverter = rtl_createUnicodeToTextConverter(nEncoding); } ~Encoder() { diff --git a/ucb/source/ucp/file/filinsreq.cxx b/ucb/source/ucp/file/filinsreq.cxx index e33f9183d92a..9275b47aeab3 100644 --- a/ucb/source/ucp/file/filinsreq.cxx +++ b/ucb/source/ucp/file/filinsreq.cxx @@ -47,7 +47,6 @@ XInteractionRequestImpl::XInteractionRequestImpl( p2( new XInteractionAbortImpl ), m_nErrorCode(0), m_nMinorError(0), - m_aClashingName(aClashingName), m_xOrigin(xOrigin) { if( pShell ) @@ -59,7 +58,7 @@ XInteractionRequestImpl::XInteractionRequestImpl( if(m_nErrorCode == TASKHANDLING_FOLDER_EXISTS_MKDIR) { NameClashException excep; - excep.Name = m_aClashingName; + excep.Name = aClashingName; excep.Classification = InteractionClassification_ERROR; excep.Context = m_xOrigin; excep.Message = "folder exists and overwrite forbidden"; @@ -72,7 +71,7 @@ XInteractionRequestImpl::XInteractionRequestImpl( PropertyValue prop; prop.Name = "ResourceName"; prop.Handle = -1; - prop.Value <<= m_aClashingName; + prop.Value <<= aClashingName; Sequence<Any> seq(1); seq[0] <<= prop; excep.Arguments = seq; diff --git a/ucb/source/ucp/file/filinsreq.hxx b/ucb/source/ucp/file/filinsreq.hxx index 93c526f3571d..9d115bbfa0e7 100644 --- a/ucb/source/ucp/file/filinsreq.hxx +++ b/ucb/source/ucp/file/filinsreq.hxx @@ -135,7 +135,6 @@ class XInteractionSupplyNameImpl : public cppu::WeakImplHelper< css::uno::Reference<css::task::XInteractionRequest> m_xRequest; - OUString m_aClashingName; css::uno::Reference< css::uno::XInterface> m_xOrigin; }; diff --git a/ucb/source/ucp/file/filprp.cxx b/ucb/source/ucp/file/filprp.cxx index 179eb487098a..a92fd0959854 100644 --- a/ucb/source/ucp/file/filprp.cxx +++ b/ucb/source/ucp/file/filprp.cxx @@ -36,7 +36,6 @@ using namespace com::sun::star::ucb; XPropertySetInfo_impl::XPropertySetInfo_impl( TaskManager* pMyShell,const OUString& aUnqPath ) : m_pMyShell( pMyShell ), - m_count( 0 ), m_seq( 0 ) { m_pMyShell->m_pProvider->acquire(); @@ -48,9 +47,10 @@ XPropertySetInfo_impl::XPropertySetInfo_impl( TaskManager* pMyShell,const OUStri m_seq.realloc( properties.size() ); + sal_Int32 count = 0; while( it1 != properties.end() ) { - m_seq[ m_count++ ] = beans::Property( it1->getPropertyName(), + m_seq[ count++ ] = beans::Property( it1->getPropertyName(), it1->getHandle(), it1->getType(), it1->getAttributes() ); @@ -61,7 +61,6 @@ XPropertySetInfo_impl::XPropertySetInfo_impl( TaskManager* pMyShell,const OUStri XPropertySetInfo_impl::XPropertySetInfo_impl( TaskManager* pMyShell,const Sequence< beans::Property >& seq ) : m_pMyShell( pMyShell ), - m_count( seq.getLength() ), m_seq( seq ) { m_pMyShell->m_pProvider->acquire(); diff --git a/ucb/source/ucp/file/filprp.hxx b/ucb/source/ucp/file/filprp.hxx index 1be9af995c7d..0f7e2b3e6ac1 100644 --- a/ucb/source/ucp/file/filprp.hxx +++ b/ucb/source/ucp/file/filprp.hxx @@ -48,7 +48,6 @@ class XPropertySetInfo_impl : public cppu::WeakImplHelper< private: TaskManager* m_pMyShell; - sal_Int32 m_count; css::uno::Sequence< css::beans::Property > m_seq; }; } diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx index 85164c30792a..32753ba905b0 100644 --- a/ucb/source/ucp/file/filtask.cxx +++ b/ucb/source/ucp/file/filtask.cxx @@ -118,7 +118,6 @@ TaskManager::MyProperty::~MyProperty() TaskManager::TaskManager( const uno::Reference< uno::XComponentContext >& rxContext, FileProvider* pProvider, bool bWithConfig ) : m_nCommandId( 0 ), - m_bWithConfig( bWithConfig ), m_pProvider( pProvider ), m_xContext( rxContext ), Title( "Title" ), @@ -351,7 +350,7 @@ TaskManager::TaskManager( const uno::Reference< uno::XComponentContext >& rxCont m_sCommandInfo[8].Handle = -1; m_sCommandInfo[8].ArgType = cppu::UnoType<ucb::ContentInfo>::get(); - if(m_bWithConfig) + if(bWithConfig) { uno::Reference< XPropertySetRegistryFactory > xRegFac = ucb::Store::create( m_xContext ); // Open/create a registry diff --git a/ucb/source/ucp/file/filtask.hxx b/ucb/source/ucp/file/filtask.hxx index 966a0cdbcbbc..d50400f082de 100644 --- a/ucb/source/ucp/file/filtask.hxx +++ b/ucb/source/ucp/file/filtask.hxx @@ -503,7 +503,6 @@ namespace fileaccess static bool getUrlFromUnq( const OUString& Unq, OUString& Url ); - bool m_bWithConfig; FileProvider* m_pProvider; css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Reference< css::ucb::XPropertySetRegistry > m_xFileRegistry; diff --git a/unotools/source/config/extendedsecurityoptions.cxx b/unotools/source/config/extendedsecurityoptions.cxx index 2a9f138ca491..18cc0b9547ef 100644 --- a/unotools/source/config/extendedsecurityoptions.cxx +++ b/unotools/source/config/extendedsecurityoptions.cxx @@ -86,19 +86,10 @@ class SvtExtendedSecurityOptions_Impl : public ConfigItem static Sequence< OUString > GetPropertyNames(); - /*-**************************************************************************************************** - @short Fills the hash map with all extensions known to be secure - @descr This method fills the given hash map object with all extensions known to be secure. - @param aHashMap - A hash map to be filled with secure extension strings. - *//*-*****************************************************************************************************/ - void FillExtensionHashMap( ExtensionHashMap& aHashMap ); - OUString m_aSecureExtensionsSetName; OUString m_aExtensionPropName; SvtExtendedSecurityOptions::OpenHyperlinkMode m_eOpenHyperlinkMode; - ExtensionHashMap m_aExtensionHashMap; }; // constructor @@ -111,9 +102,6 @@ SvtExtendedSecurityOptions_Impl::SvtExtendedSecurityOptions_Impl() , m_eOpenHyperlinkMode(SvtExtendedSecurityOptions::OPEN_NEVER) // Init member then. { - // Fill the extension hash map with all secure extension strings - FillExtensionHashMap( m_aExtensionHashMap ); - Sequence< OUString > seqNames = GetPropertyNames(); Sequence< Any > seqValues = GetProperties( seqNames ); @@ -183,43 +171,6 @@ void SvtExtendedSecurityOptions_Impl::ImplCommit() PutProperties( seqNames, seqValues ); } -// public method - - -// private method - -void SvtExtendedSecurityOptions_Impl::FillExtensionHashMap( ExtensionHashMap& aHashMap ) -{ - // Get sequence with secure extensions from configuration - Sequence< OUString > seqNodes = GetNodeNames( m_aSecureExtensionsSetName ); - - OUString aValue; - Sequence< Any > aValues; - Sequence< OUString > aPropSeq( 1 ); - for ( int i = 0; i < seqNodes.getLength(); i++ ) - { - // Create access name for property - OUStringBuffer aExtEntryProp( m_aSecureExtensionsSetName ); - aExtEntryProp.append( "/" ); - aExtEntryProp.append( seqNodes[i] ); - aExtEntryProp.append( m_aExtensionPropName ); - - aPropSeq[0] = aExtEntryProp.makeStringAndClear(); - aValues = GetProperties( aPropSeq ); - if ( aValues.getLength() == 1 ) - { - // Don't use value if sequence has not the correct length - if ( aValues[0] >>= aValue ) - // Add extension into secure extensions hash map - aHashMap.emplace( aValue.toAsciiLowerCase(), 1 ); - else - { - SAL_WARN( "unotools.config", "SvtExtendedSecurityOptions_Impl::FillExtensionHashMap(): not string value?" ); - } - } - } -} - // private method (currently not used) Sequence< OUString > SvtExtendedSecurityOptions_Impl::GetPropertyNames() diff --git a/uui/source/masterpassworddlg.cxx b/uui/source/masterpassworddlg.cxx index f743db94f327..65146101ced7 100644 --- a/uui/source/masterpassworddlg.cxx +++ b/uui/source/masterpassworddlg.cxx @@ -35,11 +35,10 @@ IMPL_LINK_NOARG(MasterPasswordDialog, OKHdl_Impl, Button*, void) MasterPasswordDialog::MasterPasswordDialog ( vcl::Window* pParent, - css::task::PasswordRequestMode aDialogMode, + css::task::PasswordRequestMode nDialogMode, const std::locale& rLocale ) : ModalDialog(pParent, "MasterPasswordDialog", "uui/ui/masterpassworddlg.ui") - , nDialogMode(aDialogMode) , rResLocale(rLocale) { get(m_pEDMasterPassword, "password"); diff --git a/uui/source/masterpassworddlg.hxx b/uui/source/masterpassworddlg.hxx index cb27bfd3b865..bc709a3895e4 100644 --- a/uui/source/masterpassworddlg.hxx +++ b/uui/source/masterpassworddlg.hxx @@ -42,7 +42,6 @@ public: OUString GetMasterPassword() const { return m_pEDMasterPassword->GetText(); } private: - css::task::PasswordRequestMode nDialogMode; const std::locale& rResLocale; }; diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index 14cb63446eae..436b5a7a8743 100644 --- a/uui/source/passworddlg.cxx +++ b/uui/source/passworddlg.cxx @@ -28,7 +28,7 @@ using namespace ::com::sun::star; PasswordDialog::PasswordDialog(weld::Window* pParent, - task::PasswordRequestMode nDlgMode, const std::locale& rLocale, + task::PasswordRequestMode nDialogMode, const std::locale& rLocale, const OUString& aDocURL, bool bOpenToModify, bool bIsSimplePasswordRequest) : GenericDialogController(pParent, "uui/ui/password.ui", "PasswordDialog") , m_xFTPassword(m_xBuilder->weld_label("newpassFT")) @@ -38,7 +38,6 @@ PasswordDialog::PasswordDialog(weld::Window* pParent, , m_xOKBtn(m_xBuilder->weld_button("ok")) , nMinLen(1) , aPasswdMismatch(Translate::get(STR_PASSWORD_MISMATCH, rLocale)) - , nDialogMode(nDlgMode) , rResLocale(rLocale) { if( nDialogMode == task::PasswordRequestMode_PASSWORD_REENTER ) diff --git a/uui/source/passworddlg.hxx b/uui/source/passworddlg.hxx index bf865b0e8f17..6da3ad4c49b7 100644 --- a/uui/source/passworddlg.hxx +++ b/uui/source/passworddlg.hxx @@ -44,7 +44,6 @@ public: OUString GetPassword() const { return m_xEDPassword->get_text(); } private: - css::task::PasswordRequestMode nDialogMode; const std::locale& rResLocale; }; diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx index e3dc980c1c27..d188812e89cd 100644 --- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx @@ -113,10 +113,9 @@ class DocumentsAccessImpl : public DocumentsAccessImpl_BASE uno::Reference< uno::XComponentContext > m_xContext; Documents m_documents; NameIndexHash namesToIndices; - VbaDocumentsBase::DOCUMENT_TYPE meDocType; public: /// @throws uno::RuntimeException - DocumentsAccessImpl( const uno::Reference< uno::XComponentContext >& xContext, VbaDocumentsBase::DOCUMENT_TYPE eDocType ) :m_xContext( xContext ), meDocType( eDocType ) + DocumentsAccessImpl( const uno::Reference< uno::XComponentContext >& xContext, VbaDocumentsBase::DOCUMENT_TYPE eDocType ) :m_xContext( xContext ) { uno::Reference< container::XEnumeration > xEnum = new DocumentsEnumImpl( m_xContext ); sal_Int32 nIndex=0; @@ -124,8 +123,8 @@ public: { uno::Reference< lang::XServiceInfo > xServiceInfo( xEnum->nextElement(), uno::UNO_QUERY ); if ( xServiceInfo.is() - && ( ( xServiceInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) && meDocType == VbaDocumentsBase::EXCEL_DOCUMENT ) - || ( xServiceInfo->supportsService( "com.sun.star.text.TextDocument" ) && meDocType == VbaDocumentsBase::WORD_DOCUMENT ) ) ) + && ( ( xServiceInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) && eDocType == VbaDocumentsBase::EXCEL_DOCUMENT ) + || ( xServiceInfo->supportsService( "com.sun.star.text.TextDocument" ) && eDocType == VbaDocumentsBase::WORD_DOCUMENT ) ) ) { uno::Reference< frame::XModel > xModel( xServiceInfo, uno::UNO_QUERY_THROW ); // that the spreadsheetdocument is a xmodel is a given m_documents.push_back( xModel ); diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx index dc7982a87e73..b2b7e29a2dbe 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx @@ -34,11 +34,9 @@ ResultSetForRoot::ResultSetForRoot( const uno::Reference< uno::XComponentContext const uno::Sequence< beans::Property >& seq, URLParameter const & aURLParameter, Databases* pDatabases ) - : ResultSetBase( rxContext, xProvider,seq ), - m_aURLParameter( aURLParameter ), - m_pDatabases( pDatabases ) + : ResultSetBase( rxContext, xProvider,seq ) { - m_aPath = m_pDatabases->getModuleList( m_aURLParameter.get_language() ); + m_aPath = pDatabases->getModuleList( aURLParameter.get_language() ); m_aItems.resize( m_aPath.size() ); m_aIdents.resize( m_aPath.size() ); @@ -52,9 +50,9 @@ ResultSetForRoot::ResultSetForRoot( const uno::Reference< uno::XComponentContext "vnd.sun.star.help://" + m_aPath[i] + "?Language=" + - m_aURLParameter.get_language() + + aURLParameter.get_language() + "&System=" + - m_aURLParameter.get_system(); + aURLParameter.get_system(); m_nRow = sal_Int32( i ); diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx b/xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx index 20c41e738b68..6a54edd07c1a 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx @@ -41,12 +41,6 @@ namespace chelp { const css::uno::Sequence< css::beans::Property >& seq, URLParameter const & aURLParameter, Databases* pDatabases ); - - - private: - - URLParameter m_aURLParameter; - Databases* m_pDatabases; }; } diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx index b43d0d547b95..fb0aa90cb62b 100644 --- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx +++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx @@ -152,7 +152,7 @@ OUString URLParameter::get_title() } -OUString const & URLParameter::get_language() +OUString const & URLParameter::get_language() const { return m_aLanguage; } diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.hxx b/xmlhelp/source/cxxhelp/provider/urlparameter.hxx index b70b445c0b20..5b30916c278a 100644 --- a/xmlhelp/source/cxxhelp/provider/urlparameter.hxx +++ b/xmlhelp/source/cxxhelp/provider/urlparameter.hxx @@ -144,7 +144,7 @@ namespace chelp { return m_aModule; } - OUString const & get_language(); + OUString const & get_language() const; OUString const & get_program(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits