[Libreoffice-commits] core.git: 3 commits - configure.ac cui/source include/svx oox/source README.cross sfx2/source svx/source
Stephan Bergmann
sbergman at redhat.com
Thu Aug 7 02:53:55 PDT 2014
README.cross | 3 -
configure.ac | 4 -
cui/source/tabpages/measure.cxx | 30 ++++++-------
include/svx/sxmlhitm.hxx | 40 ++++++------------
oox/source/drawingml/customshapes/README | 6 +-
sfx2/source/dialog/filedlghelper.cxx | 23 ++++------
svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx | 10 ++--
svx/source/svdraw/svdattr.cxx | 10 ++--
svx/source/svdraw/svdomeas.cxx | 16 +++----
9 files changed, 63 insertions(+), 79 deletions(-)
New commits:
commit 7fb48e7e3aa76ba48174d74da7b603b25ef68f56
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Aug 7 11:53:30 2014 +0200
Consistency around SdrMetricItem in svx/sxmlhitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."
Change-Id: I65c36bde166c5f78db8c76364fd057017982fed6
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index f5d2749..319f558 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -178,7 +178,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
pItem = &pPool->GetDefaultItem( SDRATTR_MEASURELINEDIST );
if( pItem )
{
- long nValue = ( ( const SdrMeasureLineDistItem* )pItem )->GetValue();
+ long nValue = ( ( const SdrMetricItem* )pItem )->GetValue();
SetMetricValue( *m_pMtrFldLineDist, nValue, eUnit );
}
else
@@ -193,7 +193,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREHELPLINEOVERHANG );
if( pItem )
{
- long nValue = ( ( const SdrMeasureHelplineOverhangItem* )pItem )->GetValue();
+ long nValue = ( ( const SdrMetricItem* )pItem )->GetValue();
SetMetricValue( *m_pMtrFldHelplineOverhang, nValue, eUnit );
}
else
@@ -208,7 +208,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREHELPLINEDIST );
if( pItem )
{
- long nValue = ( ( const SdrMeasureHelplineDistItem* )pItem )->GetValue();
+ long nValue = ( ( const SdrMetricItem* )pItem )->GetValue();
SetMetricValue( *m_pMtrFldHelplineDist, nValue, eUnit );
}
else
@@ -223,7 +223,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREHELPLINE1LEN );
if( pItem )
{
- long nValue = ( ( const SdrMeasureHelpline1LenItem* )pItem )->GetValue();
+ long nValue = ( ( const SdrMetricItem* )pItem )->GetValue();
SetMetricValue( *m_pMtrFldHelpline1Len, nValue, eUnit );
}
else
@@ -238,7 +238,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREHELPLINE2LEN );
if( pItem )
{
- long nValue = ( ( const SdrMeasureHelpline2LenItem* )pItem )->GetValue();
+ long nValue = ( ( const SdrMetricItem* )pItem )->GetValue();
SetMetricValue( *m_pMtrFldHelpline2Len, nValue, eUnit );
}
else
@@ -428,35 +428,35 @@ bool SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs)
if( m_pMtrFldLineDist->IsValueChangedFromSaved() )
{
nValue = GetCoreValue( *m_pMtrFldLineDist, eUnit );
- rAttrs->Put( SdrMeasureLineDistItem( nValue ) );
+ rAttrs->Put( makeSdrMeasureLineDistItem( nValue ) );
bModified = true;
}
if( m_pMtrFldHelplineOverhang->IsValueChangedFromSaved() )
{
nValue = GetCoreValue( *m_pMtrFldHelplineOverhang, eUnit );
- rAttrs->Put( SdrMeasureHelplineOverhangItem( nValue ) );
+ rAttrs->Put( makeSdrMeasureHelplineOverhangItem( nValue ) );
bModified = true;
}
if( m_pMtrFldHelplineDist->IsValueChangedFromSaved() )
{
nValue = GetCoreValue( *m_pMtrFldHelplineDist, eUnit );
- rAttrs->Put( SdrMeasureHelplineDistItem( nValue ) );
+ rAttrs->Put( makeSdrMeasureHelplineDistItem( nValue ) );
bModified = true;
}
if( m_pMtrFldHelpline1Len->IsValueChangedFromSaved() )
{
nValue = GetCoreValue( *m_pMtrFldHelpline1Len, eUnit );
- rAttrs->Put( SdrMeasureHelpline1LenItem( nValue ) );
+ rAttrs->Put( makeSdrMeasureHelpline1LenItem( nValue ) );
bModified = true;
}
if( m_pMtrFldHelpline2Len->IsValueChangedFromSaved() )
{
nValue = GetCoreValue( *m_pMtrFldHelpline2Len, eUnit );
- rAttrs->Put( SdrMeasureHelpline2LenItem( nValue ) );
+ rAttrs->Put( makeSdrMeasureHelpline2LenItem( nValue ) );
bModified = true;
}
@@ -665,31 +665,31 @@ IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p )
if( p == m_pMtrFldLineDist )
{
sal_Int32 nValue = GetCoreValue( *m_pMtrFldLineDist, eUnit );
- aAttrSet.Put( SdrMeasureLineDistItem( nValue ) );
+ aAttrSet.Put( makeSdrMeasureLineDistItem( nValue ) );
}
if( p == m_pMtrFldHelplineOverhang )
{
sal_Int32 nValue = GetCoreValue( *m_pMtrFldHelplineOverhang, eUnit );
- aAttrSet.Put( SdrMeasureHelplineOverhangItem( nValue) );
+ aAttrSet.Put( makeSdrMeasureHelplineOverhangItem( nValue) );
}
if( p == m_pMtrFldHelplineDist )
{
sal_Int32 nValue = GetCoreValue( *m_pMtrFldHelplineDist, eUnit );
- aAttrSet.Put( SdrMeasureHelplineDistItem( nValue) );
+ aAttrSet.Put( makeSdrMeasureHelplineDistItem( nValue) );
}
if( p == m_pMtrFldHelpline1Len )
{
sal_Int32 nValue = GetCoreValue( *m_pMtrFldHelpline1Len, eUnit );
- aAttrSet.Put( SdrMeasureHelpline1LenItem( nValue ) );
+ aAttrSet.Put( makeSdrMeasureHelpline1LenItem( nValue ) );
}
if( p == m_pMtrFldHelpline2Len )
{
sal_Int32 nValue = GetCoreValue( *m_pMtrFldHelpline2Len, eUnit );
- aAttrSet.Put( SdrMeasureHelpline2LenItem( nValue ) );
+ aAttrSet.Put( makeSdrMeasureHelpline2LenItem( nValue ) );
}
if( p == m_pTsbBelowRefEdge )
diff --git a/include/svx/sxmlhitm.hxx b/include/svx/sxmlhitm.hxx
index 9d5168e..6b5ca4e 100644
--- a/include/svx/sxmlhitm.hxx
+++ b/include/svx/sxmlhitm.hxx
@@ -39,40 +39,30 @@
// Abstand der Masslinie zur Bezugskante (Norm=8mm)
// laesst sich auch draggen an den beiden Handles
// die auf den Pfeilspitzen liegen
-class SdrMeasureLineDistItem: public SdrMetricItem {
-public:
- SdrMeasureLineDistItem(long nVal=0): SdrMetricItem(SDRATTR_MEASURELINEDIST,nVal) {}
- SdrMeasureLineDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_MEASURELINEDIST,rIn) {}
-};
+inline SdrMetricItem makeSdrMeasureLineDistItem(long nVal) {
+ return SdrMetricItem(SDRATTR_MEASURELINEDIST, nVal);
+}
// Ueberhang der Masshilfslinien an der Masslinie (Norm=2mm)
-class SdrMeasureHelplineOverhangItem: public SdrMetricItem {
-public:
- SdrMeasureHelplineOverhangItem(long nVal=0): SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG,nVal) {}
- SdrMeasureHelplineOverhangItem(SvStream& rIn): SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG,rIn) {}
-};
+inline SdrMetricItem makeSdrMeasureHelplineOverhangItem(long nVal) {
+ return SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG, nVal);
+}
// Abstand der der Masshilfslinienenden zur Bezugskante
// Damit die Masshilfslinien nicht das Objekt beruehren
-class SdrMeasureHelplineDistItem: public SdrMetricItem {
-public:
- SdrMeasureHelplineDistItem(long nVal=0): SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST,nVal) {}
- SdrMeasureHelplineDistItem(SvStream& rIn): SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST,rIn) {}
-};
+inline SdrMetricItem makeSdrMeasureHelplineDistItem(long nVal) {
+ return SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST, nVal);
+}
// Ueberlaenge der Hilfslinien ueber die Bezugskante
// laesst sich auch draggen an den beiden runden Handles,
// die sich default unter den beiden Referenzpunkten befinden
-class SdrMeasureHelpline1LenItem: public SdrMetricItem {
-public:
- SdrMeasureHelpline1LenItem(long nVal=0): SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN,nVal) {}
- SdrMeasureHelpline1LenItem(SvStream& rIn): SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN,rIn) {}
-};
-class SdrMeasureHelpline2LenItem: public SdrMetricItem {
-public:
- SdrMeasureHelpline2LenItem(long nVal=0): SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN,nVal) {}
- SdrMeasureHelpline2LenItem(SvStream& rIn): SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN,rIn) {}
-};
+inline SdrMetricItem makeSdrMeasureHelpline1LenItem(long nVal) {
+ return SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN, nVal);
+}
+inline SdrMetricItem makeSdrMeasureHelpline2LenItem(long nVal) {
+ return SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN, nVal);
+}
#endif
diff --git a/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx b/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx
index 275e28b..462d32f 100644
--- a/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx
@@ -55,11 +55,11 @@ namespace sdr
// take properties which are the model data.
const ::basegfx::B2DPoint aStart(GetMeasureObj().GetPoint(0).X(), GetMeasureObj().GetPoint(0).Y());
const ::basegfx::B2DPoint aEnd(GetMeasureObj().GetPoint(1).X(), GetMeasureObj().GetPoint(1).Y());
- const double fDistance(((SdrMeasureLineDistItem&)rItemSet.Get(SDRATTR_MEASURELINEDIST)).GetValue());
- const double fUpperDistance(((SdrMeasureHelplineOverhangItem&)rItemSet.Get(SDRATTR_MEASUREHELPLINEOVERHANG)).GetValue());
- const double fLowerDistance(((SdrMeasureHelplineDistItem&)rItemSet.Get(SDRATTR_MEASUREHELPLINEDIST)).GetValue());
- const double fLeftDelta(((SdrMeasureHelpline1LenItem&)rItemSet.Get(SDRATTR_MEASUREHELPLINE1LEN)).GetValue());
- const double fRightDelta(((SdrMeasureHelpline2LenItem&)rItemSet.Get(SDRATTR_MEASUREHELPLINE2LEN)).GetValue());
+ const double fDistance(((SdrMetricItem&)rItemSet.Get(SDRATTR_MEASURELINEDIST)).GetValue());
+ const double fUpperDistance(((SdrMetricItem&)rItemSet.Get(SDRATTR_MEASUREHELPLINEOVERHANG)).GetValue());
+ const double fLowerDistance(((SdrMetricItem&)rItemSet.Get(SDRATTR_MEASUREHELPLINEDIST)).GetValue());
+ const double fLeftDelta(((SdrMetricItem&)rItemSet.Get(SDRATTR_MEASUREHELPLINE1LEN)).GetValue());
+ const double fRightDelta(((SdrMetricItem&)rItemSet.Get(SDRATTR_MEASUREHELPLINE2LEN)).GetValue());
const bool bBelow(((SdrMeasureBelowRefEdgeItem&)rItemSet.Get(SDRATTR_MEASUREBELOWREFEDGE)).GetValue());
const bool bTextRotation(((SdrMeasureTextRota90Item&)rItemSet.Get(SDRATTR_MEASURETEXTROTA90)).GetValue());
const bool bTextAutoAngle(((SdrMeasureTextAutoAngleItem&)rItemSet.Get(SDRATTR_MEASURETEXTAUTOANGLE)).GetValue());
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 188668a..c11106e 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -186,11 +186,11 @@ SdrItemPool::SdrItemPool(
mppLocalPoolDefaults[SDRATTR_MEASUREKIND -SDRATTR_START]=new SdrMeasureKindItem;
mppLocalPoolDefaults[SDRATTR_MEASURETEXTHPOS -SDRATTR_START]=new SdrMeasureTextHPosItem;
mppLocalPoolDefaults[SDRATTR_MEASURETEXTVPOS -SDRATTR_START]=new SdrMeasureTextVPosItem;
- mppLocalPoolDefaults[SDRATTR_MEASURELINEDIST -SDRATTR_START]=new SdrMeasureLineDistItem(800);
- mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINEOVERHANG -SDRATTR_START]=new SdrMeasureHelplineOverhangItem(200);
- mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINEDIST -SDRATTR_START]=new SdrMeasureHelplineDistItem(100);
- mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINE1LEN -SDRATTR_START]=new SdrMeasureHelpline1LenItem;
- mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINE2LEN -SDRATTR_START]=new SdrMeasureHelpline2LenItem;
+ mppLocalPoolDefaults[SDRATTR_MEASURELINEDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASURELINEDIST, 800);
+ mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINEOVERHANG -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG, 200);
+ mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINEDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST, 100);
+ mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINE1LEN -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN, 0);
+ mppLocalPoolDefaults[SDRATTR_MEASUREHELPLINE2LEN -SDRATTR_START]=new SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN, 0);
mppLocalPoolDefaults[SDRATTR_MEASUREBELOWREFEDGE -SDRATTR_START]=new SdrMeasureBelowRefEdgeItem;
mppLocalPoolDefaults[SDRATTR_MEASURETEXTROTA90 -SDRATTR_START]=new SdrMeasureTextRota90Item;
mppLocalPoolDefaults[SDRATTR_MEASURETEXTUPSIDEDOWN -SDRATTR_START]=new SdrMeasureTextUpsideDownItem;
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index 3ca3b1b..a106396 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -338,11 +338,11 @@ void SdrMeasureObj::ImpTakeAttr(ImpMeasureRec& rRec) const
rRec.eKind =((SdrMeasureKindItem& )rSet.Get(SDRATTR_MEASUREKIND )).GetValue();
rRec.eWantTextHPos =((SdrMeasureTextHPosItem& )rSet.Get(SDRATTR_MEASURETEXTHPOS )).GetValue();
rRec.eWantTextVPos =((SdrMeasureTextVPosItem& )rSet.Get(SDRATTR_MEASURETEXTVPOS )).GetValue();
- rRec.nLineDist =((SdrMeasureLineDistItem& )rSet.Get(SDRATTR_MEASURELINEDIST )).GetValue();
- rRec.nHelplineOverhang=((SdrMeasureHelplineOverhangItem&)rSet.Get(SDRATTR_MEASUREHELPLINEOVERHANG)).GetValue();
- rRec.nHelplineDist =((SdrMeasureHelplineDistItem& )rSet.Get(SDRATTR_MEASUREHELPLINEDIST )).GetValue();
- rRec.nHelpline1Len =((SdrMeasureHelpline1LenItem& )rSet.Get(SDRATTR_MEASUREHELPLINE1LEN )).GetValue();
- rRec.nHelpline2Len =((SdrMeasureHelpline2LenItem& )rSet.Get(SDRATTR_MEASUREHELPLINE2LEN )).GetValue();
+ rRec.nLineDist =((SdrMetricItem& )rSet.Get(SDRATTR_MEASURELINEDIST )).GetValue();
+ rRec.nHelplineOverhang=((SdrMetricItem&)rSet.Get(SDRATTR_MEASUREHELPLINEOVERHANG)).GetValue();
+ rRec.nHelplineDist =((SdrMetricItem& )rSet.Get(SDRATTR_MEASUREHELPLINEDIST )).GetValue();
+ rRec.nHelpline1Len =((SdrMetricItem& )rSet.Get(SDRATTR_MEASUREHELPLINE1LEN )).GetValue();
+ rRec.nHelpline2Len =((SdrMetricItem& )rSet.Get(SDRATTR_MEASUREHELPLINE2LEN )).GetValue();
rRec.bBelowRefEdge =((SdrMeasureBelowRefEdgeItem& )rSet.Get(SDRATTR_MEASUREBELOWREFEDGE )).GetValue();
rRec.bTextRota90 =((SdrMeasureTextRota90Item& )rSet.Get(SDRATTR_MEASURETEXTROTA90 )).GetValue();
rRec.bTextUpsideDown =((SdrMeasureTextUpsideDownItem& )rSet.Get(SDRATTR_MEASURETEXTUPSIDEDOWN )).GetValue();
@@ -860,12 +860,12 @@ bool SdrMeasureObj::applySpecialDrag(SdrDragStat& rDrag)
if(aMeasureRec.nHelpline1Len != aOrigMeasureRec.nHelpline1Len)
{
- SetObjectItem(SdrMeasureHelpline1LenItem(aMeasureRec.nHelpline1Len));
+ SetObjectItem(makeSdrMeasureHelpline1LenItem(aMeasureRec.nHelpline1Len));
}
if(aMeasureRec.nHelpline2Len != aOrigMeasureRec.nHelpline2Len)
{
- SetObjectItem(SdrMeasureHelpline2LenItem(aMeasureRec.nHelpline2Len));
+ SetObjectItem(makeSdrMeasureHelpline2LenItem(aMeasureRec.nHelpline2Len));
}
break;
@@ -879,7 +879,7 @@ bool SdrMeasureObj::applySpecialDrag(SdrDragStat& rDrag)
if(aMeasureRec.nLineDist != aOrigMeasureRec.nLineDist)
{
- SetObjectItem(SdrMeasureLineDistItem(aMeasureRec.nLineDist));
+ SetObjectItem(makeSdrMeasureLineDistItem(aMeasureRec.nLineDist));
}
if(aMeasureRec.bBelowRefEdge != aOrigMeasureRec.bBelowRefEdge)
commit ff929ad45cdd803db0da49423648256f8380b3a1
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Aug 7 11:45:52 2014 +0200
remove unnecessary references to test-install (just use instdir)
Change-Id: I99f19a3e2ed166c2ea4397f8767975973dd5d983
diff --git a/README.cross b/README.cross
index 5ad963f..451751d 100644
--- a/README.cross
+++ b/README.cross
@@ -220,9 +220,6 @@ TODO:
others; would be best to avoid that if at all possible (using a free
cab implementation, part of Wine or something)
- MSI generation
- - if at all possible, the make test-install installation (with links
- back to the build) should be done so that it would be directly
- executable via wine after doing make test-install :-)
- runtime
- no idea if the entire thing works after the installation at all; I
diff --git a/configure.ac b/configure.ac
index 17c8d3f..8706f17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9868,7 +9868,7 @@ if test "$_os" = "WINNT" -a "$cross_compiling" != "yes"; then
if test "$WITH_MINGW" = "yes"; then
AC_PATH_PROG([UUIDGEN], [uuid])
if test -z "$UUIDGEN"; then
- AC_MSG_WARN([uuid is needed for test-install])
+ AC_MSG_WARN([uuid is needed for building installation sets])
fi
else
# presence is already tested above in the WINDOWS_SDK_HOME check
@@ -9878,7 +9878,7 @@ if test "$_os" = "WINNT" -a "$cross_compiling" != "yes"; then
else
AC_PATH_PROG([UUIDGEN], [uuidgen])
if test -z "$UUIDGEN"; then
- AC_MSG_WARN([uuid is needed for test-install])
+ AC_MSG_WARN([uuid is needed for building installation sets])
fi
fi
diff --git a/oox/source/drawingml/customshapes/README b/oox/source/drawingml/customshapes/README
index e537c24..0d4fab9 100755
--- a/oox/source/drawingml/customshapes/README
+++ b/oox/source/drawingml/customshapes/README
@@ -10,9 +10,9 @@
set -o errexit
-# To re-generate the code, you need to be on Linux (I think). You
-# might need to have done a make test-install. oox needs to be build
-# with dbglevel=2 so that DEBUG is defined.
+# To re-generate the code, you need to be on Linux (I think).
+# It is not necessary to do a make test-install, just run from instdir.
+# oox needs to be build with dbglevel=2 so that DEBUG is defined.
make oox.clean && make oox dbglevel=2
commit f1589f768bbd1d8baea6e442f392831851bdbb3b
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Aug 7 11:24:18 2014 +0200
rhbz#1079672: FileDialogHelper: don't hand out stale preview Graphic
The maGraphic is updated from a timer, and if you double-click on a file
then the dialog may exit with the previous file still previewed in
maGraphic, so the wrong image is returned by the dialog.
Change-Id: I99094d85d8d68d5c8a842f52e7039dbbbf095995
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 78015cd..4051b15 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -789,23 +789,20 @@ ErrCode FileDialogHelper_Impl::getGraphic( Graphic& rGraphic ) const
{
ErrCode nRet = ERRCODE_NONE;
- if ( ! maGraphic )
- {
- OUString aPath;;
- Sequence < OUString > aPathSeq = mxFileDlg->getFiles();
+ // rhbz#1079672 do not return maGraphic, it need not be the selected file
- if ( aPathSeq.getLength() == 1 )
- {
- aPath = aPathSeq[0];
- }
+ OUString aPath;;
+ Sequence<OUString> aPathSeq = mxFileDlg->getFiles();
- if ( !aPath.isEmpty() )
- nRet = getGraphic( aPath, rGraphic );
- else
- nRet = ERRCODE_IO_GENERAL;
+ if (aPathSeq.getLength() == 1)
+ {
+ aPath = aPathSeq[0];
}
+
+ if (!aPath.isEmpty())
+ nRet = getGraphic(aPath, rGraphic);
else
- rGraphic = maGraphic;
+ nRet = ERRCODE_IO_GENERAL;
return nRet;
}
More information about the Libreoffice-commits
mailing list