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

2014-09-29 Thread Cao Cuong Ngo

___
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/76/3176/3'

2014-09-29 Thread Cao Cuong Ngo

___
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/76/3176/5'

2014-09-29 Thread Cao Cuong Ngo

___
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/76/3176/4'

2014-09-29 Thread Cao Cuong Ngo

___
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/76/3176/2'

2014-09-29 Thread Cao Cuong Ngo

___
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/12/3312/4'

2014-09-29 Thread Cao Cuong Ngo

___
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/12/3312/2'

2014-09-29 Thread Cao Cuong Ngo

___
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/02/3202/2'

2014-09-29 Thread Cao Cuong Ngo

___
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/27/3127/1'

2014-09-29 Thread Cao Cuong Ngo

___
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/12/3312/1'

2014-09-29 Thread Cao Cuong Ngo

___
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/27/3127/2'

2014-09-29 Thread Cao Cuong Ngo

___
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/12/3312/3'

2014-09-29 Thread Cao Cuong Ngo

___
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/02/3202/1'

2014-09-29 Thread Cao Cuong Ngo

___
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/3156/1'

2014-09-29 Thread Cao Cuong Ngo

___
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/64/3464/1'

2014-09-29 Thread Cao Cuong Ngo

___
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/64/3464/2'

2014-09-29 Thread Cao Cuong Ngo

___
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/52/3352/1'

2014-09-29 Thread Cao Cuong Ngo

___
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/69/3369/5'

2014-09-29 Thread Cao Cuong Ngo

___
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/69/3369/1'

2014-09-29 Thread Cao Cuong Ngo

___
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/69/3369/4'

2014-09-29 Thread Cao Cuong Ngo

___
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/69/3369/3'

2014-09-29 Thread Cao Cuong Ngo

___
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/69/3369/2'

2014-09-29 Thread Cao Cuong Ngo

___
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/79/3479/1'

2014-09-29 Thread Cao Cuong Ngo

___
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/25/5925/2'

2014-09-29 Thread Cao Cuong Ngo

___
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/25/5925/3'

2014-09-29 Thread Cao Cuong Ngo

___
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/25/5925/1'

2014-09-29 Thread Cao Cuong Ngo

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


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

2013-09-27 Thread Cao Cuong Ngo
 sfx2/source/doc/objserv.cxx|   24 
 sfx2/source/view/sfxbasecontroller.cxx |   19 ---
 2 files changed, 28 insertions(+), 15 deletions(-)

New commits:
commit 4fd449b1ca4dce9f1425fc035291651bfc510a3e
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Fri Sep 27 21:42:14 2013 +0200

Google Drive files don't need Checkout bar.

Plus, the Name property has been changed to Id,
that was the reason the Checkin bar disappeared.

Change-Id: I03f6ef4e1399c0f8b2a347ca8acd8a42daffa497

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index fc40769..3a2ce2e 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -947,17 +947,22 @@ void SfxObjectShell::GetState_Impl(SfxItemSet rSet)
 if ( xCmisDoc-isVersionable( )  
aCmisProperties.hasElements( ) )
 {
 // Loop over the CMIS Properties to find 
cmis:isVersionSeriesCheckedOut
-bool bFoundCheckedout = false;
+bool bIsGoogleFile = false;
 sal_Bool bCheckedOut = sal_False;
-for ( sal_Int32 i = 0; i  aCmisProperties.getLength() 
 !bFoundCheckedout; ++i )
+for ( sal_Int32 i = 0; i  
aCmisProperties.getLength(); ++i )
 {
-if ( aCmisProperties[i].Name == 
cmis:isVersionSeriesCheckedOut )
+if ( aCmisProperties[i].Id == 
cmis:isVersionSeriesCheckedOut )
 {
-bFoundCheckedout = true;
-aCmisProperties[i].Value = bCheckedOut;
+uno::Sequence sal_Bool  bTmp;
+aCmisProperties[i].Value = bTmp;
+bCheckedOut = bTmp[0];
 }
+// using title to know if it's a Google Drive file
+// maybe there's a safer way.
+if ( aCmisProperties[i].Name == title )
+bIsGoogleFile = true;
 }
-bShow = !bCheckedOut;
+bShow = !bCheckedOut  !bIsGoogleFile;
 }
 
 if ( !bShow )
@@ -982,10 +987,13 @@ void SfxObjectShell::GetState_Impl(SfxItemSet rSet)
 sal_Bool bCheckedOut = sal_False;
 for ( sal_Int32 i = 0; i  aCmisProperties.getLength() 
 !bFoundCheckedout; ++i )
 {
-if ( aCmisProperties[i].Name == 
cmis:isVersionSeriesCheckedOut )
+if ( aCmisProperties[i].Id == 
cmis:isVersionSeriesCheckedOut )
 {
 bFoundCheckedout = true;
-aCmisProperties[i].Value = bCheckedOut;
+uno::Sequence sal_Bool  bTmp;
+aCmisProperties[i].Value = bTmp;
+bCheckedOut = bTmp[0];
+
 }
 }
 bShow = bCheckedOut;
diff --git a/sfx2/source/view/sfxbasecontroller.cxx 
b/sfx2/source/view/sfxbasecontroller.cxx
index 5ebbf71..a119281 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1434,18 +1434,23 @@ void SfxBaseController::ShowInfoBars( )
 if ( xCmisDoc-isVersionable( )  aCmisProperties.hasElements( ) )
 {
 // Loop over the CMIS Properties to find 
cmis:isVersionSeriesCheckedOut
-bool bFoundCheckedout = false;
+// and find if it is a Google Drive file.
+bool bIsGoogleFile = false;
 sal_Bool bCheckedOut = sal_False;
-for ( sal_Int32 i = 0; i  aCmisProperties.getLength()  
!bFoundCheckedout; ++i )
+for ( sal_Int32 i = 0; i  aCmisProperties.getLength(); ++i )
 {
-if ( aCmisProperties[i].Name == 
cmis:isVersionSeriesCheckedOut )
-{
-bFoundCheckedout = true;
-aCmisProperties[i].Value = bCheckedOut;
+if ( aCmisProperties[i].Id == 
cmis:isVersionSeriesCheckedOut ) {
+uno::Sequence sal_Bool  bTmp;
+aCmisProperties[i].Value = bTmp;
+bCheckedOut = bTmp[0];
 }
+// if it is a Google Drive file, we don't need the 
checkout bar,
+// still need the checkout feature for the version dialog.
+if ( aCmisProperties[i].Name == title )
+bIsGoogleFile = true

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

2013-09-26 Thread Cao Cuong Ngo
 comphelper/source/misc/mediadescriptor.cxx |   21 ++---
 sfx2/source/doc/docfile.cxx|5 +++--
 ucb/source/ucp/cmis/cmis_content.cxx   |   25 -
 ucb/source/ucp/cmis/cmis_url.cxx   |3 +--
 4 files changed, 42 insertions(+), 12 deletions(-)

New commits:
commit 86218bda0d74fc5bfc877b5c12d594d527207b11
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Thu Sep 26 16:13:18 2013 +0200

Fix fdo#68894 Cmis crashes on start up.

The reason of the crash is that the recent file opening
feature can't get the session automatically.

Change-Id: I6890c04cfdafc81d19c6b2b2024896df040fe091

diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 48556ed..0022a8a 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -364,6 +364,17 @@ namespace cmis
 
 libcmis::ObjectPtr Content::getObject( const uno::Reference 
ucb::XCommandEnvironment  xEnv ) throw ( libcmis::Exception )
 {
+// can't get the session for some reason
+// the recent file openning at start up is an example.
+try
+{
+if ( !getSession( xEnv ) )
+return m_pObject;
+}
+catch ( uno::RuntimeException )
+{
+return m_pObject;
+}
 if ( !m_pObject.get() )
 {
 if ( !m_sObjectId.isEmpty( ) )
commit 34f4d2574987b272681b5843e8f5edc374f55fde
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Sat Sep 21 23:36:06 2013 +0200

CMIS file picker: it really does not like ID Mark

The file picker can't go back folder if we use
ID mark in the URL.

Conflicts:
ucb/source/ucp/cmis/cmis_content.cxx

Change-Id: I6985feec71dc23848ee022e0bab9e8515a21ffd2

diff --git a/comphelper/source/misc/mediadescriptor.cxx 
b/comphelper/source/misc/mediadescriptor.cxx
index 7fd7d5f..21361f5 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -47,6 +47,23 @@
 
 namespace comphelper{
 
+namespace {
+
+OUString removeFragment(OUString const  uri) {
+css::uno::Reference css::uri::XUriReference  ref(
+css::uri::UriReferenceFactory::create(
+comphelper::getProcessComponentContext())-
+parse(uri));
+if (ref.is()) {
+ref-clearFragment();
+return ref-getUriReference();
+} else {
+SAL_WARN(comphelper, cannot parse   uri  );
+return uri;
+}
+}
+}
+
 const OUString MediaDescriptor::PROP_ABORTED()
 {
 static const OUString sProp(Aborted);
@@ -467,9 +484,7 @@ sal_Bool MediaDescriptor::impl_addInputStream( sal_Bool 
bLockFile )
 css::uno::Reference css::uno::XInterface ());
 
 // Parse URL! Only the main part has to be used further. E.g. a 
jumpmark can make trouble
-// We need to keep the full URL with Mark to store the Object ID
-// in CMIS UCB
-return impl_openStreamWithURL( sURL, bLockFile );
+return impl_openStreamWithURL( removeFragment(sURL), bLockFile );
 }
 catch(const css::uno::Exception ex)
 {
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 710ea5f..329cfb8 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2479,7 +2479,7 @@ void SfxMedium::Init_Impl()
 {
 if ( aUrl.HasMark() )
 {
-// keep the Mark to store the Document ID
+pImp-m_aLogicName = aUrl.GetURLNoMark( 
INetURLObject::NO_DECODE );
 GetItemSet()-Put( SfxStringItem( SID_JUMPMARK, aUrl.GetMark() 
) );
 }
 
@@ -2994,7 +2994,8 @@ const INetURLObject SfxMedium::GetURLObject() const
 if (!pImp-m_pURLObj)
 {
 pImp-m_pURLObj = new INetURLObject( pImp-m_aLogicName );
-// keep the Mark to store the Document ID
+if (pImp-m_pURLObj-HasMark())
+*pImp-m_pURLObj = INetURLObject( pImp-m_aLogicName 
).GetURLNoMark();
 }
 
 return *pImp-m_pURLObj;
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 4bc7c3c..48556ed 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -1258,8 +1258,6 @@ namespace cmis
 m_pObjectType.reset( );
 m_pObjectProps.clear( );
 m_bTransient = false;
-uno::Reference ucb::XContentIdentifier  xId(new 
::ucbhelper::ContentIdentifier(m_sURL));
-m_xIdentifier = xId;
 inserted();
 }
 }
@@ -1538,10 +1536,16 @@ namespace cmis
 return parentUrl;
 else
 {
-INetURLObject aParentUrl( m_sURL );
-aParentUrl.removeSegment( );
-return

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

2013-09-26 Thread Cao Cuong Ngo
 sfx2/source/dialog/infobar.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 4cd9024db1898176ed2dc06dfe36a2c71213bb02
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Thu Sep 26 19:14:52 2013 +0200

Fix Infobar crash

The infobar should be added to the infobar list.

Change-Id: I105dd5091daf3596fdd7dd119a07d6160444c673

diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index 82c2c3a..e14b8bb 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -251,6 +251,7 @@ void SfxInfoBarContainerWindow::appendInfoBar( const 
OUString sId, const OUStri
 SfxInfoBarWindow* pInfoBar = new SfxInfoBarWindow( this, sId, sMessage, 
aButtons );
 pInfoBar-SetPosPixel( Point( 0, aSize.getHeight( ) ) );
 pInfoBar-Show( );
+m_pInfoBars.push_back( pInfoBar );
 
 long nHeight = pInfoBar-GetSizePixel( ).getHeight( );
 aSize.setHeight( aSize.getHeight() + nHeight );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: libcmis/libcmis-0.4.1-empty-path.patch libcmis/UnpackedTarball_cmis.mk

2013-09-25 Thread Cao Cuong Ngo
 libcmis/UnpackedTarball_cmis.mk|4 +++-
 libcmis/libcmis-0.4.1-empty-path.patch |   13 +
 2 files changed, 16 insertions(+), 1 deletion(-)

New commits:
commit 781ae59664f91fa55a9aeda3f5d93076e501d65a
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Wed Sep 25 21:13:53 2013 +0200

Fix Google Drive checkout crash.

ID-based protocol don't have path.

Change-Id: I4f1dd4f77870d1c77bbd3cd015dd88396003ed6d

diff --git a/libcmis/UnpackedTarball_cmis.mk b/libcmis/UnpackedTarball_cmis.mk
index 0b2a9fb..d984c85 100644
--- a/libcmis/UnpackedTarball_cmis.mk
+++ b/libcmis/UnpackedTarball_cmis.mk
@@ -13,7 +13,9 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,cmis,$(CMIS_TARBALL)))
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,cmis,0))
 
-$(eval $(call gb_UnpackedTarball_add_patches,cmis,libcmis/libcmis-0.4.1.patch))
+$(eval $(call gb_UnpackedTarball_add_patches,cmis, \
+   libcmis/libcmis-0.4.1.patch \
+   
libcmis/libcmis-0.4.1-empty-path.patch))
 
 ifeq ($(OS)$(COM),WNTMSC)
 $(eval $(call gb_UnpackedTarball_add_patches,cmis,libcmis/boost-win.patch))
diff --git a/libcmis/libcmis-0.4.1-empty-path.patch 
b/libcmis/libcmis-0.4.1-empty-path.patch
new file mode 100644
index 000..c48265d2
--- /dev/null
+++ b/libcmis/libcmis-0.4.1-empty-path.patch
@@ -0,0 +1,13 @@
+diff --git src/libcmis/document.cxx src/libcmis/document.cxx
+index 1af0d63..7ecfd24 100644
+--- src/libcmis/document.cxx
 src/libcmis/document.cxx
+@@ -44,6 +44,8 @@ namespace libcmis
+  it != parents.end(); ++it )
+ {
+ string path = ( *it )-getPath( );
++if ( path.empty() )
++continue;
+ if ( path[path.size() - 1] != '/' )
+ path += /;
+ path += getName( );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sfx2 offapi/com offapi/UnoApi_offapi.mk sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk ucb/source

2013-09-23 Thread Cao Cuong Ngo
 include/sfx2/objsh.hxx |2 
 include/sfx2/sfxbasemodel.hxx  |4 
 offapi/UnoApi_offapi.mk|1 
 offapi/com/sun/star/document/CmisVersion.idl   |   52 +++
 offapi/com/sun/star/document/XCmisDocument.idl |3 
 sfx2/UIConfig_sfx.mk   |1 
 sfx2/source/dialog/versdlg.cxx |  111 
 sfx2/source/doc/objserv.cxx|   15 +
 sfx2/source/doc/sfxbasemodel.cxx   |   23 +
 sfx2/source/inc/versdlg.hxx|   24 +
 sfx2/uiconfig/ui/versionscmis.ui   |  340 +
 sfx2/uiconfig/ui/versionsofdialog.ui   |   16 +
 ucb/source/ucp/cmis/cmis_content.cxx   |   47 +++
 ucb/source/ucp/cmis/cmis_content.hxx   |5 
 14 files changed, 642 insertions(+), 2 deletions(-)

New commits:
commit b61970cfbe12722efd6218db6489980381b8783d
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Thu Sep 12 15:27:37 2013 +0200

Cmis Versions dialog

Change-Id: Ie863282062a6932a55543143e841917c54223ac9
Reviewed-on: https://gerrit.libreoffice.org/5925
Reviewed-by: Bosdonnat Cedric cedric.bosdon...@free.fr
Tested-by: Bosdonnat Cedric cedric.bosdon...@free.fr

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 4d530d9..ee2ff12 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -37,6 +37,7 @@
 #include com/sun/star/security/XDocumentDigitalSignatures.hpp
 #include com/sun/star/task/XInteractionHandler.hpp
 #include com/sun/star/beans/XPropertySet.hpp
+#include com/sun/star/document/CmisVersion.hpp
 #include boost/shared_ptr.hpp
 
 
//
@@ -714,6 +715,7 @@ public:
 SAL_DLLPRIVATE void CheckOut( );
 SAL_DLLPRIVATE void CancelCheckOut( );
 SAL_DLLPRIVATE void CheckIn( );
+SAL_DLLPRIVATE ::com::sun::star::uno::Sequence 
::com::sun::star::document::CmisVersion  GetCmisVersions();
 };
 
 #define SFX_GLOBAL_CLASSID \
diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx
index 084a0f3..fde9aa0 100644
--- a/include/sfx2/sfxbasemodel.hxx
+++ b/include/sfx2/sfxbasemodel.hxx
@@ -33,6 +33,7 @@
 #include com/sun/star/container/XNameReplace.hpp
 #include com/sun/star/frame/XController2.hpp
 #include com/sun/star/document/XCmisDocument.hpp
+#include com/sun/star/document/CmisVersion.hpp
 #include com/sun/star/document/XDocumentPropertiesSupplier.hpp
 #include com/sun/star/document/XDocumentRecovery.hpp
 #include com/sun/star/document/XUndoManagerSupplier.hpp
@@ -1321,6 +1322,9 @@ public:
 css::document::CmisProperty  _cmisproperties )
 throw (css::uno::RuntimeException);
 
+virtual css::uno::Sequence css::document::CmisVersion  SAL_CALL 
getAllVersions ( )
+throw (css::uno::RuntimeException );
+
 virtual void SAL_CALL checkOut(  ) throw ( css::uno::RuntimeException );
 virtual void SAL_CALL cancelCheckOut(  ) throw ( 
css::uno::RuntimeException );
 virtual void SAL_CALL checkIn( sal_Bool bIsMajor, const OUString  
rMessage  )
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index be91841..c97bf41 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -2160,6 +2160,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/document,\
BrokenPackageRequest \
ChangedByOthersRequest \
CmisProperty \
+   CmisVersion \
CorruptedFilterConfigurationException \
DocumentEvent \
EmptyUndoStackException \
diff --git a/offapi/com/sun/star/document/CmisVersion.idl 
b/offapi/com/sun/star/document/CmisVersion.idl
new file mode 100644
index 000..8171283
--- /dev/null
+++ b/offapi/com/sun/star/document/CmisVersion.idl
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the License); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_document_CmisVersion_idl__
+#define __com_sun_star_document_CmisVersion_idl__
+
+#include com/sun/star/util/DateTime.idl
+
+module com {  module sun {  module star {  module

[Libreoffice-commits] core.git: Branch 'feature/cmis' - comphelper/source sfx2/source ucb/source

2013-09-22 Thread Cao Cuong Ngo
 comphelper/source/misc/mediadescriptor.cxx |3 +--
 sfx2/source/doc/docfile.cxx|5 +++--
 ucb/source/ucp/cmis/cmis_content.cxx   |   14 --
 ucb/source/ucp/cmis/cmis_url.cxx   |3 +--
 4 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit bae3c4fc5c82496561d2b156765ebf2257973437
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Sat Sep 21 23:36:06 2013 +0200

CMIS file picker: it really does not like ID Mark

The file picker can't go back folder if we use
ID mark in the URL.

Change-Id: I6985feec71dc23848ee022e0bab9e8515a21ffd2

diff --git a/comphelper/source/misc/mediadescriptor.cxx 
b/comphelper/source/misc/mediadescriptor.cxx
index 21102f2..5ac52ca 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -470,8 +470,7 @@ sal_Bool MediaDescriptor::impl_addInputStream( sal_Bool 
bLockFile )
 css::uno::Reference css::uno::XInterface ());
 
 // Parse URL! Only the main part has to be used further. E.g. a 
jumpmark can make trouble
-// We need to keep the full URL with Mark to store the Object ID
-// in CMIS UCB
+OUString sNormalizedURL = impl_normalizeURL( sURL );
 return impl_openStreamWithURL( sURL, bLockFile );
 }
 #if OSL_DEBUG_LEVEL  0
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index ebd03ea..c59675f 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2492,7 +2492,7 @@ void SfxMedium::Init_Impl()
 {
 if ( aUrl.HasMark() )
 {
-// keep the Mark to store the Document ID
+pImp-m_aLogicName = aUrl.GetURLNoMark( 
INetURLObject::NO_DECODE );
 GetItemSet()-Put( SfxStringItem( SID_JUMPMARK, aUrl.GetMark() 
) );
 }
 
@@ -3007,7 +3007,8 @@ const INetURLObject SfxMedium::GetURLObject() const
 if (!pImp-m_pURLObj)
 {
 pImp-m_pURLObj = new INetURLObject( pImp-m_aLogicName );
-// keep the Mark to store the Document ID
+if (pImp-m_pURLObj-HasMark())
+*pImp-m_pURLObj = INetURLObject( pImp-m_aLogicName 
).GetURLNoMark();
 }
 
 return *pImp-m_pURLObj;
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 76d23b9..685cd4b 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -1222,8 +1222,6 @@ namespace cmis
 m_pObjectType.reset( );
 m_pObjectProps.clear( );
 m_bTransient = false;
-uno::Reference ucb::XContentIdentifier  xId(new 
::ucbhelper::ContentIdentifier(m_sURL));
-m_xIdentifier = xId;
 inserted();
 }
 }
@@ -1501,10 +1499,14 @@ namespace cmis
 return parentUrl;
 else
 {
-INetURLObject aParentUrl( m_sURL );
-string sName = OUSTR_TO_STDSTR( aParentUrl.getName( 
INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ) );
-aParentUrl.removeSegment( );
-return aParentUrl.GetMainURL( INetURLObject::NO_DECODE );
+INetURLObject aUrl( m_sURL );
+if ( aUrl.getSegmentCount( )  0 )
+{
+URL aCmisUrl( m_sURL );
+aUrl.removeSegment( );
+aCmisUrl.setObjectPath( aUrl.GetURLPath( 
INetURLObject::DECODE_WITH_CHARSET ) );
+parentUrl = aCmisUrl.asString( );
+}
 }
 
 return parentUrl;
diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx
index 2468066..a30aeff 100644
--- a/ucb/source/ucp/cmis/cmis_url.cxx
+++ b/ucb/source/ucp/cmis/cmis_url.cxx
@@ -105,8 +105,7 @@ namespace cmis
 }
 while ( nPos != -1 );
 sUrl += sEncodedPath;
-}
-if ( !m_sId.isEmpty( ) )
+} else if ( !m_sId.isEmpty( ) )
 {
 sUrl += # + rtl::Uri::encode( m_sId,
 rtl_UriCharClassRelSegment,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-qa] QA for GSoC project

2013-09-03 Thread Cao Cuong Ngo

Hi all,

So my work has been merged to master :)
If anyone is interested in testing this feature, all you have to do is:

- Have a Google account with some files.
- Open LO, create and save the Google Drive connection in File/Open,
Type CMIS, Server Type Google Drive.
- File bugs!

Thanks,
Cuong.

On 05/28/2013 04:43 PM, Robinson Tryon wrote:
 On Tue, May 28, 2013 at 10:15 AM, Cao Cuong Ngo cao.cuong@gmail.com 
 wrote:
 Hi all,

 I've been selected in GSoC this year, project Extend Support for
 Content Management Systems.

 I will implement the connection to Google Drive and properties/version
 dialog extension of CMIS.
 cool!

 It would be great if someone can volunteer and spend sometimes to help
 testing my future feature .
 When do you think that you'll be ready to provide builds to test?
 Please feel free to just ping the QA list if you need help testing
 something in particular during the summer :-)

 It would be helpful for you to ping the Documentation Team and chat
 about the best way to provide docs on how these new features work (or
 at least are *supposed* to work :-). That way when we test things in
 QA, we can refer to the documentation and make sure that the expected
 behavior and actual behavior are in agreement!

 Cheers,
 --R

___
List Name: Libreoffice-qa mailing list
Mail address: Libreoffice-qa@lists.freedesktop.org
Change settings: http://lists.freedesktop.org/mailman/listinfo/libreoffice-qa
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://lists.freedesktop.org/archives/libreoffice-qa/


[Libreoffice-commits] core.git: Branch 'feature/cmis' - include/sfx2 sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk

2013-08-23 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx |  184 +++-
 sfx2/UIConfig_sfx.mk |1 
 sfx2/source/dialog/dinfdlg.cxx   |  556 ---
 sfx2/source/dialog/dinfdlg.src   |   67 
 sfx2/uiconfig/ui/cmisinfopage.ui |   24 +
 sfx2/uiconfig/ui/cmisline.ui |  151 ++
 6 files changed, 334 insertions(+), 649 deletions(-)

New commits:
commit 3f49c0c5c35ab6a961e0b5a161dc85c7ea43cdff
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Sat Aug 17 22:13:57 2013 +0200

Convert CMIS properties dialog to .ui

Change-Id: I98caf59352bb5e57c7685cb24561ddb2966b6035

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 5528aaa..08d3808 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -19,6 +19,8 @@
 #ifndef _SFX_DINFDLG_HXX
 #define _SFX_DINFDLG_HXX
 
+#include boost/ptr_container/ptr_vector.hpp
+
 #include sal/config.h
 #include sfx2/dllapi.h
 
@@ -40,6 +42,8 @@
 #include vcl/layout.hxx
 #include vcl/lstbox.hxx
 #include vcl/scrbar.hxx
+#include vcl/fixed.hxx
+#include vcl/ctrl.hxx
 
 #include tabdlg.hxx
 
@@ -504,180 +508,88 @@ public:
 static SfxTabPage*  Create( Window* pParent, const SfxItemSet );
 };
 
-struct CmisPropertyLine;
-
-class CmisPropertiesEdit : public Edit
-{
-private:
-CmisPropertyLine* m_pLine;
-
-public:
-inline CmisPropertiesEdit(
-Window* pParent, const ResId rResId, CmisPropertyLine* pLine ) :
-Edit( pParent, rResId ), m_pLine( pLine ) {}
-
-inline CmisPropertyLine*  GetLine() const { return m_pLine; }
-};
-
-class CmisPropertiesDateField : public DateField
-{
-private:
-CmisPropertyLine* m_pLine;
-
-public:
-inline CmisPropertiesDateField(
-Window* pParent, const ResId rResId, CmisPropertyLine* pLine ) :
-DateField( pParent, rResId ), m_pLine( pLine ) {}
-
-inline CmisPropertyLine*  GetLine() const { return m_pLine; }
-};
-class CmisPropertiesTimeField : public TimeField
-{
-private:
-CmisPropertyLine* m_pLine;
-
-public:
-inline CmisPropertiesTimeField(
-Window* pParent, const ResId rResId, CmisPropertyLine* pLine ) :
-TimeField( pParent, rResId ), m_pLine( pLine ) {}
-
-inline CmisPropertyLine*  GetLine() const { return m_pLine; }
-};
-
-class CmisPropertiesEditButton : public PushButton
-{
-CmisPropertyLine* m_pLine;
-
-public:
-CmisPropertiesEditButton( Window* pParent, const ResId rResId, 
CmisPropertyLine* pLine );
-~CmisPropertiesEditButton();
-
-DECL_LINK(ClickHdl, void *);
-};
-
-class CmisPropertiesYesNoButton : public Control
-{
-private:
-RadioButton m_aYesButton;
-RadioButton m_aNoButton;
-
-public:
-CmisPropertiesYesNoButton( Window* pParent, const ResId rResId );
-
-virtual voidResize();
-
-voidSetReadOnly( );
-
-inline void CheckYes() { m_aYesButton.Check(); }
-inline void CheckNo() { m_aNoButton.Check(); }
-inline bool IsYesChecked() const { return m_aYesButton.IsChecked() != 
sal_False; }
-};
-
 // struct CmisPropertyLine -
 
