[Libreoffice-commits] core.git: compilerplugins/clang drawinglayer/source filter/source formula/source include/drawinglayer include/filter include/formula include/oox include/sfx2 include/svl include/svtools include/svx include/tools oox/source sd/source sfx2/source svl/source svtools/source svx/source sw/source tools/source
Noel Grandin
noel.grandin at collabora.co.uk
Fri Sep 16 06:20:49 UTC 2016
compilerplugins/clang/singlevalfields.py | 17 ++-
drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx | 4
drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx | 4
filter/source/msfilter/msdffimp.cxx | 2
filter/source/msfilter/svdfppt.cxx | 22 ----
formula/source/ui/dlg/formula.cxx | 8 -
include/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx | 2
include/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx | 2
include/filter/msfilter/msdffimp.hxx | 1
include/filter/msfilter/svdfppt.hxx | 15 ---
include/formula/formdata.hxx | 4
include/oox/dump/dumperbase.hxx | 11 --
include/oox/ole/vbaexport.hxx | 1
include/sfx2/templatedefaultview.hxx | 1
include/svl/filerec.hxx | 1
include/svtools/HtmlWriter.hxx | 1
include/svtools/framestatuslistener.hxx | 3
include/svx/dlgctl3d.hxx | 1
include/svx/svdmark.hxx | 1
include/svx/textchainflow.hxx | 1
include/tools/b3dtrans.hxx | 1
include/tools/config.hxx | 1
include/tools/pstm.hxx | 1
oox/source/dump/dumperbase.cxx | 13 --
oox/source/ole/vbaexport.cxx | 2
sd/source/filter/ppt/pptin.cxx | 2
sfx2/source/control/templatedefaultview.cxx | 1
svl/source/filerec/filerec.cxx | 3
svtools/source/svhtml/HtmlWriter.cxx | 5 -
svtools/source/uno/framestatuslistener.cxx | 59 ++++---------
svx/source/dialog/dlgctl3d.cxx | 5 -
svx/source/svdraw/svdmark.cxx | 38 --------
svx/source/svdraw/textchainflow.cxx | 2
sw/source/filter/ww8/ww8graf.cxx | 9 -
tools/source/generic/b3dtrans.cxx | 10 --
tools/source/generic/config.cxx | 9 -
tools/source/ref/pstm.cxx | 8 -
37 files changed, 56 insertions(+), 215 deletions(-)
New commits:
commit 96e9ffa64706f523d67659a20a0ccce6fbd0cb91
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Sep 15 14:36:33 2016 +0200
loplogin:singlevalfields in include/
Change-Id: I27842162fcf82120ecb811ee8e89e187430931fc
Reviewed-on: https://gerrit.libreoffice.org/28931
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/singlevalfields.py b/compilerplugins/clang/singlevalfields.py
index 1c0a7b8..eb5a7b0 100755
--- a/compilerplugins/clang/singlevalfields.py
+++ b/compilerplugins/clang/singlevalfields.py
@@ -34,6 +34,12 @@ with io.open("loplugin.singlevalfields.log", "rb", buffering=1024*1024) as txt:
tmp1list = list()
for fieldInfo, assignValues in fieldAssignDict.iteritems():
+ v0 = fieldInfo[0] + " " + fieldInfo[1]
+ v1 = (",".join(assignValues))
+ v2 = ""
+ if fieldInfo not in definitionToSourceLocationMap:
+ continue
+ v2 = definitionToSourceLocationMap[fieldInfo]
if len(assignValues) != 1:
continue
if "?" in assignValues:
@@ -46,19 +52,16 @@ for fieldInfo, assignValues in fieldAssignDict.iteritems():
continue
# ignore things which are representations of on-disk structures
if containingClass in ["SEPr", "WW8Dop", "BmpInfoHeader", "BmpFileHeader", "Exif::ExifIFD",
- "sw::WW8FFData", "FFDataHeader", "INetURLHistory_Impl::head_entry"]:
+ "sw::WW8FFData", "FFDataHeader", "INetURLHistory_Impl::head_entry", "ImplPPTParaPropSet", "SvxSwAutoFormatFlags"]:
continue
# Windows-only
- if containingClass in ["SfxAppData_Impl", "sfx2::ImplDdeItem"]:
+ if containingClass in ["SfxAppData_Impl", "sfx2::ImplDdeItem", "SvFileStream", "DdeService", "DdeTopic", "DdeItem", "DdeConnection", "connectivity::sdbcx::OUser", "connectivity::sdbcx::OGroup", "connectivity::sdbcx::OCatalog"]:
+ continue
+ if v2.startswith("include/svl/svdde.hxx"):
continue
# Some of our supported compilers don't do constexpr, which means o3tl::typed_flags can't be 'static const'
if containingClass in ["WaitWindow_Impl"]:
continue
- v0 = fieldInfo[0] + " " + fieldInfo[1]
- v1 = (",".join(assignValues))
- v2 = ""
- if fieldInfo in definitionToSourceLocationMap:
- v2 = definitionToSourceLocationMap[fieldInfo]
tmp1list.append((v0,v1,v2))
# sort results by filename:lineno
diff --git a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
index ce69c28..9cfbba2 100644
--- a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
@@ -78,7 +78,7 @@ namespace drawinglayer
// create geometry
::std::vector< basegfx::B3DPolyPolygon > aFill;
extractPlanesFromSlice(aFill, rSliceVector,
- bCreateNormals, getSmoothHorizontalNormals(), getSmoothNormals(), getSmoothLids(), false,
+ bCreateNormals, true/*smoothHorizontalNormals*/, getSmoothNormals(), getSmoothLids(), false,
0.5, 0.6, bCreateTextureCoordinatesX || bCreateTextureCoordinatesY, aTexTransform);
// get full range
@@ -406,7 +406,6 @@ namespace drawinglayer
mfBackScale(fBackScale),
mpLastRLGViewInformation(nullptr),
mbSmoothNormals(bSmoothNormals),
- mbSmoothHorizontalNormals(true),
mbSmoothLids(bSmoothLids),
mbCharacterMode(bCharacterMode),
mbCloseFront(bCloseFront),
@@ -460,7 +459,6 @@ namespace drawinglayer
&& getDiagonal() == rCompare.getDiagonal()
&& getBackScale() == rCompare.getBackScale()
&& getSmoothNormals() == rCompare.getSmoothNormals()
- && getSmoothHorizontalNormals() == rCompare.getSmoothHorizontalNormals()
&& getSmoothLids() == rCompare.getSmoothLids()
&& getCharacterMode() == rCompare.getCharacterMode()
&& getCloseFront() == rCompare.getCloseFront()
diff --git a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
index 89eeea9..64041d8 100644
--- a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
@@ -73,7 +73,7 @@ namespace drawinglayer
// create geometry
::std::vector< basegfx::B3DPolyPolygon > aFill;
extractPlanesFromSlice(aFill, rSliceVector,
- bCreateNormals, getSmoothHorizontalNormals(), getSmoothNormals(), getSmoothLids(), bClosedRotation,
+ bCreateNormals, true/*smoothHorizontalNormals*/, getSmoothNormals(), getSmoothLids(), bClosedRotation,
0.85, 0.6, bCreateTextureCoordinatesX || bCreateTextureCoordinatesY, aTexTransform);
// get full range
@@ -266,7 +266,6 @@ namespace drawinglayer
mfRotation(fRotation),
mpLastRLGViewInformation(nullptr),
mbSmoothNormals(bSmoothNormals),
- mbSmoothHorizontalNormals(true),
mbSmoothLids(bSmoothLids),
mbCharacterMode(bCharacterMode),
mbCloseFront(bCloseFront),
@@ -322,7 +321,6 @@ namespace drawinglayer
&& getBackScale() == rCompare.getBackScale()
&& getRotation() == rCompare.getRotation()
&& getSmoothNormals() == rCompare.getSmoothNormals()
- && getSmoothHorizontalNormals() == rCompare.getSmoothHorizontalNormals()
&& getSmoothLids() == rCompare.getSmoothLids()
&& getCharacterMode() == rCompare.getCharacterMode()
&& getCloseFront() == rCompare.getCloseFront()
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index eccd42a6..6e2c7bd 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -7280,7 +7280,6 @@ SvxMSDffImportRec::SvxMSDffImportRec()
pYRelTo( nullptr ), // relative to paragraph
nLayoutInTableCell( 0 ), // element is laid out in table cell
nFlags( 0 ),
- nTextRotationAngle( 0 ),
nDxTextLeft( 144 ),
nDyTextTop( 72 ),
nDxTextRight( 144 ),
@@ -7319,7 +7318,6 @@ SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy)
pYRelTo( nullptr ),
nLayoutInTableCell( rCopy.nLayoutInTableCell ),
nFlags( rCopy.nFlags ),
- nTextRotationAngle( rCopy.nTextRotationAngle ),
nDxTextLeft( rCopy.nDxTextLeft ),
nDyTextTop( rCopy.nDyTextTop ),
nDxTextRight( rCopy.nDxTextRight ),
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 3cf9ee9..f9a2c19 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1464,7 +1464,6 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const O
ReadFontCollection();
// reading TxPF, TxSI
- PPTTextCharacterStyleAtomInterpreter aTxCFStyle; // SJ: TODO, this atom needs to be interpreted, it contains character default styles for standard objects (instance4)
PPTTextParagraphStyleAtomInterpreter aTxPFStyle;
PPTTextSpecInfoAtomInterpreter aTxSIStyle; // styles (default language setting ... )
@@ -1607,7 +1606,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const O
if ( aTxSIStyle.bValid && !aTxSIStyle.aList.empty() )
aTxSI = *( aTxSIStyle.aList[ 0 ] );
- rE2.pStyleSheet = new PPTStyleSheet( aSlideHd, rStCtrl, *this, aTxCFStyle, aTxPFStyle, aTxSI );
+ rE2.pStyleSheet = new PPTStyleSheet( aSlideHd, rStCtrl, *this, aTxPFStyle, aTxSI );
pDefaultSheet = rE2.pStyleSheet;
}
if ( SeekToRec( rStCtrl, PPT_PST_ColorSchemeAtom, aSlideHd.GetRecEndFilePos() ) )
@@ -4026,8 +4025,8 @@ void PPTParaSheet::UpdateBulletRelSize( sal_uInt32 nLevel, sal_uInt16 nFontHeig
}
PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, SdrPowerPointImport& rManager,
- const PPTTextCharacterStyleAtomInterpreter& /*rTxCFStyle*/, const PPTTextParagraphStyleAtomInterpreter& rTxPFStyle,
- const PPTTextSpecInfo& rTextSpecInfo ) :
+ const PPTTextParagraphStyleAtomInterpreter& rTxPFStyle,
+ const PPTTextSpecInfo& rTextSpecInfo ) :
PPTNumberFormatCreator ( new PPTExtParaProv( rManager, rIn, &rSlideHd ) ),
maTxSI ( rTextSpecInfo )
@@ -4638,21 +4637,6 @@ PPTTextRulerInterpreter::~PPTTextRulerInterpreter()
delete mpImplRuler;
}
-PPTTextCharacterStyleAtomInterpreter::PPTTextCharacterStyleAtomInterpreter()
- : nFlags1(0)
- , nFlags2(0)
- , nFlags3(0)
- , n1(0)
- , nFontHeight(0)
- , nFontColor(0)
-{
-}
-
-
-PPTTextCharacterStyleAtomInterpreter::~PPTTextCharacterStyleAtomInterpreter()
-{
-}
-
PPTTextParagraphStyleAtomInterpreter::PPTTextParagraphStyleAtomInterpreter() :
bValid ( false ),
bForbiddenRules ( false ),
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 6173a5a..b24759e 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -828,8 +828,8 @@ void FormulaDlg_Impl::FillListboxes()
}
else if ( pData )
{
- pFuncPage->SetCategory( pData->GetCatSel() );
- pFuncPage->SetFunction( pData->GetFuncSel() );
+ pFuncPage->SetCategory( 1 );
+ pFuncPage->SetFunction( LISTBOX_ENTRY_NOTFOUND );
}
FuncSelHdl(*pFuncPage);
@@ -1902,8 +1902,6 @@ void FormEditData::Reset()
pParent = nullptr;
nMode = 0;
nFStart = 0;
- nCatSel = 1; //! oder 0 (zuletzt benutzte)
- nFuncSel = LISTBOX_ENTRY_NOTFOUND;
nOffset = 0;
nEdFocus = 0;
bMatrix = false;
@@ -1918,8 +1916,6 @@ FormEditData& FormEditData::operator=( const FormEditData& r )
pParent = r.pParent;
nMode = r.nMode;
nFStart = r.nFStart;
- nCatSel = r.nCatSel;
- nFuncSel = r.nFuncSel;
nOffset = r.nOffset;
nEdFocus = r.nEdFocus;
aUndoStr = r.aUndoStr;
diff --git a/include/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx b/include/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
index 5e67ffe..42bfd73 100644
--- a/include/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
+++ b/include/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
@@ -58,7 +58,6 @@ namespace drawinglayer
geometry::ViewInformation3D* mpLastRLGViewInformation;
bool mbSmoothNormals : 1; // Plane self
- bool mbSmoothHorizontalNormals : 1; // always
bool mbSmoothLids : 1; // Front/back
bool mbCharacterMode : 1;
bool mbCloseFront : 1;
@@ -98,7 +97,6 @@ namespace drawinglayer
double getDiagonal() const { return mfDiagonal; }
double getBackScale() const { return mfBackScale; }
bool getSmoothNormals() const { return mbSmoothNormals; }
- bool getSmoothHorizontalNormals() const { return mbSmoothHorizontalNormals; }
bool getSmoothLids() const { return mbSmoothLids; }
bool getCharacterMode() const { return mbCharacterMode; }
bool getCloseFront() const { return mbCloseFront; }
diff --git a/include/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx b/include/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
index d4fabef..a26aea5 100644
--- a/include/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
+++ b/include/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
@@ -60,7 +60,6 @@ namespace drawinglayer
geometry::ViewInformation3D* mpLastRLGViewInformation;
bool mbSmoothNormals : 1; // Plane self
- bool mbSmoothHorizontalNormals : 1; // always
bool mbSmoothLids : 1; // Front/back
bool mbCharacterMode : 1;
bool mbCloseFront : 1;
@@ -104,7 +103,6 @@ namespace drawinglayer
double getBackScale() const { return mfBackScale; }
double getRotation() const { return mfRotation; }
bool getSmoothNormals() const { return mbSmoothNormals; }
- bool getSmoothHorizontalNormals() const { return mbSmoothHorizontalNormals; }
bool getSmoothLids() const { return mbSmoothLids; }
bool getCharacterMode() const { return mbCharacterMode; }
bool getCloseFront() const { return mbCloseFront; }
diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx
index 3eca3ca..9b5ccd6 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -224,7 +224,6 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec
sal_uInt32 *pYRelTo;
sal_uInt32 nLayoutInTableCell;
sal_uInt32 nFlags;
- sal_Int32 nTextRotationAngle;
sal_Int32 nDxTextLeft; ///< distance of text box from surrounding shape
sal_Int32 nDyTextTop;
sal_Int32 nDxTextRight;
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index 8b8f121..edab0cb 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -113,7 +113,6 @@ struct SdHyperlinkEntry
OUString aSubAdress;
sal_Int32 nStartPos;
- sal_Int32 nEndPos;
OUString aConvSubString;
};
@@ -631,19 +630,6 @@ public:
virtual bool ReadFormControl( tools::SvRef<SotStorage>& rSrc1, css::uno::Reference< css::form::XFormComponent > & rFormComp ) const = 0;
};
-struct PPTTextCharacterStyleAtomInterpreter
-{
- sal_uInt16 nFlags1;
- sal_uInt16 nFlags2;
- sal_uInt16 nFlags3;
- sal_Int32 n1;
- sal_uInt16 nFontHeight;
- sal_Int32 nFontColor;
-
- PPTTextCharacterStyleAtomInterpreter();
- ~PPTTextCharacterStyleAtomInterpreter();
-};
-
struct PPTTextParagraphStyleAtomInterpreter
{
bool bValid;
@@ -861,7 +847,6 @@ struct PPTStyleSheet : public PPTNumberFormatCreator
PPTStyleSheet(
const DffRecordHeader& rSlideHd,
SvStream& rSt, SdrPowerPointImport&,
- const PPTTextCharacterStyleAtomInterpreter&,
const PPTTextParagraphStyleAtomInterpreter&,
const PPTTextSpecInfo&
);
diff --git a/include/formula/formdata.hxx b/include/formula/formdata.hxx
index eb66e59..b708244 100644
--- a/include/formula/formdata.hxx
+++ b/include/formula/formdata.hxx
@@ -39,8 +39,6 @@ public:
inline sal_uInt16 GetMode() const { return nMode; }
inline sal_Int32 GetFStart() const { return nFStart; }
- inline sal_Int32 GetCatSel() const { return nCatSel; }
- inline sal_Int32 GetFuncSel() const { return nFuncSel; }
inline sal_uInt16 GetOffset() const { return nOffset; }
inline sal_uInt16 GetEdFocus() const { return nEdFocus; }
inline const OUString& GetUndoStr() const { return aUndoStr; }
@@ -65,8 +63,6 @@ protected:
private:
sal_uInt16 nMode; // enum ScFormulaDlgMode
sal_Int32 nFStart;
- sal_Int32 nCatSel;
- sal_Int32 nFuncSel;
sal_uInt16 nOffset;
sal_uInt16 nEdFocus;
OUString aUndoStr;
diff --git a/include/oox/dump/dumperbase.hxx b/include/oox/dump/dumperbase.hxx
index f1358c6..3b86e9b 100644
--- a/include/oox/dump/dumperbase.hxx
+++ b/include/oox/dump/dumperbase.hxx
@@ -779,8 +779,6 @@ public:
void eraseNameList( const OUString& rListName );
NameListRef getNameList( const OUString& rListName ) const;
- bool isPasswordCancelled() const { return mbPwCancelled; }
-
protected:
virtual bool implIsValid() const override;
virtual void implProcessConfigItemStr(
@@ -808,7 +806,6 @@ private:
NameListMap maNameLists;
OUString maConfigPath;
bool mbLoaded;
- bool mbPwCancelled;
};
@@ -872,8 +869,6 @@ public:
template< typename Type >
bool hasName( const NameListWrapper& rListWrp, Type nKey ) const;
- bool isPasswordCancelled() const;
-
protected:
Config() {}
void construct( const Config& rParent );
@@ -1707,7 +1702,6 @@ public:
virtual ~DumperBase() override;
bool isImportEnabled() const;
- bool isImportCancelled() const;
protected:
DumperBase() {}
@@ -1724,9 +1718,8 @@ protected:
do { \
DumperClassName aDumper( *this ); \
aDumper.dump(); \
- bool bCancelled = aDumper.isImportCancelled(); \
- if( !aDumper.isImportEnabled() || bCancelled ) \
- return aDumper.isValid() && !bCancelled; \
+ if( !aDumper.isImportEnabled() ) \
+ return aDumper.isValid(); \
} while( false )
#else // OOX_INCLUDE_DUMPER
diff --git a/include/oox/ole/vbaexport.hxx b/include/oox/ole/vbaexport.hxx
index fed4b79..448b6a3e 100644
--- a/include/oox/ole/vbaexport.hxx
+++ b/include/oox/ole/vbaexport.hxx
@@ -134,7 +134,6 @@ private:
sal_uInt8 mnUnencryptedByte1; // the last unencrypted byte read or written
sal_uInt8 mnEncryptedByte1; // the last encrypted byte read or written
sal_uInt8 mnEncryptedByte2; // the next-to-last encrypted byte read or written
- sal_uInt8 mnVersion; // the encrypted version
sal_Unicode mnProjKey; // a project-specific encryption key
sal_uInt8 mnIgnoredLength; // the length in bytes of IgnoredEnc
diff --git a/include/sfx2/templatedefaultview.hxx b/include/sfx2/templatedefaultview.hxx
index 4438536..68584ea 100644
--- a/include/sfx2/templatedefaultview.hxx
+++ b/include/sfx2/templatedefaultview.hxx
@@ -29,7 +29,6 @@ public:
protected:
long mnItemMaxSize;
long mnTextHeight;
- long mnItemPadding;
};
#endif // INCLUDED_SFX2_TEMPLATEDEFAULTVIEW_HXX
diff --git a/include/svl/filerec.hxx b/include/svl/filerec.hxx
index 7088e37..7b38053 100644
--- a/include/svl/filerec.hxx
+++ b/include/svl/filerec.hxx
@@ -374,7 +374,6 @@ protected:
sal_uInt32 _nContentStartPos; /* start position of respective
content - only with DBG_UTIL
and for subclasses */
- sal_uInt32 _nContentSize; // size of each content
sal_uInt16 _nContentCount; // number of contents
SfxMultiFixRecordWriter( sal_uInt8 nRecordType,
diff --git a/include/svtools/HtmlWriter.hxx b/include/svtools/HtmlWriter.hxx
index 5aa7df4..7bec609 100644
--- a/include/svtools/HtmlWriter.hxx
+++ b/include/svtools/HtmlWriter.hxx
@@ -28,7 +28,6 @@ private:
bool mbElementOpen;
bool mbContentWritten;
bool mbPrettyPrint;
- rtl_TextEncoding maEncoding;
public:
HtmlWriter(SvStream& rStream);
diff --git a/include/svtools/framestatuslistener.hxx b/include/svtools/framestatuslistener.hxx
index d2c211f..0389f7a 100644
--- a/include/svtools/framestatuslistener.hxx
+++ b/include/svtools/framestatuslistener.hxx
@@ -85,8 +85,7 @@ class SVT_DLLPUBLIC FrameStatusListener : public css::frame::XStatusListener,
css::uno::Reference< css::frame::XDispatch >,
OUStringHash > URLToDispatchMap;
- bool m_bInitialized : 1,
- m_bDisposed : 1;
+ bool m_bDisposed : 1;
css::uno::Reference< css::frame::XFrame > m_xFrame;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
URLToDispatchMap m_aListenerMap;
diff --git a/include/svx/dlgctl3d.hxx b/include/svx/dlgctl3d.hxx
index cd33094..2fcdfcb 100644
--- a/include/svx/dlgctl3d.hxx
+++ b/include/svx/dlgctl3d.hxx
@@ -85,7 +85,6 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC Svx3DLightControl : public Svx3DPreviewContr
// interaction parameters
Point maActionStartPoint;
- sal_Int32 mnInteractionStartDistance;
double mfSaveActionStartHor;
double mfSaveActionStartVer;
double mfSaveActionStartRotZ;
diff --git a/include/svx/svdmark.hxx b/include/svx/svdmark.hxx
index 3ef24b3..0771489 100644
--- a/include/svx/svdmark.hxx
+++ b/include/svx/svdmark.hxx
@@ -49,7 +49,6 @@ protected:
SdrObject* mpSelectedSdrObject; // the selected object
SdrPageView* mpPageView;
SdrUShortCont* mpPoints; // Selected Points
- SdrUShortCont* mpLines; // Selected Line
SdrUShortCont* mpGluePoints; // Selected Gluepoints (their Id's)
bool mbCon1; // for Connectors
bool mbCon2; // for Connectors
diff --git a/include/svx/textchainflow.hxx b/include/svx/textchainflow.hxx
index 2147698..0bc40e8 100644
--- a/include/svx/textchainflow.hxx
+++ b/include/svx/textchainflow.hxx
@@ -53,7 +53,6 @@ public:
protected:
// Cursor related
bool mbPossiblyCursorOut;
- CursorChainingEvent maCursorEvent;
ESelection maOverflowPosSel;
ESelection maPostChainingSel;
diff --git a/include/tools/b3dtrans.hxx b/include/tools/b3dtrans.hxx
index d12f26c..331c407 100644
--- a/include/tools/b3dtrans.hxx
+++ b/include/tools/b3dtrans.hxx
@@ -78,7 +78,6 @@ private:
// Flags
bool mbPerspective : 1;
- bool mbObjectToDeviceValid : 1;
bool mbProjectionValid : 1;
public:
diff --git a/include/tools/config.hxx b/include/tools/config.hxx
index f6014f2..845dd08 100644
--- a/include/tools/config.hxx
+++ b/include/tools/config.hxx
@@ -34,7 +34,6 @@ private:
ImplGroupData* mpActGroup;
sal_uIntPtr mnDataUpdateId;
sal_uInt16 mnLockCount;
- bool mbPersistence;
TOOLS_DLLPRIVATE bool ImplUpdateConfig() const;
TOOLS_DLLPRIVATE ImplGroupData* ImplGetGroup() const;
diff --git a/include/tools/pstm.hxx b/include/tools/pstm.hxx
index ec82cf5..a15a656 100644
--- a/include/tools/pstm.hxx
+++ b/include/tools/pstm.hxx
@@ -137,7 +137,6 @@ private:
UniqueIndex<SvPersistBase>
aPUIdx;
Index nStartIdx;
- const SvPersistStream * pRefStm;
virtual std::size_t GetData(void* pData, std::size_t nSize) override;
virtual std::size_t PutData(const void* pData, std::size_t nSize) override;
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 42c718a..8f8474c 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -1260,8 +1260,7 @@ SharedConfigData::SharedConfigData( const OUString& rFileName,
mxContext( rxContext ),
mxRootStrg( rxRootStrg ),
maSysFileName( rSysFileName ),
- mbLoaded( false ),
- mbPwCancelled( false )
+ mbLoaded( false )
{
OUString aFileUrl = InputOutputHelper::convertFileNameToUrl( rFileName );
if( !aFileUrl.isEmpty() )
@@ -1463,11 +1462,6 @@ NameListRef Config::getNameList( const String& rListName ) const
return implGetNameList( rListName );
}
-bool Config::isPasswordCancelled() const
-{
- return mxCfgData->isPasswordCancelled();
-}
-
bool Config::implIsValid() const
{
return isValid( mxCfgData );
@@ -2578,11 +2572,6 @@ bool DumperBase::isImportEnabled() const
return !isValid() || cfg().isImportEnabled();
}
-bool DumperBase::isImportCancelled() const
-{
- return isValid() && cfg().isPasswordCancelled();
-}
-
void DumperBase::construct( const ConfigRef& rxConfig )
{
if( isValid( rxConfig ) && rxConfig->isDumperEnabled() )
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 0215a67..7272757 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -402,7 +402,6 @@ VBAEncryption::VBAEncryption(const sal_uInt8* pData, const sal_uInt16 length, Sv
,mnUnencryptedByte1(0)
,mnEncryptedByte1(0)
,mnEncryptedByte2(0)
- ,mnVersion(2)
,mnProjKey(nProjKey)
,mnIgnoredLength(0)
,mnSeed(pSeed ? *pSeed : 0x00)
@@ -424,6 +423,7 @@ void VBAEncryption::writeSeed()
void VBAEncryption::writeVersionEnc()
{
+ static const sal_uInt8 mnVersion = 2; // the encrypted version
mnVersionEnc = mnSeed ^ mnVersion;
exportString(mrEncryptedData, createHexStringFromDigit(mnVersionEnc));
}
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 40c51d0..b58e1cb 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -422,7 +422,7 @@ bool ImplSdPPTImport::Import()
if ( !aPropItem.Read( pHyperlink->aSubAdress ) )
break;
- pHyperlink->nStartPos = pHyperlink->nEndPos = -1;
+ pHyperlink->nStartPos = -1;
if ( !pHyperlink->aSubAdress.isEmpty() ) // get the converted subaddress
{
diff --git a/sfx2/source/control/templatedefaultview.cxx b/sfx2/source/control/templatedefaultview.cxx
index 8ac3609..1f69177 100644
--- a/sfx2/source/control/templatedefaultview.cxx
+++ b/sfx2/source/control/templatedefaultview.cxx
@@ -26,7 +26,6 @@ VCL_BUILDER_FACTORY(TemplateDefaultView)
TemplateDefaultView::TemplateDefaultView( Window* pParent)
: TemplateLocalView(pParent)
, mnTextHeight(30)
- , mnItemPadding(5)//TODO:: Change padding to 10. It looks really crowded and occupied.
{
Rectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen());
mnItemMaxSize = std::min(aScreen.GetWidth(),aScreen.GetHeight()) > 800 ? 256 : 192;
diff --git a/svl/source/filerec/filerec.cxx b/svl/source/filerec/filerec.cxx
index fcf83f3..1ee1804 100644
--- a/svl/source/filerec/filerec.cxx
+++ b/svl/source/filerec/filerec.cxx
@@ -297,7 +297,6 @@ SfxMultiFixRecordWriter::SfxMultiFixRecordWriter(sal_uInt8 nRecordType,
sal_uInt8 nContentVer)
: SfxSingleRecordWriter( nRecordType, pStream, nContentTag, nContentVer )
, _nContentStartPos(0)
- , _nContentSize(0)
, _nContentCount(0)
{
// space for own header
@@ -317,7 +316,7 @@ sal_uInt32 SfxMultiFixRecordWriter::Close()
// write extended header after SfxSingleRecord
_pStream->WriteUInt16( _nContentCount );
- _pStream->WriteUInt32( _nContentSize );
+ _pStream->WriteUInt32( 0 );
// seek to end of record or stay after the header
_pStream->Seek(nEndPos);
diff --git a/svtools/source/svhtml/HtmlWriter.cxx b/svtools/source/svhtml/HtmlWriter.cxx
index ea5b93a..befadaf 100644
--- a/svtools/source/svhtml/HtmlWriter.cxx
+++ b/svtools/source/svhtml/HtmlWriter.cxx
@@ -15,8 +15,7 @@ HtmlWriter::HtmlWriter(SvStream& rStream) :
mrStream(rStream),
mbElementOpen(false),
mbContentWritten(false),
- mbPrettyPrint(true),
- maEncoding(RTL_TEXTENCODING_UTF8)
+ mbPrettyPrint(true)
{}
HtmlWriter::~HtmlWriter()
@@ -129,7 +128,7 @@ void HtmlWriter::attribute(const OString& aAttribute, const char* pValue)
void HtmlWriter::attribute(const OString& aAttribute, const OUString& aValue)
{
- attribute(aAttribute, OUStringToOString(aValue, maEncoding));
+ attribute(aAttribute, OUStringToOString(aValue, RTL_TEXTENCODING_UTF8));
}
void HtmlWriter::attribute(const OString& aAttribute)
diff --git a/svtools/source/uno/framestatuslistener.cxx b/svtools/source/uno/framestatuslistener.cxx
index 314934c..bf6c771 100644
--- a/svtools/source/uno/framestatuslistener.cxx
+++ b/svtools/source/uno/framestatuslistener.cxx
@@ -41,7 +41,6 @@ FrameStatusListener::FrameStatusListener(
const Reference< XComponentContext >& rxContext,
const Reference< XFrame >& xFrame ) :
OWeakObject()
- , m_bInitialized( true )
, m_bDisposed( false )
, m_xFrame( xFrame )
, m_xContext( rxContext )
@@ -170,44 +169,32 @@ void FrameStatusListener::addStatusListener( const OUString& aCommandURL )
if ( pIter != m_aListenerMap.end() )
return;
- // Check if we are already initialized. Implementation starts adding itself as status listener when
- // intialize is called.
- if ( !m_bInitialized )
- {
- // Put into the unordered_map of status listener. Will be activated when initialized is called
- m_aListenerMap.insert( URLToDispatchMap::value_type( aCommandURL, Reference< XDispatch >() ));
- return;
- }
- else
+ Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
+ if ( m_xContext.is() && xDispatchProvider.is() )
{
- // Add status listener directly as intialize has already been called.
- Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
- if ( m_xContext.is() && xDispatchProvider.is() )
+ Reference< XURLTransformer > xURLTransformer( css::util::URLTransformer::create( m_xContext ) );
+ aTargetURL.Complete = aCommandURL;
+ xURLTransformer->parseStrict( aTargetURL );
+ xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
+
+ xStatusListener.set( static_cast< OWeakObject* >( this ), UNO_QUERY );
+ URLToDispatchMap::iterator aIter = m_aListenerMap.find( aCommandURL );
+ if ( aIter != m_aListenerMap.end() )
{
- Reference< XURLTransformer > xURLTransformer( css::util::URLTransformer::create( m_xContext ) );
- aTargetURL.Complete = aCommandURL;
- xURLTransformer->parseStrict( aTargetURL );
- xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
+ Reference< XDispatch > xOldDispatch( aIter->second );
+ aIter->second = xDispatch;
- xStatusListener.set( static_cast< OWeakObject* >( this ), UNO_QUERY );
- URLToDispatchMap::iterator aIter = m_aListenerMap.find( aCommandURL );
- if ( aIter != m_aListenerMap.end() )
+ try
+ {
+ if ( xOldDispatch.is() )
+ xOldDispatch->removeStatusListener( xStatusListener, aTargetURL );
+ }
+ catch (const Exception&)
{
- Reference< XDispatch > xOldDispatch( aIter->second );
- aIter->second = xDispatch;
-
- try
- {
- if ( xOldDispatch.is() )
- xOldDispatch->removeStatusListener( xStatusListener, aTargetURL );
- }
- catch (const Exception&)
- {
- }
}
- else
- m_aListenerMap.insert( URLToDispatchMap::value_type( aCommandURL, xDispatch ));
}
+ else
+ m_aListenerMap.insert( URLToDispatchMap::value_type( aCommandURL, xDispatch ));
}
}
@@ -231,9 +218,6 @@ void FrameStatusListener::bindListener()
{
SolarMutexGuard aSolarMutexGuard;
- if ( !m_bInitialized )
- return;
-
// Collect all registered command URL's and store them temporary
Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
if ( m_xContext.is() && xDispatchProvider.is() )
@@ -299,9 +283,6 @@ void FrameStatusListener::unbindListener()
{
SolarMutexGuard aSolarMutexGuard;
- if ( !m_bInitialized )
- return;
-
// Collect all registered command URL's and store them temporary
Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
if ( m_xContext.is() && xDispatchProvider.is() )
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
index 76d63f4..85f04d5 100644
--- a/svx/source/dialog/dlgctl3d.cxx
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -249,6 +249,8 @@ void Svx3DPreviewControl::Set3DAttributes( const SfxItemSet& rAttr )
#define NO_LIGHT_SELECTED (0xffffffff)
#define MAX_NUMBER_LIGHTS (8)
+static const sal_Int32 g_nInteractionStartDistance = 5 * 5 * 2;
+
Svx3DLightControl::Svx3DLightControl(vcl::Window* pParent, WinBits nStyle)
: Svx3DPreviewControl(pParent, nStyle),
maChangeCallback(),
@@ -262,7 +264,6 @@ Svx3DLightControl::Svx3DLightControl(vcl::Window* pParent, WinBits nStyle)
mfRotateY(45.0),
mfRotateZ(0.0),
maActionStartPoint(),
- mnInteractionStartDistance(5 * 5 * 2),
mfSaveActionStartHor(0.0),
mfSaveActionStartVer(0.0),
mfSaveActionStartRotZ(0.0),
@@ -604,7 +605,7 @@ void Svx3DLightControl::Tracking( const TrackingEvent& rTEvt )
if(!mbMouseMoved)
{
- if(sal_Int32(aDeltaPos.X() * aDeltaPos.X() + aDeltaPos.Y() * aDeltaPos.Y()) > mnInteractionStartDistance)
+ if(sal_Int32(aDeltaPos.X() * aDeltaPos.X() + aDeltaPos.Y() * aDeltaPos.Y()) > g_nInteractionStartDistance)
{
if(mbGeometrySelected)
{
diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx
index 63e8382..cf53729 100644
--- a/svx/source/svdraw/svdmark.cxx
+++ b/svx/source/svdraw/svdmark.cxx
@@ -47,7 +47,6 @@ SdrMark::SdrMark(SdrObject* pNewObj, SdrPageView* pNewPageView)
: mpSelectedSdrObject(pNewObj),
mpPageView(pNewPageView),
mpPoints(nullptr),
- mpLines(nullptr),
mpGluePoints(nullptr),
mbCon1(false),
mbCon2(false),
@@ -66,7 +65,6 @@ SdrMark::SdrMark(const SdrMark& rMark)
mpSelectedSdrObject(nullptr),
mpPageView(nullptr),
mpPoints(nullptr),
- mpLines(nullptr),
mpGluePoints(nullptr),
mbCon1(false),
mbCon2(false),
@@ -82,20 +80,8 @@ SdrMark::~SdrMark()
mpSelectedSdrObject->RemoveObjectUser( *this );
}
- if(mpPoints)
- {
- delete mpPoints;
- }
-
- if(mpLines)
- {
- delete mpLines;
- }
-
- if(mpGluePoints)
- {
- delete mpGluePoints;
- }
+ delete mpPoints;
+ delete mpGluePoints;
}
void SdrMark::ObjectInDestruction(const SdrObject& rObject)
@@ -150,26 +136,6 @@ SdrMark& SdrMark::operator=(const SdrMark& rMark)
}
}
- if(!rMark.mpLines)
- {
- if(mpLines)
- {
- delete mpLines;
- mpLines = nullptr;
- }
- }
- else
- {
- if(!mpLines)
- {
- mpLines = new SdrUShortCont(*rMark.mpLines);
- }
- else
- {
- *mpLines = *rMark.mpLines;
- }
- }
-
if(!rMark.mpGluePoints)
{
if(mpGluePoints)
diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index 145fae7..4a376f9 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -40,9 +40,7 @@ TextChainFlow::TextChainFlow(SdrTextObj *pChainTarget)
mpOverflChText = nullptr;
mpUnderflChText = nullptr;
- maCursorEvent = CursorChainingEvent::NULL_EVENT;
mbPossiblyCursorOut = false;
-
}
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 2d33d31..fa9ce3e 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2802,15 +2802,6 @@ SwFrameFormat* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject,
aSet.Put(makeSdrTextAutoGrowHeightItem(false));
aSet.Put(makeSdrTextAutoGrowWidthItem(false));
pSdrTextObj->SetMergedItemSet(aSet);
-
- long nAngle = pRecord->nTextRotationAngle;
- if ( nAngle )
- {
- double a = nAngle*nPi180;
- pSdrTextObj->NbcRotate(pSdrTextObj->GetCurrentBoundRect().Center(), nAngle,
- sin(a), cos(a) );
- }
-
pSdrTextObj->NbcSetLayer( pThisGroup->GetLayer() );
pThisGroup->GetSubList()->NbcInsertObject(pSdrTextObj);
}
diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx
index c6364b7..2b89294 100644
--- a/tools/source/generic/b3dtrans.cxx
+++ b/tools/source/generic/b3dtrans.cxx
@@ -153,7 +153,6 @@ void B3dTransformationSet::Reset()
mbPerspective = true;
mbProjectionValid = false;
- mbObjectToDeviceValid = false;
CalcViewport();
}
@@ -171,8 +170,6 @@ void B3dTransformationSet::SetOrientation(const basegfx::B3DPoint& rVRP, const b
maOrientation.identity();
Orientation(maOrientation, rVRP, rVPN, rVUP);
- mbObjectToDeviceValid = false;
-
PostSetOrientation();
}
@@ -202,9 +199,6 @@ void B3dTransformationSet::PostSetProjection()
// Assign and compute inverse
maInvProjection = GetProjection();
maInvProjection.invert();
-
- // invalidate dependent matrices
- mbObjectToDeviceValid = false;
}
/// Transformations for viewport
@@ -292,7 +286,6 @@ void B3dTransformationSet::SetRatio(double fNew)
{
mfRatio = fNew;
mbProjectionValid = false;
- mbObjectToDeviceValid = false;
}
}
@@ -306,7 +299,6 @@ void B3dTransformationSet::SetDeviceRectangle(double fL, double fR, double fB, d
mfTopBound = fT;
mbProjectionValid = false;
- mbObjectToDeviceValid = false;
// Broadcast changes
DeviceRectangleChange();
@@ -323,7 +315,6 @@ void B3dTransformationSet::SetPerspective(bool bNew)
{
mbPerspective = bNew;
mbProjectionValid = false;
- mbObjectToDeviceValid = false;
}
}
@@ -335,7 +326,6 @@ void B3dTransformationSet::SetViewportRectangle(Rectangle const & rRect, Rectang
maVisibleRectangle = rVisible;
mbProjectionValid = false;
- mbObjectToDeviceValid = false;
}
}
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 879678f..ce82454 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -659,7 +659,6 @@ Config::Config( const OUString& rFileName )
mpActGroup = nullptr;
mnDataUpdateId = 0;
mnLockCount = 1;
- mbPersistence = true;
#ifdef DBG_UTIL
OString aTraceStr("Config::Config( " + OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8) + " )");
@@ -727,7 +726,7 @@ void Config::DeleteGroup(const OString& rGroup)
delete pGroup;
// Rewrite config data
- if ( !mnLockCount && mbPersistence )
+ if ( !mnLockCount )
ImplWriteConfig( mpData );
else
{
@@ -885,7 +884,7 @@ void Config::WriteKey(const OString& rKey, const OString& rStr)
{
pKey->maValue = rStr;
- if ( !mnLockCount && mbPersistence )
+ if ( !mnLockCount )
ImplWriteConfig( mpData );
else
{
@@ -929,7 +928,7 @@ void Config::DeleteKey(const OString& rKey)
delete pKey;
// Rewrite config file
- if ( !mnLockCount && mbPersistence )
+ if ( !mnLockCount )
ImplWriteConfig( mpData );
else
{
@@ -1026,7 +1025,7 @@ OString Config::ReadKey(sal_uInt16 nKey) const
void Config::Flush()
{
- if ( mpData->mbModified && mbPersistence )
+ if ( mpData->mbModified )
ImplWriteConfig( mpData );
}
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index c634592..9975121 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -56,7 +56,6 @@ SvPersistStream::SvPersistStream( SvClassManager & rMgr, SvStream * pStream )
, pStm( pStream )
, aPUIdx( 1 )
, nStartIdx( 1 )
- , pRefStm( nullptr )
{
DBG_ASSERT( nStartIdx != 0, "zero index not allowed" );
m_isWritable = true;
@@ -123,10 +122,7 @@ SvPersistStream::Index SvPersistStream::GetIndex( SvPersistBase * pObj ) const
PersistBaseMap::const_iterator it = aPTable.find( pObj );
if( it == aPTable.end() )
{
- if ( pRefStm )
- return pRefStm->GetIndex( pObj );
- else
- return 0;
+ return 0;
}
return it->second;
}
@@ -135,8 +131,6 @@ SvPersistBase * SvPersistStream::GetObject( Index nIdx ) const
{
if( nIdx >= nStartIdx )
return aPUIdx.Get( nIdx );
- else if( pRefStm )
- return pRefStm->GetObject( nIdx );
return nullptr;
}
More information about the Libreoffice-commits
mailing list