[Libreoffice-commits] core.git: Branch 'aoo/trunk' - writerfilter/source

2014-10-07 Thread Oliver-Rainer Wittmann
 writerfilter/source/dmapper/DomainMapper.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 37a5b8e281c03bb04148939a510e4836ad6f4cdb
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Oct 7 09:09:30 2014 +

125618: *.docx import: correct detection of paragraph break and line break 
characters, esp. in context of Chinese text

patch by: Mark Hung marklh9 at gmail dot com
review by: orw

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index e8a9dd2..d2728e9 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -4520,8 +4520,12 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, 
size_t len)
 {
 m_pImpl-getTableManager().utext(data_, len);
 
-if(len == 1  ((*data_) == 0x0d || (*data_) == 0x07))
+if ( len == 1
+  ( (*(const sal_Unicode*)data_) == 0x0d
+|| (*(const sal_Unicode*)data_) == 0x07 ) )
+{
 
m_pImpl-finishParagraph(m_pImpl-GetTopContextOfType(CONTEXT_PARAGRAPH));
+}
 else
 {
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/88/10488/2'

2014-09-29 Thread Oliver-Rainer Wittmann

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/88/10488/1'

2014-09-29 Thread Oliver-Rainer Wittmann

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/87/10487/1'

2014-09-29 Thread Oliver-Rainer Wittmann

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/70/9670/1'

2014-09-29 Thread Oliver-Rainer Wittmann

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/56/9456/2'

2014-09-29 Thread Oliver-Rainer Wittmann

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/87/10487/2'

2014-09-29 Thread Oliver-Rainer Wittmann

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/70/9670/2'

2014-09-29 Thread Oliver-Rainer Wittmann

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/56/9456/1'

2014-09-29 Thread Oliver-Rainer Wittmann

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/36/9736/2'

2014-09-29 Thread Oliver-Rainer Wittmann

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/36/9736/1'

2014-09-29 Thread Oliver-Rainer Wittmann

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/55/9455/1'

2014-09-29 Thread Oliver-Rainer Wittmann

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/55/9455/2'

2014-09-29 Thread Oliver-Rainer Wittmann

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - writerfilter/source

2014-08-28 Thread Oliver-Rainer Wittmann
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx|   12 +--
 writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx |   62 +
 writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx |   11 +--
 3 files changed, 43 insertions(+), 42 deletions(-)

New commits:
commit 12e1f920882ecc84635e7b4bc8fdbdacf30a1c83
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Jun 10 16:51:54 2013 +0100

Correct the XML document handler...

which is used to parse Microsoft Word OOXML documents in case of unknown XML
elements

(cherry picked from commit 22e334845346f4e3189c72e706d744385953af19)

Conflicts:
writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx

Change-Id: Ibcd3e808abfb35291bb04aa10190a7800f0837fa

diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx 
b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 29c64ad..09ded15 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -66,10 +66,8 @@ void OOXMLDocumentImpl::resolveFastSubStream(Stream  
rStreamHandler,
 {
 uno::Referenceuno::XComponentContext 
xContext(mpStream-getContext());
 OOXMLFastDocumentHandler * pDocHandler =
-new OOXMLFastDocumentHandler(xContext);
-pDocHandler-setStream(rStreamHandler);
-pDocHandler-setDocument(this);
-pDocHandler-setXNoteId(mnXNoteId);
+new OOXMLFastDocumentHandler(
+xContext, rStreamHandler, this, mnXNoteId );
 
 uno::Reference  xml::sax::XFastDocumentHandler  xDocumentHandler
 (pDocHandler);
@@ -317,10 +315,8 @@ void OOXMLDocumentImpl::resolve(Stream  rStream)
 uno::Referenceuno::XComponentContext 
xContext(mpStream-getContext());
 
 OOXMLFastDocumentHandler * pDocHandler =
-new OOXMLFastDocumentHandler(xContext);
-pDocHandler-setStream(rStream);
-pDocHandler-setDocument(this);
-pDocHandler-setXNoteId(mnXNoteId);
+new OOXMLFastDocumentHandler(
+xContext, rStream, this, mnXNoteId );
 pDocHandler-setIsSubstream( mbIsSubstream );
 uno::Reference  xml::sax::XFastDocumentHandler  xDocumentHandler
 (pDocHandler);
diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx 
b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
index f6f6b60..893ed74 100644
--- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
@@ -35,10 +35,28 @@ using namespace ::com::sun::star;
 using namespace ::std;
 
 
-OOXMLFastDocumentHandler::OOXMLFastDocumentHandler
-(uno::Reference uno::XComponentContext  const  context)
-: m_xContext(context), mpStream(0), mpDocument(0)
-{}
+OOXMLFastDocumentHandler::OOXMLFastDocumentHandler(
+uno::Reference uno::XComponentContext  const  context,
+Stream* pStream,
+OOXMLDocument* pDocument,
+sal_Int32 nXNoteId )
+: m_xContext(context)
+, mpStream( pStream )
+#ifdef DEBUG_ELEMENT
+, mpTmpStream()
+#endif
+, mpDocument( pDocument )
+, mnXNoteId( nXNoteId )
+, mpContextHandler()
+{
+#ifdef DEBUG_PROTOCOL
+if ( pStream )
+{
+mpTmpStream.reset( new StreamProtocol( pStream, debug_logger ) );
+mpStream = mpTmpStream.get();
+}
+#endif
+}
 
 // ::com::sun::star::xml::sax::XFastContextHandler:
 void SAL_CALL OOXMLFastDocumentHandler::startFastElement
@@ -141,6 +159,13 @@ uno::Reference xml::sax::XFastContextHandler  SAL_CALL
   endl;
 #endif
 
+if ( mpStream == 0  mpDocument == 0 )
+{
+// document handler has been created as unknown child - see 
OOXMLFastDocumentHandler::createUnknownChildContext(..)
+// -- do not provide a child context
+return NULL;
+}
+
 return 
OOXMLFactory::getInstance()-createFastChildContextFromStart(getContextHandler().get(),
 Element);
 }
 
@@ -167,13 +192,12 @@ Name
 #endif
 
 return uno::Reference xml::sax::XFastContextHandler 
-(new OOXMLFastDocumentHandler(m_xContext));
+( new OOXMLFastDocumentHandler( m_xContext, 0, 0, 0 ) );
 }
 
 void SAL_CALL OOXMLFastDocumentHandler::characters(const OUString  /*aChars*/)
 throw (uno::RuntimeException, xml::sax::SAXException)
 {
-// TODO: Insert your implementation for characters here.
 }
 
 // ::com::sun::star::xml::sax::XFastDocumentHandler:
@@ -191,32 +215,14 @@ void SAL_CALL OOXMLFastDocumentHandler::setDocumentLocator
 (const uno::Reference xml::sax::XLocator   /*xLocator*/)
 throw (uno::RuntimeException, xml::sax::SAXException)
 {
-// TODO: Insert your implementation for setDocumentLocator here.
-}
-
-void OOXMLFastDocumentHandler::setStream(Stream * pStream)
-{
-#ifdef DEBUG_PROTOCOL
-mpTmpStream.reset(new StreamProtocol(pStream, debug_logger

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - xmloff/source

2014-07-23 Thread Oliver-Rainer Wittmann
 xmloff/source/draw/shapeexport2.cxx |   32 +++-
 1 file changed, 19 insertions(+), 13 deletions(-)

New commits:
commit 9602a121b458e7456fc533dad86f434f846a72ba
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Wed Jul 23 08:53:15 2014 +

125289: do apply possible changed GraphicStreamURL only for embedded 
images which already have its stream inside the package

fixes also issue 125290

diff --git a/xmloff/source/draw/shapeexport2.cxx 
b/xmloff/source/draw/shapeexport2.cxx
index 0014188..da20ef9 100644
--- a/xmloff/source/draw/shapeexport2.cxx
+++ b/xmloff/source/draw/shapeexport2.cxx
@@ -1147,9 +1147,12 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
 OUString aResolveURL( sImageURL );
 const rtl::OUString sPackageURL( RTL_CONSTASCII_USTRINGPARAM( 
vnd.sun.star.Package: ) );
 
-// sj: trying to preserve the filename
+// sj: trying to preserve the filename for embedded images 
which already have its stream inside the package
+bool bIsEmbeddedImageWithExistingStreamInPackage = false;
 if ( aStreamURL.match( sPackageURL, 0 ) )
 {
+bIsEmbeddedImageWithExistingStreamInPackage = true;
+
 rtl::OUString sRequestedName( aStreamURL.copy( 
sPackageURL.getLength(), aStreamURL.getLength() - sPackageURL.getLength() ) );
 sal_Int32 nLastIndex = sRequestedName.lastIndexOf( '/' ) + 
1;
 if ( ( nLastIndex  0 )  ( nLastIndex  
sRequestedName.getLength() ) )
@@ -1169,20 +1172,23 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
 
 if ( !aStr.isEmpty() )
 {
-aStreamURL = sPackageURL;
-if ( aStr[0] == '#' )
-{
-aStreamURL = aStreamURL.concat( aStr.copy( 1, 
aStr.getLength() - 1 ) );
-}
-else
+// apply possible changed stream URL to embedded image 
object
+if ( bIsEmbeddedImageWithExistingStreamInPackage )
 {
-aStreamURL = aStreamURL.concat( aStr );
-}
+aStreamURL = sPackageURL;
+if ( aStr[0] == '#' )
+{
+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 );
+uno::Any aAny;
+aAny = aStreamURL;
+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 );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - framework/inc framework/source include/framework uui/inc uui/source xmloff/source

2014-07-23 Thread Oliver-Rainer Wittmann
 framework/inc/interaction/quietinteraction.hxx|1 
 framework/inc/pch/precompiled_fwk.hxx |1 
 framework/source/interaction/quietinteraction.cxx |   12 --
 framework/source/services/desktop.cxx |   12 --
 include/framework/interaction.hxx |1 
 uui/inc/pch/precompiled_uui.hxx   |1 
 uui/source/iahndl-filter.cxx  |  122 --
 uui/source/iahndl.cxx |3 
 uui/source/iahndl.hxx |5 
 xmloff/source/draw/shapeexport.cxx|   32 +++--
 10 files changed, 20 insertions(+), 170 deletions(-)

New commits:
commit fd641c7b23ce4205c29fc0c564b73336cb2cfb07
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Wed Jul 23 08:53:15 2014 +

Resolves: #i125289# do apply possible changed GraphicStreamURL...

only for embedded images which already have its stream inside the package

fixes also issue 125290

(cherry picked from commit 9602a121b458e7456fc533dad86f434f846a72ba)

Conflicts:
xmloff/source/draw/shapeexport2.cxx

Change-Id: I5af0093b20f2f291d3a94c690bfbdb59a59320c3

diff --git a/xmloff/source/draw/shapeexport.cxx 
b/xmloff/source/draw/shapeexport.cxx
index 7f33e58..ba8ce16 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2256,9 +2256,12 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
 OUString aResolveURL( sImageURL );
 const OUString sPackageURL( vnd.sun.star.Package: );
 
-// trying to preserve the filename
+// trying to preserve the filename for embedded images which 
already have its stream inside the package
+bool bIsEmbeddedImageWithExistingStreamInPackage = false;
 if ( aStreamURL.match( sPackageURL, 0 ) )
 {
+bIsEmbeddedImageWithExistingStreamInPackage = true;
+
 OUString sRequestedName( aStreamURL.copy( 
sPackageURL.getLength(), aStreamURL.getLength() - sPackageURL.getLength() ) );
 sal_Int32 nLastIndex = sRequestedName.lastIndexOf( '/' ) + 
1;
 if ( ( nLastIndex  0 )  ( nLastIndex  
sRequestedName.getLength() ) )
@@ -2278,20 +2281,23 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
 
 if( !aStr.isEmpty() )
 {
-aStreamURL = sPackageURL;
-if( aStr[ 0 ] == '#' )
-{
-aStreamURL = aStreamURL.concat( aStr.copy( 1, 
aStr.getLength() - 1 ) );
-}
-else
+// apply possible changed stream URL to embedded image 
object
+if ( bIsEmbeddedImageWithExistingStreamInPackage )
 {
-aStreamURL = aStreamURL.concat( aStr );
-}
+aStreamURL = sPackageURL;
+if ( aStr[0] == '#' )
+{
+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(GraphicStreamURL, aAny );
+uno::Any aAny;
+aAny = aStreamURL;
+xPropSet-setPropertyValue( 
OUString(GraphicStreamURL), aAny );
+}
 
 mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, 
XML_SIMPLE );
 mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, 
XML_EMBED );
commit 23e818d4f5cb6dff4c2238fa42a38496a9a85255
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Jul 23 10:49:30 2014 +0100

AmbigousFilterRequest is only ever extracted, never created

Change-Id: I79c669c1635192199d6ef135e1ab9b48a9e7e63a

diff --git a/framework/inc/interaction/quietinteraction.hxx 
b/framework/inc/interaction/quietinteraction.hxx
index c2dbeaa..0a990f4 100644
--- a/framework/inc/interaction/quietinteraction.hxx
+++ b/framework/inc/interaction/quietinteraction.hxx
@@ -38,7 +38,6 @@ namespace framework{
 But it can be used to intercept problems e.g. during loading 
of documents.
 
 In current implementation we solve conflicts for following 
situations only:
-- AmbigousFilterRequest
 - InteractiveIOException
 - InteractiveAugmentedIOException
 All other requests will be aborted.
diff --git a/framework/inc/pch/precompiled_fwk.hxx 
b/framework/inc/pch

[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - xmloff/source

2014-07-23 Thread Oliver-Rainer Wittmann
 xmloff/source/draw/shapeexport.cxx |   32 +++-
 1 file changed, 19 insertions(+), 13 deletions(-)

New commits:
commit e67d8d221326e1c753457d4283e2cff16b8b5f52
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Wed Jul 23 08:53:15 2014 +

Resolves: #i125289# do apply possible changed GraphicStreamURL...

only for embedded images which already have its stream inside the package

fixes also issue 125290

(cherry picked from commit 9602a121b458e7456fc533dad86f434f846a72ba)

Conflicts:
xmloff/source/draw/shapeexport2.cxx

Change-Id: I5af0093b20f2f291d3a94c690bfbdb59a59320c3
(cherry picked from commit fd641c7b23ce4205c29fc0c564b73336cb2cfb07)
Reviewed-on: https://gerrit.libreoffice.org/10487
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/xmloff/source/draw/shapeexport.cxx 
b/xmloff/source/draw/shapeexport.cxx
index c4bb166..ec8adfa 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2256,9 +2256,12 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
 OUString aResolveURL( sImageURL );
 const OUString sPackageURL( vnd.sun.star.Package: );
 
-// trying to preserve the filename
+// trying to preserve the filename for embedded images which 
already have its stream inside the package
+bool bIsEmbeddedImageWithExistingStreamInPackage = false;
 if ( aStreamURL.match( sPackageURL, 0 ) )
 {
+bIsEmbeddedImageWithExistingStreamInPackage = true;
+
 OUString sRequestedName( aStreamURL.copy( 
sPackageURL.getLength(), aStreamURL.getLength() - sPackageURL.getLength() ) );
 sal_Int32 nLastIndex = sRequestedName.lastIndexOf( '/' ) + 
1;
 if ( ( nLastIndex  0 )  ( nLastIndex  
sRequestedName.getLength() ) )
@@ -2278,20 +2281,23 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
 
 if( !aStr.isEmpty() )
 {
-aStreamURL = sPackageURL;
-if( aStr[ 0 ] == '#' )
-{
-aStreamURL = aStreamURL.concat( aStr.copy( 1, 
aStr.getLength() - 1 ) );
-}
-else
+// apply possible changed stream URL to embedded image 
object
+if ( bIsEmbeddedImageWithExistingStreamInPackage )
 {
-aStreamURL = aStreamURL.concat( aStr );
-}
+aStreamURL = sPackageURL;
+if ( aStr[0] == '#' )
+{
+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(GraphicStreamURL, aAny );
+uno::Any aAny;
+aAny = aStreamURL;
+xPropSet-setPropertyValue( 
OUString(GraphicStreamURL), aAny );
+}
 
 mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, 
XML_SIMPLE );
 mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, 
XML_EMBED );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

2014-07-23 Thread Oliver-Rainer Wittmann
 xmloff/source/draw/shapeexport.cxx |   32 +++-
 1 file changed, 19 insertions(+), 13 deletions(-)

New commits:
commit 8148157bfbc82c5aeaff8dd622307437fa4441e7
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Wed Jul 23 08:53:15 2014 +

Resolves: #i125289# do apply possible changed GraphicStreamURL...

only for embedded images which already have its stream inside the package

fixes also issue 125290

(cherry picked from commit 9602a121b458e7456fc533dad86f434f846a72ba)

Conflicts:
xmloff/source/draw/shapeexport2.cxx

Change-Id: I5af0093b20f2f291d3a94c690bfbdb59a59320c3
(cherry picked from commit fd641c7b23ce4205c29fc0c564b73336cb2cfb07)
Reviewed-on: https://gerrit.libreoffice.org/10488
Reviewed-by: David Tardon dtar...@redhat.com
Tested-by: David Tardon dtar...@redhat.com

diff --git a/xmloff/source/draw/shapeexport.cxx 
b/xmloff/source/draw/shapeexport.cxx
index bddf0ac..87d5708 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2264,9 +2264,12 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
 OUString aResolveURL( sImageURL );
 const OUString sPackageURL( vnd.sun.star.Package: );
 
-// trying to preserve the filename
+// trying to preserve the filename for embedded images which 
already have its stream inside the package
+bool bIsEmbeddedImageWithExistingStreamInPackage = false;
 if ( aStreamURL.match( sPackageURL, 0 ) )
 {
+bIsEmbeddedImageWithExistingStreamInPackage = true;
+
 OUString sRequestedName( aStreamURL.copy( 
sPackageURL.getLength(), aStreamURL.getLength() - sPackageURL.getLength() ) );
 sal_Int32 nLastIndex = sRequestedName.lastIndexOf( '/' ) + 
1;
 if ( ( nLastIndex  0 )  ( nLastIndex  
sRequestedName.getLength() ) )
@@ -2286,20 +2289,23 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
 
 if( !aStr.isEmpty() )
 {
-aStreamURL = sPackageURL;
-if( aStr[ 0 ] == '#' )
-{
-aStreamURL = aStreamURL.concat( aStr.copy( 1, 
aStr.getLength() - 1 ) );
-}
-else
+// apply possible changed stream URL to embedded image 
object
+if ( bIsEmbeddedImageWithExistingStreamInPackage )
 {
-aStreamURL = aStreamURL.concat( aStr );
-}
+aStreamURL = sPackageURL;
+if ( aStr[0] == '#' )
+{
+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(GraphicStreamURL, aAny );
+uno::Any aAny;
+aAny = aStreamURL;
+xPropSet-setPropertyValue( 
OUString(GraphicStreamURL), aAny );
+}
 
 mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, 
XML_SIMPLE );
 mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, 
XML_EMBED );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source

2014-07-22 Thread Oliver-Rainer Wittmann
 sw/source/core/txtnode/atrfld.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 2f2e914703ad45598ae51dcaed82c6c6ec49fb83
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jul 22 10:39:40 2014 +

125296: correction of fix for issue 125044

diff --git a/sw/source/core/txtnode/atrfld.cxx 
b/sw/source/core/txtnode/atrfld.cxx
index a6cad4c..97a93ca 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -355,8 +355,7 @@ void SwTxtFld::ExpandTxtFld( const bool bForceNotify ) const
 const SwField* pFld = GetFmtFld().GetField();
 const XubString aNewExpand( 
pFld-ExpandField(m_pTxtNode-GetDoc()-IsClipBoard()) );
 
-if ( !bForceNotify 
- aNewExpand == m_aExpand )
+if ( aNewExpand == m_aExpand )
 {
 // Bei Seitennummernfeldern
 const sal_uInt16 nWhich = pFld-GetTyp()-Which();
@@ -372,7 +371,11 @@ void SwTxtFld::ExpandTxtFld( const bool bForceNotify ) 
const
 {
 m_pTxtNode-ModifyNotification( 0, 0 );
 }
-return;
+if ( !bForceNotify )
+{
+// done, if no further notification forced.
+return;
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2014-07-22 Thread Oliver-Rainer Wittmann
 sw/source/core/txtnode/atrfld.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit a9c17adf9a7c3ff510b62e791dbf322cb82243d9
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jul 22 10:39:40 2014 +

Resolves: #i125296# correction of fix for issue #i125044#

(cherry picked from commit 2f2e914703ad45598ae51dcaed82c6c6ec49fb83)

Conflicts:
sw/source/core/txtnode/atrfld.cxx

Change-Id: I7519a2b985da603618a345d5549f73c9abd17101

diff --git a/sw/source/core/txtnode/atrfld.cxx 
b/sw/source/core/txtnode/atrfld.cxx
index 76330ce..7329b87 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -336,8 +336,7 @@ void SwTxtFld::ExpandTxtFld(const bool bForceNotify) const
 const SwField* pFld = GetFmtFld().GetField();
 const OUString aNewExpand( 
pFld-ExpandField(m_pTxtNode-GetDoc()-IsClipBoard()) );
 
-if (!bForceNotify 
-aNewExpand == m_aExpand)
+if (aNewExpand == m_aExpand)
 {
 // Bei Seitennummernfeldern
 const sal_uInt16 nWhich = pFld-GetTyp()-Which();
@@ -353,7 +352,11 @@ void SwTxtFld::ExpandTxtFld(const bool bForceNotify) const
 {
 m_pTxtNode-ModifyNotification( 0, 0 );
 }
-return;
+if ( !bForceNotify )
+{
+// done, if no further notification forced.
+return;
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source

2014-07-18 Thread Oliver-Rainer Wittmann
 sw/source/ui/fldui/fldvar.cxx |  720 +-
 1 file changed, 361 insertions(+), 359 deletions(-)

New commits:
commit fdef33c3dfad1badab0a6f8d447763f565f1fca7
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Jul 18 07:48:50 2014 +

124231: field variable dialog: check access to current field as it could be 
unavailable caused by its change and a followed removal from the document by 
e.g. a conditional hide of a section

diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 099cddb..21e9fa6 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -34,27 +34,17 @@
 #include docufld.hxx
 #include expfld.hxx
 #include ddefld.hxx
-#ifndef _VIEW_HXX
 #include view.hxx
-#endif
 #include wrtsh.hxx
 #include doc.hxx
 #include docary.hxx
 #include swmodule.hxx
-#ifndef _FLDVAR_HXX
 #include fldvar.hxx
-#endif
 #include calc.hxx
 #include svl/zformat.hxx
-#ifndef _GLOBALS_HRC
 #include globals.hrc
-#endif
-#ifndef _FLDUI_HRC
 #include fldui.hrc
-#endif
-#ifndef _FLDTDLG_HRC
 #include fldtdlg.hrc
-#endif
 
 #define USER_DATA_VERSION_1 1
 #define USER_DATA_VERSION USER_DATA_VERSION_1
@@ -142,21 +132,23 @@ void SwFldVarPage::Reset(const SfxItemSet )
 }
 else
 {
-SwField* pCurField = GetCurField();
+const SwField* pCurField = GetCurField();
+ASSERT( pCurField != NULL,
+SwFldVarPage::Reset(..) - SwField instance missing! );
 nTypeId = pCurField-GetTypeId();
-if (nTypeId == TYP_SETINPFLD)
+if ( nTypeId == TYP_SETINPFLD )
 nTypeId = TYP_INPUTFLD;
-nPos = 
aTypeLB.InsertEntry(GetFldMgr().GetTypeStr(GetFldMgr().GetPos(nTypeId)));
-aTypeLB.SetEntryData(nPos, reinterpret_castvoid*(nTypeId));
-aNumFormatLB.SetAutomaticLanguage(pCurField-IsAutomaticLanguage());
+nPos = aTypeLB.InsertEntry( GetFldMgr().GetTypeStr( 
GetFldMgr().GetPos( nTypeId ) ) );
+aTypeLB.SetEntryData( nPos, reinterpret_cast void* ( nTypeId ) );
+aNumFormatLB.SetAutomaticLanguage( pCurField-IsAutomaticLanguage() );
 SwWrtShell *pSh = GetWrtShell();
-if(!pSh)
+if ( !pSh )
 pSh = ::GetActiveWrtShell();
-if(pSh)
+if ( pSh )
 {
-const SvNumberformat* pFormat = 
pSh-GetNumberFormatter()-GetEntry(pCurField-GetFormat());
-if(pFormat)
-aNumFormatLB.SetLanguage(pFormat-GetLanguage());
+const SvNumberformat* pFormat = 
pSh-GetNumberFormatter()-GetEntry( pCurField-GetFormat() );
+if ( pFormat )
+aNumFormatLB.SetLanguage( pFormat-GetLanguage() );
 }
 }
 
@@ -281,333 +273,334 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
 bInvisible = sal_False, bSeparator = sal_False, bChapterLevel = 
sal_False;
 sal_Bool bFormat = nSize != 0;
 
-switch (nTypeId)
+switch ( nTypeId )
 {
-case TYP_USERFLD:
+case TYP_USERFLD:
 {
 // Benutzertyp aendern oder anlegen
 SwUserFieldType* pType = (SwUserFieldType*)
-GetFldMgr().GetFldType(RES_USERFLD, nSelPos);
+GetFldMgr().GetFldType( RES_USERFLD, nSelPos );
 
-if (pType)
+if ( pType )
 {
-if (!IsFldEdit())
+if ( !IsFldEdit() )
 {
-if (pBox || (bInit  !IsRefresh()))// Nur bei 
Interaktion mit Maus
+if ( pBox || ( bInit  !IsRefresh() ) )// Nur bei 
Interaktion mit Maus
 {
-aNameED.SetText(pType-GetName());
+aNameED.SetText( pType-GetName() );
 
-if (pType-GetType() == UF_STRING)
+if ( pType-GetType() == UF_STRING )
 {
-aValueED.SetText(pType-GetContent());
-aNumFormatLB.SelectEntryPos(0);
+aValueED.SetText( pType-GetContent() );
+aNumFormatLB.SelectEntryPos( 0 );
 }
 else
-aValueED.SetText(pType-GetContent());
+aValueED.SetText( pType-GetContent() );
 //  
aValueED.SetText(pType-GetContent(aNumFormatLB.GetFormat()));
 }
 }
 else
-aValueED.SetText(pType-GetContent());
+aValueED.SetText( pType-GetContent() );
 }
 else
 {
-if (pBox)   // Nur bei Interaktion mit Maus
+if ( pBox ) // Nur bei Interaktion mit Maus
 {
-aNameED.SetText(aEmptyStr);
-aValueED.SetText(aEmptyStr);
+aNameED.SetText( aEmptyStr

[Libreoffice-commits] core.git: sw/source

2014-07-18 Thread Oliver-Rainer Wittmann
 sw/source/ui/fldui/fldvar.cxx |   76 +++---
 1 file changed, 42 insertions(+), 34 deletions(-)

New commits:
commit a6b925a436b2c6c9b33b66085ca421898b25d752
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Jul 18 07:48:50 2014 +

Resolved: #124231# field variable dialog: check access...

to current field as it could be unavailable caused by its change and a 
followed
removal from the document by e.g. a conditional hide of a section

(cherry picked from commit 58f0d79a20c3b9683c2d6a4be5dde14fe7688e01)
(cherry picked from commit 619fb83a3bc6d372632d382eaa1eb94fb9a8e8e9)

Conflicts:
sw/source/ui/fldui/fldvar.cxx

Change-Id: I3f37b97ca8245c1996790622dd25437906b080db

diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 4e69ec3..2a1a9c4 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -114,7 +114,8 @@ void SwFldVarPage::Reset(const SfxItemSet* )
 }
 else
 {
-SwField* pCurField = GetCurField();
+const SwField* pCurField = GetCurField();
+assert(pCurField  SwFldVarPage::Reset(..) - SwField instance 
missing!);
 nTypeId = pCurField-GetTypeId();
 if (nTypeId == TYP_SETINPFLD)
 nTypeId = TYP_INPUTFLD;
@@ -326,7 +327,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
 }
 }
 }
-if (IsFldEdit())
+if (GetCurField() != NULL  IsFldEdit())
 {
 // GetFormula leads to problems with date formats because
 // only the numeric value without formatting is returned.
@@ -419,7 +420,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
 m_pNumFormatLB-SelectEntryPos(0);
 }
 }
-if (IsFldEdit()  (!pBox || bInit) )
+if (GetCurField()  IsFldEdit()  (!pBox || bInit) )
 
m_pValueED-SetText(((SwSetExpField*)GetCurField())-GetPromptText());
 }
 else// USERFLD
@@ -461,7 +462,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
 bName = bValue = bShowChapterFrame = true;
 
 SwFieldType* pFldTyp;
-if( IsFldEdit() )
+if( GetCurField()  IsFldEdit() )
 pFldTyp = GetCurField()-GetTyp();
 else
 {
@@ -473,7 +474,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
 pFldTyp = 0;
 }
 
-if( IsFldEdit() )
+if( GetCurField()  IsFldEdit() )
 m_pValueED-SetText( ((SwSetExpField*)GetCurField())-
 GetFormula() );
 
@@ -505,7 +506,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
 if (nSelPos != 0  nSelPos != LISTBOX_ENTRY_NOTFOUND)
 {
 bValue = true;  // SubType OFF - knows no Offset
-if (IsFldEdit())
+if (GetCurField()  IsFldEdit())
 
m_pValueED-SetText(OUString::number(((SwRefPageSetField*)GetCurField())-GetOffset()));
 }
 }
@@ -569,28 +570,27 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
 // renew types in SelectionBox
 void SwFldVarPage::UpdateSubType()
 {
-OUString sOldSel;
-const sal_uInt16 nTypeId = 
(sal_uInt16)(sal_uLong)m_pTypeLB-GetEntryData(GetTypeSel());
 SetSelectionSel(m_pSelectionLB-GetSelectEntryPos());
-if(GetSelectionSel() != LISTBOX_ENTRY_NOTFOUND)
+
+OUString sOldSel;
+if (GetSelectionSel() != LISTBOX_ENTRY_NOTFOUND)
 sOldSel = m_pSelectionLB-GetEntry(GetSelectionSel());
 
 // fill Selection-Listbox
 m_pSelectionLB-SetUpdateMode(false);
 m_pSelectionLB-Clear();
 
+const sal_uInt16 nTypeId = 
(sal_uInt16)(sal_uLong)m_pTypeLB-GetEntryData(GetTypeSel());
 std::vectorOUString aList;
 GetFldMgr().GetSubTypes(nTypeId, aList);
-size_t nCount = aList.size();
-size_t nPos;
-
-for(size_t i = 0; i  nCount; ++i)
+const size_t nCount = aList.size();
+for (size_t i = 0; i  nCount; ++i)
 {
 if (nTypeId != TYP_INPUTFLD || i)
 {
 if (!IsFldEdit())
 {
-nPos = m_pSelectionLB-InsertEntry(aList[i]);
+const size_t nPos = m_pSelectionLB-InsertEntry(aList[i]);
 m_pSelectionLB-SetEntryData(nPos, reinterpret_castvoid*(i));
 }
 else
@@ -600,7 +600,7 @@ void SwFldVarPage::UpdateSubType()
 switch (nTypeId)
 {
 case TYP_INPUTFLD:
-if (aList[i] == GetCurField()-GetPar1())
+if (GetCurField()  aList[i] == 
GetCurField()-GetPar1

[Libreoffice-commits] core.git: sw/source

2014-07-16 Thread Oliver-Rainer Wittmann
 sw/source/core/frmedt/feshview.cxx |5 +++--
 sw/source/core/layout/fly.cxx  |   33 +++--
 2 files changed, 6 insertions(+), 32 deletions(-)

New commits:
commit 133d6d8d4dec497276c3a9b0ba6761cffd322f81
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jul 15 12:15:37 2014 +

Resolves: #i121443# register text frames and graphics...

on the correct page frame

- trigger formatting of selected object when moving view to the selected 
object
or when graphical horizontal line has been inserted.

(cherry picked from commit 82fafc47de0c59c783c5df596c976a429ff8a21d)

Conflicts:
sw/source/core/frmedt/feshview.cxx
sw/source/core/layout/fly.cxx
sw/source/ui/shells/textsh.cxx

Change-Id: I4b4b523ff445f2ce20d9b81ad1187db7b44bd145

diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 75b3d33..8aa17a8 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2253,9 +2253,10 @@ const SwFrmFmt*  SwFEShell::GetFlyNum(sal_uInt16 nIdx, 
FlyCntType eType, bool bI
 // show the current selected object
 void SwFEShell::MakeSelVisible()
 {
-if( Imp()-HasDrawView() 
-Imp()-GetDrawView()-GetMarkedObjectList().GetMarkCount() )
+if ( Imp()-HasDrawView() 
+ Imp()-GetDrawView()-GetMarkedObjectList().GetMarkCount() )
 {
+GetCurrFrm(); // just to trigger formatting in case the selected 
object is not formatted.
 MakeVisible( Imp()-GetDrawView()-GetAllMarkedRect() );
 }
 else
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index f4c01f4..6aa2579 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -2007,37 +2007,10 @@ void SwFrm::AppendFly( SwFlyFrm *pNew )
 
 // Register at the page
 // If there's none present, register via SwPageFrm::PreparePage
-SwPageFrm *pPage = FindPageFrm();
-if ( pPage )
+SwPageFrm* pPage = FindPageFrm();
+if ( pPage != NULL )
 {
-if ( pNew-IsFlyAtCntFrm()  pNew-Frm().Top() == FAR_AWAY )
-{
-// Try to make the page formatting of new documents a bit handier:
-// In the beginning we add the Flys to the back, so that the 
Anchors
-// do not have to be reformatted unnecessarily often.
-// However, we do not add them all the way at the end, so that we
-// can still jump to the document's end in a meaningful way.
-SwRootFrm *pRoot = (SwRootFrm*)pPage-GetUpper();
-if( !SwLayHelper::CheckPageFlyCache( pPage, pNew ) )
-{
-SwPageFrm *pTmp = pRoot-GetLastPage();
-if ( pTmp-GetPhyPageNum()  30 )
-{
-for ( sal_uInt16 i = 0; i  10; ++i )
-{
-pTmp = (SwPageFrm*)pTmp-GetPrev();
-if( pTmp-GetPhyPageNum() = pPage-GetPhyPageNum() )
-break; // So that we don't end up before the Anchor
-}
-if ( pTmp-IsEmptyPage() )
-pTmp = (SwPageFrm*)pTmp-GetPrev();
-pPage = pTmp;
-}
-}
-pPage-AppendFlyToPage( pNew );
-}
-else
-pPage-AppendFlyToPage( pNew );
+pPage-AppendFlyToPage( pNew );
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/source

2014-07-16 Thread Oliver-Rainer Wittmann
 sw/source/core/crsr/viscrs.cxx|2 
 sw/source/core/inc/rootfrm.hxx|4 
 sw/source/core/layout/trvlfrm.cxx |  871 ++
 3 files changed, 429 insertions(+), 448 deletions(-)

New commits:
commit 3a2f00a90b5cc08c45cf92c82050247deb5176d6
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Thu Jun 5 10:06:45 2014 +

Resolves: #i125024# remove code regarding table selection...

as it is not used any more.

(cherry picked from commit 65f39887f41e701b699fd2e51da803d116766eb8)
Signed-off-by: Michael Stahl mst...@redhat.com

Conflicts:
sw/source/core/crsr/viscrs.cxx
sw/source/core/inc/rootfrm.hxx
sw/source/core/layout/trvlfrm.cxx

Change-Id: Ia37e73a515a8f5d0218e4e4144e75f18449599c9
(cherry picked from commit 690c6787b4a2ab0118690fb8d00be871faa0db76)
Signed-off-by: Michael Stahl mst...@redhat.com

diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 6a05a8c..b6dc410 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -534,7 +534,7 @@ void SwShellCrsr::FillRects()
 (GetMark()-nNode == GetPoint()-nNode ||
 (GetMark()-nNode.GetNode().IsCntntNode() 
  GetMark()-nNode.GetNode().GetCntntNode()-getLayoutFrm( 
GetShell()-GetLayout() ) )   ))
-GetShell()-GetLayout()-CalcFrmRects( *this, 
GetShell()-IsTableMode() );
+GetShell()-GetLayout()-CalcFrmRects( *this );
 }
 
 void SwShellCrsr::Show()
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index f1c6ea2..78a95e5 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -275,9 +275,7 @@ public:
 // next page border
 const SwPageFrm* GetPageAtPos( const Point rPt, const Size* pSize = 0, 
bool bExtend = false ) const;
 
-void CalcFrmRects(
-SwShellCrsr,
-const bool bIsTblSel );
+void CalcFrmRects( SwShellCrsr );
 
 // Calculates the cells included from the current selection
 // false: There was no result because of an invalid layout
diff --git a/sw/source/core/layout/trvlfrm.cxx 
b/sw/source/core/layout/trvlfrm.cxx
index 6fc290f..ceb6fff 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -1987,9 +1987,7 @@ inline void Sub( SwRegionRects rRegion, const SwRect 
rRect )
  *  inverted rectangles are available.
  *  In the end the Flys are cut out of the section.
  */
-void SwRootFrm::CalcFrmRects(
-SwShellCrsr rCrsr,
-const bool bIsTblMode)
+void SwRootFrm::CalcFrmRects(SwShellCrsr rCrsr)
 {
 SwPosition *pStartPos = rCrsr.Start(),
*pEndPos   = rCrsr.GetPoint() == pStartPos ? rCrsr.GetMark() : 
rCrsr.GetPoint();
@@ -2034,45 +2032,49 @@ void SwRootFrm::CalcFrmRects(
 }
 }
 
-//Case 4: Table selection
-if( bIsTblMode )
-{
-const SwFrm *pCell = pStartFrm-GetUpper();
-while ( !pCell-IsCellFrm() )
-pCell = pCell-GetUpper();
-SwRect aTmp( pCell-Prt() );
-aTmp.Pos() += pCell-Frm().Pos();
-aRegion.ChangeOrigin( aTmp );
-aRegion.clear();
-aRegion.push_back( aTmp);
-}
-else
-{
-// if a selection which is not allowed exists, we correct what is not
-// allowed (header/footer/table-headline) for two pages.
-do {// middle check loop
-const SwLayoutFrm* pSttLFrm = pStartFrm-GetUpper();
-const sal_uInt16 cHdFtTblHd = FRM_HEADER | FRM_FOOTER | FRM_TAB;
-while( pSttLFrm 
-! (cHdFtTblHd  pSttLFrm-GetType() ))
-pSttLFrm = pSttLFrm-GetUpper();
-if( !pSttLFrm )
-break;
-const SwLayoutFrm* pEndLFrm = pEndFrm-GetUpper();
-while( pEndLFrm 
-! (cHdFtTblHd  pEndLFrm-GetType() ))
-pEndLFrm = pEndLFrm-GetUpper();
-if( !pEndLFrm )
-break;
+// if a selection which is not allowed exists, we correct what is not
+// allowed (header/footer/table-headline) for two pages.
+do {// middle check loop
+const SwLayoutFrm* pSttLFrm = pStartFrm-GetUpper();
+const sal_uInt16 cHdFtTblHd = FRM_HEADER | FRM_FOOTER | FRM_TAB;
+while( pSttLFrm 
+! (cHdFtTblHd  pSttLFrm-GetType() ))
+pSttLFrm = pSttLFrm-GetUpper();
+if( !pSttLFrm )
+break;
+const SwLayoutFrm* pEndLFrm = pEndFrm-GetUpper();
+while( pEndLFrm 
+! (cHdFtTblHd  pEndLFrm-GetType() ))
+pEndLFrm = pEndLFrm-GetUpper();
+if( !pEndLFrm )
+break;
 
-OSL_ENSURE( pEndLFrm-GetType() == pSttLFrm-GetType(),
-Selection over different content );
-switch( pSttLFrm-GetType() )
+OSL_ENSURE( pEndLFrm-GetType() == pSttLFrm-GetType(),
+Selection over different content

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source

2014-07-15 Thread Oliver-Rainer Wittmann
 sw/source/core/frmedt/feshview.cxx |6 +++-
 sw/source/core/layout/fly.cxx  |   36 ++-
 sw/source/ui/shells/textsh.cxx |   49 -
 3 files changed, 34 insertions(+), 57 deletions(-)

New commits:
commit 82fafc47de0c59c783c5df596c976a429ff8a21d
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jul 15 12:15:37 2014 +

121443: - register text frames and graphics on the correct page frame

- trigger formatting of selected object when moving view to the selected 
object or when graphical horizontal line has been inserted.

diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index e26c904..ccb2314 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2459,12 +2459,14 @@ const SwFrmFmt*  SwFEShell::GetFlyNum(sal_uInt16 nIdx, 
FlyCntType eType ) const
 return GetDoc()-GetFlyNum(nIdx, eType );
 }
 
+
 // zeige das akt. selektierte Object an
 void SwFEShell::MakeSelVisible()
 {
-if( Imp()-HasDrawView() 
-Imp()-GetDrawView()-GetMarkedObjectList().GetMarkCount() )
+if ( Imp()-HasDrawView() 
+ Imp()-GetDrawView()-GetMarkedObjectList().GetMarkCount() )
 {
+GetCurrFrm(); // just to trigger formatting in case the selected 
object is not formatted.
 MakeVisible( Imp()-GetDrawView()-GetAllMarkedRect() );
 }
 else
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 839f677..6b569b1 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -2223,40 +2223,10 @@ void SwFrm::AppendFly( SwFlyFrm *pNew )
 pDrawObjs-Insert( *pNew );
 pNew-ChgAnchorFrm( this );
 
-//Bei der Seite anmelden; kann sein, dass noch keine da ist - die
-//Anmeldung wird dann in SwPageFrm::PreparePage durch gefuehrt.
-SwPageFrm *pPage = FindPageFrm();
-if ( pPage )
+SwPageFrm* pPage = FindPageFrm();
+if ( pPage != NULL )
 {
-if ( pNew-IsFlyAtCntFrm()  pNew-Frm().Top() == WEIT_WECH )
-{
-//Versuch die Seitenformatierung von neuen Dokumenten etwas
-//guenstiger zu gestalten.
-//Wir haengen die Flys erstenmal nach hinten damit sie bei heftigem
-//Fluss der Anker nicht unoetig oft formatiert werden.
-//Damit man noch brauchbar an das Ende des Dokumentes springen
-//kann werden die Flys nicht ganz an das Ende gehaengt.
-SwRootFrm *pRoot = (SwRootFrm*)pPage-GetUpper();
-if( !SwLayHelper::CheckPageFlyCache( pPage, pNew ) )
-{
-SwPageFrm *pTmp = pRoot-GetLastPage();
-if ( pTmp-GetPhyPageNum()  30 )
-{
-for ( sal_uInt16 i = 0; i  10; ++i )
-{
-pTmp = (SwPageFrm*)pTmp-GetPrev();
-if( pTmp-GetPhyPageNum() = pPage-GetPhyPageNum() )
-break; // damit wir nicht vor unserem Anker landen
-}
-if ( pTmp-IsEmptyPage() )
-pTmp = (SwPageFrm*)pTmp-GetPrev();
-pPage = pTmp;
-}
-}
-pPage-AppendFlyToPage( pNew );
-}
-else
-pPage-AppendFlyToPage( pNew );
+pPage-AppendFlyToPage( pNew );
 }
 }
 
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 746f245..2357b52 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -680,6 +680,7 @@ void SwTextShell::ExecInsert(SfxRequest rReq)
 }
 break;
 }
+
 case FN_INSERT_HRULER:
 {
 String sPath;
@@ -688,22 +689,22 @@ void SwTextShell::ExecInsert(SfxRequest rReq)
 Window* pParent = GetView().GetWindow();
 if ( pItem )
 {
-sPath = ((SfxStringItem*)pItem)-GetValue();
-SFX_REQUEST_ARG( rReq, pSimple, SfxBoolItem, FN_PARAM_1 , 
sal_False );
+sPath = ( (SfxStringItem*) pItem )-GetValue();
+SFX_REQUEST_ARG( rReq, pSimple, SfxBoolItem, FN_PARAM_1, sal_False 
);
 if ( pSimple )
 bSimpleLine = pSimple-GetValue();
 }
 else
 {
 SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
-DBG_ASSERT(pFact, Dialogdiet fail!);
+DBG_ASSERT( pFact, Dialogdiet fail! );
 AbstractInsertGrfRulerDlg* pDlg = pFact-CreateInsertGrfRulerDlg( 
DLG_INSERT_RULER,
-pParent );
-DBG_ASSERT(pDlg, Dialogdiet fail!);
+pParent );
+DBG_ASSERT( pDlg, Dialogdiet fail! );
 // MessageBox fuer fehlende Grafiken
-if(!pDlg-HasImages())
-InfoBox( pParent, SW_RES(MSG_NO_RULER)).Execute();
-if(RET_OK == pDlg-Execute

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source

2014-07-14 Thread Oliver-Rainer Wittmann
 sw/source/core/fields/cellfml.cxx |   36 ++--
 sw/source/core/txtnode/atrfld.cxx |3 +++
 2 files changed, 25 insertions(+), 14 deletions(-)

New commits:
commit b384441c10475c9784eae3ea501afb22e0317468
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Jul 14 13:36:56 2014 +

125228: correct consideration of InputFields in table cells are part of 
table formulas

diff --git a/sw/source/core/fields/cellfml.cxx 
b/sw/source/core/fields/cellfml.cxx
index 4e77fdf..23abcfe 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -156,27 +156,26 @@ double SwTableBox::GetValue( SwTblCalcPara rCalcPara ) 
const
 if ( nSttPos  rTxt.Len() 
  ( CH_TXTATR_BREAKWORD == Char || CH_TXTATR_INWORD == Char ) )
 {
-SwIndex aIdx( pTxtNd, nSttPos );
-SwTxtFld * const pTxtFld = static_castSwTxtFld*(
-pTxtNd-GetTxtAttrForCharAt(aIdx.GetIndex(), 
RES_TXTATR_FIELD));
-if( !pTxtFld )
+SwTxtFld * const pTxtFld =
+static_castSwTxtFld*( pTxtNd-GetTxtAttrForCharAt( nSttPos, 
RES_TXTATR_FIELD ) );
+if ( pTxtFld == NULL )
 break;
 
 rCalcPara.rCalc.SetCalcError( CALC_NOERR ); // wieder zuruecksetzen
 
 const SwField* pFld = pTxtFld-GetFmtFld().GetField();
-switch( pFld-GetTyp()-Which()  )
+switch ( pFld-GetTyp()-Which() )
 {
 case RES_SETEXPFLD:
-nRet = ((SwSetExpField*)pFld)-GetValue();
+nRet = ( (SwSetExpField*) pFld )-GetValue();
 break;
 case RES_USERFLD:
-nRet = ((SwUserFieldType*)pFld)-GetValue();
+nRet = ( (SwUserFieldType*) pFld )-GetValue();
 break;
 case RES_TABLEFLD:
 {
-SwTblField* pTblFld = (SwTblField*)pFld;
-if( !pTblFld-IsValid() )   // ist der Wert gueltig ??
+SwTblField* pTblFld = (SwTblField*) pFld;
+if ( !pTblFld-IsValid() )  // ist der Wert gueltig ??
 {
 // die richtige Tabelle mitgeben!
 const SwTable* pTmp = rCalcPara.pTbl;
@@ -189,20 +188,29 @@ double SwTableBox::GetValue( SwTblCalcPara rCalcPara ) 
const
 break;
 
 case RES_DATETIMEFLD:
-nRet = ((SwDateTimeField*)pFld)-GetValue();
+nRet = ( (SwDateTimeField*) pFld )-GetValue();
 break;
 
 case RES_JUMPEDITFLD:
-//JP 14.09.98: Bug 56112 - der Platzhalter kann nie einen
-//  gueltigen Inhalt haben!
+// placeholder does not have valid content
 nRet = 0;
 break;
 
 default:
-String const value(pFld-ExpandField(true));
-nRet = rCalcPara.rCalc.Calculate(value).GetDouble();
+String const value( pFld-ExpandField( true ) );
+nRet = rCalcPara.rCalc.Calculate( value ).GetDouble();
 }
 }
+else if ( nSttPos  rTxt.Len()
+   Char == CH_TXT_ATR_INPUTFIELDSTART )
+{
+const SwTxtInputFld * pTxtInputFld =
+dynamic_cast const SwTxtInputFld* (
+pTxtNd-GetTxtAttrAt( nSttPos, RES_TXTATR_INPUTFIELD, 
SwTxtNode::DEFAULT ) );
+if ( pTxtInputFld == NULL )
+break;
+nRet = rCalcPara.rCalc.Calculate( pTxtInputFld-GetFieldContent() 
).GetDouble();
+}
 else
 {
 // Ergebnis ist 0 und kein Fehler!
diff --git a/sw/source/core/txtnode/atrfld.cxx 
b/sw/source/core/txtnode/atrfld.cxx
index f60d07c..a6cad4c 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -28,6 +28,7 @@
 #include fmtfld.hxx
 #include txtfld.hxx
 #include txtannotationfld.hxx
+#include docfld.hxx
 #include docufld.hxx
 #include doc.hxx
 
@@ -573,6 +574,8 @@ void SwTxtInputFld::UpdateFieldContent()
 if ( pInputFld != NULL )
 {
 const_castSwInputField*(pInputFld)-applyFieldContent( 
aNewFieldContent );
+// trigger update of fields for scenarios in which the Input 
Field's content is part of e.g. a table formula
+GetTxtNode().GetDoc()-GetUpdtFlds().SetFieldsDirty( sal_True );
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2014-07-14 Thread Oliver-Rainer Wittmann
 sw/source/core/fields/cellfml.cxx |   25 +
 sw/source/core/txtnode/atrfld.cxx |3 +++
 2 files changed, 20 insertions(+), 8 deletions(-)

New commits:
commit e465f0f4743162918dbdf2dcd50dedff00b1941c
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Jul 14 13:36:56 2014 +

Resolves: #i125228# correct consideration of InputFields...

in table cells are part of table formulas

(cherry picked from commit b384441c10475c9784eae3ea501afb22e0317468)

Conflicts:
sw/source/core/fields/cellfml.cxx

Change-Id: I4780ce0c1ac9ac911b654f61aa12938d7b225139

diff --git a/sw/source/core/fields/cellfml.cxx 
b/sw/source/core/fields/cellfml.cxx
index 796a18e..240c60a 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -151,22 +151,21 @@ double SwTableBox::GetValue( SwTblCalcPara rCalcPara ) 
const
 const sal_Unicode Char = bOK ? sTxt[nSttPos] : 0;
 if ( bOK  (Char==CH_TXTATR_BREAKWORD || Char==CH_TXTATR_INWORD) )
 {
-SwIndex aIdx( pTxtNd, nSttPos );
-SwTxtFld * const pTxtFld = static_castSwTxtFld*(
-pTxtNd-GetTxtAttrForCharAt(aIdx.GetIndex(), 
RES_TXTATR_FIELD));
-if( !pTxtFld )
+SwTxtFld * const pTxtFld =
+static_castSwTxtFld*( pTxtNd-GetTxtAttrForCharAt( nSttPos, 
RES_TXTATR_FIELD ) );
+if ( pTxtFld == NULL )
 break;
 
 rCalcPara.rCalc.SetCalcError( CALC_NOERR ); // reset status
 
 const SwField* pFld = pTxtFld-GetFmtFld().GetField();
-switch( pFld-GetTyp()-Which()  )
+switch ( pFld-GetTyp()-Which() )
 {
 case RES_SETEXPFLD:
-nRet = ((SwSetExpField*)pFld)-GetValue();
+nRet = ( (SwSetExpField*) pFld )-GetValue();
 break;
 case RES_USERFLD:
-nRet = ((SwUserFieldType*)pFld)-GetValue();
+nRet = ( (SwUserFieldType*) pFld )-GetValue();
 break;
 case RES_TABLEFLD:
 {
@@ -184,7 +183,7 @@ double SwTableBox::GetValue( SwTblCalcPara rCalcPara ) 
const
 break;
 
 case RES_DATETIMEFLD:
-nRet = ((SwDateTimeField*)pFld)-GetValue();
+nRet = ( (SwDateTimeField*) pFld )-GetValue();
 break;
 
 case RES_JUMPEDITFLD:
@@ -196,6 +195,16 @@ double SwTableBox::GetValue( SwTblCalcPara rCalcPara ) 
const
 nRet = rCalcPara.rCalc.Calculate( pFld-ExpandField(true) 
).GetDouble();
 }
 }
+else if ( nSttPos  sTxt.getLength()
+   Char == CH_TXT_ATR_INPUTFIELDSTART )
+{
+const SwTxtInputFld * pTxtInputFld =
+dynamic_cast const SwTxtInputFld* (
+pTxtNd-GetTxtAttrAt( nSttPos, RES_TXTATR_INPUTFIELD, 
SwTxtNode::DEFAULT ) );
+if ( pTxtInputFld == NULL )
+break;
+nRet = rCalcPara.rCalc.Calculate( pTxtInputFld-GetFieldContent() 
).GetDouble();
+}
 else
 {
 // result is 0 but no error!
diff --git a/sw/source/core/txtnode/atrfld.cxx 
b/sw/source/core/txtnode/atrfld.cxx
index b704710..035743b 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -21,6 +21,7 @@
 #include fmtfld.hxx
 #include txtfld.hxx
 #include txtannotationfld.hxx
+#include docfld.hxx
 #include docufld.hxx
 #include doc.hxx
 
@@ -545,6 +546,8 @@ void SwTxtInputFld::UpdateFieldContent()
 if ( pInputFld != NULL )
 {
 const_castSwInputField*(pInputFld)-applyFieldContent( 
aNewFieldContent );
+// trigger update of fields for scenarios in which the Input 
Field's content is part of e.g. a table formula
+GetTxtNode().GetDoc()-GetUpdtFlds().SetFieldsDirty( sal_True );
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/inc sw/source

2014-07-09 Thread Oliver-Rainer Wittmann
 sw/inc/IDocumentMarkAccess.hxx |5 ---
 sw/source/core/doc/docbm.cxx   |   54 -
 sw/source/core/doc/docdde.cxx  |4 +-
 sw/source/core/inc/MarkManager.hxx |5 ---
 sw/source/filter/ww8/wrtw8nds.cxx  |9 --
 5 files changed, 10 insertions(+), 67 deletions(-)

New commits:
commit 9c3dec47a12d37dd9b6fa71dca1f41def975759b
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jul 8 11:45:46 2014 +

Related: #i125215# MarkManager: remove unnecessary mark container

(cherry picked from commit f73412f09ca8a34bb7ec73370dae3e6033c0c581)

Conflicts:
sw/inc/IDocumentMarkAccess.hxx
sw/source/core/doc/docbm.cxx
sw/source/core/doc/docdde.cxx
sw/source/core/inc/MarkManager.hxx

Change-Id: I8aa3a0a3362de63fec9cd640ffde89d5f7f57417

diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx
index fe5b608..c565a91 100644
--- a/sw/inc/IDocumentMarkAccess.hxx
+++ b/sw/inc/IDocumentMarkAccess.hxx
@@ -252,11 +252,6 @@ class IDocumentMarkAccess
 virtual ::sw::mark::IFieldmark* getDropDownFor(const SwPosition pos) 
const=0;
 virtual std::vector ::sw::mark::IFieldmark*  getDropDownsFor(const 
SwPaM rPaM) const=0;
 
-// Marks exclusive annotation marks
-virtual const_iterator_t getCommonMarksBegin() const = 0;
-virtual const_iterator_t getCommonMarksEnd() const = 0;
-virtual sal_Int32 getCommonMarksCount() const = 0;
-
 // Annotation Marks
 virtual const_iterator_t getAnnotationMarksBegin() const = 0;
 virtual const_iterator_t getAnnotationMarksEnd() const = 0;
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 39abcd6..1f190d7 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -347,7 +347,6 @@ namespace sw { namespace mark
 , m_vBookmarks()
 , m_vFieldmarks()
 , m_vAnnotationMarks()
-, m_vCommonMarks()
 , m_pDoc(rDoc)
 { }
 
@@ -436,12 +435,10 @@ namespace sw { namespace mark
 case IDocumentMarkAccess::BOOKMARK:
 case IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK:
 case IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK:
-lcl_InsertMarkSorted(m_vCommonMarks, pMark);
 lcl_InsertMarkSorted(m_vBookmarks, pMark);
 break;
 case IDocumentMarkAccess::TEXT_FIELDMARK:
 case IDocumentMarkAccess::CHECKBOX_FIELDMARK:
-lcl_InsertMarkSorted(m_vCommonMarks, pMark);
 lcl_InsertMarkSorted(m_vFieldmarks, pMark);
 break;
 case IDocumentMarkAccess::ANNOTATIONMARK:
@@ -450,7 +447,6 @@ namespace sw { namespace mark
 case IDocumentMarkAccess::NAVIGATOR_REMINDER:
 case IDocumentMarkAccess::DDE_BOOKMARK:
 case IDocumentMarkAccess::UNO_BOOKMARK:
-lcl_InsertMarkSorted(m_vCommonMarks, pMark);
 // no special array for these
 break;
 }
@@ -858,16 +854,6 @@ namespace sw { namespace mark
 {
 OSL_ENSURE( false, MarkManager::deleteMark(..) - 
Bookmark not found in Bookmark container.);
 }
-
-ppBookmark = lcl_FindMark(m_vCommonMarks, *ppMark);
-if ( ppBookmark != m_vCommonMarks.end() )
-{
-m_vCommonMarks.erase(ppBookmark);
-}
-else
-{
-OSL_ENSURE( false, MarkManager::deleteMark(..) - 
Bookmark not found in common mark container.);
-}
 }
 break;
 
@@ -884,16 +870,6 @@ namespace sw { namespace mark
 {
 OSL_ENSURE( false, MarkManager::deleteMark(..) - 
Fieldmark not found in Fieldmark container.);
 }
-
-ppFieldmark = lcl_FindMark(m_vCommonMarks, *ppMark);
-if ( ppFieldmark != m_vCommonMarks.end() )
-{
-m_vCommonMarks.erase(ppFieldmark);
-}
-else
-{
-OSL_ENSURE( false, MarkManager::deleteMark(..) - 
Fieldmark not found in common mark container.);
-}
 }
 break;
 
@@ -914,17 +890,7 @@ namespace sw { namespace mark
 case IDocumentMarkAccess::NAVIGATOR_REMINDER:
 case IDocumentMarkAccess::DDE_BOOKMARK:
 case IDocumentMarkAccess::UNO_BOOKMARK:
-{
-IDocumentMarkAccess::iterator_t ppOtherMark = 
lcl_FindMark(m_vCommonMarks, *ppMark);
-if ( ppOtherMark != m_vCommonMarks.end() )
-{
-m_vCommonMarks.erase(ppOtherMark

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - sw/inc sw/source writerfilter/source

2014-07-08 Thread Oliver-Rainer Wittmann
 sw/inc/IDocumentMarkAccess.hxx|5 --
 sw/source/core/doc/docbm.cxx  |   54 --
 sw/source/core/doc/docdde.cxx |4 -
 sw/source/core/inc/MarkManager.hxx|5 --
 sw/source/filter/ww8/wrtw8nds.cxx |9 ++-
 writerfilter/source/dmapper/DomainMapper.cxx  |5 +-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |8 ++-
 writerfilter/source/dmapper/DomainMapper_Impl.hxx |6 +-
 8 files changed, 23 insertions(+), 73 deletions(-)

New commits:
commit f73412f09ca8a34bb7ec73370dae3e6033c0c581
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jul 8 11:45:46 2014 +

125215: MarkManager: remove unnecessary mark container

diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx
index 0057999..a16a861 100644
--- a/sw/inc/IDocumentMarkAccess.hxx
+++ b/sw/inc/IDocumentMarkAccess.hxx
@@ -250,11 +250,6 @@ class IDocumentMarkAccess
 virtual ::sw::mark::IFieldmark* getFieldmarkBefore(const SwPosition 
pos) const =0;
 virtual ::sw::mark::IFieldmark* getFieldmarkAfter(const SwPosition 
pos) const =0;
 
-// Marks exclusive annotation marks
-virtual const_iterator_t getCommonMarksBegin() const = 0;
-virtual const_iterator_t getCommonMarksEnd() const = 0;
-virtual sal_Int32 getCommonMarksCount() const = 0;
-
 // Annotation Marks
 virtual const_iterator_t getAnnotationMarksBegin() const = 0;
 virtual const_iterator_t getAnnotationMarksEnd() const = 0;
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 792e2c5..4626111 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -358,7 +358,6 @@ namespace sw { namespace mark
 , m_vBookmarks()
 , m_vFieldmarks()
 , m_vAnnotationMarks()
-, m_vCommonMarks()
 , m_pDoc(rDoc)
 { }
 
@@ -444,13 +443,11 @@ namespace sw { namespace mark
 case IDocumentMarkAccess::BOOKMARK:
 case IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK:
 case IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK:
-lcl_InsertMarkSorted(m_vCommonMarks, pMark);
 // if(dynamic_castIBookmark*)
 lcl_InsertMarkSorted(m_vBookmarks, pMark);
 break;
 case IDocumentMarkAccess::TEXT_FIELDMARK:
 case IDocumentMarkAccess::CHECKBOX_FIELDMARK:
-lcl_InsertMarkSorted(m_vCommonMarks, pMark);
 // if(dynamic_castIFieldmark*
 lcl_InsertMarkSorted(m_vFieldmarks, pMark);
 break;
@@ -460,7 +457,6 @@ namespace sw { namespace mark
 case IDocumentMarkAccess::NAVIGATOR_REMINDER:
 case IDocumentMarkAccess::DDE_BOOKMARK:
 case IDocumentMarkAccess::UNO_BOOKMARK:
-lcl_InsertMarkSorted(m_vCommonMarks, pMark);
 // no special array for these
 break;
 }
@@ -830,16 +826,6 @@ namespace sw { namespace mark
 {
 OSL_ENSURE( false, MarkManager::deleteMark(..) - 
Bookmark not found in Bookmark container.);
 }
-
-ppBookmark = lcl_FindMark(m_vCommonMarks, *ppMark);
-if ( ppBookmark != m_vCommonMarks.end() )
-{
-m_vCommonMarks.erase(ppBookmark);
-}
-else
-{
-OSL_ENSURE( false, MarkManager::deleteMark(..) - 
Bookmark not found in common mark container.);
-}
 }
 break;
 
@@ -862,15 +848,6 @@ namespace sw { namespace mark
 pTextFieldmark-ReleaseDoc(m_pDoc);
 }
 
-ppFieldmark = lcl_FindMark(m_vCommonMarks, *ppMark);
-if ( ppFieldmark != m_vCommonMarks.end() )
-{
-m_vCommonMarks.erase(ppFieldmark);
-}
-else
-{
-OSL_ENSURE( false, MarkManager::deleteMark(..) - 
Fieldmark not found in common mark container.);
-}
 }
 break;
 
@@ -891,17 +868,7 @@ namespace sw { namespace mark
 case IDocumentMarkAccess::NAVIGATOR_REMINDER:
 case IDocumentMarkAccess::DDE_BOOKMARK:
 case IDocumentMarkAccess::UNO_BOOKMARK:
-{
-IDocumentMarkAccess::iterator_t ppOtherMark = 
lcl_FindMark(m_vCommonMarks, *ppMark);
-if ( ppOtherMark != m_vCommonMarks.end() )
-{
-m_vCommonMarks.erase(ppOtherMark);
-}
-else
-{
-OSL_ENSURE( false, MarkManager

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sfx2/source

2014-07-07 Thread Oliver-Rainer Wittmann
 sfx2/source/doc/sfxbasemodel.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a3d348af9074e0621f1b50194f5304d551628b66
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Jul 7 09:04:38 2014 +

123812: SfxBaseModel::storeSelf(..) - accept arguement FailOnWarning in 
order to get new Version saved, if requested

Patch by: hanya
Review by: orw

diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 23a9944..7cc3498 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1610,7 +1610,8 @@ void SAL_CALL SfxBaseModel::storeSelf( const
uno::Sequence beans::PropertyVa
 if ( !aSeqArgs[nInd].Name.equals( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( VersionComment ) ) )
!aSeqArgs[nInd].Name.equals( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( Author ) ) )
!aSeqArgs[nInd].Name.equals( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( InteractionHandler ) ) )
-   !aSeqArgs[nInd].Name.equals( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( StatusIndicator ) ) ) )
+   !aSeqArgs[nInd].Name.equals( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( StatusIndicator ) ) )
+   !aSeqArgs[nInd].Name.equals( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( FailOnWarning ) ) ) )
 {
 m_pData-m_pObjectShell-AddLog( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX unexpected parameter for 
storeSelf, might be no problem if SaveAs is executed. ) ) );
 m_pData-m_pObjectShell-StoreLog();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - xmloff/source

2014-07-04 Thread Oliver-Rainer Wittmann
 xmloff/source/text/txtexppr.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 1ae655db954030d04fb3a413d57af2e47bea53af
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Jul 4 08:19:12 2014 +

124107: ODF export - suppress export of fo:margin for paragraph styles

diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx
index 102523d..a9b7144 100644
--- a/xmloff/source/text/txtexppr.cxx
+++ b/xmloff/source/text/txtexppr.cxx
@@ -462,7 +462,9 @@ void XMLTextExportPropertySetMapper::ContextFilter(
 XMLPropertyState* pClip11State = NULL;
 XMLPropertyState* pClipState = NULL;
 
+// filter fo:margin
 XMLPropertyState* pAllParaMargin = NULL;
+XMLPropertyState* pAllParaMarginRel = NULL;
 XMLPropertyState* pAllMargin = NULL;
 
 //
@@ -586,6 +588,7 @@ void XMLTextExportPropertySetMapper::ContextFilter(
 case CTF_TEXT_CLIP11:   pClip11State = propertie; break;
 case CTF_TEXT_CLIP: pClipState = propertie; break;
 case CTF_PARAMARGINALL: pAllParaMargin = propertie; break;
+case CTF_PARAMARGINALL_REL: pAllParaMarginRel = propertie; break;
 case CTF_MARGINALL: pAllMargin = propertie; break;
 
 //
@@ -675,6 +678,11 @@ void XMLTextExportPropertySetMapper::ContextFilter(
 pAllParaMargin-mnIndex = -1; // just export individual attributes...
 pAllParaMargin-maValue.clear();
 }
+if (pAllParaMarginRel)
+{
+pAllParaMarginRel-mnIndex = -1; // just export individual 
attributes...
+pAllParaMarginRel-maValue.clear();
+}
 if (pAllMargin)
 {
 pAllMargin-mnIndex = -1; // just export individual attributes...
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - xmloff/source

2014-07-04 Thread Oliver-Rainer Wittmann
 xmloff/source/text/txtimppr.cxx |   41 ++--
 1 file changed, 35 insertions(+), 6 deletions(-)

New commits:
commit 9d50f2b20cdf409f30fe573afb6e8db20be0689e
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Jul 4 11:36:35 2014 +

124107: ODF import - ignore fo:margin=100% for paragraph styles as core 
attributes are not able to treat it correctly.

The result is the same - value are inherited from parent

diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx
index a748923..b76f6e1 100644
--- a/xmloff/source/text/txtimppr.cxx
+++ b/xmloff/source/text/txtimppr.cxx
@@ -312,9 +312,11 @@ void XMLTextImportPropertyMapper::finished(
 XMLPropertyState* pVertOrientRelAsChar = 0;
 XMLPropertyState* pBackTransparency = NULL; // transparency in %
 XMLPropertyState* pBackTransparent = NULL;  // transparency as boolean
+
 XMLPropertyState* pAllParaMargin = 0;
 XMLPropertyState* pParaMargins[4] = { 0, 0, 0, 0 };
 ::std::auto_ptrXMLPropertyState pNewParaMargins[4];
+
 XMLPropertyState* pAllMargin = 0;
 XMLPropertyState* pMargins[4] = { 0, 0, 0, 0 };
 ::std::auto_ptrXMLPropertyState pNewMargins[4];
@@ -385,21 +387,42 @@ void XMLTextImportPropertyMapper::finished(
 bHasAnyWidth = sal_True; break;
 case CTF_BACKGROUND_TRANSPARENCY: pBackTransparency = property; break;
 case CTF_BACKGROUND_TRANSPARENT:  pBackTransparent = property; break;
+
 case CTF_PARAMARGINALL:
+pAllParaMargin = property;
+break;
 case CTF_PARAMARGINALL_REL:
-pAllParaMargin = property; break;
+{
+sal_uInt32 nValue;
+property-maValue = nValue;
+// treat fo:margin=100% as it is not exisiting as the
+// corresponding core attribute classes - SvxULSpaceItem and
+// SvxLRSpaceItem - are not able to treat such a value 
correctly.
+// The result will be the same as the values will be inherited
+// from parent, when the no margin attribute is given.
+if ( nValue != 100 )
+{
+pAllParaMargin = property;
+}
+}
+break;
+
 case CTF_PARALEFTMARGIN:
 case CTF_PARALEFTMARGIN_REL:
 pParaMargins[XML_LINE_LEFT] = property; break;
+
 case CTF_PARARIGHTMARGIN:
 case CTF_PARARIGHTMARGIN_REL:
 pParaMargins[XML_LINE_RIGHT] = property; break;
+
 case CTF_PARATOPMARGIN:
 case CTF_PARATOPMARGIN_REL:
 pParaMargins[XML_LINE_TOP] = property; break;
+
 case CTF_PARABOTTOMMARGIN:
 case CTF_PARABOTTOMMARGIN_REL:
 pParaMargins[XML_LINE_BOTTOM] = property; break;
+
 case CTF_MARGINALL:
 pAllMargin = property; break;
 case CTF_MARGINLEFT:
@@ -428,7 +451,8 @@ void XMLTextImportPropertyMapper::finished(
 
 for (sal_uInt16 i = 0; i  4; i++)
 {
-if (pAllParaMargin  !pParaMargins[i])
+if ( pAllParaMargin != NULL
+  pParaMargins[i] == NULL )
 {
 #ifdef DBG_UTIL
 sal_Int16 nTmp = getPropertySetMapper()-GetEntryContextId(
@@ -437,9 +461,12 @@ void XMLTextImportPropertyMapper::finished(
 nTmp = CTF_PARABOTTOMMARGIN_REL,
 wrong property context id );
 #endif
-pNewParaMargins[i].reset(new XMLPropertyState(
-pAllParaMargin-mnIndex + (2*i) + 2, pAllParaMargin-maValue));
+// IMPORTANT NOTE: the index calculation depends on the right 
order in the property map
+pNewParaMargins[i].reset(
+new XMLPropertyState( pAllParaMargin-mnIndex + (2*i) + 2,
+  pAllParaMargin-maValue ) );
 }
+
 if (pAllMargin  !pMargins[i])
 {
 #ifdef DBG_UTIL
@@ -448,8 +475,10 @@ void XMLTextImportPropertyMapper::finished(
 OSL_ENSURE( nTmp = CTF_MARGINLEFT  nTmp = CTF_MARGINBOTTOM,
 wrong property context id );
 #endif
-pNewMargins[i].reset(new XMLPropertyState(
-pAllMargin-mnIndex + i + 1, pAllMargin-maValue));
+// IMPORTANT NOTE: the index calculation depends on the right 
order in the property map
+pNewMargins[i].reset(
+new XMLPropertyState( pAllMargin-mnIndex + i + 1,
+  pAllMargin-maValue ) );
 }
 if( pAllBorderDistance  !pBorderDistances[i] )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source

2014-06-26 Thread Oliver-Rainer Wittmann
 sw/source/filter/ww8/ww8par.cxx  |5 +-
 sw/source/filter/ww8/ww8par.hxx  |   14 
 sw/source/filter/ww8/ww8par5.cxx |   66 ---
 sw/source/filter/ww8/ww8par6.cxx |6 +--
 4 files changed, 54 insertions(+), 37 deletions(-)

New commits:
commit 785b8653be59823eb9cc4efe49f4b87e2b545d33
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Thu Jun 26 09:24:49 2014 +

125122: WW8 import: Handle nested TOX fields

- only the content of nested TOX fields is imported, no TOX field itself

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 690a066..14046d5 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3724,8 +3724,9 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, 
SvStorage* pStorage,
 , nIdctHint(0)
 , bBidi(false)
 , bReadTable(false)
-, mbLoadingTOCCache(false)
-, mbLoadingTOCHyperlink(false)
+, mbLoadingTOXCache(false)
+, mnEmbeddedTOXLevel(0)
+, mbLoadingTOXHyperlink(false)
 , mpPosAfterTOC(0)
 , mbCareFirstParaEndInToc(false)
 , mbCareLastParaEndInToc(false)
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index bc04b28..e3a862c 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1216,10 +1216,12 @@ private:
 boost::shared_ptrSwPaM mpTableEndPaM;
 WW8PLCFx_Cp_FKP* pFirstTablePap;
 
-// Indicate that currently on loading a TOC, managed by Read_F_TOX() and 
End_Field()
-bool mbLoadingTOCCache;
-// Indicate that current on loading a hyperlink, which is inside a TOC; 
Managed by Read_F_Hyperlink() and End_Field()
-bool mbLoadingTOCHyperlink;
+// Indicate that currently on loading a TOX, managed by Read_F_TOX() and 
End_Field()
+bool mbLoadingTOXCache;
+int mnEmbeddedTOXLevel;
+
+// Indicate that current on loading a hyperlink, which is inside a TOX; 
Managed by Read_F_Hyperlink() and End_Field()
+bool mbLoadingTOXHyperlink;
 // a document position recorded the after-position of TOC section, managed 
by Read_F_TOX() and End_Field()
 SwPaM* mpPosAfterTOC;
 
@@ -1289,12 +1291,10 @@ private:
 void ImportTox( int nFldId, String aStr );
 
 void EndSprm( sal_uInt16 nId );
-// -- OD 2010-05-06 #i103711#
-// -- OD 2010-05-11 #i105414#
+
 void NewAttr( const SfxPoolItem rAttr,
   const bool bFirstLineOfStSet = false,
   const bool bLeftIndentSet = false );
-// --
 
 bool GetFontParams(sal_uInt16, FontFamily, String, FontPitch,
 rtl_TextEncoding);
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 8bffc4b..9cfa749 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -706,41 +706,48 @@ sal_uInt16 SwWW8ImplReader::End_Field()
 }
 }
 break;
-// Doing corresponding status management for TOC field, index 
field, hyperlink field and page reference field
+// Doing corresponding status management for TOX field, index 
field, hyperlink field and page reference field
 case 13://TOX
 case 8://index
-if (mbLoadingTOCCache)
+if ( mbLoadingTOXCache )
 {
-maTOXEndCps.insert(nCP);
-mbLoadingTOCCache = false;
-if ( pPaM-End() 
- pPaM-End()-nNode.GetNode().GetTxtNode() 
- pPaM-End()-nNode.GetNode().GetTxtNode()-Len() == 0 
)
+if ( mnEmbeddedTOXLevel  0 )
 {
-JoinNode(*pPaM);
+--mnEmbeddedTOXLevel;
 }
 else
 {
+maTOXEndCps.insert( nCP );
+mbLoadingTOXCache = false;
+if ( pPaM-End()
+  pPaM-End()-nNode.GetNode().GetTxtNode()
+  
pPaM-End()-nNode.GetNode().GetTxtNode()-Len() == 0 )
+{
+JoinNode( *pPaM );
+}
+else
+{
 mbCareLastParaEndInToc = true;
-}
+}
 
-if (mpPosAfterTOC)
-{
-*pPaM = *mpPosAfterTOC;
-delete mpPosAfterTOC;
-mpPosAfterTOC = 0;
+if ( mpPosAfterTOC )
+{
+*pPaM = *mpPosAfterTOC;
+delete mpPosAfterTOC;
+mpPosAfterTOC = 0;
+}
 }
 }
 break;
 case 37://REF

[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - 2 commits - sw/inc sw/source

2014-06-17 Thread Oliver-Rainer Wittmann
 sw/inc/txtfld.hxx|   10 +
 sw/source/core/txtnode/atrfld.cxx|   34 +++
 sw/source/core/unocore/unofield.cxx  |   24 -
 sw/source/ui/dbui/mmaddressblockpage.cxx |1 
 4 files changed, 54 insertions(+), 15 deletions(-)

New commits:
commit 47bf6ae2d0618313f75dcd7ac73c72dbd218c242
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Jun 16 12:01:46 2014 +

Resolves: #i125086# correct implementation of css::text::XTextField...

in Writer to reflect changes made for the in-place editing of Input Fields

(cherry picked from commit 90b633455a6e54300330e68e71e22e729b445f31)

Conflicts:
sw/source/core/txtnode/atrfld.cxx
sw/source/core/unocore/unofield.cxx

Change-Id: I39de2b5074c2e7d8671ad2c0a3c01a29ccfc7882
(cherry picked from commit 41d43bc95b64e1907709141fcd8b6ce08b0841c8)

diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index 7ce306e..b4d32cd 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -22,6 +22,9 @@
 #include txatbase.hxx
 #include rtl/ustring.hxx
 
+#include boost/shared_ptr.hpp
+
+class SwPaM;
 class SwTxtNode;
 
 // ATT_FLD ***
@@ -68,6 +71,13 @@ public:
 // enable notification that field content has changed and needs 
reformatting
 virtual void NotifyContentChange( SwFmtFld rFmtFld );
 
+// deletes the given field via removing the corresponding text selection 
from the document's content
+static void DeleteTxtFld( const SwTxtFld rTxtFld );
+
+// return text selection for the given field
+static void GetPamForTxtFld( const SwTxtFld rTxtFld,
+ boost::shared_ptr SwPaM  rPamForTxtFld );
+
 };
 
 class SwTxtInputFld : public SwTxtFld
diff --git a/sw/source/core/txtnode/atrfld.cxx 
b/sw/source/core/txtnode/atrfld.cxx
index faf2b81..ae65c36 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -431,6 +431,40 @@ void SwTxtFld::NotifyContentChange(SwFmtFld rFmtFld)
 }
 }
 
+/*static*/
+void SwTxtFld::GetPamForTxtFld(
+const SwTxtFld rTxtFld,
+boost::shared_ptr SwPaM  rPamForTxtFld )
+{
+if (rTxtFld.GetpTxtNode() == NULL)
+{
+SAL_WARN(sw.core, SwTxtFld::GetPamForField - missing 
SwTxtNode);
+return;
+}
+
+const SwTxtNode rTxtNode = rTxtFld.GetTxtNode();
+
+rPamForTxtFld.reset( new SwPaM( rTxtNode,
+( (rTxtFld.End() != NULL) ? 
*(rTxtFld.End()) : ( *(rTxtFld.GetStart()) + 1 ) ),
+rTxtNode,
+*(rTxtFld.GetStart()) ) );
+
+}
+
+/*static*/
+void SwTxtFld::DeleteTxtFld( const SwTxtFld rTxtFld )
+{
+if (rTxtFld.GetpTxtNode() != NULL)
+{
+boost::shared_ptr SwPaM  pPamForTxtFld;
+GetPamForTxtFld(rTxtFld, pPamForTxtFld);
+if (pPamForTxtFld.get() != NULL)
+{
+rTxtFld.GetTxtNode().GetDoc()-DeleteAndJoin(*pPamForTxtFld);
+}
+}
+}
+
 // input field in-place editing
 SwTxtInputFld::SwTxtInputFld(
 SwFmtFld  rAttr,
diff --git a/sw/source/core/unocore/unofield.cxx 
b/sw/source/core/unocore/unofield.cxx
index 2ef5ecb..3043353 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -976,15 +976,10 @@ throw (uno::RuntimeException, std::exception)
 SwFmtFld* pFld = aIter.First();
 while(pFld)
 {
-// Feld im Undo?
 SwTxtFld *pTxtFld = pFld-GetTxtFld();
 if(pTxtFld  pTxtFld-GetTxtNode().GetNodes().IsDocNodes() )
 {
-SwTxtNode rTxtNode = (SwTxtNode)*pTxtFld-GetpTxtNode();
-SwPaM aPam(rTxtNode, *pTxtFld-GetStart());
-aPam.SetMark();
-aPam.Move();
-m_pImpl-m_pDoc-DeleteAndJoin(aPam);
+SwTxtFld::DeleteTxtFld(*pTxtFld);
 }
 pFld = aIter.Next();
 }
@@ -2035,12 +2030,14 @@ SwXTextField::getAnchor() throw (uno::RuntimeException, 
std::exception)
 const SwTxtFld* pTxtFld = m_pImpl-m_pFmtFld-GetTxtFld();
 if (!pTxtFld)
 throw uno::RuntimeException();
-const SwTxtNode rTxtNode = pTxtFld-GetTxtNode();
 
-SwPaM aPam(rTxtNode, *pTxtFld-GetStart() + 1, rTxtNode, 
*pTxtFld-GetStart());
+boost::shared_ptr SwPaM  pPamForTxtFld;
+SwTxtFld::GetPamForTxtFld(*pTxtFld, pPamForTxtFld);
+if (pPamForTxtFld.get() == NULL)
+return 0;
 
 uno::Referencetext::XTextRange xRange = SwXTextRange::CreateXTextRange(
-*m_pImpl-m_pDoc, *aPam.GetPoint(), aPam.GetMark());
+*m_pImpl-m_pDoc, *(pPamForTxtFld-GetPoint()), 
pPamForTxtFld-GetMark());
 return xRange;
 }
 
@@ -2051,12 +2048,9 @@ void SAL_CALL SwXTextField::dispose() throw 
(uno::RuntimeException, std::excepti
 if(pField)
 {
 UnoActionContext aContext(m_pImpl-m_pDoc);
-const SwTxtFld* pTxtFld = m_pImpl-m_pFmtFld-GetTxtFld

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source

2014-06-16 Thread Oliver-Rainer Wittmann
 sw/source/core/txtnode/ndtxt.cxx |   24 
 1 file changed, 20 insertions(+), 4 deletions(-)

New commits:
commit 6895a55d74fe6a3b70ba15f77050652d3afee821
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Jun 16 08:40:28 2014 +

125055: follow-up of fix for issue 124338 - adjust condition to trigger 
sort of bookmarks in order to avoid serious performance decrease

Kudos to Ariel for his analysis

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 75b2aa0..d5967ea 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1080,6 +1080,8 @@ void SwTxtNode::Update(
 // Bookmarks must never grow to either side, when editing (directly) 
to the left or right (#i29942#)!
 // And a bookmark with same start and end must remain to the left of 
the inserted text (used in XML import).
 {
+bool bAtLeastOneBookmarkMoved = false;
+bool bAtLeastOneExpandedBookmarkAtInsertionPosition = false;
 const IDocumentMarkAccess* const pMarkAccess = 
getIDocumentMarkAccess();
 for ( IDocumentMarkAccess::const_iterator_t ppMark = 
pMarkAccess-getAllMarksBegin();
 ppMark != pMarkAccess-getAllMarksEnd();
@@ -1087,14 +1089,28 @@ void SwTxtNode::Update(
 {
 const ::sw::mark::IMark* const pMark = ppMark-get();
 const SwPosition* pEnd = pMark-GetMarkEnd();
-SwIndex  rIdx = const_castSwIndex(pEnd-nContent);
+SwIndex  rEndIdx = const_castSwIndex(pEnd-nContent);
 if( this == pEnd-nNode.GetNode() 
-rPos.GetIndex() == rIdx.GetIndex() )
+rPos.GetIndex() == rEndIdx.GetIndex() )
 {
-rIdx.Assign( aTmpIdxReg, rIdx.GetIndex() );
-bSortMarks = true;
+rEndIdx.Assign( aTmpIdxReg, rEndIdx.GetIndex() );
+bAtLeastOneBookmarkMoved = true;
+}
+else if ( !bAtLeastOneExpandedBookmarkAtInsertionPosition )
+{
+if ( pMark-IsExpanded() )
+{
+const SwPosition* pStart = pMark-GetMarkStart();
+if ( this == pStart-nNode.GetNode()
+  rPos.GetIndex() == pStart-nContent.GetIndex() 
)
+{
+bAtLeastOneExpandedBookmarkAtInsertionPosition = 
true;
+}
+}
 }
 }
+
+bSortMarks = bAtLeastOneBookmarkMoved  
bAtLeastOneExpandedBookmarkAtInsertionPosition;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2014-06-16 Thread Oliver-Rainer Wittmann
 sw/source/core/txtnode/ndtxt.cxx |   24 
 1 file changed, 20 insertions(+), 4 deletions(-)

New commits:
commit 61df5e69df443dad24acbd8257a83aadb3888099
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Jun 16 08:40:28 2014 +

Resolves: #i125055# follow-up of fix for #i124338#

adjust condition to trigger sort of bookmarks in order to avoid serious
performance decrease

Kudos to Ariel for his analysis

(cherry picked from commit 6895a55d74fe6a3b70ba15f77050652d3afee821)

Change-Id: Ic72b0a07556ec85a6ee2568f814b8bcfaaabe42e

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index d785c6a..ba6061d 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1055,6 +1055,8 @@ void SwTxtNode::Update(
 // Bookmarks must never grow to either side, when editing (directly) 
to the left or right (#i29942#)!
 // And a bookmark with same start and end must remain to the left of 
the inserted text (used in XML import).
 {
+bool bAtLeastOneBookmarkMoved = false;
+bool bAtLeastOneExpandedBookmarkAtInsertionPosition = false;
 const IDocumentMarkAccess* const pMarkAccess = 
getIDocumentMarkAccess();
 for ( IDocumentMarkAccess::const_iterator_t ppMark = 
pMarkAccess-getAllMarksBegin();
 ppMark != pMarkAccess-getAllMarksEnd();
@@ -1062,14 +1064,28 @@ void SwTxtNode::Update(
 {
 const ::sw::mark::IMark* const pMark = ppMark-get();
 const SwPosition* pEnd = pMark-GetMarkEnd();
-SwIndex  rIdx = const_castSwIndex(pEnd-nContent);
+SwIndex  rEndIdx = const_castSwIndex(pEnd-nContent);
 if( this == pEnd-nNode.GetNode() 
-rPos.GetIndex() == rIdx.GetIndex() )
+rPos.GetIndex() == rEndIdx.GetIndex() )
 {
-rIdx.Assign( aTmpIdxReg, rIdx.GetIndex() );
-bSortMarks = true;
+rEndIdx.Assign( aTmpIdxReg, rEndIdx.GetIndex() );
+bAtLeastOneBookmarkMoved = true;
+}
+else if ( !bAtLeastOneExpandedBookmarkAtInsertionPosition )
+{
+if ( pMark-IsExpanded() )
+{
+const SwPosition* pStart = pMark-GetMarkStart();
+if ( this == pStart-nNode.GetNode()
+  rPos.GetIndex() == pStart-nContent.GetIndex() 
)
+{
+bAtLeastOneExpandedBookmarkAtInsertionPosition = 
true;
+}
+}
 }
 }
+
+bSortMarks = bAtLeastOneBookmarkMoved  
bAtLeastOneExpandedBookmarkAtInsertionPosition;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/source

2014-06-16 Thread Oliver-Rainer Wittmann
 sw/source/core/txtnode/ndtxt.cxx |   24 
 1 file changed, 20 insertions(+), 4 deletions(-)

New commits:
commit 7ea2597a7a2ef4deab38931f44419809d51d49ec
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Jun 16 08:40:28 2014 +

Resolves: #i125055# follow-up of fix for #i124338#

adjust condition to trigger sort of bookmarks in order to avoid serious
performance decrease

Kudos to Ariel for his analysis

(cherry picked from commit 6895a55d74fe6a3b70ba15f77050652d3afee821)

Change-Id: Ic72b0a07556ec85a6ee2568f814b8bcfaaabe42e
(cherry picked from commit 61df5e69df443dad24acbd8257a83aadb3888099)

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 386e4c5..0fbcf46 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1056,6 +1056,8 @@ void SwTxtNode::Update(
 // Bookmarks must never grow to either side, when editing (directly) 
to the left or right (#i29942#)!
 // And a bookmark with same start and end must remain to the left of 
the inserted text (used in XML import).
 {
+bool bAtLeastOneBookmarkMoved = false;
+bool bAtLeastOneExpandedBookmarkAtInsertionPosition = false;
 const IDocumentMarkAccess* const pMarkAccess = 
getIDocumentMarkAccess();
 for ( IDocumentMarkAccess::const_iterator_t ppMark = 
pMarkAccess-getAllMarksBegin();
 ppMark != pMarkAccess-getAllMarksEnd();
@@ -1063,14 +1065,28 @@ void SwTxtNode::Update(
 {
 const ::sw::mark::IMark* const pMark = ppMark-get();
 const SwPosition* pEnd = pMark-GetMarkEnd();
-SwIndex  rIdx = const_castSwIndex(pEnd-nContent);
+SwIndex  rEndIdx = const_castSwIndex(pEnd-nContent);
 if( this == pEnd-nNode.GetNode() 
-rPos.GetIndex() == rIdx.GetIndex() )
+rPos.GetIndex() == rEndIdx.GetIndex() )
 {
-rIdx.Assign( aTmpIdxReg, rIdx.GetIndex() );
-bSortMarks = true;
+rEndIdx.Assign( aTmpIdxReg, rEndIdx.GetIndex() );
+bAtLeastOneBookmarkMoved = true;
+}
+else if ( !bAtLeastOneExpandedBookmarkAtInsertionPosition )
+{
+if ( pMark-IsExpanded() )
+{
+const SwPosition* pStart = pMark-GetMarkStart();
+if ( this == pStart-nNode.GetNode()
+  rPos.GetIndex() == pStart-nContent.GetIndex() 
)
+{
+bAtLeastOneExpandedBookmarkAtInsertionPosition = 
true;
+}
+}
 }
 }
+
+bSortMarks = bAtLeastOneBookmarkMoved  
bAtLeastOneExpandedBookmarkAtInsertionPosition;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/inc sw/source

2014-06-13 Thread Oliver-Rainer Wittmann
 sw/inc/txtannotationfld.hxx   |3 -
 sw/inc/txtfld.hxx |   13 +---
 sw/source/core/crsr/crstrvl.cxx   |2 
 sw/source/core/doc/docfld.cxx |2 
 sw/source/core/txtnode/atrfld.cxx |  105 --
 sw/source/core/txtnode/thints.cxx |9 ++-
 6 files changed, 72 insertions(+), 62 deletions(-)

New commits:
commit 3d4d98d4d98bc62474ec295cdc4d070a01dcac13
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Jun 13 14:08:22 2014 +

125044: - use field's content cache on SwTxtFld construction only for 
clipboard documents

- assure invalidation and updates on code to update fields

diff --git a/sw/inc/txtannotationfld.hxx b/sw/inc/txtannotationfld.hxx
index f7cd9b8..2a8d9db 100755
--- a/sw/inc/txtannotationfld.hxx
+++ b/sw/inc/txtannotationfld.hxx
@@ -33,7 +33,8 @@ class SwTxtAnnotationFld : public SwTxtFld
 public:
 SwTxtAnnotationFld(
 SwFmtFld  rAttr,
-xub_StrLen const nStart );
+xub_StrLen const nStart,
+const bool bIsClipboardDoc );
 
 virtual ~SwTxtAnnotationFld();
 
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index f31dd07..d86a447 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -39,18 +39,14 @@ class SwTxtFld : public SwTxtAttr
 public:
 SwTxtFld(
 SwFmtFld  rAttr,
-xub_StrLen const nStart );
+xub_StrLen const nStart,
+const bool bIsClipboardDoc );
 
 virtual ~SwTxtFld();
 
 void CopyTxtFld( SwTxtFld *pDest ) const;
 
-void ExpandTxtFld() const;
-inline void ExpandAlways()
-{
-m_aExpand += ' '; // changing current value to assure that 
ExpandTxtFld() changes the value.
-ExpandTxtFld();
-}
+void ExpandTxtFld( const bool bForceNotify = false ) const;
 
 // get and set TxtNode pointer
 inline SwTxtNode* GetpTxtNode() const
@@ -80,7 +76,8 @@ public:
 SwTxtInputFld(
 SwFmtFld  rAttr,
 xub_StrLen const nStart,
-xub_StrLen const nEnd );
+xub_StrLen const nEnd,
+const bool bIsClipboardDoc );
 
 virtual ~SwTxtInputFld();
 
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index fbbde30..479a755 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -722,7 +722,7 @@ sal_Bool SwCrsrShell::MoveFldType(
 SwFmtFld* pFmtFld = new SwFmtFld( SwDateTimeField(
 (SwDateTimeFieldType*)pDoc-GetSysFldType( RES_DATETIMEFLD ) ) 
);
 
-pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex() );
+pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex(), 
pDoc-IsClipBoard() );
 pTxtFld-ChgTxtNode( pTNd );
 }
 
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 384bfa2..bb93c8c 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -2006,7 +2006,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor 
rOldNames,
 }
 
 if (bExpand)
-pTxtFld-ExpandAlways();
+pTxtFld-ExpandTxtFld( true );
 }
 SetModified();
 }
diff --git a/sw/source/core/txtnode/atrfld.cxx 
b/sw/source/core/txtnode/atrfld.cxx
index 90526b0..d111950 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -218,71 +218,76 @@ void SwFmtFld::SwClientNotify( const SwModify, const 
SfxHint rHint )
 
 void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
 {
-if( !mpTxtFld )
+if ( mpTxtFld == NULL )
 return;
 
-// don't do anything, especially not expand!
-if( pNew  pNew-Which() == RES_OBJECTDYING )
+if( pNew != NULL
+ pNew-Which() == RES_OBJECTDYING )
+{
+// don't do anything, especially not expand!
 return;
+}
 
-SwTxtNode* pTxtNd = (SwTxtNode*)mpTxtFld-GetTxtNode();
+SwTxtNode* pTxtNd = (SwTxtNode*) mpTxtFld-GetTxtNode();
 ASSERT( pTxtNd, wo ist denn mein Node? );
-if( pNew )
+if ( pNew )
 {
-switch( pNew-Which() )
+switch (pNew-Which())
 {
 case RES_TXTATR_FLDCHG:
-// Farbe hat sich geaendert !
-// this, this fuer nur Painten
-pTxtNd-ModifyNotification( this, this );
-return;
+// Farbe hat sich geaendert !
+// this, this fuer nur Painten
+pTxtNd-ModifyNotification( this, this );
+return;
+
 case RES_REFMARKFLD_UPDATE:
-// GetReferenz-Felder aktualisieren
-if( RES_GETREFFLD == GetField()-GetTyp()-Which() )
-{
-// -- OD 2007-09-06 #i81002#
-//((SwGetRefField*)GetFld())-UpdateField();
-dynamic_castSwGetRefField*(GetField())-UpdateField( 
mpTxtFld );
-// --
-}
-break;
+// GetReferenz-Felder aktualisieren

[Libreoffice-commits] core.git: sw/inc sw/source

2014-06-13 Thread Oliver-Rainer Wittmann
 sw/inc/txtfld.hxx |7 +--
 sw/source/core/doc/docfld.cxx |2 +-
 sw/source/core/txtnode/atrfld.cxx |9 ++---
 3 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit cd94a84b89c476760ad74bf088a5d6f8ba4ce209
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Jun 13 14:08:22 2014 +

125044: - use field's content cache on SwTxtFld construction only

... for clipboard documents

- assure invalidation and updates on code to update fields

(cherry picked from commit 3d4d98d4d98bc62474ec295cdc4d070a01dcac13)

The substantial bug was already fixed years ago by commit
9519deda120b73b72e75d89c3b2ae3d66220ec2d

Conflicts:
sw/inc/txtannotationfld.hxx
sw/inc/txtfld.hxx
sw/source/core/crsr/crstrvl.cxx
sw/source/core/txtnode/atrfld.cxx
sw/source/core/txtnode/thints.cxx

Change-Id: Ib4965c5d443b60bab11bad1a9249fc6547976a3c

diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index 3f4d41f..44c5c5e 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -39,12 +39,7 @@ public:
 
 void CopyTxtFld( SwTxtFld *pDest ) const;
 
-void ExpandTxtFld() const;
-void ExpandAlways()
-{
-m_aExpand +=  ; // changing current value to assure that 
ExpandTxtFld() changes the value.
-ExpandTxtFld();
-}
+void ExpandTxtFld( const bool bForceNotify = false ) const;
 
 // get and set TxtNode pointer
 SwTxtNode* GetpTxtNode() const
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index b345568..2c03271 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -1975,7 +1975,7 @@ void SwDoc::ChangeDBFields( const std::vectorOUString 
rOldNames,
 }
 
 if (bExpand)
-pTxtFld-ExpandAlways();
+pTxtFld-ExpandTxtFld( true );
 }
 SetModified();
 #endif
diff --git a/sw/source/core/txtnode/atrfld.cxx 
b/sw/source/core/txtnode/atrfld.cxx
index faf2b81..e533eb5 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -269,7 +269,9 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const 
SfxPoolItem* pNew )
 pType-GetValue( aCalc );
 }
 }
-mpTxtFld-ExpandTxtFld();
+
+const bool bForceNotify = (pOld == NULL)  (pNew == NULL);
+mpTxtFld-ExpandTxtFld( bForceNotify );
 }
 
 bool SwFmtFld::GetInfo( SfxPoolItem rInfo ) const
@@ -326,14 +328,15 @@ bool SwTxtFld::IsFldInDoc() const
 GetpTxtNode()-GetNodes().IsDocNodes();
 }
 
-void SwTxtFld::ExpandTxtFld() const
+void SwTxtFld::ExpandTxtFld(const bool bForceNotify) const
 {
 OSL_ENSURE( m_pTxtNode, SwTxtFld: where is my TxtNode? );
 
 const SwField* pFld = GetFmtFld().GetField();
 const OUString aNewExpand( 
pFld-ExpandField(m_pTxtNode-GetDoc()-IsClipBoard()) );
 
-if( aNewExpand == m_aExpand )
+if (!bForceNotify 
+aNewExpand == m_aExpand)
 {
 // Bei Seitennummernfeldern
 const sal_uInt16 nWhich = pFld-GetTyp()-Which();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2014-06-11 Thread Oliver-Rainer Wittmann
 sw/source/core/unocore/unoframe.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 3a72f4ba07458ee9c4c726486304f31900d89044
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jun 10 14:49:06 2014 +

Related: #i125072# map given style name to corresponding UI name...

before searching for it.

(cherry picked from commit 4a76d7f700da112a553ec9d9811731e645581a7f)

Conflicts:
sw/source/core/unocore/unoframe.cxx

Change-Id: I294bd7f21ec0acee0f7b8e7be067e04b5a785e43

diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index 7e21aa0..58e46f3 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1019,6 +1019,7 @@ bool SwGraphicProperties_Impl::AnyToItemSet(
 {
 OUString sStyle;
 *pStyleName = sStyle;
+SwStyleNameMapper::FillUIName(sStyle, sStyle, 
nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, true);
 pStyle = 
(SwDocStyleSheet*)pDoc-GetDocShell()-GetStyleSheetPool()-Find(sStyle,
 SFX_STYLE_FAMILY_FRAME);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/source

2014-06-11 Thread Oliver-Rainer Wittmann
 sw/source/core/unocore/unoframe.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7a5dc88e055800af51ed7f5967c455c85a117741
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jun 10 14:49:06 2014 +

Related: #i125072# map given style name to corresponding UI name...

before searching for it.

(cherry picked from commit 4a76d7f700da112a553ec9d9811731e645581a7f)

Conflicts:
sw/source/core/unocore/unoframe.cxx

Change-Id: I294bd7f21ec0acee0f7b8e7be067e04b5a785e43
(cherry picked from commit 3a72f4ba07458ee9c4c726486304f31900d89044)

diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index de2d5d8..405d5d8 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1017,6 +1017,7 @@ bool SwGraphicProperties_Impl::AnyToItemSet(
 {
 OUString sStyle;
 *pStyleName = sStyle;
+SwStyleNameMapper::FillUIName(sStyle, sStyle, 
nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, true);
 pStyle = 
(SwDocStyleSheet*)pDoc-GetDocShell()-GetStyleSheetPool()-Find(sStyle,
 SFX_STYLE_FAMILY_FRAME);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/source

2014-06-11 Thread Oliver-Rainer Wittmann
 sw/source/core/unocore/unoframe.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 49940766a52f5eccb1d5f4392304a9437bad0c49
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jun 10 14:49:06 2014 +

Related: #i125072# map given style name to corresponding UI name...

before searching for it.

(cherry picked from commit 4a76d7f700da112a553ec9d9811731e645581a7f)

Conflicts:
sw/source/core/unocore/unoframe.cxx

Change-Id: I294bd7f21ec0acee0f7b8e7be067e04b5a785e43
(cherry picked from commit 3a72f4ba07458ee9c4c726486304f31900d89044)
Reviewed-on: https://gerrit.libreoffice.org/9736
Reviewed-by: Michael Stahl mst...@redhat.com
Tested-by: Michael Stahl mst...@redhat.com

diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index e2093aa..c7f0a44 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -693,6 +693,7 @@ bool SwGraphicProperties_Impl::AnyToItemSet(
 {
 OUString sStyle;
 *pStyleName = sStyle;
+SwStyleNameMapper::FillUIName(sStyle, sStyle, 
nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, true);
 pStyle = 
(SwDocStyleSheet*)pDoc-GetDocShell()-GetStyleSheetPool()-Find(sStyle,
 SFX_STYLE_FAMILY_FRAME);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - sw/source

2014-06-10 Thread Oliver-Rainer Wittmann
 sw/source/core/unocore/unoframe.cxx |  121 +++-
 1 file changed, 66 insertions(+), 55 deletions(-)

New commits:
commit 4a76d7f700da112a553ec9d9811731e645581a7f
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jun 10 14:49:06 2014 +

125072: method SwGraphicProperties_Impl::AnyToItemSet(..) - map given 
style name to corresponding UI name before searching for it.

diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index 8fd6b3f..0765c03 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -991,23 +991,24 @@ inline void lcl_FillMirror ( SfxItemSet rToSet, const :: 
SfxItemSet rFromSet,
 }
 }
 
-sal_BoolSwGraphicProperties_Impl::AnyToItemSet(
-SwDoc* pDoc,
-SfxItemSet rFrmSet,
-SfxItemSet rGrSet,
-sal_Bool rSizeFound)
-{
-//Properties fuer alle Frames
-sal_Bool bRet;
-const ::uno::Any *pStyleName;
-SwDocStyleSheet* pStyle = NULL;
+sal_Bool SwGraphicProperties_Impl::AnyToItemSet(
+SwDoc* pDoc,
+SfxItemSet rFrmSet,
+SfxItemSet rGrSet,
+sal_Bool rSizeFound )
+{
+sal_Bool bRet = sal_False;
 
-if ( GetProperty ( FN_UNO_FRAME_STYLE_NAME, 0, pStyleName ) )
+SwDocStyleSheet* pStyle = NULL;
+const ::uno::Any *pStyleName;
+if ( GetProperty( FN_UNO_FRAME_STYLE_NAME, 0, pStyleName ) )
 {
-OUString sStyle;
-*pStyleName = sStyle;
-pStyle = 
(SwDocStyleSheet*)pDoc-GetDocShell()-GetStyleSheetPool()-Find(sStyle,
-SFX_STYLE_FAMILY_FRAME);
+OUString sTmpStylename;
+*pStyleName = sTmpStylename;
+String sStylename;
+SwStyleNameMapper::FillUIName( String(sTmpStylename), sStylename, 
nsSwGetPoolIdFromName::GET_POOLID_FRMFMT, sal_True );
+pStyle =
+(SwDocStyleSheet*) pDoc-GetDocShell()-GetStyleSheetPool()-Find( 
sStylename, SFX_STYLE_FAMILY_FRAME );
 }
 
 const ::uno::Any* pHEvenMirror = 0;
@@ -1017,24 +1018,22 @@ sal_BoolSwGraphicProperties_Impl::AnyToItemSet(
 GetProperty(RES_GRFATR_MIRRORGRF, MID_MIRROR_HORZ_ODD_PAGES, pHOddMirror);
 GetProperty(RES_GRFATR_MIRRORGRF, MID_MIRROR_VERT, pVMirror);
 
-if ( pStyle )
+if ( pStyle != NULL )
 {
 rtl::Reference SwDocStyleSheet  xStyle( new SwDocStyleSheet(*pStyle) 
);
 const :: SfxItemSet *pItemSet = xStyle-GetItemSet();
-//Begin Bug 119922
 sal_Bool bOasis = sal_False;
 {
 const SfxMedium* pMedium = pDoc-GetDocShell()-GetMedium();
-const SfxFilter * pFilter = pMedium
-? pMedium-GetFilter()
-: NULL;
-if ( pMedium  pFilter )
+const SfxFilter * pFilter = pMedium != NULL
+? pMedium-GetFilter()
+: NULL;
+if ( pFilter != NULL )
 {
 bOasis = pFilter-GetVersion()  SOFFICE_FILEFORMAT_60;
 }
 }
 bRet = FillBaseProperties( rFrmSet, *pItemSet, rSizeFound, bOasis );
-//End Bug 119922
 lcl_FillMirror ( rGrSet, *pItemSet, pHEvenMirror, pHOddMirror, 
pVMirror, bRet );
 }
 else
@@ -1044,8 +1043,7 @@ sal_BoolSwGraphicProperties_Impl::AnyToItemSet(
 lcl_FillMirror ( rGrSet, *pItemSet, pHEvenMirror, pHOddMirror, 
pVMirror, bRet );
 }
 
-
-static const :: sal_uInt16 nIDs[] =
+static const ::sal_uInt16 nIDs[] =
 {
 RES_GRFATR_CROPGRF,
 RES_GRFATR_ROTATION,
@@ -1061,14 +1059,14 @@ sal_BoolSwGraphicProperties_Impl::AnyToItemSet(
 0
 };
 const ::uno::Any* pAny;
-for(sal_Int16 nIndex = 0; nIDs[nIndex]; nIndex++)
+for ( sal_Int16 nIndex = 0; nIDs[nIndex]; nIndex++ )
 {
-sal_uInt8 nMId = RES_GRFATR_CROPGRF == nIDs[nIndex] ? CONVERT_TWIPS : 
0;
-if(GetProperty(nIDs[nIndex], nMId, pAny ))
+const sal_uInt8 nMId = RES_GRFATR_CROPGRF == nIDs[nIndex] ? 
CONVERT_TWIPS : 0;
+if ( GetProperty( nIDs[nIndex], nMId, pAny ) )
 {
 SfxPoolItem* pItem = ::GetDfltAttr( nIDs[nIndex] )-Clone();
-bRet = pItem-PutValue(*pAny, nMId );
-rGrSet.Put(*pItem);
+bRet = pItem-PutValue( *pAny, nMId );
+rGrSet.Put( *pItem );
 delete pItem;
 }
 }
@@ -1076,6 +1074,7 @@ sal_BoolSwGraphicProperties_Impl::AnyToItemSet(
 return bRet;
 }
 
+
 class SwOLEProperties_Impl : public SwFrameProperties_Impl
 {
 public:
@@ -1086,17 +1085,22 @@ public:
 virtual sal_BoolAnyToItemSet( SwDoc* pDoc, SfxItemSet rFrmSet, 
SfxItemSet rSet, sal_Bool rSizeFound);
 };
 
-sal_Bool  SwOLEProperties_Impl::AnyToItemSet(
-SwDoc* pDoc, SfxItemSet rFrmSet, SfxItemSet rSet, sal_Bool 
rSizeFound)
+
+sal_Bool SwOLEProperties_Impl::AnyToItemSet(
+SwDoc* pDoc

[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - vcl/win

2014-06-09 Thread Oliver-Rainer Wittmann
 vcl/win/source/gdi/salbmp.cxx |   38 +++---
 1 file changed, 23 insertions(+), 15 deletions(-)

New commits:
commit 8359e277f34d07afd27e714742f0b9e92d6b8b20
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Jun 6 12:07:49 2014 +

Resolves: #i125000# check last status of newly created...

Gdiplus::Bitmap instance before using it.

(cherry picked from commit b127235917610b9c68e19df29bb39af496906569)

Change-Id: I97364cf963424b0e8d0b52b3c995bd4defdca067
(cherry picked from commit adb1bb21f804c62004f31ad5473d4cf447436b9b)
(cherry picked from commit e0c9b690074cd476b03169397cbf1969f2239c1e)
Reviewed-on: https://gerrit.libreoffice.org/9670
Tested-by: David Tardon dtar...@redhat.com
Reviewed-by: David Tardon dtar...@redhat.com

diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx
index f0e1509..3ba430d 100644
--- a/vcl/win/source/gdi/salbmp.cxx
+++ b/vcl/win/source/gdi/salbmp.cxx
@@ -331,24 +331,32 @@ Gdiplus::Bitmap* WinSalBitmap::ImplCreateGdiPlusBitmap()
 
 if(pRetval)
 {
-sal_uInt8* pSrcRGB(pRGB-mpBits);
-const sal_uInt32 nExtraRGB(pRGB-mnScanlineSize - (nW * 3));
-const bool bTopDown(pRGB-mnFormat  BMP_FORMAT_TOP_DOWN);
-const Gdiplus::Rect aAllRect(0, 0, nW, nH);
-Gdiplus::BitmapData aGdiPlusBitmapData;
-pRetval-LockBits(aAllRect, Gdiplus::ImageLockModeWrite, 
PixelFormat24bppRGB, aGdiPlusBitmapData);
-
-// copy data to Gdiplus::Bitmap; format is BGR here in both cases, 
so memcpy is possible
-for(sal_uInt32 y(0); y  nH; y++)
+if ( pRetval-GetLastStatus() == Gdiplus::Ok )
 {
-const sal_uInt32 nYInsert(bTopDown ? y : nH - y - 1);
-sal_uInt8* targetPixels = (sal_uInt8*)aGdiPlusBitmapData.Scan0 
+ (nYInsert * aGdiPlusBitmapData.Stride);
+sal_uInt8* pSrcRGB(pRGB-mpBits);
+const sal_uInt32 nExtraRGB(pRGB-mnScanlineSize - (nW * 3));
+const bool bTopDown(pRGB-mnFormat  BMP_FORMAT_TOP_DOWN);
+const Gdiplus::Rect aAllRect(0, 0, nW, nH);
+Gdiplus::BitmapData aGdiPlusBitmapData;
+pRetval-LockBits(aAllRect, Gdiplus::ImageLockModeWrite, 
PixelFormat24bppRGB, aGdiPlusBitmapData);
+
+// copy data to Gdiplus::Bitmap; format is BGR here in both 
cases, so memcpy is possible
+for(sal_uInt32 y(0); y  nH; y++)
+{
+const sal_uInt32 nYInsert(bTopDown ? y : nH - y - 1);
+sal_uInt8* targetPixels = 
(sal_uInt8*)aGdiPlusBitmapData.Scan0 + (nYInsert * aGdiPlusBitmapData.Stride);
 
-memcpy(targetPixels, pSrcRGB, nW * 3);
-pSrcRGB += nW * 3 + nExtraRGB;
-}
+memcpy(targetPixels, pSrcRGB, nW * 3);
+pSrcRGB += nW * 3 + nExtraRGB;
+}
 
-pRetval-UnlockBits(aGdiPlusBitmapData);
+pRetval-UnlockBits(aGdiPlusBitmapData);
+}
+else
+{
+delete pRetval;
+pRetval = NULL;
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/win

2014-06-06 Thread Oliver-Rainer Wittmann
 vcl/win/source/gdi/salbmp.cxx |   38 +++---
 1 file changed, 23 insertions(+), 15 deletions(-)

New commits:
commit adb1bb21f804c62004f31ad5473d4cf447436b9b
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Jun 6 12:07:49 2014 +

Resolves: #i125000# check last status of newly created...

Gdiplus::Bitmap instance before using it.

(cherry picked from commit b127235917610b9c68e19df29bb39af496906569)

Change-Id: I97364cf963424b0e8d0b52b3c995bd4defdca067

diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx
index 30606d8..445839e 100644
--- a/vcl/win/source/gdi/salbmp.cxx
+++ b/vcl/win/source/gdi/salbmp.cxx
@@ -317,24 +317,32 @@ Gdiplus::Bitmap* WinSalBitmap::ImplCreateGdiPlusBitmap()
 
 if(pRetval)
 {
-sal_uInt8* pSrcRGB(pRGB-mpBits);
-const sal_uInt32 nExtraRGB(pRGB-mnScanlineSize - (nW * 3));
-const bool bTopDown(pRGB-mnFormat  BMP_FORMAT_TOP_DOWN);
-const Gdiplus::Rect aAllRect(0, 0, nW, nH);
-Gdiplus::BitmapData aGdiPlusBitmapData;
-pRetval-LockBits(aAllRect, Gdiplus::ImageLockModeWrite, 
PixelFormat24bppRGB, aGdiPlusBitmapData);
-
-// copy data to Gdiplus::Bitmap; format is BGR here in both cases, 
so memcpy is possible
-for(sal_uInt32 y(0); y  nH; y++)
+if ( pRetval-GetLastStatus() == Gdiplus::Ok )
 {
-const sal_uInt32 nYInsert(bTopDown ? y : nH - y - 1);
-sal_uInt8* targetPixels = (sal_uInt8*)aGdiPlusBitmapData.Scan0 
+ (nYInsert * aGdiPlusBitmapData.Stride);
+sal_uInt8* pSrcRGB(pRGB-mpBits);
+const sal_uInt32 nExtraRGB(pRGB-mnScanlineSize - (nW * 3));
+const bool bTopDown(pRGB-mnFormat  BMP_FORMAT_TOP_DOWN);
+const Gdiplus::Rect aAllRect(0, 0, nW, nH);
+Gdiplus::BitmapData aGdiPlusBitmapData;
+pRetval-LockBits(aAllRect, Gdiplus::ImageLockModeWrite, 
PixelFormat24bppRGB, aGdiPlusBitmapData);
+
+// copy data to Gdiplus::Bitmap; format is BGR here in both 
cases, so memcpy is possible
+for(sal_uInt32 y(0); y  nH; y++)
+{
+const sal_uInt32 nYInsert(bTopDown ? y : nH - y - 1);
+sal_uInt8* targetPixels = 
(sal_uInt8*)aGdiPlusBitmapData.Scan0 + (nYInsert * aGdiPlusBitmapData.Stride);
 
-memcpy(targetPixels, pSrcRGB, nW * 3);
-pSrcRGB += nW * 3 + nExtraRGB;
-}
+memcpy(targetPixels, pSrcRGB, nW * 3);
+pSrcRGB += nW * 3 + nExtraRGB;
+}
 
-pRetval-UnlockBits(aGdiPlusBitmapData);
+pRetval-UnlockBits(aGdiPlusBitmapData);
+}
+else
+{
+delete pRetval;
+pRetval = NULL;
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/win

2014-06-06 Thread Oliver-Rainer Wittmann
 vcl/win/source/gdi/salbmp.cxx |   38 +++---
 1 file changed, 23 insertions(+), 15 deletions(-)

New commits:
commit e0c9b690074cd476b03169397cbf1969f2239c1e
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Jun 6 12:07:49 2014 +

Resolves: #i125000# check last status of newly created...

Gdiplus::Bitmap instance before using it.

(cherry picked from commit b127235917610b9c68e19df29bb39af496906569)

Change-Id: I97364cf963424b0e8d0b52b3c995bd4defdca067
(cherry picked from commit adb1bb21f804c62004f31ad5473d4cf447436b9b)

diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx
index 30606d8..445839e 100644
--- a/vcl/win/source/gdi/salbmp.cxx
+++ b/vcl/win/source/gdi/salbmp.cxx
@@ -317,24 +317,32 @@ Gdiplus::Bitmap* WinSalBitmap::ImplCreateGdiPlusBitmap()
 
 if(pRetval)
 {
-sal_uInt8* pSrcRGB(pRGB-mpBits);
-const sal_uInt32 nExtraRGB(pRGB-mnScanlineSize - (nW * 3));
-const bool bTopDown(pRGB-mnFormat  BMP_FORMAT_TOP_DOWN);
-const Gdiplus::Rect aAllRect(0, 0, nW, nH);
-Gdiplus::BitmapData aGdiPlusBitmapData;
-pRetval-LockBits(aAllRect, Gdiplus::ImageLockModeWrite, 
PixelFormat24bppRGB, aGdiPlusBitmapData);
-
-// copy data to Gdiplus::Bitmap; format is BGR here in both cases, 
so memcpy is possible
-for(sal_uInt32 y(0); y  nH; y++)
+if ( pRetval-GetLastStatus() == Gdiplus::Ok )
 {
-const sal_uInt32 nYInsert(bTopDown ? y : nH - y - 1);
-sal_uInt8* targetPixels = (sal_uInt8*)aGdiPlusBitmapData.Scan0 
+ (nYInsert * aGdiPlusBitmapData.Stride);
+sal_uInt8* pSrcRGB(pRGB-mpBits);
+const sal_uInt32 nExtraRGB(pRGB-mnScanlineSize - (nW * 3));
+const bool bTopDown(pRGB-mnFormat  BMP_FORMAT_TOP_DOWN);
+const Gdiplus::Rect aAllRect(0, 0, nW, nH);
+Gdiplus::BitmapData aGdiPlusBitmapData;
+pRetval-LockBits(aAllRect, Gdiplus::ImageLockModeWrite, 
PixelFormat24bppRGB, aGdiPlusBitmapData);
+
+// copy data to Gdiplus::Bitmap; format is BGR here in both 
cases, so memcpy is possible
+for(sal_uInt32 y(0); y  nH; y++)
+{
+const sal_uInt32 nYInsert(bTopDown ? y : nH - y - 1);
+sal_uInt8* targetPixels = 
(sal_uInt8*)aGdiPlusBitmapData.Scan0 + (nYInsert * aGdiPlusBitmapData.Stride);
 
-memcpy(targetPixels, pSrcRGB, nW * 3);
-pSrcRGB += nW * 3 + nExtraRGB;
-}
+memcpy(targetPixels, pSrcRGB, nW * 3);
+pSrcRGB += nW * 3 + nExtraRGB;
+}
 
-pRetval-UnlockBits(aGdiPlusBitmapData);
+pRetval-UnlockBits(aGdiPlusBitmapData);
+}
+else
+{
+delete pRetval;
+pRetval = NULL;
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - sw/source

2014-06-05 Thread Oliver-Rainer Wittmann
 sw/source/core/crsr/viscrs.cxx|   16 
 sw/source/core/inc/rootfrm.hxx|4 
 sw/source/core/layout/trvlfrm.cxx |  892 ++
 sw/source/ui/wrtsh/wrtsh2.cxx |5 
 4 files changed, 453 insertions(+), 464 deletions(-)

New commits:
commit ec7fc735e031f643e324b0924a1f2ca753cb314d
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Thu Jun 5 10:49:57 2014 +

125050: correct text range for comment/annotation at a table cell selection

diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index 77d16e5..207e553 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -100,7 +100,10 @@ void SwWrtShell::Insert( SwField rFld )
 GetTblCrs()-Normalize( sal_False );
 const SwPosition rStartPos( 
*(GetTblCrs()-GetMark()-nNode.GetNode().GetCntntNode()), 0 );
 KillPams();
-EndPara();
+if ( !IsEndOfPara() )
+{
+EndPara();
+}
 const SwPosition rEndPos( *GetCurrentShellCursor().GetPoint() 
);
 pAnnotationTextRange = new SwPaM( rStartPos, rEndPos );
 }
commit d74e7cd245a570b9bf223424146afc58ce6811ca
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Thu Jun 5 10:37:14 2014 +

125024: minor follow-up to the fix - remove (German) comment

diff --git a/sw/source/core/layout/trvlfrm.cxx 
b/sw/source/core/layout/trvlfrm.cxx
index 998136d..117bc21 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -1982,9 +1982,6 @@ bool SwRootFrm::MakeTblCrsrs( SwTableCursor rTblCrsr )
  * Ende nach links erweitern, bis Frame-Start Rect berechnen
  * und bei mehr als 2 Frames von allen dazwischen liegenden
  * Frames die PrtArea dazu.
- *  4. Wenn es sich um eine Tabellenselektion handelt wird fuer jeden
- * PaM im Ring der CellFrm besorgt, dessen PrtArea wird zu den
- * Rechtecken addiert.
  *
  * Grosser Umbau wg. der FlyFrm; denn diese muessen ausgespart werden.
  * Ausnahmen: - Der Fly in dem die Selektion stattfindet (wenn sie in einem Fly
commit 65f39887f41e701b699fd2e51da803d116766eb8
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Thu Jun 5 10:06:45 2014 +

125024: SwRootFrm::CalcFrmRects(..) - remove code regarding table selection 
as it is not used any more.

diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 62f2072..ac396dd 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -815,13 +815,15 @@ void SwShellCrsr::SetMark()
 void SwShellCrsr::FillRects()
 {
 // die neuen Rechtecke berechnen
-if( HasMark() 
-GetPoint()-nNode.GetNode().IsCntntNode() 
-GetPoint()-nNode.GetNode().GetCntntNode()-getLayoutFrm( 
GetShell()-GetLayout() ) 
-(GetMark()-nNode == GetPoint()-nNode ||
-(GetMark()-nNode.GetNode().IsCntntNode() 
-GetMark()-nNode.GetNode().GetCntntNode()-getLayoutFrm( 
GetShell()-GetLayout() ) )))
-GetShell()-GetLayout()-CalcFrmRects( *this, 
GetShell()-IsTableMode() );  //swmod 071107//swmod 071225
+if ( HasMark()
+  GetPoint()-nNode.GetNode().IsCntntNode()
+  GetPoint()-nNode.GetNode().GetCntntNode()-getLayoutFrm( 
GetShell()-GetLayout() )
+  ( GetMark()-nNode == GetPoint()-nNode
+  || ( GetMark()-nNode.GetNode().IsCntntNode()
+GetMark()-nNode.GetNode().GetCntntNode()-getLayoutFrm( 
GetShell()-GetLayout() ) ) ) )
+{
+GetShell()-GetLayout()-CalcFrmRects( *this );
+}
 }
 
 
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index 073bc99..07bddbd 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -268,9 +268,7 @@ public:
 // next page border
 const SwPageFrm* GetPageAtPos( const Point rPt, const Size* pSize = 0, 
bool bExtend = false ) const;
 
-void CalcFrmRects(
-SwShellCrsr,
-const sal_Bool bIsTblSel );
+void CalcFrmRects( SwShellCrsr );
 
 // Calculates the cells included from the current selection
 // false: There was no result because of an invalid layout
diff --git a/sw/source/core/layout/trvlfrm.cxx 
b/sw/source/core/layout/trvlfrm.cxx
index 945dec2..998136d 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -2006,8 +2006,7 @@ inline void Sub( SwRegionRects rRegion, const SwRect 
rRect )
 }
 
 void SwRootFrm::CalcFrmRects(
-SwShellCrsr rCrsr,
-const sal_Bool bIsTblMode )
+SwShellCrsr rCrsr )
 {
 SwPosition *pStartPos = rCrsr.Start(),
*pEndPos   = rCrsr.GetPoint() == pStartPos ? rCrsr.GetMark() : 
rCrsr.GetPoint();
@@ -2051,523 +2050,513 @@ void SwRootFrm::CalcFrmRects(
 }
 }
 
-//Fall 4: Tabellenselection
-if( bIsTblMode )
-{
-const SwFrm *pCell = pStartFrm

[Libreoffice-commits] core.git: sw/source

2014-06-05 Thread Oliver-Rainer Wittmann
 sw/source/uibase/wrtsh/wrtsh2.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 136cd0f3a55284c28279870369392ad80dffb0f9
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Thu Jun 5 10:49:57 2014 +

Resolves: #i125050# correct text range for comment/annotation...

at a table cell selection

(cherry picked from commit ec7fc735e031f643e324b0924a1f2ca753cb314d)

Change-Id: I51fa9ab0a77ab06e295452216865d0fae44bc263

diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx 
b/sw/source/uibase/wrtsh/wrtsh2.cxx
index e0cf20b..1abb581 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -91,7 +91,10 @@ void SwWrtShell::Insert(SwField rFld)
 GetTblCrs()-Normalize( false );
 const SwPosition rStartPos( 
*(GetTblCrs()-GetMark()-nNode.GetNode().GetCntntNode()), 0 );
 KillPams();
-EndPara();
+if ( !IsEndOfPara() )
+{
+EndPara();
+}
 const SwPosition rEndPos( *GetCurrentShellCursor().GetPoint() 
);
 pAnnotationTextRange = new SwPaM( rStartPos, rEndPos );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svx/source sw/inc sw/source xmloff/source

2014-05-27 Thread Oliver-Rainer Wittmann
 svx/source/svdraw/svdograf.cxx  |8 +---
 sw/inc/ndgrf.hxx|9 ++---
 sw/source/core/graphic/ndgrf.cxx|   18 +-
 sw/source/core/unocore/unoframe.cxx |1 -
 sw/source/filter/xml/xmltexte.cxx   |   10 ++
 xmloff/source/draw/shapeexport.cxx  |   11 +++
 6 files changed, 37 insertions(+), 20 deletions(-)

New commits:
commit 5a48cf8d01454ea6539d6bdc3c8ad7588c50701c
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon May 19 11:37:11 2014 +

various situations where graphic go missing on save

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

(cherry picked from commit 192abfb36b8a4859879fcb49326d59ed62083c8d)

Conflicts:
sw/inc/ndgrf.hxx

Change-Id: I9d4a02af2561467fe1a66f036b55d6dcf2429986

Resolves: #i124946# only apply new embedded stream name...

for a graphic, if is already has one.

- needed correction for the fix made for issue #i114361#

(cherry picked from commit 23a4bd91ceb89e5e0a2413f80fc987db106a0bc9)

Conflicts:
sw/inc/ndgrf.hxx
sw/source/core/graphic/ndgrf.cxx
sw/source/filter/xml/xmltexte.cxx

(cherry picked from commit 05e07167e422caf58d23ff883edda30acc3ba88d)

Conflicts:
sw/inc/ndgrf.hxx
sw/source/core/graphic/ndgrf.cxx

Change-Id: Ia9771932ae5b380ccae9b0a3cbb79d41f5d9bdb8

Resolves: #i124966# keep picture format information

- GfxLink instance - also for the reading of preview picture data

in order to avoid trouble on save in case that the preview data equals the
picture data

(cherry picked from commit d6af1b601bb8fe2569d17e01505f67e1becc9366)

Conflicts:
svx/source/svdraw/svdograf.cxx

(cherry picked from commit 597ae8dd9c28ee370874b219d594fa1c105f2c72)

Conflicts:
svx/source/svdraw/svdograf.cxx

Change-Id: Ifecb07b4d5d33d593502fccd6f21644893027d2d
Reviewed-on: https://gerrit.libreoffice.org/9456
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 30e51f0..0a672d3 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1389,9 +1389,11 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
 {
 pFilterData = new com::sun::star::uno::Sequence 
com::sun::star::beans::PropertyValue ( 3 );
 
-com::sun::star::awt::Size aPreviewSizeHint( 64, 64 );
-sal_Bool bAllowPartialStreamRead = true;
-sal_Bool bCreateNativeLink = false;
+const com::sun::star::awt::Size aPreviewSizeHint( 64, 
64 );
+const sal_Bool bAllowPartialStreamRead = true;
+// create GfxLink instance also for previews in 
order to avoid that its corresponding
+// data is cleared in the graphic cache entry in case 
that the preview data equals the complete graphic data
+const sal_Bool bCreateNativeLink = true;
 (*pFilterData)[ 0 ].Name = PreviewSizeHint;
 (*pFilterData)[ 0 ].Value = aPreviewSizeHint;
 (*pFilterData)[ 1 ].Name = AllowPartialStreamRead;
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index a2687d6..599b6d4 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -74,7 +74,6 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
 
 void InsertLink( const OUString rGrfName, const OUString rFltName );
 sal_Bool ImportGraphic( SvStream rStrm );
-sal_Bool HasStreamName() const { return maGrfObj.HasUserData(); }
 /** adjust return type and rename method to
indicate that its an private one. */
 
@@ -172,8 +171,12 @@ public:
 short SwapIn( sal_Bool bWaitForData = sal_False );
 /// Remove graphic in order to free memory.
 short SwapOut();
-/// Access to storage stream-name.
-void SetStreamName( const OUString r ) { maGrfObj.SetUserData( r ); }
+bool HasEmbeddedStreamName() const { return maGrfObj.HasUserData(); }
+/// 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?
 sal_Bool IsSelected() const;
 
diff --git a/sw/source/core/graphic

[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - svx/source sw/inc sw/source vcl/source xmloff/source

2014-05-27 Thread Oliver-Rainer Wittmann
 svx/source/svdraw/svdograf.cxx  |8 +---
 sw/inc/ndgrf.hxx|9 ++---
 sw/source/core/graphic/ndgrf.cxx|   18 +-
 sw/source/core/unocore/unoframe.cxx |1 -
 sw/source/filter/xml/xmltexte.cxx   |   10 ++
 vcl/source/filter/graphicfilter.cxx |2 +-
 xmloff/source/draw/shapeexport.cxx  |   11 +++
 7 files changed, 38 insertions(+), 21 deletions(-)

New commits:
commit 51bc76f170c8fc71bc37c058c5e6cd1f14b773fb
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon May 19 11:37:11 2014 +

various situations where graphic go missing on save

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
(cherry picked from commit 192abfb36b8a4859879fcb49326d59ed62083c8d)

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
(cherry picked from commit 12dd68e3d20ad36ebe7cb40a600215f6d2b7b6ec)

Resolves: #i124946# only apply new embedded stream name...

for a graphic, if is already has one.

- needed correction for the fix made for issue #i114361#

(cherry picked from commit 23a4bd91ceb89e5e0a2413f80fc987db106a0bc9)

Conflicts:
sw/inc/ndgrf.hxx
sw/source/core/graphic/ndgrf.cxx
sw/source/filter/xml/xmltexte.cxx

Change-Id: Ia9771932ae5b380ccae9b0a3cbb79d41f5d9bdb8
(cherry picked from commit 05e07167e422caf58d23ff883edda30acc3ba88d)

Resolves: #i124966# keep picture format information

- GfxLink instance - also for the reading of preview picture data

in order to avoid trouble on save in case that the preview data equals the
picture data

(cherry picked from commit d6af1b601bb8fe2569d17e01505f67e1becc9366)

Conflicts:
svx/source/svdraw/svdograf.cxx

Change-Id: Ifecb07b4d5d33d593502fccd6f21644893027d2d
(cherry picked from commit 597ae8dd9c28ee370874b219d594fa1c105f2c72)
Reviewed-on: https://gerrit.libreoffice.org/9455
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index df6189d..5a9496f 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1352,9 +1352,11 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
 {
 pFilterData = new com::sun::star::uno::Sequence 
com::sun::star::beans::PropertyValue ( 3 );
 
-com::sun::star::awt::Size aPreviewSizeHint( 64, 64 );
-bool bAllowPartialStreamRead = true;
-bool bCreateNativeLink = false;
+const com::sun::star::awt::Size aPreviewSizeHint( 64, 
64 );
+const bool bAllowPartialStreamRead = true;
+// create GfxLink instance also for previews in 
order to avoid that its corresponding
+// data is cleared in the graphic cache entry in case 
that the preview data equals the complete graphic data
+const bool bCreateNativeLink = true;
 (*pFilterData)[ 0 ].Name = PreviewSizeHint;
 (*pFilterData)[ 0 ].Value = aPreviewSizeHint;
 (*pFilterData)[ 1 ].Name = AllowPartialStreamRead;
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index d5e3ddd..4d97b6a 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -72,7 +72,6 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
 
 void InsertLink( const OUString rGrfName, const OUString rFltName );
 bool ImportGraphic( SvStream rStrm );
-bool HasStreamName() const { return maGrfObj.HasUserData(); }
 /** adjust return type and rename method to
indicate that its an private one. */
 
@@ -174,8 +173,12 @@ 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 ); }
+bool HasEmbeddedStreamName() const { return maGrfObj.HasUserData(); }
+/// applying new stream name for embedded graphic - needed as saving the 
document might change this stream name
+void ApplyNewEmbeddedStreamName(const OUString r

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source

2014-05-23 Thread Oliver-Rainer Wittmann
 sw/source/core/txtnode/txtedt.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a79b8bb279357f9a81fd8bb11a6b2c2be07f5d7a
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri May 23 12:23:40 2014 +

124877: method SwTxtNode::RstTxtAttr(..) - correct refactoring (made for 
issue 123389) causing serious endless loop

diff --git a/sw/source/core/txtnode/txtedt.cxx 
b/sw/source/core/txtnode/txtedt.cxx
index febb5c8..5d0d831 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -640,8 +640,9 @@ void SwTxtNode::RstTxtAttr(
 }
 }
 }
-++i;
 }
+
+++i;
 }
 
 TryDeleteSwpHints();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - svx/source sw/inc sw/source

2014-05-23 Thread Oliver-Rainer Wittmann
 svx/source/svdraw/svdograf.cxx|8 +---
 sw/inc/ndgrf.hxx  |2 +-
 sw/source/core/graphic/ndgrf.cxx  |   37 ++---
 sw/source/filter/xml/xmltexte.cxx |   32 +---
 4 files changed, 37 insertions(+), 42 deletions(-)

New commits:
commit d6af1b601bb8fe2569d17e01505f67e1becc9366
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri May 23 14:50:23 2014 +

124966: keep picture format information - GfxLink instance - also for the 
reading of preview picture data

in order to avoid trouble on save in case that the preview data equals the 
picture data

diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index fc08d4b..b70f12f 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1537,9 +1537,11 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
 {
 pFilterData = new com::sun::star::uno::Sequence 
com::sun::star::beans::PropertyValue ( 3 );
 
-com::sun::star::awt::Size aPreviewSizeHint( 64, 64 );
-sal_Bool bAllowPartialStreamRead = sal_True;
-sal_Bool bCreateNativeLink = sal_False;
+const com::sun::star::awt::Size aPreviewSizeHint( 64, 
64 );
+const sal_Bool bAllowPartialStreamRead = sal_True;
+// create GfxLink instance also for previews in 
order to avoid that its corresponding
+// data is cleared in the graphic cache entry in case 
that the preview data equals the complete graphic data
+const sal_Bool bCreateNativeLink = sal_True;
 (*pFilterData)[ 0 ].Name = String( 
RTL_CONSTASCII_USTRINGPARAM( PreviewSizeHint ) );
 (*pFilterData)[ 0 ].Value = aPreviewSizeHint;
 (*pFilterData)[ 1 ].Name = String( 
RTL_CONSTASCII_USTRINGPARAM( AllowPartialStreamRead ) );
commit 23a4bd91ceb89e5e0a2413f80fc987db106a0bc9
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri May 23 14:28:40 2014 +

124946: only apply new embedded stream name for a graphic, if is already 
has one.

- needed correction for the fix made for issue 114361

diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index 6d59466..c40eb15 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -75,7 +75,6 @@ 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(); }
 void _GetStreamStorageNames( String rStrmName, String rStgName ) const;
 void DelStreamName();
 DECL_LINK( SwapGraphic, GraphicObject* );
@@ -177,6 +176,7 @@ public:
 // Entfernen der Grafik, um Speicher freizugeben
 short SwapOut();
 
+sal_Bool HasEmbeddedStreamName() const { return maGrfObj.HasUserData(); }
 // applying new stream name for embedded graphic - needed as saving the 
document might change this stream name
 void ApplyNewEmbeddedStreamName( const String r )
 {
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index e9c6348..6c42713 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -239,7 +239,7 @@ sal_Bool SwGrfNode::ReRead(
 else if( pGraphic  !rGrfName.Len() )
 {
 // MIB 27.02.2001: Old stream must be deleted before the new one is 
set.
-if( HasStreamName() )
+if( HasEmbeddedStreamName() )
 DelStreamName();
 
 maGrfObj.SetGraphic( *pGraphic );
@@ -249,7 +249,7 @@ sal_Bool SwGrfNode::ReRead(
 else if( pGrfObj  !rGrfName.Len() )
 {
 // MIB 27.02.2001: Old stream must be deleted before the new one is 
set.
-if( HasStreamName() )
+if( HasEmbeddedStreamName() )
 DelStreamName();
 
 maGrfObj = *pGrfObj;
@@ -265,7 +265,7 @@ sal_Bool SwGrfNode::ReRead(
 
 else
 {
-if( HasStreamName() )
+if( HasEmbeddedStreamName() )
 DelStreamName();
 
 // einen neuen Grafik-Link anlegen
@@ -546,21 +546,16 @@ short SwGrfNode::SwapIn( sal_Bool bWaitForData )
 else
 nRet = 1;
 }
-else if( maGrfObj.IsSwappedOut() )
+else if ( maGrfObj.IsSwappedOut() )
 {
 // Die Grafik ist im Storage oder im TempFile drin
-if( !HasStreamName() )
-nRet = (short)maGrfObj.SwapIn();
+if ( !HasEmbeddedStreamName() )
+nRet = (short) maGrfObj.SwapIn();
 else
 {
 
-// -- OD 2005-05-04 #i48434# - usage of new method 
_GetStreamForEmbedGrf(..)
 try
 {
-// -- OD, MAV 2005-08-17 #i53025# - needed correction of new
-// method _GetStreamForEmbedGrf

[Libreoffice-commits] core.git: 2 commits - svx/source sw/inc sw/source

2014-05-23 Thread Oliver-Rainer Wittmann
 svx/source/svdraw/svdograf.cxx|8 +---
 sw/inc/ndgrf.hxx  |2 +-
 sw/source/core/graphic/ndgrf.cxx  |   18 +-
 sw/source/filter/xml/xmltexte.cxx |   11 ++-
 4 files changed, 25 insertions(+), 14 deletions(-)

New commits:
commit 597ae8dd9c28ee370874b219d594fa1c105f2c72
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri May 23 14:50:23 2014 +

Resolves: #i124966# keep picture format information

- GfxLink instance - also for the reading of preview picture data

in order to avoid trouble on save in case that the preview data equals the
picture data

(cherry picked from commit d6af1b601bb8fe2569d17e01505f67e1becc9366)

Conflicts:
svx/source/svdraw/svdograf.cxx

Change-Id: Ifecb07b4d5d33d593502fccd6f21644893027d2d

diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index df6189d..5a9496f 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1352,9 +1352,11 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
 {
 pFilterData = new com::sun::star::uno::Sequence 
com::sun::star::beans::PropertyValue ( 3 );
 
-com::sun::star::awt::Size aPreviewSizeHint( 64, 64 );
-bool bAllowPartialStreamRead = true;
-bool bCreateNativeLink = false;
+const com::sun::star::awt::Size aPreviewSizeHint( 64, 
64 );
+const bool bAllowPartialStreamRead = true;
+// create GfxLink instance also for previews in 
order to avoid that its corresponding
+// data is cleared in the graphic cache entry in case 
that the preview data equals the complete graphic data
+const bool bCreateNativeLink = true;
 (*pFilterData)[ 0 ].Name = PreviewSizeHint;
 (*pFilterData)[ 0 ].Value = aPreviewSizeHint;
 (*pFilterData)[ 1 ].Name = AllowPartialStreamRead;
commit 05e07167e422caf58d23ff883edda30acc3ba88d
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri May 23 14:28:40 2014 +

Resolves: #i124946# only apply new embedded stream name...

for a graphic, if is already has one.

- needed correction for the fix made for issue #i114361#

(cherry picked from commit 23a4bd91ceb89e5e0a2413f80fc987db106a0bc9)

Conflicts:
sw/inc/ndgrf.hxx
sw/source/core/graphic/ndgrf.cxx
sw/source/filter/xml/xmltexte.cxx

Change-Id: Ia9771932ae5b380ccae9b0a3cbb79d41f5d9bdb8

diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index 5292561..4d97b6a 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -72,7 +72,6 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
 
 void InsertLink( const OUString rGrfName, const OUString rFltName );
 bool ImportGraphic( SvStream rStrm );
-bool HasStreamName() const { return maGrfObj.HasUserData(); }
 /** adjust return type and rename method to
indicate that its an private one. */
 
@@ -174,6 +173,7 @@ public:
 bool SwapIn( bool bWaitForData = false );
 /// Remove graphic in order to free memory.
 bool SwapOut();
+bool HasEmbeddedStreamName() const { return maGrfObj.HasUserData(); }
 /// applying new stream name for embedded graphic - needed as saving the 
document might change this stream name
 void ApplyNewEmbeddedStreamName(const OUString r)
 {
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index c868c56..00e383d 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -233,7 +233,7 @@ bool SwGrfNode::ReRead(
 else if( pGraphic  rGrfName.isEmpty() )
 {
 // Old stream must be deleted before the new one is set.
-if( HasStreamName() )
+if( HasEmbeddedStreamName() )
 DelStreamName();
 
 maGrfObj.SetGraphic( *pGraphic );
@@ -243,7 +243,7 @@ bool SwGrfNode::ReRead(
 else if( pGrfObj  rGrfName.isEmpty() )
 {
 // Old stream must be deleted before the new one is set.
-if( HasStreamName() )
+if( HasEmbeddedStreamName() )
 DelStreamName();
 
 maGrfObj = *pGrfObj;
@@ -257,7 +257,7 @@ bool SwGrfNode::ReRead(
 return true;
 else
 {
-if( HasStreamName() )
+if( HasEmbeddedStreamName() )
 DelStreamName();
 
 // create new link for the graphic object
@@ -563,7 +563,7 @@ bool SwGrfNode::SwapIn( bool bWaitForData )
 else if( maGrfObj.IsSwappedOut() )
 {
 // graphic is in storage or in a temp file
-if( !HasStreamName() )
+if( !HasEmbeddedStreamName() )
 {
 bRet = maGrfObj.SwapIn();
 }
@@ -617,7 +617,7 @@ bool SwGrfNode::SwapOut()
 // Swapping is only needed for embedded

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 2 commits - sw/inc sw/source xmloff/source

2014-05-20 Thread Oliver-Rainer Wittmann
 sw/inc/IDocumentMarkAccess.hxx |2 
 sw/inc/doc.hxx |   27 +++-
 sw/source/core/crsr/annotationmark.cxx |1 
 sw/source/core/doc/docbm.cxx   |  189 -
 sw/source/core/doc/doccorr.cxx |   20 +--
 sw/source/core/undo/undobj.cxx |   13 +-
 sw/source/core/unocore/unoobj.cxx  |   72 +++-
 sw/source/ui/docvw/SidebarWin.cxx  |   25 +++-
 sw/source/ui/shells/textfld.cxx|3 
 sw/source/ui/wrtsh/wrtsh2.cxx  |   21 ++-
 xmloff/source/text/txtfldi.cxx |4 
 11 files changed, 246 insertions(+), 131 deletions(-)

New commits:
commit afbf61890a4d5e846c4aa09380d8b641d99ceefd
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Thu Jan 16 11:47:18 2014 +

Resolves: cp#179 i#124030 do not delete UNO mark which are not 
expanded...

and only touch the start of the given range.

(cherry picked from commit ae295f7d009842cdceb50c4daffe948ede2b4b88)

Conflicts:
sw/source/core/doc/docbm.cxx

(cherry picked from commit 4b6b51182a9a600805729313278eb707c6ebfb14)

Change-Id: Id7317eeb8e9c063c9d8b30bca97ed0afee3ec8c5

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 856bbc6..3deaccc 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -50,7 +50,6 @@
 #include edimp.hxx
 #include stdio.h
 
-using namespace ::std;
 using namespace ::boost;
 using namespace ::sw::mark;
 
@@ -58,12 +57,19 @@ namespace
 {
 static bool lcl_GreaterThan( const SwPosition rPos, const SwNodeIndex 
rNdIdx, const SwIndex* pIdx )
 {
-return pIdx ? ( rPos.nNode  rNdIdx || ( rPos.nNode == rNdIdx  
rPos.nContent = pIdx-GetIndex() )) : rPos.nNode = rNdIdx;
+return pIdx != NULL
+   ? ( rPos.nNode  rNdIdx
+   || ( rPos.nNode == rNdIdx
+ rPos.nContent = pIdx-GetIndex() ) )
+   : rPos.nNode = rNdIdx;
 }
 
 static bool lcl_Lower( const SwPosition rPos, const SwNodeIndex rNdIdx, 
const SwIndex* pIdx )
 {
-return rPos.nNode  rNdIdx || ( pIdx  rPos.nNode == rNdIdx  
rPos.nContent  pIdx-GetIndex() );
+return rPos.nNode  rNdIdx
+   || ( pIdx != NULL
+ rPos.nNode == rNdIdx
+ rPos.nContent  pIdx-GetIndex() );
 }
 
 static bool lcl_MarkOrderingByStart(const IDocumentMarkAccess::pMark_t 
rpFirst,
@@ -91,9 +97,9 @@ namespace
 }
 
 SAL_WNODEPRECATED_DECLARATIONS_PUSH
-static inline auto_ptrSwPosition lcl_PositionFromCntntNode(SwCntntNode * 
const pCntntNode, const bool bAtEnd=false)
+static inline ::std::auto_ptrSwPosition 
lcl_PositionFromCntntNode(SwCntntNode * const pCntntNode, const bool 
bAtEnd=false)
 {
-auto_ptrSwPosition pResult(new SwPosition(*pCntntNode));
+::std::auto_ptrSwPosition pResult(new SwPosition(*pCntntNode));
 pResult-nContent.Assign(pCntntNode, bAtEnd ? pCntntNode-Len() : 0);
 return pResult;
 }
@@ -104,7 +110,7 @@ namespace
 // else set it to the end of the node before rStt
 // else set it to the CntntNode of the Pos outside the Range
 SAL_WNODEPRECATED_DECLARATIONS_PUSH
-static inline auto_ptrSwPosition lcl_FindExpelPosition(const 
SwNodeIndex rStt,
+static inline ::std::auto_ptrSwPosition lcl_FindExpelPosition(const 
SwNodeIndex rStt,
 const SwNodeIndex rEnd,
 const SwPosition rOtherPosition)
 {
@@ -118,7 +124,7 @@ namespace
 pNode = rStt.GetNodes().GoPrevious(aStt), bAtEnd = true;
 if(pNode)
 return lcl_PositionFromCntntNode(pNode, bAtEnd);
-return auto_ptrSwPosition(new SwPosition(rOtherPosition));
+return ::std::auto_ptrSwPosition(new SwPosition(rOtherPosition));
 }
 SAL_WNODEPRECATED_DECLARATIONS_POP
 
@@ -149,7 +155,7 @@ namespace
 rMarks.begin(),
 pCandidatesEnd,
 back_inserter(vCandidates),
-boost::bind(logical_notbool(), boost::bind(IMark::EndsBefore, 
_1, rPos)));
+boost::bind( ::std::logical_notbool(), boost::bind( 
IMark::EndsBefore, _1, rPos ) ) );
 // no candidate left = we are in front of the first mark or there are 
none
 if(!vCandidates.size()) return NULL;
 // return the highest (last) candidate using mark end ordering
@@ -630,8 +636,8 @@ namespace sw { namespace mark
 const SwIndex* pSttIdx,
 const SwIndex* pEndIdx )
 {
-vectorconst_iterator_t vMarksToDelete;
-bool isSortingNeeded = false;
+::std::vectorconst_iterator_t vMarksToDelete;
+bool bIsSortingNeeded = false;
 
 // copy all bookmarks in the move area to a vector storing all 
position data as offset
 // reassignment is performed after the move
@@ -646,61 +652,77 @@ namespace sw { namespace mark
 
 ::sw::mark::MarkBase* pMark = dynamic_cast

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - framework/source

2014-04-28 Thread Oliver-Rainer Wittmann
 framework/source/layoutmanager/toolbarlayoutmanager.cxx |   50 +++-
 1 file changed, 36 insertions(+), 14 deletions(-)

New commits:
commit 5ae7fba33ee7095620aca753e9488f1cd9cd41f2
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Apr 28 15:09:35 2014 +

124674: Toolbarmanager: correct show/hide of toolbars (correction of fix 
for issue 124355); correct consideration of hidden toolbars;

diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx 
b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index f267684..9c94679 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -332,6 +332,12 @@ Rectangle ToolbarLayoutManager::implts_calcDockingArea()
 // Note: For each docking area row resp. column only the size of 
largest UIElement is collected.
 for ( UIElementVector::const_iterator pConstIter = 
m_aUIElements.begin(); pConstIter != m_aUIElements.end(); ++pConstIter )
 {
+if ( !pConstIter-m_bVisible
+ || pConstIter-m_bMasterHide )
+{
+continue;
+}
+
 uno::Reference ui::XUIElement  xUIElement( 
pConstIter-m_xUIElement, uno::UNO_QUERY );
 if ( xUIElement.is() )
 {
@@ -340,7 +346,8 @@ Rectangle ToolbarLayoutManager::implts_calcDockingArea()
 if ( xWindow.is()  xDockWindow.is() )
 {
 Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
-if ( pWindow  !xDockWindow-isFloating()  
pConstIter-m_bVisible )
+if ( pWindow != NULL
+  !xDockWindow-isFloating() )
 {
 const awt::Rectangle aPosSize = xWindow-getPosSize();
 insertDockingAreaSize(
@@ -572,9 +579,6 @@ bool ToolbarLayoutManager::implts_setToolbarVisibility(
 {
 implts_setLayoutDirty();
 }
-aUIElement.m_bVisible = bVisible;
-implts_writeWindowStateData( aUIElement );
-implts_setToolbar( aUIElement );
 
 bRet = true;
 }
@@ -586,6 +590,9 @@ bool ToolbarLayoutManager::showToolbar( const 
::rtl::OUString rResourceURL )
 {
 UIElement aUIElement = implts_findToolbar( rResourceURL );
 const bool bRet = implts_setToolbarVisibility( true, aUIElement );
+aUIElement.m_bVisible = true;
+implts_writeWindowStateData( aUIElement );
+implts_setToolbar( aUIElement );
 implts_sortUIElements();
 return bRet;
 }
@@ -594,6 +601,9 @@ bool ToolbarLayoutManager::hideToolbar( const 
::rtl::OUString rResourceURL )
 {
 UIElement aUIElement = implts_findToolbar( rResourceURL );
 const bool bRet = implts_setToolbarVisibility( false, aUIElement );
+aUIElement.m_bVisible = false;
+implts_writeWindowStateData( aUIElement );
+implts_setToolbar( aUIElement );
 implts_sortUIElements();
 return bRet;
 }
@@ -662,8 +672,9 @@ void ToolbarLayoutManager::setVisible( bool bVisible )
 UIElementVector::iterator pIter;
 for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); 
pIter++ )
 {
-pIter-m_bMasterHide = !bVisible;
 implts_setToolbarVisibility( bVisible, *pIter );
+pIter-m_bMasterHide = !bVisible;
+implts_setToolbar( *pIter );
 }
 
 implts_sortUIElements();
@@ -758,16 +769,18 @@ bool ToolbarLayoutManager::dockAllToolbars()
 {
 std::vector ::rtl::OUString  aToolBarNameVector;
 
-::rtl::OUString aElementType;
-::rtl::OUString aElementName;
-
 ReadGuard aReadLock( m_aLock );
 UIElementVector::iterator pIter;
 for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ 
)
 {
-if ( pIter-m_aType.equalsAscii( toolbar )  
pIter-m_xUIElement.is() 
- pIter-m_bFloating  pIter-m_bVisible )
+if ( pIter-m_aType.equalsAscii( toolbar )
+  pIter-m_xUIElement.is()
+  pIter-m_bFloating
+  pIter-m_bVisible
+  !pIter-m_bMasterHide )
+{
 aToolBarNameVector.push_back( pIter-m_aName );
+}
 }
 aReadLock.unlock();
 
@@ -1371,7 +1384,7 @@ uno::Reference ui::XUIElement  
ToolbarLayoutManager::implts_createElement( con
 void ToolbarLayoutManager::implts_setElementData( UIElement rElement, const 
uno::Reference awt::XDockableWindow  rDockWindow )
 {
 ReadGuard aReadLock( m_aLock );
-bool bShowElement( rElement.m_bVisible  !rElement.m_bMasterHide  
implts_isParentWindowVisible() );
+const bool bShowElement( rElement.m_bVisible  !rElement.m_bMasterHide  
implts_isParentWindowVisible() );
 aReadLock.unlock();
 
 uno::Reference awt::XDockableWindow  xDockWindow( rDockWindow );
@@ -2012,7 +2025,10 @@ void 
ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eD
 UIElementVector::iterator   pIter;
 for ( pIter

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - solenv/inc

2014-04-10 Thread Oliver-Rainer Wittmann
 solenv/inc/minor.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit db8e07f2634ef6edc206e99965e9a89b3e14673a
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Thu Apr 10 07:57:12 2014 +

completing 'adapt build meta data for better differentiation to 4.1'

diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk
index 21c4192..397a1e1 100644
--- a/solenv/inc/minor.mk
+++ b/solenv/inc/minor.mk
@@ -19,7 +19,7 @@
 #
 # *
 RSCVERSION=420
-RSCREVISION=410m1(Build:9800)
+RSCREVISION=420m1(Build:9800)
 BUILD=9800
 LAST_MINOR=m1
 SOURCEVERSION=AOO410
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - xmloff/source

2014-04-06 Thread Oliver-Rainer Wittmann
 xmloff/source/text/txtfldi.cxx |   16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 3d038663f44b20efbe10ab9b7149e8e58b648f5f
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Sun Apr 6 08:31:58 2014 +

124607: ODF import: check on certain property existence in annotation 
import to avoid exceptions

diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 3e506fc..090f7fc 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -3760,13 +3760,17 @@ void XMLAnnotationImportContext::EndElement()
 uno::Referencecontainer::XEnumeration 
xFields(xFieldsAccess-createEnumeration());
 while (xFields-hasMoreElements())
 {
-uno::Referencebeans::XPropertySet 
xCurrField(xFields-nextElement(), uno::UNO_QUERY);
-OUString aFieldName;
-xCurrField-getPropertyValue(sPropertyName) = aFieldName;
-if ( aFieldName == aName )
+uno::Reference beans::XPropertySet  
xCurrField(xFields-nextElement(), uno::UNO_QUERY);
+uno::Reference beans::XPropertySetInfo  
xCurrFieldPropInfo = xCurrField-getPropertySetInfo();
+if ( xCurrFieldPropInfo-hasPropertyByName( sPropertyName 
) )
 {
-xPrevField.set( xCurrField, uno::UNO_QUERY );
-break;
+OUString aFieldName;
+xCurrField-getPropertyValue( sPropertyName ) = 
aFieldName;
+if ( aFieldName == aName )
+{
+xPrevField.set( xCurrField, uno::UNO_QUERY );
+break;
+}
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/source

2014-04-01 Thread Oliver-Rainer Wittmann
 vcl/source/gdi/dibtools.cxx |   13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit cc1a7748c867716966b6a38e75f89df5d92ee104
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Mar 31 14:37:21 2014 +

Resolves: #i124555# restore stream position after Seek to end of stream

(cherry picked from commit 61efddf5ab8cd318e022ca1ac817ba0879a55e23)

Conflicts:
vcl/source/gdi/dibtools.cxx

Change-Id: Ie6c0aeab5988b68954a0bdd460317ac9539d8a5f

diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 1ffdcd9..5d71a46 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -766,17 +766,18 @@ bool ImplReadDIBBody( SvStream rIStm, Bitmap rBmp, 
Bitmap* pBmpAlpha, sal_uLon
 
 bool ImplReadDIBFileHeader( SvStream rIStm, sal_uLong rOffset )
 {
-sal_uInt32  nTmp32;
-sal_uInt16  nTmp16 = 0;
-boolbRet = false;
+bool bRet = false;
 
-const sal_uLong nStreamLength (rIStm.Seek(STREAM_SEEK_TO_END));
-rIStm.Seek(STREAM_SEEK_TO_BEGIN);
+const sal_uInt64 nSavedStreamPos( rIStm.Tell() );
+const sal_uInt64 nStreamLength( rIStm.Seek( STREAM_SEEK_TO_END ) );
+rIStm.Seek( nSavedStreamPos );
 
+sal_uInt16 nTmp16 = 0;
 rIStm.ReadUInt16( nTmp16 );
 
 if ( ( 0x4D42 == nTmp16 ) || ( 0x4142 == nTmp16 ) )
 {
+sal_uInt32 nTmp32(0);
 if ( 0x4142 == nTmp16 )
 {
 rIStm.SeekRel( 12L );
@@ -794,7 +795,7 @@ bool ImplReadDIBFileHeader( SvStream rIStm, sal_uLong 
rOffset )
 bRet = ( rIStm.GetError() == 0UL );
 }
 
-if (rOffset = nStreamLength)
+if ( rOffset = nStreamLength )
 {
 // Offset claims that image starts past the end of the
 // stream.  Unlikely.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - vcl/source

2014-04-01 Thread Oliver-Rainer Wittmann
 vcl/source/gdi/dibtools.cxx |   13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 172c33146d7e8b4f741d52ab7c9dfdb55c847401
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Mar 31 14:37:21 2014 +

Resolves: #i124555# restore stream position after Seek to end of stream

(cherry picked from commit 61efddf5ab8cd318e022ca1ac817ba0879a55e23)

Conflicts:
vcl/source/gdi/dibtools.cxx

(cherry picked from commit cc1a7748c867716966b6a38e75f89df5d92ee104)

Conflicts:
vcl/source/gdi/dibtools.cxx

Change-Id: Ie6c0aeab5988b68954a0bdd460317ac9539d8a5f

diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index dac2c8c..2759c20 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -781,17 +781,18 @@ bool ImplReadDIBBody( SvStream rIStm, Bitmap rBmp, 
Bitmap* pBmpAlpha, sal_uLon
 
 bool ImplReadDIBFileHeader( SvStream rIStm, sal_uLong rOffset )
 {
-sal_uInt32  nTmp32;
-sal_uInt16  nTmp16 = 0;
-boolbRet = false;
+bool bRet = false;
 
-const sal_uLong nStreamLength (rIStm.Seek(STREAM_SEEK_TO_END));
-rIStm.Seek(STREAM_SEEK_TO_BEGIN);
+const sal_Size nSavedStreamPos( rIStm.Tell() );
+const sal_Size nStreamLength( rIStm.Seek( STREAM_SEEK_TO_END ) );
+rIStm.Seek( nSavedStreamPos );
 
+sal_uInt16 nTmp16 = 0;
 rIStm  nTmp16;
 
 if ( ( 0x4D42 == nTmp16 ) || ( 0x4142 == nTmp16 ) )
 {
+sal_uInt32 nTmp32(0);
 if ( 0x4142 == nTmp16 )
 {
 rIStm.SeekRel( 12L );
@@ -809,7 +810,7 @@ bool ImplReadDIBFileHeader( SvStream rIStm, sal_uLong 
rOffset )
 bRet = ( rIStm.GetError() == 0UL );
 }
 
-if (rOffset = nStreamLength)
+if ( rOffset = nStreamLength )
 {
 // Offset claims that image starts past the end of the
 // stream.  Unlikely.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source

2014-03-31 Thread Oliver-Rainer Wittmann
 vcl/source/gdi/dibtools.cxx |   13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 61efddf5ab8cd318e022ca1ac817ba0879a55e23
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Mar 31 14:37:21 2014 +

124555: restore stream position after Seek to end of stream

diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 3aa5df4..d4ea127 100755
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -775,17 +775,18 @@ bool ImplReadDIBBody( SvStream rIStm, Bitmap rBmp, 
Bitmap* pBmpAlpha, sal_uLon
 
 bool ImplReadDIBFileHeader( SvStream rIStm, sal_uLong rOffset )
 {
-sal_uInt32  nTmp32;
-sal_uInt16  nTmp16 = 0;
-boolbRet = false;
+bool bRet = false;
 
-const sal_Int64 nStreamLength (rIStm.Seek(STREAM_SEEK_TO_END));
-rIStm.Seek(STREAM_SEEK_TO_BEGIN);
+const sal_Int64 nSavedStreamPos( rIStm.Tell() );
+const sal_Int64 nStreamLength( rIStm.Seek( STREAM_SEEK_TO_END ) );
+rIStm.Seek( nSavedStreamPos );
 
+sal_uInt16 nTmp16 = 0;
 rIStm  nTmp16;
 
 if ( ( 0x4D42 == nTmp16 ) || ( 0x4142 == nTmp16 ) )
 {
+sal_uInt32 nTmp32;
 if ( 0x4142 == nTmp16 )
 {
 rIStm.SeekRel( 12L );
@@ -803,7 +804,7 @@ bool ImplReadDIBFileHeader( SvStream rIStm, sal_uLong 
rOffset )
 bRet = ( rIStm.GetError() == 0UL );
 }
 
-if (rOffset = nStreamLength)
+if ( rOffset = nStreamLength )
 {
 // Offset claims that image starts past the end of the
 // stream.  Unlikely.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2014-03-28 Thread Oliver-Rainer Wittmann
 sw/source/core/uibase/docvw/SidebarWin.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 1ffa910582f6470af2e5ee337270dc9269436235
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Wed Mar 26 13:52:38 2014 +

Resolves: #i124514# show/hide Overlay object to highlight...

annotated text range according the according view option which show/hides 
the
annotations/comments

(cherry picked from commit b8c793949e416432619d3c7d7611fc44694c3b77)

Conflicts:
sw/source/core/uibase/docvw/SidebarWin.cxx

Change-Id: I0701ee137317349c5d917841448c183015d5513a

diff --git a/sw/source/core/uibase/docvw/SidebarWin.cxx 
b/sw/source/core/uibase/docvw/SidebarWin.cxx
index 4a37bf2..fb78b3b 100644
--- a/sw/source/core/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/core/uibase/docvw/SidebarWin.cxx
@@ -573,7 +573,8 @@ void SwSidebarWin::SetPosAndSize()
 }
 
 // text range overlay
-if ( mrSidebarItem.maLayoutInfo.mnStartNodeIdx != 0
+if ( mrMgr.ShowNotes()
+  mrSidebarItem.maLayoutInfo.mnStartNodeIdx != 0
   mrSidebarItem.maLayoutInfo.mnStartContent != -1 )
 {
 std::vector basegfx::B2DRange  aAnnotationTextRanges;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/inc sw/source

2014-03-28 Thread Oliver-Rainer Wittmann
 sw/inc/tox.hxx   |   19 --
 sw/source/core/tox/tox.cxx   |   69 +--
 sw/source/filter/ww8/ww8par5.cxx |   28 ---
 3 files changed, 39 insertions(+), 77 deletions(-)

New commits:
commit f5c174ac30060db5b5aec2e9764f04252b64966e
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Mar 28 11:13:57 2014 +

Resolves: #i124451# apply correct index entry template patterns...

which are used for e.g. TOC

(cherry picked from commit 52c89c2aff23dbb875c9a86021145b30af463908)

Conflicts:
sw/inc/tox.hxx
sw/source/core/tox/tox.cxx
sw/source/filter/ww8/ww8par5.cxx

Change-Id: Id14cecc07d09d3461c091a6451143cbce206e308

diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index a3108fb..360f1d4 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -348,10 +348,8 @@ public:
 voidSetPattern(sal_uInt16 nLevel, const OUString rStr);
 const SwFormTokens GetPattern(sal_uInt16 nLevel) const;
 
-// fill tab stop positions from template to pattern
-// #i21237#
-voidAdjustTabStops(SwDoc rDoc,
-   sal_Bool bInsertNewTabStops = 
sal_False);
+// fill tab stop positions from template to pattern- #i21237#
+void AdjustTabStops( SwDoc rDoc );
 
 inline TOXTypes GetTOXType() const;
 inline sal_uInt16   GetFormMax() const;
@@ -565,8 +563,12 @@ public:
 OUStringGetSortAlgorithm()const {return sSortAlgorithm;}
 voidSetSortAlgorithm(const OUString rSet) {sSortAlgorithm = 
rSet;}
 // #i21237#
-void AdjustTabStops(SwDoc  rDoc, sal_Bool bDefaultRightTabStop);
-SwTOXBase  operator=(const SwTOXBase rSource);
+void AdjustTabStops( SwDoc  rDoc )
+{
+aForm.AdjustTabStops( rDoc );
+}
+
+SwTOXBase operator=(const SwTOXBase rSource);
 void RegisterToTOXType( SwTOXType rMark );
 };
 
@@ -734,11 +736,6 @@ inline OUString SwTOXBase::GetTypeName() const
 inline const SwForm SwTOXBase::GetTOXForm() const
 { return aForm; }
 
-inline void SwTOXBase::AdjustTabStops(SwDoc  rDoc, sal_Bool 
bDefaultRightTabStop)
-{
-aForm.AdjustTabStops(rDoc, bDefaultRightTabStop);
-}
-
 inline void SwTOXBase::SetCreate(sal_uInt16 nCreate)
 { nCreateType = nCreate; }
 
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index e4a5964..1fac01f 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -406,76 +406,53 @@ bool operator == (const SwFormToken  rToken, 
FormTokenType eType)
 return rToken.eTokenType == eType;
 }
 
-void SwForm::AdjustTabStops(SwDoc rDoc, sal_Bool bInsertNewTapStops) // 
#i21237#
+void SwForm::AdjustTabStops( SwDoc rDoc ) // #i21237#
 {
 for(sal_uInt16 nLevel = 1; nLevel  GetFormMax(); nLevel++)
 {
 const OUString sTemplateName = GetTemplate(nLevel);
 
 SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( sTemplateName );
-if( !pColl )
+if( pColl == NULL )
 {
-sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName
-( sTemplateName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); 
// #i21237#
-if( USHRT_MAX != nId )
+const sal_uInt16 nId =
+SwStyleNameMapper::GetPoolIdFromUIName( sTemplateName, 
nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
+if ( USHRT_MAX != nId )
 pColl = rDoc.GetTxtCollFromPool( nId );
 }
 
-const SvxTabStopItem* pTabStops = 0;
-sal_uInt16 nTabCount = 0;
-if( pColl 
-0 != ( pTabStops = pColl-GetTabStops(sal_False) ) 
-0 != ( nTabCount = pTabStops-Count() ) )
+const SvxTabStopItem* pTabStops = pColl != NULL ? 
pColl-GetTabStops(sal_False) : 0;
+const sal_uInt16 nTabCount = pTabStops != NULL ? pTabStops-Count() : 
0;
+if( pTabStops != NULL
+ nTabCount != 0 )
 {
-// #i21237#
 SwFormTokens aCurrentPattern = GetPattern(nLevel);
 SwFormTokens::iterator aIt = aCurrentPattern.begin();
 
 bool bChanged = false;
-
 for(sal_uInt16 nTab = 0; nTab  nTabCount; ++nTab)
 {
 const SvxTabStop rTab = (*pTabStops)[nTab];
 
-// #i29178#
-// For Word import, we do not want to replace existing tokens,
-// we insert new tabstop tokens without a tabstop character:
-if ( bInsertNewTapStops )
+aIt = find_if( aIt, aCurrentPattern.end(), 
SwFormTokenEqualToFormTokenType(TOKEN_TAB_STOP) );
+if ( aIt != aCurrentPattern.end() )
 {
-if ( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() )
-{
-bChanged = true;
-SwFormToken aToken(TOKEN_TAB_STOP);
-aToken.bWithTab = sal_False

[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/source

2014-03-22 Thread Oliver-Rainer Wittmann
 sw/source/core/text/inftxt.hxx |1 -
 sw/source/core/text/portxt.cxx |   10 ++
 2 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 835b0bec8d6b20382dd665ea8806de474602f0d0
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Jan 20 10:57:12 2014 +

fdo#76235 #i124039# assure correct line break for multi-lined Input Fields

(cherry picked from commit 14e0270c3ebad9a1fb817fcfced2aa8ee2f3e3f0)

(cherry picked from commit 6789e6de929c7685cf1573170534891aeffe5fa1)
Signed-off-by: Andras Timar andras.ti...@collabora.com

Change-Id: If5664a5260e683cd5a80885b3f39b04f85de8db9

diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index d4f19dd..2127221 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -597,7 +597,6 @@ public:
 inline void Right( const SwTwips nNew ) { nRight = nNew; }
 inline SwTwips First() const { return nFirst; }
 inline void First( const SwTwips nNew ) { nFirst = nNew; }
-inline SwTwips CurrLeft() const { return (nLineStart ? nLeft : nFirst); }
 inline KSHORT RealWidth() const { return nRealWidth; }
 inline void RealWidth( const KSHORT nNew ) { nRealWidth = nNew; }
 inline KSHORT ForcedLeftMargin() const { return nForcedLeftMargin; }
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 6d6c94a..68a290bd 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -733,6 +733,12 @@ sal_Bool SwTxtInputFldPortion::Format( SwTxtFormatInfo 
rInf )
 }
 else
 {
+const sal_Int32 nFormerLineStart = rInf.GetLineStart();
+if ( !mbContainsInputFieldStart )
+{
+rInf.SetLineStart( 0 );
+}
+
 bRet = SwTxtPortion::Format( rInf );
 
 if ( mbContainsInputFieldEnd )
@@ -749,6 +755,10 @@ sal_Bool SwTxtInputFldPortion::Format( SwTxtFormatInfo 
rInf )
 // adjust portion length accordingly
 SetLen( GetLen() + 1 );
 }
+else
+{
+rInf.SetLineStart( nFormerLineStart );
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source

2014-03-21 Thread Oliver-Rainer Wittmann
 sw/source/core/unocore/unofield.cxx |   21 -
 1 file changed, 16 insertions(+), 5 deletions(-)

New commits:
commit fc0c91c2d00157cb02cbe7b1d09cb950762e8145
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Mar 21 12:32:09 2014 +

124474: on change of User Field via UNO-API trigger update to get dependent 
Input Fields updated.

diff --git a/sw/source/core/unocore/unofield.cxx 
b/sw/source/core/unocore/unofield.cxx
index 423dd7c..ea9ef00 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -540,18 +540,29 @@ void SwXFieldMaster::setPropertyValue( const OUString 
rPropertyName,
 }
 }
 }
-if( bSetValue )
+if ( bSetValue )
 {
 // nothing special to be done here for the properties
 // UNO_NAME_DATA_BASE_NAME and UNO_NAME_DATA_BASE_URL.
 // We just call PutValue (empty string is allowed).
 // Thus the last property set will be used as Data Source.
 
-sal_uInt16 nMId = GetFieldTypeMId( rPropertyName, *pType  );
-if( USHRT_MAX != nMId )
-pType-PutValue( rValue, nMId );
+const sal_uInt16 nMemberValueId = GetFieldTypeMId( rPropertyName, 
*pType );
+if ( USHRT_MAX != nMemberValueId )
+{
+pType-PutValue( rValue, nMemberValueId );
+if ( pType-Which() == RES_USERFLD )
+{
+// trigger update of User field in order to get depending 
Input Fields updated.
+pType-UpdateFlds();
+}
+}
 else
-throw beans::UnknownPropertyException(OUString ( 
RTL_CONSTASCII_USTRINGPARAM ( Unknown property:  ) ) + rPropertyName, 
static_cast  cppu::OWeakObject *  ( this ) );
+{
+throw beans::UnknownPropertyException(
+OUString( RTL_CONSTASCII_USTRINGPARAM( Unknown property: 
 ) ) + rPropertyName,
+static_cast cppu::OWeakObject * ( this ) );
+}
 }
 }
 else if(!pType  m_pDoc 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2014-03-21 Thread Oliver-Rainer Wittmann
 sw/source/core/unocore/unofield.cxx |   21 -
 1 file changed, 16 insertions(+), 5 deletions(-)

New commits:
commit 40c8121fbeb89403418a90c77b88d13ad268d347
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Mar 21 12:32:09 2014 +

Resolves: #i124474# on change of User Field via UNO-API...

trigger update to get dependent Input Fields updated.

(cherry picked from commit fc0c91c2d00157cb02cbe7b1d09cb950762e8145)

Conflicts:
sw/source/core/unocore/unofield.cxx

Change-Id: I0ead765729c93992103baca53924b7a127936b38

diff --git a/sw/source/core/unocore/unofield.cxx 
b/sw/source/core/unocore/unofield.cxx
index 044dcb1..a416963 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -577,18 +577,29 @@ throw (beans::UnknownPropertyException, 
beans::PropertyVetoException,
 }
 }
 }
-if( bSetValue )
+if ( bSetValue )
 {
 // nothing special to be done here for the properties
 // UNO_NAME_DATA_BASE_NAME and UNO_NAME_DATA_BASE_URL.
 // We just call PutValue (empty string is allowed).
 // Thus the last property set will be used as Data Source.
 
-sal_uInt16 nMId = GetFieldTypeMId( rPropertyName, *pType  );
-if( USHRT_MAX != nMId )
-pType-PutValue( rValue, nMId );
+const sal_uInt16 nMemberValueId = GetFieldTypeMId( rPropertyName, 
*pType );
+if ( USHRT_MAX != nMemberValueId )
+{
+pType-PutValue( rValue, nMemberValueId );
+if ( pType-Which() == RES_USERFLD )
+{
+// trigger update of User field in order to get depending 
Input Fields updated.
+pType-UpdateFlds();
+}
+}
 else
-throw beans::UnknownPropertyException(OUString( Unknown 
property:  ) + rPropertyName, static_cast  cppu::OWeakObject *  ( this ) );
+{
+throw beans::UnknownPropertyException(
+OUString( Unknown property:  ) + rPropertyName,
+static_cast cppu::OWeakObject * ( this ) );
+}
 }
 }
 else if (!pType  m_pImpl-m_pDoc  rPropertyName == UNO_NAME_NAME)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/source

2014-03-21 Thread Oliver-Rainer Wittmann
 sw/source/core/unocore/unofield.cxx |   21 -
 1 file changed, 16 insertions(+), 5 deletions(-)

New commits:
commit 3d53b2730eeabd06dfd6ad183c1d12b15836b777
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Mar 21 12:32:09 2014 +

Resolves: fdo#75728 #i124474# on change of User Field via UNO-API...

trigger update to get dependent Input Fields updated.

(cherry picked from commit 40c8121fbeb89403418a90c77b88d13ad268d347)
Signed-off-by: Andras Timar andras.ti...@collabora.com

Change-Id: I0ead765729c93992103baca53924b7a127936b38

diff --git a/sw/source/core/unocore/unofield.cxx 
b/sw/source/core/unocore/unofield.cxx
index f49595c..ccca8f4 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -583,18 +583,29 @@ throw (beans::UnknownPropertyException, 
beans::PropertyVetoException,
 }
 }
 }
-if( bSetValue )
+if ( bSetValue )
 {
 // nothing special to be done here for the properties
 // UNO_NAME_DATA_BASE_NAME and UNO_NAME_DATA_BASE_URL.
 // We just call PutValue (empty string is allowed).
 // Thus the last property set will be used as Data Source.
 
-sal_uInt16 nMId = GetFieldTypeMId( rPropertyName, *pType  );
-if( USHRT_MAX != nMId )
-pType-PutValue( rValue, nMId );
+const sal_uInt16 nMemberValueId = GetFieldTypeMId( rPropertyName, 
*pType );
+if ( USHRT_MAX != nMemberValueId )
+{
+pType-PutValue( rValue, nMemberValueId );
+if ( pType-Which() == RES_USERFLD )
+{
+// trigger update of User field in order to get depending 
Input Fields updated.
+pType-UpdateFlds();
+}
+}
 else
-throw beans::UnknownPropertyException(OUString( Unknown 
property:  ) + rPropertyName, static_cast  cppu::OWeakObject *  ( this ) );
+{
+throw beans::UnknownPropertyException(
+OUString( Unknown property:  ) + rPropertyName,
+static_cast cppu::OWeakObject * ( this ) );
+}
 }
 }
 else if (!pType  m_pImpl-m_pDoc 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - jvmfwk/source svtools/source

2014-03-18 Thread Oliver-Rainer Wittmann
 jvmfwk/source/framework.cxx |2 ++
 svtools/source/edit/svmedit.cxx |   22 +++---
 2 files changed, 17 insertions(+), 7 deletions(-)

New commits:
commit f5185b2b078a6ce4b1c478c2a041f99c93826bdc
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Mar 18 09:16:21 2014 +

124427: TextWindow/MultiLineEdit::GetFocus() - call parent class' method 
to assure corresponding notifications and listener calls

This reverts a change made for the IA2 integration

diff --git a/svtools/source/edit/svmedit.cxx b/svtools/source/edit/svmedit.cxx
index b5ee591..5f1cbf9 100644
--- a/svtools/source/edit/svmedit.cxx
+++ b/svtools/source/edit/svmedit.cxx
@@ -941,13 +941,17 @@ void TextWindow::Command( const CommandEvent rCEvt )
 
 void TextWindow::GetFocus()
 {
-//Window::GetFocus();
+Window::GetFocus();
+
 if ( !mbActivePopup )
 {
 sal_Bool bGotoCursor = !mpExtTextView-IsReadOnly();
-if ( mbFocusSelectionHide  IsReallyVisible()  
!mpExtTextView-IsReadOnly()
- ( mbSelectOnTab 
-(!mbInMBDown || ( 
GetSettings().GetStyleSettings().GetSelectionOptions()  SELECTION_OPTION_FOCUS 
) )) )
+if ( mbFocusSelectionHide
+  IsReallyVisible()
+  !mpExtTextView-IsReadOnly()
+  ( mbSelectOnTab
+   ( !mbInMBDown
+   || ( 
GetSettings().GetStyleSettings().GetSelectionOptions()  SELECTION_OPTION_FOCUS 
) ) ) )
 {
 // Alles selektieren, aber nicht scrollen
 sal_Bool bAutoScroll = mpExtTextView-IsAutoScroll();
@@ -961,6 +965,7 @@ void TextWindow::GetFocus()
 }
 }
 
+
 void TextWindow::LoseFocus()
 {
 Window::LoseFocus();
@@ -969,6 +974,7 @@ void TextWindow::LoseFocus()
 mpExtTextView-SetPaintSelection( sal_False );
 }
 
+
 // virtual
 ::css::uno::Reference ::css::awt::XWindowPeer 
 TextWindow::GetComponentInterface(sal_Bool bCreate)
@@ -1246,13 +1252,15 @@ void MultiLineEdit::Resize()
 
 void MultiLineEdit::GetFocus()
 {
-if ( !pImpSvMEdit )  // might be called from within the dtor, when 
pImpSvMEdit == NULL is a valid state
+if ( pImpSvMEdit == NULL )  // might be called from within the dtor, when 
pImpSvMEdit == NULL is a valid state
 return;
-//Disable the focused event on scroll pane
-//Edit::GetFocus();
+
+Edit::GetFocus();
+
 pImpSvMEdit-GetFocus();
 }
 
+
 void MultiLineEdit::SetSelection( const Selection rSelection )
 {
 pImpSvMEdit-SetSelection( rSelection );
commit 7f8afd52810d57a1c325f3e54a299d23a5a608b5
Author: Jürgen Schmidt j...@apache.org
Date:   Tue Mar 18 08:24:41 2014 +

#124442# merge from beta branch, special handling of nRequirements flag on 
MacOS when comparing JavaInfo

diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 581d378..88d5f00 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -644,7 +644,9 @@ sal_Bool SAL_CALL jfw_areEqualJavaInfo(
  sLocation.equals(pInfoB-sLocation) == sal_True
  sVersion.equals(pInfoB-sVersion) == sal_True
  pInfoA-nFeatures == pInfoB-nFeatures
+#ifndef MACOSX
  pInfoA-nRequirements == pInfoB-nRequirements
+#endif
  sData == pInfoB-arVendorData)
 {
 return sal_True;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - writerfilter/source

2014-03-11 Thread Oliver-Rainer Wittmann
 writerfilter/source/dmapper/DomainMapper.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 5d534ad732a8500466f495a527ab63322361f47a
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Feb 25 13:16:12 2014 +

Related: #i124106# correct handling of page break attributes

i.e. those which are providing the default value explicitly

(cherry picked from commit 5a15ef3da683566d7bd443f96eeec3a9a3f70aeb)

Conflicts:
writerfilter/source/dmapper/DomainMapper.cxx
writerfilter/source/dmapper/PropertyMap.cxx

(cherry picked from commit c30fb7d7269b5bdd1853ac22120f57aa2bfd13a5)

Change-Id: Ib8721f2fce060d26ee75b0515b3bf62a603fd40c
Signed-off-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index dfcf3a7..a9474a6 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1517,7 +1517,7 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 bool bExchangeLeftRight = false;
 Value::Pointer_t pValue = rSprm.getValue();
 sal_Int32 nIntValue = pValue-getInt();
-OUString sStringValue = pValue-getString();
+const OUString sStringValue = pValue-getString();
 PropertyNameSupplier rPropNameSupplier = 
PropertyNameSupplier::GetPropertyNameSupplier();
 
 switch(nSprmId)
@@ -1544,7 +1544,10 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 rContext-Insert(PROP_PARA_KEEP_TOGETHER, true, uno::makeAny( 
nIntValue ? true : false) );
 break;
 case NS_sprm::LN_PFPageBreakBefore:
-rContext-Insert(PROP_BREAK_TYPE, true, uno::makeAny( 
com::sun::star::style::BreakType_PAGE_BEFORE ) );
+if ( nIntValue == 1 )
+{
+rContext-Insert(PROP_BREAK_TYPE, true, uno::makeAny( 
com::sun::star::style::BreakType_PAGE_BEFORE ) );
+}
 break;  // sprmPFPageBreakBefore
 case NS_sprm::LN_PBrcl:
 break;  // sprmPBrcl
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - writerfilter/source

2014-03-11 Thread Oliver-Rainer Wittmann
 writerfilter/source/dmapper/DomainMapper.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 04f8c446c14a4a2b358fc48d9cdb7dd0af19ce7a
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Feb 25 13:16:12 2014 +

Related: #i124106# correct handling of page break attributes

i.e. those which are providing the default value explicitly

(cherry picked from commit 5a15ef3da683566d7bd443f96eeec3a9a3f70aeb)

Conflicts:
writerfilter/source/dmapper/DomainMapper.cxx
writerfilter/source/dmapper/PropertyMap.cxx

(cherry picked from commit c30fb7d7269b5bdd1853ac22120f57aa2bfd13a5)

Change-Id: Ib8721f2fce060d26ee75b0515b3bf62a603fd40c
Signed-off-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index dfbc4a7..f51a026 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1520,7 +1520,7 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 bool bExchangeLeftRight = false;
 Value::Pointer_t pValue = rSprm.getValue();
 sal_Int32 nIntValue = pValue-getInt();
-OUString sStringValue = pValue-getString();
+const OUString sStringValue = pValue-getString();
 PropertyNameSupplier rPropNameSupplier = 
PropertyNameSupplier::GetPropertyNameSupplier();
 
 switch(nSprmId)
@@ -1547,7 +1547,10 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 rContext-Insert(PROP_PARA_KEEP_TOGETHER, true, uno::makeAny( 
nIntValue ? true : false) );
 break;
 case NS_sprm::LN_PFPageBreakBefore:
-rContext-Insert(PROP_BREAK_TYPE, true, uno::makeAny( 
com::sun::star::style::BreakType_PAGE_BEFORE ) );
+if ( nIntValue == 1 )
+{
+rContext-Insert(PROP_BREAK_TYPE, true, uno::makeAny( 
com::sun::star::style::BreakType_PAGE_BEFORE ) );
+}
 break;  // sprmPFPageBreakBefore
 case NS_sprm::LN_PBrcl:
 break;  // sprmPBrcl
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - framework/source instsetoo_native/util

2014-03-10 Thread Oliver-Rainer Wittmann
 framework/source/layoutmanager/toolbarlayoutmanager.cxx |  235 +++-
 framework/source/layoutmanager/toolbarlayoutmanager.hxx |1 
 instsetoo_native/util/openoffice.lst|8 
 3 files changed, 118 insertions(+), 126 deletions(-)

New commits:
commit 69dbe9b758a4b095d878e76d58300ee3ec4f9584
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Mar 10 09:45:00 2014 +

provide intermediate UpdateURL for current trunk

diff --git a/instsetoo_native/util/openoffice.lst 
b/instsetoo_native/util/openoffice.lst
old mode 100644
new mode 100755
index 2017ef0..e2e8401
--- a/instsetoo_native/util/openoffice.lst
+++ b/instsetoo_native/util/openoffice.lst
@@ -70,7 +70,7 @@ Apache_OpenOffice
 ABOUTBOXPRODUCTVERSION 4.1.0
 BASEPRODUCTVERSION 4.1
 PCPFILENAME openoffice.pcp
-UPDATEURL https://ooo-updates.apache.org/aoo410/check.Update
+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
@@ -129,7 +129,7 @@ Apache_OpenOffice_wJRE
 USERDIRPRODUCTVERSION 4
 ABOUTBOXPRODUCTVERSION 4.1.0
 BASEPRODUCTVERSION 4.1
-UPDATEURL https://ooo-updates.apache.org/aoo410/check.Update
+UPDATEURL https://ooo-updates.apache.org/aoonext/check.Update
 ADD_INCLUDE_FILES 
cliureversion.mk,clioootypesversion.mk,javaversion2.dat,userland.txt,version.lst
 REMOVE_UPGRADE_CODE_FILE upgradecode_remove_ooo.txt
 ADDSYSTEMINTEGRATION 1
@@ -196,7 +196,7 @@ Apache_OpenOffice_Dev
 UREPACKAGEPREFIX aoodev
 SOLSUREPACKAGEPREFIX aoodev
 REGISTRYLAYERNAME LayerDev
-UPDATEURL https://ooo-updates.apache.org/aoo410/check.Update
+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
@@ -409,7 +409,7 @@ Apache_OpenOffice_Beta
 USERDIRPRODUCTVERSION 4
 ABOUTBOXPRODUCTVERSION 4.1.0
 BASEPRODUCTVERSION 4.1
-UPDATEURL https://ooo-updates.apache.org/aoo410/check.Update
+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
commit bf8d8d38c88ca16e7156c81c9ec4fce4adb791e0
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Mar 10 09:37:02 2014 +

124355: Toolbarmanager: correct show/hide of toolbars; correct calculation 
of docking area sizes

diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx 
b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 2e25588..f267684 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -266,103 +266,100 @@ bool 
ToolbarLayoutManager::implts_isParentWindowVisible() const
 return bVisible;
 }
 
-Rectangle ToolbarLayoutManager::implts_calcDockingArea()
+namespace
 {
-ReadGuard aReadLock( m_aLock );
-UIElementVector aWindowVector( m_aUIElements );
-aReadLock.unlock();
+void insertDockingAreaSize(
+const UIElement rUIElement,
+const awt::Rectangle rUIElementPosSize,
+std::vector sal_Int32  rDockingAreaData )
+{
+sal_Int32 nAreaPos = 0;
+sal_Int32 nSize = 0;
+if ( isHorizontalDockingArea( rUIElement.m_aDockedData.m_nDockedArea ) 
)
+{
+nAreaPos = rUIElement.m_aDockedData.m_aPos.Y();
+nSize = rUIElementPosSize.Height;
+}
+else
+{
+nAreaPos = rUIElement.m_aDockedData.m_aPos.X();
+nSize = rUIElementPosSize.Width;
+}
 
-RectangleaBorderSpace;
-sal_Int32nCurrRowColumn( 0 );
-sal_Int32nCurrPos( 0 );
-sal_Int32nCurrDockingArea( ui::DockingArea_DOCKINGAREA_TOP 
);
-std::vector sal_Int32  aRowColumnSizes[DOCKINGAREAS_COUNT];
-UIElementVector::const_iterator pConstIter;
+const sal_uInt32 nIndexPos = nAreaPos = 0 ? static_cast sal_uInt32 
(nAreaPos) : 0;
+if ( rDockingAreaData.size()  nIndexPos + 1 )
+{
+rDockingAreaData.resize( nIndexPos + 1, 0 );
+}
 
-// initialize rectangle with zero values!
-aBorderSpace.setWidth(0);
-aBorderSpace.setHeight(0);
+if ( rDockingAreaData[nIndexPos]  nSize )
+{
+rDockingAreaData[nIndexPos] = nSize;
+}
+}
 
-aRowColumnSizes[nCurrDockingArea].clear

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - sw/inc sw/source

2014-03-04 Thread Oliver-Rainer Wittmann
 sw/inc/IDocumentMarkAccess.hxx   |2 
 sw/inc/ndtxt.hxx |2 
 sw/source/core/bastyp/index.cxx  |   12 +++--
 sw/source/core/crsr/bookmrk.cxx  |   62 +++-
 sw/source/core/crsr/crossrefbookmark.cxx |2 
 sw/source/core/doc/docbm.cxx |   68 ---
 sw/source/core/inc/MarkManager.hxx   |2 
 sw/source/core/inc/bookmrk.hxx   |   11 +++--
 sw/source/core/inc/crossrefbookmark.hxx  |6 +-
 sw/source/core/txtnode/ndtxt.cxx |6 ++
 sw/source/core/undo/undobj.cxx   |   31 +-
 11 files changed, 145 insertions(+), 59 deletions(-)

New commits:
commit aa46680dd96539848bf8bef0293e2a614172515d
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Mar 4 14:02:37 2014 +

123480: correct the previous made refactoring (revision 1572577)

diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index fd6e376..a9a0251 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -54,7 +54,8 @@ public:
 SwComparePosition eCmpPos,
 const SwPosition rSttPos,
 const SwPosition rEndPos,
-SwRedline rRedl );
+SwRedline rRedl,
+sal_Bool bCopyNext );
 
 ~SwRedlineSaveData();
 
@@ -1000,9 +1001,10 @@ SwRedlineSaveData::SwRedlineSaveData(
 SwComparePosition eCmpPos,
 const SwPosition rSttPos,
 const SwPosition rEndPos,
-SwRedline rRedl )
+SwRedline rRedl,
+sal_Bool bCopyNext )
 : SwUndRng( rRedl )
-, SwRedlineData( rRedl.GetRedlineData(), sal_True )
+, SwRedlineData( rRedl.GetRedlineData(), bCopyNext )
 {
 ASSERT( POS_OUTSIDE == eCmpPos || !rRedl.GetContentIdx(), Redline mit 
Content );
 
@@ -1012,6 +1014,7 @@ SwRedlineSaveData::SwRedlineSaveData(
 nEndNode = rEndPos.nNode.GetIndex();
 nEndCntnt = rEndPos.nContent.GetIndex();
 break;
+
 case POS_OVERLAP_BEHIND:// Pos1 ueberlappt Pos2 am Ende
 nSttNode = rSttPos.nNode.GetIndex();
 nSttCntnt = rSttPos.nContent.GetIndex();
@@ -1083,6 +1086,7 @@ void SwRedlineSaveData::RedlineToDoc( SwPaM rPam )
 rDoc.SetRedlineMode_intern( eOld );
 }
 
+
 sal_Bool SwUndo::FillSaveData(
 const SwPaM rRange,
 SwRedlineSaveDatas rSData,
@@ -1103,6 +1107,7 @@ sal_Bool SwUndo::FillSaveData(
 for ( ; n  rTbl.Count(); ++n )
 {
 SwRedline* pRedl = rTbl[n];
+
 const SwComparePosition eCmpPos =
 ComparePosition( *pStt, *pEnd, *pRedl-Start(), *pRedl-End() );
 if ( eCmpPos != POS_BEFORE
@@ -1110,22 +1115,26 @@ sal_Bool SwUndo::FillSaveData(
   eCmpPos != POS_COLLIDE_END
   eCmpPos != POS_COLLIDE_START )
 {
-pNewData = new SwRedlineSaveData( eCmpPos, *pStt, *pEnd, *pRedl );
+pNewData = new SwRedlineSaveData( eCmpPos, *pStt, *pEnd, *pRedl, 
bCopyNext );
 rSData.Insert( pNewData, rSData.Count() );
 }
 }
-
 if ( rSData.Count()  bDelRange )
+{
 rRange.GetDoc()-DeleteRedline( rRange, false, USHRT_MAX );
+}
 return 0 != rSData.Count();
 }
 
+
 sal_Bool SwUndo::FillSaveDataForFmt(
 const SwPaM rRange,
 SwRedlineSaveDatas rSData )
 {
 if ( rSData.Count() )
+{
 rSData.DeleteAndDestroy( 0, rSData.Count() );
+}
 
 SwRedlineSaveData* pNewData;
 const SwPosition *pStt = rRange.Start(), *pEnd = rRange.End();
@@ -1137,12 +1146,13 @@ sal_Bool SwUndo::FillSaveDataForFmt(
 SwRedline* pRedl = rTbl[n];
 if ( nsRedlineType_t::REDLINE_FORMAT == pRedl-GetType() )
 {
-const SwPosition *pRStt = pRedl-Start(), *pREnd = pRedl-End();
-
-SwComparePosition eCmpPos = ComparePosition( *pStt, *pEnd, *pRStt, 
*pREnd );
-if ( POS_BEFORE != eCmpPos  POS_BEHIND != eCmpPos  
POS_COLLIDE_END != eCmpPos  POS_COLLIDE_START != eCmpPos )
+const SwComparePosition eCmpPos = ComparePosition( *pStt, *pEnd, 
*pRedl-Start(), *pRedl-End() );
+if ( eCmpPos != POS_BEFORE
+  eCmpPos != POS_BEHIND
+  eCmpPos != POS_COLLIDE_END
+  eCmpPos != POS_COLLIDE_START )
 {
-pNewData = new SwRedlineSaveData( eCmpPos, *pStt, *pEnd, 
*pRedl );
+pNewData = new SwRedlineSaveData( eCmpPos, *pStt, *pEnd, 
*pRedl, sal_True );
 rSData.Insert( pNewData, rSData.Count() );
 }
 
@@ -1151,6 +1161,7 @@ sal_Bool SwUndo::FillSaveDataForFmt(
 return 0 != rSData.Count();
 }
 
+
 void SwUndo::SetSaveData( SwDoc rDoc, const SwRedlineSaveDatas rSData )
 {
 RedlineMode_t eOld = rDoc.GetRedlineMode();
commit 770c0e6b910129710b4be5cb9e9bae39bfa6bd5a
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Mar 4 12:35:01 2014 +

124338: assure sorted mark containers when updating SwIndex instances due 
to inserted characters

diff --git

[Libreoffice-commits] core.git: 3 commits - sw/inc sw/source vcl/source

2014-03-04 Thread Oliver-Rainer Wittmann
 sw/inc/IDocumentMarkAccess.hxx  |2 
 sw/inc/undobj.hxx   |2 
 sw/source/core/bastyp/index.cxx |7 ++-
 sw/source/core/crsr/bookmrk.cxx |   69 
 sw/source/core/doc/docbm.cxx|   69 +---
 sw/source/core/inc/MarkManager.hxx  |2 
 sw/source/core/inc/bookmrk.hxx  |4 +
 sw/source/core/inc/crossrefbookmark.hxx |1 
 sw/source/core/txtnode/ndtxt.cxx|6 ++
 sw/source/core/undo/undobj.cxx  |   32 +-
 sw/source/core/undo/unredln.cxx |6 +-
 vcl/source/app/settings.cxx |8 +--
 12 files changed, 147 insertions(+), 61 deletions(-)

New commits:
commit b229d16cd94d31eb8cad043b54d2d421cf92ef70
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Mar 4 14:02:37 2014 +

Related: #i123480# correct the previous made refactoring

(cherry picked from commit aa46680dd96539848bf8bef0293e2a614172515d)

Conflicts:
sw/source/core/undo/undobj.cxx

Change-Id: I4689d5fe02ab2c814e15a1c11ebd3ad11d6e56c8

diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index 1dcd5ca..39e3fe0 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -115,7 +115,7 @@ public:
 
 // Save and set Redline data.
 static bool FillSaveData( const SwPaM rRange, SwRedlineSaveDatas rSData,
-  bool bDelRange = true );
+  bool bDelRange = true, bool bCopyNext = true );
 static bool FillSaveDataForFmt( const SwPaM , SwRedlineSaveDatas );
 static void SetSaveData( SwDoc rDoc, const SwRedlineSaveDatas rSData );
 static bool HasHiddenRedlines( const SwRedlineSaveDatas rSData );
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 2e75e42..e22fe52 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -46,7 +46,9 @@ public:
 SwComparePosition eCmpPos,
 const SwPosition rSttPos,
 const SwPosition rEndPos,
-SwRangeRedline rRedl );
+SwRangeRedline rRedl,
+sal_Bool bCopyNext );
+
 ~SwRedlineSaveData();
 
 void RedlineToDoc( SwPaM rPam );
@@ -847,7 +849,7 @@ void SwUndoSaveSection::SaveSection(
 }
 
 pRedlSaveData = new SwRedlineSaveDatas;
-if( !SwUndo::FillSaveData( aPam, *pRedlSaveData, true ))
+if( !SwUndo::FillSaveData( aPam, *pRedlSaveData, true, true ))
 delete pRedlSaveData, pRedlSaveData = 0;
 
 nStartPos = rRange.aStart.GetIndex();
@@ -912,9 +914,10 @@ SwRedlineSaveData::SwRedlineSaveData(
 SwComparePosition eCmpPos,
 const SwPosition rSttPos,
 const SwPosition rEndPos,
-SwRangeRedline rRedl )
+SwRangeRedline rRedl,
+sal_Bool bCopyNext )
 : SwUndRng( rRedl )
-, SwRedlineData( rRedl.GetRedlineData(), true )
+, SwRedlineData( rRedl.GetRedlineData(), bCopyNext )
 {
 assert( POS_OUTSIDE == eCmpPos ||
 !rRedl.GetContentIdx() ); // Redline with Content
@@ -925,6 +928,7 @@ SwRedlineSaveData::SwRedlineSaveData(
 nEndNode = rEndPos.nNode.GetIndex();
 nEndCntnt = rEndPos.nContent.GetIndex();
 break;
+
 case POS_OVERLAP_BEHIND:// Pos1 overlaps Pos2 at the end
 nSttNode = rSttPos.nNode.GetIndex();
 nSttCntnt = rSttPos.nContent.GetIndex();
@@ -996,7 +1000,8 @@ void SwRedlineSaveData::RedlineToDoc( SwPaM rPam )
 bool SwUndo::FillSaveData(
 const SwPaM rRange,
 SwRedlineSaveDatas rSData,
-bool bDelRange )
+bool bDelRange,
+bool bCopyNext )
 {
 rSData.DeleteAndDestroyAll();
 
@@ -1009,6 +1014,7 @@ bool SwUndo::FillSaveData(
 for ( ; n  rTbl.size(); ++n )
 {
 SwRangeRedline* pRedl = rTbl[n];
+
 const SwComparePosition eCmpPos =
 ComparePosition( *pStt, *pEnd, *pRedl-Start(), *pRedl-End() );
 if ( eCmpPos != POS_BEFORE
@@ -1016,12 +1022,14 @@ bool SwUndo::FillSaveData(
   eCmpPos != POS_COLLIDE_END
   eCmpPos != POS_COLLIDE_START )
 {
-pNewData = new SwRedlineSaveData( eCmpPos, *pStt, *pEnd, *pRedl );
+pNewData = new SwRedlineSaveData( eCmpPos, *pStt, *pEnd, *pRedl, 
bCopyNext );
 rSData.push_back( pNewData );
 }
 }
 if( !rSData.empty()  bDelRange )
+{
 rRange.GetDoc()-DeleteRedline( rRange, false, USHRT_MAX );
+}
 return !rSData.empty();
 }
 
@@ -1041,12 +1049,13 @@ bool SwUndo::FillSaveDataForFmt(
 SwRangeRedline* pRedl = rTbl[n];
 if ( nsRedlineType_t::REDLINE_FORMAT == pRedl-GetType() )
 {
-const SwPosition *pRStt = pRedl-Start(), *pREnd = pRedl-End();
-
-SwComparePosition eCmpPos = ComparePosition( *pStt, *pEnd, *pRStt, 
*pREnd );
-if ( POS_BEFORE != eCmpPos  POS_BEHIND != eCmpPos  
POS_COLLIDE_END != eCmpPos  POS_COLLIDE_START != eCmpPos )
+const SwComparePosition eCmpPos

[Libreoffice-commits] core.git: sw/source

2014-02-28 Thread Oliver-Rainer Wittmann
 sw/source/core/doc/docedt.cxx  |   52 +++---
 sw/source/core/doc/docredln.cxx|   16 ---
 sw/source/core/edit/edundo.cxx |2 
 sw/source/core/inc/UndoRedline.hxx |   10 ++--
 sw/source/core/undo/undobj.cxx |   84 -
 sw/source/core/undo/unredln.cxx|   54 +++
 6 files changed, 115 insertions(+), 103 deletions(-)

New commits:
commit 22aea93d508d8051a5f5d1a472874ba4eca2f296
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Thu Feb 27 14:00:06 2014 +

Related: #i123480# assure correct Undo/Redo with not shown tracked changes

(cherry picked from commit e8613c7e3b76a83d804d28199fdeacc6369569c6)

Conflicts:
sw/source/core/doc/docedt.cxx
sw/source/core/undo/undobj.cxx
sw/source/core/undo/unredln.cxx

Change-Id: I45c25aa957995109b202e2130e5344b1bbb09669

diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 801593d..aa10b74 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -1480,52 +1480,50 @@ bool SwDoc::DeleteAndJoinWithRedlineImpl( SwPaM  rPam, 
const bool )
 {
 SwUndoRedlineDelete* pUndo = 0;
 RedlineMode_t eOld = GetRedlineMode();
-checkRedlining(eOld);
+checkRedlining( eOld );
 if (GetIDocumentUndoRedo().DoesUndo())
 {
 
-/* please don't translate -- for cultural reasons this comment is protected
-   until the redline implementation is finally fixed some day */
-//JP 06.01.98: MUSS noch optimiert werden!!!
-SetRedlineMode(
-   (RedlineMode_t)(nsRedlineMode_t::REDLINE_ON | 
nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE ));
+/* please don't translate -- for cultural reasons this comment is 
protected
+   until the redline implementation is finally fixed some day */
+//JP 06.01.98: MUSS noch optimiert werden!!!
+SetRedlineMode(
+(RedlineMode_t) ( nsRedlineMode_t::REDLINE_ON | 
nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE ) );
 
-GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+GetIDocumentUndoRedo().StartUndo( UNDO_DELETE, NULL );
 pUndo = new SwUndoRedlineDelete( rPam, UNDO_DELETE );
-GetIDocumentUndoRedo().AppendUndo(pUndo);
+GetIDocumentUndoRedo().AppendUndo( pUndo );
 }
-if( *rPam.GetPoint() != *rPam.GetMark() )
-AppendRedline( new SwRangeRedline( 
nsRedlineType_t::REDLINE_DELETE, rPam ), true);
+
+if ( *rPam.GetPoint() != *rPam.GetMark() )
+AppendRedline( new SwRangeRedline( 
nsRedlineType_t::REDLINE_DELETE, rPam ), true );
 SetModified();
 
-if( pUndo )
+if ( pUndo )
 {
-GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+GetIDocumentUndoRedo().EndUndo( UNDO_EMPTY, NULL );
 // ??? why the hell is the AppendUndo not below the
 // CanGrouping, so this hideous cleanup wouldn't be necessary?
 // bah, this is redlining, probably changing this would break it...
-if (GetIDocumentUndoRedo().DoesGroupUndo())
+if ( GetIDocumentUndoRedo().DoesGroupUndo() )
 {
-SwUndo *const pLastUndo( GetUndoManager().GetLastUndo() );
-SwUndoRedlineDelete *const pUndoRedlineDel(
-dynamic_castSwUndoRedlineDelete*(pLastUndo) );
-if (pUndoRedlineDel)
+SwUndo * const pLastUndo( GetUndoManager().GetLastUndo() );
+SwUndoRedlineDelete * const pUndoRedlineDel( dynamic_cast 
SwUndoRedlineDelete* ( pLastUndo ) );
+if ( pUndoRedlineDel )
 {
-bool const bMerged = pUndoRedlineDel-CanGrouping(*pUndo);
-if (bMerged)
+bool const bMerged = pUndoRedlineDel-CanGrouping( *pUndo 
);
+if ( bMerged )
 {
-::sw::UndoGuard const 
undoGuard(GetIDocumentUndoRedo());
-SwUndo const*const pDeleted =
-GetUndoManager().RemoveLastUndo();
-OSL_ENSURE(pDeleted == pUndo,
-DeleteAndJoinWithRedlineImpl: 
-undo removed is not undo inserted?);
+::sw::UndoGuard const undoGuard( 
GetIDocumentUndoRedo() );
+SwUndo const* const pDeleted = 
GetUndoManager().RemoveLastUndo();
+OSL_ENSURE( pDeleted == pUndo, 
DeleteAndJoinWithRedlineImpl: 
+undo removed is not undo inserted? );
 delete pDeleted;
 }
 }
 }
-//JP 06.01.98: MUSS noch optimiert werden!!!
-SetRedlineMode( eOld

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - filter/source oox/source svtools/source svx/source sw/source vcl/inc vcl/source

2014-02-27 Thread Oliver-Rainer Wittmann
 filter/source/msfilter/escherex.cxx |   32 -
 oox/source/export/drawingml.cxx |8 ++
 svtools/source/filter/filter.cxx|8 ++
 svtools/source/graphic/descriptor.cxx   |4 +
 svx/source/gallery2/galtheme.cxx|5 +
 svx/source/xml/xmlgrhlp.cxx |4 +
 svx/source/xoutdev/_xoutbmp.cxx |4 +
 sw/source/core/doc/docedt.cxx   |   48 ++---
 sw/source/core/doc/docredln.cxx |   16 ++--
 sw/source/core/edit/edundo.cxx  |2 
 sw/source/core/inc/UndoRedline.hxx  |   10 +-
 sw/source/core/undo/undobj.cxx  |   97 +++-
 sw/source/core/undo/unredln.cxx |   54 +++
 sw/source/filter/ww8/rtfattributeoutput.cxx |   13 +++
 sw/source/ui/docvw/romenu.cxx   |4 +
 vcl/inc/vcl/gfxlink.hxx |6 +
 vcl/source/gdi/gfxlink.cxx  |4 +
 17 files changed, 209 insertions(+), 110 deletions(-)

New commits:
commit e8613c7e3b76a83d804d28199fdeacc6369569c6
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Thu Feb 27 14:00:06 2014 +

123480: assure correct Undo/Redo with not shown tracked changes

diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index fa42f2d..d8f1008 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -1561,50 +1561,48 @@ bool SwDoc::DeleteAndJoinWithRedlineImpl( SwPaM  rPam, 
const bool )
 {
 SwUndoRedlineDelete* pUndo = 0;
 RedlineMode_t eOld = GetRedlineMode();
-checkRedlining(eOld);
+checkRedlining( eOld );
 if (GetIDocumentUndoRedo().DoesUndo())
 {
 
-//JP 06.01.98: MUSS noch optimiert werden!!!
-SetRedlineMode(
-   (RedlineMode_t)(nsRedlineMode_t::REDLINE_ON | 
nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE ));
+//JP 06.01.98: MUSS noch optimiert werden!!!
+SetRedlineMode(
+(RedlineMode_t) ( nsRedlineMode_t::REDLINE_ON | 
nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE ) );
 
-GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+GetIDocumentUndoRedo().StartUndo( UNDO_DELETE, NULL );
 pUndo = new SwUndoRedlineDelete( rPam, UNDO_DELETE );
-GetIDocumentUndoRedo().AppendUndo(pUndo);
+GetIDocumentUndoRedo().AppendUndo( pUndo );
 }
-if( *rPam.GetPoint() != *rPam.GetMark() )
-AppendRedline( new SwRedline( nsRedlineType_t::REDLINE_DELETE, 
rPam ), true);
+
+if ( *rPam.GetPoint() != *rPam.GetMark() )
+AppendRedline( new SwRedline( nsRedlineType_t::REDLINE_DELETE, 
rPam ), true );
 SetModified();
 
-if( pUndo )
+if ( pUndo )
 {
-GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+GetIDocumentUndoRedo().EndUndo( UNDO_EMPTY, NULL );
 // ??? why the hell is the AppendUndo not below the
 // CanGrouping, so this hideous cleanup wouldn't be necessary?
 // bah, this is redlining, probably changing this would break it...
-if (GetIDocumentUndoRedo().DoesGroupUndo())
+if ( GetIDocumentUndoRedo().DoesGroupUndo() )
 {
-SwUndo *const pLastUndo( GetUndoManager().GetLastUndo() );
-SwUndoRedlineDelete *const pUndoRedlineDel(
-dynamic_castSwUndoRedlineDelete*(pLastUndo) );
-if (pUndoRedlineDel)
+SwUndo * const pLastUndo( GetUndoManager().GetLastUndo() );
+SwUndoRedlineDelete * const pUndoRedlineDel( dynamic_cast 
SwUndoRedlineDelete* ( pLastUndo ) );
+if ( pUndoRedlineDel )
 {
-bool const bMerged = pUndoRedlineDel-CanGrouping(*pUndo);
-if (bMerged)
+bool const bMerged = pUndoRedlineDel-CanGrouping( *pUndo 
);
+if ( bMerged )
 {
-::sw::UndoGuard const 
undoGuard(GetIDocumentUndoRedo());
-SwUndo const*const pDeleted =
-GetUndoManager().RemoveLastUndo();
-OSL_ENSURE(pDeleted == pUndo,
-DeleteAndJoinWithRedlineImpl: 
-undo removed is not undo inserted?);
+::sw::UndoGuard const undoGuard( 
GetIDocumentUndoRedo() );
+SwUndo const* const pDeleted = 
GetUndoManager().RemoveLastUndo();
+OSL_ENSURE( pDeleted == pUndo, 
DeleteAndJoinWithRedlineImpl: 
+undo removed is not undo inserted? );
 delete pDeleted;
 }
 }
 }
-//JP 06.01.98: MUSS noch optimiert werden!!!
-SetRedlineMode

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - writerfilter/source

2014-02-25 Thread Oliver-Rainer Wittmann
 writerfilter/source/dmapper/DomainMapper.cxx|  150 
 writerfilter/source/dmapper/PropertyMap.cxx |2 
 writerfilter/source/dmapper/PropertyMap.hxx |2 
 writerfilter/source/dmapper/StyleSheetTable.cxx |2 
 4 files changed, 84 insertions(+), 72 deletions(-)

New commits:
commit 5a15ef3da683566d7bd443f96eeec3a9a3f70aeb
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Feb 25 13:16:12 2014 +

124106: correct handling of paragraph attributes, esp. whose which are 
providing the default value explicitly

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 6f590f7..f9ef6c5 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2215,7 +2215,7 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 //  bExchangeLeftRight = true;
 Value::Pointer_t pValue = rSprm.getValue();
 sal_Int32 nIntValue = pValue-getInt();
-rtl::OUString sStringValue = pValue-getString();
+const rtl::OUString sStringValue = pValue-getString();
 // printf ( DomainMapper::sprm(0x%.4x, 0x%.4x) [%s]\n, (unsigned 
int)nSprmId, (unsigned int)nIntValue, ::rtl::OUStringToOString(sStringValue, 
RTL_TEXTENCODING_DONTKNOW).getStr());
 /* WRITERFILTERSTATUS: table: sprmdata */
 
@@ -2254,11 +2254,14 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 /* WRITERFILTERSTATUS: comment:  */
 rContext-Insert(PROP_PARA_KEEP_TOGETHER, true, uno::makeAny( 
nIntValue ? true : false) );
 break;
+
 case NS_sprm::LN_PFPageBreakBefore:
-/* WRITERFILTERSTATUS: done: 100, planned: 3, spent: 0 */
-/* WRITERFILTERSTATUS: comment:  */
-rContext-Insert(PROP_BREAK_TYPE, true, uno::makeAny( 
com::sun::star::style::BreakType_PAGE_BEFORE ) );
+if ( nIntValue == 1 )
+{
+rContext-Insert( PROP_BREAK_TYPE, true, uno::makeAny( 
com::sun::star::style::BreakType_PAGE_BEFORE ) );
+}
 break;  // sprmPFPageBreakBefore
+
 case NS_sprm::LN_PBrcl:
 break;  // sprmPBrcl
 case NS_sprm::LN_PBrcp:
@@ -2327,10 +2330,9 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 break;
 
 case NS_sprm::LN_PFNoLineNumb:   // sprmPFNoLineNumb
-/* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 1 */
-/* WRITERFILTERSTATUS: comment:  */
-rContext-Insert(PROP_PARA_LINE_NUMBER_COUNT, true, uno::makeAny( 
nIntValue ? false : true) );
+rContext-Insert(PROP_PARA_LINE_NUMBER_COUNT, true, uno::makeAny( 
nIntValue != 0 ? false : true) );
 break;
+
 case NS_sprm::LN_PChgTabsPapx:   // sprmPChgTabsPapx
 /* WRITERFILTERSTATUS: done: 90, planned: 8, spent: 8 */
 /* WRITERFILTERSTATUS: comment: bar tab stops a unavailable */
@@ -2595,10 +2597,11 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 case NS_sprm::LN_PBrcBar:
 /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
 break;  // sprmPBrcBar
+
 case NS_sprm::LN_PFNoAutoHyph:   // sprmPFNoAutoHyph
-/* WRITERFILTERSTATUS: done: 100, planned: 1, spent: 0 */
-rContext-Insert(PROP_PARA_IS_HYPHENATION, true, uno::makeAny( 
nIntValue ? false : true ));
+rContext-Insert(PROP_PARA_IS_HYPHENATION, true, uno::makeAny( 
nIntValue != 0 ? false : true ));
 break;
+
 case NS_sprm::LN_PWHeightAbs:
 /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
 break;  // sprmPWHeightAbs
@@ -2629,15 +2632,16 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 case NS_sprm::LN_PFLocked:
 /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
 break;  // sprmPFLocked
+
 case NS_sprm::LN_PFWidowControl:
 case NS_ooxml::LN_CT_PPrBase_widowControl:
-/* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
 {
-uno::Any aVal( uno::makeAny( sal_Int8(nIntValue ? 2 : 0 )));
+uno::Any aVal( uno::makeAny( sal_Int8(nIntValue != 0 ? 2 : 0 )));
 rContext-Insert( PROP_PARA_WIDOWS, true, aVal );
 rContext-Insert( PROP_PARA_ORPHANS, true, aVal );
 }
 break;  // sprmPFWidowControl
+
 case NS_sprm::LN_PRuler:
 /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
 break;  // sprmPRuler
@@ -2675,34 +2679,47 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 case NS_sprm::LN_PPropRMark:
 /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
 break;  // sprmPPropRMark
+
 case NS_sprm::LN_POutLvl:
-/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
 {
-sal_Int16 nLvl = static_cast sal_Int16 ( nIntValue );
-if( m_pImpl-IsStyleSheetImport() )
+// - nIntValue

[Libreoffice-commits] core.git: 25 commits - comphelper/source include/comphelper reportdesign/source sd/source sw/source writerfilter/source

2014-02-25 Thread Oliver-Rainer Wittmann
 comphelper/source/container/containermultiplexer.cxx |   12 +-
 comphelper/source/misc/SelectionMultiplex.cxx|3 
 comphelper/source/property/propmultiplex.cxx |3 
 include/comphelper/SelectionMultiplex.hxx|3 
 include/comphelper/containermultiplexer.hxx  |   16 ++-
 include/comphelper/propmultiplex.hxx |3 
 reportdesign/source/ui/dlg/Navigator.cxx |   18 ++-
 sd/source/ui/unoidl/unomodule.cxx|6 -
 sd/source/ui/unoidl/unomodule.hxx|6 -
 sw/source/ui/inc/unotxvw.hxx |   93 ++-
 sw/source/ui/uno/unotxvw.cxx |   62 
 sw/source/ui/vba/vbaselection.cxx|3 
 sw/source/ui/vba/vbaselection.hxx|4 
 writerfilter/source/dmapper/DomainMapper.cxx |7 +
 14 files changed, 170 insertions(+), 69 deletions(-)

New commits:
commit c30fb7d7269b5bdd1853ac22120f57aa2bfd13a5
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Feb 25 13:16:12 2014 +

Related: #i124106# correct handling of page break attributes

i.e. those which are providing the default value explicitly

(cherry picked from commit 5a15ef3da683566d7bd443f96eeec3a9a3f70aeb)

Conflicts:
writerfilter/source/dmapper/DomainMapper.cxx
writerfilter/source/dmapper/PropertyMap.cxx

Change-Id: Ib8721f2fce060d26ee75b0515b3bf62a603fd40c

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index f110e83..87c8761 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -984,7 +984,7 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 SectionPropertyMap * pSectionContext = m_pImpl-GetSectionContext();
 Value::Pointer_t pValue = rSprm.getValue();
 sal_Int32 nIntValue = pValue-getInt();
-OUString sStringValue = pValue-getString();
+const OUString sStringValue = pValue-getString();
 PropertyNameSupplier rPropNameSupplier = 
PropertyNameSupplier::GetPropertyNameSupplier();
 
 switch(nSprmId)
@@ -1002,7 +1002,10 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 rContext-Insert(PROP_PARA_KEEP_TOGETHER, uno::makeAny( nIntValue ? 
true : false) );
 break;
 case NS_ooxml::LN_CT_PPrBase_pageBreakBefore:
-rContext-Insert(PROP_BREAK_TYPE, uno::makeAny( 
com::sun::star::style::BreakType_PAGE_BEFORE ) );
+if ( nIntValue == 1 )
+{
+rContext-Insert(PROP_BREAK_TYPE, uno::makeAny( 
com::sun::star::style::BreakType_PAGE_BEFORE ) );
+}
 break;
 case NS_ooxml::LN_CT_NumPr_ilvl:
 if (nIntValue  0 || 10 = nIntValue) // Writer can't do everything
commit 011df38bb218af4a6e3b1df40a7f03202fbc
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Feb 25 15:58:00 2014 +

coverity#983796 Uncaught exception

Change-Id: Idba161eb74fb9b474b2f41fbc0fdf0eef55b7599

diff --git a/sd/source/ui/unoidl/unomodule.cxx 
b/sd/source/ui/unoidl/unomodule.cxx
index eef013d..abf56f2 100644
--- a/sd/source/ui/unoidl/unomodule.cxx
+++ b/sd/source/ui/unoidl/unomodule.cxx
@@ -114,7 +114,8 @@ uno::Sequence uno::Reference frame::XDispatch   
SAL_CALL SdUnoModule::queryD
 }
 
 // XDispatchProvider
-uno::Reference frame::XDispatch  SAL_CALL SdUnoModule::queryDispatch( const 
util::URL aURL, const OUString, sal_Int32 ) throw( uno::RuntimeException )
+uno::Reference frame::XDispatch  SAL_CALL SdUnoModule::queryDispatch( const 
util::URL aURL, const OUString, sal_Int32 )
+throw (uno::RuntimeException, std::exception)
 {
 SolarMutexGuard aGuard;
 SdDLL::Init();
diff --git a/sd/source/ui/unoidl/unomodule.hxx 
b/sd/source/ui/unoidl/unomodule.hxx
index 01a28af..123656b 100644
--- a/sd/source/ui/unoidl/unomodule.hxx
+++ b/sd/source/ui/unoidl/unomodule.hxx
@@ -70,7 +70,8 @@ public:
 virtual css::uno::Sequence css::uno::Reference css::frame::XDispatch   
SAL_CALL queryDispatches( const css::uno::Sequence 
css::frame::DispatchDescriptor  seqDescriptor ) throw( 
css::uno::RuntimeException ) ;
 virtual css::uno::Reference css::frame::XDispatch  SAL_CALL 
queryDispatch(  const   css::util::URL aURL,
 const   OUString  
  sTargetFrameName,
-sal_Int32  
 eSearchFlags) throw( css::uno::RuntimeException ) ;
+sal_Int32  
 eSearchFlags)
+throw (css::uno::RuntimeException, std::exception);
 // XServiceInfo
 virtual OUString SAL_CALL getImplementationName(  ) 
throw(css::uno::RuntimeException);
 virtual sal_Bool SAL_CALL supportsService( const OUString ServiceName

[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - writerfilter/source

2014-02-25 Thread Oliver-Rainer Wittmann
 writerfilter/source/dmapper/DomainMapper.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit f8366d188f2d7cfe17ec802cbdff603b111eacd5
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Feb 25 13:16:12 2014 +

Related: #i124106# correct handling of page break attributes

i.e. those which are providing the default value explicitly

(cherry picked from commit 5a15ef3da683566d7bd443f96eeec3a9a3f70aeb)

Conflicts:
writerfilter/source/dmapper/DomainMapper.cxx
writerfilter/source/dmapper/PropertyMap.cxx

(cherry picked from commit c30fb7d7269b5bdd1853ac22120f57aa2bfd13a5)

Conflicts:
writerfilter/source/dmapper/DomainMapper.cxx

Change-Id: Ib8721f2fce060d26ee75b0515b3bf62a603fd40c
Signed-off-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 6ed6ddf..4b6ed8e 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1614,7 +1614,7 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 SectionPropertyMap * pSectionContext = m_pImpl-GetSectionContext();
 Value::Pointer_t pValue = rSprm.getValue();
 sal_Int32 nIntValue = pValue-getInt();
-OUString sStringValue = pValue-getString();
+const OUString sStringValue = pValue-getString();
 PropertyNameSupplier rPropNameSupplier = 
PropertyNameSupplier::GetPropertyNameSupplier();
 
 switch(nSprmId)
@@ -1641,7 +1641,10 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 rContext-Insert(PROP_PARA_KEEP_TOGETHER, uno::makeAny( nIntValue ? 
true : false) );
 break;
 case NS_sprm::LN_PFPageBreakBefore:
-rContext-Insert(PROP_BREAK_TYPE, uno::makeAny( 
com::sun::star::style::BreakType_PAGE_BEFORE ) );
+if ( nIntValue == 1 )
+{
+rContext-Insert(PROP_BREAK_TYPE, uno::makeAny( 
com::sun::star::style::BreakType_PAGE_BEFORE ) );
+}
 break;  // sprmPFPageBreakBefore
 case NS_sprm::LN_PBrcl:
 break;  // sprmPBrcl
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - writerfilter/source

2014-02-21 Thread Oliver-Rainer Wittmann
 writerfilter/source/dmapper/DomainMapperTableManager.cxx |   86 +++
 writerfilter/source/dmapper/DomainMapperTableManager.hxx |   11 +
 2 files changed, 75 insertions(+), 22 deletions(-)

New commits:
commit 321d104cf2c13582a08a2313ff733fa02bc6610f
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Feb 21 09:53:15 2014 +

123345: assure availability of member data for table style import

diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx 
b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index bc23e69..cc09b65 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -81,6 +81,7 @@ bool DomainMapperTableManager::sprm(Sprm  rSprm)
 dmapper_logger-endElement(tablemanager.sprm);
 #endif
 bool bRet = DomainMapperTableManager_Base_t::sprm(rSprm);
+
 if( !bRet )
 {
 bRet = m_pTablePropsHandler-sprm( rSprm );
@@ -89,17 +90,20 @@ bool DomainMapperTableManager::sprm(Sprm  rSprm)
 if ( !bRet )
 {
 bRet = true;
-sal_uInt32 nSprmId = rSprm.getId();
-Value::Pointer_t pValue = rSprm.getValue();
-sal_Int32 nIntValue = ((pValue.get() != NULL) ? pValue-getInt() : 0);
+const sal_uInt32 nSprmId = rSprm.getId();
+const Value::Pointer_t pValue = rSprm.getValue();
+const sal_Int32 nIntValue = ((pValue.get() != NULL) ? pValue-getInt() 
: 0);
 switch ( nSprmId )
 {
 case 0xf661: //sprmTTRLeft left table indent
 /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
+
 case 0xf614: // sprmTTPreferredWidth - preferred table width
 /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
+
 case NS_ooxml::LN_CT_TblPrBase_tblW:  //90722;
 /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
+
 case NS_ooxml::LN_CT_TblPrBase_tblInd: //90725
 /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
 {
@@ -127,8 +131,9 @@ bool DomainMapperTableManager::sprm(Sprm  rSprm)
 }
 }
 break;
+
 case 0x3404:// sprmTTableHeader
-case NS_ooxml::LN_CT_TrPrBase_tblHeader: //90704
+case NS_ooxml::LN_CT_TrPrBase_tblHeader:
 /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
 // if nIntValue == 1 then the row is a repeated header line
 // to prevent later rows from increasing the repeating 
m_nHeaderRepeat is set to NULL when repeating stops
@@ -142,6 +147,7 @@ bool DomainMapperTableManager::sprm(Sprm  rSprm)
 else
 m_nCurrentHeaderRepeatCount.top() = -1;
 break;
+
 case 0xd608: // TDefTable
 /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
 {
@@ -173,6 +179,7 @@ bool DomainMapperTableManager::sprm(Sprm  rSprm)
 }
 }
 break;
+
 case 0xD605: // sprmTTableBorders
 /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
 {
@@ -188,12 +195,15 @@ bool DomainMapperTableManager::sprm(Sprm  rSprm)
 }
 }
 break;
+
 case 0xd632 : //sprmTNewSpacing
 /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
+
 case 0xd634 : //sprmTNewSpacing
 /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
 //TODO: sprms contain default (TNew) and actual border spacing 
of cells - not resolvable yet
 break;
+
 case 0xd613: //sprmTGridLineProps
 /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
 // TODO: needs a handler
@@ -211,10 +221,12 @@ bool DomainMapperTableManager::sprm(Sprm  rSprm)
 
 */
 break;
+
 case 0x740a : //sprmTTlp
 /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
 //TODO: Table look specifier
 break;
+
 case 0x6816 : //unknown
 case 0x3466 : //unknown
 case 0x3615 : //unknown
@@ -225,6 +237,7 @@ bool DomainMapperTableManager::sprm(Sprm  rSprm)
 /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
 bRet = false;
 break;
+
 case NS_ooxml::LN_CT_TblPrBase_tblStyle: //table style name
 /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
 {
@@ -233,12 +246,14 @@ bool DomainMapperTableManager::sprm(Sprm  rSprm)
 insertTableProps(pPropMap);
 }
 break;
+
 case NS_ooxml::LN_CT_TblGridBase_gridCol:
 /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */
 {
 getCurrentGrid()-push_back( 
ConversionHelper

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - filter/source

2014-02-21 Thread Oliver-Rainer Wittmann
 filter/source/xsltfilter/XSLTFilter.cxx |  235 ++--
 1 file changed, 135 insertions(+), 100 deletions(-)

New commits:
commit 933d1ff4354a39545d5a391e2c68302d9c2d7498
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Feb 21 14:01:22 2014 +

124092: export code for UOF v2 only for corresponding export style sheets

diff --git a/filter/source/xsltfilter/XSLTFilter.cxx 
b/filter/source/xsltfilter/XSLTFilter.cxx
index 3d90139..0cf4269 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -20,7 +20,6 @@
  **/
 
  // MARKER(update_precomp.py): autogen include statement, do not remove
-//This file is about the conversion of the UOF v2.0 and ODF document format
 #include precompiled_filter.hxx
 
 #include stdio.h
@@ -66,16 +65,9 @@
 #include com/sun/star/beans/NamedValue.hpp
 
 
-#include unotools/streamwrap.hxx
-#include comphelper/processfactory.hxx
-#include tools/stream.hxx
 #include uof2splitter.hxx
-
-#include xmloff/attrlist.hxx
 #include uof2storage.hxx
 #include uof2merge.hxx
-#include tools/stream.hxx
-#include string
 
 using namespace ::rtl;
 using namespace ::cppu;
@@ -94,32 +86,6 @@ namespace XSLT {
 
 class XSLTFilter : public WeakImplHelper4 XImportFilter, XExportFilter, 
XDocumentHandler, XStreamListener
 {
-private:
-// the UNO ServiceFactory
-Reference XMultiServiceFactory  m_rServiceFactory;
-
-// DocumentHandler interface of the css::xml::sax::Writer service
-Reference  XExtendedDocumentHandler  m_rDocumentHandler;
-Reference  XOutputStream  m_rOutputStream;
-
-// controls pretty-printing
-sal_Bool m_bPrettyPrint;
-
-Reference XActiveDataControl  m_tcontrol;
-oslCondition  m_cTransformed;
-
-//UOF v2.0 export
-Reference XActiveDataControl  m_splitControl;
-
-sal_Bool m_bTerminated;
-sal_Bool m_bError;
-
-OUString m_aExportBaseUrl;
-OUString m_aOldBaseUrl;
-
-OUString rel2abs(const OUString);
-OUString expandUrl(const OUString);
-
 public:
 
 // ctor...
@@ -163,18 +129,51 @@ public:
 throw (com::sun::star::xml::sax::SAXException,RuntimeException);
 virtual void SAL_CALL setDocumentLocator(const ReferenceXLocator 
doclocator)
 throw (SAXException,RuntimeException);
-// UOF v2.0 export
+
 private:
+// the UNO ServiceFactory
+Reference XMultiServiceFactory  m_rServiceFactory;
+
+// DocumentHandler interface of the css::xml::sax::Writer service
+Reference  XExtendedDocumentHandler  m_rDocumentHandler;
+Reference  XOutputStream  m_rOutputStream;
+
+// controls pretty-printing
+sal_Bool m_bPrettyPrint;
+
+Reference XActiveDataControl  m_tcontrol;
+oslCondition m_cTransformed;
+
+sal_Bool m_bTerminated;
+sal_Bool m_bError;
+
+OUString m_aExportBaseUrl;
+OUString m_aOldBaseUrl;
+
+OUString rel2abs(const OUString);
+OUString expandUrl(const OUString);
+
+// for support of UOF v2.0
+Reference XActiveDataControl  m_splitControl;
 Reference XStream  m_rStream;
-UOF2Splitter * pSplitter;
+
+bool isUOF2ExportStyleSheet( const OUString rExportStyleSheet );
 
 };
 
 XSLTFilter::XSLTFilter( const Reference XMultiServiceFactory  r )
-: m_rServiceFactory(r)
-, m_bPrettyPrint(sal_True)
-, m_bTerminated(sal_False)
-, m_bError(sal_False)
+: m_rServiceFactory( r )
+, m_rDocumentHandler()
+, m_rOutputStream()
+, m_bPrettyPrint( sal_True )
+, m_tcontrol()
+, m_cTransformed()
+, m_bTerminated( sal_False )
+, m_bError( sal_False )
+, m_aExportBaseUrl()
+, m_aOldBaseUrl()
+, m_splitControl()
+, m_rStream()
 {
 m_cTransformed = osl_createCondition();
 }
@@ -252,35 +251,37 @@ sal_Bool XSLTFilter::importer(
 if ( msUserData.getLength()  5 )
 return sal_False;
 
-OUString udImport = msUserData[2];
-OUString udStyleSheet = rel2abs(msUserData[4]);
+const OUString udStyleSheet = rel2abs( msUserData[4] );
 
 // get information from media descriptor
 // the imput stream that represents the imported file
 // is most important here since we need to supply it to
 // the sax parser that drives the supplied document handler
-sal_Int32 nLength = aSourceData.getLength();
-OUString aName, aFileName, aURL;
+const sal_Int32 nLength = aSourceData.getLength();
+OUString aFileName;
+OUString aURL;
 Reference XInputStream  xInputStream;
 for ( sal_Int32 i = 0 ; i  nLength; i++)
 {
-aName = aSourceData[i].Name;
-if (aName.equalsAscii(InputStream))
+const OUString aName = aSourceData[i].Name;
+if ( aName.equalsAscii( InputStream ) )
 aSourceData[i].Value = xInputStream;
-else if ( aName.equalsAscii(FileName))
+else if ( aName.equalsAscii( FileName ) )
 aSourceData[i].Value = aFileName;
-else

[Libreoffice-commits] core.git: framework/source

2014-02-18 Thread Oliver-Rainer Wittmann
 framework/source/layoutmanager/layoutmanager.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 6ba4d125f61f1cfe737190628e84f7fc75263382
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Feb 17 16:20:12 2014 +

Related: #i124096# correct LayoutManager::m_xDockingAreaAcceptor clear...

on disposing

(cherry picked from commit 50b10da7434d774ac463c148bbaeb051d2b3a22d)

Conflicts:
framework/source/layoutmanager/layoutmanager.cxx

Change-Id: I51fe74698f00fadba9afaeb0f8e9f66b85f208cb

diff --git a/framework/source/layoutmanager/layoutmanager.cxx 
b/framework/source/layoutmanager/layoutmanager.cxx
index ca60d0a..d1267dbe 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -2835,6 +2835,8 @@ throw( RuntimeException )
 // Our frame gets disposed, release all our references that depends on 
a working frame reference.
 Application::RemoveEventListener( LINK( this, LayoutManager, 
SettingsChanged ) );
 
+setDockingAreaAcceptor( Reference ui::XDockingAreaAcceptor () );
+
 // destroy all elements, it's possible that dettaching is NOT called!
 implts_destroyElements();
 impl_clearUpMenuBar();
@@ -2883,7 +2885,6 @@ throw( RuntimeException )
 m_xFrame.clear();
 delete m_pGlobalSettings;
 m_pGlobalSettings = 0;
-m_xDockingAreaAcceptor = Reference ui::XDockingAreaAcceptor ();
 
 bDisposeAndClear = sal_True;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/source

2014-02-12 Thread Oliver-Rainer Wittmann
 sw/source/core/unocore/unoportenum.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e46392bbe25028528086a43a4c414dcb0acde401
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Feb 11 10:15:45 2014 +

Resolves: fdo#74780 #i124178# correct export of User Variable Input Fields

(cherry picked from commit b95fa33a4d2827adb8e16de5bae4e535d8c826c9)

Conflicts:
sw/source/core/unocore/unoportenum.cxx

(cherry picked from commit 91f509fda9a04670e0752a214188be87bce1f2ac)

Change-Id: If645dd2f02ef0e511e44615339d6403cc469c784

diff --git a/sw/source/core/unocore/unoportenum.cxx 
b/sw/source/core/unocore/unoportenum.cxx
index 8d5377d..b745582 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -748,7 +748,7 @@ lcl_ExportHints(
 {
 
 pUnoCrsr-Right(
-
pAttr-GetFmtFld().GetField()-GetPar1().getLength() + 2,
+pAttr-GetFmtFld().GetField()-ExpandField( true 
).getLength() + 2,
 CRSR_SKIP_CHARS,
 sal_False,
 sal_False );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/inc sw/source

2014-02-12 Thread Oliver-Rainer Wittmann
 sw/inc/expfld.hxx |3 +++
 sw/inc/txtfld.hxx |4 
 sw/source/core/fields/expfld.cxx  |   32 +++-
 sw/source/core/fields/usrfld.cxx  |8 +++-
 sw/source/core/txtnode/atrfld.cxx |   24 ++--
 5 files changed, 67 insertions(+), 4 deletions(-)

New commits:
commit 4cf1ab04f7fb0ccd546240f40e024872827c997f
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Feb 11 13:25:08 2014 +

Resolves: #i124179# trigger update User Fields...

and related Input Fields when user directly edits a User Field Input Field

- assure that no recursive updates occur

(cherry picked from commit 3c2b5242e81575ec4b6c110afd88894670bd2283)

Conflicts:
sw/inc/txtfld.hxx
sw/source/core/fields/expfld.cxx
sw/source/core/fields/usrfld.cxx

Change-Id: I36af4d5e8008f16737e3ec14c1ec737a5f43d3b1
(cherry picked from commit 50f0bb85b7e18001886fdf8bb03eb1d138838b90)

diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index 2944589..076569a 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -308,6 +308,9 @@ class SW_DLLPUBLIC SwInputField : public SwField
 // Accessing Input Field's content
 const OUString getContent() const;
 
+void LockNotifyContentChange();
+void UnlockNotifyContentChange();
+
 public:
 /// Direct input via dialog; delete old value.
 SwInputField(
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index cfab932..b973aaa 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -83,6 +83,8 @@ public:
 
 virtual sal_Int32* GetEnd();
 
+void LockNotifyContentChange();
+void UnlockNotifyContentChange();
 virtual void NotifyContentChange( SwFmtFld rFmtFld );
 
 void UpdateTextNodeContent( const OUString rNewContent );
@@ -92,6 +94,8 @@ public:
 
 private:
 sal_Int32 m_nEnd;
+
+bool m_bLockNotifyContentChange;
 };
 
 #endif
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index e25dd31..6cdd6e7 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -1145,12 +1145,35 @@ SwFmtFld* SwInputField::GetFmtFld()
 return mpFmtFld;
 }
 
-
 const OUString SwInputField::getContent() const
 {
 return aContent;
 }
 
+void SwInputField::LockNotifyContentChange()
+{
+if ( GetFmtFld() != NULL )
+{
+SwTxtInputFld* pTxtInputFld = dynamic_cast SwTxtInputFld* 
(GetFmtFld()-GetTxtFld());
+if ( pTxtInputFld != NULL )
+{
+pTxtInputFld-LockNotifyContentChange();
+}
+}
+}
+
+void SwInputField::UnlockNotifyContentChange()
+{
+if ( GetFmtFld() != NULL )
+{
+SwTxtInputFld* pTxtInputFld = dynamic_cast SwTxtInputFld* 
(GetFmtFld()-GetTxtFld());
+if ( pTxtInputFld != NULL )
+{
+pTxtInputFld-UnlockNotifyContentChange();
+}
+}
+}
+
 void SwInputField::applyFieldContent( const OUString rNewFieldContent )
 {
 if ( (nSubType  0x00ff) == INP_TXT )
@@ -1164,6 +1187,13 @@ void SwInputField::applyFieldContent( const OUString 
rNewFieldContent )
 if( pUserTyp )
 {
 pUserTyp-SetContent( rNewFieldContent );
+
+// trigger update of the corresponding User Fields and other 
related Input Fields
+{
+LockNotifyContentChange();
+pUserTyp-UpdateFlds();
+UnlockNotifyContentChange();
+}
 }
 }
 }
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index 35b7261..9cd6baa 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -202,8 +202,14 @@ void SwUserFieldType::Modify( const SfxPoolItem* pOld, 
const SfxPoolItem* pNew )
 ChgValid( sal_False );
 
 NotifyClients( pOld, pNew );
+
 // update input fields that might be connected to the user field
-GetDoc()-GetSysFldType( RES_INPUTFLD )-UpdateFlds();
+if ( !IsModifyLocked() )
+{
+LockModify();
+GetDoc()-GetSysFldType( RES_INPUTFLD )-UpdateFlds();
+UnlockModify();
+}
 }
 
 double SwUserFieldType::GetValue( SwCalc rCalc )
diff --git a/sw/source/core/txtnode/atrfld.cxx 
b/sw/source/core/txtnode/atrfld.cxx
index 5810067..1107c1c 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -440,6 +440,7 @@ SwTxtInputFld::SwTxtInputFld(
 
 : SwTxtFld( rAttr, nStart, bInClipboard )
 , m_nEnd( nEnd )
+, m_bLockNotifyContentChange( false )
 {
 SetHasDummyChar( false );
 SetHasContent( true );
@@ -460,11 +461,30 @@ sal_Int32* SwTxtInputFld::GetEnd()
 return m_nEnd;
 }
 
+
+void SwTxtInputFld::LockNotifyContentChange()
+{
+m_bLockNotifyContentChange = true;
+}
+
+
+void SwTxtInputFld::UnlockNotifyContentChange()
+{
+m_bLockNotifyContentChange = false;
+}
+
+
 void SwTxtInputFld::NotifyContentChange( SwFmtFld rFmtFld )
 {
-SwTxtFld

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/inc sw/source

2014-02-11 Thread Oliver-Rainer Wittmann
 sw/inc/expfld.hxx |3 +++
 sw/inc/txtfld.hxx |4 
 sw/source/core/fields/expfld.cxx  |   33 +
 sw/source/core/fields/usrfld.cxx  |   10 --
 sw/source/core/txtnode/atrfld.cxx |   24 ++--
 5 files changed, 70 insertions(+), 4 deletions(-)

New commits:
commit 3c2b5242e81575ec4b6c110afd88894670bd2283
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Feb 11 13:25:08 2014 +

124179: trigger update User Fields and related Input Fields when user 
directly edits a User Field Input Field

- assure that no recursive updates occur

diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index 784f0fb..0b4e14b 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -327,6 +327,9 @@ class SW_DLLPUBLIC SwInputField : public SwField
 // Accessing Input Field's content
 const String getContent() const;
 
+void LockNotifyContentChange();
+void UnlockNotifyContentChange();
+
 public:
 // Direkte Eingabe ueber Dialog alten Wert loeschen
 SwInputField(
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index 83ca739..f31dd07 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -86,6 +86,8 @@ public:
 
 virtual xub_StrLen* GetEnd();
 
+void LockNotifyContentChange();
+void UnlockNotifyContentChange();
 virtual void NotifyContentChange( SwFmtFld rFmtFld );
 
 void UpdateTextNodeContent( const String rNewContent );
@@ -95,6 +97,8 @@ public:
 
 private:
 xub_StrLen m_nEnd;
+
+bool m_bLockNotifyContentChange;
 };
 
 #endif
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 6274bd8d..282f920 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -1181,6 +1181,32 @@ const String SwInputField::getContent() const
 return aContent;
 }
 
+
+void SwInputField::LockNotifyContentChange()
+{
+if ( GetFmtFld() != NULL )
+{
+SwTxtInputFld* pTxtInputFld = dynamic_cast SwTxtInputFld* 
(GetFmtFld()-GetTxtFld());
+if ( pTxtInputFld != NULL )
+{
+pTxtInputFld-LockNotifyContentChange();
+}
+}
+}
+
+
+void SwInputField::UnlockNotifyContentChange()
+{
+if ( GetFmtFld() != NULL )
+{
+SwTxtInputFld* pTxtInputFld = dynamic_cast SwTxtInputFld* 
(GetFmtFld()-GetTxtFld());
+if ( pTxtInputFld != NULL )
+{
+pTxtInputFld-UnlockNotifyContentChange();
+}
+}
+}
+
 void SwInputField::applyFieldContent( const String rNewFieldContent )
 {
 if ( (nSubType  0x00ff) == INP_TXT )
@@ -1194,6 +1220,13 @@ void SwInputField::applyFieldContent( const String 
rNewFieldContent )
 if( pUserTyp )
 {
 pUserTyp-SetContent( rNewFieldContent );
+
+// trigger update of the corresponding User Fields and other 
related Input Fields
+{
+LockNotifyContentChange();
+pUserTyp-UpdateFlds();
+UnlockNotifyContentChange();
+}
 }
 }
 }
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index e6491db..0ea4417 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -234,8 +234,14 @@ void SwUserFieldType::Modify( const SfxPoolItem* pOld, 
const SfxPoolItem* pNew )
 ChgValid( sal_False );
 
 NotifyClients( pOld, pNew );
-// und ggfs. am UserFeld haengende InputFelder updaten!
-GetDoc()-GetSysFldType( RES_INPUTFLD )-UpdateFlds();
+
+// update Input Fields as there might be Input Fields depending on this 
User Field
+if ( !IsModifyLocked() )
+{
+LockModify();
+GetDoc()-GetSysFldType( RES_INPUTFLD )-UpdateFlds();
+UnlockModify();
+}
 }
 
 double SwUserFieldType::GetValue( SwCalc rCalc )
diff --git a/sw/source/core/txtnode/atrfld.cxx 
b/sw/source/core/txtnode/atrfld.cxx
index c93733f..90526b0 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -457,6 +457,7 @@ SwTxtInputFld::SwTxtInputFld(
 
 : SwTxtFld( rAttr, nStart )
 , m_nEnd( nEnd )
+, m_bLockNotifyContentChange( false )
 {
 SetHasDummyChar( false );
 SetHasContent( true );
@@ -477,11 +478,30 @@ xub_StrLen* SwTxtInputFld::GetEnd()
 return m_nEnd;
 }
 
+
+void SwTxtInputFld::LockNotifyContentChange()
+{
+m_bLockNotifyContentChange = true;
+}
+
+
+void SwTxtInputFld::UnlockNotifyContentChange()
+{
+m_bLockNotifyContentChange = false;
+}
+
+
 void SwTxtInputFld::NotifyContentChange( SwFmtFld rFmtFld )
 {
-SwTxtFld::NotifyContentChange( rFmtFld );
+if ( !m_bLockNotifyContentChange )
+{
+LockNotifyContentChange();
+
+SwTxtFld::NotifyContentChange( rFmtFld );
+UpdateTextNodeContent( GetFieldContent() );
 
-UpdateTextNodeContent( GetFieldContent() );
+UnlockNotifyContentChange();
+}
 }
 
 const String SwTxtInputFld

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sc/inc

2014-02-04 Thread Oliver-Rainer Wittmann
 sc/inc/filter.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d41f7a0fe149ce1e57565e8b0602c64f975b3596
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Feb 4 10:52:58 2014 +

124155: correct visibility of function ScFilterCreate

Review by: hdu at apache dot org

diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx
index 360c722..c928003 100644
--- a/sc/inc/filter.hxx
+++ b/sc/inc/filter.hxx
@@ -129,7 +129,7 @@ class ScFormatFilterPlugin {
 
 // scfilt plugin symbol
 extern C {
-  ScFormatFilterPlugin * SAL_CALL ScFilterCreate(void);
+  SAL_DLLPUBLIC_EXPORT ScFormatFilterPlugin * SAL_CALL ScFilterCreate(void);
 }
 
 class ScFormatFilter {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: uui/source

2014-01-22 Thread Oliver-Rainer Wittmann
 uui/source/iahndl-ssl.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit fa290c750183ab598447630ab66f382e99188edb
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jan 21 16:17:39 2014 +

Resolves: #i123744# correct consideration of Subject Alternative Name...

field of the given certificate

(cherry picked from commit 117218483797c0aeedef9b68bdae96a727cb3426)

Change-Id: I81fbb49593b15edea2509aed81b252c8e5b0cd82

diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx
index d36b3e0..4c10f7c 100644
--- a/uui/source/iahndl-ssl.cxx
+++ b/uui/source/iahndl-ssl.cxx
@@ -296,9 +296,10 @@ handleCertificateValidationRequest_(
 
 certHostNames[0] = certHostName;
 
-for(int n = 1; n  altNames.getLength(); n++){
+for(int n = 0; n  altNames.getLength(); ++n)
+{
 if (altNames[n].Type ==  security::ExtAltNameType_DNS_NAME){
-   altNames[n].Value = certHostNames[n];
+   altNames[n].Value = certHostNames[n+1];
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: ucb/source

2014-01-22 Thread Oliver-Rainer Wittmann
 ucb/source/ucp/webdav/SerfSession.cxx |   44 ++
 ucb/source/ucp/webdav/SerfTypes.hxx   |2 -
 2 files changed, 41 insertions(+), 5 deletions(-)

New commits:
commit 4a56b4ab2c100c506096f1808cca7268e576086c
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jan 21 16:32:58 2014 +

Resolves: #i123744# consider certificate's Subject Alternative Name...

field when searching for matching certificate host name

(cherry picked from commit 226085ad2004319c5142b392bb4b48ab79c3b747)

Change-Id: I0d1690f75c1aa3288c677823105e21bb6e969f41

diff --git a/ucb/source/ucp/webdav/SerfSession.cxx 
b/ucb/source/ucp/webdav/SerfSession.cxx
index 008b6f1..bb8c6e1 100644
--- a/ucb/source/ucp/webdav/SerfSession.cxx
+++ b/ucb/source/ucp/webdav/SerfSession.cxx
@@ -26,7 +26,7 @@
 #include ucbhelper/simplecertificatevalidationrequest.hxx
 
 #include AprEnv.hxx
-#include apr_strings.h
+#include apr/apr_strings.h
 
 #include DAVAuthListener.hxx
 #include SerfTypes.hxx
@@ -43,6 +43,10 @@
 #include com/sun/star/security/CertificateContainerStatus.hpp
 #include com/sun/star/security/CertificateContainer.hpp
 #include com/sun/star/security/XCertificateContainer.hpp
+#include com/sun/star/security/CertAltNameEntry.hpp
+#include com/sun/star/security/XSanExtension.hpp
+#define OID_SUBJECT_ALTERNATIVE_NAME 2.5.29.17
+
 #include com/sun/star/ucb/Lock.hpp
 #include com/sun/star/xml/crypto/XSEInitializer.hpp
 
@@ -461,7 +465,40 @@ apr_status_t SerfSession::verifySerfCertificateChain (
 
 // When the certificate matches the host name then we can use the
 // result of the verification.
-if (isDomainMatch(sServerCertificateSubject))
+bool bHostnameMatchesCertHostnames = false;
+{
+uno::Sequence uno::Reference security::XCertificateExtension   
extensions = xServerCertificate-getExtensions();
+uno::Sequence security::CertAltNameEntry  altNames;
+for (sal_Int32 i = 0 ; i  extensions.getLength(); ++i)
+{
+uno::Reference security::XCertificateExtension element = 
extensions[i];
+
+const rtl::OString aId ( (const sal_Char 
*)element-getExtensionId().getArray(), element-getExtensionId().getLength());
+if ( aId.equals( OID_SUBJECT_ALTERNATIVE_NAME ) )
+{
+uno::Reference security::XSanExtension  sanExtension ( 
element, uno::UNO_QUERY );
+altNames =  sanExtension-getAlternativeNames();
+break;
+}
+}
+
+uno::Sequence ::rtl::OUString  certHostNames(altNames.getLength() + 
1);
+certHostNames[0] = sServerCertificateSubject;
+for( int n = 0; n  altNames.getLength(); ++n )
+{
+if (altNames[n].Type ==  security::ExtAltNameType_DNS_NAME)
+{
+altNames[n].Value = certHostNames[n+1];
+}
+}
+
+for ( int i = 0; i  certHostNames.getLength()  
!bHostnameMatchesCertHostnames; ++i )
+{
+bHostnameMatchesCertHostnames = isDomainMatch( certHostNames[i] );
+}
+
+}
+if ( bHostnameMatchesCertHostnames )
 {
 
 if (nVerificationResult == 0)
@@ -508,8 +545,7 @@ apr_status_t SerfSession::verifySerfCertificateChain (
 
 if ( xSelection.is() )
 {
-uno::Reference task::XInteractionApprove  xApprove(
-xSelection.get(), uno::UNO_QUERY );
+uno::Reference task::XInteractionApprove  xApprove( 
xSelection.get(), uno::UNO_QUERY );
 if ( xApprove.is() )
 {
 xCertificateContainer-addCertificate( getHostName(), 
sServerCertificateSubject,  sal_True );
diff --git a/ucb/source/ucp/webdav/SerfTypes.hxx 
b/ucb/source/ucp/webdav/SerfTypes.hxx
index b396697..5be06a6 100644
--- a/ucb/source/ucp/webdav/SerfTypes.hxx
+++ b/ucb/source/ucp/webdav/SerfTypes.hxx
@@ -22,7 +22,7 @@
 #ifndef INCLUDED_SERFTYPES_HXX
 #define INCLUDED_SERFTYPES_HXX
 
-#include serf.h
+#include serf/serf.h
 
 typedef serf_connection_t SerfConnection;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - i18nutil/source sw/source vcl/source

2014-01-20 Thread Oliver-Rainer Wittmann
 i18nutil/source/utility/unicode.cxx |2 +-
 sw/source/core/text/inftxt.hxx  |1 -
 sw/source/core/text/portxt.cxx  |   10 ++
 vcl/source/control/field.cxx|   11 ++-
 4 files changed, 21 insertions(+), 3 deletions(-)

New commits:
commit 6789e6de929c7685cf1573170534891aeffe5fa1
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Jan 20 10:57:12 2014 +

Resolves: #i124039# assure correct line break for multi-lined Input Fields

(cherry picked from commit 14e0270c3ebad9a1fb817fcfced2aa8ee2f3e3f0)

Change-Id: If5664a5260e683cd5a80885b3f39b04f85de8db9

diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index b6e40b7..3ce3972 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -594,7 +594,6 @@ public:
 inline void Right( const SwTwips nNew ) { nRight = nNew; }
 inline SwTwips First() const { return nFirst; }
 inline void First( const SwTwips nNew ) { nFirst = nNew; }
-inline SwTwips CurrLeft() const { return (nLineStart ? nLeft : nFirst); }
 inline KSHORT RealWidth() const { return nRealWidth; }
 inline void RealWidth( const KSHORT nNew ) { nRealWidth = nNew; }
 inline KSHORT ForcedLeftMargin() const { return nForcedLeftMargin; }
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 50767f1..bab1eb8 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -733,6 +733,12 @@ sal_Bool SwTxtInputFldPortion::Format( SwTxtFormatInfo 
rInf )
 }
 else
 {
+const sal_Int32 nFormerLineStart = rInf.GetLineStart();
+if ( !mbContainsInputFieldStart )
+{
+rInf.SetLineStart( 0 );
+}
+
 bRet = SwTxtPortion::Format( rInf );
 
 if ( mbContainsInputFieldEnd )
@@ -749,6 +755,10 @@ sal_Bool SwTxtInputFldPortion::Format( SwTxtFormatInfo 
rInf )
 // adjust portion length accordingly
 SetLen( GetLen() + 1 );
 }
+else
+{
+rInf.SetLineStart( nFormerLineStart );
+}
 }
 }
 
commit 062e6f76ba26d2c0a54a476a1168202bae2322a7
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Jan 20 13:31:17 2014 +

Related: #i56998# use locale rules to format percentage

Change-Id: I2cdeefc5a5a1ee970ee3da5191ceae28b58340a1

diff --git a/i18nutil/source/utility/unicode.cxx 
b/i18nutil/source/utility/unicode.cxx
index 56daacd..0fb6b72 100644
--- a/i18nutil/source/utility/unicode.cxx
+++ b/i18nutil/source/utility/unicode.cxx
@@ -955,7 +955,7 @@ OUString SAL_CALL unicode::formatPercent(double dNumber,
 }
 
 UnicodeString output;
-xF-format(dNumber, output);
+xF-format(dNumber/100, output);
 return OUString(reinterpret_castconst sal_Unicode *(output.getBuffer()),
 output.length());
 }
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 9a0e569..b765ded 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1423,13 +1423,22 @@ void MetricFormatter::SetValue( sal_Int64 nNewValue, 
FieldUnit eInUnit )
 
 OUString MetricFormatter::CreateFieldText( sal_Int64 nValue ) const
 {
+//whether percent is separated from its number is locale
+//specific, pawn it off to icu to decide
+if (meUnit == FUNIT_PERCENT)
+{
+double dValue = nValue;
+dValue /= ImplPower10(GetDecimalDigits());
+return unicode::formatPercent(dValue, 
Application::GetSettings().GetUILanguageTag());
+}
+
 OUString aStr = NumericFormatter::CreateFieldText( nValue );
 
 if( meUnit == FUNIT_CUSTOM )
 aStr += maCustomUnitText;
 else
 {
-if (meUnit != FUNIT_NONE  meUnit != FUNIT_PERCENT  meUnit != 
FUNIT_DEGREE)
+if (meUnit != FUNIT_NONE  meUnit != FUNIT_DEGREE)
 aStr +=  ;
 aStr += ImplMetricToString( meUnit );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - writerfilter/source

2014-01-20 Thread Oliver-Rainer Wittmann
 writerfilter/source/dmapper/DomainMapper.cxx |   29 +++
 1 file changed, 21 insertions(+), 8 deletions(-)

New commits:
commit 3771f2a8da98fd1ef2ac40a18a2c104c3087b327
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Jan 20 17:54:32 2014 +

124058: *.docx import - check existence of Style before accessing it

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 742b3cb..2778fec 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2263,32 +2263,45 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 break;  // sprmPBrcl
 case NS_sprm::LN_PBrcp:
 break;  // sprmPBrcp
+
 case NS_sprm::LN_PIlvl: // sprmPIlvl
 /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 1 */
 /* WRITERFILTERSTATUS: comment:  */
-//todo: Numbering level will be implemented in the near future (OOo 
3.0?)
-if( m_pImpl-IsStyleSheetImport() )
+{
+StyleSheetPropertyMap* pStyleSheetPropertyMap = NULL;
+if ( m_pImpl-IsStyleSheetImport() )
 {
-//style sheets cannot have a numbering rule attached
 StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast 
StyleSheetPropertyMap* ( rContext.get() );
+}
+
+if ( pStyleSheetPropertyMap != NULL )
+{
 pStyleSheetPropertyMap-SetListLevel( (sal_Int16)nIntValue );
 }
 else
+{
 rContext-Insert( PROP_NUMBERING_LEVEL, true, uno::makeAny( 
(sal_Int16)nIntValue ));
+}
+}
 break;
+
 case NS_sprm::LN_PIlfo: // sprmPIlfo
 /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 1 */
 /* WRITERFILTERSTATUS: comment:  */
 {
 //convert the ListTable entry to a NumberingRules propery and 
apply it
+StyleSheetPropertyMap* pStyleSheetPropertyMap = NULL;
+if ( m_pImpl-IsStyleSheetImport() )
+{
+StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast 
StyleSheetPropertyMap* ( rContext.get() );
+}
+
 ListsManager::Pointer pListTable = m_pImpl-GetListTable();
 ListDef::Pointer pList = pListTable-GetList( nIntValue );
 if( pList.get( ) )
 {
-if( m_pImpl-IsStyleSheetImport() )
+if ( pStyleSheetPropertyMap != NULL )
 {
-//style sheets cannot have a numbering rule attached
-StyleSheetPropertyMap* pStyleSheetPropertyMap = 
dynamic_cast StyleSheetPropertyMap* ( rContext.get() );
 pStyleSheetPropertyMap-SetListId( nIntValue );
 }
 else
@@ -2299,10 +2312,9 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 }
 else
 {
-if( m_pImpl-IsStyleSheetImport() )
+if ( pStyleSheetPropertyMap != NULL )
 {
 // set the number id for AbstractNum references
-StyleSheetPropertyMap* pStyleSheetPropertyMap = 
dynamic_cast StyleSheetPropertyMap* ( rContext.get() );
 pStyleSheetPropertyMap-SetNumId( nIntValue );
 }
 else
@@ -2313,6 +2325,7 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext, SprmType
 }
 }
 break;
+
 case NS_sprm::LN_PFNoLineNumb:   // sprmPFNoLineNumb
 /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 1 */
 /* WRITERFILTERSTATUS: comment:  */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source

2014-01-17 Thread Oliver-Rainer Wittmann
 sw/source/core/doc/docbm.cxx   |   66 +++--
 sw/source/core/inc/MarkManager.hxx |1 
 2 files changed, 50 insertions(+), 17 deletions(-)

New commits:
commit 93ab293354bb322a7d57b7eaf21bcd2479453e87
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Fri Jan 17 07:28:17 2014 +

123480: method ::sw::mark::deleteMarks(..) - assure sorting of subset 
mark containers before the intrinsic deletion of marks

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index f87d12e..8201088 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -105,7 +105,9 @@ namespace
 pMark);
 }
 
-static inline ::std::auto_ptrSwPosition 
lcl_PositionFromCntntNode(SwCntntNode * const pCntntNode, const bool 
bAtEnd=false)
+static inline ::std::auto_ptrSwPosition lcl_PositionFromCntntNode(
+SwCntntNode * const pCntntNode,
+const bool bAtEnd=false)
 {
 ::std::auto_ptrSwPosition pResult(new SwPosition(*pCntntNode));
 pResult-nContent.Assign(pCntntNode, bAtEnd ? pCntntNode-Len() : 0);
@@ -116,20 +118,30 @@ namespace
 // else set it to the begin of the Node after rEnd, if there is one
 // else set it to the end of the node before rStt
 // else set it to the CntntNode of the Pos outside the Range
-static inline ::std::auto_ptrSwPosition lcl_FindExpelPosition(const 
SwNodeIndex rStt,
+static inline ::std::auto_ptrSwPosition lcl_FindExpelPosition(
+const SwNodeIndex rStt,
 const SwNodeIndex rEnd,
 const SwPosition rOtherPosition)
 {
 SwCntntNode * pNode = rEnd.GetNode().GetCntntNode();
-SwNodeIndex aStt = SwNodeIndex(rStt);
-SwNodeIndex aEnd = SwNodeIndex(rEnd);
-bool bAtEnd = false;
-if(!pNode)
-pNode = rEnd.GetNodes().GoNext(aEnd), bAtEnd = false;
-if(!pNode)
-pNode = rStt.GetNodes().GoPrevious(aStt), bAtEnd = true;
-if(pNode)
-return lcl_PositionFromCntntNode(pNode, bAtEnd);
+bool bPosAtEndOfNode = false;
+if ( pNode == NULL)
+{
+SwNodeIndex aEnd = SwNodeIndex(rEnd);
+pNode = rEnd.GetNodes().GoNext( aEnd );
+bPosAtEndOfNode = false;
+}
+if ( pNode == NULL )
+{
+SwNodeIndex aStt = SwNodeIndex(rStt);
+pNode = rStt.GetNodes().GoPrevious(aStt);
+bPosAtEndOfNode = true;
+}
+if ( pNode != NULL )
+{
+return lcl_PositionFromCntntNode( pNode, bPosAtEndOfNode );
+}
+
 return ::std::auto_ptrSwPosition(new SwPosition(rOtherPosition));
 };
 
@@ -648,6 +660,9 @@ namespace sw { namespace mark
 ::std::vectorconst_iterator_t vMarksToDelete;
 bool bIsSortingNeeded = false;
 
+// boolean indicating, if at least one mark has been moved while 
colleting marks for deletion
+bool bMarksMoved = false;
+
 // copy all bookmarks in the move area to a vector storing all 
position data as offset
 // reassignment is performed after the move
 for(iterator_t ppMark = m_vAllMarks.begin();
@@ -730,7 +745,8 @@ namespace sw { namespace mark
 }
 else
 {
-pNewPos = lcl_FindExpelPosition( rStt, rEnd, 
bIsPosInRange ? pMark-GetOtherMarkPos() : pMark-GetMarkPos() );
+pNewPos =
+lcl_FindExpelPosition( rStt, rEnd, bIsPosInRange ? 
pMark-GetOtherMarkPos() : pMark-GetMarkPos() );
 }
 }
 
@@ -758,6 +774,7 @@ namespace sw { namespace mark
 pMark-SetMarkPos(*pNewPos);
 else
 pMark-SetOtherMarkPos(*pNewPos);
+bMarksMoved = true;
 
 // illegal selection? collapse the mark and restore 
sorting later
 bIsSortingNeeded |= lcl_FixCorrectedMark( bIsPosInRange, 
bIsOtherPosInRange, pMark );
@@ -765,18 +782,28 @@ namespace sw { namespace mark
 }
 }
 
+// If needed, sort mark containers containing subsets of the marks in 
order to assure sorting.
+// The sorting is critical for the deletion of a mark as it is 
searched in these container for deletion.
+if ( vMarksToDelete.size()  0  bMarksMoved )
+{
+sortSubsetMarks();
+}
 // we just remembered the iterators to delete, so we do not need to 
search
 // for the shared_ptr (the entry in m_vAllMarks) again
 // reverse iteration, since erasing an entry invalidates iterators
 // behind it (the iterators in vMarksToDelete are sorted)
 for ( ::std::vector const_iterator_t ::reverse_iterator pppMark = 
vMarksToDelete.rbegin();
-pppMark != vMarksToDelete.rend();
-pppMark++)
+  pppMark

[Libreoffice-commits] core.git: 3 commits - editeng/source include/xmloff sc/source xmloff/source

2014-01-16 Thread Oliver-Rainer Wittmann
 editeng/source/editeng/impedit2.cxx |8 -
 editeng/source/misc/splwrap.cxx |2 
 include/xmloff/txtparae.hxx |   11 ++
 include/xmloff/xmlexp.hxx   |   18 ++--
 sc/source/ui/dbgui/dbnamdlg.cxx |2 
 xmloff/source/core/xmlexp.cxx   |  154 +++-
 xmloff/source/text/txtimp.cxx   |3 
 xmloff/source/text/txtparae.cxx |  137 ++--
 xmloff/source/text/txtparai.cxx |  100 ---
 9 files changed, 244 insertions(+), 191 deletions(-)

New commits:
commit 5f9d7ab963dbc1e13e4645fcef954cb8772cbb63
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jan 14 13:10:51 2014 +

Resolves: #i123457# suppress import and export of hyperlinks without an URL

(cherry picked from commit 71d322a8ce0f5f5cbfd66fd689ff10b3490c1ee4)

Conflicts:
include/xmloff/xmlexp.hxx
xmloff/source/core/xmlexp.cxx
xmloff/source/text/txtparae.cxx
xmloff/source/text/txtparai.cxx

Change-Id: Ie8291c93c86815cab68482b35a5e88a3bd9b731e

diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index 585cc3f..87b32fc 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -105,6 +105,17 @@ public:
 
 enum FieldmarkType { NONE, TEXT, CHECK }; // Used for simulating 
fieldmarks in OpenDocument 1.n Strict (for n = 2). CHECK currently ignored.
 
+
+void exportTextRangeSpan(
+const ::com::sun::star::uno::Reference 
com::sun::star::text::XTextRange   rTextRange,
+::com::sun::star::uno::Reference 
::com::sun::star::beans::XPropertySet   xPropSet,
+::com::sun::star::uno::Reference  
::com::sun::star::beans::XPropertySetInfo   xPropSetInfo,
+const sal_Bool bIsUICharStyle,
+const sal_Bool bHasAutoStyle,
+const OUString sStyle,
+bool rPrevCharIsSpace,
+FieldmarkType openFieldMark);
+
 protected:
 
 const OUString sActualSize;
diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx
index b734777..2e77c5c 100644
--- a/include/xmloff/xmlexp.hxx
+++ b/include/xmloff/xmlexp.hxx
@@ -654,14 +654,16 @@ inline void SvXMLExport::SetGraphicResolver(
 // Helper class to export an element.
 class XMLOFF_DLLPUBLIC SvXMLElementExport
 {
-SvXMLExport rExport;
-OUString aName;
-sal_Bool bIgnWS : 1;
-sal_Bool bDoSomething : 1;
-
-SAL_DLLPRIVATE void StartElement( SvXMLExport rExp, sal_uInt16 nPrefix,
-   const OUString rName,
-   sal_Bool bIgnWSOutside );
+SvXMLExport mrExport;
+OUString maElementName;
+const sal_Bool mbIgnoreWhitespaceInside :1;
+const sal_Bool mbDoSomething :1;
+
+SAL_DLLPRIVATE
+void StartElement(
+const sal_uInt16 nPrefix,
+const OUString rName,
+const sal_Bool bIgnoreWhitespaceOutside );
 
 public:
 
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index cd9d54f..0c9e3dc 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -2531,83 +2531,95 @@ sal_Bool SvXMLExport::SetNullDateOnUnitConverter()
 return mpImpl-mbNullDateInitialized;
 }
 
-void SvXMLElementExport::StartElement( SvXMLExport rExp,
-   sal_uInt16 nPrefixKey,
-   const OUString rLName,
-   sal_Bool bIWSOutside )
-{
-aName = rExp.GetNamespaceMap().GetQNameByKey(nPrefixKey, rLName);
-rExp.StartElement(aName, bIWSOutside);
-}
-
-SvXMLElementExport::SvXMLElementExport( SvXMLExport rExp,
-sal_uInt16 nPrefixKey,
-const sal_Char *pLName,
-sal_Bool bIWSOutside,
-sal_Bool bIWSInside ) :
-rExport( rExp ),
-bIgnWS( bIWSInside ),
-bDoSomething( sal_True )
-{
-OUString sLName( OUString::createFromAscii(pLName) );
-StartElement( rExp, nPrefixKey, sLName, bIWSOutside );
-}
-
-SvXMLElementExport::SvXMLElementExport( SvXMLExport rExp,
-sal_uInt16 nPrefixKey,
-const OUString rLName,
-sal_Bool bIWSOutside,
-sal_Bool bIWSInside ) :
-rExport( rExp ),
-bIgnWS( bIWSInside ),
-bDoSomething( sal_True )
-{
-StartElement( rExp, nPrefixKey, rLName, bIWSOutside );
-}
-
-SvXMLElementExport::SvXMLElementExport( SvXMLExport rExp,
-sal_uInt16 nPrefixKey,
-enum XMLTokenEnum eLName,
-sal_Bool bIWSOutside,
-sal_Bool bIWSInside ) :
-rExport( rExp ),
-bIgnWS( bIWSInside ),
-bDoSomething( sal_True

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - sc/source sw/source

2014-01-16 Thread Oliver-Rainer Wittmann
 sc/source/ui/view/cellsh1.cxx |   11 +---
 sw/source/core/doc/docbm.cxx  |   97 +-
 2 files changed, 64 insertions(+), 44 deletions(-)

New commits:
commit ae295f7d009842cdceb50c4daffe948ede2b4b88
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Thu Jan 16 11:47:18 2014 +

124030 - ::sw::mark::MarkManager::deleteMarks(..) - do not delete UNO 
mark which are not expanded and only touch the start of the given range.

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 07890d6..f87d12e 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -60,19 +60,25 @@
 #include stdio.h
 
 
-using namespace ::std;
 using namespace ::sw::mark;
 
 namespace
 {
 static bool lcl_GreaterThan( const SwPosition rPos, const SwNodeIndex 
rNdIdx, const SwIndex* pIdx )
 {
-return pIdx ? ( rPos.nNode  rNdIdx || ( rPos.nNode == rNdIdx  
rPos.nContent = pIdx-GetIndex() )) : rPos.nNode = rNdIdx;
+return pIdx != NULL
+   ? ( rPos.nNode  rNdIdx
+   || ( rPos.nNode == rNdIdx
+ rPos.nContent = pIdx-GetIndex() ) )
+   : rPos.nNode = rNdIdx;
 }
 
 static bool lcl_Lower( const SwPosition rPos, const SwNodeIndex rNdIdx, 
const SwIndex* pIdx )
 {
-return rPos.nNode  rNdIdx || ( pIdx  rPos.nNode == rNdIdx  
rPos.nContent  pIdx-GetIndex() );
+return rPos.nNode  rNdIdx
+   || ( pIdx != NULL
+ rPos.nNode == rNdIdx
+ rPos.nContent  pIdx-GetIndex() );
 }
 
 static bool lcl_MarkOrderingByStart(const IDocumentMarkAccess::pMark_t 
rpFirst,
@@ -99,9 +105,9 @@ namespace
 pMark);
 }
 
-static inline auto_ptrSwPosition lcl_PositionFromCntntNode(SwCntntNode * 
const pCntntNode, const bool bAtEnd=false)
+static inline ::std::auto_ptrSwPosition 
lcl_PositionFromCntntNode(SwCntntNode * const pCntntNode, const bool 
bAtEnd=false)
 {
-auto_ptrSwPosition pResult(new SwPosition(*pCntntNode));
+::std::auto_ptrSwPosition pResult(new SwPosition(*pCntntNode));
 pResult-nContent.Assign(pCntntNode, bAtEnd ? pCntntNode-Len() : 0);
 return pResult;
 }
@@ -110,7 +116,7 @@ namespace
 // else set it to the begin of the Node after rEnd, if there is one
 // else set it to the end of the node before rStt
 // else set it to the CntntNode of the Pos outside the Range
-static inline auto_ptrSwPosition lcl_FindExpelPosition(const 
SwNodeIndex rStt,
+static inline ::std::auto_ptrSwPosition lcl_FindExpelPosition(const 
SwNodeIndex rStt,
 const SwNodeIndex rEnd,
 const SwPosition rOtherPosition)
 {
@@ -124,7 +130,7 @@ namespace
 pNode = rStt.GetNodes().GoPrevious(aStt), bAtEnd = true;
 if(pNode)
 return lcl_PositionFromCntntNode(pNode, bAtEnd);
-return auto_ptrSwPosition(new SwPosition(rOtherPosition));
+return ::std::auto_ptrSwPosition(new SwPosition(rOtherPosition));
 };
 
 static IMark* lcl_getMarkAfter(const IDocumentMarkAccess::container_t 
rMarks, const SwPosition rPos)
@@ -154,7 +160,7 @@ namespace
 rMarks.begin(),
 pCandidatesEnd,
 back_inserter(vCandidates),
-bind(logical_notbool(), bind(IMark::EndsBefore, _1, rPos)));
+boost::bind( ::std::logical_notbool(), bind( IMark::EndsBefore, 
_1, rPos ) ) );
 // no candidate left = we are in front of the first mark or there are 
none
 if(!vCandidates.size()) return NULL;
 // return the highest (last) candidate using mark end ordering
@@ -639,8 +645,8 @@ namespace sw { namespace mark
 const SwIndex* pSttIdx,
 const SwIndex* pEndIdx )
 {
-vectorconst_iterator_t vMarksToDelete;
-bool isSortingNeeded = false;
+::std::vectorconst_iterator_t vMarksToDelete;
+bool bIsSortingNeeded = false;
 
 // copy all bookmarks in the move area to a vector storing all 
position data as offset
 // reassignment is performed after the move
@@ -655,60 +661,76 @@ namespace sw { namespace mark
 
 ::sw::mark::MarkBase* pMark = dynamic_cast ::sw::mark::MarkBase* 
(ppMark-get());
 // on position ??
-bool isPosInRange = (lcl_GreaterThan(pMark-GetMarkPos(), rStt, 
pSttIdx) 
-lcl_Lower(pMark-GetMarkPos(), rEnd, pEndIdx));
-bool isOtherPosInRange = (pMark-IsExpanded() 
-lcl_GreaterThan(pMark-GetOtherMarkPos(), rStt, pSttIdx) 
-lcl_Lower(pMark-GetOtherMarkPos(), rEnd, pEndIdx));
+bool bIsPosInRange = lcl_GreaterThan(pMark-GetMarkPos(), rStt, 
pSttIdx)
+  lcl_Lower(pMark-GetMarkPos(), rEnd, 
pEndIdx);
+bool bIsOtherPosInRange = pMark-IsExpanded()
+   
lcl_GreaterThan(pMark-GetOtherMarkPos

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - xmloff/inc xmloff/source

2014-01-14 Thread Oliver-Rainer Wittmann
 xmloff/inc/xmloff/txtparae.hxx  |   12 +
 xmloff/inc/xmloff/xmlexp.hxx|   18 +-
 xmloff/source/core/xmlexp.cxx   |  220 ---
 xmloff/source/text/txtimp.cxx   |3 
 xmloff/source/text/txtparae.cxx |  279 
 xmloff/source/text/txtparai.cxx |  100 +++---
 6 files changed, 278 insertions(+), 354 deletions(-)

New commits:
commit 71d322a8ce0f5f5cbfd66fd689ff10b3490c1ee4
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jan 14 13:10:51 2014 +

123457: improve ODF filter - suppress import and export of hyperlinks 
without an URL

diff --git a/xmloff/inc/xmloff/txtparae.hxx b/xmloff/inc/xmloff/txtparae.hxx
index 01e1ba9..d25a597 100644
--- a/xmloff/inc/xmloff/txtparae.hxx
+++ b/xmloff/inc/xmloff/txtparae.hxx
@@ -107,13 +107,21 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public 
XMLStyleExport
 ::rtl::OUString sOpenRubyCharStyle;
 sal_BoolbOpenRuby;
 
-// -- OD 2008-05-07 #refactorlists#
 XMLTextListsHelper* mpTextListsHelper;
 ::std::vector XMLTextListsHelper*  maTextListsHelperStack;
-// --
 
 enum FrameType { FT_TEXT, FT_GRAPHIC, FT_EMBEDDED, FT_SHAPE };
 
+
+void exportTextRangeSpan(
+const ::com::sun::star::uno::Reference 
com::sun::star::text::XTextRange   rTextRange,
+::com::sun::star::uno::Reference 
::com::sun::star::beans::XPropertySet   xPropSet,
+::com::sun::star::uno::Reference  
::com::sun::star::beans::XPropertySetInfo   xPropSetInfo,
+const sal_Bool bIsUICharStyle,
+const sal_Bool bHasAutoStyle,
+const ::rtl::OUString sStyle,
+sal_Bool rPrevCharIsSpace );
+
 protected:
 
 const ::rtl::OUString sActualSize;
diff --git a/xmloff/inc/xmloff/xmlexp.hxx b/xmloff/inc/xmloff/xmlexp.hxx
index 44012cf..162b2c4 100644
--- a/xmloff/inc/xmloff/xmlexp.hxx
+++ b/xmloff/inc/xmloff/xmlexp.hxx
@@ -684,14 +684,16 @@ inline void SvXMLExport::SetGraphicResolver(
 // Helper class to export an element.
 class XMLOFF_DLLPUBLIC SvXMLElementExport
 {
-SvXMLExport rExport;
-::rtl::OUString aName;
-sal_Bool bIgnWS : 1;
-sal_Bool bDoSomething : 1;
-
-SAL_DLLPRIVATE void StartElement( SvXMLExport rExp, sal_uInt16 nPrefix,
-   const ::rtl::OUString rName,
-   sal_Bool bIgnWSOutside );
+SvXMLExport mrExport;
+::rtl::OUString maElementName;
+const sal_Bool mbIgnoreWhitespaceInside :1;
+const sal_Bool mbDoSomething :1;
+
+SAL_DLLPRIVATE
+void StartElement(
+const sal_uInt16 nPrefix,
+const ::rtl::OUString rName,
+const sal_Bool bIgnoreWhitespaceOutside );
 
 public:
 
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 3c875b1..3f48d7d 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -2627,12 +2627,10 @@ SvXMLExport::AddAttributesRDFa(
 mpImpl-mpRDFaHelper-AddRDFa(xMeta);
 }
 
-// -- OD 2008-11-26 #158694#
 sal_Bool SvXMLExport::exportTextNumberElement() const
 {
 return mpImpl-mbExportTextNumberElement;
 }
-// --
 
 sal_Bool SvXMLExport::SetNullDateOnUnitConverter()
 {
@@ -2643,116 +2641,132 @@ sal_Bool SvXMLExport::SetNullDateOnUnitConverter()
 return mpImpl-mbNullDateInitialized;
 }
 
-//=
 
-void SvXMLElementExport::StartElement( SvXMLExport rExp,
-   sal_uInt16 nPrefixKey,
-   const OUString rLName,
-   sal_Bool bIWSOutside )
-{
-aName = rExp.GetNamespaceMap().GetQNameByKey(nPrefixKey, rLName);
-rExp.StartElement(aName, bIWSOutside);
-}
-
-SvXMLElementExport::SvXMLElementExport( SvXMLExport rExp,
-sal_uInt16 nPrefixKey,
-const sal_Char *pLName,
-sal_Bool bIWSOutside,
-sal_Bool bIWSInside ) :
-rExport( rExp ),
-bIgnWS( bIWSInside ),
-bDoSomething( sal_True )
-{
-OUString sLName( OUString::createFromAscii(pLName) );
-StartElement( rExp, nPrefixKey, sLName, bIWSOutside );
-}
-
-SvXMLElementExport::SvXMLElementExport( SvXMLExport rExp,
-sal_uInt16 nPrefixKey,
-const OUString rLName,
-sal_Bool bIWSOutside,
-sal_Bool bIWSInside ) :
-rExport( rExp ),
-bIgnWS( bIWSInside ),
-bDoSomething( sal_True )
-{
-StartElement( rExp, nPrefixKey, rLName, bIWSOutside );
-}
-
-SvXMLElementExport::SvXMLElementExport( SvXMLExport rExp,
-sal_uInt16 nPrefixKey,
-enum XMLTokenEnum eLName

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/inc sw/source

2014-01-09 Thread Oliver-Rainer Wittmann
 sw/inc/fmtinfmt.hxx|  111 -
 sw/source/core/doc/doctxm.cxx  |   20 +
 sw/source/core/txtnode/fmtatr2.cxx |  141 +++--
 sw/source/core/txtnode/txtatr2.cxx |   36 -
 sw/source/filter/ww8/ww8atr.cxx|   10 +-
 sw/source/filter/ww8/ww8par5.cxx   |   16 +---
 sw/source/ui/chrdlg/chardlg.cxx|   33 
 sw/source/ui/shells/txtattr.cxx|   35 +
 8 files changed, 229 insertions(+), 173 deletions(-)

New commits:
commit c15b814d6e8ea429287def9a0bf3ac71db414119
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Thu Jan 9 12:59:28 2014 +

123988: assure that hyperlink attribute (SwFmtINetFmt) always provides 
character style names for visited and unvisited state

diff --git a/sw/inc/fmtinfmt.hxx b/sw/inc/fmtinfmt.hxx
index 276f8df..e7c4652 100644
--- a/sw/inc/fmtinfmt.hxx
+++ b/sw/inc/fmtinfmt.hxx
@@ -38,15 +38,15 @@ class SW_DLLPUBLIC SwFmtINetFmt: public SfxPoolItem
 {
 friend class SwTxtINetFmt;
 
-String aURL;// die URL
-String aTargetFrame;// in diesen Frame soll die URL
-String aINetFmt;
-String aVisitedFmt;
-String aName;   // Name des Links
-SvxMacroTableDtor* pMacroTbl;
-SwTxtINetFmt* pTxtAttr; // mein TextAttribut
-sal_uInt16 nINetId;
-sal_uInt16 nVisitedId;
+String msURL;   // die URL
+String msTargetFrame;   // in diesen Frame soll die URL
+String msINetFmtName;
+String msVisitedFmtName;
+String msHyperlinkName; // Name des Links
+SvxMacroTableDtor* mpMacroTbl;
+SwTxtINetFmt* mpTxtAttr;// mein TextAttribut
+sal_uInt16 mnINetFmtId;
+sal_uInt16 mnVisitedFmtId;
 public:
 SwFmtINetFmt( const String rURL, const String rTarget );
 SwFmtINetFmt( const SwFmtINetFmt rAttr );
@@ -70,34 +70,81 @@ public:
 sal_uInt8 nMemberId = 0 );
 
 
-const SwTxtINetFmt* GetTxtINetFmt() const   { return pTxtAttr; }
-SwTxtINetFmt* GetTxtINetFmt()   { return pTxtAttr; }
-
-const String GetValue() const  { return aURL; }
-
-const String GetName() const   { return aName; }
-void SetName( const String rNm )   { aName = rNm; }
-
-const String GetTargetFrame() const{ return aTargetFrame; }
-
-const String GetINetFmt() const{ return aINetFmt; }
-void SetINetFmt( const String rNm ){ aINetFmt = rNm; }
-
-const String GetVisitedFmt() const { return aVisitedFmt; }
-void SetVisitedFmt( const String rNm ) { aVisitedFmt = rNm; }
-
-sal_uInt16 GetINetFmtId() const { return nINetId; }
-void SetINetFmtId( sal_uInt16 nNew ){ nINetId = nNew; }
-
-sal_uInt16 GetVisitedFmtId() const  { return nVisitedId; }
-void SetVisitedFmtId( sal_uInt16 nNew ) { nVisitedId = nNew; }
+const SwTxtINetFmt* GetTxtINetFmt() const
+{
+return mpTxtAttr;
+}
+SwTxtINetFmt* GetTxtINetFmt()
+{
+return mpTxtAttr;
+}
+
+const String GetValue() const
+{
+return msURL;
+}
+
+const String GetName() const
+{
+return msHyperlinkName;
+}
+void SetName( const String rNm )
+{
+msHyperlinkName = rNm;
+}
+
+const String GetTargetFrame() const
+{
+return msTargetFrame;
+}
+
+void SetINetFmtAndId(
+const String rNm,
+const sal_uInt16 nId )
+{
+msINetFmtName = rNm;
+mnINetFmtId = nId;
+}
+
+const String GetINetFmt() const
+{
+return msINetFmtName;
+}
+
+sal_uInt16 GetINetFmtId() const
+{
+return mnINetFmtId;
+}
+
+void SetVisitedFmtAndId(
+const String rNm,
+const sal_uInt16 nId )
+{
+msVisitedFmtName = rNm;
+mnVisitedFmtId = nId;
+}
+
+const String GetVisitedFmt() const
+{
+return msVisitedFmtName;
+}
+
+sal_uInt16 GetVisitedFmtId() const
+{
+return mnVisitedFmtId;
+}
 
 // setze eine neue oder loesche die akt. MakroTabelle
 void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
-const SvxMacroTableDtor* GetMacroTbl() const{ return pMacroTbl; }
+const SvxMacroTableDtor* GetMacroTbl() const
+{
+return mpMacroTbl;
+}
 
 // setze / erfrage ein Makro
-void SetMacro( sal_uInt16 nEvent, const SvxMacro rMacro );
+void SetMacro(
+sal_uInt16 nEvent,
+const SvxMacro rMacro );
 const SvxMacro* GetMacro( sal_uInt16 nEvent ) const;
 };
 
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index e2f07aa..bf33301 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1877,20 +1877,12 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 
nArrayIdx

[Libreoffice-commits] core.git: sw/inc sw/source

2014-01-09 Thread Oliver-Rainer Wittmann
 sw/inc/fmtinfmt.hxx|  111 +-
 sw/source/core/doc/doctxm.cxx  |   20 +
 sw/source/core/txtnode/fmtatr2.cxx |  135 -
 sw/source/core/txtnode/txtatr2.cxx |   36 -
 sw/source/filter/ww8/ww8atr.cxx|   12 +--
 sw/source/filter/ww8/ww8par5.cxx   |   16 +---
 sw/source/ui/chrdlg/chardlg.cxx|   33 +
 sw/source/ui/shells/txtattr.cxx|   31 
 8 files changed, 225 insertions(+), 169 deletions(-)

New commits:
commit 74593273655e475017bb2bd45aba3c6b132e372d
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Thu Jan 9 12:59:28 2014 +

Resolves: #i123988# assure that hyperlink attribute...

(SwFmtINetFmt) always provides character style names for visited and
unvisited state

(cherry picked from commit c15b814d6e8ea429287def9a0bf3ac71db414119)

Conflicts:
sw/inc/fmtinfmt.hxx
sw/source/core/doc/doctxm.cxx
sw/source/core/txtnode/fmtatr2.cxx
sw/source/core/txtnode/txtatr2.cxx
sw/source/filter/ww8/ww8atr.cxx
sw/source/filter/ww8/ww8par5.cxx
sw/source/ui/chrdlg/chardlg.cxx
sw/source/ui/shells/txtattr.cxx

Change-Id: Ib23d55a299d0d78a2eba18dd5c1c0327c816da56

diff --git a/sw/inc/fmtinfmt.hxx b/sw/inc/fmtinfmt.hxx
index fbdaf2e..2179751 100644
--- a/sw/inc/fmtinfmt.hxx
+++ b/sw/inc/fmtinfmt.hxx
@@ -33,15 +33,15 @@ class SW_DLLPUBLIC SwFmtINetFmt: public SfxPoolItem
 {
 friend class SwTxtINetFmt;
 
-OUString aURL;  /// URL.
-OUString aTargetFrame;  /// Target frame for URL.
-OUString aINetFmt;
-OUString aVisitedFmt;
-OUString aName; /// Name of the link.
-SvxMacroTableDtor* pMacroTbl;
-SwTxtINetFmt* pTxtAttr; /// My TextAttribute.
-sal_uInt16 nINetId;
-sal_uInt16 nVisitedId;
+OUString msURL;  /// URL.
+OUString msTargetFrame;  /// Target frame for URL.
+OUString msINetFmtName;
+OUString msVisitedFmtName;
+OUString msHyperlinkName;/// Name of the link.
+SvxMacroTableDtor* mpMacroTbl;
+SwTxtINetFmt* mpTxtAttr; /// My TextAttribute.
+sal_uInt16 mnINetFmtId;
+sal_uInt16 mnVisitedFmtId;
 public:
 SwFmtINetFmt( const OUString rURL, const OUString rTarget );
 SwFmtINetFmt( const SwFmtINetFmt rAttr );
@@ -65,34 +65,81 @@ public:
 sal_uInt8 nMemberId = 0 );
 
 
-const SwTxtINetFmt* GetTxtINetFmt() const   { return pTxtAttr; }
-SwTxtINetFmt* GetTxtINetFmt()   { return pTxtAttr; }
-
-OUString GetValue() const   { return aURL; }
-
-OUString GetName() const{ return aName; }
-void SetName( const OUString rNm ) { aName = rNm; }
-
-OUString GetTargetFrame() const { return aTargetFrame; }
-
-OUString GetINetFmt() const { return aINetFmt; }
-void SetINetFmt( const OUString rNm )  { aINetFmt = rNm; }
-
-OUString GetVisitedFmt() const{ return aVisitedFmt; }
-void SetVisitedFmt( const OUString rNm ) { aVisitedFmt = rNm; }
-
-sal_uInt16 GetINetFmtId() const { return nINetId; }
-void SetINetFmtId( sal_uInt16 nNew ){ nINetId = nNew; }
-
-sal_uInt16 GetVisitedFmtId() const  { return nVisitedId; }
-void SetVisitedFmtId( sal_uInt16 nNew ) { nVisitedId = nNew; }
+const SwTxtINetFmt* GetTxtINetFmt() const
+{
+return mpTxtAttr;
+}
+SwTxtINetFmt* GetTxtINetFmt()
+{
+return mpTxtAttr;
+}
+
+const OUString GetValue() const
+{
+return msURL;
+}
+
+const OUString GetName() const
+{
+return msHyperlinkName;
+}
+void SetName( const OUString rNm )
+{
+msHyperlinkName = rNm;
+}
+
+const OUString GetTargetFrame() const
+{
+return msTargetFrame;
+}
+
+void SetINetFmtAndId(
+const OUString rNm,
+const sal_uInt16 nId )
+{
+msINetFmtName = rNm;
+mnINetFmtId = nId;
+}
+
+const OUString GetINetFmt() const
+{
+return msINetFmtName;
+}
+
+sal_uInt16 GetINetFmtId() const
+{
+return mnINetFmtId;
+}
+
+void SetVisitedFmtAndId(
+const OUString rNm,
+const sal_uInt16 nId )
+{
+msVisitedFmtName = rNm;
+mnVisitedFmtId = nId;
+}
+
+const OUString GetVisitedFmt() const
+{
+return msVisitedFmtName;
+}
+
+sal_uInt16 GetVisitedFmtId() const
+{
+return mnVisitedFmtId;
+}
 
 /// Set a new MacroTable or clear the current one.
 void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
-const SvxMacroTableDtor* GetMacroTbl() const{ return pMacroTbl; }
+const SvxMacroTableDtor* GetMacroTbl() const
+{
+return mpMacroTbl;
+}
 
 /// Macro getter and setter

[Libreoffice-commits] core.git: sw/inc sw/source xmloff/source

2014-01-09 Thread Oliver-Rainer Wittmann
 sw/inc/IDocumentMarkAccess.hxx |2 
 sw/inc/doc.hxx |   27 ++--
 sw/source/core/crsr/annotationmark.cxx |1 
 sw/source/core/doc/docbm.cxx   |  104 -
 sw/source/core/doc/doccorr.cxx |   20 +++---
 sw/source/core/undo/undobj.cxx |   13 +++-
 sw/source/core/unocore/unoobj.cxx  |   72 +-
 sw/source/ui/docvw/SidebarWin.cxx  |   25 ++-
 sw/source/ui/shells/textfld.cxx|3 
 sw/source/ui/wrtsh/wrtsh2.cxx  |   21 +-
 xmloff/source/text/txtfldi.cxx |4 -
 11 files changed, 192 insertions(+), 100 deletions(-)

New commits:
commit 6af2caab7271e11d9501fd6a597e05194d33fd10
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Wed Jan 8 14:20:43 2014 +

Resolves: #i123792# correction for comments/annotations on table cell ranges

(cherry picked from commit c25523dd3a302d1bd36297a817a869afb3605d1f)

Conflicts:
sw/inc/IDocumentMarkAccess.hxx
sw/inc/doc.hxx
sw/source/core/doc/docbm.cxx
sw/source/core/undo/undobj.cxx
sw/source/ui/shells/textfld.cxx
xmloff/source/text/txtfldi.cxx

Change-Id: Ic2e12f47e7775ee16f31bedf89d5644b18734d7a

diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx
index 917a57f..271266f 100644
--- a/sw/inc/IDocumentMarkAccess.hxx
+++ b/sw/inc/IDocumentMarkAccess.hxx
@@ -262,7 +262,7 @@ class IDocumentMarkAccess
 
 /** Returns the MarkType used to create the mark
 */
-static MarkType SAL_DLLPUBLIC_EXPORT GetType(const ::sw::mark::IMark 
rMark);
+static SAL_DLLPUBLIC_EXPORT MarkType GetType(const ::sw::mark::IMark 
rMark);
 
 static SAL_DLLPUBLIC_EXPORT OUString 
GetCrossRefHeadingBookmarkNamePrefix();
 static SAL_DLLPUBLIC_EXPORT bool IsLegalPaMForCrossRefHeadingBookmark( 
const SwPaM rPaM );
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 48b7b80..de4487c 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1467,20 +1467,31 @@ public:
 // If bMoveCrsr is set move Crsr too.
 
 /// Set everything in rOldNode on rNewPos + Offset.
-void CorrAbs( const SwNodeIndex rOldNode, const SwPosition rNewPos,
-const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = 
sal_False );
+void CorrAbs(
+const SwNodeIndex rOldNode,
+const SwPosition rNewPos,
+const xub_StrLen nOffset = 0,
+sal_Bool bMoveCrsr = sal_False );
 
 /// Set everything in the range of [rStartNode, rEndNode] to rNewPos.
-void CorrAbs( const SwNodeIndex rStartNode, const SwNodeIndex rEndNode,
-const SwPosition rNewPos, sal_Bool bMoveCrsr = sal_False 
);
+void CorrAbs(
+const SwNodeIndex rStartNode,
+const SwNodeIndex rEndNode,
+const SwPosition rNewPos,
+sal_Bool bMoveCrsr = sal_False );
 
 /// Set everything in this range from rRange to rNewPos.
-void CorrAbs( const SwPaM rRange, const SwPosition rNewPos,
-sal_Bool bMoveCrsr = sal_False );
+void CorrAbs(
+const SwPaM rRange,
+const SwPosition rNewPos,
+sal_Bool bMoveCrsr = sal_False );
 
 /// Set everything in rOldNode to relative Pos.
-void CorrRel( const SwNodeIndex rOldNode, const SwPosition rNewPos,
-const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = 
sal_False );
+void CorrRel(
+const SwNodeIndex rOldNode,
+const SwPosition rNewPos,
+const xub_StrLen nOffset = 0,
+sal_Bool bMoveCrsr = sal_False );
 
 /// Query / set rules for Outline.
 inline SwNumRule* GetOutlineNumRule() const
diff --git a/sw/source/core/crsr/annotationmark.cxx 
b/sw/source/core/crsr/annotationmark.cxx
index 964e736..80751a4 100644
--- a/sw/source/core/crsr/annotationmark.cxx
+++ b/sw/source/core/crsr/annotationmark.cxx
@@ -54,6 +54,7 @@ namespace sw { namespace mark
 SwTxtFld* pTxtFld =
 GetMarkEnd().nNode.GetNode().GetTxtNode()-GetFldTxtAttrAt(
 GetMarkEnd().nContent.GetIndex()-1, true );
+OSL_ENSURE( pTxtFld != NULL, AnnotationMark::InitDoc(..) - missing 
text attribute for annotation field! );
 if ( pTxtFld != NULL )
 {
 const SwPostItField* pPostItField = dynamic_cast const 
SwPostItField* (pTxtFld-GetFmtFld().GetField());
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 194680f..e914069 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -156,18 +156,34 @@ namespace
 return max_element(vCandidates.begin(), vCandidates.end(), 
lcl_MarkOrderingByEnd)-get();
 }
 
-static bool lcl_FixCorrectedMark(bool bChangedPos, bool bChangedOPos, 
MarkBase* io_pMark)
+static bool lcl_FixCorrectedMark(
+const bool bChangedPos,
+const bool bChangedOPos,
+MarkBase* io_pMark )
 {
-if( (bChangedPos

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/inc sw/source xmloff/source

2014-01-08 Thread Oliver-Rainer Wittmann
 sw/inc/IDocumentMarkAccess.hxx |2 
 sw/inc/doc.hxx |   38 ---
 sw/source/core/crsr/annotationmark.cxx |1 
 sw/source/core/doc/docbm.cxx   |  106 -
 sw/source/core/doc/doccorr.cxx |   20 +++---
 sw/source/core/undo/undobj.cxx |   13 +++-
 sw/source/core/unocore/unoobj.cxx  |   72 +-
 sw/source/ui/docvw/SidebarWin.cxx  |   25 ++-
 sw/source/ui/shells/textfld.cxx|3 
 sw/source/ui/wrtsh/wrtsh2.cxx  |   21 +-
 xmloff/source/text/txtfldi.cxx |4 -
 11 files changed, 200 insertions(+), 105 deletions(-)

New commits:
commit c25523dd3a302d1bd36297a817a869afb3605d1f
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Wed Jan 8 14:20:43 2014 +

123792: correction for comments/annotations on table cell ranges

diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx
index d263d0e..7cde48a 100644
--- a/sw/inc/IDocumentMarkAccess.hxx
+++ b/sw/inc/IDocumentMarkAccess.hxx
@@ -260,7 +260,7 @@ class IDocumentMarkAccess
 virtual const_iterator_t findAnnotationMark( const ::rtl::OUString 
rName ) const = 0;
 
 // Returns the MarkType used to create the mark
-static MarkType SAL_DLLPUBLIC_EXPORT GetType(const ::sw::mark::IMark 
rMark);
+static SAL_DLLPUBLIC_EXPORT MarkType GetType(const ::sw::mark::IMark 
rMark);
 
 static SAL_DLLPUBLIC_EXPORT const ::rtl::OUString 
GetCrossRefHeadingBookmarkNamePrefix();
 static SAL_DLLPUBLIC_EXPORT bool IsLegalPaMForCrossRefHeadingBookmark( 
const SwPaM );
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 3f67f86..d18e58b 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1491,18 +1491,32 @@ public:
 // wie z.B. die ::com::sun::star::text::Bookmarks oder die 
Verzeichnisse.
 // JP 22.06.95: ist bMoveCrsr gesetzt, verschiebe auch die Crsr
 
-// Setzt alles in rOldNode auf rNewPos + Offset
-void CorrAbs( const SwNodeIndex rOldNode, const SwPosition rNewPos,
-const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = 
sal_False );
-// Setzt alles im Bereich von [rStartNode, rEndNode] nach rNewPos
-void CorrAbs( const SwNodeIndex rStartNode, const SwNodeIndex rEndNode,
-const SwPosition rNewPos, sal_Bool bMoveCrsr = sal_False 
);
-// Setzt alles im Bereich von rRange nach rNewPos
-void CorrAbs( const SwPaM rRange, const SwPosition rNewPos,
-sal_Bool bMoveCrsr = sal_False );
-// Setzt alles in rOldNode auf relative Pos
-void CorrRel( const SwNodeIndex rOldNode, const SwPosition rNewPos,
-const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = 
sal_False );
+// Setzt alles in rOldNode auf rNewPos + Offset
+void CorrAbs(
+const SwNodeIndex rOldNode,
+const SwPosition rNewPos,
+const xub_StrLen nOffset = 0,
+sal_Bool bMoveCrsr = sal_False );
+
+// Setzt alles im Bereich von [rStartNode, rEndNode] nach rNewPos
+void CorrAbs(
+const SwNodeIndex rStartNode,
+const SwNodeIndex rEndNode,
+const SwPosition rNewPos,
+sal_Bool bMoveCrsr = sal_False );
+
+// Setzt alles im Bereich von rRange nach rNewPos
+void CorrAbs(
+const SwPaM rRange,
+const SwPosition rNewPos,
+sal_Bool bMoveCrsr = sal_False );
+
+// Setzt alles in rOldNode auf relative Pos
+void CorrRel(
+const SwNodeIndex rOldNode,
+const SwPosition rNewPos,
+const xub_StrLen nOffset = 0,
+sal_Bool bMoveCrsr = sal_False );
 
 // GliederungsRegeln erfragen / setzen
 // -- OD 2005-11-02 #i51089 - TUNING#
diff --git a/sw/source/core/crsr/annotationmark.cxx 
b/sw/source/core/crsr/annotationmark.cxx
index 1c81537..47a92d0 100755
--- a/sw/source/core/crsr/annotationmark.cxx
+++ b/sw/source/core/crsr/annotationmark.cxx
@@ -60,6 +60,7 @@ namespace sw { namespace mark
 SwTxtFld* pTxtFld =
 GetMarkEnd().nNode.GetNode().GetTxtNode()-GetFldTxtAttrAt(
 GetMarkEnd().nContent.GetIndex()-1, true );
+ASSERT( pTxtFld != NULL, AnnotationMark::InitDoc(..) - missing text 
attribute for annotation field! );
 if ( pTxtFld != NULL )
 {
 const SwPostItField* pPostItField = dynamic_cast const 
SwPostItField* (pTxtFld-GetFmtFld().GetField());
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index fc091af..07890d6 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -161,18 +161,34 @@ namespace
 return max_element(vCandidates.begin(), vCandidates.end(), 
lcl_MarkOrderingByEnd)-get();
 }
 
-static bool lcl_FixCorrectedMark(bool bChangedPos, bool bChangedOPos, 
MarkBase* io_pMark)
+static bool lcl_FixCorrectedMark(
+const bool bChangedPos,
+const bool bChangedOPos,
+MarkBase

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - oox/source sw/source writerfilter/source

2014-01-02 Thread Oliver-Rainer Wittmann
 oox/source/xls/worksheethelper.cxx|   20 
 sw/source/core/unocore/unoidx.cxx |   20 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |2 +-
 3 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit 67ddd5bd3a66f2b440c651d1d073131a59a57f77
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Thu Jan 2 11:19:29 2014 +

123910: removing duplicate code

diff --git a/oox/source/xls/worksheethelper.cxx 
b/oox/source/xls/worksheethelper.cxx
index 0f84cad..8174341 100644
--- a/oox/source/xls/worksheethelper.cxx
+++ b/oox/source/xls/worksheethelper.cxx
@@ -1093,26 +1093,6 @@ void WorksheetGlobals::finalizeValidationRanges() const
 {
 }
 
-try
-{
-sal_Int32 nIndex = 0;
-OUString aToken = aIt-msRef.getToken( 0, ' ', nIndex );
-
-ReferenceXSpreadsheet xSheet = getSheetFromDoc( 
getCurrentSheetIndex() );
-ReferenceXCellRange xDBCellRange;
-ReferenceXCell xCell;
-xDBCellRange = xSheet-getCellRangeByName( aToken );
-
-xCell = xDBCellRange-getCellByPosition( 0, 0 );
-ReferenceXCellAddressable xCellAddressable( xCell, 
UNO_QUERY_THROW );
-CellAddress aFirstCell = xCellAddressable-getCellAddress();
-ReferenceXSheetCondition xCondition( xValidation, 
UNO_QUERY_THROW );
-xCondition-setSourcePosition( aFirstCell );
-}
-catch( Exception )
-{
-}
-
 // convert validation type to API enum
 ValidationType eType = ValidationType_ANY;
 switch( aIt-mnType )
commit 875f8fb79613875296139a6cbdbae265a92d7a32
Author: Steve Yin stev...@apache.org
Date:   Thu Jan 2 10:46:03 2014 +

Bug 119568 - [From Symphony] The page number of the TOC is not correct if 
open the .docx via AOO

diff --git a/sw/source/core/unocore/unoidx.cxx 
b/sw/source/core/unocore/unoidx.cxx
index eb4c251..be0572b 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -67,6 +67,7 @@
 #include chpfld.hxx
 #include SwStyleNameMapper.hxx
 #include unoevtlstnr.hxx
+#include editsh.hxx
 
 
 using namespace ::com::sun::star;
@@ -583,6 +584,21 @@ throw (uno::RuntimeException)
 /*-- 14.12.98 09:35:05---
 
   ---*/
+void lcl_CalcLayout(SwDoc *pDoc)
+{
+ViewShell *pViewShell = 0;
+SwEditShell* pEditShell = pDoc ? pDoc-GetEditShell(pViewShell) : 0;
+if (pEditShell)
+{
+pEditShell-CalcLayout();
+}
+else if (pViewShell)
+{
+pViewShell-CalcLayout();
+}
+
+}
+
 void SAL_CALL SwXDocumentIndex::update() throw (uno::RuntimeException)
 {
 vos::OGuard aGuard(Application::GetSolarMutex());
@@ -595,6 +611,10 @@ void SAL_CALL SwXDocumentIndex::update() throw 
(uno::RuntimeException)
 throw uno::RuntimeException();
 }
 pTOXBase-Update();
+
+// the insertion of TOC will affect the document layout
+lcl_CalcLayout(m_pImpl-m_pDoc);
+
 // page numbers
 pTOXBase-UpdatePageNum();
 }
commit e3a84634fd6a033b838485346c274552d5bd8d8c
Author: Steve Yin stev...@apache.org
Date:   Thu Jan 2 10:17:34 2014 +

Bug 119577 - [From Symphony] The file name field change to file name 
without extension in AOO 3.4

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index a0380f9..eab3b0b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3078,7 +3078,7 @@ void DomainMapper_Impl::CloseFieldCommand()
 sal_Int32 nNumberingTypeIndex = 
pContext-GetCommand().indexOf( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\\p)));
 xFieldProperties-setPropertyValue(
 rPropNameSupplier.GetName(PROP_FILE_FORMAT),
-uno::makeAny( nNumberingTypeIndex  0 ? 
text::FilenameDisplayFormat::FULL : text::FilenameDisplayFormat::NAME ));
+uno::makeAny( nNumberingTypeIndex  0 ? 
text::FilenameDisplayFormat::FULL : text::FilenameDisplayFormat::NAME_AND_EXT 
));
 }
 break;
 case FIELD_FILESIZE : break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source

2013-12-10 Thread Oliver-Rainer Wittmann
 sw/source/core/crsr/swcrsr.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 382814ccb30bfe71f093e55e23802447caca235d
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Dec 10 15:24:52 2013 +

33737: correction: assure the selections does not start/end inside a table 
while end/start of the selection is outside the table

diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 9dd182a..6922b16 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -471,8 +471,8 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
 }
 }
 
-const SwTableNode* pPtNd = pNd-FindTableNode();
-const SwTableNode* pMrkNd = pNd-FindTableNode();
+const SwTableNode* pPtNd = GetPoint()-nNode.GetNode().FindTableNode();
+const SwTableNode* pMrkNd = GetMark()-nNode.GetNode().FindTableNode();
 // beide in keinem oder beide im gleichen TableNode
 if( ( !pMrkNd  !pPtNd ) || pPtNd == pMrkNd )
 return sal_False;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2013-12-10 Thread Oliver-Rainer Wittmann
 sw/source/core/crsr/swcrsr.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 3fc6fc2ff7304a0d1bc85bd2e03fb3fbab492c9a
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Dec 10 15:24:52 2013 +

Related: #i33737# correction: assure the selections does not...

start/end inside a table while end/start of the selection is outside the 
table

(cherry picked from commit 382814ccb30bfe71f093e55e23802447caca235d)

Conflicts:
sw/source/core/crsr/swcrsr.cxx

Change-Id: Ibcbd9b18538ce04abfae11e75b30d6897a62e268

diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 7241157..014a006 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -448,10 +448,9 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
 }
 }
 
+const SwTableNode* pPtNd = GetPoint()-nNode.GetNode().FindTableNode();
+const SwTableNode* pMrkNd = GetMark()-nNode.GetNode().FindTableNode();
 // both in no or in same table node
-const SwTableNode* pPtNd = pNd-FindTableNode();
-const SwTableNode* pMrkNd = pNd-FindTableNode();
-// beide in keinem oder beide im gleichen TableNode
 if( ( !pMrkNd  !pPtNd ) || pPtNd == pMrkNd )
 return sal_False;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/source

2013-12-10 Thread Oliver-Rainer Wittmann
 sw/source/core/crsr/swcrsr.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 33cbbd3a3a969b8ffd1e0155d5c84da8e1a2f863
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Dec 10 15:24:52 2013 +

Related: #i33737# correction: assure the selections does not...

start/end inside a table while end/start of the selection is outside the 
table

(cherry picked from commit 382814ccb30bfe71f093e55e23802447caca235d)

Conflicts:
sw/source/core/crsr/swcrsr.cxx

Change-Id: Ibcbd9b18538ce04abfae11e75b30d6897a62e268
(cherry picked from commit 3fc6fc2ff7304a0d1bc85bd2e03fb3fbab492c9a)

diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index dcd81fb..d27ebca 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -448,10 +448,9 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
 }
 }
 
+const SwTableNode* pPtNd = GetPoint()-nNode.GetNode().FindTableNode();
+const SwTableNode* pMrkNd = GetMark()-nNode.GetNode().FindTableNode();
 // both in no or in same table node
-const SwTableNode* pPtNd = pNd-FindTableNode();
-const SwTableNode* pMrkNd = pNd-FindTableNode();
-// beide in keinem oder beide im gleichen TableNode
 if( ( !pMrkNd  !pPtNd ) || pPtNd == pMrkNd )
 return sal_False;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   3   >