-struct CmisPropertyLine
+struct CmisPropertyLine : public VclBuilderContainer
 {
+VclFrame* m_pFrame;
 OUString  m_sId;
 OUString  m_sType;
 bool  m_bUpdatable;
 bool  m_bRequired;
 bool  m_bMultiValued;
 bool  m_bOpenChoice;
-FixedText m_aName;
-FixedText m_aType;
-CmisPropertiesEditm_aValueEdit;
-CmisPropertiesDateField   m_aDateField;
-CmisPropertiesTimeField   m_aTimeField;
-CmisPropertiesYesNoButton m_aYesNoButton;
-Point m_aDatePos;
-Point m_aTimePos;
-Size  m_aDateTimeSize;
-bool  m_bTypeLostFocus;
+FixedText*m_aName;
+FixedText*m_aType;
+Edit* m_aValueEdit;
+DateField*m_aDateField;
+TimeField*m_aTimeField;
+RadioButton*  m_aYesButton;
+RadioButton*  m_aNoButton;
+
+long getItemHeight() const;
 CmisPropertyLine( Window* pParent );
 };
 
+typedef boost::ptr_vectorCmisPropertyLine CmisPropertiesLines;
 // class CmisPropertiesWindow --
 
-class CmisPropertiesWindow : public Window
+class CmisPropertiesWindow
 {
 private:
-FixedText   m_aName;
-FixedText   m_aType;
-Editm_aValueEdit;
-DateField   m_aDateField;
-TimeField

[Libreoffice-commits] core.git: Branch 'feature/cmis' - 3 commits - include/sfx2 sfx2/source ucb/source

2013-08-23 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx |6 -
 sfx2/source/dialog/dinfdlg.cxx   |  179 ---
 ucb/source/ucp/cmis/cmis_content.cxx |  136 --
 3 files changed, 170 insertions(+), 151 deletions(-)

New commits:
commit 25363f597a1452e4d1497758c3c80101b5aa8e3f
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Fri Aug 23 16:36:11 2013 +0200

CMIS properties: fix update issue

Change-Id: Ia04c588c7491cf9a4a5430b364b52ac89adf2f90

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 08d3808..e9fd2a2 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -531,7 +531,6 @@ struct CmisPropertyLine : public VclBuilderContainer
 CmisPropertyLine( Window* pParent );
 };
 
-typedef boost::ptr_vectorCmisPropertyLine CmisPropertiesLines;
 // class CmisPropertiesWindow --
 
 class CmisPropertiesWindow
@@ -539,11 +538,8 @@ class CmisPropertiesWindow
 private:
 VclBox* m_pBox;
 sal_Int32   m_nItemHeight;
-SvtSysLocalem_aSysLocale;
 SvNumberFormatter   m_aNumberFormatter;
-Timer   m_aEditLoseFocusTimer;
-Timer   m_aBoxLoseFocusTimer;
-CmisPropertiesLines m_aCmisPropertiesLines;
+std::vector CmisPropertyLine* m_aCmisPropertiesLines;
 public:
 CmisPropertiesWindow(SfxTabPage* pParent);
 ~CmisPropertiesWindow();
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 682278c..1c1b3d0 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2136,13 +2136,8 @@ CmisPropertiesWindow::CmisPropertiesWindow(SfxTabPage* 
pParent):
 
 {
 pParent-get(m_pBox, CmisWindow);
-if ( !m_aCmisPropertiesLines.empty())
-m_nItemHeight = m_aCmisPropertiesLines.front().getItemHeight();
-else
-{
-CmisPropertyLine aTemp( m_pBox );
-m_nItemHeight = aTemp.getItemHeight();
-}
+CmisPropertyLine aTemp( m_pBox );
+m_nItemHeight = aTemp.getItemHeight();
 };
 
 CmisPropertiesWindow::~CmisPropertiesWindow()
@@ -2152,6 +2147,13 @@ CmisPropertiesWindow::~CmisPropertiesWindow()
 
 void CmisPropertiesWindow::ClearAllLines()
 {
+std::vector CmisPropertyLine* ::iterator pIter;
+for ( pIter = m_aCmisPropertiesLines.begin();
+  pIter != m_aCmisPropertiesLines.end(); ++pIter )
+{
+CmisPropertyLine* pLine = *pIter;
+delete pLine;
+}
 m_aCmisPropertiesLines.clear();
 }
 
