[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 9 commits - instsetoo_native/util svtools/source sw/inc sw/source vcl/aqua vcl/source xmloff/source
Herbert Dürr
hdu at apache.org
Thu May 22 11:08:38 PDT 2014
instsetoo_native/util/openoffice.lst | 48 +++++++--------
svtools/source/filter/filter.cxx | 11 ++-
sw/inc/ndgrf.hxx | 58 ++++++------------
sw/source/core/graphic/ndgrf.cxx | 53 ++++++++---------
sw/source/core/unocore/unoframe.cxx | 19 ++----
sw/source/filter/xml/xmltexte.cxx | 2
sw/source/ui/misc/glossary.cxx | 5 +
vcl/aqua/source/gdi/ctfonts.cxx | 18 -----
vcl/aqua/source/gdi/ctfonts.hxx | 2
vcl/aqua/source/gdi/ctlayout.cxx | 43 +++++++++++--
vcl/aqua/source/window/salframeview.mm | 102 +++++++++++++++------------------
vcl/source/gdi/font.cxx | 6 -
vcl/source/gdi/outdev3.cxx | 8 --
xmloff/source/draw/shapeexport2.cxx | 73 ++++++++++++-----------
14 files changed, 215 insertions(+), 233 deletions(-)
New commits:
commit 8470308050cb5c71262fdf67ec689d628c9558e8
Author: Herbert Dürr <hdu at apache.org>
Date: Wed May 21 12:56:56 2014 +0000
#i124915# use target device dependent font height again
Setting a fixed default font height parameter doesn't make much sense when
neither the target device nor its mapping mode nor its target resolution are
known. This change reverts revision 1589449 of bug 124686 that has already been
solved differently and restores the previous behaviour so that the default height
of default constructed fonts is set to 12pt when the target device becomes known.
Reviewed-by: Armin Le Grand <alg at apache.org>
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index 6972467..1826c92 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -74,12 +74,6 @@ Impl_Font::Impl_Font() :
mbVertical = false;
mbTransparent = true;
mbConfigLookup = false;
-
- // #124686# the Size is defaulted to (0,0) when default constructed,
- // this is not useful for a default font. Init it to a useful default
- // so that the Font::Font() constructor which uses a 'naked' static
- // Impl_Font instance (aStaticImplFont) creates a useful default font
- maSize = Size(0, 16);
}
// -----------------------------------------------------------------------
commit 4bdef485997f44c1acf786232327ed6901c60f63
Author: Herbert Dürr <hdu at apache.org>
Date: Wed May 21 11:50:36 2014 +0000
#i124940# update build target product name after the AOO 4.1 release
on trunk the 4.1.0 build target product name is obsolete after AOO 4.1 was
branched off and released. This change tentatively updates it to 4.2 which is
the anticipated name of the next release to be branched of from trunk.
Reported-by: Rainer Bielefeld <rainerbielefeld_ooo_qa at bielefeldundbuss.de>
diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst
index 4ed8f31..b8125cb 100644
--- a/instsetoo_native/util/openoffice.lst
+++ b/instsetoo_native/util/openoffice.lst
@@ -5,9 +5,9 @@ Globals
variables
{
APACHEPROJECTNAME Apache OpenOffice
- OOOBASEVERSION 4.1
- OOOPACKAGEVERSION 4.1.0
- UREPACKAGEVERSION 4.1.0
+ OOOBASEVERSION 4.2
+ OOOPACKAGEVERSION 4.2.0
+ UREPACKAGEVERSION 4.2.0
URELAYERVERSION 1
BASISROOTNAME OpenOffice
UNIXBASISROOTNAME openoffice
@@ -39,9 +39,9 @@ Globals
OOOXMLFILEFORMATNAME OpenOffice.org XML
OOOXMLFILEFORMATVERSION 1.0
WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1
- SERVICETAG_PRODUCTNAME Apache OpenOffice 4.1
- SERVICETAG_PRODUCTVERSION 4.1
- SERVICETAG_PARENTNAME Apache OpenOffice 4.1
+ SERVICETAG_PRODUCTNAME Apache OpenOffice 4.2
+ SERVICETAG_PRODUCTVERSION 4.2
+ SERVICETAG_PARENTNAME Apache OpenOffice 4.2
SERVICETAG_SOURCE {buildsource}{minor}(Build:{buildid})
SERVICETAG_URN urn:uuid:500061aa-5666-11e0-8e00-080020a9ed93
REGISTRATION_HOST https://registration.openoffice.org
@@ -59,7 +59,7 @@ Apache_OpenOffice
{
FULLPRODUCTNAME Apache OpenOffice
PRODUCTNAME OpenOffice
- PRODUCTVERSION 4.1.0
+ PRODUCTVERSION 4.2.0
PRODUCTEXTENSION
LONG_PRODUCTEXTENSION
SHORT_PRODUCTEXTENSION
@@ -67,15 +67,15 @@ Apache_OpenOffice
POSTVERSIONEXTENSIONUNIX
BRANDPACKAGEVERSION 4
USERDIRPRODUCTVERSION 4
- ABOUTBOXPRODUCTVERSION 4.1.0
- BASEPRODUCTVERSION 4.1
+ ABOUTBOXPRODUCTVERSION 4.2.0
+ BASEPRODUCTVERSION 4.2
PCPFILENAME openoffice.pcp
UPDATEURL https://ooo-updates.apache.org/aoonext/check.Update
ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,userland.txt,version.lst
REMOVE_UPGRADE_CODE_FILE upgradecode_remove_ooo.txt
ADDSYSTEMINTEGRATION 1
EVAL
- PACKAGEVERSION 4.1.0
+ PACKAGEVERSION 4.2.0
PACKAGEREVISION {milestone}
LICENSENAME ALv2
GLOBALFILEGID gid_File_Lib_Vcl
@@ -120,7 +120,7 @@ Apache_OpenOffice_Dev
{
FULLPRODUCTNAME AOO-Developer-Build
PRODUCTNAME AOO-Developer-Build
- PRODUCTVERSION 4.1.0
+ PRODUCTVERSION 4.2.0
PRODUCTEXTENSION
LONG_PRODUCTEXTENSION
SHORT_PRODUCTEXTENSION
@@ -130,8 +130,8 @@ Apache_OpenOffice_Dev
POSTVERSIONEXTENSIONUNIX
BRANDPACKAGEVERSION 4
USERDIRPRODUCTVERSION 4
- ABOUTBOXPRODUCTVERSION 4.1.0
- BASEPRODUCTVERSION 4.1
+ ABOUTBOXPRODUCTVERSION 4.2.0
+ BASEPRODUCTVERSION 4.2
DEVELOPMENTPRODUCT 1
BASISPACKAGEPREFIX aoodev
UREPACKAGEPREFIX aoodev
@@ -140,7 +140,7 @@ Apache_OpenOffice_Dev
UPDATEURL https://ooo-updates.apache.org/aoonextdev/check.Update
ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,javaversion2.dat,userland.txt,version.lst
EVAL
- PACKAGEVERSION 4.1.0
+ PACKAGEVERSION 4.2.0
PACKAGEREVISION {milestone}
LICENSENAME ALv2
GLOBALFILEGID gid_File_Lib_Vcl
@@ -191,14 +191,14 @@ Apache_OpenOffice_SDK
FULLPRODUCTNAME Apache OpenOffice
PRODUCTNAME OpenOffice
PRODUCTDIRNAME OpenOffice_SDK
- PRODUCTVERSION 4.1.0
+ PRODUCTVERSION 4.2.0
PRODUCTEXTENSION
LONG_PRODUCTEXTENSION
SHORT_PRODUCTEXTENSION
POSTVERSIONEXTENSION SDK
POSTVERSIONEXTENSIONUNIX sdk
BRANDPACKAGEVERSION 4
- PACKAGEVERSION 4.1.0
+ PACKAGEVERSION 4.2.0
PACKAGEREVISION {milestone}
PACK_INSTALLED 1
POOLPRODUCT 0
@@ -239,13 +239,13 @@ Apache_OpenOffice_Beta_SDK
FULLPRODUCTNAME Apache OpenOffice Beta
PRODUCTNAME OpenOffice Beta
PRODUCTDIRNAME OpenOffice_SDK_Beta
- PRODUCTVERSION 4.1.0
+ PRODUCTVERSION 4.2.0
PRODUCTEXTENSION
SHORT_PRODUCTEXTENSION
POSTVERSIONEXTENSION SDK
POSTVERSIONEXTENSIONUNIX sdk
BRANDPACKAGEVERSION 4
- PACKAGEVERSION 4.1.0
+ PACKAGEVERSION 4.2.0
PACKAGEREVISION {milestone}
PACK_INSTALLED 1
POOLPRODUCT 0
@@ -285,7 +285,7 @@ Apache_OpenOffice_Dev_SDK
{
FULLPRODUCTNAME AOO-Developer-Build
PRODUCTNAME AOO-Developer-Build
- PRODUCTVERSION 4.1.0
+ PRODUCTVERSION 4.2.0
PRODUCTEXTENSION
LONG_PRODUCTEXTENSION
SHORT_PRODUCTEXTENSION
@@ -294,7 +294,7 @@ Apache_OpenOffice_Dev_SDK
POSTVERSIONEXTENSION SDK
POSTVERSIONEXTENSIONUNIX sdk
BRANDPACKAGEVERSION 4
- PACKAGEVERSION 4.1.0
+ PACKAGEVERSION 4.2.0
PACKAGEREVISION {milestone}
BASISPACKAGEPREFIX aoodev
UREPACKAGEPREFIX aoodev
@@ -338,7 +338,7 @@ Apache_OpenOffice_Beta
{
FULLPRODUCTNAME Apache OpenOffice Beta
PRODUCTNAME OpenOffice Beta
- PRODUCTVERSION 4.1.0
+ PRODUCTVERSION 4.2.0
PRODUCTEXTENSION
SHORT_PRODUCTEXTENSION
BASISROOTNAME AOOBeta
@@ -348,14 +348,14 @@ Apache_OpenOffice_Beta
POSTVERSIONEXTENSION
BRANDPACKAGEVERSION 4
USERDIRPRODUCTVERSION 4
- ABOUTBOXPRODUCTVERSION 4.1.0
- BASEPRODUCTVERSION 4.1
+ ABOUTBOXPRODUCTVERSION 4.2.0
+ BASEPRODUCTVERSION 4.2
UPDATEURL https://ooo-updates.apache.org/aoonextbeta/check.Update
ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,userland.txt,version.lst
REMOVE_UPGRADE_CODE_FILE upgradecode_remove_ooo.txt
ADDSYSTEMINTEGRATION 0
EVAL
- PACKAGEVERSION 4.1.0
+ PACKAGEVERSION 4.2.0
PACKAGEREVISION {milestone}
LICENSENAME ALv2
GLOBALFILEGID gid_File_Lib_Vcl
commit 8ba6a0be8a0ac9075b2faa68bf71245f4aff0d16
Author: Herbert Dürr <hdu at apache.org>
Date: Wed May 21 07:07:36 2014 +0000
#i124191# small cleanup for salframeview.mm
clean up some minor warts while the behaviour remains unchanged.
diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm
index 710195e..4e0bbd1 100644
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -20,7 +20,6 @@
*************************************************************/
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
@@ -37,13 +36,6 @@
#define WHEEL_EVENT_FACTOR 1.5
-// for allowing fullscreen support on deployment targets < OSX 10.7
-#if !defined(MAC_OS_X_VERSION_10_7)
- #define NSWindowCollectionBehaviorFullScreenPrimary (1 << 7)
- #define NSWindowCollectionBehaviorFullScreenAuxiliary (1 << 8)
-// #define NSFullScreenWindowMask (1 << 14)
-#endif
-
static sal_uInt16 ImplGetModifierMask( unsigned int nMask )
{
@@ -80,15 +72,15 @@ static sal_uInt16 ImplMapCharCode( sal_Unicode aCode )
KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T, KEY_U, KEY_V, KEY_W,
KEY_X, KEY_Y, KEY_Z, 0, 0, 0, KEY_TILDE, KEY_BACKSPACE
};
-
+
// Note: the mapping 0x7f should by rights be KEY_DELETE
// however if you press "backspace" 0x7f is reported
// whereas for "delete" 0xf728 gets reported
-
+
// Note: the mapping of 0x19 to KEY_TAB is because for unknown reasons
// tab alone is reported as 0x09 (as expected) but shift-tab is
// reported as 0x19 (end of medium)
-
+
static sal_uInt16 aFunctionKeyCodeMap[ 128 ] =
{
KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_F1, KEY_F2, KEY_F3, KEY_F4,
@@ -108,7 +100,7 @@ static sal_uInt16 ImplMapCharCode( sal_Unicode aCode )
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0
};
-
+
sal_uInt16 nKeyCode = 0;
if( aCode < sizeof( aKeyCodeMap) / sizeof( aKeyCodeMap[0] ) )
nKeyCode = aKeyCodeMap[ aCode ];
@@ -179,7 +171,7 @@ static AquaSalFrame* getMouseContainerFrame()
[pNSWindow performSelector:setRestorable withObject:(id)NO];
}
- return pNSWindow;
+ return (SalFrameWindow*)pNSWindow;
}
-(AquaSalFrame*)getSalFrame
@@ -237,7 +229,7 @@ static AquaSalFrame* getMouseContainerFrame()
static const sal_uLong nGuessDocument = SAL_FRAME_STYLE_MOVEABLE|
SAL_FRAME_STYLE_SIZEABLE|
SAL_FRAME_STYLE_CLOSEABLE;
-
+
if( mpFrame->mpMenu )
mpFrame->mpMenu->setMainMenu();
else if( ! mpFrame->mpParent &&
@@ -547,7 +539,7 @@ private:
pDispatchFrame = s_pMouseFrame;
else
pDispatchFrame = mpFrame;
-
+
/* #i81645# Cocoa reports mouse events while a button is pressed
to the window in which it was first pressed. This is reasonable and fine and
gets one around most cases where on other platforms one uses CaptureMouse or XGrabPointer,
@@ -560,7 +552,7 @@ private:
// is this event actually inside that NSWindow ?
NSPoint aPt = [NSEvent mouseLocation];
NSRect aFrameRect = [pDispatchFrame->getNSWindow() frame];
-
+
if ( ! NSPointInRect( aPt, aFrameRect ) )
{
// no, it is not
@@ -573,7 +565,7 @@ private:
NSWindow* pWindow = [NSApp makeWindowsPerform: @selector(containsMouse) inOrder: YES];
if( pWindow && [pWindow isMemberOfClass: [SalFrameWindow class]] )
pDispatchFrame = [(SalFrameWindow*)pWindow getSalFrame];
-
+
However if a non SalFrameWindow is on screen (like e.g. the file dialog)
it can be hit with the containsMouse selector, which it doesn't support.
Sadly NSApplication:makeWindowsPerform does not check (for performance reasons
@@ -584,7 +576,7 @@ private:
pDispatchFrame = pMouseFrame;
}
}
-
+
if( pDispatchFrame && AquaSalFrame::isAlive( pDispatchFrame ) )
{
pDispatchFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 );
@@ -592,7 +584,7 @@ private:
NSPoint aPt = [NSEvent mouseLocation];
pDispatchFrame->CocoaToVCL( aPt );
-
+
sal_uInt16 nModMask = ImplGetModifierMask( [pEvent modifierFlags] );
// #i82284# emulate ctrl left
if( nModMask == KEY_MOD3 && nButton == MOUSE_LEFT )
@@ -611,7 +603,7 @@ private:
// --- RTL --- (mirror mouse pos)
if( Application::GetSettings().GetLayoutRTL() )
aEvent.mnX = pDispatchFrame->maGeometry.nWidth-1-aEvent.mnX;
-
+
pDispatchFrame->CallCallback( nEvent, &aEvent );
}
}
@@ -654,7 +646,7 @@ private:
-(void)mouseEntered: (NSEvent*)pEvent
{
s_pMouseFrame = mpFrame;
-
+
// #i107215# the only mouse events we get when inactive are enter/exit
// actually we would like to have all of them, but better none than some
if( [NSApp isActive] )
@@ -722,7 +714,7 @@ private:
- (void)magnifyWithEvent: (NSEvent*)pEvent
{
YIELD_GUARD;
-
+
// TODO: ?? -(float)magnification;
if( AquaSalFrame::isAlive( mpFrame ) )
{
@@ -761,7 +753,7 @@ private:
NSPoint aPt = [NSEvent mouseLocation];
mpFrame->CocoaToVCL( aPt );
-
+
SalWheelMouseEvent aEvent;
aEvent.mnTime = mpFrame->mnLastEventTime;
aEvent.mnX = static_cast<long>(aPt.x) - mpFrame->maGeometry.nX;
@@ -769,11 +761,11 @@ private:
aEvent.mnCode = ImplGetModifierMask( mpFrame->mnLastModifierFlags );
aEvent.mnCode |= KEY_MOD1; // we want zooming, no scrolling
aEvent.mbDeltaIsPixel = TRUE;
-
+
// --- RTL --- (mirror mouse pos)
if( Application::GetSettings().GetLayoutRTL() )
aEvent.mnX = mpFrame->maGeometry.nWidth-1-aEvent.mnX;
-
+
aEvent.mnDelta = nDeltaZ;
aEvent.mnNotchDelta = (nDeltaZ >= 0) ? +1 : -1;
if( aEvent.mnDelta == 0 )
@@ -796,12 +788,12 @@ private:
- (void)swipeWithEvent: (NSEvent*)pEvent
{
YIELD_GUARD;
-
+
if( AquaSalFrame::isAlive( mpFrame ) )
{
mpFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 );
mpFrame->mnLastModifierFlags = [pEvent modifierFlags];
-
+
// merge pending scroll wheel events
CGFloat dX = 0.0;
CGFloat dY = 0.0;
@@ -815,21 +807,21 @@ private:
break;
pEvent = pNextEvent;
}
-
+
NSPoint aPt = [NSEvent mouseLocation];
mpFrame->CocoaToVCL( aPt );
-
+
SalWheelMouseEvent aEvent;
aEvent.mnTime = mpFrame->mnLastEventTime;
aEvent.mnX = static_cast<long>(aPt.x) - mpFrame->maGeometry.nX;
aEvent.mnY = static_cast<long>(aPt.y) - mpFrame->maGeometry.nY;
aEvent.mnCode = ImplGetModifierMask( mpFrame->mnLastModifierFlags );
aEvent.mbDeltaIsPixel = TRUE;
-
+
// --- RTL --- (mirror mouse pos)
if( Application::GetSettings().GetLayoutRTL() )
aEvent.mnX = mpFrame->maGeometry.nWidth-1-aEvent.mnX;
-
+
if( dX != 0.0 )
{
aEvent.mnDelta = static_cast<long>(floor(dX));
@@ -856,7 +848,7 @@ private:
-(void)scrollWheel: (NSEvent*)pEvent
{
YIELD_GUARD;
-
+
if( AquaSalFrame::isAlive( mpFrame ) )
{
mpFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 );
@@ -897,7 +889,7 @@ private:
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;
@@ -910,8 +902,8 @@ private:
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 );
@@ -923,7 +915,7 @@ private:
-(void)keyDown: (NSEvent*)pEvent
{
YIELD_GUARD;
-
+
if( AquaSalFrame::isAlive( mpFrame ) )
{
mpLastEvent = pEvent;
@@ -933,7 +925,7 @@ private:
mpFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 );
mpFrame->mnLastModifierFlags = [pEvent modifierFlags];
-
+
if( ! [self handleKeyDownException: pEvent] )
{
NSArray* pArray = [NSArray arrayWithObject: pEvent];
@@ -963,7 +955,7 @@ private:
}
unichar keyChar = [pUnmodifiedString characterAtIndex: 0];
sal_uInt16 nKeyCode = ImplMapCharCode( keyChar );
-
+
// Caution: should the table grow to more than 5 or 6 entries,
// we must consider moving it to a kind of hash map
const unsigned int nExceptions = sizeof( aExceptionalKeys ) / sizeof( aExceptionalKeys[0] );
@@ -985,7 +977,7 @@ private:
-(void)flagsChanged: (NSEvent*)pEvent
{
YIELD_GUARD;
-
+
if( AquaSalFrame::isAlive( mpFrame ) )
{
mpFrame->mnLastEventTime = static_cast<sal_uLong>( [pEvent timestamp] * 1000.0 );
@@ -996,7 +988,7 @@ private:
-(void)insertText:(id)aString
{
YIELD_GUARD;
-
+
if( AquaSalFrame::isAlive( mpFrame ) )
{
NSString* pInsert = nil;
@@ -1004,14 +996,14 @@ private:
pInsert = [aString string];
else
pInsert = aString;
-
+
int nLen = 0;
if( pInsert && ( nLen = [pInsert length] ) > 0 )
{
OUString aInsertString( GetOUString( pInsert ) );
// aCharCode initializer is safe since aInsertString will at least contain '\0'
sal_Unicode aCharCode = *aInsertString.getStr();
-
+
if( nLen == 1 &&
aCharCode < 0x80 &&
aCharCode > 0x1f &&
@@ -1023,7 +1015,7 @@ private:
// #i99567#
// find out the unmodified key code
-
+
// sanity check
if( mpLastEvent && ( [mpLastEvent type] == NSKeyDown || [mpLastEvent type] == NSKeyUp ) )
{
@@ -1443,7 +1435,7 @@ private:
mpLastSuperEvent = mpLastEvent;
[NSApp performSelector:@selector(sendSuperEvent:) withObject: mpLastEvent];
mpLastSuperEvent = pLastSuperEvent;
-
+
std::map< NSEvent*, bool >::iterator it = GetSalData()->maKeyEventAnswer.find( mpLastEvent );
if( it != GetSalData()->maKeyEventAnswer.end() )
it->second = true;
@@ -1466,7 +1458,7 @@ private:
-(BOOL)sendKeyToFrameDirect: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod
{
YIELD_GUARD;
-
+
long nRet = 0;
if( AquaSalFrame::isAlive( mpFrame ) )
{
@@ -1551,7 +1543,7 @@ private:
// and b) why we should have a marked range at this point.
if( ! mbInKeyInput )
return NSMakeRange( 0, 0 );
-
+
return [self hasMarkedText] ? mMarkedRange : NSMakeRange( NSNotFound, 0 );
}
@@ -1589,7 +1581,7 @@ private:
{
unsigned int nUnderlineValue;
NSRange effectiveRange;
-
+
effectiveRange = NSMakeRange(i, 1);
nUnderlineValue = [[aString attribute:NSUnderlineStyleAttributeName atIndex:i effectiveRange:&effectiveRange] unsignedIntValue];
commit 9255b5e185684b00be4cd72e537120647e838a40
Author: Herbert Dürr <hdu at apache.org>
Date: Wed May 21 06:51:34 2014 +0000
#i124191# fix horizontal scroll events on Mac
A problem with horizontal scrolling was reported on Mac. Reviewing the relevant
code identified some problems. The patch to fix them was confirmed to also fix
the reported problem.
Found-by: erben.fr at gmail.com
Tested-by: cemonadresse at orange.fr
Tested-by: TrolliusX at t-online.de
Tested-by: thorsten.wagner.4 at gmail.com
diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm
index 1843863..710195e 100644
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -803,8 +803,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];
@@ -833,7 +833,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;
@@ -843,7 +843,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;
@@ -863,8 +863,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];
@@ -893,11 +893,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 = dY > 0 ? dX/WHEEL_EVENT_FACTOR : -dX/WHEEL_EVENT_FACTOR;
+ aEvent.mnScrollLines = (dX > 0) ? +dX/WHEEL_EVENT_FACTOR : -dX/WHEEL_EVENT_FACTOR;
if( aEvent.mnScrollLines == 0 )
aEvent.mnScrollLines = 1;
@@ -906,11 +906,11 @@ 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;
+ aEvent.mnScrollLines = (dY > 0) ? +dY/WHEEL_EVENT_FACTOR : -dY/WHEEL_EVENT_FACTOR;
if( aEvent.mnScrollLines < 1 )
aEvent.mnScrollLines = 1;
commit a9b9ceff86f35be1eeff5f251d24e338db760a1e
Author: Herbert Dürr <hdu at apache.org>
Date: Tue May 20 12:00:50 2014 +0000
#i124935# fix expanded/condensed text breaking in the CoreText engine
the concept of an extra-width per code-unit was obsolete at least since apps
supported unicode with its different normalization forms, diacritical marks,
surrogate-pairs, non-printing characters such as ZWJ/ZWNJ/RLM, etc. so of
course modern engines like CoreText don't aid this typographical crime.
The fix here extends the CTLayout::GetTextBreak() method to handle the obsolete
semantic of per code-unit extra-widths by successively approximating the number
of involved code-units.
diff --git a/vcl/aqua/source/gdi/ctlayout.cxx b/vcl/aqua/source/gdi/ctlayout.cxx
index cd33eff..880caae 100644
--- a/vcl/aqua/source/gdi/ctlayout.cxx
+++ b/vcl/aqua/source/gdi/ctlayout.cxx
@@ -451,13 +451,35 @@ int CTLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const
return STRING_LEN;
CTTypesetterRef aCTTypeSetter = CTTypesetterCreateWithAttributedString( mpAttrString );
- const double fCTMaxWidth = (double)nMaxWidth / (nFactor * mfFontScale);
- CFIndex nIndex = CTTypesetterSuggestClusterBreak( aCTTypeSetter, 0, fCTMaxWidth );
- if( nIndex >= mnCharCount )
- return STRING_LEN;
- nIndex += mnMinCharPos;
- return (int)nIndex;
+ CFIndex nBestGuess = (nCharExtra >= 0) ? 0 : mnCharCount;
+ for( int i = 1; i <= mnCharCount; i *= 2 )
+ {
+ // guess the target width considering char-extra expansion/condensation
+ const long nTargetWidth = nMaxWidth - nBestGuess * nCharExtra;
+ const double fCTMaxWidth = nTargetWidth / (nFactor * mfFontScale);
+ // calculate the breaking index for the guessed target width
+ const CFIndex nNewIndex = CTTypesetterSuggestClusterBreak( aCTTypeSetter, 0, fCTMaxWidth );
+ if( nNewIndex >= mnCharCount ) {
+ CFRelease( aCTTypeSetter );
+ return STRING_LEN;
+ }
+ // check if the original extra-width guess was good
+ if( !nCharExtra )
+ nBestGuess = nNewIndex;
+ if( nBestGuess == nNewIndex )
+ break;
+ // prepare another round for a different number of characters
+ CFIndex nNewGuess = (nNewIndex + nBestGuess + 1) / 2;
+ if( nNewGuess == nBestGuess )
+ nNewGuess += (nNewIndex > nBestGuess) ? +1 : -1;
+ nBestGuess = nNewGuess;
+ }
+
+ // suggest the best fitting cluster break as breaking position
+ CFRelease( aCTTypeSetter );
+ const int nIndex = nBestGuess + mnMinCharPos;
+ return nIndex;
}
// -----------------------------------------------------------------------
commit 42f9768f771457c53a9f1e6a3581b2df9856401f
Author: Herbert Dürr <hdu at apache.org>
Date: Mon May 19 12:05:27 2014 +0000
#i124922# allow late setting of the font color for CoreText-layouted text
diff --git a/vcl/aqua/source/gdi/ctfonts.cxx b/vcl/aqua/source/gdi/ctfonts.cxx
index 6d4ae40..5ff8c05 100644
--- a/vcl/aqua/source/gdi/ctfonts.cxx
+++ b/vcl/aqua/source/gdi/ctfonts.cxx
@@ -140,6 +140,9 @@ CTTextStyle::CTTextStyle( const ImplFontSelectData& rFSD )
CFDictionarySetValue( mpStyleDict, kCTFontAttributeName, pNewCTFont );
CFRelease( pNewCTFont);
+ // allow delayed setting the font color, i.e. after the text layout
+ CFDictionarySetValue( mpStyleDict, kCTForegroundColorFromContextAttributeName, kCFBooleanTrue );
+
// handle emulation of bold styles if requested and the font that doesn't provide them
if( (pReqFont->meWeight > WEIGHT_MEDIUM)
&& (mpFontData->meWeight <= WEIGHT_MEDIUM)
@@ -282,21 +285,6 @@ bool CTTextStyle::GetGlyphOutline( sal_GlyphId aGlyphId, basegfx::B2DPolyPolygon
return true;
}
-// -----------------------------------------------------------------------
-
-void CTTextStyle::SetTextColor( const RGBAColor& rColor )
-{
-#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5)
- CGColorRef pCGColor = CGColorCreateGenericRGB( rColor.GetRed(),
- rColor.GetGreen(), rColor.GetBlue(), rColor.GetAlpha() );
-#else // for builds on OSX 10.4 SDK
- const CGColorSpaceRef pCGColorSpace = GetSalData()->mxRGBSpace;
- CGColorRef pCGColor = CGColorCreate( pCGColorSpace, rColor.AsArray() );
-#endif
- CFDictionarySetValue( mpStyleDict, kCTForegroundColorAttributeName, pCGColor );
- CFRelease( pCGColor);
-}
-
// =======================================================================
CTFontData::CTFontData( const ImplDevFontAttributes& rDFA, sal_IntPtr nFontId )
diff --git a/vcl/aqua/source/gdi/ctfonts.hxx b/vcl/aqua/source/gdi/ctfonts.hxx
index 3ad46e9..c8118dd 100644
--- a/vcl/aqua/source/gdi/ctfonts.hxx
+++ b/vcl/aqua/source/gdi/ctfonts.hxx
@@ -39,7 +39,7 @@ public:
virtual bool GetGlyphBoundRect( sal_GlyphId, Rectangle& ) const;
virtual bool GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& ) const;
- virtual void SetTextColor( const RGBAColor& );
+ virtual void SetTextColor( const RGBAColor& ) {}
private:
/// CoreText text style object
diff --git a/vcl/aqua/source/gdi/ctlayout.cxx b/vcl/aqua/source/gdi/ctlayout.cxx
index 8f57ca1..cd33eff 100644
--- a/vcl/aqua/source/gdi/ctlayout.cxx
+++ b/vcl/aqua/source/gdi/ctlayout.cxx
@@ -111,6 +111,7 @@ CTLayout::~CTLayout()
bool CTLayout::LayoutText( ImplLayoutArgs& rArgs )
{
+ // release an eventual older layout
if( mpAttrString )
CFRelease( mpAttrString );
mpAttrString = NULL;
@@ -118,6 +119,7 @@ bool CTLayout::LayoutText( ImplLayoutArgs& rArgs )
CFRelease( mpCTLine );
mpCTLine = NULL;
+ // initialize the new layout
SalLayout::AdjustLayout( rArgs );
mnCharCount = mnEndCharPos - mnMinCharPos;
@@ -249,7 +251,7 @@ void CTLayout::DrawText( SalGraphics& rGraphics ) const
CGContextScaleCTM( rAquaGraphics.mrContext, +mfFontScale, -mfFontScale );
CGContextSetShouldAntialias( rAquaGraphics.mrContext, !rAquaGraphics.mbNonAntialiasedText );
- // Draw the text
+ // set the text transformation (e.g. position)
const Point aVclPos = GetDrawPosition( Point(mnBaseAdv,0) );
CGPoint aTextPos = { +aVclPos.X()/mfFontScale, -aVclPos.Y()/mfFontScale };
@@ -262,6 +264,11 @@ void CTLayout::DrawText( SalGraphics& rGraphics ) const
}
CGContextSetTextPosition( rAquaGraphics.mrContext, aTextPos.x, aTextPos.y );
+
+ // set the text color as fill color (see kCTForegroundColorFromContextAttributeName)
+ CGContextSetFillColor( rAquaGraphics.mrContext, rAquaGraphics.maTextColor.AsArray() );
+
+ // draw the text
CTLineDraw( mpCTLine, rAquaGraphics.mrContext );
// request an update of the changed window area
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index cb65e9d..2657f23 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -6043,14 +6043,6 @@ SalLayout* OutputDevice::ImplLayout( const String& rOrigStr,
ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs( aStr, nMinIndex, nLen, nPixelWidth, pDXArray );
-#ifdef MACOSX
- // CoreText layouts are immutable and already contain the text color
- // so we need to provide the color already for the layout request
- // even if this layout will never be drawn
- if( mbInitTextColor )
- const_cast<OutputDevice&>(*this).ImplInitTextColor();
-#endif
-
// get matching layout object for base font
SalLayout* pSalLayout = NULL;
if( mpPDFWriter )
commit a5cfb91f3dc4b38055fb920f65101cc45d52f8de
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Mon May 19 11:50:38 2014 +0000
124717: do not mark *.svm graphic files as *.bmp graphic files
diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx
index 7b47488..71f3f90 100644
--- a/svtools/source/filter/filter.cxx
+++ b/svtools/source/filter/filter.cxx
@@ -1630,8 +1630,8 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath,
if( !ImportXPM( rIStream, rGraphic ) )
nStatus = GRFILTER_FILTERERROR;
}
- else if( aFilterName.EqualsIgnoreCaseAscii( IMP_BMP ) ||
- aFilterName.EqualsIgnoreCaseAscii( IMP_SVMETAFILE ) )
+ else if ( aFilterName.EqualsIgnoreCaseAscii( IMP_BMP )
+ || aFilterName.EqualsIgnoreCaseAscii( IMP_SVMETAFILE ) )
{
// SV interne Importfilter fuer Bitmaps und MetaFiles
rIStream >> rGraphic;
@@ -1642,8 +1642,11 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath,
}
else
{
- // #15508# added BMP type (checked, works)
- eLinkType = GFX_LINK_TYPE_NATIVE_BMP;
+ if ( aFilterName.EqualsIgnoreCaseAscii( IMP_BMP ) )
+ {
+ // #15508# added BMP type (checked, works)
+ eLinkType = GFX_LINK_TYPE_NATIVE_BMP;
+ }
}
}
else if( aFilterName.EqualsIgnoreCaseAscii( IMP_WMF ) ||
commit a90c007908eb3f66e28a9ea525729065db652b6f
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Mon May 19 11:37:11 2014 +0000
114361: provide and accept changed URL of embedded graphic file during save (ODF export)
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index f9ee8ac..6d59466 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -25,22 +25,17 @@
#include <sfx2/lnkbase.hxx>
#include <svtools/grfmgr.hxx>
#include <ndnotxt.hxx>
-// --> OD, MAV 2005-08-17 #i53025#
#include <com/sun/star/embed/XStorage.hpp>
-// <--
-// --> OD 2007-03-28 #i73788#
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
class SwAsyncRetrieveInputStreamThreadConsumer;
-// <--
class SwGrfFmtColl;
class SwDoc;
class GraphicAttr;
class SvStorage;
-// --------------------
-// SwGrfNode
-// --------------------
+
+
class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
{
friend class SwNodes;
@@ -49,28 +44,19 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
GraphicObject* mpReplacementGraphic;
::sfx2::SvBaseLinkRef refLink; // falls Grafik nur als Link, dann Pointer gesetzt
Size nGrfSize;
-// String aStrmName; // SW3: Name des Storage-Streams fuer Embedded
- String aNewStrmName; // SW3/XML: new stream name (either SW3 stream
- // name or package url)
- String aLowResGrf; // HTML: LowRes Grafik (Ersatzdarstellung bis
- // die normale (HighRes) geladen ist.
- sal_Bool bTransparentFlagValid :1;
- sal_Bool bInSwapIn :1;
-
- sal_Bool bGrafikArrived :1;
- sal_Bool bChgTwipSize :1;
- sal_Bool bChgTwipSizeFromPixel :1;
- sal_Bool bLoadLowResGrf :1;
- sal_Bool bFrameInPaint :1; //Um Start-/EndActions im Paint (ueber
- //SwapIn zu verhindern.
- sal_Bool bScaleImageMap :1; //Image-Map in SetTwipSize skalieren
-
- // --> OD 2007-01-19 #i73788#
+ sal_Bool bInSwapIn :1;
+
+ sal_Bool bGrafikArrived :1;
+ sal_Bool bChgTwipSize :1;
+ sal_Bool bChgTwipSizeFromPixel :1;
+ sal_Bool bLoadLowResGrf :1;
+ sal_Bool bFrameInPaint :1; // Um Start-/EndActions im Paint (ueber SwapIn zu verhindern.
+ sal_Bool bScaleImageMap :1; // Image-Map in SetTwipSize skalieren
+
boost::shared_ptr< SwAsyncRetrieveInputStreamThreadConsumer > mpThreadConsumer;
bool mbLinkedInputStreamReady;
com::sun::star::uno::Reference<com::sun::star::io::XInputStream> mxInputStream;
sal_Bool mbIsStreamReadOnly;
- // <--
SwGrfNode( const SwNodeIndex& rWhere,
const String& rGrfName, const String& rFltName,
@@ -90,13 +76,7 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
void InsertLink( const String& rGrfName, const String& rFltName );
sal_Bool ImportGraphic( SvStream& rStrm );
sal_Bool HasStreamName() const { return maGrfObj.HasUserData(); }
- // --> OD 2005-05-04 #i48434# - adjust return type and rename method to
- // indicate that its an private one.
- // --> OD 2005-08-17 #i53025#
- // embedded graphic stream couldn't be inside a 3.1 - 5.2 storage any more.
- // Thus, return value isn't needed any more.
void _GetStreamStorageNames( String& rStrmName, String& rStgName ) const;
- // <--
void DelStreamName();
DECL_LINK( SwapGraphic, GraphicObject* );
@@ -194,11 +174,15 @@ public:
sal_Bool bModify = sal_True );
// Laden der Grafik unmittelbar vor der Anzeige
short SwapIn( sal_Bool bWaitForData = sal_False );
- // Entfernen der Grafik, um Speicher freizugeben
+ // Entfernen der Grafik, um Speicher freizugeben
short SwapOut();
- // Zugriff auf den Storage-Streamnamen
- void SetStreamName( const String& r ) { maGrfObj.SetUserData( r ); }
- void SetNewStreamName( const String& r ) { aNewStrmName = r; }
+
+ // applying new stream name for embedded graphic - needed as saving the document might change this stream name
+ void ApplyNewEmbeddedStreamName( const String& r )
+ {
+ maGrfObj.SetUserData( r );
+ }
+
// is this node selected by any shell?
sal_Bool IsSelected() const;
#endif
@@ -224,7 +208,6 @@ public:
GraphicAttr& GetGraphicAttr( GraphicAttr&, const SwFrm* pFrm ) const;
#endif
- // --> OD 2007-01-18 #i73788#
boost::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > GetThreadConsumer();
bool IsLinkedInputStreamReady() const;
void TriggerAsyncRetrieveInputStream();
@@ -232,10 +215,7 @@ public:
com::sun::star::uno::Reference<com::sun::star::io::XInputStream> xInputStream,
const sal_Bool bIsStreamReadOnly );
void UpdateLinkWithInputStream();
- // <--
- // --> OD 2008-07-21 #i90395#
bool IsAsyncRetrieveInputStreamPossible() const;
- // <--
};
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 5fa944c..e9c6348 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -68,44 +68,41 @@ using namespace com::sun::star;
// SwGrfNode
// --------------------
SwGrfNode::SwGrfNode(
- const SwNodeIndex & rWhere,
- const String& rGrfName, const String& rFltName,
- const Graphic* pGraphic,
- SwGrfFmtColl *pGrfColl,
- SwAttrSet* pAutoAttr ) :
- SwNoTxtNode( rWhere, ND_GRFNODE, pGrfColl, pAutoAttr ),
- maGrfObj(),
- mpReplacementGraphic(0),
- // --> OD 2007-01-23 #i73788#
- mbLinkedInputStreamReady( false ),
- mbIsStreamReadOnly( sal_False )
- // <--
+ const SwNodeIndex & rWhere,
+ const String& rGrfName,
+ const String& rFltName,
+ const Graphic* pGraphic,
+ SwGrfFmtColl *pGrfColl,
+ SwAttrSet* pAutoAttr )
+ : SwNoTxtNode( rWhere, ND_GRFNODE, pGrfColl, pAutoAttr ),
+ maGrfObj(),
+ mpReplacementGraphic( 0 ),
+ mbLinkedInputStreamReady( false ),
+ mbIsStreamReadOnly( sal_False )
{
maGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) );
- bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel = bLoadLowResGrf =
- bFrameInPaint = bScaleImageMap = sal_False;
+ bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel = bLoadLowResGrf = bFrameInPaint = bScaleImageMap = sal_False;
bGrafikArrived = sal_True;
- ReRead(rGrfName,rFltName, pGraphic, 0, sal_False);
+ ReRead( rGrfName, rFltName, pGraphic, 0, sal_False );
}
-SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
- const GraphicObject& rGrfObj,
- SwGrfFmtColl *pGrfColl, SwAttrSet* pAutoAttr ) :
- SwNoTxtNode( rWhere, ND_GRFNODE, pGrfColl, pAutoAttr ),
- maGrfObj(rGrfObj),
- mpReplacementGraphic(0),
- // --> OD 2007-01-23 #i73788#
- mbLinkedInputStreamReady( false ),
- mbIsStreamReadOnly( sal_False )
- // <--
+SwGrfNode::SwGrfNode(
+ const SwNodeIndex & rWhere,
+ const GraphicObject& rGrfObj,
+ SwGrfFmtColl *pGrfColl,
+ SwAttrSet* pAutoAttr )
+ : SwNoTxtNode( rWhere, ND_GRFNODE, pGrfColl, pAutoAttr ),
+ maGrfObj( rGrfObj ),
+ mpReplacementGraphic( 0 ),
+ mbLinkedInputStreamReady( false ),
+ mbIsStreamReadOnly( sal_False )
{
maGrfObj = rGrfObj;
maGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) );
- if( rGrfObj.HasUserData() && rGrfObj.IsSwappedOut() )
+ if ( rGrfObj.HasUserData() && rGrfObj.IsSwappedOut() )
maGrfObj.SetSwapState();
- bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel= bLoadLowResGrf =
- bFrameInPaint = bScaleImageMap = sal_False;
+ bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel = bLoadLowResGrf = bFrameInPaint = bScaleImageMap = sal_False;
bGrafikArrived = sal_True;
}
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 7da5f96..741627a 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2003,26 +2003,25 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
{
String sGrfName;
const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
- if(pIdx)
+ if ( pIdx )
{
- SwNodeIndex aIdx(*pIdx, 1);
-// SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode();
+ SwNodeIndex aIdx( *pIdx, 1 );
SwGrfNode* pGrfNode = aIdx.GetNode().GetGrfNode();
- if(!pGrfNode)
+ if ( !pGrfNode )
throw uno::RuntimeException();
- if( pGrfNode->IsGrfLink() )
+ if ( pGrfNode->IsGrfLink() )
{
- pFmt->GetDoc()->GetGrfNms( *(SwFlyFrmFmt*)pFmt, &sGrfName, 0 );
+ pFmt->GetDoc()->GetGrfNms( *(SwFlyFrmFmt*) pFmt, &sGrfName, 0 );
}
else
{
- String sPrefix( RTL_CONSTASCII_STRINGPARAM(sGraphicObjectProtocol) );
+ String sPrefix( RTL_CONSTASCII_STRINGPARAM( sGraphicObjectProtocol ) );
String sId( pGrfNode->GetGrfObj().GetUniqueID(),
- RTL_TEXTENCODING_ASCII_US );
- (sGrfName = sPrefix) += sId;
+ RTL_TEXTENCODING_ASCII_US );
+ ( sGrfName = sPrefix ) += sId;
}
}
- aAny <<= OUString(sGrfName);
+ aAny <<= OUString( sGrfName );
}
else if( FN_UNO_REPLACEMENT_GRAPHIC_U_R_L == pEntry->nWID)
{
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 84c980f..5bf90e5 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -222,7 +222,7 @@ void SwXMLTextParagraphExport::setTextEmbeddedGraphicURL(
{
String aNewURL( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.Package:") );
aNewURL += String(rURL);
- pGrfNd->SetNewStreamName( aNewURL );
+ pGrfNd->ApplyNewEmbeddedStreamName( aNewURL );
// #i15411# save-as will swap all graphics in; we need to swap
// them out again, to prevent excessive memory use
diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx
index e31e59f..0014188 100644
--- a/xmloff/source/draw/shapeexport2.cxx
+++ b/xmloff/source/draw/shapeexport2.cxx
@@ -1090,37 +1090,38 @@ void XMLShapeExport::ImpExportPolygonShape(
void XMLShapeExport::ImpExportGraphicObjectShape(
const uno::Reference< drawing::XShape >& xShape,
- XmlShapeType eShapeType, sal_Int32 nFeatures, awt::Point* pRefPoint)
+ XmlShapeType eShapeType,
+ sal_Int32 nFeatures,
+ awt::Point* pRefPoint )
{
- const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY);
- if(xPropSet.is())
+ const uno::Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY );
+ if ( xPropSet.is() )
{
sal_Bool bIsEmptyPresObj = sal_False;
uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
// Transformation
- ImpExportNewTrans(xPropSet, nFeatures, pRefPoint);
+ ImpExportNewTrans( xPropSet, nFeatures, pRefPoint );
OUString sImageURL;
- if(eShapeType == XmlShapeTypePresGraphicObjectShape)
- bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_GRAPHIC) );
+ if ( eShapeType == XmlShapeTypePresGraphicObjectShape )
+ bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken( XML_PRESENTATION_GRAPHIC ) );
- sal_Bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210#
- SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DRAW,
- XML_FRAME, bCreateNewline, sal_True );
+ sal_Bool bCreateNewline( ( nFeatures & SEF_EXPORT_NO_WS ) == 0 ); // #86116#/#92210#
+ SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DRAW, XML_FRAME, bCreateNewline, sal_True );
const bool bSaveBackwardsCompatible = ( mrExport.getExportFlags() & EXPORT_SAVEBACKWARDCOMPATIBLE );
- if( !bIsEmptyPresObj || bSaveBackwardsCompatible )
+ if ( !bIsEmptyPresObj || bSaveBackwardsCompatible )
{
- if( !bIsEmptyPresObj )
+ if ( !bIsEmptyPresObj )
{
OUString aReplacementUrl;
xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("ReplacementGraphicURL"))) >>= aReplacementUrl;
// If there is no url, then then graphic is empty
- if(aReplacementUrl.getLength())
+ if ( aReplacementUrl.getLength() )
{
const OUString aStr = mrExport.AddEmbeddedGraphicObject(aReplacementUrl);
@@ -1140,15 +1141,13 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
}
OUString aStreamURL;
- OUString aStr;
-
- xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicStreamURL"))) >>= aStreamURL;
- xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicURL"))) >>= sImageURL;
+ xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicStreamURL" ) ) ) >>= aStreamURL;
+ xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicURL" ) ) ) >>= sImageURL;
OUString aResolveURL( sImageURL );
- const rtl::OUString sPackageURL( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.Package:") );
+ const rtl::OUString sPackageURL( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" ) );
- // sj: trying to preserve the filename
+ // sj: trying to preserve the filename
if ( aStreamURL.match( sPackageURL, 0 ) )
{
rtl::OUString sRequestedName( aStreamURL.copy( sPackageURL.getLength(), aStreamURL.getLength() - sPackageURL.getLength() ) );
@@ -1160,50 +1159,54 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
sRequestedName = sRequestedName.copy( 0, nLastIndex );
if ( sRequestedName.getLength() )
{
- aResolveURL = aResolveURL.concat( OUString(RTL_CONSTASCII_USTRINGPARAM("?requestedName=")));
+ aResolveURL = aResolveURL.concat( OUString( RTL_CONSTASCII_USTRINGPARAM( "?requestedName=" ) ) );
aResolveURL = aResolveURL.concat( sRequestedName );
}
}
- aStr = mrExport.AddEmbeddedGraphicObject( aResolveURL );
- mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, aStr );
+ const OUString aStr = mrExport.AddEmbeddedGraphicObject( aResolveURL );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aStr );
- if( aStr.getLength() )
+ if ( !aStr.isEmpty() )
{
- if( aStr[ 0 ] == '#' )
+ 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;
aAny <<= aStreamURL;
- xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("GraphicStreamURL")), aAny );
+ xPropSet->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicStreamURL" ) ), aAny );
- mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
- mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
- mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
}
}
else
{
OUString aStr;
- mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, aStr );
- mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
- mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
- mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aStr );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
}
{
- SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_DRAW, XML_IMAGE, sal_True, sal_True);
+ SvXMLElementExport aOBJ( mrExport, XML_NAMESPACE_DRAW, XML_IMAGE, sal_True, sal_True );
- if( sImageURL.getLength() )
+ if ( sImageURL.getLength() )
{
// optional office:binary-data
mrExport.AddEmbeddedGraphicObjectAsBase64( sImageURL );
}
- if( !bIsEmptyPresObj )
+ if ( !bIsEmptyPresObj )
ImpExportText( xShape );
}
}
commit 3e285da1115b83bfd168567d561615fb3ee3e6c9
Author: Tsutomu Uchino <hanya at apache.org>
Date: Sun May 18 14:51:45 2014 +0000
#i124204# make fields emtpy on the auto text dialog when parent node is selected
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 10a53cf..12622bb 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -349,7 +349,12 @@ IMPL_LINK( SwGlossaryDlg, GrpSelect, SvTreeListBox *, pBox )
ShowAutoText(*::GetCurrGlosGroup(), aShortNameEdit.GetText());
}
else
+ {
+ aNameED.SetText(aEmptyStr);
+ aShortNameEdit.SetText(aEmptyStr);
+ aInsertBtn.Enable(sal_False);
ShowAutoText(aEmptyStr, aEmptyStr);
+ }
//Controls aktualisieren
NameModify(&aShortNameEdit);
if( SfxRequest::HasMacroRecorder( pSh->GetView().GetViewFrame() ) )
More information about the Libreoffice-commits
mailing list