[Libreoffice-commits] core.git: 5 commits - chart2/source sw/inc sw/source vcl/osx vcl/source xmloff/source
Caolán McNamara
caolanm at redhat.com
Fri May 23 12:39:21 PDT 2014
chart2/source/inc/CommonFunctors.hxx | 10 ----------
sw/inc/ndgrf.hxx | 7 +++++--
sw/source/core/unocore/unoframe.cxx | 1 -
sw/source/filter/xml/xmltexte.cxx | 1 +
sw/source/ui/misc/glossary.cxx | 7 ++++++-
vcl/osx/salframeview.mm | 26 +++++++++++++-------------
vcl/source/filter/graphicfilter.cxx | 2 +-
xmloff/source/draw/shapeexport.cxx | 11 +++++++----
8 files changed, 33 insertions(+), 32 deletions(-)
New commits:
commit eaa3f8e160a4ededb685bc38daf7a33b7c7eaf90
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 23 16:05:37 2014 +0100
drop unused template
Change-Id: I3668d9b5cff71aae1598f87f09ab82bf66ace71e
diff --git a/chart2/source/inc/CommonFunctors.hxx b/chart2/source/inc/CommonFunctors.hxx
index 94e254b..eb94b1d 100644
--- a/chart2/source/inc/CommonFunctors.hxx
+++ b/chart2/source/inc/CommonFunctors.hxx
@@ -191,16 +191,6 @@ template< class MapType >
::o3tl::select2nd< typename MapType::value_type >()));
}
-/** Functor that deletes the object behind the given pointer by calling the
- delete operator
- */
-template< typename T >
- struct DeletePtr : public ::std::unary_function< T *, void >
-{
- void operator() ( T * pObj )
- { delete pObj; }
-};
-
} // namespace CommonFunctors
} // namespace chart
commit 5456a01fef615653fa303def6d9c6b1a7f0773cd
Author: Herbert Dürr <hdu at apache.org>
Date: Wed May 21 06:51:34 2014 +0000
Related: #i124191# small cleanup for salframeview.mm
clean up some minor warts while the behaviour remains unchanged.
(cherry picked from commit 8ba6a0be8a0ac9075b2faa68bf71245f4aff0d16)
Conflicts:
vcl/osx/salframeview.mm
Change-Id: I613bf0f40429db6516f82e79438e86bffb7f71cb
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index 6825c9b..c022178 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -208,7 +208,7 @@ static AquaSalFrame* getMouseContainerFrame()
[pNSWindow performSelector:setRestorable withObject:(id)NO];
}
- return (SalFrameWindow *) pNSWindow;
+ return (SalFrameWindow *)pNSWindow;
}
-(AquaSalFrame*)getSalFrame
@@ -590,7 +590,7 @@ private:
NSPoint aPt = [NSEvent mouseLocation];
NSRect aFrameRect = [pDispatchFrame->getNSWindow() frame];
- if ( ! NSPointInRect( aPt, aFrameRect ) )
+ if ( ! NSPointInRect( aPt, aFrameRect ) )
{
// no, it is not
// now we need to find the one it may be in
@@ -840,8 +840,8 @@ private:
mpFrame->mnLastModifierFlags = [pEvent modifierFlags];
// merge pending scroll wheel events
- float dX = 0.0;
- float dY = 0.0;
+ CGFloat dX = 0.0;
+ CGFloat dY = 0.0;
for(;;)
{
dX += [pEvent deltaX];
@@ -870,7 +870,7 @@ private:
if( dX != 0.0 )
{
aEvent.mnDelta = static_cast<long>(floor(dX));
- aEvent.mnNotchDelta = dX < 0 ? -1 : 1;
+ aEvent.mnNotchDelta = (dX < 0) ? -1 : +1;
if( aEvent.mnDelta == 0 )
aEvent.mnDelta = aEvent.mnNotchDelta;
aEvent.mbHorz = TRUE;
@@ -880,7 +880,7 @@ private:
if( dY != 0.0 && AquaSalFrame::isAlive( mpFrame ))
{
aEvent.mnDelta = static_cast<long>(floor(dY));
- aEvent.mnNotchDelta = dY < 0 ? -1 : 1;
+ aEvent.mnNotchDelta = (dY < 0) ? -1 : +1;
if( aEvent.mnDelta == 0 )
aEvent.mnDelta = aEvent.mnNotchDelta;
aEvent.mbHorz = FALSE;
@@ -900,8 +900,8 @@ private:
mpFrame->mnLastModifierFlags = [pEvent modifierFlags];
// merge pending scroll wheel events
- float dX = 0.0;
- float dY = 0.0;
+ CGFloat dX = 0.0;
+ CGFloat dY = 0.0;
for(;;)
{
dX += [pEvent deltaX];
@@ -930,11 +930,11 @@ private:
if( dX != 0.0 )
{
aEvent.mnDelta = static_cast<long>(floor(dX));
- aEvent.mnNotchDelta = dX < 0 ? -1 : 1;
+ aEvent.mnNotchDelta = (dX < 0) ? -1 : +1;
if( aEvent.mnDelta == 0 )
aEvent.mnDelta = aEvent.mnNotchDelta;
aEvent.mbHorz = TRUE;
- aEvent.mnScrollLines = dX > 0 ? dX/WHEEL_EVENT_FACTOR : -dX/WHEEL_EVENT_FACTOR;
+ aEvent.mnScrollLines = fabs(dX) / WHEEL_EVENT_FACTOR;
if( aEvent.mnScrollLines == 0 )
aEvent.mnScrollLines = 1;
@@ -943,12 +943,12 @@ private:
if( dY != 0.0 && AquaSalFrame::isAlive( mpFrame ) )
{
aEvent.mnDelta = static_cast<long>(floor(dY));
- aEvent.mnNotchDelta = dY < 0 ? -1 : 1;
+ aEvent.mnNotchDelta = (dY < 0) ? -1 : +1;
if( aEvent.mnDelta == 0 )
aEvent.mnDelta = aEvent.mnNotchDelta;
aEvent.mbHorz = FALSE;
- aEvent.mnScrollLines = dY > 0 ? dY/WHEEL_EVENT_FACTOR : -dY/WHEEL_EVENT_FACTOR;
- if( aEvent.mnScrollLines < 1 )
+ aEvent.mnScrollLines = fabs(dY) / WHEEL_EVENT_FACTOR;
+ if( aEvent.mnScrollLines == 0 )
aEvent.mnScrollLines = 1;
mpFrame->CallCallback( SALEVENT_WHEELMOUSE, &aEvent );
commit 12dd68e3d20ad36ebe7cb40a600215f6d2b7b6ec
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Mon May 19 11:50:38 2014 +0000
Resolves: #i124717# do not mark *.svm graphic files as *.bmp graphic files
(cherry picked from commit a5cfb91f3dc4b38055fb920f65101cc45d52f8de)
Conflicts:
svtools/source/filter/filter.cxx
Change-Id: I43f62a453bfa17254cebc07bde95f07f16a329c2
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 2485d44..1f132f3 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1592,7 +1592,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
{
nStatus = GRFILTER_FORMATERROR;
}
- else
+ else if (aFilterName.equalsIgnoreAsciiCase(IMP_BMP))
{
// #i15508# added BMP type (checked, works)
eLinkType = GFX_LINK_TYPE_NATIVE_BMP;
commit 192abfb36b8a4859879fcb49326d59ed62083c8d
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Mon May 19 11:37:11 2014 +0000
Resolves: #i114361# provide and accept changed URL...
of embedded graphic file during save (ODF export)
(cherry picked from commit a90c007908eb3f66e28a9ea525729065db652b6f)
Conflicts:
sw/inc/ndgrf.hxx
sw/source/core/graphic/ndgrf.cxx
sw/source/core/unocore/unoframe.cxx
sw/source/filter/xml/xmltexte.cxx
xmloff/source/draw/shapeexport2.cxx
Change-Id: I9d4a02af2561467fe1a66f036b55d6dcf2429986
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index d5e3ddd..5292561 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -174,8 +174,11 @@ public:
bool SwapIn( bool bWaitForData = false );
/// Remove graphic in order to free memory.
bool SwapOut();
- /// Access to storage stream-name.
- void SetStreamName( const OUString& r ) { maGrfObj.SetUserData( r ); }
+ /// applying new stream name for embedded graphic - needed as saving the document might change this stream name
+ void ApplyNewEmbeddedStreamName(const OUString& r)
+ {
+ maGrfObj.SetUserData(r);
+ }
/// Is this node selected by any shell?
bool IsSelected() const;
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index a895407..6a15f4e 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2010,7 +2010,6 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
if(pIdx)
{
SwNodeIndex aIdx(*pIdx, 1);
-// SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode();
SwGrfNode* pGrfNode = aIdx.GetNode().GetGrfNode();
if(!pGrfNode)
throw uno::RuntimeException();
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 6cbb329..c5d21ba 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -197,6 +197,7 @@ void SwXMLTextParagraphExport::setTextEmbeddedGraphicURL(
SwGrfNode *pGrfNd = GetNoTxtNode( rPropSet )->GetGrfNode();
if (pGrfNd && !pGrfNd->IsGrfLink())
{
+ pGrfNd->ApplyNewEmbeddedStreamName("vnd.sun.star.Package:" + rURL);
// #i15411# save-as will swap all graphics in; we need to swap
// them out again, to prevent excessive memory use
pGrfNd->SwapOut();
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 9a1723b..66577ba 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2247,7 +2247,6 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
if( !bIsEmptyPresObj )
{
OUString aStreamURL;
- OUString aStr;
xPropSet->getPropertyValue("GraphicStreamURL") >>= aStreamURL;
xPropSet->getPropertyValue("GraphicURL") >>= sImageURL;
@@ -2255,7 +2254,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
OUString aResolveURL( sImageURL );
const OUString sPackageURL( "vnd.sun.star.Package:" );
- // sj: trying to preserve the filename
+ // trying to preserve the filename
if ( aStreamURL.match( sPackageURL, 0 ) )
{
OUString sRequestedName( aStreamURL.copy( sPackageURL.getLength(), aStreamURL.getLength() - sPackageURL.getLength() ) );
@@ -2272,16 +2271,20 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
}
}
- aStr = mrExport.AddEmbeddedGraphicObject( aResolveURL );
+ const OUString aStr = mrExport.AddEmbeddedGraphicObject( aResolveURL );
mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, aStr );
if( !aStr.isEmpty() )
{
+ aStreamURL = sPackageURL;
if( aStr[ 0 ] == '#' )
{
- aStreamURL = sPackageURL;
aStreamURL = aStreamURL.concat( aStr.copy( 1, aStr.getLength() - 1 ) );
}
+ else
+ {
+ aStreamURL = aStreamURL.concat( aStr );
+ }
// update stream URL for load on demand
uno::Any aAny;
commit e0eb5fa849c5680031f809a1440a35cbd6b58e93
Author: Tsutomu Uchino <hanya at apache.org>
Date: Sun May 18 14:51:45 2014 +0000
Resolves: #i124204# make fields empty on the auto text dialog...
when parent node is selected
(cherry picked from commit 3e285da1115b83bfd168567d561615fb3ee3e6c9)
Conflicts:
sw/source/ui/misc/glossary.cxx
Change-Id: I9ef8b28e55a27d4b48432b50678e1a8bc19e0935
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index c45df95..f794f53 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -265,7 +265,12 @@ IMPL_LINK( SwGlossaryDlg, GrpSelect, SvTreeListBox *, pBox )
ShowAutoText(::GetCurrGlosGroup(), m_pShortNameEdit->GetText());
}
else
- ShowAutoText(aEmptyOUStr, aEmptyOUStr);
+ {
+ m_pNameED->SetText("");
+ m_pShortNameEdit->SetText("");
+ m_pShortNameEdit->Enable(false);
+ ShowAutoText("", "");
+ }
// update controls
NameModify(m_pShortNameEdit);
if( SfxRequest::HasMacroRecorder( pSh->GetView().GetViewFrame() ) )
More information about the Libreoffice-commits
mailing list