@@ -2243,24 +2245,24 @@ Sequence document::CmisProperty  
CmisPropertiesWindow::GetCmisProperties() con
 {
 Sequence document::CmisProperty  aPropertiesSeq( 
m_aCmisPropertiesLines.size() );
 sal_Int32 i = 0;
-boost::ptr_vector CmisPropertyLine ::const_iterator pIter;
+std::vector CmisPropertyLine* ::const_iterator pIter;
 for ( pIter = m_aCmisPropertiesLines.begin();
 pIter != m_aCmisPropertiesLines.end(); ++pIter, ++i )
 {
-CmisPropertyLine pLine = *pIter;
+CmisPropertyLine* pLine = *pIter;
 
-aPropertiesSeq[i].Id = pLine.m_sId;
-aPropertiesSeq[i].Type = pLine.m_sType;
-aPropertiesSeq[i].Updatable = pLine.m_bUpdatable;
-aPropertiesSeq[i].Required = pLine.m_bRequired;
-aPropertiesSeq[i].OpenChoice = pLine.m_bOpenChoice;
-aPropertiesSeq[i].MultiValued = pLine.m_bMultiValued;
+aPropertiesSeq[i].Id = pLine-m_sId;
+aPropertiesSeq[i].Type = pLine-m_sType;
+aPropertiesSeq[i].Updatable = pLine-m_bUpdatable;
+aPropertiesSeq[i].Required = pLine-m_bRequired;
+aPropertiesSeq[i].OpenChoice = pLine-m_bOpenChoice;
+aPropertiesSeq[i].MultiValued = pLine-m_bMultiValued;
 
-String sPropertyName = pLine.m_aName-GetText();
+String sPropertyName = pLine-m_aName-GetText();
 if ( sPropertyName.Len()  0 )
 {
 aPropertiesSeq[i].Name = sPropertyName;
-OUString sType = pLine.m_aType-GetText( );
+OUString sType = pLine-m_aType-GetText( );
 if ( CMIS_TYPE_INTEGER == sType ||
  CMIS_TYPE_DECIMAL == sType )
 {
@@ -2268,27 +2270,35 @@ Sequence document::CmisProperty  
CmisPropertiesWindow::GetCmisProperties() con
 sal_uInt32 nIndex = const_cast SvNumberFormatter (
 m_aNumberFormatter ).GetFormatIndex( NF_NUMBER_SYSTEM );
 sal_Bool bIsNum = const_cast SvNumberFormatter ( 
m_aNumberFormatter ).
-IsNumberFormat( pLine.m_aValueEdit-GetText(), nIndex, 
nValue );
+IsNumberFormat( pLine-m_aValueEdit-GetText(), nIndex, 
nValue );
+Sequence double  seqValue( 1 );
+seqValue[0] = nValue;
 if ( bIsNum )
-aPropertiesSeq[i].Value

[Libreoffice-commits] core.git: Branch 'feature/cmis' - include/sfx2 sfx2/source sfx2/uiconfig

2013-08-23 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx   |   34 +++-
 sfx2/source/dialog/dinfdlg.cxx |  309 +
 sfx2/uiconfig/ui/cmisline.ui   |   18 +-
 3 files changed, 231 insertions(+), 130 deletions(-)

New commits:
commit a54b7340e89c2a5d3ff4acf88fae5bf0ad63fd36
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Fri Aug 23 19:41:01 2013 +0200

CMIS properties: make multiple values

Change-Id: I0d5ed8fbfd113940aadc117bcc7cf751be246071

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index e9fd2a2..11fd2f6 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -508,6 +508,29 @@ public:
 static SfxTabPage*  Create( Window* pParent, const SfxItemSet );
 };
 
+struct CmisValue : public VclBuilderContainer
+{
+Edit*   m_aValueEdit;
+
+CmisValue( Window* pParent, const OUString aStr );
+};
+
+struct CmisDateTime : public VclBuilderContainer
+{
+DateField*  m_aDateField;
+TimeField*  m_aTimeField;
+
+CmisDateTime( Window* pParent, const ::com::sun::star::util::DateTime 
aDateTime );
+};
+
+struct CmisYesNo : public VclBuilderContainer
+{
+RadioButton* m_aYesButton;
+RadioButton* m_aNoButton;
+
+CmisYesNo( Window* pParent, bool bValue);
+};
+
 // struct CmisPropertyLine -
 
 struct CmisPropertyLine : public VclBuilderContainer
@@ -521,14 +544,13 @@ struct CmisPropertyLine : public VclBuilderContainer
 bool  m_bOpenChoice;
 FixedText*m_aName;
 FixedText*m_aType;
-Edit* m_aValueEdit;
-DateField*m_aDateField;
-TimeField*m_aTimeField;
-RadioButton*  m_aYesButton;
-RadioButton*  m_aNoButton;
-
+std::vector CmisValue*  m_aValues;
+std::vector CmisDateTime*   m_aDateTimes;
+std::vector CmisYesNo*  m_aYesNos;
+sal_Int32 m_nNumValue;
 long getItemHeight() const;
 CmisPropertyLine( Window* pParent );
+~CmisPropertyLine();
 };
 
 // class CmisPropertiesWindow --
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 1c1b3d0..e00f36d 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2106,21 +2106,81 @@ SfxTabPage* SfxCustomPropertiesPage::Create( Window* 
pParent, const SfxItemSet
 return new SfxCustomPropertiesPage( pParent, rItemSet );
 }
 
+CmisValue::CmisValue( Window* pParent, const OUString aStr )
+{
+m_pUIBuilder = new VclBuilder( pParent, getUIRootDir(), 
sfx/ui/cmisline.ui);
+get( m_aValueEdit, value);
+m_aValueEdit-Show( true );
+m_aValueEdit-SetText( aStr );
+}
+
+CmisDateTime::CmisDateTime( Window* pParent, const util::DateTime aDateTime )
+{
+m_pUIBuilder = new VclBuilder( pParent, getUIRootDir(), 
sfx/ui/cmisline.ui);
+get( m_aDateField, date);
+get( m_aTimeField, time);
+m_aDateField-Show( true );
+m_aTimeField-Show( true );
+m_aDateField-SetDate( Date( aDateTime.Day, aDateTime.Month, 
aDateTime.Year ) );
+m_aTimeField-SetTime( Time( aDateTime.Hours, aDateTime.Minutes,
+   aDateTime.Seconds, aDateTime.NanoSeconds ) );
+}
+
+CmisYesNo::CmisYesNo( Window* pParent, bool bValue )
+{
+m_pUIBuilder = new VclBuilder( pParent, getUIRootDir(), 
sfx/ui/cmisline.ui);
+get( m_aYesButton, yes);
+get( m_aNoButton, no);
+m_aYesButton-Show( true );
+m_aNoButton-Show( true );
+if ( bValue )
+m_aYesButton-Check( );
+else
+m_aNoButton-Check( );
+}
+
 // struct CmisPropertyLine -
 CmisPropertyLine::CmisPropertyLine( Window* pParent )
 {
+m_nNumValue = 1;
 m_sId = OUString();
 m_sType = CMIS_TYPE_STRING;
 m_pUIBuilder = new VclBuilder( pParent, getUIRootDir(), 
sfx/ui/cmisline.ui);
 get( m_pFrame, CmisFrame );
-m_pFrame-Enable();
 get( m_aName, name );
 get( m_aType, type );
-get( m_aValueEdit, value );
-get( m_aYesButton, yes );
-get( m_aNoButton, no );
-get( m_aDateField, date );
-get( m_aTimeField, time );
+m_pFrame-Enable();
+}
+
+CmisPropertyLine::~CmisPropertyLine( )
+{
+std::vector CmisValue* ::iterator pIter;
+for ( pIter = m_aValues.begin();
+  pIter != m_aValues.end(); ++pIter )
+{
+CmisValue* pValue = *pIter;
+delete pValue;
+}
+m_aValues.clear();
+
+std::vector CmisYesNo* ::iterator pIterYesNo;
+for ( pIterYesNo = m_aYesNos.begin();
+  pIterYesNo != m_aYesNos.end(); ++pIterYesNo )
+{
+CmisYesNo* pYesNo = *pIterYesNo;
+delete pYesNo;
+}
+m_aYesNos.clear();
+
+std::vector CmisDateTime* ::iterator pIterDateTime;
+for ( pIterDateTime = m_aDateTimes.begin();
+  pIterDateTime != m_aDateTimes.end(); ++pIterDateTime

[Libreoffice-commits] core.git: Branch 'feature/cmis' - comphelper/source sfx2/source ucb/source

2013-08-16 Thread Cao Cuong Ngo
 comphelper/source/misc/mediadescriptor.cxx |5 
 sfx2/source/doc/docfile.cxx|5 
 ucb/source/ucp/cmis/cmis_content.cxx   |  148 ++---
 ucb/source/ucp/cmis/cmis_url.cxx   |6 -
 4 files changed, 61 insertions(+), 103 deletions(-)

New commits:
commit 414d36f7370bce34d3d3765aa4e85dd44603c17f
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Fri Aug 16 16:41:22 2013 +0200

CMIS: fix file saving issue

Change-Id: I60cccb841fea5ce493f004c73ecf50468019f860

diff --git a/comphelper/source/misc/mediadescriptor.cxx 
b/comphelper/source/misc/mediadescriptor.cxx
index 586f6fc..21102f2 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -470,8 +470,9 @@ sal_Bool MediaDescriptor::impl_addInputStream( sal_Bool 
bLockFile )
 css::uno::Reference css::uno::XInterface ());
 
 // Parse URL! Only the main part has to be used further. E.g. a 
jumpmark can make trouble
-OUString sNormalizedURL = impl_normalizeURL( sURL );
-return impl_openStreamWithURL( sNormalizedURL, bLockFile );
+// We need to keep the full URL with Mark to store the Object ID
+// in CMIS UCB
+return impl_openStreamWithURL( sURL, bLockFile );
 }
 #if OSL_DEBUG_LEVEL  0
 catch(const css::uno::Exception ex)
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index c59675f..ebd03ea 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2492,7 +2492,7 @@ void SfxMedium::Init_Impl()
 {
 if ( aUrl.HasMark() )
 {
-pImp-m_aLogicName = aUrl.GetURLNoMark( 
INetURLObject::NO_DECODE );
+// keep the Mark to store the Document ID
 GetItemSet()-Put( SfxStringItem( SID_JUMPMARK, aUrl.GetMark() 
) );
 }
 
@@ -3007,8 +3007,7 @@ const INetURLObject SfxMedium::GetURLObject() const
 if (!pImp-m_pURLObj)
 {
 pImp-m_pURLObj = new INetURLObject( pImp-m_aLogicName );
-if (pImp-m_pURLObj-HasMark())
-*pImp-m_pURLObj = INetURLObject( pImp-m_aLogicName 
).GetURLNoMark();
+// keep the Mark to store the Document ID
 }
 
 return *pImp-m_pURLObj;
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index c2266fb..6ac4106 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -415,7 +415,18 @@ namespace cmis
 {
 if ( !m_pObject.get() )
 {
-if ( !m_sObjectPath.isEmpty( ) )
+if ( !m_sObjectId.isEmpty( ) )
+{
+try
+{
+m_pObject = getSession( xEnv )-getObject( 
OUSTR_TO_STDSTR( m_sObjectId ) );
+}
+catch ( const libcmis::Exception )
+{
+throw libcmis::Exception( Object not found );
+}
+}
+else if ( !m_sObjectPath.isEmpty( ) )
 {
 try
 {
@@ -438,7 +449,7 @@ namespace cmis
 {
 vector libcmis::ObjectPtr  children = 
pParentFolder-getChildren( );
 for ( vector libcmis::ObjectPtr ::iterator it = 
children.begin( );
-  it != children.end()  !m_pObject; ++it )
+it != children.end()  !m_pObject; ++it )
 {
 if ( ( *it )-getName( ) == sName )
 m_pObject = *it;
@@ -449,8 +460,6 @@ namespace cmis
 throw libcmis::Exception( Object not found );
 }
 }
-else if (!m_sObjectId.isEmpty( ) )
-m_pObject = getSession( xEnv )-getObject( OUSTR_TO_STDSTR( 
m_sObjectId ) );
 else
 {
 m_pObject = getSession( xEnv )-getRootFolder( );
@@ -467,7 +476,9 @@ namespace cmis
 bool bIsFolder = false;
 try
 {
-bIsFolder = getObject( xEnv )-getBaseType( ) == cmis:folder;
+libcmis::ObjectPtr obj = getObject( xEnv );
+if ( obj )
+bIsFolder = obj-getBaseType( ) == cmis:folder;
 }
 catch ( const libcmis::Exception e )
 {
@@ -539,7 +550,9 @@ namespace cmis
 {
 try
 {
-xRow-appendBoolean( rProp, getObject( xEnv 
)-getBaseType( ) == cmis:document );
+libcmis::ObjectPtr obj = getObject( xEnv );
+if ( obj )
+xRow-appendBoolean( rProp, obj-getBaseType( ) == 
cmis:document );
 }
 catch ( const libcmis::Exception )
 {
@@ -553,7 +566,11 @@ namespace cmis

[Libreoffice-commits] core.git: Branch 'feature/cmis' - 2 commits - ucb/source

2013-08-04 Thread Cao Cuong Ngo
 ucb/source/ucp/cmis/cmis_content.cxx |   14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 59d0e516d90b2cee5d95b68997316f3b647ac33d
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Sun Aug 4 12:17:06 2013 +0200

CMIS: use FolderPtr instead of Folder pointer

Change-Id: Iac68f67e94ddcc6b0bb2877763176b2efcc9b7d8

diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 507c8f6..c2266fb 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -1142,10 +1142,10 @@ namespace cmis
 OUString sNewPath;
 
 // Try to get the object from the server if there is any
-libcmis::Folder* pFolder = NULL;
+libcmis::FolderPtr pFolder;
 try
 {
-pFolder = dynamic_cast libcmis::Folder* ( getObject( xEnv 
).get( ) );
+pFolder = boost::dynamic_pointer_cast libcmis::Folder ( 
getObject( xEnv ) );
 }
 catch ( const libcmis::Exception )
 {
@@ -1263,12 +1263,13 @@ namespace cmis
 }
 }
 
-if ( !sNewPath.isEmpty( ) )
+if ( !sNewPath.isEmpty( ) || !m_sObjectId.isEmpty( ) )
 {
 // Update the current content: it's no longer transient
 m_sObjectPath = sNewPath;
 URL aUrl( m_sURL );
 aUrl.setObjectPath( m_sObjectPath );
+aUrl.setObjectId( m_sObjectId );
 m_sURL = aUrl.asString( );
 m_pObject.reset( );
 m_pObjectType.reset( );
@@ -1879,7 +1880,7 @@ namespace cmis
 list uno::Reference ucb::XContent   results;
 SAL_INFO( cmisucp, Content::getChildren()   m_sURL );
 
-libcmis::Folder* pFolder = dynamic_cast libcmis::Folder* ( 
getObject( uno::Reference ucb::XCommandEnvironment () ).get( ) );
+libcmis::FolderPtr pFolder = boost::dynamic_pointer_cast 
libcmis::Folder ( getObject( uno::Reference ucb::XCommandEnvironment () ) );
 if ( NULL != pFolder )
 {
 // Get the children from pObject
commit 5ba11744b10d2ff61f85396c1e6b2de71247bc31
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Sun Aug 4 11:52:44 2013 +0200

CMIS: add BaseURI property to remove warning

Change-Id: I936e497d88781b9e8fd43532fda23379ff56e25f

diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 7fedb84..507c8f6 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -730,7 +730,10 @@ namespace cmis
 {
 xRow-appendString( rProp,  );
 }
-
+else if ( rProp.Name == BaseURI )
+{
+xRow-appendString( rProp, m_aURL.getBindingUrl( ) );
+}
 else if ( rProp.Name == CmisProperties )
 {
 try
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cmis' - include/ucbhelper offapi/com sfx2/source ucbhelper/source ucb/source

2013-08-02 Thread Cao Cuong Ngo
 include/ucbhelper/content.hxx  |4 
 offapi/com/sun/star/ucb/GlobalTransferCommandArgument2.idl |6 -
 offapi/com/sun/star/ucb/InsertCommandArgument2.idl |5 
 sfx2/source/doc/docfile.cxx|5 
 ucb/source/core/ucbcmds.cxx|4 
 ucb/source/ucp/cmis/cmis_content.cxx   |   78 ++---
 ucbhelper/source/client/content.cxx|6 -
 7 files changed, 85 insertions(+), 23 deletions(-)

New commits:
commit 0ffd4c9bce1824054f71d20456fb01b86113e89b
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Fri Aug 2 15:04:40 2013 +0200

CMIS: add document ID when saving.

The document ID is needed in case the get object by path

of the CMIS document doesn't work (like Google Drive)

Change-Id: I151d5433a19caeaf4a542b69cd9e95dde58722e7

diff --git a/include/ucbhelper/content.hxx b/include/ucbhelper/content.hxx
index 0c5a2b4..b096802 100644
--- a/include/ucbhelper/content.hxx
+++ b/include/ucbhelper/content.hxx
@@ -670,6 +670,7 @@ public:
   * @param rCommentVersion contains the comment to use for checkin 
operations
   * @param rResultURL is a hacky way to get the update URL after the 
operation in
   *case there was a change (introduced for the checkin operation)
+  * @param rDocumentId is the document Id ( in case of CMIS ).
   */
 sal_Bool
 transferContent( const Content rSourceContent,
@@ -679,7 +680,8 @@ public:
  const OUString  rMimeType = OUString( ),
  bool bMajorVersion = false,
  const OUString  rCommentVersion = OUString( ),
- OUString* pResultURL = NULL )
+ OUString* pResultURL = NULL,
+ const OUString  rDocumentId = OUString( ) )
 throw( ::com::sun::star::ucb::CommandAbortedException,
::com::sun::star::uno::RuntimeException,
::com::sun::star::uno::Exception );
diff --git a/offapi/com/sun/star/ucb/GlobalTransferCommandArgument2.idl 
b/offapi/com/sun/star/ucb/GlobalTransferCommandArgument2.idl
index 7169ba9..d7ba69b 100644
--- a/offapi/com/sun/star/ucb/GlobalTransferCommandArgument2.idl
+++ b/offapi/com/sun/star/ucb/GlobalTransferCommandArgument2.idl
@@ -15,13 +15,17 @@
 module com { module sun { module star { module ucb {
 
 /** This struct extends the one for transfers arguments by adding a Mime
-type property to it.
+type and a Document Id property to it.
   */
 struct GlobalTransferCommandArgument2 : GlobalTransferCommandArgument
 {
 /** contains the MIME type of the source object.
   */
 string MimeType;
+
+   /** contains the DocumentId of the source object.
+  */
+string DocumentId;
 };
 
 
diff --git a/offapi/com/sun/star/ucb/InsertCommandArgument2.idl 
b/offapi/com/sun/star/ucb/InsertCommandArgument2.idl
index 5105543..c3d1ab8 100644
--- a/offapi/com/sun/star/ucb/InsertCommandArgument2.idl
+++ b/offapi/com/sun/star/ucb/InsertCommandArgument2.idl
@@ -21,6 +21,11 @@ struct InsertCommandArgument2 : InsertCommandArgument
 /** contains the MIME type of the document to insert
  */
 string MimeType;
+
+   /** contains the Document Id of the document to insert
+ */
+string DocumentId;
+
 };
 
 
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 746ba20..c59675f 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1977,6 +1977,9 @@ void SfxMedium::Transfer_Impl()
 OUString aFileName;
 Any aAny = aDestContent.getPropertyValue( OUString(Title ) );
 aAny = aFileName;
+aAny = aDestContent.getPropertyValue( OUString(ObjectId ) );
+OUString sObjectId;
+aAny = sObjectId;
 if ( aFileName.isEmpty() )
 aFileName = GetURLObject().getName( 
INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
 
@@ -2041,7 +2044,7 @@ void SfxMedium::Transfer_Impl()
 }
 OUString sResultURL;
 if (!aTransferContent.transferContent( aSourceContent, 
eOperation,
-aFileName, nNameClash, aMimeType, bMajor, 
sComment, sResultURL ))
+aFileName, nNameClash, aMimeType, bMajor, 
sComment, sResultURL, sObjectId))
 pImp-m_eError = ERRCODE_IO_GENERAL;
 else if ( !sResultURL.isEmpty( ) )  // Likely to happen 
only for checkin
 SwitchDocumentToFile( sResultURL );
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index 3c4fdd7..78bf612 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -1364,6 +1364,7 @@ void globalTransfer_(
 ucb::InsertCommandArgument2 aArg;
 aArg.Data = xInputStream;
 aArg.MimeType

[Libreoffice-commits] core.git: Branch 'feature/cmis' - ucb/source

2013-07-20 Thread Cao Cuong Ngo
 ucb/source/ucp/cmis/cmis_content.cxx |   29 +
 1 file changed, 29 insertions(+)

New commits:
commit a5846f3fe77912cba30abbc3aaaba634b04d5f8a
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Fri Jul 19 13:57:49 2013 +0200

Resolves CMIS file picker propertyset out of range warning

Add missing properties

Change-Id: Id3475fe4d07b33c4c0b31f54075dc011122b15bd

diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 812bb1a..43f3554 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -670,6 +670,35 @@ namespace cmis
 xRow-appendVoid( rProp );
 }
 }
+else if ( rProp.Name == IsVolume )
+{
+xRow-appendBoolean( rProp, sal_False );
+}
+else if ( rProp.Name == IsRemote )
+{
+xRow-appendBoolean( rProp, sal_False );
+}
+else if ( rProp.Name == IsRemoveable )
+{
+xRow-appendBoolean( rProp, sal_False );
+}
+else if ( rProp.Name == IsFloppy )
+{
+xRow-appendBoolean( rProp, sal_False );
+}
+else if ( rProp.Name == IsCompactDisc )
+{
+xRow-appendBoolean( rProp, sal_False );
+}
+else if ( rProp.Name == IsHidden )
+{
+xRow-appendBoolean( rProp, sal_False );
+}
+else if ( rProp.Name == TargetURL )
+{
+xRow-appendString( rProp,  );
+}
+
 else if ( rProp.Name == CmisProperties )
 {
 try
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cmis' - include/sfx2 sfx2/source

2013-07-18 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx   |   18 ---
 sfx2/source/dialog/dinfdlg.cxx |  205 -
 sfx2/source/doc/objserv.cxx|2 
 3 files changed, 48 insertions(+), 177 deletions(-)

New commits:
commit 2507e671554cc9ec058c0fdb6082898eca4d4bc4
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Thu Jul 18 11:30:59 2013 +0200

CMIS properties dialog

Use Sequence directly instead of creating intermediate properties

Change-Id: I194342678d7f56f34cc24a56440827e795e6be95

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index e677f57..a344bdc 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -50,8 +50,6 @@ namespace com { namespace sun { namespace star {
 } } }
 
 struct CustomProperty;
-struct CmisProperty;
-
 
 // class SfxDocumentInfoItem -
 
@@ -79,7 +77,7 @@ private:
 sal_Boolm_bDeleteUserData;
 sal_Boolm_bUseUserData;
 std::vector CustomProperty* m_aCustomProperties;
-std::vector CmisProperty*   m_aCmisProperties;
+::com::sun::star::uno::Sequence ::com::sun::star::document::CmisProperty 
 m_aCmisProperties;
 
 public:
 TYPEINFO();
@@ -99,7 +97,7 @@ public:
 ::com::sun::star::document::XDocumentProperties  i_xDocProps,
 bool i_bDoNotUpdateUserDefined = false)
 const;
-sal_BoolisCmisDocument() const { return m_aCmisProperties.size()  0;}
+sal_BoolisCmisDocument() const { return m_aCmisProperties.getLength() 
 0;}
 
 sal_BoolisAutoloadEnabled() const { return m_isAutoloadEnabled; }
 voidsetAutoloadEnabled(sal_Bool i_val) { m_isAutoloadEnabled = 
i_val; }
@@ -162,18 +160,10 @@ public:
 voidAddCustomProperty(  const OUString sName,
 const com::sun::star::uno::Any rValue );
 
-std::vector CmisProperty*   GetCmisProperties() const;
-
 ::com::sun::star::uno::Sequence ::com::sun::star::document::CmisProperty 
-GetCmisPropertiesSeq() const;
-
-voidClearCmisProperties();
-voidAddCmisProperty(  const OUString sId, const OUString sName,
-  const bool bUpdatable, const bool bRequired,
-  const bool bMultiValued, const bool 
bOpenChoice,
-  const com::sun::star::uno::Any Choices,
-  const com::sun::star::uno::Any rValue );
+GetCmisProperties() const;
 
+voidSetCmisProperties(::com::sun::star::uno::Sequence 
::com::sun::star::document::CmisProperty  cmisProps );
 virtual SfxPoolItem*Clone( SfxItemPool* pPool = NULL ) const;
 virtual int operator==( const SfxPoolItem ) const;
 virtual boolQueryValue( com::sun::star::uno::Any rVal, sal_uInt8 
nMemberId = 0 ) const;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 205b0b5..ba9b364 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -91,47 +91,6 @@ struct CustomProperty
 { return m_sName.equals( rProp.m_sName )  m_aValue == rProp.m_aValue; }
 };
 
-struct CmisProperty
-{
-OUStringm_sId;
-OUStringm_sName;
-boolm_bUpdatable;
-boolm_bRequired;
-boolm_bMultiValued;
-boolm_bOpenChoice;
-com::sun::star::uno::Anym_aChoices;
-com::sun::star::uno::Anym_aValue;
-
-CmisProperty( const OUString sId,
-  const OUString sName,
-  const bool bUpdatable,
-  const bool bRequired,
-  const bool bMultiValued,
-  const bool bOpenChoice,
-  const com::sun::star::uno::Any aChoices,
-  const com::sun::star::uno::Any rValue ) :
-m_sId( sId ),
-m_sName( sName ),
-m_bUpdatable( bUpdatable ),
-m_bRequired( bRequired ),
-m_bMultiValued( bMultiValued ),
-m_bOpenChoice( bOpenChoice ),
-m_aChoices( aChoices),
-m_aValue( rValue )
-{}
-
-inline bool operator==( const CmisProperty rProp )
-{ return m_sId.equals( rProp.m_sId )
-   m_sName == rProp.m_sName
-   m_bUpdatable== rProp.m_bUpdatable
-   m_bRequired == rProp.m_bRequired
-   m_bMultiValued  == rProp.m_bMultiValued
-   m_bOpenChoice   == rProp.m_bOpenChoice
-   m_aChoices  == rProp.m_aChoices
-   m_aValue== rProp.m_aValue;
-}
-};
-
 static
 bool operator==(const util::DateTime i_rLeft, const util::DateTime i_rRight)
 {
@@ -312,18 +271,8 @@ SfxDocumentInfoItem::SfxDocumentInfoItem

[Libreoffice-commits] core.git: Branch 'feature/cmis' - include/sfx2 offapi/com sfx2/source ucb/source

2013-07-18 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx  |   11 +-
 offapi/com/sun/star/document/CmisProperty.idl |4 +
 sfx2/source/dialog/dinfdlg.cxx|  101 +++---
 sfx2/source/dialog/dinfdlg.hrc|6 -
 ucb/source/ucp/cmis/cmis_content.cxx  |   33 
 ucb/source/ucp/cmis/cmis_strings.hxx  |   23 +
 6 files changed, 114 insertions(+), 64 deletions(-)

New commits:
commit 6fff90e38c7b030ea55a17f354aa41aafad34254
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Thu Jul 18 11:55:50 2013 +0200

CMIS properties: Add type to the UNO API

Change-Id: Ie4f32bc840cdfab1d5f600991cd6ac8aabcb1f87

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index a344bdc..5528aaa 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -578,6 +578,7 @@ public:
 struct CmisPropertyLine
 {
 OUString  m_sId;
+OUString  m_sType;
 bool  m_bUpdatable;
 bool  m_bRequired;
 bool  m_bMultiValued;
@@ -632,8 +633,9 @@ public:
 sal_uInt16  GetLineCount() const;
 inline sal_Int32GetLineHeight() const { return m_nLineHeight; }
 voidAddLine( const OUString sId, const OUString sName,
- const bool bUpdatable, const bool bRequired,
- const bool bMultiValued, const bool 
bOpenChoice,
+ const OUString sType, const bool bUpdatable,
+ const bool bRequired, const bool bMultiValued,
+ const bool bOpenChoice,
  com::sun::star::uno::Any aChoices,
  com::sun::star::uno::Any rAny );
 boolAreAllLinesValid() const;
@@ -663,8 +665,9 @@ public:
 ~CmisPropertiesControl();
 
 voidAddLine( const OUString sId, const OUString sName,
- const bool bUpdatable, const bool bRequired,
- const bool bMultiValude, const bool bOpenChoice,
+ const OUString sType, const bool bUpdatable,
+ const bool bRequired, const bool bMultiValude,
+ const bool bOpenChoice,
  com::sun::star::uno::Any aChoices,
  com::sun::star::uno::Any rAny, bool bInteractive 
);
 
diff --git a/offapi/com/sun/star/document/CmisProperty.idl 
b/offapi/com/sun/star/document/CmisProperty.idl
index 65caab1..b06b84a 100644
--- a/offapi/com/sun/star/document/CmisProperty.idl
+++ b/offapi/com/sun/star/document/CmisProperty.idl
@@ -33,6 +33,10 @@ struct CmisProperty
  */
 string Name;
 
+/** type of the property
+*/
+string Type;
+
 /** specifies if the property is updatable.
  */
 boolean Updatable;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index ba9b364..3b50945 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2161,6 +2161,7 @@ void CmisPropertiesYesNoButton::Resize()
 // struct CmisPropertyLine -
 CmisPropertyLine::CmisPropertyLine( Window* pParent ) :
 m_sId   ( ),
+m_sType ( CMIS_TYPE_STRING ),
 m_aName ( pParent, SfxResId( SFX_CMIS_PROPERTY_NAME ) ),
 m_aType ( pParent, SfxResId( SFX_CMIS_PROPERTY_TYPE ) ),
 m_aValueEdit( pParent, SfxResId( SFX_CMIS_ED_PROPERTY_VALUE ), this ),
@@ -2223,16 +2224,16 @@ bool CmisPropertiesWindow::IsLineValid( 
CmisPropertyLine* pLine ) const
 {
 bool bIsValid = true;
 pLine-m_bTypeLostFocus = false;
-OUString sType = pLine-m_aType.GetText( );
 String sValue = pLine-m_aValueEdit.GetText();
 if ( sValue.Len() == 0 )
 return true;
 
 sal_uInt32 nIndex = 0x;
-if ( CMIS_TYPE_NUMBER == sType )
+if ( CMIS_TYPE_INTEGER == pLine-m_sType ||
+ CMIS_TYPE_DECIMAL == pLine-m_sType )
 nIndex = const_cast SvNumberFormatter (
 m_aNumberFormatter ).GetFormatIndex( NF_NUMBER_SYSTEM );
-else if ( CMIS_TYPE_DATETIME == sType )
+else if ( CMIS_TYPE_DATETIME == pLine-m_sType )
 nIndex = const_cast SvNumberFormatter (
 m_aNumberFormatter).GetFormatIndex( NF_DATE_SYS_DDMM );
 
@@ -2360,13 +2361,14 @@ void CmisPropertiesWindow::updateLineWidth()
 }
 
 void CmisPropertiesWindow::AddLine( const OUString sId, const OUString sName,
-const bool bUpdatable, const bool 
bRequired,
-const bool bMultiValued, const bool 
bOpenChoice,
-Any /*aChoices*/, Any rAny )
+const OUString sType, const bool 
bUpdatable

[Libreoffice-commits] core.git: Branch 'feature/cmis' - 2 commits - include/sfx2 sfx2/source

2013-07-17 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx   |2 ++
 sfx2/source/dialog/dinfdlg.cxx |   19 +--
 2 files changed, 19 insertions(+), 2 deletions(-)

New commits:
commit 63493fd5377ee1b0815b26a11ee87f3b666cc2c6
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Wed Jul 17 11:07:24 2013 +0200

CMIS properties dialog

Uses sal_Int64 instead of sal_Int32 in Number properties.
Because the type used in Any is Hyper.

Change-Id: I9a4c72a8bb72c2403120cafa06541fb5434f282b

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index ac003af..a1fdac8 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2541,7 +2541,7 @@ void CmisPropertiesWindow::AddLine( const OUString sId, 
const OUString sName,
 pNewLine-m_aTimePos = pNewLine-m_aTimeField.GetPosPixel();
 pNewLine-m_aDateTimeSize = pNewLine-m_aDateField.GetSizePixel();
 
-sal_Int32 nTmpValue = 0;
+sal_Int64 nTmpValue = 0;
 double  dTmpValue = 0.0;
 bool bTmpValue = false;
 OUString sTmpValue;
commit 67bf3f3c70141811ea2e2be5804e20b2de0ecf0a
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Wed Jul 17 10:45:08 2013 +0200

CMIS properties dialog

Greyed out YesNo button when the property is readonly

Change-Id: I093651c9a17e8e1e23a164a6f91d6971d3ecc67a

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index dde187e..e677f57 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -576,6 +576,8 @@ public:
 
 virtual voidResize();
 
+voidSetReadOnly( );
+
 inline void CheckYes() { m_aYesButton.Check(); }
 inline void CheckNo() { m_aNoButton.Check(); }
 inline bool IsYesChecked() const { return m_aYesButton.IsChecked() != 
sal_False; }
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 99c103d..ac003af 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2252,6 +2252,12 @@ CmisPropertiesYesNoButton::CmisPropertiesYesNoButton( 
Window* pParent, const Res
 m_aNoButton.SetBackground( aWall );
 }
 
+void CmisPropertiesYesNoButton::SetReadOnly( )
+{
+m_aNoButton.Enable( sal_False );
+m_aYesButton.Enable( sal_False );
+}
+
 CmisPropertiesEditButton::CmisPropertiesEditButton( Window* pParent, const 
ResId rResId, CmisPropertyLine* pLine ) :
 PushButton( pParent, rResId ), m_pLine( pLine )
 {
@@ -2503,6 +2509,8 @@ void CmisPropertiesWindow::AddLine( const OUString sId, 
const OUString sName,
 pNewLine-m_aValueEdit.SetReadOnly( !bUpdatable );
 pNewLine-m_aDateField.SetReadOnly( !bUpdatable );
 pNewLine-m_aTimeField.SetReadOnly( !bUpdatable );
+if ( !bUpdatable)
+pNewLine-m_aYesNoButton.SetReadOnly( );
 
 m_nLineHeight = m_aValueEdit.GetSizePixel().Height() ;
 
@@ -2533,7 +2541,8 @@ void CmisPropertiesWindow::AddLine( const OUString sId, 
const OUString sName,
 pNewLine-m_aTimePos = pNewLine-m_aTimeField.GetPosPixel();
 pNewLine-m_aDateTimeSize = pNewLine-m_aDateField.GetSizePixel();
 
-double nTmpValue = 0;
+sal_Int32 nTmpValue = 0;
+double  dTmpValue = 0.0;
 bool bTmpValue = false;
 OUString sTmpValue;
 util::DateTime aTmpDateTime;
@@ -2550,6 +2559,13 @@ void CmisPropertiesWindow::AddLine( const OUString sId, 
const OUString sName,
 pNewLine-m_aValueEdit.SetText( sValue );
 sType = CMIS_TYPE_NUMBER;
 }
+else if ( rAny = dTmpValue )
+{
+sal_uInt32 nIndex = m_aNumberFormatter.GetFormatIndex( 
NF_NUMBER_SYSTEM );
+m_aNumberFormatter.GetInputLineString( dTmpValue, nIndex, sValue );
+pNewLine-m_aValueEdit.SetText( sValue );
+sType = CMIS_TYPE_NUMBER;
+}
 else if ( rAny = bTmpValue )
 {
 sValue = ( bTmpValue ? rLocaleWrapper.getTrueWord() : 
rLocaleWrapper.getFalseWord() );
@@ -2590,7 +2606,6 @@ void CmisPropertiesWindow::AddLine( const OUString sId, 
const OUString sName,
 pNewLine-m_aDateField.SetPosSizePixel(pNewLine-m_aDatePos, 
pNewLine-m_aDateTimeSize );
 pNewLine-m_aTimeField.SetPosSizePixel(pNewLine-m_aTimePos, 
pNewLine-m_aDateTimeSize );
 }
-
 pNewLine-m_aName.GrabFocus();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cmis' - sfx2/source

2013-07-17 Thread Cao Cuong Ngo
 sfx2/source/dialog/dinfdlg.cxx |   49 -
 1 file changed, 25 insertions(+), 24 deletions(-)

New commits:
commit 03a1970086d170d0e0969c45a6cff8baabd05026
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Wed Jul 17 20:30:22 2013 +0200

CMIS properties dialog

Only update modified properties

Change-Id: I985cba20abd9b2d5b25bfa3c716ad6df94178c72

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index a1fdac8..205b0b5 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -576,31 +576,22 @@ std::vector CmisProperty*  
SfxDocumentInfoItem::GetCmisProperties() const
 
 uno::Sequence document::CmisProperty  
SfxDocumentInfoItem::GetCmisPropertiesSeq() const
 {
+Sequence document::CmisProperty  aPropertiesSeq( m_aCmisProperties.size( 
) );
 std::vector CmisProperty* ::const_iterator pIter;
-sal_Int32 i=0, updatableCount = 0, nCount = 0;
-
-for ( pIter = m_aCmisProperties.begin();
-pIter != m_aCmisProperties.end(); ++pIter, ++i )
-{
-if ( ( *pIter )-m_bUpdatable ) updatableCount++;
-}
-Sequence document::CmisProperty  aPropertiesSeq( updatableCount );
 
+sal_Int32 i = 0;
 for ( pIter = m_aCmisProperties.begin();
-pIter != m_aCmisProperties.end(); ++pIter, ++i )
-if (( *pIter )-m_bUpdatable )
+pIter != m_aCmisProperties.end(); ++pIter, i++ )
 {
 CmisProperty* aProp = *pIter;
-aPropertiesSeq[nCount].Id = aProp-m_sId;
-aPropertiesSeq[nCount].Name = aProp-m_sName;
-aPropertiesSeq[nCount].Updatable = aProp-m_bUpdatable;
-aPropertiesSeq[nCount].Required = aProp-m_bRequired;
-aPropertiesSeq[nCount].MultiValued = aProp-m_bMultiValued;
-aPropertiesSeq[nCount].OpenChoice = aProp-m_bOpenChoice;
-aPropertiesSeq[nCount].Choices = aProp-m_aChoices;
-aPropertiesSeq[nCount].Value = aProp-m_aValue;
-
-nCount++;
+aPropertiesSeq[i].Id = aProp-m_sId;
+aPropertiesSeq[i].Name = aProp-m_sName;
+aPropertiesSeq[i].Updatable = aProp-m_bUpdatable;
+aPropertiesSeq[i].Required = aProp-m_bRequired;
+aPropertiesSeq[i].MultiValued = aProp-m_bMultiValued;
+aPropertiesSeq[i].OpenChoice = aProp-m_bOpenChoice;
+aPropertiesSeq[i].Choices = aProp-m_aChoices;
+aPropertiesSeq[i].Value = aProp-m_aValue;
 }
 
 return aPropertiesSeq;
@@ -2830,7 +2821,7 @@ SfxCmisPropertiesPage::SfxCmisPropertiesPage( Window* 
pParent, const SfxItemSet
 
 sal_Bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet rSet )
 {
-sal_Bool bModified = sal_True;
+sal_Bool bModified = sal_False;
 const SfxPoolItem* pItem = NULL;
 SfxDocumentInfoItem* pInfo = NULL;
 bool bMustDelete = false;
@@ -2849,12 +2840,20 @@ sal_Bool SfxCmisPropertiesPage::FillItemSet( 
SfxItemSet rSet )
 
 if ( pInfo )
 {
+Sequence document::CmisProperty  aOldProps = 
pInfo-GetCmisPropertiesSeq( );
 pInfo-ClearCmisProperties();
 Sequence document::CmisProperty  aPropertySeq = 
m_pPropertiesCtrl-GetCmisProperties();
-sal_Int32 i = 0, nCount = aPropertySeq.getLength();
-for ( ; i  nCount; ++i )
+
+for ( sal_Int32 i = 0; i aPropertySeq.getLength( ); i++  )
 {
-if ( !aPropertySeq[i].Id.isEmpty() )
+OUString oldValue;
+aOldProps[i].Value = oldValue;
+OUString newValue;
+aPropertySeq[i].Value = newValue;
+if ( !aPropertySeq[i].Id.isEmpty() 
+  aPropertySeq[i].Updatable 
+  oldValue != newValue )
+{
 pInfo-AddCmisProperty( aPropertySeq[i].Id,
 aPropertySeq[i].Name,
 aPropertySeq[i].Updatable,
@@ -2863,6 +2862,8 @@ sal_Bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet 
rSet )
 aPropertySeq[i].OpenChoice,
 aPropertySeq[i].Choices,
 aPropertySeq[i].Value );
+bModified = true;
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cmis' - sfx2/source

2013-07-17 Thread Cao Cuong Ngo
 sfx2/source/doc/objserv.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 683701d45325f20edec58ca7f57088e956db9b20
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Wed Jul 17 22:56:27 2013 +0200

Properties dialog

Only call CMIS update properties when
it is a CMIS document.

Change-Id: Ibccd2effcf7e839f71523233fd3e69b5d464a310

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 91a59f7..8c63652 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -520,7 +520,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest rReq)
 pDocInfoItem-UpdateDocumentInfo(getDocProperties());
 uno::Sequence document::CmisProperty  
aNewCmisProperties =
 pDocInfoItem-GetCmisPropertiesSeq( );
-xCmisDoc-updateCmisProperties( aNewCmisProperties );
+if ( aNewCmisProperties.getLength( )  0 )
+xCmisDoc-updateCmisProperties( aNewCmisProperties 
);
 SetUseUserData( ((const SfxDocumentInfoItem 
*)pDocInfoItem)-IsUseUserData() );
 // add data from dialog for possible recording purpose
 rReq.AppendItem( SfxDocumentInfoItem( GetTitle(),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cmis' - 3 commits - ucb/source

2013-07-16 Thread Cao Cuong Ngo
 ucb/source/ucp/cmis/cmis_content.cxx  |6 -
 ucb/source/ucp/cmis/cmis_oauth2_providers.hxx |2 -
 ucb/source/ucp/cmis/cmis_repo_content.cxx |   30 +++---
 ucb/source/ucp/cmis/cmis_url.cxx  |   23 +++
 4 files changed, 37 insertions(+), 24 deletions(-)

New commits:
commit 9020aef661d87f846b3d436d00a7118b69a45ddc
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Tue Jul 16 20:00:56 2013 +0200

CMIS: make GDrive work with path

Change-Id: Ib85be2887219e6067a1b6c227515504020f9a4e7

diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 3d35567..9ec04f7 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -1452,7 +1452,11 @@ namespace cmis
 {
 libcmis::Folder* folder = dynamic_cast libcmis::Folder* ( 
pObj.get( ) );
 if ( NULL != folder )
-parentPath = folder-getFolderParent( )-getPath( );
+{
+libcmis::FolderPtr parentFolder = folder-getFolderParent( 
);
+if ( NULL != parentFolder )
+parentPath = parentFolder-getPath( );
+}
 }
 }
 catch ( const libcmis::Exception  )
diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx
index bbafee5..ac26167 100644
--- a/ucb/source/ucp/cmis/cmis_url.cxx
+++ b/ucb/source/ucp/cmis/cmis_url.cxx
@@ -35,11 +35,7 @@ namespace cmis
 m_sPass = aUrl.GetPass( INetURLObject::DECODE_WITH_CHARSET );
 
 // Store the path to the object
-// Google Drive doesn't support getObjectByPath
-if ( m_sBindingUrl == GDRIVE_BASE_URL )
-m_sPath = OUString( );
-else
-m_sPath = aUrl.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );
+m_sPath = aUrl.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );
 m_sId = aUrl.GetMark( INetURLObject::DECODE_WITH_CHARSET );
 
 if ( !m_sId.isEmpty( ) )
commit b2e7610ca2ff5f7edae3312116e1a04792ac7a16
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Tue Jul 16 19:16:44 2013 +0200

CMIS: getRepositories should call createSession

Change-Id: Ia64e15ab53155118dcfdd007a5d76e649bdeded9

diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx 
b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index b2a0196..e0fd7af 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -32,6 +32,7 @@
 #include cmis_provider.hxx
 #include cmis_repo_content.hxx
 #include cmis_resultset.hxx
+#include cmis_oauth2_providers.hxx
 
 #define OUSTR_TO_STDSTR(s) string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 
).getStr() )
 #define STD_TO_OUSTR( str ) OUString( str.c_str(), str.length( ), 
RTL_TEXTENCODING_UTF8 )
@@ -142,14 +143,25 @@ namespace cmis
 string rPassword = OUSTR_TO_STDSTR( m_aURL.getPassword( ) );
 if ( authProvider.authenticationQuery( rUsername, rPassword ) )
 {
-try
-{
-m_aRepositories = libcmis::SessionFactory::getRepositories(
-   OUSTR_TO_STDSTR( m_aURL.getBindingUrl( ) ), 
rUsername, rPassword );
-}
-catch (const libcmis::Exception)
-{
-}
+// Create a session to get repositories
+libcmis::OAuth2DataPtr oauth2Data = NULL;
+if ( m_aURL.getBindingUrl( ) == GDRIVE_BASE_URL )
+oauth2Data.reset( new libcmis::OAuth2Data(
+GDRIVE_AUTH_URL, GDRIVE_TOKEN_URL,
+GDRIVE_SCOPE, GDRIVE_REDIRECT_URI,
+GDRIVE_CLIENT_ID, GDRIVE_CLIENT_SECRET ) );
+
+libcmis::Session* session = 
libcmis::SessionFactory::createSession(
+OUSTR_TO_STDSTR( m_aURL.getBindingUrl( ) ),
+rUsername, rPassword, , sal_False, oauth2Data );
+if (session == NULL )
+ucbhelper::cancelCommandExecution(
+ucb::IOErrorCode_INVALID_DEVICE,
+uno::Sequence uno::Any ( 0 ),
+xEnv,
+OUString( ) );
+m_aRepositories = session-getRepositories( );
+delete session;
 }
 else
 {
@@ -179,6 +191,8 @@ namespace cmis
 repo = *it;
 }
 }
+else
+repo = m_aRepositories.front( );
 return repo;
 }
 
commit ae0903a8db71a695483a1801fc72739992be4fe5
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Tue Jul 16 16:41:52 2013 +0200

CMIS: the file picker prefer path to ID

Change-Id: I3a8d52411176d29f67340d8b668b8e9cc940d648

[GSOC] CMIS updates

2013-07-15 Thread Cao Cuong Ngo
Hi all,

This is a progress update of my GSOC project concerning CMIS support.
The last weeks I've managed to:

- Fix some bugs in the properties dialog UI.
- Enable CMIS properties updating.
- Add Google Drive support in LO code.

The code can be found in the branch feature/cmis. Feel free to test it,
however you will also have to build libCMIS.

I currently have some problems as following, it would be great if anybody
has a hint to fix them faster :-)

- Refine the UI, including conversion from .src to .ui:
   + The current UI uses a Windows to support mouse scroll, I'm still not
sure how to convert a Window to .ui?
   + How can we convert a HeaderBar to .ui file?

- The file picker has some problems with object ID of a file which prevents
a correct navigation. I will have to change to using object path ( which
doesn't support in Google Drive) or fix those problems.
- A property of CMIS file can have multiple values, need to add support for
that.
- in libCMIS, move to use libboost for JSON parser instead of libjson to
reduce dependencies.

Bests,
CC Ngo.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/cmis' - ucb/source

2013-07-15 Thread Cao Cuong Ngo
 ucb/source/ucp/cmis/cmis_content.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fd4d31b16702fa1f8e522350df0766e16a86b5e0
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Mon Jul 15 13:11:28 2013 +0200

CMIS create session

Add sslCheck flag in CreateSession

Change-Id: I0dda9b89e529623cbed00f35f10a924120475480

diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index e4a206c..3d35567 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -326,7 +326,7 @@ namespace cmis
 
 m_pSession = libcmis::SessionFactory::createSession(
 OUSTR_TO_STDSTR( m_aURL.getBindingUrl( ) ),
-rUsername, rPassword, OUSTR_TO_STDSTR( 
m_aURL.getRepositoryId( ) ), oauth2Data );
+rUsername, rPassword, OUSTR_TO_STDSTR( 
m_aURL.getRepositoryId( ) ), sal_False, oauth2Data );
 if ( m_pSession == NULL )
 ucbhelper::cancelCommandExecution(
 ucb::IOErrorCode_INVALID_DEVICE,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cmis' - include/sfx2 sfx2/source

2013-07-14 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx   |2 ++
 sfx2/source/dialog/dinfdlg.cxx |   12 +---
 2 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 0d7869b0a73f5df4a81ac6e01a06b0f951387ee9
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Sun Jul 14 15:33:27 2013 +0200

CMIS properties dialog

When it's a CMIS document, don't update custom properties,
which also prevents cmis properties aren't updated.

Change-Id: Ia26d9ae5debae9c5de347ed309a3f07cfda4a475

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 43b20ad..dde187e 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -99,6 +99,7 @@ public:
 ::com::sun::star::document::XDocumentProperties  i_xDocProps,
 bool i_bDoNotUpdateUserDefined = false)
 const;
+sal_BoolisCmisDocument() const { return m_aCmisProperties.size()  0;}
 
 sal_BoolisAutoloadEnabled() const { return m_isAutoloadEnabled; }
 voidsetAutoloadEnabled(sal_Bool i_val) { m_isAutoloadEnabled = 
i_val; }
@@ -691,6 +692,7 @@ class SfxCmisPropertiesPage : public SfxTabPage
 private:
 CmisPropertiesControl* m_pPropertiesCtrl;
 using TabPage::DeactivatePage;
+DECL_LINK(UpdateHdl, void *);
 
 protected:
 SfxCmisPropertiesPage( Window* pParent, const SfxItemSet );
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index a508577..99c103d 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -576,10 +576,8 @@ std::vector CmisProperty*  
SfxDocumentInfoItem::GetCmisProperties() const
 
 uno::Sequence document::CmisProperty  
SfxDocumentInfoItem::GetCmisPropertiesSeq() const
 {
-
-sal_Int32 i = 0;
 std::vector CmisProperty* ::const_iterator pIter;
-sal_Int32 updatableCount = 0, nCount = 0;
+sal_Int32 i=0, updatableCount = 0, nCount = 0;
 
 for ( pIter = m_aCmisProperties.begin();
 pIter != m_aCmisProperties.end(); ++pIter, ++i )
@@ -2187,6 +2185,14 @@ sal_Bool SfxCustomPropertiesPage::FillItemSet( 
SfxItemSet rSet )
 
 if ( pInfo )
 {
+// If it's a CMIS document, we can't save custom properties
+if ( pInfo-isCmisDocument( ) )
+{
+if ( bMustDelete )
+delete pInfo;
+return sal_False;
+}
+
 pInfo-ClearCustomProperties();
 Sequence beans::PropertyValue  aPropertySeq = 
m_pPropertiesCtrl-GetCustomProperties();
 sal_Int32 i = 0, nCount = aPropertySeq.getLength();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cmis' - officecfg/registry ucb/source

2013-07-14 Thread Cao Cuong Ngo
 officecfg/registry/data/org/openoffice/Office/Common.xcu |2 
 ucb/source/ucp/cmis/cmis_content.cxx |   12 +
 ucb/source/ucp/cmis/cmis_oauth2_providers.hxx|   32 +++
 ucb/source/ucp/cmis/cmis_url.cxx |   26 +++-
 4 files changed, 60 insertions(+), 12 deletions(-)

New commits:
commit a3e5c43ff690da09390634dd7c54c9ff193a95cc
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Sun Jul 14 23:59:51 2013 +0200

CMIS: connect LO to Google Drive

Change-Id: I2c1b1d3e2bfd50ceb8647e62d37512ee3a0b9dae

diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu 
b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index fb84a88..ef0e765 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -583,6 +583,7 @@
 ithttps://lt;hostgt;/cmis/atom/it
 
ithttp://ec2-184-72-233-127.compute-1.amazonaws.com/ot-cmis/services/RepositoryService?wsdl/it
 ithttp://lt;hostgt;/_vti_bin/CMISSoapwsdl.aspx/it
+ithttps://www.googleapis.com/drive/v2/it
   /value
 /prop
 prop oor:name=CmisServersNames
@@ -595,6 +596,7 @@
 itOpenDataSpace/it
 itOpenText ELS 10.2.0/it
 itSharePoint 2010/it
+itGoogle Drive/it
   /value
 /prop
   /node
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 9d4beeb..e4a206c 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -49,6 +49,7 @@
 #include cmis_content.hxx
 #include cmis_provider.hxx
 #include cmis_resultset.hxx
+#include cmis_oauth2_providers.hxx
 
 #define OUSTR_TO_STDSTR(s) string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 
).getStr() )
 #define STD_TO_OUSTR( str ) OUString( str.c_str(), str.length( ), 
RTL_TEXTENCODING_UTF8 )
@@ -316,9 +317,16 @@ namespace cmis
 if ( authProvider.authenticationQuery( rUsername, rPassword ) )
 {
 // Initiate a CMIS session and register it as we found nothing
+libcmis::OAuth2DataPtr oauth2Data = NULL;
+if ( m_aURL.getBindingUrl( ) == GDRIVE_BASE_URL )
+oauth2Data.reset( new libcmis::OAuth2Data(
+GDRIVE_AUTH_URL, GDRIVE_TOKEN_URL,
+GDRIVE_SCOPE, GDRIVE_REDIRECT_URI,
+GDRIVE_CLIENT_ID, GDRIVE_CLIENT_SECRET ) );
+
 m_pSession = libcmis::SessionFactory::createSession(
 OUSTR_TO_STDSTR( m_aURL.getBindingUrl( ) ),
-rUsername, rPassword, OUSTR_TO_STDSTR( 
m_aURL.getRepositoryId( ) ) );
+rUsername, rPassword, OUSTR_TO_STDSTR( 
m_aURL.getRepositoryId( ) ), oauth2Data );
 if ( m_pSession == NULL )
 ucbhelper::cancelCommandExecution(
 ucb::IOErrorCode_INVALID_DEVICE,
@@ -1773,6 +1781,8 @@ namespace cmis
 if ( sPath[sPath.getLength( ) - 1] != '/' )
 sPath += /;
 sPath += STD_TO_OUSTR( ( *it )-getName( ) );
+OUString sId = STD_TO_OUSTR( ( *it )-getId( ) );
+aUrl.setObjectId( sId );
 aUrl.setObjectPath( sPath );
 uno::Reference ucb::XContentIdentifier  xId = new 
ucbhelper::ContentIdentifier( aUrl.asString( ) );
 uno::Reference ucb::XContent  xContent = new Content( 
m_xContext, m_pProvider, xId, *it );
diff --git a/ucb/source/ucp/cmis/cmis_oauth2_providers.hxx 
b/ucb/source/ucp/cmis/cmis_oauth2_providers.hxx
new file mode 100644
index 000..bd3df5b
--- /dev/null
+++ b/ucb/source/ucp/cmis/cmis_oauth2_providers.hxx
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ */
+
+#ifndef CMIS_OAUTH2_PROVIDER2_HXX
+#define CMIS_OAUTH2_PROVIDERS_HXX
+
+
+namespace cmis
+{
+
+#define GDRIVE_BASE_URL https://www.googleapis.com/drive/v2;
+#define GDRIVE_CLIENT_ID 457862564325.apps.googleusercontent.com
+#define GDRIVE_CLIENT_SECRET GYWrDtzyZQZ0_g5YoBCC6F0I
+#define GDRIVE_AUTH_URL https://accounts.google.com/o/oauth2/auth;
+#define GDRIVE_TOKEN_URL https://accounts.google.com/o/oauth2/token;
+#define GDRIVE_REDIRECT_URI urn:ietf:wg:oauth:2.0:oob
+#define GDRIVE_SCOPE https://www.googleapis.com/auth/drive;
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx
index

[Libreoffice-commits] core.git: Branch 'feature/cmis' - sfx2/source

2013-07-13 Thread Cao Cuong Ngo
 sfx2/source/dialog/dinfdlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4844a020da357eacb15831bf3cd7e095b06bb960
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Sat Jul 13 15:01:02 2013 +0200

Cmis properties dialog

when value is empty, set to String type

Change-Id: Ic9cabfa6437342ff8962e9d758e745d802e8f73b

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index a79f5f0..a508577 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2534,7 +2534,7 @@ void CmisPropertiesWindow::AddLine( const OUString sId, 
const OUString sName,
 SvtSysLocale aSysLocale;
 const LocaleDataWrapper rLocaleWrapper = aSysLocale.GetLocaleData();
 pNewLine-m_aName.SetText( sName );
-OUString sType = CMIS_TYPE_ANY;
+OUString sType = CMIS_TYPE_STRING;
 OUString sValue;
 
 if ( rAny = nTmpValue )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: feature/cmis now using the future libcmis 0.4.0

2013-07-12 Thread Cao Cuong Ngo
On Fri, Jul 12, 2013 at 10:51 AM, Cedric Bosdonnat cbosdon...@suse.comwrote:

 Hello Cuong,

 On Fri, 2013-07-12 at 10:08 +0200, Cedric Bosdonnat wrote:
   When I run make install of libcmis, there is an error of docbook as
   following:
  
   /usr/bin/docbook-to-man doc/cmis-client.xml
  
 /usr/bin/nsgmls:/usr/share/xml/docbook/schema/dtd/4.3/docbookx.dtd:112:17:E:
   X20AC is not a function name
  
 /usr/bin/nsgmls:/usr/share/xml/entities/xml-iso-entities-8879.1986/ISOamsa.ent:40:19:E:
   X21B6 is not a function name
  
   My docbook-to-man version is 1:2.0.0-31.
   Does this happen to you?
 
  No it doesn't happen here. the docbook2x package here on openSuse
  Factory is 0.8.8-119.2 and works fine.
 
  The errors you are reporting really seem to come from the docbook2x
  package you installed.

 Found and fixed the problem: on some distros, docbook-to-man only eats
 SGML. I fixed libcmis configure.ac to prefer docbook2x.

 Tell me if it works better now.


Actually it's docbook2x-man ;)


 --
 Cedric


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/cmis' - ucb/source

2013-07-10 Thread Cao Cuong Ngo
 ucb/source/ucp/cmis/cmis_content.cxx |   63 +--
 1 file changed, 61 insertions(+), 2 deletions(-)

New commits:
commit 86d3cebe0711bb1c643fa24b22c4761e237b3c64
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Wed Jul 10 10:40:48 2013 +0200

CMIS properties dialog

Convert Any to Cmis properties

Change-Id: I307d337363a84bae8585625ee3eeb641fde25792

diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 370b402..cbce84b 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -197,6 +197,55 @@ namespace
 }
 return aValue;
 }
+
+libcmis::PropertyPtr lcl_unoToCmisProperty( document::CmisProperty prop )
+{
+libcmis::PropertyTypePtr propertyType( new libcmis::PropertyType( ) );
+
+OUString id = prop.Id;
+OUString name = prop.Name;
+bool bUpdatable = prop.Updatable;
+bool bRequired = prop.Required;
+bool bMultiValued = prop.MultiValued;
+bool bOpenChoice = prop.OpenChoice;
+uno::Any value = prop.Value;
+libcmis::PropertyType::Type type = libcmis::PropertyType::String;
+
+propertyType-setId( OUSTR_TO_STDSTR( id ));
+propertyType-setDisplayName( OUSTR_TO_STDSTR( name ) );
+propertyType-setUpdatable( bUpdatable );
+propertyType-setRequired( bRequired );
+propertyType-setMultiValued( bMultiValued );
+propertyType-setOpenChoice( bOpenChoice );
+propertyType-setType( type );
+
+std::vector std::string  values;
+
+// convert UNO value to string vector
+if ( bMultiValued )
+{
+uno::Sequence OUString  aStrings;
+value = aStrings;
+sal_Int32 len = aStrings.getLength( );
+for ( sal_Int32 i = 0; i  len; i++ )
+{
+string str = OUSTR_TO_STDSTR( aStrings[i] );
+values.push_back( str );
+}
+}
+else
+{
+OUString val;
+value = val;
+std::string str = OUSTR_TO_STDSTR( val );
+values.push_back( str);
+}
+
+libcmis::PropertyPtr property( new libcmis::Property( propertyType, 
values ) );
+
+return property;
+}
+
 }
 
 namespace cmis
@@ -417,11 +466,21 @@ namespace cmis
 }
 
 libcmis::ObjectPtr Content::updateProperties(
- const uno::Any /*iCmisProps*/,
+ const uno::Any iCmisProps,
  const uno::Reference ucb::XCommandEnvironment  xEnv )
 {
-// TODO convert iCmisProps to aProperties;
+// Convert iCmisProps to Cmis Properties;
+uno::Sequence document::CmisProperty  aPropsSeq;
+iCmisProps = aPropsSeq;
 map string, libcmis::PropertyPtr  aProperties;
+
+sal_Int32 propsLen = aPropsSeq.getLength( );
+for ( sal_Int32 i = 0; i propsLen; i++ )
+{
+std::string id = OUSTR_TO_STDSTR( aPropsSeq[i].Id );
+libcmis::PropertyPtr prop = lcl_unoToCmisProperty( aPropsSeq[i] );
+aProperties.insert( std::pairstring, libcmis::PropertyPtr( id, 
prop ) );
+}
 libcmis::ObjectPtr updateObj;
 try
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cmis' - include/sfx2 sfx2/source

2013-07-10 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx   |5 +++
 sfx2/source/dialog/dinfdlg.cxx |   54 ++---
 2 files changed, 45 insertions(+), 14 deletions(-)

New commits:
commit 0677b349740393c6167a9f10f29c50fab163
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Wed Jul 10 16:11:04 2013 +0200

Cmis update properties

Change-Id: I13db07386f766019701ad9348988dcede718660c

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index d389170..43b20ad 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -584,6 +584,11 @@ public:
 
 struct CmisPropertyLine
 {
+OUString  m_sId;
+bool  m_bUpdatable;
+bool  m_bRequired;
+bool  m_bMultiValued;
+bool  m_bOpenChoice;
 FixedText m_aName;
 FixedText m_aType;
 CmisPropertiesEditm_aValueEdit;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 2bf7a04..a79f5f0 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -576,21 +576,33 @@ std::vector CmisProperty*  
SfxDocumentInfoItem::GetCmisProperties() const
 
 uno::Sequence document::CmisProperty  
SfxDocumentInfoItem::GetCmisPropertiesSeq() const
 {
-Sequence document::CmisProperty  aPropertiesSeq( 
m_aCmisProperties.size() );
+
 sal_Int32 i = 0;
 std::vector CmisProperty* ::const_iterator pIter;
+sal_Int32 updatableCount = 0, nCount = 0;
+
+for ( pIter = m_aCmisProperties.begin();
+pIter != m_aCmisProperties.end(); ++pIter, ++i )
+{
+if ( ( *pIter )-m_bUpdatable ) updatableCount++;
+}
+Sequence document::CmisProperty  aPropertiesSeq( updatableCount );
+
 for ( pIter = m_aCmisProperties.begin();
-pIter != m_aCmisProperties.end(); ++pIter, ++i )
+pIter != m_aCmisProperties.end(); ++pIter, ++i )
+if (( *pIter )-m_bUpdatable )
 {
 CmisProperty* aProp = *pIter;
-aPropertiesSeq[i].Id = aProp-m_sId;
-aPropertiesSeq[i].Name = aProp-m_sName;
-aPropertiesSeq[i].Updatable = aProp-m_bUpdatable;
-aPropertiesSeq[i].Required = aProp-m_bRequired;
-aPropertiesSeq[i].MultiValued = aProp-m_bMultiValued;
-aPropertiesSeq[i].OpenChoice = aProp-m_bOpenChoice;
-aPropertiesSeq[i].Choices = aProp-m_aChoices;
-aPropertiesSeq[i].Value = aProp-m_aValue;
+aPropertiesSeq[nCount].Id = aProp-m_sId;
+aPropertiesSeq[nCount].Name = aProp-m_sName;
+aPropertiesSeq[nCount].Updatable = aProp-m_bUpdatable;
+aPropertiesSeq[nCount].Required = aProp-m_bRequired;
+aPropertiesSeq[nCount].MultiValued = aProp-m_bMultiValued;
+aPropertiesSeq[nCount].OpenChoice = aProp-m_bOpenChoice;
+aPropertiesSeq[nCount].Choices = aProp-m_aChoices;
+aPropertiesSeq[nCount].Value = aProp-m_aValue;
+
+nCount++;
 }
 
 return aPropertiesSeq;
@@ -2265,6 +2277,7 @@ void CmisPropertiesYesNoButton::Resize()
 
 // struct CmisPropertyLine -
 CmisPropertyLine::CmisPropertyLine( Window* pParent ) :
+m_sId   ( ),
 m_aName ( pParent, SfxResId( SFX_CMIS_PROPERTY_NAME ) ),
 m_aType ( pParent, SfxResId( SFX_CMIS_PROPERTY_TYPE ) ),
 m_aValueEdit( pParent, SfxResId( SFX_CMIS_ED_PROPERTY_VALUE ), this ),
@@ -2463,12 +2476,19 @@ void CmisPropertiesWindow::updateLineWidth()
 }
 }
 
-void CmisPropertiesWindow::AddLine( const OUString /*sId*/, const OUString 
sName,
-const bool bUpdatable, const bool 
/*bRequired*/,
-const bool /*bMultiValued*/, const bool 
/*bOpenChoice*/,
+void CmisPropertiesWindow::AddLine( const OUString sId, const OUString sName,
+const bool bUpdatable, const bool 
bRequired,
+const bool bMultiValued, const bool 
bOpenChoice,
 Any /*aChoices*/, Any rAny )
 {
 CmisPropertyLine* pNewLine = new CmisPropertyLine( this );
+
+pNewLine-m_sId = sId;
+pNewLine-m_bUpdatable = bUpdatable;
+pNewLine-m_bRequired = bRequired;
+pNewLine-m_bMultiValued = bMultiValued;
+pNewLine-m_bOpenChoice = bOpenChoice;
+
 pNewLine-m_aValueEdit.SetLoseFocusHdl( LINK( this, CmisPropertiesWindow, 
EditLoseFocusHdl ) );
 
 pNewLine-m_aName.SetAccessibleName(m_aName.GetAccessibleName());
@@ -2631,6 +2651,12 @@ Sequence document::CmisProperty  
CmisPropertiesWindow::GetCmisProperties() con
 {
 CmisPropertyLine* pLine = *pIter;
 
+aPropertiesSeq[i].Id = pLine-m_sId;
+aPropertiesSeq[i].Updatable = pLine-m_bUpdatable;
+aPropertiesSeq[i].Required = pLine-m_bRequired;
+aPropertiesSeq[i].OpenChoice = pLine-m_bOpenChoice

[Libreoffice-commits] core.git: Branch 'feature/cmis' - include/sfx2 offapi/com sfx2/source ucb/source

2013-07-09 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx   |4 
 include/sfx2/sfxbasemodel.hxx  |5 +
 offapi/com/sun/star/document/XCmisDocument.idl |2 ++
 sfx2/source/dialog/dinfdlg.cxx |   22 ++
 sfx2/source/doc/objserv.cxx|5 -
 sfx2/source/doc/sfxbasemodel.cxx   |   23 +++
 ucb/source/ucp/cmis/cmis_content.cxx   |   25 +
 ucb/source/ucp/cmis/cmis_content.hxx   |5 +
 8 files changed, 90 insertions(+), 1 deletion(-)

New commits:
commit b9383942694097fd1fa243fe6a5f1962ab3f3671
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Tue Jul 9 18:54:35 2013 +0200

CMIS properties dialog: update properties

Change-Id: Ia506713b61dc6c1343eac3640863c86a2fc3f18f

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 49eac9b..d389170 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -162,6 +162,10 @@ public:
 const com::sun::star::uno::Any rValue );
 
 std::vector CmisProperty*   GetCmisProperties() const;
+
+::com::sun::star::uno::Sequence ::com::sun::star::document::CmisProperty 
+GetCmisPropertiesSeq() const;
+
 voidClearCmisProperties();
 voidAddCmisProperty(  const OUString sId, const OUString sName,
   const bool bUpdatable, const bool bRequired,
diff --git a/include/sfx2/sfxbasemodel.hxx b/include/sfx2/sfxbasemodel.hxx
index 10115b6..bcc1bf0 100644
--- a/include/sfx2/sfxbasemodel.hxx
+++ b/include/sfx2/sfxbasemodel.hxx
@@ -1316,6 +1316,11 @@ public:
 css::document::CmisProperty  _cmisproperties )
 throw (css::uno::RuntimeException);
 
+virtual void SAL_CALL updateCmisProperties(
+const css::uno::Sequence
+css::document::CmisProperty  _cmisproperties )
+throw (css::uno::RuntimeException);
+
 virtual void SAL_CALL checkOut(  ) throw ( css::uno::RuntimeException );
 virtual void SAL_CALL cancelCheckOut(  ) throw ( 
css::uno::RuntimeException );
 virtual void SAL_CALL checkIn( sal_Bool bIsMajor, const OUString  
rMessage  )
diff --git a/offapi/com/sun/star/document/XCmisDocument.idl 
b/offapi/com/sun/star/document/XCmisDocument.idl
index 51bcf50..4e34a0f 100644
--- a/offapi/com/sun/star/document/XCmisDocument.idl
+++ b/offapi/com/sun/star/document/XCmisDocument.idl
@@ -44,6 +44,8 @@ interface XCmisDocument : com::sun::star::uno::XInterface
 
 boolean canCheckIn( );
 
+void updateCmisProperties( [in] sequence 
com::sun::star::document::CmisProperty cmisProperties );
+
 /** Contains the properties values named after their CMIS ID.
  */
 [attribute] sequence com::sun::star::document::CmisProperty 
CmisProperties;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 8d1e79e..2bf7a04 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -574,6 +574,28 @@ std::vector CmisProperty*  
SfxDocumentInfoItem::GetCmisProperties() const
 return aRet;
 }
 
+uno::Sequence document::CmisProperty  
SfxDocumentInfoItem::GetCmisPropertiesSeq() const
+{
+Sequence document::CmisProperty  aPropertiesSeq( 
m_aCmisProperties.size() );
+sal_Int32 i = 0;
+std::vector CmisProperty* ::const_iterator pIter;
+for ( pIter = m_aCmisProperties.begin();
+pIter != m_aCmisProperties.end(); ++pIter, ++i )
+{
+CmisProperty* aProp = *pIter;
+aPropertiesSeq[i].Id = aProp-m_sId;
+aPropertiesSeq[i].Name = aProp-m_sName;
+aPropertiesSeq[i].Updatable = aProp-m_bUpdatable;
+aPropertiesSeq[i].Required = aProp-m_bRequired;
+aPropertiesSeq[i].MultiValued = aProp-m_bMultiValued;
+aPropertiesSeq[i].OpenChoice = aProp-m_bOpenChoice;
+aPropertiesSeq[i].Choices = aProp-m_aChoices;
+aPropertiesSeq[i].Value = aProp-m_aValue;
+}
+
+return aPropertiesSeq;
+}
+
 void SfxDocumentInfoItem::ClearCmisProperties()
 {
 for ( sal_uInt32 i = 0; i  m_aCmisProperties.size(); i++ )
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index acb008f..91a59f7 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -518,10 +518,13 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest rReq)
 {
 // user has done some changes to DocumentInfo
 pDocInfoItem-UpdateDocumentInfo(getDocProperties());
+uno::Sequence document::CmisProperty  
aNewCmisProperties =
+pDocInfoItem-GetCmisPropertiesSeq( );
+xCmisDoc-updateCmisProperties( aNewCmisProperties );
 SetUseUserData( ((const SfxDocumentInfoItem 
*)pDocInfoItem)-IsUseUserData() );
 // add data from dialog

[Libreoffice-commits] core.git: Branch 'feature/cmis' - include/sfx2 sfx2/uiconfig

2013-07-08 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx |2 +-
 sfx2/uiconfig/ui/documentinfopage.ui |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c3d6ada991be98a9764707fd448673a0eb366453
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Mon Jul 8 22:21:10 2013 +0200

CMIS properties dialog: Fixed the * location bug

Tried to change the WB_PASSWORD but didn't work.

Change-Id: Id872fe041fc16b5d705c779372e2084f686cfd07

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index dc7d78d..49eac9b 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -186,7 +186,7 @@ private:
 
 SelectableFixedText*m_pShowTypeFT;
 CheckBox*   m_pReadOnlyCB;
-SelectableFixedText*m_pFileValFt;
+FixedText*  m_pFileValFt;
 SelectableFixedText*m_pShowSizeFT;
 
 SelectableFixedText*m_pCreateValFt;
diff --git a/sfx2/uiconfig/ui/documentinfopage.ui 
b/sfx2/uiconfig/ui/documentinfopage.ui
index 8ea0bf3..893186c 100644
--- a/sfx2/uiconfig/ui/documentinfopage.ui
+++ b/sfx2/uiconfig/ui/documentinfopage.ui
@@ -342,7 +342,7 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=justifyleft/property
-property name=selectableTrue/property
+property name=selectableFalse/property
 property name=wrapTrue/property
 property name=hexpandTrue/property
 property name=max_width_chars60/property
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cmis' - sfx2/uiconfig

2013-06-28 Thread Cao Cuong Ngo
 sfx2/uiconfig/ui/documentinfopage.ui |   16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

New commits:
commit e493b8eb5881609e31047a66a5d17282fc8607a0
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Fri Jun 28 11:37:39 2013 +0200

Properties dialog

Change the Location GtkLabel in general tab to multiple lines.
However for unknown reason the text become all *.

Change-Id: Ia9553f93303ed5f831f61adda0f060a889e7086a

diff --git a/sfx2/uiconfig/ui/documentinfopage.ui 
b/sfx2/uiconfig/ui/documentinfopage.ui
index eeccbd0..8ea0bf3 100644
--- a/sfx2/uiconfig/ui/documentinfopage.ui
+++ b/sfx2/uiconfig/ui/documentinfopage.ui
@@ -5,6 +5,7 @@
 property name=visibleTrue/property
 property name=can_focusFalse/property
 property name=hexpandTrue/property
+property name=vexpandTrue/property
 property name=border_width6/property
 property name=row_spacing6/property
 property name=column_spacing18/property
@@ -210,9 +211,11 @@
 child
   object class=GtkCheckButton id=userdatacb
 property name=label translatable=yes_Apply user data/property
+property name=use_action_appearanceFalse/property
 property name=can_focusTrue/property
 property name=receives_defaultFalse/property
 property name=no_show_allTrue/property
+property name=use_action_appearanceFalse/property
 property name=use_underlineTrue/property
 property name=xalign0/property
 property name=draw_indicatorTrue/property
@@ -227,9 +230,11 @@
 child
   object class=GtkButton id=reset
 property name=label translatable=yesReset/property
+property name=use_action_appearanceFalse/property
 property name=can_focusTrue/property
 property name=receives_defaultTrue/property
 property name=no_show_allTrue/property
+property name=use_action_appearanceFalse/property
   /object
   packing
 property name=left_attach2/property
@@ -241,9 +246,11 @@
 child
   object class=GtkButton id=signature
 property name=label translatable=yesDi_gital 
Signature.../property
+property name=use_action_appearanceFalse/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
 property name=receives_defaultTrue/property
+property name=use_action_appearanceFalse/property
 property name=use_underlineTrue/property
   /object
   packing
@@ -334,8 +341,11 @@
   object class=GtkLabel id=showlocation
 property name=visibleTrue/property
 property name=can_focusFalse/property
-property name=xalign0/property
+property name=justifyleft/property
 property name=selectableTrue/property
+property name=wrapTrue/property
+property name=hexpandTrue/property
+property name=max_width_chars60/property
   /object
   packing
 property name=left_attach1/property
@@ -378,9 +388,11 @@
 child
   object class=GtkButton id=changepass
 property name=label translatable=yesChange _Password/property
+property name=use_action_appearanceFalse/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
 property name=receives_defaultTrue/property
+property name=use_action_appearanceFalse/property
 property name=use_underlineTrue/property
   /object
   packing
@@ -461,9 +473,11 @@
 child
   object class=GtkCheckButton id=readonlycb
 property name=label translatable=yes_Read-only/property
+property name=use_action_appearanceFalse/property
 property name=visibleTrue/property
 property name=can_focusTrue/property
 property name=receives_defaultFalse/property
+property name=use_action_appearanceFalse/property
 property name=use_underlineTrue/property
 property name=xalign0/property
 property name=draw_indicatorTrue/property
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSOC] Extend support for Document Management Systems, progress update

2013-06-25 Thread Cao Cuong Ngo
Hi all,

This is a short summary of what I have done until now:

- Finished Google Drive implementation, actually it was finished in May.
- Properties dialog:
+ Created the dialog UI.
+ Created the UNO interface for CMIS property type.
+ Fetched the CMIS properties to the dialog.
+ Editing of the properties ( not yet finished ).

Things I'm doing now include:
- Convert the properties dialog to .ui format.
- Fix UI problems.
- Fix multiple values display of the properties.
- Enable update properties.

Regards,
Cuong.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/cmis' - sfx2/source

2013-06-18 Thread Cao Cuong Ngo
 sfx2/source/dialog/dinfdlg.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit fcb72e2e0dfb9e2f19c5d2ca5c2b8e2d1c655b98
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Tue Jun 18 12:39:52 2013 +0200

CMIS properties dialog

Set ReadOnly depends on CMIS properties

Change-Id: I8aa29ab01d8a7f3ba2f71f17623a970dd9df8af4

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 0f4..07f5cfb 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2417,7 +2417,7 @@ void CmisPropertiesWindow::updateLineWidth()
 }
 
 void CmisPropertiesWindow::AddLine( const OUString /*sId*/, const OUString 
sName,
-const bool /*bUpdatable*/, const bool 
/*bRequired*/,
+const bool bUpdatable, const bool 
/*bRequired*/,
 Any rAny )
 {
 CmisPropertyLine* pNewLine = new CmisPropertyLine( this );
@@ -2426,6 +2426,9 @@ void CmisPropertiesWindow::AddLine( const OUString 
/*sId*/, const OUString sNa
 pNewLine-m_aName.SetAccessibleName(m_aName.GetAccessibleName());
 pNewLine-m_aType.SetAccessibleName(m_aType.GetAccessibleName());
 pNewLine-m_aValueEdit.SetAccessibleName(m_aValueEdit.GetAccessibleName());
+pNewLine-m_aValueEdit.SetReadOnly( !bUpdatable );
+pNewLine-m_aDateField.SetReadOnly( !bUpdatable );
+pNewLine-m_aTimeField.SetReadOnly( !bUpdatable );
 
 m_nLineHeight = m_aValueEdit.GetSizePixel().Height() ;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cmis' - 2 commits - include/sfx2 offapi/com offapi/UnoApi_offapi.mk sfx2/source ucb/source

2013-06-18 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx   |   14 +++-
 include/sfx2/sfxbasemodel.hxx  |   10 +--
 offapi/UnoApi_offapi.mk|2 
 offapi/com/sun/star/document/CmisProperty.idl  |   68 +
 offapi/com/sun/star/document/CmisPropertyValue.idl |   57 -
 offapi/com/sun/star/document/XCmisDocument.idl |4 -
 sfx2/source/dialog/dinfdlg.cxx |   63 ++-
 sfx2/source/doc/objserv.cxx|6 -
 sfx2/source/doc/sfxbasemodel.cxx   |   24 +++
 sfx2/source/view/sfxbasecontroller.cxx |2 
 ucb/source/ucp/cmis/cmis_content.cxx   |   28 
 11 files changed, 165 insertions(+), 113 deletions(-)

New commits:
commit 613ce6cadfb915b58a4611bf6d68660724fc95e8
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Tue Jun 18 15:10:26 2013 +0200

Cmis Property

Add MultiValued, OpenChoice and Choices to CMIS Property

Change-Id: Iade033c86878368b39a0264ad0a56d0286e6bffb

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 949cbd2..dc7d78d 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -165,6 +165,8 @@ public:
 voidClearCmisProperties();
 voidAddCmisProperty(  const OUString sId, const OUString sName,
   const bool bUpdatable, const bool bRequired,
+  const bool bMultiValued, const bool 
bOpenChoice,
+  const com::sun::star::uno::Any Choices,
   const com::sun::star::uno::Any rValue );
 
 virtual SfxPoolItem*Clone( SfxItemPool* pPool = NULL ) const;
@@ -629,6 +631,8 @@ public:
 inline sal_Int32GetLineHeight() const { return m_nLineHeight; }
 voidAddLine( const OUString sId, const OUString sName,
  const bool bUpdatable, const bool bRequired,
+ const bool bMultiValued, const bool 
bOpenChoice,
+ com::sun::star::uno::Any aChoices,
  com::sun::star::uno::Any rAny );
 boolAreAllLinesValid() const;
 voidClearAllLines();
@@ -658,6 +662,8 @@ public:
 
 voidAddLine( const OUString sId, const OUString sName,
  const bool bUpdatable, const bool bRequired,
+ const bool bMultiValude, const bool bOpenChoice,
+ com::sun::star::uno::Any aChoices,
  com::sun::star::uno::Any rAny, bool bInteractive 
);
 
 inline bool AreAllLinesValid() const { return 
m_pPropertiesWin-AreAllLinesValid(); }
diff --git a/offapi/com/sun/star/document/CmisProperty.idl 
b/offapi/com/sun/star/document/CmisProperty.idl
index f6009a0..65caab1 100644
--- a/offapi/com/sun/star/document/CmisProperty.idl
+++ b/offapi/com/sun/star/document/CmisProperty.idl
@@ -21,7 +21,7 @@
 
 module com {  module sun {  module star {  module document {
 
-/** specifies a CMIS property value.
+/** specifies a CMIS property.
  */
 struct CmisProperty
 {
@@ -42,6 +42,19 @@ struct CmisProperty
 */
 boolean Required;
 
+/** specifies if the property has multiple value
+*/
+boolean MultiValued;
+
+/** specifies if the property value can be freely set
+or is restricted from a list of choices.
+*/
+boolean OpenChoice;
+
+/** specifies the possible choices of the values.
+*/
+any Choices;
+
 /** specifies value of the property
 */
 any Value;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 1e85aad..8d1e79e 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -97,26 +97,38 @@ struct CmisProperty
 OUStringm_sName;
 boolm_bUpdatable;
 boolm_bRequired;
+boolm_bMultiValued;
+boolm_bOpenChoice;
+com::sun::star::uno::Anym_aChoices;
 com::sun::star::uno::Anym_aValue;
 
 CmisProperty( const OUString sId,
   const OUString sName,
   const bool bUpdatable,
   const bool bRequired,
+  const bool bMultiValued,
+  const bool bOpenChoice,
+  const com::sun::star::uno::Any aChoices,
   const com::sun::star::uno::Any rValue ) :
 m_sId( sId ),
 m_sName( sName ),
 m_bUpdatable( bUpdatable ),
 m_bRequired( bRequired ),
+m_bMultiValued( bMultiValued ),
+m_bOpenChoice( bOpenChoice ),
+m_aChoices( aChoices),
 m_aValue( rValue )
 {}
 
 inline

[Libreoffice-commits] core.git: Branch 'feature/cmis' - 2 commits - include/sfx2 offapi/com offapi/UnoApi_offapi.mk sfx2/source ucb/source

2013-06-17 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx   |   27 +++--
 include/sfx2/sfxbasemodel.hxx  |   12 --
 offapi/UnoApi_offapi.mk|1 
 offapi/com/sun/star/document/CmisPropertyValue.idl |   57 +++
 offapi/com/sun/star/document/XCmisDocument.idl |8 -
 sfx2/source/dialog/dinfdlg.cxx |  103 -
 sfx2/source/doc/objserv.cxx|6 -
 sfx2/source/doc/sfxbasemodel.cxx   |   31 +-
 sfx2/source/view/sfxbasecontroller.cxx |2 
 ucb/source/ucp/cmis/cmis_content.cxx   |   39 ++-
 10 files changed, 181 insertions(+), 105 deletions(-)

New commits:
commit 69ea6d0890984274983ff2a7370d3f355b6aa32a
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Mon Jun 17 15:17:00 2013 +0200

CMIS properties

Create a CmisPropertyValue with additional DisplayName,
Updatable and Required properties.

Change-Id: Ia20d76a739ac5c51d7c89ef6f1a40a299697cb0e

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 3830c46..9edaf7d 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -24,6 +24,7 @@
 
 #include com/sun/star/util/DateTime.hpp
 #include com/sun/star/util/Duration.hpp
+#include com/sun/star/document/CmisPropertyValue.hpp
 
 #include svl/stritem.hxx
 #include svl/zforlist.hxx
@@ -49,6 +50,7 @@ namespace com { namespace sun { namespace star {
 } } }
 
 struct CustomProperty;
+struct CmisProperty;
 
 
 // class SfxDocumentInfoItem -
@@ -76,8 +78,8 @@ private:
 sal_Boolm_bHasTemplate;
 sal_Boolm_bDeleteUserData;
 sal_Boolm_bUseUserData;
-std::vector CustomProperty*   m_aCustomProperties;
-std::vector CustomProperty*   m_aCmisProperties;
+std::vector CustomProperty* m_aCustomProperties;
+std::vector CmisProperty*   m_aCmisProperties;
 
 public:
 TYPEINFO();
@@ -86,7 +88,7 @@ public:
 const ::com::sun::star::uno::Reference
 ::com::sun::star::document::XDocumentProperties  i_xDocProps,
 const ::com::sun::star::uno::Sequence
-::com::sun::star::beans::PropertyValue  i_cmisProps,
+::com::sun::star::document::CmisPropertyValue  i_cmisProps,
 sal_Bool bUseUserData );
 SfxDocumentInfoItem( const SfxDocumentInfoItem );
 virtual ~SfxDocumentInfoItem();
@@ -159,10 +161,11 @@ public:
 voidAddCustomProperty(  const OUString sName,
 const com::sun::star::uno::Any rValue );
 
-std::vector CustomProperty*   GetCmisProperties() const;
+std::vector CmisProperty*   GetCmisProperties() const;
 voidClearCmisProperties();
-voidAddCmisProperty(  const OUString sName,
-const com::sun::star::uno::Any rValue );
+voidAddCmisProperty(  const OUString sId, const OUString sName,
+  const bool bUpdatable, const bool bRequired,
+  const com::sun::star::uno::Any rValue );
 
 virtual SfxPoolItem*Clone( SfxItemPool* pPool = NULL ) const;
 virtual int operator==( const SfxPoolItem ) const;
@@ -624,12 +627,14 @@ public:
 voidInitControls( HeaderBar* pHeaderBar, const ScrollBar* 
pScrollBar );
 sal_uInt16  GetLineCount() const;
 inline sal_Int32GetLineHeight() const { return m_nLineHeight; }
-voidAddLine( const OUString sName, 
com::sun::star::uno::Any rAny );
+voidAddLine( const OUString sId, const OUString sName,
+ const bool bUpdatable, const bool bRequired,
+ com::sun::star::uno::Any rAny );
 boolAreAllLinesValid() const;
 voidClearAllLines();
 voidDoScroll( sal_Int32 nNewPos );
 
-::com::sun::star::uno::Sequence ::com::sun::star::beans::PropertyValue 
+::com::sun::star::uno::Sequence 
::com::sun::star::document::CmisPropertyValue 
 GetCmisProperties() const;
 voidupdateLineWidth();
 };
@@ -651,11 +656,13 @@ public:
 CmisPropertiesControl(Window* pParent);
 ~CmisPropertiesControl();
 
-voidAddLine( const OUString sName, com::sun::star::uno::Any 
rAny, bool bInteractive );
+voidAddLine( const OUString sId, const OUString sName,
+ const bool bUpdatable, const bool bRequired,
+ com::sun::star::uno::Any rAny, bool bInteractive 
);
 
 inline bool AreAllLinesValid() const { return 
m_pPropertiesWin-AreAllLinesValid(); }
 inline void ClearAllLines() { m_pPropertiesWin-ClearAllLines(); }
-inline ::com::sun::star::uno

[Libreoffice-commits] core.git: Branch 'feature/cmis' - include/sfx2 sfx2/source

2013-06-11 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx   |   38 ++
 sfx2/source/dialog/dinfdlg.cxx |  154 -
 sfx2/source/dialog/dinfdlg.hrc |   10 +-
 sfx2/source/dialog/dinfdlg.src |   80 +
 sfx2/source/inc/sfxlocal.hrc   |9 ++
 5 files changed, 149 insertions(+), 142 deletions(-)

New commits:
commit ea9e84cf2a6ddc190ec6a8b8c00cb2b71c6b580c
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Tue Jun 11 20:38:51 2013 +0200

CMIS properties dialog

Change property name and type to FixedText

Change-Id: I568e213efb0cd0fb0167d8dab397f67b3fa1f69e

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 397a011..3830c46 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -519,19 +519,6 @@ public:
 inline CmisPropertyLine*  GetLine() const { return m_pLine; }
 };
 
-class CmisPropertiesTypeBox : public ListBox
-{
-private:
-CmisPropertyLine* m_pLine;
-
-public:
-inline CmisPropertiesTypeBox(
-Window* pParent, const ResId rResId, CmisPropertyLine* pLine ) :
-ListBox( pParent, rResId ), m_pLine( pLine ) {}
-
-inline CmisPropertyLine*  GetLine() const { return m_pLine; }
-};
-
 class CmisPropertiesDateField : public DateField
 {
 private:
@@ -588,20 +575,17 @@ public:
 
 struct CmisPropertyLine
 {
-SelectableFixedText   m_aNameBox;
-CmisPropertiesTypeBox m_aTypeBox;
+FixedText m_aName;
+FixedText m_aType;
 CmisPropertiesEditm_aValueEdit;
 CmisPropertiesDateField   m_aDateField;
 CmisPropertiesTimeField   m_aTimeField;
 CmisPropertiesYesNoButton m_aYesNoButton;
-Point   m_aDatePos;
-Point   m_aTimePos;
-Sizem_aDateTimeSize;
-boolm_bTypeLostFocus;
-
+Point m_aDatePos;
+Point m_aTimePos;
+Size  m_aDateTimeSize;
+bool  m_bTypeLostFocus;
 CmisPropertyLine( Window* pParent );
-
-voidSetRemoved();
 };
 
 // class CmisPropertiesWindow --
@@ -609,8 +593,8 @@ struct CmisPropertyLine
 class CmisPropertiesWindow : public Window
 {
 private:
-SelectableFixedText m_aNameBox;
-ListBox m_aTypeBox;
+FixedText   m_aName;
+FixedText   m_aType;
 Editm_aValueEdit;
 DateField   m_aDateField;
 TimeField   m_aTimeField;
@@ -625,9 +609,7 @@ private:
 Timer   m_aEditLoseFocusTimer;
 Timer   m_aBoxLoseFocusTimer;
 
-DECL_LINK( TypeHdl, CmisPropertiesTypeBox* );
 DECL_LINK( EditLoseFocusHdl, CmisPropertiesEdit* );
-DECL_LINK( BoxLoseFocusHdl, CmisPropertiesTypeBox* );
 
 boolIsLineValid( CmisPropertyLine* pLine ) const;
 voidValidateLine( CmisPropertyLine* pLine, bool bIsFromTypeBox );
@@ -640,7 +622,7 @@ public:
 ~CmisPropertiesWindow();
 
 voidInitControls( HeaderBar* pHeaderBar, const ScrollBar* 
pScrollBar );
-sal_uInt16  GetVisibleLineCount() const;
+sal_uInt16  GetLineCount() const;
 inline sal_Int32GetLineHeight() const { return m_nLineHeight; }
 voidAddLine( const OUString sName, 
com::sun::star::uno::Any rAny );
 boolAreAllLinesValid() const;
@@ -691,7 +673,7 @@ private:
 protected:
 SfxCmisPropertiesPage( Window* pParent, const SfxItemSet );
 
-virtual sal_BoolFillItemSet( SfxItemSet );
+virtual sal_BoolFillItemSet( SfxItemSet );
 virtual voidReset( const SfxItemSet );
 virtual int DeactivatePage( SfxItemSet* pSet = NULL );
 
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index abd66d6..8f148dc 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2173,12 +2173,12 @@ void CmisPropertiesYesNoButton::Resize()
 
 // struct CmisPropertyLine -
 CmisPropertyLine::CmisPropertyLine( Window* pParent ) :
-m_aNameBox  ( pParent ),
-m_aTypeBox  ( pParent, SfxResId( SFX_LB_CMIS_PROPERTY_TYPE ), this ),
-m_aValueEdit( pParent, SfxResId( SFX_ED_PROPERTY_VALUE ), this ),
-m_aDateField( pParent, SfxResId( SFX_FLD_DATE), this),
-m_aTimeField( pParent, SfxResId( SFX_FLD_TIME), this),
-m_aYesNoButton  ( pParent, SfxResId( SFX_WIN_PROPERTY_YESNO ) ),
+m_aName ( pParent, SfxResId( SFX_CMIS_PROPERTY_TYPE ) ),
+m_aType ( pParent, SfxResId( SFX_CMIS_PROPERTY_TYPE ) ),
+m_aValueEdit( pParent

[Libreoffice-commits] core.git: Branch 'feature/cmis' - include/sfx2 sfx2/source

2013-06-10 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx   |7 +--
 sfx2/source/dialog/dinfdlg.cxx |   79 +++--
 sfx2/source/dialog/dinfdlg.hrc |6 +++
 sfx2/source/dialog/dinfdlg.src |   17 
 sfx2/source/inc/sfxlocal.hrc   |1 
 5 files changed, 56 insertions(+), 54 deletions(-)

New commits:
commit fca06947a4997482c3f061f368237dc0d91794ec
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Fri Jun 7 18:40:11 2013 +0200

CMIS properties dialog

Fix properties type editing

Change-Id: Ic36f0351ec738e7444508f8326c23e89150c9603

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 72d1ed1..397a011 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -588,14 +588,12 @@ public:
 
 struct CmisPropertyLine
 {
-ComboBox  m_aNameBox;
+SelectableFixedText   m_aNameBox;
 CmisPropertiesTypeBox m_aTypeBox;
 CmisPropertiesEditm_aValueEdit;
 CmisPropertiesDateField   m_aDateField;
 CmisPropertiesTimeField   m_aTimeField;
-CmisPropertiesEditButton  m_aEditButton;
 CmisPropertiesYesNoButton m_aYesNoButton;
-
 Point   m_aDatePos;
 Point   m_aTimePos;
 Sizem_aDateTimeSize;
@@ -611,12 +609,11 @@ struct CmisPropertyLine
 class CmisPropertiesWindow : public Window
 {
 private:
-ComboBoxm_aNameBox;
+SelectableFixedText m_aNameBox;
 ListBox m_aTypeBox;
 Editm_aValueEdit;
 DateField   m_aDateField;
 TimeField   m_aTimeField;
-PushButton  m_aEditButton;
 CmisPropertiesYesNoButton   m_aYesNoButton;
 
 sal_Int32   m_nLineHeight;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 7750f28..abd66d6 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2173,12 +2173,11 @@ void CmisPropertiesYesNoButton::Resize()
 
 // struct CmisPropertyLine -
 CmisPropertyLine::CmisPropertyLine( Window* pParent ) :
-m_aNameBox  ( pParent, SfxResId( SFX_CB_PROPERTY_NAME )  ),
-m_aTypeBox  ( pParent, SfxResId( SFX_LB_PROPERTY_TYPE ), this ),
+m_aNameBox  ( pParent ),
+m_aTypeBox  ( pParent, SfxResId( SFX_LB_CMIS_PROPERTY_TYPE ), this ),
 m_aValueEdit( pParent, SfxResId( SFX_ED_PROPERTY_VALUE ), this ),
 m_aDateField( pParent, SfxResId( SFX_FLD_DATE), this),
 m_aTimeField( pParent, SfxResId( SFX_FLD_TIME), this),
-m_aEditButton(pParent, SfxResId( SFX_PB_EDIT ), this),
 m_aYesNoButton  ( pParent, SfxResId( SFX_WIN_PROPERTY_YESNO ) ),
 m_bTypeLostFocus( false )
 
@@ -2194,12 +2193,11 @@ CmisPropertiesWindow::CmisPropertiesWindow(Window* 
pParent,
 const OUString rHeaderAccType,
 const OUString rHeaderAccValue) :
 Window(pParent),
-m_aNameBox  ( this, SfxResId( SFX_CB_PROPERTY_NAME ) ),
-m_aTypeBox  ( this, SfxResId( SFX_LB_PROPERTY_TYPE ) ),
+m_aNameBox  ( this ),
+m_aTypeBox  ( this, SfxResId( SFX_LB_CMIS_PROPERTY_TYPE ) ),
 m_aValueEdit( this, SfxResId( SFX_ED_PROPERTY_VALUE ) ),
 m_aDateField( this, SfxResId( SFX_FLD_DATE) ),
 m_aTimeField( this, SfxResId( SFX_FLD_TIME) ),
-m_aEditButton(this, SfxResId( SFX_PB_EDIT )),
 m_aYesNoButton  ( this, SfxResId( SFX_WIN_PROPERTY_YESNO ) ),
 m_nScrollPos (0),
 m_aNumberFormatter( ::comphelper::getProcessComponentContext(),
@@ -,14 +2220,12 @@ IMPL_LINK( CmisPropertiesWindow, TypeHdl, 
CmisPropertiesTypeBox*, pBox )
 {
 sal_Int64 nType = sal_Int64( (long)pBox-GetEntryData( 
pBox-GetSelectEntryPos() ) );
 CmisPropertyLine* pLine = pBox-GetLine();
-pLine-m_aValueEdit.Show( (CUSTOM_TYPE_TEXT == nType) || 
(CUSTOM_TYPE_NUMBER  == nType) );
-pLine-m_aDateField.Show( (CUSTOM_TYPE_DATE == nType) || 
(CUSTOM_TYPE_DATETIME  == nType) );
-pLine-m_aTimeField.Show( CUSTOM_TYPE_DATETIME  == nType );
-pLine-m_aYesNoButton.Show( CUSTOM_TYPE_BOOLEAN == nType );
+pLine-m_aValueEdit.Show(( CMIS_TYPE_STRING == nType ) || ( 
CMIS_TYPE_NUMBER == nType ) );
+pLine-m_aDateField.Show( CMIS_TYPE_DATETIME  == nType );
+pLine-m_aTimeField.Show( CMIS_TYPE_DATETIME  == nType );
+pLine-m_aYesNoButton.Show( CMIS_TYPE_BOOLEAN == nType );
 
-if ( nType == CUSTOM_TYPE_DATE )
-pLine-m_aDateField.SetPosSizePixel(pLine-m_aValueEdit.GetPosPixel(), 
pLine-m_aValueEdit.GetSizePixel());
-else if ( nType == CUSTOM_TYPE_DATETIME)
+if ( nType == CMIS_TYPE_DATETIME )
 {
 pLine-m_aDateField.SetPosSizePixel( pLine-m_aDatePos, 
pLine-m_aDateTimeSize );
 pLine-m_aTimeField.SetPosSizePixel(pLine-m_aTimePos, 
pLine

[Libreoffice-commits] core.git: Branch 'feature/cmis' - include/sfx2 sfx2/source sfx2/uiconfig

2013-06-03 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx |  189 +++
 sfx2/source/dialog/dinfdlg.cxx   |  699 ++-
 sfx2/source/doc/objserv.cxx  |   12 
 sfx2/uiconfig/ui/cmisinfopage.ui |   14 
 sfx2/uiconfig/ui/documentpropertiesdialog.ui |8 
 5 files changed, 902 insertions(+), 20 deletions(-)

New commits:
commit 748cb8b40824f9bcbfd4b692318701c311cb6c50
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Mon Jun 3 15:04:32 2013 +0200

CMIS properties dialog: load CMIS properties into the dialog

Change-Id: I40561de3ce944f017a79995d1ef38584443fbf02

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 2994819..72d1ed1 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -77,6 +77,7 @@ private:
 sal_Boolm_bDeleteUserData;
 sal_Boolm_bUseUserData;
 std::vector CustomProperty*   m_aCustomProperties;
+std::vector CustomProperty*   m_aCmisProperties;
 
 public:
 TYPEINFO();
@@ -84,6 +85,8 @@ public:
 SfxDocumentInfoItem( const String rFileName,
 const ::com::sun::star::uno::Reference
 ::com::sun::star::document::XDocumentProperties  i_xDocProps,
+const ::com::sun::star::uno::Sequence
+::com::sun::star::beans::PropertyValue  i_cmisProps,
 sal_Bool bUseUserData );
 SfxDocumentInfoItem( const SfxDocumentInfoItem );
 virtual ~SfxDocumentInfoItem();
@@ -156,6 +159,11 @@ public:
 voidAddCustomProperty(  const OUString sName,
 const com::sun::star::uno::Any rValue );
 
+std::vector CustomProperty*   GetCmisProperties() const;
+voidClearCmisProperties();
+voidAddCmisProperty(  const OUString sName,
+const com::sun::star::uno::Any rValue );
+
 virtual SfxPoolItem*Clone( SfxItemPool* pPool = NULL ) const;
 virtual int operator==( const SfxPoolItem ) const;
 virtual boolQueryValue( com::sun::star::uno::Any rVal, sal_uInt8 
nMemberId = 0 ) const;
@@ -496,12 +504,191 @@ public:
 static SfxTabPage*  Create( Window* pParent, const SfxItemSet );
 };
 
+struct CmisPropertyLine;
+
+class CmisPropertiesEdit : public Edit
+{
+private:
+CmisPropertyLine* m_pLine;
+
+public:
+inline CmisPropertiesEdit(
+Window* pParent, const ResId rResId, CmisPropertyLine* pLine ) :
+Edit( pParent, rResId ), m_pLine( pLine ) {}
+
+inline CmisPropertyLine*  GetLine() const { return m_pLine; }
+};
+
+class CmisPropertiesTypeBox : public ListBox
+{
+private:
+CmisPropertyLine* m_pLine;
+
+public:
+inline CmisPropertiesTypeBox(
+Window* pParent, const ResId rResId, CmisPropertyLine* pLine ) :
+ListBox( pParent, rResId ), m_pLine( pLine ) {}
+
+inline CmisPropertyLine*  GetLine() const { return m_pLine; }
+};
+
+class CmisPropertiesDateField : public DateField
+{
+private:
+CmisPropertyLine* m_pLine;
+
+public:
+inline CmisPropertiesDateField(
+Window* pParent, const ResId rResId, CmisPropertyLine* pLine ) :
+DateField( pParent, rResId ), m_pLine( pLine ) {}
+
+inline CmisPropertyLine*  GetLine() const { return m_pLine; }
+};
+class CmisPropertiesTimeField : public TimeField
+{
+private:
+CmisPropertyLine* m_pLine;
+
+public:
+inline CmisPropertiesTimeField(
+Window* pParent, const ResId rResId, CmisPropertyLine* pLine ) :
+TimeField( pParent, rResId ), m_pLine( pLine ) {}
+
+inline CmisPropertyLine*  GetLine() const { return m_pLine; }
+};
+
+class CmisPropertiesEditButton : public PushButton
+{
+CmisPropertyLine* m_pLine;
+
+public:
+CmisPropertiesEditButton( Window* pParent, const ResId rResId, 
CmisPropertyLine* pLine );
+~CmisPropertiesEditButton();
+
+DECL_LINK(ClickHdl, void *);
+};
+
+class CmisPropertiesYesNoButton : public Control
+{
+private:
+RadioButton m_aYesButton;
+RadioButton m_aNoButton;
+
+public:
+CmisPropertiesYesNoButton( Window* pParent, const ResId rResId );
+
+virtual voidResize();
+
+inline void CheckYes() { m_aYesButton.Check(); }
+inline void CheckNo() { m_aNoButton.Check(); }
+inline bool IsYesChecked() const { return m_aYesButton.IsChecked() != 
sal_False; }
+};
+
+// struct CmisPropertyLine -
+
+struct CmisPropertyLine
+{
+ComboBox  m_aNameBox;
+CmisPropertiesTypeBox m_aTypeBox;
+CmisPropertiesEditm_aValueEdit;
+CmisPropertiesDateField   m_aDateField;
+CmisPropertiesTimeField   m_aTimeField;
+CmisPropertiesEditButton  m_aEditButton;
+CmisPropertiesYesNoButton m_aYesNoButton;
+
+Point

new branch and submodules

2013-05-30 Thread Cao Cuong Ngo
Hi all,

I created a new branch feature/cmis for my GSoC project.

When I check git status it displays  modified:   dictionaries (new
commits)modified:   helpcontent2 (new commits)

Can anybody please tell me how to fix that?

Thanks a lot,
cuong.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: new branch and submodules

2013-05-30 Thread Cao Cuong Ngo
On 05/30/2013 02:52 PM, Joren wrote:

 'git submodule update' should do the trick .


Thanks a lot Joren 

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/cmis' - include/sfx2 sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk

2013-05-30 Thread Cao Cuong Ngo
 include/sfx2/dinfdlg.hxx |   19 ++
 sfx2/UIConfig_sfx.mk |1 
 sfx2/source/dialog/dinfdlg.cxx   |   31 ++
 sfx2/uiconfig/ui/cmisinfopage.ui |   78 +++
 sfx2/uiconfig/ui/documentpropertiesdialog.ui |   14 
 5 files changed, 143 insertions(+)

New commits:
commit cf17ad002d01418ac5517189da0f193dac9c32df
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Thu May 30 15:40:55 2013 +0200

CMIS properties dialog initialize

Change-Id: I1bdc2a9e8d2ee916fa37f836baf750385c820da4

diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index c0758b5..2994819 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -496,6 +496,25 @@ public:
 static SfxTabPage*  Create( Window* pParent, const SfxItemSet );
 };
 
+// class SfxCmisPropertiesPage 
-
+
+class SfxCmisPropertiesPage : public SfxTabPage
+{
+private:
+
+using TabPage::DeactivatePage;
+
+protected:
+SfxCmisPropertiesPage( Window* pParent, const SfxItemSet );
+
+virtual sal_BoolFillItemSet( SfxItemSet );
+virtual voidReset( const SfxItemSet );
+virtual int DeactivatePage( SfxItemSet* pSet = NULL );
+
+public:
+static SfxTabPage*  Create( Window* pParent, const SfxItemSet );
+};
+
 #endif // #ifndef _SFX_DINFDLG_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index 2adb858..4123f16 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/securityinfopage \
sfx2/uiconfig/ui/singletabdialog \
sfx2/uiconfig/ui/documentfontspage \
+   sfx2/uiconfig/ui/cmisinfopage \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index e13e557..cad2b91 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1148,6 +1148,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* 
pParent,
 AddTabPage(description, SfxDocumentDescPage::Create, 0);
 AddTabPage(customprops, SfxCustomPropertiesPage::Create, 0);
 AddTabPage(security, SfxSecurityPage::Create, 0);
+AddTabPage(cmisprops, SfxCmisPropertiesPage::Create, 0);
 }
 
 // ---
@@ -2079,4 +2080,34 @@ SfxTabPage* SfxCustomPropertiesPage::Create( Window* 
pParent, const SfxItemSet
 return new SfxCustomPropertiesPage( pParent, rItemSet );
 }
 
+// class SfxCmisPropertiesPage -
+SfxCmisPropertiesPage::SfxCmisPropertiesPage( Window* pParent, const 
SfxItemSet rItemSet )
+: SfxTabPage(pParent, CmisInfoPage, sfx/ui/cmisinfopage.ui, rItemSet)
+{
+}
+
+sal_Bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet /*rSet*/ )
+{
+sal_Bool bModified = sal_False;
+return bModified;
+}
+
+void SfxCmisPropertiesPage::Reset( const SfxItemSet /*rItemSet*/ )
+{
+
+}
+
+int SfxCmisPropertiesPage::DeactivatePage( SfxItemSet* /*pSet*/ )
+{
+int nRet = LEAVE_PAGE;
+
+return nRet;
+}
+
+SfxTabPage* SfxCmisPropertiesPage::Create( Window* pParent, const SfxItemSet 
rItemSet )
+{
+return new SfxCmisPropertiesPage( pParent, rItemSet );
+}
+
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/uiconfig/ui/cmisinfopage.ui b/sfx2/uiconfig/ui/cmisinfopage.ui
new file mode 100644
index 000..f393441
--- /dev/null
+++ b/sfx2/uiconfig/ui/cmisinfopage.ui
@@ -0,0 +1,78 @@
+?xml version=1.0 encoding=UTF-8?
+interface
+  !-- interface-requires gtk+ 3.0 --
+  object class=GtkGrid id=CmisInfoPage
+property name=visibleTrue/property
+property name=can_focusFalse/property
+property name=hexpandTrue/property
+property name=vexpandTrue/property
+property name=border_width6/property
+property name=row_spacing12/property
+child
+  object class=GtkLabel id=label56
+property name=visibleTrue/property
+property name=can_focusFalse/property
+property name=halignstart/property
+property name=label translatable=yes_CMIS Properties/property
+property name=use_underlineTrue/property
+  /object
+  packing
+property name=left_attach0/property
+property name=top_attach0/property
+property name=width1/property
+property name=height1/property
+  /packing
+/child
+child
+  object class=GtkBox id=box1
+property name=can_focusFalse/property
+property name=no_show_allTrue/property
+property name=hexpandTrue/property
+property name=spacing12/property
+property name=homogeneousTrue/property
+child
+  object class=GtkLabel id=name
+property name=visibleTrue/property
+property name=can_focusFalse/property

[GSoC] Extending support of Content Management Systems

2013-05-28 Thread Cao Cuong Ngo

Hi all,

I'm extremely glad to be selected in GSoC this year.

My project is to implement connection to Google Drive and
properties/version dialog.

Although the Google Drive implementation is nearly finished at the moment.

I currently stay in Paris, France. If any of you visit the city drop me
a mail we can have a nice chat about LO and/or beers ;)

(About my mobile number for privacy's sake I sent it to Cédric instead
of publishing here).

For the meantime, can't wait to make LibreOffice a more awesome office
suite :-)

Cao Cuong Ngo.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-qa] QA for GSoC project

2013-05-28 Thread Cao Cuong Ngo
Hi all,

I've been selected in GSoC this year, project Extend Support for
Content Management Systems.

I will implement the connection to Google Drive and properties/version
dialog extension of CMIS.

It would be great if someone can volunteer and spend sometimes to help
testing my future feature .

Thanks a lot.

All the bests,
Cao Cuong Ngo.

___
List Name: Libreoffice-qa mailing list
Mail address: Libreoffice-qa@lists.freedesktop.org
Change settings: http://lists.freedesktop.org/mailman/listinfo/libreoffice-qa
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://lists.freedesktop.org/archives/libreoffice-qa/


Re: [Libreoffice-qa] QA for GSoC project

2013-05-28 Thread Cao Cuong Ngo
Hi Joren,

On 05/28/2013 04:34 PM, Joren wrote:
 Pretty important for me and others: what are the requirements to test
 this (future) feature?
 I assume a Google account (with Google Drive) is one of (and only?)
 the major requirements here?

Yes the only requirement is a Google account :) with some documents and
folders in Google Drive of course.


 I'm surely willing to test, and I'm sure I'm not the only one here. I
 have Linux (Mint) and Mac OSX to test/build on. If you finished some
 work that require testing, I think it'll be good to explain us what to
 test, and how to test.


The implementation is done but we'll need to release libCMIS 0.4.0 and
connect it to LO, so in a couple of weeks we will be able to test this
feature.

Thanks,
Cuong.
___
List Name: Libreoffice-qa mailing list
Mail address: Libreoffice-qa@lists.freedesktop.org
Change settings: http://lists.freedesktop.org/mailman/listinfo/libreoffice-qa
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://lists.freedesktop.org/archives/libreoffice-qa/


Re: [Libreoffice-qa] QA for GSoC project

2013-05-28 Thread Cao Cuong Ngo
On 05/28/2013 04:43 PM, Robinson Tryon wrote:

 On Tue, May 28, 2013 at 10:15 AM, Cao Cuong Ngo cao.cuong@gmail.com 
 wrote:
 Hi all,

 I've been selected in GSoC this year, project Extend Support for
 Content Management Systems.

 I will implement the connection to Google Drive and properties/version
 dialog extension of CMIS.
 cool!

 It would be great if someone can volunteer and spend sometimes to help
 testing my future feature .
 When do you think that you'll be ready to provide builds to test?
 Please feel free to just ping the QA list if you need help testing
 something in particular during the summer 

I've already done the Google Drive implementation on the libCMIS side.
However we need to add some final touches and release libCMIS 0.4.0
before integrate it into LO.

 It would be helpful for you to ping the Documentation Team and chat
 about the best way to provide docs on how these new features work (or
 at least are *supposed* to work . That way when we test things in
 QA, we can refer to the documentation and make sure that the expected
 behavior and actual behavior are in agreement!


I'll try to do it when libCMIS 0.4.0 is released and put into LO in a
couple of weeks 

Cheers,
Cao Cuong Ngo.

___
List Name: Libreoffice-qa mailing list
Mail address: Libreoffice-qa@lists.freedesktop.org
Change settings: http://lists.freedesktop.org/mailman/listinfo/libreoffice-qa
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://lists.freedesktop.org/archives/libreoffice-qa/

Help to push to gerrit using https

2013-05-02 Thread Cao Cuong Ngo
Hi,

Anybody can please tell me how to push to gerrit using https
(username/password)?
Because I'm under proxy and can't user ssh.

Thanks a lot,
Cuong.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] fix fdo#47018 Impress pasting destroy bullet

2013-04-19 Thread Cao Cuong Ngo (via Code Review)
; mnFirstLineIndent = nTmp32;
+rStream  nTmp32; mnIndentAt = nTmp32;
+
+}
 SvxNumberFormat::~SvxNumberFormat()
 {
 delete pGraphicBrush;
 delete pBulletFont;
 }
 
-SvStream   SvxNumberFormat::Store(SvStream rStream, FontToSubsFontConverter 
pConverter)
+SvStream   SvxNumberFormat::Store(SvStream rStream)
 {
-if(pConverter  pBulletFont)
-{
-cBullet = ConvertFontToSubsFontChar(pConverter, cBullet);
-String sFontName = GetFontToSubsFontName(pConverter);
-pBulletFont-SetName(sFontName);
-}
-
 rStream  (sal_uInt16)NUMITEM_VERSION_04;
 
 rStream  (sal_uInt16)GetNumberingType();
@@ -251,6 +298,11 @@
 rStream  ( sal_Int32 ) mnIndentAt;
 
 return rStream;
+}
+
+SvxNumberFormat* SvxNumberFormat::Create( SvStream rStream )
+{
+return new SvxNumberFormat( rStream );
 }
 
 SvxNumberFormat SvxNumberFormat::operator=( const SvxNumberFormat rFormat )
@@ -621,7 +673,41 @@
 }
 }
 
-SvStream   SvxNumRule::Store(SvStream rStream)
+SvxNumRule::SvxNumRule( SvStream rStream )
+{
+sal_uInt16 nTmp16;
+rStream  nTmp16; // NUM_ITEM_VERSION
+rStream  nLevelCount;
+
+// first nFeatureFlags of old Versions
+rStream  nTmp16; nFeatureFlags = nTmp16;
+rStream  nTmp16; bContinuousNumbering = nTmp16;
+rStream  nTmp16; eNumberingType = ( SvxNumRuleType )nTmp16;
+
+for (sal_uInt16 i = 0; i  SVX_MAX_NUM; i++)
+{
+rStream  nTmp16;
+sal_Bool hasNumberingFormat = nTmp16;
+if ( hasNumberingFormat ){
+aFmts[i] = new SvxNumberFormat( rStream );
+aFmtsSet[i] = sal_True;
+}
+else
+{
+aFmts[i] = 0;
+aFmtsSet[i] = sal_False;
+}
+}
+//second nFeatureFlags for new versions
+rStream  nTmp16; nFeatureFlags = nTmp16;
+}
+
+SvxNumRule* SvxNumRule::Create( SvStream  rStream )
+{
+return new SvxNumRule( rStream );
+}
+
+SvStream SvxNumRule::Store( SvStream rStream )
 {
 rStream(sal_uInt16)NUMITEM_VERSION_03;
 rStreamnLevelCount;
@@ -630,33 +716,21 @@
 rStream(sal_uInt16)bContinuousNumbering;
 rStream(sal_uInt16)eNumberingType;
 
-FontToSubsFontConverter pConverter = 0;
-sal_Bool bConvertBulletFont = rStream.GetVersion() = 
SOFFICE_FILEFORMAT_50;
 for(sal_uInt16 i = 0; i  SVX_MAX_NUM; i++)
 {
 if(aFmts[i])
 {
 rStream  sal_uInt16(1);
-if(bConvertBulletFont  aFmts[i]-GetBulletFont())
-{
-if(!pConverter)
-pConverter =
-
CreateFontToSubsFontConverter(aFmts[i]-GetBulletFont()-GetName(),
-
FONTTOSUBSFONT_EXPORT|FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS);
-}
-aFmts[i]-Store(rStream, pConverter);
+aFmts[i]-Store(rStream);
 }
 else
 rStream  sal_uInt16(0);
 }
 //second save of nFeatureFlags for new versions
 rStream(sal_uInt16)nFeatureFlags;
-if(pConverter)
-DestroyFontToSubsFontConverter(pConverter);
 
 return rStream;
 }
-
 SvxNumRule::~SvxNumRule()
 {
 for(sal_uInt16 i = 0; i  SVX_MAX_NUM; i++)
@@ -843,9 +917,10 @@
 {
 }
 
-SfxPoolItem* SvxNumBulletItem::Create(SvStream s, sal_uInt16 n) const
+SfxPoolItem* SvxNumBulletItem::Create(SvStream rStream, sal_uInt16 
/*nItemVersion*/ ) const
 {
-return SfxPoolItem::Create(s, n );
+SvxNumRule aNumRule( rStream );
+return new SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET );
 }
 
 SvxNumBulletItem::SvxNumBulletItem(const SvxNumBulletItem rCopy) :

-- 
To view, visit https://gerrit.libreoffice.org/3479
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11ba65f8a4972ab1a6d4f30337a0a779f22cdd35
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[ABANDONED] Some clean up related to copypaste function

2013-04-19 Thread Cao Cuong Ngo (via Code Review)
Cao Cuong Ngo has abandoned this change.

Change subject: Some clean up related to copypaste function
..


Patch Set 2: Abandoned

Intergrated in https://gerrit.libreoffice.org/#/c/3479/

-- 
To view, visit https://gerrit.libreoffice.org/3464
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I3d781468b1878d7c6589ef4a313c66bf00e4d75b
Gerrit-PatchSet: 2
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com
Gerrit-Reviewer: Eike Rathke er...@redhat.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[ABANDONED] fix fdo#47018 Impress pasting destroy bullet

2013-04-19 Thread Cao Cuong Ngo (via Code Review)
Cao Cuong Ngo has abandoned this change.

Change subject: fix fdo#47018 Impress pasting destroy bullet
..


Patch Set 1: Abandoned

Merged

-- 
To view, visit https://gerrit.libreoffice.org/3479
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I11ba65f8a4972ab1a6d4f30337a0a779f22cdd35
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2013-04-18 Thread Cao Cuong Ngo
 editeng/inc/editeng/numitem.hxx   |9 ++-
 editeng/source/items/frmitems.cxx |5 +
 editeng/source/items/numitem.cxx  |  103 --
 3 files changed, 107 insertions(+), 10 deletions(-)

New commits:
commit a95cce27295f9cd255fa72eaded00972e3efb69b
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Fri Apr 12 18:42:46 2013 +0200

fix fdo#47018 Impress paste destroy bullet

Currently the copy function stores the paragraph attributes
to SvStream but the restoration in paste isn't implemented yet!
This patch implements the attributes loading from SvStream.

Change-Id: I58928ca66a83b3fe3c3894a28ccf1e7fe5f661b3
Reviewed-on: https://gerrit.libreoffice.org/3369
Reviewed-by: Julien Nabet serval2...@yahoo.fr
Reviewed-by: Eike Rathke er...@redhat.com
Tested-by: Eike Rathke er...@redhat.com

diff --git a/editeng/inc/editeng/numitem.hxx b/editeng/inc/editeng/numitem.hxx
index 86f4aef..f17e9cf 100644
--- a/editeng/inc/editeng/numitem.hxx
+++ b/editeng/inc/editeng/numitem.hxx
@@ -157,10 +157,12 @@ public:
 explicit SvxNumberFormat( sal_Int16 nNumberingType,
  SvxNumPositionAndSpaceMode ePositionAndSpaceMode = 
LABEL_WIDTH_AND_POSITION );
 SvxNumberFormat(const SvxNumberFormat rFormat);
+SvxNumberFormat( SvStream  rStream );
 
 virtual ~SvxNumberFormat();
 
 SvStream   Store(SvStream rStream, FontToSubsFontConverter 
pConverter);
+SvxNumberFormat* Create(SvStream rStream );
 
 SvxNumberFormat operator=( const SvxNumberFormat  );
 sal_Booloperator==( const SvxNumberFormat  ) const;
@@ -252,6 +254,7 @@ public:
 eDefaultNumberFormatPositionAndSpaceMode
 = SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
 SvxNumRule(const SvxNumRule rCopy);
+SvxNumRule(SvStream rStream);
 virtual ~SvxNumRule();
 
 int operator==( const SvxNumRule ) const;
@@ -260,7 +263,7 @@ public:
 SvxNumRule operator=( const SvxNumRule  );
 
 SvStream   Store(SvStream rStream);
-
+SvxNumRule* Create(SvStream rStream);
 const SvxNumberFormat*  Get(sal_uInt16 nLevel)const;
 const SvxNumberFormat  GetLevel(sal_uInt16 nLevel)const;
 voidSetLevel(sal_uInt16 nLevel, const SvxNumberFormat 
rFmt, sal_Bool bIsValid = sal_True);
@@ -294,9 +297,9 @@ public:
 virtual ~SvxNumBulletItem();
 
 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
-virtual SfxPoolItem* Create(SvStream , sal_uInt16) const;
+virtual SfxPoolItem* Create(SvStream rStream, sal_uInt16 
nItemVersion) const;
 sal_uInt16  GetVersion( sal_uInt16 nFileVersion ) const;
-virtual SvStreamStore(SvStream , sal_uInt16 nItemVersion ) const;
+virtual SvStreamStore(SvStream rStream, sal_uInt16 nItemVersion 
) const;
 virtual int  operator==( const SfxPoolItem ) const;
 
 SvxNumRule* GetNumRule() const {return pNumRule;}
diff --git a/editeng/source/items/frmitems.cxx 
b/editeng/source/items/frmitems.cxx
index 8741e69..b8ec78a 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3475,7 +3475,7 @@ SvxBrushItem::SvxBrushItem( SvStream rStream, sal_uInt16 
nVersion,
 if ( nVersion = BRUSH_GRAPHIC_VERSION )
 {
 sal_uInt16 nDoLoad = 0;
-sal_Int8 nPos;
+sal_uInt16 nPos;
 
 rStream  nDoLoad;
 
@@ -3892,7 +3892,8 @@ SvStream SvxBrushItem::Store( SvStream rStream , 
sal_uInt16 /*nItemVersion*/ )
 // UNICODE: rStream  *pStrFilter;
 rStream.WriteUniOrByteString(*pStrFilter, rStream.GetStreamCharSet());
 }
-rStream  (sal_Int8)eGraphicPos;
+// SvStream doesn't support sal_Int8
+rStream  (sal_uInt16)eGraphicPos;
 return rStream;
 }
 
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 7c3ec9c..7ef42e0 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -28,6 +28,7 @@
 #include editeng/editids.hrc
 #include editeng/editrids.hrc
 #include editeng/numdef.hxx
+#include editeng/eeitem.hxx
 #include vcl/graph.hxx
 #include vcl/window.hxx
 #include vcl/svapp.hxx
@@ -177,6 +178,59 @@ SvxNumberFormat::SvxNumberFormat(const SvxNumberFormat 
rFormat) :
 *this = rFormat;
 }
 
+SvxNumberFormat::SvxNumberFormat( SvStream rStream )
+{
+sal_uInt16 nTmp16;
+sal_Int32  nTmp32;
+rStream  nTmp16; // Version number
+
+rStream  nTmp16; SetNumberingType( nTmp16 );
+rStream  nTmp16; eNumAdjust = ( SvxAdjust )nTmp16;
+rStream  nTmp16; nInclUpperLevels = nTmp16;
+rStream  nStart;
+rStream  nTmp16; cBullet = (sal_Unicode)nTmp16;
+
+rStream  nFirstLineOffset;
+rStream  nAbsLSpace;
+rStream  nLSpace;
+
+rStream  nCharTextDistance;
+
+sPrefix = rStream.ReadUniOrByteString( rStream.GetStreamCharSet

[PATCH] Some clean up related to copypaste function

2013-04-18 Thread Cao Cuong Ngo (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3464

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/64/3464/1

Some clean up related to copypaste function

Including SvStream file format version, SvStream character encoding,
numbering rule level depth and font conversion.

Change-Id: I3d781468b1878d7c6589ef4a313c66bf00e4d75b
---
M editeng/inc/editeng/numitem.hxx
M editeng/source/editeng/editobj.cxx
M editeng/source/items/numitem.cxx
3 files changed, 11 insertions(+), 23 deletions(-)



diff --git a/editeng/inc/editeng/numitem.hxx b/editeng/inc/editeng/numitem.hxx
index f17e9cf..546f82d 100644
--- a/editeng/inc/editeng/numitem.hxx
+++ b/editeng/inc/editeng/numitem.hxx
@@ -161,7 +161,7 @@
 
 virtual ~SvxNumberFormat();
 
-SvStream   Store(SvStream rStream, FontToSubsFontConverter 
pConverter);
+SvStream   Store(SvStream rStream);
 SvxNumberFormat* Create(SvStream rStream );
 
 SvxNumberFormat operator=( const SvxNumberFormat  );
diff --git a/editeng/source/editeng/editobj.cxx 
b/editeng/source/editeng/editobj.cxx
index 8231396..8ef79a1 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -890,7 +890,7 @@
 
 void EditTextObjectImpl::StoreData( SvStream rOStream ) const
 {
-sal_uInt16 nVer = 602;
+sal_uInt16 nVer = SOFFICE_FILEFORMAT_CURRENT;
 rOStream  nVer;
 
 rOStream  static_castsal_Bool(bOwnerOfPool);
@@ -1059,6 +1059,7 @@
 void EditTextObjectImpl::CreateData( SvStream rIStream )
 {
 rIStream  nVersion;
+rIStream.SetVersion( nVersion );
 
 // The text object was first created with the current setting of
 // pTextObjectPool.
@@ -1087,6 +1088,7 @@
 rIStream  nCharSet;
 
 rtl_TextEncoding eSrcEncoding = GetSOLoadTextEncoding( 
(rtl_TextEncoding)nCharSet );
+rIStream.SetStreamCharSet( eSrcEncoding );
 
 // The number of paragraphs ...
 sal_uInt16 nParagraphs;
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 7ef42e0..aaf313c 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -237,15 +237,8 @@
 delete pBulletFont;
 }
 
-SvStream   SvxNumberFormat::Store(SvStream rStream, FontToSubsFontConverter 
pConverter)
+SvStream   SvxNumberFormat::Store(SvStream rStream)
 {
-if(pConverter  pBulletFont)
-{
-cBullet = ConvertFontToSubsFontChar(pConverter, cBullet);
-String sFontName = GetFontToSubsFontName(pConverter);
-pBulletFont-SetName(sFontName);
-}
-
 rStream  (sal_uInt16)NUMITEM_VERSION_04;
 
 rStream  (sal_uInt16)GetNumberingType();
@@ -691,7 +684,9 @@
 rStream  nTmp16; bContinuousNumbering = nTmp16;
 rStream  nTmp16; eNumberingType = ( SvxNumRuleType )nTmp16;
 
-for (sal_uInt16 i = 0; i  SVX_MAX_NUM; i++)
+sal_uInt16 nLevels = SVX_MAX_NUM;
+rStream  nLevels;
+for (sal_uInt16 i = 0; i  nLevels; i++)
 {
 rStream  nTmp16;
 sal_Bool hasNumberingFormat = nTmp16;
@@ -723,29 +718,20 @@
 rStream(sal_uInt16)bContinuousNumbering;
 rStream(sal_uInt16)eNumberingType;
 
-FontToSubsFontConverter pConverter = 0;
-sal_Bool bConvertBulletFont = ( rStream.GetVersion() = 
SOFFICE_FILEFORMAT_50 )  ( rStream.GetVersion() );
+//number of levels
+rStream(sal_uInt16)SVX_MAX_NUM;
 for(sal_uInt16 i = 0; i  SVX_MAX_NUM; i++)
 {
 if(aFmts[i])
 {
 rStream  sal_uInt16(1);
-if(bConvertBulletFont  aFmts[i]-GetBulletFont())
-{
-if(!pConverter)
-pConverter =
-
CreateFontToSubsFontConverter(aFmts[i]-GetBulletFont()-GetName(),
-
FONTTOSUBSFONT_EXPORT|FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS);
-}
-aFmts[i]-Store(rStream, pConverter);
+aFmts[i]-Store(rStream);
 }
 else
 rStream  sal_uInt16(0);
 }
 //second save of nFeatureFlags for new versions
 rStream(sal_uInt16)nFeatureFlags;
-if(pConverter)
-DestroyFontToSubsFontConverter(pConverter);
 
 return rStream;
 }

-- 
To view, visit https://gerrit.libreoffice.org/3464
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d781468b1878d7c6589ef4a313c66bf00e4d75b
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: editeng/source filter/source sd/source

2013-04-13 Thread Cao Cuong Ngo
 editeng/source/editeng/eerdll.cxx  |6 --
 editeng/source/uno/unonrule.cxx|3 ++-
 filter/source/msfilter/svdfppt.cxx |7 ---
 sd/source/core/drawdoc4.cxx|3 ++-
 sd/source/core/stlpool.cxx |5 +++--
 5 files changed, 15 insertions(+), 9 deletions(-)

New commits:
commit 5785db93c5739846fb0a84b138be485044d4bda5
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Wed Apr 10 20:41:54 2013 +0200

fdo#47018 Impress crashes when modifying bullet

Default numbering rules shouldn't be left zero nor hard-coded.

Change-Id: I8a34331006abf3de8c170f8dca43ccf9cec92f04
Reviewed-on: https://gerrit.libreoffice.org/3312
Reviewed-by: Eike Rathke er...@redhat.com
Tested-by: Eike Rathke er...@redhat.com

diff --git a/editeng/source/editeng/eerdll.cxx 
b/editeng/source/editeng/eerdll.cxx
index 59086ea..c6a008d 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -36,6 +36,7 @@
 #include editeng/flditem.hxx
 #include editeng/emphasismarkitem.hxx
 #include editeng/scriptspaceitem.hxx
+#include editeng/numdef.hxx
 #include svl/itempool.hxx
 #include vcl/virdev.hxx
 
@@ -98,14 +99,15 @@ SfxPoolItem** GlobalEditData::GetDefItems()
 ppDefItems = new SfxPoolItem*[EDITITEMCOUNT];
 
 // Paragraph attributes:
-SvxNumRule aTmpNumRule( 0, 0, sal_False );
+SvxNumRule aDefaultNumRule( 
NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE,
+SVX_MAX_NUM, sal_False );
 
 ppDefItems[0]  = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, 
EE_PARA_WRITINGDIR );
 ppDefItems[1]  = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS );
 ppDefItems[2]  = new SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, 
sal_False );
 ppDefItems[3]  = new SfxBoolItem( EE_PARA_FORBIDDENRULES, sal_True );
 ppDefItems[4]  = new SvxScriptSpaceItem( sal_True, 
EE_PARA_ASIANCJKSPACING );
-ppDefItems[5]  = new SvxNumBulletItem( aTmpNumRule, EE_PARA_NUMBULLET 
);
+ppDefItems[5]  = new SvxNumBulletItem( aDefaultNumRule, 
EE_PARA_NUMBULLET );
 ppDefItems[6]  = new SfxBoolItem( EE_PARA_HYPHENATE, sal_False );
 ppDefItems[7]  = new SfxBoolItem( EE_PARA_BULLETSTATE, sal_True );
 ppDefItems[8]  = new SvxLRSpaceItem( EE_PARA_OUTLLRSPACE );
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index ea028e1..cce9583 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -34,6 +34,7 @@
 #include editeng/unofdesc.hxx
 #include editeng/unonrule.hxx
 #include editeng/editids.hrc
+#include editeng/numdef.hxx
 
 using ::com::sun::star::util::XCloneable;
 using ::com::sun::star::ucb::XAnyCompare;
@@ -490,7 +491,7 @@ com::sun::star::uno::Reference 
com::sun::star::container::XIndexReplace  SvxCr
 }
 else
 {
-SvxNumRule aDefaultRule( 
NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , sal_False);
+SvxNumRule aDefaultRule( 
NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM , 
sal_False);
 return new SvxUnoNumberingRules( aDefaultRule );
 }
 }
diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 1de1b2e..f8530c1 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -47,6 +47,7 @@
 #include svx/svdocapt.hxx
 #include svx/svdotable.hxx
 #include editeng/outlobj.hxx
+#include editeng/numdef.hxx
 #include svx/svdattr.hxx
 #include svx/xattr.hxx
 #include svx/svditext.hxx
@@ -4295,20 +4296,20 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader 
rSlideHd, SvStream rIn, Sd
 eNumRuleType = SVX_RULETYPE_NUMBERING;
 break;
 case TSS_TYPE_SUBTITLE :
-nLevels = 10;
+nLevels = SVX_MAX_NUM;
 eNumRuleType = SVX_RULETYPE_NUMBERING;
 break;
 case TSS_TYPE_BODY :
 case TSS_TYPE_HALFBODY :
 case TSS_TYPE_QUARTERBODY :
-nLevels = 10;
+nLevels = SVX_MAX_NUM;
 eNumRuleType = SVX_RULETYPE_PRESENTATION_NUMBERING;
 break;
 default :
 case TSS_TYPE_NOTES :
 case TSS_TYPE_UNUSED :
 case TSS_TYPE_TEXT_IN_SHAPE :
-nLevels = 10;
+nLevels = SVX_MAX_NUM;
 eNumRuleType = SVX_RULETYPE_NUMBERING;
 break;
 }
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 3cdfe86..abbd02b 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -40,6 +40,7 @@
 #include editeng/ulspitem.hxx
 #include editeng/lspcitem.hxx
 #include editeng/adjustitem.hxx
+#include editeng/numdef.hxx
 #include svx/dialogs.hrc
 #include svx/dialmgr.hxx  // SVX_RESSTR
 #include editeng/bulletitem.hxx
@@ -1223,7 +1224,7 @@ void

[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - editeng/source filter/source sd/source

2013-04-13 Thread Cao Cuong Ngo
 editeng/source/editeng/eerdll.cxx  |6 --
 editeng/source/uno/unonrule.cxx|3 ++-
 filter/source/msfilter/svdfppt.cxx |7 ---
 sd/source/core/drawdoc4.cxx|3 ++-
 sd/source/core/stlpool.cxx |5 +++--
 5 files changed, 15 insertions(+), 9 deletions(-)

New commits:
commit 6f504b6307179f00075bd1dadd722ff2e8855ea9
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Wed Apr 10 20:41:54 2013 +0200

fdo#47018 Impress crashes when modifying bullet

Default numbering rules shouldn't be left zero nor hard-coded.

Reviewed-on: https://gerrit.libreoffice.org/3312
Reviewed-by: Eike Rathke er...@redhat.com
Tested-by: Eike Rathke er...@redhat.com
(cherry picked from commit 5785db93c5739846fb0a84b138be485044d4bda5)

Conflicts:
sd/source/core/drawdoc4.cxx
sd/source/core/stlpool.cxx

Change-Id: I8a34331006abf3de8c170f8dca43ccf9cec92f04

diff --git a/editeng/source/editeng/eerdll.cxx 
b/editeng/source/editeng/eerdll.cxx
index 740de3a..0ae4491 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -36,6 +36,7 @@
 #include editeng/flditem.hxx
 #include editeng/emphitem.hxx
 #include editeng/scriptspaceitem.hxx
+#include editeng/numdef.hxx
 #include svl/itempool.hxx
 #include vcl/virdev.hxx
 
@@ -98,14 +99,15 @@ SfxPoolItem** GlobalEditData::GetDefItems()
 ppDefItems = new SfxPoolItem*[EDITITEMCOUNT];
 
 // Paragraph attributes:
-SvxNumRule aTmpNumRule( 0, 0, sal_False );
+SvxNumRule aDefaultNumRule( 
NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE,
+SVX_MAX_NUM, sal_False );
 
 ppDefItems[0]  = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, 
EE_PARA_WRITINGDIR );
 ppDefItems[1]  = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS );
 ppDefItems[2]  = new SfxBoolItem( EE_PARA_HANGINGPUNCTUATION, 
sal_False );
 ppDefItems[3]  = new SfxBoolItem( EE_PARA_FORBIDDENRULES, sal_True );
 ppDefItems[4]  = new SvxScriptSpaceItem( sal_True, 
EE_PARA_ASIANCJKSPACING );
-ppDefItems[5]  = new SvxNumBulletItem( aTmpNumRule, EE_PARA_NUMBULLET 
);
+ppDefItems[5]  = new SvxNumBulletItem( aDefaultNumRule, 
EE_PARA_NUMBULLET );
 ppDefItems[6]  = new SfxBoolItem( EE_PARA_HYPHENATE, sal_False );
 ppDefItems[7]  = new SfxBoolItem( EE_PARA_BULLETSTATE, sal_True );
 ppDefItems[8]  = new SvxLRSpaceItem( EE_PARA_OUTLLRSPACE );
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index 749dad5..52262c8 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -34,6 +34,7 @@
 #include editeng/unofdesc.hxx
 #include editeng/unonrule.hxx
 #include editeng/editids.hrc
+#include editeng/numdef.hxx
 
 using ::rtl::OUString;
 using ::com::sun::star::util::XCloneable;
@@ -494,7 +495,7 @@ com::sun::star::uno::Reference 
com::sun::star::container::XIndexReplace  SvxCr
 }
 else
 {
-SvxNumRule aDefaultRule( 
NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , sal_False);
+SvxNumRule aDefaultRule( 
NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, SVX_MAX_NUM , 
sal_False);
 return new SvxUnoNumberingRules( aDefaultRule );
 }
 }
diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 306309d..beb774b 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -47,6 +47,7 @@
 #include svx/svdocapt.hxx
 #include svx/svdotable.hxx
 #include editeng/outlobj.hxx
+#include editeng/numdef.hxx
 #include svx/svdattr.hxx
 #include svx/xattr.hxx
 #include svx/svditext.hxx
@@ -4283,20 +4284,20 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader 
rSlideHd, SvStream rIn, Sd
 eNumRuleType = SVX_RULETYPE_NUMBERING;
 break;
 case TSS_TYPE_SUBTITLE :
-nLevels = 10;
+nLevels = SVX_MAX_NUM;
 eNumRuleType = SVX_RULETYPE_NUMBERING;
 break;
 case TSS_TYPE_BODY :
 case TSS_TYPE_HALFBODY :
 case TSS_TYPE_QUARTERBODY :
-nLevels = 10;
+nLevels = SVX_MAX_NUM;
 eNumRuleType = SVX_RULETYPE_PRESENTATION_NUMBERING;
 break;
 default :
 case TSS_TYPE_NOTES :
 case TSS_TYPE_UNUSED :
 case TSS_TYPE_TEXT_IN_SHAPE :
-nLevels = 10;
+nLevels = SVX_MAX_NUM;
 eNumRuleType = SVX_RULETYPE_NUMBERING;
 break;
 }
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 3e1b1e1..56b8f08 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -40,6 +40,7 @@
 #include editeng/ulspitem.hxx
 #include editeng/lspcitem.hxx
 #include editeng/adjitem.hxx
+#include editeng/numdef.hxx

Re: running soffice fails due to missing libjvmfwk.so.3 on master

2013-04-12 Thread Cao Cuong Ngo
Hi,

I did 'make clean' and that did the trick ;)

Cheers,
CC Ngo.

On 04/12/2013 07:36 PM, Thomas Arnhold wrote:
 Hi,

 with the latest master I can't run soffice:

 [thomas@localhost libo]$ /home/thomas/libo/install/program/soffice
 /home/thomas/libo/solver/unxlngi6/installation/opt/program/../ure-link/bin/javaldx:
 error while loading shared libraries: libjvmfwk.so.3: cannot open
 shared object file: No such file or directory
 Warning: failed to read path from javaldx
 /home/thomas/libo/solver/unxlngi6/installation/opt/program/soffice.bin: error
 while loading shared libraries: libreg.so.3: cannot open shared object
 file: No such file or directory
 Exited with code '127'


 [thomas@localhost libo]$ find . -name libjvmfwk*
 ./workdir/unxlngi6/LinkTarget/Library/libjvmfwk.so.objectlist
 ./workdir/unxlngi6/LinkTarget/Library/libjvmfwk.so
 ./workdir/unxlngi6/LinkTarget/Library/libjvmfwk.so.3
 ./workdir/unxlngi6/Dep/LinkTarget/Library/libjvmfwk.so.d
 ./workdir/unxlngi6/Headers/Library/libjvmfwk.so
 ./workdir/unxlngi6/ExternalHeaders/Library/libjvmfwk.so
 ./solver/unxlngi6/lib/libjvmfwk.so
 ./solver/unxlngi6/lib/libjvmfwk.so.3
 ./solver/unxlngi6/installation/opt/ure/lib/libjvmfwk.so


 Seems libjvmfwk.so.3 and libreg.so.3 didn't get installed. So I copied
 them manually to ./solver/unxlngi6/installation/opt/ure/lib/. This
 solved it for these files, but with the next run:

 [thomas@localhost libo]$ /home/thomas/libo/install/program/soffice
 /home/thomas/libo/solver/unxlngi6/installation/opt/program/../ure-link/bin/javaldx:
 error while loading shared libraries: libstore.so.3: cannot open
 shared object file: No such file or directory
 Warning: failed to read path from javaldx
 /home/thomas/libo/solver/unxlngi6/installation/opt/program/soffice.bin: error
 while loading shared libraries: libjvmaccess.so.3: cannot open shared
 object file: No such file or directory
 Exited with code '127'


 At all I had to copy

 libjvmfwk.so.3
 libreg.so.3
 libreg.so.3
 libjvmfwk.so.3


 I build with ./autogen.sh --enable-dbgutil

 Anybody knows what to fix here? :)


 Thomas
 ___
 LibreOffice mailing list
 LibreOffice@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] fix fdo#60551 Impress paste destroy bullet

2013-04-12 Thread Cao Cuong Ngo (via Code Review)
; mnFirstLineIndent = nTmp32;
+rStream  nTmp32; mnIndentAt = nTmp32;
+
+}
 SvxNumberFormat::~SvxNumberFormat()
 {
 delete pGraphicBrush;
@@ -251,6 +299,11 @@
 rStream  ( sal_Int32 ) mnIndentAt;
 
 return rStream;
+}
+
+SvxNumberFormat* SvxNumberFormat::Create( SvStream rStream, sal_uInt16 
_nWhich )
+{
+return new SvxNumberFormat( rStream, _nWhich );
 }
 
 SvxNumberFormat SvxNumberFormat::operator=( const SvxNumberFormat rFormat )
@@ -621,7 +674,41 @@
 }
 }
 
-SvStream   SvxNumRule::Store(SvStream rStream)
+SvxNumRule::SvxNumRule( SvStream rStream, sal_uInt16 _nWhich )
+{
+sal_uInt16 nTmp16;
+rStream  nTmp16; // NUM_ITEM_VERSION
+rStream  nLevelCount;
+
+// first nFeatureFlags of old Versions
+rStream  nTmp16; nFeatureFlags = nTmp16;
+rStream  nTmp16; bContinuousNumbering = nTmp16;
+rStream  nTmp16; eNumberingType = ( SvxNumRuleType )nTmp16;
+
+for (sal_uInt16 i = 0; i  SVX_MAX_NUM; i++)
+{
+rStream  nTmp16;
+sal_Bool hasNumberingFormat = nTmp16;
+if ( hasNumberingFormat ){
+aFmts[i] = new SvxNumberFormat( rStream, _nWhich );
+aFmtsSet[i] = sal_True;
+}
+else
+{
+aFmts[i] = 0;
+aFmtsSet[i] = sal_False;
+}
+}
+//second nFeatureFlags for new versions
+rStream  nTmp16; nFeatureFlags = nTmp16;
+}
+
+SvxNumRule* SvxNumRule::Create( SvStream  rStream, sal_uInt16 _nWhich )
+{
+return new SvxNumRule( rStream, _nWhich );
+}
+
+SvStream SvxNumRule::Store( SvStream rStream )
 {
 rStream(sal_uInt16)NUMITEM_VERSION_03;
 rStreamnLevelCount;
@@ -656,7 +743,6 @@
 
 return rStream;
 }
-
 SvxNumRule::~SvxNumRule()
 {
 for(sal_uInt16 i = 0; i  SVX_MAX_NUM; i++)
@@ -843,9 +929,10 @@
 {
 }
 
-SfxPoolItem* SvxNumBulletItem::Create(SvStream s, sal_uInt16 n) const
+SfxPoolItem* SvxNumBulletItem::Create(SvStream rStream, sal_uInt16 
/*nItemVersion*/ ) const
 {
-return SfxPoolItem::Create(s, n );
+SvxNumRule aNumRule( rStream, EE_PARA_NUMBULLET );
+return new SvxNumBulletItem( aNumRule, EE_PARA_NUMBULLET );
 }
 
 SvxNumBulletItem::SvxNumBulletItem(const SvxNumBulletItem rCopy) :

-- 
To view, visit https://gerrit.libreoffice.org/3369
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58928ca66a83b3fe3c3894a28ccf1e7fe5f661b3
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[ABANDONED] fdo#60551 Impress: pasting text removes bullet

2013-04-12 Thread Cao Cuong Ngo (via Code Review)
Cao Cuong Ngo has abandoned this change.

Change subject: fdo#60551 Impress: pasting text removes bullet
..


Patch Set 1: Abandoned

A more proper solution is stored everything in SvStream and implements the 
appropriate attributes loading ( see https://gerrit.libreoffice.org/#/c/3369/ )

-- 
To view, visit https://gerrit.libreoffice.org/3352
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I57d1245db650d12e6b2c05baece379038b673689
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] fdo#47018 fix Impress crash on modifying bullet

2013-04-12 Thread Cao Cuong Ngo
Hi Stephan,

In fact a more proper solution is to write everything to SvStream and
restores from it in pasting ( which is currently not completely
implemented).
I've finish the attributes loading from SvStream here
https://gerrit.libreoffice.org/#/c/3369/.
However, in numpages.cxx the tab picking page is messed up between
SvxNumBulletItem and SvxBulletItem, so everything is infered as
SvxNumBulletItem now!
The result is that we can only store and load from numbering type, not
bullet nor graphics yet...

Thanks,
CC Ngo.

On 04/12/2013 12:28 PM, Stephan van den Akker wrote:
 Hi, Cao,

 Just checked your patch (Change-Id:
 I57d1245db650d12e6b2c05baece379038b673689) merged with:

 Version: 4.1.0.0.alpha0+
 Build ID: 0b897dd455968862e348de2c5e1c57d4d73640b

 This patch indeed fixes all of the problems mentioned in fdo#47018,
 including the crash.

 Brilliant. Thanks a lot, Cao!

 AFAIK the patched code is used in Impress, but also in Calc and Draw.
 I'll be running this build at the office for a couple of days. I'll
 let you know if I notice any unwanted side effects in other use cases.

 Greetings,

 Stephan


 2013/4/12 Stephan van den Akker stephanv...@gmail.com
 mailto:stephanv...@gmail.com

 Hi Cao,

 That sounds great!

 Building LO now with your patch. Stay tuned

 Greetings,

 Stephan




 2013/4/12 Cao Cuong Ngo cao.cuong@gmail.com
 mailto:cao.cuong@gmail.com


 Hi Stephan,

 Thanks for taking the time to test it :-)

 I've made a new patch that fixes the crash and the copy/paste
 action.

 You can try it here

 https://gerrit.libreoffice.org/3352

 Best,
 Cao Cuong Ngo


 On 04/09/2013 05:05 PM, Stephan van den Akker wrote:
 Just tested this patch, applied to:

 Version: 4.1.0.0.alpha0+
 Build ID: 2705fc72df2058332773b5cb04a6b4d207f5e39

 The proposed patch will prevent the crash, but it seems that
 the underlying problem is not solved by this:
 The bullets do not survive the copy / paste action of the
 EditEngineFormat: Copy/paste of bulletted text into an
 already bulletted empty line still makes the bullet disappear.

 So I would say that there is progress, but IMHO the patch
 doesn't warrant the closing of fdo#47018.

 Greetings, and thanks for the good work.

 Stephan van den Akker


 2013/4/9 Stephan van den Akker stephanv...@gmail.com
 mailto:stephanv...@gmail.com

 Building LO with this patch now. I will report my
 findings asap.


 2013/4/9 Cao Cuong Ngo (via Code Review)
 ger...@gerrit.libreoffice.org
 mailto:ger...@gerrit.libreoffice.org

 Hi,

 I have submitted a patch for review:

 https://gerrit.libreoffice.org/3285

 To pull it, you can do:

 git pull ssh://gerrit.libreoffice.org:29418/core
 http://gerrit.libreoffice.org:29418/core
 refs/changes/85/3285/1

 fdo#47018 fix Impress crash on modifying bullet

 Add verifying of numbering rule to avoid invalidated
 attribute

 Change-Id: Ifc3db3f09f9358d272245f1e00fad2802f5881ee
 ---
 M sd/source/ui/func/fuolbull.cxx
 1 file changed, 11 insertions(+), 1 deletion(-)



 diff --git a/sd/source/ui/func/fuolbull.cxx
 b/sd/source/ui/func/fuolbull.cxx
 index ae29032..49fd245 100644
 --- a/sd/source/ui/func/fuolbull.cxx
 +++ b/sd/source/ui/func/fuolbull.cxx
 @@ -22,6 +22,7 @@
  #include svl/intitem.hxx
  #include editeng/outliner.hxx
  #include editeng/eeitem.hxx
 +#include editeng/numitem.hxx
  #include sfx2/request.hxx

  #include editeng/editdata.hxx
 @@ -64,7 +65,16 @@

  SfxItemSet aNewAttr( mpViewShell-GetPool(),
   EE_ITEMS_START,
 EE_ITEMS_END );
 -aNewAttr.Put( aEditAttr, sal_False );
 +
 +// fdo#47018 verify numbering rule
 +const SfxPoolItem* pItem;
 +sal_uInt16 nWhich =
 aEditAttr.GetPool()-GetWhich(SID_ATTR_NUMBERING_RULE);
 +aEditAttr.GetItemState(nWhich, sal_False,
 pItem);
 +const sal_uInt16 levelCount =
 (*((SvxNumBulletItem*)pItem)-GetNumRule()).GetLevelCount();
 +
 +// check if the attribute is valid
 +if ( levelCount )
 +aNewAttr.Put

[PATCH] fdo#60551 Impress: pasting text removes bullet

2013-04-11 Thread Cao Cuong Ngo (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3352

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/52/3352/1

fdo#60551 Impress: pasting text removes bullet

The reason the bullet is removed is that the pool used in
copying is different from the pool in pasting. The fix passes
the global text edit object pool so we have the same pool
thus keep the bullet attributes. This also fix the crash in
fdo#47018.

Note that it currently only fixes .odp, not .pptx nor .ppt

Change-Id: I57d1245db650d12e6b2c05baece379038b673689
---
M editeng/source/editeng/editobj.cxx
M editeng/source/editeng/impedit4.cxx
M svl/inc/svl/itempool.hxx
M svl/source/items/poolio.cxx
4 files changed, 27 insertions(+), 4 deletions(-)



diff --git a/editeng/source/editeng/editobj.cxx 
b/editeng/source/editeng/editobj.cxx
index 0433ea5..6c3aded 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -1041,6 +1041,13 @@
 
 if ( bOwnerOfPool )
 GetPool()-Load( rIStream );
+else
+{
+// Don't load, a global Pool is passed.
+// Inform this is the current loading version to avoid GetNewWhich in
+// SfxPoolItem::LoadItem
+GetPool()-SetIsCurrentVersionLoading( );
+}
 
 // CharSet, in which it was saved:
 sal_uInt16 nCharSet;
@@ -1085,7 +1092,10 @@
 const SfxPoolItem* pItem;
 
 rIStream  _nWhich;
-_nWhich = pPool-GetNewWhich( _nWhich );
+
+// Only map new which if we don't use a global pool
+if ( bOwnerOfPool)
+_nWhich = pPool-GetNewWhich( _nWhich );
 pItem = pPool-LoadSurrogate( rIStream, _nWhich, 0 );
 rIStream  nStart;
 rIStream  nEnd;
diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 34ef278..d701dec 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -197,8 +197,8 @@
 
 EditPaM ImpEditEngine::ReadBin( SvStream rInput, EditSelection aSel )
 {
-// Simply abuse a temporary text object ...
-EditTextObject* pObj = EditTextObject::Create( rInput, NULL );
+// fdo#60551 pass global text object pool to load attributes
+EditTextObject* pObj = EditTextObject::Create( rInput, 
GetEditTextObjectPool( ) );
 
 EditPaM aLastPaM = aSel.Max();
 if ( pObj )
@@ -301,7 +301,8 @@
 
 sal_uInt32 ImpEditEngine::WriteBin( SvStream rOutput, EditSelection aSel, 
bool bStoreUnicodeStrings )
 {
-boost::scoped_ptrEditTextObject pObj(CreateTextObject(aSel, NULL));
+// fdo#60551 use global pool instead of creating a new pool
+boost::scoped_ptrEditTextObject pObj(CreateTextObject( aSel ));
 pObj-mpImpl-StoreUnicodeStrings(bStoreUnicodeStrings);
 pObj-Store(rOutput);
 return 0;
diff --git a/svl/inc/svl/itempool.hxx b/svl/inc/svl/itempool.hxx
index ab9ff84..6d4ee7f 100644
--- a/svl/inc/svl/itempool.hxx
+++ b/svl/inc/svl/itempool.hxx
@@ -215,6 +215,7 @@
 sal_uInt16  GetVersion() const;
 voidSetFileFormatVersion( sal_uInt16 
nFileFormatVersion );
 boolIsCurrentVersionLoading() const;
+voidSetIsCurrentVersionLoading( );
 
 static int  IsWhich(sal_uInt16 nId) {
 return nId  nId = SFX_WHICH_MAX; }
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 76ce008..7139737 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -1629,5 +1629,16 @@
 return pItem;
 }
 
+//-
+/*
+In case ::LoadItem() is called without preceeded by ::Load(),
+This function is used to avoid using of ::GetNewWhich() which lead to
+out of range error.
+ */
+
+void SfxItemPool::SetIsCurrentVersionLoading( )
+{
+pImp-nLoadingVersion = pImp-nVersion;
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

-- 
To view, visit https://gerrit.libreoffice.org/3352
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57d1245db650d12e6b2c05baece379038b673689
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] fdo#47018 fix Impress crash on modifying bullet

2013-04-11 Thread Cao Cuong Ngo

Hi Stephan,

Thanks for taking the time to test it :-)

I've made a new patch that fixes the crash and the copy/paste action.

You can try it here

https://gerrit.libreoffice.org/3352

Best,
Cao Cuong Ngo

On 04/09/2013 05:05 PM, Stephan van den Akker wrote:
 Just tested this patch, applied to:

 Version: 4.1.0.0.alpha0+
 Build ID: 2705fc72df2058332773b5cb04a6b4d207f5e39

 The proposed patch will prevent the crash, but it seems that the
 underlying problem is not solved by this:
 The bullets do not survive the copy / paste action of the
 EditEngineFormat: Copy/paste of bulletted text into an already
 bulletted empty line still makes the bullet disappear.

 So I would say that there is progress, but IMHO the patch doesn't
 warrant the closing of fdo#47018.

 Greetings, and thanks for the good work.

 Stephan van den Akker


 2013/4/9 Stephan van den Akker stephanv...@gmail.com
 mailto:stephanv...@gmail.com

 Building LO with this patch now. I will report my findings asap.


 2013/4/9 Cao Cuong Ngo (via Code Review)
 ger...@gerrit.libreoffice.org
 mailto:ger...@gerrit.libreoffice.org

 Hi,

 I have submitted a patch for review:

 https://gerrit.libreoffice.org/3285

 To pull it, you can do:

 git pull ssh://gerrit.libreoffice.org:29418/core
 http://gerrit.libreoffice.org:29418/core refs/changes/85/3285/1

 fdo#47018 fix Impress crash on modifying bullet

 Add verifying of numbering rule to avoid invalidated attribute

 Change-Id: Ifc3db3f09f9358d272245f1e00fad2802f5881ee
 ---
 M sd/source/ui/func/fuolbull.cxx
 1 file changed, 11 insertions(+), 1 deletion(-)



 diff --git a/sd/source/ui/func/fuolbull.cxx
 b/sd/source/ui/func/fuolbull.cxx
 index ae29032..49fd245 100644
 --- a/sd/source/ui/func/fuolbull.cxx
 +++ b/sd/source/ui/func/fuolbull.cxx
 @@ -22,6 +22,7 @@
  #include svl/intitem.hxx
  #include editeng/outliner.hxx
  #include editeng/eeitem.hxx
 +#include editeng/numitem.hxx
  #include sfx2/request.hxx

  #include editeng/editdata.hxx
 @@ -64,7 +65,16 @@

  SfxItemSet aNewAttr( mpViewShell-GetPool(),
   EE_ITEMS_START, EE_ITEMS_END );
 -aNewAttr.Put( aEditAttr, sal_False );
 +
 +// fdo#47018 verify numbering rule
 +const SfxPoolItem* pItem;
 +sal_uInt16 nWhich =
 aEditAttr.GetPool()-GetWhich(SID_ATTR_NUMBERING_RULE);
 +aEditAttr.GetItemState(nWhich, sal_False, pItem);
 +const sal_uInt16 levelCount =
 (*((SvxNumBulletItem*)pItem)-GetNumRule()).GetLevelCount();
 +
 +// check if the attribute is valid
 +if ( levelCount )
 +aNewAttr.Put( aEditAttr, sal_False );

  // create and execute dialog
  SdAbstractDialogFactory* pFact =
 SdAbstractDialogFactory::Create();

 --
 To view, visit https://gerrit.libreoffice.org/3285
 To unsubscribe, visit https://gerrit.libreoffice.org/settings

 Gerrit-MessageType: newchange
 Gerrit-Change-Id: Ifc3db3f09f9358d272245f1e00fad2802f5881ee
 Gerrit-PatchSet: 1
 Gerrit-Project: core
 Gerrit-Branch: master
 Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com
 mailto:cao.cuong@gmail.com

 ___
 LibreOffice mailing list
 LibreOffice@lists.freedesktop.org
 mailto:LibreOffice@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/libreoffice




___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[ABANDONED] fdo#47018 fix Impress crash on modifying bullet

2013-04-10 Thread Cao Cuong Ngo (via Code Review)
Cao Cuong Ngo has abandoned this change.

Change subject: fdo#47018 fix Impress crash on modifying bullet
..


Patch Set 3: Abandoned

-- 
To view, visit https://gerrit.libreoffice.org/3285
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: Ifc3db3f09f9358d272245f1e00fad2802f5881ee
Gerrit-PatchSet: 3
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] fdo#47018 Impress crashes when modifying bullet

2013-04-10 Thread Cao Cuong Ngo (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3312

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/12/3312/1

fdo#47018 Impress crashes when modifying bullet

Currently the pasting function in Impress does not copy bullet
attribute but uses the default one. The default level depth of bullet
was set to 0 which led to crash. This fix changes the default level
depth to avoid the crash but the real cause why the bullet attribute
isn't copied is still unknown. Anyway it was very dangerous to leave
the default value of 0.

Change-Id: I8a34331006abf3de8c170f8dca43ccf9cec92f04
---
M editeng/source/editeng/eerdll.cxx
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/editeng/source/editeng/eerdll.cxx 
b/editeng/source/editeng/eerdll.cxx
index 59086ea..379a850 100644
--- a/editeng/source/editeng/eerdll.cxx
+++ b/editeng/source/editeng/eerdll.cxx
@@ -98,7 +98,7 @@
 ppDefItems = new SfxPoolItem*[EDITITEMCOUNT];
 
 // Paragraph attributes:
-SvxNumRule aTmpNumRule( 0, 0, sal_False );
+SvxNumRule aTmpNumRule( NUM_BULLET_REL_SIZE, 10, sal_False );
 
 ppDefItems[0]  = new SvxFrameDirectionItem( FRMDIR_HORI_LEFT_TOP, 
EE_PARA_WRITINGDIR );
 ppDefItems[1]  = new SvXMLAttrContainerItem( EE_PARA_XMLATTRIBS );

-- 
To view, visit https://gerrit.libreoffice.org/3312
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a34331006abf3de8c170f8dca43ccf9cec92f04
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] fdo#47018 fix Impress crash on modifying bullet

2013-04-09 Thread Cao Cuong Ngo (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3285

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/85/3285/1

fdo#47018 fix Impress crash on modifying bullet

Add verifying of numbering rule to avoid invalidated attribute

Change-Id: Ifc3db3f09f9358d272245f1e00fad2802f5881ee
---
M sd/source/ui/func/fuolbull.cxx
1 file changed, 11 insertions(+), 1 deletion(-)



diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index ae29032..49fd245 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -22,6 +22,7 @@
 #include svl/intitem.hxx
 #include editeng/outliner.hxx
 #include editeng/eeitem.hxx
+#include editeng/numitem.hxx
 #include sfx2/request.hxx
 
 #include editeng/editdata.hxx
@@ -64,7 +65,16 @@
 
 SfxItemSet aNewAttr( mpViewShell-GetPool(),
  EE_ITEMS_START, EE_ITEMS_END );
-aNewAttr.Put( aEditAttr, sal_False );
+
+// fdo#47018 verify numbering rule
+const SfxPoolItem* pItem;
+sal_uInt16 nWhich = 
aEditAttr.GetPool()-GetWhich(SID_ATTR_NUMBERING_RULE);
+aEditAttr.GetItemState(nWhich, sal_False, pItem);
+const sal_uInt16 levelCount = 
(*((SvxNumBulletItem*)pItem)-GetNumRule()).GetLevelCount();
+
+// check if the attribute is valid
+if ( levelCount )
+aNewAttr.Put( aEditAttr, sal_False );
 
 // create and execute dialog
 SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();

-- 
To view, visit https://gerrit.libreoffice.org/3285
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc3db3f09f9358d272245f1e00fad2802f5881ee
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] fdo#59071 Slideshow: allow automatic transitions with sub-second

2013-04-09 Thread Cao Cuong Ngo

Hi Thorsten,

On 04/05/2013 10:42 PM, Thorsten Behrens wrote:
 Cao Cuong Ngo wrote:
 I'm trying to fix the crash in
 https://bugs.freedesktop.org/show_bug.cgi?id=62887 but still haven't
 figured out yet! It seems coming from some Widget UIs...

 Do you have any pointer?

 Eh - don't seem to be able to reproduce, but maybe I'm not grokking
 what the reporter was doing - can you attach a stacktrace?

 Cheers,

 -- Thorsten


I've made a patch for this crash here
https://gerrit.libreoffice.org/#/c/3285/
It's a duplicate of bug 47018.
Please review it if you have time.

It also resolve the problem of the impossibility to modify the bullet
format after pasting
which exists from forever!

Thanks,
Cao Cuong Ngo.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] fdo#59071 Slideshow: allow automatic transitions with sub-second

