[Libreoffice-commits] core.git: 21 commits - chart2/qa cui/source hwpfilter/source include/vcl sc/qa sc/source sd/source sfx2/source svx/source sw/source unotools/source vcl/generic vcl/inc vcl/source vcl/unx
Caolán McNamara
caolanm at redhat.com
Thu May 1 09:20:20 PDT 2014
chart2/qa/extras/chart2import.cxx | 2
cui/source/tabpages/labdlg.cxx | 15 +++--
cui/source/tabpages/textattr.cxx | 18 +++---
hwpfilter/source/hpara.cxx | 34 +++++++-----
include/vcl/wmf.hxx | 2
sc/qa/unit/rangelst_test.cxx | 9 ++-
sc/source/filter/excel/xestyle.cxx | 1
sd/source/ui/dlg/tpoption.cxx | 8 +-
sfx2/source/view/impviewframe.hxx | 38 ++++++++-----
sfx2/source/view/viewfrm.cxx | 1
svx/source/svdraw/svdmodel.cxx | 11 ---
sw/source/core/view/vprint.cxx | 68 +++++++++++++++++-------
sw/source/ui/envelp/envprt.cxx | 1
sw/source/ui/envelp/label1.cxx | 1
sw/source/ui/misc/num.cxx | 6 +-
sw/source/ui/misc/outline.cxx | 5 +
sw/source/ui/misc/pgfnote.cxx | 1
unotools/source/config/lingucfg.cxx | 100 ++++++++++++++++++++----------------
vcl/generic/print/printerjob.cxx | 22 ++++++-
vcl/inc/sallayout.hxx | 9 ++-
vcl/source/filter/graphicfilter.cxx | 2
vcl/source/filter/wmf/emfwr.cxx | 5 -
vcl/source/filter/wmf/emfwr.hxx | 23 ++++++--
vcl/source/filter/wmf/wmf.cxx | 5 -
vcl/source/filter/wmf/wmfwr.cxx | 36 ++++++++++--
vcl/source/filter/wmf/wmfwr.hxx | 7 --
vcl/source/window/dockwin.cxx | 40 +++++++++-----
vcl/unx/generic/app/i18n_ic.cxx | 8 ++
28 files changed, 308 insertions(+), 170 deletions(-)
New commits:
commit b44ca2f45e86abb62718534fad43cdd3741101ba
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 17:10:21 2014 +0100
Resolves: fdo#78128 go back to using an interim metafile
this time we know that the other varient of "Move" doesn't
handle pixel drawing stuff like the dpi-using one does.
and the move values have to be in 100TH_MM_MAP and
with the true numbers of the write page size
Change-Id: I15fdb78797d8744702bec649024fedbf3e39b342
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index f6a5c69..5898fbd 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -455,6 +455,28 @@ bool SwViewShell::PrintOrPDFExport(
// output device is now provided by a call from outside the Writer)
pOutDev->Push();
+ // fdo#36815 for comments in margins print to a metafile
+ // and then scale that metafile down so that the comments
+ // will fit on the real page, and replay that scaled
+ // output to the real outputdevice
+ GDIMetaFile *pOrigRecorder(NULL);
+ GDIMetaFile *pMetaFile(NULL);
+ sal_Int16 nPostItMode = rPrintData.GetPrintPostIts();
+ if (nPostItMode == POSTITS_INMARGINS)
+ {
+ //get and disable the existing recorder
+ pOrigRecorder = pOutDev->GetConnectMetaFile();
+ pOutDev->SetConnectMetaFile(NULL);
+ // turn off output to the device
+ pOutDev->EnableOutput(false);
+ // just record the rendering commands to the metafile
+ // instead
+ pMetaFile = new GDIMetaFile;
+ pMetaFile->SetPrefSize(pOutDev->GetOutputSize());
+ pMetaFile->SetPrefMapMode(pOutDev->GetMapMode());
+ pMetaFile->Record(pOutDev);
+ }
+
// Print/PDF export for (multi-)selection has already generated a
// temporary document with the selected text.
// (see XRenderable implementation in unotxdoc.cxx)
@@ -470,8 +492,6 @@ bool SwViewShell::PrintOrPDFExport(
pDrawView->SetBufferedOverlayAllowed( false );
}
- sal_Int16 nPostItMode = rPrintData.GetPrintPostIts();
-
{ // additional scope so that the CurrShell is reset before destroying the shell
SET_CURR_SHELL( pShell );
@@ -519,6 +539,32 @@ bool SwViewShell::PrintOrPDFExport(
pPostItManager->CalcRects();
pPostItManager->LayoutPostIts();
pPostItManager->DrawNotesForPage(pOutDev, nPage-1);
+
+ //Stop recording now
+ pMetaFile->Stop();
+ pMetaFile->WindStart();
+ //Enable output to the device again
+ pOutDev->EnableOutput(true);
+ //Restore the original recorder
+ pOutDev->SetConnectMetaFile(pOrigRecorder);
+
+ //Now scale the recorded page down so the notes
+ //will fit in the final page
+ double fScale = 0.75;
+ long nOrigHeight = pStPage->Frm().Height();
+ long nNewHeight = nOrigHeight*fScale;
+ long nShiftY = (nOrigHeight-nNewHeight)/2;
+ pMetaFile->Scale( fScale, fScale );
+ pMetaFile->WindStart();
+ //Move the scaled page down to center it
+ //the other variant of Move does not map pixels
+ //back to the logical units correctly
+ pMetaFile->Move(0, convertTwipToMm100(nShiftY), pOutDev->GetDPIX(), pOutDev->GetDPIY());
+ pMetaFile->WindStart();
+
+ //play back the scaled page
+ pMetaFile->Play(pOutDev);
+ delete pMetaFile;
}
}
@@ -528,24 +574,6 @@ bool SwViewShell::PrintOrPDFExport(
// output device is now provided by a call from outside the Writer)
pOutDev->Pop();
- // fdo#36815 for comments in margins get the metafile we are printing to
- // and then scale and vertically center that metafile down so that the
- // comments will fit on the real page
- GDIMetaFile *pRecorder = pOutDev->GetConnectMetaFile();
- if (nPostItMode == POSTITS_INMARGINS && pRecorder)
- {
- pRecorder->Stop();
- pRecorder->WindStart();
- double fScale = 0.75;
- long nOrigHeight = pOutDev->GetOutputSize().Height();
- long nNewHeight = nOrigHeight*fScale;
- long nShiftY = (nOrigHeight-nNewHeight)/2;
- pRecorder->Scale(fScale, fScale);
- pRecorder->WindStart();
- pRecorder->Move(0, nShiftY, pOutDev->GetDPIX(), pOutDev->GetDPIY());
- pRecorder->WindStart();
- }
-
return true;
}
commit d5e89e0573bb92819c20b808b07347d57f6e6a0d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 16:40:08 2014 +0100
WaE: -Werror=maybe-uninitialized
Change-Id: I0b973088a9d14dbe3eccb0c002aab5bb861f777d
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index c30f201..7634a95 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -168,7 +168,7 @@ void Chart2ImportTest::testErrorBarFormatting()
xPropSet->getPropertyValue("ErrorBarY") >>= xErrorBarYProps;
CPPUNIT_ASSERT(xErrorBarYProps.is());
- util::Color aColor;
+ util::Color aColor(0);
xErrorBarYProps->getPropertyValue("LineColor") >>= aColor;
sal_uInt32 nColorValue = aColor;
CPPUNIT_ASSERT_EQUAL(sal_uInt32(0xff3333), nColorValue);
commit df1df2be74805a9106a3d67a322bc63cdf5107b8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 15:14:11 2014 +0100
coverity#708371 Uninitialized pointer field
Change-Id: I1da73254803a519ecc2a24b400178b730acb98c1
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 3e854af..e97684c 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -240,17 +240,6 @@ SdrModel::SdrModel(const OUString& rPath, SfxItemPool* pPool, ::comphelper::IEmb
ImpCtor(pPool,pPers,bUseExtColorTable, bLoadRefCounts);
}
-SdrModel::SdrModel(const SdrModel& /*rSrcModel*/):
- SfxBroadcaster(),
- tools::WeakBase< SdrModel >(),
- aReadDate( DateTime::EMPTY ),
- maMaPag(),
- maPages()
-{
- // not yet implemented
- OSL_FAIL("SdrModel::CopyCtor() is not yet implemented.");
-}
-
SdrModel::~SdrModel()
{
commit 5a6ebfd1d9162a05671d10bca5167008791aea60
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 12:28:50 2014 +0100
coverity#708565 Uninitialized scalar field
Change-Id: Ida6ceb999f5f5f3229f06c815186df1de578dd68
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index 022a2ce..061232c 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -88,51 +88,63 @@ static sal_Int16 lcl_CfgAnyToLanguage( const uno::Any &rVal )
}
SvtLinguOptions::SvtLinguOptions()
+ : bROActiveDics(false)
+ , bROActiveConvDics(false)
+ , nHyphMinLeading(2)
+ , nHyphMinTrailing(2)
+ , nHyphMinWordLength(0)
+ , bROHyphMinLeading(false)
+ , bROHyphMinTrailing(false)
+ , bROHyphMinWordLength(false)
+ , nDefaultLanguage(LANGUAGE_NONE)
+ , nDefaultLanguage_CJK(LANGUAGE_NONE)
+ , nDefaultLanguage_CTL(LANGUAGE_NONE)
+ , bRODefaultLanguage(false)
+ , bRODefaultLanguage_CJK(false)
+ , bRODefaultLanguage_CTL(false)
+ , bIsSpellSpecial(true)
+ , bIsSpellAuto(false)
+ , bIsSpellReverse(false)
+ , bROIsSpellSpecial(false)
+ , bROIsSpellAuto(false)
+ , bROIsSpellReverse(false)
+ , bIsHyphSpecial(true)
+ , bIsHyphAuto(false)
+ , bROIsHyphSpecial(false)
+ , bROIsHyphAuto(false)
+ , bIsUseDictionaryList(true)
+ , bIsIgnoreControlCharacters(true)
+ , bROIsUseDictionaryList(false)
+ , bROIsIgnoreControlCharacters(false)
+ , bIsSpellWithDigits(false)
+ , bIsSpellUpperCase(false)
+ , bIsSpellCapitalization(true)
+ , bROIsSpellWithDigits(false)
+ , bROIsSpellUpperCase(false)
+ , bROIsSpellCapitalization(false)
+ , bIsIgnorePostPositionalWord(true)
+ , bIsAutoCloseDialog(false)
+ , bIsShowEntriesRecentlyUsedFirst(false)
+ , bIsAutoReplaceUniqueEntries(false)
+ , bIsDirectionToSimplified(true)
+ , bIsUseCharacterVariants(false)
+ , bIsTranslateCommonTerms(false)
+ , bIsReverseMapping(false)
+ , bROIsIgnorePostPositionalWord(false)
+ , bROIsAutoCloseDialog(false)
+ , bROIsShowEntriesRecentlyUsedFirst(false)
+ , bROIsAutoReplaceUniqueEntries(false)
+ , bROIsDirectionToSimplified(false)
+ , bROIsUseCharacterVariants(false)
+ , bROIsTranslateCommonTerms(false)
+ , bROIsReverseMapping(false)
+ , nDataFilesChangedCheckValue(0)
+ , bRODataFilesChangedCheckValue(false)
+ , bIsGrammarAuto(false)
+ , bIsGrammarInteractive(false)
+ , bROIsGrammarAuto(false)
+ , bROIsGrammarInteractive(false)
{
- nDefaultLanguage = LANGUAGE_NONE;
- nDefaultLanguage_CJK = LANGUAGE_NONE;
- nDefaultLanguage_CTL = LANGUAGE_NONE;
-
- // general options
- bIsUseDictionaryList =
- bIsIgnoreControlCharacters = true;
-
- // spelling options
- bIsSpellCapitalization =
- bIsSpellSpecial = true;
- bIsSpellAuto =
- bIsSpellReverse =
- bIsSpellWithDigits =
- bIsSpellUpperCase = false;
-
- // text conversion options
- bIsIgnorePostPositionalWord = true;
- bIsAutoCloseDialog =
- bIsShowEntriesRecentlyUsedFirst =
- bIsAutoReplaceUniqueEntries = false;
- bIsDirectionToSimplified = true;
- bIsUseCharacterVariants =
- bIsTranslateCommonTerms =
- bIsReverseMapping = false;
-
- bROIsDirectionToSimplified =
- bROIsUseCharacterVariants =
- bROIsTranslateCommonTerms =
- bROIsReverseMapping = false;
-
- // hyphenation options
- bIsHyphSpecial = true;
- bIsHyphAuto = false;
- nHyphMinLeading =
- nHyphMinTrailing = 2;
- nHyphMinWordLength = 0;
-
- nDataFilesChangedCheckValue = 0;
-
- //grammar options
- bIsGrammarAuto = false,
- bIsGrammarInteractive = false;
-
}
class SvtLinguConfigItem: public utl::ConfigItem, private boost::noncopyable
commit 278ae5db852ba8715d4d1d5a1eaa38bdff5a7ea5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 11:42:14 2014 +0100
coverity#708673 Uninitialized pointer field
Change-Id: I4aa47c46b609236c72e4a3e579876da7330b2024
diff --git a/vcl/generic/print/printerjob.cxx b/vcl/generic/print/printerjob.cxx
index 48d9967..dc3b846 100644
--- a/vcl/generic/print/printerjob.cxx
+++ b/vcl/generic/print/printerjob.cxx
@@ -178,10 +178,24 @@ PrinterJob::GetCurrentPageBody ()
* public methods of PrinterJob: the actual job / spool handling
*/
-PrinterJob::PrinterJob () :
- mpJobHeader( NULL ),
- mpJobTrailer( NULL ),
- m_bQuickJob( false )
+PrinterJob::PrinterJob ()
+ : mnFileMode(0)
+ , mpJobHeader(NULL)
+ , mpJobTrailer(NULL)
+ , mnResolution(96)
+ , mnWidthPt(0)
+ , mnHeightPt(0)
+ , mnMaxWidthPt(0)
+ , mnMaxHeightPt(0)
+ , mnLandscapes(0)
+ , mnPortraits(0)
+ , mnLMarginPt(0)
+ , mnRMarginPt(0)
+ , mnTMarginPt(0)
+ , mnBMarginPt(0)
+ , mfXScale(1)
+ , mfYScale(1)
+ , m_bQuickJob(false)
{
}
commit 1b546c0b480a3b62479aee3648d0f683be05375a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 11:11:53 2014 +0100
coverity#708576 Uninitialized scalar field
Change-Id: Ie917244b6021f16b9aecf83676131f972478237c
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index 2dfca1f..03f314f 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -291,7 +291,14 @@ struct GlyphItem
Point maLinearPos; // absolute position of non rotated string
public:
- GlyphItem() {}
+ GlyphItem()
+ : mnFlags(0)
+ , mnCharPos(0)
+ , mnOrigWidth(0)
+ , mnNewWidth(0)
+ , mnXOffset(0)
+ , maGlyphId(0)
+ {}
GlyphItem( int nCharPos, sal_GlyphId aGlyphId, const Point& rLinearPos,
long nFlags, int nOrigWidth )
commit 5461d1b21804a063ec2757e79fd8bcb99a743e0f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 11:04:15 2014 +0100
some more coverity stuff I forgot the ids of
Change-Id: I0aebb478bdb85a3eec29e8b375b56f735dfec318
diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx
index 7122851..bba01e4 100644
--- a/cui/source/tabpages/labdlg.cxx
+++ b/cui/source/tabpages/labdlg.cxx
@@ -71,11 +71,20 @@ static const sal_uInt16 pCaptionRanges[] =
0
};
-
-
SvxCaptionTabPage::SvxCaptionTabPage(Window* pParent, const SfxItemSet& rInAttrs)
: SfxTabPage(pParent, "CalloutPage", "cui/ui/calloutpage.ui", rInAttrs)
+ , nCaptionType(0)
+ , nGap(0)
+ , nEscDir(0)
+ , bEscRel(false)
+ , nEscAbs(0)
+ , nEscRel(0)
+ , nLineLen(0)
+ , bFitLineLen(false)
+ , nAnsatzRelPos(0)
+ , nAnsatzTypePos(0)
, rOutAttrs(rInAttrs)
+ , pView(NULL)
{
get(m_pCT_CAPTTYPE, "valueset");
@@ -130,8 +139,6 @@ SvxCaptionTabPage::SvxCaptionTabPage(Window* pParent, const SfxItemSet& rInAttrs
m_pCB_LAENGE->SetClickHdl(LINK(this,SvxCaptionTabPage,LineOptHdl_Impl));
}
-
-
void SvxCaptionTabPage::Construct()
{
// set rectangle and working area
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 17da774..d6e2776 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -54,13 +54,16 @@ static const sal_uInt16 pRanges[] =
|* dialog (page) for copying objects
|*
\************************************************************************/
-
-SvxTextAttrPage::SvxTextAttrPage( Window* pWindow, const SfxItemSet& rInAttrs ) :
- SvxTabPage ( pWindow
- ,"TextAttributesPage"
- ,"cui/ui/textattrtabpage.ui"
- , rInAttrs ),
- rOutAttrs( rInAttrs )
+SvxTextAttrPage::SvxTextAttrPage(Window* pWindow, const SfxItemSet& rInAttrs)
+ : SvxTabPage(pWindow,"TextAttributesPage","cui/ui/textattrtabpage.ui", rInAttrs)
+ , rOutAttrs(rInAttrs)
+ , pView(NULL)
+ , bAutoGrowSizeEnabled(false)
+ , bContourEnabled(false)
+ , bAutoGrowWidthEnabled(false)
+ , bAutoGrowHeightEnabled(false)
+ , bWordWrapTextEnabled(false)
+ , bFitToSizeEnabled(false)
{
get(m_pTsbAutoGrowWidth,"TSB_AUTOGROW_WIDTH");
get(m_pTsbAutoGrowHeight,"TSB_AUTOGROW_HEIGHT");
@@ -99,7 +102,6 @@ SvxTextAttrPage::SvxTextAttrPage( Window* pWindow, const SfxItemSet& rInAttrs )
|* Dtor
|*
\************************************************************************/
-
SvxTextAttrPage::~SvxTextAttrPage()
{
}
commit 22f719aa96cfbf8187843fb02c328dc43ea95e3f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 11:03:37 2014 +0100
coverity#738861 Uninitialized pointer field
Change-Id: I0c39ea58fd1f85471531490401a7b7e8ca7c2a17
diff --git a/include/vcl/wmf.hxx b/include/vcl/wmf.hxx
index cdadbbc..750dcc3 100644
--- a/include/vcl/wmf.hxx
+++ b/include/vcl/wmf.hxx
@@ -61,7 +61,7 @@ VCL_DLLPUBLIC bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, Fil
VCL_DLLPUBLIC bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL, bool bPlaceable = true );
-bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL );
+bool ConvertGDIMetaFileToEMF(const GDIMetaFile & rMTF, SvStream & rTargetStream);
VCL_DLLPUBLIC bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF );
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index e96a552..2144a58 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1968,7 +1968,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString
else if ( aFilterName.equalsIgnoreAsciiCase( EXP_EMF ) )
{
// #i119735# just use GetGDIMetaFile, it will create a bufferd version of contained bitmap now automatically
- if ( !ConvertGDIMetaFileToEMF( aGraphic.GetGDIMetaFile(), rOStm, &aConfigItem ) )
+ if ( !ConvertGDIMetaFileToEMF(aGraphic.GetGDIMetaFile(), rOStm))
nStatus = GRFILTER_FORMATERROR;
if( rOStm.GetError() )
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 3563f0e..b25bb20 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -284,7 +284,7 @@ void EMFWriter::ImplWritePlusFillPolygonRecord( const Polygon& rPoly, const sal_
ImplEndCommentRecord();
}
-bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pFilterConfigItem )
+bool EMFWriter::WriteEMF(const GDIMetaFile& rMtf)
{
const sal_uLong nHeaderPos = m_rStm.Tell();
@@ -292,10 +292,9 @@ bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pFilterConf
maVDev.SetMapMode( rMtf.GetPrefMapMode() );
// don't work with pixel as destination map mode -> higher resolution preferrable
maDestMapMode.SetMapUnit( MAP_100TH_MM );
- mpFilterConfigItem = pFilterConfigItem;
mpHandlesUsed = new bool[ MAXHANDLES ];
memset( mpHandlesUsed, 0, MAXHANDLES * sizeof( bool ) );
- mnHandleCount = mnLastPercent = mnRecordCount = mnRecordPos = mnRecordPlusPos = 0;
+ mnHandleCount = mnRecordCount = mnRecordPos = mnRecordPlusPos = 0;
mbRecordOpen = mbRecordPlusOpen = false;
mbLineChanged = mbFillChanged = mbTextChanged = false;
mnLineHandle = mnFillHandle = mnTextHandle = HANDLE_INVALID;
diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx
index 62f0b28..66b2895 100644
--- a/vcl/source/filter/wmf/emfwr.hxx
+++ b/vcl/source/filter/wmf/emfwr.hxx
@@ -35,11 +35,9 @@ private:
VirtualDevice maVDev;
MapMode maDestMapMode;
- FilterConfigItem* mpFilterConfigItem;
SvStream& m_rStm;
bool* mpHandlesUsed;
sal_uLong mnHandleCount;
- sal_uLong mnLastPercent;
sal_uLong mnRecordCount;
sal_uLong mnRecordPos;
sal_uLong mnRecordPlusPos;
@@ -91,9 +89,26 @@ private:
public:
- EMFWriter(SvStream &rStream) : m_rStm(rStream) {}
+ EMFWriter(SvStream &rStream)
+ : m_rStm(rStream)
+ , mpHandlesUsed(NULL)
+ , mnHandleCount(0)
+ , mnRecordCount(0)
+ , mnRecordPos(0)
+ , mnRecordPlusPos(0)
+ , mbRecordOpen(false)
+ , mbRecordPlusOpen(false)
+ , mbLineChanged(false)
+ , mnLineHandle(0)
+ , mbFillChanged(false)
+ , mnFillHandle(0)
+ , mbTextChanged(false)
+ , mnTextHandle(0)
+ , mnHorTextAlign(0)
+ {
+ }
- bool WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pConfigItem = NULL );
+ bool WriteEMF(const GDIMetaFile& rMtf);
};
#endif // INCLUDED_VCL_SOURCE_FILTER_WMF_EMFWR_HXX
diff --git a/vcl/source/filter/wmf/wmf.cxx b/vcl/source/filter/wmf/wmf.cxx
index 3efc5c9..3d932f2 100644
--- a/vcl/source/filter/wmf/wmf.cxx
+++ b/vcl/source/filter/wmf/wmf.cxx
@@ -102,8 +102,7 @@ bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream
return aWMFWriter.WriteWMF( aGdiMetaFile, rTargetStream, pConfigItem, bPlaceable );
}
-bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream,
- FilterConfigItem* pConfigItem )
+bool ConvertGDIMetaFileToEMF(const GDIMetaFile & rMTF, SvStream & rTargetStream)
{
EMFWriter aEMFWriter(rTargetStream);
GDIMetaFile aGdiMetaFile(rMTF);
@@ -116,7 +115,7 @@ bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream
clipMetafileContentAgainstOwnRegions(aGdiMetaFile);
}
- return aEMFWriter.WriteEMF( aGdiMetaFile, pConfigItem );
+ return aEMFWriter.WriteEMF(aGdiMetaFile);
}
bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF )
commit 09ebcc26f679a5d04d0b13be6fb2eae02b0b32b1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 10:42:11 2014 +0100
coverity#708321 Uninitialized pointer field
Change-Id: Ia08d454e89d4af08b6db171611f14a66e890094b
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 6439b41..a74555a 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -131,6 +131,33 @@
#define PRIVATE_ESCAPE_UNICODE 2
+WMFWriter::WMFWriter()
+ : pWMF(NULL)
+ , pVirDev(NULL)
+ , nMetafileHeaderPos(0)
+ , nMaxRecordSize(0)
+ , nActRecordPos(0)
+ , eSrcRasterOp(ROP_OVERPAINT)
+ , eSrcTextAlign(ALIGN_BASELINE)
+ , bSrcIsClipping(false)
+ , pAttrStack(NULL)
+ , eSrcHorTextAlign(W_TA_LEFT)
+ , eDstROP2(ROP_OVERPAINT)
+ , eDstTextAlign(ALIGN_BASELINE)
+ , eDstHorTextAlign(W_TA_LEFT)
+ , bDstIsClipping(false)
+ , nDstPenHandle(0)
+ , nDstFontHandle(0)
+ , nDstBrushHandle(0)
+ , nNumberOfActions(0)
+ , nNumberOfBitmaps(0)
+ , nWrittenActions(0)
+ , nWrittenBitmaps(0)
+ , nActBitmapPercent(0)
+ , bEmbedEMF(false)
+{
+}
+
void WMFWriter::MayCallback()
{
if ( xStatusIndicator.is() )
@@ -1667,13 +1694,11 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
bEmbedEMF = true;
bStatus=true;
- pConvert = 0;
pVirDev = new VirtualDevice;
- pFilterConfigItem = pFConfigItem;
- if ( pFilterConfigItem )
+ if (pFConfigItem)
{
- xStatusIndicator = pFilterConfigItem->GetStatusIndicator();
+ xStatusIndicator = pFConfigItem->GetStatusIndicator();
if ( xStatusIndicator.is() )
{
OUString aMsg;
@@ -1693,7 +1718,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
{
aTargetMapMode = aSrcMapMode;
aTargetSize = rMTF.GetPrefSize();
- nTargetDivisor = CalcSaveTargetMapMode(aTargetMapMode, aTargetSize);
+ sal_uInt16 nTargetDivisor = CalcSaveTargetMapMode(aTargetMapMode, aTargetSize);
aTargetSize.Width() /= nTargetDivisor;
aTargetSize.Height() /= nTargetDivisor;
}
@@ -1776,7 +1801,6 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
}
delete pVirDev;
- delete pConvert;
if ( xStatusIndicator.is() )
xStatusIndicator->end();
diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx
index 293bed2..5114ecc 100644
--- a/vcl/source/filter/wmf/wmfwr.hxx
+++ b/vcl/source/filter/wmf/wmfwr.hxx
@@ -54,16 +54,13 @@ private:
bool bStatus;
sal_uLong nLastPercent; // with which number pCallback was called last time.
- FilterConfigItem* pFilterConfigItem;
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
SvStream* pWMF;
VirtualDevice* pVirDev;
- StarSymbolToMSMultiFont *pConvert;
MapMode aTargetMapMode;
Size aTargetSize;
- sal_uInt16 nTargetDivisor;
sal_uLong nMetafileHeaderPos;
sal_uInt32 nMaxRecordSize; // in words
@@ -201,9 +198,7 @@ private:
sal_uInt16 CalcSaveTargetMapMode(MapMode& rMapMode, const Size& rPrefSize);
public:
-
- WMFWriter() {}
-
+ WMFWriter();
bool WriteWMF(const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem, bool bPlaceable=true);
};
commit 088afc6222b8609750a9869840ad3363ae3e923e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 10:20:21 2014 +0100
coverity#708645 Uninitialized pointer field
Change-Id: I567b8f129b0afeeab216d796a8df5fa79410fba8
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 7f067c3..72ecded 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -298,18 +298,32 @@ bool DockingWindow::ImplStartDocking( const Point& rPos )
void DockingWindow::ImplInitDockingWindowData()
{
- mpImplData = new ImplData;
- mpWindowImpl->mbDockWin = true;
-
- mpFloatWin = NULL;
- mbDockCanceled = false;
- mbDockPrevented = false;
- mbFloatPrevented = false;
- mbDocking = false;
- mbPinned = false;
- mbRollUp = false;
- mbDockBtn = false;
- mbHideBtn = false;
+ mpWindowImpl->mbDockWin = true;
+ mpFloatWin = NULL;
+ mpOldBorderWin = NULL;
+ mpImplData = new ImplData;
+ mnTrackX = 0;
+ mnTrackY = 0;
+ mnTrackWidth = 0;
+ mnTrackHeight = 0;
+ mnDockLeft = 0;
+ mnDockTop = 0;
+ mnDockRight = 0;
+ mnDockBottom = 0;
+ mnFloatBits = 0;
+ mbDockCanceled = false;
+ mbDockPrevented = false;
+ mbFloatPrevented = false;
+ mbDockable = false;
+ mbDocking = false;
+ mbDragFull = false;
+ mbLastFloatMode = false;
+ mbStartFloat = false;
+ mbTrackDock = false;
+ mbPinned = false;
+ mbRollUp = false;
+ mbDockBtn = false;
+ mbHideBtn = false;
}
void DockingWindow::ImplInit( Window* pParent, WinBits nStyle )
@@ -387,7 +401,7 @@ void DockingWindow::ImplLoadRes( const ResId& rResId )
}
DockingWindow::DockingWindow( WindowType nType ) :
- Window( nType )
+ Window(nType)
{
ImplInitDockingWindowData();
}
commit f9274ebab5963a988f622d67c5506c1455b8b31d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 10:06:14 2014 +0100
coverity#708650 Uninitialized pointer field
Change-Id: I9a9205420c612795039b189662cab45cf0a85593
diff --git a/vcl/unx/generic/app/i18n_ic.cxx b/vcl/unx/generic/app/i18n_ic.cxx
index 8c429d50..1679306 100644
--- a/vcl/unx/generic/app/i18n_ic.cxx
+++ b/vcl/unx/generic/app/i18n_ic.cxx
@@ -151,6 +151,14 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
mnSupportedStatusStyle &= ~XIMStatusCallbacks;
#endif
+ memset(&maPreeditStartCallback, 0, sizeof(maPreeditStartCallback));
+ memset(&maPreeditDoneCallback, 0, sizeof(maPreeditDoneCallback));
+ memset(&maPreeditDrawCallback, 0, sizeof(maPreeditDrawCallback));
+ memset(&maPreeditCaretCallback, 0, sizeof(maPreeditCaretCallback));
+ memset(&maCommitStringCallback, 0, sizeof(maCommitStringCallback));
+ memset(&maSwitchIMCallback, 0, sizeof(maSwitchIMCallback));
+ memset(&maDestroyCallback, 0, sizeof(maDestroyCallback));
+
maClientData.aText.pUnicodeBuffer = NULL;
maClientData.aText.pCharStyle = NULL;
maClientData.aInputEv.mnTime = 0;
commit 4bf3cb7668a80a1482962fd3dc3d4a3da1874455
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 09:51:39 2014 +0100
coverity#738912 Uninitialized scalar field
Change-Id: Id9b60bb33a1200f5fa6264d0801121ac9e12dc23
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 60add9d..bea294d 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -111,6 +111,7 @@ IMPL_LINK_NOARG(SwFootNotePage, LineColorSelected_Impl)
SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, "FootnoteAreaPage",
"modules/swriter/ui/footnoteareapage.ui", rSet)
+ , lMaxHeight(0)
{
get(m_pMaxHeightPageBtn, "maxheightpage");
get(m_pMaxHeightBtn, "maxheight");
commit a182ed8479b8bb6eea27c461dc8ba85af44a08a8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 09:50:25 2014 +0100
coverity#738911 Uninitialized pointer field
Change-Id: I89c9a17a7ea8dde3475826d03bdeef9e94da322c
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 6110b65..c4b1901 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -407,8 +407,9 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(Window* pParent,
: SfxTabPage(pParent, "OutlineNumberingPage",
"modules/swriter/ui/outlinenumberingpage.ui", rSet)
, aNoFmtName(SW_RESSTR(SW_STR_NONE))
- , pSh(0)
- , pCollNames(0)
+ , pSh(NULL)
+ , pNumRule(NULL)
+ , pCollNames(NULL)
, nActLevel(1)
{
get(m_pLevelLB, "level");
commit 9147f41ebfc74d0f006be5dd7e1bcb4b47c5ce22
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 09:47:22 2014 +0100
coverity#738910 Uninitialized scalar field
Change-Id: I69583731182c09ffb995a2e86b46e0192544950c
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 9890ee0..74b5061 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -68,9 +68,11 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
, pSaveNum(0)
, pWrtSh(0)
, pOutlineDlg(0)
- , bPreset( false )
+ , nActNumLvl(0)
+ , bModified(false)
+ , bPreset(false)
, bInInintControl(false)
- , bLabelAlignmentPosAndSpaceModeActive( false )
+ , bLabelAlignmentPosAndSpaceModeActive(false)
{
get(m_pLevelLB, "levellb");
m_pLevelLB->EnableMultiSelection(true);
commit 914699ab696547002f987e45b58f505ca463dec6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 09:45:55 2014 +0100
coverity#738903 Uninitialized scalar field
Change-Id: I94e5d6a5eb8cbbc54ee774490b72a55a579e1cca
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index a679796..e6980b1 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -232,6 +232,7 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet)
"modules/swriter/ui/cardmediumpage.ui", rSet)
, pDBMgr(NULL)
, aItem((const SwLabItem&)rSet.Get(FN_LABEL))
+ , m_bLabel(false)
{
WaitObject aWait( pParent );
commit e17b3e3c6bfb050c83c2d4d45e28eb7c875ddfa5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 09:44:44 2014 +0100
coverity#738902 Uninitialized pointer field
Change-Id: I5458c530aa9b1480a370a065046aeac318ca6d40
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index 492a816..6978b045 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -31,6 +31,7 @@
SwEnvPrtPage::SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "EnvPrinterPage",
"modules/swriter/ui/envprinterpage.ui", rSet)
+ , pPrt(NULL)
{
get(m_pAlignBox, "alignbox");
get(m_pTopButton, "top");
commit b8c033869ede74b3855a1b91eceb80a78b53c8f3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 09:41:59 2014 +0100
coverity#708174 Uninitialized pointer field
Change-Id: I285e236c13ce3a95a1ca9644997fcccdb90daacf
diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx
index 35c65a5..d91a3a3 100644
--- a/sfx2/source/view/impviewframe.hxx
+++ b/sfx2/source/view/impviewframe.hxx
@@ -32,7 +32,6 @@ struct SfxViewFrame_Impl
SvBorder aBorder;
Size aMargin;
Size aSize;
- TypeId aLastType;
OUString aActualURL;
SfxFrame& rFrame;
svtools::AsynchronLink* pReloader;
@@ -54,21 +53,30 @@ struct SfxViewFrame_Impl
::boost::optional< bool >
aHasToolPanels;
- SfxViewFrame_Impl( SfxFrame& i_rFrame )
- : rFrame( i_rFrame )
- , pReloader(0 )
- , pWindow( 0 )
- , pActiveChild(0)
- , pFocusWin(0)
- , bWindowWasEnabled(true)
- , bActive( false )
- {
- }
+ SfxViewFrame_Impl(SfxFrame& i_rFrame)
+ : rFrame(i_rFrame)
+ , pReloader(0)
+ , pWindow(0)
+ , pActiveChild(0)
+ , pFocusWin(0)
+ , nDocViewNo(0)
+ , nCurViewId(0)
+ , bResizeInToOut(false)
+ , bDontOverwriteResizeInToOut(false)
+ , bObjLocked(false)
+ , bReloading(false)
+ , bIsDowning(false)
+ , bModal(false)
+ , bEnabled(false)
+ , bWindowWasEnabled(true)
+ , bActive(false)
+ {
+ }
- ~SfxViewFrame_Impl()
- {
- delete pReloader;
- }
+ ~SfxViewFrame_Impl()
+ {
+ delete pReloader;
+ }
};
class SfxFrameViewWindow_Impl : public Window
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 2fdf5a6..217ff18 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1081,7 +1081,6 @@ void SfxViewFrame::ReleaseObjectShell_Impl()
if ( xObjSh.Is() )
{
- pImp->aLastType = xObjSh->Type();
pDispatcher->Pop( *xObjSh );
SfxModule* pModule = xObjSh->GetModule();
if( pModule )
commit 1e923777a1beae71ea143d2d55cd0e02ed1e03e0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 09:37:28 2014 +0100
coverity#738825 Uninitialized scalar field
Change-Id: Id61080e5ed087886af9a44d6016cd4caac5f918d
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 98b3937..454bd5f 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -195,8 +195,10 @@ SfxTabPage* SdTpOptionsContents::Create( Window* pWindow,
#define TABLE_COUNT 12
#define TOKEN ':'
-SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs ) :
- SfxTabPage ( pParent, "OptSavePage","modules/simpress/ui/optimpressgeneralpage.ui", rInAttrs )
+SdTpOptionsMisc::SdTpOptionsMisc(Window* pParent, const SfxItemSet& rInAttrs)
+ : SfxTabPage(pParent, "OptSavePage", "modules/simpress/ui/optimpressgeneralpage.ui", rInAttrs)
+ , nWidth(0)
+ , nHeight(0)
{
get(m_pCbxQuickEdit , "qickedit");
get(m_pCbxPickThrough , "textselected");
@@ -288,8 +290,6 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
m_pCbScale->InsertEntry( GetScale( aTable[i], 1 ) );
}
-
-
SdTpOptionsMisc::~SdTpOptionsMisc()
{
}
commit f79e5dfcc3d59c6d78d69163b558b32ee9ff22df
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 09:34:15 2014 +0100
coverity#708034 Uninitialized scalar field
Change-Id: I493c2bbd702002ea9f0a6db7d18a3c22dc22193b
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 18b4d84..f4c7640 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -1971,6 +1971,7 @@ void XclExpXF::InitDefault()
mpItemSet = 0;
mnScNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND;
mnXclFont = mnXclNumFmt = 0;
+ SetXmlIds(0, 0);
}
void XclExpXF::Init( const SfxItemSet& rItemSet, sal_Int16 nScript,
commit 5b641f04fdac6035ddfa9b09fbb23c6597b3b437
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 09:31:12 2014 +0100
coverity#738786 Uninitialized pointer field
Change-Id: I511165aa895c82c0b72fa37801dee2302a85e466
diff --git a/sc/qa/unit/rangelst_test.cxx b/sc/qa/unit/rangelst_test.cxx
index 7b6bd79..deba389 100644
--- a/sc/qa/unit/rangelst_test.cxx
+++ b/sc/qa/unit/rangelst_test.cxx
@@ -15,9 +15,14 @@
#include "rangelst.hxx"
-class Test : public test::BootstrapFixture {
-
+class Test : public test::BootstrapFixture
+{
public:
+ Test()
+ : m_pDoc(NULL)
+ {
+ }
+
virtual void setUp() SAL_OVERRIDE;
virtual void tearDown() SAL_OVERRIDE;
commit ac402b7b3b4bd71e21ad85d3037a297582f1562a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 1 09:29:25 2014 +0100
coverity#707900 Uninitialized pointer field
Change-Id: Id2ea7af01708437074a54b59f16f865338cb504a
diff --git a/hwpfilter/source/hpara.cxx b/hwpfilter/source/hpara.cxx
index 009876b..bc17e0c 100644
--- a/hwpfilter/source/hpara.cxx
+++ b/hwpfilter/source/hpara.cxx
@@ -52,24 +52,30 @@ bool LineInfo::Read(HWPFile & hwpf, HWPPara *pPara)
return (!hwpf.State());
}
-
-HWPPara::HWPPara(void)
+HWPPara::HWPPara()
+ : _next(NULL)
+ , reuse_shape(0)
+ , nch(0)
+ , nline(0)
+ , begin_ypos(0)
+ , scflag(0)
+ , contain_cshape(0)
+ , etcflag(0)
+ , ctrlflag(0)
+ , pstyno(0)
+ , pno(0)
+ , linfo(NULL)
+ , cshapep(NULL)
+ , hhstr(NULL)
{
- _next = NULL;
- linfo = NULL;
- cshapep = NULL;
- hhstr = NULL;
- pno = 0;
-
+ memset(&cshape, 0, sizeof(cshape));
+ memset(&pshape, 0, sizeof(pshape));
}
-
-HWPPara::~HWPPara(void)
+HWPPara::~HWPPara()
{
- if (linfo)
- delete[]linfo;
- if (cshapep)
- delete[]cshapep;
+ delete[] linfo;
+ delete[] cshapep;
if (hhstr)
{
// virtual destructor
More information about the Libreoffice-commits
mailing list