loplugin:singlevalfields

Change-Id: I521d2efa641f3a14c48561e2e0f6d687e5807d93
Reviewed-on: https://gerrit.libreoffice.org/45662
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2017-12-01 15:27:21 +02:00
parent 68f8645752
commit f6b437c57d
11 changed files with 90 additions and 108 deletions

View File

@ -122,7 +122,6 @@ MediaWindowImpl::MediaWindowImpl(vcl::Window* pParent, MediaWindow* pMediaWindow
, DropTargetHelper(this) , DropTargetHelper(this)
, DragSourceHelper(this) , DragSourceHelper(this)
, mpMediaWindow(pMediaWindow) , mpMediaWindow(pMediaWindow)
, mbEventTransparent(true)
, mpMediaWindowControl(bInternalMediaControl ? VclPtr<MediaWindowControl>::Create(this) : nullptr) , mpMediaWindowControl(bInternalMediaControl ? VclPtr<MediaWindowControl>::Create(this) : nullptr)
, mpEmptyBmpEx(nullptr) , mpEmptyBmpEx(nullptr)
, mpAudioBmpEx(nullptr) , mpAudioBmpEx(nullptr)
@ -637,53 +636,53 @@ void MediaWindowImpl::GetFocus()
void MediaWindowImpl::MouseMove(const MouseEvent& rMEvt) void MediaWindowImpl::MouseMove(const MouseEvent& rMEvt)
{ {
if (mpMediaWindow && mbEventTransparent) if (mpMediaWindow)
mpMediaWindow->MouseMove(rMEvt); mpMediaWindow->MouseMove(rMEvt);
} }
void MediaWindowImpl::MouseButtonDown(const MouseEvent& rMEvt) void MediaWindowImpl::MouseButtonDown(const MouseEvent& rMEvt)
{ {
if (mpMediaWindow && mbEventTransparent) if (mpMediaWindow)
mpMediaWindow->MouseButtonDown(rMEvt); mpMediaWindow->MouseButtonDown(rMEvt);
} }
void MediaWindowImpl::MouseButtonUp(const MouseEvent& rMEvt) void MediaWindowImpl::MouseButtonUp(const MouseEvent& rMEvt)
{ {
if (mpMediaWindow && mbEventTransparent) if (mpMediaWindow)
mpMediaWindow->MouseButtonUp(rMEvt); mpMediaWindow->MouseButtonUp(rMEvt);
} }
void MediaWindowImpl::KeyInput(const KeyEvent& rKEvt) void MediaWindowImpl::KeyInput(const KeyEvent& rKEvt)
{ {
if (mpMediaWindow && mbEventTransparent) if (mpMediaWindow)
mpMediaWindow->KeyInput(rKEvt); mpMediaWindow->KeyInput(rKEvt);
} }
void MediaWindowImpl::KeyUp(const KeyEvent& rKEvt) void MediaWindowImpl::KeyUp(const KeyEvent& rKEvt)
{ {
if (mpMediaWindow && mbEventTransparent) if (mpMediaWindow)
mpMediaWindow->KeyUp(rKEvt); mpMediaWindow->KeyUp(rKEvt);
} }
void MediaWindowImpl::Command(const CommandEvent& rCEvt) void MediaWindowImpl::Command(const CommandEvent& rCEvt)
{ {
if (mpMediaWindow && mbEventTransparent) if (mpMediaWindow)
mpMediaWindow->Command(rCEvt); mpMediaWindow->Command(rCEvt);
} }
sal_Int8 MediaWindowImpl::AcceptDrop(const AcceptDropEvent& rEvt) sal_Int8 MediaWindowImpl::AcceptDrop(const AcceptDropEvent& rEvt)
{ {
return (mpMediaWindow && mbEventTransparent ? mpMediaWindow->AcceptDrop(rEvt) : 0); return (mpMediaWindow ? mpMediaWindow->AcceptDrop(rEvt) : 0);
} }
sal_Int8 MediaWindowImpl::ExecuteDrop(const ExecuteDropEvent& rEvt) sal_Int8 MediaWindowImpl::ExecuteDrop(const ExecuteDropEvent& rEvt)
{ {
return (mpMediaWindow && mbEventTransparent ? mpMediaWindow->ExecuteDrop(rEvt) : 0); return (mpMediaWindow ? mpMediaWindow->ExecuteDrop(rEvt) : 0);
} }
void MediaWindowImpl::StartDrag(sal_Int8 nAction, const Point& rPosPixel) void MediaWindowImpl::StartDrag(sal_Int8 nAction, const Point& rPosPixel)
{ {
if (mpMediaWindow && mbEventTransparent) if (mpMediaWindow)
mpMediaWindow->StartDrag(nAction, rPosPixel); mpMediaWindow->StartDrag(nAction, rPosPixel);
} }

View File

@ -147,7 +147,6 @@ private:
MediaWindow* mpMediaWindow; MediaWindow* mpMediaWindow;
rtl::Reference<MediaEventListenersImpl> mxEvents; rtl::Reference<MediaEventListenersImpl> mxEvents;
bool mbEventTransparent;
VclPtr<MediaChildWindow> mpChildWindow; VclPtr<MediaChildWindow> mpChildWindow;
VclPtr<MediaWindowControl> mpMediaWindowControl; VclPtr<MediaWindowControl> mpMediaWindowControl;
BitmapEx* mpEmptyBmpEx; BitmapEx* mpEmptyBmpEx;

View File

@ -26,7 +26,10 @@ with io.open("loplugin.singlevalfields.log", "rb", buffering=1024*1024) as txt:
elif tokens[0] == "asgn:": elif tokens[0] == "asgn:":
parentClass = normalizeTypeParams(tokens[1]) parentClass = normalizeTypeParams(tokens[1])
fieldName = normalizeTypeParams(tokens[2]) fieldName = normalizeTypeParams(tokens[2])
assignValue = tokens[3] if len(tokens) > 3:
assignValue = tokens[3]
else:
assignValue = ""
fieldInfo = (parentClass, fieldName) fieldInfo = (parentClass, fieldName)
if not fieldInfo in fieldAssignDict: if not fieldInfo in fieldAssignDict:
fieldAssignDict[fieldInfo] = set() fieldAssignDict[fieldInfo] = set()

View File

@ -1,4 +1,7 @@
chart2/source/model/main/DataPoint.hxx:109 avmedia/source/viewer/mediawindow_impl.hxx:150
avmedia::priv::MediaWindowImpl mbEventTransparent
1
chart2/source/model/main/DataPoint.hxx:107
chart::DataPoint m_bNoParentPropAllowed chart::DataPoint m_bNoParentPropAllowed
0 0
chart2/source/view/inc/GL3DRenderer.hxx:161 chart2/source/view/inc/GL3DRenderer.hxx:161
@ -7,74 +10,62 @@ chart2/source/view/inc/GL3DRenderer.hxx:161
connectivity/source/inc/odbc/OBoundParam.hxx:113 connectivity/source/inc/odbc/OBoundParam.hxx:113
connectivity::odbc::OBoundParam paramLength connectivity::odbc::OBoundParam paramLength
0 0
connectivity/source/inc/OTypeInfo.hxx:37 cui/source/inc/cfgutil.hxx:132
connectivity::OTypeInfo nPrecision SfxConfigGroupListBox m_pImageProvider
0
connectivity/source/inc/OTypeInfo.hxx:39
connectivity::OTypeInfo nMaximumScale
0
connectivity/source/inc/OTypeInfo.hxx:40
connectivity::OTypeInfo nMinimumScale
0
connectivity/source/inc/OTypeInfo.hxx:43
connectivity::OTypeInfo nSearchType
3
connectivity/source/inc/OTypeInfo.hxx:44
connectivity::OTypeInfo nNumPrecRadix
0
connectivity/source/inc/OTypeInfo.hxx:46
connectivity::OTypeInfo bCurrency
0
connectivity/source/inc/OTypeInfo.hxx:47
connectivity::OTypeInfo bAutoIncrement
0
connectivity/source/inc/OTypeInfo.hxx:48
connectivity::OTypeInfo bNullable
1
connectivity/source/inc/OTypeInfo.hxx:49
connectivity::OTypeInfo bCaseSensitive
0
connectivity/source/inc/OTypeInfo.hxx:50
connectivity::OTypeInfo bUnsigned
0 0
include/basic/sbxvar.hxx:67 include/basic/sbxvar.hxx:67
SbxValues::(anonymous) pData SbxValues::(anonymous) pData
0 0
include/filter/msfilter/dffpropset.hxx:33
DffPropFlags bSet
0
include/filter/msfilter/dffpropset.hxx:35
DffPropFlags bBlip
1
include/o3tl/vector_pool.hxx:93 include/o3tl/vector_pool.hxx:93
o3tl::detail::struct_from_value::type nextFree o3tl::detail::struct_from_value::type nextFree
-1 -1
include/vcl/field.hxx:100 include/svtools/svparser.hxx:74
SvParser::TokenStackType nTokenValue
0
include/svtools/svparser.hxx:75
SvParser::TokenStackType bTokenHasValue
0
include/vcl/field.hxx:99
PatternFormatter mbInPattKeyInput PatternFormatter mbInPattKeyInput
0 0
include/vcl/filter/pdfdocument.hxx:174 include/vcl/filter/pdfdocument.hxx:173
vcl::filter::PDFNameElement m_nLength vcl::filter::PDFNameElement m_nLength
0 0
libreofficekit/source/gtk/lokdocview.cxx:85 include/vcl/pdfwriter.hxx:549
vcl::PDFWriter::PDFSignContext m_pDerEncoded
0
include/vcl/pdfwriter.hxx:551
vcl::PDFWriter::PDFSignContext m_nDerEncoded
0
include/vcl/pdfwriter.hxx:553
vcl::PDFWriter::PDFSignContext m_pByteRange1
0
include/vcl/pdfwriter.hxx:555
vcl::PDFWriter::PDFSignContext m_nByteRange1
0
include/vcl/pdfwriter.hxx:557
vcl::PDFWriter::PDFSignContext m_pByteRange2
0
include/vcl/pdfwriter.hxx:559
vcl::PDFWriter::PDFSignContext m_nByteRange2
0
libreofficekit/source/gtk/lokdocview.cxx:84
LOKDocViewPrivateImpl m_bIsLoading LOKDocViewPrivateImpl m_bIsLoading
0 0
opencl/source/opencl_device.cxx:63 opencl/source/opencl_device.cxx:53
opencl::(anonymous namespace)::LibreOfficeDeviceEvaluationIO inputSize (anonymous namespace)::LibreOfficeDeviceEvaluationIO inputSize
15360 15360
opencl/source/opencl_device.cxx:64 opencl/source/opencl_device.cxx:54
opencl::(anonymous namespace)::LibreOfficeDeviceEvaluationIO outputSize (anonymous namespace)::LibreOfficeDeviceEvaluationIO outputSize
15360 15360
pyuno/source/module/pyuno_impl.hxx:314 pyuno/source/module/pyuno_impl.hxx:312
pyuno::RuntimeCargo valid pyuno::RuntimeCargo valid
1 1
rsc/inc/rscdef.hxx:55
RscExpType cUnused
0
sax/source/tools/fastserializer.hxx:231 sax/source/tools/fastserializer.hxx:231
sax_fastparser::FastSaxSerializer mbXescape sax_fastparser::FastSaxSerializer mbXescape
1 1
sc/inc/compiler.hxx:108 sc/inc/compiler.hxx:108
ScRawToken::(anonymous union)::(anonymous) bIsInForceArray ScRawToken::(anonymous union)::(anonymous) eInForceArray
0 0
sc/inc/recursionhelper.hxx:56 sc/inc/recursionhelper.hxx:56
ScRecursionHelper bConverging ScRecursionHelper bConverging
@ -82,6 +73,9 @@ sc/inc/recursionhelper.hxx:56
sc/qa/unit/ucalc.hxx:41 sc/qa/unit/ucalc.hxx:41
Test::RangeNameDef mnIndex Test::RangeNameDef mnIndex
1 1
sc/source/ui/inc/undodat.hxx:448
ScUndoDataForm nEndChangeAction
0
sd/inc/sdpptwrp.hxx:42 sd/inc/sdpptwrp.hxx:42
SdPPTFilter pBas SdPPTFilter pBas
0 0
@ -91,22 +85,22 @@ sd/source/filter/html/htmlex.hxx:114
sd/source/ui/remotecontrol/DiscoveryService.hxx:43 sd/source/ui/remotecontrol/DiscoveryService.hxx:43
sd::DiscoveryService zService sd::DiscoveryService zService
0 0
sfx2/source/appl/lnkbase2.cxx:75 sfx2/source/appl/lnkbase2.cxx:76
sfx2::ImplBaseLinkData::tDDEType pItem sfx2::ImplBaseLinkData::tDDEType pItem
0 0
sfx2/source/appl/lnkbase2.cxx:80 sfx2/source/appl/lnkbase2.cxx:81
sfx2::ImplBaseLinkData::(anonymous) DDEType sfx2::ImplBaseLinkData::(anonymous) DDEType
0 0
sfx2/source/doc/doctemplates.cxx:134 sfx2/source/doc/doctemplates.cxx:136
(anonymous namespace)::WaitWindow_Impl mnTextStyle (anonymous namespace)::WaitWindow_Impl mnTextStyle
12576 12576
sfx2/source/view/ipclient.cxx:76 sfx2/source/view/ipclient.cxx:78
SfxBooleanFlagGuard m_bLifeValue SfxBooleanFlagGuard m_bLifeValue
1 1
shell/source/sessioninstall/SyncDbusSessionHelper.cxx:26 shell/source/sessioninstall/SyncDbusSessionHelper.cxx:26
(anonymous namespace)::GErrorWrapper m_pError (anonymous namespace)::GErrorWrapper m_pError
0 0
soltools/cpp/cpp.h:121 soltools/cpp/cpp.h:120
includelist deleted includelist deleted
1 1
soltools/mkdepend/def.h:130 soltools/mkdepend/def.h:130
@ -115,31 +109,31 @@ soltools/mkdepend/def.h:130
soltools/mkdepend/def.h:132 soltools/mkdepend/def.h:132
inclist i_searched inclist i_searched
1 1
starmath/inc/node.hxx:101 starmath/inc/node.hxx:104
SmNode mnFlags SmNode mnFlags
0 0
stoc/source/inspect/introspection.cxx:1537 stoc/source/inspect/introspection.cxx:1533
(anonymous namespace)::Cache::Data hits (anonymous namespace)::Cache::Data hits
1 1
sw/inc/hints.hxx:196 sw/inc/hints.hxx:195
SwAttrSetChg m_bDelSet SwAttrSetChg m_bDelSet
0 0
sw/inc/pagepreviewlayout.hxx:49 sw/inc/pagepreviewlayout.hxx:49
SwPagePreviewLayout mnYFree SwPagePreviewLayout mnYFree
568 568
sw/source/core/inc/frmtool.hxx:256 sw/source/core/inc/frmtool.hxx:260
SwBorderAttrs m_bBorderDist SwBorderAttrs m_bBorderDist
1 1
sw/source/core/inc/swfont.hxx:157 sw/source/core/inc/swfont.hxx:158
SwFont m_nToxCount SwFont m_nToxCount
0 0
sw/source/core/inc/swfont.hxx:158 sw/source/core/inc/swfont.hxx:159
SwFont m_nRefCount SwFont m_nRefCount
0 0
sw/source/core/inc/swfont.hxx:159 sw/source/core/inc/swfont.hxx:160
SwFont m_nMetaCount SwFont m_nMetaCount
0 0
sw/source/core/inc/swfont.hxx:160 sw/source/core/inc/swfont.hxx:161
SwFont m_nInputFieldCount SwFont m_nInputFieldCount
0 0
sw/source/core/inc/UndoSort.hxx:38 sw/source/core/inc/UndoSort.hxx:38
@ -157,12 +151,15 @@ sw/source/filter/html/htmlcss1.cxx:78
sw/source/filter/html/htmlcss1.cxx:79 sw/source/filter/html/htmlcss1.cxx:79
SwCSS1ItemIds nFormatKeep SwCSS1ItemIds nFormatKeep
109 109
sw/source/filter/html/svxcss1.hxx:205 sw/source/filter/html/svxcss1.hxx:199
SvxCSS1Parser nMinFixLineSpace SvxCSS1Parser nMinFixLineSpace
141 141
sw/source/filter/inc/rtf.hxx:30 sw/source/filter/inc/rtf.hxx:30
RTFSurround::(anonymous union)::(anonymous) nJunk RTFSurround::(anonymous union)::(anonymous) nJunk
0 0
sw/source/filter/ww8/ww8par2.hxx:58
WW8SwFlyPara eAnchor
0
sw/source/filter/ww8/ww8par.hxx:650 sw/source/filter/ww8/ww8par.hxx:650
WW8FormulaControl mfUnknown WW8FormulaControl mfUnknown
0 0
@ -178,21 +175,18 @@ vcl/inc/salprn.hxx:42
vcl/inc/salprn.hxx:43 vcl/inc/salprn.hxx:43
SalPrinterQueueInfo mpSysData SalPrinterQueueInfo mpSysData
0 0
vcl/inc/svdata.hxx:253 vcl/inc/svdata.hxx:267
ImplSVNWFData mnStatusBarLowerRightOffset ImplSVNWFData mnStatusBarLowerRightOffset
0 0
vcl/inc/svdata.hxx:269 vcl/inc/svdata.hxx:283
ImplSVNWFData mbCenteredTabs ImplSVNWFData mbCenteredTabs
0 0
vcl/inc/svdata.hxx:270 vcl/inc/svdata.hxx:284
ImplSVNWFData mbNoActiveTabTextRaise ImplSVNWFData mbNoActiveTabTextRaise
0 0
vcl/inc/svdata.hxx:272 vcl/inc/svdata.hxx:286
ImplSVNWFData mbProgressNeedsErase ImplSVNWFData mbProgressNeedsErase
0 0
vcl/inc/unx/i18n_cb.hxx:53
preedit_text_t nCursorPos
0
vcl/source/edit/textdat2.hxx:53 vcl/source/edit/textdat2.hxx:53
TETextPortion nWidth TETextPortion nWidth
-1 -1
@ -208,15 +202,15 @@ vcl/source/filter/jpeg/transupp.h:129
vcl/source/filter/jpeg/transupp.h:131 vcl/source/filter/jpeg/transupp.h:131
(anonymous) crop (anonymous) crop
0 0
vcl/source/font/font.cxx:540 vcl/source/font/font.cxx:539
(anonymous namespace)::WeightSearchEntry weight (anonymous namespace)::WeightSearchEntry weight
5 5
vcl/source/gdi/pdfwriter_impl.hxx:709 vcl/source/gdi/pdfwriter_impl.hxx:706
vcl::PDFWriterImpl m_nInheritedPageWidth vcl::PDFWriterImpl m_nInheritedPageWidth
595 595
vcl/source/gdi/pdfwriter_impl.hxx:710 vcl/source/gdi/pdfwriter_impl.hxx:707
vcl::PDFWriterImpl m_nInheritedPageHeight vcl::PDFWriterImpl m_nInheritedPageHeight
842 842
writerfilter/source/dmapper/GraphicImport.cxx:229 writerfilter/source/dmapper/GraphicImport.cxx:223
writerfilter::dmapper::GraphicImport_Impl nCurrentBorderLine writerfilter::dmapper::GraphicImport_Impl nCurrentBorderLine
2 2

View File

@ -396,7 +396,6 @@ SfxConfigGroupListBox::SfxConfigGroupListBox(vcl::Window* pParent, WinBits nStyl
: SvTreeListBox(pParent, nStyle) : SvTreeListBox(pParent, nStyle)
, xImp(new SvxConfigGroupBoxResource_Impl()) , xImp(new SvxConfigGroupBoxResource_Impl())
, pFunctionListBox(nullptr) , pFunctionListBox(nullptr)
, m_pImageProvider(nullptr)
, pStylesInfo(nullptr) , pStylesInfo(nullptr)
{ {
SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT ); SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT );
@ -647,16 +646,7 @@ void SfxConfigGroupListBox::FillFunctionsList(const css::uno::Sequence<DispatchI
for (const auto & rInfo : xCommands) for (const auto & rInfo : xCommands)
{ {
OUString sUIName = MapCommand2UIName(rInfo.Command); OUString sUIName = MapCommand2UIName(rInfo.Command);
Image aImage; SvTreeListEntry* pFuncEntry = pFunctionListBox->InsertEntry(sUIName );
if ( m_pImageProvider )
aImage = m_pImageProvider->GetImage( rInfo.Command );
SvTreeListEntry* pFuncEntry = nullptr;
if ( !!aImage )
pFuncEntry = pFunctionListBox->InsertEntry( sUIName, aImage, aImage );
else
pFuncEntry = pFunctionListBox->InsertEntry(sUIName );
aArr.push_back( o3tl::make_unique<SfxGroupInfo_Impl>( SfxCfgKind::FUNCTION_SLOT, 0 ) ); aArr.push_back( o3tl::make_unique<SfxGroupInfo_Impl>( SfxCfgKind::FUNCTION_SLOT, 0 ) );
SfxGroupInfo_Impl* pGrpInfo = aArr.back().get(); SfxGroupInfo_Impl* pGrpInfo = aArr.back().get();
pGrpInfo->sCommand = rInfo.Command; pGrpInfo->sCommand = rInfo.Command;

View File

@ -129,7 +129,6 @@ class SfxConfigGroupListBox : public SvTreeListBox
std::unique_ptr<SvxConfigGroupBoxResource_Impl> xImp; std::unique_ptr<SvxConfigGroupBoxResource_Impl> xImp;
VclPtr<SfxConfigFunctionListBox> pFunctionListBox; VclPtr<SfxConfigFunctionListBox> pFunctionListBox;
SfxGroupInfoArr_Impl aArr; SfxGroupInfoArr_Impl aArr;
SaveInData* m_pImageProvider;
OUString m_sModuleLongName; OUString m_sModuleLongName;
css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Reference< css::uno::XComponentContext > m_xContext;
css::uno::Reference< css::frame::XFrame > m_xFrame; css::uno::Reference< css::frame::XFrame > m_xFrame;

View File

@ -445,7 +445,6 @@ private:
std::unique_ptr<ScRefUndoData> xRefUndoData; std::unique_ptr<ScRefUndoData> xRefUndoData;
std::unique_ptr<ScRefUndoData> xRefRedoData; std::unique_ptr<ScRefUndoData> xRefRedoData;
sal_uLong nStartChangeAction; sal_uLong nStartChangeAction;
sal_uLong nEndChangeAction;
bool bRedoFilled; bool bRedoFilled;
void DoChange( const bool bUndo ); void DoChange( const bool bUndo );

View File

@ -1757,7 +1757,7 @@ OUString ScUndoDataForm::GetComment() const
void ScUndoDataForm::SetChangeTrack() void ScUndoDataForm::SetChangeTrack()
{ {
nStartChangeAction = nEndChangeAction = 0; nStartChangeAction = 0;
} }
void ScUndoDataForm::Undo() void ScUndoDataForm::Undo()
@ -1849,7 +1849,7 @@ void ScUndoDataForm::DoChange( const bool bUndo )
{ {
ScChangeTrack* pChangeTrack = rDoc.GetChangeTrack(); ScChangeTrack* pChangeTrack = rDoc.GetChangeTrack();
if ( pChangeTrack ) if ( pChangeTrack )
pChangeTrack->Undo( nStartChangeAction, nEndChangeAction ); pChangeTrack->Undo( nStartChangeAction, 0 );
} }
else else
SetChangeTrack(); SetChangeTrack();

View File

@ -362,7 +362,7 @@ SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD,
WW8FlySet aFlySet(*this, m_xWFlyPara.get(), m_xSFlyPara.get(), true); WW8FlySet aFlySet(*this, m_xWFlyPara.get(), m_xSFlyPara.get(), true);
SwFormatAnchor aAnchor(m_xSFlyPara->eAnchor); SwFormatAnchor aAnchor(WW8SwFlyPara::eAnchor);
aAnchor.SetAnchor(m_pPaM->GetPoint()); aAnchor.SetAnchor(m_pPaM->GetPoint());
aFlySet.Put(aAnchor); aFlySet.Put(aAnchor);
@ -598,7 +598,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj const * pTextObj,
{ {
WW8FlySet aFlySet(*this, m_xWFlyPara.get(), m_xSFlyPara.get(), true); WW8FlySet aFlySet(*this, m_xWFlyPara.get(), m_xSFlyPara.get(), true);
SwFormatAnchor aAnchor(m_xSFlyPara->eAnchor); SwFormatAnchor aAnchor(WW8SwFlyPara::eAnchor);
aAnchor.SetAnchor(m_pPaM->GetPoint()); aAnchor.SetAnchor(m_pPaM->GetPoint());
aFlySet.Put(aAnchor); aFlySet.Put(aAnchor);

View File

@ -55,7 +55,7 @@ struct WW8SwFlyPara
sal_Int16 nNetWidth; sal_Int16 nNetWidth;
SwFrameSize eHeightFix; // height fixed or min SwFrameSize eHeightFix; // height fixed or min
RndStdIds eAnchor; // binding static constexpr RndStdIds eAnchor = RndStdIds::FLY_AT_PARA; // binding
short eHRel; // page or page border short eHRel; // page or page border
short eVRel; // page or page border short eVRel; // page or page border
sal_Int16 eVAlign; // up, down, centered sal_Int16 eVAlign; // up, down, centered

View File

@ -1809,7 +1809,6 @@ nWidth(rWW.nSp28),
nHeight(rWW.nSp45), nHeight(rWW.nSp45),
nNetWidth(rWW.nSp28), nNetWidth(rWW.nSp28),
eHeightFix(ATT_FIX_SIZE), eHeightFix(ATT_FIX_SIZE),
eAnchor(RndStdIds::FLY_AT_PARA),
eHRel(text::RelOrientation::PAGE_FRAME), eHRel(text::RelOrientation::PAGE_FRAME),
eVRel(text::RelOrientation::FRAME), eVRel(text::RelOrientation::FRAME),
eVAlign(text::VertOrientation::NONE), eVAlign(text::VertOrientation::NONE),
@ -2097,7 +2096,7 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW,
if( !bGraf ) if( !bGraf )
{ {
Put( SwFormatAnchor(pFS->eAnchor) ); Put( SwFormatAnchor(WW8SwFlyPara::eAnchor) );
// adjust size // adjust size
//Ordinarily with frames, the border width and spacing is //Ordinarily with frames, the border width and spacing is
@ -2390,10 +2389,10 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, const WW8_TablePos *p
} }
else else
{ {
m_xSFlyPara->pFlyFormat = m_rDoc.MakeFlySection(m_xSFlyPara->eAnchor, m_xSFlyPara->pFlyFormat = m_rDoc.MakeFlySection(WW8SwFlyPara::eAnchor,
m_pPaM->GetPoint(), &aFlySet); m_pPaM->GetPoint(), &aFlySet);
OSL_ENSURE(m_xSFlyPara->pFlyFormat->GetAnchor().GetAnchorId() == OSL_ENSURE(m_xSFlyPara->pFlyFormat->GetAnchor().GetAnchorId() ==
m_xSFlyPara->eAnchor, "Not the anchor type requested!"); WW8SwFlyPara::eAnchor, "Not the anchor type requested!");
} }
if (m_xSFlyPara->pFlyFormat) if (m_xSFlyPara->pFlyFormat)
@ -2405,7 +2404,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, const WW8_TablePos *p
m_xWWZOrder->InsertTextLayerObject(pOurNewObject); m_xWWZOrder->InsertTextLayerObject(pOurNewObject);
} }
if (RndStdIds::FLY_AS_CHAR != m_xSFlyPara->eAnchor && m_xSFlyPara->pFlyFormat) if (RndStdIds::FLY_AS_CHAR != WW8SwFlyPara::eAnchor && m_xSFlyPara->pFlyFormat)
{ {
m_xAnchorStck->AddAnchor(*m_pPaM->GetPoint(), m_xSFlyPara->pFlyFormat); m_xAnchorStck->AddAnchor(*m_pPaM->GetPoint(), m_xSFlyPara->pFlyFormat);
} }