2013-04-05 Thread Cao Cuong Ngo

Hi Thorsten,

On 04/03/2013 11:38 AM, Thorsten Behrens wrote:


you were asking about my API extension comment - I admit the code is
indeed rather involved in that case, you want to look into:

  - xmloff/source/draw/sdpropls.cxx (the XML_SD_TYPE_PRESPAGE_DURATION
property)
  - xmloff/source/draw/propimp0.cxx
(XMLDurationPropertyHdl::import/exportXML - it currently works with
integers)
  - offapi/com/sun/star/presentation/DrawPage.idl (which is published
API, and has this [property] long Duration entry)
  - sd/source/ui/unoidl/unopage.cxx

The ODF export works by extracting / pushing back UNO properties into
various presentation document bits and pieces, and wraps this a bit
opaquely, if generically, via this huge property table. So concretely,
I'd add a new HighresDuration (or somesuch) optional api property, and
handle that in xmloff during import. Keep the old Duration
implementation in sdpage, by simply rounding your internal model value
to integers.



I did as you suggested, created a new additional property HighResDuration.

However, I changed the duration in the sdpage too, since it's needed to 
store the new double time value.


You can review it on https://gerrit.libreoffice.org/#/c/3176/

Thanks,
Cuong Ngo.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2013-04-05 Thread Cao Cuong Ngo
 svx/source/dialog/srchdlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9650599912d24b05e65a94727bac135b0c76384d
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Thu Apr 4 15:50:37 2013 +0200

