diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-15 11:27:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-16 08:45:17 +0200 |
commit | 98c4cd372bf0e9d4b5b129405f5af4562d8a0f64 (patch) | |
tree | f3aae749f01d0453a227b922a6ad3217171700d7 /chart2 | |
parent | 666901bc82fab69f9a80b564f97b5456d0ef684e (diff) |
loplugin:unusedfields improve write-only analysis
by whitelisting a couple of methods we know only write to their
parameters
Change-Id: Id7aef9c03c23d10c27707b21eb9a0db4a6c2757c
Reviewed-on: https://gerrit.libreoffice.org/37647
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/inc/MediaDescriptorHelper.hxx | 51 | ||||
-rw-r--r-- | chart2/source/tools/MediaDescriptorHelper.cxx | 48 |
2 files changed, 1 insertions, 98 deletions
diff --git a/chart2/source/inc/MediaDescriptorHelper.hxx b/chart2/source/inc/MediaDescriptorHelper.hxx index f0180640c716..488a31851b25 100644 --- a/chart2/source/inc/MediaDescriptorHelper.hxx +++ b/chart2/source/inc/MediaDescriptorHelper.hxx @@ -71,30 +71,15 @@ public: //@todo define this for debug only, except URL bool AsTemplate; //document is a template. bool ISSET_AsTemplate; - OUString Author; - bool ISSET_Author; - OUString CharacterSet; //identifier of used character set. - bool ISSET_CharacterSet; - OUString Comment; - bool ISSET_Comment; css::uno::Any ComponentData; bool ISSET_ComponentData; - OUString FileName; //deprecated, same as url - bool ISSET_FileName; css::uno::Any FilterData; bool ISSET_FilterData; OUString FilterName; //internal filter name. bool ISSET_FilterName; - OUString FilterFlags;//deprecated, - bool ISSET_FilterFlags; - OUString FilterOptions; - bool ISSET_FilterOptions; - //not documented ... @todo remove? - OUString FrameName; //name of target frame. - bool ISSET_FrameName; bool Hidden; //load document, invisible. bool ISSET_Hidden; @@ -107,50 +92,20 @@ public: css::uno::Reference< css::io::XInputStream > InputStream; //content of document. bool ISSET_InputStream; - css::uno::Reference< css::uno::XInterface > - InteractionHandler; //css::task::XInteractionHandler - bool ISSET_InteractionHandler; - - OUString JumpMark; //specifies the name of a mark within the document where the first view is to position itself. - bool ISSET_JumpMark; - OUString MediaType; //mime type. - bool ISSET_MediaType; - OUString OpenFlags; //deprecated - bool ISSET_OpenFlags; + bool OpenNewView; //opens a new view for an already loaded document. bool ISSET_OpenNewView; bool Overwrite; //opens a new view for an already loaded document. bool ISSET_Overwrite; - OUString Password; - bool ISSET_Password; - //not documented ... @todo remove? - css::awt::Rectangle - PosSize; //position and size of document window. - bool ISSET_PosSize; - - css::uno::Sequence< sal_Int8 > - PostData; //contains the data for HTTP post method as a sequence of bytes. - bool ISSET_PostData; - OUString PostString; //deprecated, contains the data for HTTP post method as a sequence of bytes. - bool ISSET_PostString; bool Preview; //show preview. bool ISSET_Preview; bool ReadOnly; //open document readonly. bool ISSET_ReadOnly; - OUString Referer; //name of document referrer. - bool ISSET_Referer; - css::uno::Reference< css::uno::XInterface > - StatusIndicator; //css::task::XStatusIndicator - bool ISSET_StatusIndicator; //not documented ... @todo remove? bool Silent; //prevents dialogs to query for more information. bool ISSET_Silent; - OUString TemplateName; //deprecated, name of the template instead of the URL. - bool ISSET_TemplateName; - OUString TemplateRegionName; //deprecated, name of the region of the template. - bool ISSET_TemplateRegionName; bool Unpacked; bool ISSET_Unpacked; OUString URL;// FileName, URL of the document. @@ -172,10 +127,6 @@ public: Stream; bool ISSET_Stream; - // undocumented SFX Properties - css::uno::Sequence< sal_Int32 > - WinExtent; - bool ISSET_WinExtent; bool SetEmbedded; bool ISSET_SetEmbedded; diff --git a/chart2/source/tools/MediaDescriptorHelper.cxx b/chart2/source/tools/MediaDescriptorHelper.cxx index b964efaa2b87..fda1f0d442f6 100644 --- a/chart2/source/tools/MediaDescriptorHelper.cxx +++ b/chart2/source/tools/MediaDescriptorHelper.cxx @@ -66,17 +66,14 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "Author") { - ISSET_Author = rProp.Value >>= Author; addModelProp(rProp); } else if (rProp.Name == "CharacterSet") { - ISSET_CharacterSet = rProp.Value >>= CharacterSet; addModelProp(rProp); } else if (rProp.Name == "Comment") { - ISSET_Comment = rProp.Value >>= Comment; addModelProp(rProp); } else if (rProp.Name == "ComponentData") @@ -87,7 +84,6 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "FileName") { - ISSET_FileName = rProp.Value >>= FileName; addDepreciatedProp(rProp); } else if (rProp.Name == "FilterData") @@ -103,17 +99,14 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "FilterFlags") { - ISSET_FilterFlags = rProp.Value >>= FilterFlags; addDepreciatedProp(rProp); } else if (rProp.Name == "FilterOptions") { - ISSET_FilterOptions = rProp.Value >>= FilterOptions; addModelProp(rProp); } else if (rProp.Name == "FrameName") { - ISSET_FrameName = rProp.Value >>= FrameName; addModelProp(rProp); } else if (rProp.Name == "Hidden") @@ -138,22 +131,18 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "InteractionHandler") { - ISSET_InteractionHandler = rProp.Value >>= InteractionHandler; addRegularProp(rProp); } else if (rProp.Name == "JumpMark") { - ISSET_JumpMark = rProp.Value >>= JumpMark; addRegularProp(rProp); } else if (rProp.Name == "MediaType") { - ISSET_MediaType = rProp.Value >>= MediaType; addModelProp(rProp); } else if (rProp.Name == "OpenFlags") { - ISSET_OpenFlags = rProp.Value >>= OpenFlags; addDepreciatedProp(rProp); } else if (rProp.Name == "OpenNewView") @@ -168,22 +157,18 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "Password") { - ISSET_Password = rProp.Value >>= Password; addModelProp(rProp); } else if (rProp.Name == "PosSize") { - ISSET_PosSize = rProp.Value >>= PosSize; addRegularProp(rProp); } else if (rProp.Name == "PostData") { - ISSET_PostData = rProp.Value >>= PostData; addRegularProp(rProp); } else if (rProp.Name == "PostString") { - ISSET_PostString = rProp.Value >>= PostString; addDepreciatedProp(rProp); } else if (rProp.Name == "Preview") @@ -198,7 +183,6 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "Referer") { - ISSET_Referer = rProp.Value >>= Referer; addModelProp(rProp); } else if (rProp.Name == "SetEmbedded") @@ -213,7 +197,6 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "StatusIndicator") { - ISSET_StatusIndicator = rProp.Value >>= StatusIndicator; addRegularProp(rProp); } else if (rProp.Name == "Storage") @@ -228,12 +211,10 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "TemplateName") { - ISSET_TemplateName = rProp.Value >>= TemplateName; addDepreciatedProp(rProp); } else if (rProp.Name == "TemplateRegionName") { - ISSET_TemplateRegionName = rProp.Value >>= TemplateRegionName; addDepreciatedProp(rProp); } else if (rProp.Name == "Unpacked") @@ -264,7 +245,6 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence< } else if (rProp.Name == "WinExtent") { - ISSET_WinExtent = rProp.Value >>= WinExtent; addDepreciatedProp(rProp); } else @@ -285,65 +265,37 @@ void MediaDescriptorHelper::impl_init() AsTemplate = false; ISSET_AsTemplate = false; - ISSET_Author = false; - ISSET_CharacterSet = false; - ISSET_Comment = false; - -// css::uno::Any ComponentData; ISSET_ComponentData = false; - ISSET_FileName = false; -// css::uno::Any FilterData; ISSET_FilterData = false; ISSET_FilterName = false; - ISSET_FilterFlags = false; - ISSET_FilterOptions = false; - ISSET_FrameName = false; Hidden = false; ISSET_Hidden = false; ISSET_HierarchicalDocumentName = false; ISSET_OutputStream = false; ISSET_InputStream = false; - ISSET_InteractionHandler = false; - ISSET_JumpMark = false; - ISSET_MediaType = false; - ISSET_OpenFlags = false; OpenNewView = false; ISSET_OpenNewView = false; Overwrite = false; ISSET_Overwrite = false; - ISSET_Password = false; - -// css::awt::Rectangle PosSize; - ISSET_PosSize = false; -// css::uno::Sequence< sal_Int8 > PostData; - ISSET_PostData = false; - ISSET_PostString = false; Preview = false; ISSET_Preview = false; ReadOnly = false; ISSET_ReadOnly = false; - ISSET_Referer = false; - ISSET_StatusIndicator = false; Silent = false; ISSET_Silent = false; - ISSET_TemplateName = false; - ISSET_TemplateRegionName = false; Unpacked = false; ISSET_Unpacked = false; ISSET_URL = false; Version = 0; ISSET_Version = false; -// css::uno::Any ViewData; ISSET_ViewData = false; ViewId = 0; ISSET_ViewId = false; - ISSET_WinExtent = false; - SetEmbedded = false; ISSET_SetEmbedded = false; |