[Libreoffice-commits] core.git: 9 commits - reportdesign/source rsc/source svx/source sw/source
Caolán McNamara
caolanm at redhat.com
Mon Oct 13 08:54:52 PDT 2014
reportdesign/source/ui/report/ReportController.cxx | 98 +++++++++++++++++----
rsc/source/rsc/rsc.cxx | 4
svx/source/gallery2/galtheme.cxx | 5 -
svx/source/tbxctrls/fontworkgallery.cxx | 4
sw/source/core/docnode/ndnum.cxx | 4
sw/source/filter/ww8/ww8par5.cxx | 4
sw/source/filter/ww8/ww8scan.cxx | 2
sw/source/filter/xml/swxml.cxx | 6 -
8 files changed, 93 insertions(+), 34 deletions(-)
New commits:
commit 9783ea516f007ce4dc46af3362b94dcece59b0dc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 13 16:52:36 2014 +0100
Resolves: fdo#84930 format page background in report-builder crash
another regression from one of...
commit 7d9bb549d498d6beed2c4050c402d09643febdfa
Author: Armin Le Grand <alg at apache.org>
Date: Mon Jun 2 15:00:50 2014 +0000
Related: #i124638# Second step of DrawingLayer FillAttributes...
for Writer objects, now added support for Paragraph and PageStyle (including
Header and Footer) for direct attributes and style attributes
commit 4a0b5e569d070c286daefb0fdfe45c0dd15d241c
Author: Armin Le Grand <alg at apache.org>
Date: Thu Apr 17 16:44:58 2014 +0000
i#124638 support for DrawingLayre FillStyle for GraphicFrames and ...
... EmbeddedObjectFrames in Writer
commit 6e61ecd09679a66060f932835622821d39e92f01
Author: Armin Le Grand <alg at apache.org>
Date: Wed Mar 19 16:17:02 2014 +0000
This is something of a horror, and this is a suboptimal fix, but it
appears to work.
Change-Id: Iee7e6fdb40ca2e32beaa8e4bfea31872b8e0642e
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index f827456..d1646b4 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -17,16 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#define RPTUI_ID_LRSPACE 1
-#define RPTUI_ID_ULSPACE 2
-#define RPTUI_ID_PAGE 3
-#define RPTUI_ID_SIZE 4
-#define RPTUI_ID_PAGE_MODE 5
-#define RPTUI_ID_START 6
-#define RPTUI_ID_END 7
-#define RPTUI_ID_BRUSH 8
-#define RPTUI_ID_METRIC 9
-
#include "ReportController.hxx"
#include "ReportDefinition.hxx"
#include "CondFormat.hxx"
@@ -98,6 +88,17 @@
#include <svx/svxids.hrc>
#include <svx/svdobj.hxx>
#include <svx/dataaccessdescriptor.hxx>
+#include <svx/xfillit.hxx>
+#include <svx/xflbckit.hxx>
+#include <svx/xflbmpit.hxx>
+#include <svx/xflbmsli.hxx>
+#include <svx/xflbmsxy.hxx>
+#include <svx/xflbmtit.hxx>
+#include <svx/xflboxy.hxx>
+#include <svx/xflbstit.hxx>
+#include <svx/xflbtoxy.hxx>
+#include <svx/xfltrit.hxx>
+#include <svx/xgrscit.hxx>
#include <editeng/svxenum.hxx>
#include <svx/pageitem.hxx>
#include <editeng/lrspitem.hxx>
@@ -154,6 +155,16 @@
#define MAX_ROWS_FOR_PREVIEW 20
+#define RPTUI_ID_LRSPACE XATTR_FILL_FIRST - 8
+#define RPTUI_ID_ULSPACE XATTR_FILL_FIRST - 7
+#define RPTUI_ID_PAGE XATTR_FILL_FIRST - 6
+#define RPTUI_ID_SIZE XATTR_FILL_FIRST - 5
+#define RPTUI_ID_PAGE_MODE XATTR_FILL_FIRST - 4
+#define RPTUI_ID_START XATTR_FILL_FIRST - 3
+#define RPTUI_ID_END XATTR_FILL_FIRST - 2
+#define RPTUI_ID_BRUSH XATTR_FILL_FIRST - 1
+#define RPTUI_ID_METRIC XATTR_FILL_LAST + 1
+
using namespace ::com::sun::star;
using namespace uno;
using namespace io;
@@ -2378,12 +2389,47 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
{ SID_PAPER_START, SFX_ITEM_POOLABLE },
{ SID_PAPER_END, SFX_ITEM_POOLABLE },
{ SID_ATTR_BRUSH, SFX_ITEM_POOLABLE },
- { SID_FLAG_TYPE, SFX_ITEM_POOLABLE },
+ { XATTR_FILLSTYLE, SFX_ITEM_POOLABLE },
+ { XATTR_FILLCOLOR, SFX_ITEM_POOLABLE },
+ { XATTR_FILLGRADIENT, SFX_ITEM_POOLABLE },
+ { XATTR_FILLHATCH, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBITMAP, SFX_ITEM_POOLABLE },
+ { XATTR_FILLTRANSPARENCE, SFX_ITEM_POOLABLE },
+ { XATTR_GRADIENTSTEPCOUNT, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_TILE, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_POS, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_SIZEX, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_SIZEY, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_SIZELOG, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_TILEOFFSETX, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_TILEOFFSETY, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_STRETCH, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_POSOFFSETX, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBMP_POSOFFSETY, SFX_ITEM_POOLABLE },
+ { XATTR_FILLFLOATTRANSPARENCE, SFX_ITEM_POOLABLE },
+ { XATTR_SECONDARYFILLCOLOR, SFX_ITEM_POOLABLE },
+ { XATTR_FILLBACKGROUND, SFX_ITEM_POOLABLE },
{ SID_ATTR_METRIC, SFX_ITEM_POOLABLE }
};
MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
FieldUnit eUserMetric = MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH;
+ static const sal_uInt16 pRanges[] =
+ {
+ RPTUI_ID_LRSPACE, XATTR_FILL_LAST,
+ SID_ATTR_METRIC,SID_ATTR_METRIC,
+ 0
+ };
+ SfxItemPool* pPool( new SfxItemPool(OUString("ReportPageProperties"), RPTUI_ID_LRSPACE, RPTUI_ID_METRIC, aItemInfos ) );
+
+ const Graphic aNullGraphic;
+ const ::Color aNullLineCol(COL_DEFAULT_SHAPE_STROKE); // #i121448# Use defined default color
+ const ::Color aNullFillCol(COL_DEFAULT_SHAPE_FILLING); // #i121448# Use defined default color
+ const ::Color aNullShadowCol(RGB_Color(COL_LIGHTGRAY));
+ const XDash aNullDash;
+ const XGradient aNullGrad(RGB_Color(COL_BLACK), RGB_Color(COL_WHITE));
+ const XHatch aNullHatch(aNullLineCol);
+
SfxPoolItem* pDefaults[] =
{
new SvxLRSpaceItem(RPTUI_ID_LRSPACE),
@@ -2394,16 +2440,32 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
new SfxAllEnumItem(RPTUI_ID_START,PAPER_A4),
new SfxAllEnumItem(RPTUI_ID_END,PAPER_E),
new SvxBrushItem(RPTUI_ID_BRUSH),
+ new XFillStyleItem,
+ new XFillColorItem("", aNullFillCol),
+ new XFillGradientItem(aNullGrad),
+ new XFillHatchItem(pPool, aNullHatch),
+ new XFillBitmapItem(pPool, aNullGraphic),
+ new XFillTransparenceItem,
+ new XGradientStepCountItem,
+ new XFillBmpTileItem,
+ new XFillBmpPosItem,
+ new XFillBmpSizeXItem,
+ new XFillBmpSizeYItem,
+ new XFillBmpSizeLogItem,
+ new XFillBmpTileOffsetXItem,
+ new XFillBmpTileOffsetYItem,
+ new XFillBmpStretchItem,
+ new XFillBmpPosOffsetXItem,
+ new XFillBmpPosOffsetYItem,
+ new XFillFloatTransparenceItem(pPool, aNullGrad, false),
+ new XSecondaryFillColorItem("", aNullFillCol),
+ new XFillBackgroundItem,
new SfxUInt16Item(RPTUI_ID_METRIC,static_cast<sal_uInt16>(eUserMetric))
};
- static const sal_uInt16 pRanges[] =
- {
- RPTUI_ID_LRSPACE,RPTUI_ID_BRUSH,
- SID_ATTR_METRIC,SID_ATTR_METRIC,
- 0
- };
- SfxItemPool* pPool( new SfxItemPool(OUString("ReportPageProperties"), RPTUI_ID_LRSPACE,RPTUI_ID_METRIC, aItemInfos, pDefaults) );
+ pPool->SetDefaults(pDefaults);
+
+
pPool->SetDefaultMetric( SFX_MAPUNIT_100TH_MM ); // ripped, don't understand why
pPool->FreezeIdRanges(); // the same
commit 8ef09a9219249120a20e294dd4d987f0c5d01133
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 13 09:38:31 2014 +0100
coverity#704061 Unchecked return value
Change-Id: I460f258cb3b44949176561d397837184cd08bfbd
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index f37715e..7d889bf 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -4033,7 +4033,7 @@ long WW8PLCFx_Book::GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen )
return -1;
}
- pBook[nIsEnd]->Get( rStart, pData ); // query position
+ (void)pBook[nIsEnd]->Get( rStart, pData ); // query position
return pBook[nIsEnd]->GetIdx();
}
commit 0f8f77630c3446950967382687f1ed6687f2c4eb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 13 09:36:25 2014 +0100
coverity#982170 Unchecked return value from library
hopefully rsc is on the way out
Change-Id: I270de6c4433560dbed0185e462237c3aa95a98a3
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index e5a7228..5c37481d 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -710,7 +710,7 @@ ERRTYPE RscCompiler::Link()
else
{
#ifdef UNX
- chmod( it->aOutputRc.getStr(), S_IRWXU | S_IRWXG | S_IROTH );
+ (void)chmod( it->aOutputRc.getStr(), S_IRWXU | S_IRWXG | S_IROTH );
#endif
}
@@ -726,7 +726,7 @@ ERRTYPE RscCompiler::Link()
else
{
#ifdef UNX
- chmod( aSysList.getStr(), S_IRWXU | S_IRWXG | S_IROTH );
+ (void)chmod( aSysList.getStr(), S_IRWXU | S_IRWXG | S_IROTH );
#endif
}
}
commit 512114e5f211a40bc7f41cb47885bb3b4ce3ded3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 13 09:33:30 2014 +0100
coverity#1078470 Unchecked return value
Change-Id: I2dab114efc8c98a17561f1694acf63918e68620d
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 7289160..38b4db4 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -1202,10 +1202,7 @@ bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTran
else
{
OUString aFile;
-
- aDataHelper.GetString( FORMAT_FILE, aFile );
-
- if( !aFile.isEmpty() )
+ if (aDataHelper.GetString(FORMAT_FILE, aFile) && !aFile.isEmpty())
aFileList.AppendFile( aFile );
}
commit b1efc0e9ef657347ac7e2077a49bde331a8b2806
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 13 09:32:41 2014 +0100
coverity#1078466 Unchecked return value
Change-Id: Ia78578303cadda713b3c015cd0e30446cd6f8f25
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index acc6352..29f55b4 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -778,7 +778,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
}
}
- rDoc.acquire(); // prevent deletion
+ (void)rDoc.acquire(); // prevent deletion
sal_uInt32 nRet = 0;
// save redline mode into import info property set
@@ -893,7 +893,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
rDoc.ReadLayoutCache( *pStrm2 );
delete pStrm2;
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
@@ -939,7 +939,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
if( pObjectHelper )
SvXMLEmbeddedObjectHelper::Destroy( pObjectHelper );
xObjectResolver = 0;
- rDoc.release();
+ (void)rDoc.release();
if ( !bOASIS )
{
commit 38d87edeebf08b613e724bd4e84860bcf0c5087f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 13 09:31:51 2014 +0100
coverity#1078451 Unchecked return value
Change-Id: I7652c609228e90fa0c71a6d20852da111be77d3d
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 66525c1..acfa420 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -1607,7 +1607,7 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, OUString& rStr )
break;
case '*':
//Skip over MERGEFORMAT
- aReadParam.SkipToNextToken();
+ (void)aReadParam.SkipToNextToken();
break;
}
}
commit be4c9132937f3a25ac1a37a1b52e7ed71354746a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 13 09:31:09 2014 +0100
coverity#1078450 Unchecked return value
Change-Id: I1dce4448ccc1a3af143dc4435a00aa434b4114ae
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 4ca61b9..66525c1 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -1724,7 +1724,7 @@ eF_ResT SwWW8ImplReader::Read_F_FileName(WW8FieldDesc*, OUString &rStr)
break;
case '*':
//Skip over MERGEFORMAT
- aReadParam.SkipToNextToken();
+ (void)aReadParam.SkipToNextToken();
break;
default:
OSL_ENSURE(false, "unknown option in FileName field");
commit 13763884da02885af67f6c1d230fea6043071764
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 13 09:30:31 2014 +0100
coverity#1027273 Unchecked return value
Change-Id: I25c6b11fee909559a5f3bac7566fd161851ae14d
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 0439825..3281163 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -118,9 +118,7 @@ void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId)
{
BitmapEx aThumb;
- GalleryExplorer::GetSdrObj(nThemeId, nModelPos, pModel, &aThumb);
-
- if(!!aThumb)
+ if (GalleryExplorer::GetSdrObj(nThemeId, nModelPos, pModel, &aThumb) && !!aThumb)
{
VirtualDevice aVDev;
const Point aNull(0, 0);
commit 900d3e33a2bfcb093a96a11a997ecb4a10f28cc0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 13 09:27:24 2014 +0100
coverity#982191 Unchecked return value
Change-Id: Ieb5607513b61b2a5436332bdd8a572fb6a739be7
diff --git a/sw/source/core/docnode/ndnum.cxx b/sw/source/core/docnode/ndnum.cxx
index 270c7d46..06eb0f9 100644
--- a/sw/source/core/docnode/ndnum.cxx
+++ b/sw/source/core/docnode/ndnum.cxx
@@ -79,8 +79,10 @@ void SwNodes::UpdtOutlineIdx( const SwNode& rNd )
return;
const SwNodePtr pSrch = (SwNodePtr)&rNd;
+
sal_uInt16 nPos;
- pOutlineNds->Seek_Entry( pSrch, &nPos );
+ if (!pOutlineNds->Seek_Entry(pSrch, &nPos))
+ return;
if( nPos == pOutlineNds->size() ) // none present for updating ?
return;
More information about the Libreoffice-commits
mailing list