fdo#60834 Find and Replace dialog: fix replace box selection on click

Change-Id: Ic5256ae05d9b4646651e897b7d4c00d9a84329bb
Reviewed-on: https://gerrit.libreoffice.org/3202
Reviewed-by: Thorsten Behrens tbehr...@suse.com
Tested-by: Thorsten Behrens tbehr...@suse.com

diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 3d5a1fd..0040b32 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -2029,7 +2029,7 @@ IMPL_LINK( SvxSearchDialog, FocusHdl_Impl, Control *, 
pCtrl )
 }
 bSet = sal_True;
 
-aSearchLB.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
+( (ComboBox*)pCtrl )-SetSelection( Selection( SELECTION_MIN, 
SELECTION_MAX ) );
 
 ModifyHdl_Impl( (ComboBox*)pCtrl );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: offapi/com sd/inc sd/source slideshow/source xmloff/source

2013-04-05 Thread Cao Cuong Ngo
 offapi/com/sun/star/presentation/DrawPage.idl   |6 ++
 sd/inc/sdpage.hxx   |6 +++---
 sd/source/core/sdpage.cxx   |2 +-
 sd/source/core/sdpage2.cxx  |2 +-
 sd/source/filter/html/htmlex.cxx|   14 +++---
 sd/source/filter/html/htmlex.hxx|2 +-
 sd/source/filter/ppt/pptin.cxx  |2 +-
 sd/source/ui/animations/SlideTransitionPane.cxx |   14 +++---
 sd/source/ui/animations/SlideTransitionPane.src |   10 +-
 sd/source/ui/dlg/dlgass.cxx |4 ++--
 sd/source/ui/unoidl/unopage.cxx |   19 ---
 slideshow/source/engine/slideshowimpl.cxx   |2 +-
 xmloff/source/draw/propimp0.cxx |9 +
 xmloff/source/draw/sdpropls.cxx |2 +-
 14 files changed, 57 insertions(+), 37 deletions(-)

