loplugin:unusedfields in tools..xmlhelp
Change-Id: I5e909a8def86ce9ad150440e6c6ad304e855cc69 Reviewed-on: https://gerrit.libreoffice.org/54415 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -17,14 +17,12 @@ struct Encoder
|
|||||||
{
|
{
|
||||||
rtl_UnicodeToTextConverter m_aConverter;
|
rtl_UnicodeToTextConverter m_aConverter;
|
||||||
bool m_bCapable;
|
bool m_bCapable;
|
||||||
rtl_TextEncoding m_nEncoding;
|
|
||||||
const char *m_pEncoding;
|
const char *m_pEncoding;
|
||||||
Encoder(rtl_TextEncoding nEncoding, const char *pEncoding)
|
Encoder(rtl_TextEncoding nEncoding, const char *pEncoding)
|
||||||
: m_bCapable(true)
|
: m_bCapable(true)
|
||||||
, m_nEncoding(nEncoding)
|
|
||||||
, m_pEncoding(pEncoding)
|
, m_pEncoding(pEncoding)
|
||||||
{
|
{
|
||||||
m_aConverter = rtl_createUnicodeToTextConverter(m_nEncoding);
|
m_aConverter = rtl_createUnicodeToTextConverter(nEncoding);
|
||||||
}
|
}
|
||||||
~Encoder()
|
~Encoder()
|
||||||
{
|
{
|
||||||
|
@@ -47,7 +47,6 @@ XInteractionRequestImpl::XInteractionRequestImpl(
|
|||||||
p2( new XInteractionAbortImpl ),
|
p2( new XInteractionAbortImpl ),
|
||||||
m_nErrorCode(0),
|
m_nErrorCode(0),
|
||||||
m_nMinorError(0),
|
m_nMinorError(0),
|
||||||
m_aClashingName(aClashingName),
|
|
||||||
m_xOrigin(xOrigin)
|
m_xOrigin(xOrigin)
|
||||||
{
|
{
|
||||||
if( pShell )
|
if( pShell )
|
||||||
@@ -59,7 +58,7 @@ XInteractionRequestImpl::XInteractionRequestImpl(
|
|||||||
if(m_nErrorCode == TASKHANDLING_FOLDER_EXISTS_MKDIR)
|
if(m_nErrorCode == TASKHANDLING_FOLDER_EXISTS_MKDIR)
|
||||||
{
|
{
|
||||||
NameClashException excep;
|
NameClashException excep;
|
||||||
excep.Name = m_aClashingName;
|
excep.Name = aClashingName;
|
||||||
excep.Classification = InteractionClassification_ERROR;
|
excep.Classification = InteractionClassification_ERROR;
|
||||||
excep.Context = m_xOrigin;
|
excep.Context = m_xOrigin;
|
||||||
excep.Message = "folder exists and overwrite forbidden";
|
excep.Message = "folder exists and overwrite forbidden";
|
||||||
@@ -72,7 +71,7 @@ XInteractionRequestImpl::XInteractionRequestImpl(
|
|||||||
PropertyValue prop;
|
PropertyValue prop;
|
||||||
prop.Name = "ResourceName";
|
prop.Name = "ResourceName";
|
||||||
prop.Handle = -1;
|
prop.Handle = -1;
|
||||||
prop.Value <<= m_aClashingName;
|
prop.Value <<= aClashingName;
|
||||||
Sequence<Any> seq(1);
|
Sequence<Any> seq(1);
|
||||||
seq[0] <<= prop;
|
seq[0] <<= prop;
|
||||||
excep.Arguments = seq;
|
excep.Arguments = seq;
|
||||||
|
@@ -135,7 +135,6 @@ class XInteractionSupplyNameImpl : public cppu::WeakImplHelper<
|
|||||||
|
|
||||||
css::uno::Reference<css::task::XInteractionRequest> m_xRequest;
|
css::uno::Reference<css::task::XInteractionRequest> m_xRequest;
|
||||||
|
|
||||||
OUString m_aClashingName;
|
|
||||||
css::uno::Reference< css::uno::XInterface> m_xOrigin;
|
css::uno::Reference< css::uno::XInterface> m_xOrigin;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -36,7 +36,6 @@ using namespace com::sun::star::ucb;
|
|||||||
|
|
||||||
XPropertySetInfo_impl::XPropertySetInfo_impl( TaskManager* pMyShell,const OUString& aUnqPath )
|
XPropertySetInfo_impl::XPropertySetInfo_impl( TaskManager* pMyShell,const OUString& aUnqPath )
|
||||||
: m_pMyShell( pMyShell ),
|
: m_pMyShell( pMyShell ),
|
||||||
m_count( 0 ),
|
|
||||||
m_seq( 0 )
|
m_seq( 0 )
|
||||||
{
|
{
|
||||||
m_pMyShell->m_pProvider->acquire();
|
m_pMyShell->m_pProvider->acquire();
|
||||||
@@ -48,9 +47,10 @@ XPropertySetInfo_impl::XPropertySetInfo_impl( TaskManager* pMyShell,const OUStri
|
|||||||
|
|
||||||
m_seq.realloc( properties.size() );
|
m_seq.realloc( properties.size() );
|
||||||
|
|
||||||
|
sal_Int32 count = 0;
|
||||||
while( it1 != properties.end() )
|
while( it1 != properties.end() )
|
||||||
{
|
{
|
||||||
m_seq[ m_count++ ] = beans::Property( it1->getPropertyName(),
|
m_seq[ count++ ] = beans::Property( it1->getPropertyName(),
|
||||||
it1->getHandle(),
|
it1->getHandle(),
|
||||||
it1->getType(),
|
it1->getType(),
|
||||||
it1->getAttributes() );
|
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 )
|
XPropertySetInfo_impl::XPropertySetInfo_impl( TaskManager* pMyShell,const Sequence< beans::Property >& seq )
|
||||||
: m_pMyShell( pMyShell ),
|
: m_pMyShell( pMyShell ),
|
||||||
m_count( seq.getLength() ),
|
|
||||||
m_seq( seq )
|
m_seq( seq )
|
||||||
{
|
{
|
||||||
m_pMyShell->m_pProvider->acquire();
|
m_pMyShell->m_pProvider->acquire();
|
||||||
|
@@ -48,7 +48,6 @@ class XPropertySetInfo_impl : public cppu::WeakImplHelper<
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
TaskManager* m_pMyShell;
|
TaskManager* m_pMyShell;
|
||||||
sal_Int32 m_count;
|
|
||||||
css::uno::Sequence< css::beans::Property > m_seq;
|
css::uno::Sequence< css::beans::Property > m_seq;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -118,7 +118,6 @@ TaskManager::MyProperty::~MyProperty()
|
|||||||
TaskManager::TaskManager( const uno::Reference< uno::XComponentContext >& rxContext,
|
TaskManager::TaskManager( const uno::Reference< uno::XComponentContext >& rxContext,
|
||||||
FileProvider* pProvider, bool bWithConfig )
|
FileProvider* pProvider, bool bWithConfig )
|
||||||
: m_nCommandId( 0 ),
|
: m_nCommandId( 0 ),
|
||||||
m_bWithConfig( bWithConfig ),
|
|
||||||
m_pProvider( pProvider ),
|
m_pProvider( pProvider ),
|
||||||
m_xContext( rxContext ),
|
m_xContext( rxContext ),
|
||||||
Title( "Title" ),
|
Title( "Title" ),
|
||||||
@@ -351,7 +350,7 @@ TaskManager::TaskManager( const uno::Reference< uno::XComponentContext >& rxCont
|
|||||||
m_sCommandInfo[8].Handle = -1;
|
m_sCommandInfo[8].Handle = -1;
|
||||||
m_sCommandInfo[8].ArgType = cppu::UnoType<ucb::ContentInfo>::get();
|
m_sCommandInfo[8].ArgType = cppu::UnoType<ucb::ContentInfo>::get();
|
||||||
|
|
||||||
if(m_bWithConfig)
|
if(bWithConfig)
|
||||||
{
|
{
|
||||||
uno::Reference< XPropertySetRegistryFactory > xRegFac = ucb::Store::create( m_xContext );
|
uno::Reference< XPropertySetRegistryFactory > xRegFac = ucb::Store::create( m_xContext );
|
||||||
// Open/create a registry
|
// Open/create a registry
|
||||||
|
@@ -503,7 +503,6 @@ namespace fileaccess
|
|||||||
static bool getUrlFromUnq( const OUString& Unq, OUString& Url );
|
static bool getUrlFromUnq( const OUString& Unq, OUString& Url );
|
||||||
|
|
||||||
|
|
||||||
bool m_bWithConfig;
|
|
||||||
FileProvider* m_pProvider;
|
FileProvider* m_pProvider;
|
||||||
css::uno::Reference< css::uno::XComponentContext > m_xContext;
|
css::uno::Reference< css::uno::XComponentContext > m_xContext;
|
||||||
css::uno::Reference< css::ucb::XPropertySetRegistry > m_xFileRegistry;
|
css::uno::Reference< css::ucb::XPropertySetRegistry > m_xFileRegistry;
|
||||||
|
@@ -86,19 +86,10 @@ class SvtExtendedSecurityOptions_Impl : public ConfigItem
|
|||||||
|
|
||||||
static Sequence< OUString > GetPropertyNames();
|
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_aSecureExtensionsSetName;
|
||||||
OUString m_aExtensionPropName;
|
OUString m_aExtensionPropName;
|
||||||
|
|
||||||
SvtExtendedSecurityOptions::OpenHyperlinkMode m_eOpenHyperlinkMode;
|
SvtExtendedSecurityOptions::OpenHyperlinkMode m_eOpenHyperlinkMode;
|
||||||
ExtensionHashMap m_aExtensionHashMap;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
@@ -111,9 +102,6 @@ SvtExtendedSecurityOptions_Impl::SvtExtendedSecurityOptions_Impl()
|
|||||||
, m_eOpenHyperlinkMode(SvtExtendedSecurityOptions::OPEN_NEVER)
|
, m_eOpenHyperlinkMode(SvtExtendedSecurityOptions::OPEN_NEVER)
|
||||||
// Init member then.
|
// Init member then.
|
||||||
{
|
{
|
||||||
// Fill the extension hash map with all secure extension strings
|
|
||||||
FillExtensionHashMap( m_aExtensionHashMap );
|
|
||||||
|
|
||||||
Sequence< OUString > seqNames = GetPropertyNames();
|
Sequence< OUString > seqNames = GetPropertyNames();
|
||||||
Sequence< Any > seqValues = GetProperties( seqNames );
|
Sequence< Any > seqValues = GetProperties( seqNames );
|
||||||
|
|
||||||
@@ -183,43 +171,6 @@ void SvtExtendedSecurityOptions_Impl::ImplCommit()
|
|||||||
PutProperties( seqNames, seqValues );
|
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)
|
// private method (currently not used)
|
||||||
|
|
||||||
Sequence< OUString > SvtExtendedSecurityOptions_Impl::GetPropertyNames()
|
Sequence< OUString > SvtExtendedSecurityOptions_Impl::GetPropertyNames()
|
||||||
|
@@ -35,11 +35,10 @@ IMPL_LINK_NOARG(MasterPasswordDialog, OKHdl_Impl, Button*, void)
|
|||||||
MasterPasswordDialog::MasterPasswordDialog
|
MasterPasswordDialog::MasterPasswordDialog
|
||||||
(
|
(
|
||||||
vcl::Window* pParent,
|
vcl::Window* pParent,
|
||||||
css::task::PasswordRequestMode aDialogMode,
|
css::task::PasswordRequestMode nDialogMode,
|
||||||
const std::locale& rLocale
|
const std::locale& rLocale
|
||||||
)
|
)
|
||||||
: ModalDialog(pParent, "MasterPasswordDialog", "uui/ui/masterpassworddlg.ui")
|
: ModalDialog(pParent, "MasterPasswordDialog", "uui/ui/masterpassworddlg.ui")
|
||||||
, nDialogMode(aDialogMode)
|
|
||||||
, rResLocale(rLocale)
|
, rResLocale(rLocale)
|
||||||
{
|
{
|
||||||
get(m_pEDMasterPassword, "password");
|
get(m_pEDMasterPassword, "password");
|
||||||
|
@@ -42,7 +42,6 @@ public:
|
|||||||
OUString GetMasterPassword() const { return m_pEDMasterPassword->GetText(); }
|
OUString GetMasterPassword() const { return m_pEDMasterPassword->GetText(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
css::task::PasswordRequestMode nDialogMode;
|
|
||||||
const std::locale& rResLocale;
|
const std::locale& rResLocale;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
using namespace ::com::sun::star;
|
using namespace ::com::sun::star;
|
||||||
|
|
||||||
PasswordDialog::PasswordDialog(weld::Window* pParent,
|
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)
|
const OUString& aDocURL, bool bOpenToModify, bool bIsSimplePasswordRequest)
|
||||||
: GenericDialogController(pParent, "uui/ui/password.ui", "PasswordDialog")
|
: GenericDialogController(pParent, "uui/ui/password.ui", "PasswordDialog")
|
||||||
, m_xFTPassword(m_xBuilder->weld_label("newpassFT"))
|
, m_xFTPassword(m_xBuilder->weld_label("newpassFT"))
|
||||||
@@ -38,7 +38,6 @@ PasswordDialog::PasswordDialog(weld::Window* pParent,
|
|||||||
, m_xOKBtn(m_xBuilder->weld_button("ok"))
|
, m_xOKBtn(m_xBuilder->weld_button("ok"))
|
||||||
, nMinLen(1)
|
, nMinLen(1)
|
||||||
, aPasswdMismatch(Translate::get(STR_PASSWORD_MISMATCH, rLocale))
|
, aPasswdMismatch(Translate::get(STR_PASSWORD_MISMATCH, rLocale))
|
||||||
, nDialogMode(nDlgMode)
|
|
||||||
, rResLocale(rLocale)
|
, rResLocale(rLocale)
|
||||||
{
|
{
|
||||||
if( nDialogMode == task::PasswordRequestMode_PASSWORD_REENTER )
|
if( nDialogMode == task::PasswordRequestMode_PASSWORD_REENTER )
|
||||||
|
@@ -44,7 +44,6 @@ public:
|
|||||||
OUString GetPassword() const { return m_xEDPassword->get_text(); }
|
OUString GetPassword() const { return m_xEDPassword->get_text(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
css::task::PasswordRequestMode nDialogMode;
|
|
||||||
const std::locale& rResLocale;
|
const std::locale& rResLocale;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -113,10 +113,9 @@ class DocumentsAccessImpl : public DocumentsAccessImpl_BASE
|
|||||||
uno::Reference< uno::XComponentContext > m_xContext;
|
uno::Reference< uno::XComponentContext > m_xContext;
|
||||||
Documents m_documents;
|
Documents m_documents;
|
||||||
NameIndexHash namesToIndices;
|
NameIndexHash namesToIndices;
|
||||||
VbaDocumentsBase::DOCUMENT_TYPE meDocType;
|
|
||||||
public:
|
public:
|
||||||
/// @throws uno::RuntimeException
|
/// @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 );
|
uno::Reference< container::XEnumeration > xEnum = new DocumentsEnumImpl( m_xContext );
|
||||||
sal_Int32 nIndex=0;
|
sal_Int32 nIndex=0;
|
||||||
@@ -124,8 +123,8 @@ public:
|
|||||||
{
|
{
|
||||||
uno::Reference< lang::XServiceInfo > xServiceInfo( xEnum->nextElement(), uno::UNO_QUERY );
|
uno::Reference< lang::XServiceInfo > xServiceInfo( xEnum->nextElement(), uno::UNO_QUERY );
|
||||||
if ( xServiceInfo.is()
|
if ( xServiceInfo.is()
|
||||||
&& ( ( xServiceInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) && meDocType == VbaDocumentsBase::EXCEL_DOCUMENT )
|
&& ( ( xServiceInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) && eDocType == VbaDocumentsBase::EXCEL_DOCUMENT )
|
||||||
|| ( xServiceInfo->supportsService( "com.sun.star.text.TextDocument" ) && meDocType == VbaDocumentsBase::WORD_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
|
uno::Reference< frame::XModel > xModel( xServiceInfo, uno::UNO_QUERY_THROW ); // that the spreadsheetdocument is a xmodel is a given
|
||||||
m_documents.push_back( xModel );
|
m_documents.push_back( xModel );
|
||||||
|
@@ -34,11 +34,9 @@ ResultSetForRoot::ResultSetForRoot( const uno::Reference< uno::XComponentContext
|
|||||||
const uno::Sequence< beans::Property >& seq,
|
const uno::Sequence< beans::Property >& seq,
|
||||||
URLParameter const & aURLParameter,
|
URLParameter const & aURLParameter,
|
||||||
Databases* pDatabases )
|
Databases* pDatabases )
|
||||||
: ResultSetBase( rxContext, xProvider,seq ),
|
: ResultSetBase( rxContext, xProvider,seq )
|
||||||
m_aURLParameter( aURLParameter ),
|
|
||||||
m_pDatabases( pDatabases )
|
|
||||||
{
|
{
|
||||||
m_aPath = m_pDatabases->getModuleList( m_aURLParameter.get_language() );
|
m_aPath = pDatabases->getModuleList( aURLParameter.get_language() );
|
||||||
m_aItems.resize( m_aPath.size() );
|
m_aItems.resize( m_aPath.size() );
|
||||||
m_aIdents.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://" +
|
"vnd.sun.star.help://" +
|
||||||
m_aPath[i] +
|
m_aPath[i] +
|
||||||
"?Language=" +
|
"?Language=" +
|
||||||
m_aURLParameter.get_language() +
|
aURLParameter.get_language() +
|
||||||
"&System=" +
|
"&System=" +
|
||||||
m_aURLParameter.get_system();
|
aURLParameter.get_system();
|
||||||
|
|
||||||
m_nRow = sal_Int32( i );
|
m_nRow = sal_Int32( i );
|
||||||
|
|
||||||
|
@@ -41,12 +41,6 @@ namespace chelp {
|
|||||||
const css::uno::Sequence< css::beans::Property >& seq,
|
const css::uno::Sequence< css::beans::Property >& seq,
|
||||||
URLParameter const & aURLParameter,
|
URLParameter const & aURLParameter,
|
||||||
Databases* pDatabases );
|
Databases* pDatabases );
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
URLParameter m_aURLParameter;
|
|
||||||
Databases* m_pDatabases;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -152,7 +152,7 @@ OUString URLParameter::get_title()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
OUString const & URLParameter::get_language()
|
OUString const & URLParameter::get_language() const
|
||||||
{
|
{
|
||||||
return m_aLanguage;
|
return m_aLanguage;
|
||||||
}
|
}
|
||||||
|
@@ -144,7 +144,7 @@ namespace chelp {
|
|||||||
return m_aModule;
|
return m_aModule;
|
||||||
}
|
}
|
||||||
|
|
||||||
OUString const & get_language();
|
OUString const & get_language() const;
|
||||||
|
|
||||||
OUString const & get_program();
|
OUString const & get_program();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user