New commits:
commit 2c82e5d304b56c1dd95d0f3dcafc9a36ce02b5f4
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Tue Apr 2 18:37:00 2013 +0200

fdo#59071 Slideshow: allow automatic transitions with sub-second

Enable slide transition each 0.25 second instead of whole second.

Change-Id: I1907a1baf30cede91a0438d021e003204ea06651

diff --git a/offapi/com/sun/star/presentation/DrawPage.idl 
b/offapi/com/sun/star/presentation/DrawPage.idl
index 59dd8f3..2abde0f 100644
--- a/offapi/com/sun/star/presentation/DrawPage.idl
+++ b/offapi/com/sun/star/presentation/DrawPage.idl
@@ -62,6 +62,11 @@ published service DrawPage
  */
 [property] long Duration;
 
+/** If the property member 
scope=com::sun::star::drawingDrawPage::Change/member is set to 1,
+this is the time in seconds this page is shown before switching
+to the next page, also permitting sub-second precision here.
+ */
+[optional, property] double HighResDuration;
 
 /** This is the effect that is used to fade in this page.
  */
@@ -136,6 +141,7 @@ published service DrawPage
 this page. This is only used if codeIsDateTimeFixed/code is 
false/.
 */
 [optional, property] long DateTimeFormat;
+
 };
 
 
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index 18b58a3..0b5d631 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -115,7 +115,7 @@ protected:
 sd::ScopeLock maLockAutoLayoutArrangement;
 sal_BoolmbSelected;   /// selection identifier
 PresChange  mePresChange; /// manual / automatic / semi 
automatic
-sal_uInt32  mnTime;   /// Display time in seconds
+double  mfTime;   /// Display time in seconds
 sal_BoolmbSoundOn;/// with / without sound.
 sal_BoolmbExcluded;   /// will (not) be displayed during 
show.
 OUStringmaLayoutName; /// Name of the layout
@@ -223,8 +223,8 @@ public:
 voidSetPresChange(PresChange eChange){ mePresChange = eChange; 
}
 PresChange  GetPresChange() const{ return mePresChange; }
 
-voidSetTime(sal_uInt32 nNewTime) { mnTime = nNewTime; }
-sal_uInt32  GetTime() const  { return mnTime; }
+voidSetTime(double fNewTime) { mfTime = fNewTime; }
+double  GetTime() const  { return mfTime; }
 
 voidSetSound(sal_Bool bNewSoundOn)   { mbSoundOn = 
bNewSoundOn; }
 sal_BoolIsSoundOn() const{ return mbSoundOn; }
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 499af50..9057a4f 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -88,7 +88,7 @@ SdPage::SdPage(SdDrawDocument rNewDoc, StarBASIC* pBasic, 
sal_Bool bMasterPage)
 ,   meAutoLayout(AUTOLAYOUT_NONE)
 ,   mbSelected(sal_False)
 ,   mePresChange(PRESCHANGE_MANUAL)
-,   mnTime(1)
+,   mfTime(1.0)
 ,   mbSoundOn(sal_False)
 ,   mbExcluded(sal_False)
 ,   mbLoopSound(sal_False)
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index c446f05..7007bf5f 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -390,7 +390,7 @@ SdPage::SdPage(const SdPage rSrcPage)
 mnTransitionFadeColor = rSrcPage.mnTransitionFadeColor;
 mfTransitionDuration = rSrcPage.mfTransitionDuration;
 mePresChange= rSrcPage.mePresChange;
-mnTime   = rSrcPage.mnTime;
+mfTime   = rSrcPage.mfTime;
 mbSoundOn= rSrcPage.mbSoundOn;
 mbExcluded   = rSrcPage.mbExcluded;
 
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 706b199..5cc1a4f 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -584,9 +584,9 @@ void HtmlExport::InitExportParameters( const Sequence 
PropertyValue  rParams
 }
 else if ( pParams-Name == KioskSlideDuration

Re: [PATCH] fdo#59071 Slideshow: allow automatic transitions with sub-second

2013-04-05 Thread Cao Cuong Ngo


Hi Thorsten,

On 04/05/2013 01:09 PM, Thorsten Behrens wrote:


Curious what would be the next bug you want to tackle? If
https://wiki.documentfoundation.org/Development/Impress#Difficulty_Interesting
is getting slowly depleted, give me a nudge to find more interesting
hacks. ;)




I'm trying to fix the crash in 
https://bugs.freedesktop.org/show_bug.cgi?id=62887

but still haven't figured out yet! It seems coming from some Widget UIs...

Do you have any pointer?

Thanks,
Cuong Ngo.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2013-04-04 Thread Cao Cuong Ngo
 vcl/source/app/settings.cxx |   13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 84e99bd79ab4fef7e91bd302d1426cf1b3653b7f
Author: Cao Cuong Ngo cao.cuong@gmail.com
Date:   Sat Mar 30 19:30:07 2013 +0100

fdo#60542 Persona setting: change color of the text menu.

Change-Id: I1d0ed94d41b3b8bcf0504e1528f4f505f817ad86
Reviewed-on: https://gerrit.libreoffice.org/3127
Reviewed-by: Jan Holesovsky ke...@suse.cz
Tested-by: Jan Holesovsky ke...@suse.cz

diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index d8b1ce5..a237488 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -702,7 +702,7 @@ static BitmapEx readBitmapEx( const OUString rPath )
 enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER };
 
 /** Update the setting of the Persona header / footer in ImplStyleData */
-static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString 
rHeaderFooter, BitmapEx rHeaderFooterBitmap )
+static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString 
rHeaderFooter, BitmapEx rHeaderFooterBitmap, Color maMenuBarTextColor )
 {
 uno::Reference uno::XComponentContext  xContext( 
comphelper::getProcessComponentContext() );
 if ( !xContext.is() )
@@ -721,13 +721,20 @@ static void setupPersonaHeaderFooter( WhichPersona 
eWhich, OUString rHeaderFoot
 rHeaderFooterBitmap = BitmapEx();
 
 // now read the new values and setup bitmaps
-OUString aHeader, aFooter;
+OUString aHeader, aFooter, aColor;
 if ( aPersona == own )
 {
 sal_Int32 nIndex = 0;
 aHeader = aPersonaSettings.getToken( 0, ';', nIndex );
 if ( nIndex  0 )
 aFooter = aPersonaSettings.getToken( 0, ';', nIndex );
+
+// change menu text color, advance nIndex to skip the '#'
+if ( nIndex  0 )
+{
+aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
+maMenuBarTextColor = Color( aColor.toInt64( 16 ) );
+}
 }
 else if ( aPersona == default )
 {
@@ -762,7 +769,7 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, 
OUString rHeaderFoot
 
 const BitmapEx StyleSettings::GetPersonaHeader() const
 {
-setupPersonaHeaderFooter( PERSONA_HEADER, mpData-maPersonaHeaderFooter, 
mpData-maPersonaHeaderBitmap );
+setupPersonaHeaderFooter( PERSONA_HEADER, mpData-maPersonaHeaderFooter, 
mpData-maPersonaHeaderBitmap, mpData-maMenuBarTextColor );
 return mpData-maPersonaHeaderBitmap;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PATCH] fdo#60834 Find and Replace dialog: fix replace box selection...

2013-04-04 Thread Cao Cuong Ngo (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3202

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/02/3202/1

fdo#60834 Find and Replace dialog: fix replace box selection on click

Change-Id: Ic5256ae05d9b4646651e897b7d4c00d9a84329bb
---
M svx/source/dialog/srchdlg.cxx
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 3d5a1fd..0040b32 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -2029,7 +2029,7 @@
 }
 bSet = sal_True;
 
-aSearchLB.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
+( (ComboBox*)pCtrl )-SetSelection( Selection( SELECTION_MIN, 
SELECTION_MAX ) );
 
 ModifyHdl_Impl( (ComboBox*)pCtrl );
 

-- 
To view, visit https://gerrit.libreoffice.org/3202
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5256ae05d9b4646651e897b7d4c00d9a84329bb
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] fdo#59071 Slideshow: allow automatic transitions with sub-se...

2013-04-03 Thread Cao Cuong Ngo
Hi,

On 04/03/2013 12:51 PM, Michael Meeks wrote:

   Having said that the 'Rehearse Timings' thing shows up a small
 semi-transparent window on the left that (I assume) should contain some
 legend and/or time counter [ click-to-save or something ? ] - that is
 currently empty/white for me (which is odd ;-).

   
I confirm it is currently empty for me on master, which must be a bug!
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] fdo#59071 Slideshow: allow automatic transitions with sub-se...

2013-04-02 Thread Cao Cuong Ngo (via Code Review)
  mePresChange;
 sal_BoolmbSoundOn;
 String  maSound;
@@ -859,7 +859,7 @@
 {
 maRB_ADVANCE_ON_MOUSE.Check( aEffect.mePresChange == PRESCHANGE_MANUAL 
);
 maRB_ADVANCE_AUTO.Check( aEffect.mePresChange == PRESCHANGE_AUTO );
-maMF_ADVANCE_AUTO_AFTER.SetValue( aEffect.mnTime );
+maMF_ADVANCE_AUTO_AFTER.SetValue( aEffect.mnTime * 100.0);
 }
 
 SdOptions* pOptions = SD_MOD()-GetSdOptions(DOCUMENT_TYPE_IMPRESS);
@@ -1026,7 +1026,7 @@
 aResult.mePresChange = PRESCHANGE_AUTO;
 if( maMF_ADVANCE_AUTO_AFTER.IsEnabled())
 {
-aResult.mnTime = 
static_castlong(maMF_ADVANCE_AUTO_AFTER.GetValue());
+aResult.mnTime = 
static_castdouble(maMF_ADVANCE_AUTO_AFTER.GetValue() ) / 100.0 ;
 aResult.mbTimeAmbiguous = false;
 }
 }
diff --git a/sd/source/ui/animations/SlideTransitionPane.src 
b/sd/source/ui/animations/SlideTransitionPane.src
index d2017de8..d78f0a0 100644
--- a/sd/source/ui/animations/SlideTransitionPane.src
+++ b/sd/source/ui/animations/SlideTransitionPane.src
@@ -142,11 +142,11 @@
 Repeat = TRUE ;
 Spin = TRUE ;
 Minimum = 0 ;
-Maximum = 999 ;
-// decimal digits should be 1, but for now the model only supports 
whole seconds
-DecimalDigits = 0 ;
-// spin size (increment value) should be 5 if digits are 1
-SpinSize = 1 ;
+Maximum =  ;
+// fdo#59071, enable slide auto transition of 0.25 second
+DecimalDigits = 2 ;
+// spin size (increment value), each 0.25 second
+SpinSize = 25 ;
 
 Unit = FUNIT_CUSTOM ;
 CustomUnitText [ en-US ] = sec;
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index ebb88e4..a9ca41c 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -1036,7 +1036,7 @@
 {
 const sal_uInt16 nPageCount = pDoc-GetSdPageCount(PK_STANDARD);
 sal_Bool bKiosk = mpPage3PresTypeKioskRB-IsChecked();
-sal_uInt32 nNewTime = 
(sal_uInt32)mpPage3PresTimeTMF-GetTime().GetMSFromTime() / 1000;
+double nNewTime = 
(double)mpPage3PresTimeTMF-GetTime().GetMSFromTime() / 1000.0;
 if(bKiosk)
 {
 PresentationSettings rSettings = pDoc-getPresentationSettings();
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 03b11bd..0f47b02 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -123,7 +123,7 @@
 { MAP_CHAR_LEN(UNO_NAME_PAGE_RIGHT),WID_PAGE_RIGHT, 
::getCppuType((const sal_Int32*)0),0,  0},
 { MAP_CHAR_LEN(UNO_NAME_PAGE_TOP),  WID_PAGE_TOP,   
::getCppuType((const sal_Int32*)0),0,  0},
 { MAP_CHAR_LEN(UNO_NAME_PAGE_CHANGE),   WID_PAGE_CHANGE,
::getCppuType((const sal_Int32*)0),0,  0},
-{ MAP_CHAR_LEN(UNO_NAME_PAGE_DURATION), WID_PAGE_DURATION,  
::getCppuType((const sal_Int32*)0),0,  0},
+{ MAP_CHAR_LEN(UNO_NAME_PAGE_DURATION), WID_PAGE_DURATION,  
::getCppuType((const double*)0),0,  0},
 { MAP_CHAR_LEN(UNO_NAME_PAGE_EFFECT),   WID_PAGE_EFFECT,
::getCppuType((const presentation::FadeEffect*)0), 0,  0},
 { MAP_CHAR_LEN(UNO_NAME_PAGE_HEIGHT),   WID_PAGE_HEIGHT,
::getCppuType((const sal_Int32*)0),0,  0},
 { MAP_CHAR_LEN(UNO_NAME_PAGE_LAYOUT),   WID_PAGE_LAYOUT,
::getCppuType((const sal_Int16*)0),0,  0},
@@ -612,7 +612,7 @@
 GetPage()-SetAutoLayout( (AutoLayout)nValue, sal_True );
 break;
 case WID_PAGE_DURATION:
-GetPage()-SetTime((sal_uInt32)nValue);
+GetPage()-SetTime((double)nValue);
 break;
 }
 break;
@@ -1033,7 +1033,7 @@
 }
 break;
 case WID_PAGE_DURATION:
-aAny = (sal_Int32)(GetPage()-GetTime());
+aAny = (GetPage()-GetTime());
 break;
 case WID_PAGE_LDNAME:
 {

-- 
To view, visit https://gerrit.libreoffice.org/3176
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1907a1baf30cede91a0438d021e003204ea06651
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] fdo#51656 Mean value line starts in wrong place

2013-04-01 Thread Cao Cuong Ngo (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3156

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/56/3156/1

fdo#51656 Mean value line starts in wrong place

In case of a mean value line, don't shift position.

Change-Id: I056423b3214e8f904202e6e6a3aeaec12122e62d
---
M chart2/source/view/charttypes/VSeriesPlotter.cxx
1 file changed, 4 insertions(+), 2 deletions(-)



diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx 
b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 6e114dd..b35739d 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -1011,13 +1011,16 @@
 xRegressionCurveCalculator-getCurveValues(
 fMinX, fMaxX, nRegressionPointCount, xScalingX, xScalingY, 
bMaySkipPointsInRegressionCalculation ));
 nRegressionPointCount = aCalculatedPoints.getLength();
+bool bAverageLine = RegressionCurveHelper::isMeanValueLine( 
aCurveList[nN] );
 for(sal_Int32 nP=0; nPnRegressionPointCount; nP++)
 {
 double fLogicX = aCalculatedPoints[nP].X;
 double fLogicY = aCalculatedPoints[nP].Y;
 double fLogicZ = 0.0;//dummy
 
-m_pPosHelper-doLogicScaling( fLogicX, fLogicY, fLogicZ );
+// Don't do scaling if it's a mean value line ( fdo#51656 ).
+if ( !bAverageLine )
+m_pPosHelper-doLogicScaling( fLogicX, fLogicY, fLogicZ );
 
 if(!::rtl::math::isNan(fLogicX)  !::rtl::math::isInf(fLogicX)
  !::rtl::math::isNan(fLogicY)  
!::rtl::math::isInf(fLogicY)
@@ -1045,7 +1048,6 @@
 aVLineProperties.initFromPropertySet( xCurveModelProp );
 
 //create an extra group shape for each curve for selection handling
-bool bAverageLine = RegressionCurveHelper::isMeanValueLine( 
aCurveList[nN] );
 uno::Reference drawing::XShapes  xRegressionGroupShapes =
 createGroupShape( xTarget, rVDataSeries.getDataCurveCID( nN, 
bAverageLine ) );
 uno::Reference drawing::XShape  xShape = 
m_pShapeFactory-createLine2D(

-- 
To view, visit https://gerrit.libreoffice.org/3156
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I056423b3214e8f904202e6e6a3aeaec12122e62d
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] fdo#60542 Persona setting: change color of the text menu.

2013-03-30 Thread Cao Cuong Ngo (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3127

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/27/3127/1

fdo#60542 Persona setting: change color of the text menu.

Change-Id: I1d0ed94d41b3b8bcf0504e1528f4f505f817ad86
---
M vcl/source/app/settings.cxx
1 file changed, 10 insertions(+), 3 deletions(-)



diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index d8b1ce5..a237488 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -702,7 +702,7 @@
 enum WhichPersona { PERSONA_HEADER, PERSONA_FOOTER };
 
 /** Update the setting of the Persona header / footer in ImplStyleData */
-static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString 
rHeaderFooter, BitmapEx rHeaderFooterBitmap )
+static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString 
rHeaderFooter, BitmapEx rHeaderFooterBitmap, Color maMenuBarTextColor )
 {
 uno::Reference uno::XComponentContext  xContext( 
comphelper::getProcessComponentContext() );
 if ( !xContext.is() )
@@ -721,13 +721,20 @@
 rHeaderFooterBitmap = BitmapEx();
 
 // now read the new values and setup bitmaps
-OUString aHeader, aFooter;
+OUString aHeader, aFooter, aColor;
 if ( aPersona == own )
 {
 sal_Int32 nIndex = 0;
 aHeader = aPersonaSettings.getToken( 0, ';', nIndex );
 if ( nIndex  0 )
 aFooter = aPersonaSettings.getToken( 0, ';', nIndex );
+
+// change menu text color, advance nIndex to skip the '#'
+if ( nIndex  0 )
+{
+aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
+maMenuBarTextColor = Color( aColor.toInt64( 16 ) );
+}
 }
 else if ( aPersona == default )
 {
@@ -762,7 +769,7 @@
 
 const BitmapEx StyleSettings::GetPersonaHeader() const
 {
-setupPersonaHeaderFooter( PERSONA_HEADER, mpData-maPersonaHeaderFooter, 
mpData-maPersonaHeaderBitmap );
+setupPersonaHeaderFooter( PERSONA_HEADER, mpData-maPersonaHeaderFooter, 
mpData-maPersonaHeaderBitmap, mpData-maMenuBarTextColor );
 return mpData-maPersonaHeaderBitmap;
 }
 

-- 
To view, visit https://gerrit.libreoffice.org/3127
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d0ed94d41b3b8bcf0504e1528f4f505f817ad86
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] fdo#60148 Clean up warnings from the Clang compiler plugin

2013-03-04 Thread Cao Cuong Ngo (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2544

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/44/2544/1

fdo#60148 Clean up warnings from the Clang compiler plugin

Cleaned all the warnings from loplugin. Some warnings come from the untar 
downloaded sources couldn't be fixed.

Change-Id: I08d755677c46c476710ecbd067ed9f7e2f54a671
---
M UnoControls/source/base/registercontrols.cxx
M accessibility/source/extended/accessibleeditbrowseboxcell.cxx
M autodoc/source/parser_i/idoc/cx_dsapi.cxx
M basegfx/source/polygon/b2dpolygontools.cxx
M basegfx/source/polygon/b3dpolypolygontools.cxx
M basic/source/runtime/iosys.cxx
M basic/source/sbx/sbxobj.cxx
M basic/source/sbx/sbxvalue.cxx
M chart2/source/controller/dialogs/tp_DataSource.cxx
M chart2/source/controller/main/ChartDropTargetHelper.cxx
M chart2/source/controller/main/ChartFrameloader.cxx
M chart2/source/model/template/BarChartTypeTemplate.cxx
M chart2/source/model/template/ChartTypeTemplate.cxx
M connectivity/source/commontools/dbtools2.cxx
M connectivity/source/drivers/file/FTable.cxx
M connectivity/source/drivers/mork/MResultSetMetaData.cxx
M connectivity/source/drivers/postgresql/pq_xindexcolumns.cxx
M connectivity/source/drivers/postgresql/pq_xtable.cxx
M connectivity/source/drivers/postgresql/pq_xtables.cxx
M connectivity/source/drivers/postgresql/pq_xuser.cxx
M connectivity/source/parse/sqlnode.cxx
M cppcanvas/source/mtfrenderer/emfplus.cxx
M cui/source/dialogs/cuigaldlg.cxx
M cui/source/tabpages/tpbitmap.cxx
M cui/source/tabpages/tpgradnt.cxx
M cui/source/tabpages/tphatch.cxx
M cui/source/tabpages/tplnedef.cxx
M desktop/source/app/lockfile2.cxx
M drawinglayer/source/geometry/viewinformation2d.cxx
M drawinglayer/source/geometry/viewinformation3d.cxx
M drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
M drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
M drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
M editeng/source/misc/hangulhanja.cxx
M filter/source/config/cache/filterfactory.cxx
M filter/source/graphicfilter/icgm/class2.cxx
M filter/source/placeware/exporter.cxx
M filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
M forms/source/xforms/datatypes.cxx
M formula/source/ui/dlg/funcpage.cxx
M framework/source/services/autorecovery.cxx
M helpcompiler/source/HelpCompiler.cxx
M hwpfilter/source/hwpreader.cxx
M i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
M idl/source/prj/command.cxx
M jvmfwk/source/elements.cxx
M l10ntools/source/xrmmerge.cxx
M lotuswordpro/source/filter/lwpoleobject.cxx
M padmin/source/adddlg.cxx
M reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
M rsc/source/rscpp/cpp5.c
M sal/inc/sal/log-areas.dox
M sc/qa/unit/helper/qahelper.hxx
M sc/qa/unit/subsequent_export-test.cxx
M sc/qa/unit/subsequent_filters-test.cxx
M sc/source/core/tool/compiler.cxx
M sc/source/filter/oox/extlstcontext.cxx
M sc/source/ui/drawfunc/drawsh.cxx
M sc/source/ui/pagedlg/scuitphfedit.cxx
M sc/source/ui/vba/vbafont.cxx
M sd/source/filter/eppt/pptx-epptooxml.cxx
M sfx2/source/appl/appuno.cxx
M sfx2/source/appl/linksrc.cxx
M sfx2/source/control/bindings.cxx
M sfx2/source/control/dispatch.cxx
M sfx2/source/control/shell.cxx
M sfx2/source/dialog/dinfdlg.cxx
M sfx2/source/dialog/filedlghelper.cxx
M sfx2/source/doc/sfxbasemodel.cxx
M sfx2/source/menu/mnuitem.cxx
M sfx2/source/view/sfxbasecontroller.cxx
M slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
M slideshow/source/engine/transitions/fanwipe.cxx
M svtools/source/contnr/DocumentInfoPreview.cxx
M svx/source/dialog/srchdlg.cxx
M svx/source/fmcomp/gridcell.cxx
M svx/source/form/navigatortree.cxx
M svx/source/gallery2/galobj.cxx
M svx/source/sdr/primitive2d/sdrprimitivetools.cxx
M unotools/source/config/configitem.cxx
M vcl/source/filter/wmf/enhwmf.cxx
M vcl/source/gdi/pdfwriter_impl.cxx
M vcl/source/window/window.cxx
M vcl/unx/generic/printer/printerinfomanager.cxx
M vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
M writerperfect/source/draw/WPGImportFilter.cxx
86 files changed, 1,510 insertions(+), 1,624 deletions(-)




-- 
To view, visit https://gerrit.libreoffice.org/2544
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I08d755677c46c476710ecbd067ed9f7e2f54a671
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Cao Cuong Ngo cao.cuong@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


  1   2   >